From f6113aa4d174cd789650fbcdf7a81c052ad18e68 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A2u=20Cao?= Date: Tue, 18 Jun 2024 02:06:43 +0200 Subject: [PATCH 01/50] WIP --- docs/.vitepress/cache/deps/@theme_index.js | 257 + .../.vitepress/cache/deps/@theme_index.js.map | 7 + docs/.vitepress/cache/deps/_metadata.json | 40 + docs/.vitepress/cache/deps/chunk-B2WI2LE3.js | 9172 +++++++++++++ .../cache/deps/chunk-B2WI2LE3.js.map | 7 + docs/.vitepress/cache/deps/chunk-BJ3OZQ3N.js | 11451 ++++++++++++++++ .../cache/deps/chunk-BJ3OZQ3N.js.map | 7 + docs/.vitepress/cache/deps/package.json | 3 + .../deps/vitepress___@vue_devtools-api.js | 4133 ++++++ .../deps/vitepress___@vue_devtools-api.js.map | 7 + .../cache/deps/vitepress___@vueuse_core.js | 567 + .../deps/vitepress___@vueuse_core.js.map | 7 + docs/.vitepress/cache/deps/vue.js | 323 + docs/.vitepress/cache/deps/vue.js.map | 7 + docs/.vitepress/config.mts | 50 + docs/about/api-examples.md | 49 + docs/about/index.md | 25 + docs/about/markdown-examples.md | 85 + docs/index.md | 33 + docs/logo.svg | 18 + docs/rs.js/api/access/classes/Access.md | 169 + docs/rs.js/api/access/index.md | 7 + .../api/baseclient/classes/BaseClient.md | 404 + docs/rs.js/api/baseclient/index.md | 7 + docs/rs.js/api/index.md | 80 + docs/rs.js/api/modules.md | 7 + .../remotestorage/classes/RemoteStorage.md | 445 + docs/rs.js/api/remotestorage/index.md | 7 + docs/rs.js/index.md | 0 package-lock.json | 3252 ++++- package.json | 12 +- src/access.ts | 14 +- src/baseclient.ts | 14 +- src/eventhandling.ts | 21 +- src/remotestorage.ts | 122 +- typedoc.json | 13 + 36 files changed, 30423 insertions(+), 399 deletions(-) create mode 100644 docs/.vitepress/cache/deps/@theme_index.js create mode 100644 docs/.vitepress/cache/deps/@theme_index.js.map create mode 100644 docs/.vitepress/cache/deps/_metadata.json create mode 100644 docs/.vitepress/cache/deps/chunk-B2WI2LE3.js create mode 100644 docs/.vitepress/cache/deps/chunk-B2WI2LE3.js.map create mode 100644 docs/.vitepress/cache/deps/chunk-BJ3OZQ3N.js create mode 100644 docs/.vitepress/cache/deps/chunk-BJ3OZQ3N.js.map create mode 100644 docs/.vitepress/cache/deps/package.json create mode 100644 docs/.vitepress/cache/deps/vitepress___@vue_devtools-api.js create mode 100644 docs/.vitepress/cache/deps/vitepress___@vue_devtools-api.js.map create mode 100644 docs/.vitepress/cache/deps/vitepress___@vueuse_core.js create mode 100644 docs/.vitepress/cache/deps/vitepress___@vueuse_core.js.map create mode 100644 docs/.vitepress/cache/deps/vue.js create mode 100644 docs/.vitepress/cache/deps/vue.js.map create mode 100644 docs/.vitepress/config.mts create mode 100644 docs/about/api-examples.md create mode 100644 docs/about/index.md create mode 100644 docs/about/markdown-examples.md create mode 100644 docs/index.md create mode 100644 docs/logo.svg create mode 100644 docs/rs.js/api/access/classes/Access.md create mode 100644 docs/rs.js/api/access/index.md create mode 100644 docs/rs.js/api/baseclient/classes/BaseClient.md create mode 100644 docs/rs.js/api/baseclient/index.md create mode 100644 docs/rs.js/api/index.md create mode 100644 docs/rs.js/api/modules.md create mode 100644 docs/rs.js/api/remotestorage/classes/RemoteStorage.md create mode 100644 docs/rs.js/api/remotestorage/index.md create mode 100644 docs/rs.js/index.md create mode 100644 typedoc.json diff --git a/docs/.vitepress/cache/deps/@theme_index.js b/docs/.vitepress/cache/deps/@theme_index.js new file mode 100644 index 000000000..54e1c0565 --- /dev/null +++ b/docs/.vitepress/cache/deps/@theme_index.js @@ -0,0 +1,257 @@ +import { + useMediaQuery +} from "./chunk-B2WI2LE3.js"; +import { + computed, + ref, + shallowRef, + watch +} from "./chunk-BJ3OZQ3N.js"; + +// node_modules/vitepress/dist/client/theme-default/index.js +import "/home/basti/src/remotestorage/remotestorage.js/node_modules/vitepress/dist/client/theme-default/styles/fonts.css"; + +// node_modules/vitepress/dist/client/theme-default/without-fonts.js +import "/home/basti/src/remotestorage/remotestorage.js/node_modules/vitepress/dist/client/theme-default/styles/vars.css"; +import "/home/basti/src/remotestorage/remotestorage.js/node_modules/vitepress/dist/client/theme-default/styles/base.css"; +import "/home/basti/src/remotestorage/remotestorage.js/node_modules/vitepress/dist/client/theme-default/styles/icons.css"; +import "/home/basti/src/remotestorage/remotestorage.js/node_modules/vitepress/dist/client/theme-default/styles/utils.css"; +import "/home/basti/src/remotestorage/remotestorage.js/node_modules/vitepress/dist/client/theme-default/styles/components/custom-block.css"; +import "/home/basti/src/remotestorage/remotestorage.js/node_modules/vitepress/dist/client/theme-default/styles/components/vp-code.css"; +import "/home/basti/src/remotestorage/remotestorage.js/node_modules/vitepress/dist/client/theme-default/styles/components/vp-code-group.css"; +import "/home/basti/src/remotestorage/remotestorage.js/node_modules/vitepress/dist/client/theme-default/styles/components/vp-doc.css"; +import "/home/basti/src/remotestorage/remotestorage.js/node_modules/vitepress/dist/client/theme-default/styles/components/vp-sponsor.css"; +import VPBadge from "/home/basti/src/remotestorage/remotestorage.js/node_modules/vitepress/dist/client/theme-default/components/VPBadge.vue"; +import Layout from "/home/basti/src/remotestorage/remotestorage.js/node_modules/vitepress/dist/client/theme-default/Layout.vue"; +import { default as default2 } from "/home/basti/src/remotestorage/remotestorage.js/node_modules/vitepress/dist/client/theme-default/components/VPBadge.vue"; +import { default as default3 } from "/home/basti/src/remotestorage/remotestorage.js/node_modules/vitepress/dist/client/theme-default/components/VPImage.vue"; +import { default as default4 } from "/home/basti/src/remotestorage/remotestorage.js/node_modules/vitepress/dist/client/theme-default/components/VPButton.vue"; +import { default as default5 } from "/home/basti/src/remotestorage/remotestorage.js/node_modules/vitepress/dist/client/theme-default/components/VPHomeHero.vue"; +import { default as default6 } from "/home/basti/src/remotestorage/remotestorage.js/node_modules/vitepress/dist/client/theme-default/components/VPHomeFeatures.vue"; +import { default as default7 } from "/home/basti/src/remotestorage/remotestorage.js/node_modules/vitepress/dist/client/theme-default/components/VPHomeSponsors.vue"; +import { default as default8 } from "/home/basti/src/remotestorage/remotestorage.js/node_modules/vitepress/dist/client/theme-default/components/VPDocAsideSponsors.vue"; +import { default as default9 } from "/home/basti/src/remotestorage/remotestorage.js/node_modules/vitepress/dist/client/theme-default/components/VPSponsors.vue"; +import { default as default10 } from "/home/basti/src/remotestorage/remotestorage.js/node_modules/vitepress/dist/client/theme-default/components/VPTeamPage.vue"; +import { default as default11 } from "/home/basti/src/remotestorage/remotestorage.js/node_modules/vitepress/dist/client/theme-default/components/VPTeamPageTitle.vue"; +import { default as default12 } from "/home/basti/src/remotestorage/remotestorage.js/node_modules/vitepress/dist/client/theme-default/components/VPTeamPageSection.vue"; +import { default as default13 } from "/home/basti/src/remotestorage/remotestorage.js/node_modules/vitepress/dist/client/theme-default/components/VPTeamMembers.vue"; + +// node_modules/vitepress/dist/client/theme-default/support/utils.js +import { withBase } from "vitepress"; + +// node_modules/vitepress/dist/client/theme-default/composables/data.js +import { useData as useData$ } from "vitepress"; +var useData = useData$; + +// node_modules/vitepress/dist/client/theme-default/support/utils.js +function ensureStartingSlash(path) { + return /^\//.test(path) ? path : `/${path}`; +} + +// node_modules/vitepress/dist/client/theme-default/support/sidebar.js +function getSidebar(_sidebar, path) { + if (Array.isArray(_sidebar)) + return addBase(_sidebar); + if (_sidebar == null) + return []; + path = ensureStartingSlash(path); + const dir = Object.keys(_sidebar).sort((a, b) => { + return b.split("/").length - a.split("/").length; + }).find((dir2) => { + return path.startsWith(ensureStartingSlash(dir2)); + }); + const sidebar = dir ? _sidebar[dir] : []; + return Array.isArray(sidebar) ? addBase(sidebar) : addBase(sidebar.items, sidebar.base); +} +function getSidebarGroups(sidebar) { + const groups = []; + let lastGroupIndex = 0; + for (const index in sidebar) { + const item = sidebar[index]; + if (item.items) { + lastGroupIndex = groups.push(item); + continue; + } + if (!groups[lastGroupIndex]) { + groups.push({ items: [] }); + } + groups[lastGroupIndex].items.push(item); + } + return groups; +} +function addBase(items, _base) { + return [...items].map((_item) => { + const item = { ..._item }; + const base = item.base || _base; + if (base && item.link) + item.link = base + item.link; + if (item.items) + item.items = addBase(item.items, base); + return item; + }); +} + +// node_modules/vitepress/dist/client/theme-default/composables/sidebar.js +function useSidebar() { + const { frontmatter, page, theme: theme2 } = useData(); + const is960 = useMediaQuery("(min-width: 960px)"); + const isOpen = ref(false); + const _sidebar = computed(() => { + const sidebarConfig = theme2.value.sidebar; + const relativePath = page.value.relativePath; + return sidebarConfig ? getSidebar(sidebarConfig, relativePath) : []; + }); + const sidebar = ref(_sidebar.value); + watch(_sidebar, (next, prev) => { + if (JSON.stringify(next) !== JSON.stringify(prev)) + sidebar.value = _sidebar.value; + }); + const hasSidebar = computed(() => { + return frontmatter.value.sidebar !== false && sidebar.value.length > 0 && frontmatter.value.layout !== "home"; + }); + const leftAside = computed(() => { + if (hasAside) + return frontmatter.value.aside == null ? theme2.value.aside === "left" : frontmatter.value.aside === "left"; + return false; + }); + const hasAside = computed(() => { + if (frontmatter.value.layout === "home") + return false; + if (frontmatter.value.aside != null) + return !!frontmatter.value.aside; + return theme2.value.aside !== false; + }); + const isSidebarEnabled = computed(() => hasSidebar.value && is960.value); + const sidebarGroups = computed(() => { + return hasSidebar.value ? getSidebarGroups(sidebar.value) : []; + }); + function open() { + isOpen.value = true; + } + function close() { + isOpen.value = false; + } + function toggle() { + isOpen.value ? close() : open(); + } + return { + isOpen, + sidebar, + sidebarGroups, + hasSidebar, + hasAside, + leftAside, + isSidebarEnabled, + open, + close, + toggle + }; +} + +// node_modules/vitepress/dist/client/theme-default/composables/local-nav.js +import { onContentUpdated } from "vitepress"; + +// node_modules/vitepress/dist/client/theme-default/composables/outline.js +import { getScrollOffset } from "vitepress"; +var resolvedHeaders = []; +function getHeaders(range) { + const headers = [ + ...document.querySelectorAll(".VPDoc :where(h1,h2,h3,h4,h5,h6)") + ].filter((el) => el.id && el.hasChildNodes()).map((el) => { + const level = Number(el.tagName[1]); + return { + element: el, + title: serializeHeader(el), + link: "#" + el.id, + level + }; + }); + return resolveHeaders(headers, range); +} +function serializeHeader(h) { + let ret = ""; + for (const node of h.childNodes) { + if (node.nodeType === 1) { + if (node.classList.contains("VPBadge") || node.classList.contains("header-anchor") || node.classList.contains("ignore-header")) { + continue; + } + ret += node.textContent; + } else if (node.nodeType === 3) { + ret += node.textContent; + } + } + return ret.trim(); +} +function resolveHeaders(headers, range) { + if (range === false) { + return []; + } + const levelsRange = (typeof range === "object" && !Array.isArray(range) ? range.level : range) || 2; + const [high, low] = typeof levelsRange === "number" ? [levelsRange, levelsRange] : levelsRange === "deep" ? [2, 6] : levelsRange; + headers = headers.filter((h) => h.level >= high && h.level <= low); + resolvedHeaders.length = 0; + for (const { element, link } of headers) { + resolvedHeaders.push({ element, link }); + } + const ret = []; + outer: for (let i = 0; i < headers.length; i++) { + const cur = headers[i]; + if (i === 0) { + ret.push(cur); + } else { + for (let j = i - 1; j >= 0; j--) { + const prev = headers[j]; + if (prev.level < cur.level) { + ; + (prev.children || (prev.children = [])).push(cur); + continue outer; + } + } + ret.push(cur); + } + } + return ret; +} + +// node_modules/vitepress/dist/client/theme-default/composables/local-nav.js +function useLocalNav() { + const { theme: theme2, frontmatter } = useData(); + const headers = shallowRef([]); + const hasLocalNav = computed(() => { + return headers.value.length > 0; + }); + onContentUpdated(() => { + headers.value = getHeaders(frontmatter.value.outline ?? theme2.value.outline); + }); + return { + headers, + hasLocalNav + }; +} + +// node_modules/vitepress/dist/client/theme-default/without-fonts.js +var theme = { + Layout, + enhanceApp: ({ app }) => { + app.component("Badge", VPBadge); + } +}; +var without_fonts_default = theme; +export { + default2 as VPBadge, + default4 as VPButton, + default8 as VPDocAsideSponsors, + default6 as VPHomeFeatures, + default5 as VPHomeHero, + default7 as VPHomeSponsors, + default3 as VPImage, + default9 as VPSponsors, + default13 as VPTeamMembers, + default10 as VPTeamPage, + default12 as VPTeamPageSection, + default11 as VPTeamPageTitle, + without_fonts_default as default, + useLocalNav, + useSidebar +}; +//# sourceMappingURL=@theme_index.js.map diff --git a/docs/.vitepress/cache/deps/@theme_index.js.map b/docs/.vitepress/cache/deps/@theme_index.js.map new file mode 100644 index 000000000..3a14d0345 --- /dev/null +++ b/docs/.vitepress/cache/deps/@theme_index.js.map @@ -0,0 +1,7 @@ +{ + "version": 3, + "sources": ["../../../../node_modules/vitepress/dist/client/theme-default/index.js", "../../../../node_modules/vitepress/dist/client/theme-default/without-fonts.js", "../../../../node_modules/vitepress/dist/client/theme-default/support/utils.js", "../../../../node_modules/vitepress/dist/client/theme-default/composables/data.js", "../../../../node_modules/vitepress/dist/client/theme-default/support/sidebar.js", "../../../../node_modules/vitepress/dist/client/theme-default/composables/sidebar.js", "../../../../node_modules/vitepress/dist/client/theme-default/composables/local-nav.js", "../../../../node_modules/vitepress/dist/client/theme-default/composables/outline.js"], + "sourcesContent": ["import './styles/fonts.css';\nexport * from './without-fonts';\nexport { default as default } from './without-fonts';\n", "import './styles/vars.css';\nimport './styles/base.css';\nimport './styles/icons.css';\nimport './styles/utils.css';\nimport './styles/components/custom-block.css';\nimport './styles/components/vp-code.css';\nimport './styles/components/vp-code-group.css';\nimport './styles/components/vp-doc.css';\nimport './styles/components/vp-sponsor.css';\nimport VPBadge from './components/VPBadge.vue';\nimport Layout from './Layout.vue';\nexport { default as VPBadge } from './components/VPBadge.vue';\nexport { default as VPImage } from './components/VPImage.vue';\nexport { default as VPButton } from './components/VPButton.vue';\nexport { default as VPHomeHero } from './components/VPHomeHero.vue';\nexport { default as VPHomeFeatures } from './components/VPHomeFeatures.vue';\nexport { default as VPHomeSponsors } from './components/VPHomeSponsors.vue';\nexport { default as VPDocAsideSponsors } from './components/VPDocAsideSponsors.vue';\nexport { default as VPSponsors } from './components/VPSponsors.vue';\nexport { default as VPTeamPage } from './components/VPTeamPage.vue';\nexport { default as VPTeamPageTitle } from './components/VPTeamPageTitle.vue';\nexport { default as VPTeamPageSection } from './components/VPTeamPageSection.vue';\nexport { default as VPTeamMembers } from './components/VPTeamMembers.vue';\nexport { useSidebar } from './composables/sidebar';\nexport { useLocalNav } from './composables/local-nav';\nconst theme = {\n Layout,\n enhanceApp: ({ app }) => {\n app.component('Badge', VPBadge);\n }\n};\nexport default theme;\n", "import { withBase } from 'vitepress';\nimport { useData } from '../composables/data';\nimport { isExternal, treatAsHtml } from '../../shared';\nexport function throttleAndDebounce(fn, delay) {\n let timeoutId;\n let called = false;\n return () => {\n if (timeoutId)\n clearTimeout(timeoutId);\n if (!called) {\n fn();\n (called = true) && setTimeout(() => (called = false), delay);\n }\n else\n timeoutId = setTimeout(fn, delay);\n };\n}\nexport function ensureStartingSlash(path) {\n return /^\\//.test(path) ? path : `/${path}`;\n}\nexport function normalizeLink(url) {\n const { pathname, search, hash, protocol } = new URL(url, 'http://a.com');\n if (isExternal(url) ||\n url.startsWith('#') ||\n !protocol.startsWith('http') ||\n !treatAsHtml(pathname))\n return url;\n const { site } = useData();\n const normalizedPath = pathname.endsWith('/') || pathname.endsWith('.html')\n ? url\n : url.replace(/(?:(^\\.+)\\/)?.*$/, `$1${pathname.replace(/(\\.md)?$/, site.value.cleanUrls ? '' : '.html')}${search}${hash}`);\n return withBase(normalizedPath);\n}\n", "import { useData as useData$ } from 'vitepress';\nexport const useData = useData$;\n", "import { ensureStartingSlash } from './utils';\nimport { isActive } from '../../shared';\n/**\n * Get the `Sidebar` from sidebar option. This method will ensure to get correct\n * sidebar config from `MultiSideBarConfig` with various path combinations such\n * as matching `guide/` and `/guide/`. If no matching config was found, it will\n * return empty array.\n */\nexport function getSidebar(_sidebar, path) {\n if (Array.isArray(_sidebar))\n return addBase(_sidebar);\n if (_sidebar == null)\n return [];\n path = ensureStartingSlash(path);\n const dir = Object.keys(_sidebar)\n .sort((a, b) => {\n return b.split('/').length - a.split('/').length;\n })\n .find((dir) => {\n // make sure the multi sidebar key starts with slash too\n return path.startsWith(ensureStartingSlash(dir));\n });\n const sidebar = dir ? _sidebar[dir] : [];\n return Array.isArray(sidebar)\n ? addBase(sidebar)\n : addBase(sidebar.items, sidebar.base);\n}\n/**\n * Get or generate sidebar group from the given sidebar items.\n */\nexport function getSidebarGroups(sidebar) {\n const groups = [];\n let lastGroupIndex = 0;\n for (const index in sidebar) {\n const item = sidebar[index];\n if (item.items) {\n lastGroupIndex = groups.push(item);\n continue;\n }\n if (!groups[lastGroupIndex]) {\n groups.push({ items: [] });\n }\n groups[lastGroupIndex].items.push(item);\n }\n return groups;\n}\nexport function getFlatSideBarLinks(sidebar) {\n const links = [];\n function recursivelyExtractLinks(items) {\n for (const item of items) {\n if (item.text && item.link) {\n links.push({\n text: item.text,\n link: item.link,\n docFooterText: item.docFooterText\n });\n }\n if (item.items) {\n recursivelyExtractLinks(item.items);\n }\n }\n }\n recursivelyExtractLinks(sidebar);\n return links;\n}\n/**\n * Check if the given sidebar item contains any active link.\n */\nexport function hasActiveLink(path, items) {\n if (Array.isArray(items)) {\n return items.some((item) => hasActiveLink(path, item));\n }\n return isActive(path, items.link)\n ? true\n : items.items\n ? hasActiveLink(path, items.items)\n : false;\n}\nfunction addBase(items, _base) {\n return [...items].map((_item) => {\n const item = { ..._item };\n const base = item.base || _base;\n if (base && item.link)\n item.link = base + item.link;\n if (item.items)\n item.items = addBase(item.items, base);\n return item;\n });\n}\n", "import { useMediaQuery } from '@vueuse/core';\nimport { computed, onMounted, onUnmounted, ref, watch, watchEffect, watchPostEffect } from 'vue';\nimport { isActive } from '../../shared';\nimport { hasActiveLink as containsActiveLink, getSidebar, getSidebarGroups } from '../support/sidebar';\nimport { useData } from './data';\nexport function useSidebar() {\n const { frontmatter, page, theme } = useData();\n const is960 = useMediaQuery('(min-width: 960px)');\n const isOpen = ref(false);\n const _sidebar = computed(() => {\n const sidebarConfig = theme.value.sidebar;\n const relativePath = page.value.relativePath;\n return sidebarConfig ? getSidebar(sidebarConfig, relativePath) : [];\n });\n const sidebar = ref(_sidebar.value);\n watch(_sidebar, (next, prev) => {\n if (JSON.stringify(next) !== JSON.stringify(prev))\n sidebar.value = _sidebar.value;\n });\n const hasSidebar = computed(() => {\n return (frontmatter.value.sidebar !== false &&\n sidebar.value.length > 0 &&\n frontmatter.value.layout !== 'home');\n });\n const leftAside = computed(() => {\n if (hasAside)\n return frontmatter.value.aside == null\n ? theme.value.aside === 'left'\n : frontmatter.value.aside === 'left';\n return false;\n });\n const hasAside = computed(() => {\n if (frontmatter.value.layout === 'home')\n return false;\n if (frontmatter.value.aside != null)\n return !!frontmatter.value.aside;\n return theme.value.aside !== false;\n });\n const isSidebarEnabled = computed(() => hasSidebar.value && is960.value);\n const sidebarGroups = computed(() => {\n return hasSidebar.value ? getSidebarGroups(sidebar.value) : [];\n });\n function open() {\n isOpen.value = true;\n }\n function close() {\n isOpen.value = false;\n }\n function toggle() {\n isOpen.value ? close() : open();\n }\n return {\n isOpen,\n sidebar,\n sidebarGroups,\n hasSidebar,\n hasAside,\n leftAside,\n isSidebarEnabled,\n open,\n close,\n toggle\n };\n}\n/**\n * a11y: cache the element that opened the Sidebar (the menu button) then\n * focus that button again when Menu is closed with Escape key.\n */\nexport function useCloseSidebarOnEscape(isOpen, close) {\n let triggerElement;\n watchEffect(() => {\n triggerElement = isOpen.value\n ? document.activeElement\n : undefined;\n });\n onMounted(() => {\n window.addEventListener('keyup', onEscape);\n });\n onUnmounted(() => {\n window.removeEventListener('keyup', onEscape);\n });\n function onEscape(e) {\n if (e.key === 'Escape' && isOpen.value) {\n close();\n triggerElement?.focus();\n }\n }\n}\nexport function useSidebarControl(item) {\n const { page, hash } = useData();\n const collapsed = ref(false);\n const collapsible = computed(() => {\n return item.value.collapsed != null;\n });\n const isLink = computed(() => {\n return !!item.value.link;\n });\n const isActiveLink = ref(false);\n const updateIsActiveLink = () => {\n isActiveLink.value = isActive(page.value.relativePath, item.value.link);\n };\n watch([page, item, hash], updateIsActiveLink);\n onMounted(updateIsActiveLink);\n const hasActiveLink = computed(() => {\n if (isActiveLink.value) {\n return true;\n }\n return item.value.items\n ? containsActiveLink(page.value.relativePath, item.value.items)\n : false;\n });\n const hasChildren = computed(() => {\n return !!(item.value.items && item.value.items.length);\n });\n watchEffect(() => {\n collapsed.value = !!(collapsible.value && item.value.collapsed);\n });\n watchPostEffect(() => {\n ;\n (isActiveLink.value || hasActiveLink.value) && (collapsed.value = false);\n });\n function toggle() {\n if (collapsible.value) {\n collapsed.value = !collapsed.value;\n }\n }\n return {\n collapsed,\n collapsible,\n isLink,\n isActiveLink,\n hasActiveLink,\n hasChildren,\n toggle\n };\n}\n", "import { onContentUpdated } from 'vitepress';\nimport { computed, shallowRef } from 'vue';\nimport { getHeaders } from '../composables/outline';\nimport { useData } from './data';\nexport function useLocalNav() {\n const { theme, frontmatter } = useData();\n const headers = shallowRef([]);\n const hasLocalNav = computed(() => {\n return headers.value.length > 0;\n });\n onContentUpdated(() => {\n headers.value = getHeaders(frontmatter.value.outline ?? theme.value.outline);\n });\n return {\n headers,\n hasLocalNav\n };\n}\n", "import { getScrollOffset } from 'vitepress';\nimport { onMounted, onUnmounted, onUpdated } from 'vue';\nimport { throttleAndDebounce } from '../support/utils';\nimport { useAside } from './aside';\n// cached list of anchor elements from resolveHeaders\nconst resolvedHeaders = [];\nexport function resolveTitle(theme) {\n return ((typeof theme.outline === 'object' &&\n !Array.isArray(theme.outline) &&\n theme.outline.label) ||\n theme.outlineTitle ||\n 'On this page');\n}\nexport function getHeaders(range) {\n const headers = [\n ...document.querySelectorAll('.VPDoc :where(h1,h2,h3,h4,h5,h6)')\n ]\n .filter((el) => el.id && el.hasChildNodes())\n .map((el) => {\n const level = Number(el.tagName[1]);\n return {\n element: el,\n title: serializeHeader(el),\n link: '#' + el.id,\n level\n };\n });\n return resolveHeaders(headers, range);\n}\nfunction serializeHeader(h) {\n let ret = '';\n for (const node of h.childNodes) {\n if (node.nodeType === 1) {\n if (node.classList.contains('VPBadge') ||\n node.classList.contains('header-anchor') ||\n node.classList.contains('ignore-header')) {\n continue;\n }\n ret += node.textContent;\n }\n else if (node.nodeType === 3) {\n ret += node.textContent;\n }\n }\n return ret.trim();\n}\nexport function resolveHeaders(headers, range) {\n if (range === false) {\n return [];\n }\n const levelsRange = (typeof range === 'object' && !Array.isArray(range)\n ? range.level\n : range) || 2;\n const [high, low] = typeof levelsRange === 'number'\n ? [levelsRange, levelsRange]\n : levelsRange === 'deep'\n ? [2, 6]\n : levelsRange;\n headers = headers.filter((h) => h.level >= high && h.level <= low);\n // clear previous caches\n resolvedHeaders.length = 0;\n // update global header list for active link rendering\n for (const { element, link } of headers) {\n resolvedHeaders.push({ element, link });\n }\n const ret = [];\n outer: for (let i = 0; i < headers.length; i++) {\n const cur = headers[i];\n if (i === 0) {\n ret.push(cur);\n }\n else {\n for (let j = i - 1; j >= 0; j--) {\n const prev = headers[j];\n if (prev.level < cur.level) {\n ;\n (prev.children || (prev.children = [])).push(cur);\n continue outer;\n }\n }\n ret.push(cur);\n }\n }\n return ret;\n}\nexport function useActiveAnchor(container, marker) {\n const { isAsideEnabled } = useAside();\n const onScroll = throttleAndDebounce(setActiveLink, 100);\n let prevActiveLink = null;\n onMounted(() => {\n requestAnimationFrame(setActiveLink);\n window.addEventListener('scroll', onScroll);\n });\n onUpdated(() => {\n // sidebar update means a route change\n activateLink(location.hash);\n });\n onUnmounted(() => {\n window.removeEventListener('scroll', onScroll);\n });\n function setActiveLink() {\n if (!isAsideEnabled.value) {\n return;\n }\n const scrollY = window.scrollY;\n const innerHeight = window.innerHeight;\n const offsetHeight = document.body.offsetHeight;\n const isBottom = Math.abs(scrollY + innerHeight - offsetHeight) < 1;\n // resolvedHeaders may be repositioned, hidden or fix positioned\n const headers = resolvedHeaders\n .map(({ element, link }) => ({\n link,\n top: getAbsoluteTop(element)\n }))\n .filter(({ top }) => !Number.isNaN(top))\n .sort((a, b) => a.top - b.top);\n // no headers available for active link\n if (!headers.length) {\n activateLink(null);\n return;\n }\n // page top\n if (scrollY < 1) {\n activateLink(null);\n return;\n }\n // page bottom - highlight last link\n if (isBottom) {\n activateLink(headers[headers.length - 1].link);\n return;\n }\n // find the last header above the top of viewport\n let activeLink = null;\n for (const { link, top } of headers) {\n if (top > scrollY + getScrollOffset() + 4) {\n break;\n }\n activeLink = link;\n }\n activateLink(activeLink);\n }\n function activateLink(hash) {\n if (prevActiveLink) {\n prevActiveLink.classList.remove('active');\n }\n if (hash == null) {\n prevActiveLink = null;\n }\n else {\n prevActiveLink = container.value.querySelector(`a[href=\"${decodeURIComponent(hash)}\"]`);\n }\n const activeLink = prevActiveLink;\n if (activeLink) {\n activeLink.classList.add('active');\n marker.value.style.top = activeLink.offsetTop + 39 + 'px';\n marker.value.style.opacity = '1';\n }\n else {\n marker.value.style.top = '33px';\n marker.value.style.opacity = '0';\n }\n }\n}\nfunction getAbsoluteTop(element) {\n let offsetTop = 0;\n while (element !== document.body) {\n if (element === null) {\n // child element is:\n // - not attached to the DOM (display: none)\n // - set to fixed position (not scrollable)\n // - body or html element (null offsetParent)\n return NaN;\n }\n offsetTop += element.offsetTop;\n element = element.offsetParent;\n }\n return offsetTop;\n}\n"], + "mappings": ";;;;;;;;;;;AAAA,OAAO;;;ACAP,OAAO;AACP,OAAO;AACP,OAAO;AACP,OAAO;AACP,OAAO;AACP,OAAO;AACP,OAAO;AACP,OAAO;AACP,OAAO;AACP,OAAO,aAAa;AACpB,OAAO,YAAY;AACnB,SAAoB,WAAXA,gBAA0B;AACnC,SAAoB,WAAXA,gBAA0B;AACnC,SAAoB,WAAXA,gBAA2B;AACpC,SAAoB,WAAXA,gBAA6B;AACtC,SAAoB,WAAXA,gBAAiC;AAC1C,SAAoB,WAAXA,gBAAiC;AAC1C,SAAoB,WAAXA,gBAAqC;AAC9C,SAAoB,WAAXA,gBAA6B;AACtC,SAAoB,WAAXA,iBAA6B;AACtC,SAAoB,WAAXA,iBAAkC;AAC3C,SAAoB,WAAXA,iBAAoC;AAC7C,SAAoB,WAAXA,iBAAgC;;;ACtBzC,SAAS,gBAAgB;;;ACAzB,SAAS,WAAW,gBAAgB;AAC7B,IAAM,UAAU;;;ADgBhB,SAAS,oBAAoB,MAAM;AAC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"names": ["default", "dir", "theme", "theme"] +} diff --git a/docs/.vitepress/cache/deps/_metadata.json b/docs/.vitepress/cache/deps/_metadata.json new file mode 100644 index 000000000..d91b6c17b --- /dev/null +++ b/docs/.vitepress/cache/deps/_metadata.json @@ -0,0 +1,40 @@ +{ + "hash": "379c5044", + "configHash": "11d6af3f", + "lockfileHash": "8f5d39ce", + "browserHash": "c1c2f060", + "optimized": { + "vue": { + "src": "../../../../node_modules/vue/dist/vue.runtime.esm-bundler.js", + "file": "vue.js", + "fileHash": "b519ae76", + "needsInterop": false + }, + "vitepress > @vue/devtools-api": { + "src": "../../../../node_modules/@vue/devtools-api/dist/index.js", + "file": "vitepress___@vue_devtools-api.js", + "fileHash": "6dfb9b58", + "needsInterop": false + }, + "vitepress > @vueuse/core": { + "src": "../../../../node_modules/@vueuse/core/index.mjs", + "file": "vitepress___@vueuse_core.js", + "fileHash": "e7f5068b", + "needsInterop": false + }, + "@theme/index": { + "src": "../../../../node_modules/vitepress/dist/client/theme-default/index.js", + "file": "@theme_index.js", + "fileHash": "ff18cad6", + "needsInterop": false + } + }, + "chunks": { + "chunk-B2WI2LE3": { + "file": "chunk-B2WI2LE3.js" + }, + "chunk-BJ3OZQ3N": { + "file": "chunk-BJ3OZQ3N.js" + } + } +} \ No newline at end of file diff --git a/docs/.vitepress/cache/deps/chunk-B2WI2LE3.js b/docs/.vitepress/cache/deps/chunk-B2WI2LE3.js new file mode 100644 index 000000000..4fed6e0cc --- /dev/null +++ b/docs/.vitepress/cache/deps/chunk-B2WI2LE3.js @@ -0,0 +1,9172 @@ +import { + Fragment, + TransitionGroup, + computed, + customRef, + defineComponent, + effectScope, + getCurrentInstance, + getCurrentScope, + h, + inject, + isReactive, + isReadonly, + isRef, + markRaw, + nextTick, + onBeforeMount, + onBeforeUnmount, + onBeforeUpdate, + onMounted, + onScopeDispose, + onUnmounted, + onUpdated, + provide, + reactive, + readonly, + ref, + shallowReactive, + shallowRef, + toRef, + toRefs, + unref, + version, + watch, + watchEffect +} from "./chunk-BJ3OZQ3N.js"; + +// node_modules/vitepress/lib/vue-demi.mjs +var isVue2 = false; +var isVue3 = true; +function set(target, key, val) { + if (Array.isArray(target)) { + target.length = Math.max(target.length, key); + target.splice(key, 1, val); + return val; + } + target[key] = val; + return val; +} +function del(target, key) { + if (Array.isArray(target)) { + target.splice(key, 1); + return; + } + delete target[key]; +} + +// node_modules/@vueuse/shared/index.mjs +function computedEager(fn, options) { + var _a; + const result = shallowRef(); + watchEffect(() => { + result.value = fn(); + }, { + ...options, + flush: (_a = options == null ? void 0 : options.flush) != null ? _a : "sync" + }); + return readonly(result); +} +function computedWithControl(source, fn) { + let v = void 0; + let track; + let trigger; + const dirty = ref(true); + const update = () => { + dirty.value = true; + trigger(); + }; + watch(source, update, { flush: "sync" }); + const get2 = typeof fn === "function" ? fn : fn.get; + const set3 = typeof fn === "function" ? void 0 : fn.set; + const result = customRef((_track, _trigger) => { + track = _track; + trigger = _trigger; + return { + get() { + if (dirty.value) { + v = get2(); + dirty.value = false; + } + track(); + return v; + }, + set(v2) { + set3 == null ? void 0 : set3(v2); + } + }; + }); + if (Object.isExtensible(result)) + result.trigger = update; + return result; +} +function tryOnScopeDispose(fn) { + if (getCurrentScope()) { + onScopeDispose(fn); + return true; + } + return false; +} +function createEventHook() { + const fns = /* @__PURE__ */ new Set(); + const off = (fn) => { + fns.delete(fn); + }; + const on = (fn) => { + fns.add(fn); + const offFn = () => off(fn); + tryOnScopeDispose(offFn); + return { + off: offFn + }; + }; + const trigger = (...args) => { + return Promise.all(Array.from(fns).map((fn) => fn(...args))); + }; + return { + on, + off, + trigger + }; +} +function createGlobalState(stateFactory) { + let initialized = false; + let state; + const scope = effectScope(true); + return (...args) => { + if (!initialized) { + state = scope.run(() => stateFactory(...args)); + initialized = true; + } + return state; + }; +} +var localProvidedStateMap = /* @__PURE__ */ new WeakMap(); +var provideLocal = (key, value) => { + var _a; + const instance = (_a = getCurrentInstance()) == null ? void 0 : _a.proxy; + if (instance == null) + throw new Error("provideLocal must be called in setup"); + if (!localProvidedStateMap.has(instance)) + localProvidedStateMap.set(instance, /* @__PURE__ */ Object.create(null)); + const localProvidedState = localProvidedStateMap.get(instance); + localProvidedState[key] = value; + provide(key, value); +}; +var injectLocal = (...args) => { + var _a; + const key = args[0]; + const instance = (_a = getCurrentInstance()) == null ? void 0 : _a.proxy; + if (instance == null) + throw new Error("injectLocal must be called in setup"); + if (localProvidedStateMap.has(instance) && key in localProvidedStateMap.get(instance)) + return localProvidedStateMap.get(instance)[key]; + return inject(...args); +}; +function createInjectionState(composable, options) { + const key = (options == null ? void 0 : options.injectionKey) || Symbol(composable.name || "InjectionState"); + const defaultValue = options == null ? void 0 : options.defaultValue; + const useProvidingState = (...args) => { + const state = composable(...args); + provideLocal(key, state); + return state; + }; + const useInjectedState = () => injectLocal(key, defaultValue); + return [useProvidingState, useInjectedState]; +} +function createSharedComposable(composable) { + let subscribers = 0; + let state; + let scope; + const dispose = () => { + subscribers -= 1; + if (scope && subscribers <= 0) { + scope.stop(); + state = void 0; + scope = void 0; + } + }; + return (...args) => { + subscribers += 1; + if (!state) { + scope = effectScope(true); + state = scope.run(() => composable(...args)); + } + tryOnScopeDispose(dispose); + return state; + }; +} +function extendRef(ref2, extend, { enumerable = false, unwrap = true } = {}) { + if (!isVue3 && !version.startsWith("2.7.")) { + if (true) + throw new Error("[VueUse] extendRef only works in Vue 2.7 or above."); + return; + } + for (const [key, value] of Object.entries(extend)) { + if (key === "value") + continue; + if (isRef(value) && unwrap) { + Object.defineProperty(ref2, key, { + get() { + return value.value; + }, + set(v) { + value.value = v; + }, + enumerable + }); + } else { + Object.defineProperty(ref2, key, { value, enumerable }); + } + } + return ref2; +} +function get(obj, key) { + if (key == null) + return unref(obj); + return unref(obj)[key]; +} +function isDefined(v) { + return unref(v) != null; +} +function makeDestructurable(obj, arr) { + if (typeof Symbol !== "undefined") { + const clone = { ...obj }; + Object.defineProperty(clone, Symbol.iterator, { + enumerable: false, + value() { + let index = 0; + return { + next: () => ({ + value: arr[index++], + done: index > arr.length + }) + }; + } + }); + return clone; + } else { + return Object.assign([...arr], obj); + } +} +function toValue(r) { + return typeof r === "function" ? r() : unref(r); +} +var resolveUnref = toValue; +function reactify(fn, options) { + const unrefFn = (options == null ? void 0 : options.computedGetter) === false ? unref : toValue; + return function(...args) { + return computed(() => fn.apply(this, args.map((i) => unrefFn(i)))); + }; +} +function reactifyObject(obj, optionsOrKeys = {}) { + let keys2 = []; + let options; + if (Array.isArray(optionsOrKeys)) { + keys2 = optionsOrKeys; + } else { + options = optionsOrKeys; + const { includeOwnProperties = true } = optionsOrKeys; + keys2.push(...Object.keys(obj)); + if (includeOwnProperties) + keys2.push(...Object.getOwnPropertyNames(obj)); + } + return Object.fromEntries( + keys2.map((key) => { + const value = obj[key]; + return [ + key, + typeof value === "function" ? reactify(value.bind(obj), options) : value + ]; + }) + ); +} +function toReactive(objectRef) { + if (!isRef(objectRef)) + return reactive(objectRef); + const proxy = new Proxy({}, { + get(_, p, receiver) { + return unref(Reflect.get(objectRef.value, p, receiver)); + }, + set(_, p, value) { + if (isRef(objectRef.value[p]) && !isRef(value)) + objectRef.value[p].value = value; + else + objectRef.value[p] = value; + return true; + }, + deleteProperty(_, p) { + return Reflect.deleteProperty(objectRef.value, p); + }, + has(_, p) { + return Reflect.has(objectRef.value, p); + }, + ownKeys() { + return Object.keys(objectRef.value); + }, + getOwnPropertyDescriptor() { + return { + enumerable: true, + configurable: true + }; + } + }); + return reactive(proxy); +} +function reactiveComputed(fn) { + return toReactive(computed(fn)); +} +function reactiveOmit(obj, ...keys2) { + const flatKeys = keys2.flat(); + const predicate = flatKeys[0]; + return reactiveComputed(() => typeof predicate === "function" ? Object.fromEntries(Object.entries(toRefs(obj)).filter(([k, v]) => !predicate(toValue(v), k))) : Object.fromEntries(Object.entries(toRefs(obj)).filter((e) => !flatKeys.includes(e[0])))); +} +var isClient = typeof window !== "undefined" && typeof document !== "undefined"; +var isWorker = typeof WorkerGlobalScope !== "undefined" && globalThis instanceof WorkerGlobalScope; +var isDef = (val) => typeof val !== "undefined"; +var notNullish = (val) => val != null; +var assert = (condition, ...infos) => { + if (!condition) + console.warn(...infos); +}; +var toString = Object.prototype.toString; +var isObject = (val) => toString.call(val) === "[object Object]"; +var now = () => Date.now(); +var timestamp = () => +Date.now(); +var clamp = (n, min, max) => Math.min(max, Math.max(min, n)); +var noop = () => { +}; +var rand = (min, max) => { + min = Math.ceil(min); + max = Math.floor(max); + return Math.floor(Math.random() * (max - min + 1)) + min; +}; +var hasOwn = (val, key) => Object.prototype.hasOwnProperty.call(val, key); +var isIOS = getIsIOS(); +function getIsIOS() { + var _a, _b; + return isClient && ((_a = window == null ? void 0 : window.navigator) == null ? void 0 : _a.userAgent) && (/iP(?:ad|hone|od)/.test(window.navigator.userAgent) || ((_b = window == null ? void 0 : window.navigator) == null ? void 0 : _b.maxTouchPoints) > 2 && /iPad|Macintosh/.test(window == null ? void 0 : window.navigator.userAgent)); +} +function createFilterWrapper(filter, fn) { + function wrapper(...args) { + return new Promise((resolve, reject) => { + Promise.resolve(filter(() => fn.apply(this, args), { fn, thisArg: this, args })).then(resolve).catch(reject); + }); + } + return wrapper; +} +var bypassFilter = (invoke2) => { + return invoke2(); +}; +function debounceFilter(ms, options = {}) { + let timer; + let maxTimer; + let lastRejector = noop; + const _clearTimeout = (timer2) => { + clearTimeout(timer2); + lastRejector(); + lastRejector = noop; + }; + const filter = (invoke2) => { + const duration = toValue(ms); + const maxDuration = toValue(options.maxWait); + if (timer) + _clearTimeout(timer); + if (duration <= 0 || maxDuration !== void 0 && maxDuration <= 0) { + if (maxTimer) { + _clearTimeout(maxTimer); + maxTimer = null; + } + return Promise.resolve(invoke2()); + } + return new Promise((resolve, reject) => { + lastRejector = options.rejectOnCancel ? reject : resolve; + if (maxDuration && !maxTimer) { + maxTimer = setTimeout(() => { + if (timer) + _clearTimeout(timer); + maxTimer = null; + resolve(invoke2()); + }, maxDuration); + } + timer = setTimeout(() => { + if (maxTimer) + _clearTimeout(maxTimer); + maxTimer = null; + resolve(invoke2()); + }, duration); + }); + }; + return filter; +} +function throttleFilter(...args) { + let lastExec = 0; + let timer; + let isLeading = true; + let lastRejector = noop; + let lastValue; + let ms; + let trailing; + let leading; + let rejectOnCancel; + if (!isRef(args[0]) && typeof args[0] === "object") + ({ delay: ms, trailing = true, leading = true, rejectOnCancel = false } = args[0]); + else + [ms, trailing = true, leading = true, rejectOnCancel = false] = args; + const clear = () => { + if (timer) { + clearTimeout(timer); + timer = void 0; + lastRejector(); + lastRejector = noop; + } + }; + const filter = (_invoke) => { + const duration = toValue(ms); + const elapsed = Date.now() - lastExec; + const invoke2 = () => { + return lastValue = _invoke(); + }; + clear(); + if (duration <= 0) { + lastExec = Date.now(); + return invoke2(); + } + if (elapsed > duration && (leading || !isLeading)) { + lastExec = Date.now(); + invoke2(); + } else if (trailing) { + lastValue = new Promise((resolve, reject) => { + lastRejector = rejectOnCancel ? reject : resolve; + timer = setTimeout(() => { + lastExec = Date.now(); + isLeading = true; + resolve(invoke2()); + clear(); + }, Math.max(0, duration - elapsed)); + }); + } + if (!leading && !timer) + timer = setTimeout(() => isLeading = true, duration); + isLeading = false; + return lastValue; + }; + return filter; +} +function pausableFilter(extendFilter = bypassFilter) { + const isActive = ref(true); + function pause() { + isActive.value = false; + } + function resume() { + isActive.value = true; + } + const eventFilter = (...args) => { + if (isActive.value) + extendFilter(...args); + }; + return { isActive: readonly(isActive), pause, resume, eventFilter }; +} +var directiveHooks = { + mounted: isVue3 ? "mounted" : "inserted", + updated: isVue3 ? "updated" : "componentUpdated", + unmounted: isVue3 ? "unmounted" : "unbind" +}; +function cacheStringFunction(fn) { + const cache = /* @__PURE__ */ Object.create(null); + return (str) => { + const hit = cache[str]; + return hit || (cache[str] = fn(str)); + }; +} +var hyphenateRE = /\B([A-Z])/g; +var hyphenate = cacheStringFunction((str) => str.replace(hyphenateRE, "-$1").toLowerCase()); +var camelizeRE = /-(\w)/g; +var camelize = cacheStringFunction((str) => { + return str.replace(camelizeRE, (_, c) => c ? c.toUpperCase() : ""); +}); +function promiseTimeout(ms, throwOnTimeout = false, reason = "Timeout") { + return new Promise((resolve, reject) => { + if (throwOnTimeout) + setTimeout(() => reject(reason), ms); + else + setTimeout(resolve, ms); + }); +} +function identity(arg) { + return arg; +} +function createSingletonPromise(fn) { + let _promise; + function wrapper() { + if (!_promise) + _promise = fn(); + return _promise; + } + wrapper.reset = async () => { + const _prev = _promise; + _promise = void 0; + if (_prev) + await _prev; + }; + return wrapper; +} +function invoke(fn) { + return fn(); +} +function containsProp(obj, ...props) { + return props.some((k) => k in obj); +} +function increaseWithUnit(target, delta) { + var _a; + if (typeof target === "number") + return target + delta; + const value = ((_a = target.match(/^-?\d+\.?\d*/)) == null ? void 0 : _a[0]) || ""; + const unit = target.slice(value.length); + const result = Number.parseFloat(value) + delta; + if (Number.isNaN(result)) + return target; + return result + unit; +} +function objectPick(obj, keys2, omitUndefined = false) { + return keys2.reduce((n, k) => { + if (k in obj) { + if (!omitUndefined || obj[k] !== void 0) + n[k] = obj[k]; + } + return n; + }, {}); +} +function objectOmit(obj, keys2, omitUndefined = false) { + return Object.fromEntries(Object.entries(obj).filter(([key, value]) => { + return (!omitUndefined || value !== void 0) && !keys2.includes(key); + })); +} +function objectEntries(obj) { + return Object.entries(obj); +} +function getLifeCycleTarget(target) { + return target || getCurrentInstance(); +} +function toRef2(...args) { + if (args.length !== 1) + return toRef(...args); + const r = args[0]; + return typeof r === "function" ? readonly(customRef(() => ({ get: r, set: noop }))) : ref(r); +} +var resolveRef = toRef2; +function reactivePick(obj, ...keys2) { + const flatKeys = keys2.flat(); + const predicate = flatKeys[0]; + return reactiveComputed(() => typeof predicate === "function" ? Object.fromEntries(Object.entries(toRefs(obj)).filter(([k, v]) => predicate(toValue(v), k))) : Object.fromEntries(flatKeys.map((k) => [k, toRef2(obj, k)]))); +} +function refAutoReset(defaultValue, afterMs = 1e4) { + return customRef((track, trigger) => { + let value = toValue(defaultValue); + let timer; + const resetAfter = () => setTimeout(() => { + value = toValue(defaultValue); + trigger(); + }, toValue(afterMs)); + tryOnScopeDispose(() => { + clearTimeout(timer); + }); + return { + get() { + track(); + return value; + }, + set(newValue) { + value = newValue; + trigger(); + clearTimeout(timer); + timer = resetAfter(); + } + }; + }); +} +function useDebounceFn(fn, ms = 200, options = {}) { + return createFilterWrapper( + debounceFilter(ms, options), + fn + ); +} +function refDebounced(value, ms = 200, options = {}) { + const debounced = ref(value.value); + const updater = useDebounceFn(() => { + debounced.value = value.value; + }, ms, options); + watch(value, () => updater()); + return debounced; +} +function refDefault(source, defaultValue) { + return computed({ + get() { + var _a; + return (_a = source.value) != null ? _a : defaultValue; + }, + set(value) { + source.value = value; + } + }); +} +function useThrottleFn(fn, ms = 200, trailing = false, leading = true, rejectOnCancel = false) { + return createFilterWrapper( + throttleFilter(ms, trailing, leading, rejectOnCancel), + fn + ); +} +function refThrottled(value, delay = 200, trailing = true, leading = true) { + if (delay <= 0) + return value; + const throttled = ref(value.value); + const updater = useThrottleFn(() => { + throttled.value = value.value; + }, delay, trailing, leading); + watch(value, () => updater()); + return throttled; +} +function refWithControl(initial, options = {}) { + let source = initial; + let track; + let trigger; + const ref2 = customRef((_track, _trigger) => { + track = _track; + trigger = _trigger; + return { + get() { + return get2(); + }, + set(v) { + set3(v); + } + }; + }); + function get2(tracking = true) { + if (tracking) + track(); + return source; + } + function set3(value, triggering = true) { + var _a, _b; + if (value === source) + return; + const old = source; + if (((_a = options.onBeforeChange) == null ? void 0 : _a.call(options, value, old)) === false) + return; + source = value; + (_b = options.onChanged) == null ? void 0 : _b.call(options, value, old); + if (triggering) + trigger(); + } + const untrackedGet = () => get2(false); + const silentSet = (v) => set3(v, false); + const peek = () => get2(false); + const lay = (v) => set3(v, false); + return extendRef( + ref2, + { + get: get2, + set: set3, + untrackedGet, + silentSet, + peek, + lay + }, + { enumerable: true } + ); +} +var controlledRef = refWithControl; +function set2(...args) { + if (args.length === 2) { + const [ref2, value] = args; + ref2.value = value; + } + if (args.length === 3) { + if (isVue2) { + set(...args); + } else { + const [target, key, value] = args; + target[key] = value; + } + } +} +function watchWithFilter(source, cb, options = {}) { + const { + eventFilter = bypassFilter, + ...watchOptions + } = options; + return watch( + source, + createFilterWrapper( + eventFilter, + cb + ), + watchOptions + ); +} +function watchPausable(source, cb, options = {}) { + const { + eventFilter: filter, + ...watchOptions + } = options; + const { eventFilter, pause, resume, isActive } = pausableFilter(filter); + const stop = watchWithFilter( + source, + cb, + { + ...watchOptions, + eventFilter + } + ); + return { stop, pause, resume, isActive }; +} +function syncRef(left, right, ...[options]) { + const { + flush = "sync", + deep = false, + immediate = true, + direction = "both", + transform = {} + } = options || {}; + const watchers = []; + const transformLTR = "ltr" in transform && transform.ltr || ((v) => v); + const transformRTL = "rtl" in transform && transform.rtl || ((v) => v); + if (direction === "both" || direction === "ltr") { + watchers.push(watchPausable( + left, + (newValue) => { + watchers.forEach((w) => w.pause()); + right.value = transformLTR(newValue); + watchers.forEach((w) => w.resume()); + }, + { flush, deep, immediate } + )); + } + if (direction === "both" || direction === "rtl") { + watchers.push(watchPausable( + right, + (newValue) => { + watchers.forEach((w) => w.pause()); + left.value = transformRTL(newValue); + watchers.forEach((w) => w.resume()); + }, + { flush, deep, immediate } + )); + } + const stop = () => { + watchers.forEach((w) => w.stop()); + }; + return stop; +} +function syncRefs(source, targets, options = {}) { + const { + flush = "sync", + deep = false, + immediate = true + } = options; + if (!Array.isArray(targets)) + targets = [targets]; + return watch( + source, + (newValue) => targets.forEach((target) => target.value = newValue), + { flush, deep, immediate } + ); +} +function toRefs2(objectRef, options = {}) { + if (!isRef(objectRef)) + return toRefs(objectRef); + const result = Array.isArray(objectRef.value) ? Array.from({ length: objectRef.value.length }) : {}; + for (const key in objectRef.value) { + result[key] = customRef(() => ({ + get() { + return objectRef.value[key]; + }, + set(v) { + var _a; + const replaceRef = (_a = toValue(options.replaceRef)) != null ? _a : true; + if (replaceRef) { + if (Array.isArray(objectRef.value)) { + const copy = [...objectRef.value]; + copy[key] = v; + objectRef.value = copy; + } else { + const newObject = { ...objectRef.value, [key]: v }; + Object.setPrototypeOf(newObject, Object.getPrototypeOf(objectRef.value)); + objectRef.value = newObject; + } + } else { + objectRef.value[key] = v; + } + } + })); + } + return result; +} +function tryOnBeforeMount(fn, sync = true, target) { + const instance = getLifeCycleTarget(target); + if (instance) + onBeforeMount(fn, target); + else if (sync) + fn(); + else + nextTick(fn); +} +function tryOnBeforeUnmount(fn, target) { + const instance = getLifeCycleTarget(target); + if (instance) + onBeforeUnmount(fn, target); +} +function tryOnMounted(fn, sync = true, target) { + const instance = getLifeCycleTarget(); + if (instance) + onMounted(fn, target); + else if (sync) + fn(); + else + nextTick(fn); +} +function tryOnUnmounted(fn, target) { + const instance = getLifeCycleTarget(target); + if (instance) + onUnmounted(fn, target); +} +function createUntil(r, isNot = false) { + function toMatch(condition, { flush = "sync", deep = false, timeout, throwOnTimeout } = {}) { + let stop = null; + const watcher = new Promise((resolve) => { + stop = watch( + r, + (v) => { + if (condition(v) !== isNot) { + stop == null ? void 0 : stop(); + resolve(v); + } + }, + { + flush, + deep, + immediate: true + } + ); + }); + const promises = [watcher]; + if (timeout != null) { + promises.push( + promiseTimeout(timeout, throwOnTimeout).then(() => toValue(r)).finally(() => stop == null ? void 0 : stop()) + ); + } + return Promise.race(promises); + } + function toBe(value, options) { + if (!isRef(value)) + return toMatch((v) => v === value, options); + const { flush = "sync", deep = false, timeout, throwOnTimeout } = options != null ? options : {}; + let stop = null; + const watcher = new Promise((resolve) => { + stop = watch( + [r, value], + ([v1, v2]) => { + if (isNot !== (v1 === v2)) { + stop == null ? void 0 : stop(); + resolve(v1); + } + }, + { + flush, + deep, + immediate: true + } + ); + }); + const promises = [watcher]; + if (timeout != null) { + promises.push( + promiseTimeout(timeout, throwOnTimeout).then(() => toValue(r)).finally(() => { + stop == null ? void 0 : stop(); + return toValue(r); + }) + ); + } + return Promise.race(promises); + } + function toBeTruthy(options) { + return toMatch((v) => Boolean(v), options); + } + function toBeNull(options) { + return toBe(null, options); + } + function toBeUndefined(options) { + return toBe(void 0, options); + } + function toBeNaN(options) { + return toMatch(Number.isNaN, options); + } + function toContains(value, options) { + return toMatch((v) => { + const array = Array.from(v); + return array.includes(value) || array.includes(toValue(value)); + }, options); + } + function changed(options) { + return changedTimes(1, options); + } + function changedTimes(n = 1, options) { + let count = -1; + return toMatch(() => { + count += 1; + return count >= n; + }, options); + } + if (Array.isArray(toValue(r))) { + const instance = { + toMatch, + toContains, + changed, + changedTimes, + get not() { + return createUntil(r, !isNot); + } + }; + return instance; + } else { + const instance = { + toMatch, + toBe, + toBeTruthy, + toBeNull, + toBeNaN, + toBeUndefined, + changed, + changedTimes, + get not() { + return createUntil(r, !isNot); + } + }; + return instance; + } +} +function until(r) { + return createUntil(r); +} +function defaultComparator(value, othVal) { + return value === othVal; +} +function useArrayDifference(...args) { + var _a; + const list = args[0]; + const values = args[1]; + let compareFn = (_a = args[2]) != null ? _a : defaultComparator; + if (typeof compareFn === "string") { + const key = compareFn; + compareFn = (value, othVal) => value[key] === othVal[key]; + } + return computed(() => toValue(list).filter((x) => toValue(values).findIndex((y) => compareFn(x, y)) === -1)); +} +function useArrayEvery(list, fn) { + return computed(() => toValue(list).every((element, index, array) => fn(toValue(element), index, array))); +} +function useArrayFilter(list, fn) { + return computed(() => toValue(list).map((i) => toValue(i)).filter(fn)); +} +function useArrayFind(list, fn) { + return computed(() => toValue( + toValue(list).find((element, index, array) => fn(toValue(element), index, array)) + )); +} +function useArrayFindIndex(list, fn) { + return computed(() => toValue(list).findIndex((element, index, array) => fn(toValue(element), index, array))); +} +function findLast(arr, cb) { + let index = arr.length; + while (index-- > 0) { + if (cb(arr[index], index, arr)) + return arr[index]; + } + return void 0; +} +function useArrayFindLast(list, fn) { + return 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)) + )); +} +function isArrayIncludesOptions(obj) { + return isObject(obj) && containsProp(obj, "formIndex", "comparator"); +} +function useArrayIncludes(...args) { + var _a; + const list = args[0]; + const value = args[1]; + let comparator = args[2]; + let formIndex = 0; + if (isArrayIncludesOptions(comparator)) { + formIndex = (_a = comparator.fromIndex) != null ? _a : 0; + comparator = comparator.comparator; + } + if (typeof comparator === "string") { + const key = comparator; + comparator = (element, value2) => element[key] === toValue(value2); + } + comparator = comparator != null ? comparator : (element, value2) => element === toValue(value2); + return computed(() => toValue(list).slice(formIndex).some((element, index, array) => comparator( + toValue(element), + toValue(value), + index, + toValue(array) + ))); +} +function useArrayJoin(list, separator) { + return computed(() => toValue(list).map((i) => toValue(i)).join(toValue(separator))); +} +function useArrayMap(list, fn) { + return computed(() => toValue(list).map((i) => toValue(i)).map(fn)); +} +function useArrayReduce(list, reducer, ...args) { + const reduceCallback = (sum, value, index) => reducer(toValue(sum), toValue(value), index); + return computed(() => { + const resolved = toValue(list); + return args.length ? resolved.reduce(reduceCallback, toValue(args[0])) : resolved.reduce(reduceCallback); + }); +} +function useArraySome(list, fn) { + return computed(() => toValue(list).some((element, index, array) => fn(toValue(element), index, array))); +} +function uniq(array) { + return Array.from(new Set(array)); +} +function uniqueElementsBy(array, fn) { + return array.reduce((acc, v) => { + if (!acc.some((x) => fn(v, x, array))) + acc.push(v); + return acc; + }, []); +} +function useArrayUnique(list, compareFn) { + return computed(() => { + const resolvedList = toValue(list).map((element) => toValue(element)); + return compareFn ? uniqueElementsBy(resolvedList, compareFn) : uniq(resolvedList); + }); +} +function useCounter(initialValue = 0, options = {}) { + let _initialValue = unref(initialValue); + const count = ref(initialValue); + const { + max = Number.POSITIVE_INFINITY, + min = Number.NEGATIVE_INFINITY + } = options; + const inc = (delta = 1) => count.value = Math.max(Math.min(max, count.value + delta), min); + const dec = (delta = 1) => count.value = Math.min(Math.max(min, count.value - delta), max); + const get2 = () => count.value; + const set3 = (val) => count.value = Math.max(min, Math.min(max, val)); + const reset = (val = _initialValue) => { + _initialValue = val; + return set3(val); + }; + return { count, inc, dec, get: get2, set: set3, reset }; +} +var REGEX_PARSE = /^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[T\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/i; +var 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}|SSS/g; +function defaultMeridiem(hours, minutes, isLowercase, hasPeriod) { + let m = hours < 12 ? "AM" : "PM"; + if (hasPeriod) + m = m.split("").reduce((acc, curr) => acc += `${curr}.`, ""); + return isLowercase ? m.toLowerCase() : m; +} +function formatOrdinal(num) { + const suffixes = ["th", "st", "nd", "rd"]; + const v = num % 100; + return num + (suffixes[(v - 20) % 10] || suffixes[v] || suffixes[0]); +} +function formatDate(date, formatStr, options = {}) { + var _a; + const years = date.getFullYear(); + const month = date.getMonth(); + const days = date.getDate(); + const hours = date.getHours(); + const minutes = date.getMinutes(); + const seconds = date.getSeconds(); + const milliseconds = date.getMilliseconds(); + const day = date.getDay(); + const meridiem = (_a = options.customMeridiem) != null ? _a : defaultMeridiem; + const matches = { + Yo: () => formatOrdinal(years), + YY: () => String(years).slice(-2), + YYYY: () => years, + M: () => month + 1, + Mo: () => formatOrdinal(month + 1), + MM: () => `${month + 1}`.padStart(2, "0"), + MMM: () => date.toLocaleDateString(options.locales, { month: "short" }), + MMMM: () => date.toLocaleDateString(options.locales, { month: "long" }), + D: () => String(days), + Do: () => formatOrdinal(days), + DD: () => `${days}`.padStart(2, "0"), + H: () => String(hours), + Ho: () => formatOrdinal(hours), + HH: () => `${hours}`.padStart(2, "0"), + h: () => `${hours % 12 || 12}`.padStart(1, "0"), + ho: () => formatOrdinal(hours % 12 || 12), + hh: () => `${hours % 12 || 12}`.padStart(2, "0"), + m: () => String(minutes), + mo: () => formatOrdinal(minutes), + mm: () => `${minutes}`.padStart(2, "0"), + s: () => String(seconds), + so: () => formatOrdinal(seconds), + ss: () => `${seconds}`.padStart(2, "0"), + SSS: () => `${milliseconds}`.padStart(3, "0"), + d: () => day, + dd: () => date.toLocaleDateString(options.locales, { weekday: "narrow" }), + ddd: () => date.toLocaleDateString(options.locales, { weekday: "short" }), + dddd: () => date.toLocaleDateString(options.locales, { weekday: "long" }), + A: () => meridiem(hours, minutes), + AA: () => meridiem(hours, minutes, false, true), + a: () => meridiem(hours, minutes, true), + aa: () => meridiem(hours, minutes, true, true) + }; + return formatStr.replace(REGEX_FORMAT, (match, $1) => { + var _a2, _b; + return (_b = $1 != null ? $1 : (_a2 = matches[match]) == null ? void 0 : _a2.call(matches)) != null ? _b : match; + }); +} +function normalizeDate(date) { + if (date === null) + return new Date(Number.NaN); + if (date === void 0) + return /* @__PURE__ */ new Date(); + if (date instanceof Date) + return new Date(date); + if (typeof date === "string" && !/Z$/i.test(date)) { + const d = date.match(REGEX_PARSE); + if (d) { + const m = d[2] - 1 || 0; + const ms = (d[7] || "0").substring(0, 3); + return new Date(d[1], m, d[3] || 1, d[4] || 0, d[5] || 0, d[6] || 0, ms); + } + } + return new Date(date); +} +function useDateFormat(date, formatStr = "HH:mm:ss", options = {}) { + return computed(() => formatDate(normalizeDate(toValue(date)), toValue(formatStr), options)); +} +function useIntervalFn(cb, interval = 1e3, options = {}) { + const { + immediate = true, + immediateCallback = false + } = options; + let timer = null; + const isActive = ref(false); + function clean() { + if (timer) { + clearInterval(timer); + timer = null; + } + } + function pause() { + isActive.value = false; + clean(); + } + function resume() { + const intervalValue = toValue(interval); + if (intervalValue <= 0) + return; + isActive.value = true; + if (immediateCallback) + cb(); + clean(); + timer = setInterval(cb, intervalValue); + } + if (immediate && isClient) + resume(); + if (isRef(interval) || typeof interval === "function") { + const stopWatch = watch(interval, () => { + if (isActive.value && isClient) + resume(); + }); + tryOnScopeDispose(stopWatch); + } + tryOnScopeDispose(pause); + return { + isActive, + pause, + resume + }; +} +function useInterval(interval = 1e3, options = {}) { + const { + controls: exposeControls = false, + immediate = true, + callback + } = options; + const counter = ref(0); + const update = () => counter.value += 1; + const reset = () => { + counter.value = 0; + }; + const controls = useIntervalFn( + callback ? () => { + update(); + callback(counter.value); + } : update, + interval, + { immediate } + ); + if (exposeControls) { + return { + counter, + reset, + ...controls + }; + } else { + return counter; + } +} +function useLastChanged(source, options = {}) { + var _a; + const ms = ref((_a = options.initialValue) != null ? _a : null); + watch( + source, + () => ms.value = timestamp(), + options + ); + return ms; +} +function useTimeoutFn(cb, interval, options = {}) { + const { + immediate = true + } = options; + const isPending = ref(false); + let timer = null; + function clear() { + if (timer) { + clearTimeout(timer); + timer = null; + } + } + function stop() { + isPending.value = false; + clear(); + } + function start(...args) { + clear(); + isPending.value = true; + timer = setTimeout(() => { + isPending.value = false; + timer = null; + cb(...args); + }, toValue(interval)); + } + if (immediate) { + isPending.value = true; + if (isClient) + start(); + } + tryOnScopeDispose(stop); + return { + isPending: readonly(isPending), + start, + stop + }; +} +function useTimeout(interval = 1e3, options = {}) { + const { + controls: exposeControls = false, + callback + } = options; + const controls = useTimeoutFn( + callback != null ? callback : noop, + interval, + options + ); + const ready = computed(() => !controls.isPending.value); + if (exposeControls) { + return { + ready, + ...controls + }; + } else { + return ready; + } +} +function useToNumber(value, options = {}) { + const { + method = "parseFloat", + radix, + nanToZero + } = options; + return computed(() => { + let resolved = toValue(value); + if (typeof resolved === "string") + resolved = Number[method](resolved, radix); + if (nanToZero && Number.isNaN(resolved)) + resolved = 0; + return resolved; + }); +} +function useToString(value) { + return computed(() => `${toValue(value)}`); +} +function useToggle(initialValue = false, options = {}) { + const { + truthyValue = true, + falsyValue = false + } = options; + const valueIsRef = isRef(initialValue); + const _value = ref(initialValue); + function toggle(value) { + if (arguments.length) { + _value.value = value; + return _value.value; + } else { + const truthy = toValue(truthyValue); + _value.value = _value.value === truthy ? toValue(falsyValue) : truthy; + return _value.value; + } + } + if (valueIsRef) + return toggle; + else + return [_value, toggle]; +} +function watchArray(source, cb, options) { + let oldList = (options == null ? void 0 : options.immediate) ? [] : [...source instanceof Function ? source() : Array.isArray(source) ? source : toValue(source)]; + return watch(source, (newList, _, onCleanup) => { + const oldListRemains = Array.from({ length: oldList.length }); + const added = []; + for (const obj of newList) { + let found = false; + for (let i = 0; i < oldList.length; i++) { + if (!oldListRemains[i] && obj === oldList[i]) { + oldListRemains[i] = true; + found = true; + break; + } + } + if (!found) + added.push(obj); + } + const removed = oldList.filter((_2, i) => !oldListRemains[i]); + cb(newList, oldList, added, removed, onCleanup); + oldList = [...newList]; + }, options); +} +function watchAtMost(source, cb, options) { + const { + count, + ...watchOptions + } = options; + const current = ref(0); + const stop = watchWithFilter( + source, + (...args) => { + current.value += 1; + if (current.value >= toValue(count)) + nextTick(() => stop()); + cb(...args); + }, + watchOptions + ); + return { count: current, stop }; +} +function watchDebounced(source, cb, options = {}) { + const { + debounce = 0, + maxWait = void 0, + ...watchOptions + } = options; + return watchWithFilter( + source, + cb, + { + ...watchOptions, + eventFilter: debounceFilter(debounce, { maxWait }) + } + ); +} +function watchDeep(source, cb, options) { + return watch( + source, + cb, + { + ...options, + deep: true + } + ); +} +function watchIgnorable(source, cb, options = {}) { + const { + eventFilter = bypassFilter, + ...watchOptions + } = options; + const filteredCb = createFilterWrapper( + eventFilter, + cb + ); + let ignoreUpdates; + let ignorePrevAsyncUpdates; + let stop; + if (watchOptions.flush === "sync") { + const ignore = ref(false); + ignorePrevAsyncUpdates = () => { + }; + ignoreUpdates = (updater) => { + ignore.value = true; + updater(); + ignore.value = false; + }; + stop = watch( + source, + (...args) => { + if (!ignore.value) + filteredCb(...args); + }, + watchOptions + ); + } else { + const disposables = []; + const ignoreCounter = ref(0); + const syncCounter = ref(0); + ignorePrevAsyncUpdates = () => { + ignoreCounter.value = syncCounter.value; + }; + disposables.push( + watch( + source, + () => { + syncCounter.value++; + }, + { ...watchOptions, flush: "sync" } + ) + ); + ignoreUpdates = (updater) => { + const syncCounterPrev = syncCounter.value; + updater(); + ignoreCounter.value += syncCounter.value - syncCounterPrev; + }; + disposables.push( + watch( + source, + (...args) => { + const ignore = ignoreCounter.value > 0 && ignoreCounter.value === syncCounter.value; + ignoreCounter.value = 0; + syncCounter.value = 0; + if (ignore) + return; + filteredCb(...args); + }, + watchOptions + ) + ); + stop = () => { + disposables.forEach((fn) => fn()); + }; + } + return { stop, ignoreUpdates, ignorePrevAsyncUpdates }; +} +function watchImmediate(source, cb, options) { + return watch( + source, + cb, + { + ...options, + immediate: true + } + ); +} +function watchOnce(source, cb, options) { + const stop = watch(source, (...args) => { + nextTick(() => stop()); + return cb(...args); + }, options); + return stop; +} +function watchThrottled(source, cb, options = {}) { + const { + throttle = 0, + trailing = true, + leading = true, + ...watchOptions + } = options; + return watchWithFilter( + source, + cb, + { + ...watchOptions, + eventFilter: throttleFilter(throttle, trailing, leading) + } + ); +} +function watchTriggerable(source, cb, options = {}) { + let cleanupFn; + function onEffect() { + if (!cleanupFn) + return; + const fn = cleanupFn; + cleanupFn = void 0; + fn(); + } + function onCleanup(callback) { + cleanupFn = callback; + } + const _cb = (value, oldValue) => { + onEffect(); + return cb(value, oldValue, onCleanup); + }; + const res = watchIgnorable(source, _cb, options); + const { ignoreUpdates } = res; + const trigger = () => { + let res2; + ignoreUpdates(() => { + res2 = _cb(getWatchSources(source), getOldValue(source)); + }); + return res2; + }; + return { + ...res, + trigger + }; +} +function getWatchSources(sources) { + if (isReactive(sources)) + return sources; + if (Array.isArray(sources)) + return sources.map((item) => toValue(item)); + return toValue(sources); +} +function getOldValue(source) { + return Array.isArray(source) ? source.map(() => void 0) : void 0; +} +function whenever(source, cb, options) { + const stop = watch( + source, + (v, ov, onInvalidate) => { + if (v) { + if (options == null ? void 0 : options.once) + nextTick(() => stop()); + cb(v, ov, onInvalidate); + } + }, + { + ...options, + once: false + } + ); + return stop; +} + +// node_modules/@vueuse/core/index.mjs +function computedAsync(evaluationCallback, initialState, optionsOrRef) { + let options; + if (isRef(optionsOrRef)) { + options = { + evaluating: optionsOrRef + }; + } else { + options = optionsOrRef || {}; + } + const { + lazy = false, + evaluating = void 0, + shallow = true, + onError = noop + } = options; + const started = ref(!lazy); + const current = shallow ? shallowRef(initialState) : ref(initialState); + let counter = 0; + watchEffect(async (onInvalidate) => { + if (!started.value) + return; + counter++; + const counterAtBeginning = counter; + let hasFinished = false; + if (evaluating) { + Promise.resolve().then(() => { + evaluating.value = true; + }); + } + try { + const result = await evaluationCallback((cancelCallback) => { + onInvalidate(() => { + if (evaluating) + evaluating.value = false; + if (!hasFinished) + cancelCallback(); + }); + }); + if (counterAtBeginning === counter) + current.value = result; + } catch (e) { + onError(e); + } finally { + if (evaluating && counterAtBeginning === counter) + evaluating.value = false; + hasFinished = true; + } + }); + if (lazy) { + return computed(() => { + started.value = true; + return current.value; + }); + } else { + return current; + } +} +function computedInject(key, options, defaultSource, treatDefaultAsFactory) { + let source = inject(key); + if (defaultSource) + source = inject(key, defaultSource); + if (treatDefaultAsFactory) + source = inject(key, defaultSource, treatDefaultAsFactory); + if (typeof options === "function") { + return computed((ctx) => options(source, ctx)); + } else { + return computed({ + get: (ctx) => options.get(source, ctx), + set: options.set + }); + } +} +function createReusableTemplate(options = {}) { + if (!isVue3 && !version.startsWith("2.7.")) { + if (true) + throw new Error("[VueUse] createReusableTemplate only works in Vue 2.7 or above."); + return; + } + const { + inheritAttrs = true + } = options; + const render = shallowRef(); + const define = defineComponent({ + setup(_, { slots }) { + return () => { + render.value = slots.default; + }; + } + }); + const reuse = defineComponent({ + inheritAttrs, + setup(_, { attrs, slots }) { + return () => { + var _a; + if (!render.value && true) + throw new Error("[VueUse] Failed to find the definition of reusable template"); + const vnode = (_a = render.value) == null ? void 0 : _a.call(render, { ...keysToCamelKebabCase(attrs), $slots: slots }); + return inheritAttrs && (vnode == null ? void 0 : vnode.length) === 1 ? vnode[0] : vnode; + }; + } + }); + return makeDestructurable( + { define, reuse }, + [define, reuse] + ); +} +function keysToCamelKebabCase(obj) { + const newObj = {}; + for (const key in obj) + newObj[camelize(key)] = obj[key]; + return newObj; +} +function createTemplatePromise(options = {}) { + if (!isVue3) { + if (true) + throw new Error("[VueUse] createTemplatePromise only works in Vue 3 or above."); + return; + } + let index = 0; + const instances = ref([]); + function create(...args) { + const props = shallowReactive({ + key: index++, + args, + promise: void 0, + resolve: () => { + }, + reject: () => { + }, + isResolving: false, + options + }); + instances.value.push(props); + props.promise = new Promise((_resolve, _reject) => { + props.resolve = (v) => { + props.isResolving = true; + return _resolve(v); + }; + props.reject = _reject; + }).finally(() => { + props.promise = void 0; + const index2 = instances.value.indexOf(props); + if (index2 !== -1) + instances.value.splice(index2, 1); + }); + return props.promise; + } + function start(...args) { + if (options.singleton && instances.value.length > 0) + return instances.value[0].promise; + return create(...args); + } + const component = defineComponent((_, { slots }) => { + const renderList = () => instances.value.map((props) => { + var _a; + return h(Fragment, { key: props.key }, (_a = slots.default) == null ? void 0 : _a.call(slots, props)); + }); + if (options.transition) + return () => h(TransitionGroup, options.transition, renderList); + return renderList; + }); + component.start = start; + return component; +} +function createUnrefFn(fn) { + return function(...args) { + return fn.apply(this, args.map((i) => toValue(i))); + }; +} +function unrefElement(elRef) { + var _a; + const plain = toValue(elRef); + return (_a = plain == null ? void 0 : plain.$el) != null ? _a : plain; +} +var defaultWindow = isClient ? window : void 0; +var defaultDocument = isClient ? window.document : void 0; +var defaultNavigator = isClient ? window.navigator : void 0; +var defaultLocation = isClient ? window.location : void 0; +function useEventListener(...args) { + let target; + let events2; + let listeners; + let options; + if (typeof args[0] === "string" || Array.isArray(args[0])) { + [events2, listeners, options] = args; + target = defaultWindow; + } else { + [target, events2, listeners, options] = args; + } + if (!target) + return noop; + if (!Array.isArray(events2)) + events2 = [events2]; + if (!Array.isArray(listeners)) + listeners = [listeners]; + const cleanups = []; + const cleanup = () => { + cleanups.forEach((fn) => fn()); + cleanups.length = 0; + }; + const register = (el, event, listener, options2) => { + el.addEventListener(event, listener, options2); + return () => el.removeEventListener(event, listener, options2); + }; + const stopWatch = watch( + () => [unrefElement(target), toValue(options)], + ([el, options2]) => { + cleanup(); + if (!el) + return; + const optionsClone = isObject(options2) ? { ...options2 } : options2; + cleanups.push( + ...events2.flatMap((event) => { + return listeners.map((listener) => register(el, event, listener, optionsClone)); + }) + ); + }, + { immediate: true, flush: "post" } + ); + const stop = () => { + stopWatch(); + cleanup(); + }; + tryOnScopeDispose(stop); + return stop; +} +var _iOSWorkaround = false; +function onClickOutside(target, handler, options = {}) { + const { window: window2 = defaultWindow, ignore = [], capture = true, detectIframe = false } = options; + if (!window2) + return noop; + if (isIOS && !_iOSWorkaround) { + _iOSWorkaround = true; + Array.from(window2.document.body.children).forEach((el) => el.addEventListener("click", noop)); + window2.document.documentElement.addEventListener("click", noop); + } + let shouldListen = true; + const shouldIgnore = (event) => { + return ignore.some((target2) => { + if (typeof target2 === "string") { + return Array.from(window2.document.querySelectorAll(target2)).some((el) => el === event.target || event.composedPath().includes(el)); + } else { + const el = unrefElement(target2); + return el && (event.target === el || event.composedPath().includes(el)); + } + }); + }; + const listener = (event) => { + const el = unrefElement(target); + if (!el || el === event.target || event.composedPath().includes(el)) + return; + if (event.detail === 0) + shouldListen = !shouldIgnore(event); + if (!shouldListen) { + shouldListen = true; + return; + } + handler(event); + }; + const cleanup = [ + useEventListener(window2, "click", listener, { passive: true, capture }), + useEventListener(window2, "pointerdown", (e) => { + const el = unrefElement(target); + shouldListen = !shouldIgnore(e) && !!(el && !e.composedPath().includes(el)); + }, { passive: true }), + detectIframe && useEventListener(window2, "blur", (event) => { + setTimeout(() => { + var _a; + const el = unrefElement(target); + if (((_a = window2.document.activeElement) == null ? void 0 : _a.tagName) === "IFRAME" && !(el == null ? void 0 : el.contains(window2.document.activeElement))) { + handler(event); + } + }, 0); + }) + ].filter(Boolean); + const stop = () => cleanup.forEach((fn) => fn()); + return stop; +} +function createKeyPredicate(keyFilter) { + if (typeof keyFilter === "function") + return keyFilter; + else if (typeof keyFilter === "string") + return (event) => event.key === keyFilter; + else if (Array.isArray(keyFilter)) + return (event) => keyFilter.includes(event.key); + return () => true; +} +function onKeyStroke(...args) { + let key; + let handler; + let options = {}; + if (args.length === 3) { + key = args[0]; + handler = args[1]; + options = args[2]; + } else if (args.length === 2) { + if (typeof args[1] === "object") { + key = true; + handler = args[0]; + options = args[1]; + } else { + key = args[0]; + handler = args[1]; + } + } else { + key = true; + handler = args[0]; + } + const { + target = defaultWindow, + eventName = "keydown", + passive = false, + dedupe = false + } = options; + const predicate = createKeyPredicate(key); + const listener = (e) => { + if (e.repeat && toValue(dedupe)) + return; + if (predicate(e)) + handler(e); + }; + return useEventListener(target, eventName, listener, passive); +} +function onKeyDown(key, handler, options = {}) { + return onKeyStroke(key, handler, { ...options, eventName: "keydown" }); +} +function onKeyPressed(key, handler, options = {}) { + return onKeyStroke(key, handler, { ...options, eventName: "keypress" }); +} +function onKeyUp(key, handler, options = {}) { + return onKeyStroke(key, handler, { ...options, eventName: "keyup" }); +} +var DEFAULT_DELAY = 500; +var DEFAULT_THRESHOLD = 10; +function onLongPress(target, handler, options) { + var _a, _b; + const elementRef = computed(() => unrefElement(target)); + let timeout; + let posStart; + let startTimestamp; + let hasLongPressed = false; + function clear() { + if (timeout) { + clearTimeout(timeout); + timeout = void 0; + } + posStart = void 0; + startTimestamp = void 0; + hasLongPressed = false; + } + function onRelease(ev) { + var _a2, _b2, _c; + const [_startTimestamp, _posStart, _hasLongPressed] = [startTimestamp, posStart, hasLongPressed]; + clear(); + if (!(options == null ? void 0 : options.onMouseUp) || !_posStart || !_startTimestamp) + return; + if (((_a2 = options == null ? void 0 : options.modifiers) == null ? void 0 : _a2.self) && ev.target !== elementRef.value) + return; + if ((_b2 = options == null ? void 0 : options.modifiers) == null ? void 0 : _b2.prevent) + ev.preventDefault(); + if ((_c = options == null ? void 0 : options.modifiers) == null ? void 0 : _c.stop) + ev.stopPropagation(); + const dx = ev.x - _posStart.x; + const dy = ev.y - _posStart.y; + const distance = Math.sqrt(dx * dx + dy * dy); + options.onMouseUp(ev.timeStamp - _startTimestamp, distance, _hasLongPressed); + } + function onDown(ev) { + var _a2, _b2, _c, _d; + if (((_a2 = options == null ? void 0 : options.modifiers) == null ? void 0 : _a2.self) && ev.target !== elementRef.value) + return; + clear(); + if ((_b2 = options == null ? void 0 : options.modifiers) == null ? void 0 : _b2.prevent) + ev.preventDefault(); + if ((_c = options == null ? void 0 : options.modifiers) == null ? void 0 : _c.stop) + ev.stopPropagation(); + posStart = { + x: ev.x, + y: ev.y + }; + startTimestamp = ev.timeStamp; + timeout = setTimeout( + () => { + hasLongPressed = true; + handler(ev); + }, + (_d = options == null ? void 0 : options.delay) != null ? _d : DEFAULT_DELAY + ); + } + function onMove(ev) { + var _a2, _b2, _c, _d; + if (((_a2 = options == null ? void 0 : options.modifiers) == null ? void 0 : _a2.self) && ev.target !== elementRef.value) + return; + if (!posStart || (options == null ? void 0 : options.distanceThreshold) === false) + return; + if ((_b2 = options == null ? void 0 : options.modifiers) == null ? void 0 : _b2.prevent) + ev.preventDefault(); + if ((_c = options == null ? void 0 : options.modifiers) == null ? void 0 : _c.stop) + ev.stopPropagation(); + const dx = ev.x - posStart.x; + const dy = ev.y - posStart.y; + const distance = Math.sqrt(dx * dx + dy * dy); + if (distance >= ((_d = options == null ? void 0 : options.distanceThreshold) != null ? _d : DEFAULT_THRESHOLD)) + clear(); + } + const listenerOptions = { + capture: (_a = options == null ? void 0 : options.modifiers) == null ? void 0 : _a.capture, + once: (_b = options == null ? void 0 : options.modifiers) == null ? void 0 : _b.once + }; + const cleanup = [ + useEventListener(elementRef, "pointerdown", onDown, listenerOptions), + useEventListener(elementRef, "pointermove", onMove, listenerOptions), + useEventListener(elementRef, ["pointerup", "pointerleave"], onRelease, listenerOptions) + ]; + const stop = () => cleanup.forEach((fn) => fn()); + return stop; +} +function isFocusedElementEditable() { + const { activeElement, body } = document; + if (!activeElement) + return false; + if (activeElement === body) + return false; + switch (activeElement.tagName) { + case "INPUT": + case "TEXTAREA": + return true; + } + return activeElement.hasAttribute("contenteditable"); +} +function isTypedCharValid({ + keyCode, + metaKey, + ctrlKey, + altKey +}) { + if (metaKey || ctrlKey || altKey) + return false; + if (keyCode >= 48 && keyCode <= 57) + return true; + if (keyCode >= 65 && keyCode <= 90) + return true; + if (keyCode >= 97 && keyCode <= 122) + return true; + return false; +} +function onStartTyping(callback, options = {}) { + const { document: document2 = defaultDocument } = options; + const keydown = (event) => { + !isFocusedElementEditable() && isTypedCharValid(event) && callback(event); + }; + if (document2) + useEventListener(document2, "keydown", keydown, { passive: true }); +} +function templateRef(key, initialValue = null) { + const instance = getCurrentInstance(); + let _trigger = () => { + }; + const element = customRef((track, trigger) => { + _trigger = trigger; + return { + get() { + var _a, _b; + track(); + return (_b = (_a = instance == null ? void 0 : instance.proxy) == null ? void 0 : _a.$refs[key]) != null ? _b : initialValue; + }, + set() { + } + }; + }); + tryOnMounted(_trigger); + onUpdated(_trigger); + return element; +} +function useMounted() { + const isMounted = ref(false); + const instance = getCurrentInstance(); + if (instance) { + onMounted(() => { + isMounted.value = true; + }, isVue2 ? void 0 : instance); + } + return isMounted; +} +function useSupported(callback) { + const isMounted = useMounted(); + return computed(() => { + isMounted.value; + return Boolean(callback()); + }); +} +function useMutationObserver(target, callback, options = {}) { + const { window: window2 = defaultWindow, ...mutationOptions } = options; + let observer; + const isSupported = useSupported(() => window2 && "MutationObserver" in window2); + const cleanup = () => { + if (observer) { + observer.disconnect(); + observer = void 0; + } + }; + const targets = computed(() => { + const value = toValue(target); + const items = (Array.isArray(value) ? value : [value]).map(unrefElement).filter(notNullish); + return new Set(items); + }); + const stopWatch = watch( + () => targets.value, + (targets2) => { + cleanup(); + if (isSupported.value && targets2.size) { + observer = new MutationObserver(callback); + targets2.forEach((el) => observer.observe(el, mutationOptions)); + } + }, + { immediate: true, flush: "post" } + ); + const takeRecords = () => { + return observer == null ? void 0 : observer.takeRecords(); + }; + const stop = () => { + cleanup(); + stopWatch(); + }; + tryOnScopeDispose(stop); + return { + isSupported, + stop, + takeRecords + }; +} +function useActiveElement(options = {}) { + var _a; + const { + window: window2 = defaultWindow, + deep = true, + triggerOnRemoval = false + } = options; + const document2 = (_a = options.document) != null ? _a : window2 == null ? void 0 : window2.document; + const getDeepActiveElement = () => { + var _a2; + let element = document2 == null ? void 0 : document2.activeElement; + if (deep) { + while (element == null ? void 0 : element.shadowRoot) + element = (_a2 = element == null ? void 0 : element.shadowRoot) == null ? void 0 : _a2.activeElement; + } + return element; + }; + const activeElement = ref(); + const trigger = () => { + activeElement.value = getDeepActiveElement(); + }; + if (window2) { + useEventListener(window2, "blur", (event) => { + if (event.relatedTarget !== null) + return; + trigger(); + }, true); + useEventListener(window2, "focus", trigger, true); + } + if (triggerOnRemoval) { + useMutationObserver(document2, (mutations) => { + mutations.filter((m) => m.removedNodes.length).map((n) => Array.from(n.removedNodes)).flat().forEach((node) => { + if (node === activeElement.value) + trigger(); + }); + }, { + childList: true, + subtree: true + }); + } + trigger(); + return activeElement; +} +function useRafFn(fn, options = {}) { + const { + immediate = true, + fpsLimit = void 0, + window: window2 = defaultWindow + } = options; + const isActive = ref(false); + const intervalLimit = fpsLimit ? 1e3 / fpsLimit : null; + let previousFrameTimestamp = 0; + let rafId = null; + function loop(timestamp2) { + if (!isActive.value || !window2) + return; + if (!previousFrameTimestamp) + previousFrameTimestamp = timestamp2; + const delta = timestamp2 - previousFrameTimestamp; + if (intervalLimit && delta < intervalLimit) { + rafId = window2.requestAnimationFrame(loop); + return; + } + previousFrameTimestamp = timestamp2; + fn({ delta, timestamp: timestamp2 }); + rafId = window2.requestAnimationFrame(loop); + } + function resume() { + if (!isActive.value && window2) { + isActive.value = true; + previousFrameTimestamp = 0; + rafId = window2.requestAnimationFrame(loop); + } + } + function pause() { + isActive.value = false; + if (rafId != null && window2) { + window2.cancelAnimationFrame(rafId); + rafId = null; + } + } + if (immediate) + resume(); + tryOnScopeDispose(pause); + return { + isActive: readonly(isActive), + pause, + resume + }; +} +function useAnimate(target, keyframes, options) { + let config; + let animateOptions; + if (isObject(options)) { + config = options; + animateOptions = objectOmit(options, ["window", "immediate", "commitStyles", "persist", "onReady", "onError"]); + } else { + config = { duration: options }; + animateOptions = options; + } + const { + window: window2 = defaultWindow, + immediate = true, + commitStyles, + persist, + playbackRate: _playbackRate = 1, + onReady, + onError = (e) => { + console.error(e); + } + } = config; + const isSupported = useSupported(() => window2 && HTMLElement && "animate" in HTMLElement.prototype); + const animate = shallowRef(void 0); + const store = shallowReactive({ + startTime: null, + currentTime: null, + timeline: null, + playbackRate: _playbackRate, + pending: false, + playState: immediate ? "idle" : "paused", + replaceState: "active" + }); + const pending = computed(() => store.pending); + const playState = computed(() => store.playState); + const replaceState = computed(() => store.replaceState); + const startTime = computed({ + get() { + return store.startTime; + }, + set(value) { + store.startTime = value; + if (animate.value) + animate.value.startTime = value; + } + }); + const currentTime = computed({ + get() { + return store.currentTime; + }, + set(value) { + store.currentTime = value; + if (animate.value) { + animate.value.currentTime = value; + syncResume(); + } + } + }); + const timeline = computed({ + get() { + return store.timeline; + }, + set(value) { + store.timeline = value; + if (animate.value) + animate.value.timeline = value; + } + }); + const playbackRate = computed({ + get() { + return store.playbackRate; + }, + set(value) { + store.playbackRate = value; + if (animate.value) + animate.value.playbackRate = value; + } + }); + const play = () => { + if (animate.value) { + try { + animate.value.play(); + syncResume(); + } catch (e) { + syncPause(); + onError(e); + } + } else { + update(); + } + }; + const pause = () => { + var _a; + try { + (_a = animate.value) == null ? void 0 : _a.pause(); + syncPause(); + } catch (e) { + onError(e); + } + }; + const reverse = () => { + var _a; + !animate.value && update(); + try { + (_a = animate.value) == null ? void 0 : _a.reverse(); + syncResume(); + } catch (e) { + syncPause(); + onError(e); + } + }; + const finish = () => { + var _a; + try { + (_a = animate.value) == null ? void 0 : _a.finish(); + syncPause(); + } catch (e) { + onError(e); + } + }; + const cancel = () => { + var _a; + try { + (_a = animate.value) == null ? void 0 : _a.cancel(); + syncPause(); + } catch (e) { + onError(e); + } + }; + watch(() => unrefElement(target), (el) => { + el && update(); + }); + watch(() => keyframes, (value) => { + !animate.value && update(); + if (!unrefElement(target) && animate.value) { + animate.value.effect = new KeyframeEffect( + unrefElement(target), + toValue(value), + animateOptions + ); + } + }, { deep: true }); + tryOnMounted(() => { + nextTick(() => update(true)); + }); + tryOnScopeDispose(cancel); + function update(init) { + const el = unrefElement(target); + if (!isSupported.value || !el) + return; + if (!animate.value) + animate.value = el.animate(toValue(keyframes), animateOptions); + if (persist) + animate.value.persist(); + if (_playbackRate !== 1) + animate.value.playbackRate = _playbackRate; + if (init && !immediate) + animate.value.pause(); + else + syncResume(); + onReady == null ? void 0 : onReady(animate.value); + } + useEventListener(animate, ["cancel", "finish", "remove"], syncPause); + useEventListener(animate, "finish", () => { + var _a; + if (commitStyles) + (_a = animate.value) == null ? void 0 : _a.commitStyles(); + }); + const { resume: resumeRef, pause: pauseRef } = useRafFn(() => { + if (!animate.value) + return; + store.pending = animate.value.pending; + store.playState = animate.value.playState; + store.replaceState = animate.value.replaceState; + store.startTime = animate.value.startTime; + store.currentTime = animate.value.currentTime; + store.timeline = animate.value.timeline; + store.playbackRate = animate.value.playbackRate; + }, { immediate: false }); + function syncResume() { + if (isSupported.value) + resumeRef(); + } + function syncPause() { + if (isSupported.value && window2) + window2.requestAnimationFrame(pauseRef); + } + return { + isSupported, + animate, + // actions + play, + pause, + reverse, + finish, + cancel, + // state + pending, + playState, + replaceState, + startTime, + currentTime, + timeline, + playbackRate + }; +} +function useAsyncQueue(tasks, options) { + const { + interrupt = true, + onError = noop, + onFinished = noop, + signal + } = options || {}; + const promiseState = { + aborted: "aborted", + fulfilled: "fulfilled", + pending: "pending", + rejected: "rejected" + }; + const initialResult = Array.from(Array.from({ length: tasks.length }), () => ({ state: promiseState.pending, data: null })); + const result = reactive(initialResult); + const activeIndex = ref(-1); + if (!tasks || tasks.length === 0) { + onFinished(); + return { + activeIndex, + result + }; + } + function updateResult(state, res) { + activeIndex.value++; + result[activeIndex.value].data = res; + result[activeIndex.value].state = state; + } + tasks.reduce((prev, curr) => { + return prev.then((prevRes) => { + var _a; + if (signal == null ? void 0 : signal.aborted) { + updateResult(promiseState.aborted, new Error("aborted")); + return; + } + if (((_a = result[activeIndex.value]) == null ? void 0 : _a.state) === promiseState.rejected && interrupt) { + onFinished(); + return; + } + const done = curr(prevRes).then((currentRes) => { + updateResult(promiseState.fulfilled, currentRes); + activeIndex.value === tasks.length - 1 && onFinished(); + return currentRes; + }); + if (!signal) + return done; + return Promise.race([done, whenAborted(signal)]); + }).catch((e) => { + if (signal == null ? void 0 : signal.aborted) { + updateResult(promiseState.aborted, e); + return e; + } + updateResult(promiseState.rejected, e); + onError(); + return e; + }); + }, Promise.resolve()); + return { + activeIndex, + result + }; +} +function whenAborted(signal) { + return new Promise((resolve, reject) => { + const error = new Error("aborted"); + if (signal.aborted) + reject(error); + else + signal.addEventListener("abort", () => reject(error), { once: true }); + }); +} +function useAsyncState(promise, initialState, options) { + const { + immediate = true, + delay = 0, + onError = noop, + onSuccess = noop, + resetOnExecute = true, + shallow = true, + throwError + } = options != null ? options : {}; + const state = shallow ? shallowRef(initialState) : ref(initialState); + const isReady = ref(false); + const isLoading = ref(false); + const error = shallowRef(void 0); + async function execute(delay2 = 0, ...args) { + if (resetOnExecute) + state.value = initialState; + error.value = void 0; + isReady.value = false; + isLoading.value = true; + if (delay2 > 0) + await promiseTimeout(delay2); + const _promise = typeof promise === "function" ? promise(...args) : promise; + try { + const data = await _promise; + state.value = data; + isReady.value = true; + onSuccess(data); + } catch (e) { + error.value = e; + onError(e); + if (throwError) + throw e; + } finally { + isLoading.value = false; + } + return state.value; + } + if (immediate) + execute(delay); + const shell = { + state, + isReady, + isLoading, + error, + execute + }; + function waitUntilIsLoaded() { + return new Promise((resolve, reject) => { + until(isLoading).toBe(false).then(() => resolve(shell)).catch(reject); + }); + } + return { + ...shell, + then(onFulfilled, onRejected) { + return waitUntilIsLoaded().then(onFulfilled, onRejected); + } + }; +} +var defaults = { + array: (v) => JSON.stringify(v), + object: (v) => JSON.stringify(v), + set: (v) => JSON.stringify(Array.from(v)), + map: (v) => JSON.stringify(Object.fromEntries(v)), + null: () => "" +}; +function getDefaultSerialization(target) { + if (!target) + return defaults.null; + if (target instanceof Map) + return defaults.map; + else if (target instanceof Set) + return defaults.set; + else if (Array.isArray(target)) + return defaults.array; + else + return defaults.object; +} +function useBase64(target, options) { + const base64 = ref(""); + const promise = ref(); + function execute() { + if (!isClient) + return; + promise.value = new Promise((resolve, reject) => { + try { + const _target = toValue(target); + if (_target == null) { + resolve(""); + } else if (typeof _target === "string") { + resolve(blobToBase64(new Blob([_target], { type: "text/plain" }))); + } else if (_target instanceof Blob) { + resolve(blobToBase64(_target)); + } else if (_target instanceof ArrayBuffer) { + resolve(window.btoa(String.fromCharCode(...new Uint8Array(_target)))); + } else if (_target instanceof HTMLCanvasElement) { + resolve(_target.toDataURL(options == null ? void 0 : options.type, options == null ? void 0 : options.quality)); + } else if (_target instanceof HTMLImageElement) { + const img = _target.cloneNode(false); + img.crossOrigin = "Anonymous"; + imgLoaded(img).then(() => { + const canvas = document.createElement("canvas"); + const ctx = canvas.getContext("2d"); + canvas.width = img.width; + canvas.height = img.height; + ctx.drawImage(img, 0, 0, canvas.width, canvas.height); + resolve(canvas.toDataURL(options == null ? void 0 : options.type, options == null ? void 0 : options.quality)); + }).catch(reject); + } else if (typeof _target === "object") { + const _serializeFn = (options == null ? void 0 : options.serializer) || getDefaultSerialization(_target); + const serialized = _serializeFn(_target); + return resolve(blobToBase64(new Blob([serialized], { type: "application/json" }))); + } else { + reject(new Error("target is unsupported types")); + } + } catch (error) { + reject(error); + } + }); + promise.value.then((res) => base64.value = res); + return promise.value; + } + if (isRef(target) || typeof target === "function") + watch(target, execute, { immediate: true }); + else + execute(); + return { + base64, + promise, + execute + }; +} +function imgLoaded(img) { + return new Promise((resolve, reject) => { + if (!img.complete) { + img.onload = () => { + resolve(); + }; + img.onerror = reject; + } else { + resolve(); + } + }); +} +function blobToBase64(blob) { + return new Promise((resolve, reject) => { + const fr = new FileReader(); + fr.onload = (e) => { + resolve(e.target.result); + }; + fr.onerror = reject; + fr.readAsDataURL(blob); + }); +} +function useBattery(options = {}) { + const { navigator = defaultNavigator } = options; + const events2 = ["chargingchange", "chargingtimechange", "dischargingtimechange", "levelchange"]; + const isSupported = useSupported(() => navigator && "getBattery" in navigator && typeof navigator.getBattery === "function"); + const charging = ref(false); + const chargingTime = ref(0); + const dischargingTime = ref(0); + const level = ref(1); + let battery; + function updateBatteryInfo() { + charging.value = this.charging; + chargingTime.value = this.chargingTime || 0; + dischargingTime.value = this.dischargingTime || 0; + level.value = this.level; + } + if (isSupported.value) { + navigator.getBattery().then((_battery) => { + battery = _battery; + updateBatteryInfo.call(battery); + useEventListener(battery, events2, updateBatteryInfo, { passive: true }); + }); + } + return { + isSupported, + charging, + chargingTime, + dischargingTime, + level + }; +} +function useBluetooth(options) { + let { + acceptAllDevices = false + } = options || {}; + const { + filters = void 0, + optionalServices = void 0, + navigator = defaultNavigator + } = options || {}; + const isSupported = useSupported(() => navigator && "bluetooth" in navigator); + const device = shallowRef(void 0); + const error = shallowRef(null); + watch(device, () => { + connectToBluetoothGATTServer(); + }); + async function requestDevice() { + if (!isSupported.value) + return; + error.value = null; + if (filters && filters.length > 0) + acceptAllDevices = false; + try { + device.value = await (navigator == null ? void 0 : navigator.bluetooth.requestDevice({ + acceptAllDevices, + filters, + optionalServices + })); + } catch (err) { + error.value = err; + } + } + const server = ref(); + const isConnected = computed(() => { + var _a; + return ((_a = server.value) == null ? void 0 : _a.connected) || false; + }); + async function connectToBluetoothGATTServer() { + error.value = null; + if (device.value && device.value.gatt) { + device.value.addEventListener("gattserverdisconnected", () => { + }); + try { + server.value = await device.value.gatt.connect(); + } catch (err) { + error.value = err; + } + } + } + tryOnMounted(() => { + var _a; + if (device.value) + (_a = device.value.gatt) == null ? void 0 : _a.connect(); + }); + tryOnScopeDispose(() => { + var _a; + if (device.value) + (_a = device.value.gatt) == null ? void 0 : _a.disconnect(); + }); + return { + isSupported, + isConnected, + // Device: + device, + requestDevice, + // Server: + server, + // Errors: + error + }; +} +function useMediaQuery(query, options = {}) { + const { window: window2 = defaultWindow } = options; + const isSupported = useSupported(() => window2 && "matchMedia" in window2 && typeof window2.matchMedia === "function"); + let mediaQuery; + const matches = ref(false); + const handler = (event) => { + matches.value = event.matches; + }; + const cleanup = () => { + if (!mediaQuery) + return; + if ("removeEventListener" in mediaQuery) + mediaQuery.removeEventListener("change", handler); + else + mediaQuery.removeListener(handler); + }; + const stopWatch = watchEffect(() => { + if (!isSupported.value) + return; + cleanup(); + mediaQuery = window2.matchMedia(toValue(query)); + if ("addEventListener" in mediaQuery) + mediaQuery.addEventListener("change", handler); + else + mediaQuery.addListener(handler); + matches.value = mediaQuery.matches; + }); + tryOnScopeDispose(() => { + stopWatch(); + cleanup(); + mediaQuery = void 0; + }); + return matches; +} +var breakpointsTailwind = { + "sm": 640, + "md": 768, + "lg": 1024, + "xl": 1280, + "2xl": 1536 +}; +var breakpointsBootstrapV5 = { + xs: 0, + sm: 576, + md: 768, + lg: 992, + xl: 1200, + xxl: 1400 +}; +var breakpointsVuetifyV2 = { + xs: 0, + sm: 600, + md: 960, + lg: 1264, + xl: 1904 +}; +var breakpointsVuetifyV3 = { + xs: 0, + sm: 600, + md: 960, + lg: 1280, + xl: 1920, + xxl: 2560 +}; +var breakpointsVuetify = breakpointsVuetifyV2; +var breakpointsAntDesign = { + xs: 480, + sm: 576, + md: 768, + lg: 992, + xl: 1200, + xxl: 1600 +}; +var breakpointsQuasar = { + xs: 0, + sm: 600, + md: 1024, + lg: 1440, + xl: 1920 +}; +var breakpointsSematic = { + mobileS: 320, + mobileM: 375, + mobileL: 425, + tablet: 768, + laptop: 1024, + laptopL: 1440, + desktop4K: 2560 +}; +var breakpointsMasterCss = { + "3xs": 360, + "2xs": 480, + "xs": 600, + "sm": 768, + "md": 1024, + "lg": 1280, + "xl": 1440, + "2xl": 1600, + "3xl": 1920, + "4xl": 2560 +}; +var breakpointsPrimeFlex = { + sm: 576, + md: 768, + lg: 992, + xl: 1200 +}; +function useBreakpoints(breakpoints, options = {}) { + function getValue2(k, delta) { + let v = toValue(breakpoints[toValue(k)]); + if (delta != null) + v = increaseWithUnit(v, delta); + if (typeof v === "number") + v = `${v}px`; + return v; + } + const { window: window2 = defaultWindow, strategy = "min-width" } = options; + function match(query) { + if (!window2) + return false; + return window2.matchMedia(query).matches; + } + const greaterOrEqual = (k) => { + return useMediaQuery(() => `(min-width: ${getValue2(k)})`, options); + }; + const smallerOrEqual = (k) => { + return useMediaQuery(() => `(max-width: ${getValue2(k)})`, options); + }; + const shortcutMethods = Object.keys(breakpoints).reduce((shortcuts, k) => { + Object.defineProperty(shortcuts, k, { + get: () => strategy === "min-width" ? greaterOrEqual(k) : smallerOrEqual(k), + enumerable: true, + configurable: true + }); + return shortcuts; + }, {}); + function current() { + const points = Object.keys(breakpoints).map((i) => [i, greaterOrEqual(i)]); + return computed(() => points.filter(([, v]) => v.value).map(([k]) => k)); + } + return Object.assign(shortcutMethods, { + greaterOrEqual, + smallerOrEqual, + greater(k) { + return useMediaQuery(() => `(min-width: ${getValue2(k, 0.1)})`, options); + }, + smaller(k) { + return useMediaQuery(() => `(max-width: ${getValue2(k, -0.1)})`, options); + }, + between(a, b) { + return useMediaQuery(() => `(min-width: ${getValue2(a)}) and (max-width: ${getValue2(b, -0.1)})`, options); + }, + isGreater(k) { + return match(`(min-width: ${getValue2(k, 0.1)})`); + }, + isGreaterOrEqual(k) { + return match(`(min-width: ${getValue2(k)})`); + }, + isSmaller(k) { + return match(`(max-width: ${getValue2(k, -0.1)})`); + }, + isSmallerOrEqual(k) { + return match(`(max-width: ${getValue2(k)})`); + }, + isInBetween(a, b) { + return match(`(min-width: ${getValue2(a)}) and (max-width: ${getValue2(b, -0.1)})`); + }, + current, + active() { + const bps = current(); + return computed(() => bps.value.length === 0 ? "" : bps.value.at(-1)); + } + }); +} +function useBroadcastChannel(options) { + const { + name, + window: window2 = defaultWindow + } = options; + const isSupported = useSupported(() => window2 && "BroadcastChannel" in window2); + const isClosed = ref(false); + const channel = ref(); + const data = ref(); + const error = shallowRef(null); + const post = (data2) => { + if (channel.value) + channel.value.postMessage(data2); + }; + const close = () => { + if (channel.value) + channel.value.close(); + isClosed.value = true; + }; + if (isSupported.value) { + tryOnMounted(() => { + error.value = null; + channel.value = new BroadcastChannel(name); + channel.value.addEventListener("message", (e) => { + data.value = e.data; + }, { passive: true }); + channel.value.addEventListener("messageerror", (e) => { + error.value = e; + }, { passive: true }); + channel.value.addEventListener("close", () => { + isClosed.value = true; + }); + }); + } + tryOnScopeDispose(() => { + close(); + }); + return { + isSupported, + channel, + data, + post, + close, + error, + isClosed + }; +} +var WRITABLE_PROPERTIES = [ + "hash", + "host", + "hostname", + "href", + "pathname", + "port", + "protocol", + "search" +]; +function useBrowserLocation(options = {}) { + const { window: window2 = defaultWindow } = options; + const refs = Object.fromEntries( + WRITABLE_PROPERTIES.map((key) => [key, ref()]) + ); + for (const [key, ref2] of objectEntries(refs)) { + watch(ref2, (value) => { + if (!(window2 == null ? void 0 : window2.location) || window2.location[key] === value) + return; + window2.location[key] = value; + }); + } + const buildState = (trigger) => { + var _a; + const { state: state2, length } = (window2 == null ? void 0 : window2.history) || {}; + const { origin } = (window2 == null ? void 0 : window2.location) || {}; + for (const key of WRITABLE_PROPERTIES) + refs[key].value = (_a = window2 == null ? void 0 : window2.location) == null ? void 0 : _a[key]; + return reactive({ + trigger, + state: state2, + length, + origin, + ...refs + }); + }; + const state = ref(buildState("load")); + if (window2) { + useEventListener(window2, "popstate", () => state.value = buildState("popstate"), { passive: true }); + useEventListener(window2, "hashchange", () => state.value = buildState("hashchange"), { passive: true }); + } + return state; +} +function useCached(refValue, comparator = (a, b) => a === b, watchOptions) { + const cachedValue = ref(refValue.value); + watch(() => refValue.value, (value) => { + if (!comparator(value, cachedValue.value)) + cachedValue.value = value; + }, watchOptions); + return cachedValue; +} +function usePermission(permissionDesc, options = {}) { + const { + controls = false, + navigator = defaultNavigator + } = options; + const isSupported = useSupported(() => navigator && "permissions" in navigator); + let permissionStatus; + const desc = typeof permissionDesc === "string" ? { name: permissionDesc } : permissionDesc; + const state = ref(); + const onChange = () => { + if (permissionStatus) + state.value = permissionStatus.state; + }; + const query = createSingletonPromise(async () => { + if (!isSupported.value) + return; + if (!permissionStatus) { + try { + permissionStatus = await navigator.permissions.query(desc); + useEventListener(permissionStatus, "change", onChange); + onChange(); + } catch (e) { + state.value = "prompt"; + } + } + return permissionStatus; + }); + query(); + if (controls) { + return { + state, + isSupported, + query + }; + } else { + return state; + } +} +function useClipboard(options = {}) { + const { + navigator = defaultNavigator, + read = false, + source, + copiedDuring = 1500, + legacy = false + } = options; + const isClipboardApiSupported = useSupported(() => navigator && "clipboard" in navigator); + const permissionRead = usePermission("clipboard-read"); + const permissionWrite = usePermission("clipboard-write"); + const isSupported = computed(() => isClipboardApiSupported.value || legacy); + const text = ref(""); + const copied = ref(false); + const timeout = useTimeoutFn(() => copied.value = false, copiedDuring); + function updateText() { + if (isClipboardApiSupported.value && isAllowed(permissionRead.value)) { + navigator.clipboard.readText().then((value) => { + text.value = value; + }); + } else { + text.value = legacyRead(); + } + } + if (isSupported.value && read) + useEventListener(["copy", "cut"], updateText); + async function copy(value = toValue(source)) { + if (isSupported.value && value != null) { + if (isClipboardApiSupported.value && isAllowed(permissionWrite.value)) + await navigator.clipboard.writeText(value); + else + legacyCopy(value); + text.value = value; + copied.value = true; + timeout.start(); + } + } + function legacyCopy(value) { + const ta = document.createElement("textarea"); + ta.value = value != null ? value : ""; + ta.style.position = "absolute"; + ta.style.opacity = "0"; + document.body.appendChild(ta); + ta.select(); + document.execCommand("copy"); + ta.remove(); + } + function legacyRead() { + var _a, _b, _c; + return (_c = (_b = (_a = document == null ? void 0 : document.getSelection) == null ? void 0 : _a.call(document)) == null ? void 0 : _b.toString()) != null ? _c : ""; + } + function isAllowed(status) { + return status === "granted" || status === "prompt"; + } + return { + isSupported, + text, + copied, + copy + }; +} +function useClipboardItems(options = {}) { + const { + navigator = defaultNavigator, + read = false, + source, + copiedDuring = 1500 + } = options; + const isSupported = useSupported(() => navigator && "clipboard" in navigator); + const content = ref([]); + const copied = ref(false); + const timeout = useTimeoutFn(() => copied.value = false, copiedDuring); + function updateContent() { + if (isSupported.value) { + navigator.clipboard.read().then((items) => { + content.value = items; + }); + } + } + if (isSupported.value && read) + useEventListener(["copy", "cut"], updateContent); + async function copy(value = toValue(source)) { + if (isSupported.value && value != null) { + await navigator.clipboard.write(value); + content.value = value; + copied.value = true; + timeout.start(); + } + } + return { + isSupported, + content, + copied, + copy + }; +} +function cloneFnJSON(source) { + return JSON.parse(JSON.stringify(source)); +} +function useCloned(source, options = {}) { + const cloned = ref({}); + const { + manual, + clone = cloneFnJSON, + // watch options + deep = true, + immediate = true + } = options; + function sync() { + cloned.value = clone(toValue(source)); + } + if (!manual && (isRef(source) || typeof source === "function")) { + watch(source, sync, { + ...options, + deep, + immediate + }); + } else { + sync(); + } + return { cloned, sync }; +} +var _global = typeof globalThis !== "undefined" ? globalThis : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : {}; +var globalKey = "__vueuse_ssr_handlers__"; +var handlers = getHandlers(); +function getHandlers() { + if (!(globalKey in _global)) + _global[globalKey] = _global[globalKey] || {}; + return _global[globalKey]; +} +function getSSRHandler(key, fallback) { + return handlers[key] || fallback; +} +function setSSRHandler(key, fn) { + handlers[key] = fn; +} +function guessSerializerType(rawInit) { + return 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"; +} +var StorageSerializers = { + boolean: { + read: (v) => v === "true", + write: (v) => String(v) + }, + object: { + read: (v) => JSON.parse(v), + write: (v) => JSON.stringify(v) + }, + number: { + read: (v) => Number.parseFloat(v), + write: (v) => String(v) + }, + any: { + read: (v) => v, + write: (v) => String(v) + }, + string: { + read: (v) => v, + write: (v) => String(v) + }, + map: { + read: (v) => new Map(JSON.parse(v)), + write: (v) => JSON.stringify(Array.from(v.entries())) + }, + set: { + read: (v) => new Set(JSON.parse(v)), + write: (v) => JSON.stringify(Array.from(v)) + }, + date: { + read: (v) => new Date(v), + write: (v) => v.toISOString() + } +}; +var customStorageEventName = "vueuse-storage"; +function useStorage(key, defaults2, storage, options = {}) { + var _a; + const { + flush = "pre", + deep = true, + listenToStorageChanges = true, + writeDefaults = true, + mergeDefaults = false, + shallow, + window: window2 = defaultWindow, + eventFilter, + onError = (e) => { + console.error(e); + }, + initOnMounted + } = options; + const data = (shallow ? shallowRef : ref)(typeof defaults2 === "function" ? defaults2() : defaults2); + if (!storage) { + try { + storage = getSSRHandler("getDefaultStorage", () => { + var _a2; + return (_a2 = defaultWindow) == null ? void 0 : _a2.localStorage; + })(); + } catch (e) { + onError(e); + } + } + if (!storage) + return data; + const rawInit = toValue(defaults2); + const type = guessSerializerType(rawInit); + const serializer = (_a = options.serializer) != null ? _a : StorageSerializers[type]; + const { pause: pauseWatch, resume: resumeWatch } = watchPausable( + data, + () => write(data.value), + { flush, deep, eventFilter } + ); + if (window2 && listenToStorageChanges) { + tryOnMounted(() => { + useEventListener(window2, "storage", update); + useEventListener(window2, customStorageEventName, updateFromCustomEvent); + if (initOnMounted) + update(); + }); + } + if (!initOnMounted) + update(); + function dispatchWriteEvent(oldValue, newValue) { + if (window2) { + window2.dispatchEvent(new CustomEvent(customStorageEventName, { + detail: { + key, + oldValue, + newValue, + storageArea: storage + } + })); + } + } + function write(v) { + try { + const oldValue = storage.getItem(key); + if (v == null) { + dispatchWriteEvent(oldValue, null); + storage.removeItem(key); + } else { + const serialized = serializer.write(v); + if (oldValue !== serialized) { + storage.setItem(key, serialized); + dispatchWriteEvent(oldValue, serialized); + } + } + } catch (e) { + onError(e); + } + } + function read(event) { + const rawValue = event ? event.newValue : storage.getItem(key); + if (rawValue == null) { + if (writeDefaults && rawInit != null) + storage.setItem(key, serializer.write(rawInit)); + return rawInit; + } else if (!event && mergeDefaults) { + const value = serializer.read(rawValue); + if (typeof mergeDefaults === "function") + return mergeDefaults(value, rawInit); + else if (type === "object" && !Array.isArray(value)) + return { ...rawInit, ...value }; + return value; + } else if (typeof rawValue !== "string") { + return rawValue; + } else { + return serializer.read(rawValue); + } + } + function update(event) { + if (event && event.storageArea !== storage) + return; + if (event && event.key == null) { + data.value = rawInit; + return; + } + if (event && event.key !== key) + return; + pauseWatch(); + try { + if ((event == null ? void 0 : event.newValue) !== serializer.write(data.value)) + data.value = read(event); + } catch (e) { + onError(e); + } finally { + if (event) + nextTick(resumeWatch); + else + resumeWatch(); + } + } + function updateFromCustomEvent(event) { + update(event.detail); + } + return data; +} +function usePreferredDark(options) { + return useMediaQuery("(prefers-color-scheme: dark)", options); +} +function useColorMode(options = {}) { + const { + selector = "html", + attribute = "class", + initialValue = "auto", + window: window2 = defaultWindow, + storage, + storageKey = "vueuse-color-scheme", + listenToStorageChanges = true, + storageRef, + emitAuto, + disableTransition = true + } = options; + const modes = { + auto: "", + light: "light", + dark: "dark", + ...options.modes || {} + }; + const preferredDark = usePreferredDark({ window: window2 }); + const system = computed(() => preferredDark.value ? "dark" : "light"); + const store = storageRef || (storageKey == null ? toRef2(initialValue) : useStorage(storageKey, initialValue, storage, { window: window2, listenToStorageChanges })); + const state = computed(() => store.value === "auto" ? system.value : store.value); + const updateHTMLAttrs = getSSRHandler( + "updateHTMLAttrs", + (selector2, attribute2, value) => { + const el = typeof selector2 === "string" ? window2 == null ? void 0 : window2.document.querySelector(selector2) : unrefElement(selector2); + if (!el) + return; + let style; + if (disableTransition) { + style = window2.document.createElement("style"); + const styleString = "*,*::before,*::after{-webkit-transition:none!important;-moz-transition:none!important;-o-transition:none!important;-ms-transition:none!important;transition:none!important}"; + style.appendChild(document.createTextNode(styleString)); + window2.document.head.appendChild(style); + } + if (attribute2 === "class") { + const current = value.split(/\s/g); + Object.values(modes).flatMap((i) => (i || "").split(/\s/g)).filter(Boolean).forEach((v) => { + if (current.includes(v)) + el.classList.add(v); + else + el.classList.remove(v); + }); + } else { + el.setAttribute(attribute2, value); + } + if (disableTransition) { + window2.getComputedStyle(style).opacity; + document.head.removeChild(style); + } + } + ); + function defaultOnChanged(mode) { + var _a; + updateHTMLAttrs(selector, attribute, (_a = modes[mode]) != null ? _a : mode); + } + function onChanged(mode) { + if (options.onChanged) + options.onChanged(mode, defaultOnChanged); + else + defaultOnChanged(mode); + } + watch(state, onChanged, { flush: "post", immediate: true }); + tryOnMounted(() => onChanged(state.value)); + const auto = computed({ + get() { + return emitAuto ? store.value : state.value; + }, + set(v) { + store.value = v; + } + }); + try { + return Object.assign(auto, { store, system, state }); + } catch (e) { + return auto; + } +} +function useConfirmDialog(revealed = ref(false)) { + const confirmHook = createEventHook(); + const cancelHook = createEventHook(); + const revealHook = createEventHook(); + let _resolve = noop; + const reveal = (data) => { + revealHook.trigger(data); + revealed.value = true; + return new Promise((resolve) => { + _resolve = resolve; + }); + }; + const confirm = (data) => { + revealed.value = false; + confirmHook.trigger(data); + _resolve({ data, isCanceled: false }); + }; + const cancel = (data) => { + revealed.value = false; + cancelHook.trigger(data); + _resolve({ data, isCanceled: true }); + }; + return { + isRevealed: computed(() => revealed.value), + reveal, + confirm, + cancel, + onReveal: revealHook.on, + onConfirm: confirmHook.on, + onCancel: cancelHook.on + }; +} +function useCssVar(prop, target, options = {}) { + const { window: window2 = defaultWindow, initialValue = "", observe = false } = options; + const variable = ref(initialValue); + const elRef = computed(() => { + var _a; + return unrefElement(target) || ((_a = window2 == null ? void 0 : window2.document) == null ? void 0 : _a.documentElement); + }); + function updateCssVar() { + var _a; + const key = toValue(prop); + const el = toValue(elRef); + if (el && window2) { + const value = (_a = window2.getComputedStyle(el).getPropertyValue(key)) == null ? void 0 : _a.trim(); + variable.value = value || initialValue; + } + } + if (observe) { + useMutationObserver(elRef, updateCssVar, { + attributeFilter: ["style", "class"], + window: window2 + }); + } + watch( + [elRef, () => toValue(prop)], + updateCssVar, + { immediate: true } + ); + watch( + variable, + (val) => { + var _a; + if ((_a = elRef.value) == null ? void 0 : _a.style) + elRef.value.style.setProperty(toValue(prop), val); + } + ); + return variable; +} +function useCurrentElement(rootComponent) { + const vm = getCurrentInstance(); + const currentElement = computedWithControl( + () => null, + () => rootComponent ? unrefElement(rootComponent) : vm.proxy.$el + ); + onUpdated(currentElement.trigger); + onMounted(currentElement.trigger); + return currentElement; +} +function useCycleList(list, options) { + const state = shallowRef(getInitialValue()); + const listRef = toRef2(list); + const index = computed({ + get() { + var _a; + const targetList = listRef.value; + let index2 = (options == null ? void 0 : options.getIndexOf) ? options.getIndexOf(state.value, targetList) : targetList.indexOf(state.value); + if (index2 < 0) + index2 = (_a = options == null ? void 0 : options.fallbackIndex) != null ? _a : 0; + return index2; + }, + set(v) { + set3(v); + } + }); + function set3(i) { + const targetList = listRef.value; + const length = targetList.length; + const index2 = (i % length + length) % length; + const value = targetList[index2]; + state.value = value; + return value; + } + function shift(delta = 1) { + return set3(index.value + delta); + } + function next(n = 1) { + return shift(n); + } + function prev(n = 1) { + return shift(-n); + } + function getInitialValue() { + var _a, _b; + return (_b = toValue((_a = options == null ? void 0 : options.initialValue) != null ? _a : toValue(list)[0])) != null ? _b : void 0; + } + watch(listRef, () => set3(index.value)); + return { + state, + index, + next, + prev, + go: set3 + }; +} +function useDark(options = {}) { + const { + valueDark = "dark", + valueLight = "", + window: window2 = defaultWindow + } = options; + const mode = useColorMode({ + ...options, + onChanged: (mode2, defaultHandler) => { + var _a; + if (options.onChanged) + (_a = options.onChanged) == null ? void 0 : _a.call(options, mode2 === "dark", defaultHandler, mode2); + else + defaultHandler(mode2); + }, + modes: { + dark: valueDark, + light: valueLight + } + }); + const system = computed(() => { + if (mode.system) { + return mode.system.value; + } else { + const preferredDark = usePreferredDark({ window: window2 }); + return preferredDark.value ? "dark" : "light"; + } + }); + const isDark = computed({ + get() { + return mode.value === "dark"; + }, + set(v) { + const modeVal = v ? "dark" : "light"; + if (system.value === modeVal) + mode.value = "auto"; + else + mode.value = modeVal; + } + }); + return isDark; +} +function fnBypass(v) { + return v; +} +function fnSetSource(source, value) { + return source.value = value; +} +function defaultDump(clone) { + return clone ? typeof clone === "function" ? clone : cloneFnJSON : fnBypass; +} +function defaultParse(clone) { + return clone ? typeof clone === "function" ? clone : cloneFnJSON : fnBypass; +} +function useManualRefHistory(source, options = {}) { + const { + clone = false, + dump = defaultDump(clone), + parse = defaultParse(clone), + setSource = fnSetSource + } = options; + function _createHistoryRecord() { + return markRaw({ + snapshot: dump(source.value), + timestamp: timestamp() + }); + } + const last = ref(_createHistoryRecord()); + const undoStack = ref([]); + const redoStack = ref([]); + const _setSource = (record) => { + setSource(source, parse(record.snapshot)); + last.value = record; + }; + const commit = () => { + undoStack.value.unshift(last.value); + last.value = _createHistoryRecord(); + if (options.capacity && undoStack.value.length > options.capacity) + undoStack.value.splice(options.capacity, Number.POSITIVE_INFINITY); + if (redoStack.value.length) + redoStack.value.splice(0, redoStack.value.length); + }; + const clear = () => { + undoStack.value.splice(0, undoStack.value.length); + redoStack.value.splice(0, redoStack.value.length); + }; + const undo = () => { + const state = undoStack.value.shift(); + if (state) { + redoStack.value.unshift(last.value); + _setSource(state); + } + }; + const redo = () => { + const state = redoStack.value.shift(); + if (state) { + undoStack.value.unshift(last.value); + _setSource(state); + } + }; + const reset = () => { + _setSource(last.value); + }; + const history = computed(() => [last.value, ...undoStack.value]); + const canUndo = computed(() => undoStack.value.length > 0); + const canRedo = computed(() => redoStack.value.length > 0); + return { + source, + undoStack, + redoStack, + last, + history, + canUndo, + canRedo, + clear, + commit, + reset, + undo, + redo + }; +} +function useRefHistory(source, options = {}) { + const { + deep = false, + flush = "pre", + eventFilter + } = options; + const { + eventFilter: composedFilter, + pause, + resume: resumeTracking, + isActive: isTracking + } = pausableFilter(eventFilter); + const { + ignoreUpdates, + ignorePrevAsyncUpdates, + stop + } = watchIgnorable( + source, + commit, + { deep, flush, eventFilter: composedFilter } + ); + function setSource(source2, value) { + ignorePrevAsyncUpdates(); + ignoreUpdates(() => { + source2.value = value; + }); + } + const manualHistory = useManualRefHistory(source, { ...options, clone: options.clone || deep, setSource }); + const { clear, commit: manualCommit } = manualHistory; + function commit() { + ignorePrevAsyncUpdates(); + manualCommit(); + } + function resume(commitNow) { + resumeTracking(); + if (commitNow) + commit(); + } + function batch(fn) { + let canceled = false; + const cancel = () => canceled = true; + ignoreUpdates(() => { + fn(cancel); + }); + if (!canceled) + commit(); + } + function dispose() { + stop(); + clear(); + } + return { + ...manualHistory, + isTracking, + pause, + resume, + commit, + batch, + dispose + }; +} +function useDebouncedRefHistory(source, options = {}) { + const filter = options.debounce ? debounceFilter(options.debounce) : void 0; + const history = useRefHistory(source, { ...options, eventFilter: filter }); + return { + ...history + }; +} +function useDeviceMotion(options = {}) { + const { + window: window2 = defaultWindow, + eventFilter = bypassFilter + } = options; + const acceleration = ref({ x: null, y: null, z: null }); + const rotationRate = ref({ alpha: null, beta: null, gamma: null }); + const interval = ref(0); + const accelerationIncludingGravity = ref({ + x: null, + y: null, + z: null + }); + if (window2) { + const onDeviceMotion = createFilterWrapper( + eventFilter, + (event) => { + acceleration.value = event.acceleration; + accelerationIncludingGravity.value = event.accelerationIncludingGravity; + rotationRate.value = event.rotationRate; + interval.value = event.interval; + } + ); + useEventListener(window2, "devicemotion", onDeviceMotion); + } + return { + acceleration, + accelerationIncludingGravity, + rotationRate, + interval + }; +} +function useDeviceOrientation(options = {}) { + const { window: window2 = defaultWindow } = options; + const isSupported = useSupported(() => window2 && "DeviceOrientationEvent" in window2); + const isAbsolute = ref(false); + const alpha = ref(null); + const beta = ref(null); + const gamma = ref(null); + if (window2 && isSupported.value) { + useEventListener(window2, "deviceorientation", (event) => { + isAbsolute.value = event.absolute; + alpha.value = event.alpha; + beta.value = event.beta; + gamma.value = event.gamma; + }); + } + return { + isSupported, + isAbsolute, + alpha, + beta, + gamma + }; +} +function useDevicePixelRatio(options = {}) { + const { + window: window2 = defaultWindow + } = options; + const pixelRatio = ref(1); + if (window2) { + let observe2 = function() { + pixelRatio.value = window2.devicePixelRatio; + cleanup2(); + media = window2.matchMedia(`(resolution: ${pixelRatio.value}dppx)`); + media.addEventListener("change", observe2, { once: true }); + }, cleanup2 = function() { + media == null ? void 0 : media.removeEventListener("change", observe2); + }; + let media; + observe2(); + tryOnScopeDispose(cleanup2); + } + return { pixelRatio }; +} +function useDevicesList(options = {}) { + const { + navigator = defaultNavigator, + requestPermissions = false, + constraints = { audio: true, video: true }, + onUpdated: onUpdated2 + } = options; + const devices = ref([]); + const videoInputs = computed(() => devices.value.filter((i) => i.kind === "videoinput")); + const audioInputs = computed(() => devices.value.filter((i) => i.kind === "audioinput")); + const audioOutputs = computed(() => devices.value.filter((i) => i.kind === "audiooutput")); + const isSupported = useSupported(() => navigator && navigator.mediaDevices && navigator.mediaDevices.enumerateDevices); + const permissionGranted = ref(false); + let stream; + async function update() { + if (!isSupported.value) + return; + devices.value = await navigator.mediaDevices.enumerateDevices(); + onUpdated2 == null ? void 0 : onUpdated2(devices.value); + if (stream) { + stream.getTracks().forEach((t) => t.stop()); + stream = null; + } + } + async function ensurePermissions() { + if (!isSupported.value) + return false; + if (permissionGranted.value) + return true; + const { state, query } = usePermission("camera", { controls: true }); + await query(); + if (state.value !== "granted") { + stream = await navigator.mediaDevices.getUserMedia(constraints); + update(); + permissionGranted.value = true; + } else { + permissionGranted.value = true; + } + return permissionGranted.value; + } + if (isSupported.value) { + if (requestPermissions) + ensurePermissions(); + useEventListener(navigator.mediaDevices, "devicechange", update); + update(); + } + return { + devices, + ensurePermissions, + permissionGranted, + videoInputs, + audioInputs, + audioOutputs, + isSupported + }; +} +function useDisplayMedia(options = {}) { + var _a; + const enabled = ref((_a = options.enabled) != null ? _a : false); + const video = options.video; + const audio = options.audio; + const { navigator = defaultNavigator } = options; + const isSupported = useSupported(() => { + var _a2; + return (_a2 = navigator == null ? void 0 : navigator.mediaDevices) == null ? void 0 : _a2.getDisplayMedia; + }); + const constraint = { audio, video }; + const stream = shallowRef(); + async function _start() { + var _a2; + if (!isSupported.value || stream.value) + return; + stream.value = await navigator.mediaDevices.getDisplayMedia(constraint); + (_a2 = stream.value) == null ? void 0 : _a2.getTracks().forEach((t) => t.addEventListener("ended", stop)); + return stream.value; + } + async function _stop() { + var _a2; + (_a2 = stream.value) == null ? void 0 : _a2.getTracks().forEach((t) => t.stop()); + stream.value = void 0; + } + function stop() { + _stop(); + enabled.value = false; + } + async function start() { + await _start(); + if (stream.value) + enabled.value = true; + return stream.value; + } + watch( + enabled, + (v) => { + if (v) + _start(); + else + _stop(); + }, + { immediate: true } + ); + return { + isSupported, + stream, + start, + stop, + enabled + }; +} +function useDocumentVisibility(options = {}) { + const { document: document2 = defaultDocument } = options; + if (!document2) + return ref("visible"); + const visibility = ref(document2.visibilityState); + useEventListener(document2, "visibilitychange", () => { + visibility.value = document2.visibilityState; + }); + return visibility; +} +function useDraggable(target, options = {}) { + var _a, _b; + const { + pointerTypes, + preventDefault: preventDefault2, + stopPropagation, + exact, + onMove, + onEnd, + onStart, + initialValue, + axis = "both", + draggingElement = defaultWindow, + containerElement, + handle: draggingHandle = target + } = options; + const position = ref( + (_a = toValue(initialValue)) != null ? _a : { x: 0, y: 0 } + ); + const pressedDelta = ref(); + const filterEvent = (e) => { + if (pointerTypes) + return pointerTypes.includes(e.pointerType); + return true; + }; + const handleEvent = (e) => { + if (toValue(preventDefault2)) + e.preventDefault(); + if (toValue(stopPropagation)) + e.stopPropagation(); + }; + const start = (e) => { + var _a2; + if (e.button !== 0) + return; + if (toValue(options.disabled) || !filterEvent(e)) + return; + if (toValue(exact) && e.target !== toValue(target)) + return; + const container = toValue(containerElement); + const containerRect = (_a2 = container == null ? void 0 : container.getBoundingClientRect) == null ? void 0 : _a2.call(container); + const targetRect = toValue(target).getBoundingClientRect(); + const pos = { + x: e.clientX - (container ? targetRect.left - containerRect.left + container.scrollLeft : targetRect.left), + y: e.clientY - (container ? targetRect.top - containerRect.top + container.scrollTop : targetRect.top) + }; + if ((onStart == null ? void 0 : onStart(pos, e)) === false) + return; + pressedDelta.value = pos; + handleEvent(e); + }; + const move = (e) => { + if (toValue(options.disabled) || !filterEvent(e)) + return; + if (!pressedDelta.value) + return; + const container = toValue(containerElement); + const targetRect = toValue(target).getBoundingClientRect(); + let { x, y } = position.value; + if (axis === "x" || axis === "both") { + x = e.clientX - pressedDelta.value.x; + if (container) + x = Math.min(Math.max(0, x), container.scrollWidth - targetRect.width); + } + if (axis === "y" || axis === "both") { + y = e.clientY - pressedDelta.value.y; + if (container) + y = Math.min(Math.max(0, y), container.scrollHeight - targetRect.height); + } + position.value = { + x, + y + }; + onMove == null ? void 0 : onMove(position.value, e); + handleEvent(e); + }; + const end = (e) => { + if (toValue(options.disabled) || !filterEvent(e)) + return; + if (!pressedDelta.value) + return; + pressedDelta.value = void 0; + onEnd == null ? void 0 : onEnd(position.value, e); + handleEvent(e); + }; + if (isClient) { + const config = { capture: (_b = options.capture) != null ? _b : true }; + useEventListener(draggingHandle, "pointerdown", start, config); + useEventListener(draggingElement, "pointermove", move, config); + useEventListener(draggingElement, "pointerup", end, config); + } + return { + ...toRefs2(position), + position, + isDragging: computed(() => !!pressedDelta.value), + style: computed( + () => `left:${position.value.x}px;top:${position.value.y}px;` + ) + }; +} +function useDropZone(target, options = {}) { + const isOverDropZone = ref(false); + const files = shallowRef(null); + let counter = 0; + let isDataTypeIncluded = true; + if (isClient) { + const _options = typeof options === "function" ? { onDrop: options } : options; + const getFiles = (event) => { + var _a, _b; + const list = Array.from((_b = (_a = event.dataTransfer) == null ? void 0 : _a.files) != null ? _b : []); + return files.value = list.length === 0 ? null : list; + }; + useEventListener(target, "dragenter", (event) => { + var _a, _b; + const types = Array.from(((_a = event == null ? void 0 : event.dataTransfer) == null ? void 0 : _a.items) || []).map((i) => i.kind === "file" ? i.type : null).filter(notNullish); + if (_options.dataTypes && event.dataTransfer) { + const dataTypes = unref(_options.dataTypes); + isDataTypeIncluded = typeof dataTypes === "function" ? dataTypes(types) : dataTypes ? dataTypes.some((item) => types.includes(item)) : true; + if (!isDataTypeIncluded) + return; + } + event.preventDefault(); + counter += 1; + isOverDropZone.value = true; + (_b = _options.onEnter) == null ? void 0 : _b.call(_options, getFiles(event), event); + }); + useEventListener(target, "dragover", (event) => { + var _a; + if (!isDataTypeIncluded) + return; + event.preventDefault(); + (_a = _options.onOver) == null ? void 0 : _a.call(_options, getFiles(event), event); + }); + useEventListener(target, "dragleave", (event) => { + var _a; + if (!isDataTypeIncluded) + return; + event.preventDefault(); + counter -= 1; + if (counter === 0) + isOverDropZone.value = false; + (_a = _options.onLeave) == null ? void 0 : _a.call(_options, getFiles(event), event); + }); + useEventListener(target, "drop", (event) => { + var _a; + event.preventDefault(); + counter = 0; + isOverDropZone.value = false; + (_a = _options.onDrop) == null ? void 0 : _a.call(_options, getFiles(event), event); + }); + } + return { + files, + isOverDropZone + }; +} +function useResizeObserver(target, callback, options = {}) { + const { window: window2 = defaultWindow, ...observerOptions } = options; + let observer; + const isSupported = useSupported(() => window2 && "ResizeObserver" in window2); + const cleanup = () => { + if (observer) { + observer.disconnect(); + observer = void 0; + } + }; + const targets = computed(() => Array.isArray(target) ? target.map((el) => unrefElement(el)) : [unrefElement(target)]); + const stopWatch = watch( + targets, + (els) => { + cleanup(); + if (isSupported.value && window2) { + observer = new ResizeObserver(callback); + for (const _el of els) + _el && observer.observe(_el, observerOptions); + } + }, + { immediate: true, flush: "post" } + ); + const stop = () => { + cleanup(); + stopWatch(); + }; + tryOnScopeDispose(stop); + return { + isSupported, + stop + }; +} +function useElementBounding(target, options = {}) { + const { + reset = true, + windowResize = true, + windowScroll = true, + immediate = true + } = options; + const height = ref(0); + const bottom = ref(0); + const left = ref(0); + const right = ref(0); + const top = ref(0); + const width = ref(0); + const x = ref(0); + const y = ref(0); + function update() { + const el = unrefElement(target); + if (!el) { + if (reset) { + height.value = 0; + bottom.value = 0; + left.value = 0; + right.value = 0; + top.value = 0; + width.value = 0; + x.value = 0; + y.value = 0; + } + return; + } + const rect = el.getBoundingClientRect(); + height.value = rect.height; + bottom.value = rect.bottom; + left.value = rect.left; + right.value = rect.right; + top.value = rect.top; + width.value = rect.width; + x.value = rect.x; + y.value = rect.y; + } + useResizeObserver(target, update); + watch(() => unrefElement(target), (ele) => !ele && update()); + useMutationObserver(target, update, { + attributeFilter: ["style", "class"] + }); + if (windowScroll) + useEventListener("scroll", update, { capture: true, passive: true }); + if (windowResize) + useEventListener("resize", update, { passive: true }); + tryOnMounted(() => { + if (immediate) + update(); + }); + return { + height, + bottom, + left, + right, + top, + width, + x, + y, + update + }; +} +function useElementByPoint(options) { + const { + x, + y, + document: document2 = defaultDocument, + multiple, + interval = "requestAnimationFrame", + immediate = true + } = options; + const isSupported = useSupported(() => { + if (toValue(multiple)) + return document2 && "elementsFromPoint" in document2; + return document2 && "elementFromPoint" in document2; + }); + const element = ref(null); + const cb = () => { + var _a, _b; + element.value = toValue(multiple) ? (_a = document2 == null ? void 0 : document2.elementsFromPoint(toValue(x), toValue(y))) != null ? _a : [] : (_b = document2 == null ? void 0 : document2.elementFromPoint(toValue(x), toValue(y))) != null ? _b : null; + }; + const controls = interval === "requestAnimationFrame" ? useRafFn(cb, { immediate }) : useIntervalFn(cb, interval, { immediate }); + return { + isSupported, + element, + ...controls + }; +} +function useElementHover(el, options = {}) { + const { + delayEnter = 0, + delayLeave = 0, + window: window2 = defaultWindow + } = options; + const isHovered = ref(false); + let timer; + const toggle = (entering) => { + const delay = entering ? delayEnter : delayLeave; + if (timer) { + clearTimeout(timer); + timer = void 0; + } + if (delay) + timer = setTimeout(() => isHovered.value = entering, delay); + else + isHovered.value = entering; + }; + if (!window2) + return isHovered; + useEventListener(el, "mouseenter", () => toggle(true), { passive: true }); + useEventListener(el, "mouseleave", () => toggle(false), { passive: true }); + return isHovered; +} +function useElementSize(target, initialSize = { width: 0, height: 0 }, options = {}) { + const { window: window2 = defaultWindow, box = "content-box" } = options; + const isSVG = computed(() => { + var _a, _b; + return (_b = (_a = unrefElement(target)) == null ? void 0 : _a.namespaceURI) == null ? void 0 : _b.includes("svg"); + }); + const width = ref(initialSize.width); + const height = ref(initialSize.height); + const { stop: stop1 } = useResizeObserver( + target, + ([entry]) => { + const boxSize = box === "border-box" ? entry.borderBoxSize : box === "content-box" ? entry.contentBoxSize : entry.devicePixelContentBoxSize; + if (window2 && isSVG.value) { + const $elem = unrefElement(target); + if ($elem) { + const rect = $elem.getBoundingClientRect(); + width.value = rect.width; + height.value = rect.height; + } + } else { + if (boxSize) { + const formatBoxSize = Array.isArray(boxSize) ? boxSize : [boxSize]; + width.value = formatBoxSize.reduce((acc, { inlineSize }) => acc + inlineSize, 0); + height.value = formatBoxSize.reduce((acc, { blockSize }) => acc + blockSize, 0); + } else { + width.value = entry.contentRect.width; + height.value = entry.contentRect.height; + } + } + }, + options + ); + tryOnMounted(() => { + const ele = unrefElement(target); + if (ele) { + width.value = "offsetWidth" in ele ? ele.offsetWidth : initialSize.width; + height.value = "offsetHeight" in ele ? ele.offsetHeight : initialSize.height; + } + }); + const stop2 = watch( + () => unrefElement(target), + (ele) => { + width.value = ele ? initialSize.width : 0; + height.value = ele ? initialSize.height : 0; + } + ); + function stop() { + stop1(); + stop2(); + } + return { + width, + height, + stop + }; +} +function useIntersectionObserver(target, callback, options = {}) { + const { + root, + rootMargin = "0px", + threshold = 0.1, + window: window2 = defaultWindow, + immediate = true + } = options; + const isSupported = useSupported(() => window2 && "IntersectionObserver" in window2); + const targets = computed(() => { + const _target = toValue(target); + return (Array.isArray(_target) ? _target : [_target]).map(unrefElement).filter(notNullish); + }); + let cleanup = noop; + const isActive = ref(immediate); + const stopWatch = isSupported.value ? watch( + () => [targets.value, unrefElement(root), isActive.value], + ([targets2, root2]) => { + cleanup(); + if (!isActive.value) + return; + if (!targets2.length) + return; + const observer = new IntersectionObserver( + callback, + { + root: unrefElement(root2), + rootMargin, + threshold + } + ); + targets2.forEach((el) => el && observer.observe(el)); + cleanup = () => { + observer.disconnect(); + cleanup = noop; + }; + }, + { immediate, flush: "post" } + ) : noop; + const stop = () => { + cleanup(); + stopWatch(); + isActive.value = false; + }; + tryOnScopeDispose(stop); + return { + isSupported, + isActive, + pause() { + cleanup(); + isActive.value = false; + }, + resume() { + isActive.value = true; + }, + stop + }; +} +function useElementVisibility(element, options = {}) { + const { window: window2 = defaultWindow, scrollTarget, threshold = 0 } = options; + const elementIsVisible = ref(false); + useIntersectionObserver( + element, + (intersectionObserverEntries) => { + let isIntersecting = elementIsVisible.value; + let latestTime = 0; + for (const entry of intersectionObserverEntries) { + if (entry.time >= latestTime) { + latestTime = entry.time; + isIntersecting = entry.isIntersecting; + } + } + elementIsVisible.value = isIntersecting; + }, + { + root: scrollTarget, + window: window2, + threshold + } + ); + return elementIsVisible; +} +var events = /* @__PURE__ */ new Map(); +function useEventBus(key) { + const scope = getCurrentScope(); + function on(listener) { + var _a; + const listeners = events.get(key) || /* @__PURE__ */ new Set(); + listeners.add(listener); + events.set(key, listeners); + const _off = () => off(listener); + (_a = scope == null ? void 0 : scope.cleanups) == null ? void 0 : _a.push(_off); + return _off; + } + function once(listener) { + function _listener(...args) { + off(_listener); + listener(...args); + } + return on(_listener); + } + function off(listener) { + const listeners = events.get(key); + if (!listeners) + return; + listeners.delete(listener); + if (!listeners.size) + reset(); + } + function reset() { + events.delete(key); + } + function emit(event, payload) { + var _a; + (_a = events.get(key)) == null ? void 0 : _a.forEach((v) => v(event, payload)); + } + return { on, once, off, emit, reset }; +} +function resolveNestedOptions$1(options) { + if (options === true) + return {}; + return options; +} +function useEventSource(url, events2 = [], options = {}) { + const event = ref(null); + const data = ref(null); + const status = ref("CONNECTING"); + const eventSource = ref(null); + const error = shallowRef(null); + const urlRef = toRef2(url); + const lastEventId = shallowRef(null); + let explicitlyClosed = false; + let retried = 0; + const { + withCredentials = false, + immediate = true + } = options; + const close = () => { + if (isClient && eventSource.value) { + eventSource.value.close(); + eventSource.value = null; + status.value = "CLOSED"; + explicitlyClosed = true; + } + }; + const _init = () => { + if (explicitlyClosed || typeof urlRef.value === "undefined") + return; + const es = new EventSource(urlRef.value, { withCredentials }); + status.value = "CONNECTING"; + eventSource.value = es; + es.onopen = () => { + status.value = "OPEN"; + error.value = null; + }; + es.onerror = (e) => { + status.value = "CLOSED"; + error.value = e; + if (es.readyState === 2 && !explicitlyClosed && options.autoReconnect) { + es.close(); + const { + retries = -1, + delay = 1e3, + onFailed + } = resolveNestedOptions$1(options.autoReconnect); + retried += 1; + if (typeof retries === "number" && (retries < 0 || retried < retries)) + setTimeout(_init, delay); + else if (typeof retries === "function" && retries()) + setTimeout(_init, delay); + else + onFailed == null ? void 0 : onFailed(); + } + }; + es.onmessage = (e) => { + event.value = null; + data.value = e.data; + lastEventId.value = e.lastEventId; + }; + for (const event_name of events2) { + useEventListener(es, event_name, (e) => { + event.value = event_name; + data.value = e.data || null; + }); + } + }; + const open = () => { + if (!isClient) + return; + close(); + explicitlyClosed = false; + retried = 0; + _init(); + }; + if (immediate) + watch(urlRef, open, { immediate: true }); + tryOnScopeDispose(close); + return { + eventSource, + event, + data, + status, + error, + open, + close, + lastEventId + }; +} +function useEyeDropper(options = {}) { + const { initialValue = "" } = options; + const isSupported = useSupported(() => typeof window !== "undefined" && "EyeDropper" in window); + const sRGBHex = ref(initialValue); + async function open(openOptions) { + if (!isSupported.value) + return; + const eyeDropper = new window.EyeDropper(); + const result = await eyeDropper.open(openOptions); + sRGBHex.value = result.sRGBHex; + return result; + } + return { isSupported, sRGBHex, open }; +} +function useFavicon(newIcon = null, options = {}) { + const { + baseUrl = "", + rel = "icon", + document: document2 = defaultDocument + } = options; + const favicon = toRef2(newIcon); + const applyIcon = (icon) => { + const elements = document2 == null ? void 0 : document2.head.querySelectorAll(`link[rel*="${rel}"]`); + if (!elements || elements.length === 0) { + const link = document2 == null ? void 0 : document2.createElement("link"); + if (link) { + link.rel = rel; + link.href = `${baseUrl}${icon}`; + link.type = `image/${icon.split(".").pop()}`; + document2 == null ? void 0 : document2.head.append(link); + } + return; + } + elements == null ? void 0 : elements.forEach((el) => el.href = `${baseUrl}${icon}`); + }; + watch( + favicon, + (i, o) => { + if (typeof i === "string" && i !== o) + applyIcon(i); + }, + { immediate: true } + ); + return favicon; +} +var payloadMapping = { + json: "application/json", + text: "text/plain" +}; +function isFetchOptions(obj) { + return obj && containsProp(obj, "immediate", "refetch", "initialData", "timeout", "beforeFetch", "afterFetch", "onFetchError", "fetch", "updateDataOnError"); +} +var reAbsolute = /^(?:[a-z][a-z\d+\-.]*:)?\/\//i; +function isAbsoluteURL(url) { + return reAbsolute.test(url); +} +function headersToObject(headers) { + if (typeof Headers !== "undefined" && headers instanceof Headers) + return Object.fromEntries(headers.entries()); + return headers; +} +function combineCallbacks(combination, ...callbacks) { + if (combination === "overwrite") { + return async (ctx) => { + const callback = callbacks[callbacks.length - 1]; + if (callback) + return { ...ctx, ...await callback(ctx) }; + return ctx; + }; + } else { + return async (ctx) => { + for (const callback of callbacks) { + if (callback) + ctx = { ...ctx, ...await callback(ctx) }; + } + return ctx; + }; + } +} +function createFetch(config = {}) { + const _combination = config.combination || "chain"; + const _options = config.options || {}; + const _fetchOptions = config.fetchOptions || {}; + function useFactoryFetch(url, ...args) { + const computedUrl = computed(() => { + const baseUrl = toValue(config.baseUrl); + const targetUrl = toValue(url); + return baseUrl && !isAbsoluteURL(targetUrl) ? joinPaths(baseUrl, targetUrl) : targetUrl; + }); + let options = _options; + let fetchOptions = _fetchOptions; + if (args.length > 0) { + if (isFetchOptions(args[0])) { + options = { + ...options, + ...args[0], + beforeFetch: combineCallbacks(_combination, _options.beforeFetch, args[0].beforeFetch), + afterFetch: combineCallbacks(_combination, _options.afterFetch, args[0].afterFetch), + onFetchError: combineCallbacks(_combination, _options.onFetchError, args[0].onFetchError) + }; + } else { + fetchOptions = { + ...fetchOptions, + ...args[0], + headers: { + ...headersToObject(fetchOptions.headers) || {}, + ...headersToObject(args[0].headers) || {} + } + }; + } + } + if (args.length > 1 && isFetchOptions(args[1])) { + options = { + ...options, + ...args[1], + beforeFetch: combineCallbacks(_combination, _options.beforeFetch, args[1].beforeFetch), + afterFetch: combineCallbacks(_combination, _options.afterFetch, args[1].afterFetch), + onFetchError: combineCallbacks(_combination, _options.onFetchError, args[1].onFetchError) + }; + } + return useFetch(computedUrl, fetchOptions, options); + } + return useFactoryFetch; +} +function useFetch(url, ...args) { + var _a; + const supportsAbort = typeof AbortController === "function"; + let fetchOptions = {}; + let options = { + immediate: true, + refetch: false, + timeout: 0, + updateDataOnError: false + }; + const config = { + method: "GET", + type: "text", + payload: void 0 + }; + if (args.length > 0) { + if (isFetchOptions(args[0])) + options = { ...options, ...args[0] }; + else + fetchOptions = args[0]; + } + if (args.length > 1) { + if (isFetchOptions(args[1])) + options = { ...options, ...args[1] }; + } + const { + fetch = (_a = defaultWindow) == null ? void 0 : _a.fetch, + initialData, + timeout + } = options; + const responseEvent = createEventHook(); + const errorEvent = createEventHook(); + const finallyEvent = createEventHook(); + const isFinished = ref(false); + const isFetching = ref(false); + const aborted = ref(false); + const statusCode = ref(null); + const response = shallowRef(null); + const error = shallowRef(null); + const data = shallowRef(initialData || null); + const canAbort = computed(() => supportsAbort && isFetching.value); + let controller; + let timer; + const abort = () => { + if (supportsAbort) { + controller == null ? void 0 : controller.abort(); + controller = new AbortController(); + controller.signal.onabort = () => aborted.value = true; + fetchOptions = { + ...fetchOptions, + signal: controller.signal + }; + } + }; + const loading = (isLoading) => { + isFetching.value = isLoading; + isFinished.value = !isLoading; + }; + if (timeout) + timer = useTimeoutFn(abort, timeout, { immediate: false }); + let executeCounter = 0; + const execute = async (throwOnFailed = false) => { + var _a2, _b; + abort(); + loading(true); + error.value = null; + statusCode.value = null; + aborted.value = false; + executeCounter += 1; + const currentExecuteCounter = executeCounter; + const defaultFetchOptions = { + method: config.method, + headers: {} + }; + if (config.payload) { + const headers = headersToObject(defaultFetchOptions.headers); + const payload = toValue(config.payload); + if (!config.payloadType && payload && Object.getPrototypeOf(payload) === Object.prototype && !(payload instanceof FormData)) + config.payloadType = "json"; + if (config.payloadType) + headers["Content-Type"] = (_a2 = payloadMapping[config.payloadType]) != null ? _a2 : config.payloadType; + defaultFetchOptions.body = config.payloadType === "json" ? JSON.stringify(payload) : payload; + } + let isCanceled = false; + const context = { + url: toValue(url), + options: { + ...defaultFetchOptions, + ...fetchOptions + }, + cancel: () => { + isCanceled = true; + } + }; + if (options.beforeFetch) + Object.assign(context, await options.beforeFetch(context)); + if (isCanceled || !fetch) { + loading(false); + return Promise.resolve(null); + } + let responseData = null; + if (timer) + timer.start(); + return fetch( + context.url, + { + ...defaultFetchOptions, + ...context.options, + headers: { + ...headersToObject(defaultFetchOptions.headers), + ...headersToObject((_b = context.options) == null ? void 0 : _b.headers) + } + } + ).then(async (fetchResponse) => { + response.value = fetchResponse; + statusCode.value = fetchResponse.status; + responseData = await fetchResponse.clone()[config.type](); + if (!fetchResponse.ok) { + data.value = initialData || null; + throw new Error(fetchResponse.statusText); + } + if (options.afterFetch) { + ({ data: responseData } = await options.afterFetch({ + data: responseData, + response: fetchResponse + })); + } + data.value = responseData; + responseEvent.trigger(fetchResponse); + return fetchResponse; + }).catch(async (fetchError) => { + let errorData = fetchError.message || fetchError.name; + if (options.onFetchError) { + ({ error: errorData, data: responseData } = await options.onFetchError({ + data: responseData, + error: fetchError, + response: response.value + })); + } + error.value = errorData; + if (options.updateDataOnError) + data.value = responseData; + errorEvent.trigger(fetchError); + if (throwOnFailed) + throw fetchError; + return null; + }).finally(() => { + if (currentExecuteCounter === executeCounter) + loading(false); + if (timer) + timer.stop(); + finallyEvent.trigger(null); + }); + }; + const refetch = toRef2(options.refetch); + watch( + [ + refetch, + toRef2(url) + ], + ([refetch2]) => refetch2 && execute(), + { deep: true } + ); + const shell = { + isFinished: readonly(isFinished), + isFetching: readonly(isFetching), + statusCode, + response, + error, + data, + canAbort, + aborted, + abort, + execute, + onFetchResponse: responseEvent.on, + onFetchError: errorEvent.on, + onFetchFinally: finallyEvent.on, + // method + get: setMethod("GET"), + put: setMethod("PUT"), + post: setMethod("POST"), + delete: setMethod("DELETE"), + patch: setMethod("PATCH"), + head: setMethod("HEAD"), + options: setMethod("OPTIONS"), + // type + json: setType("json"), + text: setType("text"), + blob: setType("blob"), + arrayBuffer: setType("arrayBuffer"), + formData: setType("formData") + }; + function setMethod(method) { + return (payload, payloadType) => { + if (!isFetching.value) { + config.method = method; + config.payload = payload; + config.payloadType = payloadType; + if (isRef(config.payload)) { + watch( + [ + refetch, + toRef2(config.payload) + ], + ([refetch2]) => refetch2 && execute(), + { deep: true } + ); + } + return { + ...shell, + then(onFulfilled, onRejected) { + return waitUntilFinished().then(onFulfilled, onRejected); + } + }; + } + return void 0; + }; + } + function waitUntilFinished() { + return new Promise((resolve, reject) => { + until(isFinished).toBe(true).then(() => resolve(shell)).catch((error2) => reject(error2)); + }); + } + function setType(type) { + return () => { + if (!isFetching.value) { + config.type = type; + return { + ...shell, + then(onFulfilled, onRejected) { + return waitUntilFinished().then(onFulfilled, onRejected); + } + }; + } + return void 0; + }; + } + if (options.immediate) + Promise.resolve().then(() => execute()); + return { + ...shell, + then(onFulfilled, onRejected) { + return waitUntilFinished().then(onFulfilled, onRejected); + } + }; +} +function joinPaths(start, end) { + if (!start.endsWith("/") && !end.startsWith("/")) + return `${start}/${end}`; + return `${start}${end}`; +} +var DEFAULT_OPTIONS = { + multiple: true, + accept: "*", + reset: false, + directory: false +}; +function useFileDialog(options = {}) { + const { + document: document2 = defaultDocument + } = options; + const files = ref(null); + const { on: onChange, trigger } = createEventHook(); + let input; + if (document2) { + input = document2.createElement("input"); + input.type = "file"; + input.onchange = (event) => { + const result = event.target; + files.value = result.files; + trigger(files.value); + }; + } + const reset = () => { + files.value = null; + if (input && input.value) { + input.value = ""; + trigger(null); + } + }; + const open = (localOptions) => { + if (!input) + return; + const _options = { + ...DEFAULT_OPTIONS, + ...options, + ...localOptions + }; + input.multiple = _options.multiple; + input.accept = _options.accept; + input.webkitdirectory = _options.directory; + if (hasOwn(_options, "capture")) + input.capture = _options.capture; + if (_options.reset) + reset(); + input.click(); + }; + return { + files: readonly(files), + open, + reset, + onChange + }; +} +function useFileSystemAccess(options = {}) { + const { + window: _window = defaultWindow, + dataType = "Text" + } = options; + const window2 = _window; + const isSupported = useSupported(() => window2 && "showSaveFilePicker" in window2 && "showOpenFilePicker" in window2); + const fileHandle = ref(); + const data = ref(); + const file = ref(); + const fileName = computed(() => { + var _a, _b; + return (_b = (_a = file.value) == null ? void 0 : _a.name) != null ? _b : ""; + }); + const fileMIME = computed(() => { + var _a, _b; + return (_b = (_a = file.value) == null ? void 0 : _a.type) != null ? _b : ""; + }); + const fileSize = computed(() => { + var _a, _b; + return (_b = (_a = file.value) == null ? void 0 : _a.size) != null ? _b : 0; + }); + const fileLastModified = computed(() => { + var _a, _b; + return (_b = (_a = file.value) == null ? void 0 : _a.lastModified) != null ? _b : 0; + }); + async function open(_options = {}) { + if (!isSupported.value) + return; + const [handle] = await window2.showOpenFilePicker({ ...toValue(options), ..._options }); + fileHandle.value = handle; + await updateData(); + } + async function create(_options = {}) { + if (!isSupported.value) + return; + fileHandle.value = await window2.showSaveFilePicker({ ...options, ..._options }); + data.value = void 0; + await updateData(); + } + async function save(_options = {}) { + if (!isSupported.value) + return; + if (!fileHandle.value) + return saveAs(_options); + if (data.value) { + const writableStream = await fileHandle.value.createWritable(); + await writableStream.write(data.value); + await writableStream.close(); + } + await updateFile(); + } + async function saveAs(_options = {}) { + if (!isSupported.value) + return; + fileHandle.value = await window2.showSaveFilePicker({ ...options, ..._options }); + if (data.value) { + const writableStream = await fileHandle.value.createWritable(); + await writableStream.write(data.value); + await writableStream.close(); + } + await updateFile(); + } + async function updateFile() { + var _a; + file.value = await ((_a = fileHandle.value) == null ? void 0 : _a.getFile()); + } + async function updateData() { + var _a, _b; + await updateFile(); + const type = toValue(dataType); + if (type === "Text") + data.value = await ((_a = file.value) == null ? void 0 : _a.text()); + else if (type === "ArrayBuffer") + data.value = await ((_b = file.value) == null ? void 0 : _b.arrayBuffer()); + else if (type === "Blob") + data.value = file.value; + } + watch(() => toValue(dataType), updateData); + return { + isSupported, + data, + file, + fileName, + fileMIME, + fileSize, + fileLastModified, + open, + create, + save, + saveAs, + updateData + }; +} +function useFocus(target, options = {}) { + const { initialValue = false, focusVisible = false, preventScroll = false } = options; + const innerFocused = ref(false); + const targetElement = computed(() => unrefElement(target)); + useEventListener(targetElement, "focus", (event) => { + var _a, _b; + if (!focusVisible || ((_b = (_a = event.target).matches) == null ? void 0 : _b.call(_a, ":focus-visible"))) + innerFocused.value = true; + }); + useEventListener(targetElement, "blur", () => innerFocused.value = false); + const focused = computed({ + get: () => innerFocused.value, + set(value) { + var _a, _b; + if (!value && innerFocused.value) + (_a = targetElement.value) == null ? void 0 : _a.blur(); + else if (value && !innerFocused.value) + (_b = targetElement.value) == null ? void 0 : _b.focus({ preventScroll }); + } + }); + watch( + targetElement, + () => { + focused.value = initialValue; + }, + { immediate: true, flush: "post" } + ); + return { focused }; +} +function useFocusWithin(target, options = {}) { + const activeElement = useActiveElement(options); + const targetElement = computed(() => unrefElement(target)); + const focused = computed(() => targetElement.value && activeElement.value ? targetElement.value.contains(activeElement.value) : false); + return { focused }; +} +function useFps(options) { + var _a; + const fps = ref(0); + if (typeof performance === "undefined") + return fps; + const every = (_a = options == null ? void 0 : options.every) != null ? _a : 10; + let last = performance.now(); + let ticks = 0; + useRafFn(() => { + ticks += 1; + if (ticks >= every) { + const now2 = performance.now(); + const diff = now2 - last; + fps.value = Math.round(1e3 / (diff / ticks)); + last = now2; + ticks = 0; + } + }); + return fps; +} +var eventHandlers = [ + "fullscreenchange", + "webkitfullscreenchange", + "webkitendfullscreen", + "mozfullscreenchange", + "MSFullscreenChange" +]; +function useFullscreen(target, options = {}) { + const { + document: document2 = defaultDocument, + autoExit = false + } = options; + const targetRef = computed(() => { + var _a; + return (_a = unrefElement(target)) != null ? _a : document2 == null ? void 0 : document2.querySelector("html"); + }); + const isFullscreen = ref(false); + const requestMethod = computed(() => { + return [ + "requestFullscreen", + "webkitRequestFullscreen", + "webkitEnterFullscreen", + "webkitEnterFullScreen", + "webkitRequestFullScreen", + "mozRequestFullScreen", + "msRequestFullscreen" + ].find((m) => document2 && m in document2 || targetRef.value && m in targetRef.value); + }); + const exitMethod = computed(() => { + return [ + "exitFullscreen", + "webkitExitFullscreen", + "webkitExitFullScreen", + "webkitCancelFullScreen", + "mozCancelFullScreen", + "msExitFullscreen" + ].find((m) => document2 && m in document2 || targetRef.value && m in targetRef.value); + }); + const fullscreenEnabled = computed(() => { + return [ + "fullScreen", + "webkitIsFullScreen", + "webkitDisplayingFullscreen", + "mozFullScreen", + "msFullscreenElement" + ].find((m) => document2 && m in document2 || targetRef.value && m in targetRef.value); + }); + const fullscreenElementMethod = [ + "fullscreenElement", + "webkitFullscreenElement", + "mozFullScreenElement", + "msFullscreenElement" + ].find((m) => document2 && m in document2); + const isSupported = useSupported(() => targetRef.value && document2 && requestMethod.value !== void 0 && exitMethod.value !== void 0 && fullscreenEnabled.value !== void 0); + const isCurrentElementFullScreen = () => { + if (fullscreenElementMethod) + return (document2 == null ? void 0 : document2[fullscreenElementMethod]) === targetRef.value; + return false; + }; + const isElementFullScreen = () => { + if (fullscreenEnabled.value) { + if (document2 && document2[fullscreenEnabled.value] != null) { + return document2[fullscreenEnabled.value]; + } else { + const target2 = targetRef.value; + if ((target2 == null ? void 0 : target2[fullscreenEnabled.value]) != null) { + return Boolean(target2[fullscreenEnabled.value]); + } + } + } + return false; + }; + async function exit() { + if (!isSupported.value || !isFullscreen.value) + return; + if (exitMethod.value) { + if ((document2 == null ? void 0 : document2[exitMethod.value]) != null) { + await document2[exitMethod.value](); + } else { + const target2 = targetRef.value; + if ((target2 == null ? void 0 : target2[exitMethod.value]) != null) + await target2[exitMethod.value](); + } + } + isFullscreen.value = false; + } + async function enter() { + if (!isSupported.value || isFullscreen.value) + return; + if (isElementFullScreen()) + await exit(); + const target2 = targetRef.value; + if (requestMethod.value && (target2 == null ? void 0 : target2[requestMethod.value]) != null) { + await target2[requestMethod.value](); + isFullscreen.value = true; + } + } + async function toggle() { + await (isFullscreen.value ? exit() : enter()); + } + const handlerCallback = () => { + const isElementFullScreenValue = isElementFullScreen(); + if (!isElementFullScreenValue || isElementFullScreenValue && isCurrentElementFullScreen()) + isFullscreen.value = isElementFullScreenValue; + }; + useEventListener(document2, eventHandlers, handlerCallback, false); + useEventListener(() => unrefElement(targetRef), eventHandlers, handlerCallback, false); + if (autoExit) + tryOnScopeDispose(exit); + return { + isSupported, + isFullscreen, + enter, + exit, + toggle + }; +} +function mapGamepadToXbox360Controller(gamepad) { + return computed(() => { + if (gamepad.value) { + return { + buttons: { + a: gamepad.value.buttons[0], + b: gamepad.value.buttons[1], + x: gamepad.value.buttons[2], + y: gamepad.value.buttons[3] + }, + bumper: { + left: gamepad.value.buttons[4], + right: gamepad.value.buttons[5] + }, + triggers: { + left: gamepad.value.buttons[6], + right: gamepad.value.buttons[7] + }, + stick: { + left: { + horizontal: gamepad.value.axes[0], + vertical: gamepad.value.axes[1], + button: gamepad.value.buttons[10] + }, + right: { + horizontal: gamepad.value.axes[2], + vertical: gamepad.value.axes[3], + button: gamepad.value.buttons[11] + } + }, + dpad: { + up: gamepad.value.buttons[12], + down: gamepad.value.buttons[13], + left: gamepad.value.buttons[14], + right: gamepad.value.buttons[15] + }, + back: gamepad.value.buttons[8], + start: gamepad.value.buttons[9] + }; + } + return null; + }); +} +function useGamepad(options = {}) { + const { + navigator = defaultNavigator + } = options; + const isSupported = useSupported(() => navigator && "getGamepads" in navigator); + const gamepads = ref([]); + const onConnectedHook = createEventHook(); + const onDisconnectedHook = createEventHook(); + const stateFromGamepad = (gamepad) => { + const hapticActuators = []; + const vibrationActuator = "vibrationActuator" in gamepad ? gamepad.vibrationActuator : null; + if (vibrationActuator) + hapticActuators.push(vibrationActuator); + if (gamepad.hapticActuators) + hapticActuators.push(...gamepad.hapticActuators); + return { + id: gamepad.id, + index: gamepad.index, + connected: gamepad.connected, + mapping: gamepad.mapping, + timestamp: gamepad.timestamp, + vibrationActuator: gamepad.vibrationActuator, + hapticActuators, + axes: gamepad.axes.map((axes) => axes), + buttons: gamepad.buttons.map((button) => ({ pressed: button.pressed, touched: button.touched, value: button.value })) + }; + }; + const updateGamepadState = () => { + const _gamepads = (navigator == null ? void 0 : navigator.getGamepads()) || []; + for (const gamepad of _gamepads) { + if (gamepad && gamepads.value[gamepad.index]) + gamepads.value[gamepad.index] = stateFromGamepad(gamepad); + } + }; + const { isActive, pause, resume } = useRafFn(updateGamepadState); + const onGamepadConnected = (gamepad) => { + if (!gamepads.value.some(({ index }) => index === gamepad.index)) { + gamepads.value.push(stateFromGamepad(gamepad)); + onConnectedHook.trigger(gamepad.index); + } + resume(); + }; + const onGamepadDisconnected = (gamepad) => { + gamepads.value = gamepads.value.filter((x) => x.index !== gamepad.index); + onDisconnectedHook.trigger(gamepad.index); + }; + useEventListener("gamepadconnected", (e) => onGamepadConnected(e.gamepad)); + useEventListener("gamepaddisconnected", (e) => onGamepadDisconnected(e.gamepad)); + tryOnMounted(() => { + const _gamepads = (navigator == null ? void 0 : navigator.getGamepads()) || []; + for (const gamepad of _gamepads) { + if (gamepad && gamepads.value[gamepad.index]) + onGamepadConnected(gamepad); + } + }); + pause(); + return { + isSupported, + onConnected: onConnectedHook.on, + onDisconnected: onDisconnectedHook.on, + gamepads, + pause, + resume, + isActive + }; +} +function useGeolocation(options = {}) { + const { + enableHighAccuracy = true, + maximumAge = 3e4, + timeout = 27e3, + navigator = defaultNavigator, + immediate = true + } = options; + const isSupported = useSupported(() => navigator && "geolocation" in navigator); + const locatedAt = ref(null); + const error = shallowRef(null); + const coords = ref({ + accuracy: 0, + latitude: Number.POSITIVE_INFINITY, + longitude: Number.POSITIVE_INFINITY, + altitude: null, + altitudeAccuracy: null, + heading: null, + speed: null + }); + function updatePosition(position) { + locatedAt.value = position.timestamp; + coords.value = position.coords; + error.value = null; + } + let watcher; + function resume() { + if (isSupported.value) { + watcher = navigator.geolocation.watchPosition( + updatePosition, + (err) => error.value = err, + { + enableHighAccuracy, + maximumAge, + timeout + } + ); + } + } + if (immediate) + resume(); + function pause() { + if (watcher && navigator) + navigator.geolocation.clearWatch(watcher); + } + tryOnScopeDispose(() => { + pause(); + }); + return { + isSupported, + coords, + locatedAt, + error, + resume, + pause + }; +} +var defaultEvents$1 = ["mousemove", "mousedown", "resize", "keydown", "touchstart", "wheel"]; +var oneMinute = 6e4; +function useIdle(timeout = oneMinute, options = {}) { + const { + initialState = false, + listenForVisibilityChange = true, + events: events2 = defaultEvents$1, + window: window2 = defaultWindow, + eventFilter = throttleFilter(50) + } = options; + const idle = ref(initialState); + const lastActive = ref(timestamp()); + let timer; + const reset = () => { + idle.value = false; + clearTimeout(timer); + timer = setTimeout(() => idle.value = true, timeout); + }; + const onEvent = createFilterWrapper( + eventFilter, + () => { + lastActive.value = timestamp(); + reset(); + } + ); + if (window2) { + const document2 = window2.document; + for (const event of events2) + useEventListener(window2, event, onEvent, { passive: true }); + if (listenForVisibilityChange) { + useEventListener(document2, "visibilitychange", () => { + if (!document2.hidden) + onEvent(); + }); + } + reset(); + } + return { + idle, + lastActive, + reset + }; +} +async function loadImage(options) { + return new Promise((resolve, reject) => { + const img = new Image(); + const { src, srcset, sizes, class: clazz, loading, crossorigin, referrerPolicy } = options; + img.src = src; + if (srcset) + img.srcset = srcset; + if (sizes) + img.sizes = sizes; + if (clazz) + img.className = clazz; + if (loading) + img.loading = loading; + if (crossorigin) + img.crossOrigin = crossorigin; + if (referrerPolicy) + img.referrerPolicy = referrerPolicy; + img.onload = () => resolve(img); + img.onerror = reject; + }); +} +function useImage(options, asyncStateOptions = {}) { + const state = useAsyncState( + () => loadImage(toValue(options)), + void 0, + { + resetOnExecute: true, + ...asyncStateOptions + } + ); + watch( + () => toValue(options), + () => state.execute(asyncStateOptions.delay), + { deep: true } + ); + return state; +} +var ARRIVED_STATE_THRESHOLD_PIXELS = 1; +function useScroll(element, options = {}) { + const { + throttle = 0, + idle = 200, + onStop = noop, + onScroll = noop, + offset = { + left: 0, + right: 0, + top: 0, + bottom: 0 + }, + eventListenerOptions = { + capture: false, + passive: true + }, + behavior = "auto", + window: window2 = defaultWindow, + onError = (e) => { + console.error(e); + } + } = options; + const internalX = ref(0); + const internalY = ref(0); + const x = computed({ + get() { + return internalX.value; + }, + set(x2) { + scrollTo2(x2, void 0); + } + }); + const y = computed({ + get() { + return internalY.value; + }, + set(y2) { + scrollTo2(void 0, y2); + } + }); + function scrollTo2(_x, _y) { + var _a, _b, _c, _d; + if (!window2) + return; + const _element = toValue(element); + if (!_element) + return; + (_c = _element instanceof Document ? window2.document.body : _element) == null ? void 0 : _c.scrollTo({ + top: (_a = toValue(_y)) != null ? _a : y.value, + left: (_b = toValue(_x)) != null ? _b : x.value, + behavior: toValue(behavior) + }); + const scrollContainer = ((_d = _element == null ? void 0 : _element.document) == null ? void 0 : _d.documentElement) || (_element == null ? void 0 : _element.documentElement) || _element; + if (x != null) + internalX.value = scrollContainer.scrollLeft; + if (y != null) + internalY.value = scrollContainer.scrollTop; + } + const isScrolling = ref(false); + const arrivedState = reactive({ + left: true, + right: false, + top: true, + bottom: false + }); + const directions = reactive({ + left: false, + right: false, + top: false, + bottom: false + }); + const onScrollEnd = (e) => { + if (!isScrolling.value) + return; + isScrolling.value = false; + directions.left = false; + directions.right = false; + directions.top = false; + directions.bottom = false; + onStop(e); + }; + const onScrollEndDebounced = useDebounceFn(onScrollEnd, throttle + idle); + const setArrivedState = (target) => { + var _a; + if (!window2) + return; + const el = ((_a = target == null ? void 0 : target.document) == null ? void 0 : _a.documentElement) || (target == null ? void 0 : target.documentElement) || unrefElement(target); + const { display, flexDirection } = getComputedStyle(el); + const scrollLeft = el.scrollLeft; + directions.left = scrollLeft < internalX.value; + directions.right = scrollLeft > internalX.value; + const left = Math.abs(scrollLeft) <= (offset.left || 0); + const right = Math.abs(scrollLeft) + el.clientWidth >= el.scrollWidth - (offset.right || 0) - ARRIVED_STATE_THRESHOLD_PIXELS; + if (display === "flex" && flexDirection === "row-reverse") { + arrivedState.left = right; + arrivedState.right = left; + } else { + arrivedState.left = left; + arrivedState.right = right; + } + internalX.value = scrollLeft; + let scrollTop = el.scrollTop; + if (target === window2.document && !scrollTop) + scrollTop = window2.document.body.scrollTop; + directions.top = scrollTop < internalY.value; + directions.bottom = scrollTop > internalY.value; + const top = Math.abs(scrollTop) <= (offset.top || 0); + const bottom = Math.abs(scrollTop) + el.clientHeight >= el.scrollHeight - (offset.bottom || 0) - ARRIVED_STATE_THRESHOLD_PIXELS; + if (display === "flex" && flexDirection === "column-reverse") { + arrivedState.top = bottom; + arrivedState.bottom = top; + } else { + arrivedState.top = top; + arrivedState.bottom = bottom; + } + internalY.value = scrollTop; + }; + const onScrollHandler = (e) => { + var _a; + if (!window2) + return; + const eventTarget = (_a = e.target.documentElement) != null ? _a : e.target; + setArrivedState(eventTarget); + isScrolling.value = true; + onScrollEndDebounced(e); + onScroll(e); + }; + useEventListener( + element, + "scroll", + throttle ? useThrottleFn(onScrollHandler, throttle, true, false) : onScrollHandler, + eventListenerOptions + ); + tryOnMounted(() => { + try { + const _element = toValue(element); + if (!_element) + return; + setArrivedState(_element); + } catch (e) { + onError(e); + } + }); + useEventListener( + element, + "scrollend", + onScrollEnd, + eventListenerOptions + ); + return { + x, + y, + isScrolling, + arrivedState, + directions, + measure() { + const _element = toValue(element); + if (window2 && _element) + setArrivedState(_element); + } + }; +} +function resolveElement(el) { + if (typeof Window !== "undefined" && el instanceof Window) + return el.document.documentElement; + if (typeof Document !== "undefined" && el instanceof Document) + return el.documentElement; + return el; +} +function useInfiniteScroll(element, onLoadMore, options = {}) { + var _a; + const { + direction = "bottom", + interval = 100, + canLoadMore = () => true + } = options; + const state = reactive(useScroll( + element, + { + ...options, + offset: { + [direction]: (_a = options.distance) != null ? _a : 0, + ...options.offset + } + } + )); + const promise = ref(); + const isLoading = computed(() => !!promise.value); + const observedElement = computed(() => { + return resolveElement(toValue(element)); + }); + const isElementVisible = useElementVisibility(observedElement); + function checkAndLoad() { + state.measure(); + if (!observedElement.value || !isElementVisible.value || !canLoadMore(observedElement.value)) + return; + const { scrollHeight, clientHeight, scrollWidth, clientWidth } = observedElement.value; + const isNarrower = direction === "bottom" || direction === "top" ? scrollHeight <= clientHeight : scrollWidth <= clientWidth; + if (state.arrivedState[direction] || isNarrower) { + if (!promise.value) { + promise.value = Promise.all([ + onLoadMore(state), + new Promise((resolve) => setTimeout(resolve, interval)) + ]).finally(() => { + promise.value = null; + nextTick(() => checkAndLoad()); + }); + } + } + } + watch( + () => [state.arrivedState[direction], isElementVisible.value], + checkAndLoad, + { immediate: true } + ); + return { + isLoading + }; +} +var defaultEvents = ["mousedown", "mouseup", "keydown", "keyup"]; +function useKeyModifier(modifier, options = {}) { + const { + events: events2 = defaultEvents, + document: document2 = defaultDocument, + initial = null + } = options; + const state = ref(initial); + if (document2) { + events2.forEach((listenerEvent) => { + useEventListener(document2, listenerEvent, (evt) => { + if (typeof evt.getModifierState === "function") + state.value = evt.getModifierState(modifier); + }); + }); + } + return state; +} +function useLocalStorage(key, initialValue, options = {}) { + const { window: window2 = defaultWindow } = options; + return useStorage(key, initialValue, window2 == null ? void 0 : window2.localStorage, options); +} +var DefaultMagicKeysAliasMap = { + ctrl: "control", + command: "meta", + cmd: "meta", + option: "alt", + up: "arrowup", + down: "arrowdown", + left: "arrowleft", + right: "arrowright" +}; +function useMagicKeys(options = {}) { + const { + reactive: useReactive = false, + target = defaultWindow, + aliasMap = DefaultMagicKeysAliasMap, + passive = true, + onEventFired = noop + } = options; + const current = reactive(/* @__PURE__ */ new Set()); + const obj = { + toJSON() { + return {}; + }, + current + }; + const refs = useReactive ? reactive(obj) : obj; + const metaDeps = /* @__PURE__ */ new Set(); + const usedKeys = /* @__PURE__ */ new Set(); + function setRefs(key, value) { + if (key in refs) { + if (useReactive) + refs[key] = value; + else + refs[key].value = value; + } + } + function reset() { + current.clear(); + for (const key of usedKeys) + setRefs(key, false); + } + function updateRefs(e, value) { + var _a, _b; + const key = (_a = e.key) == null ? void 0 : _a.toLowerCase(); + const code = (_b = e.code) == null ? void 0 : _b.toLowerCase(); + const values = [code, key].filter(Boolean); + if (key) { + if (value) + current.add(key); + else + current.delete(key); + } + for (const key2 of values) { + usedKeys.add(key2); + setRefs(key2, value); + } + if (key === "meta" && !value) { + metaDeps.forEach((key2) => { + current.delete(key2); + setRefs(key2, false); + }); + metaDeps.clear(); + } else if (typeof e.getModifierState === "function" && e.getModifierState("Meta") && value) { + [...current, ...values].forEach((key2) => metaDeps.add(key2)); + } + } + useEventListener(target, "keydown", (e) => { + updateRefs(e, true); + return onEventFired(e); + }, { passive }); + useEventListener(target, "keyup", (e) => { + updateRefs(e, false); + return onEventFired(e); + }, { passive }); + useEventListener("blur", reset, { passive: true }); + useEventListener("focus", reset, { passive: true }); + const proxy = new Proxy( + refs, + { + get(target2, prop, rec) { + if (typeof prop !== "string") + return Reflect.get(target2, prop, rec); + prop = prop.toLowerCase(); + if (prop in aliasMap) + prop = aliasMap[prop]; + if (!(prop in refs)) { + if (/[+_-]/.test(prop)) { + const keys2 = prop.split(/[+_-]/g).map((i) => i.trim()); + refs[prop] = computed(() => keys2.every((key) => toValue(proxy[key]))); + } else { + refs[prop] = ref(false); + } + } + const r = Reflect.get(target2, prop, rec); + return useReactive ? toValue(r) : r; + } + } + ); + return proxy; +} +function usingElRef(source, cb) { + if (toValue(source)) + cb(toValue(source)); +} +function timeRangeToArray(timeRanges) { + let ranges = []; + for (let i = 0; i < timeRanges.length; ++i) + ranges = [...ranges, [timeRanges.start(i), timeRanges.end(i)]]; + return ranges; +} +function tracksToArray(tracks) { + return Array.from(tracks).map(({ label, kind, language, mode, activeCues, cues, inBandMetadataTrackDispatchType }, id) => ({ id, label, kind, language, mode, activeCues, cues, inBandMetadataTrackDispatchType })); +} +var defaultOptions = { + src: "", + tracks: [] +}; +function useMediaControls(target, options = {}) { + target = toRef2(target); + options = { + ...defaultOptions, + ...options + }; + const { + document: document2 = defaultDocument + } = options; + const currentTime = ref(0); + const duration = ref(0); + const seeking = ref(false); + const volume = ref(1); + const waiting = ref(false); + const ended = ref(false); + const playing = ref(false); + const rate = ref(1); + const stalled = ref(false); + const buffered = ref([]); + const tracks = ref([]); + const selectedTrack = ref(-1); + const isPictureInPicture = ref(false); + const muted = ref(false); + const supportsPictureInPicture = document2 && "pictureInPictureEnabled" in document2; + const sourceErrorEvent = createEventHook(); + const disableTrack = (track) => { + usingElRef(target, (el) => { + if (track) { + const id = typeof track === "number" ? track : track.id; + el.textTracks[id].mode = "disabled"; + } else { + for (let i = 0; i < el.textTracks.length; ++i) + el.textTracks[i].mode = "disabled"; + } + selectedTrack.value = -1; + }); + }; + const enableTrack = (track, disableTracks = true) => { + usingElRef(target, (el) => { + const id = typeof track === "number" ? track : track.id; + if (disableTracks) + disableTrack(); + el.textTracks[id].mode = "showing"; + selectedTrack.value = id; + }); + }; + const togglePictureInPicture = () => { + return new Promise((resolve, reject) => { + usingElRef(target, async (el) => { + if (supportsPictureInPicture) { + if (!isPictureInPicture.value) { + el.requestPictureInPicture().then(resolve).catch(reject); + } else { + document2.exitPictureInPicture().then(resolve).catch(reject); + } + } + }); + }); + }; + watchEffect(() => { + if (!document2) + return; + const el = toValue(target); + if (!el) + return; + const src = toValue(options.src); + let sources = []; + if (!src) + return; + if (typeof src === "string") + sources = [{ src }]; + else if (Array.isArray(src)) + sources = src; + else if (isObject(src)) + sources = [src]; + el.querySelectorAll("source").forEach((e) => { + e.removeEventListener("error", sourceErrorEvent.trigger); + e.remove(); + }); + sources.forEach(({ src: src2, type }) => { + const source = document2.createElement("source"); + source.setAttribute("src", src2); + source.setAttribute("type", type || ""); + source.addEventListener("error", sourceErrorEvent.trigger); + el.appendChild(source); + }); + el.load(); + }); + tryOnScopeDispose(() => { + const el = toValue(target); + if (!el) + return; + el.querySelectorAll("source").forEach((e) => e.removeEventListener("error", sourceErrorEvent.trigger)); + }); + watch([target, volume], () => { + const el = toValue(target); + if (!el) + return; + el.volume = volume.value; + }); + watch([target, muted], () => { + const el = toValue(target); + if (!el) + return; + el.muted = muted.value; + }); + watch([target, rate], () => { + const el = toValue(target); + if (!el) + return; + el.playbackRate = rate.value; + }); + watchEffect(() => { + if (!document2) + return; + const textTracks = toValue(options.tracks); + const el = toValue(target); + if (!textTracks || !textTracks.length || !el) + return; + el.querySelectorAll("track").forEach((e) => e.remove()); + textTracks.forEach(({ default: isDefault, kind, label, src, srcLang }, i) => { + const track = document2.createElement("track"); + track.default = isDefault || false; + track.kind = kind; + track.label = label; + track.src = src; + track.srclang = srcLang; + if (track.default) + selectedTrack.value = i; + el.appendChild(track); + }); + }); + const { ignoreUpdates: ignoreCurrentTimeUpdates } = watchIgnorable(currentTime, (time) => { + const el = toValue(target); + if (!el) + return; + el.currentTime = time; + }); + const { ignoreUpdates: ignorePlayingUpdates } = watchIgnorable(playing, (isPlaying) => { + const el = toValue(target); + if (!el) + return; + isPlaying ? el.play() : el.pause(); + }); + useEventListener(target, "timeupdate", () => ignoreCurrentTimeUpdates(() => currentTime.value = toValue(target).currentTime)); + useEventListener(target, "durationchange", () => duration.value = toValue(target).duration); + useEventListener(target, "progress", () => buffered.value = timeRangeToArray(toValue(target).buffered)); + useEventListener(target, "seeking", () => seeking.value = true); + useEventListener(target, "seeked", () => seeking.value = false); + useEventListener(target, ["waiting", "loadstart"], () => { + waiting.value = true; + ignorePlayingUpdates(() => playing.value = false); + }); + useEventListener(target, "loadeddata", () => waiting.value = false); + useEventListener(target, "playing", () => { + waiting.value = false; + ended.value = false; + ignorePlayingUpdates(() => playing.value = true); + }); + useEventListener(target, "ratechange", () => rate.value = toValue(target).playbackRate); + useEventListener(target, "stalled", () => stalled.value = true); + useEventListener(target, "ended", () => ended.value = true); + useEventListener(target, "pause", () => ignorePlayingUpdates(() => playing.value = false)); + useEventListener(target, "play", () => ignorePlayingUpdates(() => playing.value = true)); + useEventListener(target, "enterpictureinpicture", () => isPictureInPicture.value = true); + useEventListener(target, "leavepictureinpicture", () => isPictureInPicture.value = false); + useEventListener(target, "volumechange", () => { + const el = toValue(target); + if (!el) + return; + volume.value = el.volume; + muted.value = el.muted; + }); + const listeners = []; + const stop = watch([target], () => { + const el = toValue(target); + if (!el) + return; + stop(); + listeners[0] = useEventListener(el.textTracks, "addtrack", () => tracks.value = tracksToArray(el.textTracks)); + listeners[1] = useEventListener(el.textTracks, "removetrack", () => tracks.value = tracksToArray(el.textTracks)); + listeners[2] = useEventListener(el.textTracks, "change", () => tracks.value = tracksToArray(el.textTracks)); + }); + tryOnScopeDispose(() => listeners.forEach((listener) => listener())); + return { + currentTime, + duration, + waiting, + seeking, + ended, + stalled, + buffered, + playing, + rate, + // Volume + volume, + muted, + // Tracks + tracks, + selectedTrack, + enableTrack, + disableTrack, + // Picture in Picture + supportsPictureInPicture, + togglePictureInPicture, + isPictureInPicture, + // Events + onSourceError: sourceErrorEvent.on + }; +} +function getMapVue2Compat() { + const data = shallowReactive({}); + return { + get: (key) => data[key], + set: (key, value) => set(data, key, value), + has: (key) => hasOwn(data, key), + delete: (key) => del(data, key), + clear: () => { + Object.keys(data).forEach((key) => { + del(data, key); + }); + } + }; +} +function useMemoize(resolver, options) { + const initCache = () => { + if (options == null ? void 0 : options.cache) + return shallowReactive(options.cache); + if (isVue2) + return getMapVue2Compat(); + return shallowReactive(/* @__PURE__ */ new Map()); + }; + const cache = initCache(); + const generateKey = (...args) => (options == null ? void 0 : options.getKey) ? options.getKey(...args) : JSON.stringify(args); + const _loadData = (key, ...args) => { + cache.set(key, resolver(...args)); + return cache.get(key); + }; + const loadData = (...args) => _loadData(generateKey(...args), ...args); + const deleteData = (...args) => { + cache.delete(generateKey(...args)); + }; + const clearData = () => { + cache.clear(); + }; + const memoized = (...args) => { + const key = generateKey(...args); + if (cache.has(key)) + return cache.get(key); + return _loadData(key, ...args); + }; + memoized.load = loadData; + memoized.delete = deleteData; + memoized.clear = clearData; + memoized.generateKey = generateKey; + memoized.cache = cache; + return memoized; +} +function useMemory(options = {}) { + const memory = ref(); + const isSupported = useSupported(() => typeof performance !== "undefined" && "memory" in performance); + if (isSupported.value) { + const { interval = 1e3 } = options; + useIntervalFn(() => { + memory.value = performance.memory; + }, interval, { immediate: options.immediate, immediateCallback: options.immediateCallback }); + } + return { isSupported, memory }; +} +var UseMouseBuiltinExtractors = { + page: (event) => [event.pageX, event.pageY], + client: (event) => [event.clientX, event.clientY], + screen: (event) => [event.screenX, event.screenY], + movement: (event) => event instanceof Touch ? null : [event.movementX, event.movementY] +}; +function useMouse(options = {}) { + const { + type = "page", + touch = true, + resetOnTouchEnds = false, + initialValue = { x: 0, y: 0 }, + window: window2 = defaultWindow, + target = window2, + scroll = true, + eventFilter + } = options; + let _prevMouseEvent = null; + const x = ref(initialValue.x); + const y = ref(initialValue.y); + const sourceType = ref(null); + const extractor = typeof type === "function" ? type : UseMouseBuiltinExtractors[type]; + const mouseHandler = (event) => { + const result = extractor(event); + _prevMouseEvent = event; + if (result) { + [x.value, y.value] = result; + sourceType.value = "mouse"; + } + }; + const touchHandler = (event) => { + if (event.touches.length > 0) { + const result = extractor(event.touches[0]); + if (result) { + [x.value, y.value] = result; + sourceType.value = "touch"; + } + } + }; + const scrollHandler = () => { + if (!_prevMouseEvent || !window2) + return; + const pos = extractor(_prevMouseEvent); + if (_prevMouseEvent instanceof MouseEvent && pos) { + x.value = pos[0] + window2.scrollX; + y.value = pos[1] + window2.scrollY; + } + }; + const reset = () => { + x.value = initialValue.x; + y.value = initialValue.y; + }; + const mouseHandlerWrapper = eventFilter ? (event) => eventFilter(() => mouseHandler(event), {}) : (event) => mouseHandler(event); + const touchHandlerWrapper = eventFilter ? (event) => eventFilter(() => touchHandler(event), {}) : (event) => touchHandler(event); + const scrollHandlerWrapper = eventFilter ? () => eventFilter(() => scrollHandler(), {}) : () => scrollHandler(); + if (target) { + const listenerOptions = { passive: true }; + useEventListener(target, ["mousemove", "dragover"], mouseHandlerWrapper, listenerOptions); + if (touch && type !== "movement") { + useEventListener(target, ["touchstart", "touchmove"], touchHandlerWrapper, listenerOptions); + if (resetOnTouchEnds) + useEventListener(target, "touchend", reset, listenerOptions); + } + if (scroll && type === "page") + useEventListener(window2, "scroll", scrollHandlerWrapper, { passive: true }); + } + return { + x, + y, + sourceType + }; +} +function useMouseInElement(target, options = {}) { + const { + handleOutside = true, + window: window2 = defaultWindow + } = options; + const type = options.type || "page"; + const { x, y, sourceType } = useMouse(options); + const targetRef = ref(target != null ? target : window2 == null ? void 0 : window2.document.body); + const elementX = ref(0); + const elementY = ref(0); + const elementPositionX = ref(0); + const elementPositionY = ref(0); + const elementHeight = ref(0); + const elementWidth = ref(0); + const isOutside = ref(true); + let stop = () => { + }; + if (window2) { + stop = watch( + [targetRef, x, y], + () => { + const el = unrefElement(targetRef); + if (!el) + return; + const { + left, + top, + width, + height + } = el.getBoundingClientRect(); + elementPositionX.value = left + (type === "page" ? window2.pageXOffset : 0); + elementPositionY.value = top + (type === "page" ? window2.pageYOffset : 0); + elementHeight.value = height; + elementWidth.value = width; + const elX = x.value - elementPositionX.value; + const elY = y.value - elementPositionY.value; + isOutside.value = width === 0 || height === 0 || elX < 0 || elY < 0 || elX > width || elY > height; + if (handleOutside || !isOutside.value) { + elementX.value = elX; + elementY.value = elY; + } + }, + { immediate: true } + ); + useEventListener(document, "mouseleave", () => { + isOutside.value = true; + }); + } + return { + x, + y, + sourceType, + elementX, + elementY, + elementPositionX, + elementPositionY, + elementHeight, + elementWidth, + isOutside, + stop + }; +} +function useMousePressed(options = {}) { + const { + touch = true, + drag = true, + capture = false, + initialValue = false, + window: window2 = defaultWindow + } = options; + const pressed = ref(initialValue); + const sourceType = ref(null); + if (!window2) { + return { + pressed, + sourceType + }; + } + const onPressed = (srcType) => () => { + pressed.value = true; + sourceType.value = srcType; + }; + const onReleased = () => { + pressed.value = false; + sourceType.value = null; + }; + const target = computed(() => unrefElement(options.target) || window2); + useEventListener(target, "mousedown", onPressed("mouse"), { passive: true, capture }); + useEventListener(window2, "mouseleave", onReleased, { passive: true, capture }); + useEventListener(window2, "mouseup", onReleased, { passive: true, capture }); + if (drag) { + useEventListener(target, "dragstart", onPressed("mouse"), { passive: true, capture }); + useEventListener(window2, "drop", onReleased, { passive: true, capture }); + useEventListener(window2, "dragend", onReleased, { passive: true, capture }); + } + if (touch) { + useEventListener(target, "touchstart", onPressed("touch"), { passive: true, capture }); + useEventListener(window2, "touchend", onReleased, { passive: true, capture }); + useEventListener(window2, "touchcancel", onReleased, { passive: true, capture }); + } + return { + pressed, + sourceType + }; +} +function useNavigatorLanguage(options = {}) { + const { window: window2 = defaultWindow } = options; + const navigator = window2 == null ? void 0 : window2.navigator; + const isSupported = useSupported(() => navigator && "language" in navigator); + const language = ref(navigator == null ? void 0 : navigator.language); + useEventListener(window2, "languagechange", () => { + if (navigator) + language.value = navigator.language; + }); + return { + isSupported, + language + }; +} +function useNetwork(options = {}) { + const { window: window2 = defaultWindow } = options; + const navigator = window2 == null ? void 0 : window2.navigator; + const isSupported = useSupported(() => navigator && "connection" in navigator); + const isOnline = ref(true); + const saveData = ref(false); + const offlineAt = ref(void 0); + const onlineAt = ref(void 0); + const downlink = ref(void 0); + const downlinkMax = ref(void 0); + const rtt = ref(void 0); + const effectiveType = ref(void 0); + const type = ref("unknown"); + const connection = isSupported.value && navigator.connection; + function updateNetworkInformation() { + if (!navigator) + return; + isOnline.value = navigator.onLine; + offlineAt.value = isOnline.value ? void 0 : Date.now(); + onlineAt.value = isOnline.value ? Date.now() : void 0; + if (connection) { + downlink.value = connection.downlink; + downlinkMax.value = connection.downlinkMax; + effectiveType.value = connection.effectiveType; + rtt.value = connection.rtt; + saveData.value = connection.saveData; + type.value = connection.type; + } + } + if (window2) { + useEventListener(window2, "offline", () => { + isOnline.value = false; + offlineAt.value = Date.now(); + }); + useEventListener(window2, "online", () => { + isOnline.value = true; + onlineAt.value = Date.now(); + }); + } + if (connection) + useEventListener(connection, "change", updateNetworkInformation, false); + updateNetworkInformation(); + return { + isSupported, + isOnline, + saveData, + offlineAt, + onlineAt, + downlink, + downlinkMax, + effectiveType, + rtt, + type + }; +} +function useNow(options = {}) { + const { + controls: exposeControls = false, + interval = "requestAnimationFrame" + } = options; + const now2 = ref(/* @__PURE__ */ new Date()); + const update = () => now2.value = /* @__PURE__ */ new Date(); + const controls = interval === "requestAnimationFrame" ? useRafFn(update, { immediate: true }) : useIntervalFn(update, interval, { immediate: true }); + if (exposeControls) { + return { + now: now2, + ...controls + }; + } else { + return now2; + } +} +function useObjectUrl(object) { + const url = ref(); + const release = () => { + if (url.value) + URL.revokeObjectURL(url.value); + url.value = void 0; + }; + watch( + () => toValue(object), + (newObject) => { + release(); + if (newObject) + url.value = URL.createObjectURL(newObject); + }, + { immediate: true } + ); + tryOnScopeDispose(release); + return readonly(url); +} +function useClamp(value, min, max) { + if (typeof value === "function" || isReadonly(value)) + return computed(() => clamp(toValue(value), toValue(min), toValue(max))); + const _value = ref(value); + return computed({ + get() { + return _value.value = clamp(_value.value, toValue(min), toValue(max)); + }, + set(value2) { + _value.value = clamp(value2, toValue(min), toValue(max)); + } + }); +} +function useOffsetPagination(options) { + const { + total = Number.POSITIVE_INFINITY, + pageSize = 10, + page = 1, + onPageChange = noop, + onPageSizeChange = noop, + onPageCountChange = noop + } = options; + const currentPageSize = useClamp(pageSize, 1, Number.POSITIVE_INFINITY); + const pageCount = computed(() => Math.max( + 1, + Math.ceil(toValue(total) / toValue(currentPageSize)) + )); + const currentPage = useClamp(page, 1, pageCount); + const isFirstPage = computed(() => currentPage.value === 1); + const isLastPage = computed(() => currentPage.value === pageCount.value); + if (isRef(page)) { + syncRef(page, currentPage, { + direction: isReadonly(page) ? "ltr" : "both" + }); + } + if (isRef(pageSize)) { + syncRef(pageSize, currentPageSize, { + direction: isReadonly(pageSize) ? "ltr" : "both" + }); + } + function prev() { + currentPage.value--; + } + function next() { + currentPage.value++; + } + const returnValue = { + currentPage, + currentPageSize, + pageCount, + isFirstPage, + isLastPage, + prev, + next + }; + watch(currentPage, () => { + onPageChange(reactive(returnValue)); + }); + watch(currentPageSize, () => { + onPageSizeChange(reactive(returnValue)); + }); + watch(pageCount, () => { + onPageCountChange(reactive(returnValue)); + }); + return returnValue; +} +function useOnline(options = {}) { + const { isOnline } = useNetwork(options); + return isOnline; +} +function usePageLeave(options = {}) { + const { window: window2 = defaultWindow } = options; + const isLeft = ref(false); + const handler = (event) => { + if (!window2) + return; + event = event || window2.event; + const from = event.relatedTarget || event.toElement; + isLeft.value = !from; + }; + if (window2) { + useEventListener(window2, "mouseout", handler, { passive: true }); + useEventListener(window2.document, "mouseleave", handler, { passive: true }); + useEventListener(window2.document, "mouseenter", handler, { passive: true }); + } + return isLeft; +} +function useScreenOrientation(options = {}) { + const { + window: window2 = defaultWindow + } = options; + const isSupported = useSupported(() => window2 && "screen" in window2 && "orientation" in window2.screen); + const screenOrientation = isSupported.value ? window2.screen.orientation : {}; + const orientation = ref(screenOrientation.type); + const angle = ref(screenOrientation.angle || 0); + if (isSupported.value) { + useEventListener(window2, "orientationchange", () => { + orientation.value = screenOrientation.type; + angle.value = screenOrientation.angle; + }); + } + const lockOrientation = (type) => { + if (isSupported.value && typeof screenOrientation.lock === "function") + return screenOrientation.lock(type); + return Promise.reject(new Error("Not supported")); + }; + const unlockOrientation = () => { + if (isSupported.value && typeof screenOrientation.unlock === "function") + screenOrientation.unlock(); + }; + return { + isSupported, + orientation, + angle, + lockOrientation, + unlockOrientation + }; +} +function useParallax(target, options = {}) { + const { + deviceOrientationTiltAdjust = (i) => i, + deviceOrientationRollAdjust = (i) => i, + mouseTiltAdjust = (i) => i, + mouseRollAdjust = (i) => i, + window: window2 = defaultWindow + } = options; + const orientation = reactive(useDeviceOrientation({ window: window2 })); + const screenOrientation = reactive(useScreenOrientation({ window: window2 })); + const { + elementX: x, + elementY: y, + elementWidth: width, + elementHeight: height + } = useMouseInElement(target, { handleOutside: false, window: window2 }); + const source = computed(() => { + if (orientation.isSupported && (orientation.alpha != null && orientation.alpha !== 0 || orientation.gamma != null && orientation.gamma !== 0)) { + return "deviceOrientation"; + } + return "mouse"; + }); + const roll = computed(() => { + if (source.value === "deviceOrientation") { + let value; + switch (screenOrientation.orientation) { + case "landscape-primary": + value = orientation.gamma / 90; + break; + case "landscape-secondary": + value = -orientation.gamma / 90; + break; + case "portrait-primary": + value = -orientation.beta / 90; + break; + case "portrait-secondary": + value = orientation.beta / 90; + break; + default: + value = -orientation.beta / 90; + } + return deviceOrientationRollAdjust(value); + } else { + const value = -(y.value - height.value / 2) / height.value; + return mouseRollAdjust(value); + } + }); + const tilt = computed(() => { + if (source.value === "deviceOrientation") { + let value; + switch (screenOrientation.orientation) { + case "landscape-primary": + value = orientation.beta / 90; + break; + case "landscape-secondary": + value = -orientation.beta / 90; + break; + case "portrait-primary": + value = orientation.gamma / 90; + break; + case "portrait-secondary": + value = -orientation.gamma / 90; + break; + default: + value = orientation.gamma / 90; + } + return deviceOrientationTiltAdjust(value); + } else { + const value = (x.value - width.value / 2) / width.value; + return mouseTiltAdjust(value); + } + }); + return { roll, tilt, source }; +} +function useParentElement(element = useCurrentElement()) { + const parentElement = shallowRef(); + const update = () => { + const el = unrefElement(element); + if (el) + parentElement.value = el.parentElement; + }; + tryOnMounted(update); + watch(() => toValue(element), update); + return parentElement; +} +function usePerformanceObserver(options, callback) { + const { + window: window2 = defaultWindow, + immediate = true, + ...performanceOptions + } = options; + const isSupported = useSupported(() => window2 && "PerformanceObserver" in window2); + let observer; + const stop = () => { + observer == null ? void 0 : observer.disconnect(); + }; + const start = () => { + if (isSupported.value) { + stop(); + observer = new PerformanceObserver(callback); + observer.observe(performanceOptions); + } + }; + tryOnScopeDispose(stop); + if (immediate) + start(); + return { + isSupported, + start, + stop + }; +} +var defaultState = { + x: 0, + y: 0, + pointerId: 0, + pressure: 0, + tiltX: 0, + tiltY: 0, + width: 0, + height: 0, + twist: 0, + pointerType: null +}; +var keys = Object.keys(defaultState); +function usePointer(options = {}) { + const { + target = defaultWindow + } = options; + const isInside = ref(false); + const state = ref(options.initialValue || {}); + Object.assign(state.value, defaultState, state.value); + const handler = (event) => { + isInside.value = true; + if (options.pointerTypes && !options.pointerTypes.includes(event.pointerType)) + return; + state.value = objectPick(event, keys, false); + }; + if (target) { + const listenerOptions = { passive: true }; + useEventListener(target, ["pointerdown", "pointermove", "pointerup"], handler, listenerOptions); + useEventListener(target, "pointerleave", () => isInside.value = false, listenerOptions); + } + return { + ...toRefs2(state), + isInside + }; +} +function usePointerLock(target, options = {}) { + const { document: document2 = defaultDocument } = options; + const isSupported = useSupported(() => document2 && "pointerLockElement" in document2); + const element = ref(); + const triggerElement = ref(); + let targetElement; + if (isSupported.value) { + useEventListener(document2, "pointerlockchange", () => { + var _a; + const currentElement = (_a = document2.pointerLockElement) != null ? _a : element.value; + if (targetElement && currentElement === targetElement) { + element.value = document2.pointerLockElement; + if (!element.value) + targetElement = triggerElement.value = null; + } + }); + useEventListener(document2, "pointerlockerror", () => { + var _a; + const currentElement = (_a = document2.pointerLockElement) != null ? _a : element.value; + if (targetElement && currentElement === targetElement) { + const action = document2.pointerLockElement ? "release" : "acquire"; + throw new Error(`Failed to ${action} pointer lock.`); + } + }); + } + async function lock(e) { + var _a; + if (!isSupported.value) + throw new Error("Pointer Lock API is not supported by your browser."); + triggerElement.value = e instanceof Event ? e.currentTarget : null; + targetElement = e instanceof Event ? (_a = unrefElement(target)) != null ? _a : triggerElement.value : unrefElement(e); + if (!targetElement) + throw new Error("Target element undefined."); + targetElement.requestPointerLock(); + return await until(element).toBe(targetElement); + } + async function unlock() { + if (!element.value) + return false; + document2.exitPointerLock(); + await until(element).toBeNull(); + return true; + } + return { + isSupported, + element, + triggerElement, + lock, + unlock + }; +} +function usePointerSwipe(target, options = {}) { + const targetRef = toRef2(target); + const { + threshold = 50, + onSwipe, + onSwipeEnd, + onSwipeStart, + disableTextSelect = false + } = options; + const posStart = reactive({ x: 0, y: 0 }); + const updatePosStart = (x, y) => { + posStart.x = x; + posStart.y = y; + }; + const posEnd = reactive({ x: 0, y: 0 }); + const updatePosEnd = (x, y) => { + posEnd.x = x; + posEnd.y = y; + }; + const distanceX = computed(() => posStart.x - posEnd.x); + const distanceY = computed(() => posStart.y - posEnd.y); + const { max, abs } = Math; + const isThresholdExceeded = computed(() => max(abs(distanceX.value), abs(distanceY.value)) >= threshold); + const isSwiping = ref(false); + const isPointerDown = ref(false); + const direction = computed(() => { + if (!isThresholdExceeded.value) + return "none"; + if (abs(distanceX.value) > abs(distanceY.value)) { + return distanceX.value > 0 ? "left" : "right"; + } else { + return distanceY.value > 0 ? "up" : "down"; + } + }); + const eventIsAllowed = (e) => { + var _a, _b, _c; + const isReleasingButton = e.buttons === 0; + const isPrimaryButton = e.buttons === 1; + return (_c = (_b = (_a = options.pointerTypes) == null ? void 0 : _a.includes(e.pointerType)) != null ? _b : isReleasingButton || isPrimaryButton) != null ? _c : true; + }; + const stops = [ + useEventListener(target, "pointerdown", (e) => { + if (!eventIsAllowed(e)) + return; + isPointerDown.value = true; + const eventTarget = e.target; + eventTarget == null ? void 0 : eventTarget.setPointerCapture(e.pointerId); + const { clientX: x, clientY: y } = e; + updatePosStart(x, y); + updatePosEnd(x, y); + onSwipeStart == null ? void 0 : onSwipeStart(e); + }), + useEventListener(target, "pointermove", (e) => { + if (!eventIsAllowed(e)) + return; + if (!isPointerDown.value) + return; + const { clientX: x, clientY: y } = e; + updatePosEnd(x, y); + if (!isSwiping.value && isThresholdExceeded.value) + isSwiping.value = true; + if (isSwiping.value) + onSwipe == null ? void 0 : onSwipe(e); + }), + useEventListener(target, "pointerup", (e) => { + if (!eventIsAllowed(e)) + return; + if (isSwiping.value) + onSwipeEnd == null ? void 0 : onSwipeEnd(e, direction.value); + isPointerDown.value = false; + isSwiping.value = false; + }) + ]; + tryOnMounted(() => { + var _a, _b, _c, _d, _e, _f, _g, _h; + (_b = (_a = targetRef.value) == null ? void 0 : _a.style) == null ? void 0 : _b.setProperty("touch-action", "none"); + if (disableTextSelect) { + (_d = (_c = targetRef.value) == null ? void 0 : _c.style) == null ? void 0 : _d.setProperty("-webkit-user-select", "none"); + (_f = (_e = targetRef.value) == null ? void 0 : _e.style) == null ? void 0 : _f.setProperty("-ms-user-select", "none"); + (_h = (_g = targetRef.value) == null ? void 0 : _g.style) == null ? void 0 : _h.setProperty("user-select", "none"); + } + }); + const stop = () => stops.forEach((s) => s()); + return { + isSwiping: readonly(isSwiping), + direction: readonly(direction), + posStart: readonly(posStart), + posEnd: readonly(posEnd), + distanceX, + distanceY, + stop + }; +} +function usePreferredColorScheme(options) { + const isLight = useMediaQuery("(prefers-color-scheme: light)", options); + const isDark = useMediaQuery("(prefers-color-scheme: dark)", options); + return computed(() => { + if (isDark.value) + return "dark"; + if (isLight.value) + return "light"; + return "no-preference"; + }); +} +function usePreferredContrast(options) { + const isMore = useMediaQuery("(prefers-contrast: more)", options); + const isLess = useMediaQuery("(prefers-contrast: less)", options); + const isCustom = useMediaQuery("(prefers-contrast: custom)", options); + return computed(() => { + if (isMore.value) + return "more"; + if (isLess.value) + return "less"; + if (isCustom.value) + return "custom"; + return "no-preference"; + }); +} +function usePreferredLanguages(options = {}) { + const { window: window2 = defaultWindow } = options; + if (!window2) + return ref(["en"]); + const navigator = window2.navigator; + const value = ref(navigator.languages); + useEventListener(window2, "languagechange", () => { + value.value = navigator.languages; + }); + return value; +} +function usePreferredReducedMotion(options) { + const isReduced = useMediaQuery("(prefers-reduced-motion: reduce)", options); + return computed(() => { + if (isReduced.value) + return "reduce"; + return "no-preference"; + }); +} +function usePrevious(value, initialValue) { + const previous = shallowRef(initialValue); + watch( + toRef2(value), + (_, oldValue) => { + previous.value = oldValue; + }, + { flush: "sync" } + ); + return readonly(previous); +} +var topVarName = "--vueuse-safe-area-top"; +var rightVarName = "--vueuse-safe-area-right"; +var bottomVarName = "--vueuse-safe-area-bottom"; +var leftVarName = "--vueuse-safe-area-left"; +function useScreenSafeArea() { + const top = ref(""); + const right = ref(""); + const bottom = ref(""); + const left = ref(""); + if (isClient) { + const topCssVar = useCssVar(topVarName); + const rightCssVar = useCssVar(rightVarName); + const bottomCssVar = useCssVar(bottomVarName); + const leftCssVar = useCssVar(leftVarName); + topCssVar.value = "env(safe-area-inset-top, 0px)"; + rightCssVar.value = "env(safe-area-inset-right, 0px)"; + bottomCssVar.value = "env(safe-area-inset-bottom, 0px)"; + leftCssVar.value = "env(safe-area-inset-left, 0px)"; + update(); + useEventListener("resize", useDebounceFn(update)); + } + function update() { + top.value = getValue(topVarName); + right.value = getValue(rightVarName); + bottom.value = getValue(bottomVarName); + left.value = getValue(leftVarName); + } + return { + top, + right, + bottom, + left, + update + }; +} +function getValue(position) { + return getComputedStyle(document.documentElement).getPropertyValue(position); +} +function useScriptTag(src, onLoaded = noop, options = {}) { + const { + immediate = true, + manual = false, + type = "text/javascript", + async = true, + crossOrigin, + referrerPolicy, + noModule, + defer, + document: document2 = defaultDocument, + attrs = {} + } = options; + const scriptTag = ref(null); + let _promise = null; + const loadScript = (waitForScriptLoad) => new Promise((resolve, reject) => { + const resolveWithElement = (el2) => { + scriptTag.value = el2; + resolve(el2); + return el2; + }; + if (!document2) { + resolve(false); + return; + } + let shouldAppend = false; + let el = document2.querySelector(`script[src="${toValue(src)}"]`); + if (!el) { + el = document2.createElement("script"); + el.type = type; + el.async = async; + el.src = toValue(src); + if (defer) + el.defer = defer; + if (crossOrigin) + el.crossOrigin = crossOrigin; + if (noModule) + el.noModule = noModule; + if (referrerPolicy) + el.referrerPolicy = referrerPolicy; + Object.entries(attrs).forEach(([name, value]) => el == null ? void 0 : el.setAttribute(name, value)); + shouldAppend = true; + } else if (el.hasAttribute("data-loaded")) { + resolveWithElement(el); + } + el.addEventListener("error", (event) => reject(event)); + el.addEventListener("abort", (event) => reject(event)); + el.addEventListener("load", () => { + el.setAttribute("data-loaded", "true"); + onLoaded(el); + resolveWithElement(el); + }); + if (shouldAppend) + el = document2.head.appendChild(el); + if (!waitForScriptLoad) + resolveWithElement(el); + }); + const load = (waitForScriptLoad = true) => { + if (!_promise) + _promise = loadScript(waitForScriptLoad); + return _promise; + }; + const unload = () => { + if (!document2) + return; + _promise = null; + if (scriptTag.value) + scriptTag.value = null; + const el = document2.querySelector(`script[src="${toValue(src)}"]`); + if (el) + document2.head.removeChild(el); + }; + if (immediate && !manual) + tryOnMounted(load); + if (!manual) + tryOnUnmounted(unload); + return { scriptTag, load, unload }; +} +function checkOverflowScroll(ele) { + const style = window.getComputedStyle(ele); + if (style.overflowX === "scroll" || style.overflowY === "scroll" || style.overflowX === "auto" && ele.clientWidth < ele.scrollWidth || style.overflowY === "auto" && ele.clientHeight < ele.scrollHeight) { + return true; + } else { + const parent = ele.parentNode; + if (!parent || parent.tagName === "BODY") + return false; + return checkOverflowScroll(parent); + } +} +function preventDefault(rawEvent) { + const e = rawEvent || window.event; + const _target = e.target; + if (checkOverflowScroll(_target)) + return false; + if (e.touches.length > 1) + return true; + if (e.preventDefault) + e.preventDefault(); + return false; +} +var elInitialOverflow = /* @__PURE__ */ new WeakMap(); +function useScrollLock(element, initialState = false) { + const isLocked = ref(initialState); + let stopTouchMoveListener = null; + let initialOverflow = ""; + watch(toRef2(element), (el) => { + const target = resolveElement(toValue(el)); + if (target) { + const ele = target; + if (!elInitialOverflow.get(ele)) + elInitialOverflow.set(ele, ele.style.overflow); + if (ele.style.overflow !== "hidden") + initialOverflow = ele.style.overflow; + if (ele.style.overflow === "hidden") + return isLocked.value = true; + if (isLocked.value) + return ele.style.overflow = "hidden"; + } + }, { + immediate: true + }); + const lock = () => { + const el = resolveElement(toValue(element)); + if (!el || isLocked.value) + return; + if (isIOS) { + stopTouchMoveListener = useEventListener( + el, + "touchmove", + (e) => { + preventDefault(e); + }, + { passive: false } + ); + } + el.style.overflow = "hidden"; + isLocked.value = true; + }; + const unlock = () => { + const el = resolveElement(toValue(element)); + if (!el || !isLocked.value) + return; + isIOS && (stopTouchMoveListener == null ? void 0 : stopTouchMoveListener()); + el.style.overflow = initialOverflow; + elInitialOverflow.delete(el); + isLocked.value = false; + }; + tryOnScopeDispose(unlock); + return computed({ + get() { + return isLocked.value; + }, + set(v) { + if (v) + lock(); + else unlock(); + } + }); +} +function useSessionStorage(key, initialValue, options = {}) { + const { window: window2 = defaultWindow } = options; + return useStorage(key, initialValue, window2 == null ? void 0 : window2.sessionStorage, options); +} +function useShare(shareOptions = {}, options = {}) { + const { navigator = defaultNavigator } = options; + const _navigator = navigator; + const isSupported = useSupported(() => _navigator && "canShare" in _navigator); + const share = async (overrideOptions = {}) => { + if (isSupported.value) { + const data = { + ...toValue(shareOptions), + ...toValue(overrideOptions) + }; + let granted = true; + if (data.files && _navigator.canShare) + granted = _navigator.canShare({ files: data.files }); + if (granted) + return _navigator.share(data); + } + }; + return { + isSupported, + share + }; +} +var defaultSortFn = (source, compareFn) => source.sort(compareFn); +var defaultCompare = (a, b) => a - b; +function useSorted(...args) { + var _a, _b, _c, _d; + const [source] = args; + let compareFn = defaultCompare; + let options = {}; + if (args.length === 2) { + if (typeof args[1] === "object") { + options = args[1]; + compareFn = (_a = options.compareFn) != null ? _a : defaultCompare; + } else { + compareFn = (_b = args[1]) != null ? _b : defaultCompare; + } + } else if (args.length > 2) { + compareFn = (_c = args[1]) != null ? _c : defaultCompare; + options = (_d = args[2]) != null ? _d : {}; + } + const { + dirty = false, + sortFn = defaultSortFn + } = options; + if (!dirty) + return computed(() => sortFn([...toValue(source)], compareFn)); + watchEffect(() => { + const result = sortFn(toValue(source), compareFn); + if (isRef(source)) + source.value = result; + else + source.splice(0, source.length, ...result); + }); + return source; +} +function useSpeechRecognition(options = {}) { + const { + interimResults = true, + continuous = true, + window: window2 = defaultWindow + } = options; + const lang = toRef2(options.lang || "en-US"); + const isListening = ref(false); + const isFinal = ref(false); + const result = ref(""); + const error = shallowRef(void 0); + const toggle = (value = !isListening.value) => { + isListening.value = value; + }; + const start = () => { + isListening.value = true; + }; + const stop = () => { + isListening.value = false; + }; + const SpeechRecognition = window2 && (window2.SpeechRecognition || window2.webkitSpeechRecognition); + const isSupported = useSupported(() => SpeechRecognition); + let recognition; + if (isSupported.value) { + recognition = new SpeechRecognition(); + recognition.continuous = continuous; + recognition.interimResults = interimResults; + recognition.lang = toValue(lang); + recognition.onstart = () => { + isFinal.value = false; + }; + watch(lang, (lang2) => { + if (recognition && !isListening.value) + recognition.lang = lang2; + }); + recognition.onresult = (event) => { + const currentResult = event.results[event.resultIndex]; + const { transcript } = currentResult[0]; + isFinal.value = currentResult.isFinal; + result.value = transcript; + error.value = void 0; + }; + recognition.onerror = (event) => { + error.value = event; + }; + recognition.onend = () => { + isListening.value = false; + recognition.lang = toValue(lang); + }; + watch(isListening, () => { + if (isListening.value) + recognition.start(); + else + recognition.stop(); + }); + } + tryOnScopeDispose(() => { + isListening.value = false; + }); + return { + isSupported, + isListening, + isFinal, + recognition, + result, + error, + toggle, + start, + stop + }; +} +function useSpeechSynthesis(text, options = {}) { + const { + pitch = 1, + rate = 1, + volume = 1, + window: window2 = defaultWindow + } = options; + const synth = window2 && window2.speechSynthesis; + const isSupported = useSupported(() => synth); + const isPlaying = ref(false); + const status = ref("init"); + const spokenText = toRef2(text || ""); + const lang = toRef2(options.lang || "en-US"); + const error = shallowRef(void 0); + const toggle = (value = !isPlaying.value) => { + isPlaying.value = value; + }; + const bindEventsForUtterance = (utterance2) => { + utterance2.lang = toValue(lang); + utterance2.voice = toValue(options.voice) || null; + utterance2.pitch = toValue(pitch); + utterance2.rate = toValue(rate); + utterance2.volume = volume; + utterance2.onstart = () => { + isPlaying.value = true; + status.value = "play"; + }; + utterance2.onpause = () => { + isPlaying.value = false; + status.value = "pause"; + }; + utterance2.onresume = () => { + isPlaying.value = true; + status.value = "play"; + }; + utterance2.onend = () => { + isPlaying.value = false; + status.value = "end"; + }; + utterance2.onerror = (event) => { + error.value = event; + }; + }; + const utterance = computed(() => { + isPlaying.value = false; + status.value = "init"; + const newUtterance = new SpeechSynthesisUtterance(spokenText.value); + bindEventsForUtterance(newUtterance); + return newUtterance; + }); + const speak = () => { + synth.cancel(); + utterance && synth.speak(utterance.value); + }; + const stop = () => { + synth.cancel(); + isPlaying.value = false; + }; + if (isSupported.value) { + bindEventsForUtterance(utterance.value); + watch(lang, (lang2) => { + if (utterance.value && !isPlaying.value) + utterance.value.lang = lang2; + }); + if (options.voice) { + watch(options.voice, () => { + synth.cancel(); + }); + } + watch(isPlaying, () => { + if (isPlaying.value) + synth.resume(); + else + synth.pause(); + }); + } + tryOnScopeDispose(() => { + isPlaying.value = false; + }); + return { + isSupported, + isPlaying, + status, + utterance, + error, + stop, + toggle, + speak + }; +} +function useStepper(steps, initialStep) { + const stepsRef = ref(steps); + const stepNames = computed(() => Array.isArray(stepsRef.value) ? stepsRef.value : Object.keys(stepsRef.value)); + const index = ref(stepNames.value.indexOf(initialStep != null ? initialStep : stepNames.value[0])); + const current = computed(() => at(index.value)); + const isFirst = computed(() => index.value === 0); + const isLast = computed(() => index.value === stepNames.value.length - 1); + const next = computed(() => stepNames.value[index.value + 1]); + const previous = computed(() => stepNames.value[index.value - 1]); + function at(index2) { + if (Array.isArray(stepsRef.value)) + return stepsRef.value[index2]; + return stepsRef.value[stepNames.value[index2]]; + } + function get2(step) { + if (!stepNames.value.includes(step)) + return; + return at(stepNames.value.indexOf(step)); + } + function goTo(step) { + if (stepNames.value.includes(step)) + index.value = stepNames.value.indexOf(step); + } + function goToNext() { + if (isLast.value) + return; + index.value++; + } + function goToPrevious() { + if (isFirst.value) + return; + index.value--; + } + function goBackTo(step) { + if (isAfter(step)) + goTo(step); + } + function isNext(step) { + return stepNames.value.indexOf(step) === index.value + 1; + } + function isPrevious(step) { + return stepNames.value.indexOf(step) === index.value - 1; + } + function isCurrent(step) { + return stepNames.value.indexOf(step) === index.value; + } + function isBefore(step) { + return index.value < stepNames.value.indexOf(step); + } + function isAfter(step) { + return index.value > stepNames.value.indexOf(step); + } + return { + steps: stepsRef, + stepNames, + index, + current, + next, + previous, + isFirst, + isLast, + at, + get: get2, + goTo, + goToNext, + goToPrevious, + goBackTo, + isNext, + isPrevious, + isCurrent, + isBefore, + isAfter + }; +} +function useStorageAsync(key, initialValue, storage, options = {}) { + var _a; + const { + flush = "pre", + deep = true, + listenToStorageChanges = true, + writeDefaults = true, + mergeDefaults = false, + shallow, + window: window2 = defaultWindow, + eventFilter, + onError = (e) => { + console.error(e); + } + } = options; + const rawInit = toValue(initialValue); + const type = guessSerializerType(rawInit); + const data = (shallow ? shallowRef : ref)(initialValue); + const serializer = (_a = options.serializer) != null ? _a : StorageSerializers[type]; + if (!storage) { + try { + storage = getSSRHandler("getDefaultStorageAsync", () => { + var _a2; + return (_a2 = defaultWindow) == null ? void 0 : _a2.localStorage; + })(); + } catch (e) { + onError(e); + } + } + async function read(event) { + if (!storage || event && event.key !== key) + return; + try { + const rawValue = event ? event.newValue : await storage.getItem(key); + if (rawValue == null) { + data.value = rawInit; + if (writeDefaults && rawInit !== null) + await storage.setItem(key, await serializer.write(rawInit)); + } else if (mergeDefaults) { + const value = await serializer.read(rawValue); + if (typeof mergeDefaults === "function") + data.value = mergeDefaults(value, rawInit); + else if (type === "object" && !Array.isArray(value)) + data.value = { ...rawInit, ...value }; + else data.value = value; + } else { + data.value = await serializer.read(rawValue); + } + } catch (e) { + onError(e); + } + } + read(); + if (window2 && listenToStorageChanges) + useEventListener(window2, "storage", (e) => Promise.resolve().then(() => read(e))); + if (storage) { + watchWithFilter( + data, + async () => { + try { + if (data.value == null) + await storage.removeItem(key); + else + await storage.setItem(key, await serializer.write(data.value)); + } catch (e) { + onError(e); + } + }, + { + flush, + deep, + eventFilter + } + ); + } + return data; +} +var _id = 0; +function useStyleTag(css, options = {}) { + const isLoaded = ref(false); + const { + document: document2 = defaultDocument, + immediate = true, + manual = false, + id = `vueuse_styletag_${++_id}` + } = options; + const cssRef = ref(css); + let stop = () => { + }; + const load = () => { + if (!document2) + return; + const el = document2.getElementById(id) || document2.createElement("style"); + if (!el.isConnected) { + el.id = id; + if (options.media) + el.media = options.media; + document2.head.appendChild(el); + } + if (isLoaded.value) + return; + stop = watch( + cssRef, + (value) => { + el.textContent = value; + }, + { immediate: true } + ); + isLoaded.value = true; + }; + const unload = () => { + if (!document2 || !isLoaded.value) + return; + stop(); + document2.head.removeChild(document2.getElementById(id)); + isLoaded.value = false; + }; + if (immediate && !manual) + tryOnMounted(load); + if (!manual) + tryOnScopeDispose(unload); + return { + id, + css: cssRef, + unload, + load, + isLoaded: readonly(isLoaded) + }; +} +function useSwipe(target, options = {}) { + const { + threshold = 50, + onSwipe, + onSwipeEnd, + onSwipeStart, + passive = true, + window: window2 = defaultWindow + } = options; + const coordsStart = reactive({ x: 0, y: 0 }); + const coordsEnd = reactive({ x: 0, y: 0 }); + const diffX = computed(() => coordsStart.x - coordsEnd.x); + const diffY = computed(() => coordsStart.y - coordsEnd.y); + const { max, abs } = Math; + const isThresholdExceeded = computed(() => max(abs(diffX.value), abs(diffY.value)) >= threshold); + const isSwiping = ref(false); + const direction = computed(() => { + if (!isThresholdExceeded.value) + return "none"; + if (abs(diffX.value) > abs(diffY.value)) { + return diffX.value > 0 ? "left" : "right"; + } else { + return diffY.value > 0 ? "up" : "down"; + } + }); + const getTouchEventCoords = (e) => [e.touches[0].clientX, e.touches[0].clientY]; + const updateCoordsStart = (x, y) => { + coordsStart.x = x; + coordsStart.y = y; + }; + const updateCoordsEnd = (x, y) => { + coordsEnd.x = x; + coordsEnd.y = y; + }; + let listenerOptions; + const isPassiveEventSupported = checkPassiveEventSupport(window2 == null ? void 0 : window2.document); + if (!passive) + listenerOptions = isPassiveEventSupported ? { passive: false, capture: true } : { capture: true }; + else + listenerOptions = isPassiveEventSupported ? { passive: true } : { capture: false }; + const onTouchEnd = (e) => { + if (isSwiping.value) + onSwipeEnd == null ? void 0 : onSwipeEnd(e, direction.value); + isSwiping.value = false; + }; + const stops = [ + useEventListener(target, "touchstart", (e) => { + if (e.touches.length !== 1) + return; + if (listenerOptions.capture && !listenerOptions.passive) + e.preventDefault(); + const [x, y] = getTouchEventCoords(e); + updateCoordsStart(x, y); + updateCoordsEnd(x, y); + onSwipeStart == null ? void 0 : onSwipeStart(e); + }, listenerOptions), + useEventListener(target, "touchmove", (e) => { + if (e.touches.length !== 1) + return; + const [x, y] = getTouchEventCoords(e); + updateCoordsEnd(x, y); + if (!isSwiping.value && isThresholdExceeded.value) + isSwiping.value = true; + if (isSwiping.value) + onSwipe == null ? void 0 : onSwipe(e); + }, listenerOptions), + useEventListener(target, ["touchend", "touchcancel"], onTouchEnd, listenerOptions) + ]; + const stop = () => stops.forEach((s) => s()); + return { + isPassiveEventSupported, + isSwiping, + direction, + coordsStart, + coordsEnd, + lengthX: diffX, + lengthY: diffY, + stop + }; +} +function checkPassiveEventSupport(document2) { + if (!document2) + return false; + let supportsPassive = false; + const optionsBlock = { + get passive() { + supportsPassive = true; + return false; + } + }; + document2.addEventListener("x", noop, optionsBlock); + document2.removeEventListener("x", noop); + return supportsPassive; +} +function useTemplateRefsList() { + const refs = ref([]); + refs.value.set = (el) => { + if (el) + refs.value.push(el); + }; + onBeforeUpdate(() => { + refs.value.length = 0; + }); + return refs; +} +function useTextDirection(options = {}) { + const { + document: document2 = defaultDocument, + selector = "html", + observe = false, + initialValue = "ltr" + } = options; + function getValue2() { + var _a, _b; + return (_b = (_a = document2 == null ? void 0 : document2.querySelector(selector)) == null ? void 0 : _a.getAttribute("dir")) != null ? _b : initialValue; + } + const dir = ref(getValue2()); + tryOnMounted(() => dir.value = getValue2()); + if (observe && document2) { + useMutationObserver( + document2.querySelector(selector), + () => dir.value = getValue2(), + { attributes: true } + ); + } + return computed({ + get() { + return dir.value; + }, + set(v) { + var _a, _b; + dir.value = v; + if (!document2) + return; + if (dir.value) + (_a = document2.querySelector(selector)) == null ? void 0 : _a.setAttribute("dir", dir.value); + else + (_b = document2.querySelector(selector)) == null ? void 0 : _b.removeAttribute("dir"); + } + }); +} +function getRangesFromSelection(selection) { + var _a; + const rangeCount = (_a = selection.rangeCount) != null ? _a : 0; + return Array.from({ length: rangeCount }, (_, i) => selection.getRangeAt(i)); +} +function useTextSelection(options = {}) { + const { + window: window2 = defaultWindow + } = options; + const selection = ref(null); + const text = computed(() => { + var _a, _b; + return (_b = (_a = selection.value) == null ? void 0 : _a.toString()) != null ? _b : ""; + }); + const ranges = computed(() => selection.value ? getRangesFromSelection(selection.value) : []); + const rects = computed(() => ranges.value.map((range) => range.getBoundingClientRect())); + function onSelectionChange() { + selection.value = null; + if (window2) + selection.value = window2.getSelection(); + } + if (window2) + useEventListener(window2.document, "selectionchange", onSelectionChange); + return { + text, + rects, + ranges, + selection + }; +} +function useTextareaAutosize(options) { + var _a; + const textarea = ref(options == null ? void 0 : options.element); + const input = ref(options == null ? void 0 : options.input); + const styleProp = (_a = options == null ? void 0 : options.styleProp) != null ? _a : "height"; + const textareaScrollHeight = ref(1); + function triggerResize() { + var _a2; + if (!textarea.value) + return; + let height = ""; + textarea.value.style[styleProp] = "1px"; + textareaScrollHeight.value = (_a2 = textarea.value) == null ? void 0 : _a2.scrollHeight; + if (options == null ? void 0 : options.styleTarget) + toValue(options.styleTarget).style[styleProp] = `${textareaScrollHeight.value}px`; + else + height = `${textareaScrollHeight.value}px`; + textarea.value.style[styleProp] = height; + } + watch([input, textarea], () => nextTick(triggerResize), { immediate: true }); + watch(textareaScrollHeight, () => { + var _a2; + return (_a2 = options == null ? void 0 : options.onResize) == null ? void 0 : _a2.call(options); + }); + useResizeObserver(textarea, () => triggerResize()); + if (options == null ? void 0 : options.watch) + watch(options.watch, triggerResize, { immediate: true, deep: true }); + return { + textarea, + input, + triggerResize + }; +} +function useThrottledRefHistory(source, options = {}) { + const { throttle = 200, trailing = true } = options; + const filter = throttleFilter(throttle, trailing); + const history = useRefHistory(source, { ...options, eventFilter: filter }); + return { + ...history + }; +} +var DEFAULT_UNITS = [ + { max: 6e4, value: 1e3, name: "second" }, + { max: 276e4, value: 6e4, name: "minute" }, + { max: 72e6, value: 36e5, name: "hour" }, + { max: 5184e5, value: 864e5, name: "day" }, + { max: 24192e5, value: 6048e5, name: "week" }, + { max: 28512e6, value: 2592e6, name: "month" }, + { max: Number.POSITIVE_INFINITY, value: 31536e6, name: "year" } +]; +var DEFAULT_MESSAGES = { + justNow: "just now", + past: (n) => n.match(/\d/) ? `${n} ago` : n, + future: (n) => n.match(/\d/) ? `in ${n}` : n, + month: (n, past) => n === 1 ? past ? "last month" : "next month" : `${n} month${n > 1 ? "s" : ""}`, + year: (n, past) => n === 1 ? past ? "last year" : "next year" : `${n} year${n > 1 ? "s" : ""}`, + day: (n, past) => n === 1 ? past ? "yesterday" : "tomorrow" : `${n} day${n > 1 ? "s" : ""}`, + week: (n, past) => n === 1 ? past ? "last week" : "next week" : `${n} week${n > 1 ? "s" : ""}`, + hour: (n) => `${n} hour${n > 1 ? "s" : ""}`, + minute: (n) => `${n} minute${n > 1 ? "s" : ""}`, + second: (n) => `${n} second${n > 1 ? "s" : ""}`, + invalid: "" +}; +function DEFAULT_FORMATTER(date) { + return date.toISOString().slice(0, 10); +} +function useTimeAgo(time, options = {}) { + const { + controls: exposeControls = false, + updateInterval = 3e4 + } = options; + const { now: now2, ...controls } = useNow({ interval: updateInterval, controls: true }); + const timeAgo = computed(() => formatTimeAgo(new Date(toValue(time)), options, toValue(now2))); + if (exposeControls) { + return { + timeAgo, + ...controls + }; + } else { + return timeAgo; + } +} +function formatTimeAgo(from, options = {}, now2 = Date.now()) { + var _a; + const { + max, + messages = DEFAULT_MESSAGES, + fullDateFormatter = DEFAULT_FORMATTER, + units = DEFAULT_UNITS, + showSecond = false, + rounding = "round" + } = options; + const roundFn = typeof rounding === "number" ? (n) => +n.toFixed(rounding) : Math[rounding]; + const diff = +now2 - +from; + const absDiff = Math.abs(diff); + function getValue2(diff2, unit) { + return roundFn(Math.abs(diff2) / unit.value); + } + function format(diff2, unit) { + const val = getValue2(diff2, unit); + const past = diff2 > 0; + const str = applyFormat(unit.name, val, past); + return applyFormat(past ? "past" : "future", str, past); + } + function applyFormat(name, val, isPast) { + const formatter = messages[name]; + if (typeof formatter === "function") + return formatter(val, isPast); + return formatter.replace("{0}", val.toString()); + } + if (absDiff < 6e4 && !showSecond) + return messages.justNow; + if (typeof max === "number" && absDiff > max) + return fullDateFormatter(new Date(from)); + if (typeof max === "string") { + const unitMax = (_a = units.find((i) => i.name === max)) == null ? void 0 : _a.max; + if (unitMax && absDiff > unitMax) + return fullDateFormatter(new Date(from)); + } + for (const [idx, unit] of units.entries()) { + const val = getValue2(diff, unit); + if (val <= 0 && units[idx - 1]) + return format(diff, units[idx - 1]); + if (absDiff < unit.max) + return format(diff, unit); + } + return messages.invalid; +} +function useTimeoutPoll(fn, interval, timeoutPollOptions) { + const { start } = useTimeoutFn(loop, interval, { immediate: false }); + const isActive = ref(false); + async function loop() { + if (!isActive.value) + return; + await fn(); + start(); + } + function resume() { + if (!isActive.value) { + isActive.value = true; + loop(); + } + } + function pause() { + isActive.value = false; + } + if (timeoutPollOptions == null ? void 0 : timeoutPollOptions.immediate) + resume(); + tryOnScopeDispose(pause); + return { + isActive, + pause, + resume + }; +} +function useTimestamp(options = {}) { + const { + controls: exposeControls = false, + offset = 0, + immediate = true, + interval = "requestAnimationFrame", + callback + } = options; + const ts = ref(timestamp() + offset); + const update = () => ts.value = timestamp() + offset; + const cb = callback ? () => { + update(); + callback(ts.value); + } : update; + const controls = interval === "requestAnimationFrame" ? useRafFn(cb, { immediate }) : useIntervalFn(cb, interval, { immediate }); + if (exposeControls) { + return { + timestamp: ts, + ...controls + }; + } else { + return ts; + } +} +function useTitle(newTitle = null, options = {}) { + var _a, _b, _c; + const { + document: document2 = defaultDocument, + restoreOnUnmount = (t) => t + } = options; + const originalTitle = (_a = document2 == null ? void 0 : document2.title) != null ? _a : ""; + const title = toRef2((_b = newTitle != null ? newTitle : document2 == null ? void 0 : document2.title) != null ? _b : null); + const isReadonly2 = newTitle && typeof newTitle === "function"; + function format(t) { + if (!("titleTemplate" in options)) + return t; + const template = options.titleTemplate || "%s"; + return typeof template === "function" ? template(t) : toValue(template).replace(/%s/g, t); + } + watch( + title, + (t, o) => { + if (t !== o && document2) + document2.title = format(typeof t === "string" ? t : ""); + }, + { immediate: true } + ); + if (options.observe && !options.titleTemplate && document2 && !isReadonly2) { + useMutationObserver( + (_c = document2.head) == null ? void 0 : _c.querySelector("title"), + () => { + if (document2 && document2.title !== title.value) + title.value = format(document2.title); + }, + { childList: true } + ); + } + tryOnBeforeUnmount(() => { + if (restoreOnUnmount) { + const restoredTitle = restoreOnUnmount(originalTitle, title.value || ""); + if (restoredTitle != null && document2) + document2.title = restoredTitle; + } + }); + return title; +} +var _TransitionPresets = { + easeInSine: [0.12, 0, 0.39, 0], + easeOutSine: [0.61, 1, 0.88, 1], + easeInOutSine: [0.37, 0, 0.63, 1], + easeInQuad: [0.11, 0, 0.5, 0], + easeOutQuad: [0.5, 1, 0.89, 1], + easeInOutQuad: [0.45, 0, 0.55, 1], + easeInCubic: [0.32, 0, 0.67, 0], + easeOutCubic: [0.33, 1, 0.68, 1], + easeInOutCubic: [0.65, 0, 0.35, 1], + easeInQuart: [0.5, 0, 0.75, 0], + easeOutQuart: [0.25, 1, 0.5, 1], + easeInOutQuart: [0.76, 0, 0.24, 1], + easeInQuint: [0.64, 0, 0.78, 0], + easeOutQuint: [0.22, 1, 0.36, 1], + easeInOutQuint: [0.83, 0, 0.17, 1], + easeInExpo: [0.7, 0, 0.84, 0], + easeOutExpo: [0.16, 1, 0.3, 1], + easeInOutExpo: [0.87, 0, 0.13, 1], + easeInCirc: [0.55, 0, 1, 0.45], + easeOutCirc: [0, 0.55, 0.45, 1], + easeInOutCirc: [0.85, 0, 0.15, 1], + easeInBack: [0.36, 0, 0.66, -0.56], + easeOutBack: [0.34, 1.56, 0.64, 1], + easeInOutBack: [0.68, -0.6, 0.32, 1.6] +}; +var TransitionPresets = Object.assign({}, { linear: identity }, _TransitionPresets); +function createEasingFunction([p0, p1, p2, p3]) { + const a = (a1, a2) => 1 - 3 * a2 + 3 * a1; + const b = (a1, a2) => 3 * a2 - 6 * a1; + const c = (a1) => 3 * a1; + const calcBezier = (t, a1, a2) => ((a(a1, a2) * t + b(a1, a2)) * t + c(a1)) * t; + const getSlope = (t, a1, a2) => 3 * a(a1, a2) * t * t + 2 * b(a1, a2) * t + c(a1); + const getTforX = (x) => { + let aGuessT = x; + for (let i = 0; i < 4; ++i) { + const currentSlope = getSlope(aGuessT, p0, p2); + if (currentSlope === 0) + return aGuessT; + const currentX = calcBezier(aGuessT, p0, p2) - x; + aGuessT -= currentX / currentSlope; + } + return aGuessT; + }; + return (x) => p0 === p1 && p2 === p3 ? x : calcBezier(getTforX(x), p1, p3); +} +function lerp(a, b, alpha) { + return a + alpha * (b - a); +} +function toVec(t) { + return (typeof t === "number" ? [t] : t) || []; +} +function executeTransition(source, from, to, options = {}) { + var _a, _b; + const fromVal = toValue(from); + const toVal = toValue(to); + const v1 = toVec(fromVal); + const v2 = toVec(toVal); + const duration = (_a = toValue(options.duration)) != null ? _a : 1e3; + const startedAt = Date.now(); + const endAt = Date.now() + duration; + const trans = typeof options.transition === "function" ? options.transition : (_b = toValue(options.transition)) != null ? _b : identity; + const ease = typeof trans === "function" ? trans : createEasingFunction(trans); + return new Promise((resolve) => { + source.value = fromVal; + const tick = () => { + var _a2; + if ((_a2 = options.abort) == null ? void 0 : _a2.call(options)) { + resolve(); + return; + } + const now2 = Date.now(); + const alpha = ease((now2 - startedAt) / duration); + const arr = toVec(source.value).map((n, i) => lerp(v1[i], v2[i], alpha)); + if (Array.isArray(source.value)) + source.value = arr.map((n, i) => { + var _a3, _b2; + return lerp((_a3 = v1[i]) != null ? _a3 : 0, (_b2 = v2[i]) != null ? _b2 : 0, alpha); + }); + else if (typeof source.value === "number") + source.value = arr[0]; + if (now2 < endAt) { + requestAnimationFrame(tick); + } else { + source.value = toVal; + resolve(); + } + }; + tick(); + }); +} +function useTransition(source, options = {}) { + let currentId = 0; + const sourceVal = () => { + const v = toValue(source); + return typeof v === "number" ? v : v.map(toValue); + }; + const outputRef = ref(sourceVal()); + watch(sourceVal, async (to) => { + var _a, _b; + if (toValue(options.disabled)) + return; + const id = ++currentId; + if (options.delay) + await promiseTimeout(toValue(options.delay)); + if (id !== currentId) + return; + const toVal = Array.isArray(to) ? to.map(toValue) : toValue(to); + (_a = options.onStarted) == null ? void 0 : _a.call(options); + await executeTransition(outputRef, outputRef.value, toVal, { + ...options, + abort: () => { + var _a2; + return id !== currentId || ((_a2 = options.abort) == null ? void 0 : _a2.call(options)); + } + }); + (_b = options.onFinished) == null ? void 0 : _b.call(options); + }, { deep: true }); + watch(() => toValue(options.disabled), (disabled) => { + if (disabled) { + currentId++; + outputRef.value = sourceVal(); + } + }); + tryOnScopeDispose(() => { + currentId++; + }); + return computed(() => toValue(options.disabled) ? sourceVal() : outputRef.value); +} +function useUrlSearchParams(mode = "history", options = {}) { + const { + initialValue = {}, + removeNullishValues = true, + removeFalsyValues = false, + write: enableWrite = true, + window: window2 = defaultWindow + } = options; + if (!window2) + return reactive(initialValue); + const state = reactive({}); + function getRawParams() { + if (mode === "history") { + return window2.location.search || ""; + } else if (mode === "hash") { + const hash = window2.location.hash || ""; + const index = hash.indexOf("?"); + return index > 0 ? hash.slice(index) : ""; + } else { + return (window2.location.hash || "").replace(/^#/, ""); + } + } + function constructQuery(params) { + const stringified = params.toString(); + if (mode === "history") + return `${stringified ? `?${stringified}` : ""}${window2.location.hash || ""}`; + if (mode === "hash-params") + return `${window2.location.search || ""}${stringified ? `#${stringified}` : ""}`; + const hash = window2.location.hash || "#"; + const index = hash.indexOf("?"); + if (index > 0) + return `${hash.slice(0, index)}${stringified ? `?${stringified}` : ""}`; + return `${hash}${stringified ? `?${stringified}` : ""}`; + } + function read() { + return new URLSearchParams(getRawParams()); + } + function updateState(params) { + const unusedKeys = new Set(Object.keys(state)); + for (const key of params.keys()) { + const paramsForKey = params.getAll(key); + state[key] = paramsForKey.length > 1 ? paramsForKey : params.get(key) || ""; + unusedKeys.delete(key); + } + Array.from(unusedKeys).forEach((key) => delete state[key]); + } + const { pause, resume } = watchPausable( + state, + () => { + const params = new URLSearchParams(""); + Object.keys(state).forEach((key) => { + const mapEntry = state[key]; + if (Array.isArray(mapEntry)) + mapEntry.forEach((value) => params.append(key, value)); + else if (removeNullishValues && mapEntry == null) + params.delete(key); + else if (removeFalsyValues && !mapEntry) + params.delete(key); + else + params.set(key, mapEntry); + }); + write(params); + }, + { deep: true } + ); + function write(params, shouldUpdate) { + pause(); + if (shouldUpdate) + updateState(params); + window2.history.replaceState( + window2.history.state, + window2.document.title, + window2.location.pathname + constructQuery(params) + ); + resume(); + } + function onChanged() { + if (!enableWrite) + return; + write(read(), true); + } + useEventListener(window2, "popstate", onChanged, false); + if (mode !== "history") + useEventListener(window2, "hashchange", onChanged, false); + const initial = read(); + if (initial.keys().next().value) + updateState(initial); + else + Object.assign(state, initialValue); + return state; +} +function useUserMedia(options = {}) { + var _a, _b; + const enabled = ref((_a = options.enabled) != null ? _a : false); + const autoSwitch = ref((_b = options.autoSwitch) != null ? _b : true); + const constraints = ref(options.constraints); + const { navigator = defaultNavigator } = options; + const isSupported = useSupported(() => { + var _a2; + return (_a2 = navigator == null ? void 0 : navigator.mediaDevices) == null ? void 0 : _a2.getUserMedia; + }); + const stream = shallowRef(); + function getDeviceOptions(type) { + switch (type) { + case "video": { + if (constraints.value) + return constraints.value.video || false; + break; + } + case "audio": { + if (constraints.value) + return constraints.value.audio || false; + break; + } + } + } + async function _start() { + if (!isSupported.value || stream.value) + return; + stream.value = await navigator.mediaDevices.getUserMedia({ + video: getDeviceOptions("video"), + audio: getDeviceOptions("audio") + }); + return stream.value; + } + function _stop() { + var _a2; + (_a2 = stream.value) == null ? void 0 : _a2.getTracks().forEach((t) => t.stop()); + stream.value = void 0; + } + function stop() { + _stop(); + enabled.value = false; + } + async function start() { + await _start(); + if (stream.value) + enabled.value = true; + return stream.value; + } + async function restart() { + _stop(); + return await start(); + } + watch( + enabled, + (v) => { + if (v) + _start(); + else _stop(); + }, + { immediate: true } + ); + watch( + constraints, + () => { + if (autoSwitch.value && stream.value) + restart(); + }, + { immediate: true } + ); + tryOnScopeDispose(() => { + stop(); + }); + return { + isSupported, + stream, + start, + stop, + restart, + constraints, + enabled, + autoSwitch + }; +} +function useVModel(props, key, emit, options = {}) { + var _a, _b, _c, _d, _e; + const { + clone = false, + passive = false, + eventName, + deep = false, + defaultValue, + shouldEmit + } = options; + const vm = getCurrentInstance(); + const _emit = emit || (vm == null ? void 0 : vm.emit) || ((_a = vm == null ? void 0 : vm.$emit) == null ? void 0 : _a.bind(vm)) || ((_c = (_b = vm == null ? void 0 : vm.proxy) == null ? void 0 : _b.$emit) == null ? void 0 : _c.bind(vm == null ? void 0 : vm.proxy)); + let event = eventName; + if (!key) { + if (isVue2) { + const modelOptions = (_e = (_d = vm == null ? void 0 : vm.proxy) == null ? void 0 : _d.$options) == null ? void 0 : _e.model; + key = (modelOptions == null ? void 0 : modelOptions.value) || "value"; + if (!eventName) + event = (modelOptions == null ? void 0 : modelOptions.event) || "input"; + } else { + key = "modelValue"; + } + } + event = event || `update:${key.toString()}`; + const cloneFn = (val) => !clone ? val : typeof clone === "function" ? clone(val) : cloneFnJSON(val); + const getValue2 = () => isDef(props[key]) ? cloneFn(props[key]) : defaultValue; + const triggerEmit = (value) => { + if (shouldEmit) { + if (shouldEmit(value)) + _emit(event, value); + } else { + _emit(event, value); + } + }; + if (passive) { + const initialValue = getValue2(); + const proxy = ref(initialValue); + let isUpdating = false; + watch( + () => props[key], + (v) => { + if (!isUpdating) { + isUpdating = true; + proxy.value = cloneFn(v); + nextTick(() => isUpdating = false); + } + } + ); + watch( + proxy, + (v) => { + if (!isUpdating && (v !== props[key] || deep)) + triggerEmit(v); + }, + { deep } + ); + return proxy; + } else { + return computed({ + get() { + return getValue2(); + }, + set(value) { + triggerEmit(value); + } + }); + } +} +function useVModels(props, emit, options = {}) { + const ret = {}; + for (const key in props) { + ret[key] = useVModel( + props, + key, + emit, + options + ); + } + return ret; +} +function useVibrate(options) { + const { + pattern = [], + interval = 0, + navigator = defaultNavigator + } = options || {}; + const isSupported = useSupported(() => typeof navigator !== "undefined" && "vibrate" in navigator); + const patternRef = toRef2(pattern); + let intervalControls; + const vibrate = (pattern2 = patternRef.value) => { + if (isSupported.value) + navigator.vibrate(pattern2); + }; + const stop = () => { + if (isSupported.value) + navigator.vibrate(0); + intervalControls == null ? void 0 : intervalControls.pause(); + }; + if (interval > 0) { + intervalControls = useIntervalFn( + vibrate, + interval, + { + immediate: false, + immediateCallback: false + } + ); + } + return { + isSupported, + pattern, + intervalControls, + vibrate, + stop + }; +} +function useVirtualList(list, options) { + const { containerStyle, wrapperProps, scrollTo: scrollTo2, calculateRange, currentList, containerRef } = "itemHeight" in options ? useVerticalVirtualList(options, list) : useHorizontalVirtualList(options, list); + return { + list: currentList, + scrollTo: scrollTo2, + containerProps: { + ref: containerRef, + onScroll: () => { + calculateRange(); + }, + style: containerStyle + }, + wrapperProps + }; +} +function useVirtualListResources(list) { + const containerRef = ref(null); + const size = useElementSize(containerRef); + const currentList = ref([]); + const source = shallowRef(list); + const state = ref({ start: 0, end: 10 }); + return { state, source, currentList, size, containerRef }; +} +function createGetViewCapacity(state, source, itemSize) { + return (containerSize) => { + if (typeof itemSize === "number") + return Math.ceil(containerSize / itemSize); + const { start = 0 } = state.value; + let sum = 0; + let capacity = 0; + for (let i = start; i < source.value.length; i++) { + const size = itemSize(i); + sum += size; + capacity = i; + if (sum > containerSize) + break; + } + return capacity - start; + }; +} +function createGetOffset(source, itemSize) { + return (scrollDirection) => { + if (typeof itemSize === "number") + return Math.floor(scrollDirection / itemSize) + 1; + let sum = 0; + let offset = 0; + for (let i = 0; i < source.value.length; i++) { + const size = itemSize(i); + sum += size; + if (sum >= scrollDirection) { + offset = i; + break; + } + } + return offset + 1; + }; +} +function createCalculateRange(type, overscan, getOffset, getViewCapacity, { containerRef, state, currentList, source }) { + return () => { + const element = containerRef.value; + if (element) { + const offset = getOffset(type === "vertical" ? element.scrollTop : element.scrollLeft); + const viewCapacity = getViewCapacity(type === "vertical" ? element.clientHeight : element.clientWidth); + const from = offset - overscan; + const to = offset + viewCapacity + overscan; + state.value = { + start: from < 0 ? 0 : from, + end: to > source.value.length ? source.value.length : to + }; + currentList.value = source.value.slice(state.value.start, state.value.end).map((ele, index) => ({ + data: ele, + index: index + state.value.start + })); + } + }; +} +function createGetDistance(itemSize, source) { + return (index) => { + if (typeof itemSize === "number") { + const size2 = index * itemSize; + return size2; + } + const size = source.value.slice(0, index).reduce((sum, _, i) => sum + itemSize(i), 0); + return size; + }; +} +function useWatchForSizes(size, list, containerRef, calculateRange) { + watch([size.width, size.height, list, containerRef], () => { + calculateRange(); + }); +} +function createComputedTotalSize(itemSize, source) { + return computed(() => { + if (typeof itemSize === "number") + return source.value.length * itemSize; + return source.value.reduce((sum, _, index) => sum + itemSize(index), 0); + }); +} +var scrollToDictionaryForElementScrollKey = { + horizontal: "scrollLeft", + vertical: "scrollTop" +}; +function createScrollTo(type, calculateRange, getDistance, containerRef) { + return (index) => { + if (containerRef.value) { + containerRef.value[scrollToDictionaryForElementScrollKey[type]] = getDistance(index); + calculateRange(); + } + }; +} +function useHorizontalVirtualList(options, list) { + const resources = useVirtualListResources(list); + const { state, source, currentList, size, containerRef } = resources; + const containerStyle = { overflowX: "auto" }; + const { itemWidth, overscan = 5 } = options; + const getViewCapacity = createGetViewCapacity(state, source, itemWidth); + const getOffset = createGetOffset(source, itemWidth); + const calculateRange = createCalculateRange("horizontal", overscan, getOffset, getViewCapacity, resources); + const getDistanceLeft = createGetDistance(itemWidth, source); + const offsetLeft = computed(() => getDistanceLeft(state.value.start)); + const totalWidth = createComputedTotalSize(itemWidth, source); + useWatchForSizes(size, list, containerRef, calculateRange); + const scrollTo2 = createScrollTo("horizontal", calculateRange, getDistanceLeft, containerRef); + const wrapperProps = computed(() => { + return { + style: { + height: "100%", + width: `${totalWidth.value - offsetLeft.value}px`, + marginLeft: `${offsetLeft.value}px`, + display: "flex" + } + }; + }); + return { + scrollTo: scrollTo2, + calculateRange, + wrapperProps, + containerStyle, + currentList, + containerRef + }; +} +function useVerticalVirtualList(options, list) { + const resources = useVirtualListResources(list); + const { state, source, currentList, size, containerRef } = resources; + const containerStyle = { overflowY: "auto" }; + const { itemHeight, overscan = 5 } = options; + const getViewCapacity = createGetViewCapacity(state, source, itemHeight); + const getOffset = createGetOffset(source, itemHeight); + const calculateRange = createCalculateRange("vertical", overscan, getOffset, getViewCapacity, resources); + const getDistanceTop = createGetDistance(itemHeight, source); + const offsetTop = computed(() => getDistanceTop(state.value.start)); + const totalHeight = createComputedTotalSize(itemHeight, source); + useWatchForSizes(size, list, containerRef, calculateRange); + const scrollTo2 = createScrollTo("vertical", calculateRange, getDistanceTop, containerRef); + const wrapperProps = computed(() => { + return { + style: { + width: "100%", + height: `${totalHeight.value - offsetTop.value}px`, + marginTop: `${offsetTop.value}px` + } + }; + }); + return { + calculateRange, + scrollTo: scrollTo2, + containerStyle, + wrapperProps, + currentList, + containerRef + }; +} +function useWakeLock(options = {}) { + const { + navigator = defaultNavigator, + document: document2 = defaultDocument + } = options; + let wakeLock; + const isSupported = useSupported(() => navigator && "wakeLock" in navigator); + const isActive = ref(false); + async function onVisibilityChange() { + if (!isSupported.value || !wakeLock) + return; + if (document2 && document2.visibilityState === "visible") + wakeLock = await navigator.wakeLock.request("screen"); + isActive.value = !wakeLock.released; + } + if (document2) + useEventListener(document2, "visibilitychange", onVisibilityChange, { passive: true }); + async function request(type) { + if (!isSupported.value) + return; + wakeLock = await navigator.wakeLock.request(type); + isActive.value = !wakeLock.released; + } + async function release() { + if (!isSupported.value || !wakeLock) + return; + await wakeLock.release(); + isActive.value = !wakeLock.released; + wakeLock = null; + } + return { + isSupported, + isActive, + request, + release + }; +} +function useWebNotification(options = {}) { + const { + window: window2 = defaultWindow, + requestPermissions: _requestForPermissions = true + } = options; + const defaultWebNotificationOptions = options; + const isSupported = useSupported(() => { + if (!window2 || !("Notification" in window2)) + return false; + try { + new Notification(""); + } catch (e) { + return false; + } + return true; + }); + const permissionGranted = ref(isSupported.value && "permission" in Notification && Notification.permission === "granted"); + const notification = ref(null); + const ensurePermissions = async () => { + if (!isSupported.value) + return; + if (!permissionGranted.value && Notification.permission !== "denied") { + const result = await Notification.requestPermission(); + if (result === "granted") + permissionGranted.value = true; + } + return permissionGranted.value; + }; + const { on: onClick, trigger: clickTrigger } = createEventHook(); + const { on: onShow, trigger: showTrigger } = createEventHook(); + const { on: onError, trigger: errorTrigger } = createEventHook(); + const { on: onClose, trigger: closeTrigger } = createEventHook(); + const show = async (overrides) => { + if (!isSupported.value || !permissionGranted.value) + return; + const options2 = Object.assign({}, defaultWebNotificationOptions, overrides); + notification.value = new Notification(options2.title || "", options2); + notification.value.onclick = clickTrigger; + notification.value.onshow = showTrigger; + notification.value.onerror = errorTrigger; + notification.value.onclose = closeTrigger; + return notification.value; + }; + const close = () => { + if (notification.value) + notification.value.close(); + notification.value = null; + }; + if (_requestForPermissions) + tryOnMounted(ensurePermissions); + tryOnScopeDispose(close); + if (isSupported.value && window2) { + const document2 = window2.document; + useEventListener(document2, "visibilitychange", (e) => { + e.preventDefault(); + if (document2.visibilityState === "visible") { + close(); + } + }); + } + return { + isSupported, + notification, + ensurePermissions, + permissionGranted, + show, + close, + onClick, + onShow, + onError, + onClose + }; +} +var DEFAULT_PING_MESSAGE = "ping"; +function resolveNestedOptions(options) { + if (options === true) + return {}; + return options; +} +function useWebSocket(url, options = {}) { + const { + onConnected, + onDisconnected, + onError, + onMessage, + immediate = true, + autoClose = true, + protocols = [] + } = options; + const data = ref(null); + const status = ref("CLOSED"); + const wsRef = ref(); + const urlRef = toRef2(url); + let heartbeatPause; + let heartbeatResume; + let explicitlyClosed = false; + let retried = 0; + let bufferedData = []; + let pongTimeoutWait; + const _sendBuffer = () => { + if (bufferedData.length && wsRef.value && status.value === "OPEN") { + for (const buffer of bufferedData) + wsRef.value.send(buffer); + bufferedData = []; + } + }; + const resetHeartbeat = () => { + clearTimeout(pongTimeoutWait); + pongTimeoutWait = void 0; + }; + const close = (code = 1e3, reason) => { + if (!isClient || !wsRef.value) + return; + explicitlyClosed = true; + resetHeartbeat(); + heartbeatPause == null ? void 0 : heartbeatPause(); + wsRef.value.close(code, reason); + wsRef.value = void 0; + }; + const send = (data2, useBuffer = true) => { + if (!wsRef.value || status.value !== "OPEN") { + if (useBuffer) + bufferedData.push(data2); + return false; + } + _sendBuffer(); + wsRef.value.send(data2); + return true; + }; + const _init = () => { + if (explicitlyClosed || typeof urlRef.value === "undefined") + return; + const ws = new WebSocket(urlRef.value, protocols); + wsRef.value = ws; + status.value = "CONNECTING"; + ws.onopen = () => { + status.value = "OPEN"; + onConnected == null ? void 0 : onConnected(ws); + heartbeatResume == null ? void 0 : heartbeatResume(); + _sendBuffer(); + }; + ws.onclose = (ev) => { + status.value = "CLOSED"; + onDisconnected == null ? void 0 : onDisconnected(ws, ev); + if (!explicitlyClosed && options.autoReconnect) { + const { + retries = -1, + delay = 1e3, + onFailed + } = resolveNestedOptions(options.autoReconnect); + retried += 1; + if (typeof retries === "number" && (retries < 0 || retried < retries)) + setTimeout(_init, delay); + else if (typeof retries === "function" && retries()) + setTimeout(_init, delay); + else + onFailed == null ? void 0 : onFailed(); + } + }; + ws.onerror = (e) => { + onError == null ? void 0 : onError(ws, e); + }; + ws.onmessage = (e) => { + if (options.heartbeat) { + resetHeartbeat(); + const { + message = DEFAULT_PING_MESSAGE + } = resolveNestedOptions(options.heartbeat); + if (e.data === message) + return; + } + data.value = e.data; + onMessage == null ? void 0 : onMessage(ws, e); + }; + }; + if (options.heartbeat) { + const { + message = DEFAULT_PING_MESSAGE, + interval = 1e3, + pongTimeout = 1e3 + } = resolveNestedOptions(options.heartbeat); + const { pause, resume } = useIntervalFn( + () => { + send(message, false); + if (pongTimeoutWait != null) + return; + pongTimeoutWait = setTimeout(() => { + close(); + explicitlyClosed = false; + }, pongTimeout); + }, + interval, + { immediate: false } + ); + heartbeatPause = pause; + heartbeatResume = resume; + } + if (autoClose) { + if (isClient) + useEventListener("beforeunload", () => close()); + tryOnScopeDispose(close); + } + const open = () => { + if (!isClient && !isWorker) + return; + close(); + explicitlyClosed = false; + retried = 0; + _init(); + }; + if (immediate) + open(); + watch(urlRef, open); + return { + data, + status, + close, + send, + open, + ws: wsRef + }; +} +function useWebWorker(arg0, workerOptions, options) { + const { + window: window2 = defaultWindow + } = options != null ? options : {}; + const data = ref(null); + const worker = shallowRef(); + const post = (...args) => { + if (!worker.value) + return; + worker.value.postMessage(...args); + }; + const terminate = function terminate2() { + if (!worker.value) + return; + worker.value.terminate(); + }; + if (window2) { + if (typeof arg0 === "string") + worker.value = new Worker(arg0, workerOptions); + else if (typeof arg0 === "function") + worker.value = arg0(); + else + worker.value = arg0; + worker.value.onmessage = (e) => { + data.value = e.data; + }; + tryOnScopeDispose(() => { + if (worker.value) + worker.value.terminate(); + }); + } + return { + data, + post, + terminate, + worker + }; +} +function jobRunner(userFunc) { + return (e) => { + const userFuncArgs = e.data[0]; + return Promise.resolve(userFunc.apply(void 0, userFuncArgs)).then((result) => { + postMessage(["SUCCESS", result]); + }).catch((error) => { + postMessage(["ERROR", error]); + }); + }; +} +function depsParser(deps, localDeps) { + if (deps.length === 0 && localDeps.length === 0) + return ""; + const depsString = deps.map((dep) => `'${dep}'`).toString(); + const depsFunctionString = localDeps.filter((dep) => typeof dep === "function").map((fn) => { + const str = fn.toString(); + if (str.trim().startsWith("function")) { + return str; + } else { + const name = fn.name; + return `const ${name} = ${str}`; + } + }).join(";"); + const importString = `importScripts(${depsString});`; + return `${depsString.trim() === "" ? "" : importString} ${depsFunctionString}`; +} +function createWorkerBlobUrl(fn, deps, localDeps) { + const blobCode = `${depsParser(deps, localDeps)}; onmessage=(${jobRunner})(${fn})`; + const blob = new Blob([blobCode], { type: "text/javascript" }); + const url = URL.createObjectURL(blob); + return url; +} +function useWebWorkerFn(fn, options = {}) { + const { + dependencies = [], + localDependencies = [], + timeout, + window: window2 = defaultWindow + } = options; + const worker = ref(); + const workerStatus = ref("PENDING"); + const promise = ref({}); + const timeoutId = ref(); + const workerTerminate = (status = "PENDING") => { + if (worker.value && worker.value._url && window2) { + worker.value.terminate(); + URL.revokeObjectURL(worker.value._url); + promise.value = {}; + worker.value = void 0; + window2.clearTimeout(timeoutId.value); + workerStatus.value = status; + } + }; + workerTerminate(); + tryOnScopeDispose(workerTerminate); + const generateWorker = () => { + const blobUrl = createWorkerBlobUrl(fn, dependencies, localDependencies); + const newWorker = new Worker(blobUrl); + newWorker._url = blobUrl; + newWorker.onmessage = (e) => { + const { resolve = () => { + }, reject = () => { + } } = promise.value; + const [status, result] = e.data; + switch (status) { + case "SUCCESS": + resolve(result); + workerTerminate(status); + break; + default: + reject(result); + workerTerminate("ERROR"); + break; + } + }; + newWorker.onerror = (e) => { + const { reject = () => { + } } = promise.value; + e.preventDefault(); + reject(e); + workerTerminate("ERROR"); + }; + if (timeout) { + timeoutId.value = setTimeout( + () => workerTerminate("TIMEOUT_EXPIRED"), + timeout + ); + } + return newWorker; + }; + const callWorker = (...fnArgs) => new Promise((resolve, reject) => { + promise.value = { + resolve, + reject + }; + worker.value && worker.value.postMessage([[...fnArgs]]); + workerStatus.value = "RUNNING"; + }); + const workerFn = (...fnArgs) => { + if (workerStatus.value === "RUNNING") { + console.error( + "[useWebWorkerFn] You can only run one instance of the worker at a time." + ); + return Promise.reject(); + } + worker.value = generateWorker(); + return callWorker(...fnArgs); + }; + return { + workerFn, + workerStatus, + workerTerminate + }; +} +function useWindowFocus(options = {}) { + const { window: window2 = defaultWindow } = options; + if (!window2) + return ref(false); + const focused = ref(window2.document.hasFocus()); + useEventListener(window2, "blur", () => { + focused.value = false; + }); + useEventListener(window2, "focus", () => { + focused.value = true; + }); + return focused; +} +function useWindowScroll(options = {}) { + const { window: window2 = defaultWindow, behavior = "auto" } = options; + if (!window2) { + return { + x: ref(0), + y: ref(0) + }; + } + const internalX = ref(window2.scrollX); + const internalY = ref(window2.scrollY); + const x = computed({ + get() { + return internalX.value; + }, + set(x2) { + scrollTo({ left: x2, behavior }); + } + }); + const y = computed({ + get() { + return internalY.value; + }, + set(y2) { + scrollTo({ top: y2, behavior }); + } + }); + useEventListener( + window2, + "scroll", + () => { + internalX.value = window2.scrollX; + internalY.value = window2.scrollY; + }, + { + capture: false, + passive: true + } + ); + return { x, y }; +} +function useWindowSize(options = {}) { + const { + window: window2 = defaultWindow, + initialWidth = Number.POSITIVE_INFINITY, + initialHeight = Number.POSITIVE_INFINITY, + listenOrientation = true, + includeScrollbar = true + } = options; + const width = ref(initialWidth); + const height = ref(initialHeight); + const update = () => { + if (window2) { + if (includeScrollbar) { + width.value = window2.innerWidth; + height.value = window2.innerHeight; + } else { + width.value = window2.document.documentElement.clientWidth; + height.value = window2.document.documentElement.clientHeight; + } + } + }; + update(); + tryOnMounted(update); + useEventListener("resize", update, { passive: true }); + if (listenOrientation) { + const matches = useMediaQuery("(orientation: portrait)"); + watch(matches, () => update()); + } + return { width, height }; +} + +export { + computedEager, + computedWithControl, + tryOnScopeDispose, + createEventHook, + createGlobalState, + provideLocal, + injectLocal, + createInjectionState, + createSharedComposable, + extendRef, + get, + isDefined, + makeDestructurable, + toValue, + resolveUnref, + reactify, + reactifyObject, + toReactive, + reactiveComputed, + reactiveOmit, + isClient, + isWorker, + isDef, + notNullish, + assert, + isObject, + now, + timestamp, + clamp, + noop, + rand, + hasOwn, + isIOS, + createFilterWrapper, + bypassFilter, + debounceFilter, + throttleFilter, + pausableFilter, + directiveHooks, + hyphenate, + camelize, + promiseTimeout, + identity, + createSingletonPromise, + invoke, + containsProp, + increaseWithUnit, + objectPick, + objectOmit, + objectEntries, + getLifeCycleTarget, + toRef2 as toRef, + resolveRef, + reactivePick, + refAutoReset, + useDebounceFn, + refDebounced, + refDefault, + useThrottleFn, + refThrottled, + refWithControl, + controlledRef, + set2 as set, + watchWithFilter, + watchPausable, + syncRef, + syncRefs, + toRefs2 as toRefs, + tryOnBeforeMount, + tryOnBeforeUnmount, + tryOnMounted, + tryOnUnmounted, + until, + useArrayDifference, + useArrayEvery, + useArrayFilter, + useArrayFind, + useArrayFindIndex, + useArrayFindLast, + useArrayIncludes, + useArrayJoin, + useArrayMap, + useArrayReduce, + useArraySome, + useArrayUnique, + useCounter, + formatDate, + normalizeDate, + useDateFormat, + useIntervalFn, + useInterval, + useLastChanged, + useTimeoutFn, + useTimeout, + useToNumber, + useToString, + useToggle, + watchArray, + watchAtMost, + watchDebounced, + watchDeep, + watchIgnorable, + watchImmediate, + watchOnce, + watchThrottled, + watchTriggerable, + whenever, + computedAsync, + computedInject, + createReusableTemplate, + createTemplatePromise, + createUnrefFn, + unrefElement, + defaultWindow, + defaultDocument, + defaultNavigator, + defaultLocation, + useEventListener, + onClickOutside, + onKeyStroke, + onKeyDown, + onKeyPressed, + onKeyUp, + onLongPress, + onStartTyping, + templateRef, + useMounted, + useSupported, + useMutationObserver, + useActiveElement, + useRafFn, + useAnimate, + useAsyncQueue, + useAsyncState, + useBase64, + useBattery, + useBluetooth, + useMediaQuery, + breakpointsTailwind, + breakpointsBootstrapV5, + breakpointsVuetifyV2, + breakpointsVuetifyV3, + breakpointsVuetify, + breakpointsAntDesign, + breakpointsQuasar, + breakpointsSematic, + breakpointsMasterCss, + breakpointsPrimeFlex, + useBreakpoints, + useBroadcastChannel, + useBrowserLocation, + useCached, + usePermission, + useClipboard, + useClipboardItems, + cloneFnJSON, + useCloned, + getSSRHandler, + setSSRHandler, + StorageSerializers, + customStorageEventName, + useStorage, + usePreferredDark, + useColorMode, + useConfirmDialog, + useCssVar, + useCurrentElement, + useCycleList, + useDark, + useManualRefHistory, + useRefHistory, + useDebouncedRefHistory, + useDeviceMotion, + useDeviceOrientation, + useDevicePixelRatio, + useDevicesList, + useDisplayMedia, + useDocumentVisibility, + useDraggable, + useDropZone, + useResizeObserver, + useElementBounding, + useElementByPoint, + useElementHover, + useElementSize, + useIntersectionObserver, + useElementVisibility, + useEventBus, + useEventSource, + useEyeDropper, + useFavicon, + createFetch, + useFetch, + useFileDialog, + useFileSystemAccess, + useFocus, + useFocusWithin, + useFps, + useFullscreen, + mapGamepadToXbox360Controller, + useGamepad, + useGeolocation, + useIdle, + useImage, + useScroll, + useInfiniteScroll, + useKeyModifier, + useLocalStorage, + DefaultMagicKeysAliasMap, + useMagicKeys, + useMediaControls, + useMemoize, + useMemory, + useMouse, + useMouseInElement, + useMousePressed, + useNavigatorLanguage, + useNetwork, + useNow, + useObjectUrl, + useOffsetPagination, + useOnline, + usePageLeave, + useScreenOrientation, + useParallax, + useParentElement, + usePerformanceObserver, + usePointer, + usePointerLock, + usePointerSwipe, + usePreferredColorScheme, + usePreferredContrast, + usePreferredLanguages, + usePreferredReducedMotion, + usePrevious, + useScreenSafeArea, + useScriptTag, + useScrollLock, + useSessionStorage, + useShare, + useSorted, + useSpeechRecognition, + useSpeechSynthesis, + useStepper, + useStorageAsync, + useStyleTag, + useSwipe, + useTemplateRefsList, + useTextDirection, + useTextSelection, + useTextareaAutosize, + useThrottledRefHistory, + useTimeAgo, + formatTimeAgo, + useTimeoutPoll, + useTimestamp, + useTitle, + TransitionPresets, + executeTransition, + useTransition, + useUrlSearchParams, + useUserMedia, + useVModel, + useVModels, + useVibrate, + useVirtualList, + useWakeLock, + useWebNotification, + useWebSocket, + useWebWorker, + useWebWorkerFn, + useWindowFocus, + useWindowScroll, + useWindowSize +}; +/*! Bundled license information: + +vitepress/lib/vue-demi.mjs: + (** + * vue-demi v0.14.7 + * Copyright (c) 2020-present, Anthony Fu + * @license MIT + *) +*/ +//# sourceMappingURL=chunk-B2WI2LE3.js.map diff --git a/docs/.vitepress/cache/deps/chunk-B2WI2LE3.js.map b/docs/.vitepress/cache/deps/chunk-B2WI2LE3.js.map new file mode 100644 index 000000000..369d933b1 --- /dev/null +++ b/docs/.vitepress/cache/deps/chunk-B2WI2LE3.js.map @@ -0,0 +1,7 @@ +{ + "version": 3, + "sources": ["../../../../node_modules/vitepress/lib/vue-demi.mjs", "../../../../node_modules/@vueuse/shared/index.mjs", "../../../../node_modules/@vueuse/core/index.mjs"], + "sourcesContent": ["/**\n * vue-demi v0.14.7\n * Copyright (c) 2020-present, Anthony Fu\n * @license MIT\n */\n\nimport * as Vue from 'vue'\n\nvar isVue2 = false\nvar isVue3 = true\nvar Vue2 = undefined\n\nfunction install() {}\n\nexport function set(target, key, val) {\n if (Array.isArray(target)) {\n target.length = Math.max(target.length, key)\n target.splice(key, 1, val)\n return val\n }\n target[key] = val\n return val\n}\n\nexport function del(target, key) {\n if (Array.isArray(target)) {\n target.splice(key, 1)\n return\n }\n delete target[key]\n}\n\nexport * from 'vue'\nexport { Vue, Vue2, isVue2, isVue3, install }\n", "import { shallowRef, watchEffect, readonly, ref, watch, customRef, getCurrentScope, onScopeDispose, effectScope, getCurrentInstance, provide, inject, isVue3, version, isRef, unref, computed, reactive, toRefs as toRefs$1, toRef as toRef$1, isVue2, set as set$1, onBeforeMount, nextTick, onBeforeUnmount, onMounted, onUnmounted, isReactive } from 'vue-demi';\n\nfunction computedEager(fn, options) {\n var _a;\n const result = shallowRef();\n watchEffect(() => {\n result.value = fn();\n }, {\n ...options,\n flush: (_a = options == null ? void 0 : options.flush) != null ? _a : \"sync\"\n });\n return readonly(result);\n}\n\nfunction computedWithControl(source, fn) {\n let v = void 0;\n let track;\n let trigger;\n const dirty = ref(true);\n const update = () => {\n dirty.value = true;\n trigger();\n };\n watch(source, update, { flush: \"sync\" });\n const get = typeof fn === \"function\" ? fn : fn.get;\n const set = typeof fn === \"function\" ? void 0 : fn.set;\n const result = customRef((_track, _trigger) => {\n track = _track;\n trigger = _trigger;\n return {\n get() {\n if (dirty.value) {\n v = get();\n dirty.value = false;\n }\n track();\n return v;\n },\n set(v2) {\n set == null ? void 0 : set(v2);\n }\n };\n });\n if (Object.isExtensible(result))\n result.trigger = update;\n return result;\n}\n\nfunction tryOnScopeDispose(fn) {\n if (getCurrentScope()) {\n onScopeDispose(fn);\n return true;\n }\n return false;\n}\n\nfunction createEventHook() {\n const fns = /* @__PURE__ */ new Set();\n const off = (fn) => {\n fns.delete(fn);\n };\n const on = (fn) => {\n fns.add(fn);\n const offFn = () => off(fn);\n tryOnScopeDispose(offFn);\n return {\n off: offFn\n };\n };\n const trigger = (...args) => {\n return Promise.all(Array.from(fns).map((fn) => fn(...args)));\n };\n return {\n on,\n off,\n trigger\n };\n}\n\nfunction createGlobalState(stateFactory) {\n let initialized = false;\n let state;\n const scope = effectScope(true);\n return (...args) => {\n if (!initialized) {\n state = scope.run(() => stateFactory(...args));\n initialized = true;\n }\n return state;\n };\n}\n\nconst localProvidedStateMap = /* @__PURE__ */ new WeakMap();\n\nconst provideLocal = (key, value) => {\n var _a;\n const instance = (_a = getCurrentInstance()) == null ? void 0 : _a.proxy;\n if (instance == null)\n throw new Error(\"provideLocal must be called in setup\");\n if (!localProvidedStateMap.has(instance))\n localProvidedStateMap.set(instance, /* @__PURE__ */ Object.create(null));\n const localProvidedState = localProvidedStateMap.get(instance);\n localProvidedState[key] = value;\n provide(key, value);\n};\n\nconst injectLocal = (...args) => {\n var _a;\n const key = args[0];\n const instance = (_a = getCurrentInstance()) == null ? void 0 : _a.proxy;\n if (instance == null)\n throw new Error(\"injectLocal must be called in setup\");\n if (localProvidedStateMap.has(instance) && key in localProvidedStateMap.get(instance))\n return localProvidedStateMap.get(instance)[key];\n return inject(...args);\n};\n\nfunction createInjectionState(composable, options) {\n const key = (options == null ? void 0 : options.injectionKey) || Symbol(composable.name || \"InjectionState\");\n const defaultValue = options == null ? void 0 : options.defaultValue;\n const useProvidingState = (...args) => {\n const state = composable(...args);\n provideLocal(key, state);\n return state;\n };\n const useInjectedState = () => injectLocal(key, defaultValue);\n return [useProvidingState, useInjectedState];\n}\n\nfunction createSharedComposable(composable) {\n let subscribers = 0;\n let state;\n let scope;\n const dispose = () => {\n subscribers -= 1;\n if (scope && subscribers <= 0) {\n scope.stop();\n state = void 0;\n scope = void 0;\n }\n };\n return (...args) => {\n subscribers += 1;\n if (!state) {\n scope = effectScope(true);\n state = scope.run(() => composable(...args));\n }\n tryOnScopeDispose(dispose);\n return state;\n };\n}\n\nfunction extendRef(ref, extend, { enumerable = false, unwrap = true } = {}) {\n if (!isVue3 && !version.startsWith(\"2.7.\")) {\n if (process.env.NODE_ENV !== \"production\")\n throw new Error(\"[VueUse] extendRef only works in Vue 2.7 or above.\");\n return;\n }\n for (const [key, value] of Object.entries(extend)) {\n if (key === \"value\")\n continue;\n if (isRef(value) && unwrap) {\n Object.defineProperty(ref, key, {\n get() {\n return value.value;\n },\n set(v) {\n value.value = v;\n },\n enumerable\n });\n } else {\n Object.defineProperty(ref, key, { value, enumerable });\n }\n }\n return ref;\n}\n\nfunction get(obj, key) {\n if (key == null)\n return unref(obj);\n return unref(obj)[key];\n}\n\nfunction isDefined(v) {\n return unref(v) != null;\n}\n\nfunction makeDestructurable(obj, arr) {\n if (typeof Symbol !== \"undefined\") {\n const clone = { ...obj };\n Object.defineProperty(clone, Symbol.iterator, {\n enumerable: false,\n value() {\n let index = 0;\n return {\n next: () => ({\n value: arr[index++],\n done: index > arr.length\n })\n };\n }\n });\n return clone;\n } else {\n return Object.assign([...arr], obj);\n }\n}\n\nfunction toValue(r) {\n return typeof r === \"function\" ? r() : unref(r);\n}\nconst resolveUnref = toValue;\n\nfunction reactify(fn, options) {\n const unrefFn = (options == null ? void 0 : options.computedGetter) === false ? unref : toValue;\n return function(...args) {\n return computed(() => fn.apply(this, args.map((i) => unrefFn(i))));\n };\n}\n\nfunction reactifyObject(obj, optionsOrKeys = {}) {\n let keys = [];\n let options;\n if (Array.isArray(optionsOrKeys)) {\n keys = optionsOrKeys;\n } else {\n options = optionsOrKeys;\n const { includeOwnProperties = true } = optionsOrKeys;\n keys.push(...Object.keys(obj));\n if (includeOwnProperties)\n keys.push(...Object.getOwnPropertyNames(obj));\n }\n return Object.fromEntries(\n keys.map((key) => {\n const value = obj[key];\n return [\n key,\n typeof value === \"function\" ? reactify(value.bind(obj), options) : value\n ];\n })\n );\n}\n\nfunction toReactive(objectRef) {\n if (!isRef(objectRef))\n return reactive(objectRef);\n const proxy = new Proxy({}, {\n get(_, p, receiver) {\n return unref(Reflect.get(objectRef.value, p, receiver));\n },\n set(_, p, value) {\n if (isRef(objectRef.value[p]) && !isRef(value))\n objectRef.value[p].value = value;\n else\n objectRef.value[p] = value;\n return true;\n },\n deleteProperty(_, p) {\n return Reflect.deleteProperty(objectRef.value, p);\n },\n has(_, p) {\n return Reflect.has(objectRef.value, p);\n },\n ownKeys() {\n return Object.keys(objectRef.value);\n },\n getOwnPropertyDescriptor() {\n return {\n enumerable: true,\n configurable: true\n };\n }\n });\n return reactive(proxy);\n}\n\nfunction reactiveComputed(fn) {\n return toReactive(computed(fn));\n}\n\nfunction reactiveOmit(obj, ...keys) {\n const flatKeys = keys.flat();\n const predicate = flatKeys[0];\n return 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\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 if (!condition)\n 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 = () => {\n};\nconst rand = (min, max) => {\n min = Math.ceil(min);\n max = Math.floor(max);\n return 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 var _a, _b;\n return isClient && ((_a = window == null ? void 0 : window.navigator) == null ? void 0 : _a.userAgent) && (/iP(?:ad|hone|od)/.test(window.navigator.userAgent) || ((_b = window == null ? void 0 : window.navigator) == null ? void 0 : _b.maxTouchPoints) > 2 && /iPad|Macintosh/.test(window == null ? void 0 : window.navigator.userAgent));\n}\n\nfunction createFilterWrapper(filter, fn) {\n function wrapper(...args) {\n return new Promise((resolve, reject) => {\n Promise.resolve(filter(() => fn.apply(this, args), { fn, thisArg: this, args })).then(resolve).catch(reject);\n });\n }\n return wrapper;\n}\nconst bypassFilter = (invoke) => {\n return invoke();\n};\nfunction debounceFilter(ms, options = {}) {\n let timer;\n let maxTimer;\n let lastRejector = noop;\n const _clearTimeout = (timer2) => {\n clearTimeout(timer2);\n lastRejector();\n lastRejector = noop;\n };\n const filter = (invoke) => {\n const duration = toValue(ms);\n const maxDuration = toValue(options.maxWait);\n if (timer)\n _clearTimeout(timer);\n if (duration <= 0 || maxDuration !== void 0 && maxDuration <= 0) {\n if (maxTimer) {\n _clearTimeout(maxTimer);\n maxTimer = null;\n }\n return Promise.resolve(invoke());\n }\n return new Promise((resolve, reject) => {\n lastRejector = options.rejectOnCancel ? reject : resolve;\n if (maxDuration && !maxTimer) {\n maxTimer = setTimeout(() => {\n if (timer)\n _clearTimeout(timer);\n maxTimer = null;\n resolve(invoke());\n }, maxDuration);\n }\n timer = setTimeout(() => {\n if (maxTimer)\n _clearTimeout(maxTimer);\n maxTimer = null;\n resolve(invoke());\n }, duration);\n });\n };\n return filter;\n}\nfunction throttleFilter(...args) {\n let lastExec = 0;\n let timer;\n let isLeading = true;\n let lastRejector = noop;\n let lastValue;\n let ms;\n let trailing;\n let leading;\n let rejectOnCancel;\n if (!isRef(args[0]) && typeof args[0] === \"object\")\n ({ delay: ms, trailing = true, leading = true, rejectOnCancel = false } = args[0]);\n else\n [ms, trailing = true, leading = true, rejectOnCancel = false] = args;\n const clear = () => {\n if (timer) {\n clearTimeout(timer);\n timer = void 0;\n lastRejector();\n lastRejector = noop;\n }\n };\n const filter = (_invoke) => {\n const duration = toValue(ms);\n const elapsed = Date.now() - lastExec;\n const invoke = () => {\n return lastValue = _invoke();\n };\n clear();\n if (duration <= 0) {\n lastExec = Date.now();\n return invoke();\n }\n if (elapsed > duration && (leading || !isLeading)) {\n lastExec = Date.now();\n invoke();\n } else if (trailing) {\n lastValue = new Promise((resolve, reject) => {\n lastRejector = rejectOnCancel ? reject : resolve;\n timer = setTimeout(() => {\n lastExec = Date.now();\n isLeading = true;\n resolve(invoke());\n clear();\n }, Math.max(0, duration - elapsed));\n });\n }\n if (!leading && !timer)\n timer = setTimeout(() => isLeading = true, duration);\n isLeading = false;\n return lastValue;\n };\n return filter;\n}\nfunction pausableFilter(extendFilter = bypassFilter) {\n const isActive = ref(true);\n function pause() {\n isActive.value = false;\n }\n function resume() {\n isActive.value = true;\n }\n const eventFilter = (...args) => {\n if (isActive.value)\n extendFilter(...args);\n };\n return { isActive: readonly(isActive), pause, resume, eventFilter };\n}\n\nconst directiveHooks = {\n mounted: isVue3 ? \"mounted\" : \"inserted\",\n updated: isVue3 ? \"updated\" : \"componentUpdated\",\n unmounted: isVue3 ? \"unmounted\" : \"unbind\"\n};\n\nfunction cacheStringFunction(fn) {\n const cache = /* @__PURE__ */ Object.create(null);\n return (str) => {\n const hit = cache[str];\n return hit || (cache[str] = fn(str));\n };\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 return str.replace(camelizeRE, (_, c) => c ? c.toUpperCase() : \"\");\n});\n\nfunction promiseTimeout(ms, throwOnTimeout = false, reason = \"Timeout\") {\n return new Promise((resolve, reject) => {\n if (throwOnTimeout)\n setTimeout(() => reject(reason), ms);\n else\n setTimeout(resolve, ms);\n });\n}\nfunction identity(arg) {\n return arg;\n}\nfunction createSingletonPromise(fn) {\n let _promise;\n function wrapper() {\n if (!_promise)\n _promise = fn();\n return _promise;\n }\n wrapper.reset = async () => {\n const _prev = _promise;\n _promise = void 0;\n if (_prev)\n await _prev;\n };\n return wrapper;\n}\nfunction invoke(fn) {\n return fn();\n}\nfunction containsProp(obj, ...props) {\n return props.some((k) => k in obj);\n}\nfunction increaseWithUnit(target, delta) {\n var _a;\n if (typeof target === \"number\")\n return target + delta;\n const value = ((_a = target.match(/^-?\\d+\\.?\\d*/)) == null ? void 0 : _a[0]) || \"\";\n const unit = target.slice(value.length);\n const result = Number.parseFloat(value) + delta;\n if (Number.isNaN(result))\n return target;\n return result + unit;\n}\nfunction objectPick(obj, keys, omitUndefined = false) {\n return keys.reduce((n, k) => {\n if (k in obj) {\n if (!omitUndefined || obj[k] !== void 0)\n n[k] = obj[k];\n }\n return n;\n }, {});\n}\nfunction objectOmit(obj, keys, omitUndefined = false) {\n return Object.fromEntries(Object.entries(obj).filter(([key, value]) => {\n return (!omitUndefined || value !== void 0) && !keys.includes(key);\n }));\n}\nfunction objectEntries(obj) {\n return Object.entries(obj);\n}\nfunction getLifeCycleTarget(target) {\n return target || getCurrentInstance();\n}\n\nfunction toRef(...args) {\n if (args.length !== 1)\n return toRef$1(...args);\n const r = args[0];\n return typeof r === \"function\" ? readonly(customRef(() => ({ get: r, set: noop }))) : ref(r);\n}\nconst resolveRef = toRef;\n\nfunction reactivePick(obj, ...keys) {\n const flatKeys = keys.flat();\n const predicate = flatKeys[0];\n return 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\nfunction refAutoReset(defaultValue, afterMs = 1e4) {\n return customRef((track, trigger) => {\n let value = toValue(defaultValue);\n let timer;\n const resetAfter = () => setTimeout(() => {\n value = toValue(defaultValue);\n trigger();\n }, toValue(afterMs));\n tryOnScopeDispose(() => {\n clearTimeout(timer);\n });\n return {\n get() {\n track();\n return value;\n },\n set(newValue) {\n value = newValue;\n trigger();\n clearTimeout(timer);\n timer = resetAfter();\n }\n };\n });\n}\n\nfunction useDebounceFn(fn, ms = 200, options = {}) {\n return createFilterWrapper(\n debounceFilter(ms, options),\n fn\n );\n}\n\nfunction refDebounced(value, ms = 200, options = {}) {\n const debounced = ref(value.value);\n const updater = useDebounceFn(() => {\n debounced.value = value.value;\n }, ms, options);\n watch(value, () => updater());\n return debounced;\n}\n\nfunction refDefault(source, defaultValue) {\n return computed({\n get() {\n var _a;\n return (_a = source.value) != null ? _a : defaultValue;\n },\n set(value) {\n source.value = value;\n }\n });\n}\n\nfunction useThrottleFn(fn, ms = 200, trailing = false, leading = true, rejectOnCancel = false) {\n return createFilterWrapper(\n throttleFilter(ms, trailing, leading, rejectOnCancel),\n fn\n );\n}\n\nfunction refThrottled(value, delay = 200, trailing = true, leading = true) {\n if (delay <= 0)\n return value;\n const throttled = ref(value.value);\n const updater = useThrottleFn(() => {\n throttled.value = value.value;\n }, delay, trailing, leading);\n watch(value, () => updater());\n return throttled;\n}\n\nfunction refWithControl(initial, options = {}) {\n let source = initial;\n let track;\n let trigger;\n const ref = customRef((_track, _trigger) => {\n track = _track;\n trigger = _trigger;\n return {\n get() {\n return get();\n },\n set(v) {\n set(v);\n }\n };\n });\n function get(tracking = true) {\n if (tracking)\n track();\n return source;\n }\n function set(value, triggering = true) {\n var _a, _b;\n if (value === source)\n return;\n const old = source;\n if (((_a = options.onBeforeChange) == null ? void 0 : _a.call(options, value, old)) === false)\n return;\n source = value;\n (_b = options.onChanged) == null ? void 0 : _b.call(options, value, old);\n if (triggering)\n trigger();\n }\n const untrackedGet = () => get(false);\n const silentSet = (v) => set(v, false);\n const peek = () => get(false);\n const lay = (v) => set(v, false);\n return extendRef(\n ref,\n {\n get,\n set,\n untrackedGet,\n silentSet,\n peek,\n lay\n },\n { enumerable: true }\n );\n}\nconst controlledRef = refWithControl;\n\nfunction set(...args) {\n if (args.length === 2) {\n const [ref, value] = args;\n ref.value = value;\n }\n if (args.length === 3) {\n if (isVue2) {\n set$1(...args);\n } else {\n const [target, key, value] = args;\n target[key] = value;\n }\n }\n}\n\nfunction watchWithFilter(source, cb, options = {}) {\n const {\n eventFilter = bypassFilter,\n ...watchOptions\n } = options;\n return watch(\n source,\n createFilterWrapper(\n eventFilter,\n cb\n ),\n watchOptions\n );\n}\n\nfunction watchPausable(source, cb, options = {}) {\n const {\n eventFilter: filter,\n ...watchOptions\n } = options;\n const { eventFilter, pause, resume, isActive } = pausableFilter(filter);\n const stop = watchWithFilter(\n source,\n cb,\n {\n ...watchOptions,\n eventFilter\n }\n );\n return { stop, pause, resume, isActive };\n}\n\nfunction syncRef(left, right, ...[options]) {\n const {\n flush = \"sync\",\n deep = false,\n immediate = true,\n direction = \"both\",\n transform = {}\n } = options || {};\n const watchers = [];\n const transformLTR = \"ltr\" in transform && transform.ltr || ((v) => v);\n const transformRTL = \"rtl\" in transform && transform.rtl || ((v) => v);\n if (direction === \"both\" || direction === \"ltr\") {\n watchers.push(watchPausable(\n left,\n (newValue) => {\n watchers.forEach((w) => w.pause());\n right.value = transformLTR(newValue);\n watchers.forEach((w) => w.resume());\n },\n { flush, deep, immediate }\n ));\n }\n if (direction === \"both\" || direction === \"rtl\") {\n watchers.push(watchPausable(\n right,\n (newValue) => {\n watchers.forEach((w) => w.pause());\n left.value = transformRTL(newValue);\n watchers.forEach((w) => w.resume());\n },\n { flush, deep, immediate }\n ));\n }\n const stop = () => {\n watchers.forEach((w) => w.stop());\n };\n return stop;\n}\n\nfunction syncRefs(source, targets, options = {}) {\n const {\n flush = \"sync\",\n deep = false,\n immediate = true\n } = options;\n if (!Array.isArray(targets))\n targets = [targets];\n return watch(\n source,\n (newValue) => targets.forEach((target) => target.value = newValue),\n { flush, deep, immediate }\n );\n}\n\nfunction toRefs(objectRef, options = {}) {\n if (!isRef(objectRef))\n return toRefs$1(objectRef);\n const result = Array.isArray(objectRef.value) ? Array.from({ length: objectRef.value.length }) : {};\n for (const key in objectRef.value) {\n result[key] = customRef(() => ({\n get() {\n return objectRef.value[key];\n },\n set(v) {\n var _a;\n const replaceRef = (_a = toValue(options.replaceRef)) != null ? _a : true;\n if (replaceRef) {\n if (Array.isArray(objectRef.value)) {\n const copy = [...objectRef.value];\n copy[key] = v;\n objectRef.value = copy;\n } else {\n const newObject = { ...objectRef.value, [key]: v };\n Object.setPrototypeOf(newObject, Object.getPrototypeOf(objectRef.value));\n objectRef.value = newObject;\n }\n } else {\n objectRef.value[key] = v;\n }\n }\n }));\n }\n return result;\n}\n\nfunction tryOnBeforeMount(fn, sync = true, target) {\n const instance = getLifeCycleTarget(target);\n if (instance)\n onBeforeMount(fn, target);\n else if (sync)\n fn();\n else\n nextTick(fn);\n}\n\nfunction tryOnBeforeUnmount(fn, target) {\n const instance = getLifeCycleTarget(target);\n if (instance)\n onBeforeUnmount(fn, target);\n}\n\nfunction tryOnMounted(fn, sync = true, target) {\n const instance = getLifeCycleTarget();\n if (instance)\n onMounted(fn, target);\n else if (sync)\n fn();\n else\n nextTick(fn);\n}\n\nfunction tryOnUnmounted(fn, target) {\n const instance = getLifeCycleTarget(target);\n if (instance)\n onUnmounted(fn, target);\n}\n\nfunction createUntil(r, isNot = false) {\n function toMatch(condition, { flush = \"sync\", deep = false, timeout, throwOnTimeout } = {}) {\n let stop = null;\n const watcher = new Promise((resolve) => {\n stop = watch(\n r,\n (v) => {\n if (condition(v) !== isNot) {\n stop == null ? void 0 : stop();\n resolve(v);\n }\n },\n {\n flush,\n deep,\n immediate: true\n }\n );\n });\n const promises = [watcher];\n if (timeout != null) {\n promises.push(\n promiseTimeout(timeout, throwOnTimeout).then(() => toValue(r)).finally(() => stop == null ? void 0 : stop())\n );\n }\n return Promise.race(promises);\n }\n function toBe(value, options) {\n if (!isRef(value))\n return toMatch((v) => v === value, options);\n const { flush = \"sync\", deep = false, timeout, throwOnTimeout } = options != null ? options : {};\n let stop = null;\n const watcher = new Promise((resolve) => {\n stop = watch(\n [r, value],\n ([v1, v2]) => {\n if (isNot !== (v1 === v2)) {\n stop == null ? void 0 : stop();\n resolve(v1);\n }\n },\n {\n flush,\n deep,\n immediate: true\n }\n );\n });\n const promises = [watcher];\n if (timeout != null) {\n promises.push(\n promiseTimeout(timeout, throwOnTimeout).then(() => toValue(r)).finally(() => {\n stop == null ? void 0 : stop();\n return toValue(r);\n })\n );\n }\n return Promise.race(promises);\n }\n function toBeTruthy(options) {\n return toMatch((v) => Boolean(v), options);\n }\n function toBeNull(options) {\n return toBe(null, options);\n }\n function toBeUndefined(options) {\n return toBe(void 0, options);\n }\n function toBeNaN(options) {\n return toMatch(Number.isNaN, options);\n }\n function toContains(value, options) {\n return toMatch((v) => {\n const array = Array.from(v);\n return array.includes(value) || array.includes(toValue(value));\n }, options);\n }\n function changed(options) {\n return changedTimes(1, options);\n }\n function changedTimes(n = 1, options) {\n let count = -1;\n return toMatch(() => {\n count += 1;\n return count >= n;\n }, options);\n }\n if (Array.isArray(toValue(r))) {\n const instance = {\n toMatch,\n toContains,\n changed,\n changedTimes,\n get not() {\n return createUntil(r, !isNot);\n }\n };\n return instance;\n } else {\n const instance = {\n toMatch,\n toBe,\n toBeTruthy,\n toBeNull,\n toBeNaN,\n toBeUndefined,\n changed,\n changedTimes,\n get not() {\n return createUntil(r, !isNot);\n }\n };\n return instance;\n }\n}\nfunction until(r) {\n return createUntil(r);\n}\n\nfunction defaultComparator(value, othVal) {\n return value === othVal;\n}\nfunction useArrayDifference(...args) {\n var _a;\n const list = args[0];\n const values = args[1];\n let compareFn = (_a = args[2]) != null ? _a : defaultComparator;\n if (typeof compareFn === \"string\") {\n const key = compareFn;\n compareFn = (value, othVal) => value[key] === othVal[key];\n }\n return computed(() => toValue(list).filter((x) => toValue(values).findIndex((y) => compareFn(x, y)) === -1));\n}\n\nfunction useArrayEvery(list, fn) {\n return computed(() => toValue(list).every((element, index, array) => fn(toValue(element), index, array)));\n}\n\nfunction useArrayFilter(list, fn) {\n return computed(() => toValue(list).map((i) => toValue(i)).filter(fn));\n}\n\nfunction useArrayFind(list, fn) {\n return computed(() => toValue(\n toValue(list).find((element, index, array) => fn(toValue(element), index, array))\n ));\n}\n\nfunction useArrayFindIndex(list, fn) {\n return computed(() => toValue(list).findIndex((element, index, array) => fn(toValue(element), index, array)));\n}\n\nfunction findLast(arr, cb) {\n let index = arr.length;\n while (index-- > 0) {\n if (cb(arr[index], index, arr))\n return arr[index];\n }\n return void 0;\n}\nfunction useArrayFindLast(list, fn) {\n return computed(() => toValue(\n !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\nfunction isArrayIncludesOptions(obj) {\n return isObject(obj) && containsProp(obj, \"formIndex\", \"comparator\");\n}\nfunction useArrayIncludes(...args) {\n var _a;\n const list = args[0];\n const value = args[1];\n let comparator = args[2];\n let formIndex = 0;\n if (isArrayIncludesOptions(comparator)) {\n formIndex = (_a = comparator.fromIndex) != null ? _a : 0;\n comparator = comparator.comparator;\n }\n if (typeof comparator === \"string\") {\n const key = comparator;\n comparator = (element, value2) => element[key] === toValue(value2);\n }\n comparator = comparator != null ? comparator : (element, value2) => element === toValue(value2);\n return computed(() => toValue(list).slice(formIndex).some((element, index, array) => comparator(\n toValue(element),\n toValue(value),\n index,\n toValue(array)\n )));\n}\n\nfunction useArrayJoin(list, separator) {\n return computed(() => toValue(list).map((i) => toValue(i)).join(toValue(separator)));\n}\n\nfunction useArrayMap(list, fn) {\n return computed(() => toValue(list).map((i) => toValue(i)).map(fn));\n}\n\nfunction useArrayReduce(list, reducer, ...args) {\n const reduceCallback = (sum, value, index) => reducer(toValue(sum), toValue(value), index);\n return computed(() => {\n const resolved = toValue(list);\n return args.length ? resolved.reduce(reduceCallback, toValue(args[0])) : resolved.reduce(reduceCallback);\n });\n}\n\nfunction useArraySome(list, fn) {\n return computed(() => toValue(list).some((element, index, array) => fn(toValue(element), index, array)));\n}\n\nfunction uniq(array) {\n return Array.from(new Set(array));\n}\nfunction uniqueElementsBy(array, fn) {\n return array.reduce((acc, v) => {\n if (!acc.some((x) => fn(v, x, array)))\n acc.push(v);\n return acc;\n }, []);\n}\nfunction useArrayUnique(list, compareFn) {\n return computed(() => {\n const resolvedList = toValue(list).map((element) => toValue(element));\n return compareFn ? uniqueElementsBy(resolvedList, compareFn) : uniq(resolvedList);\n });\n}\n\nfunction useCounter(initialValue = 0, options = {}) {\n let _initialValue = unref(initialValue);\n const count = ref(initialValue);\n const {\n max = Number.POSITIVE_INFINITY,\n min = Number.NEGATIVE_INFINITY\n } = options;\n const inc = (delta = 1) => count.value = Math.max(Math.min(max, count.value + delta), min);\n const dec = (delta = 1) => count.value = Math.min(Math.max(min, count.value - delta), max);\n const get = () => count.value;\n const set = (val) => count.value = Math.max(min, Math.min(max, val));\n const reset = (val = _initialValue) => {\n _initialValue = val;\n return set(val);\n };\n return { count, inc, dec, get, set, reset };\n}\n\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}|SSS/g;\nfunction defaultMeridiem(hours, minutes, isLowercase, hasPeriod) {\n let m = hours < 12 ? \"AM\" : \"PM\";\n if (hasPeriod)\n m = m.split(\"\").reduce((acc, curr) => acc += `${curr}.`, \"\");\n return isLowercase ? m.toLowerCase() : m;\n}\nfunction formatOrdinal(num) {\n const suffixes = [\"th\", \"st\", \"nd\", \"rd\"];\n const v = num % 100;\n return num + (suffixes[(v - 20) % 10] || suffixes[v] || suffixes[0]);\n}\nfunction formatDate(date, formatStr, options = {}) {\n var _a;\n const years = date.getFullYear();\n const month = date.getMonth();\n const days = date.getDate();\n const hours = date.getHours();\n const minutes = date.getMinutes();\n const seconds = date.getSeconds();\n const milliseconds = date.getMilliseconds();\n const day = date.getDay();\n const meridiem = (_a = options.customMeridiem) != null ? _a : defaultMeridiem;\n const matches = {\n Yo: () => formatOrdinal(years),\n YY: () => String(years).slice(-2),\n YYYY: () => years,\n M: () => month + 1,\n Mo: () => formatOrdinal(month + 1),\n MM: () => `${month + 1}`.padStart(2, \"0\"),\n MMM: () => date.toLocaleDateString(options.locales, { month: \"short\" }),\n MMMM: () => date.toLocaleDateString(options.locales, { month: \"long\" }),\n D: () => String(days),\n Do: () => formatOrdinal(days),\n DD: () => `${days}`.padStart(2, \"0\"),\n H: () => String(hours),\n Ho: () => formatOrdinal(hours),\n HH: () => `${hours}`.padStart(2, \"0\"),\n h: () => `${hours % 12 || 12}`.padStart(1, \"0\"),\n ho: () => formatOrdinal(hours % 12 || 12),\n hh: () => `${hours % 12 || 12}`.padStart(2, \"0\"),\n m: () => String(minutes),\n mo: () => formatOrdinal(minutes),\n mm: () => `${minutes}`.padStart(2, \"0\"),\n s: () => String(seconds),\n so: () => formatOrdinal(seconds),\n ss: () => `${seconds}`.padStart(2, \"0\"),\n SSS: () => `${milliseconds}`.padStart(3, \"0\"),\n d: () => day,\n dd: () => date.toLocaleDateString(options.locales, { weekday: \"narrow\" }),\n ddd: () => date.toLocaleDateString(options.locales, { weekday: \"short\" }),\n dddd: () => date.toLocaleDateString(options.locales, { weekday: \"long\" }),\n A: () => meridiem(hours, minutes),\n AA: () => meridiem(hours, minutes, false, true),\n a: () => meridiem(hours, minutes, true),\n aa: () => meridiem(hours, minutes, true, true)\n };\n return formatStr.replace(REGEX_FORMAT, (match, $1) => {\n var _a2, _b;\n return (_b = $1 != null ? $1 : (_a2 = matches[match]) == null ? void 0 : _a2.call(matches)) != null ? _b : match;\n });\n}\nfunction normalizeDate(date) {\n if (date === null)\n return new Date(Number.NaN);\n if (date === void 0)\n return /* @__PURE__ */ new Date();\n if (date instanceof Date)\n return new Date(date);\n if (typeof date === \"string\" && !/Z$/i.test(date)) {\n const d = date.match(REGEX_PARSE);\n if (d) {\n const m = d[2] - 1 || 0;\n const ms = (d[7] || \"0\").substring(0, 3);\n return new Date(d[1], m, d[3] || 1, d[4] || 0, d[5] || 0, d[6] || 0, ms);\n }\n }\n return new Date(date);\n}\nfunction useDateFormat(date, formatStr = \"HH:mm:ss\", options = {}) {\n return computed(() => formatDate(normalizeDate(toValue(date)), toValue(formatStr), options));\n}\n\nfunction useIntervalFn(cb, interval = 1e3, options = {}) {\n const {\n immediate = true,\n immediateCallback = false\n } = options;\n let timer = null;\n const isActive = ref(false);\n function clean() {\n if (timer) {\n clearInterval(timer);\n timer = null;\n }\n }\n function pause() {\n isActive.value = false;\n clean();\n }\n function resume() {\n const intervalValue = toValue(interval);\n if (intervalValue <= 0)\n return;\n isActive.value = true;\n if (immediateCallback)\n cb();\n clean();\n timer = setInterval(cb, intervalValue);\n }\n if (immediate && isClient)\n resume();\n if (isRef(interval) || typeof interval === \"function\") {\n const stopWatch = watch(interval, () => {\n if (isActive.value && isClient)\n resume();\n });\n tryOnScopeDispose(stopWatch);\n }\n tryOnScopeDispose(pause);\n return {\n isActive,\n pause,\n resume\n };\n}\n\nfunction useInterval(interval = 1e3, options = {}) {\n const {\n controls: exposeControls = false,\n immediate = true,\n callback\n } = options;\n const counter = ref(0);\n const update = () => counter.value += 1;\n const reset = () => {\n counter.value = 0;\n };\n const controls = useIntervalFn(\n callback ? () => {\n update();\n callback(counter.value);\n } : update,\n interval,\n { immediate }\n );\n if (exposeControls) {\n return {\n counter,\n reset,\n ...controls\n };\n } else {\n return counter;\n }\n}\n\nfunction useLastChanged(source, options = {}) {\n var _a;\n const ms = ref((_a = options.initialValue) != null ? _a : null);\n watch(\n source,\n () => ms.value = timestamp(),\n options\n );\n return ms;\n}\n\nfunction useTimeoutFn(cb, interval, options = {}) {\n const {\n immediate = true\n } = options;\n const isPending = ref(false);\n let timer = null;\n function clear() {\n if (timer) {\n clearTimeout(timer);\n timer = null;\n }\n }\n function stop() {\n isPending.value = false;\n clear();\n }\n function start(...args) {\n clear();\n isPending.value = true;\n timer = setTimeout(() => {\n isPending.value = false;\n timer = null;\n cb(...args);\n }, toValue(interval));\n }\n if (immediate) {\n isPending.value = true;\n if (isClient)\n start();\n }\n tryOnScopeDispose(stop);\n return {\n isPending: readonly(isPending),\n start,\n stop\n };\n}\n\nfunction useTimeout(interval = 1e3, options = {}) {\n const {\n controls: exposeControls = false,\n callback\n } = options;\n const controls = useTimeoutFn(\n callback != null ? callback : noop,\n interval,\n options\n );\n const ready = computed(() => !controls.isPending.value);\n if (exposeControls) {\n return {\n ready,\n ...controls\n };\n } else {\n return ready;\n }\n}\n\nfunction useToNumber(value, options = {}) {\n const {\n method = \"parseFloat\",\n radix,\n nanToZero\n } = options;\n return computed(() => {\n let resolved = toValue(value);\n if (typeof resolved === \"string\")\n resolved = Number[method](resolved, radix);\n if (nanToZero && Number.isNaN(resolved))\n resolved = 0;\n return resolved;\n });\n}\n\nfunction useToString(value) {\n return computed(() => `${toValue(value)}`);\n}\n\nfunction useToggle(initialValue = false, options = {}) {\n const {\n truthyValue = true,\n falsyValue = false\n } = options;\n const valueIsRef = isRef(initialValue);\n const _value = ref(initialValue);\n function toggle(value) {\n if (arguments.length) {\n _value.value = value;\n return _value.value;\n } else {\n const truthy = toValue(truthyValue);\n _value.value = _value.value === truthy ? toValue(falsyValue) : truthy;\n return _value.value;\n }\n }\n if (valueIsRef)\n return toggle;\n else\n return [_value, toggle];\n}\n\nfunction watchArray(source, cb, options) {\n let oldList = (options == null ? void 0 : options.immediate) ? [] : [...source instanceof Function ? source() : Array.isArray(source) ? source : toValue(source)];\n return watch(source, (newList, _, onCleanup) => {\n const oldListRemains = Array.from({ length: oldList.length });\n const added = [];\n for (const obj of newList) {\n let found = false;\n for (let i = 0; i < oldList.length; i++) {\n if (!oldListRemains[i] && obj === oldList[i]) {\n oldListRemains[i] = true;\n found = true;\n break;\n }\n }\n if (!found)\n added.push(obj);\n }\n const removed = oldList.filter((_2, i) => !oldListRemains[i]);\n cb(newList, oldList, added, removed, onCleanup);\n oldList = [...newList];\n }, options);\n}\n\nfunction watchAtMost(source, cb, options) {\n const {\n count,\n ...watchOptions\n } = options;\n const current = ref(0);\n const stop = watchWithFilter(\n source,\n (...args) => {\n current.value += 1;\n if (current.value >= toValue(count))\n nextTick(() => stop());\n cb(...args);\n },\n watchOptions\n );\n return { count: current, stop };\n}\n\nfunction watchDebounced(source, cb, options = {}) {\n const {\n debounce = 0,\n maxWait = void 0,\n ...watchOptions\n } = options;\n return watchWithFilter(\n source,\n cb,\n {\n ...watchOptions,\n eventFilter: debounceFilter(debounce, { maxWait })\n }\n );\n}\n\nfunction watchDeep(source, cb, options) {\n return watch(\n source,\n cb,\n {\n ...options,\n deep: true\n }\n );\n}\n\nfunction watchIgnorable(source, cb, options = {}) {\n const {\n eventFilter = bypassFilter,\n ...watchOptions\n } = options;\n const filteredCb = createFilterWrapper(\n eventFilter,\n cb\n );\n let ignoreUpdates;\n let ignorePrevAsyncUpdates;\n let stop;\n if (watchOptions.flush === \"sync\") {\n const ignore = ref(false);\n ignorePrevAsyncUpdates = () => {\n };\n ignoreUpdates = (updater) => {\n ignore.value = true;\n updater();\n ignore.value = false;\n };\n stop = watch(\n source,\n (...args) => {\n if (!ignore.value)\n filteredCb(...args);\n },\n watchOptions\n );\n } else {\n const disposables = [];\n const ignoreCounter = ref(0);\n const syncCounter = ref(0);\n ignorePrevAsyncUpdates = () => {\n ignoreCounter.value = syncCounter.value;\n };\n disposables.push(\n watch(\n source,\n () => {\n syncCounter.value++;\n },\n { ...watchOptions, flush: \"sync\" }\n )\n );\n ignoreUpdates = (updater) => {\n const syncCounterPrev = syncCounter.value;\n updater();\n ignoreCounter.value += syncCounter.value - syncCounterPrev;\n };\n disposables.push(\n watch(\n source,\n (...args) => {\n const ignore = ignoreCounter.value > 0 && ignoreCounter.value === syncCounter.value;\n ignoreCounter.value = 0;\n syncCounter.value = 0;\n if (ignore)\n return;\n filteredCb(...args);\n },\n watchOptions\n )\n );\n stop = () => {\n disposables.forEach((fn) => fn());\n };\n }\n return { stop, ignoreUpdates, ignorePrevAsyncUpdates };\n}\n\nfunction watchImmediate(source, cb, options) {\n return watch(\n source,\n cb,\n {\n ...options,\n immediate: true\n }\n );\n}\n\nfunction watchOnce(source, cb, options) {\n const stop = watch(source, (...args) => {\n nextTick(() => stop());\n return cb(...args);\n }, options);\n return stop;\n}\n\nfunction watchThrottled(source, cb, options = {}) {\n const {\n throttle = 0,\n trailing = true,\n leading = true,\n ...watchOptions\n } = options;\n return watchWithFilter(\n source,\n cb,\n {\n ...watchOptions,\n eventFilter: throttleFilter(throttle, trailing, leading)\n }\n );\n}\n\nfunction watchTriggerable(source, cb, options = {}) {\n let cleanupFn;\n function onEffect() {\n if (!cleanupFn)\n return;\n const fn = cleanupFn;\n cleanupFn = void 0;\n fn();\n }\n function onCleanup(callback) {\n cleanupFn = callback;\n }\n const _cb = (value, oldValue) => {\n onEffect();\n return cb(value, oldValue, onCleanup);\n };\n const res = watchIgnorable(source, _cb, options);\n const { ignoreUpdates } = res;\n const trigger = () => {\n let res2;\n ignoreUpdates(() => {\n res2 = _cb(getWatchSources(source), getOldValue(source));\n });\n return res2;\n };\n return {\n ...res,\n trigger\n };\n}\nfunction getWatchSources(sources) {\n if (isReactive(sources))\n return sources;\n if (Array.isArray(sources))\n return sources.map((item) => toValue(item));\n return toValue(sources);\n}\nfunction getOldValue(source) {\n return Array.isArray(source) ? source.map(() => void 0) : void 0;\n}\n\nfunction whenever(source, cb, options) {\n const stop = watch(\n source,\n (v, ov, onInvalidate) => {\n if (v) {\n if (options == null ? void 0 : options.once)\n nextTick(() => stop());\n cb(v, ov, onInvalidate);\n }\n },\n {\n ...options,\n once: false\n }\n );\n return stop;\n}\n\nexport { assert, refAutoReset as autoResetRef, bypassFilter, camelize, clamp, computedEager, computedWithControl, containsProp, computedWithControl as controlledComputed, controlledRef, createEventHook, createFilterWrapper, createGlobalState, createInjectionState, reactify as createReactiveFn, createSharedComposable, createSingletonPromise, debounceFilter, refDebounced as debouncedRef, watchDebounced as debouncedWatch, directiveHooks, computedEager as eagerComputed, extendRef, formatDate, get, getLifeCycleTarget, hasOwn, hyphenate, identity, watchIgnorable as ignorableWatch, increaseWithUnit, injectLocal, invoke, isClient, isDef, isDefined, isIOS, isObject, isWorker, makeDestructurable, noop, normalizeDate, notNullish, now, objectEntries, objectOmit, objectPick, pausableFilter, watchPausable as pausableWatch, promiseTimeout, provideLocal, rand, reactify, reactifyObject, reactiveComputed, reactiveOmit, reactivePick, refAutoReset, refDebounced, refDefault, refThrottled, refWithControl, resolveRef, resolveUnref, set, syncRef, syncRefs, throttleFilter, refThrottled as throttledRef, watchThrottled as throttledWatch, timestamp, toReactive, toRef, toRefs, toValue, tryOnBeforeMount, tryOnBeforeUnmount, tryOnMounted, tryOnScopeDispose, tryOnUnmounted, until, useArrayDifference, useArrayEvery, useArrayFilter, useArrayFind, useArrayFindIndex, useArrayFindLast, useArrayIncludes, useArrayJoin, useArrayMap, useArrayReduce, useArraySome, useArrayUnique, useCounter, useDateFormat, refDebounced as useDebounce, useDebounceFn, useInterval, useIntervalFn, useLastChanged, refThrottled as useThrottle, useThrottleFn, useTimeout, useTimeoutFn, useToNumber, useToString, useToggle, watchArray, watchAtMost, watchDebounced, watchDeep, watchIgnorable, watchImmediate, watchOnce, watchPausable, watchThrottled, watchTriggerable, watchWithFilter, whenever };\n", "import { noop, makeDestructurable, camelize, toValue, isClient, isObject, tryOnScopeDispose, isIOS, tryOnMounted, notNullish, objectOmit, promiseTimeout, until, increaseWithUnit, objectEntries, createSingletonPromise, useTimeoutFn, pausableWatch, toRef, createEventHook, computedWithControl, timestamp, pausableFilter, watchIgnorable, debounceFilter, createFilterWrapper, bypassFilter, toRefs, useIntervalFn, containsProp, hasOwn, throttleFilter, useDebounceFn, useThrottleFn, clamp, syncRef, objectPick, tryOnUnmounted, watchWithFilter, tryOnBeforeUnmount, identity, isDef, isWorker } from '@vueuse/shared';\nexport * from '@vueuse/shared';\nimport { isRef, ref, shallowRef, watchEffect, computed, inject, isVue3, version, defineComponent, h, TransitionGroup, shallowReactive, Fragment, watch, getCurrentInstance, customRef, onUpdated, onMounted, isVue2, readonly, nextTick, reactive, markRaw, unref, getCurrentScope, set, del, isReadonly, onBeforeUpdate } from 'vue-demi';\n\nfunction computedAsync(evaluationCallback, initialState, optionsOrRef) {\n let options;\n if (isRef(optionsOrRef)) {\n options = {\n evaluating: optionsOrRef\n };\n } else {\n options = optionsOrRef || {};\n }\n const {\n lazy = false,\n evaluating = void 0,\n shallow = true,\n onError = noop\n } = options;\n const started = ref(!lazy);\n const current = shallow ? shallowRef(initialState) : ref(initialState);\n let counter = 0;\n watchEffect(async (onInvalidate) => {\n if (!started.value)\n return;\n counter++;\n const counterAtBeginning = counter;\n let hasFinished = false;\n if (evaluating) {\n Promise.resolve().then(() => {\n evaluating.value = true;\n });\n }\n try {\n const result = await evaluationCallback((cancelCallback) => {\n onInvalidate(() => {\n if (evaluating)\n evaluating.value = false;\n if (!hasFinished)\n cancelCallback();\n });\n });\n if (counterAtBeginning === counter)\n current.value = result;\n } catch (e) {\n onError(e);\n } finally {\n if (evaluating && counterAtBeginning === counter)\n evaluating.value = false;\n hasFinished = true;\n }\n });\n if (lazy) {\n return computed(() => {\n started.value = true;\n return current.value;\n });\n } else {\n return current;\n }\n}\n\nfunction computedInject(key, options, defaultSource, treatDefaultAsFactory) {\n let source = inject(key);\n if (defaultSource)\n source = inject(key, defaultSource);\n if (treatDefaultAsFactory)\n source = inject(key, defaultSource, treatDefaultAsFactory);\n if (typeof options === \"function\") {\n return computed((ctx) => options(source, ctx));\n } else {\n return computed({\n get: (ctx) => options.get(source, ctx),\n set: options.set\n });\n }\n}\n\nfunction createReusableTemplate(options = {}) {\n if (!isVue3 && !version.startsWith(\"2.7.\")) {\n if (process.env.NODE_ENV !== \"production\")\n throw new Error(\"[VueUse] createReusableTemplate only works in Vue 2.7 or above.\");\n return;\n }\n const {\n inheritAttrs = true\n } = options;\n const render = shallowRef();\n const define = /* #__PURE__ */ defineComponent({\n setup(_, { slots }) {\n return () => {\n render.value = slots.default;\n };\n }\n });\n const reuse = /* #__PURE__ */ defineComponent({\n inheritAttrs,\n setup(_, { attrs, slots }) {\n return () => {\n var _a;\n if (!render.value && process.env.NODE_ENV !== \"production\")\n throw new Error(\"[VueUse] Failed to find the definition of reusable template\");\n const vnode = (_a = render.value) == null ? void 0 : _a.call(render, { ...keysToCamelKebabCase(attrs), $slots: slots });\n return inheritAttrs && (vnode == null ? void 0 : vnode.length) === 1 ? vnode[0] : vnode;\n };\n }\n });\n return makeDestructurable(\n { define, reuse },\n [define, reuse]\n );\n}\nfunction keysToCamelKebabCase(obj) {\n const newObj = {};\n for (const key in obj)\n newObj[camelize(key)] = obj[key];\n return newObj;\n}\n\nfunction createTemplatePromise(options = {}) {\n if (!isVue3) {\n if (process.env.NODE_ENV !== \"production\")\n throw new Error(\"[VueUse] createTemplatePromise only works in Vue 3 or above.\");\n return;\n }\n let index = 0;\n const instances = ref([]);\n function create(...args) {\n const props = shallowReactive({\n key: index++,\n args,\n promise: void 0,\n resolve: () => {\n },\n reject: () => {\n },\n isResolving: false,\n options\n });\n instances.value.push(props);\n props.promise = new Promise((_resolve, _reject) => {\n props.resolve = (v) => {\n props.isResolving = true;\n return _resolve(v);\n };\n props.reject = _reject;\n }).finally(() => {\n props.promise = void 0;\n const index2 = instances.value.indexOf(props);\n if (index2 !== -1)\n instances.value.splice(index2, 1);\n });\n return props.promise;\n }\n function start(...args) {\n if (options.singleton && instances.value.length > 0)\n return instances.value[0].promise;\n return create(...args);\n }\n const component = /* #__PURE__ */ defineComponent((_, { slots }) => {\n const renderList = () => instances.value.map((props) => {\n var _a;\n return h(Fragment, { key: props.key }, (_a = slots.default) == null ? void 0 : _a.call(slots, props));\n });\n if (options.transition)\n return () => h(TransitionGroup, options.transition, renderList);\n return renderList;\n });\n component.start = start;\n return component;\n}\n\nfunction createUnrefFn(fn) {\n return function(...args) {\n return fn.apply(this, args.map((i) => toValue(i)));\n };\n}\n\nfunction unrefElement(elRef) {\n var _a;\n const plain = toValue(elRef);\n return (_a = plain == null ? void 0 : plain.$el) != null ? _a : plain;\n}\n\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\nfunction useEventListener(...args) {\n let target;\n let events;\n let listeners;\n let options;\n if (typeof args[0] === \"string\" || Array.isArray(args[0])) {\n [events, listeners, options] = args;\n target = defaultWindow;\n } else {\n [target, events, listeners, options] = args;\n }\n if (!target)\n return noop;\n if (!Array.isArray(events))\n events = [events];\n if (!Array.isArray(listeners))\n listeners = [listeners];\n const cleanups = [];\n const cleanup = () => {\n cleanups.forEach((fn) => fn());\n cleanups.length = 0;\n };\n const register = (el, event, listener, options2) => {\n el.addEventListener(event, listener, options2);\n return () => el.removeEventListener(event, listener, options2);\n };\n const stopWatch = watch(\n () => [unrefElement(target), toValue(options)],\n ([el, options2]) => {\n cleanup();\n if (!el)\n return;\n const optionsClone = isObject(options2) ? { ...options2 } : options2;\n cleanups.push(\n ...events.flatMap((event) => {\n return listeners.map((listener) => register(el, event, listener, optionsClone));\n })\n );\n },\n { immediate: true, flush: \"post\" }\n );\n const stop = () => {\n stopWatch();\n cleanup();\n };\n tryOnScopeDispose(stop);\n return stop;\n}\n\nlet _iOSWorkaround = false;\nfunction onClickOutside(target, handler, options = {}) {\n const { window = defaultWindow, ignore = [], capture = true, detectIframe = false } = options;\n if (!window)\n return noop;\n if (isIOS && !_iOSWorkaround) {\n _iOSWorkaround = true;\n Array.from(window.document.body.children).forEach((el) => el.addEventListener(\"click\", noop));\n window.document.documentElement.addEventListener(\"click\", noop);\n }\n let shouldListen = true;\n const shouldIgnore = (event) => {\n return ignore.some((target2) => {\n if (typeof target2 === \"string\") {\n return Array.from(window.document.querySelectorAll(target2)).some((el) => el === event.target || event.composedPath().includes(el));\n } else {\n const el = unrefElement(target2);\n return el && (event.target === el || event.composedPath().includes(el));\n }\n });\n };\n const listener = (event) => {\n const el = unrefElement(target);\n if (!el || el === event.target || event.composedPath().includes(el))\n return;\n if (event.detail === 0)\n shouldListen = !shouldIgnore(event);\n if (!shouldListen) {\n shouldListen = true;\n return;\n }\n handler(event);\n };\n const cleanup = [\n useEventListener(window, \"click\", listener, { passive: true, capture }),\n useEventListener(window, \"pointerdown\", (e) => {\n const el = unrefElement(target);\n shouldListen = !shouldIgnore(e) && !!(el && !e.composedPath().includes(el));\n }, { passive: true }),\n detectIframe && useEventListener(window, \"blur\", (event) => {\n setTimeout(() => {\n var _a;\n const el = unrefElement(target);\n if (((_a = window.document.activeElement) == null ? void 0 : _a.tagName) === \"IFRAME\" && !(el == null ? void 0 : el.contains(window.document.activeElement))) {\n handler(event);\n }\n }, 0);\n })\n ].filter(Boolean);\n const stop = () => cleanup.forEach((fn) => fn());\n return stop;\n}\n\nfunction createKeyPredicate(keyFilter) {\n if (typeof keyFilter === \"function\")\n return keyFilter;\n else if (typeof keyFilter === \"string\")\n return (event) => event.key === keyFilter;\n else if (Array.isArray(keyFilter))\n return (event) => keyFilter.includes(event.key);\n return () => true;\n}\nfunction onKeyStroke(...args) {\n let key;\n let handler;\n let options = {};\n if (args.length === 3) {\n key = args[0];\n handler = args[1];\n options = args[2];\n } else if (args.length === 2) {\n if (typeof args[1] === \"object\") {\n key = true;\n handler = args[0];\n options = args[1];\n } else {\n key = args[0];\n handler = args[1];\n }\n } else {\n key = true;\n handler = args[0];\n }\n const {\n target = defaultWindow,\n eventName = \"keydown\",\n passive = false,\n dedupe = false\n } = options;\n const predicate = createKeyPredicate(key);\n const listener = (e) => {\n if (e.repeat && toValue(dedupe))\n return;\n if (predicate(e))\n handler(e);\n };\n return useEventListener(target, eventName, listener, passive);\n}\nfunction onKeyDown(key, handler, options = {}) {\n return onKeyStroke(key, handler, { ...options, eventName: \"keydown\" });\n}\nfunction onKeyPressed(key, handler, options = {}) {\n return onKeyStroke(key, handler, { ...options, eventName: \"keypress\" });\n}\nfunction onKeyUp(key, handler, options = {}) {\n return onKeyStroke(key, handler, { ...options, eventName: \"keyup\" });\n}\n\nconst DEFAULT_DELAY = 500;\nconst DEFAULT_THRESHOLD = 10;\nfunction onLongPress(target, handler, options) {\n var _a, _b;\n const elementRef = computed(() => unrefElement(target));\n let timeout;\n let posStart;\n let startTimestamp;\n let hasLongPressed = false;\n function clear() {\n if (timeout) {\n clearTimeout(timeout);\n timeout = void 0;\n }\n posStart = void 0;\n startTimestamp = void 0;\n hasLongPressed = false;\n }\n function onRelease(ev) {\n var _a2, _b2, _c;\n const [_startTimestamp, _posStart, _hasLongPressed] = [startTimestamp, posStart, hasLongPressed];\n clear();\n if (!(options == null ? void 0 : options.onMouseUp) || !_posStart || !_startTimestamp)\n return;\n if (((_a2 = options == null ? void 0 : options.modifiers) == null ? void 0 : _a2.self) && ev.target !== elementRef.value)\n return;\n if ((_b2 = options == null ? void 0 : options.modifiers) == null ? void 0 : _b2.prevent)\n ev.preventDefault();\n if ((_c = options == null ? void 0 : options.modifiers) == null ? void 0 : _c.stop)\n ev.stopPropagation();\n const dx = ev.x - _posStart.x;\n const dy = ev.y - _posStart.y;\n const distance = Math.sqrt(dx * dx + dy * dy);\n options.onMouseUp(ev.timeStamp - _startTimestamp, distance, _hasLongPressed);\n }\n function onDown(ev) {\n var _a2, _b2, _c, _d;\n if (((_a2 = options == null ? void 0 : options.modifiers) == null ? void 0 : _a2.self) && ev.target !== elementRef.value)\n return;\n clear();\n if ((_b2 = options == null ? void 0 : options.modifiers) == null ? void 0 : _b2.prevent)\n ev.preventDefault();\n if ((_c = options == null ? void 0 : options.modifiers) == null ? void 0 : _c.stop)\n ev.stopPropagation();\n posStart = {\n x: ev.x,\n y: ev.y\n };\n startTimestamp = ev.timeStamp;\n timeout = setTimeout(\n () => {\n hasLongPressed = true;\n handler(ev);\n },\n (_d = options == null ? void 0 : options.delay) != null ? _d : DEFAULT_DELAY\n );\n }\n function onMove(ev) {\n var _a2, _b2, _c, _d;\n if (((_a2 = options == null ? void 0 : options.modifiers) == null ? void 0 : _a2.self) && ev.target !== elementRef.value)\n return;\n if (!posStart || (options == null ? void 0 : options.distanceThreshold) === false)\n return;\n if ((_b2 = options == null ? void 0 : options.modifiers) == null ? void 0 : _b2.prevent)\n ev.preventDefault();\n if ((_c = options == null ? void 0 : options.modifiers) == null ? void 0 : _c.stop)\n ev.stopPropagation();\n const dx = ev.x - posStart.x;\n const dy = ev.y - posStart.y;\n const distance = Math.sqrt(dx * dx + dy * dy);\n if (distance >= ((_d = options == null ? void 0 : options.distanceThreshold) != null ? _d : DEFAULT_THRESHOLD))\n clear();\n }\n const listenerOptions = {\n capture: (_a = options == null ? void 0 : options.modifiers) == null ? void 0 : _a.capture,\n once: (_b = options == null ? void 0 : options.modifiers) == null ? void 0 : _b.once\n };\n const cleanup = [\n useEventListener(elementRef, \"pointerdown\", onDown, listenerOptions),\n useEventListener(elementRef, \"pointermove\", onMove, listenerOptions),\n useEventListener(elementRef, [\"pointerup\", \"pointerleave\"], onRelease, listenerOptions)\n ];\n const stop = () => cleanup.forEach((fn) => fn());\n return stop;\n}\n\nfunction isFocusedElementEditable() {\n const { activeElement, body } = document;\n if (!activeElement)\n return false;\n if (activeElement === body)\n return false;\n switch (activeElement.tagName) {\n case \"INPUT\":\n case \"TEXTAREA\":\n return true;\n }\n return activeElement.hasAttribute(\"contenteditable\");\n}\nfunction isTypedCharValid({\n keyCode,\n metaKey,\n ctrlKey,\n altKey\n}) {\n if (metaKey || ctrlKey || altKey)\n return false;\n if (keyCode >= 48 && keyCode <= 57)\n return true;\n if (keyCode >= 65 && keyCode <= 90)\n return true;\n if (keyCode >= 97 && keyCode <= 122)\n return true;\n return false;\n}\nfunction onStartTyping(callback, options = {}) {\n const { document: document2 = defaultDocument } = options;\n const keydown = (event) => {\n !isFocusedElementEditable() && isTypedCharValid(event) && callback(event);\n };\n if (document2)\n useEventListener(document2, \"keydown\", keydown, { passive: true });\n}\n\nfunction templateRef(key, initialValue = null) {\n const instance = getCurrentInstance();\n let _trigger = () => {\n };\n const element = customRef((track, trigger) => {\n _trigger = trigger;\n return {\n get() {\n var _a, _b;\n track();\n return (_b = (_a = instance == null ? void 0 : instance.proxy) == null ? void 0 : _a.$refs[key]) != null ? _b : initialValue;\n },\n set() {\n }\n };\n });\n tryOnMounted(_trigger);\n onUpdated(_trigger);\n return element;\n}\n\nfunction useMounted() {\n const isMounted = ref(false);\n const instance = getCurrentInstance();\n if (instance) {\n onMounted(() => {\n isMounted.value = true;\n }, isVue2 ? void 0 : instance);\n }\n return isMounted;\n}\n\nfunction useSupported(callback) {\n const isMounted = useMounted();\n return computed(() => {\n isMounted.value;\n return Boolean(callback());\n });\n}\n\nfunction useMutationObserver(target, callback, options = {}) {\n const { window = defaultWindow, ...mutationOptions } = options;\n let observer;\n const isSupported = useSupported(() => window && \"MutationObserver\" in window);\n const cleanup = () => {\n if (observer) {\n observer.disconnect();\n observer = void 0;\n }\n };\n const targets = computed(() => {\n const value = toValue(target);\n const items = (Array.isArray(value) ? value : [value]).map(unrefElement).filter(notNullish);\n return new Set(items);\n });\n const stopWatch = watch(\n () => targets.value,\n (targets2) => {\n cleanup();\n if (isSupported.value && targets2.size) {\n observer = new MutationObserver(callback);\n targets2.forEach((el) => observer.observe(el, mutationOptions));\n }\n },\n { immediate: true, flush: \"post\" }\n );\n const takeRecords = () => {\n return observer == null ? void 0 : observer.takeRecords();\n };\n const stop = () => {\n cleanup();\n stopWatch();\n };\n tryOnScopeDispose(stop);\n return {\n isSupported,\n stop,\n takeRecords\n };\n}\n\nfunction useActiveElement(options = {}) {\n var _a;\n const {\n window = defaultWindow,\n deep = true,\n triggerOnRemoval = false\n } = options;\n const document = (_a = options.document) != null ? _a : window == null ? void 0 : window.document;\n const getDeepActiveElement = () => {\n var _a2;\n let element = document == null ? void 0 : document.activeElement;\n if (deep) {\n while (element == null ? void 0 : element.shadowRoot)\n element = (_a2 = element == null ? void 0 : element.shadowRoot) == null ? void 0 : _a2.activeElement;\n }\n return element;\n };\n const activeElement = ref();\n const trigger = () => {\n activeElement.value = getDeepActiveElement();\n };\n if (window) {\n useEventListener(window, \"blur\", (event) => {\n if (event.relatedTarget !== null)\n return;\n trigger();\n }, true);\n useEventListener(window, \"focus\", trigger, true);\n }\n if (triggerOnRemoval) {\n useMutationObserver(document, (mutations) => {\n mutations.filter((m) => m.removedNodes.length).map((n) => Array.from(n.removedNodes)).flat().forEach((node) => {\n if (node === activeElement.value)\n trigger();\n });\n }, {\n childList: true,\n subtree: true\n });\n }\n trigger();\n return activeElement;\n}\n\nfunction useRafFn(fn, options = {}) {\n const {\n immediate = true,\n fpsLimit = void 0,\n window = defaultWindow\n } = options;\n const isActive = ref(false);\n const intervalLimit = fpsLimit ? 1e3 / fpsLimit : null;\n let previousFrameTimestamp = 0;\n let rafId = null;\n function loop(timestamp) {\n if (!isActive.value || !window)\n return;\n if (!previousFrameTimestamp)\n previousFrameTimestamp = timestamp;\n const delta = timestamp - previousFrameTimestamp;\n if (intervalLimit && delta < intervalLimit) {\n rafId = window.requestAnimationFrame(loop);\n return;\n }\n previousFrameTimestamp = timestamp;\n fn({ delta, timestamp });\n rafId = window.requestAnimationFrame(loop);\n }\n function resume() {\n if (!isActive.value && window) {\n isActive.value = true;\n previousFrameTimestamp = 0;\n rafId = window.requestAnimationFrame(loop);\n }\n }\n function pause() {\n isActive.value = false;\n if (rafId != null && window) {\n window.cancelAnimationFrame(rafId);\n rafId = null;\n }\n }\n if (immediate)\n resume();\n tryOnScopeDispose(pause);\n return {\n isActive: readonly(isActive),\n pause,\n resume\n };\n}\n\nfunction useAnimate(target, keyframes, options) {\n let config;\n let animateOptions;\n if (isObject(options)) {\n config = options;\n animateOptions = objectOmit(options, [\"window\", \"immediate\", \"commitStyles\", \"persist\", \"onReady\", \"onError\"]);\n } else {\n config = { duration: options };\n animateOptions = options;\n }\n const {\n window = defaultWindow,\n immediate = true,\n commitStyles,\n persist,\n playbackRate: _playbackRate = 1,\n onReady,\n onError = (e) => {\n console.error(e);\n }\n } = config;\n const isSupported = useSupported(() => window && HTMLElement && \"animate\" in HTMLElement.prototype);\n const animate = shallowRef(void 0);\n const store = shallowReactive({\n startTime: null,\n currentTime: null,\n timeline: null,\n playbackRate: _playbackRate,\n pending: false,\n playState: immediate ? \"idle\" : \"paused\",\n replaceState: \"active\"\n });\n const pending = computed(() => store.pending);\n const playState = computed(() => store.playState);\n const replaceState = computed(() => store.replaceState);\n const startTime = computed({\n get() {\n return store.startTime;\n },\n set(value) {\n store.startTime = value;\n if (animate.value)\n animate.value.startTime = value;\n }\n });\n const currentTime = computed({\n get() {\n return store.currentTime;\n },\n set(value) {\n store.currentTime = value;\n if (animate.value) {\n animate.value.currentTime = value;\n syncResume();\n }\n }\n });\n const timeline = computed({\n get() {\n return store.timeline;\n },\n set(value) {\n store.timeline = value;\n if (animate.value)\n animate.value.timeline = value;\n }\n });\n const playbackRate = computed({\n get() {\n return store.playbackRate;\n },\n set(value) {\n store.playbackRate = value;\n if (animate.value)\n animate.value.playbackRate = value;\n }\n });\n const play = () => {\n if (animate.value) {\n try {\n animate.value.play();\n syncResume();\n } catch (e) {\n syncPause();\n onError(e);\n }\n } else {\n update();\n }\n };\n const pause = () => {\n var _a;\n try {\n (_a = animate.value) == null ? void 0 : _a.pause();\n syncPause();\n } catch (e) {\n onError(e);\n }\n };\n const reverse = () => {\n var _a;\n !animate.value && update();\n try {\n (_a = animate.value) == null ? void 0 : _a.reverse();\n syncResume();\n } catch (e) {\n syncPause();\n onError(e);\n }\n };\n const finish = () => {\n var _a;\n try {\n (_a = animate.value) == null ? void 0 : _a.finish();\n syncPause();\n } catch (e) {\n onError(e);\n }\n };\n const cancel = () => {\n var _a;\n try {\n (_a = animate.value) == null ? void 0 : _a.cancel();\n syncPause();\n } catch (e) {\n onError(e);\n }\n };\n watch(() => unrefElement(target), (el) => {\n el && update();\n });\n watch(() => keyframes, (value) => {\n !animate.value && update();\n if (!unrefElement(target) && animate.value) {\n animate.value.effect = new KeyframeEffect(\n unrefElement(target),\n toValue(value),\n animateOptions\n );\n }\n }, { deep: true });\n tryOnMounted(() => {\n nextTick(() => update(true));\n });\n tryOnScopeDispose(cancel);\n function update(init) {\n const el = unrefElement(target);\n if (!isSupported.value || !el)\n return;\n if (!animate.value)\n animate.value = el.animate(toValue(keyframes), animateOptions);\n if (persist)\n animate.value.persist();\n if (_playbackRate !== 1)\n animate.value.playbackRate = _playbackRate;\n if (init && !immediate)\n animate.value.pause();\n else\n syncResume();\n onReady == null ? void 0 : onReady(animate.value);\n }\n useEventListener(animate, [\"cancel\", \"finish\", \"remove\"], syncPause);\n useEventListener(animate, \"finish\", () => {\n var _a;\n if (commitStyles)\n (_a = animate.value) == null ? void 0 : _a.commitStyles();\n });\n const { resume: resumeRef, pause: pauseRef } = useRafFn(() => {\n if (!animate.value)\n return;\n store.pending = animate.value.pending;\n store.playState = animate.value.playState;\n store.replaceState = animate.value.replaceState;\n store.startTime = animate.value.startTime;\n store.currentTime = animate.value.currentTime;\n store.timeline = animate.value.timeline;\n store.playbackRate = animate.value.playbackRate;\n }, { immediate: false });\n function syncResume() {\n if (isSupported.value)\n resumeRef();\n }\n function syncPause() {\n if (isSupported.value && window)\n window.requestAnimationFrame(pauseRef);\n }\n return {\n isSupported,\n animate,\n // actions\n play,\n pause,\n reverse,\n finish,\n cancel,\n // state\n pending,\n playState,\n replaceState,\n startTime,\n currentTime,\n timeline,\n playbackRate\n };\n}\n\nfunction useAsyncQueue(tasks, options) {\n const {\n interrupt = true,\n onError = noop,\n onFinished = noop,\n signal\n } = options || {};\n const promiseState = {\n aborted: \"aborted\",\n fulfilled: \"fulfilled\",\n pending: \"pending\",\n rejected: \"rejected\"\n };\n const initialResult = Array.from(Array.from({ length: tasks.length }), () => ({ state: promiseState.pending, data: null }));\n const result = reactive(initialResult);\n const activeIndex = ref(-1);\n if (!tasks || tasks.length === 0) {\n onFinished();\n return {\n activeIndex,\n result\n };\n }\n function updateResult(state, res) {\n activeIndex.value++;\n result[activeIndex.value].data = res;\n result[activeIndex.value].state = state;\n }\n tasks.reduce((prev, curr) => {\n return prev.then((prevRes) => {\n var _a;\n if (signal == null ? void 0 : signal.aborted) {\n updateResult(promiseState.aborted, new Error(\"aborted\"));\n return;\n }\n if (((_a = result[activeIndex.value]) == null ? void 0 : _a.state) === promiseState.rejected && interrupt) {\n onFinished();\n return;\n }\n const done = curr(prevRes).then((currentRes) => {\n updateResult(promiseState.fulfilled, currentRes);\n activeIndex.value === tasks.length - 1 && onFinished();\n return currentRes;\n });\n if (!signal)\n return done;\n return Promise.race([done, whenAborted(signal)]);\n }).catch((e) => {\n if (signal == null ? void 0 : signal.aborted) {\n updateResult(promiseState.aborted, e);\n return e;\n }\n updateResult(promiseState.rejected, e);\n onError();\n return e;\n });\n }, Promise.resolve());\n return {\n activeIndex,\n result\n };\n}\nfunction whenAborted(signal) {\n return new Promise((resolve, reject) => {\n const error = new Error(\"aborted\");\n if (signal.aborted)\n reject(error);\n else\n signal.addEventListener(\"abort\", () => reject(error), { once: true });\n });\n}\n\nfunction useAsyncState(promise, initialState, options) {\n const {\n immediate = true,\n delay = 0,\n onError = noop,\n onSuccess = noop,\n resetOnExecute = true,\n shallow = true,\n throwError\n } = options != null ? options : {};\n const state = shallow ? shallowRef(initialState) : ref(initialState);\n const isReady = ref(false);\n const isLoading = ref(false);\n const error = shallowRef(void 0);\n async function execute(delay2 = 0, ...args) {\n if (resetOnExecute)\n state.value = initialState;\n error.value = void 0;\n isReady.value = false;\n isLoading.value = true;\n if (delay2 > 0)\n await promiseTimeout(delay2);\n const _promise = typeof promise === \"function\" ? promise(...args) : promise;\n try {\n const data = await _promise;\n state.value = data;\n isReady.value = true;\n onSuccess(data);\n } catch (e) {\n error.value = e;\n onError(e);\n if (throwError)\n throw e;\n } finally {\n isLoading.value = false;\n }\n return state.value;\n }\n if (immediate)\n execute(delay);\n const shell = {\n state,\n isReady,\n isLoading,\n error,\n execute\n };\n function waitUntilIsLoaded() {\n return new Promise((resolve, reject) => {\n until(isLoading).toBe(false).then(() => resolve(shell)).catch(reject);\n });\n }\n return {\n ...shell,\n then(onFulfilled, onRejected) {\n return waitUntilIsLoaded().then(onFulfilled, onRejected);\n }\n };\n}\n\nconst defaults = {\n array: (v) => JSON.stringify(v),\n object: (v) => JSON.stringify(v),\n set: (v) => JSON.stringify(Array.from(v)),\n map: (v) => JSON.stringify(Object.fromEntries(v)),\n null: () => \"\"\n};\nfunction getDefaultSerialization(target) {\n if (!target)\n return defaults.null;\n if (target instanceof Map)\n return defaults.map;\n else if (target instanceof Set)\n return defaults.set;\n else if (Array.isArray(target))\n return defaults.array;\n else\n return defaults.object;\n}\n\nfunction useBase64(target, options) {\n const base64 = ref(\"\");\n const promise = ref();\n function execute() {\n if (!isClient)\n return;\n promise.value = new Promise((resolve, reject) => {\n try {\n const _target = toValue(target);\n if (_target == null) {\n resolve(\"\");\n } else if (typeof _target === \"string\") {\n resolve(blobToBase64(new Blob([_target], { type: \"text/plain\" })));\n } else if (_target instanceof Blob) {\n resolve(blobToBase64(_target));\n } else if (_target instanceof ArrayBuffer) {\n resolve(window.btoa(String.fromCharCode(...new Uint8Array(_target))));\n } else if (_target instanceof HTMLCanvasElement) {\n resolve(_target.toDataURL(options == null ? void 0 : options.type, options == null ? void 0 : options.quality));\n } else if (_target instanceof HTMLImageElement) {\n const img = _target.cloneNode(false);\n img.crossOrigin = \"Anonymous\";\n imgLoaded(img).then(() => {\n const canvas = document.createElement(\"canvas\");\n const ctx = canvas.getContext(\"2d\");\n canvas.width = img.width;\n canvas.height = img.height;\n ctx.drawImage(img, 0, 0, canvas.width, canvas.height);\n resolve(canvas.toDataURL(options == null ? void 0 : options.type, options == null ? void 0 : options.quality));\n }).catch(reject);\n } else if (typeof _target === \"object\") {\n const _serializeFn = (options == null ? void 0 : options.serializer) || getDefaultSerialization(_target);\n const serialized = _serializeFn(_target);\n return resolve(blobToBase64(new Blob([serialized], { type: \"application/json\" })));\n } else {\n reject(new Error(\"target is unsupported types\"));\n }\n } catch (error) {\n reject(error);\n }\n });\n promise.value.then((res) => base64.value = res);\n return promise.value;\n }\n if (isRef(target) || typeof target === \"function\")\n watch(target, execute, { immediate: true });\n else\n execute();\n return {\n base64,\n promise,\n execute\n };\n}\nfunction imgLoaded(img) {\n return new Promise((resolve, reject) => {\n if (!img.complete) {\n img.onload = () => {\n resolve();\n };\n img.onerror = reject;\n } else {\n resolve();\n }\n });\n}\nfunction blobToBase64(blob) {\n return new Promise((resolve, reject) => {\n const fr = new FileReader();\n fr.onload = (e) => {\n resolve(e.target.result);\n };\n fr.onerror = reject;\n fr.readAsDataURL(blob);\n });\n}\n\nfunction useBattery(options = {}) {\n const { navigator = defaultNavigator } = options;\n const events = [\"chargingchange\", \"chargingtimechange\", \"dischargingtimechange\", \"levelchange\"];\n const isSupported = useSupported(() => navigator && \"getBattery\" in navigator && typeof navigator.getBattery === \"function\");\n const charging = ref(false);\n const chargingTime = ref(0);\n const dischargingTime = ref(0);\n const level = ref(1);\n let battery;\n function updateBatteryInfo() {\n charging.value = this.charging;\n chargingTime.value = this.chargingTime || 0;\n dischargingTime.value = this.dischargingTime || 0;\n level.value = this.level;\n }\n if (isSupported.value) {\n navigator.getBattery().then((_battery) => {\n battery = _battery;\n updateBatteryInfo.call(battery);\n useEventListener(battery, events, updateBatteryInfo, { passive: true });\n });\n }\n return {\n isSupported,\n charging,\n chargingTime,\n dischargingTime,\n level\n };\n}\n\nfunction useBluetooth(options) {\n let {\n acceptAllDevices = false\n } = options || {};\n const {\n filters = void 0,\n optionalServices = void 0,\n navigator = defaultNavigator\n } = options || {};\n const isSupported = useSupported(() => navigator && \"bluetooth\" in navigator);\n const device = shallowRef(void 0);\n const error = shallowRef(null);\n watch(device, () => {\n connectToBluetoothGATTServer();\n });\n async function requestDevice() {\n if (!isSupported.value)\n return;\n error.value = null;\n if (filters && filters.length > 0)\n acceptAllDevices = false;\n try {\n device.value = await (navigator == null ? void 0 : navigator.bluetooth.requestDevice({\n acceptAllDevices,\n filters,\n optionalServices\n }));\n } catch (err) {\n error.value = err;\n }\n }\n const server = ref();\n const isConnected = computed(() => {\n var _a;\n return ((_a = server.value) == null ? void 0 : _a.connected) || false;\n });\n async function connectToBluetoothGATTServer() {\n error.value = null;\n if (device.value && device.value.gatt) {\n device.value.addEventListener(\"gattserverdisconnected\", () => {\n });\n try {\n server.value = await device.value.gatt.connect();\n } catch (err) {\n error.value = err;\n }\n }\n }\n tryOnMounted(() => {\n var _a;\n if (device.value)\n (_a = device.value.gatt) == null ? void 0 : _a.connect();\n });\n tryOnScopeDispose(() => {\n var _a;\n if (device.value)\n (_a = device.value.gatt) == null ? void 0 : _a.disconnect();\n });\n return {\n isSupported,\n isConnected,\n // Device:\n device,\n requestDevice,\n // Server:\n server,\n // Errors:\n error\n };\n}\n\nfunction useMediaQuery(query, options = {}) {\n const { window = defaultWindow } = options;\n const isSupported = useSupported(() => window && \"matchMedia\" in window && typeof window.matchMedia === \"function\");\n let mediaQuery;\n const matches = ref(false);\n const handler = (event) => {\n matches.value = event.matches;\n };\n const cleanup = () => {\n if (!mediaQuery)\n return;\n if (\"removeEventListener\" in mediaQuery)\n mediaQuery.removeEventListener(\"change\", handler);\n else\n mediaQuery.removeListener(handler);\n };\n const stopWatch = watchEffect(() => {\n if (!isSupported.value)\n return;\n cleanup();\n mediaQuery = window.matchMedia(toValue(query));\n if (\"addEventListener\" in mediaQuery)\n mediaQuery.addEventListener(\"change\", handler);\n else\n mediaQuery.addListener(handler);\n matches.value = mediaQuery.matches;\n });\n tryOnScopeDispose(() => {\n stopWatch();\n cleanup();\n mediaQuery = void 0;\n });\n return matches;\n}\n\nconst breakpointsTailwind = {\n \"sm\": 640,\n \"md\": 768,\n \"lg\": 1024,\n \"xl\": 1280,\n \"2xl\": 1536\n};\nconst breakpointsBootstrapV5 = {\n xs: 0,\n sm: 576,\n md: 768,\n lg: 992,\n xl: 1200,\n xxl: 1400\n};\nconst breakpointsVuetifyV2 = {\n xs: 0,\n sm: 600,\n md: 960,\n lg: 1264,\n xl: 1904\n};\nconst breakpointsVuetifyV3 = {\n xs: 0,\n sm: 600,\n md: 960,\n lg: 1280,\n xl: 1920,\n xxl: 2560\n};\nconst breakpointsVuetify = breakpointsVuetifyV2;\nconst breakpointsAntDesign = {\n xs: 480,\n sm: 576,\n md: 768,\n lg: 992,\n xl: 1200,\n xxl: 1600\n};\nconst breakpointsQuasar = {\n xs: 0,\n sm: 600,\n md: 1024,\n lg: 1440,\n xl: 1920\n};\nconst breakpointsSematic = {\n mobileS: 320,\n mobileM: 375,\n mobileL: 425,\n tablet: 768,\n laptop: 1024,\n laptopL: 1440,\n desktop4K: 2560\n};\nconst breakpointsMasterCss = {\n \"3xs\": 360,\n \"2xs\": 480,\n \"xs\": 600,\n \"sm\": 768,\n \"md\": 1024,\n \"lg\": 1280,\n \"xl\": 1440,\n \"2xl\": 1600,\n \"3xl\": 1920,\n \"4xl\": 2560\n};\nconst breakpointsPrimeFlex = {\n sm: 576,\n md: 768,\n lg: 992,\n xl: 1200\n};\n\nfunction useBreakpoints(breakpoints, options = {}) {\n function getValue(k, delta) {\n let v = toValue(breakpoints[toValue(k)]);\n if (delta != null)\n v = increaseWithUnit(v, delta);\n if (typeof v === \"number\")\n v = `${v}px`;\n return v;\n }\n const { window = defaultWindow, strategy = \"min-width\" } = options;\n function match(query) {\n if (!window)\n return false;\n return window.matchMedia(query).matches;\n }\n const greaterOrEqual = (k) => {\n return useMediaQuery(() => `(min-width: ${getValue(k)})`, options);\n };\n const smallerOrEqual = (k) => {\n return useMediaQuery(() => `(max-width: ${getValue(k)})`, options);\n };\n const shortcutMethods = Object.keys(breakpoints).reduce((shortcuts, k) => {\n Object.defineProperty(shortcuts, k, {\n get: () => strategy === \"min-width\" ? greaterOrEqual(k) : smallerOrEqual(k),\n enumerable: true,\n configurable: true\n });\n return shortcuts;\n }, {});\n function current() {\n const points = Object.keys(breakpoints).map((i) => [i, greaterOrEqual(i)]);\n return computed(() => points.filter(([, v]) => v.value).map(([k]) => k));\n }\n return Object.assign(shortcutMethods, {\n greaterOrEqual,\n smallerOrEqual,\n greater(k) {\n return useMediaQuery(() => `(min-width: ${getValue(k, 0.1)})`, options);\n },\n smaller(k) {\n return useMediaQuery(() => `(max-width: ${getValue(k, -0.1)})`, options);\n },\n between(a, b) {\n return useMediaQuery(() => `(min-width: ${getValue(a)}) and (max-width: ${getValue(b, -0.1)})`, options);\n },\n isGreater(k) {\n return match(`(min-width: ${getValue(k, 0.1)})`);\n },\n isGreaterOrEqual(k) {\n return match(`(min-width: ${getValue(k)})`);\n },\n isSmaller(k) {\n return match(`(max-width: ${getValue(k, -0.1)})`);\n },\n isSmallerOrEqual(k) {\n return match(`(max-width: ${getValue(k)})`);\n },\n isInBetween(a, b) {\n return match(`(min-width: ${getValue(a)}) and (max-width: ${getValue(b, -0.1)})`);\n },\n current,\n active() {\n const bps = current();\n return computed(() => bps.value.length === 0 ? \"\" : bps.value.at(-1));\n }\n });\n}\n\nfunction useBroadcastChannel(options) {\n const {\n name,\n window = defaultWindow\n } = options;\n const isSupported = useSupported(() => window && \"BroadcastChannel\" in window);\n const isClosed = ref(false);\n const channel = ref();\n const data = ref();\n const error = shallowRef(null);\n const post = (data2) => {\n if (channel.value)\n channel.value.postMessage(data2);\n };\n const close = () => {\n if (channel.value)\n channel.value.close();\n isClosed.value = true;\n };\n if (isSupported.value) {\n tryOnMounted(() => {\n error.value = null;\n channel.value = new BroadcastChannel(name);\n channel.value.addEventListener(\"message\", (e) => {\n data.value = e.data;\n }, { passive: true });\n channel.value.addEventListener(\"messageerror\", (e) => {\n error.value = e;\n }, { passive: true });\n channel.value.addEventListener(\"close\", () => {\n isClosed.value = true;\n });\n });\n }\n tryOnScopeDispose(() => {\n close();\n });\n return {\n isSupported,\n channel,\n data,\n post,\n close,\n error,\n isClosed\n };\n}\n\nconst WRITABLE_PROPERTIES = [\n \"hash\",\n \"host\",\n \"hostname\",\n \"href\",\n \"pathname\",\n \"port\",\n \"protocol\",\n \"search\"\n];\nfunction useBrowserLocation(options = {}) {\n const { window = defaultWindow } = options;\n const refs = Object.fromEntries(\n WRITABLE_PROPERTIES.map((key) => [key, ref()])\n );\n for (const [key, ref2] of objectEntries(refs)) {\n watch(ref2, (value) => {\n if (!(window == null ? void 0 : window.location) || window.location[key] === value)\n return;\n window.location[key] = value;\n });\n }\n const buildState = (trigger) => {\n var _a;\n const { state: state2, length } = (window == null ? void 0 : window.history) || {};\n const { origin } = (window == null ? void 0 : window.location) || {};\n for (const key of WRITABLE_PROPERTIES)\n refs[key].value = (_a = window == null ? void 0 : window.location) == null ? void 0 : _a[key];\n return reactive({\n trigger,\n state: state2,\n length,\n origin,\n ...refs\n });\n };\n const state = ref(buildState(\"load\"));\n if (window) {\n useEventListener(window, \"popstate\", () => state.value = buildState(\"popstate\"), { passive: true });\n useEventListener(window, \"hashchange\", () => state.value = buildState(\"hashchange\"), { passive: true });\n }\n return state;\n}\n\nfunction useCached(refValue, comparator = (a, b) => a === b, watchOptions) {\n const cachedValue = ref(refValue.value);\n watch(() => refValue.value, (value) => {\n if (!comparator(value, cachedValue.value))\n cachedValue.value = value;\n }, watchOptions);\n return cachedValue;\n}\n\nfunction usePermission(permissionDesc, options = {}) {\n const {\n controls = false,\n navigator = defaultNavigator\n } = options;\n const isSupported = useSupported(() => navigator && \"permissions\" in navigator);\n let permissionStatus;\n const desc = typeof permissionDesc === \"string\" ? { name: permissionDesc } : permissionDesc;\n const state = ref();\n const onChange = () => {\n if (permissionStatus)\n state.value = permissionStatus.state;\n };\n const query = createSingletonPromise(async () => {\n if (!isSupported.value)\n return;\n if (!permissionStatus) {\n try {\n permissionStatus = await navigator.permissions.query(desc);\n useEventListener(permissionStatus, \"change\", onChange);\n onChange();\n } catch (e) {\n state.value = \"prompt\";\n }\n }\n return permissionStatus;\n });\n query();\n if (controls) {\n return {\n state,\n isSupported,\n query\n };\n } else {\n return state;\n }\n}\n\nfunction useClipboard(options = {}) {\n const {\n navigator = defaultNavigator,\n read = false,\n source,\n copiedDuring = 1500,\n legacy = false\n } = options;\n const isClipboardApiSupported = useSupported(() => navigator && \"clipboard\" in navigator);\n const permissionRead = usePermission(\"clipboard-read\");\n const permissionWrite = usePermission(\"clipboard-write\");\n const isSupported = computed(() => isClipboardApiSupported.value || legacy);\n const text = ref(\"\");\n const copied = ref(false);\n const timeout = useTimeoutFn(() => copied.value = false, copiedDuring);\n function updateText() {\n if (isClipboardApiSupported.value && isAllowed(permissionRead.value)) {\n navigator.clipboard.readText().then((value) => {\n text.value = value;\n });\n } else {\n text.value = legacyRead();\n }\n }\n if (isSupported.value && read)\n useEventListener([\"copy\", \"cut\"], updateText);\n async function copy(value = toValue(source)) {\n if (isSupported.value && value != null) {\n if (isClipboardApiSupported.value && isAllowed(permissionWrite.value))\n await navigator.clipboard.writeText(value);\n else\n legacyCopy(value);\n text.value = value;\n copied.value = true;\n timeout.start();\n }\n }\n function legacyCopy(value) {\n const ta = document.createElement(\"textarea\");\n ta.value = value != null ? value : \"\";\n ta.style.position = \"absolute\";\n ta.style.opacity = \"0\";\n document.body.appendChild(ta);\n ta.select();\n document.execCommand(\"copy\");\n ta.remove();\n }\n function legacyRead() {\n var _a, _b, _c;\n return (_c = (_b = (_a = document == null ? void 0 : document.getSelection) == null ? void 0 : _a.call(document)) == null ? void 0 : _b.toString()) != null ? _c : \"\";\n }\n function isAllowed(status) {\n return status === \"granted\" || status === \"prompt\";\n }\n return {\n isSupported,\n text,\n copied,\n copy\n };\n}\n\nfunction useClipboardItems(options = {}) {\n const {\n navigator = defaultNavigator,\n read = false,\n source,\n copiedDuring = 1500\n } = options;\n const isSupported = useSupported(() => navigator && \"clipboard\" in navigator);\n const content = ref([]);\n const copied = ref(false);\n const timeout = useTimeoutFn(() => copied.value = false, copiedDuring);\n function updateContent() {\n if (isSupported.value) {\n navigator.clipboard.read().then((items) => {\n content.value = items;\n });\n }\n }\n if (isSupported.value && read)\n useEventListener([\"copy\", \"cut\"], updateContent);\n async function copy(value = toValue(source)) {\n if (isSupported.value && value != null) {\n await navigator.clipboard.write(value);\n content.value = value;\n copied.value = true;\n timeout.start();\n }\n }\n return {\n isSupported,\n content,\n copied,\n copy\n };\n}\n\nfunction cloneFnJSON(source) {\n return JSON.parse(JSON.stringify(source));\n}\nfunction useCloned(source, options = {}) {\n const cloned = ref({});\n const {\n manual,\n clone = cloneFnJSON,\n // watch options\n deep = true,\n immediate = true\n } = options;\n function sync() {\n cloned.value = clone(toValue(source));\n }\n if (!manual && (isRef(source) || typeof source === \"function\")) {\n watch(source, sync, {\n ...options,\n deep,\n immediate\n });\n } else {\n sync();\n }\n return { cloned, sync };\n}\n\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 if (!(globalKey in _global))\n _global[globalKey] = _global[globalKey] || {};\n return _global[globalKey];\n}\nfunction getSSRHandler(key, fallback) {\n return handlers[key] || fallback;\n}\nfunction setSSRHandler(key, fn) {\n handlers[key] = fn;\n}\n\nfunction guessSerializerType(rawInit) {\n return 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\nconst StorageSerializers = {\n boolean: {\n read: (v) => v === \"true\",\n write: (v) => String(v)\n },\n object: {\n read: (v) => JSON.parse(v),\n write: (v) => JSON.stringify(v)\n },\n number: {\n read: (v) => Number.parseFloat(v),\n write: (v) => String(v)\n },\n any: {\n read: (v) => v,\n write: (v) => String(v)\n },\n string: {\n read: (v) => v,\n write: (v) => String(v)\n },\n map: {\n read: (v) => new Map(JSON.parse(v)),\n write: (v) => JSON.stringify(Array.from(v.entries()))\n },\n set: {\n read: (v) => new Set(JSON.parse(v)),\n write: (v) => JSON.stringify(Array.from(v))\n },\n date: {\n read: (v) => new Date(v),\n write: (v) => v.toISOString()\n }\n};\nconst customStorageEventName = \"vueuse-storage\";\nfunction useStorage(key, defaults, storage, options = {}) {\n var _a;\n const {\n flush = \"pre\",\n deep = true,\n listenToStorageChanges = true,\n writeDefaults = true,\n mergeDefaults = false,\n shallow,\n window = defaultWindow,\n eventFilter,\n onError = (e) => {\n console.error(e);\n },\n initOnMounted\n } = options;\n const data = (shallow ? shallowRef : ref)(typeof defaults === \"function\" ? defaults() : defaults);\n if (!storage) {\n try {\n storage = getSSRHandler(\"getDefaultStorage\", () => {\n var _a2;\n return (_a2 = defaultWindow) == null ? void 0 : _a2.localStorage;\n })();\n } catch (e) {\n onError(e);\n }\n }\n if (!storage)\n return data;\n const rawInit = toValue(defaults);\n const type = guessSerializerType(rawInit);\n const serializer = (_a = options.serializer) != null ? _a : StorageSerializers[type];\n const { pause: pauseWatch, resume: resumeWatch } = pausableWatch(\n data,\n () => write(data.value),\n { flush, deep, eventFilter }\n );\n if (window && listenToStorageChanges) {\n tryOnMounted(() => {\n useEventListener(window, \"storage\", update);\n useEventListener(window, customStorageEventName, updateFromCustomEvent);\n if (initOnMounted)\n update();\n });\n }\n if (!initOnMounted)\n update();\n function dispatchWriteEvent(oldValue, newValue) {\n if (window) {\n window.dispatchEvent(new CustomEvent(customStorageEventName, {\n detail: {\n key,\n oldValue,\n newValue,\n storageArea: storage\n }\n }));\n }\n }\n function write(v) {\n try {\n const oldValue = storage.getItem(key);\n if (v == null) {\n dispatchWriteEvent(oldValue, null);\n storage.removeItem(key);\n } else {\n const serialized = serializer.write(v);\n if (oldValue !== serialized) {\n storage.setItem(key, serialized);\n dispatchWriteEvent(oldValue, serialized);\n }\n }\n } catch (e) {\n onError(e);\n }\n }\n function read(event) {\n const rawValue = event ? event.newValue : storage.getItem(key);\n if (rawValue == null) {\n if (writeDefaults && rawInit != null)\n storage.setItem(key, serializer.write(rawInit));\n return rawInit;\n } else if (!event && mergeDefaults) {\n const value = serializer.read(rawValue);\n if (typeof mergeDefaults === \"function\")\n return mergeDefaults(value, rawInit);\n else if (type === \"object\" && !Array.isArray(value))\n return { ...rawInit, ...value };\n return value;\n } else if (typeof rawValue !== \"string\") {\n return rawValue;\n } else {\n return serializer.read(rawValue);\n }\n }\n function update(event) {\n if (event && event.storageArea !== storage)\n return;\n if (event && event.key == null) {\n data.value = rawInit;\n return;\n }\n if (event && event.key !== key)\n return;\n pauseWatch();\n try {\n if ((event == null ? void 0 : event.newValue) !== serializer.write(data.value))\n data.value = read(event);\n } catch (e) {\n onError(e);\n } finally {\n if (event)\n nextTick(resumeWatch);\n else\n resumeWatch();\n }\n }\n function updateFromCustomEvent(event) {\n update(event.detail);\n }\n return data;\n}\n\nfunction usePreferredDark(options) {\n return useMediaQuery(\"(prefers-color-scheme: dark)\", options);\n}\n\nfunction useColorMode(options = {}) {\n const {\n selector = \"html\",\n attribute = \"class\",\n initialValue = \"auto\",\n window = defaultWindow,\n storage,\n storageKey = \"vueuse-color-scheme\",\n listenToStorageChanges = true,\n storageRef,\n emitAuto,\n disableTransition = true\n } = options;\n const modes = {\n auto: \"\",\n light: \"light\",\n dark: \"dark\",\n ...options.modes || {}\n };\n const preferredDark = usePreferredDark({ window });\n const system = computed(() => preferredDark.value ? \"dark\" : \"light\");\n const store = storageRef || (storageKey == null ? toRef(initialValue) : useStorage(storageKey, initialValue, storage, { window, listenToStorageChanges }));\n const state = computed(() => store.value === \"auto\" ? system.value : store.value);\n const updateHTMLAttrs = getSSRHandler(\n \"updateHTMLAttrs\",\n (selector2, attribute2, value) => {\n const el = typeof selector2 === \"string\" ? window == null ? void 0 : window.document.querySelector(selector2) : unrefElement(selector2);\n if (!el)\n return;\n let style;\n if (disableTransition) {\n style = window.document.createElement(\"style\");\n const styleString = \"*,*::before,*::after{-webkit-transition:none!important;-moz-transition:none!important;-o-transition:none!important;-ms-transition:none!important;transition:none!important}\";\n style.appendChild(document.createTextNode(styleString));\n window.document.head.appendChild(style);\n }\n if (attribute2 === \"class\") {\n const current = value.split(/\\s/g);\n Object.values(modes).flatMap((i) => (i || \"\").split(/\\s/g)).filter(Boolean).forEach((v) => {\n if (current.includes(v))\n el.classList.add(v);\n else\n el.classList.remove(v);\n });\n } else {\n el.setAttribute(attribute2, value);\n }\n if (disableTransition) {\n window.getComputedStyle(style).opacity;\n document.head.removeChild(style);\n }\n }\n );\n function defaultOnChanged(mode) {\n var _a;\n updateHTMLAttrs(selector, attribute, (_a = modes[mode]) != null ? _a : mode);\n }\n function onChanged(mode) {\n if (options.onChanged)\n options.onChanged(mode, defaultOnChanged);\n else\n defaultOnChanged(mode);\n }\n watch(state, onChanged, { flush: \"post\", immediate: true });\n tryOnMounted(() => onChanged(state.value));\n const auto = computed({\n get() {\n return emitAuto ? store.value : state.value;\n },\n set(v) {\n store.value = v;\n }\n });\n try {\n return Object.assign(auto, { store, system, state });\n } catch (e) {\n return auto;\n }\n}\n\nfunction useConfirmDialog(revealed = ref(false)) {\n const confirmHook = createEventHook();\n const cancelHook = createEventHook();\n const revealHook = createEventHook();\n let _resolve = noop;\n const reveal = (data) => {\n revealHook.trigger(data);\n revealed.value = true;\n return new Promise((resolve) => {\n _resolve = resolve;\n });\n };\n const confirm = (data) => {\n revealed.value = false;\n confirmHook.trigger(data);\n _resolve({ data, isCanceled: false });\n };\n const cancel = (data) => {\n revealed.value = false;\n cancelHook.trigger(data);\n _resolve({ data, isCanceled: true });\n };\n return {\n isRevealed: computed(() => revealed.value),\n reveal,\n confirm,\n cancel,\n onReveal: revealHook.on,\n onConfirm: confirmHook.on,\n onCancel: cancelHook.on\n };\n}\n\nfunction useCssVar(prop, target, options = {}) {\n const { window = defaultWindow, initialValue = \"\", observe = false } = options;\n const variable = ref(initialValue);\n const elRef = computed(() => {\n var _a;\n return unrefElement(target) || ((_a = window == null ? void 0 : window.document) == null ? void 0 : _a.documentElement);\n });\n function updateCssVar() {\n var _a;\n const key = toValue(prop);\n const el = toValue(elRef);\n if (el && window) {\n const value = (_a = window.getComputedStyle(el).getPropertyValue(key)) == null ? void 0 : _a.trim();\n variable.value = value || initialValue;\n }\n }\n if (observe) {\n useMutationObserver(elRef, updateCssVar, {\n attributeFilter: [\"style\", \"class\"],\n window\n });\n }\n watch(\n [elRef, () => toValue(prop)],\n updateCssVar,\n { immediate: true }\n );\n watch(\n variable,\n (val) => {\n var _a;\n if ((_a = elRef.value) == null ? void 0 : _a.style)\n elRef.value.style.setProperty(toValue(prop), val);\n }\n );\n return variable;\n}\n\nfunction useCurrentElement(rootComponent) {\n const vm = getCurrentInstance();\n const currentElement = computedWithControl(\n () => null,\n () => rootComponent ? unrefElement(rootComponent) : vm.proxy.$el\n );\n onUpdated(currentElement.trigger);\n onMounted(currentElement.trigger);\n return currentElement;\n}\n\nfunction useCycleList(list, options) {\n const state = shallowRef(getInitialValue());\n const listRef = toRef(list);\n const index = computed({\n get() {\n var _a;\n const targetList = listRef.value;\n let index2 = (options == null ? void 0 : options.getIndexOf) ? options.getIndexOf(state.value, targetList) : targetList.indexOf(state.value);\n if (index2 < 0)\n index2 = (_a = options == null ? void 0 : options.fallbackIndex) != null ? _a : 0;\n return index2;\n },\n set(v) {\n set(v);\n }\n });\n function set(i) {\n const targetList = listRef.value;\n const length = targetList.length;\n const index2 = (i % length + length) % length;\n const value = targetList[index2];\n state.value = value;\n return value;\n }\n function shift(delta = 1) {\n return set(index.value + delta);\n }\n function next(n = 1) {\n return shift(n);\n }\n function prev(n = 1) {\n return shift(-n);\n }\n function getInitialValue() {\n var _a, _b;\n return (_b = toValue((_a = options == null ? void 0 : options.initialValue) != null ? _a : toValue(list)[0])) != null ? _b : void 0;\n }\n watch(listRef, () => set(index.value));\n return {\n state,\n index,\n next,\n prev,\n go: set\n };\n}\n\nfunction useDark(options = {}) {\n const {\n valueDark = \"dark\",\n valueLight = \"\",\n window = defaultWindow\n } = options;\n const mode = useColorMode({\n ...options,\n onChanged: (mode2, defaultHandler) => {\n var _a;\n if (options.onChanged)\n (_a = options.onChanged) == null ? void 0 : _a.call(options, mode2 === \"dark\", defaultHandler, mode2);\n else\n defaultHandler(mode2);\n },\n modes: {\n dark: valueDark,\n light: valueLight\n }\n });\n const system = computed(() => {\n if (mode.system) {\n return mode.system.value;\n } else {\n const preferredDark = usePreferredDark({ window });\n return preferredDark.value ? \"dark\" : \"light\";\n }\n });\n const isDark = computed({\n get() {\n return mode.value === \"dark\";\n },\n set(v) {\n const modeVal = v ? \"dark\" : \"light\";\n if (system.value === modeVal)\n mode.value = \"auto\";\n else\n mode.value = modeVal;\n }\n });\n return isDark;\n}\n\nfunction fnBypass(v) {\n return v;\n}\nfunction fnSetSource(source, value) {\n return source.value = value;\n}\nfunction defaultDump(clone) {\n return clone ? typeof clone === \"function\" ? clone : cloneFnJSON : fnBypass;\n}\nfunction defaultParse(clone) {\n return clone ? typeof clone === \"function\" ? clone : cloneFnJSON : fnBypass;\n}\nfunction useManualRefHistory(source, options = {}) {\n const {\n clone = false,\n dump = defaultDump(clone),\n parse = defaultParse(clone),\n setSource = fnSetSource\n } = options;\n function _createHistoryRecord() {\n return markRaw({\n snapshot: dump(source.value),\n timestamp: timestamp()\n });\n }\n const last = ref(_createHistoryRecord());\n const undoStack = ref([]);\n const redoStack = ref([]);\n const _setSource = (record) => {\n setSource(source, parse(record.snapshot));\n last.value = record;\n };\n const commit = () => {\n undoStack.value.unshift(last.value);\n last.value = _createHistoryRecord();\n if (options.capacity && undoStack.value.length > options.capacity)\n undoStack.value.splice(options.capacity, Number.POSITIVE_INFINITY);\n if (redoStack.value.length)\n redoStack.value.splice(0, redoStack.value.length);\n };\n const clear = () => {\n undoStack.value.splice(0, undoStack.value.length);\n redoStack.value.splice(0, redoStack.value.length);\n };\n const undo = () => {\n const state = undoStack.value.shift();\n if (state) {\n redoStack.value.unshift(last.value);\n _setSource(state);\n }\n };\n const redo = () => {\n const state = redoStack.value.shift();\n if (state) {\n undoStack.value.unshift(last.value);\n _setSource(state);\n }\n };\n const reset = () => {\n _setSource(last.value);\n };\n const history = computed(() => [last.value, ...undoStack.value]);\n const canUndo = computed(() => undoStack.value.length > 0);\n const canRedo = computed(() => redoStack.value.length > 0);\n return {\n source,\n undoStack,\n redoStack,\n last,\n history,\n canUndo,\n canRedo,\n clear,\n commit,\n reset,\n undo,\n redo\n };\n}\n\nfunction useRefHistory(source, options = {}) {\n const {\n deep = false,\n flush = \"pre\",\n eventFilter\n } = options;\n const {\n eventFilter: composedFilter,\n pause,\n resume: resumeTracking,\n isActive: isTracking\n } = pausableFilter(eventFilter);\n const {\n ignoreUpdates,\n ignorePrevAsyncUpdates,\n stop\n } = watchIgnorable(\n source,\n commit,\n { deep, flush, eventFilter: composedFilter }\n );\n function setSource(source2, value) {\n ignorePrevAsyncUpdates();\n ignoreUpdates(() => {\n source2.value = value;\n });\n }\n const manualHistory = useManualRefHistory(source, { ...options, clone: options.clone || deep, setSource });\n const { clear, commit: manualCommit } = manualHistory;\n function commit() {\n ignorePrevAsyncUpdates();\n manualCommit();\n }\n function resume(commitNow) {\n resumeTracking();\n if (commitNow)\n commit();\n }\n function batch(fn) {\n let canceled = false;\n const cancel = () => canceled = true;\n ignoreUpdates(() => {\n fn(cancel);\n });\n if (!canceled)\n commit();\n }\n function dispose() {\n stop();\n clear();\n }\n return {\n ...manualHistory,\n isTracking,\n pause,\n resume,\n commit,\n batch,\n dispose\n };\n}\n\nfunction useDebouncedRefHistory(source, options = {}) {\n const filter = options.debounce ? debounceFilter(options.debounce) : void 0;\n const history = useRefHistory(source, { ...options, eventFilter: filter });\n return {\n ...history\n };\n}\n\nfunction useDeviceMotion(options = {}) {\n const {\n window = defaultWindow,\n eventFilter = bypassFilter\n } = options;\n const acceleration = ref({ x: null, y: null, z: null });\n const rotationRate = ref({ alpha: null, beta: null, gamma: null });\n const interval = ref(0);\n const accelerationIncludingGravity = ref({\n x: null,\n y: null,\n z: null\n });\n if (window) {\n const onDeviceMotion = createFilterWrapper(\n eventFilter,\n (event) => {\n acceleration.value = event.acceleration;\n accelerationIncludingGravity.value = event.accelerationIncludingGravity;\n rotationRate.value = event.rotationRate;\n interval.value = event.interval;\n }\n );\n useEventListener(window, \"devicemotion\", onDeviceMotion);\n }\n return {\n acceleration,\n accelerationIncludingGravity,\n rotationRate,\n interval\n };\n}\n\nfunction useDeviceOrientation(options = {}) {\n const { window = defaultWindow } = options;\n const isSupported = useSupported(() => window && \"DeviceOrientationEvent\" in window);\n const isAbsolute = ref(false);\n const alpha = ref(null);\n const beta = ref(null);\n const gamma = ref(null);\n if (window && isSupported.value) {\n useEventListener(window, \"deviceorientation\", (event) => {\n isAbsolute.value = event.absolute;\n alpha.value = event.alpha;\n beta.value = event.beta;\n gamma.value = event.gamma;\n });\n }\n return {\n isSupported,\n isAbsolute,\n alpha,\n beta,\n gamma\n };\n}\n\nfunction useDevicePixelRatio(options = {}) {\n const {\n window = defaultWindow\n } = options;\n const pixelRatio = ref(1);\n if (window) {\n let observe2 = function() {\n pixelRatio.value = window.devicePixelRatio;\n cleanup2();\n media = window.matchMedia(`(resolution: ${pixelRatio.value}dppx)`);\n media.addEventListener(\"change\", observe2, { once: true });\n }, cleanup2 = function() {\n media == null ? void 0 : media.removeEventListener(\"change\", observe2);\n };\n let media;\n observe2();\n tryOnScopeDispose(cleanup2);\n }\n return { pixelRatio };\n}\n\nfunction useDevicesList(options = {}) {\n const {\n navigator = defaultNavigator,\n requestPermissions = false,\n constraints = { audio: true, video: true },\n onUpdated\n } = options;\n const devices = ref([]);\n const videoInputs = computed(() => devices.value.filter((i) => i.kind === \"videoinput\"));\n const audioInputs = computed(() => devices.value.filter((i) => i.kind === \"audioinput\"));\n const audioOutputs = computed(() => devices.value.filter((i) => i.kind === \"audiooutput\"));\n const isSupported = useSupported(() => navigator && navigator.mediaDevices && navigator.mediaDevices.enumerateDevices);\n const permissionGranted = ref(false);\n let stream;\n async function update() {\n if (!isSupported.value)\n return;\n devices.value = await navigator.mediaDevices.enumerateDevices();\n onUpdated == null ? void 0 : onUpdated(devices.value);\n if (stream) {\n stream.getTracks().forEach((t) => t.stop());\n stream = null;\n }\n }\n async function ensurePermissions() {\n if (!isSupported.value)\n return false;\n if (permissionGranted.value)\n return true;\n const { state, query } = usePermission(\"camera\", { controls: true });\n await query();\n if (state.value !== \"granted\") {\n stream = await navigator.mediaDevices.getUserMedia(constraints);\n update();\n permissionGranted.value = true;\n } else {\n permissionGranted.value = true;\n }\n return permissionGranted.value;\n }\n if (isSupported.value) {\n if (requestPermissions)\n ensurePermissions();\n useEventListener(navigator.mediaDevices, \"devicechange\", update);\n update();\n }\n return {\n devices,\n ensurePermissions,\n permissionGranted,\n videoInputs,\n audioInputs,\n audioOutputs,\n isSupported\n };\n}\n\nfunction useDisplayMedia(options = {}) {\n var _a;\n const enabled = ref((_a = options.enabled) != null ? _a : false);\n const video = options.video;\n const audio = options.audio;\n const { navigator = defaultNavigator } = options;\n const isSupported = useSupported(() => {\n var _a2;\n return (_a2 = navigator == null ? void 0 : navigator.mediaDevices) == null ? void 0 : _a2.getDisplayMedia;\n });\n const constraint = { audio, video };\n const stream = shallowRef();\n async function _start() {\n var _a2;\n if (!isSupported.value || stream.value)\n return;\n stream.value = await navigator.mediaDevices.getDisplayMedia(constraint);\n (_a2 = stream.value) == null ? void 0 : _a2.getTracks().forEach((t) => t.addEventListener(\"ended\", stop));\n return stream.value;\n }\n async function _stop() {\n var _a2;\n (_a2 = stream.value) == null ? void 0 : _a2.getTracks().forEach((t) => t.stop());\n stream.value = void 0;\n }\n function stop() {\n _stop();\n enabled.value = false;\n }\n async function start() {\n await _start();\n if (stream.value)\n enabled.value = true;\n return stream.value;\n }\n watch(\n enabled,\n (v) => {\n if (v)\n _start();\n else\n _stop();\n },\n { immediate: true }\n );\n return {\n isSupported,\n stream,\n start,\n stop,\n enabled\n };\n}\n\nfunction useDocumentVisibility(options = {}) {\n const { document = defaultDocument } = options;\n if (!document)\n return ref(\"visible\");\n const visibility = ref(document.visibilityState);\n useEventListener(document, \"visibilitychange\", () => {\n visibility.value = document.visibilityState;\n });\n return visibility;\n}\n\nfunction useDraggable(target, options = {}) {\n var _a, _b;\n const {\n pointerTypes,\n preventDefault,\n stopPropagation,\n exact,\n onMove,\n onEnd,\n onStart,\n initialValue,\n axis = \"both\",\n draggingElement = defaultWindow,\n containerElement,\n handle: draggingHandle = target\n } = options;\n const position = ref(\n (_a = toValue(initialValue)) != null ? _a : { x: 0, y: 0 }\n );\n const pressedDelta = ref();\n const filterEvent = (e) => {\n if (pointerTypes)\n return pointerTypes.includes(e.pointerType);\n return true;\n };\n const handleEvent = (e) => {\n if (toValue(preventDefault))\n e.preventDefault();\n if (toValue(stopPropagation))\n e.stopPropagation();\n };\n const start = (e) => {\n var _a2;\n if (e.button !== 0)\n return;\n if (toValue(options.disabled) || !filterEvent(e))\n return;\n if (toValue(exact) && e.target !== toValue(target))\n return;\n const container = toValue(containerElement);\n const containerRect = (_a2 = container == null ? void 0 : container.getBoundingClientRect) == null ? void 0 : _a2.call(container);\n const targetRect = toValue(target).getBoundingClientRect();\n const pos = {\n x: e.clientX - (container ? targetRect.left - containerRect.left + container.scrollLeft : targetRect.left),\n y: e.clientY - (container ? targetRect.top - containerRect.top + container.scrollTop : targetRect.top)\n };\n if ((onStart == null ? void 0 : onStart(pos, e)) === false)\n return;\n pressedDelta.value = pos;\n handleEvent(e);\n };\n const move = (e) => {\n if (toValue(options.disabled) || !filterEvent(e))\n return;\n if (!pressedDelta.value)\n return;\n const container = toValue(containerElement);\n const targetRect = toValue(target).getBoundingClientRect();\n let { x, y } = position.value;\n if (axis === \"x\" || axis === \"both\") {\n x = e.clientX - pressedDelta.value.x;\n if (container)\n x = Math.min(Math.max(0, x), container.scrollWidth - targetRect.width);\n }\n if (axis === \"y\" || axis === \"both\") {\n y = e.clientY - pressedDelta.value.y;\n if (container)\n y = Math.min(Math.max(0, y), container.scrollHeight - targetRect.height);\n }\n position.value = {\n x,\n y\n };\n onMove == null ? void 0 : onMove(position.value, e);\n handleEvent(e);\n };\n const end = (e) => {\n if (toValue(options.disabled) || !filterEvent(e))\n return;\n if (!pressedDelta.value)\n return;\n pressedDelta.value = void 0;\n onEnd == null ? void 0 : onEnd(position.value, e);\n handleEvent(e);\n };\n if (isClient) {\n const config = { capture: (_b = options.capture) != null ? _b : true };\n useEventListener(draggingHandle, \"pointerdown\", start, config);\n useEventListener(draggingElement, \"pointermove\", move, config);\n useEventListener(draggingElement, \"pointerup\", end, config);\n }\n return {\n ...toRefs(position),\n position,\n isDragging: computed(() => !!pressedDelta.value),\n style: computed(\n () => `left:${position.value.x}px;top:${position.value.y}px;`\n )\n };\n}\n\nfunction useDropZone(target, options = {}) {\n const isOverDropZone = ref(false);\n const files = shallowRef(null);\n let counter = 0;\n let isDataTypeIncluded = true;\n if (isClient) {\n const _options = typeof options === \"function\" ? { onDrop: options } : options;\n const getFiles = (event) => {\n var _a, _b;\n const list = Array.from((_b = (_a = event.dataTransfer) == null ? void 0 : _a.files) != null ? _b : []);\n return files.value = list.length === 0 ? null : list;\n };\n useEventListener(target, \"dragenter\", (event) => {\n var _a, _b;\n const types = Array.from(((_a = event == null ? void 0 : event.dataTransfer) == null ? void 0 : _a.items) || []).map((i) => i.kind === \"file\" ? i.type : null).filter(notNullish);\n if (_options.dataTypes && event.dataTransfer) {\n const dataTypes = unref(_options.dataTypes);\n isDataTypeIncluded = typeof dataTypes === \"function\" ? dataTypes(types) : dataTypes ? dataTypes.some((item) => types.includes(item)) : true;\n if (!isDataTypeIncluded)\n return;\n }\n event.preventDefault();\n counter += 1;\n isOverDropZone.value = true;\n (_b = _options.onEnter) == null ? void 0 : _b.call(_options, getFiles(event), event);\n });\n useEventListener(target, \"dragover\", (event) => {\n var _a;\n if (!isDataTypeIncluded)\n return;\n event.preventDefault();\n (_a = _options.onOver) == null ? void 0 : _a.call(_options, getFiles(event), event);\n });\n useEventListener(target, \"dragleave\", (event) => {\n var _a;\n if (!isDataTypeIncluded)\n return;\n event.preventDefault();\n counter -= 1;\n if (counter === 0)\n isOverDropZone.value = false;\n (_a = _options.onLeave) == null ? void 0 : _a.call(_options, getFiles(event), event);\n });\n useEventListener(target, \"drop\", (event) => {\n var _a;\n event.preventDefault();\n counter = 0;\n isOverDropZone.value = false;\n (_a = _options.onDrop) == null ? void 0 : _a.call(_options, getFiles(event), event);\n });\n }\n return {\n files,\n isOverDropZone\n };\n}\n\nfunction useResizeObserver(target, callback, options = {}) {\n const { window = defaultWindow, ...observerOptions } = options;\n let observer;\n const isSupported = useSupported(() => window && \"ResizeObserver\" in window);\n const cleanup = () => {\n if (observer) {\n observer.disconnect();\n observer = void 0;\n }\n };\n const targets = computed(() => Array.isArray(target) ? target.map((el) => unrefElement(el)) : [unrefElement(target)]);\n const stopWatch = watch(\n targets,\n (els) => {\n cleanup();\n if (isSupported.value && window) {\n observer = new ResizeObserver(callback);\n for (const _el of els)\n _el && observer.observe(_el, observerOptions);\n }\n },\n { immediate: true, flush: \"post\" }\n );\n const stop = () => {\n cleanup();\n stopWatch();\n };\n tryOnScopeDispose(stop);\n return {\n isSupported,\n stop\n };\n}\n\nfunction useElementBounding(target, options = {}) {\n const {\n reset = true,\n windowResize = true,\n windowScroll = true,\n immediate = true\n } = options;\n const height = ref(0);\n const bottom = ref(0);\n const left = ref(0);\n const right = ref(0);\n const top = ref(0);\n const width = ref(0);\n const x = ref(0);\n const y = ref(0);\n function update() {\n const el = unrefElement(target);\n if (!el) {\n if (reset) {\n height.value = 0;\n bottom.value = 0;\n left.value = 0;\n right.value = 0;\n top.value = 0;\n width.value = 0;\n x.value = 0;\n y.value = 0;\n }\n return;\n }\n const rect = el.getBoundingClientRect();\n height.value = rect.height;\n bottom.value = rect.bottom;\n left.value = rect.left;\n right.value = rect.right;\n top.value = rect.top;\n width.value = rect.width;\n x.value = rect.x;\n y.value = rect.y;\n }\n useResizeObserver(target, update);\n watch(() => unrefElement(target), (ele) => !ele && update());\n useMutationObserver(target, update, {\n attributeFilter: [\"style\", \"class\"]\n });\n if (windowScroll)\n useEventListener(\"scroll\", update, { capture: true, passive: true });\n if (windowResize)\n useEventListener(\"resize\", update, { passive: true });\n tryOnMounted(() => {\n if (immediate)\n update();\n });\n return {\n height,\n bottom,\n left,\n right,\n top,\n width,\n x,\n y,\n update\n };\n}\n\nfunction useElementByPoint(options) {\n const {\n x,\n y,\n document = defaultDocument,\n multiple,\n interval = \"requestAnimationFrame\",\n immediate = true\n } = options;\n const isSupported = useSupported(() => {\n if (toValue(multiple))\n return document && \"elementsFromPoint\" in document;\n return document && \"elementFromPoint\" in document;\n });\n const element = ref(null);\n const cb = () => {\n var _a, _b;\n element.value = toValue(multiple) ? (_a = document == null ? void 0 : document.elementsFromPoint(toValue(x), toValue(y))) != null ? _a : [] : (_b = document == null ? void 0 : document.elementFromPoint(toValue(x), toValue(y))) != null ? _b : null;\n };\n const controls = interval === \"requestAnimationFrame\" ? useRafFn(cb, { immediate }) : useIntervalFn(cb, interval, { immediate });\n return {\n isSupported,\n element,\n ...controls\n };\n}\n\nfunction useElementHover(el, options = {}) {\n const {\n delayEnter = 0,\n delayLeave = 0,\n window = defaultWindow\n } = options;\n const isHovered = ref(false);\n let timer;\n const toggle = (entering) => {\n const delay = entering ? delayEnter : delayLeave;\n if (timer) {\n clearTimeout(timer);\n timer = void 0;\n }\n if (delay)\n timer = setTimeout(() => isHovered.value = entering, delay);\n else\n isHovered.value = entering;\n };\n if (!window)\n return isHovered;\n useEventListener(el, \"mouseenter\", () => toggle(true), { passive: true });\n useEventListener(el, \"mouseleave\", () => toggle(false), { passive: true });\n return isHovered;\n}\n\nfunction useElementSize(target, initialSize = { width: 0, height: 0 }, options = {}) {\n const { window = defaultWindow, box = \"content-box\" } = options;\n const isSVG = computed(() => {\n var _a, _b;\n return (_b = (_a = unrefElement(target)) == null ? void 0 : _a.namespaceURI) == null ? void 0 : _b.includes(\"svg\");\n });\n const width = ref(initialSize.width);\n const height = ref(initialSize.height);\n const { stop: stop1 } = useResizeObserver(\n target,\n ([entry]) => {\n const boxSize = box === \"border-box\" ? entry.borderBoxSize : box === \"content-box\" ? entry.contentBoxSize : entry.devicePixelContentBoxSize;\n if (window && isSVG.value) {\n const $elem = unrefElement(target);\n if ($elem) {\n const rect = $elem.getBoundingClientRect();\n width.value = rect.width;\n height.value = rect.height;\n }\n } else {\n if (boxSize) {\n const formatBoxSize = Array.isArray(boxSize) ? boxSize : [boxSize];\n width.value = formatBoxSize.reduce((acc, { inlineSize }) => acc + inlineSize, 0);\n height.value = formatBoxSize.reduce((acc, { blockSize }) => acc + blockSize, 0);\n } else {\n width.value = entry.contentRect.width;\n height.value = entry.contentRect.height;\n }\n }\n },\n options\n );\n tryOnMounted(() => {\n const ele = unrefElement(target);\n if (ele) {\n width.value = \"offsetWidth\" in ele ? ele.offsetWidth : initialSize.width;\n height.value = \"offsetHeight\" in ele ? ele.offsetHeight : initialSize.height;\n }\n });\n const stop2 = watch(\n () => unrefElement(target),\n (ele) => {\n width.value = ele ? initialSize.width : 0;\n height.value = ele ? initialSize.height : 0;\n }\n );\n function stop() {\n stop1();\n stop2();\n }\n return {\n width,\n height,\n stop\n };\n}\n\nfunction useIntersectionObserver(target, callback, options = {}) {\n const {\n root,\n rootMargin = \"0px\",\n threshold = 0.1,\n window = defaultWindow,\n immediate = true\n } = options;\n const isSupported = useSupported(() => window && \"IntersectionObserver\" in window);\n const targets = computed(() => {\n const _target = toValue(target);\n return (Array.isArray(_target) ? _target : [_target]).map(unrefElement).filter(notNullish);\n });\n let cleanup = noop;\n const isActive = ref(immediate);\n const stopWatch = isSupported.value ? watch(\n () => [targets.value, unrefElement(root), isActive.value],\n ([targets2, root2]) => {\n cleanup();\n if (!isActive.value)\n return;\n if (!targets2.length)\n return;\n const observer = new IntersectionObserver(\n callback,\n {\n root: unrefElement(root2),\n rootMargin,\n threshold\n }\n );\n targets2.forEach((el) => el && observer.observe(el));\n cleanup = () => {\n observer.disconnect();\n cleanup = noop;\n };\n },\n { immediate, flush: \"post\" }\n ) : noop;\n const stop = () => {\n cleanup();\n stopWatch();\n isActive.value = false;\n };\n tryOnScopeDispose(stop);\n return {\n isSupported,\n isActive,\n pause() {\n cleanup();\n isActive.value = false;\n },\n resume() {\n isActive.value = true;\n },\n stop\n };\n}\n\nfunction useElementVisibility(element, options = {}) {\n const { window = defaultWindow, scrollTarget, threshold = 0 } = options;\n const elementIsVisible = ref(false);\n useIntersectionObserver(\n element,\n (intersectionObserverEntries) => {\n let isIntersecting = elementIsVisible.value;\n let latestTime = 0;\n for (const entry of intersectionObserverEntries) {\n if (entry.time >= latestTime) {\n latestTime = entry.time;\n isIntersecting = entry.isIntersecting;\n }\n }\n elementIsVisible.value = isIntersecting;\n },\n {\n root: scrollTarget,\n window,\n threshold\n }\n );\n return elementIsVisible;\n}\n\nconst events = /* @__PURE__ */ new Map();\n\nfunction useEventBus(key) {\n const scope = getCurrentScope();\n function on(listener) {\n var _a;\n const listeners = events.get(key) || /* @__PURE__ */ new Set();\n listeners.add(listener);\n events.set(key, listeners);\n const _off = () => off(listener);\n (_a = scope == null ? void 0 : scope.cleanups) == null ? void 0 : _a.push(_off);\n return _off;\n }\n function once(listener) {\n function _listener(...args) {\n off(_listener);\n listener(...args);\n }\n return on(_listener);\n }\n function off(listener) {\n const listeners = events.get(key);\n if (!listeners)\n return;\n listeners.delete(listener);\n if (!listeners.size)\n reset();\n }\n function reset() {\n events.delete(key);\n }\n function emit(event, payload) {\n var _a;\n (_a = events.get(key)) == null ? void 0 : _a.forEach((v) => v(event, payload));\n }\n return { on, once, off, emit, reset };\n}\n\nfunction resolveNestedOptions$1(options) {\n if (options === true)\n return {};\n return options;\n}\nfunction useEventSource(url, events = [], options = {}) {\n const event = ref(null);\n const data = ref(null);\n const status = ref(\"CONNECTING\");\n const eventSource = ref(null);\n const error = shallowRef(null);\n const urlRef = toRef(url);\n const lastEventId = shallowRef(null);\n let explicitlyClosed = false;\n let retried = 0;\n const {\n withCredentials = false,\n immediate = true\n } = options;\n const close = () => {\n if (isClient && eventSource.value) {\n eventSource.value.close();\n eventSource.value = null;\n status.value = \"CLOSED\";\n explicitlyClosed = true;\n }\n };\n const _init = () => {\n if (explicitlyClosed || typeof urlRef.value === \"undefined\")\n return;\n const es = new EventSource(urlRef.value, { withCredentials });\n status.value = \"CONNECTING\";\n eventSource.value = es;\n es.onopen = () => {\n status.value = \"OPEN\";\n error.value = null;\n };\n es.onerror = (e) => {\n status.value = \"CLOSED\";\n error.value = e;\n if (es.readyState === 2 && !explicitlyClosed && options.autoReconnect) {\n es.close();\n const {\n retries = -1,\n delay = 1e3,\n onFailed\n } = resolveNestedOptions$1(options.autoReconnect);\n retried += 1;\n if (typeof retries === \"number\" && (retries < 0 || retried < retries))\n setTimeout(_init, delay);\n else if (typeof retries === \"function\" && retries())\n setTimeout(_init, delay);\n else\n onFailed == null ? void 0 : onFailed();\n }\n };\n es.onmessage = (e) => {\n event.value = null;\n data.value = e.data;\n lastEventId.value = e.lastEventId;\n };\n for (const event_name of events) {\n useEventListener(es, event_name, (e) => {\n event.value = event_name;\n data.value = e.data || null;\n });\n }\n };\n const open = () => {\n if (!isClient)\n return;\n close();\n explicitlyClosed = false;\n retried = 0;\n _init();\n };\n if (immediate)\n watch(urlRef, open, { immediate: true });\n tryOnScopeDispose(close);\n return {\n eventSource,\n event,\n data,\n status,\n error,\n open,\n close,\n lastEventId\n };\n}\n\nfunction useEyeDropper(options = {}) {\n const { initialValue = \"\" } = options;\n const isSupported = useSupported(() => typeof window !== \"undefined\" && \"EyeDropper\" in window);\n const sRGBHex = ref(initialValue);\n async function open(openOptions) {\n if (!isSupported.value)\n return;\n const eyeDropper = new window.EyeDropper();\n const result = await eyeDropper.open(openOptions);\n sRGBHex.value = result.sRGBHex;\n return result;\n }\n return { isSupported, sRGBHex, open };\n}\n\nfunction useFavicon(newIcon = null, options = {}) {\n const {\n baseUrl = \"\",\n rel = \"icon\",\n document = defaultDocument\n } = options;\n const favicon = toRef(newIcon);\n const applyIcon = (icon) => {\n const elements = document == null ? void 0 : document.head.querySelectorAll(`link[rel*=\"${rel}\"]`);\n if (!elements || elements.length === 0) {\n const link = document == null ? void 0 : document.createElement(\"link\");\n if (link) {\n link.rel = rel;\n link.href = `${baseUrl}${icon}`;\n link.type = `image/${icon.split(\".\").pop()}`;\n document == null ? void 0 : document.head.append(link);\n }\n return;\n }\n elements == null ? void 0 : elements.forEach((el) => el.href = `${baseUrl}${icon}`);\n };\n watch(\n favicon,\n (i, o) => {\n if (typeof i === \"string\" && i !== o)\n applyIcon(i);\n },\n { immediate: true }\n );\n return favicon;\n}\n\nconst payloadMapping = {\n json: \"application/json\",\n text: \"text/plain\"\n};\nfunction isFetchOptions(obj) {\n return 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 return reAbsolute.test(url);\n}\nfunction headersToObject(headers) {\n if (typeof Headers !== \"undefined\" && headers instanceof Headers)\n return Object.fromEntries(headers.entries());\n return headers;\n}\nfunction combineCallbacks(combination, ...callbacks) {\n if (combination === \"overwrite\") {\n return async (ctx) => {\n const callback = callbacks[callbacks.length - 1];\n if (callback)\n return { ...ctx, ...await callback(ctx) };\n return ctx;\n };\n } else {\n return async (ctx) => {\n for (const callback of callbacks) {\n if (callback)\n ctx = { ...ctx, ...await callback(ctx) };\n }\n return ctx;\n };\n }\n}\nfunction createFetch(config = {}) {\n const _combination = config.combination || \"chain\";\n const _options = config.options || {};\n const _fetchOptions = config.fetchOptions || {};\n function useFactoryFetch(url, ...args) {\n const computedUrl = computed(() => {\n const baseUrl = toValue(config.baseUrl);\n const targetUrl = toValue(url);\n return baseUrl && !isAbsoluteURL(targetUrl) ? joinPaths(baseUrl, targetUrl) : targetUrl;\n });\n let options = _options;\n let fetchOptions = _fetchOptions;\n if (args.length > 0) {\n if (isFetchOptions(args[0])) {\n options = {\n ...options,\n ...args[0],\n beforeFetch: combineCallbacks(_combination, _options.beforeFetch, args[0].beforeFetch),\n afterFetch: combineCallbacks(_combination, _options.afterFetch, args[0].afterFetch),\n onFetchError: combineCallbacks(_combination, _options.onFetchError, args[0].onFetchError)\n };\n } else {\n fetchOptions = {\n ...fetchOptions,\n ...args[0],\n headers: {\n ...headersToObject(fetchOptions.headers) || {},\n ...headersToObject(args[0].headers) || {}\n }\n };\n }\n }\n if (args.length > 1 && isFetchOptions(args[1])) {\n options = {\n ...options,\n ...args[1],\n beforeFetch: combineCallbacks(_combination, _options.beforeFetch, args[1].beforeFetch),\n afterFetch: combineCallbacks(_combination, _options.afterFetch, args[1].afterFetch),\n onFetchError: combineCallbacks(_combination, _options.onFetchError, args[1].onFetchError)\n };\n }\n return useFetch(computedUrl, fetchOptions, options);\n }\n return useFactoryFetch;\n}\nfunction useFetch(url, ...args) {\n var _a;\n const supportsAbort = typeof AbortController === \"function\";\n let fetchOptions = {};\n let options = {\n immediate: true,\n refetch: false,\n timeout: 0,\n updateDataOnError: false\n };\n const config = {\n method: \"GET\",\n type: \"text\",\n payload: void 0\n };\n if (args.length > 0) {\n if (isFetchOptions(args[0]))\n options = { ...options, ...args[0] };\n else\n fetchOptions = args[0];\n }\n if (args.length > 1) {\n if (isFetchOptions(args[1]))\n options = { ...options, ...args[1] };\n }\n const {\n fetch = (_a = defaultWindow) == null ? void 0 : _a.fetch,\n initialData,\n timeout\n } = options;\n const responseEvent = createEventHook();\n const errorEvent = createEventHook();\n const finallyEvent = createEventHook();\n const isFinished = ref(false);\n const isFetching = ref(false);\n const aborted = ref(false);\n const statusCode = ref(null);\n const response = shallowRef(null);\n const error = shallowRef(null);\n const data = shallowRef(initialData || null);\n const canAbort = computed(() => supportsAbort && isFetching.value);\n let controller;\n let timer;\n const abort = () => {\n if (supportsAbort) {\n controller == null ? void 0 : controller.abort();\n controller = new AbortController();\n controller.signal.onabort = () => aborted.value = true;\n fetchOptions = {\n ...fetchOptions,\n signal: controller.signal\n };\n }\n };\n const loading = (isLoading) => {\n isFetching.value = isLoading;\n isFinished.value = !isLoading;\n };\n if (timeout)\n timer = useTimeoutFn(abort, timeout, { immediate: false });\n let executeCounter = 0;\n const execute = async (throwOnFailed = false) => {\n var _a2, _b;\n abort();\n loading(true);\n error.value = null;\n statusCode.value = null;\n aborted.value = false;\n executeCounter += 1;\n const currentExecuteCounter = executeCounter;\n const defaultFetchOptions = {\n method: config.method,\n headers: {}\n };\n if (config.payload) {\n const headers = headersToObject(defaultFetchOptions.headers);\n const payload = toValue(config.payload);\n if (!config.payloadType && payload && Object.getPrototypeOf(payload) === Object.prototype && !(payload instanceof FormData))\n config.payloadType = \"json\";\n if (config.payloadType)\n headers[\"Content-Type\"] = (_a2 = payloadMapping[config.payloadType]) != null ? _a2 : config.payloadType;\n defaultFetchOptions.body = config.payloadType === \"json\" ? JSON.stringify(payload) : payload;\n }\n let isCanceled = false;\n const context = {\n url: toValue(url),\n options: {\n ...defaultFetchOptions,\n ...fetchOptions\n },\n cancel: () => {\n isCanceled = true;\n }\n };\n if (options.beforeFetch)\n Object.assign(context, await options.beforeFetch(context));\n if (isCanceled || !fetch) {\n loading(false);\n return Promise.resolve(null);\n }\n let responseData = null;\n if (timer)\n timer.start();\n return fetch(\n context.url,\n {\n ...defaultFetchOptions,\n ...context.options,\n headers: {\n ...headersToObject(defaultFetchOptions.headers),\n ...headersToObject((_b = context.options) == null ? void 0 : _b.headers)\n }\n }\n ).then(async (fetchResponse) => {\n response.value = fetchResponse;\n statusCode.value = fetchResponse.status;\n responseData = await fetchResponse.clone()[config.type]();\n if (!fetchResponse.ok) {\n data.value = initialData || null;\n throw new Error(fetchResponse.statusText);\n }\n if (options.afterFetch) {\n ({ data: responseData } = await options.afterFetch({\n data: responseData,\n response: fetchResponse\n }));\n }\n data.value = responseData;\n responseEvent.trigger(fetchResponse);\n return fetchResponse;\n }).catch(async (fetchError) => {\n let errorData = fetchError.message || fetchError.name;\n if (options.onFetchError) {\n ({ error: errorData, data: responseData } = await options.onFetchError({\n data: responseData,\n error: fetchError,\n response: response.value\n }));\n }\n error.value = errorData;\n if (options.updateDataOnError)\n data.value = responseData;\n errorEvent.trigger(fetchError);\n if (throwOnFailed)\n throw fetchError;\n return null;\n }).finally(() => {\n if (currentExecuteCounter === executeCounter)\n loading(false);\n if (timer)\n timer.stop();\n finallyEvent.trigger(null);\n });\n };\n const refetch = toRef(options.refetch);\n watch(\n [\n refetch,\n toRef(url)\n ],\n ([refetch2]) => refetch2 && execute(),\n { deep: true }\n );\n const shell = {\n isFinished: readonly(isFinished),\n isFetching: readonly(isFetching),\n statusCode,\n response,\n error,\n data,\n canAbort,\n aborted,\n abort,\n execute,\n onFetchResponse: responseEvent.on,\n onFetchError: errorEvent.on,\n onFetchFinally: finallyEvent.on,\n // method\n get: setMethod(\"GET\"),\n put: setMethod(\"PUT\"),\n post: setMethod(\"POST\"),\n delete: setMethod(\"DELETE\"),\n patch: setMethod(\"PATCH\"),\n head: setMethod(\"HEAD\"),\n options: setMethod(\"OPTIONS\"),\n // type\n json: setType(\"json\"),\n text: setType(\"text\"),\n blob: setType(\"blob\"),\n arrayBuffer: setType(\"arrayBuffer\"),\n formData: setType(\"formData\")\n };\n function setMethod(method) {\n return (payload, payloadType) => {\n if (!isFetching.value) {\n config.method = method;\n config.payload = payload;\n config.payloadType = payloadType;\n if (isRef(config.payload)) {\n watch(\n [\n refetch,\n toRef(config.payload)\n ],\n ([refetch2]) => refetch2 && execute(),\n { deep: true }\n );\n }\n return {\n ...shell,\n then(onFulfilled, onRejected) {\n return waitUntilFinished().then(onFulfilled, onRejected);\n }\n };\n }\n return void 0;\n };\n }\n function waitUntilFinished() {\n return new Promise((resolve, reject) => {\n until(isFinished).toBe(true).then(() => resolve(shell)).catch((error2) => reject(error2));\n });\n }\n function setType(type) {\n return () => {\n if (!isFetching.value) {\n config.type = type;\n return {\n ...shell,\n then(onFulfilled, onRejected) {\n return waitUntilFinished().then(onFulfilled, onRejected);\n }\n };\n }\n return void 0;\n };\n }\n if (options.immediate)\n Promise.resolve().then(() => execute());\n return {\n ...shell,\n then(onFulfilled, onRejected) {\n return waitUntilFinished().then(onFulfilled, onRejected);\n }\n };\n}\nfunction joinPaths(start, end) {\n if (!start.endsWith(\"/\") && !end.startsWith(\"/\"))\n return `${start}/${end}`;\n return `${start}${end}`;\n}\n\nconst DEFAULT_OPTIONS = {\n multiple: true,\n accept: \"*\",\n reset: false,\n directory: false\n};\nfunction useFileDialog(options = {}) {\n const {\n document = defaultDocument\n } = options;\n const files = ref(null);\n const { on: onChange, trigger } = createEventHook();\n let input;\n if (document) {\n input = document.createElement(\"input\");\n input.type = \"file\";\n input.onchange = (event) => {\n const result = event.target;\n files.value = result.files;\n trigger(files.value);\n };\n }\n const reset = () => {\n files.value = null;\n if (input && input.value) {\n input.value = \"\";\n trigger(null);\n }\n };\n const open = (localOptions) => {\n if (!input)\n return;\n const _options = {\n ...DEFAULT_OPTIONS,\n ...options,\n ...localOptions\n };\n input.multiple = _options.multiple;\n input.accept = _options.accept;\n input.webkitdirectory = _options.directory;\n if (hasOwn(_options, \"capture\"))\n input.capture = _options.capture;\n if (_options.reset)\n reset();\n input.click();\n };\n return {\n files: readonly(files),\n open,\n reset,\n onChange\n };\n}\n\nfunction useFileSystemAccess(options = {}) {\n const {\n window: _window = defaultWindow,\n dataType = \"Text\"\n } = options;\n const window = _window;\n const isSupported = useSupported(() => window && \"showSaveFilePicker\" in window && \"showOpenFilePicker\" in window);\n const fileHandle = ref();\n const data = ref();\n const file = ref();\n const fileName = computed(() => {\n var _a, _b;\n return (_b = (_a = file.value) == null ? void 0 : _a.name) != null ? _b : \"\";\n });\n const fileMIME = computed(() => {\n var _a, _b;\n return (_b = (_a = file.value) == null ? void 0 : _a.type) != null ? _b : \"\";\n });\n const fileSize = computed(() => {\n var _a, _b;\n return (_b = (_a = file.value) == null ? void 0 : _a.size) != null ? _b : 0;\n });\n const fileLastModified = computed(() => {\n var _a, _b;\n return (_b = (_a = file.value) == null ? void 0 : _a.lastModified) != null ? _b : 0;\n });\n async function open(_options = {}) {\n if (!isSupported.value)\n return;\n const [handle] = await window.showOpenFilePicker({ ...toValue(options), ..._options });\n fileHandle.value = handle;\n await updateData();\n }\n async function create(_options = {}) {\n if (!isSupported.value)\n return;\n fileHandle.value = await window.showSaveFilePicker({ ...options, ..._options });\n data.value = void 0;\n await updateData();\n }\n async function save(_options = {}) {\n if (!isSupported.value)\n return;\n if (!fileHandle.value)\n return saveAs(_options);\n if (data.value) {\n const writableStream = await fileHandle.value.createWritable();\n await writableStream.write(data.value);\n await writableStream.close();\n }\n await updateFile();\n }\n async function saveAs(_options = {}) {\n if (!isSupported.value)\n return;\n fileHandle.value = await window.showSaveFilePicker({ ...options, ..._options });\n if (data.value) {\n const writableStream = await fileHandle.value.createWritable();\n await writableStream.write(data.value);\n await writableStream.close();\n }\n await updateFile();\n }\n async function updateFile() {\n var _a;\n file.value = await ((_a = fileHandle.value) == null ? void 0 : _a.getFile());\n }\n async function updateData() {\n var _a, _b;\n await updateFile();\n const type = toValue(dataType);\n if (type === \"Text\")\n data.value = await ((_a = file.value) == null ? void 0 : _a.text());\n else if (type === \"ArrayBuffer\")\n data.value = await ((_b = file.value) == null ? void 0 : _b.arrayBuffer());\n else if (type === \"Blob\")\n data.value = file.value;\n }\n watch(() => toValue(dataType), updateData);\n return {\n isSupported,\n data,\n file,\n fileName,\n fileMIME,\n fileSize,\n fileLastModified,\n open,\n create,\n save,\n saveAs,\n updateData\n };\n}\n\nfunction useFocus(target, options = {}) {\n const { initialValue = false, focusVisible = false, preventScroll = false } = options;\n const innerFocused = ref(false);\n const targetElement = computed(() => unrefElement(target));\n useEventListener(targetElement, \"focus\", (event) => {\n var _a, _b;\n if (!focusVisible || ((_b = (_a = event.target).matches) == null ? void 0 : _b.call(_a, \":focus-visible\")))\n innerFocused.value = true;\n });\n useEventListener(targetElement, \"blur\", () => innerFocused.value = false);\n const focused = computed({\n get: () => innerFocused.value,\n set(value) {\n var _a, _b;\n if (!value && innerFocused.value)\n (_a = targetElement.value) == null ? void 0 : _a.blur();\n else if (value && !innerFocused.value)\n (_b = targetElement.value) == null ? void 0 : _b.focus({ preventScroll });\n }\n });\n watch(\n targetElement,\n () => {\n focused.value = initialValue;\n },\n { immediate: true, flush: \"post\" }\n );\n return { focused };\n}\n\nfunction useFocusWithin(target, options = {}) {\n const activeElement = useActiveElement(options);\n const targetElement = computed(() => unrefElement(target));\n const focused = computed(() => targetElement.value && activeElement.value ? targetElement.value.contains(activeElement.value) : false);\n return { focused };\n}\n\nfunction useFps(options) {\n var _a;\n const fps = ref(0);\n if (typeof performance === \"undefined\")\n return fps;\n const every = (_a = options == null ? void 0 : options.every) != null ? _a : 10;\n let last = performance.now();\n let ticks = 0;\n useRafFn(() => {\n ticks += 1;\n if (ticks >= every) {\n const now = performance.now();\n const diff = now - last;\n fps.value = Math.round(1e3 / (diff / ticks));\n last = now;\n ticks = 0;\n }\n });\n return fps;\n}\n\nconst eventHandlers = [\n \"fullscreenchange\",\n \"webkitfullscreenchange\",\n \"webkitendfullscreen\",\n \"mozfullscreenchange\",\n \"MSFullscreenChange\"\n];\nfunction useFullscreen(target, options = {}) {\n const {\n document = defaultDocument,\n autoExit = false\n } = options;\n const targetRef = computed(() => {\n var _a;\n return (_a = unrefElement(target)) != null ? _a : document == null ? void 0 : document.querySelector(\"html\");\n });\n const isFullscreen = ref(false);\n const requestMethod = computed(() => {\n return [\n \"requestFullscreen\",\n \"webkitRequestFullscreen\",\n \"webkitEnterFullscreen\",\n \"webkitEnterFullScreen\",\n \"webkitRequestFullScreen\",\n \"mozRequestFullScreen\",\n \"msRequestFullscreen\"\n ].find((m) => document && m in document || targetRef.value && m in targetRef.value);\n });\n const exitMethod = computed(() => {\n return [\n \"exitFullscreen\",\n \"webkitExitFullscreen\",\n \"webkitExitFullScreen\",\n \"webkitCancelFullScreen\",\n \"mozCancelFullScreen\",\n \"msExitFullscreen\"\n ].find((m) => document && m in document || targetRef.value && m in targetRef.value);\n });\n const fullscreenEnabled = computed(() => {\n return [\n \"fullScreen\",\n \"webkitIsFullScreen\",\n \"webkitDisplayingFullscreen\",\n \"mozFullScreen\",\n \"msFullscreenElement\"\n ].find((m) => document && m in document || targetRef.value && m in targetRef.value);\n });\n const fullscreenElementMethod = [\n \"fullscreenElement\",\n \"webkitFullscreenElement\",\n \"mozFullScreenElement\",\n \"msFullscreenElement\"\n ].find((m) => document && m in document);\n const isSupported = useSupported(() => targetRef.value && document && requestMethod.value !== void 0 && exitMethod.value !== void 0 && fullscreenEnabled.value !== void 0);\n const isCurrentElementFullScreen = () => {\n if (fullscreenElementMethod)\n return (document == null ? void 0 : document[fullscreenElementMethod]) === targetRef.value;\n return false;\n };\n const isElementFullScreen = () => {\n if (fullscreenEnabled.value) {\n if (document && document[fullscreenEnabled.value] != null) {\n return document[fullscreenEnabled.value];\n } else {\n const target2 = targetRef.value;\n if ((target2 == null ? void 0 : target2[fullscreenEnabled.value]) != null) {\n return Boolean(target2[fullscreenEnabled.value]);\n }\n }\n }\n return false;\n };\n async function exit() {\n if (!isSupported.value || !isFullscreen.value)\n return;\n if (exitMethod.value) {\n if ((document == null ? void 0 : document[exitMethod.value]) != null) {\n await document[exitMethod.value]();\n } else {\n const target2 = targetRef.value;\n if ((target2 == null ? void 0 : target2[exitMethod.value]) != null)\n await target2[exitMethod.value]();\n }\n }\n isFullscreen.value = false;\n }\n async function enter() {\n if (!isSupported.value || isFullscreen.value)\n return;\n if (isElementFullScreen())\n await exit();\n const target2 = targetRef.value;\n if (requestMethod.value && (target2 == null ? void 0 : target2[requestMethod.value]) != null) {\n await target2[requestMethod.value]();\n isFullscreen.value = true;\n }\n }\n async function toggle() {\n await (isFullscreen.value ? exit() : enter());\n }\n const handlerCallback = () => {\n const isElementFullScreenValue = isElementFullScreen();\n if (!isElementFullScreenValue || isElementFullScreenValue && isCurrentElementFullScreen())\n isFullscreen.value = isElementFullScreenValue;\n };\n useEventListener(document, eventHandlers, handlerCallback, false);\n useEventListener(() => unrefElement(targetRef), eventHandlers, handlerCallback, false);\n if (autoExit)\n tryOnScopeDispose(exit);\n return {\n isSupported,\n isFullscreen,\n enter,\n exit,\n toggle\n };\n}\n\nfunction mapGamepadToXbox360Controller(gamepad) {\n return computed(() => {\n if (gamepad.value) {\n return {\n buttons: {\n a: gamepad.value.buttons[0],\n b: gamepad.value.buttons[1],\n x: gamepad.value.buttons[2],\n y: gamepad.value.buttons[3]\n },\n bumper: {\n left: gamepad.value.buttons[4],\n right: gamepad.value.buttons[5]\n },\n triggers: {\n left: gamepad.value.buttons[6],\n right: gamepad.value.buttons[7]\n },\n stick: {\n left: {\n horizontal: gamepad.value.axes[0],\n vertical: gamepad.value.axes[1],\n button: gamepad.value.buttons[10]\n },\n right: {\n horizontal: gamepad.value.axes[2],\n vertical: gamepad.value.axes[3],\n button: gamepad.value.buttons[11]\n }\n },\n dpad: {\n up: gamepad.value.buttons[12],\n down: gamepad.value.buttons[13],\n left: gamepad.value.buttons[14],\n right: gamepad.value.buttons[15]\n },\n back: gamepad.value.buttons[8],\n start: gamepad.value.buttons[9]\n };\n }\n return null;\n });\n}\nfunction useGamepad(options = {}) {\n const {\n navigator = defaultNavigator\n } = options;\n const isSupported = useSupported(() => navigator && \"getGamepads\" in navigator);\n const gamepads = ref([]);\n const onConnectedHook = createEventHook();\n const onDisconnectedHook = createEventHook();\n const stateFromGamepad = (gamepad) => {\n const hapticActuators = [];\n const vibrationActuator = \"vibrationActuator\" in gamepad ? gamepad.vibrationActuator : null;\n if (vibrationActuator)\n hapticActuators.push(vibrationActuator);\n if (gamepad.hapticActuators)\n hapticActuators.push(...gamepad.hapticActuators);\n return {\n id: gamepad.id,\n index: gamepad.index,\n connected: gamepad.connected,\n mapping: gamepad.mapping,\n timestamp: gamepad.timestamp,\n vibrationActuator: gamepad.vibrationActuator,\n hapticActuators,\n axes: gamepad.axes.map((axes) => axes),\n buttons: gamepad.buttons.map((button) => ({ pressed: button.pressed, touched: button.touched, value: button.value }))\n };\n };\n const updateGamepadState = () => {\n const _gamepads = (navigator == null ? void 0 : navigator.getGamepads()) || [];\n for (const gamepad of _gamepads) {\n if (gamepad && gamepads.value[gamepad.index])\n gamepads.value[gamepad.index] = stateFromGamepad(gamepad);\n }\n };\n const { isActive, pause, resume } = useRafFn(updateGamepadState);\n const onGamepadConnected = (gamepad) => {\n if (!gamepads.value.some(({ index }) => index === gamepad.index)) {\n gamepads.value.push(stateFromGamepad(gamepad));\n onConnectedHook.trigger(gamepad.index);\n }\n resume();\n };\n const onGamepadDisconnected = (gamepad) => {\n gamepads.value = gamepads.value.filter((x) => x.index !== gamepad.index);\n onDisconnectedHook.trigger(gamepad.index);\n };\n useEventListener(\"gamepadconnected\", (e) => onGamepadConnected(e.gamepad));\n useEventListener(\"gamepaddisconnected\", (e) => onGamepadDisconnected(e.gamepad));\n tryOnMounted(() => {\n const _gamepads = (navigator == null ? void 0 : navigator.getGamepads()) || [];\n for (const gamepad of _gamepads) {\n if (gamepad && gamepads.value[gamepad.index])\n onGamepadConnected(gamepad);\n }\n });\n pause();\n return {\n isSupported,\n onConnected: onConnectedHook.on,\n onDisconnected: onDisconnectedHook.on,\n gamepads,\n pause,\n resume,\n isActive\n };\n}\n\nfunction useGeolocation(options = {}) {\n const {\n enableHighAccuracy = true,\n maximumAge = 3e4,\n timeout = 27e3,\n navigator = defaultNavigator,\n immediate = true\n } = options;\n const isSupported = useSupported(() => navigator && \"geolocation\" in navigator);\n const locatedAt = ref(null);\n const error = shallowRef(null);\n const coords = ref({\n accuracy: 0,\n latitude: Number.POSITIVE_INFINITY,\n longitude: Number.POSITIVE_INFINITY,\n altitude: null,\n altitudeAccuracy: null,\n heading: null,\n speed: null\n });\n function updatePosition(position) {\n locatedAt.value = position.timestamp;\n coords.value = position.coords;\n error.value = null;\n }\n let watcher;\n function resume() {\n if (isSupported.value) {\n watcher = navigator.geolocation.watchPosition(\n updatePosition,\n (err) => error.value = err,\n {\n enableHighAccuracy,\n maximumAge,\n timeout\n }\n );\n }\n }\n if (immediate)\n resume();\n function pause() {\n if (watcher && navigator)\n navigator.geolocation.clearWatch(watcher);\n }\n tryOnScopeDispose(() => {\n pause();\n });\n return {\n isSupported,\n coords,\n locatedAt,\n error,\n resume,\n pause\n };\n}\n\nconst defaultEvents$1 = [\"mousemove\", \"mousedown\", \"resize\", \"keydown\", \"touchstart\", \"wheel\"];\nconst oneMinute = 6e4;\nfunction useIdle(timeout = oneMinute, options = {}) {\n const {\n initialState = false,\n listenForVisibilityChange = true,\n events = defaultEvents$1,\n window = defaultWindow,\n eventFilter = throttleFilter(50)\n } = options;\n const idle = ref(initialState);\n const lastActive = ref(timestamp());\n let timer;\n const reset = () => {\n idle.value = false;\n clearTimeout(timer);\n timer = setTimeout(() => idle.value = true, timeout);\n };\n const onEvent = createFilterWrapper(\n eventFilter,\n () => {\n lastActive.value = timestamp();\n reset();\n }\n );\n if (window) {\n const document = window.document;\n for (const event of events)\n useEventListener(window, event, onEvent, { passive: true });\n if (listenForVisibilityChange) {\n useEventListener(document, \"visibilitychange\", () => {\n if (!document.hidden)\n onEvent();\n });\n }\n reset();\n }\n return {\n idle,\n lastActive,\n reset\n };\n}\n\nasync function loadImage(options) {\n return new Promise((resolve, reject) => {\n const img = new Image();\n const { src, srcset, sizes, class: clazz, loading, crossorigin, referrerPolicy } = options;\n img.src = src;\n if (srcset)\n img.srcset = srcset;\n if (sizes)\n img.sizes = sizes;\n if (clazz)\n img.className = clazz;\n if (loading)\n img.loading = loading;\n if (crossorigin)\n img.crossOrigin = crossorigin;\n if (referrerPolicy)\n img.referrerPolicy = referrerPolicy;\n img.onload = () => resolve(img);\n img.onerror = reject;\n });\n}\nfunction useImage(options, asyncStateOptions = {}) {\n const state = useAsyncState(\n () => loadImage(toValue(options)),\n void 0,\n {\n resetOnExecute: true,\n ...asyncStateOptions\n }\n );\n watch(\n () => toValue(options),\n () => state.execute(asyncStateOptions.delay),\n { deep: true }\n );\n return state;\n}\n\nconst ARRIVED_STATE_THRESHOLD_PIXELS = 1;\nfunction useScroll(element, options = {}) {\n const {\n throttle = 0,\n idle = 200,\n onStop = noop,\n onScroll = noop,\n offset = {\n left: 0,\n right: 0,\n top: 0,\n bottom: 0\n },\n eventListenerOptions = {\n capture: false,\n passive: true\n },\n behavior = \"auto\",\n window = defaultWindow,\n onError = (e) => {\n console.error(e);\n }\n } = options;\n const internalX = ref(0);\n const internalY = ref(0);\n const x = computed({\n get() {\n return internalX.value;\n },\n set(x2) {\n scrollTo(x2, void 0);\n }\n });\n const y = computed({\n get() {\n return internalY.value;\n },\n set(y2) {\n scrollTo(void 0, y2);\n }\n });\n function scrollTo(_x, _y) {\n var _a, _b, _c, _d;\n if (!window)\n return;\n const _element = toValue(element);\n if (!_element)\n return;\n (_c = _element instanceof Document ? window.document.body : _element) == null ? void 0 : _c.scrollTo({\n top: (_a = toValue(_y)) != null ? _a : y.value,\n left: (_b = toValue(_x)) != null ? _b : x.value,\n behavior: toValue(behavior)\n });\n const scrollContainer = ((_d = _element == null ? void 0 : _element.document) == null ? void 0 : _d.documentElement) || (_element == null ? void 0 : _element.documentElement) || _element;\n if (x != null)\n internalX.value = scrollContainer.scrollLeft;\n if (y != null)\n internalY.value = scrollContainer.scrollTop;\n }\n const isScrolling = ref(false);\n const arrivedState = reactive({\n left: true,\n right: false,\n top: true,\n bottom: false\n });\n const directions = reactive({\n left: false,\n right: false,\n top: false,\n bottom: false\n });\n const onScrollEnd = (e) => {\n if (!isScrolling.value)\n return;\n isScrolling.value = false;\n directions.left = false;\n directions.right = false;\n directions.top = false;\n directions.bottom = false;\n onStop(e);\n };\n const onScrollEndDebounced = useDebounceFn(onScrollEnd, throttle + idle);\n const setArrivedState = (target) => {\n var _a;\n if (!window)\n return;\n const el = ((_a = target == null ? void 0 : target.document) == null ? void 0 : _a.documentElement) || (target == null ? void 0 : target.documentElement) || unrefElement(target);\n const { display, flexDirection } = getComputedStyle(el);\n const scrollLeft = el.scrollLeft;\n directions.left = scrollLeft < internalX.value;\n directions.right = scrollLeft > internalX.value;\n const left = Math.abs(scrollLeft) <= (offset.left || 0);\n const right = Math.abs(scrollLeft) + el.clientWidth >= el.scrollWidth - (offset.right || 0) - ARRIVED_STATE_THRESHOLD_PIXELS;\n if (display === \"flex\" && flexDirection === \"row-reverse\") {\n arrivedState.left = right;\n arrivedState.right = left;\n } else {\n arrivedState.left = left;\n arrivedState.right = right;\n }\n internalX.value = scrollLeft;\n let scrollTop = el.scrollTop;\n if (target === window.document && !scrollTop)\n scrollTop = window.document.body.scrollTop;\n directions.top = scrollTop < internalY.value;\n directions.bottom = scrollTop > internalY.value;\n const top = Math.abs(scrollTop) <= (offset.top || 0);\n const bottom = Math.abs(scrollTop) + el.clientHeight >= el.scrollHeight - (offset.bottom || 0) - ARRIVED_STATE_THRESHOLD_PIXELS;\n if (display === \"flex\" && flexDirection === \"column-reverse\") {\n arrivedState.top = bottom;\n arrivedState.bottom = top;\n } else {\n arrivedState.top = top;\n arrivedState.bottom = bottom;\n }\n internalY.value = scrollTop;\n };\n const onScrollHandler = (e) => {\n var _a;\n if (!window)\n return;\n const eventTarget = (_a = e.target.documentElement) != null ? _a : e.target;\n setArrivedState(eventTarget);\n isScrolling.value = true;\n onScrollEndDebounced(e);\n onScroll(e);\n };\n useEventListener(\n element,\n \"scroll\",\n throttle ? useThrottleFn(onScrollHandler, throttle, true, false) : onScrollHandler,\n eventListenerOptions\n );\n tryOnMounted(() => {\n try {\n const _element = toValue(element);\n if (!_element)\n return;\n setArrivedState(_element);\n } catch (e) {\n onError(e);\n }\n });\n useEventListener(\n element,\n \"scrollend\",\n onScrollEnd,\n eventListenerOptions\n );\n return {\n x,\n y,\n isScrolling,\n arrivedState,\n directions,\n measure() {\n const _element = toValue(element);\n if (window && _element)\n setArrivedState(_element);\n }\n };\n}\n\nfunction resolveElement(el) {\n if (typeof Window !== \"undefined\" && el instanceof Window)\n return el.document.documentElement;\n if (typeof Document !== \"undefined\" && el instanceof Document)\n return el.documentElement;\n return el;\n}\n\nfunction useInfiniteScroll(element, onLoadMore, options = {}) {\n var _a;\n const {\n direction = \"bottom\",\n interval = 100,\n canLoadMore = () => true\n } = options;\n const state = reactive(useScroll(\n element,\n {\n ...options,\n offset: {\n [direction]: (_a = options.distance) != null ? _a : 0,\n ...options.offset\n }\n }\n ));\n const promise = ref();\n const isLoading = computed(() => !!promise.value);\n const observedElement = computed(() => {\n return resolveElement(toValue(element));\n });\n const isElementVisible = useElementVisibility(observedElement);\n function checkAndLoad() {\n state.measure();\n if (!observedElement.value || !isElementVisible.value || !canLoadMore(observedElement.value))\n return;\n const { scrollHeight, clientHeight, scrollWidth, clientWidth } = observedElement.value;\n const isNarrower = direction === \"bottom\" || direction === \"top\" ? scrollHeight <= clientHeight : scrollWidth <= clientWidth;\n if (state.arrivedState[direction] || isNarrower) {\n if (!promise.value) {\n promise.value = Promise.all([\n onLoadMore(state),\n new Promise((resolve) => setTimeout(resolve, interval))\n ]).finally(() => {\n promise.value = null;\n nextTick(() => checkAndLoad());\n });\n }\n }\n }\n watch(\n () => [state.arrivedState[direction], isElementVisible.value],\n checkAndLoad,\n { immediate: true }\n );\n return {\n isLoading\n };\n}\n\nconst defaultEvents = [\"mousedown\", \"mouseup\", \"keydown\", \"keyup\"];\nfunction useKeyModifier(modifier, options = {}) {\n const {\n events = defaultEvents,\n document = defaultDocument,\n initial = null\n } = options;\n const state = ref(initial);\n if (document) {\n events.forEach((listenerEvent) => {\n useEventListener(document, listenerEvent, (evt) => {\n if (typeof evt.getModifierState === \"function\")\n state.value = evt.getModifierState(modifier);\n });\n });\n }\n return state;\n}\n\nfunction useLocalStorage(key, initialValue, options = {}) {\n const { window = defaultWindow } = options;\n return useStorage(key, initialValue, window == null ? void 0 : window.localStorage, options);\n}\n\nconst DefaultMagicKeysAliasMap = {\n ctrl: \"control\",\n command: \"meta\",\n cmd: \"meta\",\n option: \"alt\",\n up: \"arrowup\",\n down: \"arrowdown\",\n left: \"arrowleft\",\n right: \"arrowright\"\n};\n\nfunction useMagicKeys(options = {}) {\n const {\n reactive: useReactive = false,\n target = defaultWindow,\n aliasMap = DefaultMagicKeysAliasMap,\n passive = true,\n onEventFired = noop\n } = options;\n const current = reactive(/* @__PURE__ */ new Set());\n const obj = {\n toJSON() {\n return {};\n },\n current\n };\n const refs = useReactive ? reactive(obj) : obj;\n const metaDeps = /* @__PURE__ */ new Set();\n const usedKeys = /* @__PURE__ */ new Set();\n function setRefs(key, value) {\n if (key in refs) {\n if (useReactive)\n refs[key] = value;\n else\n refs[key].value = value;\n }\n }\n function reset() {\n current.clear();\n for (const key of usedKeys)\n setRefs(key, false);\n }\n function updateRefs(e, value) {\n var _a, _b;\n const key = (_a = e.key) == null ? void 0 : _a.toLowerCase();\n const code = (_b = e.code) == null ? void 0 : _b.toLowerCase();\n const values = [code, key].filter(Boolean);\n if (key) {\n if (value)\n current.add(key);\n else\n current.delete(key);\n }\n for (const key2 of values) {\n usedKeys.add(key2);\n setRefs(key2, value);\n }\n if (key === \"meta\" && !value) {\n metaDeps.forEach((key2) => {\n current.delete(key2);\n setRefs(key2, false);\n });\n metaDeps.clear();\n } else if (typeof e.getModifierState === \"function\" && e.getModifierState(\"Meta\") && value) {\n [...current, ...values].forEach((key2) => metaDeps.add(key2));\n }\n }\n useEventListener(target, \"keydown\", (e) => {\n updateRefs(e, true);\n return onEventFired(e);\n }, { passive });\n useEventListener(target, \"keyup\", (e) => {\n updateRefs(e, false);\n return onEventFired(e);\n }, { passive });\n useEventListener(\"blur\", reset, { passive: true });\n useEventListener(\"focus\", reset, { passive: true });\n const proxy = new Proxy(\n refs,\n {\n get(target2, prop, rec) {\n if (typeof prop !== \"string\")\n return Reflect.get(target2, prop, rec);\n prop = prop.toLowerCase();\n if (prop in aliasMap)\n prop = aliasMap[prop];\n if (!(prop in refs)) {\n if (/[+_-]/.test(prop)) {\n const keys = prop.split(/[+_-]/g).map((i) => i.trim());\n refs[prop] = computed(() => keys.every((key) => toValue(proxy[key])));\n } else {\n refs[prop] = ref(false);\n }\n }\n const r = Reflect.get(target2, prop, rec);\n return useReactive ? toValue(r) : r;\n }\n }\n );\n return proxy;\n}\n\nfunction usingElRef(source, cb) {\n if (toValue(source))\n cb(toValue(source));\n}\nfunction timeRangeToArray(timeRanges) {\n let ranges = [];\n for (let i = 0; i < timeRanges.length; ++i)\n ranges = [...ranges, [timeRanges.start(i), timeRanges.end(i)]];\n return ranges;\n}\nfunction tracksToArray(tracks) {\n return Array.from(tracks).map(({ label, kind, language, mode, activeCues, cues, inBandMetadataTrackDispatchType }, id) => ({ id, label, kind, language, mode, activeCues, cues, inBandMetadataTrackDispatchType }));\n}\nconst defaultOptions = {\n src: \"\",\n tracks: []\n};\nfunction useMediaControls(target, options = {}) {\n target = toRef(target);\n options = {\n ...defaultOptions,\n ...options\n };\n const {\n document = defaultDocument\n } = options;\n const currentTime = ref(0);\n const duration = ref(0);\n const seeking = ref(false);\n const volume = ref(1);\n const waiting = ref(false);\n const ended = ref(false);\n const playing = ref(false);\n const rate = ref(1);\n const stalled = ref(false);\n const buffered = ref([]);\n const tracks = ref([]);\n const selectedTrack = ref(-1);\n const isPictureInPicture = ref(false);\n const muted = ref(false);\n const supportsPictureInPicture = document && \"pictureInPictureEnabled\" in document;\n const sourceErrorEvent = createEventHook();\n const disableTrack = (track) => {\n usingElRef(target, (el) => {\n if (track) {\n const id = typeof track === \"number\" ? track : track.id;\n el.textTracks[id].mode = \"disabled\";\n } else {\n for (let i = 0; i < el.textTracks.length; ++i)\n el.textTracks[i].mode = \"disabled\";\n }\n selectedTrack.value = -1;\n });\n };\n const enableTrack = (track, disableTracks = true) => {\n usingElRef(target, (el) => {\n const id = typeof track === \"number\" ? track : track.id;\n if (disableTracks)\n disableTrack();\n el.textTracks[id].mode = \"showing\";\n selectedTrack.value = id;\n });\n };\n const togglePictureInPicture = () => {\n return new Promise((resolve, reject) => {\n usingElRef(target, async (el) => {\n if (supportsPictureInPicture) {\n if (!isPictureInPicture.value) {\n el.requestPictureInPicture().then(resolve).catch(reject);\n } else {\n document.exitPictureInPicture().then(resolve).catch(reject);\n }\n }\n });\n });\n };\n watchEffect(() => {\n if (!document)\n return;\n const el = toValue(target);\n if (!el)\n return;\n const src = toValue(options.src);\n let sources = [];\n if (!src)\n return;\n if (typeof src === \"string\")\n sources = [{ src }];\n else if (Array.isArray(src))\n sources = src;\n else if (isObject(src))\n sources = [src];\n el.querySelectorAll(\"source\").forEach((e) => {\n e.removeEventListener(\"error\", sourceErrorEvent.trigger);\n e.remove();\n });\n sources.forEach(({ src: src2, type }) => {\n const source = document.createElement(\"source\");\n source.setAttribute(\"src\", src2);\n source.setAttribute(\"type\", type || \"\");\n source.addEventListener(\"error\", sourceErrorEvent.trigger);\n el.appendChild(source);\n });\n el.load();\n });\n tryOnScopeDispose(() => {\n const el = toValue(target);\n if (!el)\n return;\n el.querySelectorAll(\"source\").forEach((e) => e.removeEventListener(\"error\", sourceErrorEvent.trigger));\n });\n watch([target, volume], () => {\n const el = toValue(target);\n if (!el)\n return;\n el.volume = volume.value;\n });\n watch([target, muted], () => {\n const el = toValue(target);\n if (!el)\n return;\n el.muted = muted.value;\n });\n watch([target, rate], () => {\n const el = toValue(target);\n if (!el)\n return;\n el.playbackRate = rate.value;\n });\n watchEffect(() => {\n if (!document)\n return;\n const textTracks = toValue(options.tracks);\n const el = toValue(target);\n if (!textTracks || !textTracks.length || !el)\n return;\n el.querySelectorAll(\"track\").forEach((e) => e.remove());\n textTracks.forEach(({ default: isDefault, kind, label, src, srcLang }, i) => {\n const track = document.createElement(\"track\");\n track.default = isDefault || false;\n track.kind = kind;\n track.label = label;\n track.src = src;\n track.srclang = srcLang;\n if (track.default)\n selectedTrack.value = i;\n el.appendChild(track);\n });\n });\n const { ignoreUpdates: ignoreCurrentTimeUpdates } = watchIgnorable(currentTime, (time) => {\n const el = toValue(target);\n if (!el)\n return;\n el.currentTime = time;\n });\n const { ignoreUpdates: ignorePlayingUpdates } = watchIgnorable(playing, (isPlaying) => {\n const el = toValue(target);\n if (!el)\n return;\n isPlaying ? el.play() : el.pause();\n });\n useEventListener(target, \"timeupdate\", () => ignoreCurrentTimeUpdates(() => currentTime.value = toValue(target).currentTime));\n useEventListener(target, \"durationchange\", () => duration.value = toValue(target).duration);\n useEventListener(target, \"progress\", () => buffered.value = timeRangeToArray(toValue(target).buffered));\n useEventListener(target, \"seeking\", () => seeking.value = true);\n useEventListener(target, \"seeked\", () => seeking.value = false);\n useEventListener(target, [\"waiting\", \"loadstart\"], () => {\n waiting.value = true;\n ignorePlayingUpdates(() => playing.value = false);\n });\n useEventListener(target, \"loadeddata\", () => waiting.value = false);\n useEventListener(target, \"playing\", () => {\n waiting.value = false;\n ended.value = false;\n ignorePlayingUpdates(() => playing.value = true);\n });\n useEventListener(target, \"ratechange\", () => rate.value = toValue(target).playbackRate);\n useEventListener(target, \"stalled\", () => stalled.value = true);\n useEventListener(target, \"ended\", () => ended.value = true);\n useEventListener(target, \"pause\", () => ignorePlayingUpdates(() => playing.value = false));\n useEventListener(target, \"play\", () => ignorePlayingUpdates(() => playing.value = true));\n useEventListener(target, \"enterpictureinpicture\", () => isPictureInPicture.value = true);\n useEventListener(target, \"leavepictureinpicture\", () => isPictureInPicture.value = false);\n useEventListener(target, \"volumechange\", () => {\n const el = toValue(target);\n if (!el)\n return;\n volume.value = el.volume;\n muted.value = el.muted;\n });\n const listeners = [];\n const stop = watch([target], () => {\n const el = toValue(target);\n if (!el)\n return;\n stop();\n listeners[0] = useEventListener(el.textTracks, \"addtrack\", () => tracks.value = tracksToArray(el.textTracks));\n listeners[1] = useEventListener(el.textTracks, \"removetrack\", () => tracks.value = tracksToArray(el.textTracks));\n listeners[2] = useEventListener(el.textTracks, \"change\", () => tracks.value = tracksToArray(el.textTracks));\n });\n tryOnScopeDispose(() => listeners.forEach((listener) => listener()));\n return {\n currentTime,\n duration,\n waiting,\n seeking,\n ended,\n stalled,\n buffered,\n playing,\n rate,\n // Volume\n volume,\n muted,\n // Tracks\n tracks,\n selectedTrack,\n enableTrack,\n disableTrack,\n // Picture in Picture\n supportsPictureInPicture,\n togglePictureInPicture,\n isPictureInPicture,\n // Events\n onSourceError: sourceErrorEvent.on\n };\n}\n\nfunction getMapVue2Compat() {\n const data = shallowReactive({});\n return {\n get: (key) => data[key],\n set: (key, value) => set(data, key, value),\n has: (key) => hasOwn(data, key),\n delete: (key) => del(data, key),\n clear: () => {\n Object.keys(data).forEach((key) => {\n del(data, key);\n });\n }\n };\n}\nfunction useMemoize(resolver, options) {\n const initCache = () => {\n if (options == null ? void 0 : options.cache)\n return shallowReactive(options.cache);\n if (isVue2)\n return getMapVue2Compat();\n return shallowReactive(/* @__PURE__ */ new Map());\n };\n const cache = initCache();\n const generateKey = (...args) => (options == null ? void 0 : options.getKey) ? options.getKey(...args) : JSON.stringify(args);\n const _loadData = (key, ...args) => {\n cache.set(key, resolver(...args));\n return cache.get(key);\n };\n const loadData = (...args) => _loadData(generateKey(...args), ...args);\n const deleteData = (...args) => {\n cache.delete(generateKey(...args));\n };\n const clearData = () => {\n cache.clear();\n };\n const memoized = (...args) => {\n const key = generateKey(...args);\n if (cache.has(key))\n return cache.get(key);\n return _loadData(key, ...args);\n };\n memoized.load = loadData;\n memoized.delete = deleteData;\n memoized.clear = clearData;\n memoized.generateKey = generateKey;\n memoized.cache = cache;\n return memoized;\n}\n\nfunction useMemory(options = {}) {\n const memory = ref();\n const isSupported = useSupported(() => typeof performance !== \"undefined\" && \"memory\" in performance);\n if (isSupported.value) {\n const { interval = 1e3 } = options;\n useIntervalFn(() => {\n memory.value = performance.memory;\n }, interval, { immediate: options.immediate, immediateCallback: options.immediateCallback });\n }\n return { isSupported, memory };\n}\n\nconst UseMouseBuiltinExtractors = {\n page: (event) => [event.pageX, event.pageY],\n client: (event) => [event.clientX, event.clientY],\n screen: (event) => [event.screenX, event.screenY],\n movement: (event) => event instanceof Touch ? null : [event.movementX, event.movementY]\n};\nfunction useMouse(options = {}) {\n const {\n type = \"page\",\n touch = true,\n resetOnTouchEnds = false,\n initialValue = { x: 0, y: 0 },\n window = defaultWindow,\n target = window,\n scroll = true,\n eventFilter\n } = options;\n let _prevMouseEvent = null;\n const x = ref(initialValue.x);\n const y = ref(initialValue.y);\n const sourceType = ref(null);\n const extractor = typeof type === \"function\" ? type : UseMouseBuiltinExtractors[type];\n const mouseHandler = (event) => {\n const result = extractor(event);\n _prevMouseEvent = event;\n if (result) {\n [x.value, y.value] = result;\n sourceType.value = \"mouse\";\n }\n };\n const touchHandler = (event) => {\n if (event.touches.length > 0) {\n const result = extractor(event.touches[0]);\n if (result) {\n [x.value, y.value] = result;\n sourceType.value = \"touch\";\n }\n }\n };\n const scrollHandler = () => {\n if (!_prevMouseEvent || !window)\n return;\n const pos = extractor(_prevMouseEvent);\n if (_prevMouseEvent instanceof MouseEvent && pos) {\n x.value = pos[0] + window.scrollX;\n y.value = pos[1] + window.scrollY;\n }\n };\n const reset = () => {\n x.value = initialValue.x;\n y.value = initialValue.y;\n };\n const mouseHandlerWrapper = eventFilter ? (event) => eventFilter(() => mouseHandler(event), {}) : (event) => mouseHandler(event);\n const touchHandlerWrapper = eventFilter ? (event) => eventFilter(() => touchHandler(event), {}) : (event) => touchHandler(event);\n const scrollHandlerWrapper = eventFilter ? () => eventFilter(() => scrollHandler(), {}) : () => scrollHandler();\n if (target) {\n const listenerOptions = { passive: true };\n useEventListener(target, [\"mousemove\", \"dragover\"], mouseHandlerWrapper, listenerOptions);\n if (touch && type !== \"movement\") {\n useEventListener(target, [\"touchstart\", \"touchmove\"], touchHandlerWrapper, listenerOptions);\n if (resetOnTouchEnds)\n useEventListener(target, \"touchend\", reset, listenerOptions);\n }\n if (scroll && type === \"page\")\n useEventListener(window, \"scroll\", scrollHandlerWrapper, { passive: true });\n }\n return {\n x,\n y,\n sourceType\n };\n}\n\nfunction useMouseInElement(target, options = {}) {\n const {\n handleOutside = true,\n window = defaultWindow\n } = options;\n const type = options.type || \"page\";\n const { x, y, sourceType } = useMouse(options);\n const targetRef = ref(target != null ? target : window == null ? void 0 : window.document.body);\n const elementX = ref(0);\n const elementY = ref(0);\n const elementPositionX = ref(0);\n const elementPositionY = ref(0);\n const elementHeight = ref(0);\n const elementWidth = ref(0);\n const isOutside = ref(true);\n let stop = () => {\n };\n if (window) {\n stop = watch(\n [targetRef, x, y],\n () => {\n const el = unrefElement(targetRef);\n if (!el)\n return;\n const {\n left,\n top,\n width,\n height\n } = el.getBoundingClientRect();\n elementPositionX.value = left + (type === \"page\" ? window.pageXOffset : 0);\n elementPositionY.value = top + (type === \"page\" ? window.pageYOffset : 0);\n elementHeight.value = height;\n elementWidth.value = width;\n const elX = x.value - elementPositionX.value;\n const elY = y.value - elementPositionY.value;\n isOutside.value = width === 0 || height === 0 || elX < 0 || elY < 0 || elX > width || elY > height;\n if (handleOutside || !isOutside.value) {\n elementX.value = elX;\n elementY.value = elY;\n }\n },\n { immediate: true }\n );\n useEventListener(document, \"mouseleave\", () => {\n isOutside.value = true;\n });\n }\n return {\n x,\n y,\n sourceType,\n elementX,\n elementY,\n elementPositionX,\n elementPositionY,\n elementHeight,\n elementWidth,\n isOutside,\n stop\n };\n}\n\nfunction useMousePressed(options = {}) {\n const {\n touch = true,\n drag = true,\n capture = false,\n initialValue = false,\n window = defaultWindow\n } = options;\n const pressed = ref(initialValue);\n const sourceType = ref(null);\n if (!window) {\n return {\n pressed,\n sourceType\n };\n }\n const onPressed = (srcType) => () => {\n pressed.value = true;\n sourceType.value = srcType;\n };\n const onReleased = () => {\n pressed.value = false;\n sourceType.value = null;\n };\n const target = computed(() => unrefElement(options.target) || window);\n useEventListener(target, \"mousedown\", onPressed(\"mouse\"), { passive: true, capture });\n useEventListener(window, \"mouseleave\", onReleased, { passive: true, capture });\n useEventListener(window, \"mouseup\", onReleased, { passive: true, capture });\n if (drag) {\n useEventListener(target, \"dragstart\", onPressed(\"mouse\"), { passive: true, capture });\n useEventListener(window, \"drop\", onReleased, { passive: true, capture });\n useEventListener(window, \"dragend\", onReleased, { passive: true, capture });\n }\n if (touch) {\n useEventListener(target, \"touchstart\", onPressed(\"touch\"), { passive: true, capture });\n useEventListener(window, \"touchend\", onReleased, { passive: true, capture });\n useEventListener(window, \"touchcancel\", onReleased, { passive: true, capture });\n }\n return {\n pressed,\n sourceType\n };\n}\n\nfunction useNavigatorLanguage(options = {}) {\n const { window = defaultWindow } = options;\n const navigator = window == null ? void 0 : window.navigator;\n const isSupported = useSupported(() => navigator && \"language\" in navigator);\n const language = ref(navigator == null ? void 0 : navigator.language);\n useEventListener(window, \"languagechange\", () => {\n if (navigator)\n language.value = navigator.language;\n });\n return {\n isSupported,\n language\n };\n}\n\nfunction useNetwork(options = {}) {\n const { window = defaultWindow } = options;\n const navigator = window == null ? void 0 : window.navigator;\n const isSupported = useSupported(() => navigator && \"connection\" in navigator);\n const isOnline = ref(true);\n const saveData = ref(false);\n const offlineAt = ref(void 0);\n const onlineAt = ref(void 0);\n const downlink = ref(void 0);\n const downlinkMax = ref(void 0);\n const rtt = ref(void 0);\n const effectiveType = ref(void 0);\n const type = ref(\"unknown\");\n const connection = isSupported.value && navigator.connection;\n function updateNetworkInformation() {\n if (!navigator)\n return;\n isOnline.value = navigator.onLine;\n offlineAt.value = isOnline.value ? void 0 : Date.now();\n onlineAt.value = isOnline.value ? Date.now() : void 0;\n if (connection) {\n downlink.value = connection.downlink;\n downlinkMax.value = connection.downlinkMax;\n effectiveType.value = connection.effectiveType;\n rtt.value = connection.rtt;\n saveData.value = connection.saveData;\n type.value = connection.type;\n }\n }\n if (window) {\n useEventListener(window, \"offline\", () => {\n isOnline.value = false;\n offlineAt.value = Date.now();\n });\n useEventListener(window, \"online\", () => {\n isOnline.value = true;\n onlineAt.value = Date.now();\n });\n }\n if (connection)\n useEventListener(connection, \"change\", updateNetworkInformation, false);\n updateNetworkInformation();\n return {\n isSupported,\n isOnline,\n saveData,\n offlineAt,\n onlineAt,\n downlink,\n downlinkMax,\n effectiveType,\n rtt,\n type\n };\n}\n\nfunction useNow(options = {}) {\n const {\n controls: exposeControls = false,\n interval = \"requestAnimationFrame\"\n } = options;\n const now = ref(/* @__PURE__ */ new Date());\n const update = () => now.value = /* @__PURE__ */ new Date();\n const controls = interval === \"requestAnimationFrame\" ? useRafFn(update, { immediate: true }) : useIntervalFn(update, interval, { immediate: true });\n if (exposeControls) {\n return {\n now,\n ...controls\n };\n } else {\n return now;\n }\n}\n\nfunction useObjectUrl(object) {\n const url = ref();\n const release = () => {\n if (url.value)\n URL.revokeObjectURL(url.value);\n url.value = void 0;\n };\n watch(\n () => toValue(object),\n (newObject) => {\n release();\n if (newObject)\n url.value = URL.createObjectURL(newObject);\n },\n { immediate: true }\n );\n tryOnScopeDispose(release);\n return readonly(url);\n}\n\nfunction useClamp(value, min, max) {\n if (typeof value === \"function\" || isReadonly(value))\n return computed(() => clamp(toValue(value), toValue(min), toValue(max)));\n const _value = ref(value);\n return computed({\n get() {\n return _value.value = clamp(_value.value, toValue(min), toValue(max));\n },\n set(value2) {\n _value.value = clamp(value2, toValue(min), toValue(max));\n }\n });\n}\n\nfunction useOffsetPagination(options) {\n const {\n total = Number.POSITIVE_INFINITY,\n pageSize = 10,\n page = 1,\n onPageChange = noop,\n onPageSizeChange = noop,\n onPageCountChange = noop\n } = options;\n const currentPageSize = useClamp(pageSize, 1, Number.POSITIVE_INFINITY);\n const pageCount = computed(() => Math.max(\n 1,\n Math.ceil(toValue(total) / toValue(currentPageSize))\n ));\n const currentPage = useClamp(page, 1, pageCount);\n const isFirstPage = computed(() => currentPage.value === 1);\n const isLastPage = computed(() => currentPage.value === pageCount.value);\n if (isRef(page)) {\n syncRef(page, currentPage, {\n direction: isReadonly(page) ? \"ltr\" : \"both\"\n });\n }\n if (isRef(pageSize)) {\n syncRef(pageSize, currentPageSize, {\n direction: isReadonly(pageSize) ? \"ltr\" : \"both\"\n });\n }\n function prev() {\n currentPage.value--;\n }\n function next() {\n currentPage.value++;\n }\n const returnValue = {\n currentPage,\n currentPageSize,\n pageCount,\n isFirstPage,\n isLastPage,\n prev,\n next\n };\n watch(currentPage, () => {\n onPageChange(reactive(returnValue));\n });\n watch(currentPageSize, () => {\n onPageSizeChange(reactive(returnValue));\n });\n watch(pageCount, () => {\n onPageCountChange(reactive(returnValue));\n });\n return returnValue;\n}\n\nfunction useOnline(options = {}) {\n const { isOnline } = useNetwork(options);\n return isOnline;\n}\n\nfunction usePageLeave(options = {}) {\n const { window = defaultWindow } = options;\n const isLeft = ref(false);\n const handler = (event) => {\n if (!window)\n return;\n event = event || window.event;\n const from = event.relatedTarget || event.toElement;\n isLeft.value = !from;\n };\n if (window) {\n useEventListener(window, \"mouseout\", handler, { passive: true });\n useEventListener(window.document, \"mouseleave\", handler, { passive: true });\n useEventListener(window.document, \"mouseenter\", handler, { passive: true });\n }\n return isLeft;\n}\n\nfunction useScreenOrientation(options = {}) {\n const {\n window = defaultWindow\n } = options;\n const isSupported = useSupported(() => window && \"screen\" in window && \"orientation\" in window.screen);\n const screenOrientation = isSupported.value ? window.screen.orientation : {};\n const orientation = ref(screenOrientation.type);\n const angle = ref(screenOrientation.angle || 0);\n if (isSupported.value) {\n useEventListener(window, \"orientationchange\", () => {\n orientation.value = screenOrientation.type;\n angle.value = screenOrientation.angle;\n });\n }\n const lockOrientation = (type) => {\n if (isSupported.value && typeof screenOrientation.lock === \"function\")\n return screenOrientation.lock(type);\n return Promise.reject(new Error(\"Not supported\"));\n };\n const unlockOrientation = () => {\n if (isSupported.value && typeof screenOrientation.unlock === \"function\")\n screenOrientation.unlock();\n };\n return {\n isSupported,\n orientation,\n angle,\n lockOrientation,\n unlockOrientation\n };\n}\n\nfunction useParallax(target, options = {}) {\n const {\n deviceOrientationTiltAdjust = (i) => i,\n deviceOrientationRollAdjust = (i) => i,\n mouseTiltAdjust = (i) => i,\n mouseRollAdjust = (i) => i,\n window = defaultWindow\n } = options;\n const orientation = reactive(useDeviceOrientation({ window }));\n const screenOrientation = reactive(useScreenOrientation({ window }));\n const {\n elementX: x,\n elementY: y,\n elementWidth: width,\n elementHeight: height\n } = useMouseInElement(target, { handleOutside: false, window });\n const source = computed(() => {\n if (orientation.isSupported && (orientation.alpha != null && orientation.alpha !== 0 || orientation.gamma != null && orientation.gamma !== 0)) {\n return \"deviceOrientation\";\n }\n return \"mouse\";\n });\n const roll = computed(() => {\n if (source.value === \"deviceOrientation\") {\n let value;\n switch (screenOrientation.orientation) {\n case \"landscape-primary\":\n value = orientation.gamma / 90;\n break;\n case \"landscape-secondary\":\n value = -orientation.gamma / 90;\n break;\n case \"portrait-primary\":\n value = -orientation.beta / 90;\n break;\n case \"portrait-secondary\":\n value = orientation.beta / 90;\n break;\n default:\n value = -orientation.beta / 90;\n }\n return deviceOrientationRollAdjust(value);\n } else {\n const value = -(y.value - height.value / 2) / height.value;\n return mouseRollAdjust(value);\n }\n });\n const tilt = computed(() => {\n if (source.value === \"deviceOrientation\") {\n let value;\n switch (screenOrientation.orientation) {\n case \"landscape-primary\":\n value = orientation.beta / 90;\n break;\n case \"landscape-secondary\":\n value = -orientation.beta / 90;\n break;\n case \"portrait-primary\":\n value = orientation.gamma / 90;\n break;\n case \"portrait-secondary\":\n value = -orientation.gamma / 90;\n break;\n default:\n value = orientation.gamma / 90;\n }\n return deviceOrientationTiltAdjust(value);\n } else {\n const value = (x.value - width.value / 2) / width.value;\n return mouseTiltAdjust(value);\n }\n });\n return { roll, tilt, source };\n}\n\nfunction useParentElement(element = useCurrentElement()) {\n const parentElement = shallowRef();\n const update = () => {\n const el = unrefElement(element);\n if (el)\n parentElement.value = el.parentElement;\n };\n tryOnMounted(update);\n watch(() => toValue(element), update);\n return parentElement;\n}\n\nfunction usePerformanceObserver(options, callback) {\n const {\n window = defaultWindow,\n immediate = true,\n ...performanceOptions\n } = options;\n const isSupported = useSupported(() => window && \"PerformanceObserver\" in window);\n let observer;\n const stop = () => {\n observer == null ? void 0 : observer.disconnect();\n };\n const start = () => {\n if (isSupported.value) {\n stop();\n observer = new PerformanceObserver(callback);\n observer.observe(performanceOptions);\n }\n };\n tryOnScopeDispose(stop);\n if (immediate)\n start();\n return {\n isSupported,\n start,\n stop\n };\n}\n\nconst defaultState = {\n x: 0,\n y: 0,\n pointerId: 0,\n pressure: 0,\n tiltX: 0,\n tiltY: 0,\n width: 0,\n height: 0,\n twist: 0,\n pointerType: null\n};\nconst keys = /* @__PURE__ */ Object.keys(defaultState);\nfunction usePointer(options = {}) {\n const {\n target = defaultWindow\n } = options;\n const isInside = ref(false);\n const state = ref(options.initialValue || {});\n Object.assign(state.value, defaultState, state.value);\n const handler = (event) => {\n isInside.value = true;\n if (options.pointerTypes && !options.pointerTypes.includes(event.pointerType))\n return;\n state.value = objectPick(event, keys, false);\n };\n if (target) {\n const listenerOptions = { passive: true };\n useEventListener(target, [\"pointerdown\", \"pointermove\", \"pointerup\"], handler, listenerOptions);\n useEventListener(target, \"pointerleave\", () => isInside.value = false, listenerOptions);\n }\n return {\n ...toRefs(state),\n isInside\n };\n}\n\nfunction usePointerLock(target, options = {}) {\n const { document = defaultDocument } = options;\n const isSupported = useSupported(() => document && \"pointerLockElement\" in document);\n const element = ref();\n const triggerElement = ref();\n let targetElement;\n if (isSupported.value) {\n useEventListener(document, \"pointerlockchange\", () => {\n var _a;\n const currentElement = (_a = document.pointerLockElement) != null ? _a : element.value;\n if (targetElement && currentElement === targetElement) {\n element.value = document.pointerLockElement;\n if (!element.value)\n targetElement = triggerElement.value = null;\n }\n });\n useEventListener(document, \"pointerlockerror\", () => {\n var _a;\n const currentElement = (_a = document.pointerLockElement) != null ? _a : element.value;\n if (targetElement && currentElement === targetElement) {\n const action = document.pointerLockElement ? \"release\" : \"acquire\";\n throw new Error(`Failed to ${action} pointer lock.`);\n }\n });\n }\n async function lock(e) {\n var _a;\n if (!isSupported.value)\n throw new Error(\"Pointer Lock API is not supported by your browser.\");\n triggerElement.value = e instanceof Event ? e.currentTarget : null;\n targetElement = e instanceof Event ? (_a = unrefElement(target)) != null ? _a : triggerElement.value : unrefElement(e);\n if (!targetElement)\n throw new Error(\"Target element undefined.\");\n targetElement.requestPointerLock();\n return await until(element).toBe(targetElement);\n }\n async function unlock() {\n if (!element.value)\n return false;\n document.exitPointerLock();\n await until(element).toBeNull();\n return true;\n }\n return {\n isSupported,\n element,\n triggerElement,\n lock,\n unlock\n };\n}\n\nfunction usePointerSwipe(target, options = {}) {\n const targetRef = toRef(target);\n const {\n threshold = 50,\n onSwipe,\n onSwipeEnd,\n onSwipeStart,\n disableTextSelect = false\n } = options;\n const posStart = reactive({ x: 0, y: 0 });\n const updatePosStart = (x, y) => {\n posStart.x = x;\n posStart.y = y;\n };\n const posEnd = reactive({ x: 0, y: 0 });\n const updatePosEnd = (x, y) => {\n posEnd.x = x;\n posEnd.y = y;\n };\n const distanceX = computed(() => posStart.x - posEnd.x);\n const distanceY = computed(() => posStart.y - posEnd.y);\n const { max, abs } = Math;\n const isThresholdExceeded = computed(() => max(abs(distanceX.value), abs(distanceY.value)) >= threshold);\n const isSwiping = ref(false);\n const isPointerDown = ref(false);\n const direction = computed(() => {\n if (!isThresholdExceeded.value)\n return \"none\";\n if (abs(distanceX.value) > abs(distanceY.value)) {\n return distanceX.value > 0 ? \"left\" : \"right\";\n } else {\n return distanceY.value > 0 ? \"up\" : \"down\";\n }\n });\n const eventIsAllowed = (e) => {\n var _a, _b, _c;\n const isReleasingButton = e.buttons === 0;\n const isPrimaryButton = e.buttons === 1;\n return (_c = (_b = (_a = options.pointerTypes) == null ? void 0 : _a.includes(e.pointerType)) != null ? _b : isReleasingButton || isPrimaryButton) != null ? _c : true;\n };\n const stops = [\n useEventListener(target, \"pointerdown\", (e) => {\n if (!eventIsAllowed(e))\n return;\n isPointerDown.value = true;\n const eventTarget = e.target;\n eventTarget == null ? void 0 : eventTarget.setPointerCapture(e.pointerId);\n const { clientX: x, clientY: y } = e;\n updatePosStart(x, y);\n updatePosEnd(x, y);\n onSwipeStart == null ? void 0 : onSwipeStart(e);\n }),\n useEventListener(target, \"pointermove\", (e) => {\n if (!eventIsAllowed(e))\n return;\n if (!isPointerDown.value)\n return;\n const { clientX: x, clientY: y } = e;\n updatePosEnd(x, y);\n if (!isSwiping.value && isThresholdExceeded.value)\n isSwiping.value = true;\n if (isSwiping.value)\n onSwipe == null ? void 0 : onSwipe(e);\n }),\n useEventListener(target, \"pointerup\", (e) => {\n if (!eventIsAllowed(e))\n return;\n if (isSwiping.value)\n onSwipeEnd == null ? void 0 : onSwipeEnd(e, direction.value);\n isPointerDown.value = false;\n isSwiping.value = false;\n })\n ];\n tryOnMounted(() => {\n var _a, _b, _c, _d, _e, _f, _g, _h;\n (_b = (_a = targetRef.value) == null ? void 0 : _a.style) == null ? void 0 : _b.setProperty(\"touch-action\", \"none\");\n if (disableTextSelect) {\n (_d = (_c = targetRef.value) == null ? void 0 : _c.style) == null ? void 0 : _d.setProperty(\"-webkit-user-select\", \"none\");\n (_f = (_e = targetRef.value) == null ? void 0 : _e.style) == null ? void 0 : _f.setProperty(\"-ms-user-select\", \"none\");\n (_h = (_g = targetRef.value) == null ? void 0 : _g.style) == null ? void 0 : _h.setProperty(\"user-select\", \"none\");\n }\n });\n const stop = () => stops.forEach((s) => s());\n return {\n isSwiping: readonly(isSwiping),\n direction: readonly(direction),\n posStart: readonly(posStart),\n posEnd: readonly(posEnd),\n distanceX,\n distanceY,\n stop\n };\n}\n\nfunction usePreferredColorScheme(options) {\n const isLight = useMediaQuery(\"(prefers-color-scheme: light)\", options);\n const isDark = useMediaQuery(\"(prefers-color-scheme: dark)\", options);\n return computed(() => {\n if (isDark.value)\n return \"dark\";\n if (isLight.value)\n return \"light\";\n return \"no-preference\";\n });\n}\n\nfunction usePreferredContrast(options) {\n const isMore = useMediaQuery(\"(prefers-contrast: more)\", options);\n const isLess = useMediaQuery(\"(prefers-contrast: less)\", options);\n const isCustom = useMediaQuery(\"(prefers-contrast: custom)\", options);\n return computed(() => {\n if (isMore.value)\n return \"more\";\n if (isLess.value)\n return \"less\";\n if (isCustom.value)\n return \"custom\";\n return \"no-preference\";\n });\n}\n\nfunction usePreferredLanguages(options = {}) {\n const { window = defaultWindow } = options;\n if (!window)\n return ref([\"en\"]);\n const navigator = window.navigator;\n const value = ref(navigator.languages);\n useEventListener(window, \"languagechange\", () => {\n value.value = navigator.languages;\n });\n return value;\n}\n\nfunction usePreferredReducedMotion(options) {\n const isReduced = useMediaQuery(\"(prefers-reduced-motion: reduce)\", options);\n return computed(() => {\n if (isReduced.value)\n return \"reduce\";\n return \"no-preference\";\n });\n}\n\nfunction usePrevious(value, initialValue) {\n const previous = shallowRef(initialValue);\n watch(\n toRef(value),\n (_, oldValue) => {\n previous.value = oldValue;\n },\n { flush: \"sync\" }\n );\n return readonly(previous);\n}\n\nconst topVarName = \"--vueuse-safe-area-top\";\nconst rightVarName = \"--vueuse-safe-area-right\";\nconst bottomVarName = \"--vueuse-safe-area-bottom\";\nconst leftVarName = \"--vueuse-safe-area-left\";\nfunction useScreenSafeArea() {\n const top = ref(\"\");\n const right = ref(\"\");\n const bottom = ref(\"\");\n const left = ref(\"\");\n if (isClient) {\n const topCssVar = useCssVar(topVarName);\n const rightCssVar = useCssVar(rightVarName);\n const bottomCssVar = useCssVar(bottomVarName);\n const leftCssVar = useCssVar(leftVarName);\n topCssVar.value = \"env(safe-area-inset-top, 0px)\";\n rightCssVar.value = \"env(safe-area-inset-right, 0px)\";\n bottomCssVar.value = \"env(safe-area-inset-bottom, 0px)\";\n leftCssVar.value = \"env(safe-area-inset-left, 0px)\";\n update();\n useEventListener(\"resize\", useDebounceFn(update));\n }\n function update() {\n top.value = getValue(topVarName);\n right.value = getValue(rightVarName);\n bottom.value = getValue(bottomVarName);\n left.value = getValue(leftVarName);\n }\n return {\n top,\n right,\n bottom,\n left,\n update\n };\n}\nfunction getValue(position) {\n return getComputedStyle(document.documentElement).getPropertyValue(position);\n}\n\nfunction useScriptTag(src, onLoaded = noop, options = {}) {\n const {\n immediate = true,\n manual = false,\n type = \"text/javascript\",\n async = true,\n crossOrigin,\n referrerPolicy,\n noModule,\n defer,\n document = defaultDocument,\n attrs = {}\n } = options;\n const scriptTag = ref(null);\n let _promise = null;\n const loadScript = (waitForScriptLoad) => new Promise((resolve, reject) => {\n const resolveWithElement = (el2) => {\n scriptTag.value = el2;\n resolve(el2);\n return el2;\n };\n if (!document) {\n resolve(false);\n return;\n }\n let shouldAppend = false;\n let el = document.querySelector(`script[src=\"${toValue(src)}\"]`);\n if (!el) {\n el = document.createElement(\"script\");\n el.type = type;\n el.async = async;\n el.src = toValue(src);\n if (defer)\n el.defer = defer;\n if (crossOrigin)\n el.crossOrigin = crossOrigin;\n if (noModule)\n el.noModule = noModule;\n if (referrerPolicy)\n el.referrerPolicy = referrerPolicy;\n Object.entries(attrs).forEach(([name, value]) => el == null ? void 0 : el.setAttribute(name, value));\n shouldAppend = true;\n } else if (el.hasAttribute(\"data-loaded\")) {\n resolveWithElement(el);\n }\n el.addEventListener(\"error\", (event) => reject(event));\n el.addEventListener(\"abort\", (event) => reject(event));\n el.addEventListener(\"load\", () => {\n el.setAttribute(\"data-loaded\", \"true\");\n onLoaded(el);\n resolveWithElement(el);\n });\n if (shouldAppend)\n el = document.head.appendChild(el);\n if (!waitForScriptLoad)\n resolveWithElement(el);\n });\n const load = (waitForScriptLoad = true) => {\n if (!_promise)\n _promise = loadScript(waitForScriptLoad);\n return _promise;\n };\n const unload = () => {\n if (!document)\n return;\n _promise = null;\n if (scriptTag.value)\n scriptTag.value = null;\n const el = document.querySelector(`script[src=\"${toValue(src)}\"]`);\n if (el)\n document.head.removeChild(el);\n };\n if (immediate && !manual)\n tryOnMounted(load);\n if (!manual)\n tryOnUnmounted(unload);\n return { scriptTag, load, unload };\n}\n\nfunction checkOverflowScroll(ele) {\n const style = window.getComputedStyle(ele);\n if (style.overflowX === \"scroll\" || style.overflowY === \"scroll\" || style.overflowX === \"auto\" && ele.clientWidth < ele.scrollWidth || style.overflowY === \"auto\" && ele.clientHeight < ele.scrollHeight) {\n return true;\n } else {\n const parent = ele.parentNode;\n if (!parent || parent.tagName === \"BODY\")\n return false;\n return checkOverflowScroll(parent);\n }\n}\nfunction preventDefault(rawEvent) {\n const e = rawEvent || window.event;\n const _target = e.target;\n if (checkOverflowScroll(_target))\n return false;\n if (e.touches.length > 1)\n return true;\n if (e.preventDefault)\n e.preventDefault();\n return false;\n}\nconst elInitialOverflow = /* @__PURE__ */ new WeakMap();\nfunction useScrollLock(element, initialState = false) {\n const isLocked = ref(initialState);\n let stopTouchMoveListener = null;\n let initialOverflow = \"\";\n watch(toRef(element), (el) => {\n const target = resolveElement(toValue(el));\n if (target) {\n const ele = target;\n if (!elInitialOverflow.get(ele))\n elInitialOverflow.set(ele, ele.style.overflow);\n if (ele.style.overflow !== \"hidden\")\n initialOverflow = ele.style.overflow;\n if (ele.style.overflow === \"hidden\")\n return isLocked.value = true;\n if (isLocked.value)\n return ele.style.overflow = \"hidden\";\n }\n }, {\n immediate: true\n });\n const lock = () => {\n const el = resolveElement(toValue(element));\n if (!el || isLocked.value)\n return;\n if (isIOS) {\n stopTouchMoveListener = useEventListener(\n el,\n \"touchmove\",\n (e) => {\n preventDefault(e);\n },\n { passive: false }\n );\n }\n el.style.overflow = \"hidden\";\n isLocked.value = true;\n };\n const unlock = () => {\n const el = resolveElement(toValue(element));\n if (!el || !isLocked.value)\n return;\n isIOS && (stopTouchMoveListener == null ? void 0 : stopTouchMoveListener());\n el.style.overflow = initialOverflow;\n elInitialOverflow.delete(el);\n isLocked.value = false;\n };\n tryOnScopeDispose(unlock);\n return computed({\n get() {\n return isLocked.value;\n },\n set(v) {\n if (v)\n lock();\n else unlock();\n }\n });\n}\n\nfunction useSessionStorage(key, initialValue, options = {}) {\n const { window = defaultWindow } = options;\n return useStorage(key, initialValue, window == null ? void 0 : window.sessionStorage, options);\n}\n\nfunction useShare(shareOptions = {}, options = {}) {\n const { navigator = defaultNavigator } = options;\n const _navigator = navigator;\n const isSupported = useSupported(() => _navigator && \"canShare\" in _navigator);\n const share = async (overrideOptions = {}) => {\n if (isSupported.value) {\n const data = {\n ...toValue(shareOptions),\n ...toValue(overrideOptions)\n };\n let granted = true;\n if (data.files && _navigator.canShare)\n granted = _navigator.canShare({ files: data.files });\n if (granted)\n return _navigator.share(data);\n }\n };\n return {\n isSupported,\n share\n };\n}\n\nconst defaultSortFn = (source, compareFn) => source.sort(compareFn);\nconst defaultCompare = (a, b) => a - b;\nfunction useSorted(...args) {\n var _a, _b, _c, _d;\n const [source] = args;\n let compareFn = defaultCompare;\n let options = {};\n if (args.length === 2) {\n if (typeof args[1] === \"object\") {\n options = args[1];\n compareFn = (_a = options.compareFn) != null ? _a : defaultCompare;\n } else {\n compareFn = (_b = args[1]) != null ? _b : defaultCompare;\n }\n } else if (args.length > 2) {\n compareFn = (_c = args[1]) != null ? _c : defaultCompare;\n options = (_d = args[2]) != null ? _d : {};\n }\n const {\n dirty = false,\n sortFn = defaultSortFn\n } = options;\n if (!dirty)\n return computed(() => sortFn([...toValue(source)], compareFn));\n watchEffect(() => {\n const result = sortFn(toValue(source), compareFn);\n if (isRef(source))\n source.value = result;\n else\n source.splice(0, source.length, ...result);\n });\n return source;\n}\n\nfunction useSpeechRecognition(options = {}) {\n const {\n interimResults = true,\n continuous = true,\n window = defaultWindow\n } = options;\n const lang = toRef(options.lang || \"en-US\");\n const isListening = ref(false);\n const isFinal = ref(false);\n const result = ref(\"\");\n const error = shallowRef(void 0);\n const toggle = (value = !isListening.value) => {\n isListening.value = value;\n };\n const start = () => {\n isListening.value = true;\n };\n const stop = () => {\n isListening.value = false;\n };\n const SpeechRecognition = window && (window.SpeechRecognition || window.webkitSpeechRecognition);\n const isSupported = useSupported(() => SpeechRecognition);\n let recognition;\n if (isSupported.value) {\n recognition = new SpeechRecognition();\n recognition.continuous = continuous;\n recognition.interimResults = interimResults;\n recognition.lang = toValue(lang);\n recognition.onstart = () => {\n isFinal.value = false;\n };\n watch(lang, (lang2) => {\n if (recognition && !isListening.value)\n recognition.lang = lang2;\n });\n recognition.onresult = (event) => {\n const currentResult = event.results[event.resultIndex];\n const { transcript } = currentResult[0];\n isFinal.value = currentResult.isFinal;\n result.value = transcript;\n error.value = void 0;\n };\n recognition.onerror = (event) => {\n error.value = event;\n };\n recognition.onend = () => {\n isListening.value = false;\n recognition.lang = toValue(lang);\n };\n watch(isListening, () => {\n if (isListening.value)\n recognition.start();\n else\n recognition.stop();\n });\n }\n tryOnScopeDispose(() => {\n isListening.value = false;\n });\n return {\n isSupported,\n isListening,\n isFinal,\n recognition,\n result,\n error,\n toggle,\n start,\n stop\n };\n}\n\nfunction useSpeechSynthesis(text, options = {}) {\n const {\n pitch = 1,\n rate = 1,\n volume = 1,\n window = defaultWindow\n } = options;\n const synth = window && window.speechSynthesis;\n const isSupported = useSupported(() => synth);\n const isPlaying = ref(false);\n const status = ref(\"init\");\n const spokenText = toRef(text || \"\");\n const lang = toRef(options.lang || \"en-US\");\n const error = shallowRef(void 0);\n const toggle = (value = !isPlaying.value) => {\n isPlaying.value = value;\n };\n const bindEventsForUtterance = (utterance2) => {\n utterance2.lang = toValue(lang);\n utterance2.voice = toValue(options.voice) || null;\n utterance2.pitch = toValue(pitch);\n utterance2.rate = toValue(rate);\n utterance2.volume = volume;\n utterance2.onstart = () => {\n isPlaying.value = true;\n status.value = \"play\";\n };\n utterance2.onpause = () => {\n isPlaying.value = false;\n status.value = \"pause\";\n };\n utterance2.onresume = () => {\n isPlaying.value = true;\n status.value = \"play\";\n };\n utterance2.onend = () => {\n isPlaying.value = false;\n status.value = \"end\";\n };\n utterance2.onerror = (event) => {\n error.value = event;\n };\n };\n const utterance = computed(() => {\n isPlaying.value = false;\n status.value = \"init\";\n const newUtterance = new SpeechSynthesisUtterance(spokenText.value);\n bindEventsForUtterance(newUtterance);\n return newUtterance;\n });\n const speak = () => {\n synth.cancel();\n utterance && synth.speak(utterance.value);\n };\n const stop = () => {\n synth.cancel();\n isPlaying.value = false;\n };\n if (isSupported.value) {\n bindEventsForUtterance(utterance.value);\n watch(lang, (lang2) => {\n if (utterance.value && !isPlaying.value)\n utterance.value.lang = lang2;\n });\n if (options.voice) {\n watch(options.voice, () => {\n synth.cancel();\n });\n }\n watch(isPlaying, () => {\n if (isPlaying.value)\n synth.resume();\n else\n synth.pause();\n });\n }\n tryOnScopeDispose(() => {\n isPlaying.value = false;\n });\n return {\n isSupported,\n isPlaying,\n status,\n utterance,\n error,\n stop,\n toggle,\n speak\n };\n}\n\nfunction useStepper(steps, initialStep) {\n const stepsRef = ref(steps);\n const stepNames = computed(() => Array.isArray(stepsRef.value) ? stepsRef.value : Object.keys(stepsRef.value));\n const index = ref(stepNames.value.indexOf(initialStep != null ? initialStep : stepNames.value[0]));\n const current = computed(() => at(index.value));\n const isFirst = computed(() => index.value === 0);\n const isLast = computed(() => index.value === stepNames.value.length - 1);\n const next = computed(() => stepNames.value[index.value + 1]);\n const previous = computed(() => stepNames.value[index.value - 1]);\n function at(index2) {\n if (Array.isArray(stepsRef.value))\n return stepsRef.value[index2];\n return stepsRef.value[stepNames.value[index2]];\n }\n function get(step) {\n if (!stepNames.value.includes(step))\n return;\n return at(stepNames.value.indexOf(step));\n }\n function goTo(step) {\n if (stepNames.value.includes(step))\n index.value = stepNames.value.indexOf(step);\n }\n function goToNext() {\n if (isLast.value)\n return;\n index.value++;\n }\n function goToPrevious() {\n if (isFirst.value)\n return;\n index.value--;\n }\n function goBackTo(step) {\n if (isAfter(step))\n goTo(step);\n }\n function isNext(step) {\n return stepNames.value.indexOf(step) === index.value + 1;\n }\n function isPrevious(step) {\n return stepNames.value.indexOf(step) === index.value - 1;\n }\n function isCurrent(step) {\n return stepNames.value.indexOf(step) === index.value;\n }\n function isBefore(step) {\n return index.value < stepNames.value.indexOf(step);\n }\n function isAfter(step) {\n return index.value > stepNames.value.indexOf(step);\n }\n return {\n steps: stepsRef,\n stepNames,\n index,\n current,\n next,\n previous,\n isFirst,\n isLast,\n at,\n get,\n goTo,\n goToNext,\n goToPrevious,\n goBackTo,\n isNext,\n isPrevious,\n isCurrent,\n isBefore,\n isAfter\n };\n}\n\nfunction useStorageAsync(key, initialValue, storage, options = {}) {\n var _a;\n const {\n flush = \"pre\",\n deep = true,\n listenToStorageChanges = true,\n writeDefaults = true,\n mergeDefaults = false,\n shallow,\n window = defaultWindow,\n eventFilter,\n onError = (e) => {\n console.error(e);\n }\n } = options;\n const rawInit = toValue(initialValue);\n const type = guessSerializerType(rawInit);\n const data = (shallow ? shallowRef : ref)(initialValue);\n const serializer = (_a = options.serializer) != null ? _a : StorageSerializers[type];\n if (!storage) {\n try {\n storage = getSSRHandler(\"getDefaultStorageAsync\", () => {\n var _a2;\n return (_a2 = defaultWindow) == null ? void 0 : _a2.localStorage;\n })();\n } catch (e) {\n onError(e);\n }\n }\n async function read(event) {\n if (!storage || event && event.key !== key)\n return;\n try {\n const rawValue = event ? event.newValue : await storage.getItem(key);\n if (rawValue == null) {\n data.value = rawInit;\n if (writeDefaults && rawInit !== null)\n await storage.setItem(key, await serializer.write(rawInit));\n } else if (mergeDefaults) {\n const value = await serializer.read(rawValue);\n if (typeof mergeDefaults === \"function\")\n data.value = mergeDefaults(value, rawInit);\n else if (type === \"object\" && !Array.isArray(value))\n data.value = { ...rawInit, ...value };\n else data.value = value;\n } else {\n data.value = await serializer.read(rawValue);\n }\n } catch (e) {\n onError(e);\n }\n }\n read();\n if (window && listenToStorageChanges)\n useEventListener(window, \"storage\", (e) => Promise.resolve().then(() => read(e)));\n if (storage) {\n watchWithFilter(\n data,\n async () => {\n try {\n if (data.value == null)\n await storage.removeItem(key);\n else\n await storage.setItem(key, await serializer.write(data.value));\n } catch (e) {\n onError(e);\n }\n },\n {\n flush,\n deep,\n eventFilter\n }\n );\n }\n return data;\n}\n\nlet _id = 0;\nfunction useStyleTag(css, options = {}) {\n const isLoaded = ref(false);\n const {\n document = defaultDocument,\n immediate = true,\n manual = false,\n id = `vueuse_styletag_${++_id}`\n } = options;\n const cssRef = ref(css);\n let stop = () => {\n };\n const load = () => {\n if (!document)\n return;\n const el = document.getElementById(id) || document.createElement(\"style\");\n if (!el.isConnected) {\n el.id = id;\n if (options.media)\n el.media = options.media;\n document.head.appendChild(el);\n }\n if (isLoaded.value)\n return;\n stop = watch(\n cssRef,\n (value) => {\n el.textContent = value;\n },\n { immediate: true }\n );\n isLoaded.value = true;\n };\n const unload = () => {\n if (!document || !isLoaded.value)\n return;\n stop();\n document.head.removeChild(document.getElementById(id));\n isLoaded.value = false;\n };\n if (immediate && !manual)\n tryOnMounted(load);\n if (!manual)\n tryOnScopeDispose(unload);\n return {\n id,\n css: cssRef,\n unload,\n load,\n isLoaded: readonly(isLoaded)\n };\n}\n\nfunction useSwipe(target, options = {}) {\n const {\n threshold = 50,\n onSwipe,\n onSwipeEnd,\n onSwipeStart,\n passive = true,\n window = defaultWindow\n } = options;\n const coordsStart = reactive({ x: 0, y: 0 });\n const coordsEnd = reactive({ x: 0, y: 0 });\n const diffX = computed(() => coordsStart.x - coordsEnd.x);\n const diffY = computed(() => coordsStart.y - coordsEnd.y);\n const { max, abs } = Math;\n const isThresholdExceeded = computed(() => max(abs(diffX.value), abs(diffY.value)) >= threshold);\n const isSwiping = ref(false);\n const direction = computed(() => {\n if (!isThresholdExceeded.value)\n return \"none\";\n if (abs(diffX.value) > abs(diffY.value)) {\n return diffX.value > 0 ? \"left\" : \"right\";\n } else {\n return diffY.value > 0 ? \"up\" : \"down\";\n }\n });\n const getTouchEventCoords = (e) => [e.touches[0].clientX, e.touches[0].clientY];\n const updateCoordsStart = (x, y) => {\n coordsStart.x = x;\n coordsStart.y = y;\n };\n const updateCoordsEnd = (x, y) => {\n coordsEnd.x = x;\n coordsEnd.y = y;\n };\n let listenerOptions;\n const isPassiveEventSupported = checkPassiveEventSupport(window == null ? void 0 : window.document);\n if (!passive)\n listenerOptions = isPassiveEventSupported ? { passive: false, capture: true } : { capture: true };\n else\n listenerOptions = isPassiveEventSupported ? { passive: true } : { capture: false };\n const onTouchEnd = (e) => {\n if (isSwiping.value)\n onSwipeEnd == null ? void 0 : onSwipeEnd(e, direction.value);\n isSwiping.value = false;\n };\n const stops = [\n useEventListener(target, \"touchstart\", (e) => {\n if (e.touches.length !== 1)\n return;\n if (listenerOptions.capture && !listenerOptions.passive)\n e.preventDefault();\n const [x, y] = getTouchEventCoords(e);\n updateCoordsStart(x, y);\n updateCoordsEnd(x, y);\n onSwipeStart == null ? void 0 : onSwipeStart(e);\n }, listenerOptions),\n useEventListener(target, \"touchmove\", (e) => {\n if (e.touches.length !== 1)\n return;\n const [x, y] = getTouchEventCoords(e);\n updateCoordsEnd(x, y);\n if (!isSwiping.value && isThresholdExceeded.value)\n isSwiping.value = true;\n if (isSwiping.value)\n onSwipe == null ? void 0 : onSwipe(e);\n }, listenerOptions),\n useEventListener(target, [\"touchend\", \"touchcancel\"], onTouchEnd, listenerOptions)\n ];\n const stop = () => stops.forEach((s) => s());\n return {\n isPassiveEventSupported,\n isSwiping,\n direction,\n coordsStart,\n coordsEnd,\n lengthX: diffX,\n lengthY: diffY,\n stop\n };\n}\nfunction checkPassiveEventSupport(document) {\n if (!document)\n return false;\n let supportsPassive = false;\n const optionsBlock = {\n get passive() {\n supportsPassive = true;\n return false;\n }\n };\n document.addEventListener(\"x\", noop, optionsBlock);\n document.removeEventListener(\"x\", noop);\n return supportsPassive;\n}\n\nfunction useTemplateRefsList() {\n const refs = ref([]);\n refs.value.set = (el) => {\n if (el)\n refs.value.push(el);\n };\n onBeforeUpdate(() => {\n refs.value.length = 0;\n });\n return refs;\n}\n\nfunction useTextDirection(options = {}) {\n const {\n document = defaultDocument,\n selector = \"html\",\n observe = false,\n initialValue = \"ltr\"\n } = options;\n function getValue() {\n var _a, _b;\n return (_b = (_a = document == null ? void 0 : document.querySelector(selector)) == null ? void 0 : _a.getAttribute(\"dir\")) != null ? _b : initialValue;\n }\n const dir = ref(getValue());\n tryOnMounted(() => dir.value = getValue());\n if (observe && document) {\n useMutationObserver(\n document.querySelector(selector),\n () => dir.value = getValue(),\n { attributes: true }\n );\n }\n return computed({\n get() {\n return dir.value;\n },\n set(v) {\n var _a, _b;\n dir.value = v;\n if (!document)\n return;\n if (dir.value)\n (_a = document.querySelector(selector)) == null ? void 0 : _a.setAttribute(\"dir\", dir.value);\n else\n (_b = document.querySelector(selector)) == null ? void 0 : _b.removeAttribute(\"dir\");\n }\n });\n}\n\nfunction getRangesFromSelection(selection) {\n var _a;\n const rangeCount = (_a = selection.rangeCount) != null ? _a : 0;\n return Array.from({ length: rangeCount }, (_, i) => selection.getRangeAt(i));\n}\nfunction useTextSelection(options = {}) {\n const {\n window = defaultWindow\n } = options;\n const selection = ref(null);\n const text = computed(() => {\n var _a, _b;\n return (_b = (_a = selection.value) == null ? void 0 : _a.toString()) != null ? _b : \"\";\n });\n const ranges = computed(() => selection.value ? getRangesFromSelection(selection.value) : []);\n const rects = computed(() => ranges.value.map((range) => range.getBoundingClientRect()));\n function onSelectionChange() {\n selection.value = null;\n if (window)\n selection.value = window.getSelection();\n }\n if (window)\n useEventListener(window.document, \"selectionchange\", onSelectionChange);\n return {\n text,\n rects,\n ranges,\n selection\n };\n}\n\nfunction useTextareaAutosize(options) {\n var _a;\n const textarea = ref(options == null ? void 0 : options.element);\n const input = ref(options == null ? void 0 : options.input);\n const styleProp = (_a = options == null ? void 0 : options.styleProp) != null ? _a : \"height\";\n const textareaScrollHeight = ref(1);\n function triggerResize() {\n var _a2;\n if (!textarea.value)\n return;\n let height = \"\";\n textarea.value.style[styleProp] = \"1px\";\n textareaScrollHeight.value = (_a2 = textarea.value) == null ? void 0 : _a2.scrollHeight;\n if (options == null ? void 0 : options.styleTarget)\n toValue(options.styleTarget).style[styleProp] = `${textareaScrollHeight.value}px`;\n else\n height = `${textareaScrollHeight.value}px`;\n textarea.value.style[styleProp] = height;\n }\n watch([input, textarea], () => nextTick(triggerResize), { immediate: true });\n watch(textareaScrollHeight, () => {\n var _a2;\n return (_a2 = options == null ? void 0 : options.onResize) == null ? void 0 : _a2.call(options);\n });\n useResizeObserver(textarea, () => triggerResize());\n if (options == null ? void 0 : options.watch)\n watch(options.watch, triggerResize, { immediate: true, deep: true });\n return {\n textarea,\n input,\n triggerResize\n };\n}\n\nfunction useThrottledRefHistory(source, options = {}) {\n const { throttle = 200, trailing = true } = options;\n const filter = throttleFilter(throttle, trailing);\n const history = useRefHistory(source, { ...options, eventFilter: filter });\n return {\n ...history\n };\n}\n\nconst DEFAULT_UNITS = [\n { max: 6e4, value: 1e3, name: \"second\" },\n { max: 276e4, value: 6e4, name: \"minute\" },\n { max: 72e6, value: 36e5, name: \"hour\" },\n { max: 5184e5, value: 864e5, name: \"day\" },\n { max: 24192e5, value: 6048e5, name: \"week\" },\n { max: 28512e6, value: 2592e6, name: \"month\" },\n { max: Number.POSITIVE_INFINITY, value: 31536e6, name: \"year\" }\n];\nconst DEFAULT_MESSAGES = {\n justNow: \"just now\",\n past: (n) => n.match(/\\d/) ? `${n} ago` : n,\n future: (n) => n.match(/\\d/) ? `in ${n}` : n,\n month: (n, past) => n === 1 ? past ? \"last month\" : \"next month\" : `${n} month${n > 1 ? \"s\" : \"\"}`,\n year: (n, past) => n === 1 ? past ? \"last year\" : \"next year\" : `${n} year${n > 1 ? \"s\" : \"\"}`,\n day: (n, past) => n === 1 ? past ? \"yesterday\" : \"tomorrow\" : `${n} day${n > 1 ? \"s\" : \"\"}`,\n week: (n, past) => n === 1 ? past ? \"last week\" : \"next week\" : `${n} week${n > 1 ? \"s\" : \"\"}`,\n hour: (n) => `${n} hour${n > 1 ? \"s\" : \"\"}`,\n minute: (n) => `${n} minute${n > 1 ? \"s\" : \"\"}`,\n second: (n) => `${n} second${n > 1 ? \"s\" : \"\"}`,\n invalid: \"\"\n};\nfunction DEFAULT_FORMATTER(date) {\n return date.toISOString().slice(0, 10);\n}\nfunction useTimeAgo(time, options = {}) {\n const {\n controls: exposeControls = false,\n updateInterval = 3e4\n } = options;\n const { now, ...controls } = useNow({ interval: updateInterval, controls: true });\n const timeAgo = computed(() => formatTimeAgo(new Date(toValue(time)), options, toValue(now)));\n if (exposeControls) {\n return {\n timeAgo,\n ...controls\n };\n } else {\n return timeAgo;\n }\n}\nfunction formatTimeAgo(from, options = {}, now = Date.now()) {\n var _a;\n const {\n max,\n messages = DEFAULT_MESSAGES,\n fullDateFormatter = DEFAULT_FORMATTER,\n units = DEFAULT_UNITS,\n showSecond = false,\n rounding = \"round\"\n } = options;\n const roundFn = typeof rounding === \"number\" ? (n) => +n.toFixed(rounding) : Math[rounding];\n const diff = +now - +from;\n const absDiff = Math.abs(diff);\n function getValue(diff2, unit) {\n return roundFn(Math.abs(diff2) / unit.value);\n }\n function format(diff2, unit) {\n const val = getValue(diff2, unit);\n const past = diff2 > 0;\n const str = applyFormat(unit.name, val, past);\n return applyFormat(past ? \"past\" : \"future\", str, past);\n }\n function applyFormat(name, val, isPast) {\n const formatter = messages[name];\n if (typeof formatter === \"function\")\n return formatter(val, isPast);\n return formatter.replace(\"{0}\", val.toString());\n }\n if (absDiff < 6e4 && !showSecond)\n return messages.justNow;\n if (typeof max === \"number\" && absDiff > max)\n return fullDateFormatter(new Date(from));\n if (typeof max === \"string\") {\n const unitMax = (_a = units.find((i) => i.name === max)) == null ? void 0 : _a.max;\n if (unitMax && absDiff > unitMax)\n return fullDateFormatter(new Date(from));\n }\n for (const [idx, unit] of units.entries()) {\n const val = getValue(diff, unit);\n if (val <= 0 && units[idx - 1])\n return format(diff, units[idx - 1]);\n if (absDiff < unit.max)\n return format(diff, unit);\n }\n return messages.invalid;\n}\n\nfunction useTimeoutPoll(fn, interval, timeoutPollOptions) {\n const { start } = useTimeoutFn(loop, interval, { immediate: false });\n const isActive = ref(false);\n async function loop() {\n if (!isActive.value)\n return;\n await fn();\n start();\n }\n function resume() {\n if (!isActive.value) {\n isActive.value = true;\n loop();\n }\n }\n function pause() {\n isActive.value = false;\n }\n if (timeoutPollOptions == null ? void 0 : timeoutPollOptions.immediate)\n resume();\n tryOnScopeDispose(pause);\n return {\n isActive,\n pause,\n resume\n };\n}\n\nfunction useTimestamp(options = {}) {\n const {\n controls: exposeControls = false,\n offset = 0,\n immediate = true,\n interval = \"requestAnimationFrame\",\n callback\n } = options;\n const ts = ref(timestamp() + offset);\n const update = () => ts.value = timestamp() + offset;\n const cb = callback ? () => {\n update();\n callback(ts.value);\n } : update;\n const controls = interval === \"requestAnimationFrame\" ? useRafFn(cb, { immediate }) : useIntervalFn(cb, interval, { immediate });\n if (exposeControls) {\n return {\n timestamp: ts,\n ...controls\n };\n } else {\n return ts;\n }\n}\n\nfunction useTitle(newTitle = null, options = {}) {\n var _a, _b, _c;\n const {\n document = defaultDocument,\n restoreOnUnmount = (t) => t\n } = options;\n const originalTitle = (_a = document == null ? void 0 : document.title) != null ? _a : \"\";\n const title = toRef((_b = newTitle != null ? newTitle : document == null ? void 0 : document.title) != null ? _b : null);\n const isReadonly = newTitle && typeof newTitle === \"function\";\n function format(t) {\n if (!(\"titleTemplate\" in options))\n return t;\n const template = options.titleTemplate || \"%s\";\n return typeof template === \"function\" ? template(t) : toValue(template).replace(/%s/g, t);\n }\n watch(\n title,\n (t, o) => {\n if (t !== o && document)\n document.title = format(typeof t === \"string\" ? t : \"\");\n },\n { immediate: true }\n );\n if (options.observe && !options.titleTemplate && document && !isReadonly) {\n useMutationObserver(\n (_c = document.head) == null ? void 0 : _c.querySelector(\"title\"),\n () => {\n if (document && document.title !== title.value)\n title.value = format(document.title);\n },\n { childList: true }\n );\n }\n tryOnBeforeUnmount(() => {\n if (restoreOnUnmount) {\n const restoredTitle = restoreOnUnmount(originalTitle, title.value || \"\");\n if (restoredTitle != null && document)\n document.title = restoredTitle;\n }\n });\n return title;\n}\n\nconst _TransitionPresets = {\n easeInSine: [0.12, 0, 0.39, 0],\n easeOutSine: [0.61, 1, 0.88, 1],\n easeInOutSine: [0.37, 0, 0.63, 1],\n easeInQuad: [0.11, 0, 0.5, 0],\n easeOutQuad: [0.5, 1, 0.89, 1],\n easeInOutQuad: [0.45, 0, 0.55, 1],\n easeInCubic: [0.32, 0, 0.67, 0],\n easeOutCubic: [0.33, 1, 0.68, 1],\n easeInOutCubic: [0.65, 0, 0.35, 1],\n easeInQuart: [0.5, 0, 0.75, 0],\n easeOutQuart: [0.25, 1, 0.5, 1],\n easeInOutQuart: [0.76, 0, 0.24, 1],\n easeInQuint: [0.64, 0, 0.78, 0],\n easeOutQuint: [0.22, 1, 0.36, 1],\n easeInOutQuint: [0.83, 0, 0.17, 1],\n easeInExpo: [0.7, 0, 0.84, 0],\n easeOutExpo: [0.16, 1, 0.3, 1],\n easeInOutExpo: [0.87, 0, 0.13, 1],\n easeInCirc: [0.55, 0, 1, 0.45],\n easeOutCirc: [0, 0.55, 0.45, 1],\n easeInOutCirc: [0.85, 0, 0.15, 1],\n easeInBack: [0.36, 0, 0.66, -0.56],\n easeOutBack: [0.34, 1.56, 0.64, 1],\n easeInOutBack: [0.68, -0.6, 0.32, 1.6]\n};\nconst TransitionPresets = /* @__PURE__ */ Object.assign({}, { linear: identity }, _TransitionPresets);\nfunction createEasingFunction([p0, p1, p2, p3]) {\n const a = (a1, a2) => 1 - 3 * a2 + 3 * a1;\n const b = (a1, a2) => 3 * a2 - 6 * a1;\n const c = (a1) => 3 * a1;\n const calcBezier = (t, a1, a2) => ((a(a1, a2) * t + b(a1, a2)) * t + c(a1)) * t;\n const getSlope = (t, a1, a2) => 3 * a(a1, a2) * t * t + 2 * b(a1, a2) * t + c(a1);\n const getTforX = (x) => {\n let aGuessT = x;\n for (let i = 0; i < 4; ++i) {\n const currentSlope = getSlope(aGuessT, p0, p2);\n if (currentSlope === 0)\n return aGuessT;\n const currentX = calcBezier(aGuessT, p0, p2) - x;\n aGuessT -= currentX / currentSlope;\n }\n return aGuessT;\n };\n return (x) => p0 === p1 && p2 === p3 ? x : calcBezier(getTforX(x), p1, p3);\n}\nfunction lerp(a, b, alpha) {\n return a + alpha * (b - a);\n}\nfunction toVec(t) {\n return (typeof t === \"number\" ? [t] : t) || [];\n}\nfunction executeTransition(source, from, to, options = {}) {\n var _a, _b;\n const fromVal = toValue(from);\n const toVal = toValue(to);\n const v1 = toVec(fromVal);\n const v2 = toVec(toVal);\n const duration = (_a = toValue(options.duration)) != null ? _a : 1e3;\n const startedAt = Date.now();\n const endAt = Date.now() + duration;\n const trans = typeof options.transition === \"function\" ? options.transition : (_b = toValue(options.transition)) != null ? _b : identity;\n const ease = typeof trans === \"function\" ? trans : createEasingFunction(trans);\n return new Promise((resolve) => {\n source.value = fromVal;\n const tick = () => {\n var _a2;\n if ((_a2 = options.abort) == null ? void 0 : _a2.call(options)) {\n resolve();\n return;\n }\n const now = Date.now();\n const alpha = ease((now - startedAt) / duration);\n const arr = toVec(source.value).map((n, i) => lerp(v1[i], v2[i], alpha));\n if (Array.isArray(source.value))\n source.value = arr.map((n, i) => {\n var _a3, _b2;\n return lerp((_a3 = v1[i]) != null ? _a3 : 0, (_b2 = v2[i]) != null ? _b2 : 0, alpha);\n });\n else if (typeof source.value === \"number\")\n source.value = arr[0];\n if (now < endAt) {\n requestAnimationFrame(tick);\n } else {\n source.value = toVal;\n resolve();\n }\n };\n tick();\n });\n}\nfunction useTransition(source, options = {}) {\n let currentId = 0;\n const sourceVal = () => {\n const v = toValue(source);\n return typeof v === \"number\" ? v : v.map(toValue);\n };\n const outputRef = ref(sourceVal());\n watch(sourceVal, async (to) => {\n var _a, _b;\n if (toValue(options.disabled))\n return;\n const id = ++currentId;\n if (options.delay)\n await promiseTimeout(toValue(options.delay));\n if (id !== currentId)\n return;\n const toVal = Array.isArray(to) ? to.map(toValue) : toValue(to);\n (_a = options.onStarted) == null ? void 0 : _a.call(options);\n await executeTransition(outputRef, outputRef.value, toVal, {\n ...options,\n abort: () => {\n var _a2;\n return id !== currentId || ((_a2 = options.abort) == null ? void 0 : _a2.call(options));\n }\n });\n (_b = options.onFinished) == null ? void 0 : _b.call(options);\n }, { deep: true });\n watch(() => toValue(options.disabled), (disabled) => {\n if (disabled) {\n currentId++;\n outputRef.value = sourceVal();\n }\n });\n tryOnScopeDispose(() => {\n currentId++;\n });\n return computed(() => toValue(options.disabled) ? sourceVal() : outputRef.value);\n}\n\nfunction useUrlSearchParams(mode = \"history\", options = {}) {\n const {\n initialValue = {},\n removeNullishValues = true,\n removeFalsyValues = false,\n write: enableWrite = true,\n window = defaultWindow\n } = options;\n if (!window)\n return reactive(initialValue);\n const state = reactive({});\n function getRawParams() {\n if (mode === \"history\") {\n return window.location.search || \"\";\n } else if (mode === \"hash\") {\n const hash = window.location.hash || \"\";\n const index = hash.indexOf(\"?\");\n return index > 0 ? hash.slice(index) : \"\";\n } else {\n return (window.location.hash || \"\").replace(/^#/, \"\");\n }\n }\n function constructQuery(params) {\n const stringified = params.toString();\n if (mode === \"history\")\n return `${stringified ? `?${stringified}` : \"\"}${window.location.hash || \"\"}`;\n if (mode === \"hash-params\")\n return `${window.location.search || \"\"}${stringified ? `#${stringified}` : \"\"}`;\n const hash = window.location.hash || \"#\";\n const index = hash.indexOf(\"?\");\n if (index > 0)\n return `${hash.slice(0, index)}${stringified ? `?${stringified}` : \"\"}`;\n return `${hash}${stringified ? `?${stringified}` : \"\"}`;\n }\n function read() {\n return new URLSearchParams(getRawParams());\n }\n function updateState(params) {\n const unusedKeys = new Set(Object.keys(state));\n for (const key of params.keys()) {\n const paramsForKey = params.getAll(key);\n state[key] = paramsForKey.length > 1 ? paramsForKey : params.get(key) || \"\";\n unusedKeys.delete(key);\n }\n Array.from(unusedKeys).forEach((key) => delete state[key]);\n }\n const { pause, resume } = pausableWatch(\n state,\n () => {\n const params = new URLSearchParams(\"\");\n Object.keys(state).forEach((key) => {\n const mapEntry = state[key];\n if (Array.isArray(mapEntry))\n mapEntry.forEach((value) => params.append(key, value));\n else if (removeNullishValues && mapEntry == null)\n params.delete(key);\n else if (removeFalsyValues && !mapEntry)\n params.delete(key);\n else\n params.set(key, mapEntry);\n });\n write(params);\n },\n { deep: true }\n );\n function write(params, shouldUpdate) {\n pause();\n if (shouldUpdate)\n updateState(params);\n window.history.replaceState(\n window.history.state,\n window.document.title,\n window.location.pathname + constructQuery(params)\n );\n resume();\n }\n function onChanged() {\n if (!enableWrite)\n return;\n write(read(), true);\n }\n useEventListener(window, \"popstate\", onChanged, false);\n if (mode !== \"history\")\n useEventListener(window, \"hashchange\", onChanged, false);\n const initial = read();\n if (initial.keys().next().value)\n updateState(initial);\n else\n Object.assign(state, initialValue);\n return state;\n}\n\nfunction useUserMedia(options = {}) {\n var _a, _b;\n const enabled = ref((_a = options.enabled) != null ? _a : false);\n const autoSwitch = ref((_b = options.autoSwitch) != null ? _b : true);\n const constraints = ref(options.constraints);\n const { navigator = defaultNavigator } = options;\n const isSupported = useSupported(() => {\n var _a2;\n return (_a2 = navigator == null ? void 0 : navigator.mediaDevices) == null ? void 0 : _a2.getUserMedia;\n });\n const stream = shallowRef();\n function getDeviceOptions(type) {\n switch (type) {\n case \"video\": {\n if (constraints.value)\n return constraints.value.video || false;\n break;\n }\n case \"audio\": {\n if (constraints.value)\n return constraints.value.audio || false;\n break;\n }\n }\n }\n async function _start() {\n if (!isSupported.value || stream.value)\n return;\n stream.value = await navigator.mediaDevices.getUserMedia({\n video: getDeviceOptions(\"video\"),\n audio: getDeviceOptions(\"audio\")\n });\n return stream.value;\n }\n function _stop() {\n var _a2;\n (_a2 = stream.value) == null ? void 0 : _a2.getTracks().forEach((t) => t.stop());\n stream.value = void 0;\n }\n function stop() {\n _stop();\n enabled.value = false;\n }\n async function start() {\n await _start();\n if (stream.value)\n enabled.value = true;\n return stream.value;\n }\n async function restart() {\n _stop();\n return await start();\n }\n watch(\n enabled,\n (v) => {\n if (v)\n _start();\n else _stop();\n },\n { immediate: true }\n );\n watch(\n constraints,\n () => {\n if (autoSwitch.value && stream.value)\n restart();\n },\n { immediate: true }\n );\n tryOnScopeDispose(() => {\n stop();\n });\n return {\n isSupported,\n stream,\n start,\n stop,\n restart,\n constraints,\n enabled,\n autoSwitch\n };\n}\n\nfunction useVModel(props, key, emit, options = {}) {\n var _a, _b, _c, _d, _e;\n const {\n clone = false,\n passive = false,\n eventName,\n deep = false,\n defaultValue,\n shouldEmit\n } = options;\n const vm = getCurrentInstance();\n const _emit = emit || (vm == null ? void 0 : vm.emit) || ((_a = vm == null ? void 0 : vm.$emit) == null ? void 0 : _a.bind(vm)) || ((_c = (_b = vm == null ? void 0 : vm.proxy) == null ? void 0 : _b.$emit) == null ? void 0 : _c.bind(vm == null ? void 0 : vm.proxy));\n let event = eventName;\n if (!key) {\n if (isVue2) {\n const modelOptions = (_e = (_d = vm == null ? void 0 : vm.proxy) == null ? void 0 : _d.$options) == null ? void 0 : _e.model;\n key = (modelOptions == null ? void 0 : modelOptions.value) || \"value\";\n if (!eventName)\n event = (modelOptions == null ? void 0 : modelOptions.event) || \"input\";\n } else {\n key = \"modelValue\";\n }\n }\n event = event || `update:${key.toString()}`;\n const cloneFn = (val) => !clone ? val : typeof clone === \"function\" ? clone(val) : cloneFnJSON(val);\n const getValue = () => isDef(props[key]) ? cloneFn(props[key]) : defaultValue;\n const triggerEmit = (value) => {\n if (shouldEmit) {\n if (shouldEmit(value))\n _emit(event, value);\n } else {\n _emit(event, value);\n }\n };\n if (passive) {\n const initialValue = getValue();\n const proxy = ref(initialValue);\n let isUpdating = false;\n watch(\n () => props[key],\n (v) => {\n if (!isUpdating) {\n isUpdating = true;\n proxy.value = cloneFn(v);\n nextTick(() => isUpdating = false);\n }\n }\n );\n watch(\n proxy,\n (v) => {\n if (!isUpdating && (v !== props[key] || deep))\n triggerEmit(v);\n },\n { deep }\n );\n return proxy;\n } else {\n return computed({\n get() {\n return getValue();\n },\n set(value) {\n triggerEmit(value);\n }\n });\n }\n}\n\nfunction useVModels(props, emit, options = {}) {\n const ret = {};\n for (const key in props) {\n ret[key] = useVModel(\n props,\n key,\n emit,\n options\n );\n }\n return ret;\n}\n\nfunction useVibrate(options) {\n const {\n pattern = [],\n interval = 0,\n navigator = defaultNavigator\n } = options || {};\n const isSupported = useSupported(() => typeof navigator !== \"undefined\" && \"vibrate\" in navigator);\n const patternRef = toRef(pattern);\n let intervalControls;\n const vibrate = (pattern2 = patternRef.value) => {\n if (isSupported.value)\n navigator.vibrate(pattern2);\n };\n const stop = () => {\n if (isSupported.value)\n navigator.vibrate(0);\n intervalControls == null ? void 0 : intervalControls.pause();\n };\n if (interval > 0) {\n intervalControls = useIntervalFn(\n vibrate,\n interval,\n {\n immediate: false,\n immediateCallback: false\n }\n );\n }\n return {\n isSupported,\n pattern,\n intervalControls,\n vibrate,\n stop\n };\n}\n\nfunction useVirtualList(list, options) {\n const { containerStyle, wrapperProps, scrollTo, calculateRange, currentList, containerRef } = \"itemHeight\" in options ? useVerticalVirtualList(options, list) : useHorizontalVirtualList(options, list);\n return {\n list: currentList,\n scrollTo,\n containerProps: {\n ref: containerRef,\n onScroll: () => {\n calculateRange();\n },\n style: containerStyle\n },\n wrapperProps\n };\n}\nfunction useVirtualListResources(list) {\n const containerRef = ref(null);\n const size = useElementSize(containerRef);\n const currentList = ref([]);\n const source = shallowRef(list);\n const state = ref({ start: 0, end: 10 });\n return { state, source, currentList, size, containerRef };\n}\nfunction createGetViewCapacity(state, source, itemSize) {\n return (containerSize) => {\n if (typeof itemSize === \"number\")\n return Math.ceil(containerSize / itemSize);\n const { start = 0 } = state.value;\n let sum = 0;\n let capacity = 0;\n for (let i = start; i < source.value.length; i++) {\n const size = itemSize(i);\n sum += size;\n capacity = i;\n if (sum > containerSize)\n break;\n }\n return capacity - start;\n };\n}\nfunction createGetOffset(source, itemSize) {\n return (scrollDirection) => {\n if (typeof itemSize === \"number\")\n return Math.floor(scrollDirection / itemSize) + 1;\n let sum = 0;\n let offset = 0;\n for (let i = 0; i < source.value.length; i++) {\n const size = itemSize(i);\n sum += size;\n if (sum >= scrollDirection) {\n offset = i;\n break;\n }\n }\n return offset + 1;\n };\n}\nfunction createCalculateRange(type, overscan, getOffset, getViewCapacity, { containerRef, state, currentList, source }) {\n return () => {\n const element = containerRef.value;\n if (element) {\n const offset = getOffset(type === \"vertical\" ? element.scrollTop : element.scrollLeft);\n const viewCapacity = getViewCapacity(type === \"vertical\" ? element.clientHeight : element.clientWidth);\n const from = offset - overscan;\n const to = offset + viewCapacity + overscan;\n state.value = {\n start: from < 0 ? 0 : from,\n end: to > source.value.length ? source.value.length : to\n };\n currentList.value = source.value.slice(state.value.start, state.value.end).map((ele, index) => ({\n data: ele,\n index: index + state.value.start\n }));\n }\n };\n}\nfunction createGetDistance(itemSize, source) {\n return (index) => {\n if (typeof itemSize === \"number\") {\n const size2 = index * itemSize;\n return size2;\n }\n const size = source.value.slice(0, index).reduce((sum, _, i) => sum + itemSize(i), 0);\n return size;\n };\n}\nfunction useWatchForSizes(size, list, containerRef, calculateRange) {\n watch([size.width, size.height, list, containerRef], () => {\n calculateRange();\n });\n}\nfunction createComputedTotalSize(itemSize, source) {\n return computed(() => {\n if (typeof itemSize === \"number\")\n return source.value.length * itemSize;\n return source.value.reduce((sum, _, index) => sum + itemSize(index), 0);\n });\n}\nconst scrollToDictionaryForElementScrollKey = {\n horizontal: \"scrollLeft\",\n vertical: \"scrollTop\"\n};\nfunction createScrollTo(type, calculateRange, getDistance, containerRef) {\n return (index) => {\n if (containerRef.value) {\n containerRef.value[scrollToDictionaryForElementScrollKey[type]] = getDistance(index);\n calculateRange();\n }\n };\n}\nfunction useHorizontalVirtualList(options, list) {\n const resources = useVirtualListResources(list);\n const { state, source, currentList, size, containerRef } = resources;\n const containerStyle = { overflowX: \"auto\" };\n const { itemWidth, overscan = 5 } = options;\n const getViewCapacity = createGetViewCapacity(state, source, itemWidth);\n const getOffset = createGetOffset(source, itemWidth);\n const calculateRange = createCalculateRange(\"horizontal\", overscan, getOffset, getViewCapacity, resources);\n const getDistanceLeft = createGetDistance(itemWidth, source);\n const offsetLeft = computed(() => getDistanceLeft(state.value.start));\n const totalWidth = createComputedTotalSize(itemWidth, source);\n useWatchForSizes(size, list, containerRef, calculateRange);\n const scrollTo = createScrollTo(\"horizontal\", calculateRange, getDistanceLeft, containerRef);\n const wrapperProps = computed(() => {\n return {\n style: {\n height: \"100%\",\n width: `${totalWidth.value - offsetLeft.value}px`,\n marginLeft: `${offsetLeft.value}px`,\n display: \"flex\"\n }\n };\n });\n return {\n scrollTo,\n calculateRange,\n wrapperProps,\n containerStyle,\n currentList,\n containerRef\n };\n}\nfunction useVerticalVirtualList(options, list) {\n const resources = useVirtualListResources(list);\n const { state, source, currentList, size, containerRef } = resources;\n const containerStyle = { overflowY: \"auto\" };\n const { itemHeight, overscan = 5 } = options;\n const getViewCapacity = createGetViewCapacity(state, source, itemHeight);\n const getOffset = createGetOffset(source, itemHeight);\n const calculateRange = createCalculateRange(\"vertical\", overscan, getOffset, getViewCapacity, resources);\n const getDistanceTop = createGetDistance(itemHeight, source);\n const offsetTop = computed(() => getDistanceTop(state.value.start));\n const totalHeight = createComputedTotalSize(itemHeight, source);\n useWatchForSizes(size, list, containerRef, calculateRange);\n const scrollTo = createScrollTo(\"vertical\", calculateRange, getDistanceTop, containerRef);\n const wrapperProps = computed(() => {\n return {\n style: {\n width: \"100%\",\n height: `${totalHeight.value - offsetTop.value}px`,\n marginTop: `${offsetTop.value}px`\n }\n };\n });\n return {\n calculateRange,\n scrollTo,\n containerStyle,\n wrapperProps,\n currentList,\n containerRef\n };\n}\n\nfunction useWakeLock(options = {}) {\n const {\n navigator = defaultNavigator,\n document = defaultDocument\n } = options;\n let wakeLock;\n const isSupported = useSupported(() => navigator && \"wakeLock\" in navigator);\n const isActive = ref(false);\n async function onVisibilityChange() {\n if (!isSupported.value || !wakeLock)\n return;\n if (document && document.visibilityState === \"visible\")\n wakeLock = await navigator.wakeLock.request(\"screen\");\n isActive.value = !wakeLock.released;\n }\n if (document)\n useEventListener(document, \"visibilitychange\", onVisibilityChange, { passive: true });\n async function request(type) {\n if (!isSupported.value)\n return;\n wakeLock = await navigator.wakeLock.request(type);\n isActive.value = !wakeLock.released;\n }\n async function release() {\n if (!isSupported.value || !wakeLock)\n return;\n await wakeLock.release();\n isActive.value = !wakeLock.released;\n wakeLock = null;\n }\n return {\n isSupported,\n isActive,\n request,\n release\n };\n}\n\nfunction useWebNotification(options = {}) {\n const {\n window = defaultWindow,\n requestPermissions: _requestForPermissions = true\n } = options;\n const defaultWebNotificationOptions = options;\n const isSupported = useSupported(() => {\n if (!window || !(\"Notification\" in window))\n return false;\n try {\n new Notification(\"\");\n } catch (e) {\n return false;\n }\n return true;\n });\n const permissionGranted = ref(isSupported.value && \"permission\" in Notification && Notification.permission === \"granted\");\n const notification = ref(null);\n const ensurePermissions = async () => {\n if (!isSupported.value)\n return;\n if (!permissionGranted.value && Notification.permission !== \"denied\") {\n const result = await Notification.requestPermission();\n if (result === \"granted\")\n permissionGranted.value = true;\n }\n return permissionGranted.value;\n };\n const { on: onClick, trigger: clickTrigger } = createEventHook();\n const { on: onShow, trigger: showTrigger } = createEventHook();\n const { on: onError, trigger: errorTrigger } = createEventHook();\n const { on: onClose, trigger: closeTrigger } = createEventHook();\n const show = async (overrides) => {\n if (!isSupported.value || !permissionGranted.value)\n return;\n const options2 = Object.assign({}, defaultWebNotificationOptions, overrides);\n notification.value = new Notification(options2.title || \"\", options2);\n notification.value.onclick = clickTrigger;\n notification.value.onshow = showTrigger;\n notification.value.onerror = errorTrigger;\n notification.value.onclose = closeTrigger;\n return notification.value;\n };\n const close = () => {\n if (notification.value)\n notification.value.close();\n notification.value = null;\n };\n if (_requestForPermissions)\n tryOnMounted(ensurePermissions);\n tryOnScopeDispose(close);\n if (isSupported.value && window) {\n const document = window.document;\n useEventListener(document, \"visibilitychange\", (e) => {\n e.preventDefault();\n if (document.visibilityState === \"visible\") {\n close();\n }\n });\n }\n return {\n isSupported,\n notification,\n ensurePermissions,\n permissionGranted,\n show,\n close,\n onClick,\n onShow,\n onError,\n onClose\n };\n}\n\nconst DEFAULT_PING_MESSAGE = \"ping\";\nfunction resolveNestedOptions(options) {\n if (options === true)\n return {};\n return options;\n}\nfunction useWebSocket(url, options = {}) {\n const {\n onConnected,\n onDisconnected,\n onError,\n onMessage,\n immediate = true,\n autoClose = true,\n protocols = []\n } = options;\n const data = ref(null);\n const status = ref(\"CLOSED\");\n const wsRef = ref();\n const urlRef = toRef(url);\n let heartbeatPause;\n let heartbeatResume;\n let explicitlyClosed = false;\n let retried = 0;\n let bufferedData = [];\n let pongTimeoutWait;\n const _sendBuffer = () => {\n if (bufferedData.length && wsRef.value && status.value === \"OPEN\") {\n for (const buffer of bufferedData)\n wsRef.value.send(buffer);\n bufferedData = [];\n }\n };\n const resetHeartbeat = () => {\n clearTimeout(pongTimeoutWait);\n pongTimeoutWait = void 0;\n };\n const close = (code = 1e3, reason) => {\n if (!isClient || !wsRef.value)\n return;\n explicitlyClosed = true;\n resetHeartbeat();\n heartbeatPause == null ? void 0 : heartbeatPause();\n wsRef.value.close(code, reason);\n wsRef.value = void 0;\n };\n const send = (data2, useBuffer = true) => {\n if (!wsRef.value || status.value !== \"OPEN\") {\n if (useBuffer)\n bufferedData.push(data2);\n return false;\n }\n _sendBuffer();\n wsRef.value.send(data2);\n return true;\n };\n const _init = () => {\n if (explicitlyClosed || typeof urlRef.value === \"undefined\")\n return;\n const ws = new WebSocket(urlRef.value, protocols);\n wsRef.value = ws;\n status.value = \"CONNECTING\";\n ws.onopen = () => {\n status.value = \"OPEN\";\n onConnected == null ? void 0 : onConnected(ws);\n heartbeatResume == null ? void 0 : heartbeatResume();\n _sendBuffer();\n };\n ws.onclose = (ev) => {\n status.value = \"CLOSED\";\n onDisconnected == null ? void 0 : onDisconnected(ws, ev);\n if (!explicitlyClosed && options.autoReconnect) {\n const {\n retries = -1,\n delay = 1e3,\n onFailed\n } = resolveNestedOptions(options.autoReconnect);\n retried += 1;\n if (typeof retries === \"number\" && (retries < 0 || retried < retries))\n setTimeout(_init, delay);\n else if (typeof retries === \"function\" && retries())\n setTimeout(_init, delay);\n else\n onFailed == null ? void 0 : onFailed();\n }\n };\n ws.onerror = (e) => {\n onError == null ? void 0 : onError(ws, e);\n };\n ws.onmessage = (e) => {\n if (options.heartbeat) {\n resetHeartbeat();\n const {\n message = DEFAULT_PING_MESSAGE\n } = resolveNestedOptions(options.heartbeat);\n if (e.data === message)\n return;\n }\n data.value = e.data;\n onMessage == null ? void 0 : onMessage(ws, e);\n };\n };\n if (options.heartbeat) {\n const {\n message = DEFAULT_PING_MESSAGE,\n interval = 1e3,\n pongTimeout = 1e3\n } = resolveNestedOptions(options.heartbeat);\n const { pause, resume } = useIntervalFn(\n () => {\n send(message, false);\n if (pongTimeoutWait != null)\n return;\n pongTimeoutWait = setTimeout(() => {\n close();\n explicitlyClosed = false;\n }, pongTimeout);\n },\n interval,\n { immediate: false }\n );\n heartbeatPause = pause;\n heartbeatResume = resume;\n }\n if (autoClose) {\n if (isClient)\n useEventListener(\"beforeunload\", () => close());\n tryOnScopeDispose(close);\n }\n const open = () => {\n if (!isClient && !isWorker)\n return;\n close();\n explicitlyClosed = false;\n retried = 0;\n _init();\n };\n if (immediate)\n open();\n watch(urlRef, open);\n return {\n data,\n status,\n close,\n send,\n open,\n ws: wsRef\n };\n}\n\nfunction useWebWorker(arg0, workerOptions, options) {\n const {\n window = defaultWindow\n } = options != null ? options : {};\n const data = ref(null);\n const worker = shallowRef();\n const post = (...args) => {\n if (!worker.value)\n return;\n worker.value.postMessage(...args);\n };\n const terminate = function terminate2() {\n if (!worker.value)\n return;\n worker.value.terminate();\n };\n if (window) {\n if (typeof arg0 === \"string\")\n worker.value = new Worker(arg0, workerOptions);\n else if (typeof arg0 === \"function\")\n worker.value = arg0();\n else\n worker.value = arg0;\n worker.value.onmessage = (e) => {\n data.value = e.data;\n };\n tryOnScopeDispose(() => {\n if (worker.value)\n worker.value.terminate();\n });\n }\n return {\n data,\n post,\n terminate,\n worker\n };\n}\n\nfunction jobRunner(userFunc) {\n return (e) => {\n const userFuncArgs = e.data[0];\n return Promise.resolve(userFunc.apply(void 0, userFuncArgs)).then((result) => {\n postMessage([\"SUCCESS\", result]);\n }).catch((error) => {\n postMessage([\"ERROR\", error]);\n });\n };\n}\n\nfunction depsParser(deps, localDeps) {\n if (deps.length === 0 && localDeps.length === 0)\n return \"\";\n const depsString = deps.map((dep) => `'${dep}'`).toString();\n const depsFunctionString = localDeps.filter((dep) => typeof dep === \"function\").map((fn) => {\n const str = fn.toString();\n if (str.trim().startsWith(\"function\")) {\n return str;\n } else {\n const name = fn.name;\n return `const ${name} = ${str}`;\n }\n }).join(\";\");\n const importString = `importScripts(${depsString});`;\n return `${depsString.trim() === \"\" ? \"\" : importString} ${depsFunctionString}`;\n}\n\nfunction createWorkerBlobUrl(fn, deps, localDeps) {\n const blobCode = `${depsParser(deps, localDeps)}; onmessage=(${jobRunner})(${fn})`;\n const blob = new Blob([blobCode], { type: \"text/javascript\" });\n const url = URL.createObjectURL(blob);\n return url;\n}\n\nfunction useWebWorkerFn(fn, options = {}) {\n const {\n dependencies = [],\n localDependencies = [],\n timeout,\n window = defaultWindow\n } = options;\n const worker = ref();\n const workerStatus = ref(\"PENDING\");\n const promise = ref({});\n const timeoutId = ref();\n const workerTerminate = (status = \"PENDING\") => {\n if (worker.value && worker.value._url && window) {\n worker.value.terminate();\n URL.revokeObjectURL(worker.value._url);\n promise.value = {};\n worker.value = void 0;\n window.clearTimeout(timeoutId.value);\n workerStatus.value = status;\n }\n };\n workerTerminate();\n tryOnScopeDispose(workerTerminate);\n const generateWorker = () => {\n const blobUrl = createWorkerBlobUrl(fn, dependencies, localDependencies);\n const newWorker = new Worker(blobUrl);\n newWorker._url = blobUrl;\n newWorker.onmessage = (e) => {\n const { resolve = () => {\n }, reject = () => {\n } } = promise.value;\n const [status, result] = e.data;\n switch (status) {\n case \"SUCCESS\":\n resolve(result);\n workerTerminate(status);\n break;\n default:\n reject(result);\n workerTerminate(\"ERROR\");\n break;\n }\n };\n newWorker.onerror = (e) => {\n const { reject = () => {\n } } = promise.value;\n e.preventDefault();\n reject(e);\n workerTerminate(\"ERROR\");\n };\n if (timeout) {\n timeoutId.value = setTimeout(\n () => workerTerminate(\"TIMEOUT_EXPIRED\"),\n timeout\n );\n }\n return newWorker;\n };\n const callWorker = (...fnArgs) => new Promise((resolve, reject) => {\n promise.value = {\n resolve,\n reject\n };\n worker.value && worker.value.postMessage([[...fnArgs]]);\n workerStatus.value = \"RUNNING\";\n });\n const workerFn = (...fnArgs) => {\n if (workerStatus.value === \"RUNNING\") {\n console.error(\n \"[useWebWorkerFn] You can only run one instance of the worker at a time.\"\n );\n return Promise.reject();\n }\n worker.value = generateWorker();\n return callWorker(...fnArgs);\n };\n return {\n workerFn,\n workerStatus,\n workerTerminate\n };\n}\n\nfunction useWindowFocus(options = {}) {\n const { window = defaultWindow } = options;\n if (!window)\n return ref(false);\n const focused = ref(window.document.hasFocus());\n useEventListener(window, \"blur\", () => {\n focused.value = false;\n });\n useEventListener(window, \"focus\", () => {\n focused.value = true;\n });\n return focused;\n}\n\nfunction useWindowScroll(options = {}) {\n const { window = defaultWindow, behavior = \"auto\" } = options;\n if (!window) {\n return {\n x: ref(0),\n y: ref(0)\n };\n }\n const internalX = ref(window.scrollX);\n const internalY = ref(window.scrollY);\n const x = computed({\n get() {\n return internalX.value;\n },\n set(x2) {\n scrollTo({ left: x2, behavior });\n }\n });\n const y = computed({\n get() {\n return internalY.value;\n },\n set(y2) {\n scrollTo({ top: y2, behavior });\n }\n });\n useEventListener(\n window,\n \"scroll\",\n () => {\n internalX.value = window.scrollX;\n internalY.value = window.scrollY;\n },\n {\n capture: false,\n passive: true\n }\n );\n return { x, y };\n}\n\nfunction useWindowSize(options = {}) {\n const {\n window = defaultWindow,\n initialWidth = Number.POSITIVE_INFINITY,\n initialHeight = Number.POSITIVE_INFINITY,\n listenOrientation = true,\n includeScrollbar = true\n } = options;\n const width = ref(initialWidth);\n const height = ref(initialHeight);\n const update = () => {\n if (window) {\n if (includeScrollbar) {\n width.value = window.innerWidth;\n height.value = window.innerHeight;\n } else {\n width.value = window.document.documentElement.clientWidth;\n height.value = window.document.documentElement.clientHeight;\n }\n }\n };\n update();\n tryOnMounted(update);\n useEventListener(\"resize\", update, { passive: true });\n if (listenOrientation) {\n const matches = useMediaQuery(\"(orientation: portrait)\");\n watch(matches, () => update());\n }\n return { width, height };\n}\n\nexport { DefaultMagicKeysAliasMap, StorageSerializers, TransitionPresets, computedAsync as asyncComputed, breakpointsAntDesign, breakpointsBootstrapV5, breakpointsMasterCss, breakpointsPrimeFlex, breakpointsQuasar, breakpointsSematic, breakpointsTailwind, breakpointsVuetify, breakpointsVuetifyV2, breakpointsVuetifyV3, cloneFnJSON, computedAsync, computedInject, createFetch, createReusableTemplate, createTemplatePromise, createUnrefFn, customStorageEventName, defaultDocument, defaultLocation, defaultNavigator, defaultWindow, executeTransition, formatTimeAgo, getSSRHandler, mapGamepadToXbox360Controller, onClickOutside, onKeyDown, onKeyPressed, onKeyStroke, onKeyUp, onLongPress, onStartTyping, setSSRHandler, templateRef, unrefElement, useActiveElement, useAnimate, useAsyncQueue, useAsyncState, useBase64, useBattery, useBluetooth, useBreakpoints, useBroadcastChannel, useBrowserLocation, useCached, useClipboard, useClipboardItems, useCloned, useColorMode, useConfirmDialog, 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, usePrevious, useRafFn, useRefHistory, useResizeObserver, useScreenOrientation, useScreenSafeArea, useScriptTag, useScroll, useScrollLock, useSessionStorage, useShare, useSorted, useSpeechRecognition, useSpeechSynthesis, useStepper, useStorage, useStorageAsync, useStyleTag, useSupported, useSwipe, useTemplateRefsList, useTextDirection, useTextSelection, useTextareaAutosize, useThrottledRefHistory, useTimeAgo, useTimeoutPoll, useTimestamp, useTitle, useTransition, useUrlSearchParams, useUserMedia, useVModel, useVModels, useVibrate, useVirtualList, useWakeLock, useWebNotification, useWebSocket, useWebWorker, useWebWorkerFn, useWindowFocus, useWindowScroll, useWindowSize };\n"], + "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAQA,IAAI,SAAS;AACb,IAAI,SAAS;AAKN,SAAS,IAAI,QAAQ,KAAK,KAAK;AACpC,MAAI,MAAM,QAAQ,MAAM,GAAG;AACzB,WAAO,SAAS,KAAK,IAAI,OAAO,QAAQ,GAAG;AAC3C,WAAO,OAAO,KAAK,GAAG,GAAG;AACzB,WAAO;AAAA,EACT;AACA,SAAO,GAAG,IAAI;AACd,SAAO;AACT;AAEO,SAAS,IAAI,QAAQ,KAAK;AAC/B,MAAI,MAAM,QAAQ,MAAM,GAAG;AACzB,WAAO,OAAO,KAAK,CAAC;AACpB;AAAA,EACF;AACA,SAAO,OAAO,GAAG;AACnB;;;AC5BA,SAAS,cAAc,IAAI,SAAS;AAClC,MAAI;AACJ,QAAM,SAAS,WAAW;AAC1B,cAAY,MAAM;AAChB,WAAO,QAAQ,GAAG;AAAA,EACpB,GAAG;AAAA,IACD,GAAG;AAAA,IACH,QAAQ,KAAK,WAAW,OAAO,SAAS,QAAQ,UAAU,OAAO,KAAK;AAAA,EACxE,CAAC;AACD,SAAO,SAAS,MAAM;AACxB;AAEA,SAAS,oBAAoB,QAAQ,IAAI;AACvC,MAAI,IAAI;AACR,MAAI;AACJ,MAAI;AACJ,QAAM,QAAQ,IAAI,IAAI;AACtB,QAAM,SAAS,MAAM;AACnB,UAAM,QAAQ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O,SAAS,gBAAgB;AAC9C,eAAO,QAAQA,QAAO,SAAS,gBAAgB;AAAA,MACjD;AAAA,IACF;AAAA,EACF;AACA,SAAO;AACP,eAAa,MAAM;AACnB,mBAAiB,UAAU,QAAQ,EAAE,SAAS,KAAK,CAAC;AACpD,MAAI,mBAAmB;AACrB,UAAM,UAAU,cAAc,yBAAyB;AACvD,UAAM,SAAS,MAAM,OAAO,CAAC;AAAA,EAC/B;AACA,SAAO,EAAE,OAAO,OAAO;AACzB;", + "names": ["get", "set", "ref", "keys", "invoke", "toRef", "toRefs", "events", "window", "document", "timestamp", "getValue", "defaults", "toRef", "set", "onUpdated", "preventDefault", "toRefs", "now", "scrollTo", "keys", "get", "isReadonly"] +} diff --git a/docs/.vitepress/cache/deps/chunk-BJ3OZQ3N.js b/docs/.vitepress/cache/deps/chunk-BJ3OZQ3N.js new file mode 100644 index 000000000..d9c17b1d5 --- /dev/null +++ b/docs/.vitepress/cache/deps/chunk-BJ3OZQ3N.js @@ -0,0 +1,11451 @@ +// node_modules/@vue/shared/dist/shared.esm-bundler.js +function makeMap(str, expectsLowerCase) { + const set2 = new Set(str.split(",")); + return expectsLowerCase ? (val) => set2.has(val.toLowerCase()) : (val) => set2.has(val); +} +var EMPTY_OBJ = true ? Object.freeze({}) : {}; +var EMPTY_ARR = true ? Object.freeze([]) : []; +var NOOP = () => { +}; +var NO = () => false; +var isOn = (key) => key.charCodeAt(0) === 111 && key.charCodeAt(1) === 110 && // uppercase letter +(key.charCodeAt(2) > 122 || key.charCodeAt(2) < 97); +var isModelListener = (key) => key.startsWith("onUpdate:"); +var extend = Object.assign; +var remove = (arr, el) => { + const i = arr.indexOf(el); + if (i > -1) { + arr.splice(i, 1); + } +}; +var hasOwnProperty = Object.prototype.hasOwnProperty; +var hasOwn = (val, key) => hasOwnProperty.call(val, key); +var isArray = Array.isArray; +var isMap = (val) => toTypeString(val) === "[object Map]"; +var isSet = (val) => toTypeString(val) === "[object Set]"; +var isDate = (val) => toTypeString(val) === "[object Date]"; +var isRegExp = (val) => toTypeString(val) === "[object RegExp]"; +var isFunction = (val) => typeof val === "function"; +var isString = (val) => typeof val === "string"; +var isSymbol = (val) => typeof val === "symbol"; +var isObject = (val) => val !== null && typeof val === "object"; +var isPromise = (val) => { + return (isObject(val) || isFunction(val)) && isFunction(val.then) && isFunction(val.catch); +}; +var objectToString = Object.prototype.toString; +var toTypeString = (value) => objectToString.call(value); +var toRawType = (value) => { + return toTypeString(value).slice(8, -1); +}; +var isPlainObject = (val) => toTypeString(val) === "[object Object]"; +var isIntegerKey = (key) => isString(key) && key !== "NaN" && key[0] !== "-" && "" + parseInt(key, 10) === key; +var isReservedProp = makeMap( + // the leading comma is intentional so empty string "" is also included + ",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted" +); +var isBuiltInDirective = makeMap( + "bind,cloak,else-if,else,for,html,if,model,on,once,pre,show,slot,text,memo" +); +var cacheStringFunction = (fn) => { + const cache = /* @__PURE__ */ Object.create(null); + return (str) => { + const hit = cache[str]; + return hit || (cache[str] = fn(str)); + }; +}; +var camelizeRE = /-(\w)/g; +var camelize = cacheStringFunction((str) => { + return str.replace(camelizeRE, (_, c) => c ? c.toUpperCase() : ""); +}); +var hyphenateRE = /\B([A-Z])/g; +var hyphenate = cacheStringFunction( + (str) => str.replace(hyphenateRE, "-$1").toLowerCase() +); +var capitalize = cacheStringFunction((str) => { + return str.charAt(0).toUpperCase() + str.slice(1); +}); +var toHandlerKey = cacheStringFunction((str) => { + const s = str ? `on${capitalize(str)}` : ``; + return s; +}); +var hasChanged = (value, oldValue) => !Object.is(value, oldValue); +var invokeArrayFns = (fns, ...arg) => { + for (let i = 0; i < fns.length; i++) { + fns[i](...arg); + } +}; +var def = (obj, key, value, writable = false) => { + Object.defineProperty(obj, key, { + configurable: true, + enumerable: false, + writable, + value + }); +}; +var looseToNumber = (val) => { + const n = parseFloat(val); + return isNaN(n) ? val : n; +}; +var toNumber = (val) => { + const n = isString(val) ? Number(val) : NaN; + return isNaN(n) ? val : n; +}; +var _globalThis; +var getGlobalThis = () => { + return _globalThis || (_globalThis = typeof globalThis !== "undefined" ? globalThis : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : {}); +}; +var GLOBALS_ALLOWED = "Infinity,undefined,NaN,isFinite,isNaN,parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,BigInt,console,Error"; +var isGloballyAllowed = makeMap(GLOBALS_ALLOWED); +function normalizeStyle(value) { + if (isArray(value)) { + const res = {}; + for (let i = 0; i < value.length; i++) { + const item = value[i]; + const normalized = isString(item) ? parseStringStyle(item) : normalizeStyle(item); + if (normalized) { + for (const key in normalized) { + res[key] = normalized[key]; + } + } + } + return res; + } else if (isString(value) || isObject(value)) { + return value; + } +} +var listDelimiterRE = /;(?![^(]*\))/g; +var propertyDelimiterRE = /:([^]+)/; +var styleCommentRE = /\/\*[^]*?\*\//g; +function parseStringStyle(cssText) { + const ret = {}; + cssText.replace(styleCommentRE, "").split(listDelimiterRE).forEach((item) => { + if (item) { + const tmp = item.split(propertyDelimiterRE); + tmp.length > 1 && (ret[tmp[0].trim()] = tmp[1].trim()); + } + }); + return ret; +} +function stringifyStyle(styles) { + let ret = ""; + if (!styles || isString(styles)) { + return ret; + } + for (const key in styles) { + const value = styles[key]; + if (isString(value) || typeof value === "number") { + const normalizedKey = key.startsWith(`--`) ? key : hyphenate(key); + ret += `${normalizedKey}:${value};`; + } + } + return ret; +} +function normalizeClass(value) { + let res = ""; + if (isString(value)) { + res = value; + } else if (isArray(value)) { + for (let i = 0; i < value.length; i++) { + const normalized = normalizeClass(value[i]); + if (normalized) { + res += normalized + " "; + } + } + } else if (isObject(value)) { + for (const name in value) { + if (value[name]) { + res += name + " "; + } + } + } + return res.trim(); +} +function normalizeProps(props) { + if (!props) return null; + let { class: klass, style } = props; + if (klass && !isString(klass)) { + props.class = normalizeClass(klass); + } + if (style) { + props.style = normalizeStyle(style); + } + return props; +} +var HTML_TAGS = "html,body,base,head,link,meta,style,title,address,article,aside,footer,header,hgroup,h1,h2,h3,h4,h5,h6,nav,section,div,dd,dl,dt,figcaption,figure,picture,hr,img,li,main,ol,p,pre,ul,a,b,abbr,bdi,bdo,br,cite,code,data,dfn,em,i,kbd,mark,q,rp,rt,ruby,s,samp,small,span,strong,sub,sup,time,u,var,wbr,area,audio,map,track,video,embed,object,param,source,canvas,script,noscript,del,ins,caption,col,colgroup,table,thead,tbody,td,th,tr,button,datalist,fieldset,form,input,label,legend,meter,optgroup,option,output,progress,select,textarea,details,dialog,menu,summary,template,blockquote,iframe,tfoot"; +var SVG_TAGS = "svg,animate,animateMotion,animateTransform,circle,clipPath,color-profile,defs,desc,discard,ellipse,feBlend,feColorMatrix,feComponentTransfer,feComposite,feConvolveMatrix,feDiffuseLighting,feDisplacementMap,feDistantLight,feDropShadow,feFlood,feFuncA,feFuncB,feFuncG,feFuncR,feGaussianBlur,feImage,feMerge,feMergeNode,feMorphology,feOffset,fePointLight,feSpecularLighting,feSpotLight,feTile,feTurbulence,filter,foreignObject,g,hatch,hatchpath,image,line,linearGradient,marker,mask,mesh,meshgradient,meshpatch,meshrow,metadata,mpath,path,pattern,polygon,polyline,radialGradient,rect,set,solidcolor,stop,switch,symbol,text,textPath,title,tspan,unknown,use,view"; +var MATH_TAGS = "annotation,annotation-xml,maction,maligngroup,malignmark,math,menclose,merror,mfenced,mfrac,mfraction,mglyph,mi,mlabeledtr,mlongdiv,mmultiscripts,mn,mo,mover,mpadded,mphantom,mprescripts,mroot,mrow,ms,mscarries,mscarry,msgroup,msline,mspace,msqrt,msrow,mstack,mstyle,msub,msubsup,msup,mtable,mtd,mtext,mtr,munder,munderover,none,semantics"; +var VOID_TAGS = "area,base,br,col,embed,hr,img,input,link,meta,param,source,track,wbr"; +var isHTMLTag = makeMap(HTML_TAGS); +var isSVGTag = makeMap(SVG_TAGS); +var isMathMLTag = makeMap(MATH_TAGS); +var isVoidTag = makeMap(VOID_TAGS); +var specialBooleanAttrs = `itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly`; +var isSpecialBooleanAttr = makeMap(specialBooleanAttrs); +var isBooleanAttr = makeMap( + specialBooleanAttrs + `,async,autofocus,autoplay,controls,default,defer,disabled,hidden,inert,loop,open,required,reversed,scoped,seamless,checked,muted,multiple,selected` +); +function includeBooleanAttr(value) { + return !!value || value === ""; +} +var isKnownHtmlAttr = makeMap( + `accept,accept-charset,accesskey,action,align,allow,alt,async,autocapitalize,autocomplete,autofocus,autoplay,background,bgcolor,border,buffered,capture,challenge,charset,checked,cite,class,code,codebase,color,cols,colspan,content,contenteditable,contextmenu,controls,coords,crossorigin,csp,data,datetime,decoding,default,defer,dir,dirname,disabled,download,draggable,dropzone,enctype,enterkeyhint,for,form,formaction,formenctype,formmethod,formnovalidate,formtarget,headers,height,hidden,high,href,hreflang,http-equiv,icon,id,importance,inert,integrity,ismap,itemprop,keytype,kind,label,lang,language,loading,list,loop,low,manifest,max,maxlength,minlength,media,min,multiple,muted,name,novalidate,open,optimum,pattern,ping,placeholder,poster,preload,radiogroup,readonly,referrerpolicy,rel,required,reversed,rows,rowspan,sandbox,scope,scoped,selected,shape,size,sizes,slot,span,spellcheck,src,srcdoc,srclang,srcset,start,step,style,summary,tabindex,target,title,translate,type,usemap,value,width,wrap` +); +var isKnownSvgAttr = makeMap( + `xmlns,accent-height,accumulate,additive,alignment-baseline,alphabetic,amplitude,arabic-form,ascent,attributeName,attributeType,azimuth,baseFrequency,baseline-shift,baseProfile,bbox,begin,bias,by,calcMode,cap-height,class,clip,clipPathUnits,clip-path,clip-rule,color,color-interpolation,color-interpolation-filters,color-profile,color-rendering,contentScriptType,contentStyleType,crossorigin,cursor,cx,cy,d,decelerate,descent,diffuseConstant,direction,display,divisor,dominant-baseline,dur,dx,dy,edgeMode,elevation,enable-background,end,exponent,fill,fill-opacity,fill-rule,filter,filterRes,filterUnits,flood-color,flood-opacity,font-family,font-size,font-size-adjust,font-stretch,font-style,font-variant,font-weight,format,from,fr,fx,fy,g1,g2,glyph-name,glyph-orientation-horizontal,glyph-orientation-vertical,glyphRef,gradientTransform,gradientUnits,hanging,height,href,hreflang,horiz-adv-x,horiz-origin-x,id,ideographic,image-rendering,in,in2,intercept,k,k1,k2,k3,k4,kernelMatrix,kernelUnitLength,kerning,keyPoints,keySplines,keyTimes,lang,lengthAdjust,letter-spacing,lighting-color,limitingConeAngle,local,marker-end,marker-mid,marker-start,markerHeight,markerUnits,markerWidth,mask,maskContentUnits,maskUnits,mathematical,max,media,method,min,mode,name,numOctaves,offset,opacity,operator,order,orient,orientation,origin,overflow,overline-position,overline-thickness,panose-1,paint-order,path,pathLength,patternContentUnits,patternTransform,patternUnits,ping,pointer-events,points,pointsAtX,pointsAtY,pointsAtZ,preserveAlpha,preserveAspectRatio,primitiveUnits,r,radius,referrerPolicy,refX,refY,rel,rendering-intent,repeatCount,repeatDur,requiredExtensions,requiredFeatures,restart,result,rotate,rx,ry,scale,seed,shape-rendering,slope,spacing,specularConstant,specularExponent,speed,spreadMethod,startOffset,stdDeviation,stemh,stemv,stitchTiles,stop-color,stop-opacity,strikethrough-position,strikethrough-thickness,string,stroke,stroke-dasharray,stroke-dashoffset,stroke-linecap,stroke-linejoin,stroke-miterlimit,stroke-opacity,stroke-width,style,surfaceScale,systemLanguage,tabindex,tableValues,target,targetX,targetY,text-anchor,text-decoration,text-rendering,textLength,to,transform,transform-origin,type,u1,u2,underline-position,underline-thickness,unicode,unicode-bidi,unicode-range,units-per-em,v-alphabetic,v-hanging,v-ideographic,v-mathematical,values,vector-effect,version,vert-adv-y,vert-origin-x,vert-origin-y,viewBox,viewTarget,visibility,width,widths,word-spacing,writing-mode,x,x-height,x1,x2,xChannelSelector,xlink:actuate,xlink:arcrole,xlink:href,xlink:role,xlink:show,xlink:title,xlink:type,xmlns:xlink,xml:base,xml:lang,xml:space,y,y1,y2,yChannelSelector,z,zoomAndPan` +); +function isRenderableAttrValue(value) { + if (value == null) { + return false; + } + const type = typeof value; + return type === "string" || type === "number" || type === "boolean"; +} +function looseCompareArrays(a, b) { + if (a.length !== b.length) return false; + let equal = true; + for (let i = 0; equal && i < a.length; i++) { + equal = looseEqual(a[i], b[i]); + } + return equal; +} +function looseEqual(a, b) { + if (a === b) return true; + let aValidType = isDate(a); + let bValidType = isDate(b); + if (aValidType || bValidType) { + return aValidType && bValidType ? a.getTime() === b.getTime() : false; + } + aValidType = isSymbol(a); + bValidType = isSymbol(b); + if (aValidType || bValidType) { + return a === b; + } + aValidType = isArray(a); + bValidType = isArray(b); + if (aValidType || bValidType) { + return aValidType && bValidType ? looseCompareArrays(a, b) : false; + } + aValidType = isObject(a); + bValidType = isObject(b); + if (aValidType || bValidType) { + if (!aValidType || !bValidType) { + return false; + } + const aKeysCount = Object.keys(a).length; + const bKeysCount = Object.keys(b).length; + if (aKeysCount !== bKeysCount) { + return false; + } + for (const key in a) { + const aHasKey = a.hasOwnProperty(key); + const bHasKey = b.hasOwnProperty(key); + if (aHasKey && !bHasKey || !aHasKey && bHasKey || !looseEqual(a[key], b[key])) { + return false; + } + } + } + return String(a) === String(b); +} +function looseIndexOf(arr, val) { + return arr.findIndex((item) => looseEqual(item, val)); +} +var toDisplayString = (val) => { + return isString(val) ? val : val == null ? "" : isArray(val) || isObject(val) && (val.toString === objectToString || !isFunction(val.toString)) ? JSON.stringify(val, replacer, 2) : String(val); +}; +var replacer = (_key, val) => { + if (val && val.__v_isRef) { + return replacer(_key, val.value); + } else if (isMap(val)) { + return { + [`Map(${val.size})`]: [...val.entries()].reduce( + (entries, [key, val2], i) => { + entries[stringifySymbol(key, i) + " =>"] = val2; + return entries; + }, + {} + ) + }; + } else if (isSet(val)) { + return { + [`Set(${val.size})`]: [...val.values()].map((v) => stringifySymbol(v)) + }; + } else if (isSymbol(val)) { + return stringifySymbol(val); + } else if (isObject(val) && !isArray(val) && !isPlainObject(val)) { + return String(val); + } + return val; +}; +var stringifySymbol = (v, i = "") => { + var _a; + return ( + // Symbol.description in es2019+ so we need to cast here to pass + // the lib: es2016 check + isSymbol(v) ? `Symbol(${(_a = v.description) != null ? _a : i})` : v + ); +}; + +// node_modules/@vue/reactivity/dist/reactivity.esm-bundler.js +function warn(msg, ...args) { + console.warn(`[Vue warn] ${msg}`, ...args); +} +var activeEffectScope; +var EffectScope = class { + constructor(detached = false) { + this.detached = detached; + this._active = true; + this.effects = []; + this.cleanups = []; + this.parent = activeEffectScope; + if (!detached && activeEffectScope) { + this.index = (activeEffectScope.scopes || (activeEffectScope.scopes = [])).push( + this + ) - 1; + } + } + get active() { + return this._active; + } + run(fn) { + if (this._active) { + const currentEffectScope = activeEffectScope; + try { + activeEffectScope = this; + return fn(); + } finally { + activeEffectScope = currentEffectScope; + } + } else if (true) { + warn(`cannot run an inactive effect scope.`); + } + } + /** + * This should only be called on non-detached scopes + * @internal + */ + on() { + activeEffectScope = this; + } + /** + * This should only be called on non-detached scopes + * @internal + */ + off() { + activeEffectScope = this.parent; + } + stop(fromParent) { + if (this._active) { + let i, l; + for (i = 0, l = this.effects.length; i < l; i++) { + this.effects[i].stop(); + } + for (i = 0, l = this.cleanups.length; i < l; i++) { + this.cleanups[i](); + } + if (this.scopes) { + for (i = 0, l = this.scopes.length; i < l; i++) { + this.scopes[i].stop(true); + } + } + if (!this.detached && this.parent && !fromParent) { + const last = this.parent.scopes.pop(); + if (last && last !== this) { + this.parent.scopes[this.index] = last; + last.index = this.index; + } + } + this.parent = void 0; + this._active = false; + } + } +}; +function effectScope(detached) { + return new EffectScope(detached); +} +function recordEffectScope(effect2, scope = activeEffectScope) { + if (scope && scope.active) { + scope.effects.push(effect2); + } +} +function getCurrentScope() { + return activeEffectScope; +} +function onScopeDispose(fn) { + if (activeEffectScope) { + activeEffectScope.cleanups.push(fn); + } else if (true) { + warn( + `onScopeDispose() is called when there is no active effect scope to be associated with.` + ); + } +} +var activeEffect; +var ReactiveEffect = class { + constructor(fn, trigger2, scheduler, scope) { + this.fn = fn; + this.trigger = trigger2; + this.scheduler = scheduler; + this.active = true; + this.deps = []; + this._dirtyLevel = 5; + this._trackId = 0; + this._runnings = 0; + this._shouldSchedule = false; + this._depsLength = 0; + recordEffectScope(this, scope); + } + get dirty() { + if (this._dirtyLevel === 2) + return false; + if (this._dirtyLevel === 3 || this._dirtyLevel === 4) { + this._dirtyLevel = 1; + pauseTracking(); + for (let i = 0; i < this._depsLength; i++) { + const dep = this.deps[i]; + if (dep.computed) { + if (dep.computed.effect._dirtyLevel === 2) + return true; + triggerComputed(dep.computed); + if (this._dirtyLevel >= 5) { + break; + } + } + } + if (this._dirtyLevel === 1) { + this._dirtyLevel = 0; + } + resetTracking(); + } + return this._dirtyLevel >= 5; + } + set dirty(v) { + this._dirtyLevel = v ? 5 : 0; + } + run() { + this._dirtyLevel = 0; + if (!this.active) { + return this.fn(); + } + let lastShouldTrack = shouldTrack; + let lastEffect = activeEffect; + try { + shouldTrack = true; + activeEffect = this; + this._runnings++; + preCleanupEffect(this); + return this.fn(); + } finally { + postCleanupEffect(this); + this._runnings--; + activeEffect = lastEffect; + shouldTrack = lastShouldTrack; + } + } + stop() { + if (this.active) { + preCleanupEffect(this); + postCleanupEffect(this); + this.onStop && this.onStop(); + this.active = false; + } + } +}; +function triggerComputed(computed3) { + return computed3.value; +} +function preCleanupEffect(effect2) { + effect2._trackId++; + effect2._depsLength = 0; +} +function postCleanupEffect(effect2) { + if (effect2.deps.length > effect2._depsLength) { + for (let i = effect2._depsLength; i < effect2.deps.length; i++) { + cleanupDepEffect(effect2.deps[i], effect2); + } + effect2.deps.length = effect2._depsLength; + } +} +function cleanupDepEffect(dep, effect2) { + const trackId = dep.get(effect2); + if (trackId !== void 0 && effect2._trackId !== trackId) { + dep.delete(effect2); + if (dep.size === 0) { + dep.cleanup(); + } + } +} +function effect(fn, options) { + if (fn.effect instanceof ReactiveEffect) { + fn = fn.effect.fn; + } + const _effect = new ReactiveEffect(fn, NOOP, () => { + if (_effect.dirty) { + _effect.run(); + } + }); + if (options) { + extend(_effect, options); + if (options.scope) recordEffectScope(_effect, options.scope); + } + if (!options || !options.lazy) { + _effect.run(); + } + const runner = _effect.run.bind(_effect); + runner.effect = _effect; + return runner; +} +function stop(runner) { + runner.effect.stop(); +} +var shouldTrack = true; +var pauseScheduleStack = 0; +var trackStack = []; +function pauseTracking() { + trackStack.push(shouldTrack); + shouldTrack = false; +} +function resetTracking() { + const last = trackStack.pop(); + shouldTrack = last === void 0 ? true : last; +} +function pauseScheduling() { + pauseScheduleStack++; +} +function resetScheduling() { + pauseScheduleStack--; + while (!pauseScheduleStack && queueEffectSchedulers.length) { + queueEffectSchedulers.shift()(); + } +} +function trackEffect(effect2, dep, debuggerEventExtraInfo) { + var _a; + if (dep.get(effect2) !== effect2._trackId) { + dep.set(effect2, effect2._trackId); + const oldDep = effect2.deps[effect2._depsLength]; + if (oldDep !== dep) { + if (oldDep) { + cleanupDepEffect(oldDep, effect2); + } + effect2.deps[effect2._depsLength++] = dep; + } else { + effect2._depsLength++; + } + if (true) { + (_a = effect2.onTrack) == null ? void 0 : _a.call(effect2, extend({ effect: effect2 }, debuggerEventExtraInfo)); + } + } +} +var queueEffectSchedulers = []; +function triggerEffects(dep, dirtyLevel, debuggerEventExtraInfo) { + var _a; + pauseScheduling(); + for (const effect2 of dep.keys()) { + if (!dep.computed && effect2.computed) { + if (dep.get(effect2) === effect2._trackId && effect2._runnings > 0) { + effect2._dirtyLevel = 2; + continue; + } + } + let tracking; + if (effect2._dirtyLevel < dirtyLevel && (tracking != null ? tracking : tracking = dep.get(effect2) === effect2._trackId)) { + effect2._shouldSchedule || (effect2._shouldSchedule = effect2._dirtyLevel === 0); + if (effect2.computed && effect2._dirtyLevel === 2) { + effect2._shouldSchedule = true; + } + effect2._dirtyLevel = dirtyLevel; + } + if (effect2._shouldSchedule && (tracking != null ? tracking : tracking = dep.get(effect2) === effect2._trackId)) { + if (true) { + (_a = effect2.onTrigger) == null ? void 0 : _a.call(effect2, extend({ effect: effect2 }, debuggerEventExtraInfo)); + } + effect2.trigger(); + if ((!effect2._runnings || effect2.allowRecurse) && effect2._dirtyLevel !== 3) { + effect2._shouldSchedule = false; + if (effect2.scheduler) { + queueEffectSchedulers.push(effect2.scheduler); + } + } + } + } + resetScheduling(); +} +var createDep = (cleanup, computed3) => { + const dep = /* @__PURE__ */ new Map(); + dep.cleanup = cleanup; + dep.computed = computed3; + return dep; +}; +var targetMap = /* @__PURE__ */ new WeakMap(); +var ITERATE_KEY = Symbol(true ? "iterate" : ""); +var MAP_KEY_ITERATE_KEY = Symbol(true ? "Map key iterate" : ""); +function track(target, type, key) { + if (shouldTrack && activeEffect) { + let depsMap = targetMap.get(target); + if (!depsMap) { + targetMap.set(target, depsMap = /* @__PURE__ */ new Map()); + } + let dep = depsMap.get(key); + if (!dep) { + depsMap.set(key, dep = createDep(() => depsMap.delete(key))); + } + trackEffect( + activeEffect, + dep, + true ? { + target, + type, + key + } : void 0 + ); + } +} +function trigger(target, type, key, newValue, oldValue, oldTarget) { + const depsMap = targetMap.get(target); + if (!depsMap) { + return; + } + let deps = []; + if (type === "clear") { + deps = [...depsMap.values()]; + } else if (key === "length" && isArray(target)) { + const newLength = Number(newValue); + depsMap.forEach((dep, key2) => { + if (key2 === "length" || !isSymbol(key2) && key2 >= newLength) { + deps.push(dep); + } + }); + } else { + if (key !== void 0) { + deps.push(depsMap.get(key)); + } + switch (type) { + case "add": + if (!isArray(target)) { + deps.push(depsMap.get(ITERATE_KEY)); + if (isMap(target)) { + deps.push(depsMap.get(MAP_KEY_ITERATE_KEY)); + } + } else if (isIntegerKey(key)) { + deps.push(depsMap.get("length")); + } + break; + case "delete": + if (!isArray(target)) { + deps.push(depsMap.get(ITERATE_KEY)); + if (isMap(target)) { + deps.push(depsMap.get(MAP_KEY_ITERATE_KEY)); + } + } + break; + case "set": + if (isMap(target)) { + deps.push(depsMap.get(ITERATE_KEY)); + } + break; + } + } + pauseScheduling(); + for (const dep of deps) { + if (dep) { + triggerEffects( + dep, + 5, + true ? { + target, + type, + key, + newValue, + oldValue, + oldTarget + } : void 0 + ); + } + } + resetScheduling(); +} +function getDepFromReactive(object, key) { + const depsMap = targetMap.get(object); + return depsMap && depsMap.get(key); +} +var isNonTrackableKeys = makeMap(`__proto__,__v_isRef,__isVue`); +var builtInSymbols = new Set( + Object.getOwnPropertyNames(Symbol).filter((key) => key !== "arguments" && key !== "caller").map((key) => Symbol[key]).filter(isSymbol) +); +var arrayInstrumentations = createArrayInstrumentations(); +function createArrayInstrumentations() { + const instrumentations = {}; + ["includes", "indexOf", "lastIndexOf"].forEach((key) => { + instrumentations[key] = function(...args) { + const arr = toRaw(this); + for (let i = 0, l = this.length; i < l; i++) { + track(arr, "get", i + ""); + } + const res = arr[key](...args); + if (res === -1 || res === false) { + return arr[key](...args.map(toRaw)); + } else { + return res; + } + }; + }); + ["push", "pop", "shift", "unshift", "splice"].forEach((key) => { + instrumentations[key] = function(...args) { + pauseTracking(); + pauseScheduling(); + const res = toRaw(this)[key].apply(this, args); + resetScheduling(); + resetTracking(); + return res; + }; + }); + return instrumentations; +} +function hasOwnProperty2(key) { + if (!isSymbol(key)) key = String(key); + const obj = toRaw(this); + track(obj, "has", key); + return obj.hasOwnProperty(key); +} +var BaseReactiveHandler = class { + constructor(_isReadonly = false, _isShallow = false) { + this._isReadonly = _isReadonly; + this._isShallow = _isShallow; + } + get(target, key, receiver) { + const isReadonly2 = this._isReadonly, isShallow2 = this._isShallow; + if (key === "__v_isReactive") { + return !isReadonly2; + } else if (key === "__v_isReadonly") { + return isReadonly2; + } else if (key === "__v_isShallow") { + return isShallow2; + } else if (key === "__v_raw") { + if (receiver === (isReadonly2 ? isShallow2 ? shallowReadonlyMap : readonlyMap : isShallow2 ? shallowReactiveMap : reactiveMap).get(target) || // receiver is not the reactive proxy, but has the same prototype + // this means the reciever is a user proxy of the reactive proxy + Object.getPrototypeOf(target) === Object.getPrototypeOf(receiver)) { + return target; + } + return; + } + const targetIsArray = isArray(target); + if (!isReadonly2) { + if (targetIsArray && hasOwn(arrayInstrumentations, key)) { + return Reflect.get(arrayInstrumentations, key, receiver); + } + if (key === "hasOwnProperty") { + return hasOwnProperty2; + } + } + const res = Reflect.get(target, key, receiver); + if (isSymbol(key) ? builtInSymbols.has(key) : isNonTrackableKeys(key)) { + return res; + } + if (!isReadonly2) { + track(target, "get", key); + } + if (isShallow2) { + return res; + } + if (isRef(res)) { + return targetIsArray && isIntegerKey(key) ? res : res.value; + } + if (isObject(res)) { + return isReadonly2 ? readonly(res) : reactive(res); + } + return res; + } +}; +var MutableReactiveHandler = class extends BaseReactiveHandler { + constructor(isShallow2 = false) { + super(false, isShallow2); + } + set(target, key, value, receiver) { + let oldValue = target[key]; + if (!this._isShallow) { + const isOldValueReadonly = isReadonly(oldValue); + if (!isShallow(value) && !isReadonly(value)) { + oldValue = toRaw(oldValue); + value = toRaw(value); + } + if (!isArray(target) && isRef(oldValue) && !isRef(value)) { + if (isOldValueReadonly) { + return false; + } else { + oldValue.value = value; + return true; + } + } + } + const hadKey = isArray(target) && isIntegerKey(key) ? Number(key) < target.length : hasOwn(target, key); + const result = Reflect.set(target, key, value, receiver); + if (target === toRaw(receiver)) { + if (!hadKey) { + trigger(target, "add", key, value); + } else if (hasChanged(value, oldValue)) { + trigger(target, "set", key, value, oldValue); + } + } + return result; + } + deleteProperty(target, key) { + const hadKey = hasOwn(target, key); + const oldValue = target[key]; + const result = Reflect.deleteProperty(target, key); + if (result && hadKey) { + trigger(target, "delete", key, void 0, oldValue); + } + return result; + } + has(target, key) { + const result = Reflect.has(target, key); + if (!isSymbol(key) || !builtInSymbols.has(key)) { + track(target, "has", key); + } + return result; + } + ownKeys(target) { + track( + target, + "iterate", + isArray(target) ? "length" : ITERATE_KEY + ); + return Reflect.ownKeys(target); + } +}; +var ReadonlyReactiveHandler = class extends BaseReactiveHandler { + constructor(isShallow2 = false) { + super(true, isShallow2); + } + set(target, key) { + if (true) { + warn( + `Set operation on key "${String(key)}" failed: target is readonly.`, + target + ); + } + return true; + } + deleteProperty(target, key) { + if (true) { + warn( + `Delete operation on key "${String(key)}" failed: target is readonly.`, + target + ); + } + return true; + } +}; +var mutableHandlers = new MutableReactiveHandler(); +var readonlyHandlers = new ReadonlyReactiveHandler(); +var shallowReactiveHandlers = new MutableReactiveHandler( + true +); +var shallowReadonlyHandlers = new ReadonlyReactiveHandler(true); +var toShallow = (value) => value; +var getProto = (v) => Reflect.getPrototypeOf(v); +function get(target, key, isReadonly2 = false, isShallow2 = false) { + target = target["__v_raw"]; + const rawTarget = toRaw(target); + const rawKey = toRaw(key); + if (!isReadonly2) { + if (hasChanged(key, rawKey)) { + track(rawTarget, "get", key); + } + track(rawTarget, "get", rawKey); + } + const { has: has2 } = getProto(rawTarget); + const wrap = isShallow2 ? toShallow : isReadonly2 ? toReadonly : toReactive; + if (has2.call(rawTarget, key)) { + return wrap(target.get(key)); + } else if (has2.call(rawTarget, rawKey)) { + return wrap(target.get(rawKey)); + } else if (target !== rawTarget) { + target.get(key); + } +} +function has(key, isReadonly2 = false) { + const target = this["__v_raw"]; + const rawTarget = toRaw(target); + const rawKey = toRaw(key); + if (!isReadonly2) { + if (hasChanged(key, rawKey)) { + track(rawTarget, "has", key); + } + track(rawTarget, "has", rawKey); + } + return key === rawKey ? target.has(key) : target.has(key) || target.has(rawKey); +} +function size(target, isReadonly2 = false) { + target = target["__v_raw"]; + !isReadonly2 && track(toRaw(target), "iterate", ITERATE_KEY); + return Reflect.get(target, "size", target); +} +function add(value) { + value = toRaw(value); + const target = toRaw(this); + const proto = getProto(target); + const hadKey = proto.has.call(target, value); + if (!hadKey) { + target.add(value); + trigger(target, "add", value, value); + } + return this; +} +function set(key, value) { + value = toRaw(value); + const target = toRaw(this); + const { has: has2, get: get2 } = getProto(target); + let hadKey = has2.call(target, key); + if (!hadKey) { + key = toRaw(key); + hadKey = has2.call(target, key); + } else if (true) { + checkIdentityKeys(target, has2, key); + } + const oldValue = get2.call(target, key); + target.set(key, value); + if (!hadKey) { + trigger(target, "add", key, value); + } else if (hasChanged(value, oldValue)) { + trigger(target, "set", key, value, oldValue); + } + return this; +} +function deleteEntry(key) { + const target = toRaw(this); + const { has: has2, get: get2 } = getProto(target); + let hadKey = has2.call(target, key); + if (!hadKey) { + key = toRaw(key); + hadKey = has2.call(target, key); + } else if (true) { + checkIdentityKeys(target, has2, key); + } + const oldValue = get2 ? get2.call(target, key) : void 0; + const result = target.delete(key); + if (hadKey) { + trigger(target, "delete", key, void 0, oldValue); + } + return result; +} +function clear() { + const target = toRaw(this); + const hadItems = target.size !== 0; + const oldTarget = true ? isMap(target) ? new Map(target) : new Set(target) : void 0; + const result = target.clear(); + if (hadItems) { + trigger(target, "clear", void 0, void 0, oldTarget); + } + return result; +} +function createForEach(isReadonly2, isShallow2) { + return function forEach(callback, thisArg) { + const observed = this; + const target = observed["__v_raw"]; + const rawTarget = toRaw(target); + const wrap = isShallow2 ? toShallow : isReadonly2 ? toReadonly : toReactive; + !isReadonly2 && track(rawTarget, "iterate", ITERATE_KEY); + return target.forEach((value, key) => { + return callback.call(thisArg, wrap(value), wrap(key), observed); + }); + }; +} +function createIterableMethod(method, isReadonly2, isShallow2) { + return function(...args) { + const target = this["__v_raw"]; + const rawTarget = toRaw(target); + const targetIsMap = isMap(rawTarget); + const isPair = method === "entries" || method === Symbol.iterator && targetIsMap; + const isKeyOnly = method === "keys" && targetIsMap; + const innerIterator = target[method](...args); + const wrap = isShallow2 ? toShallow : isReadonly2 ? toReadonly : toReactive; + !isReadonly2 && track( + rawTarget, + "iterate", + isKeyOnly ? MAP_KEY_ITERATE_KEY : ITERATE_KEY + ); + return { + // iterator protocol + next() { + const { value, done } = innerIterator.next(); + return done ? { value, done } : { + value: isPair ? [wrap(value[0]), wrap(value[1])] : wrap(value), + done + }; + }, + // iterable protocol + [Symbol.iterator]() { + return this; + } + }; + }; +} +function createReadonlyMethod(type) { + return function(...args) { + if (true) { + const key = args[0] ? `on key "${args[0]}" ` : ``; + warn( + `${capitalize(type)} operation ${key}failed: target is readonly.`, + toRaw(this) + ); + } + return type === "delete" ? false : type === "clear" ? void 0 : this; + }; +} +function createInstrumentations() { + const mutableInstrumentations2 = { + get(key) { + return get(this, key); + }, + get size() { + return size(this); + }, + has, + add, + set, + delete: deleteEntry, + clear, + forEach: createForEach(false, false) + }; + const shallowInstrumentations2 = { + get(key) { + return get(this, key, false, true); + }, + get size() { + return size(this); + }, + has, + add, + set, + delete: deleteEntry, + clear, + forEach: createForEach(false, true) + }; + const readonlyInstrumentations2 = { + get(key) { + return get(this, key, true); + }, + get size() { + return size(this, true); + }, + has(key) { + return has.call(this, key, true); + }, + add: createReadonlyMethod("add"), + set: createReadonlyMethod("set"), + delete: createReadonlyMethod("delete"), + clear: createReadonlyMethod("clear"), + forEach: createForEach(true, false) + }; + const shallowReadonlyInstrumentations2 = { + get(key) { + return get(this, key, true, true); + }, + get size() { + return size(this, true); + }, + has(key) { + return has.call(this, key, true); + }, + add: createReadonlyMethod("add"), + set: createReadonlyMethod("set"), + delete: createReadonlyMethod("delete"), + clear: createReadonlyMethod("clear"), + forEach: createForEach(true, true) + }; + const iteratorMethods = [ + "keys", + "values", + "entries", + Symbol.iterator + ]; + iteratorMethods.forEach((method) => { + mutableInstrumentations2[method] = createIterableMethod(method, false, false); + readonlyInstrumentations2[method] = createIterableMethod(method, true, false); + shallowInstrumentations2[method] = createIterableMethod(method, false, true); + shallowReadonlyInstrumentations2[method] = createIterableMethod( + method, + true, + true + ); + }); + return [ + mutableInstrumentations2, + readonlyInstrumentations2, + shallowInstrumentations2, + shallowReadonlyInstrumentations2 + ]; +} +var [ + mutableInstrumentations, + readonlyInstrumentations, + shallowInstrumentations, + shallowReadonlyInstrumentations +] = createInstrumentations(); +function createInstrumentationGetter(isReadonly2, shallow) { + const instrumentations = shallow ? isReadonly2 ? shallowReadonlyInstrumentations : shallowInstrumentations : isReadonly2 ? readonlyInstrumentations : mutableInstrumentations; + return (target, key, receiver) => { + if (key === "__v_isReactive") { + return !isReadonly2; + } else if (key === "__v_isReadonly") { + return isReadonly2; + } else if (key === "__v_raw") { + return target; + } + return Reflect.get( + hasOwn(instrumentations, key) && key in target ? instrumentations : target, + key, + receiver + ); + }; +} +var mutableCollectionHandlers = { + get: createInstrumentationGetter(false, false) +}; +var shallowCollectionHandlers = { + get: createInstrumentationGetter(false, true) +}; +var readonlyCollectionHandlers = { + get: createInstrumentationGetter(true, false) +}; +var shallowReadonlyCollectionHandlers = { + get: createInstrumentationGetter(true, true) +}; +function checkIdentityKeys(target, has2, key) { + const rawKey = toRaw(key); + if (rawKey !== key && has2.call(target, rawKey)) { + const type = toRawType(target); + warn( + `Reactive ${type} contains both the raw and reactive versions of the same object${type === `Map` ? ` as keys` : ``}, which can lead to inconsistencies. Avoid differentiating between the raw and reactive versions of an object and only use the reactive version if possible.` + ); + } +} +var reactiveMap = /* @__PURE__ */ new WeakMap(); +var shallowReactiveMap = /* @__PURE__ */ new WeakMap(); +var readonlyMap = /* @__PURE__ */ new WeakMap(); +var shallowReadonlyMap = /* @__PURE__ */ new WeakMap(); +function targetTypeMap(rawType) { + switch (rawType) { + case "Object": + case "Array": + return 1; + case "Map": + case "Set": + case "WeakMap": + case "WeakSet": + return 2; + default: + return 0; + } +} +function getTargetType(value) { + return value["__v_skip"] || !Object.isExtensible(value) ? 0 : targetTypeMap(toRawType(value)); +} +function reactive(target) { + if (isReadonly(target)) { + return target; + } + return createReactiveObject( + target, + false, + mutableHandlers, + mutableCollectionHandlers, + reactiveMap + ); +} +function shallowReactive(target) { + return createReactiveObject( + target, + false, + shallowReactiveHandlers, + shallowCollectionHandlers, + shallowReactiveMap + ); +} +function readonly(target) { + return createReactiveObject( + target, + true, + readonlyHandlers, + readonlyCollectionHandlers, + readonlyMap + ); +} +function shallowReadonly(target) { + return createReactiveObject( + target, + true, + shallowReadonlyHandlers, + shallowReadonlyCollectionHandlers, + shallowReadonlyMap + ); +} +function createReactiveObject(target, isReadonly2, baseHandlers, collectionHandlers, proxyMap) { + if (!isObject(target)) { + if (true) { + warn( + `value cannot be made ${isReadonly2 ? "readonly" : "reactive"}: ${String( + target + )}` + ); + } + return target; + } + if (target["__v_raw"] && !(isReadonly2 && target["__v_isReactive"])) { + return target; + } + const existingProxy = proxyMap.get(target); + if (existingProxy) { + return existingProxy; + } + const targetType = getTargetType(target); + if (targetType === 0) { + return target; + } + const proxy = new Proxy( + target, + targetType === 2 ? collectionHandlers : baseHandlers + ); + proxyMap.set(target, proxy); + return proxy; +} +function isReactive(value) { + if (isReadonly(value)) { + return isReactive(value["__v_raw"]); + } + return !!(value && value["__v_isReactive"]); +} +function isReadonly(value) { + return !!(value && value["__v_isReadonly"]); +} +function isShallow(value) { + return !!(value && value["__v_isShallow"]); +} +function isProxy(value) { + return value ? !!value["__v_raw"] : false; +} +function toRaw(observed) { + const raw = observed && observed["__v_raw"]; + return raw ? toRaw(raw) : observed; +} +function markRaw(value) { + if (Object.isExtensible(value)) { + def(value, "__v_skip", true); + } + return value; +} +var toReactive = (value) => isObject(value) ? reactive(value) : value; +var toReadonly = (value) => isObject(value) ? readonly(value) : value; +var COMPUTED_SIDE_EFFECT_WARN = `Computed is still dirty after getter evaluation, likely because a computed is mutating its own dependency in its getter. State mutations in computed getters should be avoided. Check the docs for more details: https://vuejs.org/guide/essentials/computed.html#getters-should-be-side-effect-free`; +var ComputedRefImpl = class { + constructor(getter, _setter, isReadonly2, isSSR) { + this.getter = getter; + this._setter = _setter; + this.dep = void 0; + this.__v_isRef = true; + this["__v_isReadonly"] = false; + this.effect = new ReactiveEffect( + () => getter(this._value), + () => triggerRefValue( + this, + this.effect._dirtyLevel === 3 ? 3 : 4 + ) + ); + this.effect.computed = this; + this.effect.active = this._cacheable = !isSSR; + this["__v_isReadonly"] = isReadonly2; + } + get value() { + const self2 = toRaw(this); + if ((!self2._cacheable || self2.effect.dirty) && hasChanged(self2._value, self2._value = self2.effect.run())) { + triggerRefValue(self2, 5); + } + trackRefValue(self2); + if (self2.effect._dirtyLevel >= 2) { + if (this._warnRecursive) { + warn(COMPUTED_SIDE_EFFECT_WARN, ` + +getter: `, this.getter); + } + triggerRefValue(self2, 3); + } + return self2._value; + } + set value(newValue) { + this._setter(newValue); + } + // #region polyfill _dirty for backward compatibility third party code for Vue <= 3.3.x + get _dirty() { + return this.effect.dirty; + } + set _dirty(v) { + this.effect.dirty = v; + } + // #endregion +}; +function computed(getterOrOptions, debugOptions, isSSR = false) { + let getter; + let setter; + const onlyGetter = isFunction(getterOrOptions); + if (onlyGetter) { + getter = getterOrOptions; + setter = true ? () => { + warn("Write operation failed: computed value is readonly"); + } : NOOP; + } else { + getter = getterOrOptions.get; + setter = getterOrOptions.set; + } + const cRef = new ComputedRefImpl(getter, setter, onlyGetter || !setter, isSSR); + if (debugOptions && !isSSR) { + cRef.effect.onTrack = debugOptions.onTrack; + cRef.effect.onTrigger = debugOptions.onTrigger; + } + return cRef; +} +function trackRefValue(ref2) { + var _a; + if (shouldTrack && activeEffect) { + ref2 = toRaw(ref2); + trackEffect( + activeEffect, + (_a = ref2.dep) != null ? _a : ref2.dep = createDep( + () => ref2.dep = void 0, + ref2 instanceof ComputedRefImpl ? ref2 : void 0 + ), + true ? { + target: ref2, + type: "get", + key: "value" + } : void 0 + ); + } +} +function triggerRefValue(ref2, dirtyLevel = 5, newVal, oldVal) { + ref2 = toRaw(ref2); + const dep = ref2.dep; + if (dep) { + triggerEffects( + dep, + dirtyLevel, + true ? { + target: ref2, + type: "set", + key: "value", + newValue: newVal, + oldValue: oldVal + } : void 0 + ); + } +} +function isRef(r) { + return !!(r && r.__v_isRef === true); +} +function ref(value) { + return createRef(value, false); +} +function shallowRef(value) { + return createRef(value, true); +} +function createRef(rawValue, shallow) { + if (isRef(rawValue)) { + return rawValue; + } + return new RefImpl(rawValue, shallow); +} +var RefImpl = class { + constructor(value, __v_isShallow) { + this.__v_isShallow = __v_isShallow; + this.dep = void 0; + this.__v_isRef = true; + this._rawValue = __v_isShallow ? value : toRaw(value); + this._value = __v_isShallow ? value : toReactive(value); + } + get value() { + trackRefValue(this); + return this._value; + } + set value(newVal) { + const useDirectValue = this.__v_isShallow || isShallow(newVal) || isReadonly(newVal); + newVal = useDirectValue ? newVal : toRaw(newVal); + if (hasChanged(newVal, this._rawValue)) { + const oldVal = this._rawValue; + this._rawValue = newVal; + this._value = useDirectValue ? newVal : toReactive(newVal); + triggerRefValue(this, 5, newVal, oldVal); + } + } +}; +function triggerRef(ref2) { + triggerRefValue(ref2, 5, true ? ref2.value : void 0); +} +function unref(ref2) { + return isRef(ref2) ? ref2.value : ref2; +} +function toValue(source) { + return isFunction(source) ? source() : unref(source); +} +var shallowUnwrapHandlers = { + get: (target, key, receiver) => unref(Reflect.get(target, key, receiver)), + set: (target, key, value, receiver) => { + const oldValue = target[key]; + if (isRef(oldValue) && !isRef(value)) { + oldValue.value = value; + return true; + } else { + return Reflect.set(target, key, value, receiver); + } + } +}; +function proxyRefs(objectWithRefs) { + return isReactive(objectWithRefs) ? objectWithRefs : new Proxy(objectWithRefs, shallowUnwrapHandlers); +} +var CustomRefImpl = class { + constructor(factory) { + this.dep = void 0; + this.__v_isRef = true; + const { get: get2, set: set2 } = factory( + () => trackRefValue(this), + () => triggerRefValue(this) + ); + this._get = get2; + this._set = set2; + } + get value() { + return this._get(); + } + set value(newVal) { + this._set(newVal); + } +}; +function customRef(factory) { + return new CustomRefImpl(factory); +} +function toRefs(object) { + if (!isProxy(object)) { + warn(`toRefs() expects a reactive object but received a plain one.`); + } + const ret = isArray(object) ? new Array(object.length) : {}; + for (const key in object) { + ret[key] = propertyToRef(object, key); + } + return ret; +} +var ObjectRefImpl = class { + constructor(_object, _key, _defaultValue) { + this._object = _object; + this._key = _key; + this._defaultValue = _defaultValue; + this.__v_isRef = true; + } + get value() { + const val = this._object[this._key]; + return val === void 0 ? this._defaultValue : val; + } + set value(newVal) { + this._object[this._key] = newVal; + } + get dep() { + return getDepFromReactive(toRaw(this._object), this._key); + } +}; +var GetterRefImpl = class { + constructor(_getter) { + this._getter = _getter; + this.__v_isRef = true; + this.__v_isReadonly = true; + } + get value() { + return this._getter(); + } +}; +function toRef(source, key, defaultValue) { + if (isRef(source)) { + return source; + } else if (isFunction(source)) { + return new GetterRefImpl(source); + } else if (isObject(source) && arguments.length > 1) { + return propertyToRef(source, key, defaultValue); + } else { + return ref(source); + } +} +function propertyToRef(source, key, defaultValue) { + const val = source[key]; + return isRef(val) ? val : new ObjectRefImpl(source, key, defaultValue); +} +var TrackOpTypes = { + "GET": "get", + "HAS": "has", + "ITERATE": "iterate" +}; +var TriggerOpTypes = { + "SET": "set", + "ADD": "add", + "DELETE": "delete", + "CLEAR": "clear" +}; + +// node_modules/@vue/runtime-core/dist/runtime-core.esm-bundler.js +var stack = []; +function pushWarningContext(vnode) { + stack.push(vnode); +} +function popWarningContext() { + stack.pop(); +} +function warn$1(msg, ...args) { + pauseTracking(); + const instance = stack.length ? stack[stack.length - 1].component : null; + const appWarnHandler = instance && instance.appContext.config.warnHandler; + const trace = getComponentTrace(); + if (appWarnHandler) { + callWithErrorHandling( + appWarnHandler, + instance, + 11, + [ + // eslint-disable-next-line no-restricted-syntax + msg + args.map((a) => { + var _a, _b; + return (_b = (_a = a.toString) == null ? void 0 : _a.call(a)) != null ? _b : JSON.stringify(a); + }).join(""), + instance && instance.proxy, + trace.map( + ({ vnode }) => `at <${formatComponentName(instance, vnode.type)}>` + ).join("\n"), + trace + ] + ); + } else { + const warnArgs = [`[Vue warn]: ${msg}`, ...args]; + if (trace.length && // avoid spamming console during tests + true) { + warnArgs.push(` +`, ...formatTrace(trace)); + } + console.warn(...warnArgs); + } + resetTracking(); +} +function getComponentTrace() { + let currentVNode = stack[stack.length - 1]; + if (!currentVNode) { + return []; + } + const normalizedStack = []; + while (currentVNode) { + const last = normalizedStack[0]; + if (last && last.vnode === currentVNode) { + last.recurseCount++; + } else { + normalizedStack.push({ + vnode: currentVNode, + recurseCount: 0 + }); + } + const parentInstance = currentVNode.component && currentVNode.component.parent; + currentVNode = parentInstance && parentInstance.vnode; + } + return normalizedStack; +} +function formatTrace(trace) { + const logs = []; + trace.forEach((entry, i) => { + logs.push(...i === 0 ? [] : [` +`], ...formatTraceEntry(entry)); + }); + return logs; +} +function formatTraceEntry({ vnode, recurseCount }) { + const postfix = recurseCount > 0 ? `... (${recurseCount} recursive calls)` : ``; + const isRoot = vnode.component ? vnode.component.parent == null : false; + const open = ` at <${formatComponentName( + vnode.component, + vnode.type, + isRoot + )}`; + const close = `>` + postfix; + return vnode.props ? [open, ...formatProps(vnode.props), close] : [open + close]; +} +function formatProps(props) { + const res = []; + const keys = Object.keys(props); + keys.slice(0, 3).forEach((key) => { + res.push(...formatProp(key, props[key])); + }); + if (keys.length > 3) { + res.push(` ...`); + } + return res; +} +function formatProp(key, value, raw) { + if (isString(value)) { + value = JSON.stringify(value); + return raw ? value : [`${key}=${value}`]; + } else if (typeof value === "number" || typeof value === "boolean" || value == null) { + return raw ? value : [`${key}=${value}`]; + } else if (isRef(value)) { + value = formatProp(key, toRaw(value.value), true); + return raw ? value : [`${key}=Ref<`, value, `>`]; + } else if (isFunction(value)) { + return [`${key}=fn${value.name ? `<${value.name}>` : ``}`]; + } else { + value = toRaw(value); + return raw ? value : [`${key}=`, value]; + } +} +function assertNumber(val, type) { + if (false) return; + if (val === void 0) { + return; + } else if (typeof val !== "number") { + warn$1(`${type} is not a valid number - got ${JSON.stringify(val)}.`); + } else if (isNaN(val)) { + warn$1(`${type} is NaN - the duration expression might be incorrect.`); + } +} +var ErrorCodes = { + "SETUP_FUNCTION": 0, + "0": "SETUP_FUNCTION", + "RENDER_FUNCTION": 1, + "1": "RENDER_FUNCTION", + "WATCH_GETTER": 2, + "2": "WATCH_GETTER", + "WATCH_CALLBACK": 3, + "3": "WATCH_CALLBACK", + "WATCH_CLEANUP": 4, + "4": "WATCH_CLEANUP", + "NATIVE_EVENT_HANDLER": 5, + "5": "NATIVE_EVENT_HANDLER", + "COMPONENT_EVENT_HANDLER": 6, + "6": "COMPONENT_EVENT_HANDLER", + "VNODE_HOOK": 7, + "7": "VNODE_HOOK", + "DIRECTIVE_HOOK": 8, + "8": "DIRECTIVE_HOOK", + "TRANSITION_HOOK": 9, + "9": "TRANSITION_HOOK", + "APP_ERROR_HANDLER": 10, + "10": "APP_ERROR_HANDLER", + "APP_WARN_HANDLER": 11, + "11": "APP_WARN_HANDLER", + "FUNCTION_REF": 12, + "12": "FUNCTION_REF", + "ASYNC_COMPONENT_LOADER": 13, + "13": "ASYNC_COMPONENT_LOADER", + "SCHEDULER": 14, + "14": "SCHEDULER" +}; +var ErrorTypeStrings$1 = { + ["sp"]: "serverPrefetch hook", + ["bc"]: "beforeCreate hook", + ["c"]: "created hook", + ["bm"]: "beforeMount hook", + ["m"]: "mounted hook", + ["bu"]: "beforeUpdate hook", + ["u"]: "updated", + ["bum"]: "beforeUnmount hook", + ["um"]: "unmounted hook", + ["a"]: "activated hook", + ["da"]: "deactivated hook", + ["ec"]: "errorCaptured hook", + ["rtc"]: "renderTracked hook", + ["rtg"]: "renderTriggered hook", + [0]: "setup function", + [1]: "render function", + [2]: "watcher getter", + [3]: "watcher callback", + [4]: "watcher cleanup function", + [5]: "native event handler", + [6]: "component event handler", + [7]: "vnode hook", + [8]: "directive hook", + [9]: "transition hook", + [10]: "app errorHandler", + [11]: "app warnHandler", + [12]: "ref function", + [13]: "async component loader", + [14]: "scheduler flush. This is likely a Vue internals bug. Please open an issue at https://github.com/vuejs/core ." +}; +function callWithErrorHandling(fn, instance, type, args) { + try { + return args ? fn(...args) : fn(); + } catch (err) { + handleError(err, instance, type); + } +} +function callWithAsyncErrorHandling(fn, instance, type, args) { + if (isFunction(fn)) { + const res = callWithErrorHandling(fn, instance, type, args); + if (res && isPromise(res)) { + res.catch((err) => { + handleError(err, instance, type); + }); + } + return res; + } + if (isArray(fn)) { + const values = []; + for (let i = 0; i < fn.length; i++) { + values.push(callWithAsyncErrorHandling(fn[i], instance, type, args)); + } + return values; + } else if (true) { + warn$1( + `Invalid value type passed to callWithAsyncErrorHandling(): ${typeof fn}` + ); + } +} +function handleError(err, instance, type, throwInDev = true) { + const contextVNode = instance ? instance.vnode : null; + if (instance) { + let cur = instance.parent; + const exposedInstance = instance.proxy; + const errorInfo = true ? ErrorTypeStrings$1[type] : `https://vuejs.org/error-reference/#runtime-${type}`; + while (cur) { + const errorCapturedHooks = cur.ec; + if (errorCapturedHooks) { + for (let i = 0; i < errorCapturedHooks.length; i++) { + if (errorCapturedHooks[i](err, exposedInstance, errorInfo) === false) { + return; + } + } + } + cur = cur.parent; + } + const appErrorHandler = instance.appContext.config.errorHandler; + if (appErrorHandler) { + pauseTracking(); + callWithErrorHandling( + appErrorHandler, + null, + 10, + [err, exposedInstance, errorInfo] + ); + resetTracking(); + return; + } + } + logError(err, type, contextVNode, throwInDev); +} +function logError(err, type, contextVNode, throwInDev = true) { + if (true) { + const info = ErrorTypeStrings$1[type]; + if (contextVNode) { + pushWarningContext(contextVNode); + } + warn$1(`Unhandled error${info ? ` during execution of ${info}` : ``}`); + if (contextVNode) { + popWarningContext(); + } + if (throwInDev) { + throw err; + } else { + console.error(err); + } + } else { + console.error(err); + } +} +var isFlushing = false; +var isFlushPending = false; +var queue = []; +var flushIndex = 0; +var pendingPostFlushCbs = []; +var activePostFlushCbs = null; +var postFlushIndex = 0; +var resolvedPromise = Promise.resolve(); +var currentFlushPromise = null; +var RECURSION_LIMIT = 100; +function nextTick(fn) { + const p2 = currentFlushPromise || resolvedPromise; + return fn ? p2.then(this ? fn.bind(this) : fn) : p2; +} +function findInsertionIndex(id) { + let start = flushIndex + 1; + let end = queue.length; + while (start < end) { + const middle = start + end >>> 1; + const middleJob = queue[middle]; + const middleJobId = getId(middleJob); + if (middleJobId < id || middleJobId === id && middleJob.pre) { + start = middle + 1; + } else { + end = middle; + } + } + return start; +} +function queueJob(job) { + if (!queue.length || !queue.includes( + job, + isFlushing && job.allowRecurse ? flushIndex + 1 : flushIndex + )) { + if (job.id == null) { + queue.push(job); + } else { + queue.splice(findInsertionIndex(job.id), 0, job); + } + queueFlush(); + } +} +function queueFlush() { + if (!isFlushing && !isFlushPending) { + isFlushPending = true; + currentFlushPromise = resolvedPromise.then(flushJobs); + } +} +function invalidateJob(job) { + const i = queue.indexOf(job); + if (i > flushIndex) { + queue.splice(i, 1); + } +} +function queuePostFlushCb(cb) { + if (!isArray(cb)) { + if (!activePostFlushCbs || !activePostFlushCbs.includes( + cb, + cb.allowRecurse ? postFlushIndex + 1 : postFlushIndex + )) { + pendingPostFlushCbs.push(cb); + } + } else { + pendingPostFlushCbs.push(...cb); + } + queueFlush(); +} +function flushPreFlushCbs(instance, seen, i = isFlushing ? flushIndex + 1 : 0) { + if (true) { + seen = seen || /* @__PURE__ */ new Map(); + } + for (; i < queue.length; i++) { + const cb = queue[i]; + if (cb && cb.pre) { + if (instance && cb.id !== instance.uid) { + continue; + } + if (checkRecursiveUpdates(seen, cb)) { + continue; + } + queue.splice(i, 1); + i--; + cb(); + } + } +} +function flushPostFlushCbs(seen) { + if (pendingPostFlushCbs.length) { + const deduped = [...new Set(pendingPostFlushCbs)].sort( + (a, b) => getId(a) - getId(b) + ); + pendingPostFlushCbs.length = 0; + if (activePostFlushCbs) { + activePostFlushCbs.push(...deduped); + return; + } + activePostFlushCbs = deduped; + if (true) { + seen = seen || /* @__PURE__ */ new Map(); + } + for (postFlushIndex = 0; postFlushIndex < activePostFlushCbs.length; postFlushIndex++) { + const cb = activePostFlushCbs[postFlushIndex]; + if (checkRecursiveUpdates(seen, cb)) { + continue; + } + if (cb.active !== false) cb(); + } + activePostFlushCbs = null; + postFlushIndex = 0; + } +} +var getId = (job) => job.id == null ? Infinity : job.id; +var comparator = (a, b) => { + const diff = getId(a) - getId(b); + if (diff === 0) { + if (a.pre && !b.pre) return -1; + if (b.pre && !a.pre) return 1; + } + return diff; +}; +function flushJobs(seen) { + isFlushPending = false; + isFlushing = true; + if (true) { + seen = seen || /* @__PURE__ */ new Map(); + } + queue.sort(comparator); + const check = true ? (job) => checkRecursiveUpdates(seen, job) : NOOP; + try { + for (flushIndex = 0; flushIndex < queue.length; flushIndex++) { + const job = queue[flushIndex]; + if (job && job.active !== false) { + if (check(job)) { + continue; + } + callWithErrorHandling(job, null, 14); + } + } + } finally { + flushIndex = 0; + queue.length = 0; + flushPostFlushCbs(seen); + isFlushing = false; + currentFlushPromise = null; + if (queue.length || pendingPostFlushCbs.length) { + flushJobs(seen); + } + } +} +function checkRecursiveUpdates(seen, fn) { + if (!seen.has(fn)) { + seen.set(fn, 1); + } else { + const count = seen.get(fn); + if (count > RECURSION_LIMIT) { + const instance = fn.ownerInstance; + const componentName = instance && getComponentName(instance.type); + handleError( + `Maximum recursive updates exceeded${componentName ? ` in component <${componentName}>` : ``}. This means you have a reactive effect that is mutating its own dependencies and thus recursively triggering itself. Possible sources include component template, render function, updated hook or watcher source function.`, + null, + 10 + ); + return true; + } else { + seen.set(fn, count + 1); + } + } +} +var isHmrUpdating = false; +var hmrDirtyComponents = /* @__PURE__ */ new Set(); +if (true) { + getGlobalThis().__VUE_HMR_RUNTIME__ = { + createRecord: tryWrap(createRecord), + rerender: tryWrap(rerender), + reload: tryWrap(reload) + }; +} +var map = /* @__PURE__ */ new Map(); +function registerHMR(instance) { + const id = instance.type.__hmrId; + let record = map.get(id); + if (!record) { + createRecord(id, instance.type); + record = map.get(id); + } + record.instances.add(instance); +} +function unregisterHMR(instance) { + map.get(instance.type.__hmrId).instances.delete(instance); +} +function createRecord(id, initialDef) { + if (map.has(id)) { + return false; + } + map.set(id, { + initialDef: normalizeClassComponent(initialDef), + instances: /* @__PURE__ */ new Set() + }); + return true; +} +function normalizeClassComponent(component) { + return isClassComponent(component) ? component.__vccOpts : component; +} +function rerender(id, newRender) { + const record = map.get(id); + if (!record) { + return; + } + record.initialDef.render = newRender; + [...record.instances].forEach((instance) => { + if (newRender) { + instance.render = newRender; + normalizeClassComponent(instance.type).render = newRender; + } + instance.renderCache = []; + isHmrUpdating = true; + instance.effect.dirty = true; + instance.update(); + isHmrUpdating = false; + }); +} +function reload(id, newComp) { + const record = map.get(id); + if (!record) return; + newComp = normalizeClassComponent(newComp); + updateComponentDef(record.initialDef, newComp); + const instances = [...record.instances]; + for (const instance of instances) { + const oldComp = normalizeClassComponent(instance.type); + if (!hmrDirtyComponents.has(oldComp)) { + if (oldComp !== record.initialDef) { + updateComponentDef(oldComp, newComp); + } + hmrDirtyComponents.add(oldComp); + } + instance.appContext.propsCache.delete(instance.type); + instance.appContext.emitsCache.delete(instance.type); + instance.appContext.optionsCache.delete(instance.type); + if (instance.ceReload) { + hmrDirtyComponents.add(oldComp); + instance.ceReload(newComp.styles); + hmrDirtyComponents.delete(oldComp); + } else if (instance.parent) { + instance.parent.effect.dirty = true; + queueJob(() => { + instance.parent.update(); + hmrDirtyComponents.delete(oldComp); + }); + } else if (instance.appContext.reload) { + instance.appContext.reload(); + } else if (typeof window !== "undefined") { + window.location.reload(); + } else { + console.warn( + "[HMR] Root or manually mounted instance modified. Full reload required." + ); + } + } + queuePostFlushCb(() => { + for (const instance of instances) { + hmrDirtyComponents.delete( + normalizeClassComponent(instance.type) + ); + } + }); +} +function updateComponentDef(oldComp, newComp) { + extend(oldComp, newComp); + for (const key in oldComp) { + if (key !== "__file" && !(key in newComp)) { + delete oldComp[key]; + } + } +} +function tryWrap(fn) { + return (id, arg) => { + try { + return fn(id, arg); + } catch (e) { + console.error(e); + console.warn( + `[HMR] Something went wrong during Vue component hot-reload. Full reload required.` + ); + } + }; +} +var devtools$1; +var buffer = []; +var devtoolsNotInstalled = false; +function emit$1(event, ...args) { + if (devtools$1) { + devtools$1.emit(event, ...args); + } else if (!devtoolsNotInstalled) { + buffer.push({ event, args }); + } +} +function setDevtoolsHook$1(hook, target) { + var _a, _b; + devtools$1 = hook; + if (devtools$1) { + devtools$1.enabled = true; + buffer.forEach(({ event, args }) => devtools$1.emit(event, ...args)); + buffer = []; + } else if ( + // handle late devtools injection - only do this if we are in an actual + // browser environment to avoid the timer handle stalling test runner exit + // (#4815) + typeof window !== "undefined" && // some envs mock window but not fully + window.HTMLElement && // also exclude jsdom + // eslint-disable-next-line no-restricted-syntax + !((_b = (_a = window.navigator) == null ? void 0 : _a.userAgent) == null ? void 0 : _b.includes("jsdom")) + ) { + const replay = target.__VUE_DEVTOOLS_HOOK_REPLAY__ = target.__VUE_DEVTOOLS_HOOK_REPLAY__ || []; + replay.push((newHook) => { + setDevtoolsHook$1(newHook, target); + }); + setTimeout(() => { + if (!devtools$1) { + target.__VUE_DEVTOOLS_HOOK_REPLAY__ = null; + devtoolsNotInstalled = true; + buffer = []; + } + }, 3e3); + } else { + devtoolsNotInstalled = true; + buffer = []; + } +} +function devtoolsInitApp(app, version2) { + emit$1("app:init", app, version2, { + Fragment, + Text, + Comment, + Static + }); +} +function devtoolsUnmountApp(app) { + emit$1("app:unmount", app); +} +var devtoolsComponentAdded = createDevtoolsComponentHook( + "component:added" + /* COMPONENT_ADDED */ +); +var devtoolsComponentUpdated = createDevtoolsComponentHook( + "component:updated" + /* COMPONENT_UPDATED */ +); +var _devtoolsComponentRemoved = createDevtoolsComponentHook( + "component:removed" + /* COMPONENT_REMOVED */ +); +var devtoolsComponentRemoved = (component) => { + if (devtools$1 && typeof devtools$1.cleanupBuffer === "function" && // remove the component if it wasn't buffered + !devtools$1.cleanupBuffer(component)) { + _devtoolsComponentRemoved(component); + } +}; +function createDevtoolsComponentHook(hook) { + return (component) => { + emit$1( + hook, + component.appContext.app, + component.uid, + component.parent ? component.parent.uid : void 0, + component + ); + }; +} +var devtoolsPerfStart = createDevtoolsPerformanceHook( + "perf:start" + /* PERFORMANCE_START */ +); +var devtoolsPerfEnd = createDevtoolsPerformanceHook( + "perf:end" + /* PERFORMANCE_END */ +); +function createDevtoolsPerformanceHook(hook) { + return (component, type, time) => { + emit$1(hook, component.appContext.app, component.uid, component, type, time); + }; +} +function devtoolsComponentEmit(component, event, params) { + emit$1( + "component:emit", + component.appContext.app, + component, + event, + params + ); +} +function emit(instance, event, ...rawArgs) { + if (instance.isUnmounted) return; + const props = instance.vnode.props || EMPTY_OBJ; + if (true) { + const { + emitsOptions, + propsOptions: [propsOptions] + } = instance; + if (emitsOptions) { + if (!(event in emitsOptions) && true) { + if (!propsOptions || !(toHandlerKey(event) in propsOptions)) { + warn$1( + `Component emitted event "${event}" but it is neither declared in the emits option nor as an "${toHandlerKey(event)}" prop.` + ); + } + } else { + const validator = emitsOptions[event]; + if (isFunction(validator)) { + const isValid = validator(...rawArgs); + if (!isValid) { + warn$1( + `Invalid event arguments: event validation failed for event "${event}".` + ); + } + } + } + } + } + let args = rawArgs; + const isModelListener2 = event.startsWith("update:"); + const modelArg = isModelListener2 && event.slice(7); + if (modelArg && modelArg in props) { + const modifiersKey = `${modelArg === "modelValue" ? "model" : modelArg}Modifiers`; + const { number, trim } = props[modifiersKey] || EMPTY_OBJ; + if (trim) { + args = rawArgs.map((a) => isString(a) ? a.trim() : a); + } + if (number) { + args = rawArgs.map(looseToNumber); + } + } + if (true) { + devtoolsComponentEmit(instance, event, args); + } + if (true) { + const lowerCaseEvent = event.toLowerCase(); + if (lowerCaseEvent !== event && props[toHandlerKey(lowerCaseEvent)]) { + warn$1( + `Event "${lowerCaseEvent}" is emitted in component ${formatComponentName( + instance, + instance.type + )} but the handler is registered for "${event}". Note that HTML attributes are case-insensitive and you cannot use v-on to listen to camelCase events when using in-DOM templates. You should probably use "${hyphenate( + event + )}" instead of "${event}".` + ); + } + } + let handlerName; + let handler = props[handlerName = toHandlerKey(event)] || // also try camelCase event handler (#2249) + props[handlerName = toHandlerKey(camelize(event))]; + if (!handler && isModelListener2) { + handler = props[handlerName = toHandlerKey(hyphenate(event))]; + } + if (handler) { + callWithAsyncErrorHandling( + handler, + instance, + 6, + args + ); + } + const onceHandler = props[handlerName + `Once`]; + if (onceHandler) { + if (!instance.emitted) { + instance.emitted = {}; + } else if (instance.emitted[handlerName]) { + return; + } + instance.emitted[handlerName] = true; + callWithAsyncErrorHandling( + onceHandler, + instance, + 6, + args + ); + } +} +function normalizeEmitsOptions(comp, appContext, asMixin = false) { + const cache = appContext.emitsCache; + const cached = cache.get(comp); + if (cached !== void 0) { + return cached; + } + const raw = comp.emits; + let normalized = {}; + let hasExtends = false; + if (__VUE_OPTIONS_API__ && !isFunction(comp)) { + const extendEmits = (raw2) => { + const normalizedFromExtend = normalizeEmitsOptions(raw2, appContext, true); + if (normalizedFromExtend) { + hasExtends = true; + extend(normalized, normalizedFromExtend); + } + }; + if (!asMixin && appContext.mixins.length) { + appContext.mixins.forEach(extendEmits); + } + if (comp.extends) { + extendEmits(comp.extends); + } + if (comp.mixins) { + comp.mixins.forEach(extendEmits); + } + } + if (!raw && !hasExtends) { + if (isObject(comp)) { + cache.set(comp, null); + } + return null; + } + if (isArray(raw)) { + raw.forEach((key) => normalized[key] = null); + } else { + extend(normalized, raw); + } + if (isObject(comp)) { + cache.set(comp, normalized); + } + return normalized; +} +function isEmitListener(options, key) { + if (!options || !isOn(key)) { + return false; + } + key = key.slice(2).replace(/Once$/, ""); + return hasOwn(options, key[0].toLowerCase() + key.slice(1)) || hasOwn(options, hyphenate(key)) || hasOwn(options, key); +} +var currentRenderingInstance = null; +var currentScopeId = null; +function setCurrentRenderingInstance(instance) { + const prev = currentRenderingInstance; + currentRenderingInstance = instance; + currentScopeId = instance && instance.type.__scopeId || null; + return prev; +} +function pushScopeId(id) { + currentScopeId = id; +} +function popScopeId() { + currentScopeId = null; +} +var withScopeId = (_id) => withCtx; +function withCtx(fn, ctx = currentRenderingInstance, isNonScopedSlot) { + if (!ctx) return fn; + if (fn._n) { + return fn; + } + const renderFnWithContext = (...args) => { + if (renderFnWithContext._d) { + setBlockTracking(-1); + } + const prevInstance = setCurrentRenderingInstance(ctx); + let res; + try { + res = fn(...args); + } finally { + setCurrentRenderingInstance(prevInstance); + if (renderFnWithContext._d) { + setBlockTracking(1); + } + } + if (true) { + devtoolsComponentUpdated(ctx); + } + return res; + }; + renderFnWithContext._n = true; + renderFnWithContext._c = true; + renderFnWithContext._d = true; + return renderFnWithContext; +} +var accessedAttrs = false; +function markAttrsAccessed() { + accessedAttrs = true; +} +function renderComponentRoot(instance) { + const { + type: Component, + vnode, + proxy, + withProxy, + propsOptions: [propsOptions], + slots, + attrs, + emit: emit2, + render: render2, + renderCache, + props, + data, + setupState, + ctx, + inheritAttrs + } = instance; + const prev = setCurrentRenderingInstance(instance); + let result; + let fallthroughAttrs; + if (true) { + accessedAttrs = false; + } + try { + if (vnode.shapeFlag & 4) { + const proxyToUse = withProxy || proxy; + const thisProxy = setupState.__isScriptSetup ? new Proxy(proxyToUse, { + get(target, key, receiver) { + warn$1( + `Property '${String( + key + )}' was accessed via 'this'. Avoid using 'this' in templates.` + ); + return Reflect.get(target, key, receiver); + } + }) : proxyToUse; + result = normalizeVNode( + render2.call( + thisProxy, + proxyToUse, + renderCache, + true ? shallowReadonly(props) : props, + setupState, + data, + ctx + ) + ); + fallthroughAttrs = attrs; + } else { + const render22 = Component; + if (attrs === props) { + markAttrsAccessed(); + } + result = normalizeVNode( + render22.length > 1 ? render22( + true ? shallowReadonly(props) : props, + true ? { + get attrs() { + markAttrsAccessed(); + return shallowReadonly(attrs); + }, + slots, + emit: emit2 + } : { attrs, slots, emit: emit2 } + ) : render22( + true ? shallowReadonly(props) : props, + null + ) + ); + fallthroughAttrs = Component.props ? attrs : getFunctionalFallthrough(attrs); + } + } catch (err) { + blockStack.length = 0; + handleError(err, instance, 1); + result = createVNode(Comment); + } + let root = result; + let setRoot = void 0; + if (result.patchFlag > 0 && result.patchFlag & 2048) { + [root, setRoot] = getChildRoot(result); + } + if (fallthroughAttrs && inheritAttrs !== false) { + const keys = Object.keys(fallthroughAttrs); + const { shapeFlag } = root; + if (keys.length) { + if (shapeFlag & (1 | 6)) { + if (propsOptions && keys.some(isModelListener)) { + fallthroughAttrs = filterModelListeners( + fallthroughAttrs, + propsOptions + ); + } + root = cloneVNode(root, fallthroughAttrs, false, true); + } else if (!accessedAttrs && root.type !== Comment) { + const allAttrs = Object.keys(attrs); + const eventAttrs = []; + const extraAttrs = []; + for (let i = 0, l = allAttrs.length; i < l; i++) { + const key = allAttrs[i]; + if (isOn(key)) { + if (!isModelListener(key)) { + eventAttrs.push(key[2].toLowerCase() + key.slice(3)); + } + } else { + extraAttrs.push(key); + } + } + if (extraAttrs.length) { + warn$1( + `Extraneous non-props attributes (${extraAttrs.join(", ")}) were passed to component but could not be automatically inherited because component renders fragment or text root nodes.` + ); + } + if (eventAttrs.length) { + warn$1( + `Extraneous non-emits event listeners (${eventAttrs.join(", ")}) were passed to component but could not be automatically inherited because component renders fragment or text root nodes. If the listener is intended to be a component custom event listener only, declare it using the "emits" option.` + ); + } + } + } + } + if (vnode.dirs) { + if (!isElementRoot(root)) { + warn$1( + `Runtime directive used on component with non-element root node. The directives will not function as intended.` + ); + } + root = cloneVNode(root, null, false, true); + root.dirs = root.dirs ? root.dirs.concat(vnode.dirs) : vnode.dirs; + } + if (vnode.transition) { + if (!isElementRoot(root)) { + warn$1( + `Component inside renders non-element root node that cannot be animated.` + ); + } + root.transition = vnode.transition; + } + if (setRoot) { + setRoot(root); + } else { + result = root; + } + setCurrentRenderingInstance(prev); + return result; +} +var getChildRoot = (vnode) => { + const rawChildren = vnode.children; + const dynamicChildren = vnode.dynamicChildren; + const childRoot = filterSingleRoot(rawChildren, false); + if (!childRoot) { + return [vnode, void 0]; + } else if (childRoot.patchFlag > 0 && childRoot.patchFlag & 2048) { + return getChildRoot(childRoot); + } + const index = rawChildren.indexOf(childRoot); + const dynamicIndex = dynamicChildren ? dynamicChildren.indexOf(childRoot) : -1; + const setRoot = (updatedRoot) => { + rawChildren[index] = updatedRoot; + if (dynamicChildren) { + if (dynamicIndex > -1) { + dynamicChildren[dynamicIndex] = updatedRoot; + } else if (updatedRoot.patchFlag > 0) { + vnode.dynamicChildren = [...dynamicChildren, updatedRoot]; + } + } + }; + return [normalizeVNode(childRoot), setRoot]; +}; +function filterSingleRoot(children, recurse = true) { + let singleRoot; + for (let i = 0; i < children.length; i++) { + const child = children[i]; + if (isVNode(child)) { + if (child.type !== Comment || child.children === "v-if") { + if (singleRoot) { + return; + } else { + singleRoot = child; + if (recurse && singleRoot.patchFlag > 0 && singleRoot.patchFlag & 2048) { + return filterSingleRoot(singleRoot.children); + } + } + } + } else { + return; + } + } + return singleRoot; +} +var getFunctionalFallthrough = (attrs) => { + let res; + for (const key in attrs) { + if (key === "class" || key === "style" || isOn(key)) { + (res || (res = {}))[key] = attrs[key]; + } + } + return res; +}; +var filterModelListeners = (attrs, props) => { + const res = {}; + for (const key in attrs) { + if (!isModelListener(key) || !(key.slice(9) in props)) { + res[key] = attrs[key]; + } + } + return res; +}; +var isElementRoot = (vnode) => { + return vnode.shapeFlag & (6 | 1) || vnode.type === Comment; +}; +function shouldUpdateComponent(prevVNode, nextVNode, optimized) { + const { props: prevProps, children: prevChildren, component } = prevVNode; + const { props: nextProps, children: nextChildren, patchFlag } = nextVNode; + const emits = component.emitsOptions; + if ((prevChildren || nextChildren) && isHmrUpdating) { + return true; + } + if (nextVNode.dirs || nextVNode.transition) { + return true; + } + if (optimized && patchFlag >= 0) { + if (patchFlag & 1024) { + return true; + } + if (patchFlag & 16) { + if (!prevProps) { + return !!nextProps; + } + return hasPropsChanged(prevProps, nextProps, emits); + } else if (patchFlag & 8) { + const dynamicProps = nextVNode.dynamicProps; + for (let i = 0; i < dynamicProps.length; i++) { + const key = dynamicProps[i]; + if (nextProps[key] !== prevProps[key] && !isEmitListener(emits, key)) { + return true; + } + } + } + } else { + if (prevChildren || nextChildren) { + if (!nextChildren || !nextChildren.$stable) { + return true; + } + } + if (prevProps === nextProps) { + return false; + } + if (!prevProps) { + return !!nextProps; + } + if (!nextProps) { + return true; + } + return hasPropsChanged(prevProps, nextProps, emits); + } + return false; +} +function hasPropsChanged(prevProps, nextProps, emitsOptions) { + const nextKeys = Object.keys(nextProps); + if (nextKeys.length !== Object.keys(prevProps).length) { + return true; + } + for (let i = 0; i < nextKeys.length; i++) { + const key = nextKeys[i]; + if (nextProps[key] !== prevProps[key] && !isEmitListener(emitsOptions, key)) { + return true; + } + } + return false; +} +function updateHOCHostEl({ vnode, parent }, el) { + while (parent) { + const root = parent.subTree; + if (root.suspense && root.suspense.activeBranch === vnode) { + root.el = vnode.el; + } + if (root === vnode) { + (vnode = parent.vnode).el = el; + parent = parent.parent; + } else { + break; + } + } +} +var COMPONENTS = "components"; +var DIRECTIVES = "directives"; +function resolveComponent(name, maybeSelfReference) { + return resolveAsset(COMPONENTS, name, true, maybeSelfReference) || name; +} +var NULL_DYNAMIC_COMPONENT = Symbol.for("v-ndc"); +function resolveDynamicComponent(component) { + if (isString(component)) { + return resolveAsset(COMPONENTS, component, false) || component; + } else { + return component || NULL_DYNAMIC_COMPONENT; + } +} +function resolveDirective(name) { + return resolveAsset(DIRECTIVES, name); +} +function resolveAsset(type, name, warnMissing = true, maybeSelfReference = false) { + const instance = currentRenderingInstance || currentInstance; + if (instance) { + const Component = instance.type; + if (type === COMPONENTS) { + const selfName = getComponentName( + Component, + false + ); + if (selfName && (selfName === name || selfName === camelize(name) || selfName === capitalize(camelize(name)))) { + return Component; + } + } + const res = ( + // local registration + // check instance[type] first which is resolved for options API + resolve(instance[type] || Component[type], name) || // global registration + resolve(instance.appContext[type], name) + ); + if (!res && maybeSelfReference) { + return Component; + } + if (warnMissing && !res) { + const extra = type === COMPONENTS ? ` +If this is a native custom element, make sure to exclude it from component resolution via compilerOptions.isCustomElement.` : ``; + warn$1(`Failed to resolve ${type.slice(0, -1)}: ${name}${extra}`); + } + return res; + } else if (true) { + warn$1( + `resolve${capitalize(type.slice(0, -1))} can only be used in render() or setup().` + ); + } +} +function resolve(registry, name) { + return registry && (registry[name] || registry[camelize(name)] || registry[capitalize(camelize(name))]); +} +var isSuspense = (type) => type.__isSuspense; +var suspenseId = 0; +var SuspenseImpl = { + name: "Suspense", + // In order to make Suspense tree-shakable, we need to avoid importing it + // directly in the renderer. The renderer checks for the __isSuspense flag + // on a vnode's type and calls the `process` method, passing in renderer + // internals. + __isSuspense: true, + process(n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized, rendererInternals) { + if (n1 == null) { + mountSuspense( + n2, + container, + anchor, + parentComponent, + parentSuspense, + namespace, + slotScopeIds, + optimized, + rendererInternals + ); + } else { + if (parentSuspense && parentSuspense.deps > 0 && !n1.suspense.isInFallback) { + n2.suspense = n1.suspense; + n2.suspense.vnode = n2; + n2.el = n1.el; + return; + } + patchSuspense( + n1, + n2, + container, + anchor, + parentComponent, + namespace, + slotScopeIds, + optimized, + rendererInternals + ); + } + }, + hydrate: hydrateSuspense, + create: createSuspenseBoundary, + normalize: normalizeSuspenseChildren +}; +var Suspense = SuspenseImpl; +function triggerEvent(vnode, name) { + const eventListener = vnode.props && vnode.props[name]; + if (isFunction(eventListener)) { + eventListener(); + } +} +function mountSuspense(vnode, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized, rendererInternals) { + const { + p: patch, + o: { createElement } + } = rendererInternals; + const hiddenContainer = createElement("div"); + const suspense = vnode.suspense = createSuspenseBoundary( + vnode, + parentSuspense, + parentComponent, + container, + hiddenContainer, + anchor, + namespace, + slotScopeIds, + optimized, + rendererInternals + ); + patch( + null, + suspense.pendingBranch = vnode.ssContent, + hiddenContainer, + null, + parentComponent, + suspense, + namespace, + slotScopeIds + ); + if (suspense.deps > 0) { + triggerEvent(vnode, "onPending"); + triggerEvent(vnode, "onFallback"); + patch( + null, + vnode.ssFallback, + container, + anchor, + parentComponent, + null, + // fallback tree will not have suspense context + namespace, + slotScopeIds + ); + setActiveBranch(suspense, vnode.ssFallback); + } else { + suspense.resolve(false, true); + } +} +function patchSuspense(n1, n2, container, anchor, parentComponent, namespace, slotScopeIds, optimized, { p: patch, um: unmount, o: { createElement } }) { + const suspense = n2.suspense = n1.suspense; + suspense.vnode = n2; + n2.el = n1.el; + const newBranch = n2.ssContent; + const newFallback = n2.ssFallback; + const { activeBranch, pendingBranch, isInFallback, isHydrating } = suspense; + if (pendingBranch) { + suspense.pendingBranch = newBranch; + if (isSameVNodeType(newBranch, pendingBranch)) { + patch( + pendingBranch, + newBranch, + suspense.hiddenContainer, + null, + parentComponent, + suspense, + namespace, + slotScopeIds, + optimized + ); + if (suspense.deps <= 0) { + suspense.resolve(); + } else if (isInFallback) { + if (!isHydrating) { + patch( + activeBranch, + newFallback, + container, + anchor, + parentComponent, + null, + // fallback tree will not have suspense context + namespace, + slotScopeIds, + optimized + ); + setActiveBranch(suspense, newFallback); + } + } + } else { + suspense.pendingId = suspenseId++; + if (isHydrating) { + suspense.isHydrating = false; + suspense.activeBranch = pendingBranch; + } else { + unmount(pendingBranch, parentComponent, suspense); + } + suspense.deps = 0; + suspense.effects.length = 0; + suspense.hiddenContainer = createElement("div"); + if (isInFallback) { + patch( + null, + newBranch, + suspense.hiddenContainer, + null, + parentComponent, + suspense, + namespace, + slotScopeIds, + optimized + ); + if (suspense.deps <= 0) { + suspense.resolve(); + } else { + patch( + activeBranch, + newFallback, + container, + anchor, + parentComponent, + null, + // fallback tree will not have suspense context + namespace, + slotScopeIds, + optimized + ); + setActiveBranch(suspense, newFallback); + } + } else if (activeBranch && isSameVNodeType(newBranch, activeBranch)) { + patch( + activeBranch, + newBranch, + container, + anchor, + parentComponent, + suspense, + namespace, + slotScopeIds, + optimized + ); + suspense.resolve(true); + } else { + patch( + null, + newBranch, + suspense.hiddenContainer, + null, + parentComponent, + suspense, + namespace, + slotScopeIds, + optimized + ); + if (suspense.deps <= 0) { + suspense.resolve(); + } + } + } + } else { + if (activeBranch && isSameVNodeType(newBranch, activeBranch)) { + patch( + activeBranch, + newBranch, + container, + anchor, + parentComponent, + suspense, + namespace, + slotScopeIds, + optimized + ); + setActiveBranch(suspense, newBranch); + } else { + triggerEvent(n2, "onPending"); + suspense.pendingBranch = newBranch; + if (newBranch.shapeFlag & 512) { + suspense.pendingId = newBranch.component.suspenseId; + } else { + suspense.pendingId = suspenseId++; + } + patch( + null, + newBranch, + suspense.hiddenContainer, + null, + parentComponent, + suspense, + namespace, + slotScopeIds, + optimized + ); + if (suspense.deps <= 0) { + suspense.resolve(); + } else { + const { timeout, pendingId } = suspense; + if (timeout > 0) { + setTimeout(() => { + if (suspense.pendingId === pendingId) { + suspense.fallback(newFallback); + } + }, timeout); + } else if (timeout === 0) { + suspense.fallback(newFallback); + } + } + } + } +} +var hasWarned = false; +function createSuspenseBoundary(vnode, parentSuspense, parentComponent, container, hiddenContainer, anchor, namespace, slotScopeIds, optimized, rendererInternals, isHydrating = false) { + if (!hasWarned) { + hasWarned = true; + console[console.info ? "info" : "log"]( + ` is an experimental feature and its API will likely change.` + ); + } + const { + p: patch, + m: move, + um: unmount, + n: next, + o: { parentNode, remove: remove2 } + } = rendererInternals; + let parentSuspenseId; + const isSuspensible = isVNodeSuspensible(vnode); + if (isSuspensible) { + if (parentSuspense && parentSuspense.pendingBranch) { + parentSuspenseId = parentSuspense.pendingId; + parentSuspense.deps++; + } + } + const timeout = vnode.props ? toNumber(vnode.props.timeout) : void 0; + if (true) { + assertNumber(timeout, `Suspense timeout`); + } + const initialAnchor = anchor; + const suspense = { + vnode, + parent: parentSuspense, + parentComponent, + namespace, + container, + hiddenContainer, + deps: 0, + pendingId: suspenseId++, + timeout: typeof timeout === "number" ? timeout : -1, + activeBranch: null, + pendingBranch: null, + isInFallback: !isHydrating, + isHydrating, + isUnmounted: false, + effects: [], + resolve(resume = false, sync = false) { + if (true) { + if (!resume && !suspense.pendingBranch) { + throw new Error( + `suspense.resolve() is called without a pending branch.` + ); + } + if (suspense.isUnmounted) { + throw new Error( + `suspense.resolve() is called on an already unmounted suspense boundary.` + ); + } + } + const { + vnode: vnode2, + activeBranch, + pendingBranch, + pendingId, + effects, + parentComponent: parentComponent2, + container: container2 + } = suspense; + let delayEnter = false; + if (suspense.isHydrating) { + suspense.isHydrating = false; + } else if (!resume) { + delayEnter = activeBranch && pendingBranch.transition && pendingBranch.transition.mode === "out-in"; + if (delayEnter) { + activeBranch.transition.afterLeave = () => { + if (pendingId === suspense.pendingId) { + move( + pendingBranch, + container2, + anchor === initialAnchor ? next(activeBranch) : anchor, + 0 + ); + queuePostFlushCb(effects); + } + }; + } + if (activeBranch) { + if (parentNode(activeBranch.el) !== suspense.hiddenContainer) { + anchor = next(activeBranch); + } + unmount(activeBranch, parentComponent2, suspense, true); + } + if (!delayEnter) { + move(pendingBranch, container2, anchor, 0); + } + } + setActiveBranch(suspense, pendingBranch); + suspense.pendingBranch = null; + suspense.isInFallback = false; + let parent = suspense.parent; + let hasUnresolvedAncestor = false; + while (parent) { + if (parent.pendingBranch) { + parent.effects.push(...effects); + hasUnresolvedAncestor = true; + break; + } + parent = parent.parent; + } + if (!hasUnresolvedAncestor && !delayEnter) { + queuePostFlushCb(effects); + } + suspense.effects = []; + if (isSuspensible) { + if (parentSuspense && parentSuspense.pendingBranch && parentSuspenseId === parentSuspense.pendingId) { + parentSuspense.deps--; + if (parentSuspense.deps === 0 && !sync) { + parentSuspense.resolve(); + } + } + } + triggerEvent(vnode2, "onResolve"); + }, + fallback(fallbackVNode) { + if (!suspense.pendingBranch) { + return; + } + const { vnode: vnode2, activeBranch, parentComponent: parentComponent2, container: container2, namespace: namespace2 } = suspense; + triggerEvent(vnode2, "onFallback"); + const anchor2 = next(activeBranch); + const mountFallback = () => { + if (!suspense.isInFallback) { + return; + } + patch( + null, + fallbackVNode, + container2, + anchor2, + parentComponent2, + null, + // fallback tree will not have suspense context + namespace2, + slotScopeIds, + optimized + ); + setActiveBranch(suspense, fallbackVNode); + }; + const delayEnter = fallbackVNode.transition && fallbackVNode.transition.mode === "out-in"; + if (delayEnter) { + activeBranch.transition.afterLeave = mountFallback; + } + suspense.isInFallback = true; + unmount( + activeBranch, + parentComponent2, + null, + // no suspense so unmount hooks fire now + true + // shouldRemove + ); + if (!delayEnter) { + mountFallback(); + } + }, + move(container2, anchor2, type) { + suspense.activeBranch && move(suspense.activeBranch, container2, anchor2, type); + suspense.container = container2; + }, + next() { + return suspense.activeBranch && next(suspense.activeBranch); + }, + registerDep(instance, setupRenderEffect, optimized2) { + const isInPendingSuspense = !!suspense.pendingBranch; + if (isInPendingSuspense) { + suspense.deps++; + } + const hydratedEl = instance.vnode.el; + instance.asyncDep.catch((err) => { + handleError(err, instance, 0); + }).then((asyncSetupResult) => { + if (instance.isUnmounted || suspense.isUnmounted || suspense.pendingId !== instance.suspenseId) { + return; + } + instance.asyncResolved = true; + const { vnode: vnode2 } = instance; + if (true) { + pushWarningContext(vnode2); + } + handleSetupResult(instance, asyncSetupResult, false); + if (hydratedEl) { + vnode2.el = hydratedEl; + } + const placeholder = !hydratedEl && instance.subTree.el; + setupRenderEffect( + instance, + vnode2, + // component may have been moved before resolve. + // if this is not a hydration, instance.subTree will be the comment + // placeholder. + parentNode(hydratedEl || instance.subTree.el), + // anchor will not be used if this is hydration, so only need to + // consider the comment placeholder case. + hydratedEl ? null : next(instance.subTree), + suspense, + namespace, + optimized2 + ); + if (placeholder) { + remove2(placeholder); + } + updateHOCHostEl(instance, vnode2.el); + if (true) { + popWarningContext(); + } + if (isInPendingSuspense && --suspense.deps === 0) { + suspense.resolve(); + } + }); + }, + unmount(parentSuspense2, doRemove) { + suspense.isUnmounted = true; + if (suspense.activeBranch) { + unmount( + suspense.activeBranch, + parentComponent, + parentSuspense2, + doRemove + ); + } + if (suspense.pendingBranch) { + unmount( + suspense.pendingBranch, + parentComponent, + parentSuspense2, + doRemove + ); + } + } + }; + return suspense; +} +function hydrateSuspense(node, vnode, parentComponent, parentSuspense, namespace, slotScopeIds, optimized, rendererInternals, hydrateNode) { + const suspense = vnode.suspense = createSuspenseBoundary( + vnode, + parentSuspense, + parentComponent, + node.parentNode, + // eslint-disable-next-line no-restricted-globals + document.createElement("div"), + null, + namespace, + slotScopeIds, + optimized, + rendererInternals, + true + ); + const result = hydrateNode( + node, + suspense.pendingBranch = vnode.ssContent, + parentComponent, + suspense, + slotScopeIds, + optimized + ); + if (suspense.deps === 0) { + suspense.resolve(false, true); + } + return result; +} +function normalizeSuspenseChildren(vnode) { + const { shapeFlag, children } = vnode; + const isSlotChildren = shapeFlag & 32; + vnode.ssContent = normalizeSuspenseSlot( + isSlotChildren ? children.default : children + ); + vnode.ssFallback = isSlotChildren ? normalizeSuspenseSlot(children.fallback) : createVNode(Comment); +} +function normalizeSuspenseSlot(s) { + let block; + if (isFunction(s)) { + const trackBlock = isBlockTreeEnabled && s._c; + if (trackBlock) { + s._d = false; + openBlock(); + } + s = s(); + if (trackBlock) { + s._d = true; + block = currentBlock; + closeBlock(); + } + } + if (isArray(s)) { + const singleChild = filterSingleRoot(s); + if (!singleChild && s.filter((child) => child !== NULL_DYNAMIC_COMPONENT).length > 0) { + warn$1(` slots expect a single root node.`); + } + s = singleChild; + } + s = normalizeVNode(s); + if (block && !s.dynamicChildren) { + s.dynamicChildren = block.filter((c) => c !== s); + } + return s; +} +function queueEffectWithSuspense(fn, suspense) { + if (suspense && suspense.pendingBranch) { + if (isArray(fn)) { + suspense.effects.push(...fn); + } else { + suspense.effects.push(fn); + } + } else { + queuePostFlushCb(fn); + } +} +function setActiveBranch(suspense, branch) { + suspense.activeBranch = branch; + const { vnode, parentComponent } = suspense; + let el = branch.el; + while (!el && branch.component) { + branch = branch.component.subTree; + el = branch.el; + } + vnode.el = el; + if (parentComponent && parentComponent.subTree === vnode) { + parentComponent.vnode.el = el; + updateHOCHostEl(parentComponent, el); + } +} +function isVNodeSuspensible(vnode) { + const suspensible = vnode.props && vnode.props.suspensible; + return suspensible != null && suspensible !== false; +} +function injectHook(type, hook, target = currentInstance, prepend = false) { + if (target) { + const hooks = target[type] || (target[type] = []); + const wrappedHook = hook.__weh || (hook.__weh = (...args) => { + pauseTracking(); + const reset = setCurrentInstance(target); + const res = callWithAsyncErrorHandling(hook, target, type, args); + reset(); + resetTracking(); + return res; + }); + if (prepend) { + hooks.unshift(wrappedHook); + } else { + hooks.push(wrappedHook); + } + return wrappedHook; + } else if (true) { + const apiName = toHandlerKey(ErrorTypeStrings$1[type].replace(/ hook$/, "")); + warn$1( + `${apiName} is called when there is no active component instance to be associated with. Lifecycle injection APIs can only be used during execution of setup(). If you are using async setup(), make sure to register lifecycle hooks before the first await statement.` + ); + } +} +var createHook = (lifecycle) => (hook, target = currentInstance) => { + if (!isInSSRComponentSetup || lifecycle === "sp") { + injectHook(lifecycle, (...args) => hook(...args), target); + } +}; +var onBeforeMount = createHook("bm"); +var onMounted = createHook("m"); +var onBeforeUpdate = createHook("bu"); +var onUpdated = createHook("u"); +var onBeforeUnmount = createHook("bum"); +var onUnmounted = createHook("um"); +var onServerPrefetch = createHook("sp"); +var onRenderTriggered = createHook( + "rtg" +); +var onRenderTracked = createHook( + "rtc" +); +function onErrorCaptured(hook, target = currentInstance) { + injectHook("ec", hook, target); +} +function validateDirectiveName(name) { + if (isBuiltInDirective(name)) { + warn$1("Do not use built-in directive ids as custom directive id: " + name); + } +} +function withDirectives(vnode, directives) { + if (currentRenderingInstance === null) { + warn$1(`withDirectives can only be used inside render functions.`); + return vnode; + } + const instance = getComponentPublicInstance(currentRenderingInstance); + const bindings = vnode.dirs || (vnode.dirs = []); + for (let i = 0; i < directives.length; i++) { + let [dir, value, arg, modifiers = EMPTY_OBJ] = directives[i]; + if (dir) { + if (isFunction(dir)) { + dir = { + mounted: dir, + updated: dir + }; + } + if (dir.deep) { + traverse(value); + } + bindings.push({ + dir, + instance, + value, + oldValue: void 0, + arg, + modifiers + }); + } + } + return vnode; +} +function invokeDirectiveHook(vnode, prevVNode, instance, name) { + const bindings = vnode.dirs; + const oldBindings = prevVNode && prevVNode.dirs; + for (let i = 0; i < bindings.length; i++) { + const binding = bindings[i]; + if (oldBindings) { + binding.oldValue = oldBindings[i].value; + } + let hook = binding.dir[name]; + if (hook) { + pauseTracking(); + callWithAsyncErrorHandling(hook, instance, 8, [ + vnode.el, + binding, + vnode, + prevVNode + ]); + resetTracking(); + } + } +} +function renderList(source, renderItem, cache, index) { + let ret; + const cached = cache && cache[index]; + if (isArray(source) || isString(source)) { + ret = new Array(source.length); + for (let i = 0, l = source.length; i < l; i++) { + ret[i] = renderItem(source[i], i, void 0, cached && cached[i]); + } + } else if (typeof source === "number") { + if (!Number.isInteger(source)) { + warn$1(`The v-for range expect an integer value but got ${source}.`); + } + ret = new Array(source); + for (let i = 0; i < source; i++) { + ret[i] = renderItem(i + 1, i, void 0, cached && cached[i]); + } + } else if (isObject(source)) { + if (source[Symbol.iterator]) { + ret = Array.from( + source, + (item, i) => renderItem(item, i, void 0, cached && cached[i]) + ); + } else { + const keys = Object.keys(source); + ret = new Array(keys.length); + for (let i = 0, l = keys.length; i < l; i++) { + const key = keys[i]; + ret[i] = renderItem(source[key], key, i, cached && cached[i]); + } + } + } else { + ret = []; + } + if (cache) { + cache[index] = ret; + } + return ret; +} +function createSlots(slots, dynamicSlots) { + for (let i = 0; i < dynamicSlots.length; i++) { + const slot = dynamicSlots[i]; + if (isArray(slot)) { + for (let j = 0; j < slot.length; j++) { + slots[slot[j].name] = slot[j].fn; + } + } else if (slot) { + slots[slot.name] = slot.key ? (...args) => { + const res = slot.fn(...args); + if (res) res.key = slot.key; + return res; + } : slot.fn; + } + } + return slots; +} +function defineComponent(options, extraOptions) { + return isFunction(options) ? ( + // #8326: extend call and options.name access are considered side-effects + // by Rollup, so we have to wrap it in a pure-annotated IIFE. + (() => extend({ name: options.name }, extraOptions, { setup: options }))() + ) : options; +} +var isAsyncWrapper = (i) => !!i.type.__asyncLoader; +function defineAsyncComponent(source) { + if (isFunction(source)) { + source = { loader: source }; + } + const { + loader, + loadingComponent, + errorComponent, + delay = 200, + timeout, + // undefined = never times out + suspensible = true, + onError: userOnError + } = source; + let pendingRequest = null; + let resolvedComp; + let retries = 0; + const retry = () => { + retries++; + pendingRequest = null; + return load(); + }; + const load = () => { + let thisRequest; + return pendingRequest || (thisRequest = pendingRequest = loader().catch((err) => { + err = err instanceof Error ? err : new Error(String(err)); + if (userOnError) { + return new Promise((resolve2, reject) => { + const userRetry = () => resolve2(retry()); + const userFail = () => reject(err); + userOnError(err, userRetry, userFail, retries + 1); + }); + } else { + throw err; + } + }).then((comp) => { + if (thisRequest !== pendingRequest && pendingRequest) { + return pendingRequest; + } + if (!comp) { + warn$1( + `Async component loader resolved to undefined. If you are using retry(), make sure to return its return value.` + ); + } + if (comp && (comp.__esModule || comp[Symbol.toStringTag] === "Module")) { + comp = comp.default; + } + if (comp && !isObject(comp) && !isFunction(comp)) { + throw new Error(`Invalid async component load result: ${comp}`); + } + resolvedComp = comp; + return comp; + })); + }; + return defineComponent({ + name: "AsyncComponentWrapper", + __asyncLoader: load, + get __asyncResolved() { + return resolvedComp; + }, + setup() { + const instance = currentInstance; + if (resolvedComp) { + return () => createInnerComp(resolvedComp, instance); + } + const onError = (err) => { + pendingRequest = null; + handleError( + err, + instance, + 13, + !errorComponent + ); + }; + if (suspensible && instance.suspense || isInSSRComponentSetup) { + return load().then((comp) => { + return () => createInnerComp(comp, instance); + }).catch((err) => { + onError(err); + return () => errorComponent ? createVNode(errorComponent, { + error: err + }) : null; + }); + } + const loaded = ref(false); + const error = ref(); + const delayed = ref(!!delay); + if (delay) { + setTimeout(() => { + delayed.value = false; + }, delay); + } + if (timeout != null) { + setTimeout(() => { + if (!loaded.value && !error.value) { + const err = new Error( + `Async component timed out after ${timeout}ms.` + ); + onError(err); + error.value = err; + } + }, timeout); + } + load().then(() => { + loaded.value = true; + if (instance.parent && isKeepAlive(instance.parent.vnode)) { + instance.parent.effect.dirty = true; + queueJob(instance.parent.update); + } + }).catch((err) => { + onError(err); + error.value = err; + }); + return () => { + if (loaded.value && resolvedComp) { + return createInnerComp(resolvedComp, instance); + } else if (error.value && errorComponent) { + return createVNode(errorComponent, { + error: error.value + }); + } else if (loadingComponent && !delayed.value) { + return createVNode(loadingComponent); + } + }; + } + }); +} +function createInnerComp(comp, parent) { + const { ref: ref2, props, children, ce } = parent.vnode; + const vnode = createVNode(comp, props, children); + vnode.ref = ref2; + vnode.ce = ce; + delete parent.vnode.ce; + return vnode; +} +function renderSlot(slots, name, props = {}, fallback, noSlotted) { + if (currentRenderingInstance.isCE || currentRenderingInstance.parent && isAsyncWrapper(currentRenderingInstance.parent) && currentRenderingInstance.parent.isCE) { + if (name !== "default") props.name = name; + return createVNode("slot", props, fallback && fallback()); + } + let slot = slots[name]; + if (slot && slot.length > 1) { + warn$1( + `SSR-optimized slot function detected in a non-SSR-optimized render function. You need to mark this component with $dynamic-slots in the parent template.` + ); + slot = () => []; + } + if (slot && slot._c) { + slot._d = false; + } + openBlock(); + const validSlotContent = slot && ensureValidVNode(slot(props)); + const rendered = createBlock( + Fragment, + { + key: props.key || // slot content array of a dynamic conditional slot may have a branch + // key attached in the `createSlots` helper, respect that + validSlotContent && validSlotContent.key || `_${name}` + }, + validSlotContent || (fallback ? fallback() : []), + validSlotContent && slots._ === 1 ? 64 : -2 + ); + if (!noSlotted && rendered.scopeId) { + rendered.slotScopeIds = [rendered.scopeId + "-s"]; + } + if (slot && slot._c) { + slot._d = true; + } + return rendered; +} +function ensureValidVNode(vnodes) { + return vnodes.some((child) => { + if (!isVNode(child)) return true; + if (child.type === Comment) return false; + if (child.type === Fragment && !ensureValidVNode(child.children)) + return false; + return true; + }) ? vnodes : null; +} +function toHandlers(obj, preserveCaseIfNecessary) { + const ret = {}; + if (!isObject(obj)) { + warn$1(`v-on with no argument expects an object value.`); + return ret; + } + for (const key in obj) { + ret[preserveCaseIfNecessary && /[A-Z]/.test(key) ? `on:${key}` : toHandlerKey(key)] = obj[key]; + } + return ret; +} +var getPublicInstance = (i) => { + if (!i) return null; + if (isStatefulComponent(i)) return getComponentPublicInstance(i); + return getPublicInstance(i.parent); +}; +var publicPropertiesMap = ( + // Move PURE marker to new line to workaround compiler discarding it + // due to type annotation + extend(/* @__PURE__ */ Object.create(null), { + $: (i) => i, + $el: (i) => i.vnode.el, + $data: (i) => i.data, + $props: (i) => true ? shallowReadonly(i.props) : i.props, + $attrs: (i) => true ? shallowReadonly(i.attrs) : i.attrs, + $slots: (i) => true ? shallowReadonly(i.slots) : i.slots, + $refs: (i) => true ? shallowReadonly(i.refs) : i.refs, + $parent: (i) => getPublicInstance(i.parent), + $root: (i) => getPublicInstance(i.root), + $emit: (i) => i.emit, + $options: (i) => __VUE_OPTIONS_API__ ? resolveMergedOptions(i) : i.type, + $forceUpdate: (i) => i.f || (i.f = () => { + i.effect.dirty = true; + queueJob(i.update); + }), + $nextTick: (i) => i.n || (i.n = nextTick.bind(i.proxy)), + $watch: (i) => __VUE_OPTIONS_API__ ? instanceWatch.bind(i) : NOOP + }) +); +var isReservedPrefix = (key) => key === "_" || key === "$"; +var hasSetupBinding = (state, key) => state !== EMPTY_OBJ && !state.__isScriptSetup && hasOwn(state, key); +var PublicInstanceProxyHandlers = { + get({ _: instance }, key) { + if (key === "__v_skip") { + return true; + } + const { ctx, setupState, data, props, accessCache, type, appContext } = instance; + if (key === "__isVue") { + return true; + } + let normalizedProps; + if (key[0] !== "$") { + const n = accessCache[key]; + if (n !== void 0) { + switch (n) { + case 1: + return setupState[key]; + case 2: + return data[key]; + case 4: + return ctx[key]; + case 3: + return props[key]; + } + } else if (hasSetupBinding(setupState, key)) { + accessCache[key] = 1; + return setupState[key]; + } else if (data !== EMPTY_OBJ && hasOwn(data, key)) { + accessCache[key] = 2; + return data[key]; + } else if ( + // only cache other properties when instance has declared (thus stable) + // props + (normalizedProps = instance.propsOptions[0]) && hasOwn(normalizedProps, key) + ) { + accessCache[key] = 3; + return props[key]; + } else if (ctx !== EMPTY_OBJ && hasOwn(ctx, key)) { + accessCache[key] = 4; + return ctx[key]; + } else if (!__VUE_OPTIONS_API__ || shouldCacheAccess) { + accessCache[key] = 0; + } + } + const publicGetter = publicPropertiesMap[key]; + let cssModule, globalProperties; + if (publicGetter) { + if (key === "$attrs") { + track(instance.attrs, "get", ""); + markAttrsAccessed(); + } else if (key === "$slots") { + track(instance, "get", key); + } + return publicGetter(instance); + } else if ( + // css module (injected by vue-loader) + (cssModule = type.__cssModules) && (cssModule = cssModule[key]) + ) { + return cssModule; + } else if (ctx !== EMPTY_OBJ && hasOwn(ctx, key)) { + accessCache[key] = 4; + return ctx[key]; + } else if ( + // global properties + globalProperties = appContext.config.globalProperties, hasOwn(globalProperties, key) + ) { + { + return globalProperties[key]; + } + } else if (currentRenderingInstance && (!isString(key) || // #1091 avoid internal isRef/isVNode checks on component instance leading + // to infinite warning loop + key.indexOf("__v") !== 0)) { + if (data !== EMPTY_OBJ && isReservedPrefix(key[0]) && hasOwn(data, key)) { + warn$1( + `Property ${JSON.stringify( + key + )} must be accessed via $data because it starts with a reserved character ("$" or "_") and is not proxied on the render context.` + ); + } else if (instance === currentRenderingInstance) { + warn$1( + `Property ${JSON.stringify(key)} was accessed during render but is not defined on instance.` + ); + } + } + }, + set({ _: instance }, key, value) { + const { data, setupState, ctx } = instance; + if (hasSetupBinding(setupState, key)) { + setupState[key] = value; + return true; + } else if (setupState.__isScriptSetup && hasOwn(setupState, key)) { + warn$1(`Cannot mutate + +## Results + +### Theme Data +
{{ theme }}
+ +### Page Data +
{{ page }}
+ +### Page Frontmatter +
{{ frontmatter }}
+``` + + + +## Results + +### Theme Data +
{{ theme }}
+ +### Page Data +
{{ page }}
+ +### Page Frontmatter +
{{ frontmatter }}
+ +## More + +Check out the documentation for the [full list of runtime APIs](https://vitepress.dev/reference/runtime-api#usedata). diff --git a/docs/about/index.md b/docs/about/index.md new file mode 100644 index 000000000..b10ea29ba --- /dev/null +++ b/docs/about/index.md @@ -0,0 +1,25 @@ +--- +# https://vitepress.dev/reference/default-theme-home-page +layout: home + +hero: + name: "remoteStorage" + text: + tagline: An open protocol for per-user storage on the Web + actions: + - theme: brand + text: Markdown Examples + link: /markdown-examples + - theme: alt + text: API Examples + link: /api-examples + +features: + - title: Feature A + details: Lorem ipsum dolor sit amet, consectetur adipiscing elit + - title: Feature B + details: Lorem ipsum dolor sit amet, consectetur adipiscing elit + - title: Feature C + details: Lorem ipsum dolor sit amet, consectetur adipiscing elit +--- + diff --git a/docs/about/markdown-examples.md b/docs/about/markdown-examples.md new file mode 100644 index 000000000..f9258a550 --- /dev/null +++ b/docs/about/markdown-examples.md @@ -0,0 +1,85 @@ +# Markdown Extension Examples + +This page demonstrates some of the built-in markdown extensions provided by VitePress. + +## Syntax Highlighting + +VitePress provides Syntax Highlighting powered by [Shiki](https://github.com/shikijs/shiki), with additional features like line-highlighting: + +**Input** + +````md +```js{4} +export default { + data () { + return { + msg: 'Highlighted!' + } + } +} +``` +```` + +**Output** + +```js{4} +export default { + data () { + return { + msg: 'Highlighted!' + } + } +} +``` + +## Custom Containers + +**Input** + +```md +::: info +This is an info box. +::: + +::: tip +This is a tip. +::: + +::: warning +This is a warning. +::: + +::: danger +This is a dangerous warning. +::: + +::: details +This is a details block. +::: +``` + +**Output** + +::: info +This is an info box. +::: + +::: tip +This is a tip. +::: + +::: warning +This is a warning. +::: + +::: danger +This is a dangerous warning. +::: + +::: details +This is a details block. +::: + +## More + +Check out the documentation for the [full list of markdown extensions](https://vitepress.dev/guide/markdown). diff --git a/docs/index.md b/docs/index.md new file mode 100644 index 000000000..06f577397 --- /dev/null +++ b/docs/index.md @@ -0,0 +1,33 @@ +--- +# https://vitepress.dev/reference/default-theme-home-page +layout: home + +hero: + name: "remoteStorage" + text: + tagline: An open protocol for per-user storage on the Web + actions: + - theme: brand + text: Markdown Examples + link: /about/markdown-examples + - theme: alt + text: API Examples + link: /about/api-examples + +features: + - title: Feature A + details: Lorem ipsum dolor sit amet, consectetur adipiscing elit + - title: Feature B + details: Lorem ipsum dolor sit amet, consectetur adipiscing elit + - title: Feature C + details: Lorem ipsum dolor sit amet, consectetur adipiscing elit +--- + +## Getting Started + +You can get started using VitePress right away using `npx`! + +```sh +npm init +npx vitepress init +``` diff --git a/docs/logo.svg b/docs/logo.svg new file mode 100644 index 000000000..a4813a56d --- /dev/null +++ b/docs/logo.svg @@ -0,0 +1,18 @@ + + + + + + + + + + + + diff --git a/docs/rs.js/api/access/classes/Access.md b/docs/rs.js/api/access/classes/Access.md new file mode 100644 index 000000000..2edceea46 --- /dev/null +++ b/docs/rs.js/api/access/classes/Access.md @@ -0,0 +1,169 @@ +# Class: Access + +Keeps track of claimed access and scopes. + +## Accessors + +### scopes + +> `get` **scopes**(): `ScopeEntry`[] + +Property: scopes + +Holds an array of claimed scopes: + +```js +[{ name: "", mode: "" }] +``` + +#### Returns + +`ScopeEntry`[] + +#### Source + +[access.ts:44](https://github.com/remotestorage/remotestorage.js/blob/9b126479fa187d3d9af88a42c7c271be1fd71c06/src/access.ts#L44) + +## Methods + +### checkPathPermission() + +> **checkPathPermission**(`path`, `mode`): `boolean` + +Verify permission for a given path. + +#### Parameters + +• **path**: `string` + +Path + +• **mode**: `AccessMode` + +Access mode + +#### Returns + +`boolean` + +true if the requested access mode is active, false otherwise + +#### Source + +[access.ts:120](https://github.com/remotestorage/remotestorage.js/blob/9b126479fa187d3d9af88a42c7c271be1fd71c06/src/access.ts#L120) + +*** + +### checkPermission() + +> **checkPermission**(`scope`, `mode`): `boolean` + +Verify permission for a given scope. + +#### Parameters + +• **scope**: `string` + +Access scope + +• **mode**: `AccessMode` + +Access mode + +#### Returns + +`boolean` + +true if the requested access mode is active, false otherwise + +#### Source + +[access.ts:108](https://github.com/remotestorage/remotestorage.js/blob/9b126479fa187d3d9af88a42c7c271be1fd71c06/src/access.ts#L108) + +*** + +### claim() + +> **claim**(`scope`, `mode`): `void` + +Claim access on a given scope with given mode. + +#### Parameters + +• **scope**: `string` + +An access scope, such as "contacts" or "calendar" + +• **mode**: `AccessMode` + +Access mode. Either "r" for read-only or "rw" for read/write + +#### Returns + +`void` + +#### Source + +[access.ts:62](https://github.com/remotestorage/remotestorage.js/blob/9b126479fa187d3d9af88a42c7c271be1fd71c06/src/access.ts#L62) + +*** + +### get() + +> **get**(`scope`): `AccessMode` + +Get the access mode for a given scope. + +#### Parameters + +• **scope**: `string` + +Access scope + +#### Returns + +`AccessMode` + +Access mode + +#### Source + +[access.ts:79](https://github.com/remotestorage/remotestorage.js/blob/9b126479fa187d3d9af88a42c7c271be1fd71c06/src/access.ts#L79) + +*** + +### remove() + +> **remove**(`scope`): `void` + +Remove access for the given scope. + +#### Parameters + +• **scope**: `string` + +Access scope + +#### Returns + +`void` + +#### Source + +[access.ts:89](https://github.com/remotestorage/remotestorage.js/blob/9b126479fa187d3d9af88a42c7c271be1fd71c06/src/access.ts#L89) + +*** + +### reset() + +> **reset**(): `void` + +Reset all access permissions. + +#### Returns + +`void` + +#### Source + +[access.ts:132](https://github.com/remotestorage/remotestorage.js/blob/9b126479fa187d3d9af88a42c7c271be1fd71c06/src/access.ts#L132) diff --git a/docs/rs.js/api/access/index.md b/docs/rs.js/api/access/index.md new file mode 100644 index 000000000..627addbec --- /dev/null +++ b/docs/rs.js/api/access/index.md @@ -0,0 +1,7 @@ +# access + +## Index + +### Classes + +- [Access](classes/Access.md) diff --git a/docs/rs.js/api/baseclient/classes/BaseClient.md b/docs/rs.js/api/baseclient/classes/BaseClient.md new file mode 100644 index 000000000..16e5414f9 --- /dev/null +++ b/docs/rs.js/api/baseclient/classes/BaseClient.md @@ -0,0 +1,404 @@ +# Class: BaseClient + +Provides a high-level interface to access data below a given root path. + +## Extends + +- `EventHandling` + +## Properties + +### base + +> **base**: `string` + +Base path, which this [BaseClient](BaseClient.md) operates on. + +For the module's privateClient this would be ``, for the +corresponding publicClient `/public//`. + +#### Source + +[baseclient.ts:32](https://github.com/remotestorage/remotestorage.js/blob/9b126479fa187d3d9af88a42c7c271be1fd71c06/src/baseclient.ts#L32) + +*** + +### storage + +> **storage**: [`RemoteStorage`](../../remotestorage/classes/RemoteStorage.md) + +The [RemoteStorage](../../remotestorage/classes/RemoteStorage.md) instance this [BaseClient](BaseClient.md) operates on. + +#### Source + +[baseclient.ts:24](https://github.com/remotestorage/remotestorage.js/blob/9b126479fa187d3d9af88a42c7c271be1fd71c06/src/baseclient.ts#L24) + +## Methods + +### cache() + +> **cache**(`path`, `strategy`): [`BaseClient`](BaseClient.md) + +Set caching strategy for a given path and its children. + +See :ref:`caching-strategies` for a detailed description of the available +strategies. + +#### Parameters + +• **path**: `string` + +Path to cache + +• **strategy**: `"ALL"` \| `"SEEN"` \| `"FLUSH"`= `'ALL'` + +Caching strategy. One of 'ALL', 'SEEN', or + 'FLUSH'. Defaults to 'ALL'. + +#### Returns + +[`BaseClient`](BaseClient.md) + +The same instance this is called on to allow for method chaining + +#### Source + +[baseclient.ts:321](https://github.com/remotestorage/remotestorage.js/blob/9b126479fa187d3d9af88a42c7c271be1fd71c06/src/baseclient.ts#L321) + +*** + +### declareType() + +> **declareType**(`alias`, `uriOrSchema`, `schema`?): `void` + +Declare a remoteStorage object type using a JSON schema. + +See :doc:`Defining data types ` for more info. + +#### Parameters + +• **alias**: `string` + +A type alias/shortname + +• **uriOrSchema**: `string` \| `JsonSchema` + +• **schema?**: `JsonSchema` + +A JSON Schema object describing the object type + +#### Returns + +`void` + +#### Source + +[baseclient.ts:358](https://github.com/remotestorage/remotestorage.js/blob/9b126479fa187d3d9af88a42c7c271be1fd71c06/src/baseclient.ts#L358) + +*** + +### flush() + +> **flush**(`path`): `unknown` + +TODO: document + +#### Parameters + +• **path**: `string` + +#### Returns + +`unknown` + +#### Source + +[baseclient.ts:345](https://github.com/remotestorage/remotestorage.js/blob/9b126479fa187d3d9af88a42c7c271be1fd71c06/src/baseclient.ts#L345) + +*** + +### getAll() + +> **getAll**(`path`, `maxAge`?): `Promise`\<`unknown`\> + +Get all objects directly below a given path. + +#### Parameters + +• **path**: `string` + +Path to the folder. Must end in a forward slash. + +• **maxAge?**: `number` \| `false` + +(optional) Either ``false`` or the maximum age of + cached objects in milliseconds. See :ref:`max-age`. + +#### Returns + +`Promise`\<`unknown`\> + +A promise for an object + +#### Source + +[baseclient.ts:100](https://github.com/remotestorage/remotestorage.js/blob/9b126479fa187d3d9af88a42c7c271be1fd71c06/src/baseclient.ts#L100) + +*** + +### getFile() + +> **getFile**(`path`, `maxAge`?): `Promise`\<`unknown`\> + +Get the file at the given path. A file is raw data, as opposed to +a JSON object (use :func:`getObject` for that). + +#### Parameters + +• **path**: `string` + +Relative path from the module root (without leading + slash). + +• **maxAge?**: `number` \| `false` + +(optional) Either ``false`` or the maximum age of + the cached file in milliseconds. See :ref:`max-age`. + +#### Returns + +`Promise`\<`unknown`\> + +A promise for an object + +#### Source + +[baseclient.ts:144](https://github.com/remotestorage/remotestorage.js/blob/9b126479fa187d3d9af88a42c7c271be1fd71c06/src/baseclient.ts#L144) + +*** + +### getItemURL() + +> **getItemURL**(`path`): `string` + +Retrieve full URL of a document. Useful for example for sharing the public +URL of an item in the ``/public`` folder. +TODO: refactor this into the Remote interface + +#### Parameters + +• **path**: `string` + +Path relative to the module root. + +#### Returns + +`string` + +The full URL of the item, including the storage origin + +#### Source + +[baseclient.ts:297](https://github.com/remotestorage/remotestorage.js/blob/9b126479fa187d3d9af88a42c7c271be1fd71c06/src/baseclient.ts#L297) + +*** + +### getListing() + +> **getListing**(`path`?, `maxAge`?): `Promise`\<`unknown`\> + +Get a list of child nodes below a given path. + +#### Parameters + +• **path?**: `string` + +The path to query. It MUST end with a forward slash. + +• **maxAge?**: `number` \| `false` + +(optional) Either ``false`` or the maximum age of + cached listing in milliseconds. See :ref:`max-age`. + +#### Returns + +`Promise`\<`unknown`\> + +A promise for an object representing child nodes + +#### Source + +[baseclient.ts:79](https://github.com/remotestorage/remotestorage.js/blob/9b126479fa187d3d9af88a42c7c271be1fd71c06/src/baseclient.ts#L79) + +*** + +### getObject() + +> **getObject**(`path`, `maxAge`?): `Promise`\<`unknown`\> + +Get a JSON object from the given path. + +#### Parameters + +• **path**: `string` + +Relative path from the module root (without leading + slash). + +• **maxAge?**: `number` \| `false` + +(optional) Either ``false`` or the maximum age of + cached object in milliseconds. See :ref:`max-age`. + +#### Returns + +`Promise`\<`unknown`\> + +A promise, which resolves with the requested object (or ``null`` + if non-existent) + +#### Source + +[baseclient.ts:203](https://github.com/remotestorage/remotestorage.js/blob/9b126479fa187d3d9af88a42c7c271be1fd71c06/src/baseclient.ts#L203) + +*** + +### remove() + +> **remove**(`path`): `Promise`\<`unknown`\> + +Remove node at given path from storage. Triggers synchronization. + +#### Parameters + +• **path**: `string` + +Path relative to the module root. + +#### Returns + +`Promise`\<`unknown`\> + +#### Source + +[baseclient.ts:278](https://github.com/remotestorage/remotestorage.js/blob/9b126479fa187d3d9af88a42c7c271be1fd71c06/src/baseclient.ts#L278) + +*** + +### scope() + +> **scope**(`path`): [`BaseClient`](BaseClient.md) + +Instantiate a new client, scoped to a subpath of the current client's +path. + +#### Parameters + +• **path**: `string` + +The path to scope the new client to + +#### Returns + +[`BaseClient`](BaseClient.md) + +A new client operating on a subpath of the current base path + +#### Source + +[baseclient.ts:65](https://github.com/remotestorage/remotestorage.js/blob/9b126479fa187d3d9af88a42c7c271be1fd71c06/src/baseclient.ts#L65) + +*** + +### storeFile() + +> **storeFile**(`mimeType`, `path`, `body`): `Promise`\<`string`\> + +Store raw data at a given path. + +#### Parameters + +• **mimeType**: `string` + +MIME media type of the data being stored + +• **path**: `string` + +Path relative to the module root + +• **body**: `string` \| `ArrayBuffer` \| `ArrayBufferView` + +Raw data to store + +#### Returns + +`Promise`\<`string`\> + +A promise for the created/updated revision (ETag) + +#### Source + +[baseclient.ts:167](https://github.com/remotestorage/remotestorage.js/blob/9b126479fa187d3d9af88a42c7c271be1fd71c06/src/baseclient.ts#L167) + +*** + +### storeObject() + +> **storeObject**(`typeAlias`, `path`, `object`): `Promise`\<`unknown`\> + +Store object at given path. Triggers synchronization. + +See ``declareType()`` and :doc:`data types ` +for an explanation of types + +For any given `path`, must not be called more frequently than once per second. + +#### Parameters + +• **typeAlias**: `string` + +Unique type of this object within this module. + +• **path**: `string` + +Path relative to the module root. + +• **object**: `object` + +A JavaScript object to be stored at the given + path. Must be serializable as JSON. + +#### Returns + +`Promise`\<`unknown`\> + +Resolves with revision on success. Rejects with + a ValidationError, if validations fail. + +#### Source + +[baseclient.ts:240](https://github.com/remotestorage/remotestorage.js/blob/9b126479fa187d3d9af88a42c7c271be1fd71c06/src/baseclient.ts#L240) + +*** + +### validate() + +> **validate**(`object`): `object` + +Validate an object against the associated schema. + +#### Parameters + +• **object** + +JS object to validate. Must have a ``@context`` property. + +#### Returns + +`object` + +An object containing information about validation errors + +#### Source + +[baseclient.ts:380](https://github.com/remotestorage/remotestorage.js/blob/9b126479fa187d3d9af88a42c7c271be1fd71c06/src/baseclient.ts#L380) diff --git a/docs/rs.js/api/baseclient/index.md b/docs/rs.js/api/baseclient/index.md new file mode 100644 index 000000000..d1816377a --- /dev/null +++ b/docs/rs.js/api/baseclient/index.md @@ -0,0 +1,7 @@ +# baseclient + +## Index + +### Classes + +- [BaseClient](classes/BaseClient.md) diff --git a/docs/rs.js/api/index.md b/docs/rs.js/api/index.md new file mode 100644 index 000000000..af641c0cf --- /dev/null +++ b/docs/rs.js/api/index.md @@ -0,0 +1,80 @@ +# remoteStorage.js + +[![npm](https://img.shields.io/npm/v/remotestoragejs.svg)](https://www.npmjs.com/package/remotestoragejs) +[![Build Status](https://github.com/remotestorage/remotestorage.js/actions/workflows/test-and-lint.yml/badge.svg)](https://github.com/remotestorage/remotestorage.js/actions/workflows/test-and-lint.yml?query=branch%3Amaster) + +remoteStorage.js is a JavaScript library for storing user data locally in the +browser, as well as connecting to [remoteStorage](http://remotestorage.io) +servers and syncing data across devices and applications. It is also capable of +connecting and syncing data with a person's Dropbox or Google Drive account +(optional). + +The library is well-tested and actively maintained. It is safe to use in +production. + +### Where to get help? + +* See [remotestorage.io](http://remotestorage.io/) for general information + about the remoteStorage protocol +* Read [the docs](http://remotestoragejs.readthedocs.io/) (source files in `doc/`) + * [Why use this?](https://remotestoragejs.readthedocs.io/en/latest/why.html) + * [Getting started](https://remotestoragejs.readthedocs.io/en/latest/getting-started.html) + * [Data modules](https://remotestoragejs.readthedocs.io/en/latest/data-modules.html) + * [JavaScript API](https://remotestoragejs.readthedocs.io/en/latest/js-api.html) + * [Usage with Node.js](https://remotestoragejs.readthedocs.io/en/latest/nodejs.html) +* Ask questions on the [community forums](https://community.remotestorage.io/) +* Ask questions on IRC in [#remotestorage on Libera.Chat](ircs://irc.libera.chat:6697/remotestorage) + ([Web Chat](https://web.libera.chat/#remotestorage)) + (wait a bit, if nobody's responding right away) +* If you found a potential bug, or want to propose a change, [open an issue on + GitHub](https://github.com/remotestorage/remotestorage.js/issues). New issues + will usually receive a response within 24-48 hours. + +### Running a local test server + +To develop remoteStorage-enabled apps, you need to have a +remoteStorage-compatible storage account. We recommend +[php-remote-storage](https://github.com/fkooman/php-remote-storage) (PHP), or +[armadietto](https://github.com/remotestorage/armadietto) (node.js), or +[mysteryshack](https://github.com/untitaker/mysteryshack) (Rust) for running a +local test server, or for self-hosting an RS server. + +You can also get an account with a hoster, or use another +remoteStorage server implementation: [Servers](https://wiki.remotestorage.io/Servers). + +### Visual File Browser + +If you'd like a visual UI for inspecting any RS-compatible account, you can use the [RS Inspektor](https://gitea.kosmos.org/raucao/inspektor) app (which is also implemented using this library). + +### Developing, Contributing + +remoteStorage.js is a grassroots project, developed by the community, for the +community. We'd be happy to count you among the many [people who +contributed](https://github.com/remotestorage/remotestorage.js/graphs/contributors) +to the project so far! + +Read our [Contributing docs](https://remotestoragejs.readthedocs.io/en/latest/contributing.html) +to get started. + +### Versioning + +We adhere to [Semantic Versioning](http://semver.org/). This means that +breaking changes will result in a new major version. With npm, you can make +sure to only automatically upgrade to API-compatible versions by using either +the `^` prefix, or `x` as indicator for flexible numbers: + +```js +"devDependencies": { + "remotestoragejs": "1.x" // same as "^1.0.0" +} +``` + +### Credits + +Original authors: Niklas Cathor, Michiel de Jong + +See [list of all contributors](https://github.com/remotestorage/remotestorage.js/graphs/contributors) + +Previously sponsored by [NLnet](https://nlnet.nl) + +[![NLnet Logo](http://sockethub.org/res/img/nlnet-logo.svg)](https://nlnet.nl) diff --git a/docs/rs.js/api/modules.md b/docs/rs.js/api/modules.md new file mode 100644 index 000000000..ac5ebe055 --- /dev/null +++ b/docs/rs.js/api/modules.md @@ -0,0 +1,7 @@ +# remoteStorage.js v2.0.0-beta.6 + +## Modules + +- [access](access/index.md) +- [baseclient](baseclient/index.md) +- [remotestorage](remotestorage/index.md) diff --git a/docs/rs.js/api/remotestorage/classes/RemoteStorage.md b/docs/rs.js/api/remotestorage/classes/RemoteStorage.md new file mode 100644 index 000000000..1a2d8e3b5 --- /dev/null +++ b/docs/rs.js/api/remotestorage/classes/RemoteStorage.md @@ -0,0 +1,445 @@ +# Class: RemoteStorage + +Constructor for the remoteStorage object/instance + +This class primarily contains feature detection code and convenience API. + +Depending on which features are built in, it contains different attributes +and functions. See the individual features for more information. + +## Param + +an optional configuration object + +## Extends + +- `EventHandling` + +## Methods + +### connect() + +> **connect**(`userAddress`, `token`?): `void` + +Connect to a remoteStorage server. + +Discovers the WebFinger profile of the given user address and initiates +the OAuth dance. + +This method must be called *after* all required access has been claimed. +When using the connect widget, it will call this method itself. + +Special cases: + +1. If a bearer token is supplied as second argument, the OAuth dance + will be skipped and the supplied token be used instead. This is + useful outside of browser environments, where the token has been + acquired in a different way. + +2. If the Webfinger profile for the given user address doesn't contain + an auth URL, the library will assume that client and server have + established authorization among themselves, which will omit bearer + tokens in all requests later on. This is useful for example when using + Kerberos and similar protocols. + +#### Parameters + +• **userAddress**: `string` + +The user address (user@host) or URL to connect to. + +• **token?**: `string` + +(optional) A bearer token acquired beforehand + +#### Returns + +`void` + +#### Source + +[remotestorage.ts:377](https://github.com/remotestorage/remotestorage.js/blob/9b126479fa187d3d9af88a42c7c271be1fd71c06/src/remotestorage.ts#L377) + +*** + +### disableLog() + +> **disableLog**(): `void` + +TODO: do we still need this, now that we always instantiate the prototype? + +Disable remoteStorage logging + +#### Returns + +`void` + +#### Source + +[remotestorage.ts:550](https://github.com/remotestorage/remotestorage.js/blob/9b126479fa187d3d9af88a42c7c271be1fd71c06/src/remotestorage.ts#L550) + +*** + +### disconnect() + +> **disconnect**(): `void` + +"Disconnect" from remote server to terminate current session. + +This method clears all stored settings and deletes the entire local +cache. + +#### Returns + +`void` + +#### Source + +[remotestorage.ts:460](https://github.com/remotestorage/remotestorage.js/blob/9b126479fa187d3d9af88a42c7c271be1fd71c06/src/remotestorage.ts#L460) + +*** + +### enableLog() + +> **enableLog**(): `void` + +TODO: do we still need this, now that we always instantiate the prototype? + +Enable remoteStorage logging. + +#### Returns + +`void` + +#### Source + +[remotestorage.ts:541](https://github.com/remotestorage/remotestorage.js/blob/9b126479fa187d3d9af88a42c7c271be1fd71c06/src/remotestorage.ts#L541) + +*** + +### getBackgroundSyncInterval() + +> **getBackgroundSyncInterval**(): `number` + +Get the value of the sync interval when application is in the background + +#### Returns + +`number` + +A number of milliseconds + +#### Source + +[remotestorage.ts:820](https://github.com/remotestorage/remotestorage.js/blob/9b126479fa187d3d9af88a42c7c271be1fd71c06/src/remotestorage.ts#L820) + +*** + +### getCurrentSyncInterval() + +> **getCurrentSyncInterval**(): `number` + +Get the value of the current sync interval. Can be background or +foreground, custom or default. + +#### Returns + +`number` + +A number of milliseconds + +#### Source + +[remotestorage.ts:845](https://github.com/remotestorage/remotestorage.js/blob/9b126479fa187d3d9af88a42c7c271be1fd71c06/src/remotestorage.ts#L845) + +*** + +### getRequestTimeout() + +> **getRequestTimeout**(): `number` + +Get the value of the current network request timeout + +#### Returns + +`number` + +A number of milliseconds + +#### Source + +[remotestorage.ts:854](https://github.com/remotestorage/remotestorage.js/blob/9b126479fa187d3d9af88a42c7c271be1fd71c06/src/remotestorage.ts#L854) + +*** + +### getSyncInterval() + +> **getSyncInterval**(): `number` + +Get the value of the sync interval when application is in the foreground + +#### Returns + +`number` + +A number of milliseconds + +#### Source + +[remotestorage.ts:797](https://github.com/remotestorage/remotestorage.js/blob/9b126479fa187d3d9af88a42c7c271be1fd71c06/src/remotestorage.ts#L797) + +*** + +### log() + +> **log**(...`args`): `void` + +log + +The same as . + +#### Parameters + +• ...**args**: `any`[] + +#### Returns + +`void` + +#### Source + +[remotestorage.ts:559](https://github.com/remotestorage/remotestorage.js/blob/9b126479fa187d3d9af88a42c7c271be1fd71c06/src/remotestorage.ts#L559) + +*** + +### onChange() + +> **onChange**(`path`, `handler`): `void` + +Add a "change" event handler to the given path. Whenever a "change" +happens (as determined by the backend, such as e.g. +) and the affected path is equal to or below the +given 'path', the given handler is called. + +You should usually not use this method directly, but instead use the +"change" events provided by :doc:`BaseClient ` + +#### Parameters + +• **path**: `string` + +Absolute path to attach handler to + +• **handler**: `any` + +Handler function + +#### Returns + +`void` + +#### Source + +[remotestorage.ts:529](https://github.com/remotestorage/remotestorage.js/blob/9b126479fa187d3d9af88a42c7c271be1fd71c06/src/remotestorage.ts#L529) + +*** + +### reconnect() + +> **reconnect**(): `void` + +Reconnect the remote server to get a new authorization. + +#### Returns + +`void` + +#### Source + +[remotestorage.ts:444](https://github.com/remotestorage/remotestorage.js/blob/9b126479fa187d3d9af88a42c7c271be1fd71c06/src/remotestorage.ts#L444) + +*** + +### scope() + +> **scope**(`path`): [`BaseClient`](../../baseclient/classes/BaseClient.md) + +This method enables you to quickly instantiate a BaseClient, which you can +use to directly read and manipulate data in the connected storage account. + +Please use this method only for debugging and development, and choose or +create a :doc:`data module ` for your app to use. + +#### Parameters + +• **path**: `string` + +The base directory of the BaseClient that will be returned + (with a leading and a trailing slash) + +#### Returns + +[`BaseClient`](../../baseclient/classes/BaseClient.md) + +A client with the specified scope (category/base directory) + +#### Source + +[remotestorage.ts:782](https://github.com/remotestorage/remotestorage.js/blob/9b126479fa187d3d9af88a42c7c271be1fd71c06/src/remotestorage.ts#L782) + +*** + +### setApiKeys() + +> **setApiKeys**(`apiKeys`): `boolean` \| `void` + +Set the OAuth key/ID for either GoogleDrive or Dropbox backend support. + +#### Parameters + +• **apiKeys** + +A config object with these properties: + +• **apiKeys.dropbox**: `string` + +• **apiKeys.googledrive**: `string` + +#### Returns + +`boolean` \| `void` + +#### Source + +[remotestorage.ts:570](https://github.com/remotestorage/remotestorage.js/blob/9b126479fa187d3d9af88a42c7c271be1fd71c06/src/remotestorage.ts#L570) + +*** + +### setBackgroundSyncInterval() + +> **setBackgroundSyncInterval**(`interval`): `void` + +Set the value of the sync interval when the application is in the +background + +#### Parameters + +• **interval**: `number` + +Sync interval in milliseconds (between 2000 and 3600000 [1 hour]) + +#### Returns + +`void` + +#### Source + +[remotestorage.ts:830](https://github.com/remotestorage/remotestorage.js/blob/9b126479fa187d3d9af88a42c7c271be1fd71c06/src/remotestorage.ts#L830) + +*** + +### setCordovaRedirectUri() + +> **setCordovaRedirectUri**(`uri`): `void` + +Set redirect URI to be used for the OAuth redirect within the +in-app-browser window in Cordova apps. + +#### Parameters + +• **uri**: `string` + +A valid HTTP(S) URI + +#### Returns + +`void` + +#### Source + +[remotestorage.ts:612](https://github.com/remotestorage/remotestorage.js/blob/9b126479fa187d3d9af88a42c7c271be1fd71c06/src/remotestorage.ts#L612) + +*** + +### setRequestTimeout() + +> **setRequestTimeout**(`timeout`): `void` + +Set the timeout for network requests. + +#### Parameters + +• **timeout**: `number` + +Timeout in milliseconds + +#### Returns + +`void` + +#### Source + +[remotestorage.ts:863](https://github.com/remotestorage/remotestorage.js/blob/9b126479fa187d3d9af88a42c7c271be1fd71c06/src/remotestorage.ts#L863) + +*** + +### setSyncInterval() + +> **setSyncInterval**(`interval`): `void` + +Set the value of the sync interval when application is in the foreground + +#### Parameters + +• **interval**: `number` + +Sync interval in milliseconds (between 2000 and 3600000 [1 hour]) + +#### Returns + +`void` + +#### Source + +[remotestorage.ts:806](https://github.com/remotestorage/remotestorage.js/blob/9b126479fa187d3d9af88a42c7c271be1fd71c06/src/remotestorage.ts#L806) + +*** + +### startSync() + +> **startSync**(): `Promise`\<`void`\> + +Start synchronization with remote storage, downloading and uploading any +changes within the cached paths. + +Please consider: local changes will attempt sync immediately, and remote +changes should also be synced timely when using library defaults. So +this is mostly useful for letting users sync manually, when pressing a +sync button for example. This might feel safer to them sometimes, esp. +when shifting between offline and online a lot. + +#### Returns + +`Promise`\<`void`\> + +A Promise which resolves when the sync has finished + +#### Source + +[remotestorage.ts:904](https://github.com/remotestorage/remotestorage.js/blob/9b126479fa187d3d9af88a42c7c271be1fd71c06/src/remotestorage.ts#L904) + +*** + +### stopSync() + +> **stopSync**(): `void` + +Stop the periodic synchronization. + +#### Returns + +`void` + +#### Source + +[remotestorage.ts:917](https://github.com/remotestorage/remotestorage.js/blob/9b126479fa187d3d9af88a42c7c271be1fd71c06/src/remotestorage.ts#L917) diff --git a/docs/rs.js/api/remotestorage/index.md b/docs/rs.js/api/remotestorage/index.md new file mode 100644 index 000000000..ab5c55a02 --- /dev/null +++ b/docs/rs.js/api/remotestorage/index.md @@ -0,0 +1,7 @@ +# remotestorage + +## Index + +### Classes + +- [RemoteStorage](classes/RemoteStorage.md) diff --git a/docs/rs.js/index.md b/docs/rs.js/index.md new file mode 100644 index 000000000..e69de29bb diff --git a/package-lock.json b/package-lock.json index 35dcf83b4..325515984 100644 --- a/package-lock.json +++ b/package-lock.json @@ -36,8 +36,11 @@ "sinon": "^14.0.0", "ts-loader": "^8.4.0", "ts-node": "^10.9.1", - "typedoc": "^0.19.2", - "typescript": "^4.8.3", + "typedoc": "^0.25.13", + "typedoc-plugin-markdown": "^4.0.3", + "typedoc-vitepress-theme": "^1.0.0", + "typescript": "^5.4.5", + "vitepress": "^1.2.3", "webpack": "^5.92.0", "webpack-cli": "^5.1.4" }, @@ -45,6 +48,199 @@ "fsevents": "^2.3.2" } }, + "node_modules/@algolia/autocomplete-core": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/@algolia/autocomplete-core/-/autocomplete-core-1.9.3.tgz", + "integrity": "sha512-009HdfugtGCdC4JdXUbVJClA0q0zh24yyePn+KUGk3rP7j8FEe/m5Yo/z65gn6nP/cM39PxpzqKrL7A6fP6PPw==", + "dev": true, + "dependencies": { + "@algolia/autocomplete-plugin-algolia-insights": "1.9.3", + "@algolia/autocomplete-shared": "1.9.3" + } + }, + "node_modules/@algolia/autocomplete-plugin-algolia-insights": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/@algolia/autocomplete-plugin-algolia-insights/-/autocomplete-plugin-algolia-insights-1.9.3.tgz", + "integrity": "sha512-a/yTUkcO/Vyy+JffmAnTWbr4/90cLzw+CC3bRbhnULr/EM0fGNvM13oQQ14f2moLMcVDyAx/leczLlAOovhSZg==", + "dev": true, + "dependencies": { + "@algolia/autocomplete-shared": "1.9.3" + }, + "peerDependencies": { + "search-insights": ">= 1 < 3" + } + }, + "node_modules/@algolia/autocomplete-preset-algolia": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/@algolia/autocomplete-preset-algolia/-/autocomplete-preset-algolia-1.9.3.tgz", + "integrity": "sha512-d4qlt6YmrLMYy95n5TB52wtNDr6EgAIPH81dvvvW8UmuWRgxEtY0NJiPwl/h95JtG2vmRM804M0DSwMCNZlzRA==", + "dev": true, + "dependencies": { + "@algolia/autocomplete-shared": "1.9.3" + }, + "peerDependencies": { + "@algolia/client-search": ">= 4.9.1 < 6", + "algoliasearch": ">= 4.9.1 < 6" + } + }, + "node_modules/@algolia/autocomplete-shared": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/@algolia/autocomplete-shared/-/autocomplete-shared-1.9.3.tgz", + "integrity": "sha512-Wnm9E4Ye6Rl6sTTqjoymD+l8DjSTHsHboVRYrKgEt8Q7UHm9nYbqhN/i0fhUYA3OAEH7WA8x3jfpnmJm3rKvaQ==", + "dev": true, + "peerDependencies": { + "@algolia/client-search": ">= 4.9.1 < 6", + "algoliasearch": ">= 4.9.1 < 6" + } + }, + "node_modules/@algolia/cache-browser-local-storage": { + "version": "4.23.3", + "resolved": "https://registry.npmjs.org/@algolia/cache-browser-local-storage/-/cache-browser-local-storage-4.23.3.tgz", + "integrity": "sha512-vRHXYCpPlTDE7i6UOy2xE03zHF2C8MEFjPN2v7fRbqVpcOvAUQK81x3Kc21xyb5aSIpYCjWCZbYZuz8Glyzyyg==", + "dev": true, + "dependencies": { + "@algolia/cache-common": "4.23.3" + } + }, + "node_modules/@algolia/cache-common": { + "version": "4.23.3", + "resolved": "https://registry.npmjs.org/@algolia/cache-common/-/cache-common-4.23.3.tgz", + "integrity": "sha512-h9XcNI6lxYStaw32pHpB1TMm0RuxphF+Ik4o7tcQiodEdpKK+wKufY6QXtba7t3k8eseirEMVB83uFFF3Nu54A==", + "dev": true + }, + "node_modules/@algolia/cache-in-memory": { + "version": "4.23.3", + "resolved": "https://registry.npmjs.org/@algolia/cache-in-memory/-/cache-in-memory-4.23.3.tgz", + "integrity": "sha512-yvpbuUXg/+0rbcagxNT7un0eo3czx2Uf0y4eiR4z4SD7SiptwYTpbuS0IHxcLHG3lq22ukx1T6Kjtk/rT+mqNg==", + "dev": true, + "dependencies": { + "@algolia/cache-common": "4.23.3" + } + }, + "node_modules/@algolia/client-account": { + "version": "4.23.3", + "resolved": "https://registry.npmjs.org/@algolia/client-account/-/client-account-4.23.3.tgz", + "integrity": "sha512-hpa6S5d7iQmretHHF40QGq6hz0anWEHGlULcTIT9tbUssWUriN9AUXIFQ8Ei4w9azD0hc1rUok9/DeQQobhQMA==", + "dev": true, + "dependencies": { + "@algolia/client-common": "4.23.3", + "@algolia/client-search": "4.23.3", + "@algolia/transporter": "4.23.3" + } + }, + "node_modules/@algolia/client-analytics": { + "version": "4.23.3", + "resolved": "https://registry.npmjs.org/@algolia/client-analytics/-/client-analytics-4.23.3.tgz", + "integrity": "sha512-LBsEARGS9cj8VkTAVEZphjxTjMVCci+zIIiRhpFun9jGDUlS1XmhCW7CTrnaWeIuCQS/2iPyRqSy1nXPjcBLRA==", + "dev": true, + "dependencies": { + "@algolia/client-common": "4.23.3", + "@algolia/client-search": "4.23.3", + "@algolia/requester-common": "4.23.3", + "@algolia/transporter": "4.23.3" + } + }, + "node_modules/@algolia/client-common": { + "version": "4.23.3", + "resolved": "https://registry.npmjs.org/@algolia/client-common/-/client-common-4.23.3.tgz", + "integrity": "sha512-l6EiPxdAlg8CYhroqS5ybfIczsGUIAC47slLPOMDeKSVXYG1n0qGiz4RjAHLw2aD0xzh2EXZ7aRguPfz7UKDKw==", + "dev": true, + "dependencies": { + "@algolia/requester-common": "4.23.3", + "@algolia/transporter": "4.23.3" + } + }, + "node_modules/@algolia/client-personalization": { + "version": "4.23.3", + "resolved": "https://registry.npmjs.org/@algolia/client-personalization/-/client-personalization-4.23.3.tgz", + "integrity": "sha512-3E3yF3Ocr1tB/xOZiuC3doHQBQ2zu2MPTYZ0d4lpfWads2WTKG7ZzmGnsHmm63RflvDeLK/UVx7j2b3QuwKQ2g==", + "dev": true, + "dependencies": { + "@algolia/client-common": "4.23.3", + "@algolia/requester-common": "4.23.3", + "@algolia/transporter": "4.23.3" + } + }, + "node_modules/@algolia/client-search": { + "version": "4.23.3", + "resolved": "https://registry.npmjs.org/@algolia/client-search/-/client-search-4.23.3.tgz", + "integrity": "sha512-P4VAKFHqU0wx9O+q29Q8YVuaowaZ5EM77rxfmGnkHUJggh28useXQdopokgwMeYw2XUht49WX5RcTQ40rZIabw==", + "dev": true, + "dependencies": { + "@algolia/client-common": "4.23.3", + "@algolia/requester-common": "4.23.3", + "@algolia/transporter": "4.23.3" + } + }, + "node_modules/@algolia/logger-common": { + "version": "4.23.3", + "resolved": "https://registry.npmjs.org/@algolia/logger-common/-/logger-common-4.23.3.tgz", + "integrity": "sha512-y9kBtmJwiZ9ZZ+1Ek66P0M68mHQzKRxkW5kAAXYN/rdzgDN0d2COsViEFufxJ0pb45K4FRcfC7+33YB4BLrZ+g==", + "dev": true + }, + "node_modules/@algolia/logger-console": { + "version": "4.23.3", + "resolved": "https://registry.npmjs.org/@algolia/logger-console/-/logger-console-4.23.3.tgz", + "integrity": "sha512-8xoiseoWDKuCVnWP8jHthgaeobDLolh00KJAdMe9XPrWPuf1by732jSpgy2BlsLTaT9m32pHI8CRfrOqQzHv3A==", + "dev": true, + "dependencies": { + "@algolia/logger-common": "4.23.3" + } + }, + "node_modules/@algolia/recommend": { + "version": "4.23.3", + "resolved": "https://registry.npmjs.org/@algolia/recommend/-/recommend-4.23.3.tgz", + "integrity": "sha512-9fK4nXZF0bFkdcLBRDexsnGzVmu4TSYZqxdpgBW2tEyfuSSY54D4qSRkLmNkrrz4YFvdh2GM1gA8vSsnZPR73w==", + "dev": true, + "dependencies": { + "@algolia/cache-browser-local-storage": "4.23.3", + "@algolia/cache-common": "4.23.3", + "@algolia/cache-in-memory": "4.23.3", + "@algolia/client-common": "4.23.3", + "@algolia/client-search": "4.23.3", + "@algolia/logger-common": "4.23.3", + "@algolia/logger-console": "4.23.3", + "@algolia/requester-browser-xhr": "4.23.3", + "@algolia/requester-common": "4.23.3", + "@algolia/requester-node-http": "4.23.3", + "@algolia/transporter": "4.23.3" + } + }, + "node_modules/@algolia/requester-browser-xhr": { + "version": "4.23.3", + "resolved": "https://registry.npmjs.org/@algolia/requester-browser-xhr/-/requester-browser-xhr-4.23.3.tgz", + "integrity": "sha512-jDWGIQ96BhXbmONAQsasIpTYWslyjkiGu0Quydjlowe+ciqySpiDUrJHERIRfELE5+wFc7hc1Q5hqjGoV7yghw==", + "dev": true, + "dependencies": { + "@algolia/requester-common": "4.23.3" + } + }, + "node_modules/@algolia/requester-common": { + "version": "4.23.3", + "resolved": "https://registry.npmjs.org/@algolia/requester-common/-/requester-common-4.23.3.tgz", + "integrity": "sha512-xloIdr/bedtYEGcXCiF2muajyvRhwop4cMZo+K2qzNht0CMzlRkm8YsDdj5IaBhshqfgmBb3rTg4sL4/PpvLYw==", + "dev": true + }, + "node_modules/@algolia/requester-node-http": { + "version": "4.23.3", + "resolved": "https://registry.npmjs.org/@algolia/requester-node-http/-/requester-node-http-4.23.3.tgz", + "integrity": "sha512-zgu++8Uj03IWDEJM3fuNl34s746JnZOWn1Uz5taV1dFyJhVM/kTNw9Ik7YJWiUNHJQXcaD8IXD1eCb0nq/aByA==", + "dev": true, + "dependencies": { + "@algolia/requester-common": "4.23.3" + } + }, + "node_modules/@algolia/transporter": { + "version": "4.23.3", + "resolved": "https://registry.npmjs.org/@algolia/transporter/-/transporter-4.23.3.tgz", + "integrity": "sha512-Wjl5gttqnf/gQKJA+dafnD0Y6Yw97yvfY8R9h0dQltX1GXTgNs1zWgvtWW0tHl1EgMdhAyw189uWiZMnL3QebQ==", + "dev": true, + "dependencies": { + "@algolia/cache-common": "4.23.3", + "@algolia/logger-common": "4.23.3", + "@algolia/requester-common": "4.23.3" + } + }, "node_modules/@ampproject/remapping": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.2.0.tgz", @@ -487,9 +683,9 @@ } }, "node_modules/@babel/parser": { - "version": "7.23.0", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.23.0.tgz", - "integrity": "sha512-vvPKKdMemU85V9WE/l5wZEmImpCtLqbnTvqDS2U1fJ96KrxoW7KrXhNsNCblQlg8Ck4b85yxdTyelsMUgFUXiw==", + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.24.7.tgz", + "integrity": "sha512-9uUYRm6OqQrCqQdG1iCBwBPZgN8ciDBro2nIOFaiRz1/BCxaI7CNvQbDHvsArAC7Tw9Hda/B3U+6ui9u4HWXPw==", "dev": true, "bin": { "parser": "bin/babel-parser.js" @@ -1683,6 +1879,422 @@ "node": ">=10.0.0" } }, + "node_modules/@docsearch/css": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/@docsearch/css/-/css-3.6.0.tgz", + "integrity": "sha512-+sbxb71sWre+PwDK7X2T8+bhS6clcVMLwBPznX45Qu6opJcgRjAp7gYSDzVFp187J+feSj5dNBN1mJoi6ckkUQ==", + "dev": true + }, + "node_modules/@docsearch/js": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/@docsearch/js/-/js-3.6.0.tgz", + "integrity": "sha512-QujhqINEElrkIfKwyyyTfbsfMAYCkylInLYMRqHy7PHc8xTBQCow73tlo/Kc7oIwBrCLf0P3YhjlOeV4v8hevQ==", + "dev": true, + "dependencies": { + "@docsearch/react": "3.6.0", + "preact": "^10.0.0" + } + }, + "node_modules/@docsearch/react": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/@docsearch/react/-/react-3.6.0.tgz", + "integrity": "sha512-HUFut4ztcVNmqy9gp/wxNbC7pTOHhgVVkHVGCACTuLhUKUhKAF9KYHJtMiLUJxEqiFLQiuri1fWF8zqwM/cu1w==", + "dev": true, + "dependencies": { + "@algolia/autocomplete-core": "1.9.3", + "@algolia/autocomplete-preset-algolia": "1.9.3", + "@docsearch/css": "3.6.0", + "algoliasearch": "^4.19.1" + }, + "peerDependencies": { + "@types/react": ">= 16.8.0 < 19.0.0", + "react": ">= 16.8.0 < 19.0.0", + "react-dom": ">= 16.8.0 < 19.0.0", + "search-insights": ">= 1 < 3" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + }, + "react": { + "optional": true + }, + "react-dom": { + "optional": true + }, + "search-insights": { + "optional": true + } + } + }, + "node_modules/@esbuild/aix-ppc64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.21.5.tgz", + "integrity": "sha512-1SDgH6ZSPTlggy1yI6+Dbkiz8xzpHJEVAlF/AM1tHPLsf5STom9rwtjE4hKAF20FfXXNTFqEYXyJNWh1GiZedQ==", + "cpu": [ + "ppc64" + ], + "dev": true, + "optional": true, + "os": [ + "aix" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/android-arm": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.21.5.tgz", + "integrity": "sha512-vCPvzSjpPHEi1siZdlvAlsPxXl7WbOVUBBAowWug4rJHb68Ox8KualB+1ocNvT5fjv6wpkX6o/iEpbDrf68zcg==", + "cpu": [ + "arm" + ], + "dev": true, + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/android-arm64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.21.5.tgz", + "integrity": "sha512-c0uX9VAUBQ7dTDCjq+wdyGLowMdtR/GoC2U5IYk/7D1H1JYC0qseD7+11iMP2mRLN9RcCMRcjC4YMclCzGwS/A==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/android-x64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.21.5.tgz", + "integrity": "sha512-D7aPRUUNHRBwHxzxRvp856rjUHRFW1SdQATKXH2hqA0kAZb1hKmi02OpYRacl0TxIGz/ZmXWlbZgjwWYaCakTA==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/darwin-arm64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.21.5.tgz", + "integrity": "sha512-DwqXqZyuk5AiWWf3UfLiRDJ5EDd49zg6O9wclZ7kUMv2WRFr4HKjXp/5t8JZ11QbQfUS6/cRCKGwYhtNAY88kQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/darwin-x64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.21.5.tgz", + "integrity": "sha512-se/JjF8NlmKVG4kNIuyWMV/22ZaerB+qaSi5MdrXtd6R08kvs2qCN4C09miupktDitvh8jRFflwGFBQcxZRjbw==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/freebsd-arm64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.21.5.tgz", + "integrity": "sha512-5JcRxxRDUJLX8JXp/wcBCy3pENnCgBR9bN6JsY4OmhfUtIHe3ZW0mawA7+RDAcMLrMIZaf03NlQiX9DGyB8h4g==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/freebsd-x64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.21.5.tgz", + "integrity": "sha512-J95kNBj1zkbMXtHVH29bBriQygMXqoVQOQYA+ISs0/2l3T9/kj42ow2mpqerRBxDJnmkUDCaQT/dfNXWX/ZZCQ==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-arm": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.21.5.tgz", + "integrity": "sha512-bPb5AHZtbeNGjCKVZ9UGqGwo8EUu4cLq68E95A53KlxAPRmUyYv2D6F0uUI65XisGOL1hBP5mTronbgo+0bFcA==", + "cpu": [ + "arm" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-arm64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.21.5.tgz", + "integrity": "sha512-ibKvmyYzKsBeX8d8I7MH/TMfWDXBF3db4qM6sy+7re0YXya+K1cem3on9XgdT2EQGMu4hQyZhan7TeQ8XkGp4Q==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-ia32": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.21.5.tgz", + "integrity": "sha512-YvjXDqLRqPDl2dvRODYmmhz4rPeVKYvppfGYKSNGdyZkA01046pLWyRKKI3ax8fbJoK5QbxblURkwK/MWY18Tg==", + "cpu": [ + "ia32" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-loong64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.21.5.tgz", + "integrity": "sha512-uHf1BmMG8qEvzdrzAqg2SIG/02+4/DHB6a9Kbya0XDvwDEKCoC8ZRWI5JJvNdUjtciBGFQ5PuBlpEOXQj+JQSg==", + "cpu": [ + "loong64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-mips64el": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.21.5.tgz", + "integrity": "sha512-IajOmO+KJK23bj52dFSNCMsz1QP1DqM6cwLUv3W1QwyxkyIWecfafnI555fvSGqEKwjMXVLokcV5ygHW5b3Jbg==", + "cpu": [ + "mips64el" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-ppc64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.21.5.tgz", + "integrity": "sha512-1hHV/Z4OEfMwpLO8rp7CvlhBDnjsC3CttJXIhBi+5Aj5r+MBvy4egg7wCbe//hSsT+RvDAG7s81tAvpL2XAE4w==", + "cpu": [ + "ppc64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-riscv64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.21.5.tgz", + "integrity": "sha512-2HdXDMd9GMgTGrPWnJzP2ALSokE/0O5HhTUvWIbD3YdjME8JwvSCnNGBnTThKGEB91OZhzrJ4qIIxk/SBmyDDA==", + "cpu": [ + "riscv64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-s390x": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.21.5.tgz", + "integrity": "sha512-zus5sxzqBJD3eXxwvjN1yQkRepANgxE9lgOW2qLnmr8ikMTphkjgXu1HR01K4FJg8h1kEEDAqDcZQtbrRnB41A==", + "cpu": [ + "s390x" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-x64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.21.5.tgz", + "integrity": "sha512-1rYdTpyv03iycF1+BhzrzQJCdOuAOtaqHTWJZCWvijKD2N5Xu0TtVC8/+1faWqcP9iBCWOmjmhoH94dH82BxPQ==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/netbsd-x64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.21.5.tgz", + "integrity": "sha512-Woi2MXzXjMULccIwMnLciyZH4nCIMpWQAs049KEeMvOcNADVxo0UBIQPfSmxB3CWKedngg7sWZdLvLczpe0tLg==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "netbsd" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/openbsd-x64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.21.5.tgz", + "integrity": "sha512-HLNNw99xsvx12lFBUwoT8EVCsSvRNDVxNpjZ7bPn947b8gJPzeHWyNVhFsaerc0n3TsbOINvRP2byTZ5LKezow==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "openbsd" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/sunos-x64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.21.5.tgz", + "integrity": "sha512-6+gjmFpfy0BHU5Tpptkuh8+uw3mnrvgs+dSPQXQOv3ekbordwnzTVEb4qnIvQcYXq6gzkyTnoZ9dZG+D4garKg==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "sunos" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/win32-arm64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.21.5.tgz", + "integrity": "sha512-Z0gOTd75VvXqyq7nsl93zwahcTROgqvuAcYDUr+vOv8uHhNSKROyU961kgtCD1e95IqPKSQKH7tBTslnS3tA8A==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/win32-ia32": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.21.5.tgz", + "integrity": "sha512-SWXFF1CL2RVNMaVs+BBClwtfZSvDgtL//G/smwAc5oVK/UPu2Gu9tIaRgFmYFFKrmg3SyAjSrElf0TiJ1v8fYA==", + "cpu": [ + "ia32" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/win32-x64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.21.5.tgz", + "integrity": "sha512-tQd/1efJuzPC6rCFwEvLtci/xNFcTZknmXs98FYDfGE4wP9ClFV98nyKrzJKVPMhdDnjzLhdUyMX4PsQAPjwIw==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=12" + } + }, "node_modules/@eslint/eslintrc": { "version": "1.3.2", "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-1.3.2.tgz", @@ -1820,9 +2432,9 @@ } }, "node_modules/@jridgewell/sourcemap-codec": { - "version": "1.4.14", - "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.14.tgz", - "integrity": "sha512-XPSJHWmi394fuUuzDnGz1wiKqWfo1yXecHQMRf2l6hztTO+nPru658AyDngaBe7isIxEkRsPR3FZh+s7iVa4Uw==", + "version": "1.4.15", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz", + "integrity": "sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==", "dev": true }, "node_modules/@jridgewell/trace-mapping": { @@ -1853,21 +2465,253 @@ "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz", "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==", "dev": true, - "engines": { - "node": ">= 8" + "engines": { + "node": ">= 8" + } + }, + "node_modules/@nodelib/fs.walk": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz", + "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", + "dev": true, + "dependencies": { + "@nodelib/fs.scandir": "2.1.5", + "fastq": "^1.6.0" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/@rollup/rollup-android-arm-eabi": { + "version": "4.18.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.18.0.tgz", + "integrity": "sha512-Tya6xypR10giZV1XzxmH5wr25VcZSncG0pZIjfePT0OVBvqNEurzValetGNarVrGiq66EBVAFn15iYX4w6FKgQ==", + "cpu": [ + "arm" + ], + "dev": true, + "optional": true, + "os": [ + "android" + ] + }, + "node_modules/@rollup/rollup-android-arm64": { + "version": "4.18.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.18.0.tgz", + "integrity": "sha512-avCea0RAP03lTsDhEyfy+hpfr85KfyTctMADqHVhLAF3MlIkq83CP8UfAHUssgXTYd+6er6PaAhx/QGv4L1EiA==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "android" + ] + }, + "node_modules/@rollup/rollup-darwin-arm64": { + "version": "4.18.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.18.0.tgz", + "integrity": "sha512-IWfdwU7KDSm07Ty0PuA/W2JYoZ4iTj3TUQjkVsO/6U+4I1jN5lcR71ZEvRh52sDOERdnNhhHU57UITXz5jC1/w==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "darwin" + ] + }, + "node_modules/@rollup/rollup-darwin-x64": { + "version": "4.18.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.18.0.tgz", + "integrity": "sha512-n2LMsUz7Ynu7DoQrSQkBf8iNrjOGyPLrdSg802vk6XT3FtsgX6JbE8IHRvposskFm9SNxzkLYGSq9QdpLYpRNA==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "darwin" + ] + }, + "node_modules/@rollup/rollup-linux-arm-gnueabihf": { + "version": "4.18.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.18.0.tgz", + "integrity": "sha512-C/zbRYRXFjWvz9Z4haRxcTdnkPt1BtCkz+7RtBSuNmKzMzp3ZxdM28Mpccn6pt28/UWUCTXa+b0Mx1k3g6NOMA==", + "cpu": [ + "arm" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-arm-musleabihf": { + "version": "4.18.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.18.0.tgz", + "integrity": "sha512-l3m9ewPgjQSXrUMHg93vt0hYCGnrMOcUpTz6FLtbwljo2HluS4zTXFy2571YQbisTnfTKPZ01u/ukJdQTLGh9A==", + "cpu": [ + "arm" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-arm64-gnu": { + "version": "4.18.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.18.0.tgz", + "integrity": "sha512-rJ5D47d8WD7J+7STKdCUAgmQk49xuFrRi9pZkWoRD1UeSMakbcepWXPF8ycChBoAqs1pb2wzvbY6Q33WmN2ftw==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-arm64-musl": { + "version": "4.18.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.18.0.tgz", + "integrity": "sha512-be6Yx37b24ZwxQ+wOQXXLZqpq4jTckJhtGlWGZs68TgdKXJgw54lUUoFYrg6Zs/kjzAQwEwYbp8JxZVzZLRepQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-powerpc64le-gnu": { + "version": "4.18.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-powerpc64le-gnu/-/rollup-linux-powerpc64le-gnu-4.18.0.tgz", + "integrity": "sha512-hNVMQK+qrA9Todu9+wqrXOHxFiD5YmdEi3paj6vP02Kx1hjd2LLYR2eaN7DsEshg09+9uzWi2W18MJDlG0cxJA==", + "cpu": [ + "ppc64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-riscv64-gnu": { + "version": "4.18.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.18.0.tgz", + "integrity": "sha512-ROCM7i+m1NfdrsmvwSzoxp9HFtmKGHEqu5NNDiZWQtXLA8S5HBCkVvKAxJ8U+CVctHwV2Gb5VUaK7UAkzhDjlg==", + "cpu": [ + "riscv64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-s390x-gnu": { + "version": "4.18.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.18.0.tgz", + "integrity": "sha512-0UyyRHyDN42QL+NbqevXIIUnKA47A+45WyasO+y2bGJ1mhQrfrtXUpTxCOrfxCR4esV3/RLYyucGVPiUsO8xjg==", + "cpu": [ + "s390x" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-x64-gnu": { + "version": "4.18.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.18.0.tgz", + "integrity": "sha512-xuglR2rBVHA5UsI8h8UbX4VJ470PtGCf5Vpswh7p2ukaqBGFTnsfzxUBetoWBWymHMxbIG0Cmx7Y9qDZzr648w==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-x64-musl": { + "version": "4.18.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.18.0.tgz", + "integrity": "sha512-LKaqQL9osY/ir2geuLVvRRs+utWUNilzdE90TpyoX0eNqPzWjRm14oMEE+YLve4k/NAqCdPkGYDaDF5Sw+xBfg==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-win32-arm64-msvc": { + "version": "4.18.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.18.0.tgz", + "integrity": "sha512-7J6TkZQFGo9qBKH0pk2cEVSRhJbL6MtfWxth7Y5YmZs57Pi+4x6c2dStAUvaQkHQLnEQv1jzBUW43GvZW8OFqA==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@rollup/rollup-win32-ia32-msvc": { + "version": "4.18.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.18.0.tgz", + "integrity": "sha512-Txjh+IxBPbkUB9+SXZMpv+b/vnTEtFyfWZgJ6iyCmt2tdx0OF5WhFowLmnh8ENGNpfUlUZkdI//4IEmhwPieNg==", + "cpu": [ + "ia32" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@rollup/rollup-win32-x64-msvc": { + "version": "4.18.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.18.0.tgz", + "integrity": "sha512-UOo5FdvOL0+eIVTgS4tIdbW+TtnBLWg1YBCcU2KWM7nuNwRz9bksDX1bekJJCpu25N1DVWaCwnT39dVQxzqS8g==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@shikijs/core": { + "version": "1.6.5", + "resolved": "https://registry.npmjs.org/@shikijs/core/-/core-1.6.5.tgz", + "integrity": "sha512-XcQYt6e4L61ruAxHiL3Xg1DL/XkWWjzDdeckB/DtN8jAxoAU+bcxsV6DetC8NafHpL4YpGhxy9iXF0ND/u6HmA==", + "dev": true + }, + "node_modules/@shikijs/transformers": { + "version": "1.6.5", + "resolved": "https://registry.npmjs.org/@shikijs/transformers/-/transformers-1.6.5.tgz", + "integrity": "sha512-iuKa1uQtPQEe5vgCsXIb162b/3imRiAIdoF5IqafrTWL1uqZUpipfPjWZPuAAszOzYU//yIYRbhUk8reHVXA/w==", + "dev": true, + "dependencies": { + "shiki": "1.6.5" } }, - "node_modules/@nodelib/fs.walk": { - "version": "1.2.8", - "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz", - "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", + "node_modules/@shikijs/transformers/node_modules/shiki": { + "version": "1.6.5", + "resolved": "https://registry.npmjs.org/shiki/-/shiki-1.6.5.tgz", + "integrity": "sha512-iFzypldJG0zeyRHKAhaSGCf+YWXpMMyUyOrCVFBFKGGdF5vrB6jbd66/SQljxV20aSrVZEAQwUto/hhuNi/CIg==", "dev": true, "dependencies": { - "@nodelib/fs.scandir": "2.1.5", - "fastq": "^1.6.0" - }, - "engines": { - "node": ">= 8" + "@shikijs/core": "1.6.5" } }, "node_modules/@sinonjs/commons": { @@ -1976,6 +2820,28 @@ "integrity": "sha512-wOuvG1SN4Us4rez+tylwwwCV1psiNVOkJeM3AUWUNWg/jDQY2+HE/444y5gc+jBmRqASOm2Oeh5c1axHobwRKQ==", "dev": true }, + "node_modules/@types/linkify-it": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/@types/linkify-it/-/linkify-it-5.0.0.tgz", + "integrity": "sha512-sVDA58zAw4eWAffKOaQH5/5j3XeayukzDk+ewSsnv3p4yJEZHCCzMDiZM8e0OUrRvmpGZ85jf4yDHkHsgBNr9Q==", + "dev": true + }, + "node_modules/@types/markdown-it": { + "version": "14.1.1", + "resolved": "https://registry.npmjs.org/@types/markdown-it/-/markdown-it-14.1.1.tgz", + "integrity": "sha512-4NpsnpYl2Gt1ljyBGrKMxFYAYvpqbnnkgP/i/g+NLpjEUa3obn1XJCur9YbEXKDAkaXqsR1LbDnGEJ0MmKFxfg==", + "dev": true, + "dependencies": { + "@types/linkify-it": "^5", + "@types/mdurl": "^2" + } + }, + "node_modules/@types/mdurl": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@types/mdurl/-/mdurl-2.0.0.tgz", + "integrity": "sha512-RGdgjQUZba5p6QEFAVx2OGb8rQDL/cPRG7GiedRzMcJ1tYnUANBncjbSB1NRGwbvjcPeikRABz2nshyPk1bhWg==", + "dev": true + }, "node_modules/@types/mocha": { "version": "9.1.1", "resolved": "https://registry.npmjs.org/@types/mocha/-/mocha-9.1.1.tgz", @@ -1996,6 +2862,12 @@ "integrity": "sha512-P97XU07fcpauSw3/fE2Q7eF6bHl4oHhwkikjnM7zlQLENrdC2rZuHSdNlMBhnW82NyBEsVJHII1Jk3d/MtQsQQ==", "dev": true }, + "node_modules/@types/web-bluetooth": { + "version": "0.0.20", + "resolved": "https://registry.npmjs.org/@types/web-bluetooth/-/web-bluetooth-0.0.20.tgz", + "integrity": "sha512-g9gZnnXVq7gM7v3tJCWV/qw7w+KeOlSHAhgF9RytFyifW6AF61hdT2ucrYhPq9hLs5JIryeupHV3qGk95dH9ow==", + "dev": true + }, "node_modules/@typescript-eslint/eslint-plugin": { "version": "5.38.1", "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.38.1.tgz", @@ -2252,6 +3124,335 @@ "integrity": "sha512-sL/cEvJWAnClXw0wHk85/2L0G6Sj8UB0Ctc1TEMbKSsmpRosqhwj9gWgFRZSrBr2f9tiXISwNhCPmlfqUqyb9Q==", "dev": true }, + "node_modules/@vitejs/plugin-vue": { + "version": "5.0.5", + "resolved": "https://registry.npmjs.org/@vitejs/plugin-vue/-/plugin-vue-5.0.5.tgz", + "integrity": "sha512-LOjm7XeIimLBZyzinBQ6OSm3UBCNVCpLkxGC0oWmm2YPzVZoxMsdvNVimLTBzpAnR9hl/yn1SHGuRfe6/Td9rQ==", + "dev": true, + "engines": { + "node": "^18.0.0 || >=20.0.0" + }, + "peerDependencies": { + "vite": "^5.0.0", + "vue": "^3.2.25" + } + }, + "node_modules/@vue/compiler-core": { + "version": "3.4.29", + "resolved": "https://registry.npmjs.org/@vue/compiler-core/-/compiler-core-3.4.29.tgz", + "integrity": "sha512-TFKiRkKKsRCKvg/jTSSKK7mYLJEQdUiUfykbG49rubC9SfDyvT2JrzTReopWlz2MxqeLyxh9UZhvxEIBgAhtrg==", + "dev": true, + "dependencies": { + "@babel/parser": "^7.24.7", + "@vue/shared": "3.4.29", + "entities": "^4.5.0", + "estree-walker": "^2.0.2", + "source-map-js": "^1.2.0" + } + }, + "node_modules/@vue/compiler-dom": { + "version": "3.4.29", + "resolved": "https://registry.npmjs.org/@vue/compiler-dom/-/compiler-dom-3.4.29.tgz", + "integrity": "sha512-A6+iZ2fKIEGnfPJejdB7b1FlJzgiD+Y/sxxKwJWg1EbJu6ZPgzaPQQ51ESGNv0CP6jm6Z7/pO6Ia8Ze6IKrX7w==", + "dev": true, + "dependencies": { + "@vue/compiler-core": "3.4.29", + "@vue/shared": "3.4.29" + } + }, + "node_modules/@vue/compiler-sfc": { + "version": "3.4.29", + "resolved": "https://registry.npmjs.org/@vue/compiler-sfc/-/compiler-sfc-3.4.29.tgz", + "integrity": "sha512-zygDcEtn8ZimDlrEQyLUovoWgKQic6aEQqRXce2WXBvSeHbEbcAsXyCk9oG33ZkyWH4sl9D3tkYc1idoOkdqZQ==", + "dev": true, + "dependencies": { + "@babel/parser": "^7.24.7", + "@vue/compiler-core": "3.4.29", + "@vue/compiler-dom": "3.4.29", + "@vue/compiler-ssr": "3.4.29", + "@vue/shared": "3.4.29", + "estree-walker": "^2.0.2", + "magic-string": "^0.30.10", + "postcss": "^8.4.38", + "source-map-js": "^1.2.0" + } + }, + "node_modules/@vue/compiler-ssr": { + "version": "3.4.29", + "resolved": "https://registry.npmjs.org/@vue/compiler-ssr/-/compiler-ssr-3.4.29.tgz", + "integrity": "sha512-rFbwCmxJ16tDp3N8XCx5xSQzjhidYjXllvEcqX/lopkoznlNPz3jyy0WGJCyhAaVQK677WWFt3YO/WUEkMMUFQ==", + "dev": true, + "dependencies": { + "@vue/compiler-dom": "3.4.29", + "@vue/shared": "3.4.29" + } + }, + "node_modules/@vue/devtools-api": { + "version": "7.3.0", + "resolved": "https://registry.npmjs.org/@vue/devtools-api/-/devtools-api-7.3.0.tgz", + "integrity": "sha512-EQ6DIm9AuL9q6IzjjnxeHWgzHzZTI+0ZGyLyG6faLN1e0tzLWPut58OtvFbLP/hbEhE5zPlsdUsH1uFr7RVFYw==", + "dev": true, + "dependencies": { + "@vue/devtools-kit": "^7.3.0" + } + }, + "node_modules/@vue/devtools-kit": { + "version": "7.3.0", + "resolved": "https://registry.npmjs.org/@vue/devtools-kit/-/devtools-kit-7.3.0.tgz", + "integrity": "sha512-J9C+ue3Ka8cumQY/hMsNTcbb1tczqVBBXFMw4isa5YvPjyIBgEtJBfDSUVIK3nE+YWk7UNliUuCcE1GHEKaGcw==", + "dev": true, + "dependencies": { + "@vue/devtools-shared": "^7.3.0", + "birpc": "^0.2.17", + "hookable": "^5.5.3", + "mitt": "^3.0.1", + "perfect-debounce": "^1.0.0", + "speakingurl": "^14.0.1", + "superjson": "^2.2.1" + }, + "peerDependencies": { + "vue": "^3.0.0" + } + }, + "node_modules/@vue/devtools-shared": { + "version": "7.3.0", + "resolved": "https://registry.npmjs.org/@vue/devtools-shared/-/devtools-shared-7.3.0.tgz", + "integrity": "sha512-bYw4BtZclxzVrYBeYYHzNOcLlvVZbe9tutwtrixTtdgynHvuSJa5KI2MqWiumpGYm2feFI5sHlC8Vt61v4z18g==", + "dev": true, + "dependencies": { + "rfdc": "^1.3.1" + } + }, + "node_modules/@vue/reactivity": { + "version": "3.4.29", + "resolved": "https://registry.npmjs.org/@vue/reactivity/-/reactivity-3.4.29.tgz", + "integrity": "sha512-w8+KV+mb1a8ornnGQitnMdLfE0kXmteaxLdccm2XwdFxXst4q/Z7SEboCV5SqJNpZbKFeaRBBJBhW24aJyGINg==", + "dev": true, + "dependencies": { + "@vue/shared": "3.4.29" + } + }, + "node_modules/@vue/runtime-core": { + "version": "3.4.29", + "resolved": "https://registry.npmjs.org/@vue/runtime-core/-/runtime-core-3.4.29.tgz", + "integrity": "sha512-s8fmX3YVR/Rk5ig0ic0NuzTNjK2M7iLuVSZyMmCzN/+Mjuqqif1JasCtEtmtoJWF32pAtUjyuT2ljNKNLeOmnQ==", + "dev": true, + "dependencies": { + "@vue/reactivity": "3.4.29", + "@vue/shared": "3.4.29" + } + }, + "node_modules/@vue/runtime-dom": { + "version": "3.4.29", + "resolved": "https://registry.npmjs.org/@vue/runtime-dom/-/runtime-dom-3.4.29.tgz", + "integrity": "sha512-gI10atCrtOLf/2MPPMM+dpz3NGulo9ZZR9d1dWo4fYvm+xkfvRrw1ZmJ7mkWtiJVXSsdmPbcK1p5dZzOCKDN0g==", + "dev": true, + "dependencies": { + "@vue/reactivity": "3.4.29", + "@vue/runtime-core": "3.4.29", + "@vue/shared": "3.4.29", + "csstype": "^3.1.3" + } + }, + "node_modules/@vue/server-renderer": { + "version": "3.4.29", + "resolved": "https://registry.npmjs.org/@vue/server-renderer/-/server-renderer-3.4.29.tgz", + "integrity": "sha512-HMLCmPI2j/k8PVkSBysrA2RxcxC5DgBiCdj7n7H2QtR8bQQPqKAe8qoaxLcInzouBmzwJ+J0x20ygN/B5mYBng==", + "dev": true, + "dependencies": { + "@vue/compiler-ssr": "3.4.29", + "@vue/shared": "3.4.29" + }, + "peerDependencies": { + "vue": "3.4.29" + } + }, + "node_modules/@vue/shared": { + "version": "3.4.29", + "resolved": "https://registry.npmjs.org/@vue/shared/-/shared-3.4.29.tgz", + "integrity": "sha512-hQ2gAQcBO/CDpC82DCrinJNgOHI2v+FA7BDW4lMSPeBpQ7sRe2OLHWe5cph1s7D8DUQAwRt18dBDfJJ220APEA==", + "dev": true + }, + "node_modules/@vueuse/core": { + "version": "10.11.0", + "resolved": "https://registry.npmjs.org/@vueuse/core/-/core-10.11.0.tgz", + "integrity": "sha512-x3sD4Mkm7PJ+pcq3HX8PLPBadXCAlSDR/waK87dz0gQE+qJnaaFhc/dZVfJz+IUYzTMVGum2QlR7ImiJQN4s6g==", + "dev": true, + "dependencies": { + "@types/web-bluetooth": "^0.0.20", + "@vueuse/metadata": "10.11.0", + "@vueuse/shared": "10.11.0", + "vue-demi": ">=0.14.8" + }, + "funding": { + "url": "https://github.com/sponsors/antfu" + } + }, + "node_modules/@vueuse/core/node_modules/vue-demi": { + "version": "0.14.8", + "resolved": "https://registry.npmjs.org/vue-demi/-/vue-demi-0.14.8.tgz", + "integrity": "sha512-Uuqnk9YE9SsWeReYqK2alDI5YzciATE0r2SkA6iMAtuXvNTMNACJLJEXNXaEy94ECuBe4Sk6RzRU80kjdbIo1Q==", + "dev": true, + "hasInstallScript": true, + "bin": { + "vue-demi-fix": "bin/vue-demi-fix.js", + "vue-demi-switch": "bin/vue-demi-switch.js" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/antfu" + }, + "peerDependencies": { + "@vue/composition-api": "^1.0.0-rc.1", + "vue": "^3.0.0-0 || ^2.6.0" + }, + "peerDependenciesMeta": { + "@vue/composition-api": { + "optional": true + } + } + }, + "node_modules/@vueuse/integrations": { + "version": "10.11.0", + "resolved": "https://registry.npmjs.org/@vueuse/integrations/-/integrations-10.11.0.tgz", + "integrity": "sha512-Pp6MtWEIr+NDOccWd8j59Kpjy5YDXogXI61Kb1JxvSfVBO8NzFQkmrKmSZz47i+ZqHnIzxaT38L358yDHTncZg==", + "dev": true, + "dependencies": { + "@vueuse/core": "10.11.0", + "@vueuse/shared": "10.11.0", + "vue-demi": ">=0.14.8" + }, + "funding": { + "url": "https://github.com/sponsors/antfu" + }, + "peerDependencies": { + "async-validator": "^4", + "axios": "^1", + "change-case": "^4", + "drauu": "^0.3", + "focus-trap": "^7", + "fuse.js": "^6", + "idb-keyval": "^6", + "jwt-decode": "^3", + "nprogress": "^0.2", + "qrcode": "^1.5", + "sortablejs": "^1", + "universal-cookie": "^6" + }, + "peerDependenciesMeta": { + "async-validator": { + "optional": true + }, + "axios": { + "optional": true + }, + "change-case": { + "optional": true + }, + "drauu": { + "optional": true + }, + "focus-trap": { + "optional": true + }, + "fuse.js": { + "optional": true + }, + "idb-keyval": { + "optional": true + }, + "jwt-decode": { + "optional": true + }, + "nprogress": { + "optional": true + }, + "qrcode": { + "optional": true + }, + "sortablejs": { + "optional": true + }, + "universal-cookie": { + "optional": true + } + } + }, + "node_modules/@vueuse/integrations/node_modules/vue-demi": { + "version": "0.14.8", + "resolved": "https://registry.npmjs.org/vue-demi/-/vue-demi-0.14.8.tgz", + "integrity": "sha512-Uuqnk9YE9SsWeReYqK2alDI5YzciATE0r2SkA6iMAtuXvNTMNACJLJEXNXaEy94ECuBe4Sk6RzRU80kjdbIo1Q==", + "dev": true, + "hasInstallScript": true, + "bin": { + "vue-demi-fix": "bin/vue-demi-fix.js", + "vue-demi-switch": "bin/vue-demi-switch.js" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/antfu" + }, + "peerDependencies": { + "@vue/composition-api": "^1.0.0-rc.1", + "vue": "^3.0.0-0 || ^2.6.0" + }, + "peerDependenciesMeta": { + "@vue/composition-api": { + "optional": true + } + } + }, + "node_modules/@vueuse/metadata": { + "version": "10.11.0", + "resolved": "https://registry.npmjs.org/@vueuse/metadata/-/metadata-10.11.0.tgz", + "integrity": "sha512-kQX7l6l8dVWNqlqyN3ePW3KmjCQO3ZMgXuBMddIu83CmucrsBfXlH+JoviYyRBws/yLTQO8g3Pbw+bdIoVm4oQ==", + "dev": true, + "funding": { + "url": "https://github.com/sponsors/antfu" + } + }, + "node_modules/@vueuse/shared": { + "version": "10.11.0", + "resolved": "https://registry.npmjs.org/@vueuse/shared/-/shared-10.11.0.tgz", + "integrity": "sha512-fyNoIXEq3PfX1L3NkNhtVQUSRtqYwJtJg+Bp9rIzculIZWHTkKSysujrOk2J+NrRulLTQH9+3gGSfYLWSEWU1A==", + "dev": true, + "dependencies": { + "vue-demi": ">=0.14.8" + }, + "funding": { + "url": "https://github.com/sponsors/antfu" + } + }, + "node_modules/@vueuse/shared/node_modules/vue-demi": { + "version": "0.14.8", + "resolved": "https://registry.npmjs.org/vue-demi/-/vue-demi-0.14.8.tgz", + "integrity": "sha512-Uuqnk9YE9SsWeReYqK2alDI5YzciATE0r2SkA6iMAtuXvNTMNACJLJEXNXaEy94ECuBe4Sk6RzRU80kjdbIo1Q==", + "dev": true, + "hasInstallScript": true, + "bin": { + "vue-demi-fix": "bin/vue-demi-fix.js", + "vue-demi-switch": "bin/vue-demi-switch.js" + }, + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/antfu" + }, + "peerDependencies": { + "@vue/composition-api": "^1.0.0-rc.1", + "vue": "^3.0.0-0 || ^2.6.0" + }, + "peerDependenciesMeta": { + "@vue/composition-api": { + "optional": true + } + } + }, "node_modules/@webassemblyjs/ast": { "version": "1.12.1", "resolved": "https://registry.npmjs.org/@webassemblyjs/ast/-/ast-1.12.1.tgz", @@ -2537,6 +3738,29 @@ "ajv": "^6.9.1" } }, + "node_modules/algoliasearch": { + "version": "4.23.3", + "resolved": "https://registry.npmjs.org/algoliasearch/-/algoliasearch-4.23.3.tgz", + "integrity": "sha512-Le/3YgNvjW9zxIQMRhUHuhiUjAlKY/zsdZpfq4dlLqg6mEm0nL6yk+7f2hDOtLpxsgE4jSzDmvHL7nXdBp5feg==", + "dev": true, + "dependencies": { + "@algolia/cache-browser-local-storage": "4.23.3", + "@algolia/cache-common": "4.23.3", + "@algolia/cache-in-memory": "4.23.3", + "@algolia/client-account": "4.23.3", + "@algolia/client-analytics": "4.23.3", + "@algolia/client-common": "4.23.3", + "@algolia/client-personalization": "4.23.3", + "@algolia/client-search": "4.23.3", + "@algolia/logger-common": "4.23.3", + "@algolia/logger-console": "4.23.3", + "@algolia/recommend": "4.23.3", + "@algolia/requester-browser-xhr": "4.23.3", + "@algolia/requester-common": "4.23.3", + "@algolia/requester-node-http": "4.23.3", + "@algolia/transporter": "4.23.3" + } + }, "node_modules/amdefine": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/amdefine/-/amdefine-1.0.1.tgz", @@ -2564,6 +3788,12 @@ "node": ">=8" } }, + "node_modules/ansi-sequence-parser": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/ansi-sequence-parser/-/ansi-sequence-parser-1.1.1.tgz", + "integrity": "sha512-vJXt3yiaUL4UU546s3rPXlsry/RnM730G1+HkpKE012AN0sx1eOrxSu95oKDIonskeLTijMgqWZ3uDEe3NFvyg==", + "dev": true + }, "node_modules/ansi-styles": { "version": "3.2.1", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", @@ -2625,15 +3855,6 @@ "node": "*" } }, - "node_modules/at-least-node": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/at-least-node/-/at-least-node-1.0.0.tgz", - "integrity": "sha512-+q/t7Ekv1EDY2l6Gda6LLiX14rU9TV20Wa3ofeQmwPFZbOMo9DXrLbOjFaaclkXKWidIaopwAObQDqwWtGUjqg==", - "dev": true, - "engines": { - "node": ">= 4.0.0" - } - }, "node_modules/babel-code-frame": { "version": "6.26.0", "resolved": "https://registry.npmjs.org/babel-code-frame/-/babel-code-frame-6.26.0.tgz", @@ -2887,6 +4108,15 @@ "node": ">=8" } }, + "node_modules/birpc": { + "version": "0.2.17", + "resolved": "https://registry.npmjs.org/birpc/-/birpc-0.2.17.tgz", + "integrity": "sha512-+hkTxhot+dWsLpp3gia5AkVHIsKlZybNT5gIYiDlNzJrmYPcTM9k5/w2uaj3IPpd7LlEYpmCj4Jj1nC41VhDFg==", + "dev": true, + "funding": { + "url": "https://github.com/sponsors/antfu" + } + }, "node_modules/bluebird": { "version": "3.7.2", "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.7.2.tgz", @@ -3304,6 +4534,21 @@ "integrity": "sha512-QADzlaHc8icV8I7vbaJXJwod9HWYp8uCqf1xa4OfNu1T7JVxQIrUgOWtHdNDtPiywmFbiS12VjotIXLrKM3orQ==", "dev": true }, + "node_modules/copy-anything": { + "version": "3.0.5", + "resolved": "https://registry.npmjs.org/copy-anything/-/copy-anything-3.0.5.tgz", + "integrity": "sha512-yCEafptTtb4bk7GLEQoM8KVJpxAfdBJYaXyzQEgQQQgYrZiDp8SJmGKlYza6CYjEDNstAdNdKA3UuoULlEbS6w==", + "dev": true, + "dependencies": { + "is-what": "^4.1.8" + }, + "engines": { + "node": ">=12.13" + }, + "funding": { + "url": "https://github.com/sponsors/mesqueeb" + } + }, "node_modules/core-js": { "version": "2.6.12", "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.6.12.tgz", @@ -3351,6 +4596,12 @@ "node": ">= 8" } }, + "node_modules/csstype": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.1.3.tgz", + "integrity": "sha512-M1uQkMl8rQK/szD0LNhtqxIPLpimGm8sOBwU7lLnCpSbTyY3yeU1Vc7l4KT5zT4s/yOxHH5O7tIuuLOCnLADRw==", + "dev": true + }, "node_modules/d": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/d/-/d-1.0.1.tgz", @@ -3575,6 +4826,18 @@ "node": ">=6.9.0" } }, + "node_modules/entities": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/entities/-/entities-4.5.0.tgz", + "integrity": "sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw==", + "dev": true, + "engines": { + "node": ">=0.12" + }, + "funding": { + "url": "https://github.com/fb55/entities?sponsor=1" + } + }, "node_modules/envinfo": { "version": "7.13.0", "resolved": "https://registry.npmjs.org/envinfo/-/envinfo-7.13.0.tgz", @@ -3641,6 +4904,44 @@ "ext": "^1.1.2" } }, + "node_modules/esbuild": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.21.5.tgz", + "integrity": "sha512-mg3OPMV4hXywwpoDxu3Qda5xCKQi+vCTZq8S9J/EpkhB2HzKXq4SNFZE3+NK93JYxc8VMSep+lOUSC/RVKaBqw==", + "dev": true, + "hasInstallScript": true, + "bin": { + "esbuild": "bin/esbuild" + }, + "engines": { + "node": ">=12" + }, + "optionalDependencies": { + "@esbuild/aix-ppc64": "0.21.5", + "@esbuild/android-arm": "0.21.5", + "@esbuild/android-arm64": "0.21.5", + "@esbuild/android-x64": "0.21.5", + "@esbuild/darwin-arm64": "0.21.5", + "@esbuild/darwin-x64": "0.21.5", + "@esbuild/freebsd-arm64": "0.21.5", + "@esbuild/freebsd-x64": "0.21.5", + "@esbuild/linux-arm": "0.21.5", + "@esbuild/linux-arm64": "0.21.5", + "@esbuild/linux-ia32": "0.21.5", + "@esbuild/linux-loong64": "0.21.5", + "@esbuild/linux-mips64el": "0.21.5", + "@esbuild/linux-ppc64": "0.21.5", + "@esbuild/linux-riscv64": "0.21.5", + "@esbuild/linux-s390x": "0.21.5", + "@esbuild/linux-x64": "0.21.5", + "@esbuild/netbsd-x64": "0.21.5", + "@esbuild/openbsd-x64": "0.21.5", + "@esbuild/sunos-x64": "0.21.5", + "@esbuild/win32-arm64": "0.21.5", + "@esbuild/win32-ia32": "0.21.5", + "@esbuild/win32-x64": "0.21.5" + } + }, "node_modules/escalade": { "version": "3.1.2", "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.2.tgz", @@ -4046,6 +5347,12 @@ "node": ">=4.0" } }, + "node_modules/estree-walker": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-2.0.2.tgz", + "integrity": "sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w==", + "dev": true + }, "node_modules/esutils": { "version": "2.0.3", "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", @@ -4397,6 +5704,15 @@ "integrity": "sha512-5nqDSxl8nn5BSNxyR3n4I6eDmbolI6WT+QqR547RwxQapgjQBmtktdP+HTBb/a/zLsbzERTONyUB5pefh5TtjQ==", "dev": true }, + "node_modules/focus-trap": { + "version": "7.5.4", + "resolved": "https://registry.npmjs.org/focus-trap/-/focus-trap-7.5.4.tgz", + "integrity": "sha512-N7kHdlgsO/v+iD/dMoJKtsSqs5Dz/dXZVebRgJw23LDk+jMi/974zyiOYDziY2JPp8xivq9BmUGwIJMiuSBi7w==", + "dev": true, + "dependencies": { + "tabbable": "^6.2.0" + } + }, "node_modules/foreachasync": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/foreachasync/-/foreachasync-3.0.0.tgz", @@ -4421,21 +5737,6 @@ "node": ">= 0.6" } }, - "node_modules/fs-extra": { - "version": "9.1.0", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-9.1.0.tgz", - "integrity": "sha512-hcg3ZmepS30/7BSFqRvoo3DOMQu7IjqxO5nCDt+zM9XWjb33Wg7ziNT+Qvqbuc3+gWpzO02JubVyk2G4Zvo1OQ==", - "dev": true, - "dependencies": { - "at-least-node": "^1.0.0", - "graceful-fs": "^4.2.0", - "jsonfile": "^6.0.1", - "universalify": "^2.0.0" - }, - "engines": { - "node": ">=10" - } - }, "node_modules/fs.realpath": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", @@ -4443,9 +5744,9 @@ "dev": true }, "node_modules/fsevents": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz", - "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==", + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", + "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", "hasInstallScript": true, "optional": true, "os": [ @@ -4575,32 +5876,11 @@ "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==", "dev": true }, - "node_modules/grapheme-splitter": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/grapheme-splitter/-/grapheme-splitter-1.0.4.tgz", - "integrity": "sha512-bzh50DW9kTPM00T8y4o8vQg89Di9oLJVLW/KaOGIXJWP/iqCN6WKYkbNOF04vFLJhwcpYUh9ydh/+5vpOqV4YQ==", - "dev": true - }, - "node_modules/handlebars": { - "version": "4.7.8", - "resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.7.8.tgz", - "integrity": "sha512-vafaFqs8MZkRrSX7sFVUdo3ap/eNiLnb4IakshzvP56X5Nr1iGKAIqdX6tMlm6HcNRIkr6AxO5jFEoJzzpT8aQ==", - "dev": true, - "dependencies": { - "minimist": "^1.2.5", - "neo-async": "^2.6.2", - "source-map": "^0.6.1", - "wordwrap": "^1.0.0" - }, - "bin": { - "handlebars": "bin/handlebars" - }, - "engines": { - "node": ">=0.4.7" - }, - "optionalDependencies": { - "uglify-js": "^3.1.4" - } + "node_modules/grapheme-splitter": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/grapheme-splitter/-/grapheme-splitter-1.0.4.tgz", + "integrity": "sha512-bzh50DW9kTPM00T8y4o8vQg89Di9oLJVLW/KaOGIXJWP/iqCN6WKYkbNOF04vFLJhwcpYUh9ydh/+5vpOqV4YQ==", + "dev": true }, "node_modules/has": { "version": "1.0.3", @@ -4677,14 +5957,11 @@ "he": "bin/he" } }, - "node_modules/highlight.js": { - "version": "10.7.3", - "resolved": "https://registry.npmjs.org/highlight.js/-/highlight.js-10.7.3.tgz", - "integrity": "sha512-tzcUFauisWKNHaRkN4Wjl/ZA07gENAjFl3J/c480dprkGTg5EQstgaNFqBfUqCq54kZRIEcreTsAgF/m2quD7A==", - "dev": true, - "engines": { - "node": "*" - } + "node_modules/hookable": { + "version": "5.5.3", + "resolved": "https://registry.npmjs.org/hookable/-/hookable-5.5.3.tgz", + "integrity": "sha512-Yc+BQe8SvoXH1643Qez1zqLRmbA5rCL+sSmk6TVos0LWVfNIB7PGncdlId77WzLGSIB5KaWgTaNTs2lNVEI6VQ==", + "dev": true }, "node_modules/http-errors": { "version": "2.0.0", @@ -4918,6 +6195,18 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/is-what": { + "version": "4.1.16", + "resolved": "https://registry.npmjs.org/is-what/-/is-what-4.1.16.tgz", + "integrity": "sha512-ZhMwEosbFJkA0YhFnNDgTM4ZxDRsS6HqTo7qsZM08fehyRYIYa0yHu5R6mgo1n/8MgaPBXiPimPD77baVFYg+A==", + "dev": true, + "engines": { + "node": ">=12.13" + }, + "funding": { + "url": "https://github.com/sponsors/mesqueeb" + } + }, "node_modules/isarray": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", @@ -5063,17 +6352,11 @@ "node": ">=6" } }, - "node_modules/jsonfile": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.1.0.tgz", - "integrity": "sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==", - "dev": true, - "dependencies": { - "universalify": "^2.0.0" - }, - "optionalDependencies": { - "graceful-fs": "^4.1.6" - } + "node_modules/jsonc-parser": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/jsonc-parser/-/jsonc-parser-3.2.1.tgz", + "integrity": "sha512-AilxAyFOAcK5wA1+LeaySVBrHsGQvUFCDWXKpZjzaL0PqW+xfBOttn8GNtWKFWqneyMZj41MWF9Kl6iPWLwgOA==", + "dev": true }, "node_modules/just-extend": { "version": "4.2.1", @@ -5290,6 +6573,15 @@ "integrity": "sha512-zTU3DaZaF3Rt9rhN3uBMGQD3dD2/vFQqnvZCDv4dl5iOzq2IZQqTxu90r4E5J+nP70J3ilqVCrbho2eWaeW8Ow==", "dev": true }, + "node_modules/magic-string": { + "version": "0.30.10", + "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.10.tgz", + "integrity": "sha512-iIRwTIf0QKV3UAnYK4PU8uiEc4SRh5jX0mwpIwETPpHdhVM4f53RSwS/vXvN1JhGX+Cs7B8qIq3d6AH49O5fAQ==", + "dev": true, + "dependencies": { + "@jridgewell/sourcemap-codec": "^1.4.15" + } + }, "node_modules/make-dir": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-3.1.0.tgz", @@ -5311,16 +6603,22 @@ "integrity": "sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==", "dev": true }, + "node_modules/mark.js": { + "version": "8.11.1", + "resolved": "https://registry.npmjs.org/mark.js/-/mark.js-8.11.1.tgz", + "integrity": "sha512-1I+1qpDt4idfgLQG+BNWmrqku+7/2bi5nLf4YwF8y8zXvmfiTBY3PV3ZibfrjBueCByROpuBjLLFCajqkgYoLQ==", + "dev": true + }, "node_modules/marked": { - "version": "1.2.9", - "resolved": "https://registry.npmjs.org/marked/-/marked-1.2.9.tgz", - "integrity": "sha512-H8lIX2SvyitGX+TRdtS06m1jHMijKN/XjfH6Ooii9fvxMlh8QdqBfBDkGUpMWH2kQNrtixjzYUa3SH8ROTgRRw==", + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/marked/-/marked-4.3.0.tgz", + "integrity": "sha512-PRsaiG84bK+AMvxziE/lCFss8juXjNaWzVbN5tXAm4XjeaS9NAHhop+PjQxz2A9h8Q4M/xGmzP8vqNwy6JeK0A==", "dev": true, "bin": { - "marked": "bin/marked" + "marked": "bin/marked.js" }, "engines": { - "node": ">= 8.16.2" + "node": ">= 12" } }, "node_modules/media-typer": { @@ -5439,6 +6737,18 @@ "integrity": "sha512-Jsjnk4bw3YJqYzbdyBiNsPWHPfO++UGG749Cxs6peCu5Xg4nrena6OVxOYxrQTqww0Jmwt+Ref8rggumkTLz9Q==", "dev": true }, + "node_modules/minisearch": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/minisearch/-/minisearch-6.3.0.tgz", + "integrity": "sha512-ihFnidEeU8iXzcVHy74dhkxh/dn8Dc08ERl0xwoMMGqp4+LvRSCgicb+zGqWthVokQKvCSxITlh3P08OzdTYCQ==", + "dev": true + }, + "node_modules/mitt": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/mitt/-/mitt-3.0.1.tgz", + "integrity": "sha512-vKivATfr97l2/QBCYAkXYDbrIWPM2IIKEl7YPhjCvKlG3kE2gm+uBo6nEXK3M5/Ffh/FLpKExzOQ3JJoJGFKBw==", + "dev": true + }, "node_modules/mocha": { "version": "10.0.0", "resolved": "https://registry.npmjs.org/mocha/-/mocha-10.0.0.tgz", @@ -6005,6 +7315,12 @@ "node": "*" } }, + "node_modules/perfect-debounce": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/perfect-debounce/-/perfect-debounce-1.0.0.tgz", + "integrity": "sha512-xCy9V055GLEqoFaHoC1SoLIaLmWctgCUaBaWxDZ7/Zx4CTyX7cJQLJOok/orfjZAh9kEYpjJa4d0KcJmCbctZA==", + "dev": true + }, "node_modules/picocolors": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.1.tgz", @@ -6087,6 +7403,62 @@ "node": ">=8" } }, + "node_modules/postcss": { + "version": "8.4.38", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.38.tgz", + "integrity": "sha512-Wglpdk03BSfXkHoQa3b/oulrotAkwrlLDRSOb9D0bN86FdRyE9lppSp33aHNPgBa0JKCoB+drFLZkQoRRYae5A==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/postcss/" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/postcss" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "dependencies": { + "nanoid": "^3.3.7", + "picocolors": "^1.0.0", + "source-map-js": "^1.2.0" + }, + "engines": { + "node": "^10 || ^12 || >=14" + } + }, + "node_modules/postcss/node_modules/nanoid": { + "version": "3.3.7", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.7.tgz", + "integrity": "sha512-eSRppjcPIatRIMC1U6UngP8XFcz8MQWGQdt1MTBQ7NaAmvXDfvNxbvWV3x2y6CdEUciCSsDHDQZbhYaB8QEo2g==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "bin": { + "nanoid": "bin/nanoid.cjs" + }, + "engines": { + "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" + } + }, + "node_modules/preact": { + "version": "10.22.0", + "resolved": "https://registry.npmjs.org/preact/-/preact-10.22.0.tgz", + "integrity": "sha512-RRurnSjJPj4rp5K6XoP45Ui33ncb7e4H7WiOHVpjbkvqvA3U+N8Z6Qbo0AE6leGYBV66n8EhEaFixvIu3SkxFw==", + "dev": true, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/preact" + } + }, "node_modules/prelude-ls": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", @@ -6102,15 +7474,6 @@ "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==", "dev": true }, - "node_modules/progress": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/progress/-/progress-2.0.3.tgz", - "integrity": "sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==", - "dev": true, - "engines": { - "node": ">=0.4.0" - } - }, "node_modules/protochain": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/protochain/-/protochain-1.0.5.tgz", @@ -6439,6 +7802,12 @@ "node": ">=0.10.0" } }, + "node_modules/rfdc": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/rfdc/-/rfdc-1.4.1.tgz", + "integrity": "sha512-q1b3N5QkRUWUl7iyylaaj3kOpIT0N2i9MqIEQXP73GVsN9cw3fdx8X63cEmWhJGi2PPCF23Ijp7ktmd39rawIA==", + "dev": true + }, "node_modules/rimraf": { "version": "3.0.2", "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", @@ -6568,6 +7937,41 @@ "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", "dev": true }, + "node_modules/rollup": { + "version": "4.18.0", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.18.0.tgz", + "integrity": "sha512-QmJz14PX3rzbJCN1SG4Xe/bAAX2a6NpCP8ab2vfu2GiUr8AQcr2nCV/oEO3yneFarB67zk8ShlIyWb2LGTb3Sg==", + "dev": true, + "dependencies": { + "@types/estree": "1.0.5" + }, + "bin": { + "rollup": "dist/bin/rollup" + }, + "engines": { + "node": ">=18.0.0", + "npm": ">=8.0.0" + }, + "optionalDependencies": { + "@rollup/rollup-android-arm-eabi": "4.18.0", + "@rollup/rollup-android-arm64": "4.18.0", + "@rollup/rollup-darwin-arm64": "4.18.0", + "@rollup/rollup-darwin-x64": "4.18.0", + "@rollup/rollup-linux-arm-gnueabihf": "4.18.0", + "@rollup/rollup-linux-arm-musleabihf": "4.18.0", + "@rollup/rollup-linux-arm64-gnu": "4.18.0", + "@rollup/rollup-linux-arm64-musl": "4.18.0", + "@rollup/rollup-linux-powerpc64le-gnu": "4.18.0", + "@rollup/rollup-linux-riscv64-gnu": "4.18.0", + "@rollup/rollup-linux-s390x-gnu": "4.18.0", + "@rollup/rollup-linux-x64-gnu": "4.18.0", + "@rollup/rollup-linux-x64-musl": "4.18.0", + "@rollup/rollup-win32-arm64-msvc": "4.18.0", + "@rollup/rollup-win32-ia32-msvc": "4.18.0", + "@rollup/rollup-win32-x64-msvc": "4.18.0", + "fsevents": "~2.3.2" + } + }, "node_modules/run-parallel": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", @@ -6621,6 +8025,13 @@ "url": "https://opencollective.com/webpack" } }, + "node_modules/search-insights": { + "version": "2.14.0", + "resolved": "https://registry.npmjs.org/search-insights/-/search-insights-2.14.0.tgz", + "integrity": "sha512-OLN6MsPMCghDOqlCtsIsYgtsC0pnwVTyT9Mu6A3ewOj1DxvzZF6COrn2g86E/c05xbktB0XN04m/t1Z+n+fTGw==", + "dev": true, + "peer": true + }, "node_modules/semver": { "version": "6.3.1", "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", @@ -6747,42 +8158,16 @@ "node": ">=8" } }, - "node_modules/shelljs": { - "version": "0.8.5", - "resolved": "https://registry.npmjs.org/shelljs/-/shelljs-0.8.5.tgz", - "integrity": "sha512-TiwcRcrkhHvbrZbnRcFYMLl30Dfov3HKqzp5tO5b4pt6G/SezKcYhmDg15zXVBswHmctSAQKznqNW2LO5tTDow==", - "dev": true, - "dependencies": { - "glob": "^7.0.0", - "interpret": "^1.0.0", - "rechoir": "^0.6.2" - }, - "bin": { - "shjs": "bin/shjs" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/shelljs/node_modules/interpret": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/interpret/-/interpret-1.4.0.tgz", - "integrity": "sha512-agE4QfB2Lkp9uICn7BAqoscw4SZP9kTE2hxiFI3jBPmXJfdqiahTbUuKGsMoN2GtqL9AxhYioAcVvgsb1HvRbA==", - "dev": true, - "engines": { - "node": ">= 0.10" - } - }, - "node_modules/shelljs/node_modules/rechoir": { - "version": "0.6.2", - "resolved": "https://registry.npmjs.org/rechoir/-/rechoir-0.6.2.tgz", - "integrity": "sha512-HFM8rkZ+i3zrV+4LQjwQ0W+ez98pApMGM3HUrN04j3CqzPOzl9nmP15Y8YXNm8QHGv/eacOVEjqhmWpkRV0NAw==", + "node_modules/shiki": { + "version": "0.14.7", + "resolved": "https://registry.npmjs.org/shiki/-/shiki-0.14.7.tgz", + "integrity": "sha512-dNPAPrxSc87ua2sKJ3H5dQ/6ZaY8RNnaAqK+t0eG7p0Soi2ydiqbGOTaZCqaYvA/uZYfS1LJnemt3Q+mSfcPCg==", "dev": true, "dependencies": { - "resolve": "^1.1.6" - }, - "engines": { - "node": ">= 0.10" + "ansi-sequence-parser": "^1.1.0", + "jsonc-parser": "^3.2.0", + "vscode-oniguruma": "^1.7.0", + "vscode-textmate": "^8.0.0" } }, "node_modules/side-channel": { @@ -6865,6 +8250,15 @@ "node": ">=0.10.0" } }, + "node_modules/source-map-js": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.0.tgz", + "integrity": "sha512-itJW8lvSA0TXEphiRoawsCksnlf8SyvmFzIhltqAHluXd88pkCd+cXJVHTDwdCr0IzwptSm035IHQktUu1QUMg==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/source-map-support": { "version": "0.5.21", "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.21.tgz", @@ -6875,6 +8269,15 @@ "source-map": "^0.6.0" } }, + "node_modules/speakingurl": { + "version": "14.0.1", + "resolved": "https://registry.npmjs.org/speakingurl/-/speakingurl-14.0.1.tgz", + "integrity": "sha512-1POYv7uv2gXoyGFpBCmpDVSNV74IfsWlDW216UPjbWufNf+bSU6GdbDsxdcxtfwb4xlI3yxzOTKClUosxARYrQ==", + "dev": true, + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/statuses": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.1.tgz", @@ -6937,6 +8340,18 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/superjson": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/superjson/-/superjson-2.2.1.tgz", + "integrity": "sha512-8iGv75BYOa0xRJHK5vRLEjE2H/i4lulTjzpUXic3Eg8akftYjkmQDa8JARQ42rlczXyFR3IeRoeFCc7RxHsYZA==", + "dev": true, + "dependencies": { + "copy-anything": "^3.0.2" + }, + "engines": { + "node": ">=16" + } + }, "node_modules/supports-color": { "version": "5.5.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", @@ -6961,6 +8376,12 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/tabbable": { + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/tabbable/-/tabbable-6.2.0.tgz", + "integrity": "sha512-Cat63mxsVJlzYvN51JmVXIgNoUokrIaT2zLclCXjRd8boZ0004U4KCs/sToJ75C6sdlByWxpYnb5Boif1VSFew==", + "dev": true + }, "node_modules/tapable": { "version": "1.1.3", "resolved": "https://registry.npmjs.org/tapable/-/tapable-1.1.3.tgz", @@ -7351,78 +8772,79 @@ } }, "node_modules/typedoc": { - "version": "0.19.2", - "resolved": "https://registry.npmjs.org/typedoc/-/typedoc-0.19.2.tgz", - "integrity": "sha512-oDEg1BLEzi1qvgdQXc658EYgJ5qJLVSeZ0hQ57Eq4JXy6Vj2VX4RVo18qYxRWz75ifAaYuYNBUCnbhjd37TfOg==", + "version": "0.25.13", + "resolved": "https://registry.npmjs.org/typedoc/-/typedoc-0.25.13.tgz", + "integrity": "sha512-pQqiwiJ+Z4pigfOnnysObszLiU3mVLWAExSPf+Mu06G/qsc3wzbuM56SZQvONhHLncLUhYzOVkjFFpFfL5AzhQ==", "dev": true, "dependencies": { - "fs-extra": "^9.0.1", - "handlebars": "^4.7.6", - "highlight.js": "^10.2.0", - "lodash": "^4.17.20", "lunr": "^2.3.9", - "marked": "^1.1.1", - "minimatch": "^3.0.0", - "progress": "^2.0.3", - "semver": "^7.3.2", - "shelljs": "^0.8.4", - "typedoc-default-themes": "^0.11.4" + "marked": "^4.3.0", + "minimatch": "^9.0.3", + "shiki": "^0.14.7" }, "bin": { "typedoc": "bin/typedoc" }, "engines": { - "node": ">= 10.0.0" + "node": ">= 16" }, "peerDependencies": { - "typescript": "3.9.x || 4.0.x" + "typescript": "4.6.x || 4.7.x || 4.8.x || 4.9.x || 5.0.x || 5.1.x || 5.2.x || 5.3.x || 5.4.x" } }, - "node_modules/typedoc-default-themes": { - "version": "0.11.4", - "resolved": "https://registry.npmjs.org/typedoc-default-themes/-/typedoc-default-themes-0.11.4.tgz", - "integrity": "sha512-Y4Lf+qIb9NTydrexlazAM46SSLrmrQRqWiD52593g53SsmUFioAsMWt8m834J6qsp+7wHRjxCXSZeiiW5cMUdw==", + "node_modules/typedoc-plugin-markdown": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/typedoc-plugin-markdown/-/typedoc-plugin-markdown-4.0.3.tgz", + "integrity": "sha512-0tZbeVGGCd4+lpoIX+yHWgUfyaLZCQCgJOpuVdTtOtD3+jKaedJ4sl/tkNaYBPeWVKiyDkSHfGuHkq53jlzIFg==", "dev": true, - "engines": { - "node": ">= 8" + "peerDependencies": { + "typedoc": "0.25.x" } }, - "node_modules/typedoc/node_modules/semver": { - "version": "7.6.2", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.2.tgz", - "integrity": "sha512-FNAIBWCx9qcRhoHcgcJ0gvU7SN1lYU2ZXuSfl04bSC5OpvDHFyJCjdNHomPXxjQlCBU67YW64PzY7/VIEH7F2w==", + "node_modules/typedoc-vitepress-theme": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/typedoc-vitepress-theme/-/typedoc-vitepress-theme-1.0.0.tgz", + "integrity": "sha512-tkPQBVvzukxMpHVIpTuOviyR6QJoSRhoYV0JcZX6NzAJU+CD8eEA+Xrc7a4UYPncL8oznzn8KaLsxQz7yVSvjg==", "dev": true, - "bin": { - "semver": "bin/semver.js" - }, - "engines": { - "node": ">=10" + "peerDependencies": { + "typedoc-plugin-markdown": ">=4.0.0" } }, - "node_modules/typescript": { - "version": "4.9.5", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.9.5.tgz", - "integrity": "sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g==", + "node_modules/typedoc/node_modules/brace-expansion": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", "dev": true, - "bin": { - "tsc": "bin/tsc", - "tsserver": "bin/tsserver" + "dependencies": { + "balanced-match": "^1.0.0" + } + }, + "node_modules/typedoc/node_modules/minimatch": { + "version": "9.0.4", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.4.tgz", + "integrity": "sha512-KqWh+VchfxcMNRAJjj2tnsSJdNbHsVgnkBhTNrW7AjVo6OvLtxw8zfT9oLw1JSohlFzJ8jCoTgaoXvJ+kHt6fw==", + "dev": true, + "dependencies": { + "brace-expansion": "^2.0.1" }, "engines": { - "node": ">=4.2.0" + "node": ">=16 || 14 >=14.17" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" } }, - "node_modules/uglify-js": { - "version": "3.18.0", - "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.18.0.tgz", - "integrity": "sha512-SyVVbcNBCk0dzr9XL/R/ySrmYf0s372K6/hFklzgcp2lBFyXtw4I7BOdDjlLhE1aVqaI/SHWXWmYdlZxuyF38A==", + "node_modules/typescript": { + "version": "5.4.5", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.4.5.tgz", + "integrity": "sha512-vcI4UpRgg81oIRUFwR0WSIHKt11nJ7SAVlYNIu+QpqeyXP+gpQJy/Z4+F0aGxSE4MqwjyXvW/TzgkLAx2AGHwQ==", "dev": true, - "optional": true, "bin": { - "uglifyjs": "bin/uglifyjs" + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" }, "engines": { - "node": ">=0.8.0" + "node": ">=14.17" } }, "node_modules/undici-types": { @@ -7470,15 +8892,6 @@ "node": ">=4" } }, - "node_modules/universalify": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.1.tgz", - "integrity": "sha512-gptHNQghINnc/vTGIk0SOFGFNXw7JVrlRUtConJRlvaw6DuX0wO5Jeko9sWrMBhh+PsYAZ7oXAiOnf/UKogyiw==", - "dev": true, - "engines": { - "node": ">= 10.0.0" - } - }, "node_modules/unpipe": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", @@ -7544,42 +8957,178 @@ "resolved": "https://registry.npmjs.org/utf-8-validate/-/utf-8-validate-5.0.9.tgz", "integrity": "sha512-Yek7dAy0v3Kl0orwMlvi7TPtiCNrdfHNd7Gcc/pLq4BLXqfAmd0J7OWMizUQnTTJsyjKn02mU7anqwfmUP4J8Q==", "dev": true, - "hasInstallScript": true, + "hasInstallScript": true, + "dependencies": { + "node-gyp-build": "^4.3.0" + }, + "engines": { + "node": ">=6.14.2" + } + }, + "node_modules/util-deprecate": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==", + "dev": true + }, + "node_modules/utils-merge": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz", + "integrity": "sha512-pMZTvIkT1d+TFGvDOqodOclx0QWkkgi6Tdoa8gC8ffGAAqz9pzPTZWAybbsHHoED/ztMtkv/VoYTYyShUn81hA==", + "dev": true, + "engines": { + "node": ">= 0.4.0" + } + }, + "node_modules/v8-compile-cache-lib": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/v8-compile-cache-lib/-/v8-compile-cache-lib-3.0.1.tgz", + "integrity": "sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg==", + "dev": true + }, + "node_modules/vary": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz", + "integrity": "sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg==", + "dev": true, + "engines": { + "node": ">= 0.8" + } + }, + "node_modules/vite": { + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/vite/-/vite-5.3.1.tgz", + "integrity": "sha512-XBmSKRLXLxiaPYamLv3/hnP/KXDai1NDexN0FpkTaZXTfycHvkRHoenpgl/fvuK/kPbB6xAgoyiryAhQNxYmAQ==", + "dev": true, + "dependencies": { + "esbuild": "^0.21.3", + "postcss": "^8.4.38", + "rollup": "^4.13.0" + }, + "bin": { + "vite": "bin/vite.js" + }, + "engines": { + "node": "^18.0.0 || >=20.0.0" + }, + "funding": { + "url": "https://github.com/vitejs/vite?sponsor=1" + }, + "optionalDependencies": { + "fsevents": "~2.3.3" + }, + "peerDependencies": { + "@types/node": "^18.0.0 || >=20.0.0", + "less": "*", + "lightningcss": "^1.21.0", + "sass": "*", + "stylus": "*", + "sugarss": "*", + "terser": "^5.4.0" + }, + "peerDependenciesMeta": { + "@types/node": { + "optional": true + }, + "less": { + "optional": true + }, + "lightningcss": { + "optional": true + }, + "sass": { + "optional": true + }, + "stylus": { + "optional": true + }, + "sugarss": { + "optional": true + }, + "terser": { + "optional": true + } + } + }, + "node_modules/vitepress": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/vitepress/-/vitepress-1.2.3.tgz", + "integrity": "sha512-GvEsrEeNLiDE1+fuwDAYJCYLNZDAna+EtnXlPajhv/MYeTjbNK6Bvyg6NoTdO1sbwuQJ0vuJR99bOlH53bo6lg==", + "dev": true, + "dependencies": { + "@docsearch/css": "^3.6.0", + "@docsearch/js": "^3.6.0", + "@shikijs/core": "^1.6.2", + "@shikijs/transformers": "^1.6.2", + "@types/markdown-it": "^14.1.1", + "@vitejs/plugin-vue": "^5.0.5", + "@vue/devtools-api": "^7.2.1", + "@vue/shared": "^3.4.27", + "@vueuse/core": "^10.10.0", + "@vueuse/integrations": "^10.10.0", + "focus-trap": "^7.5.4", + "mark.js": "8.11.1", + "minisearch": "^6.3.0", + "shiki": "^1.6.2", + "vite": "^5.2.12", + "vue": "^3.4.27" + }, + "bin": { + "vitepress": "bin/vitepress.js" + }, + "peerDependencies": { + "markdown-it-mathjax3": "^4", + "postcss": "^8" + }, + "peerDependenciesMeta": { + "markdown-it-mathjax3": { + "optional": true + }, + "postcss": { + "optional": true + } + } + }, + "node_modules/vitepress/node_modules/shiki": { + "version": "1.6.5", + "resolved": "https://registry.npmjs.org/shiki/-/shiki-1.6.5.tgz", + "integrity": "sha512-iFzypldJG0zeyRHKAhaSGCf+YWXpMMyUyOrCVFBFKGGdF5vrB6jbd66/SQljxV20aSrVZEAQwUto/hhuNi/CIg==", + "dev": true, "dependencies": { - "node-gyp-build": "^4.3.0" - }, - "engines": { - "node": ">=6.14.2" + "@shikijs/core": "1.6.5" } }, - "node_modules/util-deprecate": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", - "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==", + "node_modules/vscode-oniguruma": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/vscode-oniguruma/-/vscode-oniguruma-1.7.0.tgz", + "integrity": "sha512-L9WMGRfrjOhgHSdOYgCt/yRMsXzLDJSL7BPrOZt73gU0iWO4mpqzqQzOz5srxqTvMBaR0XZTSrVWo4j55Rc6cA==", "dev": true }, - "node_modules/utils-merge": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz", - "integrity": "sha512-pMZTvIkT1d+TFGvDOqodOclx0QWkkgi6Tdoa8gC8ffGAAqz9pzPTZWAybbsHHoED/ztMtkv/VoYTYyShUn81hA==", - "dev": true, - "engines": { - "node": ">= 0.4.0" - } - }, - "node_modules/v8-compile-cache-lib": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/v8-compile-cache-lib/-/v8-compile-cache-lib-3.0.1.tgz", - "integrity": "sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg==", + "node_modules/vscode-textmate": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/vscode-textmate/-/vscode-textmate-8.0.0.tgz", + "integrity": "sha512-AFbieoL7a5LMqcnOF04ji+rpXadgOXnZsxQr//r83kLPr7biP7am3g9zbaZIaBGwBRWeSvoMD4mgPdX3e4NWBg==", "dev": true }, - "node_modules/vary": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz", - "integrity": "sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg==", + "node_modules/vue": { + "version": "3.4.29", + "resolved": "https://registry.npmjs.org/vue/-/vue-3.4.29.tgz", + "integrity": "sha512-8QUYfRcYzNlYuzKPfge1UWC6nF9ym0lx7mpGVPJYNhddxEf3DD0+kU07NTL0sXuiT2HuJuKr/iEO8WvXvT0RSQ==", "dev": true, - "engines": { - "node": ">= 0.8" + "dependencies": { + "@vue/compiler-dom": "3.4.29", + "@vue/compiler-sfc": "3.4.29", + "@vue/runtime-dom": "3.4.29", + "@vue/server-renderer": "3.4.29", + "@vue/shared": "3.4.29" + }, + "peerDependencies": { + "typescript": "*" + }, + "peerDependenciesMeta": { + "typescript": { + "optional": true + } } }, "node_modules/walk": { @@ -7860,12 +9409,6 @@ "node": ">=0.10.0" } }, - "node_modules/wordwrap": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-1.0.0.tgz", - "integrity": "sha512-gvVzJFlPycKc5dZN4yPkP8w7Dc37BtP1yczEneOb4uq34pXZcvrtRTmWV8W+Ume+XCxKgbjM+nevkyFPMybd4Q==", - "dev": true - }, "node_modules/workerpool": { "version": "6.2.1", "resolved": "https://registry.npmjs.org/workerpool/-/workerpool-6.2.1.tgz", @@ -8019,6 +9562,189 @@ } }, "dependencies": { + "@algolia/autocomplete-core": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/@algolia/autocomplete-core/-/autocomplete-core-1.9.3.tgz", + "integrity": "sha512-009HdfugtGCdC4JdXUbVJClA0q0zh24yyePn+KUGk3rP7j8FEe/m5Yo/z65gn6nP/cM39PxpzqKrL7A6fP6PPw==", + "dev": true, + "requires": { + "@algolia/autocomplete-plugin-algolia-insights": "1.9.3", + "@algolia/autocomplete-shared": "1.9.3" + } + }, + "@algolia/autocomplete-plugin-algolia-insights": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/@algolia/autocomplete-plugin-algolia-insights/-/autocomplete-plugin-algolia-insights-1.9.3.tgz", + "integrity": "sha512-a/yTUkcO/Vyy+JffmAnTWbr4/90cLzw+CC3bRbhnULr/EM0fGNvM13oQQ14f2moLMcVDyAx/leczLlAOovhSZg==", + "dev": true, + "requires": { + "@algolia/autocomplete-shared": "1.9.3" + } + }, + "@algolia/autocomplete-preset-algolia": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/@algolia/autocomplete-preset-algolia/-/autocomplete-preset-algolia-1.9.3.tgz", + "integrity": "sha512-d4qlt6YmrLMYy95n5TB52wtNDr6EgAIPH81dvvvW8UmuWRgxEtY0NJiPwl/h95JtG2vmRM804M0DSwMCNZlzRA==", + "dev": true, + "requires": { + "@algolia/autocomplete-shared": "1.9.3" + } + }, + "@algolia/autocomplete-shared": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/@algolia/autocomplete-shared/-/autocomplete-shared-1.9.3.tgz", + "integrity": "sha512-Wnm9E4Ye6Rl6sTTqjoymD+l8DjSTHsHboVRYrKgEt8Q7UHm9nYbqhN/i0fhUYA3OAEH7WA8x3jfpnmJm3rKvaQ==", + "dev": true, + "requires": {} + }, + "@algolia/cache-browser-local-storage": { + "version": "4.23.3", + "resolved": "https://registry.npmjs.org/@algolia/cache-browser-local-storage/-/cache-browser-local-storage-4.23.3.tgz", + "integrity": "sha512-vRHXYCpPlTDE7i6UOy2xE03zHF2C8MEFjPN2v7fRbqVpcOvAUQK81x3Kc21xyb5aSIpYCjWCZbYZuz8Glyzyyg==", + "dev": true, + "requires": { + "@algolia/cache-common": "4.23.3" + } + }, + "@algolia/cache-common": { + "version": "4.23.3", + "resolved": "https://registry.npmjs.org/@algolia/cache-common/-/cache-common-4.23.3.tgz", + "integrity": "sha512-h9XcNI6lxYStaw32pHpB1TMm0RuxphF+Ik4o7tcQiodEdpKK+wKufY6QXtba7t3k8eseirEMVB83uFFF3Nu54A==", + "dev": true + }, + "@algolia/cache-in-memory": { + "version": "4.23.3", + "resolved": "https://registry.npmjs.org/@algolia/cache-in-memory/-/cache-in-memory-4.23.3.tgz", + "integrity": "sha512-yvpbuUXg/+0rbcagxNT7un0eo3czx2Uf0y4eiR4z4SD7SiptwYTpbuS0IHxcLHG3lq22ukx1T6Kjtk/rT+mqNg==", + "dev": true, + "requires": { + "@algolia/cache-common": "4.23.3" + } + }, + "@algolia/client-account": { + "version": "4.23.3", + "resolved": "https://registry.npmjs.org/@algolia/client-account/-/client-account-4.23.3.tgz", + "integrity": "sha512-hpa6S5d7iQmretHHF40QGq6hz0anWEHGlULcTIT9tbUssWUriN9AUXIFQ8Ei4w9azD0hc1rUok9/DeQQobhQMA==", + "dev": true, + "requires": { + "@algolia/client-common": "4.23.3", + "@algolia/client-search": "4.23.3", + "@algolia/transporter": "4.23.3" + } + }, + "@algolia/client-analytics": { + "version": "4.23.3", + "resolved": "https://registry.npmjs.org/@algolia/client-analytics/-/client-analytics-4.23.3.tgz", + "integrity": "sha512-LBsEARGS9cj8VkTAVEZphjxTjMVCci+zIIiRhpFun9jGDUlS1XmhCW7CTrnaWeIuCQS/2iPyRqSy1nXPjcBLRA==", + "dev": true, + "requires": { + "@algolia/client-common": "4.23.3", + "@algolia/client-search": "4.23.3", + "@algolia/requester-common": "4.23.3", + "@algolia/transporter": "4.23.3" + } + }, + "@algolia/client-common": { + "version": "4.23.3", + "resolved": "https://registry.npmjs.org/@algolia/client-common/-/client-common-4.23.3.tgz", + "integrity": "sha512-l6EiPxdAlg8CYhroqS5ybfIczsGUIAC47slLPOMDeKSVXYG1n0qGiz4RjAHLw2aD0xzh2EXZ7aRguPfz7UKDKw==", + "dev": true, + "requires": { + "@algolia/requester-common": "4.23.3", + "@algolia/transporter": "4.23.3" + } + }, + "@algolia/client-personalization": { + "version": "4.23.3", + "resolved": "https://registry.npmjs.org/@algolia/client-personalization/-/client-personalization-4.23.3.tgz", + "integrity": "sha512-3E3yF3Ocr1tB/xOZiuC3doHQBQ2zu2MPTYZ0d4lpfWads2WTKG7ZzmGnsHmm63RflvDeLK/UVx7j2b3QuwKQ2g==", + "dev": true, + "requires": { + "@algolia/client-common": "4.23.3", + "@algolia/requester-common": "4.23.3", + "@algolia/transporter": "4.23.3" + } + }, + "@algolia/client-search": { + "version": "4.23.3", + "resolved": "https://registry.npmjs.org/@algolia/client-search/-/client-search-4.23.3.tgz", + "integrity": "sha512-P4VAKFHqU0wx9O+q29Q8YVuaowaZ5EM77rxfmGnkHUJggh28useXQdopokgwMeYw2XUht49WX5RcTQ40rZIabw==", + "dev": true, + "requires": { + "@algolia/client-common": "4.23.3", + "@algolia/requester-common": "4.23.3", + "@algolia/transporter": "4.23.3" + } + }, + "@algolia/logger-common": { + "version": "4.23.3", + "resolved": "https://registry.npmjs.org/@algolia/logger-common/-/logger-common-4.23.3.tgz", + "integrity": "sha512-y9kBtmJwiZ9ZZ+1Ek66P0M68mHQzKRxkW5kAAXYN/rdzgDN0d2COsViEFufxJ0pb45K4FRcfC7+33YB4BLrZ+g==", + "dev": true + }, + "@algolia/logger-console": { + "version": "4.23.3", + "resolved": "https://registry.npmjs.org/@algolia/logger-console/-/logger-console-4.23.3.tgz", + "integrity": "sha512-8xoiseoWDKuCVnWP8jHthgaeobDLolh00KJAdMe9XPrWPuf1by732jSpgy2BlsLTaT9m32pHI8CRfrOqQzHv3A==", + "dev": true, + "requires": { + "@algolia/logger-common": "4.23.3" + } + }, + "@algolia/recommend": { + "version": "4.23.3", + "resolved": "https://registry.npmjs.org/@algolia/recommend/-/recommend-4.23.3.tgz", + "integrity": "sha512-9fK4nXZF0bFkdcLBRDexsnGzVmu4TSYZqxdpgBW2tEyfuSSY54D4qSRkLmNkrrz4YFvdh2GM1gA8vSsnZPR73w==", + "dev": true, + "requires": { + "@algolia/cache-browser-local-storage": "4.23.3", + "@algolia/cache-common": "4.23.3", + "@algolia/cache-in-memory": "4.23.3", + "@algolia/client-common": "4.23.3", + "@algolia/client-search": "4.23.3", + "@algolia/logger-common": "4.23.3", + "@algolia/logger-console": "4.23.3", + "@algolia/requester-browser-xhr": "4.23.3", + "@algolia/requester-common": "4.23.3", + "@algolia/requester-node-http": "4.23.3", + "@algolia/transporter": "4.23.3" + } + }, + "@algolia/requester-browser-xhr": { + "version": "4.23.3", + "resolved": "https://registry.npmjs.org/@algolia/requester-browser-xhr/-/requester-browser-xhr-4.23.3.tgz", + "integrity": "sha512-jDWGIQ96BhXbmONAQsasIpTYWslyjkiGu0Quydjlowe+ciqySpiDUrJHERIRfELE5+wFc7hc1Q5hqjGoV7yghw==", + "dev": true, + "requires": { + "@algolia/requester-common": "4.23.3" + } + }, + "@algolia/requester-common": { + "version": "4.23.3", + "resolved": "https://registry.npmjs.org/@algolia/requester-common/-/requester-common-4.23.3.tgz", + "integrity": "sha512-xloIdr/bedtYEGcXCiF2muajyvRhwop4cMZo+K2qzNht0CMzlRkm8YsDdj5IaBhshqfgmBb3rTg4sL4/PpvLYw==", + "dev": true + }, + "@algolia/requester-node-http": { + "version": "4.23.3", + "resolved": "https://registry.npmjs.org/@algolia/requester-node-http/-/requester-node-http-4.23.3.tgz", + "integrity": "sha512-zgu++8Uj03IWDEJM3fuNl34s746JnZOWn1Uz5taV1dFyJhVM/kTNw9Ik7YJWiUNHJQXcaD8IXD1eCb0nq/aByA==", + "dev": true, + "requires": { + "@algolia/requester-common": "4.23.3" + } + }, + "@algolia/transporter": { + "version": "4.23.3", + "resolved": "https://registry.npmjs.org/@algolia/transporter/-/transporter-4.23.3.tgz", + "integrity": "sha512-Wjl5gttqnf/gQKJA+dafnD0Y6Yw97yvfY8R9h0dQltX1GXTgNs1zWgvtWW0tHl1EgMdhAyw189uWiZMnL3QebQ==", + "dev": true, + "requires": { + "@algolia/cache-common": "4.23.3", + "@algolia/logger-common": "4.23.3", + "@algolia/requester-common": "4.23.3" + } + }, "@ampproject/remapping": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.2.0.tgz", @@ -8351,9 +10077,9 @@ } }, "@babel/parser": { - "version": "7.23.0", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.23.0.tgz", - "integrity": "sha512-vvPKKdMemU85V9WE/l5wZEmImpCtLqbnTvqDS2U1fJ96KrxoW7KrXhNsNCblQlg8Ck4b85yxdTyelsMUgFUXiw==", + "version": "7.24.7", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.24.7.tgz", + "integrity": "sha512-9uUYRm6OqQrCqQdG1iCBwBPZgN8ciDBro2nIOFaiRz1/BCxaI7CNvQbDHvsArAC7Tw9Hda/B3U+6ui9u4HWXPw==", "dev": true }, "@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression": { @@ -9167,6 +10893,195 @@ "integrity": "sha512-dBVuXR082gk3jsFp7Rd/JI4kytwGHecnCoTtXFb7DB6CNHp4rg5k1bhg0nWdLGLnOV71lmDzGQaLMy8iPLY0pw==", "dev": true }, + "@docsearch/css": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/@docsearch/css/-/css-3.6.0.tgz", + "integrity": "sha512-+sbxb71sWre+PwDK7X2T8+bhS6clcVMLwBPznX45Qu6opJcgRjAp7gYSDzVFp187J+feSj5dNBN1mJoi6ckkUQ==", + "dev": true + }, + "@docsearch/js": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/@docsearch/js/-/js-3.6.0.tgz", + "integrity": "sha512-QujhqINEElrkIfKwyyyTfbsfMAYCkylInLYMRqHy7PHc8xTBQCow73tlo/Kc7oIwBrCLf0P3YhjlOeV4v8hevQ==", + "dev": true, + "requires": { + "@docsearch/react": "3.6.0", + "preact": "^10.0.0" + } + }, + "@docsearch/react": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/@docsearch/react/-/react-3.6.0.tgz", + "integrity": "sha512-HUFut4ztcVNmqy9gp/wxNbC7pTOHhgVVkHVGCACTuLhUKUhKAF9KYHJtMiLUJxEqiFLQiuri1fWF8zqwM/cu1w==", + "dev": true, + "requires": { + "@algolia/autocomplete-core": "1.9.3", + "@algolia/autocomplete-preset-algolia": "1.9.3", + "@docsearch/css": "3.6.0", + "algoliasearch": "^4.19.1" + } + }, + "@esbuild/aix-ppc64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.21.5.tgz", + "integrity": "sha512-1SDgH6ZSPTlggy1yI6+Dbkiz8xzpHJEVAlF/AM1tHPLsf5STom9rwtjE4hKAF20FfXXNTFqEYXyJNWh1GiZedQ==", + "dev": true, + "optional": true + }, + "@esbuild/android-arm": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.21.5.tgz", + "integrity": "sha512-vCPvzSjpPHEi1siZdlvAlsPxXl7WbOVUBBAowWug4rJHb68Ox8KualB+1ocNvT5fjv6wpkX6o/iEpbDrf68zcg==", + "dev": true, + "optional": true + }, + "@esbuild/android-arm64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.21.5.tgz", + "integrity": "sha512-c0uX9VAUBQ7dTDCjq+wdyGLowMdtR/GoC2U5IYk/7D1H1JYC0qseD7+11iMP2mRLN9RcCMRcjC4YMclCzGwS/A==", + "dev": true, + "optional": true + }, + "@esbuild/android-x64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.21.5.tgz", + "integrity": "sha512-D7aPRUUNHRBwHxzxRvp856rjUHRFW1SdQATKXH2hqA0kAZb1hKmi02OpYRacl0TxIGz/ZmXWlbZgjwWYaCakTA==", + "dev": true, + "optional": true + }, + "@esbuild/darwin-arm64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.21.5.tgz", + "integrity": "sha512-DwqXqZyuk5AiWWf3UfLiRDJ5EDd49zg6O9wclZ7kUMv2WRFr4HKjXp/5t8JZ11QbQfUS6/cRCKGwYhtNAY88kQ==", + "dev": true, + "optional": true + }, + "@esbuild/darwin-x64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.21.5.tgz", + "integrity": "sha512-se/JjF8NlmKVG4kNIuyWMV/22ZaerB+qaSi5MdrXtd6R08kvs2qCN4C09miupktDitvh8jRFflwGFBQcxZRjbw==", + "dev": true, + "optional": true + }, + "@esbuild/freebsd-arm64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.21.5.tgz", + "integrity": "sha512-5JcRxxRDUJLX8JXp/wcBCy3pENnCgBR9bN6JsY4OmhfUtIHe3ZW0mawA7+RDAcMLrMIZaf03NlQiX9DGyB8h4g==", + "dev": true, + "optional": true + }, + "@esbuild/freebsd-x64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.21.5.tgz", + "integrity": "sha512-J95kNBj1zkbMXtHVH29bBriQygMXqoVQOQYA+ISs0/2l3T9/kj42ow2mpqerRBxDJnmkUDCaQT/dfNXWX/ZZCQ==", + "dev": true, + "optional": true + }, + "@esbuild/linux-arm": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.21.5.tgz", + "integrity": "sha512-bPb5AHZtbeNGjCKVZ9UGqGwo8EUu4cLq68E95A53KlxAPRmUyYv2D6F0uUI65XisGOL1hBP5mTronbgo+0bFcA==", + "dev": true, + "optional": true + }, + "@esbuild/linux-arm64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.21.5.tgz", + "integrity": "sha512-ibKvmyYzKsBeX8d8I7MH/TMfWDXBF3db4qM6sy+7re0YXya+K1cem3on9XgdT2EQGMu4hQyZhan7TeQ8XkGp4Q==", + "dev": true, + "optional": true + }, + "@esbuild/linux-ia32": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.21.5.tgz", + "integrity": "sha512-YvjXDqLRqPDl2dvRODYmmhz4rPeVKYvppfGYKSNGdyZkA01046pLWyRKKI3ax8fbJoK5QbxblURkwK/MWY18Tg==", + "dev": true, + "optional": true + }, + "@esbuild/linux-loong64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.21.5.tgz", + "integrity": "sha512-uHf1BmMG8qEvzdrzAqg2SIG/02+4/DHB6a9Kbya0XDvwDEKCoC8ZRWI5JJvNdUjtciBGFQ5PuBlpEOXQj+JQSg==", + "dev": true, + "optional": true + }, + "@esbuild/linux-mips64el": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.21.5.tgz", + "integrity": "sha512-IajOmO+KJK23bj52dFSNCMsz1QP1DqM6cwLUv3W1QwyxkyIWecfafnI555fvSGqEKwjMXVLokcV5ygHW5b3Jbg==", + "dev": true, + "optional": true + }, + "@esbuild/linux-ppc64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.21.5.tgz", + "integrity": "sha512-1hHV/Z4OEfMwpLO8rp7CvlhBDnjsC3CttJXIhBi+5Aj5r+MBvy4egg7wCbe//hSsT+RvDAG7s81tAvpL2XAE4w==", + "dev": true, + "optional": true + }, + "@esbuild/linux-riscv64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.21.5.tgz", + "integrity": "sha512-2HdXDMd9GMgTGrPWnJzP2ALSokE/0O5HhTUvWIbD3YdjME8JwvSCnNGBnTThKGEB91OZhzrJ4qIIxk/SBmyDDA==", + "dev": true, + "optional": true + }, + "@esbuild/linux-s390x": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.21.5.tgz", + "integrity": "sha512-zus5sxzqBJD3eXxwvjN1yQkRepANgxE9lgOW2qLnmr8ikMTphkjgXu1HR01K4FJg8h1kEEDAqDcZQtbrRnB41A==", + "dev": true, + "optional": true + }, + "@esbuild/linux-x64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.21.5.tgz", + "integrity": "sha512-1rYdTpyv03iycF1+BhzrzQJCdOuAOtaqHTWJZCWvijKD2N5Xu0TtVC8/+1faWqcP9iBCWOmjmhoH94dH82BxPQ==", + "dev": true, + "optional": true + }, + "@esbuild/netbsd-x64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.21.5.tgz", + "integrity": "sha512-Woi2MXzXjMULccIwMnLciyZH4nCIMpWQAs049KEeMvOcNADVxo0UBIQPfSmxB3CWKedngg7sWZdLvLczpe0tLg==", + "dev": true, + "optional": true + }, + "@esbuild/openbsd-x64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.21.5.tgz", + "integrity": "sha512-HLNNw99xsvx12lFBUwoT8EVCsSvRNDVxNpjZ7bPn947b8gJPzeHWyNVhFsaerc0n3TsbOINvRP2byTZ5LKezow==", + "dev": true, + "optional": true + }, + "@esbuild/sunos-x64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.21.5.tgz", + "integrity": "sha512-6+gjmFpfy0BHU5Tpptkuh8+uw3mnrvgs+dSPQXQOv3ekbordwnzTVEb4qnIvQcYXq6gzkyTnoZ9dZG+D4garKg==", + "dev": true, + "optional": true + }, + "@esbuild/win32-arm64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.21.5.tgz", + "integrity": "sha512-Z0gOTd75VvXqyq7nsl93zwahcTROgqvuAcYDUr+vOv8uHhNSKROyU961kgtCD1e95IqPKSQKH7tBTslnS3tA8A==", + "dev": true, + "optional": true + }, + "@esbuild/win32-ia32": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.21.5.tgz", + "integrity": "sha512-SWXFF1CL2RVNMaVs+BBClwtfZSvDgtL//G/smwAc5oVK/UPu2Gu9tIaRgFmYFFKrmg3SyAjSrElf0TiJ1v8fYA==", + "dev": true, + "optional": true + }, + "@esbuild/win32-x64": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.21.5.tgz", + "integrity": "sha512-tQd/1efJuzPC6rCFwEvLtci/xNFcTZknmXs98FYDfGE4wP9ClFV98nyKrzJKVPMhdDnjzLhdUyMX4PsQAPjwIw==", + "dev": true, + "optional": true + }, "@eslint/eslintrc": { "version": "1.3.2", "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-1.3.2.tgz", @@ -9270,9 +11185,9 @@ } }, "@jridgewell/sourcemap-codec": { - "version": "1.4.14", - "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.14.tgz", - "integrity": "sha512-XPSJHWmi394fuUuzDnGz1wiKqWfo1yXecHQMRf2l6hztTO+nPru658AyDngaBe7isIxEkRsPR3FZh+s7iVa4Uw==", + "version": "1.4.15", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz", + "integrity": "sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==", "dev": true }, "@jridgewell/trace-mapping": { @@ -9301,14 +11216,152 @@ "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==", "dev": true }, - "@nodelib/fs.walk": { - "version": "1.2.8", - "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz", - "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", + "@nodelib/fs.walk": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz", + "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==", + "dev": true, + "requires": { + "@nodelib/fs.scandir": "2.1.5", + "fastq": "^1.6.0" + } + }, + "@rollup/rollup-android-arm-eabi": { + "version": "4.18.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.18.0.tgz", + "integrity": "sha512-Tya6xypR10giZV1XzxmH5wr25VcZSncG0pZIjfePT0OVBvqNEurzValetGNarVrGiq66EBVAFn15iYX4w6FKgQ==", + "dev": true, + "optional": true + }, + "@rollup/rollup-android-arm64": { + "version": "4.18.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.18.0.tgz", + "integrity": "sha512-avCea0RAP03lTsDhEyfy+hpfr85KfyTctMADqHVhLAF3MlIkq83CP8UfAHUssgXTYd+6er6PaAhx/QGv4L1EiA==", + "dev": true, + "optional": true + }, + "@rollup/rollup-darwin-arm64": { + "version": "4.18.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.18.0.tgz", + "integrity": "sha512-IWfdwU7KDSm07Ty0PuA/W2JYoZ4iTj3TUQjkVsO/6U+4I1jN5lcR71ZEvRh52sDOERdnNhhHU57UITXz5jC1/w==", + "dev": true, + "optional": true + }, + "@rollup/rollup-darwin-x64": { + "version": "4.18.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.18.0.tgz", + "integrity": "sha512-n2LMsUz7Ynu7DoQrSQkBf8iNrjOGyPLrdSg802vk6XT3FtsgX6JbE8IHRvposskFm9SNxzkLYGSq9QdpLYpRNA==", + "dev": true, + "optional": true + }, + "@rollup/rollup-linux-arm-gnueabihf": { + "version": "4.18.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.18.0.tgz", + "integrity": "sha512-C/zbRYRXFjWvz9Z4haRxcTdnkPt1BtCkz+7RtBSuNmKzMzp3ZxdM28Mpccn6pt28/UWUCTXa+b0Mx1k3g6NOMA==", + "dev": true, + "optional": true + }, + "@rollup/rollup-linux-arm-musleabihf": { + "version": "4.18.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.18.0.tgz", + "integrity": "sha512-l3m9ewPgjQSXrUMHg93vt0hYCGnrMOcUpTz6FLtbwljo2HluS4zTXFy2571YQbisTnfTKPZ01u/ukJdQTLGh9A==", + "dev": true, + "optional": true + }, + "@rollup/rollup-linux-arm64-gnu": { + "version": "4.18.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.18.0.tgz", + "integrity": "sha512-rJ5D47d8WD7J+7STKdCUAgmQk49xuFrRi9pZkWoRD1UeSMakbcepWXPF8ycChBoAqs1pb2wzvbY6Q33WmN2ftw==", + "dev": true, + "optional": true + }, + "@rollup/rollup-linux-arm64-musl": { + "version": "4.18.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.18.0.tgz", + "integrity": "sha512-be6Yx37b24ZwxQ+wOQXXLZqpq4jTckJhtGlWGZs68TgdKXJgw54lUUoFYrg6Zs/kjzAQwEwYbp8JxZVzZLRepQ==", + "dev": true, + "optional": true + }, + "@rollup/rollup-linux-powerpc64le-gnu": { + "version": "4.18.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-powerpc64le-gnu/-/rollup-linux-powerpc64le-gnu-4.18.0.tgz", + "integrity": "sha512-hNVMQK+qrA9Todu9+wqrXOHxFiD5YmdEi3paj6vP02Kx1hjd2LLYR2eaN7DsEshg09+9uzWi2W18MJDlG0cxJA==", + "dev": true, + "optional": true + }, + "@rollup/rollup-linux-riscv64-gnu": { + "version": "4.18.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.18.0.tgz", + "integrity": "sha512-ROCM7i+m1NfdrsmvwSzoxp9HFtmKGHEqu5NNDiZWQtXLA8S5HBCkVvKAxJ8U+CVctHwV2Gb5VUaK7UAkzhDjlg==", + "dev": true, + "optional": true + }, + "@rollup/rollup-linux-s390x-gnu": { + "version": "4.18.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.18.0.tgz", + "integrity": "sha512-0UyyRHyDN42QL+NbqevXIIUnKA47A+45WyasO+y2bGJ1mhQrfrtXUpTxCOrfxCR4esV3/RLYyucGVPiUsO8xjg==", + "dev": true, + "optional": true + }, + "@rollup/rollup-linux-x64-gnu": { + "version": "4.18.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.18.0.tgz", + "integrity": "sha512-xuglR2rBVHA5UsI8h8UbX4VJ470PtGCf5Vpswh7p2ukaqBGFTnsfzxUBetoWBWymHMxbIG0Cmx7Y9qDZzr648w==", + "dev": true, + "optional": true + }, + "@rollup/rollup-linux-x64-musl": { + "version": "4.18.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.18.0.tgz", + "integrity": "sha512-LKaqQL9osY/ir2geuLVvRRs+utWUNilzdE90TpyoX0eNqPzWjRm14oMEE+YLve4k/NAqCdPkGYDaDF5Sw+xBfg==", + "dev": true, + "optional": true + }, + "@rollup/rollup-win32-arm64-msvc": { + "version": "4.18.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.18.0.tgz", + "integrity": "sha512-7J6TkZQFGo9qBKH0pk2cEVSRhJbL6MtfWxth7Y5YmZs57Pi+4x6c2dStAUvaQkHQLnEQv1jzBUW43GvZW8OFqA==", + "dev": true, + "optional": true + }, + "@rollup/rollup-win32-ia32-msvc": { + "version": "4.18.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.18.0.tgz", + "integrity": "sha512-Txjh+IxBPbkUB9+SXZMpv+b/vnTEtFyfWZgJ6iyCmt2tdx0OF5WhFowLmnh8ENGNpfUlUZkdI//4IEmhwPieNg==", + "dev": true, + "optional": true + }, + "@rollup/rollup-win32-x64-msvc": { + "version": "4.18.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.18.0.tgz", + "integrity": "sha512-UOo5FdvOL0+eIVTgS4tIdbW+TtnBLWg1YBCcU2KWM7nuNwRz9bksDX1bekJJCpu25N1DVWaCwnT39dVQxzqS8g==", + "dev": true, + "optional": true + }, + "@shikijs/core": { + "version": "1.6.5", + "resolved": "https://registry.npmjs.org/@shikijs/core/-/core-1.6.5.tgz", + "integrity": "sha512-XcQYt6e4L61ruAxHiL3Xg1DL/XkWWjzDdeckB/DtN8jAxoAU+bcxsV6DetC8NafHpL4YpGhxy9iXF0ND/u6HmA==", + "dev": true + }, + "@shikijs/transformers": { + "version": "1.6.5", + "resolved": "https://registry.npmjs.org/@shikijs/transformers/-/transformers-1.6.5.tgz", + "integrity": "sha512-iuKa1uQtPQEe5vgCsXIb162b/3imRiAIdoF5IqafrTWL1uqZUpipfPjWZPuAAszOzYU//yIYRbhUk8reHVXA/w==", "dev": true, "requires": { - "@nodelib/fs.scandir": "2.1.5", - "fastq": "^1.6.0" + "shiki": "1.6.5" + }, + "dependencies": { + "shiki": { + "version": "1.6.5", + "resolved": "https://registry.npmjs.org/shiki/-/shiki-1.6.5.tgz", + "integrity": "sha512-iFzypldJG0zeyRHKAhaSGCf+YWXpMMyUyOrCVFBFKGGdF5vrB6jbd66/SQljxV20aSrVZEAQwUto/hhuNi/CIg==", + "dev": true, + "requires": { + "@shikijs/core": "1.6.5" + } + } } }, "@sinonjs/commons": { @@ -9417,6 +11470,28 @@ "integrity": "sha512-wOuvG1SN4Us4rez+tylwwwCV1psiNVOkJeM3AUWUNWg/jDQY2+HE/444y5gc+jBmRqASOm2Oeh5c1axHobwRKQ==", "dev": true }, + "@types/linkify-it": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/@types/linkify-it/-/linkify-it-5.0.0.tgz", + "integrity": "sha512-sVDA58zAw4eWAffKOaQH5/5j3XeayukzDk+ewSsnv3p4yJEZHCCzMDiZM8e0OUrRvmpGZ85jf4yDHkHsgBNr9Q==", + "dev": true + }, + "@types/markdown-it": { + "version": "14.1.1", + "resolved": "https://registry.npmjs.org/@types/markdown-it/-/markdown-it-14.1.1.tgz", + "integrity": "sha512-4NpsnpYl2Gt1ljyBGrKMxFYAYvpqbnnkgP/i/g+NLpjEUa3obn1XJCur9YbEXKDAkaXqsR1LbDnGEJ0MmKFxfg==", + "dev": true, + "requires": { + "@types/linkify-it": "^5", + "@types/mdurl": "^2" + } + }, + "@types/mdurl": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/@types/mdurl/-/mdurl-2.0.0.tgz", + "integrity": "sha512-RGdgjQUZba5p6QEFAVx2OGb8rQDL/cPRG7GiedRzMcJ1tYnUANBncjbSB1NRGwbvjcPeikRABz2nshyPk1bhWg==", + "dev": true + }, "@types/mocha": { "version": "9.1.1", "resolved": "https://registry.npmjs.org/@types/mocha/-/mocha-9.1.1.tgz", @@ -9437,6 +11512,12 @@ "integrity": "sha512-P97XU07fcpauSw3/fE2Q7eF6bHl4oHhwkikjnM7zlQLENrdC2rZuHSdNlMBhnW82NyBEsVJHII1Jk3d/MtQsQQ==", "dev": true }, + "@types/web-bluetooth": { + "version": "0.0.20", + "resolved": "https://registry.npmjs.org/@types/web-bluetooth/-/web-bluetooth-0.0.20.tgz", + "integrity": "sha512-g9gZnnXVq7gM7v3tJCWV/qw7w+KeOlSHAhgF9RytFyifW6AF61hdT2ucrYhPq9hLs5JIryeupHV3qGk95dH9ow==", + "dev": true + }, "@typescript-eslint/eslint-plugin": { "version": "5.38.1", "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.38.1.tgz", @@ -9590,6 +11671,208 @@ "integrity": "sha512-sL/cEvJWAnClXw0wHk85/2L0G6Sj8UB0Ctc1TEMbKSsmpRosqhwj9gWgFRZSrBr2f9tiXISwNhCPmlfqUqyb9Q==", "dev": true }, + "@vitejs/plugin-vue": { + "version": "5.0.5", + "resolved": "https://registry.npmjs.org/@vitejs/plugin-vue/-/plugin-vue-5.0.5.tgz", + "integrity": "sha512-LOjm7XeIimLBZyzinBQ6OSm3UBCNVCpLkxGC0oWmm2YPzVZoxMsdvNVimLTBzpAnR9hl/yn1SHGuRfe6/Td9rQ==", + "dev": true, + "requires": {} + }, + "@vue/compiler-core": { + "version": "3.4.29", + "resolved": "https://registry.npmjs.org/@vue/compiler-core/-/compiler-core-3.4.29.tgz", + "integrity": "sha512-TFKiRkKKsRCKvg/jTSSKK7mYLJEQdUiUfykbG49rubC9SfDyvT2JrzTReopWlz2MxqeLyxh9UZhvxEIBgAhtrg==", + "dev": true, + "requires": { + "@babel/parser": "^7.24.7", + "@vue/shared": "3.4.29", + "entities": "^4.5.0", + "estree-walker": "^2.0.2", + "source-map-js": "^1.2.0" + } + }, + "@vue/compiler-dom": { + "version": "3.4.29", + "resolved": "https://registry.npmjs.org/@vue/compiler-dom/-/compiler-dom-3.4.29.tgz", + "integrity": "sha512-A6+iZ2fKIEGnfPJejdB7b1FlJzgiD+Y/sxxKwJWg1EbJu6ZPgzaPQQ51ESGNv0CP6jm6Z7/pO6Ia8Ze6IKrX7w==", + "dev": true, + "requires": { + "@vue/compiler-core": "3.4.29", + "@vue/shared": "3.4.29" + } + }, + "@vue/compiler-sfc": { + "version": "3.4.29", + "resolved": "https://registry.npmjs.org/@vue/compiler-sfc/-/compiler-sfc-3.4.29.tgz", + "integrity": "sha512-zygDcEtn8ZimDlrEQyLUovoWgKQic6aEQqRXce2WXBvSeHbEbcAsXyCk9oG33ZkyWH4sl9D3tkYc1idoOkdqZQ==", + "dev": true, + "requires": { + "@babel/parser": "^7.24.7", + "@vue/compiler-core": "3.4.29", + "@vue/compiler-dom": "3.4.29", + "@vue/compiler-ssr": "3.4.29", + "@vue/shared": "3.4.29", + "estree-walker": "^2.0.2", + "magic-string": "^0.30.10", + "postcss": "^8.4.38", + "source-map-js": "^1.2.0" + } + }, + "@vue/compiler-ssr": { + "version": "3.4.29", + "resolved": "https://registry.npmjs.org/@vue/compiler-ssr/-/compiler-ssr-3.4.29.tgz", + "integrity": "sha512-rFbwCmxJ16tDp3N8XCx5xSQzjhidYjXllvEcqX/lopkoznlNPz3jyy0WGJCyhAaVQK677WWFt3YO/WUEkMMUFQ==", + "dev": true, + "requires": { + "@vue/compiler-dom": "3.4.29", + "@vue/shared": "3.4.29" + } + }, + "@vue/devtools-api": { + "version": "7.3.0", + "resolved": "https://registry.npmjs.org/@vue/devtools-api/-/devtools-api-7.3.0.tgz", + "integrity": "sha512-EQ6DIm9AuL9q6IzjjnxeHWgzHzZTI+0ZGyLyG6faLN1e0tzLWPut58OtvFbLP/hbEhE5zPlsdUsH1uFr7RVFYw==", + "dev": true, + "requires": { + "@vue/devtools-kit": "^7.3.0" + } + }, + "@vue/devtools-kit": { + "version": "7.3.0", + "resolved": "https://registry.npmjs.org/@vue/devtools-kit/-/devtools-kit-7.3.0.tgz", + "integrity": "sha512-J9C+ue3Ka8cumQY/hMsNTcbb1tczqVBBXFMw4isa5YvPjyIBgEtJBfDSUVIK3nE+YWk7UNliUuCcE1GHEKaGcw==", + "dev": true, + "requires": { + "@vue/devtools-shared": "^7.3.0", + "birpc": "^0.2.17", + "hookable": "^5.5.3", + "mitt": "^3.0.1", + "perfect-debounce": "^1.0.0", + "speakingurl": "^14.0.1", + "superjson": "^2.2.1" + } + }, + "@vue/devtools-shared": { + "version": "7.3.0", + "resolved": "https://registry.npmjs.org/@vue/devtools-shared/-/devtools-shared-7.3.0.tgz", + "integrity": "sha512-bYw4BtZclxzVrYBeYYHzNOcLlvVZbe9tutwtrixTtdgynHvuSJa5KI2MqWiumpGYm2feFI5sHlC8Vt61v4z18g==", + "dev": true, + "requires": { + "rfdc": "^1.3.1" + } + }, + "@vue/reactivity": { + "version": "3.4.29", + "resolved": "https://registry.npmjs.org/@vue/reactivity/-/reactivity-3.4.29.tgz", + "integrity": "sha512-w8+KV+mb1a8ornnGQitnMdLfE0kXmteaxLdccm2XwdFxXst4q/Z7SEboCV5SqJNpZbKFeaRBBJBhW24aJyGINg==", + "dev": true, + "requires": { + "@vue/shared": "3.4.29" + } + }, + "@vue/runtime-core": { + "version": "3.4.29", + "resolved": "https://registry.npmjs.org/@vue/runtime-core/-/runtime-core-3.4.29.tgz", + "integrity": "sha512-s8fmX3YVR/Rk5ig0ic0NuzTNjK2M7iLuVSZyMmCzN/+Mjuqqif1JasCtEtmtoJWF32pAtUjyuT2ljNKNLeOmnQ==", + "dev": true, + "requires": { + "@vue/reactivity": "3.4.29", + "@vue/shared": "3.4.29" + } + }, + "@vue/runtime-dom": { + "version": "3.4.29", + "resolved": "https://registry.npmjs.org/@vue/runtime-dom/-/runtime-dom-3.4.29.tgz", + "integrity": "sha512-gI10atCrtOLf/2MPPMM+dpz3NGulo9ZZR9d1dWo4fYvm+xkfvRrw1ZmJ7mkWtiJVXSsdmPbcK1p5dZzOCKDN0g==", + "dev": true, + "requires": { + "@vue/reactivity": "3.4.29", + "@vue/runtime-core": "3.4.29", + "@vue/shared": "3.4.29", + "csstype": "^3.1.3" + } + }, + "@vue/server-renderer": { + "version": "3.4.29", + "resolved": "https://registry.npmjs.org/@vue/server-renderer/-/server-renderer-3.4.29.tgz", + "integrity": "sha512-HMLCmPI2j/k8PVkSBysrA2RxcxC5DgBiCdj7n7H2QtR8bQQPqKAe8qoaxLcInzouBmzwJ+J0x20ygN/B5mYBng==", + "dev": true, + "requires": { + "@vue/compiler-ssr": "3.4.29", + "@vue/shared": "3.4.29" + } + }, + "@vue/shared": { + "version": "3.4.29", + "resolved": "https://registry.npmjs.org/@vue/shared/-/shared-3.4.29.tgz", + "integrity": "sha512-hQ2gAQcBO/CDpC82DCrinJNgOHI2v+FA7BDW4lMSPeBpQ7sRe2OLHWe5cph1s7D8DUQAwRt18dBDfJJ220APEA==", + "dev": true + }, + "@vueuse/core": { + "version": "10.11.0", + "resolved": "https://registry.npmjs.org/@vueuse/core/-/core-10.11.0.tgz", + "integrity": "sha512-x3sD4Mkm7PJ+pcq3HX8PLPBadXCAlSDR/waK87dz0gQE+qJnaaFhc/dZVfJz+IUYzTMVGum2QlR7ImiJQN4s6g==", + "dev": true, + "requires": { + "@types/web-bluetooth": "^0.0.20", + "@vueuse/metadata": "10.11.0", + "@vueuse/shared": "10.11.0", + "vue-demi": ">=0.14.8" + }, + "dependencies": { + "vue-demi": { + "version": "0.14.8", + "resolved": "https://registry.npmjs.org/vue-demi/-/vue-demi-0.14.8.tgz", + "integrity": "sha512-Uuqnk9YE9SsWeReYqK2alDI5YzciATE0r2SkA6iMAtuXvNTMNACJLJEXNXaEy94ECuBe4Sk6RzRU80kjdbIo1Q==", + "dev": true, + "requires": {} + } + } + }, + "@vueuse/integrations": { + "version": "10.11.0", + "resolved": "https://registry.npmjs.org/@vueuse/integrations/-/integrations-10.11.0.tgz", + "integrity": "sha512-Pp6MtWEIr+NDOccWd8j59Kpjy5YDXogXI61Kb1JxvSfVBO8NzFQkmrKmSZz47i+ZqHnIzxaT38L358yDHTncZg==", + "dev": true, + "requires": { + "@vueuse/core": "10.11.0", + "@vueuse/shared": "10.11.0", + "vue-demi": ">=0.14.8" + }, + "dependencies": { + "vue-demi": { + "version": "0.14.8", + "resolved": "https://registry.npmjs.org/vue-demi/-/vue-demi-0.14.8.tgz", + "integrity": "sha512-Uuqnk9YE9SsWeReYqK2alDI5YzciATE0r2SkA6iMAtuXvNTMNACJLJEXNXaEy94ECuBe4Sk6RzRU80kjdbIo1Q==", + "dev": true, + "requires": {} + } + } + }, + "@vueuse/metadata": { + "version": "10.11.0", + "resolved": "https://registry.npmjs.org/@vueuse/metadata/-/metadata-10.11.0.tgz", + "integrity": "sha512-kQX7l6l8dVWNqlqyN3ePW3KmjCQO3ZMgXuBMddIu83CmucrsBfXlH+JoviYyRBws/yLTQO8g3Pbw+bdIoVm4oQ==", + "dev": true + }, + "@vueuse/shared": { + "version": "10.11.0", + "resolved": "https://registry.npmjs.org/@vueuse/shared/-/shared-10.11.0.tgz", + "integrity": "sha512-fyNoIXEq3PfX1L3NkNhtVQUSRtqYwJtJg+Bp9rIzculIZWHTkKSysujrOk2J+NrRulLTQH9+3gGSfYLWSEWU1A==", + "dev": true, + "requires": { + "vue-demi": ">=0.14.8" + }, + "dependencies": { + "vue-demi": { + "version": "0.14.8", + "resolved": "https://registry.npmjs.org/vue-demi/-/vue-demi-0.14.8.tgz", + "integrity": "sha512-Uuqnk9YE9SsWeReYqK2alDI5YzciATE0r2SkA6iMAtuXvNTMNACJLJEXNXaEy94ECuBe4Sk6RzRU80kjdbIo1Q==", + "dev": true, + "requires": {} + } + } + }, "@webassemblyjs/ast": { "version": "1.12.1", "resolved": "https://registry.npmjs.org/@webassemblyjs/ast/-/ast-1.12.1.tgz", @@ -9830,6 +12113,29 @@ "dev": true, "requires": {} }, + "algoliasearch": { + "version": "4.23.3", + "resolved": "https://registry.npmjs.org/algoliasearch/-/algoliasearch-4.23.3.tgz", + "integrity": "sha512-Le/3YgNvjW9zxIQMRhUHuhiUjAlKY/zsdZpfq4dlLqg6mEm0nL6yk+7f2hDOtLpxsgE4jSzDmvHL7nXdBp5feg==", + "dev": true, + "requires": { + "@algolia/cache-browser-local-storage": "4.23.3", + "@algolia/cache-common": "4.23.3", + "@algolia/cache-in-memory": "4.23.3", + "@algolia/client-account": "4.23.3", + "@algolia/client-analytics": "4.23.3", + "@algolia/client-common": "4.23.3", + "@algolia/client-personalization": "4.23.3", + "@algolia/client-search": "4.23.3", + "@algolia/logger-common": "4.23.3", + "@algolia/logger-console": "4.23.3", + "@algolia/recommend": "4.23.3", + "@algolia/requester-browser-xhr": "4.23.3", + "@algolia/requester-common": "4.23.3", + "@algolia/requester-node-http": "4.23.3", + "@algolia/transporter": "4.23.3" + } + }, "amdefine": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/amdefine/-/amdefine-1.0.1.tgz", @@ -9848,6 +12154,12 @@ "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", "dev": true }, + "ansi-sequence-parser": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/ansi-sequence-parser/-/ansi-sequence-parser-1.1.1.tgz", + "integrity": "sha512-vJXt3yiaUL4UU546s3rPXlsry/RnM730G1+HkpKE012AN0sx1eOrxSu95oKDIonskeLTijMgqWZ3uDEe3NFvyg==", + "dev": true + }, "ansi-styles": { "version": "3.2.1", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", @@ -9897,12 +12209,6 @@ "integrity": "sha512-jgsaNduz+ndvGyFt3uSuWqvy4lCnIJiovtouQN5JZHOKCS2QuhEdbcQHFhVksz2N2U9hXJo8odG7ETyWlEeuDw==", "dev": true }, - "at-least-node": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/at-least-node/-/at-least-node-1.0.0.tgz", - "integrity": "sha512-+q/t7Ekv1EDY2l6Gda6LLiX14rU9TV20Wa3ofeQmwPFZbOMo9DXrLbOjFaaclkXKWidIaopwAObQDqwWtGUjqg==", - "dev": true - }, "babel-code-frame": { "version": "6.26.0", "resolved": "https://registry.npmjs.org/babel-code-frame/-/babel-code-frame-6.26.0.tgz", @@ -10116,6 +12422,12 @@ "integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==", "dev": true }, + "birpc": { + "version": "0.2.17", + "resolved": "https://registry.npmjs.org/birpc/-/birpc-0.2.17.tgz", + "integrity": "sha512-+hkTxhot+dWsLpp3gia5AkVHIsKlZybNT5gIYiDlNzJrmYPcTM9k5/w2uaj3IPpd7LlEYpmCj4Jj1nC41VhDFg==", + "dev": true + }, "bluebird": { "version": "3.7.2", "resolved": "https://registry.npmjs.org/bluebird/-/bluebird-3.7.2.tgz", @@ -10424,6 +12736,15 @@ "integrity": "sha512-QADzlaHc8icV8I7vbaJXJwod9HWYp8uCqf1xa4OfNu1T7JVxQIrUgOWtHdNDtPiywmFbiS12VjotIXLrKM3orQ==", "dev": true }, + "copy-anything": { + "version": "3.0.5", + "resolved": "https://registry.npmjs.org/copy-anything/-/copy-anything-3.0.5.tgz", + "integrity": "sha512-yCEafptTtb4bk7GLEQoM8KVJpxAfdBJYaXyzQEgQQQgYrZiDp8SJmGKlYza6CYjEDNstAdNdKA3UuoULlEbS6w==", + "dev": true, + "requires": { + "is-what": "^4.1.8" + } + }, "core-js": { "version": "2.6.12", "resolved": "https://registry.npmjs.org/core-js/-/core-js-2.6.12.tgz", @@ -10462,6 +12783,12 @@ "which": "^2.0.1" } }, + "csstype": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.1.3.tgz", + "integrity": "sha512-M1uQkMl8rQK/szD0LNhtqxIPLpimGm8sOBwU7lLnCpSbTyY3yeU1Vc7l4KT5zT4s/yOxHH5O7tIuuLOCnLADRw==", + "dev": true + }, "d": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/d/-/d-1.0.1.tgz", @@ -10625,6 +12952,12 @@ "tapable": "^1.0.0" } }, + "entities": { + "version": "4.5.0", + "resolved": "https://registry.npmjs.org/entities/-/entities-4.5.0.tgz", + "integrity": "sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw==", + "dev": true + }, "envinfo": { "version": "7.13.0", "resolved": "https://registry.npmjs.org/envinfo/-/envinfo-7.13.0.tgz", @@ -10678,6 +13011,37 @@ "ext": "^1.1.2" } }, + "esbuild": { + "version": "0.21.5", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.21.5.tgz", + "integrity": "sha512-mg3OPMV4hXywwpoDxu3Qda5xCKQi+vCTZq8S9J/EpkhB2HzKXq4SNFZE3+NK93JYxc8VMSep+lOUSC/RVKaBqw==", + "dev": true, + "requires": { + "@esbuild/aix-ppc64": "0.21.5", + "@esbuild/android-arm": "0.21.5", + "@esbuild/android-arm64": "0.21.5", + "@esbuild/android-x64": "0.21.5", + "@esbuild/darwin-arm64": "0.21.5", + "@esbuild/darwin-x64": "0.21.5", + "@esbuild/freebsd-arm64": "0.21.5", + "@esbuild/freebsd-x64": "0.21.5", + "@esbuild/linux-arm": "0.21.5", + "@esbuild/linux-arm64": "0.21.5", + "@esbuild/linux-ia32": "0.21.5", + "@esbuild/linux-loong64": "0.21.5", + "@esbuild/linux-mips64el": "0.21.5", + "@esbuild/linux-ppc64": "0.21.5", + "@esbuild/linux-riscv64": "0.21.5", + "@esbuild/linux-s390x": "0.21.5", + "@esbuild/linux-x64": "0.21.5", + "@esbuild/netbsd-x64": "0.21.5", + "@esbuild/openbsd-x64": "0.21.5", + "@esbuild/sunos-x64": "0.21.5", + "@esbuild/win32-arm64": "0.21.5", + "@esbuild/win32-ia32": "0.21.5", + "@esbuild/win32-x64": "0.21.5" + } + }, "escalade": { "version": "3.1.2", "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.2.tgz", @@ -10978,6 +13342,12 @@ "integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==", "dev": true }, + "estree-walker": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-2.0.2.tgz", + "integrity": "sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w==", + "dev": true + }, "esutils": { "version": "2.0.3", "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", @@ -11257,6 +13627,15 @@ "integrity": "sha512-5nqDSxl8nn5BSNxyR3n4I6eDmbolI6WT+QqR547RwxQapgjQBmtktdP+HTBb/a/zLsbzERTONyUB5pefh5TtjQ==", "dev": true }, + "focus-trap": { + "version": "7.5.4", + "resolved": "https://registry.npmjs.org/focus-trap/-/focus-trap-7.5.4.tgz", + "integrity": "sha512-N7kHdlgsO/v+iD/dMoJKtsSqs5Dz/dXZVebRgJw23LDk+jMi/974zyiOYDziY2JPp8xivq9BmUGwIJMiuSBi7w==", + "dev": true, + "requires": { + "tabbable": "^6.2.0" + } + }, "foreachasync": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/foreachasync/-/foreachasync-3.0.0.tgz", @@ -11275,18 +13654,6 @@ "integrity": "sha512-zJ2mQYM18rEFOudeV4GShTGIQ7RbzA7ozbU9I/XBpm7kqgMywgmylMwXHxZJmkVoYkna9d2pVXVXPdYTP9ej8Q==", "dev": true }, - "fs-extra": { - "version": "9.1.0", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-9.1.0.tgz", - "integrity": "sha512-hcg3ZmepS30/7BSFqRvoo3DOMQu7IjqxO5nCDt+zM9XWjb33Wg7ziNT+Qvqbuc3+gWpzO02JubVyk2G4Zvo1OQ==", - "dev": true, - "requires": { - "at-least-node": "^1.0.0", - "graceful-fs": "^4.2.0", - "jsonfile": "^6.0.1", - "universalify": "^2.0.0" - } - }, "fs.realpath": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", @@ -11294,9 +13661,9 @@ "dev": true }, "fsevents": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz", - "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==", + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", + "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", "optional": true }, "function-bind": { @@ -11395,19 +13762,6 @@ "integrity": "sha512-bzh50DW9kTPM00T8y4o8vQg89Di9oLJVLW/KaOGIXJWP/iqCN6WKYkbNOF04vFLJhwcpYUh9ydh/+5vpOqV4YQ==", "dev": true }, - "handlebars": { - "version": "4.7.8", - "resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.7.8.tgz", - "integrity": "sha512-vafaFqs8MZkRrSX7sFVUdo3ap/eNiLnb4IakshzvP56X5Nr1iGKAIqdX6tMlm6HcNRIkr6AxO5jFEoJzzpT8aQ==", - "dev": true, - "requires": { - "minimist": "^1.2.5", - "neo-async": "^2.6.2", - "source-map": "^0.6.1", - "uglify-js": "^3.1.4", - "wordwrap": "^1.0.0" - } - }, "has": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", @@ -11461,10 +13815,10 @@ "integrity": "sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==", "dev": true }, - "highlight.js": { - "version": "10.7.3", - "resolved": "https://registry.npmjs.org/highlight.js/-/highlight.js-10.7.3.tgz", - "integrity": "sha512-tzcUFauisWKNHaRkN4Wjl/ZA07gENAjFl3J/c480dprkGTg5EQstgaNFqBfUqCq54kZRIEcreTsAgF/m2quD7A==", + "hookable": { + "version": "5.5.3", + "resolved": "https://registry.npmjs.org/hookable/-/hookable-5.5.3.tgz", + "integrity": "sha512-Yc+BQe8SvoXH1643Qez1zqLRmbA5rCL+sSmk6TVos0LWVfNIB7PGncdlId77WzLGSIB5KaWgTaNTs2lNVEI6VQ==", "dev": true }, "http-errors": { @@ -11636,6 +13990,12 @@ "integrity": "sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw==", "dev": true }, + "is-what": { + "version": "4.1.16", + "resolved": "https://registry.npmjs.org/is-what/-/is-what-4.1.16.tgz", + "integrity": "sha512-ZhMwEosbFJkA0YhFnNDgTM4ZxDRsS6HqTo7qsZM08fehyRYIYa0yHu5R6mgo1n/8MgaPBXiPimPD77baVFYg+A==", + "dev": true + }, "isarray": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", @@ -11750,15 +14110,11 @@ "integrity": "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==", "dev": true }, - "jsonfile": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.1.0.tgz", - "integrity": "sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ==", - "dev": true, - "requires": { - "graceful-fs": "^4.1.6", - "universalify": "^2.0.0" - } + "jsonc-parser": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/jsonc-parser/-/jsonc-parser-3.2.1.tgz", + "integrity": "sha512-AilxAyFOAcK5wA1+LeaySVBrHsGQvUFCDWXKpZjzaL0PqW+xfBOttn8GNtWKFWqneyMZj41MWF9Kl6iPWLwgOA==", + "dev": true }, "just-extend": { "version": "4.2.1", @@ -11929,6 +14285,15 @@ "integrity": "sha512-zTU3DaZaF3Rt9rhN3uBMGQD3dD2/vFQqnvZCDv4dl5iOzq2IZQqTxu90r4E5J+nP70J3ilqVCrbho2eWaeW8Ow==", "dev": true }, + "magic-string": { + "version": "0.30.10", + "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.10.tgz", + "integrity": "sha512-iIRwTIf0QKV3UAnYK4PU8uiEc4SRh5jX0mwpIwETPpHdhVM4f53RSwS/vXvN1JhGX+Cs7B8qIq3d6AH49O5fAQ==", + "dev": true, + "requires": { + "@jridgewell/sourcemap-codec": "^1.4.15" + } + }, "make-dir": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-3.1.0.tgz", @@ -11944,10 +14309,16 @@ "integrity": "sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==", "dev": true }, + "mark.js": { + "version": "8.11.1", + "resolved": "https://registry.npmjs.org/mark.js/-/mark.js-8.11.1.tgz", + "integrity": "sha512-1I+1qpDt4idfgLQG+BNWmrqku+7/2bi5nLf4YwF8y8zXvmfiTBY3PV3ZibfrjBueCByROpuBjLLFCajqkgYoLQ==", + "dev": true + }, "marked": { - "version": "1.2.9", - "resolved": "https://registry.npmjs.org/marked/-/marked-1.2.9.tgz", - "integrity": "sha512-H8lIX2SvyitGX+TRdtS06m1jHMijKN/XjfH6Ooii9fvxMlh8QdqBfBDkGUpMWH2kQNrtixjzYUa3SH8ROTgRRw==", + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/marked/-/marked-4.3.0.tgz", + "integrity": "sha512-PRsaiG84bK+AMvxziE/lCFss8juXjNaWzVbN5tXAm4XjeaS9NAHhop+PjQxz2A9h8Q4M/xGmzP8vqNwy6JeK0A==", "dev": true }, "media-typer": { @@ -12036,6 +14407,18 @@ "integrity": "sha512-Jsjnk4bw3YJqYzbdyBiNsPWHPfO++UGG749Cxs6peCu5Xg4nrena6OVxOYxrQTqww0Jmwt+Ref8rggumkTLz9Q==", "dev": true }, + "minisearch": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/minisearch/-/minisearch-6.3.0.tgz", + "integrity": "sha512-ihFnidEeU8iXzcVHy74dhkxh/dn8Dc08ERl0xwoMMGqp4+LvRSCgicb+zGqWthVokQKvCSxITlh3P08OzdTYCQ==", + "dev": true + }, + "mitt": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/mitt/-/mitt-3.0.1.tgz", + "integrity": "sha512-vKivATfr97l2/QBCYAkXYDbrIWPM2IIKEl7YPhjCvKlG3kE2gm+uBo6nEXK3M5/Ffh/FLpKExzOQ3JJoJGFKBw==", + "dev": true + }, "mocha": { "version": "10.0.0", "resolved": "https://registry.npmjs.org/mocha/-/mocha-10.0.0.tgz", @@ -12466,6 +14849,12 @@ "integrity": "sha512-Dp6zGqpTdETdR63lehJYPeIOqpiNBNtc7BpWSLrOje7UaIsE5aY92r/AunQA7rsXvet3lrJ3JnZX29UPTKXyKQ==", "dev": true }, + "perfect-debounce": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/perfect-debounce/-/perfect-debounce-1.0.0.tgz", + "integrity": "sha512-xCy9V055GLEqoFaHoC1SoLIaLmWctgCUaBaWxDZ7/Zx4CTyX7cJQLJOok/orfjZAh9kEYpjJa4d0KcJmCbctZA==", + "dev": true + }, "picocolors": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.1.tgz", @@ -12526,6 +14915,31 @@ } } }, + "postcss": { + "version": "8.4.38", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.38.tgz", + "integrity": "sha512-Wglpdk03BSfXkHoQa3b/oulrotAkwrlLDRSOb9D0bN86FdRyE9lppSp33aHNPgBa0JKCoB+drFLZkQoRRYae5A==", + "dev": true, + "requires": { + "nanoid": "^3.3.7", + "picocolors": "^1.0.0", + "source-map-js": "^1.2.0" + }, + "dependencies": { + "nanoid": { + "version": "3.3.7", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.7.tgz", + "integrity": "sha512-eSRppjcPIatRIMC1U6UngP8XFcz8MQWGQdt1MTBQ7NaAmvXDfvNxbvWV3x2y6CdEUciCSsDHDQZbhYaB8QEo2g==", + "dev": true + } + } + }, + "preact": { + "version": "10.22.0", + "resolved": "https://registry.npmjs.org/preact/-/preact-10.22.0.tgz", + "integrity": "sha512-RRurnSjJPj4rp5K6XoP45Ui33ncb7e4H7WiOHVpjbkvqvA3U+N8Z6Qbo0AE6leGYBV66n8EhEaFixvIu3SkxFw==", + "dev": true + }, "prelude-ls": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz", @@ -12538,12 +14952,6 @@ "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==", "dev": true }, - "progress": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/progress/-/progress-2.0.3.tgz", - "integrity": "sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==", - "dev": true - }, "protochain": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/protochain/-/protochain-1.0.5.tgz", @@ -12784,6 +15192,12 @@ "integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==", "dev": true }, + "rfdc": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/rfdc/-/rfdc-1.4.1.tgz", + "integrity": "sha512-q1b3N5QkRUWUl7iyylaaj3kOpIT0N2i9MqIEQXP73GVsN9cw3fdx8X63cEmWhJGi2PPCF23Ijp7ktmd39rawIA==", + "dev": true + }, "rimraf": { "version": "3.0.2", "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", @@ -12910,6 +15324,32 @@ } } }, + "rollup": { + "version": "4.18.0", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.18.0.tgz", + "integrity": "sha512-QmJz14PX3rzbJCN1SG4Xe/bAAX2a6NpCP8ab2vfu2GiUr8AQcr2nCV/oEO3yneFarB67zk8ShlIyWb2LGTb3Sg==", + "dev": true, + "requires": { + "@rollup/rollup-android-arm-eabi": "4.18.0", + "@rollup/rollup-android-arm64": "4.18.0", + "@rollup/rollup-darwin-arm64": "4.18.0", + "@rollup/rollup-darwin-x64": "4.18.0", + "@rollup/rollup-linux-arm-gnueabihf": "4.18.0", + "@rollup/rollup-linux-arm-musleabihf": "4.18.0", + "@rollup/rollup-linux-arm64-gnu": "4.18.0", + "@rollup/rollup-linux-arm64-musl": "4.18.0", + "@rollup/rollup-linux-powerpc64le-gnu": "4.18.0", + "@rollup/rollup-linux-riscv64-gnu": "4.18.0", + "@rollup/rollup-linux-s390x-gnu": "4.18.0", + "@rollup/rollup-linux-x64-gnu": "4.18.0", + "@rollup/rollup-linux-x64-musl": "4.18.0", + "@rollup/rollup-win32-arm64-msvc": "4.18.0", + "@rollup/rollup-win32-ia32-msvc": "4.18.0", + "@rollup/rollup-win32-x64-msvc": "4.18.0", + "@types/estree": "1.0.5", + "fsevents": "~2.3.2" + } + }, "run-parallel": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz", @@ -12942,6 +15382,13 @@ "ajv-keywords": "^3.5.2" } }, + "search-insights": { + "version": "2.14.0", + "resolved": "https://registry.npmjs.org/search-insights/-/search-insights-2.14.0.tgz", + "integrity": "sha512-OLN6MsPMCghDOqlCtsIsYgtsC0pnwVTyT9Mu6A3ewOj1DxvzZF6COrn2g86E/c05xbktB0XN04m/t1Z+n+fTGw==", + "dev": true, + "peer": true + }, "semver": { "version": "6.3.1", "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", @@ -13054,32 +15501,16 @@ "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==", "dev": true }, - "shelljs": { - "version": "0.8.5", - "resolved": "https://registry.npmjs.org/shelljs/-/shelljs-0.8.5.tgz", - "integrity": "sha512-TiwcRcrkhHvbrZbnRcFYMLl30Dfov3HKqzp5tO5b4pt6G/SezKcYhmDg15zXVBswHmctSAQKznqNW2LO5tTDow==", + "shiki": { + "version": "0.14.7", + "resolved": "https://registry.npmjs.org/shiki/-/shiki-0.14.7.tgz", + "integrity": "sha512-dNPAPrxSc87ua2sKJ3H5dQ/6ZaY8RNnaAqK+t0eG7p0Soi2ydiqbGOTaZCqaYvA/uZYfS1LJnemt3Q+mSfcPCg==", "dev": true, "requires": { - "glob": "^7.0.0", - "interpret": "^1.0.0", - "rechoir": "^0.6.2" - }, - "dependencies": { - "interpret": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/interpret/-/interpret-1.4.0.tgz", - "integrity": "sha512-agE4QfB2Lkp9uICn7BAqoscw4SZP9kTE2hxiFI3jBPmXJfdqiahTbUuKGsMoN2GtqL9AxhYioAcVvgsb1HvRbA==", - "dev": true - }, - "rechoir": { - "version": "0.6.2", - "resolved": "https://registry.npmjs.org/rechoir/-/rechoir-0.6.2.tgz", - "integrity": "sha512-HFM8rkZ+i3zrV+4LQjwQ0W+ez98pApMGM3HUrN04j3CqzPOzl9nmP15Y8YXNm8QHGv/eacOVEjqhmWpkRV0NAw==", - "dev": true, - "requires": { - "resolve": "^1.1.6" - } - } + "ansi-sequence-parser": "^1.1.0", + "jsonc-parser": "^3.2.0", + "vscode-oniguruma": "^1.7.0", + "vscode-textmate": "^8.0.0" } }, "side-channel": { @@ -13142,6 +15573,12 @@ "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", "dev": true }, + "source-map-js": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.0.tgz", + "integrity": "sha512-itJW8lvSA0TXEphiRoawsCksnlf8SyvmFzIhltqAHluXd88pkCd+cXJVHTDwdCr0IzwptSm035IHQktUu1QUMg==", + "dev": true + }, "source-map-support": { "version": "0.5.21", "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.21.tgz", @@ -13152,6 +15589,12 @@ "source-map": "^0.6.0" } }, + "speakingurl": { + "version": "14.0.1", + "resolved": "https://registry.npmjs.org/speakingurl/-/speakingurl-14.0.1.tgz", + "integrity": "sha512-1POYv7uv2gXoyGFpBCmpDVSNV74IfsWlDW216UPjbWufNf+bSU6GdbDsxdcxtfwb4xlI3yxzOTKClUosxARYrQ==", + "dev": true + }, "statuses": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.1.tgz", @@ -13199,6 +15642,15 @@ "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", "dev": true }, + "superjson": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/superjson/-/superjson-2.2.1.tgz", + "integrity": "sha512-8iGv75BYOa0xRJHK5vRLEjE2H/i4lulTjzpUXic3Eg8akftYjkmQDa8JARQ42rlczXyFR3IeRoeFCc7RxHsYZA==", + "dev": true, + "requires": { + "copy-anything": "^3.0.2" + } + }, "supports-color": { "version": "5.5.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", @@ -13214,6 +15666,12 @@ "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==", "dev": true }, + "tabbable": { + "version": "6.2.0", + "resolved": "https://registry.npmjs.org/tabbable/-/tabbable-6.2.0.tgz", + "integrity": "sha512-Cat63mxsVJlzYvN51JmVXIgNoUokrIaT2zLclCXjRd8boZ0004U4KCs/sToJ75C6sdlByWxpYnb5Boif1VSFew==", + "dev": true + }, "tapable": { "version": "1.1.3", "resolved": "https://registry.npmjs.org/tapable/-/tapable-1.1.3.tgz", @@ -13479,51 +15937,57 @@ } }, "typedoc": { - "version": "0.19.2", - "resolved": "https://registry.npmjs.org/typedoc/-/typedoc-0.19.2.tgz", - "integrity": "sha512-oDEg1BLEzi1qvgdQXc658EYgJ5qJLVSeZ0hQ57Eq4JXy6Vj2VX4RVo18qYxRWz75ifAaYuYNBUCnbhjd37TfOg==", + "version": "0.25.13", + "resolved": "https://registry.npmjs.org/typedoc/-/typedoc-0.25.13.tgz", + "integrity": "sha512-pQqiwiJ+Z4pigfOnnysObszLiU3mVLWAExSPf+Mu06G/qsc3wzbuM56SZQvONhHLncLUhYzOVkjFFpFfL5AzhQ==", "dev": true, "requires": { - "fs-extra": "^9.0.1", - "handlebars": "^4.7.6", - "highlight.js": "^10.2.0", - "lodash": "^4.17.20", "lunr": "^2.3.9", - "marked": "^1.1.1", - "minimatch": "^3.0.0", - "progress": "^2.0.3", - "semver": "^7.3.2", - "shelljs": "^0.8.4", - "typedoc-default-themes": "^0.11.4" + "marked": "^4.3.0", + "minimatch": "^9.0.3", + "shiki": "^0.14.7" }, "dependencies": { - "semver": { - "version": "7.6.2", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.2.tgz", - "integrity": "sha512-FNAIBWCx9qcRhoHcgcJ0gvU7SN1lYU2ZXuSfl04bSC5OpvDHFyJCjdNHomPXxjQlCBU67YW64PzY7/VIEH7F2w==", - "dev": true + "brace-expansion": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "dev": true, + "requires": { + "balanced-match": "^1.0.0" + } + }, + "minimatch": { + "version": "9.0.4", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.4.tgz", + "integrity": "sha512-KqWh+VchfxcMNRAJjj2tnsSJdNbHsVgnkBhTNrW7AjVo6OvLtxw8zfT9oLw1JSohlFzJ8jCoTgaoXvJ+kHt6fw==", + "dev": true, + "requires": { + "brace-expansion": "^2.0.1" + } } } }, - "typedoc-default-themes": { - "version": "0.11.4", - "resolved": "https://registry.npmjs.org/typedoc-default-themes/-/typedoc-default-themes-0.11.4.tgz", - "integrity": "sha512-Y4Lf+qIb9NTydrexlazAM46SSLrmrQRqWiD52593g53SsmUFioAsMWt8m834J6qsp+7wHRjxCXSZeiiW5cMUdw==", - "dev": true + "typedoc-plugin-markdown": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/typedoc-plugin-markdown/-/typedoc-plugin-markdown-4.0.3.tgz", + "integrity": "sha512-0tZbeVGGCd4+lpoIX+yHWgUfyaLZCQCgJOpuVdTtOtD3+jKaedJ4sl/tkNaYBPeWVKiyDkSHfGuHkq53jlzIFg==", + "dev": true, + "requires": {} + }, + "typedoc-vitepress-theme": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/typedoc-vitepress-theme/-/typedoc-vitepress-theme-1.0.0.tgz", + "integrity": "sha512-tkPQBVvzukxMpHVIpTuOviyR6QJoSRhoYV0JcZX6NzAJU+CD8eEA+Xrc7a4UYPncL8oznzn8KaLsxQz7yVSvjg==", + "dev": true, + "requires": {} }, "typescript": { - "version": "4.9.5", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.9.5.tgz", - "integrity": "sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g==", + "version": "5.4.5", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-5.4.5.tgz", + "integrity": "sha512-vcI4UpRgg81oIRUFwR0WSIHKt11nJ7SAVlYNIu+QpqeyXP+gpQJy/Z4+F0aGxSE4MqwjyXvW/TzgkLAx2AGHwQ==", "dev": true }, - "uglify-js": { - "version": "3.18.0", - "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.18.0.tgz", - "integrity": "sha512-SyVVbcNBCk0dzr9XL/R/ySrmYf0s372K6/hFklzgcp2lBFyXtw4I7BOdDjlLhE1aVqaI/SHWXWmYdlZxuyF38A==", - "dev": true, - "optional": true - }, "undici-types": { "version": "5.26.5", "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz", @@ -13557,12 +16021,6 @@ "integrity": "sha512-6t3foTQI9qne+OZoVQB/8x8rk2k1eVy1gRXhV3oFQ5T6R1dqQ1xtin3XqSlx3+ATBkliTaR/hHyJBm+LVPNM8w==", "dev": true }, - "universalify": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/universalify/-/universalify-2.0.1.tgz", - "integrity": "sha512-gptHNQghINnc/vTGIk0SOFGFNXw7JVrlRUtConJRlvaw6DuX0wO5Jeko9sWrMBhh+PsYAZ7oXAiOnf/UKogyiw==", - "dev": true - }, "unpipe": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", @@ -13630,6 +16088,78 @@ "integrity": "sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg==", "dev": true }, + "vite": { + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/vite/-/vite-5.3.1.tgz", + "integrity": "sha512-XBmSKRLXLxiaPYamLv3/hnP/KXDai1NDexN0FpkTaZXTfycHvkRHoenpgl/fvuK/kPbB6xAgoyiryAhQNxYmAQ==", + "dev": true, + "requires": { + "esbuild": "^0.21.3", + "fsevents": "~2.3.3", + "postcss": "^8.4.38", + "rollup": "^4.13.0" + } + }, + "vitepress": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/vitepress/-/vitepress-1.2.3.tgz", + "integrity": "sha512-GvEsrEeNLiDE1+fuwDAYJCYLNZDAna+EtnXlPajhv/MYeTjbNK6Bvyg6NoTdO1sbwuQJ0vuJR99bOlH53bo6lg==", + "dev": true, + "requires": { + "@docsearch/css": "^3.6.0", + "@docsearch/js": "^3.6.0", + "@shikijs/core": "^1.6.2", + "@shikijs/transformers": "^1.6.2", + "@types/markdown-it": "^14.1.1", + "@vitejs/plugin-vue": "^5.0.5", + "@vue/devtools-api": "^7.2.1", + "@vue/shared": "^3.4.27", + "@vueuse/core": "^10.10.0", + "@vueuse/integrations": "^10.10.0", + "focus-trap": "^7.5.4", + "mark.js": "8.11.1", + "minisearch": "^6.3.0", + "shiki": "^1.6.2", + "vite": "^5.2.12", + "vue": "^3.4.27" + }, + "dependencies": { + "shiki": { + "version": "1.6.5", + "resolved": "https://registry.npmjs.org/shiki/-/shiki-1.6.5.tgz", + "integrity": "sha512-iFzypldJG0zeyRHKAhaSGCf+YWXpMMyUyOrCVFBFKGGdF5vrB6jbd66/SQljxV20aSrVZEAQwUto/hhuNi/CIg==", + "dev": true, + "requires": { + "@shikijs/core": "1.6.5" + } + } + } + }, + "vscode-oniguruma": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/vscode-oniguruma/-/vscode-oniguruma-1.7.0.tgz", + "integrity": "sha512-L9WMGRfrjOhgHSdOYgCt/yRMsXzLDJSL7BPrOZt73gU0iWO4mpqzqQzOz5srxqTvMBaR0XZTSrVWo4j55Rc6cA==", + "dev": true + }, + "vscode-textmate": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/vscode-textmate/-/vscode-textmate-8.0.0.tgz", + "integrity": "sha512-AFbieoL7a5LMqcnOF04ji+rpXadgOXnZsxQr//r83kLPr7biP7am3g9zbaZIaBGwBRWeSvoMD4mgPdX3e4NWBg==", + "dev": true + }, + "vue": { + "version": "3.4.29", + "resolved": "https://registry.npmjs.org/vue/-/vue-3.4.29.tgz", + "integrity": "sha512-8QUYfRcYzNlYuzKPfge1UWC6nF9ym0lx7mpGVPJYNhddxEf3DD0+kU07NTL0sXuiT2HuJuKr/iEO8WvXvT0RSQ==", + "dev": true, + "requires": { + "@vue/compiler-dom": "3.4.29", + "@vue/compiler-sfc": "3.4.29", + "@vue/runtime-dom": "3.4.29", + "@vue/server-renderer": "3.4.29", + "@vue/shared": "3.4.29" + } + }, "walk": { "version": "2.3.15", "resolved": "https://registry.npmjs.org/walk/-/walk-2.3.15.tgz", @@ -13838,12 +16368,6 @@ "integrity": "sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA==", "dev": true }, - "wordwrap": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-1.0.0.tgz", - "integrity": "sha512-gvVzJFlPycKc5dZN4yPkP8w7Dc37BtP1yczEneOb4uq34pXZcvrtRTmWV8W+Ume+XCxKgbjM+nevkyFPMybd4Q==", - "dev": true - }, "workerpool": { "version": "6.2.1", "resolved": "https://registry.npmjs.org/workerpool/-/workerpool-6.2.1.tgz", diff --git a/package.json b/package.json index dd4c42c8e..cad5f2686 100644 --- a/package.json +++ b/package.json @@ -29,7 +29,10 @@ "preversion": "npm test && npm run build:js", "version": "npm run build:release && git add release/ && npm run update-doc-version && git add doc/version.py", "update-doc-version": "bash scripts/update-doc-version.sh", - "autobuild-docs": "cd doc && sphinx-autobuild . _build/html" + "autobuild-docs": "cd doc && sphinx-autobuild . _build/html", + "docs:dev": "vitepress dev docs", + "docs:build": "vitepress build docs", + "docs:preview": "vitepress preview docs" }, "devDependencies": { "@babel/core": "^7.19.0", @@ -51,8 +54,11 @@ "sinon": "^14.0.0", "ts-loader": "^8.4.0", "ts-node": "^10.9.1", - "typedoc": "^0.19.2", - "typescript": "^4.8.3", + "typedoc": "^0.25.13", + "typedoc-plugin-markdown": "^4.0.3", + "typedoc-vitepress-theme": "^1.0.0", + "typescript": "^5.4.5", + "vitepress": "^1.2.3", "webpack": "^5.92.0", "webpack-cli": "^5.1.4" }, diff --git a/src/access.ts b/src/access.ts index 682f61023..6a3424f09 100644 --- a/src/access.ts +++ b/src/access.ts @@ -14,11 +14,11 @@ interface ScopeModeMap { } /** - * @class Access + * @class * * Keeps track of claimed access and scopes. */ -class Access { +export class Access { scopeModeMap: ScopeModeMap; rootPaths: string[]; storageType: string; @@ -35,8 +35,11 @@ class Access { /** * Property: scopes * - * Holds an array of claimed scopes in the form - * > { name: "", mode: "" } + * Holds an array of claimed scopes: + * + * ```js + * [{ name: "", mode: "" }] + * ``` */ get scopes(): ScopeEntry[] { return Object.keys(this.scopeModeMap).map((key) => { @@ -172,10 +175,11 @@ class Access { * Set the storage type of the remote. * * @param {string} type - Storage type + * @internal */ setStorageType (type: string): void { this.storageType = type; } } -export = Access; +export default Access; diff --git a/src/baseclient.ts b/src/baseclient.ts index c69c57a95..0b924e2a1 100644 --- a/src/baseclient.ts +++ b/src/baseclient.ts @@ -17,17 +17,17 @@ function getModuleNameFromBase(path: string): string { /** * Provides a high-level interface to access data below a given root path. */ -class BaseClient { +export class BaseClient { /** - * The instance this operates on. + * The {@link RemoteStorage} instance this {@link BaseClient} operates on. */ storage: RemoteStorage; /** - * Base path, which this operates on. + * Base path, which this {@link BaseClient} operates on. * - * For the module's privateClient this would be //, for the - * corresponding publicClient /public//. + * For the module's privateClient this would be ``, for the + * corresponding publicClient `/public//`. */ base: string; @@ -456,7 +456,7 @@ class BaseClient { } } -interface BaseClient extends EventHandling {} +export interface BaseClient extends EventHandling {} applyMixins(BaseClient, [EventHandling]); -export = BaseClient; +export default BaseClient; diff --git a/src/eventhandling.ts b/src/eventhandling.ts index 35fbe934e..ca835ae56 100644 --- a/src/eventhandling.ts +++ b/src/eventhandling.ts @@ -2,12 +2,16 @@ import log from './log'; import { EventHandler } from './interfaces/event_handling'; class EventHandling { + /** + * @ignore + */ _handlers: { [key: string]: EventHandler[] }; /** * Register event names * * TODO see if necessary, or can be done on the fly in addEventListener + * @ignore */ addEvents(additionalEvents: string[]): void { additionalEvents.forEach(evName => this._addEvent(evName)); @@ -15,6 +19,7 @@ class EventHandling { /** * Install an event handler for the given event name + * @ignore */ addEventListener (eventName: string, handler: EventHandler): void { // Check type for public consumption of API @@ -29,8 +34,9 @@ class EventHandling { this._handlers[eventName].push(handler); } - /* + /** * Alias for addEventListener + * @ignore */ on (eventName: string, handler: EventHandler): void { return this.addEventListener(eventName, handler); @@ -38,6 +44,7 @@ class EventHandling { /** * Remove a previously installed event handler + * @ignore */ removeEventListener (eventName: string, handler: EventHandler): void { this._validateEvent(eventName); @@ -50,6 +57,9 @@ class EventHandling { } } + /** + * @ignore + */ _emit (eventName: string, ...args: unknown[]): void { this._validateEvent(eventName); this._handlers[eventName].slice().forEach((handler) => { @@ -57,18 +67,27 @@ class EventHandling { }); } + /** + * @ignore + */ _validateEvent (eventName: string): void { if (!(eventName in this._handlers)) { throw new Error("Unknown event: " + eventName); } } + /** + * @ignore + */ _delegateEvent (eventName: string, target): void { target.on(eventName, (event) => { this._emit(eventName, event); }); } + /** + * @ignore + */ _addEvent (eventName: string): void { if (typeof this._handlers === 'undefined') { this._handlers = {}; diff --git a/src/remotestorage.ts b/src/remotestorage.ts index 6b57cff62..d6f59cdb0 100644 --- a/src/remotestorage.ts +++ b/src/remotestorage.ts @@ -71,70 +71,108 @@ function isValidInterval(interval: unknown): interval is number { * @param {object} config - an optional configuration object * @class */ -class RemoteStorage { +export class RemoteStorage { /** * Pending get/put/delete calls - * @private + * @ignore */ _pending: {[key: string]: any}[] = []; /** * TODO: document + * @ignore */ _cleanups: [] = []; /** * TODO: document + * @ignore */ _pathHandlers: { [key: string]: any } = { change: {} }; /** * Holds OAuth app keys for Dropbox, Google Drive + * @ignore */ apiKeys: {googledrive?: {clientId: string}; dropbox?: {appKey: string}} = {}; /** * Holds the feature class instance, added by feature initialization * TODO use type Access + * @ignore */ access: any; /** * Holds the feature class instance, added by feature initialization * TODO use type Sync + * @ignore */ sync: any; /** * Holds the feature class instance, added by feature initialization + * @ignore */ caching: Caching; - // TODO use correct types, document + /** + * TODO use correct types, document + * @ignore + */ _syncTimer: any; + /** + * @ignore + */ syncStopped: any; + /** + * @ignore + */ get: any; + /** + * @ignore + */ put: any; + /** + * @ignore + */ delete: any; + /** + * @ignore + */ backend: 'remotestorage' | 'dropbox' | 'googledrive'; /** * Holds a WireClient, GoogleDrive or Dropbox instance, added by feature initialization + * @ignore */ remote: Remote; - /* + /** * Access to the local caching backend used. Usually either a * or instance. * * Not available, when caching is turned off. + * @ignore */ local: IndexedDB | LocalStorage | InMemoryStorage; + /** + * @ignore + */ dropbox: Dropbox; + /** + * @ignore + */ googledrive: GoogleDrive; + /** + * @ignore + */ fireInitial; + /** + * @ignore + */ on: any; constructor (cfg?: object) { @@ -218,13 +256,17 @@ class RemoteStorage { /** * Indicating if remoteStorage is currently connected. + * @ignore */ get connected (): boolean { return this.remote.connected; } - // FIXME: Instead of doing this, would be better to only - // export setAuthURL / getAuthURL from RemoteStorage prototype + /** + * FIXME: Instead of doing this, would be better to only + * export setAuthURL / getAuthURL from RemoteStorage prototype + * @ignore + */ static Authorize = Authorize; static SyncError = SyncError; @@ -234,7 +276,7 @@ class RemoteStorage { /** * Load all modules passed as arguments - * @private + * @ignore */ loadModules(): void { config.modules.forEach(this.addModule.bind(this)); @@ -251,7 +293,7 @@ class RemoteStorage { * @param {string} [options.scope] - access scope * @param {string} [options.clientId] - client identifier (defaults to the * origin of the redirectUri) - * @private + * @ignore */ authorize (options: AuthorizeOptions): void { this.access.setStorageType(this.remote.storageApi); @@ -280,7 +322,7 @@ class RemoteStorage { /** * TODO: document - * @private + * @ignore */ impliedauth (storageApi?: string, redirectUri?: string): void { // TODO shouldn't these be default argument values? @@ -459,7 +501,7 @@ class RemoteStorage { /** * TODO: document - * @private + * @ignore */ setBackend (what): void { this.backend = what; @@ -578,19 +620,61 @@ class RemoteStorage { // FEATURES INITIALIZATION // + /** + * @ignore + */ _init = Features.loadFeatures; + /** + * @ignore + */ features = Features.features; + /** + * @ignore + */ loadFeature = Features.loadFeature; + /** + * @ignore + */ featureSupported = Features.featureSupported; + /** + * @ignore + */ featureDone = Features.featureDone; + /** + * @ignore + */ featuresDone = Features.featuresDone; + /** + * @ignore + */ featuresLoaded = Features.featuresLoaded; + /** + * @ignore + */ featureInitialized = Features.featureInitialized; + /** + * @ignore + */ featureFailed = Features.featureFailed; + /** + * @ignore + */ hasFeature = Features.hasFeature; + /** + * @ignore + */ _setCachingModule = Features._setCachingModule; + /** + * @ignore + */ _collectCleanupFunctions = Features._collectCleanupFunctions; + /** + * @ignore + */ _fireReady = Features._fireReady; + /** + * @ignore + */ initFeature = Features.initFeature; // @@ -599,7 +683,7 @@ class RemoteStorage { /** * TODO: document - * @private + * @ignore */ _setGPD (impl, context?) { function wrap(func) { @@ -615,7 +699,7 @@ class RemoteStorage { /** * TODO: document - * @private + * @ignore */ _pendingGPD (methodName): () => Promise { return (...args) => { @@ -635,7 +719,7 @@ class RemoteStorage { /** * TODO: document - * @private + * @ignore */ _processPending (): void { this._pending.forEach((pending) => { @@ -654,7 +738,7 @@ class RemoteStorage { /** * TODO: document - * @private + * @ignore */ _bindChange (object: { on }): void { object.on('change', this._dispatchEvent.bind(this, 'change')); @@ -662,7 +746,7 @@ class RemoteStorage { /** * TODO: document - * @private + * @ignore */ _dispatchEvent (eventName: string, event): void { Object.keys(this._pathHandlers[eventName]).forEach((path: string) => { @@ -785,7 +869,7 @@ class RemoteStorage { /** * TODO: document - * @private + * @ignore */ syncCycle (): void { if (!this.sync || this.sync.stopped) { return; } @@ -906,7 +990,7 @@ class RemoteStorage { /** * Load module - * @private + * @ignore */ _loadModule (moduleName: string, moduleBuilder): { [key: string]: unknown } { if (moduleBuilder) { @@ -960,7 +1044,7 @@ Object.defineProperty(RemoteStorage.prototype, 'caching', { } }); -interface RemoteStorage extends EventHandling {} +export interface RemoteStorage extends EventHandling {} applyMixins(RemoteStorage, [EventHandling]); enum ApiKeyType { @@ -968,4 +1052,4 @@ enum ApiKeyType { DROPBOX = 'dropbox' } -export = RemoteStorage; +export default RemoteStorage; diff --git a/typedoc.json b/typedoc.json new file mode 100644 index 000000000..a0a26c588 --- /dev/null +++ b/typedoc.json @@ -0,0 +1,13 @@ +{ + "name": "remoteStorage.js", + "entryPoints": ["./src/remotestorage.ts", "./src/baseclient.ts", "./src/access.ts"], + "out": "./docs/rs.js/api", + "includeVersion": true, + "excludeNotDocumented": true, + "excludePrivate": true, + "excludeInternal": true, + "excludeProtected": true, + "excludeReferences": true, + "plugin": ["typedoc-plugin-markdown", "typedoc-vitepress-theme"], + "hideBreadcrumbs": true +} From 0ca541d7cf965f3b58d5b9ba5327769d11ad4b8c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A2u=20Cao?= Date: Fri, 28 Jun 2024 15:25:06 +0200 Subject: [PATCH 02/50] Content --- docs/.vitepress/config.mts | 15 +----- docs/about/api-examples.md | 49 ------------------- docs/about/markdown-examples.md | 85 --------------------------------- docs/index.md | 28 +++-------- 4 files changed, 9 insertions(+), 168 deletions(-) delete mode 100644 docs/about/api-examples.md delete mode 100644 docs/about/markdown-examples.md diff --git a/docs/.vitepress/config.mts b/docs/.vitepress/config.mts index 20e7812d3..be13bca02 100644 --- a/docs/.vitepress/config.mts +++ b/docs/.vitepress/config.mts @@ -2,29 +2,18 @@ import { defineConfig } from 'vitepress' // https://vitepress.dev/reference/site-config export default defineConfig({ - title: "remoteStorage", - description: "An open protocol for per-user storage on the Web", + title: "remoteStorage.js", + description: "", themeConfig: { logo: '/logo.svg', // https://vitepress.dev/reference/default-theme-config nav: [ { text: 'Home', link: '/' }, - { text: 'About', link: '/about/markdown-examples' }, { text: 'remoteStorage.js', link: '/rs.js/index' } ], sidebar: { - '/about/': [ - { - text: 'How it works', - items: [ - { text: 'Getting started', link: '/about/markdown-examples' }, - { text: 'Protocol', link: '/about/api-examples' } - ] - } - ], - '/rs.js/': [ { text: 'remoteStorage.js', diff --git a/docs/about/api-examples.md b/docs/about/api-examples.md deleted file mode 100644 index 6bd8bb5c1..000000000 --- a/docs/about/api-examples.md +++ /dev/null @@ -1,49 +0,0 @@ ---- -outline: deep ---- - -# Runtime API Examples - -This page demonstrates usage of some of the runtime APIs provided by VitePress. - -The main `useData()` API can be used to access site, theme, and page data for the current page. It works in both `.md` and `.vue` files: - -```md - - -## Results - -### Theme Data -
{{ theme }}
- -### Page Data -
{{ page }}
- -### Page Frontmatter -
{{ frontmatter }}
-``` - - - -## Results - -### Theme Data -
{{ theme }}
- -### Page Data -
{{ page }}
- -### Page Frontmatter -
{{ frontmatter }}
- -## More - -Check out the documentation for the [full list of runtime APIs](https://vitepress.dev/reference/runtime-api#usedata). diff --git a/docs/about/markdown-examples.md b/docs/about/markdown-examples.md deleted file mode 100644 index f9258a550..000000000 --- a/docs/about/markdown-examples.md +++ /dev/null @@ -1,85 +0,0 @@ -# Markdown Extension Examples - -This page demonstrates some of the built-in markdown extensions provided by VitePress. - -## Syntax Highlighting - -VitePress provides Syntax Highlighting powered by [Shiki](https://github.com/shikijs/shiki), with additional features like line-highlighting: - -**Input** - -````md -```js{4} -export default { - data () { - return { - msg: 'Highlighted!' - } - } -} -``` -```` - -**Output** - -```js{4} -export default { - data () { - return { - msg: 'Highlighted!' - } - } -} -``` - -## Custom Containers - -**Input** - -```md -::: info -This is an info box. -::: - -::: tip -This is a tip. -::: - -::: warning -This is a warning. -::: - -::: danger -This is a dangerous warning. -::: - -::: details -This is a details block. -::: -``` - -**Output** - -::: info -This is an info box. -::: - -::: tip -This is a tip. -::: - -::: warning -This is a warning. -::: - -::: danger -This is a dangerous warning. -::: - -::: details -This is a details block. -::: - -## More - -Check out the documentation for the [full list of markdown extensions](https://vitepress.dev/guide/markdown). diff --git a/docs/index.md b/docs/index.md index 06f577397..773ab0605 100644 --- a/docs/index.md +++ b/docs/index.md @@ -3,31 +3,17 @@ layout: home hero: - name: "remoteStorage" + name: "remoteStorage.js" text: - tagline: An open protocol for per-user storage on the Web + tagline: Documentation for local usage/development actions: - - theme: brand - text: Markdown Examples - link: /about/markdown-examples - - theme: alt - text: API Examples - link: /about/api-examples - -features: - - title: Feature A - details: Lorem ipsum dolor sit amet, consectetur adipiscing elit - - title: Feature B - details: Lorem ipsum dolor sit amet, consectetur adipiscing elit - - title: Feature C - details: Lorem ipsum dolor sit amet, consectetur adipiscing elit --- ## Getting Started -You can get started using VitePress right away using `npx`! +This is just a preview site for running the remoteStorage.js docs locally. It allows +you to change, extend, and maintain the documentation sources without building the rest +of the remoteStorage website. -```sh -npm init -npx vitepress init -``` +The published documentation is built from the website repo. Please see [TODO +add link]() for more information. From e6d9cc36ad40362453938931d854ba7e1ca930c3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A2u=20Cao?= Date: Fri, 28 Jun 2024 15:43:09 +0200 Subject: [PATCH 03/50] Remove obsolete index --- docs/about/index.md | 25 ------------------------- 1 file changed, 25 deletions(-) delete mode 100644 docs/about/index.md diff --git a/docs/about/index.md b/docs/about/index.md deleted file mode 100644 index b10ea29ba..000000000 --- a/docs/about/index.md +++ /dev/null @@ -1,25 +0,0 @@ ---- -# https://vitepress.dev/reference/default-theme-home-page -layout: home - -hero: - name: "remoteStorage" - text: - tagline: An open protocol for per-user storage on the Web - actions: - - theme: brand - text: Markdown Examples - link: /markdown-examples - - theme: alt - text: API Examples - link: /api-examples - -features: - - title: Feature A - details: Lorem ipsum dolor sit amet, consectetur adipiscing elit - - title: Feature B - details: Lorem ipsum dolor sit amet, consectetur adipiscing elit - - title: Feature C - details: Lorem ipsum dolor sit amet, consectetur adipiscing elit ---- - From 5e178b6b7968fce4a96c43ba187e68ab1f2b952d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A2u=20Cao?= Date: Fri, 28 Jun 2024 15:46:24 +0200 Subject: [PATCH 04/50] Change folder structure, remove VitePress home page --- docs/{rs.js => }/api/access/classes/Access.md | 14 +++---- docs/{rs.js => }/api/access/index.md | 0 .../api/baseclient/classes/BaseClient.md | 30 +++++++-------- docs/{rs.js => }/api/baseclient/index.md | 0 docs/{rs.js => }/api/index.md | 0 docs/{rs.js => }/api/modules.md | 0 .../remotestorage/classes/RemoteStorage.md | 38 +++++++++---------- docs/{rs.js => }/api/remotestorage/index.md | 0 docs/api/typedoc-sidebar.json | 1 + docs/index.md | 19 +--------- docs/logo.svg | 18 --------- docs/rs.js/index.md | 0 typedoc.json | 2 +- 13 files changed, 44 insertions(+), 78 deletions(-) rename docs/{rs.js => }/api/access/classes/Access.md (82%) rename docs/{rs.js => }/api/access/index.md (100%) rename docs/{rs.js => }/api/baseclient/classes/BaseClient.md (88%) rename docs/{rs.js => }/api/baseclient/index.md (100%) rename docs/{rs.js => }/api/index.md (100%) rename docs/{rs.js => }/api/modules.md (100%) rename docs/{rs.js => }/api/remotestorage/classes/RemoteStorage.md (87%) rename docs/{rs.js => }/api/remotestorage/index.md (100%) create mode 100644 docs/api/typedoc-sidebar.json delete mode 100644 docs/logo.svg delete mode 100644 docs/rs.js/index.md diff --git a/docs/rs.js/api/access/classes/Access.md b/docs/api/access/classes/Access.md similarity index 82% rename from docs/rs.js/api/access/classes/Access.md rename to docs/api/access/classes/Access.md index 2edceea46..1d9d1046c 100644 --- a/docs/rs.js/api/access/classes/Access.md +++ b/docs/api/access/classes/Access.md @@ -22,7 +22,7 @@ Holds an array of claimed scopes: #### Source -[access.ts:44](https://github.com/remotestorage/remotestorage.js/blob/9b126479fa187d3d9af88a42c7c271be1fd71c06/src/access.ts#L44) +[access.ts:44](https://github.com/remotestorage/remotestorage.js/blob/4becb1901daee467dbfa441504b8a183899c93a2/src/access.ts#L44) ## Methods @@ -50,7 +50,7 @@ true if the requested access mode is active, false otherwise #### Source -[access.ts:120](https://github.com/remotestorage/remotestorage.js/blob/9b126479fa187d3d9af88a42c7c271be1fd71c06/src/access.ts#L120) +[access.ts:120](https://github.com/remotestorage/remotestorage.js/blob/4becb1901daee467dbfa441504b8a183899c93a2/src/access.ts#L120) *** @@ -78,7 +78,7 @@ true if the requested access mode is active, false otherwise #### Source -[access.ts:108](https://github.com/remotestorage/remotestorage.js/blob/9b126479fa187d3d9af88a42c7c271be1fd71c06/src/access.ts#L108) +[access.ts:108](https://github.com/remotestorage/remotestorage.js/blob/4becb1901daee467dbfa441504b8a183899c93a2/src/access.ts#L108) *** @@ -104,7 +104,7 @@ Access mode. Either "r" for read-only or "rw" for read/write #### Source -[access.ts:62](https://github.com/remotestorage/remotestorage.js/blob/9b126479fa187d3d9af88a42c7c271be1fd71c06/src/access.ts#L62) +[access.ts:62](https://github.com/remotestorage/remotestorage.js/blob/4becb1901daee467dbfa441504b8a183899c93a2/src/access.ts#L62) *** @@ -128,7 +128,7 @@ Access mode #### Source -[access.ts:79](https://github.com/remotestorage/remotestorage.js/blob/9b126479fa187d3d9af88a42c7c271be1fd71c06/src/access.ts#L79) +[access.ts:79](https://github.com/remotestorage/remotestorage.js/blob/4becb1901daee467dbfa441504b8a183899c93a2/src/access.ts#L79) *** @@ -150,7 +150,7 @@ Access scope #### Source -[access.ts:89](https://github.com/remotestorage/remotestorage.js/blob/9b126479fa187d3d9af88a42c7c271be1fd71c06/src/access.ts#L89) +[access.ts:89](https://github.com/remotestorage/remotestorage.js/blob/4becb1901daee467dbfa441504b8a183899c93a2/src/access.ts#L89) *** @@ -166,4 +166,4 @@ Reset all access permissions. #### Source -[access.ts:132](https://github.com/remotestorage/remotestorage.js/blob/9b126479fa187d3d9af88a42c7c271be1fd71c06/src/access.ts#L132) +[access.ts:132](https://github.com/remotestorage/remotestorage.js/blob/4becb1901daee467dbfa441504b8a183899c93a2/src/access.ts#L132) diff --git a/docs/rs.js/api/access/index.md b/docs/api/access/index.md similarity index 100% rename from docs/rs.js/api/access/index.md rename to docs/api/access/index.md diff --git a/docs/rs.js/api/baseclient/classes/BaseClient.md b/docs/api/baseclient/classes/BaseClient.md similarity index 88% rename from docs/rs.js/api/baseclient/classes/BaseClient.md rename to docs/api/baseclient/classes/BaseClient.md index 16e5414f9..8c22e3872 100644 --- a/docs/rs.js/api/baseclient/classes/BaseClient.md +++ b/docs/api/baseclient/classes/BaseClient.md @@ -19,7 +19,7 @@ corresponding publicClient `/public//`. #### Source -[baseclient.ts:32](https://github.com/remotestorage/remotestorage.js/blob/9b126479fa187d3d9af88a42c7c271be1fd71c06/src/baseclient.ts#L32) +[baseclient.ts:32](https://github.com/remotestorage/remotestorage.js/blob/4becb1901daee467dbfa441504b8a183899c93a2/src/baseclient.ts#L32) *** @@ -31,7 +31,7 @@ The [RemoteStorage](../../remotestorage/classes/RemoteStorage.md) instance this #### Source -[baseclient.ts:24](https://github.com/remotestorage/remotestorage.js/blob/9b126479fa187d3d9af88a42c7c271be1fd71c06/src/baseclient.ts#L24) +[baseclient.ts:24](https://github.com/remotestorage/remotestorage.js/blob/4becb1901daee467dbfa441504b8a183899c93a2/src/baseclient.ts#L24) ## Methods @@ -63,7 +63,7 @@ The same instance this is called on to allow for method chaining #### Source -[baseclient.ts:321](https://github.com/remotestorage/remotestorage.js/blob/9b126479fa187d3d9af88a42c7c271be1fd71c06/src/baseclient.ts#L321) +[baseclient.ts:321](https://github.com/remotestorage/remotestorage.js/blob/4becb1901daee467dbfa441504b8a183899c93a2/src/baseclient.ts#L321) *** @@ -93,7 +93,7 @@ A JSON Schema object describing the object type #### Source -[baseclient.ts:358](https://github.com/remotestorage/remotestorage.js/blob/9b126479fa187d3d9af88a42c7c271be1fd71c06/src/baseclient.ts#L358) +[baseclient.ts:358](https://github.com/remotestorage/remotestorage.js/blob/4becb1901daee467dbfa441504b8a183899c93a2/src/baseclient.ts#L358) *** @@ -113,7 +113,7 @@ TODO: document #### Source -[baseclient.ts:345](https://github.com/remotestorage/remotestorage.js/blob/9b126479fa187d3d9af88a42c7c271be1fd71c06/src/baseclient.ts#L345) +[baseclient.ts:345](https://github.com/remotestorage/remotestorage.js/blob/4becb1901daee467dbfa441504b8a183899c93a2/src/baseclient.ts#L345) *** @@ -142,7 +142,7 @@ A promise for an object #### Source -[baseclient.ts:100](https://github.com/remotestorage/remotestorage.js/blob/9b126479fa187d3d9af88a42c7c271be1fd71c06/src/baseclient.ts#L100) +[baseclient.ts:100](https://github.com/remotestorage/remotestorage.js/blob/4becb1901daee467dbfa441504b8a183899c93a2/src/baseclient.ts#L100) *** @@ -173,7 +173,7 @@ A promise for an object #### Source -[baseclient.ts:144](https://github.com/remotestorage/remotestorage.js/blob/9b126479fa187d3d9af88a42c7c271be1fd71c06/src/baseclient.ts#L144) +[baseclient.ts:144](https://github.com/remotestorage/remotestorage.js/blob/4becb1901daee467dbfa441504b8a183899c93a2/src/baseclient.ts#L144) *** @@ -199,7 +199,7 @@ The full URL of the item, including the storage origin #### Source -[baseclient.ts:297](https://github.com/remotestorage/remotestorage.js/blob/9b126479fa187d3d9af88a42c7c271be1fd71c06/src/baseclient.ts#L297) +[baseclient.ts:297](https://github.com/remotestorage/remotestorage.js/blob/4becb1901daee467dbfa441504b8a183899c93a2/src/baseclient.ts#L297) *** @@ -228,7 +228,7 @@ A promise for an object representing child nodes #### Source -[baseclient.ts:79](https://github.com/remotestorage/remotestorage.js/blob/9b126479fa187d3d9af88a42c7c271be1fd71c06/src/baseclient.ts#L79) +[baseclient.ts:79](https://github.com/remotestorage/remotestorage.js/blob/4becb1901daee467dbfa441504b8a183899c93a2/src/baseclient.ts#L79) *** @@ -259,7 +259,7 @@ A promise, which resolves with the requested object (or ``null`` #### Source -[baseclient.ts:203](https://github.com/remotestorage/remotestorage.js/blob/9b126479fa187d3d9af88a42c7c271be1fd71c06/src/baseclient.ts#L203) +[baseclient.ts:203](https://github.com/remotestorage/remotestorage.js/blob/4becb1901daee467dbfa441504b8a183899c93a2/src/baseclient.ts#L203) *** @@ -281,7 +281,7 @@ Path relative to the module root. #### Source -[baseclient.ts:278](https://github.com/remotestorage/remotestorage.js/blob/9b126479fa187d3d9af88a42c7c271be1fd71c06/src/baseclient.ts#L278) +[baseclient.ts:278](https://github.com/remotestorage/remotestorage.js/blob/4becb1901daee467dbfa441504b8a183899c93a2/src/baseclient.ts#L278) *** @@ -306,7 +306,7 @@ A new client operating on a subpath of the current base path #### Source -[baseclient.ts:65](https://github.com/remotestorage/remotestorage.js/blob/9b126479fa187d3d9af88a42c7c271be1fd71c06/src/baseclient.ts#L65) +[baseclient.ts:65](https://github.com/remotestorage/remotestorage.js/blob/4becb1901daee467dbfa441504b8a183899c93a2/src/baseclient.ts#L65) *** @@ -338,7 +338,7 @@ A promise for the created/updated revision (ETag) #### Source -[baseclient.ts:167](https://github.com/remotestorage/remotestorage.js/blob/9b126479fa187d3d9af88a42c7c271be1fd71c06/src/baseclient.ts#L167) +[baseclient.ts:167](https://github.com/remotestorage/remotestorage.js/blob/4becb1901daee467dbfa441504b8a183899c93a2/src/baseclient.ts#L167) *** @@ -377,7 +377,7 @@ Resolves with revision on success. Rejects with #### Source -[baseclient.ts:240](https://github.com/remotestorage/remotestorage.js/blob/9b126479fa187d3d9af88a42c7c271be1fd71c06/src/baseclient.ts#L240) +[baseclient.ts:240](https://github.com/remotestorage/remotestorage.js/blob/4becb1901daee467dbfa441504b8a183899c93a2/src/baseclient.ts#L240) *** @@ -401,4 +401,4 @@ An object containing information about validation errors #### Source -[baseclient.ts:380](https://github.com/remotestorage/remotestorage.js/blob/9b126479fa187d3d9af88a42c7c271be1fd71c06/src/baseclient.ts#L380) +[baseclient.ts:380](https://github.com/remotestorage/remotestorage.js/blob/4becb1901daee467dbfa441504b8a183899c93a2/src/baseclient.ts#L380) diff --git a/docs/rs.js/api/baseclient/index.md b/docs/api/baseclient/index.md similarity index 100% rename from docs/rs.js/api/baseclient/index.md rename to docs/api/baseclient/index.md diff --git a/docs/rs.js/api/index.md b/docs/api/index.md similarity index 100% rename from docs/rs.js/api/index.md rename to docs/api/index.md diff --git a/docs/rs.js/api/modules.md b/docs/api/modules.md similarity index 100% rename from docs/rs.js/api/modules.md rename to docs/api/modules.md diff --git a/docs/rs.js/api/remotestorage/classes/RemoteStorage.md b/docs/api/remotestorage/classes/RemoteStorage.md similarity index 87% rename from docs/rs.js/api/remotestorage/classes/RemoteStorage.md rename to docs/api/remotestorage/classes/RemoteStorage.md index 1a2d8e3b5..70fadd4c9 100644 --- a/docs/rs.js/api/remotestorage/classes/RemoteStorage.md +++ b/docs/api/remotestorage/classes/RemoteStorage.md @@ -58,7 +58,7 @@ The user address (user@host) or URL to connect to. #### Source -[remotestorage.ts:377](https://github.com/remotestorage/remotestorage.js/blob/9b126479fa187d3d9af88a42c7c271be1fd71c06/src/remotestorage.ts#L377) +[remotestorage.ts:377](https://github.com/remotestorage/remotestorage.js/blob/4becb1901daee467dbfa441504b8a183899c93a2/src/remotestorage.ts#L377) *** @@ -76,7 +76,7 @@ Disable remoteStorage logging #### Source -[remotestorage.ts:550](https://github.com/remotestorage/remotestorage.js/blob/9b126479fa187d3d9af88a42c7c271be1fd71c06/src/remotestorage.ts#L550) +[remotestorage.ts:550](https://github.com/remotestorage/remotestorage.js/blob/4becb1901daee467dbfa441504b8a183899c93a2/src/remotestorage.ts#L550) *** @@ -95,7 +95,7 @@ cache. #### Source -[remotestorage.ts:460](https://github.com/remotestorage/remotestorage.js/blob/9b126479fa187d3d9af88a42c7c271be1fd71c06/src/remotestorage.ts#L460) +[remotestorage.ts:460](https://github.com/remotestorage/remotestorage.js/blob/4becb1901daee467dbfa441504b8a183899c93a2/src/remotestorage.ts#L460) *** @@ -113,7 +113,7 @@ Enable remoteStorage logging. #### Source -[remotestorage.ts:541](https://github.com/remotestorage/remotestorage.js/blob/9b126479fa187d3d9af88a42c7c271be1fd71c06/src/remotestorage.ts#L541) +[remotestorage.ts:541](https://github.com/remotestorage/remotestorage.js/blob/4becb1901daee467dbfa441504b8a183899c93a2/src/remotestorage.ts#L541) *** @@ -131,7 +131,7 @@ A number of milliseconds #### Source -[remotestorage.ts:820](https://github.com/remotestorage/remotestorage.js/blob/9b126479fa187d3d9af88a42c7c271be1fd71c06/src/remotestorage.ts#L820) +[remotestorage.ts:820](https://github.com/remotestorage/remotestorage.js/blob/4becb1901daee467dbfa441504b8a183899c93a2/src/remotestorage.ts#L820) *** @@ -150,7 +150,7 @@ A number of milliseconds #### Source -[remotestorage.ts:845](https://github.com/remotestorage/remotestorage.js/blob/9b126479fa187d3d9af88a42c7c271be1fd71c06/src/remotestorage.ts#L845) +[remotestorage.ts:845](https://github.com/remotestorage/remotestorage.js/blob/4becb1901daee467dbfa441504b8a183899c93a2/src/remotestorage.ts#L845) *** @@ -168,7 +168,7 @@ A number of milliseconds #### Source -[remotestorage.ts:854](https://github.com/remotestorage/remotestorage.js/blob/9b126479fa187d3d9af88a42c7c271be1fd71c06/src/remotestorage.ts#L854) +[remotestorage.ts:854](https://github.com/remotestorage/remotestorage.js/blob/4becb1901daee467dbfa441504b8a183899c93a2/src/remotestorage.ts#L854) *** @@ -186,7 +186,7 @@ A number of milliseconds #### Source -[remotestorage.ts:797](https://github.com/remotestorage/remotestorage.js/blob/9b126479fa187d3d9af88a42c7c271be1fd71c06/src/remotestorage.ts#L797) +[remotestorage.ts:797](https://github.com/remotestorage/remotestorage.js/blob/4becb1901daee467dbfa441504b8a183899c93a2/src/remotestorage.ts#L797) *** @@ -208,7 +208,7 @@ The same as . #### Source -[remotestorage.ts:559](https://github.com/remotestorage/remotestorage.js/blob/9b126479fa187d3d9af88a42c7c271be1fd71c06/src/remotestorage.ts#L559) +[remotestorage.ts:559](https://github.com/remotestorage/remotestorage.js/blob/4becb1901daee467dbfa441504b8a183899c93a2/src/remotestorage.ts#L559) *** @@ -240,7 +240,7 @@ Handler function #### Source -[remotestorage.ts:529](https://github.com/remotestorage/remotestorage.js/blob/9b126479fa187d3d9af88a42c7c271be1fd71c06/src/remotestorage.ts#L529) +[remotestorage.ts:529](https://github.com/remotestorage/remotestorage.js/blob/4becb1901daee467dbfa441504b8a183899c93a2/src/remotestorage.ts#L529) *** @@ -256,7 +256,7 @@ Reconnect the remote server to get a new authorization. #### Source -[remotestorage.ts:444](https://github.com/remotestorage/remotestorage.js/blob/9b126479fa187d3d9af88a42c7c271be1fd71c06/src/remotestorage.ts#L444) +[remotestorage.ts:444](https://github.com/remotestorage/remotestorage.js/blob/4becb1901daee467dbfa441504b8a183899c93a2/src/remotestorage.ts#L444) *** @@ -285,7 +285,7 @@ A client with the specified scope (category/base directory) #### Source -[remotestorage.ts:782](https://github.com/remotestorage/remotestorage.js/blob/9b126479fa187d3d9af88a42c7c271be1fd71c06/src/remotestorage.ts#L782) +[remotestorage.ts:782](https://github.com/remotestorage/remotestorage.js/blob/4becb1901daee467dbfa441504b8a183899c93a2/src/remotestorage.ts#L782) *** @@ -311,7 +311,7 @@ A config object with these properties: #### Source -[remotestorage.ts:570](https://github.com/remotestorage/remotestorage.js/blob/9b126479fa187d3d9af88a42c7c271be1fd71c06/src/remotestorage.ts#L570) +[remotestorage.ts:570](https://github.com/remotestorage/remotestorage.js/blob/4becb1901daee467dbfa441504b8a183899c93a2/src/remotestorage.ts#L570) *** @@ -334,7 +334,7 @@ Sync interval in milliseconds (between 2000 and 3600000 [1 hour]) #### Source -[remotestorage.ts:830](https://github.com/remotestorage/remotestorage.js/blob/9b126479fa187d3d9af88a42c7c271be1fd71c06/src/remotestorage.ts#L830) +[remotestorage.ts:830](https://github.com/remotestorage/remotestorage.js/blob/4becb1901daee467dbfa441504b8a183899c93a2/src/remotestorage.ts#L830) *** @@ -357,7 +357,7 @@ A valid HTTP(S) URI #### Source -[remotestorage.ts:612](https://github.com/remotestorage/remotestorage.js/blob/9b126479fa187d3d9af88a42c7c271be1fd71c06/src/remotestorage.ts#L612) +[remotestorage.ts:612](https://github.com/remotestorage/remotestorage.js/blob/4becb1901daee467dbfa441504b8a183899c93a2/src/remotestorage.ts#L612) *** @@ -379,7 +379,7 @@ Timeout in milliseconds #### Source -[remotestorage.ts:863](https://github.com/remotestorage/remotestorage.js/blob/9b126479fa187d3d9af88a42c7c271be1fd71c06/src/remotestorage.ts#L863) +[remotestorage.ts:863](https://github.com/remotestorage/remotestorage.js/blob/4becb1901daee467dbfa441504b8a183899c93a2/src/remotestorage.ts#L863) *** @@ -401,7 +401,7 @@ Sync interval in milliseconds (between 2000 and 3600000 [1 hour]) #### Source -[remotestorage.ts:806](https://github.com/remotestorage/remotestorage.js/blob/9b126479fa187d3d9af88a42c7c271be1fd71c06/src/remotestorage.ts#L806) +[remotestorage.ts:806](https://github.com/remotestorage/remotestorage.js/blob/4becb1901daee467dbfa441504b8a183899c93a2/src/remotestorage.ts#L806) *** @@ -426,7 +426,7 @@ A Promise which resolves when the sync has finished #### Source -[remotestorage.ts:904](https://github.com/remotestorage/remotestorage.js/blob/9b126479fa187d3d9af88a42c7c271be1fd71c06/src/remotestorage.ts#L904) +[remotestorage.ts:904](https://github.com/remotestorage/remotestorage.js/blob/4becb1901daee467dbfa441504b8a183899c93a2/src/remotestorage.ts#L904) *** @@ -442,4 +442,4 @@ Stop the periodic synchronization. #### Source -[remotestorage.ts:917](https://github.com/remotestorage/remotestorage.js/blob/9b126479fa187d3d9af88a42c7c271be1fd71c06/src/remotestorage.ts#L917) +[remotestorage.ts:917](https://github.com/remotestorage/remotestorage.js/blob/4becb1901daee467dbfa441504b8a183899c93a2/src/remotestorage.ts#L917) diff --git a/docs/rs.js/api/remotestorage/index.md b/docs/api/remotestorage/index.md similarity index 100% rename from docs/rs.js/api/remotestorage/index.md rename to docs/api/remotestorage/index.md diff --git a/docs/api/typedoc-sidebar.json b/docs/api/typedoc-sidebar.json new file mode 100644 index 000000000..b65d86f37 --- /dev/null +++ b/docs/api/typedoc-sidebar.json @@ -0,0 +1 @@ +[{"text":"access","link":"/docs/api/access/","collapsed":true,"items":[{"text":"Classes","collapsed":true,"items":[{"text":"Access","link":"/docs/api/access/classes/Access.md"}]}]},{"text":"baseclient","link":"/docs/api/baseclient/","collapsed":true,"items":[{"text":"Classes","collapsed":true,"items":[{"text":"BaseClient","link":"/docs/api/baseclient/classes/BaseClient.md"}]}]},{"text":"remotestorage","link":"/docs/api/remotestorage/","collapsed":true,"items":[{"text":"Classes","collapsed":true,"items":[{"text":"RemoteStorage","link":"/docs/api/remotestorage/classes/RemoteStorage.md"}]}]}] \ No newline at end of file diff --git a/docs/index.md b/docs/index.md index 773ab0605..37f547a01 100644 --- a/docs/index.md +++ b/docs/index.md @@ -1,19 +1,2 @@ ---- -# https://vitepress.dev/reference/default-theme-home-page -layout: home +# remoteStorage.js -hero: - name: "remoteStorage.js" - text: - tagline: Documentation for local usage/development - actions: ---- - -## Getting Started - -This is just a preview site for running the remoteStorage.js docs locally. It allows -you to change, extend, and maintain the documentation sources without building the rest -of the remoteStorage website. - -The published documentation is built from the website repo. Please see [TODO -add link]() for more information. diff --git a/docs/logo.svg b/docs/logo.svg deleted file mode 100644 index a4813a56d..000000000 --- a/docs/logo.svg +++ /dev/null @@ -1,18 +0,0 @@ - - - - - - - - - - - - diff --git a/docs/rs.js/index.md b/docs/rs.js/index.md deleted file mode 100644 index e69de29bb..000000000 diff --git a/typedoc.json b/typedoc.json index a0a26c588..5195f4b81 100644 --- a/typedoc.json +++ b/typedoc.json @@ -1,7 +1,7 @@ { "name": "remoteStorage.js", "entryPoints": ["./src/remotestorage.ts", "./src/baseclient.ts", "./src/access.ts"], - "out": "./docs/rs.js/api", + "out": "./docs/api", "includeVersion": true, "excludeNotDocumented": true, "excludePrivate": true, From abf25a5024614c659808078d6851998ac03d2276 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A2u=20Cao?= Date: Fri, 28 Jun 2024 16:14:00 +0200 Subject: [PATCH 05/50] Menus, content --- docs/.vitepress/config.mts | 42 ++++++++++---------- docs/api/index.md | 80 +------------------------------------- docs/index.md | 5 ++- 3 files changed, 25 insertions(+), 102 deletions(-) diff --git a/docs/.vitepress/config.mts b/docs/.vitepress/config.mts index be13bca02..47fb7aaca 100644 --- a/docs/.vitepress/config.mts +++ b/docs/.vitepress/config.mts @@ -5,32 +5,30 @@ export default defineConfig({ title: "remoteStorage.js", description: "", themeConfig: { - logo: '/logo.svg', - // https://vitepress.dev/reference/default-theme-config nav: [ - { text: 'Home', link: '/' }, - { text: 'remoteStorage.js', link: '/rs.js/index' } + { text: 'Guide', link: '/' }, + { text: 'Reference', link: '/api' }, ], - sidebar: { - '/rs.js/': [ - { - text: 'remoteStorage.js', - items: [ - { text: 'Welcome', link: '/rs.js/index' }, - ] - }, - { - text: 'JavaScript API', - items: [ - { text: 'RemoteStorage', link: '/rs.js/api/remotestorage/classes/RemoteStorage' }, - { text: 'BaseClient', link: '/rs.js/api/baseclient/classes/BaseClient' }, - { text: 'Access', link: '/rs.js/api/access/classes/Access' }, - ] - } - ] - }, + sidebar: [ + { + text: 'Guide', + link: '/', + items: [ + { text: 'Welcome', link: '/' }, + ] + }, + { + text: 'JavaScript API', + link: '/api', + items: [ + { text: 'RemoteStorage', link: '/api/remotestorage/classes/RemoteStorage' }, + { text: 'BaseClient', link: '/api/baseclient/classes/BaseClient' }, + { text: 'Access', link: '/api/access/classes/Access' }, + ] + } + ], socialLinks: [ { icon: 'github', link: 'https://github.com/remotestorage/remotestorage.js' } diff --git a/docs/api/index.md b/docs/api/index.md index af641c0cf..2654d1b19 100644 --- a/docs/api/index.md +++ b/docs/api/index.md @@ -1,80 +1,2 @@ -# remoteStorage.js +# JavaScript API -[![npm](https://img.shields.io/npm/v/remotestoragejs.svg)](https://www.npmjs.com/package/remotestoragejs) -[![Build Status](https://github.com/remotestorage/remotestorage.js/actions/workflows/test-and-lint.yml/badge.svg)](https://github.com/remotestorage/remotestorage.js/actions/workflows/test-and-lint.yml?query=branch%3Amaster) - -remoteStorage.js is a JavaScript library for storing user data locally in the -browser, as well as connecting to [remoteStorage](http://remotestorage.io) -servers and syncing data across devices and applications. It is also capable of -connecting and syncing data with a person's Dropbox or Google Drive account -(optional). - -The library is well-tested and actively maintained. It is safe to use in -production. - -### Where to get help? - -* See [remotestorage.io](http://remotestorage.io/) for general information - about the remoteStorage protocol -* Read [the docs](http://remotestoragejs.readthedocs.io/) (source files in `doc/`) - * [Why use this?](https://remotestoragejs.readthedocs.io/en/latest/why.html) - * [Getting started](https://remotestoragejs.readthedocs.io/en/latest/getting-started.html) - * [Data modules](https://remotestoragejs.readthedocs.io/en/latest/data-modules.html) - * [JavaScript API](https://remotestoragejs.readthedocs.io/en/latest/js-api.html) - * [Usage with Node.js](https://remotestoragejs.readthedocs.io/en/latest/nodejs.html) -* Ask questions on the [community forums](https://community.remotestorage.io/) -* Ask questions on IRC in [#remotestorage on Libera.Chat](ircs://irc.libera.chat:6697/remotestorage) - ([Web Chat](https://web.libera.chat/#remotestorage)) - (wait a bit, if nobody's responding right away) -* If you found a potential bug, or want to propose a change, [open an issue on - GitHub](https://github.com/remotestorage/remotestorage.js/issues). New issues - will usually receive a response within 24-48 hours. - -### Running a local test server - -To develop remoteStorage-enabled apps, you need to have a -remoteStorage-compatible storage account. We recommend -[php-remote-storage](https://github.com/fkooman/php-remote-storage) (PHP), or -[armadietto](https://github.com/remotestorage/armadietto) (node.js), or -[mysteryshack](https://github.com/untitaker/mysteryshack) (Rust) for running a -local test server, or for self-hosting an RS server. - -You can also get an account with a hoster, or use another -remoteStorage server implementation: [Servers](https://wiki.remotestorage.io/Servers). - -### Visual File Browser - -If you'd like a visual UI for inspecting any RS-compatible account, you can use the [RS Inspektor](https://gitea.kosmos.org/raucao/inspektor) app (which is also implemented using this library). - -### Developing, Contributing - -remoteStorage.js is a grassroots project, developed by the community, for the -community. We'd be happy to count you among the many [people who -contributed](https://github.com/remotestorage/remotestorage.js/graphs/contributors) -to the project so far! - -Read our [Contributing docs](https://remotestoragejs.readthedocs.io/en/latest/contributing.html) -to get started. - -### Versioning - -We adhere to [Semantic Versioning](http://semver.org/). This means that -breaking changes will result in a new major version. With npm, you can make -sure to only automatically upgrade to API-compatible versions by using either -the `^` prefix, or `x` as indicator for flexible numbers: - -```js -"devDependencies": { - "remotestoragejs": "1.x" // same as "^1.0.0" -} -``` - -### Credits - -Original authors: Niklas Cathor, Michiel de Jong - -See [list of all contributors](https://github.com/remotestorage/remotestorage.js/graphs/contributors) - -Previously sponsored by [NLnet](https://nlnet.nl) - -[![NLnet Logo](http://sockethub.org/res/img/nlnet-logo.svg)](https://nlnet.nl) diff --git a/docs/index.md b/docs/index.md index 37f547a01..fa4aa6d46 100644 --- a/docs/index.md +++ b/docs/index.md @@ -1,2 +1,5 @@ -# remoteStorage.js +--- +layout: doc +--- +# remoteStorage.js From b56244bd9ea56c87e69caecc6b78f957fa1af393 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A2u=20Cao?= Date: Fri, 28 Jun 2024 16:53:32 +0200 Subject: [PATCH 06/50] Sidebar --- docs/.vitepress/config.mts | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/docs/.vitepress/config.mts b/docs/.vitepress/config.mts index 47fb7aaca..ca98d27a2 100644 --- a/docs/.vitepress/config.mts +++ b/docs/.vitepress/config.mts @@ -2,21 +2,26 @@ import { defineConfig } from 'vitepress' // https://vitepress.dev/reference/site-config export default defineConfig({ - title: "remoteStorage.js", + title: "Documentation", description: "", themeConfig: { // https://vitepress.dev/reference/default-theme-config nav: [ - { text: 'Guide', link: '/' }, - { text: 'Reference', link: '/api' }, + { text: 'remoteStorage.js', link: '/' }, ], sidebar: [ { - text: 'Guide', + text: 'remoteStorage.js', link: '/', items: [ - { text: 'Welcome', link: '/' }, + ] + }, + { + text: 'Guide', + items: [ + { text: 'Why use this?', link: '/why' }, + { text: 'Getting started', link: '/getting-started' }, ] }, { From 57341d99b4c8b2229f462f7050e746ef0fefa05e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A2u=20Cao?= Date: Sun, 30 Jun 2024 14:05:30 +0200 Subject: [PATCH 07/50] Add Caching doc, finish porting Access doc --- doc/js-api/access.rst | 26 -------------------- docs/api/modules.md | 1 + src/access.ts | 57 ++++++++++++++++++++++++++++--------------- src/caching.ts | 4 +-- typedoc.json | 12 +++++++-- 5 files changed, 50 insertions(+), 50 deletions(-) delete mode 100644 doc/js-api/access.rst diff --git a/doc/js-api/access.rst b/doc/js-api/access.rst deleted file mode 100644 index 3bbfd3b35..000000000 --- a/doc/js-api/access.rst +++ /dev/null @@ -1,26 +0,0 @@ -Access -====== - -This class is for requesting and managing access to modules/folders on -the remote. It gets initialized as ``remoteStorage.access``. - -List of functions ------------------ - -.. autofunction:: Access#claim(scope, mode) - :short-name: - - Example: - - .. code:: javascript - - remoteStorage.access.claim('contacts', 'r'); - remoteStorage.access.claim('pictures', 'rw'); - - Claiming root access, meaning complete access to all files and folders - of a storage, can be done using an asterisk for the scope: - - .. code:: javascript - - remoteStorage.access.claim('*', 'rw'); - diff --git a/docs/api/modules.md b/docs/api/modules.md index ac5ebe055..483cadb5b 100644 --- a/docs/api/modules.md +++ b/docs/api/modules.md @@ -4,4 +4,5 @@ - [access](access/index.md) - [baseclient](baseclient/index.md) +- [caching](caching/index.md) - [remotestorage](remotestorage/index.md) diff --git a/src/access.ts b/src/access.ts index 6a3424f09..47c69890e 100644 --- a/src/access.ts +++ b/src/access.ts @@ -1,7 +1,5 @@ -// TODO maybe move to common interfaces & types file -// also worth considering enums -type AccessMode = 'r' | 'rw'; -type AccessScope = string; +export type AccessMode = 'r' | 'rw'; +export type AccessScope = string; interface ScopeEntry { name: string; @@ -16,7 +14,8 @@ interface ScopeModeMap { /** * @class * - * Keeps track of claimed access and scopes. + * This class is for requesting and managing access to modules/folders on the + * remote. It gets initialized as `remoteStorage.access`. */ export class Access { scopeModeMap: ScopeModeMap; @@ -33,13 +32,13 @@ export class Access { } /** - * Property: scopes - * * Holds an array of claimed scopes: * - * ```js + * ```javascript * [{ name: "", mode: "" }] * ``` + * + * @ignore */ get scopes(): ScopeEntry[] { return Object.keys(this.scopeModeMap).map((key) => { @@ -56,8 +55,20 @@ export class Access { /** * Claim access on a given scope with given mode. * - * @param {string} scope - An access scope, such as "contacts" or "calendar" - * @param {string} mode - Access mode. Either "r" for read-only or "rw" for read/write + * @param scope - An access scope, such as `contacts` or `calendar` + * @param mode - Access mode. Either `r` for read-only or `rw` for read/write + * + * @example + * ```javascript + * remoteStorage.access.claim('contacts', 'r'); + * remoteStorage.access.claim('pictures', 'rw'); + * ``` + * + * Claiming root access, meaning complete access to all files and folders of a storage, can be done using an asterisk for the scope: + * + * ```javascript + * remoteStorage.access.claim('*', 'rw'); + * ``` */ claim (scope: AccessScope, mode: AccessMode): void { if (typeof (scope) !== 'string' || scope.indexOf('/') !== -1 || scope.length === 0) { @@ -73,8 +84,9 @@ export class Access { /** * Get the access mode for a given scope. * - * @param {string} scope - Access scope - * @returns {string} Access mode + * @param scope - Access scope + * @returns Access mode + * @ignore */ get (scope: AccessScope): AccessMode { return this.scopeModeMap[scope]; @@ -84,7 +96,8 @@ export class Access { /** * Remove access for the given scope. * - * @param {string} scope - Access scope + * @param scope - Access scope + * @ignore */ remove (scope: AccessScope): void { const savedMap: ScopeModeMap = {}; @@ -101,9 +114,10 @@ export class Access { /** * Verify permission for a given scope. * - * @param {string} scope - Access scope - * @param {string} mode - Access mode - * @returns {boolean} true if the requested access mode is active, false otherwise + * @param scope - Access scope + * @param mode - Access mode + * @returns `true` if the requested access mode is active, `false` otherwise + * @ignore */ checkPermission (scope: AccessScope, mode: AccessMode): boolean { const actualMode = this.get(scope); @@ -113,9 +127,10 @@ export class Access { /** * Verify permission for a given path. * - * @param {string} path - Path - * @param {string} mode - Access mode - * @returns {boolean} true if the requested access mode is active, false otherwise + * @param path - Path + * @param mode - Access mode + * @returns true if the requested access mode is active, false otherwise + * @ignore */ checkPathPermission (path: string, mode: AccessMode): boolean { if (this.checkPermission('*', mode)) { @@ -128,6 +143,8 @@ export class Access { /** * Reset all access permissions. + * + * @ignore */ reset(): void { this.rootPaths = []; @@ -174,7 +191,7 @@ export class Access { /** * Set the storage type of the remote. * - * @param {string} type - Storage type + * @param type - Storage type * @internal */ setStorageType (type: string): void { diff --git a/src/caching.ts b/src/caching.ts index 0bb17f255..f9832558e 100644 --- a/src/caching.ts +++ b/src/caching.ts @@ -6,7 +6,7 @@ import log from './log'; * * Holds/manages caching configuration. **/ -class Caching { +export class Caching { pendingActivations: string[] = []; // TODO add correct type activateHandler: (firstPending: string) => void; @@ -123,4 +123,4 @@ class Caching { } } -export = Caching; +export default Caching; diff --git a/typedoc.json b/typedoc.json index 5195f4b81..c6942d483 100644 --- a/typedoc.json +++ b/typedoc.json @@ -1,6 +1,11 @@ { "name": "remoteStorage.js", - "entryPoints": ["./src/remotestorage.ts", "./src/baseclient.ts", "./src/access.ts"], + "entryPoints": [ + "./src/access.ts", + "./src/baseclient.ts", + "./src/caching.ts", + "./src/remotestorage.ts" + ], "out": "./docs/api", "includeVersion": true, "excludeNotDocumented": true, @@ -9,5 +14,8 @@ "excludeProtected": true, "excludeReferences": true, "plugin": ["typedoc-plugin-markdown", "typedoc-vitepress-theme"], - "hideBreadcrumbs": true + "hideBreadcrumbs": true, + "sidebar": { + "autoConfiguration": false + } } From 592de74ad96eb22f50ed796bb1ebe2c9a11f78e2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A2u=20Cao?= Date: Sun, 30 Jun 2024 14:06:56 +0200 Subject: [PATCH 08/50] Remove auto-generated typdoc vitepress sidebar --- docs/api/typedoc-sidebar.json | 1 - 1 file changed, 1 deletion(-) delete mode 100644 docs/api/typedoc-sidebar.json diff --git a/docs/api/typedoc-sidebar.json b/docs/api/typedoc-sidebar.json deleted file mode 100644 index b65d86f37..000000000 --- a/docs/api/typedoc-sidebar.json +++ /dev/null @@ -1 +0,0 @@ -[{"text":"access","link":"/docs/api/access/","collapsed":true,"items":[{"text":"Classes","collapsed":true,"items":[{"text":"Access","link":"/docs/api/access/classes/Access.md"}]}]},{"text":"baseclient","link":"/docs/api/baseclient/","collapsed":true,"items":[{"text":"Classes","collapsed":true,"items":[{"text":"BaseClient","link":"/docs/api/baseclient/classes/BaseClient.md"}]}]},{"text":"remotestorage","link":"/docs/api/remotestorage/","collapsed":true,"items":[{"text":"Classes","collapsed":true,"items":[{"text":"RemoteStorage","link":"/docs/api/remotestorage/classes/RemoteStorage.md"}]}]}] \ No newline at end of file From 5555d68b619991c53b7a1f99e56b4c9135568f26 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A2u=20Cao?= Date: Sun, 30 Jun 2024 14:07:37 +0200 Subject: [PATCH 09/50] Clean up doc/ folder --- doc/Makefile | 20 -- doc/_static/css/custom.css | 11 - doc/_templates/layout.html | 5 - doc/build-with-conda.sh | 19 -- doc/conf.py | 221 ------------------ doc/make.bat | 36 --- doc/requirements.txt | 5 - doc/rs-icon.svg | 18 -- doc/version.py | 1 - {doc => docs}/_images/cordova_oauth.png | Bin .../_images/screenshot-widget-choose.png | Bin 11 files changed, 336 deletions(-) delete mode 100644 doc/Makefile delete mode 100644 doc/_static/css/custom.css delete mode 100644 doc/_templates/layout.html delete mode 100755 doc/build-with-conda.sh delete mode 100644 doc/conf.py delete mode 100644 doc/make.bat delete mode 100644 doc/requirements.txt delete mode 100644 doc/rs-icon.svg delete mode 100644 doc/version.py rename {doc => docs}/_images/cordova_oauth.png (100%) rename {doc => docs}/_images/screenshot-widget-choose.png (100%) diff --git a/doc/Makefile b/doc/Makefile deleted file mode 100644 index 50ef177a2..000000000 --- a/doc/Makefile +++ /dev/null @@ -1,20 +0,0 @@ -# Minimal makefile for Sphinx documentation -# - -# You can set these variables from the command line. -SPHINXOPTS = -SPHINXBUILD = python -msphinx -SPHINXPROJ = remoteStoragejs -SOURCEDIR = . -BUILDDIR = _build - -# Put it first so that "make" without argument is like "make help". -help: - @$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) - -.PHONY: help Makefile - -# Catch-all target: route all unknown targets to Sphinx using the new -# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS). -%: Makefile - @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) \ No newline at end of file diff --git a/doc/_static/css/custom.css b/doc/_static/css/custom.css deleted file mode 100644 index 4a0a6d1e5..000000000 --- a/doc/_static/css/custom.css +++ /dev/null @@ -1,11 +0,0 @@ -/* Add a left and right margin to parens in function signatures */ -.rst-content dl .sig-paren { - margin: 0 0.15em; -} - -@media screen and (min-width : 640px) { - .wy-table-responsive table th, - .wy-table-responsive table td { - white-space: normal; - } -} diff --git a/doc/_templates/layout.html b/doc/_templates/layout.html deleted file mode 100644 index e18c407a5..000000000 --- a/doc/_templates/layout.html +++ /dev/null @@ -1,5 +0,0 @@ - -{% extends "!layout.html" %} -{% block extrahead %} - -{% endblock %} diff --git a/doc/build-with-conda.sh b/doc/build-with-conda.sh deleted file mode 100755 index 568f56a0d..000000000 --- a/doc/build-with-conda.sh +++ /dev/null @@ -1,19 +0,0 @@ -#!/bin/bash - -# This script replicates the build process that ReadTheDocs uses, at least as well as it can - -# Get script location/path: https://stackoverflow.com/a/246128 -SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" -# Enter repository root -cd "$SCRIPT_DIR/.." || exit 1 - -# Setup conda environment -conda env create --quiet --name rtd_env --file doc/environment.yml -conda install --yes --quiet --name rtd_env mock pillow sphinx sphinx_rtd_theme -# Store conda bin path for later use -CONDA_BIN=/home/docs/.conda/envs/rtd_env/bin -"$CONDA_BIN/python" -m pip install -U --no-cache-dir recommonmark six readthedocs-sphinx-ext - -# Build docs -cd doc || exit 1 -"$CONDA_BIN/python" -m sphinx -v -T -E -b html -d _build/doctrees -D language=en . _build/html diff --git a/doc/conf.py b/doc/conf.py deleted file mode 100644 index e08cea763..000000000 --- a/doc/conf.py +++ /dev/null @@ -1,221 +0,0 @@ -#!/usr/bin/env python3 -# -*- coding: utf-8 -*- -# -# remoteStorage.js documentation build configuration file, created by -# sphinx-quickstart on Fri Aug 25 14:11:51 2017. # # This file is execfile()d with the current directory set to its -# containing dir. -# -# Note that not all possible configuration values are present in this -# autogenerated file. -# -# All configuration values have a default; values that are commented out -# serve to show the default. - -# If extensions (or modules to document with autodoc) are in another directory, -# add these directories to sys.path here. If the directory is relative to the -# documentation root, use os.path.abspath to make it absolute, like shown here. -# -import datetime -import os -import sys -from pathlib import Path -sys.path.insert(0, os.path.abspath('.')) - -from version import __version__ - -# -- General configuration ------------------------------------------------ - -# If your documentation needs a minimal Sphinx version, state it here. -# -# needs_sphinx = '1.0' - -# Add any Sphinx extension module names here, as strings. They can be -# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom -# ones. -extensions = [ - 'sphinx.ext.autosectionlabel', - 'sphinx_js', - 'sphinx_issues' -] - -autosectionlabel_prefix_document = True - -# Add any paths that contain templates here, relative to this directory. -templates_path = ['_templates'] - -# Used to extract JSDoc function/class docs from source -js_language = 'typescript' -js_source_path = '../src/' -jsdoc_config_path = '../tsconfig.json' -primary_domain = 'js' - -# GitHub issues config -issues_github_path = 'remotestorage/remotestorage.js' - -# The suffix(es) of source filenames. -# You can specify multiple suffix as a list of string: -# -# source_suffix = ['.rst', '.md'] -# source_suffix = '.rst' - -# The master toctree document. -master_doc = 'index' - -# General information about the project. -project = 'remoteStorage.js' -copyright = '2012-{current_year}, RS Contributors'.format( - current_year=datetime.date.today().strftime("%Y") -) -author = 'RS Contributors' - -# The version info for the project you're documenting, acts as replacement for -# |version| and |release|, also used in various other places throughout the -# built documents. -# -# The short X.Y version. -version = __version__ -# The full version, including alpha/beta/rc tags. -release = __version__ - -# The language for content autogenerated by Sphinx. Refer to documentation -# for a list of supported languages. -# -# This is also used if you do content translation via gettext catalogs. -# Usually you set "language" from the command line for these cases. -language = None - -# List of patterns, relative to source directory, that match files and -# directories to ignore when looking for source files. -# This patterns also effect to html_static_path and html_extra_path -exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store'] - -# The name of the Pygments (syntax highlighting) style to use. -pygments_style = 'sphinx' - -# Default language for code highlighting -highlight_language = 'javascript' - -# If true, `todo` and `todoList` produce output, else they produce nothing. -todo_include_todos = False - - -# -- Options for HTML output ---------------------------------------------- - -# The theme to use for HTML and HTML Help pages. See the documentation for -# a list of builtin themes. -# -html_theme = "sphinx_rtd_theme" - -# Theme options are theme-specific and customize the look and feel of a theme -# further. For a list of options available for each theme, see the -# documentation. -# -# html_theme_options = {} - -# Add any paths that contain custom static files (such as style sheets) here, -# relative to this directory. They are copied after the builtin static files, -# so a file named "default.css" will overwrite the builtin "default.css". -html_static_path = ['_static'] - -# Custom sidebar templates, must be a dictionary that maps document names -# to template names. -# -# This is required for the alabaster theme -# refs: http://alabaster.readthedocs.io/en/latest/installation.html#sidebars -html_sidebars = { - '**': [ - 'about.html', - 'navigation.html', - 'relations.html', # needs 'show_related': True theme option to display - 'searchbox.html', - 'donate.html', - ] -} - - -# -- Options for HTMLHelp output ------------------------------------------ - -# Output file base name for HTML help builder. -htmlhelp_basename = 'remoteStoragejsdoc' - - -# -- Options for LaTeX output --------------------------------------------- - -latex_elements = { - # The paper size ('letterpaper' or 'a4paper'). - # - # 'papersize': 'letterpaper', - - # The font size ('10pt', '11pt' or '12pt'). - # - # 'pointsize': '10pt', - - # Additional stuff for the LaTeX preamble. - # - # 'preamble': '', - - # Latex figure (float) alignment - # - # 'figure_align': 'htbp', -} - -# Grouping the document tree into LaTeX files. List of tuples -# (source start file, target name, title, -# author, documentclass [howto, manual, or own class]). -latex_documents = [ - (master_doc, 'remoteStoragejs.tex', 'remoteStorage.js Documentation', - 'RS Community', 'manual'), -] - - -# -- Options for manual page output --------------------------------------- - -# One entry per manual page. List of tuples -# (source start file, name, description, authors, manual section). -man_pages = [ - (master_doc, 'remotestoragejs', 'remoteStorage.js Documentation', - [author], 1) -] - - -# -- Options for Texinfo output ------------------------------------------- - -# Grouping the document tree into Texinfo files. List of tuples -# (source start file, target name, title, author, -# dir menu entry, description, category) -texinfo_documents = [ - (master_doc, 'remoteStoragejs', 'remoteStorage.js Documentation', - author, 'remoteStoragejs', 'One line description of project.', - 'Miscellaneous'), -] - -# -# HACKFIX WARNING -# TODO Remove this when RTD updates their Node.js version -# https://github.com/readthedocs/readthedocs-docker-images/issues/107 -# -# Manually add custom Node.js/npm from conda to PATH -python_executable_directory = Path(sys.executable).parent -sys.path.insert(0, str(python_executable_directory)) -os.environ["PATH"] = f"{python_executable_directory}:{os.environ['PATH']}" -# Verify Node.js version is correct -os.system('node --version') -os.system('npm --version') - -# -# HACKFIX WARNING -# TODO Remove this when there is official support for pre-build steps on RTD -# https://github.com/readthedocs/readthedocs.org/issues/6662 -# -typedoc_directory = Path('../node_modules/typedoc/bin').resolve() -if not typedoc_directory.exists(): - os.system('npm install') -assert typedoc_directory.exists(), "There was an issue with the `npm install`, please check the logs." -# -# HACKFIX WARNING -# TODO Remove this when RTD updates their Node.js version -# https://github.com/readthedocs/readthedocs-docker-images/issues/107 -# -# Manually add typedoc to PATH -os.system(f'chmod +x {typedoc_directory / "typedoc"}') -os.environ["PATH"] = f"{typedoc_directory}:{os.environ['PATH']}" diff --git a/doc/make.bat b/doc/make.bat deleted file mode 100644 index e18d468e0..000000000 --- a/doc/make.bat +++ /dev/null @@ -1,36 +0,0 @@ -@ECHO OFF - -pushd %~dp0 - -REM Command file for Sphinx documentation - -if "%SPHINXBUILD%" == "" ( - set SPHINXBUILD=python -msphinx -) -set SOURCEDIR=. -set BUILDDIR=_build -set SPHINXPROJ=remoteStoragejs - -if "%1" == "" goto help - -%SPHINXBUILD% >NUL 2>NUL -if errorlevel 9009 ( - echo. - echo.The Sphinx module was not found. Make sure you have Sphinx installed, - echo.then set the SPHINXBUILD environment variable to point to the full - echo.path of the 'sphinx-build' executable. Alternatively you may add the - echo.Sphinx directory to PATH. - echo. - echo.If you don't have Sphinx installed, grab it from - echo.http://sphinx-doc.org/ - exit /b 1 -) - -%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% -goto end - -:help -%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% - -:end -popd diff --git a/doc/requirements.txt b/doc/requirements.txt deleted file mode 100644 index 1f0f8457f..000000000 --- a/doc/requirements.txt +++ /dev/null @@ -1,5 +0,0 @@ -MarkupSafe == 2.0.1 -git+https://github.com/hoodmane/sphinx-js@typedoc-0.17#egg=sphinx-js -sphinx-issues -sphinx-autobuild -sphinx_rtd_theme diff --git a/doc/rs-icon.svg b/doc/rs-icon.svg deleted file mode 100644 index a4813a56d..000000000 --- a/doc/rs-icon.svg +++ /dev/null @@ -1,18 +0,0 @@ - - - - - - - - - - - - diff --git a/doc/version.py b/doc/version.py deleted file mode 100644 index 4450a145d..000000000 --- a/doc/version.py +++ /dev/null @@ -1 +0,0 @@ -__version__ = '2.0.0-beta.6' diff --git a/doc/_images/cordova_oauth.png b/docs/_images/cordova_oauth.png similarity index 100% rename from doc/_images/cordova_oauth.png rename to docs/_images/cordova_oauth.png diff --git a/doc/_images/screenshot-widget-choose.png b/docs/_images/screenshot-widget-choose.png similarity index 100% rename from doc/_images/screenshot-widget-choose.png rename to docs/_images/screenshot-widget-choose.png From 4ea69abda0a28b466cec306bf7c5c603e7c3f678 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A2u=20Cao?= Date: Sun, 30 Jun 2024 14:13:28 +0200 Subject: [PATCH 10/50] WIP Port getting-started docs --- doc/getting-started.rst | 15 --- doc/getting-started/connect-widget.rst | 57 ------------ .../dropbox-and-google-drive.rst | 78 ---------------- doc/getting-started/events.rst | 31 ------- doc/getting-started/how-to-add.rst | 92 ------------------- .../initialize-and-configure.rst | 73 --------------- doc/getting-started/read-and-write-data.rst | 54 ----------- docs/.vitepress/config.mts | 20 +++- docs/getting-started.md | 5 + docs/getting-started/connect-widget.md | 68 ++++++++++++++ .../dropbox-and-google-drive.md | 88 ++++++++++++++++++ docs/getting-started/events.md | 30 ++++++ docs/getting-started/how-to-add.md | 56 +++++++++++ .../initialize-and-configure.md | 74 +++++++++++++++ docs/getting-started/read-and-write-data.md | 53 +++++++++++ 15 files changed, 389 insertions(+), 405 deletions(-) delete mode 100644 doc/getting-started.rst delete mode 100644 doc/getting-started/connect-widget.rst delete mode 100644 doc/getting-started/dropbox-and-google-drive.rst delete mode 100644 doc/getting-started/events.rst delete mode 100644 doc/getting-started/how-to-add.rst delete mode 100644 doc/getting-started/initialize-and-configure.rst delete mode 100644 doc/getting-started/read-and-write-data.rst create mode 100644 docs/getting-started.md create mode 100644 docs/getting-started/connect-widget.md create mode 100644 docs/getting-started/dropbox-and-google-drive.md create mode 100644 docs/getting-started/events.md create mode 100644 docs/getting-started/how-to-add.md create mode 100644 docs/getting-started/initialize-and-configure.md create mode 100644 docs/getting-started/read-and-write-data.md diff --git a/doc/getting-started.rst b/doc/getting-started.rst deleted file mode 100644 index a5bccaad3..000000000 --- a/doc/getting-started.rst +++ /dev/null @@ -1,15 +0,0 @@ -Getting started -=============== - -This section contains introductory documentation for app developers who are new -to *remoteStorage.js*. - -.. toctree:: - :maxdepth: 2 - - getting-started/how-to-add.rst - getting-started/initialize-and-configure.rst - getting-started/connect-widget.rst - getting-started/events.rst - getting-started/dropbox-and-google-drive.rst - getting-started/read-and-write-data.rst diff --git a/doc/getting-started/connect-widget.rst b/doc/getting-started/connect-widget.rst deleted file mode 100644 index 286e1adb2..000000000 --- a/doc/getting-started/connect-widget.rst +++ /dev/null @@ -1,57 +0,0 @@ -Using the Connect Widget add-on -=============================== - -The easiest option for letting people connect their storage to your app is using -the Connect Widget add-on library, which is written and maintained by the rs.js -core team. - -This is optional and an easy way to integrate all functionality into your own UI. -It's a great way to start with RS app development and, can be replaced with -custom code later on. - -.. HINT:: - If you haven't seen the widget in action yet, you can try it out e.g. with - `My Favorite Drinks `_ right now. - -Adding the library ------------------- - -The Connect Widget library is distributed the same way as *remoteStorage.js* -itself: as a :abbr:`UMD (Universal Module Definition)` build, compatible with -all JavaScript module systems, or as a global variable named ``Widget``, when -linked directly. - -You can find the connect widget as ``remotestorage-widget`` on npm, and its -source code and usage instructions `on GitHub -`_. - -Check out :doc:`Adding rs.js to an app ` for -examples of loading a UMD module in your code. - -Adding the widget ------------------ - -With the ``Widget`` class loaded, just create a new widget instance using the -:doc:`previously initialized ` -``remoteStorage`` instance, like so:: - - const widget = new Widget(remoteStorage); - -Then you can attach the widget to the DOM:: - - widget.attach(); - -Or if you want to attach it to a specific parent element, you can also hand it -a DOM element ID:: - - widget.attach('my-parent-element-id'); - -That's it! Now your users can use the widget in order to connect their storage, -and you can listen to the ``remoteStorage`` instance's events in order to get -informed about connection status, sync progress, errors, and so on. - -.. TIP:: - If you'd like to implement connect functionality in your own user interface - and code, the widget can serve as a useful source code example. For - everything it does, the Connect Widget only uses public APIs and events of - rs.js, which you can also use in your own code. diff --git a/doc/getting-started/dropbox-and-google-drive.rst b/doc/getting-started/dropbox-and-google-drive.rst deleted file mode 100644 index 0ef78433a..000000000 --- a/doc/getting-started/dropbox-and-google-drive.rst +++ /dev/null @@ -1,78 +0,0 @@ -Offering Dropbox and Google Drive storage options -================================================= - -.. image:: ../_images/screenshot-widget-choose.png - :width: 195px - :align: right - :alt: Screenshot of the connect-widget choose-backend screen - -rs.js has optional support for syncing data with Dropbox and Google Drive -instead of a RemoteStorage server. - -There are a few drawbacks, mostly sync performance and the lack of a permission -model. So apps can usually access all of a user's storage with these backends -(vs. only relevant parts of the storage with RS accounts). However, while RS -is not a widely known and deployed protocol, we find it helpful to let users -choose something they already know, and potentially migrate to an RS account -later on. - -For these additional backends to work, you will have to register your app with -Dropbox and/or Google first. Then you can configure your OAuth app ID/key like -so:: - - remoteStorage.setApiKeys({ - dropbox: 'your-app-key', - googledrive: 'your-client-id' - }); - -.. HINT:: - The :doc:`Connect widget` - will automatically show only the available storage options, based on the - presence of the `dropbox` and `googledrive` API keys. RemoteStorage is always - enabled. - -Dropbox -------- - -An app key can be obtained by `registering your app -`_. - -* Create a new "scoped" app for the "Dropbox API", with these scopes: - * account_info.read - * files.metadata.read - * files.metadata.write - * files.content.read - * files.content.write -* You need to set one or more OAuth2 redirect URIs for all routes a user can - connect from, for example ``http://localhost:8000`` for an app you are - developing locally. If the path is '/', rs.js drops it. - -Known issues -^^^^^^^^^^^^ - -* Storing files larger than 150MB is not yet supported -* Listing and deleting folders with more than 10000 files will cause problems -* Content-Type is not fully supported due to limitations of the Dropbox API -* Dropbox preserves cases but is not case-sensitive -* ``getItemURL`` is not implemented yet (see issue :issue:`1052`) - -Google Drive ------------- - -A client ID can be obtained by registering your app in the `Google Developers -Console `_. - -* Create an API, then add credentials for Google Drive API. Specify you will be - calling the API from a "Web browser (Javascript)" project. Select that you - want to access "User data". -* On the next screen, fill out the Authorized JavaScript origins and Authorized - redirect URIs for your app (for every route a user can connect from, same as - with Dropbox) -* Once your app is running in production, you will want to get verified by - Google to avoid a security warning when the user first connects their account - -Known issues -^^^^^^^^^^^^ - -* Sharing public files is not supported yet (see issue :issue:`1051`) -* ``getItemURL`` is not implemented yet (see issue :issue:`1054`) diff --git a/doc/getting-started/events.rst b/doc/getting-started/events.rst deleted file mode 100644 index dddc4700f..000000000 --- a/doc/getting-started/events.rst +++ /dev/null @@ -1,31 +0,0 @@ -Handling events -=============== - -In order to get informed about users connecting their storage, data being -transferred, the library going into offline mode, errors being thrown, and -other such things, you can listen to the events emitted by the -``RemoteStorage`` instance, as well as ``BaseClient`` instances. - -Simply register your event handler functions using the ``.on()`` method, like -so:: - - remoteStorage.on('connected', () => { - const userAddress = remoteStorage.remote.userAddress; - console.debug(`${userAddress} connected their remote storage.`); - }) - - remoteStorage.on('network-offline', () => { - console.debug(`We're offline now.`); - }) - - remoteStorage.on('network-online', () => { - console.debug(`Hooray, we're back online.`); - }) - -Check out the :doc:`RemoteStorage API doc` for a -complete list of events and when they're emitted. - -Also check out *Change events* in the :doc:`BaseClient API -doc`, which you can use to handle incoming data and -changes from the remote storage server. - diff --git a/doc/getting-started/how-to-add.rst b/doc/getting-started/how-to-add.rst deleted file mode 100644 index 898eaabd5..000000000 --- a/doc/getting-started/how-to-add.rst +++ /dev/null @@ -1,92 +0,0 @@ -Adding rs.js to an app -====================== - -rs.js is distributed as a single :abbr:`UMD (Universal Module -Definition)` build, which means it should work with all known JavaScript module -systems, as well as without one (using a global variable). - -We recommend adding the library from a JavaScript package manager, although you -may also just download the release build `from GitHub -`_. - -The package is available on `npm `_ as -``remotestoragejs``: - -.. code:: console - - $ npm install remotestoragejs - -Examples --------- - -ES6 module -^^^^^^^^^^ - -.. code:: javascript - - import RemoteStorage from 'remotestoragejs'; - -CommonJS module -^^^^^^^^^^^^^^^ - -.. code:: javascript - - var RemoteStorage = require('remotestoragejs'); - -AMD module -^^^^^^^^^^ - -For example with `RequireJS `_: - -.. code:: javascript - - requirejs.config({ - paths: { - RemoteStorage: './lib/remotestorage' - } - }); - - requirejs(['RemoteStorage'], function(RemoteStorage) { - // Here goes my app - }); - -No module system -^^^^^^^^^^^^^^^^ - -If you just link the build from HTML, it will add ``RemoteStorage`` as a global -variable to ``window``. - -.. code-block:: html - - - -Ember.js -^^^^^^^^ - -ES6 modules from npm should be supported natively soon, but for now you can use -`Browserify `_ via `ember-browserify -`_, enabling you to import the -module from npm like this: - -.. code:: javascript - - import RemoteStorage from 'npm:remotestoragejs'; - -Caveat emptor (no promises) ---------------------------- - -Please be aware of the fact that although rs.js is generally -compatible with older browsers as well as the latest ones, we do not include a -`polyfill `_ for JavaScript Promises -anymore. - -This means that, if you do not add your own polyfill, and no other library in -your build comes with one, rs.js will break in browsers, which do not support -Promises. A detailed overview of supported browsers is available `on -caniuse.com `_. Notable examples would be -Android up to 4.4 and Internet Explorer up to 11. - -You can find a list of polyfill libraries `on the Promises website -`_. A good choice for a small and -simple polyfill would be `es6-promise-auto -`_ for example. diff --git a/doc/getting-started/initialize-and-configure.rst b/doc/getting-started/initialize-and-configure.rst deleted file mode 100644 index 0aee50f1e..000000000 --- a/doc/getting-started/initialize-and-configure.rst +++ /dev/null @@ -1,73 +0,0 @@ -Initialization & configuration -============================== - -Now that you've imported the ``RemoteStorage`` class, here's how you typically -set things up. - -.. NOTE:: - Where and how you do this exactly will naturally depend on the rest of your - code, your JS framework, and personal preferences. - -.. role:: raw-html(raw) - :format: html - -Initializing an instance ------------------------- - -First step is to initialize a ``remoteStorage`` instance:: - - const remoteStorage = new RemoteStorage(); - -The constructor optionally takes a configuration object. Let's say we want to -enable debug logging to see in the console what rs.js is doing behind the -scenes:: - - const remoteStorage = new RemoteStorage({logging: true}); - -Or perhaps we're building an app that doesn't need local caching, but only -operates on the remote server/account:: - - const remoteStorage = new RemoteStorage({cache: false}); - -:raw-html:`` -Also see the :doc:`RemoteStorage API doc `. -:raw-html:`` - -Claiming access ---------------- - -Next, we need to tell rs.js which parts of the user's storage we want to -access. Let's say we want to read and write a user's favorite drinks, which -they might have added via the `My Favorite Drinks -`_ demo app:: - - remoteStorage.access.claim('myfavoritedrinks', 'rw'); - -Now, when they connect their storage, users will be asked to give the app -read/write access to the ``myfavoritedrinks/`` folder. And that's also what the -OAuth token, which we receive from their storage server, will be valid for, of -course. - -If you want to build a special app, like for example a backup utility, or a -data browser, you can also claim access to the entire storage (which is -generally discouraged):: - - remoteStorage.access.claim('*', 'rw'); - -:raw-html:`` -Also see the :doc:`Access API doc `. -:raw-html:`` - -Configuring caching -------------------- - -Last but not least, we'll usually want to configure caching (and with it -automatic sync) for the data we're accessing. The ``caching.enable()`` method -will activate full caching for the given path, meaning all of the items therein -will be automatically synced with the server:: - - remoteStorage.caching.enable('/myfavoritedrinks/') - -:raw-html:`` -See the :doc:`Caching API doc ` for details and options. -:raw-html:`` diff --git a/doc/getting-started/read-and-write-data.rst b/doc/getting-started/read-and-write-data.rst deleted file mode 100644 index d4cb86856..000000000 --- a/doc/getting-started/read-and-write-data.rst +++ /dev/null @@ -1,54 +0,0 @@ -Reading and writing data -======================== - -As soon as your :doc:`RemoteStorage ` instance is ready -for action (signaled by the ``ready`` event), we can start reading and writing -data. - -"Anonymous mode" ----------------- - -One of the unique features of rs.js is that users are not required to have -their storage connected in order to use the app; you can require connecting -storage if it fits your use case. Any data written locally is automatically -synced to the remote storage server when connecting an account. - -Using BaseClient ----------------- - -A ``BaseClient`` instance is the main endpoint for interacting with storage: -listing, reading, creating, updating and deleting documents, as well as -handling change events. - -Check out the :doc:`BaseClient API docs ` in order to -learn about all functions available for reading and writing data and how to use -them. - -There are two options for acquiring a BaseClient instance: - -Quick and dirty: creating a client via ``scope()`` -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -This should mainly be used for manually exploring client functions and in -development. Using :func:`scope`, you can create a new BaseClient scoped to a -given path:: - - const client = remoteStorage.scope('/foo/'); - - // List all items in the "foo/" category/folder - client.getListing('') - .then(listing => console.log(listing)); - - // Write some text to "foo/bar.txt" - const content = 'The most simple things can bring the most happiness.' - client.storeFile('text/plain', 'bar.txt', content) - .then(() => console.log("data has been saved")); - -The recommended way: using clients in data modules -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -The recommended way is to use the private and public ``BaseClient`` instances, -which are available in so-called :doc:`data modules `. Continue -to the next section in order to learn about them. - -.. rubric:: Footnotes diff --git a/docs/.vitepress/config.mts b/docs/.vitepress/config.mts index ca98d27a2..359316316 100644 --- a/docs/.vitepress/config.mts +++ b/docs/.vitepress/config.mts @@ -12,8 +12,7 @@ export default defineConfig({ sidebar: [ { - text: 'remoteStorage.js', - link: '/', + text: 'remoteStorage.js', link: '/', items: [ ] }, @@ -21,16 +20,27 @@ export default defineConfig({ text: 'Guide', items: [ { text: 'Why use this?', link: '/why' }, - { text: 'Getting started', link: '/getting-started' }, + { + text: 'Getting started', link: '/getting-started', + collapsed: true, + items: [ + { text: 'Adding rs.js to an app', link: '/getting-started/how-to-add' }, + { text: 'Initialization & configuration', link: '/getting-started/initialize-and-configure' }, + { text: 'Using the connect widget add-on', link: '/getting-started/connect-widget' }, + { text: 'Handling events', link: '/getting-started/events' }, + { text: 'Offering Dropbox and Google Drive options', link: '/getting-started/dropbox-and-google-drive' }, + { text: 'Reading and writing data', link: '/getting-started/read-and-write-data' }, + ] + }, ] }, { - text: 'JavaScript API', - link: '/api', + text: 'JavaScript API', link: '/api', items: [ { text: 'RemoteStorage', link: '/api/remotestorage/classes/RemoteStorage' }, { text: 'BaseClient', link: '/api/baseclient/classes/BaseClient' }, { text: 'Access', link: '/api/access/classes/Access' }, + { text: 'Caching', link: '/api/caching/classes/Caching' }, ] } ], diff --git a/docs/getting-started.md b/docs/getting-started.md new file mode 100644 index 000000000..5fc69c897 --- /dev/null +++ b/docs/getting-started.md @@ -0,0 +1,5 @@ +# Getting started + +This section contains introductory documentation for app developers who +are new to **remoteStorage.js**. + diff --git a/docs/getting-started/connect-widget.md b/docs/getting-started/connect-widget.md new file mode 100644 index 000000000..3d3bf5005 --- /dev/null +++ b/docs/getting-started/connect-widget.md @@ -0,0 +1,68 @@ +# Using the Connect Widget add-on + +The easiest option for letting people connect their storage to your app +is using the Connect Widget add-on library, which is written and +maintained by the rs.js core team. + +This is optional and an easy way to integrate all functionality into +your own UI. It\'s a great way to start with RS app development and, can +be replaced with custom code later on. + +::: hint +::: title +Hint +::: + +If you haven\'t seen the widget in action yet, you can try it out e.g. +with [My Favorite Drinks](https://myfavoritedrinks.5apps.com) right now. +::: + +## Adding the library + +The Connect Widget library is distributed the same way as +*remoteStorage.js* itself: as a +`UMD (Universal Module Definition)`{.interpreted-text role="abbr"} +build, compatible with all JavaScript module systems, or as a global +variable named `Widget`, when linked directly. + +You can find the connect widget as `remotestorage-widget` on npm, and +its source code and usage instructions [on +GitHub](https://github.com/remotestorage/remotestorage-widget). + +Check out +`Adding rs.js to an app `{.interpreted-text +role="doc"} for examples of loading a UMD module in your code. + +## Adding the widget + +With the `Widget` class loaded, just create a new widget instance using +the +`previously initialized `{.interpreted-text +role="doc"} `remoteStorage` instance, like so: + + const widget = new Widget(remoteStorage); + +Then you can attach the widget to the DOM: + + widget.attach(); + +Or if you want to attach it to a specific parent element, you can also +hand it a DOM element ID: + + widget.attach('my-parent-element-id'); + +That\'s it! Now your users can use the widget in order to connect their +storage, and you can listen to the `remoteStorage` instance\'s events in +order to get informed about connection status, sync progress, errors, +and so on. + +::: tip +::: title +Tip +::: + +If you'd like to implement connect functionality in your own user +interface and code, the widget can serve as a useful source code +example. For everything it does, the Connect Widget only uses public +APIs and events of rs.js, which you can also use in your own code. +::: diff --git a/docs/getting-started/dropbox-and-google-drive.md b/docs/getting-started/dropbox-and-google-drive.md new file mode 100644 index 000000000..01f9bb1b0 --- /dev/null +++ b/docs/getting-started/dropbox-and-google-drive.md @@ -0,0 +1,88 @@ +# Offering Dropbox and Google Drive storage options + +![Screenshot of the connect-widget choose-backend screen](../_images/screenshot-widget-choose.png){.align-right +width="195px"} + +rs.js has optional support for syncing data with Dropbox and Google +Drive instead of a RemoteStorage server. + +There are a few drawbacks, mostly sync performance and the lack of a +permission model. So apps can usually access all of a user\'s storage +with these backends (vs. only relevant parts of the storage with RS +accounts). However, while RS is not a widely known and deployed +protocol, we find it helpful to let users choose something they already +know, and potentially migrate to an RS account later on. + +For these additional backends to work, you will have to register your +app with Dropbox and/or Google first. Then you can configure your OAuth +app ID/key like so: + + remoteStorage.setApiKeys({ + dropbox: 'your-app-key', + googledrive: 'your-client-id' + }); + +::: hint +::: title +Hint +::: + +The `Connect widget`{.interpreted-text +role="doc"} will automatically show only the available storage options, +based on the presence of the [dropbox]{.title-ref} and +[googledrive]{.title-ref} API keys. RemoteStorage is always enabled. +::: + +## Dropbox + +An app key can be obtained by [registering your +app](https://www.dropbox.com/developers/apps). + +- + + Create a new \"scoped\" app for the \"Dropbox API\", with these scopes: + + : - account_info.read + - files.metadata.read + - files.metadata.write + - files.content.read + - files.content.write + +- You need to set one or more OAuth2 redirect URIs for all routes a + user can connect from, for example `http://localhost:8000` for an + app you are developing locally. If the path is \'/\', rs.js drops + it. + +### Known issues + +- Storing files larger than 150MB is not yet supported +- Listing and deleting folders with more than 10000 files will cause + problems +- Content-Type is not fully supported due to limitations of the + Dropbox API +- Dropbox preserves cases but is not case-sensitive +- `getItemURL` is not implemented yet (see issue + `1052`{.interpreted-text role="issue"}) + +## Google Drive + +A client ID can be obtained by registering your app in the [Google +Developers +Console](https://console.developers.google.com/flows/enableapi?apiid=drive). + +- Create an API, then add credentials for Google Drive API. Specify + you will be calling the API from a \"Web browser (Javascript)\" + project. Select that you want to access \"User data\". +- On the next screen, fill out the Authorized JavaScript origins and + Authorized redirect URIs for your app (for every route a user can + connect from, same as with Dropbox) +- Once your app is running in production, you will want to get + verified by Google to avoid a security warning when the user first + connects their account + +### Known issues + +- Sharing public files is not supported yet (see issue + `1051`{.interpreted-text role="issue"}) +- `getItemURL` is not implemented yet (see issue + `1054`{.interpreted-text role="issue"}) diff --git a/docs/getting-started/events.md b/docs/getting-started/events.md new file mode 100644 index 000000000..9e59ac9df --- /dev/null +++ b/docs/getting-started/events.md @@ -0,0 +1,30 @@ +# Handling events + +In order to get informed about users connecting their storage, data +being transferred, the library going into offline mode, errors being +thrown, and other such things, you can listen to the events emitted by +the `RemoteStorage` instance, as well as `BaseClient` instances. + +Simply register your event handler functions using the `.on()` method, +like so: + + remoteStorage.on('connected', () => { + const userAddress = remoteStorage.remote.userAddress; + console.debug(`${userAddress} connected their remote storage.`); + }) + + remoteStorage.on('network-offline', () => { + console.debug(`We're offline now.`); + }) + + remoteStorage.on('network-online', () => { + console.debug(`Hooray, we're back online.`); + }) + +Check out the +`RemoteStorage API doc`{.interpreted-text +role="doc"} for a complete list of events and when they\'re emitted. + +Also check out *Change events* in the `BaseClient API +doc`{.interpreted-text role="doc"}, which you can +use to handle incoming data and changes from the remote storage server. diff --git a/docs/getting-started/how-to-add.md b/docs/getting-started/how-to-add.md new file mode 100644 index 000000000..7dffc4a70 --- /dev/null +++ b/docs/getting-started/how-to-add.md @@ -0,0 +1,56 @@ +# Adding rs.js to an app + +rs.js is distributed as a single `UMD (Universal Module +Definition)`{.interpreted-text role="abbr"} build, which means it should +work with all known JavaScript module systems, as well as without one +(using a global variable). + +We recommend adding the library from a JavaScript package manager, +although you may also just download the release build [from +GitHub](https://github.com/remotestorage/remotestorage.js/releases). + +The package is available on npm as +[remotestoragejs](https://www.npmjs.com/package/remotestoragejs): + +``` console +npm install remotestoragejs +``` + +## Examples + +### ES6 module + +``` javascript +import RemoteStorage from 'remotestoragejs'; +``` + +### CommonJS module + +``` javascript +var RemoteStorage = require('remotestoragejs'); +``` + +### AMD module + +For example with [RequireJS](http://requirejs.org/): + +``` javascript +requirejs.config({ + paths: { + RemoteStorage: './lib/remotestorage' + } +}); + +requirejs(['RemoteStorage'], function(RemoteStorage) { + // Here goes my app +}); +``` + +### No module system + +If you just link the build from HTML, it will add `RemoteStorage` as a +global variable to `window`. + +``` html + +``` diff --git a/docs/getting-started/initialize-and-configure.md b/docs/getting-started/initialize-and-configure.md new file mode 100644 index 000000000..5792832e2 --- /dev/null +++ b/docs/getting-started/initialize-and-configure.md @@ -0,0 +1,74 @@ +# Initialization & configuration + +Now that you\'ve imported the `RemoteStorage` class, here\'s how you +typically set things up. + +Where and how you do this exactly will naturally depend on the rest of +your code, your JS framework, and personal preferences. + +## Initializing an instance + +First step is to initialize a `remoteStorage` instance: + +```javascript +const remoteStorage = new RemoteStorage(); +``` + +The constructor optionally takes a configuration object. Let\'s say we +want to enable debug logging to see in the console what rs.js is doing +behind the scenes: + +```javascript +const remoteStorage = new RemoteStorage({logging: true}); +``` + +Or perhaps we\'re building an app that doesn\'t need local caching, but +only operates on the remote server/account: + +```javascript +const remoteStorage = new RemoteStorage({cache: false}); +``` + +See the [RemoteStorage API](/rs.js/docs/api/remotestorage/classes/RemoteStorage.html) +documentation for details. + +## Claiming access + +Next, we need to tell rs.js which parts of the user\'s storage we want +to access. Let\'s say we want to read and write a user\'s favorite +drinks, which they might have added via the [My Favorite +Drinks](https://github.com/RemoteStorage/myfavoritedrinks) demo app: + +```javascript +remoteStorage.access.claim('myfavoritedrinks', 'rw'); +``` + +Now, when they connect their storage, users will be asked to give the +app read/write access to the `myfavoritedrinks/` folder. And that's +also what the OAuth token, which we receive from their storage server, +will be valid for, of course. + +If you want to build a special app, like for example a backup utility, +or a data browser, you can also claim access to the entire storage +(which is generally discouraged): + +```javascript +remoteStorage.access.claim('*', 'rw'); +``` + +See the [Access API](/rs.js/docs/api/access/classes/Access.html) +documentation for details. + +## Configuring caching + +Last but not least, we\'ll usually want to configure caching (and with +it automatic sync) for the data we\'re accessing. The `caching.enable()` +method will activate full caching for the given path, meaning all of the +items therein will be automatically synced with the server: + +```javascript +remoteStorage.caching.enable('/myfavoritedrinks/') +``` + +See the [Caching API](/rs.js/docs/api/caching/classes/Caching.html) +documentation for details. diff --git a/docs/getting-started/read-and-write-data.md b/docs/getting-started/read-and-write-data.md new file mode 100644 index 000000000..d8214f528 --- /dev/null +++ b/docs/getting-started/read-and-write-data.md @@ -0,0 +1,53 @@ +# Reading and writing data + +As soon as your +`RemoteStorage `{.interpreted-text role="doc"} +instance is ready for action (signaled by the `ready` event), we can +start reading and writing data. + +## Anonymous mode + +One of the unique features of rs.js is that users are not required to +have their storage connected in order to use the app; you can require +connecting storage if it fits your use case. Any data written locally is +automatically synced to the remote storage server when connecting an +account. + +## Using BaseClient + +A `BaseClient` instance is the main endpoint for interacting with +storage: listing, reading, creating, updating and deleting documents, as +well as handling change events. + +Check out the +`BaseClient API docs `{.interpreted-text +role="doc"} in order to learn about all functions available for reading +and writing data and how to use them. + +There are two options for acquiring a BaseClient instance: + +### Quick and dirty: creating a client via `scope()` + +This should mainly be used for manually exploring client functions and +in development. Using `scope`{.interpreted-text role="func"}, you can +create a new BaseClient scoped to a given path: + + const client = remoteStorage.scope('/foo/'); + + // List all items in the "foo/" category/folder + client.getListing('') + .then(listing => console.log(listing)); + + // Write some text to "foo/bar.txt" + const content = 'The most simple things can bring the most happiness.' + client.storeFile('text/plain', 'bar.txt', content) + .then(() => console.log("data has been saved")); + +### The recommended way: using clients in data modules + +The recommended way is to use the private and public `BaseClient` +instances, which are available in so-called +`data modules `{.interpreted-text role="doc"}. Continue +to the next section in order to learn about them. + +**Footnotes** From 9ab5bc4445581ad09ed5f5818b4c0e651a47471b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A2u=20Cao?= Date: Sun, 30 Jun 2024 14:19:49 +0200 Subject: [PATCH 11/50] Port why-use-this --- doc/why.rst | 73 ----------------------------------------------------- docs/why.md | 65 +++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 65 insertions(+), 73 deletions(-) delete mode 100644 doc/why.rst create mode 100644 docs/why.md diff --git a/doc/why.rst b/doc/why.rst deleted file mode 100644 index 54a73bbd1..000000000 --- a/doc/why.rst +++ /dev/null @@ -1,73 +0,0 @@ -Why use this? -============= - -Offline-first design --------------------- - -rs.js stores data locally first and syncs data with a remote storage account -second. This makes it a robust sync solution for mobile applications, where -slow and spotty network connections are a normal situation. - -Apps and use -cases that don't require caching (e.g. `Sharesome `_) -can keep selective data locally while not caching the rest. - -When a backend goes down, users can just keep using the app and have their data -automatically synced as soon as the server is back online. - -Zero backend ------------- - -rs.js is built for creating `unhosted`_ apps. Users can connect their own -storage account to apps on their devices, without needing to trust app -developers with private data. Developers can rapidly build apps without -investing in integrating, managing, maintaining, or securing data. - -A nice side effect of this design is that your app can scale to millions of -users with literally *zero* cost for storage. - -Also, if an app goes offline or is abandoned, people can continue to use -it across devices until they switch to a new one at their own pace. If an -abandoned app comes back at some point, many active users may still be there. - -.. _unhosted: https://remotestorage.io/#explainer-unhosted - -Data sharing ------------- - -Different apps can access the same data, so you can build an app that uses and -manipulates existing data, without building import/export features or having -users start over from scratch. - -Even better, you can get advanced capabilities for free by using shared, -open-source :doc:`data modules `, which you can cooperate on -with other developers. - -For example: enable the sharing of files by simply integrating the `shares module`_ -within a matter of minutes, giving you client-side thumbnail generation and other -features in the process. - -.. _shares module: https://github.com/skddc/remotestorage-module-shares - -Reliability ------------ - -The first prototype of rs.js was written in November 2010. Since then, it has -been used, tested, stabilized, and improved in over 4000 commits. The library -has been used in commercial apps by hundreds of thousands of users, and in -countries across the globe. Bugs and issues have been noted and fixed for -virtually every device, browser, privacy setting and network connection there is. - -In short: you can rely on rs.js to do its job. And if you do find a critical -bug, there's a team of people who will help with fixing it. - -One JS API for multiple storage options ---------------------------------------- - -rs.js optionally supports Dropbox and Google Drive as storage backends which -users can connect. Conveniently, as an app developer you don't have to -implement anything special in order for these backends to work with your code. -Just :doc:`configure OAuth app keys `, -and your users can choose between 3 different backends to connect. If you're not -using the :doc:`connect widget`, you may need to -create additional UI for these alternate backends. diff --git a/docs/why.md b/docs/why.md new file mode 100644 index 000000000..2d8fe8dec --- /dev/null +++ b/docs/why.md @@ -0,0 +1,65 @@ +# Why use this? + +## Offline-first design + +rs.js stores data locally first and syncs data with a remote storage +account second. This makes it a robust sync solution for mobile +applications, where slow and spotty network connections are a normal +situation. + +Apps and use cases that don\'t require caching can keep selective data +locally while not caching the rest. + +When a backend goes down, users can just keep using the app and have +their data automatically synced as soon as the server is back online. + +## Zero backend + +rs.js is built for creating [unhosted](/unhosted) apps. Users can connect their +own storage account to apps on their devices, without needing to trust app +developers with private data. Developers can rapidly build apps without +investing in integrating, managing, maintaining, or securing data. + +A nice side effect of this design is that your app can scale to millions +of users with literally *zero* cost for storage. + +Also, if an app goes offline or is abandoned, people can continue to use +it across devices until they switch to a new one at their own pace. If +an abandoned app comes back at some point, many active users may still +be there. + +## Data sharing + +Different apps can access the same data, so you can build an app that +uses and manipulates existing data, without building import/export +features or having users start over from scratch. + +Even better, you can get advanced capabilities for free by using shared, +open-source [data modules](data-modules), which you can cooperate on with +other developers. + +For example: enable the sharing of files by simply integrating the [shares +module](https://github.com/skddc/remotestorage-module-shares), giving you +client-side thumbnail generation for images as well as other features for free. + +## Reliability + +The first prototype of rs.js was written in November 2010. Since then, +it has been used, tested, stabilized, and improved in over 4000 commits. +The library has been used in commercial apps by hundreds of thousands of +users, and in countries across the globe. Bugs and issues have been +noted and fixed for virtually every device, browser, privacy setting and +network connection there is. + +In short: you can rely on rs.js to do its job. And if you do find a +critical bug, there\'s a team of people who will help with fixing it. + +## One JS API for multiple storage options + +rs.js optionally supports Dropbox and Google Drive as storage backends which +users can connect. Conveniently, as an app developer you don\'t have to +implement anything special in order for these backends to work with your code. +Just [configure OAuth app keys](getting-started/dropbox-and-google-drive), and +your users can choose between 3 different backends to connect. If you're not +using the [connect widget](getting-started/connect-widget), you may need to +create additional UI for these alternate backends. From 4226d955e9356952f7d62dfbcb30bfce6109734b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A2u=20Cao?= Date: Sun, 30 Jun 2024 15:18:36 +0200 Subject: [PATCH 12/50] WIP Port rest of documents, remove doc/ folder entirely --- doc/contributing.rst | 18 - doc/contributing/building.rst | 45 -- doc/contributing/code-overview.rst | 32 -- doc/contributing/docs.rst | 92 ---- doc/contributing/github-flow.rst | 129 ----- doc/contributing/internals.rst | 13 - .../internals/cache-data-format.rst | 216 -------- doc/contributing/internals/caching.rst | 25 - .../internals/discovery-bootstrap.rst | 36 -- doc/contributing/release-checklist.rst | 51 -- doc/contributing/testing.rst | 37 -- doc/data-modules.rst | 33 -- doc/data-modules/defining-a-module.rst | 34 -- doc/data-modules/defining-data-types.rst | 84 --- .../publishing-and-finding-modules.rst | 49 -- doc/environment.yml | 14 - doc/index.rst | 38 -- doc/js-api.rst | 11 - doc/js-api/base-client.rst | 496 ------------------ doc/js-api/caching.rst | 93 ---- doc/js-api/remotestorage.rst | 314 ----------- doc/legacy.rst | 12 - doc/legacy/json-ld.rst | 33 -- doc/nodejs.rst | 86 --- doc/typescript.rst | 13 - docs/.vitepress/config.mts | 36 +- docs/api/access/classes/Access.md | 154 +----- docs/api/baseclient/classes/BaseClient.md | 30 +- docs/api/caching/classes/Caching.md | 145 +++++ docs/api/caching/index.md | 7 + docs/api/index.md | 80 ++- .../remotestorage/classes/RemoteStorage.md | 38 +- docs/contributing/building.md | 49 ++ docs/contributing/code-overview.md | 32 ++ docs/contributing/docs.md | 108 ++++ docs/contributing/github-flow.md | 124 +++++ docs/contributing/index.md | 13 + .../internals/cache-data-format.md | 206 ++++++++ docs/contributing/internals/caching.md | 25 + .../internals/discovery-bootstrap.md | 35 ++ docs/contributing/internals/index.md | 9 + docs/contributing/release-checklist.md | 59 +++ docs/contributing/testing.md | 41 ++ doc/cordova.rst => docs/cordova.md | 63 ++- docs/data-modules/defining-a-module.md | 37 ++ docs/data-modules/defining-data-types.md | 87 +++ docs/data-modules/index.md | 31 ++ .../publishing-and-finding-modules.md | 58 ++ .../index.md} | 0 docs/index.md | 15 +- docs/nodejs.md | 83 +++ docs/typescript.md | 12 + 52 files changed, 1364 insertions(+), 2217 deletions(-) delete mode 100644 doc/contributing.rst delete mode 100644 doc/contributing/building.rst delete mode 100644 doc/contributing/code-overview.rst delete mode 100644 doc/contributing/docs.rst delete mode 100644 doc/contributing/github-flow.rst delete mode 100644 doc/contributing/internals.rst delete mode 100644 doc/contributing/internals/cache-data-format.rst delete mode 100644 doc/contributing/internals/caching.rst delete mode 100644 doc/contributing/internals/discovery-bootstrap.rst delete mode 100644 doc/contributing/release-checklist.rst delete mode 100644 doc/contributing/testing.rst delete mode 100644 doc/data-modules.rst delete mode 100644 doc/data-modules/defining-a-module.rst delete mode 100644 doc/data-modules/defining-data-types.rst delete mode 100644 doc/data-modules/publishing-and-finding-modules.rst delete mode 100644 doc/environment.yml delete mode 100644 doc/index.rst delete mode 100644 doc/js-api.rst delete mode 100644 doc/js-api/base-client.rst delete mode 100644 doc/js-api/caching.rst delete mode 100644 doc/js-api/remotestorage.rst delete mode 100644 doc/legacy.rst delete mode 100644 doc/legacy/json-ld.rst delete mode 100644 doc/nodejs.rst delete mode 100644 doc/typescript.rst create mode 100644 docs/api/caching/classes/Caching.md create mode 100644 docs/api/caching/index.md create mode 100644 docs/contributing/building.md create mode 100644 docs/contributing/code-overview.md create mode 100644 docs/contributing/docs.md create mode 100644 docs/contributing/github-flow.md create mode 100644 docs/contributing/index.md create mode 100644 docs/contributing/internals/cache-data-format.md create mode 100644 docs/contributing/internals/caching.md create mode 100644 docs/contributing/internals/discovery-bootstrap.md create mode 100644 docs/contributing/internals/index.md create mode 100644 docs/contributing/release-checklist.md create mode 100644 docs/contributing/testing.md rename doc/cordova.rst => docs/cordova.md (52%) create mode 100644 docs/data-modules/defining-a-module.md create mode 100644 docs/data-modules/defining-data-types.md create mode 100644 docs/data-modules/index.md create mode 100644 docs/data-modules/publishing-and-finding-modules.md rename docs/{getting-started.md => getting-started/index.md} (100%) create mode 100644 docs/nodejs.md create mode 100644 docs/typescript.md diff --git a/doc/contributing.rst b/doc/contributing.rst deleted file mode 100644 index b6b0bd293..000000000 --- a/doc/contributing.rst +++ /dev/null @@ -1,18 +0,0 @@ -Contributing -============ - -This section contains information and help for people wanting to contribute -to remoteStorage.js development. - -Every bit helps, even fixing a typo is worth a pull request! - -.. toctree:: - :maxdepth: 2 - - contributing/code-overview.rst - contributing/building.rst - contributing/testing.rst - contributing/docs.rst - contributing/github-flow.rst - contributing/release-checklist.rst - contributing/internals diff --git a/doc/contributing/building.rst b/doc/contributing/building.rst deleted file mode 100644 index d882f86b1..000000000 --- a/doc/contributing/building.rst +++ /dev/null @@ -1,45 +0,0 @@ -Building -======== - -.. HINT:: - We're using npm scripts for all common tasks, so check out the ``scripts`` - section in ``package.json`` to learn about what they're doing exactly and - what else is available. - -Setup ------------ - -.. CODE:: console - - $ npm install --force - -This will install all dependencies. We currently use the ``--force`` flag -because of an issue with SphinxJS and TypeDoc (see :issue:`1276`). - -Development ------------ - -.. CODE:: console - - $ npm run dev - -This will watch ``src/`` for changes and build ``remotestorage.js`` in the -``release/`` directory every time you save a source file. Useful for testing -rs.js changes with an app, for example by creating a symlink to -``release/remotestorage.js``. - -This build includes `source maps `_ -directly, so you can easily place ``debugger`` statements in the code and step -through the actual source code in your browser's debugger tool. - -Production ----------- - -.. CODE:: console - - $ npm run build:release - -This creates the minified production build in ``release/``. - -It also creates a separate source maps file, which you can link to in case you -want to (e.g. to improve exception tracking/debugging in production). diff --git a/doc/contributing/code-overview.rst b/doc/contributing/code-overview.rst deleted file mode 100644 index f16ed1107..000000000 --- a/doc/contributing/code-overview.rst +++ /dev/null @@ -1,32 +0,0 @@ -Code overview -============= - -The code of remoteStorage.js consists of files in the ``src/`` folder of this -repo. These are built into a single file in the ``release/`` folder using -`webpack `_. Unit tests live in the ``test/`` folder -and are based on `Jaribu `_. - -The structure of the code is based around feature loading. Most files in -``src/`` correspond to a feature, e.g. ``discover.ts`` to -``RemoteStorage.Discover`` or ``caching.ts`` to ``RemoteStorage.Caching``. - -The feature loading happens synchronously during the page load in -``src/remotestorage.ts`` (just including this script in your app will lead to -executing the code that loads the features). - -Most features load under their own name, but for ``remoteStorage.local`` a -choice is made between ``RemoteStorage.IndexedDB``, -``RemoteStorage.LocalStorage`` and ``RemoteStorage.InMemoryCaching``, depending -on what the environment (browser, node.js, Electron, WebView, or other) -supports. - -For ``remoteStorage.local`` we then also have a `special mixin -`__ -called ``src/cachinglayer.ts``, which mixes in some common functions into the -object. - -The ``remoteStorage.remote`` feature is not loaded immediately, but only when -``RemoteStorage.Discover`` calls ``remoteStorage.setBackend()``, at which point a -choice is made between ``RemoteStorage.WireClient``, -``RemoteStorage.GoogleDrive``, ``RemoteStorage.Dropbox`` (or any other future -backend) to become the ``remote``. diff --git a/doc/contributing/docs.rst b/doc/contributing/docs.rst deleted file mode 100644 index 00af3119f..000000000 --- a/doc/contributing/docs.rst +++ /dev/null @@ -1,92 +0,0 @@ -.. highlight:: console - -Documentation -============= - -The documentation for remoteStorage.js is generated from `reStructuredText -`_ files in the ``doc/`` folder, as -well as `TypeDoc `_ code comments, which are being pulled -in via special declarations in those files. - -We use `Sphinx `_ to generate the documentation -website, and the `sphinx-js `_ -extension for handling the TypeDoc part. - -How to write reStructuredText and TypeDoc ------------------------------------------ - -For learning both the basics and advances features of reStructuredText, we -highly recommend the `reStructuredText Primer -`_ on the Sphinx website. - -For TypeDoc, you can find guides as well as a detailed reference `on -the project's website `_. - -Automatic builds and publishing -------------------------------- - -The documentation is published via `Read the Docs `_. -Whenever the Git repository's ``master`` branch is pushed to GitHub, RTD will -automatically build a new version of the site and publish it to -`remotestoragejs.readthedocs.io `_. - -This means that if you want to contribute to the documentation, you don't -necessarily have to set up Sphinx and sphinx-js locally (especially for small -changes). However, if you want to preview what your local changes look like -when they are rendered as HTML, you will have to set up local builds first. - -How to build the docs on your machine -------------------------------------- - -Setup -^^^^^ - -1. `Install Python and PIP `_ - (likely already installed) - -2. Install sphinx-js and extensions (from repository root):: - - $ pip install -r doc/requirements.txt - -3. Install TypeScript and TypeDoc globally (so Sphinx can use them):: - - $ npm -g install typescript typedoc - -Build -^^^^^ - -Run the following command to automatically watch and build the documentation:: - - $ npm run autobuild-docs - -This will start a web server, serving rendered HTML docs on ``_. - -.. HINT:: - The autobuild cannot watch for changes in TypeDoc comments as of now, so you - will need to re-run the command, or change something in a ``.rst`` file in - order for code documentation changes to be re-built. - -How to build the docs using ReadTheDocs' Docker image ------------------------------------------------------ - -This is useful for troubleshooting when the ReadTheDocs build is failing. - -Setup -^^^^^ - -1. `Install Docker `_ - -2. Pull the latest version of ``readthedocs/build`` image with the ``latest`` tag from Docker Hub:: - - $ docker pull readthedocs/build:latest - -Build -^^^^^ - -1. Enter a ``bash`` session while attaching this project as a volume:: - - $ docker run --rm -it -v ${PWD}:/app readthedocs/build:latest bash - -2. Run the ``build-with-conda.sh`` script to setup conda environment and build the docs like ReadTheDocs:: - - $ /app/doc/build-with-conda.sh diff --git a/doc/contributing/github-flow.rst b/doc/contributing/github-flow.rst deleted file mode 100644 index b15f5300c..000000000 --- a/doc/contributing/github-flow.rst +++ /dev/null @@ -1,129 +0,0 @@ -GitHub workflow -=============== - -General guidelines ------------------- - -- When you start working on an existing GitHub issue (or you plan on - doing that in the immediate future), assign it to yourself, so that - others can see it and don't start working on it in parallel. -- When you create a branch to work on something, use the naming scheme - described further down in this document. -- Never push directly to the ``master`` branch for any changes to the - source code itself. -- As soon as you want others to review your changes, or even just - discuss them, create a pull request. Don't forget to explain roughly - what it is you're doing in that branch, i.e. what the problem/idea is - and what the result is supposed to be, when merging the changes. If - necessary or helpful, mention related discussions from other issues. -- A pull request can be merged as soon as at least two people with - commit access to the repo have given a +1, meaning they reviewed - and tested the changes and have no further improvements to suggest. - -Branch names ------------- - -Using common branch names, that include topics and issue IDs, makes everyone's -lives much easier, and keep the repo clean. Branches on our organization -repositories should be created using the following scheme: - -``[bugfix|feature|docs|refactor]/[issue id]-[description_with_underscores]`` - -So for example, if you want to work on fixing a bug with let's say -initial sync, that is described in issue #423, the branch should look -something like: - -``bugfix/423-race_condition_on_initial_sync`` - -And if it's an enhancement to the widget it could look like this e.g.: - -``feature/321-customizable_widget_content`` - -If there's no issue yet, create one first! - -Pulling changes ---------------- - -Always use ``--rebase`` when pulling code from the remote repo. That way -your local changes are added on top of the current history, avoiding -merge commits and mixing up the commit history. You can set up Git -to use rebase on every pull by default by running ``git config --global -pull.rebase true`` once. - -If you also add the ``autostash`` option, Git will stash any changed files -before the pull and unstash them afterwards: ``git config --global -rebase.autoStash true``. - -If you don't want to configure both options globally, or you prefer a catchier -command name for updating a repository with remote changes, we recommend -configuring an alias, like so: ``git config --global alias.up 'pull --rebase ---autostash'``. Now you can simply run ``git up`` in select repos, or -everywhere. - -Commit messages ---------------- - -- The first line of the message (aptly called "subject line" in Git - terminology) should not be longer than 72 characters. -- If the subject line is not enough to describe the changes properly, - add a blank line after the subject line and then as much text as you - want, using normal language with capitalization, punctuation, etc. -- Always use messages that describe roughly *what* the change does and, - if not obvious, *why* this change leads to the desired result. -- Leave out any text that isn't directly associated with the changes, - that the commit introduces. Examples: "as suggested by @chucknorris", - "lol wtf was that", "not sure if this fixes it". -- Commit as much and often as possible locally (and with any message - that helps you during your work), and then clean up the history and - merge commits that belong together before pushing to the org repo. - You can do that with ``git rebase -i [ref]`` (`learn - more `__). -- You can reference issues from commit messages by adding keywords with - issue numbers. Certain keywords will even close the issue - automatically, once a branch is merged into master. For example - ``Fix widget flickering when opening bubble (fixes #423)`` will close - issue #423 when appearing on the master branch at GitHub. - -Reviewing pull requests ------------------------ - -- Check if it works, if it has unit tests, if the tests pass, and if - the linter is happy. -- Check if the code is understandable, with clear and unambiguous names for - functions and variables, and that it has TypeDoc comments and a changelog - entry. -- If the pull request was issued from a user's own repository, you will - have to fetch the code from there. If you haven't pulled - from their fork previously, you can add a new remote for it with - ``git remote add [username] [repo-url]``. Then, ``git fetch [username]`` - will fetch code from this remote, so you can then check out their branch - using ``git checkout [username]/branchname``. -- This will put you in a so-called 'detached HEAD' state, but don't - worry, everything is fine! If you want to work on that code, just create a - new branch from there with the command Git tells you then, or just go back - to your code with e.g. ``git checkout master`` later.) - -Merging pull requests ---------------------- - -- Once a pull request has two +1s for the latest changes from - collaborators, you can either merge it yourself or wait for somebody - to do it for you (which will happen very soon). -- If the new commits and their commit messages in that branch all make - sense on their own, you can use the merge button on GitHub directly. -- If there are a lot of small commits, which might not make sense on - their own, or pollute the main project history (often the case with - long running pull requests with a lot of additions during their - lifetime), fetch the latest changes to your local machine, and either - do an interactive rebase to clean up branch and merge normally, or - use ``git merge --squash`` to squash them all into one commit during - the merge. -- Whenever you squash multiple commits with either ``git rebase -i`` or - ``git merge --squash``, make sure to follow the commit message - guidelines above. Don't just leave all old commit messages in there - (which is the default), but delete them and create a new meaningful - message for the whole changeset. -- When squashing/editing/amending other peoples' commits, use - ``--author`` to set them as the original author. You don't need full - names for that, but just something that Git can find in the history. - It'll tell you if it can't find an author and let you do it again. diff --git a/doc/contributing/internals.rst b/doc/contributing/internals.rst deleted file mode 100644 index d580ba571..000000000 --- a/doc/contributing/internals.rst +++ /dev/null @@ -1,13 +0,0 @@ -Libary internals -================ - -This section contains information about some of the internals and -concepts of the remoteStorage.js library. - -.. toctree:: - :maxdepth: 2 - - internals/discovery-bootstrap - internals/caching - internals/cache-data-format - diff --git a/doc/contributing/internals/cache-data-format.rst b/doc/contributing/internals/cache-data-format.rst deleted file mode 100644 index 6000159eb..000000000 --- a/doc/contributing/internals/cache-data-format.rst +++ /dev/null @@ -1,216 +0,0 @@ -Data format of the local cache -============================== - -This section describes the structure and concepts of the local cache. - -Storing up to 4 revisions of each node --------------------------------------- - -Each cache node represents the versioning state of either one document -or one folder. The versioning state is represented by one or more of the -``common``, ``local``, ``remote``, and ``push`` revisions. Local -changes are stored in ``local``, and in ``push`` while an outgoing -request is active. Remote changes that have either not been fetched yet, -or have not been merged with local changes yet, are stored in -``remote``. - -autoMerge ---------- - -The ``sync.autoMerge`` function will try to merge local and remote -changes into the common revision of a node. It may emit change events -with a 'conflict' origin to indicate that an unpushed local change was -overruled by a remote change. - -When consulting the base client about the current value of a node, you -will get either its 'local' revision if it exists, or its 'common' -revision otherwise. The following are versioning tree diagrams of how -local and remote revisions of a node can interact: - -.. CODE:: text - - //in sync: - 1) . . . . [common] - - //dirty: - 2) . . . . [common] - \ - \ . . . . [remote] - - //local change: - 3) . . . . [common] . . . . [local] - - //conflict (should autoMerge): - 4) . . . . [common] . . . . [local] - \ - \ . . . . [remote] - - //pushing: - 5) . . . . [common] . . . . [push] . . . . [local] - - //pushing, and known dirty (should abort the push, or just wait for the conflict to occur): - 6) . . . . [common] . . . . [push] . . . . [local] - \ - \ . . . . [remote] - -Each of ``local``, ``push``, ``remote``, and ``common`` can have have -following properties: - -* for documents: - - * body - * contentType - * contentLength - * revision - * timestamp - -* for folders: - - * itemsMap (itemName -> true, or itemName -> false to indicate an - unmerged deletion) - * revision - * timestamp - -NB: The timestamp represents the last sync time, not the last modified -time. It is used by the ``isOutdated`` function in -``src/cachinglayer.js`` to determine if the data needs to be fetched -from remote again, or can be served from cache. - -"keep/revert" conflict resolution ---------------------------------- - -RemoteStorage implements a hub-and-spokes versioning system, with one -central remoteStorage server (the hub) and any number of clients (the -spokes). The clients will typically be unhosted web apps based on this -JS lib (remotestorage.js), but they don't have to be; they can also be -based on other client implementations, they can be hosted web apps, -desktop apps, native smartphone apps, etcetera. New versions of subtrees -always start at one of these clients. They are then sent to the server, -and from there to all the other clients. The server assigns the revision -numbers and sends them to the initiating client using HTTP ETag response -headers in response to PUT requests. remotestorage.js is a library that -attempts to make it easy to build remoteStorage applications, by hiding both -the push/pull synchronization and the version merging from the app -developer. Versioning conflicts between the local client and the remote -server are initially resolved as a 'remote wins', to which the client -code may respond with an explicit revert (putting the old, local version -back), any type of custom merge (putting the result of the merge in -place), or by doing nothing ("keep"), and leaving the remote result in -place. This system is called "keep/revert", since the library takes a -pro-active action ('remote wins'), which the app can then either keep, -or revert. - -Sync is tree-based: syncing a node is equivalent to syncing all its -children. There are two parts at play, that interact: transporting the -diffs to and from the remote server, and merging the local and remote -versions into one common version. Each document starts out as -non-existing in both its local and remote versions. From there on, it -can be created, updated, and deleted any number of times throughout its -history, both locally and remotely. If at some point in time it either -does not exist neither locally nor remotely, or its body and -content-type are the same byte-for-byte on both sides, then the two -stores are in agreement. If the document exists in only one of the -stores, or the document's body or its content-type differs between the -two stores, then the document is in conflict. - -The library is always aware of the latest local version, but it may or -may not be aware of the latest remote version, and therefore of whether -a conflict or agreement exists for the document. Likewise, the server is -not necessarily aware of the latest local version, if there are changes -that haven't been pushed out yet; nor does it care, though, since the -server does not get involved in conflict resolution. It only serializes -conditional updates from all clients into one canonical versioning -history. - -The lack of sync between client and server can be fixed by doing a GET, -PUT, or DELETE. A GET will return the current remote version; a -conditional PUT or DELETE will push out the change, while at the same -time checking if any unfetched remote changes exist. If they do, then -the push will fail, and the library will fetch instead. After this, the -library has a latest known common revision of the document, possibly a -local version if it was changed since then, and possibly a remote -version if it was changed since then, but the newer version has yet to -be retrieved. - -Before resolving a conflict, both revision histories are squashed. This -means that creating+deleting a document becomes a noop, and -deleting+creating, or updating it multiple times, becomes one single -update. Then, if the document was changed in different ways locally and -remotely, it goes into conflict state; if it was changed only locally or -only remotely, then the change is automatically accepted by the other -store (whether client to server or server to client). Note that in the -case of a successful conditional push request, this will already have -happened. - -Conflicts that are discovered by a document fetch, fire their -'keep/revert' event immediately. Conflicts that are discovered through a -parent folder fetch, or through a conditional push, fire their -'keep/revert' event after the new remote version is fetched. - -The library's conflict resolution strategy is 'remote wins'. This means -that the module will receive them in the form of change events with -origin 'conflict'. When receiving such a change event, the module can -still decide to revert it explicitly. - -As noted before, merging a subtree is done by merging each document that -exists within that subtree, in either or both stores. When the library -fetches a folder listing, it can detect a remote child change, which -then may or may not result in a conflict. When a folder listing comes -in, which has changed since the last time it was retrieved, four types -of information may be discovered: - -* which of the documents directly within the folder changed their - remote revision since the last check (new ETag on a document item) -* in which previously empty subtrees at least one document was created - (new folder item) -* in which subtrees all previously existing documents were deleted - (folder item disappeared) -* in which subtrees at least one document was either created, updated, - or deleted (new ETag on a folder item) - -All of these can occur in a folder that was at the same time either -unchanged, updated, or deleted locally. When updated, it might be that -different items were changed locally and remotely, or that the same item -was changed on both sides, either in the same way, or in different ways. - -The library handles all these cases so the module developer does not -need to worry about them. - -Implications for module design ------------------------------- - -There are a number of important implications for module design: - -* First of all, this sync process follows the 'asynchronous - synchronization' design principle - (https://github.com/offlinefirst/research/issues/9). Don't wait for - it to finish. The module should work with the local copy of the data, - and handle incoming updates through evented programming. The only - exception to this is where a body of data is too big to cache - locally, and the module needs to expose on-demand access of remote - data to the app. In all other cases, the module should expose the - local version as 'the truth'. -* Even then, IndexedDB is not fast enough to access from a button - click. Make sure to put an in-memory caching layer in the module, and - return control to the app immediately. An example of this approach is - the SyncedMap data structure used in - https://github.com/michielbdejong/meute. -* Use folders and subfolders. This allows the tree-based sync algorithm - to shine and efficiently detect changes in any of potentially - thousands of documents by checking the ETag from one single HTTP - request to the root folder of the tree. - -* Use meaningful collections. Multiple clients can each edit a - different document without ever entering in conflict with each other. - But editing the same document is interpreted as a conflict. For - instance, when two calendar apps both schedule an event on a certain - date, this would be a conflict if the module stores one document per - day. However, if the module stores one document per event, and - instead uses one /folder/ for each day, then the two events can - co-exist on the same day without generating a conflict. Documents are - a unit of conflict, but folders are not. Another example is storing - todo-list items with long UUID hashes instead of their list index - numbers as document names. Editing item "5" would conflict with - inserting a new item "5". But if both items have a long unique name, - then they don't clash with each other. So make sure to choose unique - item names for items that should not conflict. diff --git a/doc/contributing/internals/caching.rst b/doc/contributing/internals/caching.rst deleted file mode 100644 index 345ef7b5c..000000000 --- a/doc/contributing/internals/caching.rst +++ /dev/null @@ -1,25 +0,0 @@ -Caching -======= - -The caching strategies are stored in -``remoteStorage.caching._rootPaths``. For instance, on -https://myfavoritedrinks.remotestorage.io/, it has the value ``{ -/myfavoritedrinks/: "ALL" }``. - -These rootPaths are not stored in localStorage. If you refresh the page, -it is up to the app to set all caching strategies again during the -page load. - -The effect of the caching strategy is basically achieved through three -paths: - -1. Setting caching strategy 'ALL' for a path creates an empty node for - that path, unless it already exists. -2. The sync process will then do a GET request, and create new nodes - under any folder with an 'ALL' strategy, when that folder is fetched. -3. The sync process will create a new task for any node under an 'ALL' - strategy, unless a task already exists for one of its ancestors. - -The result is all paths with an explicit 'ALL' strategy will get -fetched, and if they are folders, then in the next round, all its -children will also be fetched, etcetera. diff --git a/doc/contributing/internals/discovery-bootstrap.rst b/doc/contributing/internals/discovery-bootstrap.rst deleted file mode 100644 index 13f1296f2..000000000 --- a/doc/contributing/internals/discovery-bootstrap.rst +++ /dev/null @@ -1,36 +0,0 @@ -Discovery bootstrap -=================== - -*This section describes how connecting to a storage works internally.* - -When the RemoteStorage instance is instantiated, it checks the fragment -of the URL to see if it contains an ``access_token`` or -``remotestorage`` parameter. In the first case, the access token is -given to the remote using ``remoteStorage.remote.configure()``. In the -second case, WebFinger discovery is triggered for the user address given -(see `storage-first section`_ of the remoteStorage spec). - -The user can also set the user address through the widget, or the app -can call ``remoteStorage.remote.configure({userAddress: -'user@host.com'})`` to set the user address. - -When a user address is set, but no other remote parameters are known -yet, WebFinger discovery will be triggered. From the WebFinger response, -the library extract the storage base URL, the storage API, and the OAuth -dialog URL. - -If no OAuth URL is given, Implied Auth is triggered: -https://github.com/remotestorage/remotestorage.js/issues/782 - -If an OAuth URL is known, but no token yet, the OAuth dance will be -started by setting the ``location.href`` of the window, redirecting -the user to that URL. When the dance comes back, the library will detect -the ``access_token`` from the window location during the page load, and -from that point onwards, the remote is connected. - -If the OAuth flow is PKCE, the window location will contain a ``code`` -parameter instead of ``access_token``. RS then makes a fetch to -remote.TOKEN_URL with the code, to retrieve the access token, and possibly -a refresh token as well. - -.. _storage-first section: https://tools.ietf.org/html/draft-dejong-remotestorage-09#section-11 diff --git a/doc/contributing/release-checklist.rst b/doc/contributing/release-checklist.rst deleted file mode 100644 index c6f35ea52..000000000 --- a/doc/contributing/release-checklist.rst +++ /dev/null @@ -1,51 +0,0 @@ -.. highlight:: console - -Release checklist -================= - -* Build library and manually test all browsers you have access to, including - mobile devices and private browsing mode - -* Create changelog since last release - - * Collect and summarize changes using e.g.:: - - $ git log --no-merges ..HEAD - - * Add changes to `CHANGELOG.md` - * Commit to Git - -* Run ``npm version patch|minor|major|x.x.x-rc1``. This will automatically: - - * run the test suite - * update the version in package.json - * create a release build - * commit everything using version as commit description - * create a Git tag for the version - * push the release commit and tag to GitHub - -* Publish release notes on GitHub - - * Go to https://github.com/remotestorage/remotestorage.js/tags and click "Add release notes" - * Use version string as title and changelog items as description - * For RCs and betas, tick the "This is a pre-release" option on the bottom - * These notes will automatically be posted `to the community forums - ` - after a while - -* Publish to npm (https://www.npmjs.org/package/remotestoragejs):: - - $ npm publish - -* Update https://github.com/remotestorage/myfavoritedrinks to use new release - - * Replace ``remotestorage.js`` file with new release build - * Check if everything is still working - * Commit - * ``git push origin`` - * ``git push 5apps master`` - -* Link release announcement on Mastodon (remoteStorage@kosmos.social). This - will automatically cross-post to Twitter and IRC. - -* If it's an important release, also notify the Unhosted mailing list diff --git a/doc/contributing/testing.rst b/doc/contributing/testing.rst deleted file mode 100644 index f1bbbf100..000000000 --- a/doc/contributing/testing.rst +++ /dev/null @@ -1,37 +0,0 @@ -Testing -======= - -Before contributing to remoteStorage.js, make sure your patch passes the test -suite, and your code style passes the code linting suite. - -We use the `Jaribu `_ framework for our -test suites and `JSHint `_ for linting. Both are set -as dev dependencies in ``package.json``, so after installing those via ``npm -install``, you can use the following command to run everything at once: - -.. CODE:: console - - $ npm run test - -Or you can use the Jaribu executable directly in order to run the suite for a -single file: - -.. CODE:: console - - $ ./node_modules/.bin/jaribu test/unit/cachinglayer-suite.js - -.. TIP:: - If you add ``./node_modules/.bin`` to your ``PATH``, you can call - executables in any npm project directly. For example in ``~/.bashrc``, add - the line ``export PATH=$PATH:./node_modules/.bin`` (and run ``source - ~/.bashrc`` to load that change in open terminal sessions). Then you can - just run ``jaribu test/unit/foo_suite.js``. - -Continous integration ---------------------- - -The rs.js test suite is run by GitHub Actions on every push to our repo on GitHub. -When you open a pull request, your code will be tested there, too. You can -check out the build status and history at -https://github.com/remotestorage/remotestorage.js/actions, and the CI settings in -``.github/workflows/test-and-lint.yml``. diff --git a/doc/data-modules.rst b/doc/data-modules.rst deleted file mode 100644 index a71e299ad..000000000 --- a/doc/data-modules.rst +++ /dev/null @@ -1,33 +0,0 @@ -Data modules -============ - -A core idea of the remoteStorage protocol is that the same data can be used by -multiple apps. Imagine creating a to-do in one app, and tracking time on it in -another. - -Traditional Web apps make this possible with custom, proprietary APIs, which are -dependent on the app provider. Third party developers usually need to -register an application with the original provider to access that data via the -API, and this access can be revoked at any time. remoteStorage and `unhosted web apps -`_ in general give end users ultimate control over which -apps have access to their data. - -In order to make it easy and safe for your app data to be compatible with other -apps, we created the concept of data modules for rs.js, which can be shared and -developed collaboratively in the open. - -Data modules can contain as much or as little functionality as desired, from -defining data formats and types to data validation, formatting, processing, -transformation, encryption, indexing, and other use cases. - -Data modules make your app and its data interoperable with other apps. Sharing -your modules is generally encouraged, but it is also possible to encapsulate custom -functionality in a custom module made just for your app. - -.. toctree:: - :caption: Contents - :maxdepth: 2 - - data-modules/defining-a-module - data-modules/defining-data-types - data-modules/publishing-and-finding-modules diff --git a/doc/data-modules/defining-a-module.rst b/doc/data-modules/defining-a-module.rst deleted file mode 100644 index 0206d8165..000000000 --- a/doc/data-modules/defining-a-module.rst +++ /dev/null @@ -1,34 +0,0 @@ -Defining a module -================= - -A data module is just a JavaScript object containing a module name and a -builder function. - -The builder function receives two :doc:`base clients ` -when loaded: one for private data stored in ``/my-module-name/`` and one for -public data stored in ``/public/my-module-name/``. It must return an object, -defining the properties and functions to be used in the app as ``exports``: - -.. CODE:: javascript - - var Bookmarks = { name: 'bookmarks', builder: function(privateClient, publicClient) { - return { - exports: { - addBookmark: function() {} - } - } - }}; - -You can then load it into your :doc:`RemoteStorage ` -instance either on initialization, or later using the ``addModule()`` function:: - - const remoteStorage = new RemoteStorage({ modules: [ Bookmarks ] }); - - // or later: - - remoteStorage.addModule(Bookmarks); - -It will then be available on the instance as its module name, allowing you to -call the functions and properties that the module exports:: - - remoteStorage.bookmarks.addBookmark(); diff --git a/doc/data-modules/defining-data-types.rst b/doc/data-modules/defining-data-types.rst deleted file mode 100644 index fad62ca7b..000000000 --- a/doc/data-modules/defining-data-types.rst +++ /dev/null @@ -1,84 +0,0 @@ -Defining data types -=================== - -Data types can be defined using the ``declareType()`` method. It expects a name -(which you can later use with ``storeObject()``), as well as a `JSON Schema`_ -object defining the actual structure and formatting of your data. - -Consider this simplified example of an archive bookmark: - -.. CODE:: javascript - - var Bookmarks = { name: 'bookmarks', builder: function(privateClient, publicClient) { - - privateClient.declareType('archive-bookmark', { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "title": { - "type": "string" - }, - "url": { - "type": "string", - "format": "uri" - }, - "tags": { - "type": "array", - "default": [] - }, - }, - "required": [ "title", "url" ] - }); - - // ... - }}; - -Now that we have a basic data type in place for storing bookmarks, we can add a -function for storing them. This will actually validate the incoming data -against the type's schema, and reject the promise with detailed validation -errors in case the data format doesn't match:: - - var Bookmarks = { name: 'bookmarks', builder: function(privateClient, publicClient) { - // ... - - return { - exports: { - - add: function (bookmark) { - bookmark.id = md5Hash(bookmark.url); // hash URL for nice ID - var path = "archive/" + bookmark.id; // use hashed URL as filename as well - - return privateClient.storeObject("archive-bookmark", path, bookmark). - then(function() { - return bookmark; // return bookmark with added ID property - }); - } - - } - } - }}; - - // and in your app: - - remoteStorage.bookmarks.add({ - title: 'Unhosted Web Apps', - url: 'https://unhosted.org', - tags: ['unhosted', 'remotestorage', 'offline-first'] - }) - .then(() => { - console.log('stored bookmark successfully'); - }) - .catch((err) => { - console.error('validation error:', err); - }); - -.. HINT:: - JSON Schema is very powerful and flexible. If you want to learn more about - it, check out the free e-book `Understanding JSON - Schema `_ for - example. The complete official specs can be found at - https://json-schema.org/specification - -.. _JSON Schema: http://json-schema.org diff --git a/doc/data-modules/publishing-and-finding-modules.rst b/doc/data-modules/publishing-and-finding-modules.rst deleted file mode 100644 index 71b710706..000000000 --- a/doc/data-modules/publishing-and-finding-modules.rst +++ /dev/null @@ -1,49 +0,0 @@ -Publishing and finding data modules -=================================== - -npm ---- - -The recommended way for publishing data modules is as `npm -`_ packages. - -Our naming convention for rs.js modules is -``remotestorage-module-mymodulename``. Thus, you can also find them by -`searching npm for "remotestorage-module" -`_. - -You can also add "remotestorage-module" and "remotestorage" to the ``keywords`` -property of your ``package.json``. - -GitHub & Co. ------------- - -If you use GitHub ‒ or any other code hosting/collaboration platform for that -matter ‒ for publishing your module's source code, please use the same naming -convention as for the npm module for the repo name. And it's a good idea to add -the topic/tag/label "remotestorage-module" there as well, of course. - -https://github.com/topics/remotestorage-module - -.. HINT:: - With npm, you can also install modules directly from a Git repo or GitHub, - pointing to just the repo or a branch name, tag, or commit: - https://docs.npmjs.com/files/package.json#github-urls - -Examples --------- - -* For a real-world example of a data module package, see e.g. the shares module - `on GitHub `_ and `on - npm `_. Check out - ``webpack.config.js`` and the source code in ``index.js`` to see how it is - built and exported. - -.. NOTE:: - Unfortunately, we didn't have any package management for data modules before - rs.js 1.0. To be fair, JavaScript package managers weren't actually a thing - yet, when this functionality was added to the library. However, it means - we're still in the process of porting and publishing modules and you won't - find very many existing data modules on npm right now. You can check the - `old modules repo `_ for source - code of legacy modules. diff --git a/doc/environment.yml b/doc/environment.yml deleted file mode 100644 index 9ab438093..000000000 --- a/doc/environment.yml +++ /dev/null @@ -1,14 +0,0 @@ -name: rtd_env -channels: - - conda-forge - - defaults -dependencies: - - nodejs=14.15.1 - - pip=21.0.1 - - python=3.8.5 - - pip: - - MarkupSafe == 2.0.1 - - "git+https://github.com/hoodmane/sphinx-js@typedoc-0.17#egg=sphinx-js" - - sphinx-issues - - sphinx-autobuild - - sphinx_rtd_theme diff --git a/doc/index.rst b/doc/index.rst deleted file mode 100644 index 60c0967c8..000000000 --- a/doc/index.rst +++ /dev/null @@ -1,38 +0,0 @@ -.. image:: rs-icon.svg - :height: 80px - :width: 80px - :align: right - -remoteStorage.js -================ - -Welcome to the remoteStorage.js documentation! - -remoteStorage.js is a JavaScript library for storing user data locally in the -browser, as well as connecting to `remoteStorage `_ -servers and syncing data across devices and applications. It is also capable of -connecting and syncing data with a person's Dropbox or Google Drive account -(optional). - -.. NOTE:: - For brevity's sake, we will also use the short name rs.js across these docs. - -.. toctree:: - :maxdepth: 2 - :caption: Contents - - why - getting-started - data-modules - js-api - nodejs - cordova - typescript - contributing - -Indices and tables ------------------- - -* :ref:`genindex` -* :ref:`modindex` -* :ref:`search` diff --git a/doc/js-api.rst b/doc/js-api.rst deleted file mode 100644 index f1988a049..000000000 --- a/doc/js-api.rst +++ /dev/null @@ -1,11 +0,0 @@ -JavaScript API -============== - -.. toctree:: - :caption: Contents - :maxdepth: 2 - - js-api/remotestorage - js-api/base-client - js-api/access - js-api/caching diff --git a/doc/js-api/base-client.rst b/doc/js-api/base-client.rst deleted file mode 100644 index c7f0c9020..000000000 --- a/doc/js-api/base-client.rst +++ /dev/null @@ -1,496 +0,0 @@ -BaseClient -========== - -A ``BaseClient`` instance is the main endpoint you will use for interacting -with a connected storage: listing, reading, creating, updating and deleting -documents, as well as handling incoming changes. - -Base clients are usually used in :doc:`data modules `, which are -loaded with two ``BaseClient`` instances by default: one for private and one for -public documents. - -However, you can also instantiate a BaseClient outside of a data module using -the ``remoteStorage.scope()`` function. Similarly, you can create a new scoped -client within another client, using the ``BaseClient``'s own :func:`scope`. - -.. contents:: - -Data read/write operations --------------------------- - -A ``BaseClient`` deals with three types of data: folders, objects and files: - -* :func:`getListing` returns a mapping of all items within a folder. - -* :func:`getObject` and :func:`storeObject` operate on JSON objects. Each object - has a type. - -* :func:`getFile` and :func:`storeFile` operates on files. Each file has a MIME - type. - -* :func:`getAll` returns all objects or files for the given folder path. - -* :func:`remove` operates on either objects or files (but not folders; folders - are created and removed implictly). - -.. _max-age: - -Caching logic for read operations -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -All functions requesting/reading data will immediately return data from the -local store, *as long as it is reasonably up-to-date*. The default maximum age -of requested data is two times the periodic sync interval (10 seconds by -default). - -However, you can adjust this behavior by using the ``maxAge`` argument with any -of these functions, thereby changing the maximum age or removing the -requirement entirely. - -* If the ``maxAge`` requirement is set, and the last sync request for the path - is further in the past than the maximum age given, the folder will first be - checked for changes on the remote, and then the promise will be fulfilled - with the up-to-date document or listing. - -* If the ``maxAge`` requirement is set, and cannot be met because of network - problems, the promise will be rejected. - -* If the ``maxAge`` requirement is set to ``false``, or the library is in - offline mode, or no remote storage is connected (a.k.a. "anonymous mode"), - the promise will always be fulfilled with data from the local store. - -.. HINT:: - If :doc:`caching ` for the folder is turned off, none of - this applies and data will always be requested from the remote store - directly. - -List of functions -^^^^^^^^^^^^^^^^^ - -.. autofunction:: BaseClient#getListing(path, maxAge) - :short-name: - - Example usage: - - .. code:: javascript - - client.getListing('') - .then(listing => console.log(listing)); - - The folder listing is returned as a JSON object, with the root keys - representing the pathnames of child nodes. Keys ending in a forward slash - represent *folder nodes* (subdirectories), while all other keys represent - *data nodes* (files/objects). - - Data node information contains the item's ETag, content type and -length. - - Example of a listing object: - - .. code:: javascript - - { - "@context": "http://remotestorage.io/spec/folder-description", - "items": { - "thumbnails/": true, - "screenshot-20170902-1913.png": { - "ETag": "6749fcb9eef3f9e46bb537ed020aeece", - "Content-Length": 53698, - "Content-Type": "image/png;charset=binary" - }, - "screenshot-20170823-0142.png": { - "ETag": "92ab84792ef3f9e46bb537edac9bc3a1", - "Content-Length": 412401, - "Content-Type": "image/png;charset=binary" - } - } - } - - .. WARNING:: - At the moment, this function only returns detailed metadata, when caching - is turned off (``new RemoteStorage({cache: false})``). With caching turned - on, it will only contain the item names as properties with ``true`` as - value. See issues :issue:`721` and :issue:`1108` — contributions - welcome! - -.. autofunction:: BaseClient#getObject(path, maxAge) - :short-name: - - Example: - - .. code:: javascript - - client.getObject('/path/to/object') - .then(obj => console.log(obj)); - -.. autofunction:: BaseClient#storeObject(typeAlias, path, object) - :short-name: - - Example: - - .. code:: javascript - - var bookmark = { - url: 'http://unhosted.org', - description: 'Unhosted Adventures', - tags: ['unhosted', 'remotestorage', 'no-backend'] - } - var path = MD5Hash(bookmark.url); - - client.storeObject('bookmark', path, bookmark) - .then(() => console.log('bookmark saved')) - .catch((err) => console.log(err)); - -.. autofunction:: BaseClient#getAll(path, maxAge) - :short-name: - - Example usage: - - .. code:: javascript - - client.getAll('example-subdirectory/').then(objects => { - for (var path in objects) { - console.log(path, objects[path]); - } - }); - - Example response object: - - .. code:: javascript - - { - "27b8dc16483734625fff9de653a14e03": { - "@context": "http://remotestorage.io/spec/modules/bookmarks/archive-bookmark", - "id": "27b8dc16483734625fff9de653a14e03", - "url": "https://unhosted.org/", - "title": "Unhosted Web Apps", - "description": "Freedom from web 2.0's monopoly platforms", - "tags": [ - "unhosted", - "remotestorage" - ], - "createdAt": "2017-11-02T15:22:25.289Z", - "updatedAt": "2019-11-07T17:52:22.643Z" - }, - "900a5ca174bf57c56b79af0653053bdc": { - "@context": "http://remotestorage.io/spec/modules/bookmarks/archive-bookmark", - "id": "900a5ca174bf57c56b79af0653053bdc", - "url": "https://remotestorage.io/", - "title": "remoteStorage", - "description": "An open protocol for per-user storage on the Web", - "tags": [ - "unhosted", - "remotestorage" - ], - "createdAt": "2019-11-07T17:59:34.883Z" - } - } - - .. HINT:: - - For items that are not JSON-stringified objects (for example stored using - :func:`storeFile` instead of :func:`storeObject`), the object's value is - filled in with ``true``. - -.. autofunction:: BaseClient#getFile(path, maxAge) - :short-name: - - The response object contains two properties: - - .. table:: - - ============ ============================================================ - ``mimeType`` String representing the MIME Type of the document. - ``data`` Raw data of the document (either a string or an ArrayBuffer) - ============ ============================================================ - - Example usage (displaying an image): - - .. code:: javascript - - client.getFile('path/to/some/image').then(file => { - var blob = new Blob([file.data], { type: file.mimeType }); - var targetElement = document.findElementById('my-image-element'); - targetElement.src = window.URL.createObjectURL(blob); - }); - -.. autofunction:: BaseClient#storeFile(mimeType, path, body) - :short-name: - - Example (UTF-8 data): - - .. code:: javascript - - client.storeFile('text/html', 'index.html', '

Hello World!

') - .then(() => { console.log("Upload done") }); - - Example (Binary data): - - .. code:: javascript - - var input = document.querySelector('form#upload input[type=file]'); - var file = input.files[0]; - var fileReader = new FileReader(); - - fileReader.onload = function () { - client.storeFile(file.type, file.name, fileReader.result) - .then(() => { console.log("Upload done") }); - }; - - fileReader.readAsArrayBuffer(file); - -.. autofunction:: BaseClient#remove(path) - :short-name: - - Example: - - .. code:: javascript - - client.remove('path/to/object') - .then(() => console.log('item successfully deleted')); - -Change events -------------- - -``BaseClient`` offers a single event, named ``change``, which you can add a -handler for using the ``.on()`` function (same as in ``RemoteStorage``): - -.. code:: javascript - - client.on('change', function (evt) { - console.log('data was added, updated, or removed:', evt) - }); - -Using this event, you can stay informed about data changes, both remote (from -other devices or browsers), as well as locally (e.g. other browser tabs). - -In order to determine where a change originated from, look at the ``origin`` -property of the incoming event. Possible values are ``window``, ``local``, -``remote``, and ``conflict``, explained in detail below. - -Example: - -.. code:: javascript - - { - // Absolute path of the changed node, from the storage root - path: path, - // Path of the changed node, relative to this baseclient's scope root - relativePath: relativePath, - // See origin descriptions below - origin: 'window|local|remote|conflict', - // Old body of the changed node (local version in conflicts; undefined if creation) - oldValue: oldBody, - // New body of the changed node (remote version in conflicts; undefined if deletion) - newValue: newBody, - // Body when local and remote last agreed; only present in conflict events - lastCommonValue: lastCommonBody, - // Old contentType of the changed node (local version for conflicts; undefined if creation) - oldContentType: oldContentType, - // New contentType of the changed node (remote version for conflicts; undefined if deletion) - newContentType: newContentType, - // ContentType when local and remote last agreed; only present in conflict events - lastCommonContentType: lastCommonContentType - } - -In general, the dataType of the document can be extracted thus: - -.. code:: javascript - - const context = evt.newValue?.['@context'] || evt.oldValue?.['@context'] || evt.lastCommonValue?.['@context']; - -``local`` -^^^^^^^^^ - -Events with origin ``local`` are fired conveniently during the page load, so -that you can fill your views when the page loads. - -Example: - -.. code:: javascript - - { - path: '/public/design/color.txt', - relativePath: 'color.txt', - origin: 'local', - oldValue: undefined, - newValue: 'white', - oldContentType: undefined, - newContentType: 'text/plain' - } - -.. HINT:: - You may also use for example :func:`getAll` instead, and choose to - deactivate these. - -``remote`` -^^^^^^^^^^ - -Events with origin ``remote`` are fired when remote changes are discovered -during sync. - -.. NOTE:: - Automatically receiving remote changes depends on the :doc:`caching - ` settings for your module/paths. - -``window`` -^^^^^^^^^^ - -Events with origin `window` are fired whenever you change a value by calling a -method on the ``BaseClient``; these are disabled by default. - -.. HINT:: - You can enable them by configuring ``changeEvents`` for your - :doc:`RemoteStorage ` instance. - -``conflict`` -^^^^^^^^^^^^ - -Events with origin ``conflict`` are fired when a conflict occurs while pushing -out your local changes to the remote store. - -Say you changed 'color.txt' from 'white' to 'blue'; if you have set -``config.changeEvents.window`` to ``true`` (by passing it to the -``RemoteStorage`` constructor, see the Constructor section of the -:doc:`RemoteStorage API doc `), then you will receive: - -.. code:: javascript - - { - path: '/public/design/color.txt', - relativePath: 'color.txt', - origin: 'window', - oldValue: 'white', - newValue: 'blue', - oldContentType: 'text/plain', - newContentType: 'text/plain' - } - -But when this change is pushed out by asynchronous synchronization, this change -may be rejected by the server, if the remote version has in the meantime changed -from 'white' to for instance 'red'; this will then lead to a change event with -origin 'conflict' (usually a few seconds after the event with origin 'window', -if you have those activated). Note that since you already changed it from -'white' to 'blue' in the local version a few seconds ago, ``oldValue`` is now -your local value of 'blue': - -.. code:: javascript - - { - path: '/public/design/color.txt', - relativePath: 'color.txt', - origin: 'conflict', - oldValue: 'blue', - newValue: 'red', - oldContentType: 'text/plain', - newContentType: 'text/plain', - // Most recent known common ancestor body of local and remote - lastCommonValue: 'white', - // Most recent known common ancestor contentType of local and remote - lastCommonContentType: 'text/plain' - } - -Conflict Resolution -""""""""""""""""""" - -Conflicts are resolved by calling :func:`storeObject` or :func:`storeFile` on -the device where the conflict surfaced. Other devices are not aware of the -conflict. - -If there is an algorithm to merge the differences between local and remote -versions of the data, conflicts may be automatically resolved. -:func:`storeObject` or :func:`storeFile` must not be called synchronously from -the change event handler, nor by chaining Promises. :func:`storeObject` or -:func:`storeFile` must not be called until the next iteration of the JavaScript -Task Queue, using for example `setTimeout()`_. - -If no algorithm exists, conflict resolution typically involves displaying local -and remote versions to the user, and having the user merge them, or choose -which version to keep. - -.. _setTimeout(): https://developer.mozilla.org/en-US/docs/Web/API/WindowOrWorkerGlobalScope/setTimeout - -Data types ----------- - -.. autofunction:: BaseClient#declareType(alias, uri, schema) - :short-name: - - Example: - - .. code:: javascript - - client.declareType('todo-item', { - "type": "object", - "properties": { - "id": { - "type": "string" - }, - "title": { - "type": "string" - }, - "finished": { - "type": "boolean" - "default": false - }, - "createdAt": { - "type": "date" - } - }, - "required": ["id", "title"] - }) - - Visit ``_ for details on how - to use JSON Schema. - -.. autofunction:: BaseClient#validate(object) - :short-name: - - - Example: - - .. code:: javascript - - var result = client.validate(document); - - // result: - // { - // error: null, - // missing: [], - // valid: true - // } - - -Caching -------- - -.. autofunction:: BaseClient#cache(path, strategy) - :short-name: - - Example: - - .. code:: javascript - - client.cache('documents/', 'ALL'); - -.. autofunction:: BaseClient#flush(path) - :short-name: - - Example: - - .. code:: javascript - - client.flush('documents/'); - -Other functions ---------------- - -.. autofunction:: BaseClient#getItemURL(path) - :short-name: - - .. WARNING:: - This method currently only works for remoteStorage - backends. The issues for implementing it for Dropbox and Google - Drive can be found at :issue:`1052` and :issue:`1054`. - -.. autofunction:: BaseClient#scope(path) - :short-name: diff --git a/doc/js-api/caching.rst b/doc/js-api/caching.rst deleted file mode 100644 index 17c6ab4bc..000000000 --- a/doc/js-api/caching.rst +++ /dev/null @@ -1,93 +0,0 @@ -Caching -======= - -The caching class gets initialized as ``remoteStorage.caching``, unless the -:doc:`RemoteStorage ` instance is created with the -option ``cache: false``, disabling caching entirely. - -In case your app hasn't explictly configured caching, the default setting is to -cache any documents that have been either created or requested since your app -loaded. For offline-capable apps, it usually makes sense to enable full, -automatic caching of all documents, which is what :func:`enable` will do. - -Enabling full caching has several benefits: - -* Speed of access: locally cached data is available to the app a lot faster. -* Offline mode: when all data is cached, it can also be read when your app - starts while being offline. -* Initial synchronization time: the amount of data your app caches can - have a significant impact on its startup time. - -Caching can be configured on a per-path basis. When caching is enabled for a -folder, it causes all subdirectories to be cached as well. - -.. _caching-strategies: - -Caching strategies ------------------- - -For each subtree, you can set the caching strategy to ``ALL``, ``SEEN`` -(default), and ``FLUSH``. - -* ``ALL`` means that once all outgoing changes have been pushed, sync will - start retrieving nodes to cache pro-actively. If a local copy exists - of everything, it will check on each sync whether the ETag of the root - folder changed, and retrieve remote changes if they exist. -* ``SEEN`` does this only for documents and folders that have been either - read from or written to at least once since connecting to the current - remote backend, plus their parent/ancestor folders up to the root (to - make tree-based sync possible). -* ``FLUSH`` will only cache outgoing changes, and forget them as soon as - they have been saved to remote successfully. - -List of functions -------------------- - -.. autofunction:: Caching#enable(path) - :short-name: - - Example: - - .. code:: javascript - - remoteStorage.caching.enable('/bookmarks/'); - -.. autofunction:: Caching#disable(path) - :short-name: - - Example: - - .. code:: javascript - - remoteStorage.caching.disable('/bookmarks/'); - -.. autofunction:: Caching#set(path, strategy) - :short-name: - - Example: - - .. code:: javascript - - remoteStorage.caching.set('/bookmarks/archive/', 'SEEN'); - -.. autofunction:: Caching#checkPath(path) - :short-name: - - Example: - - .. code:: javascript - - remoteStorage.caching.checkPath('documents/').then(strategy => { - console.log(`caching strategy for 'documents/': ${strategy}`)); - // "caching strategy for 'documents/': SEEN" - }); - -.. autofunction:: Caching#reset - :short-name: - - Example: - - .. code:: javascript - - remoteStorage.caching.reset(); - diff --git a/doc/js-api/remotestorage.rst b/doc/js-api/remotestorage.rst deleted file mode 100644 index c8022ada5..000000000 --- a/doc/js-api/remotestorage.rst +++ /dev/null @@ -1,314 +0,0 @@ -RemoteStorage -============= - -Constructor ------------ - -Create a ``remoteStorage`` class instance like so:: - - const remoteStorage = new RemoteStorage(); - -The constructor can optionally be called with a configuration object. This -example shows all default values:: - - const remoteStorage = new RemoteStorage({ - cache: true, - changeEvents: { - local: true, - window: false, - remote: true, - conflict: true - }, - cordovaRedirectUri: undefined, - logging: false, - modules: [] - }); - -.. NOTE:: - In the current version, it is only possible to use a single - ``RemoteStorage`` instance. You cannot connect to two different remotes yet. - We intend to support this eventually (see issue :issue:`991`) - -.. WARNING:: - For the change events configuration, you currently have to set all events - explicitly. Otherwise it would disable the unspecified ones. (see issue - :issue:`1025`) - -Events ------- - -You can handle events from your ``remoteStorage`` instance by using the -``.on()`` function. For example:: - - remoteStorage.on('connected', function() { - // Storage account has been connected, let’s roll! - }); - -.. _rs-events: - -List of events -^^^^^^^^^^^^^^ - -``ready`` -""""""""" - Emitted when all features are loaded and the RS instance is ready - -``not-connected`` -""""""""""""""""" - Emitted when ready, but no storage connected ("anonymous mode") - -``connected`` -""""""""""""" - Emitted when a remote storage has been connected - -``disconnected`` -"""""""""""""""" - Emitted after disconnect - -``error`` -""""""""" - Emitted when an error occurs; receives an error object as argument - - There are a handful of known errors, which are identified by the ``name`` - property of the error object: - - .. table:: - - ================== ============================================================ - Name Description - ================== ============================================================ - ``Unauthorized`` Emitted when a network request resulted in a 401 or 403 - response. You can use this event to handle invalid OAuth - tokens in custom UI (i.e. when a stored token has been - revoked or expired by the RS server). - ``DiscoveryError`` A variety of storage discovery errors, e.g. from user - address input validation, or user address lookup issues - ================== ============================================================ - - Example:: - - remoteStorage.on('error', err => console.log(err)); - - // { - // name: "Unauthorized", - // message: "App authorization expired or revoked.", - // stack: "Error↵ at new a.Unauthorized (vendor.js:65710:41870)" - // } - -``features-loaded`` -""""""""""""""""""" - Emitted when all features are loaded - -``connecting`` -"""""""""""""" - Emitted before webfinger lookup - -``authing`` -""""""""""" - Emitted before redirecting to the authing server - -``wire-busy`` -""""""""""""" - Emitted when a network request starts - -``wire-done`` -""""""""""""" - Emitted when a network request completes - -``sync-req-done`` -""""""""""""""""" - Emitted when a single sync request has finished. Callback functions - receive an object as argument, informing the client of remaining items - in the current sync task queue. - - Example:: - - remoteStorage.on('sync-req-done', result => console.log(result)); - - // { tasksRemaining: 21 } - - .. NOTE:: - The internal task queue holds at most 100 items at the same time, - regardless of the overall amount of items to sync. Therefore, this number - is only an indicator of sync status, not a precise amount of items left - to sync. It can be useful to determine if your app should display any - kind of sync status/progress information for the cycle or not. - -``sync-done`` -""""""""""""" - Emitted when a sync cycle has been completed and a new sync is scheduled. - - The callback function receives an object as argument, informing the client - if the sync process has completed successfully or not. - - Example:: - - remoteStorage.on('sync-done', result => console.log(result)); - - // { completed: true } - - If ``completed`` is ``false``, it means that some of the sync requests have - failed and will be retried in the next sync cycle (usually a few seconds - later in this case). This is not an unusual scenario on mobile networks or - when doing a large initial sync for example. - - For an app's user interface, you may want to consider the sync process as - ongoing in this case, and wait until your app sees a positive ``completed`` - status before updating the UI. - -``network-offline`` -""""""""""""""""""" - Emitted once when a wire request fails for the first time, and - ``remote.online`` is set to false - -``network-online`` -"""""""""""""""""" - Emitted once when a wire request succeeds for the first time after a failed - one, and ``remote.online`` is set back to true - -``sync-interval-change`` -"""""""""""""""""""""""" - Emitted when the sync interval changes - -List of functions ------------------ - -The following methods/functions can be called on your ``remoteStorage`` instance: - -.. autofunction:: RemoteStorage#connect(userAddress, [token]) - :short-name: - - Example:: - - remoteStorage.connect('user@example.com'); - -.. autofunction:: RemoteStorage#disconnect - :short-name: - - Example:: - - remoteStorage.disconnect(); - -.. autofunction:: RemoteStorage#enableLog - :short-name: - - Example:: - - remoteStorage.enableLog(); - -.. autofunction:: RemoteStorage#disableLog - :short-name: - - Example:: - - remoteStorage.disableLog(); - -.. autofunction:: RemoteStorage#getSyncInterval - :short-name: - - Example:: - - remoteStorage.getSyncInterval(); - // 10000 - -.. autofunction:: RemoteStorage#setSyncInterval(interval) - :short-name: - - Example:: - - remoteStorage.setSyncInterval(10000); - -.. autofunction:: RemoteStorage#getBackgroundSyncInterval - :short-name: - - Example:: - - remoteStorage.getBackgroundSyncInterval(); - // 60000 - -.. autofunction:: RemoteStorage#setBackgroundSyncInterval(interval) - :short-name: - - Example:: - - remoteStorage.setBackgroundSyncInterval(60000); - -.. autofunction:: RemoteStorage#getCurrentSyncInterval - :short-name: - - Example:: - - remoteStorage.getCurrentSyncInterval(); - // 15000 - -.. autofunction:: RemoteStorage#getRequestTimeout - :short-name: - - Example:: - - remoteStorage.getRequestTimeout(); - // 30000 - -.. autofunction:: RemoteStorage#setRequestTimeout(timeout) - :short-name: - - Example:: - - remoteStorage.setRequestTimeout(30000); - -.. autofunction:: RemoteStorage#scope(path) - :short-name: - - Example:: - - remoteStorage.scope('/pictures/').getListing(''); - remoteStorage.scope('/public/pictures/').getListing(''); - -.. autofunction:: RemoteStorage#setApiKeys(apiKeys) - :short-name: - - Example:: - - remoteStorage.setApiKeys({ - dropbox: 'your-app-key', - googledrive: 'your-client-id' - }); - -.. autofunction:: RemoteStorage#setCordovaRedirectUri(uri) - :short-name: - - Example:: - - remoteStorage.setCordovaRedirectUri('https://app.wow-much-app.com'); - -.. autofunction:: RemoteStorage#startSync - :short-name: - - Example:: - - remoteStorage.startSync(); - -.. autofunction:: RemoteStorage#stopSync - :short-name: - - Example:: - - remoteStorage.stopSync(); - -.. autofunction:: RemoteStorage#on(eventName, handler) - :short-name: - - Example:: - - remoteStorage.on('connected', function() { - console.log('user connected their storage'); - }); - -.. autofunction:: RemoteStorage#onChange(path, handler) - :short-name: - - Example:: - - remoteStorage.onChange('/bookmarks/', function() { - // your code here - }) diff --git a/doc/legacy.rst b/doc/legacy.rst deleted file mode 100644 index 8df5c402e..000000000 --- a/doc/legacy.rst +++ /dev/null @@ -1,12 +0,0 @@ -Legacy docs -=========== - -These documents have been converted from the old Markdown files in the repo's -``doc/`` folder, but have not yet been updated, rewritten, deleted, or -integrated into the new docs. In short: TO DO, PLZ HELP. ;) - -.. toctree:: - :maxdepth: 2 - :glob: - - legacy/* diff --git a/doc/legacy/json-ld.rst b/doc/legacy/json-ld.rst deleted file mode 100644 index 97d701678..000000000 --- a/doc/legacy/json-ld.rst +++ /dev/null @@ -1,33 +0,0 @@ -Data types -========== - -.. ATTENTION:: - This is 5 years old and needs a better explanation of JSON-LD. Also, we need - to introduce ``@type`` alongside the existing ``@context`` property, which - we're currently (mis)using for specific data types. And we should also think - about not scoping types in module names. - -A great thing about having data on the web, is to be able to link to it and -rearrange it to fit the current circumstances. To facilitate that, eventually -you need to know how the data at hand is structured. For documents on the web, -this is usually done via a MIME type. The MIME type of JSON objects however, is -always application/json. To add that extra layer of "knowing what this object -is", remoteStorage aims to use `JSON-LD `_. - -A first step in that direction is to add a ``@context`` attribute to all JSON -data put into remoteStorage. This is what the *type* is for. - -Within remoteStorage.js, ``@context`` values are built using three components: - -``http://remotestorage.io/spec/modules/`` - A prefix to guarantee uniqueness - -The module name - Module names should be unique as well - -The type name (given as argument to ``declareType()``) - Naming the particular kind of object within its module - -In retrospect, this means that whenever you introduce a new *type* in calls to -``storeObject()``, you should make sure that once your code is in the wild, -future versions of the code are compatible with the same JSON structure. diff --git a/doc/nodejs.rst b/doc/nodejs.rst deleted file mode 100644 index 95576ef78..000000000 --- a/doc/nodejs.rst +++ /dev/null @@ -1,86 +0,0 @@ -Usage with Node.js -================== - -Although remoteStorage.js was initially written for being used in browsers, we -do support using it in a Node.js environment as well. See :doc:`this section -` for getting started. - -.. HINT:: - Node 18 includes ``fetch`` natively, but earlier versions do not, and so it - may be necessary to set ``global.fetch`` with a polyfill such as `node-fetch`_. - -.. _node-fetch: https://www.npmjs.com/package/node-fetch - -The main difference between rs.js in a browser and using it on a server or in a -CLI program is how to connect a storage. The RS protocol uses the OAuth -Implicit Grant flow for clients to receive a bearer token, which they can use -in HTTP requests. This works by redirecting back to the Web application with -the token attached to the redirect URI as a URI fragment. - -Now, with rs.js in a browser, calling -``remoteStorage.connect('user@example.com')`` will take care of the entire -OAuth process, including the parsing of the URI after the redirect, saving the -token to localStorage and changing the library's state to connected. But in a -node.js program, that's obviously not possible, because there's no browser that -will open the OAuth dialog and receive the redirect with the token attached to -the redirect URI. - -connect() with a token ----------------------- - -For this reason, among others, you can call the connect function with a token -that you acquired beforehand:: - - remoteStorage.connect('user@example.com', 'abcdefghijklmnopqrstuvwxyz') - -This will skip the entire OAuth process, because you did that before in some -other way, of course. - -Obtaining a token ------------------ - -For some programs, like e.g. a server daemon, you can usually acquire the token -from your server manually, and then just configure it for example as -environment variable, when running your program. - -For CLI programs, and if you actually want to integrate the OAuth flow in your -program, one possible solution is the following: - -1. Set up a simple Web site/app, which you publish under a fitting domain/URI - that you can use as the OAuth redirect URI. -2. Have the user enter their user address and do a Webfinger lookup for auth - URL etc., e.g. using `webfinger.js - `_. -3. Create the OAuth request URI with the correct scope etc., and open a browser - window with that URI from your program (or prompt the user to open it). -4. Have the Web app, which the user is being redirected to, show the token to - the user, in order for them to copy and enter in your program -5. Connect with that token. - -You can find a complete example for this process in `rs-backup`_, a -remoteStorage backup CLI program. In particular `its code for connecting a -storage `_ -and the `simple Web page `_ its -using for the redirect. - -.. HINT:: - rs-backup is not using remoteStorage.js at all, which you might also want to - consider as an option when writing non-browser applications. - -Caveats -------- - -* IndexedDB and localStorage are not supported by default in Node.js, so the - library will fall back to in-memory storage for caching data locally. This - means that unsynchronized data will be lost between sessions and program - executions. - -Examples --------- - -* `hubot-remotestorage-logger`_, a Hubot script that logs chat messages to - remoteStorage-enabled accounts using the `chat-messages`_ module - -.. _hubot-remotestorage-logger: https://github.com/67P/hubot-remotestorage-logger -.. _chat-messages: https://www.npmjs.com/package/remotestorage-module-chat-messages -.. _rs-backup: https://github.com/skddc/rs-backup diff --git a/doc/typescript.rst b/doc/typescript.rst deleted file mode 100644 index b2f708b59..000000000 --- a/doc/typescript.rst +++ /dev/null @@ -1,13 +0,0 @@ -Usage with TypeScript -===================== - -Since version ``2.0.0``, the source code of rs.js itself has been ported to -TypeScript, and release builds now ship with generated type definitions. Thus, -there is no extra type definitions package to import/require, and everything -should just work out of the box. - -.. NOTE:: - - There's still a lot of room for improvement in our TypeScript usage. If - you're experienced with TypeScript, and interested in contributing to rs.js, - your help in this area would be most appreciated. diff --git a/docs/.vitepress/config.mts b/docs/.vitepress/config.mts index 359316316..c2c70c78a 100644 --- a/docs/.vitepress/config.mts +++ b/docs/.vitepress/config.mts @@ -21,7 +21,7 @@ export default defineConfig({ items: [ { text: 'Why use this?', link: '/why' }, { - text: 'Getting started', link: '/getting-started', + text: 'Getting started', link: '/getting-started/', collapsed: true, items: [ { text: 'Adding rs.js to an app', link: '/getting-started/how-to-add' }, @@ -32,6 +32,18 @@ export default defineConfig({ { text: 'Reading and writing data', link: '/getting-started/read-and-write-data' }, ] }, + { + text: 'Data modules', link: '/data-modules/', + collapsed: true, + items: [ + { text: 'Defining a module', link: '/data-modules/defining-a-module' }, + { text: 'Defining data types', link: '/data-modules/defining-data-types' }, + { text: 'Publishing and finding modules', link: '/data-modules/publishing-and-finding-modules' }, + ] + }, + { text: 'Usage with Node.js', link: '/nodejs' }, + { text: 'Usage in Cordova apps', link: '/cordova' }, + { text: 'Usage with TypeScript', link: '/typescript' }, ] }, { @@ -42,7 +54,27 @@ export default defineConfig({ { text: 'Access', link: '/api/access/classes/Access' }, { text: 'Caching', link: '/api/caching/classes/Caching' }, ] - } + }, + { + text: 'Contributing', link: '/contributing/', + collapsed: true, + items: [ + { text: 'Code overview', link: '/contributing/code-overview' }, + { text: 'Building', link: '/contributing/building' }, + { text: 'Testing', link: '/contributing/testing' }, + { text: 'Documentation', link: '/contributing/docs' }, + { text: 'GitHub workflow', link: '/contributing/github-flow' }, + { text: 'Release checklist', link: '/contributing/release-checklist' }, + { text: 'Library internals', link: '/contributing/internals/', + collapsed: true, + items: [ + { text: 'Discovery bootstrap', link: '/contributing/internals/discovery-bootstrap' }, + { text: 'Caching', link: '/contributing/internals/caching' }, + { text: 'Data format of the local cache', link: '/contributing/internals/cache-data-format' }, + ] + }, + ] + }, ], socialLinks: [ diff --git a/docs/api/access/classes/Access.md b/docs/api/access/classes/Access.md index 1d9d1046c..925c97c49 100644 --- a/docs/api/access/classes/Access.md +++ b/docs/api/access/classes/Access.md @@ -1,87 +1,10 @@ # Class: Access -Keeps track of claimed access and scopes. - -## Accessors - -### scopes - -> `get` **scopes**(): `ScopeEntry`[] - -Property: scopes - -Holds an array of claimed scopes: - -```js -[{ name: "", mode: "" }] -``` - -#### Returns - -`ScopeEntry`[] - -#### Source - -[access.ts:44](https://github.com/remotestorage/remotestorage.js/blob/4becb1901daee467dbfa441504b8a183899c93a2/src/access.ts#L44) +This class is for requesting and managing access to modules/folders on the +remote. It gets initialized as `remoteStorage.access`. ## Methods -### checkPathPermission() - -> **checkPathPermission**(`path`, `mode`): `boolean` - -Verify permission for a given path. - -#### Parameters - -• **path**: `string` - -Path - -• **mode**: `AccessMode` - -Access mode - -#### Returns - -`boolean` - -true if the requested access mode is active, false otherwise - -#### Source - -[access.ts:120](https://github.com/remotestorage/remotestorage.js/blob/4becb1901daee467dbfa441504b8a183899c93a2/src/access.ts#L120) - -*** - -### checkPermission() - -> **checkPermission**(`scope`, `mode`): `boolean` - -Verify permission for a given scope. - -#### Parameters - -• **scope**: `string` - -Access scope - -• **mode**: `AccessMode` - -Access mode - -#### Returns - -`boolean` - -true if the requested access mode is active, false otherwise - -#### Source - -[access.ts:108](https://github.com/remotestorage/remotestorage.js/blob/4becb1901daee467dbfa441504b8a183899c93a2/src/access.ts#L108) - -*** - ### claim() > **claim**(`scope`, `mode`): `void` @@ -92,78 +15,29 @@ Claim access on a given scope with given mode. • **scope**: `string` -An access scope, such as "contacts" or "calendar" +An access scope, such as `contacts` or `calendar` • **mode**: `AccessMode` -Access mode. Either "r" for read-only or "rw" for read/write +Access mode. Either `r` for read-only or `rw` for read/write #### Returns `void` -#### Source - -[access.ts:62](https://github.com/remotestorage/remotestorage.js/blob/4becb1901daee467dbfa441504b8a183899c93a2/src/access.ts#L62) - -*** - -### get() - -> **get**(`scope`): `AccessMode` - -Get the access mode for a given scope. - -#### Parameters - -• **scope**: `string` - -Access scope - -#### Returns - -`AccessMode` - -Access mode - -#### Source - -[access.ts:79](https://github.com/remotestorage/remotestorage.js/blob/4becb1901daee467dbfa441504b8a183899c93a2/src/access.ts#L79) - -*** +#### Example -### remove() - -> **remove**(`scope`): `void` - -Remove access for the given scope. - -#### Parameters - -• **scope**: `string` - -Access scope - -#### Returns - -`void` - -#### Source - -[access.ts:89](https://github.com/remotestorage/remotestorage.js/blob/4becb1901daee467dbfa441504b8a183899c93a2/src/access.ts#L89) - -*** - -### reset() - -> **reset**(): `void` - -Reset all access permissions. +```javascript +remoteStorage.access.claim('contacts', 'r'); +remoteStorage.access.claim('pictures', 'rw'); +``` -#### Returns +Claiming root access, meaning complete access to all files and folders of a storage, can be done using an asterisk for the scope: -`void` +```javascript +remoteStorage.access.claim('*', 'rw'); +``` #### Source -[access.ts:132](https://github.com/remotestorage/remotestorage.js/blob/4becb1901daee467dbfa441504b8a183899c93a2/src/access.ts#L132) +[access.ts:73](https://github.com/remotestorage/remotestorage.js/blob/1966eed75e2e4c81d5410b5a500cddf1f63a1cc0/src/access.ts#L73) diff --git a/docs/api/baseclient/classes/BaseClient.md b/docs/api/baseclient/classes/BaseClient.md index 8c22e3872..83d843e2f 100644 --- a/docs/api/baseclient/classes/BaseClient.md +++ b/docs/api/baseclient/classes/BaseClient.md @@ -19,7 +19,7 @@ corresponding publicClient `/public//`. #### Source -[baseclient.ts:32](https://github.com/remotestorage/remotestorage.js/blob/4becb1901daee467dbfa441504b8a183899c93a2/src/baseclient.ts#L32) +[baseclient.ts:32](https://github.com/remotestorage/remotestorage.js/blob/1966eed75e2e4c81d5410b5a500cddf1f63a1cc0/src/baseclient.ts#L32) *** @@ -31,7 +31,7 @@ The [RemoteStorage](../../remotestorage/classes/RemoteStorage.md) instance this #### Source -[baseclient.ts:24](https://github.com/remotestorage/remotestorage.js/blob/4becb1901daee467dbfa441504b8a183899c93a2/src/baseclient.ts#L24) +[baseclient.ts:24](https://github.com/remotestorage/remotestorage.js/blob/1966eed75e2e4c81d5410b5a500cddf1f63a1cc0/src/baseclient.ts#L24) ## Methods @@ -63,7 +63,7 @@ The same instance this is called on to allow for method chaining #### Source -[baseclient.ts:321](https://github.com/remotestorage/remotestorage.js/blob/4becb1901daee467dbfa441504b8a183899c93a2/src/baseclient.ts#L321) +[baseclient.ts:321](https://github.com/remotestorage/remotestorage.js/blob/1966eed75e2e4c81d5410b5a500cddf1f63a1cc0/src/baseclient.ts#L321) *** @@ -93,7 +93,7 @@ A JSON Schema object describing the object type #### Source -[baseclient.ts:358](https://github.com/remotestorage/remotestorage.js/blob/4becb1901daee467dbfa441504b8a183899c93a2/src/baseclient.ts#L358) +[baseclient.ts:358](https://github.com/remotestorage/remotestorage.js/blob/1966eed75e2e4c81d5410b5a500cddf1f63a1cc0/src/baseclient.ts#L358) *** @@ -113,7 +113,7 @@ TODO: document #### Source -[baseclient.ts:345](https://github.com/remotestorage/remotestorage.js/blob/4becb1901daee467dbfa441504b8a183899c93a2/src/baseclient.ts#L345) +[baseclient.ts:345](https://github.com/remotestorage/remotestorage.js/blob/1966eed75e2e4c81d5410b5a500cddf1f63a1cc0/src/baseclient.ts#L345) *** @@ -142,7 +142,7 @@ A promise for an object #### Source -[baseclient.ts:100](https://github.com/remotestorage/remotestorage.js/blob/4becb1901daee467dbfa441504b8a183899c93a2/src/baseclient.ts#L100) +[baseclient.ts:100](https://github.com/remotestorage/remotestorage.js/blob/1966eed75e2e4c81d5410b5a500cddf1f63a1cc0/src/baseclient.ts#L100) *** @@ -173,7 +173,7 @@ A promise for an object #### Source -[baseclient.ts:144](https://github.com/remotestorage/remotestorage.js/blob/4becb1901daee467dbfa441504b8a183899c93a2/src/baseclient.ts#L144) +[baseclient.ts:144](https://github.com/remotestorage/remotestorage.js/blob/1966eed75e2e4c81d5410b5a500cddf1f63a1cc0/src/baseclient.ts#L144) *** @@ -199,7 +199,7 @@ The full URL of the item, including the storage origin #### Source -[baseclient.ts:297](https://github.com/remotestorage/remotestorage.js/blob/4becb1901daee467dbfa441504b8a183899c93a2/src/baseclient.ts#L297) +[baseclient.ts:297](https://github.com/remotestorage/remotestorage.js/blob/1966eed75e2e4c81d5410b5a500cddf1f63a1cc0/src/baseclient.ts#L297) *** @@ -228,7 +228,7 @@ A promise for an object representing child nodes #### Source -[baseclient.ts:79](https://github.com/remotestorage/remotestorage.js/blob/4becb1901daee467dbfa441504b8a183899c93a2/src/baseclient.ts#L79) +[baseclient.ts:79](https://github.com/remotestorage/remotestorage.js/blob/1966eed75e2e4c81d5410b5a500cddf1f63a1cc0/src/baseclient.ts#L79) *** @@ -259,7 +259,7 @@ A promise, which resolves with the requested object (or ``null`` #### Source -[baseclient.ts:203](https://github.com/remotestorage/remotestorage.js/blob/4becb1901daee467dbfa441504b8a183899c93a2/src/baseclient.ts#L203) +[baseclient.ts:203](https://github.com/remotestorage/remotestorage.js/blob/1966eed75e2e4c81d5410b5a500cddf1f63a1cc0/src/baseclient.ts#L203) *** @@ -281,7 +281,7 @@ Path relative to the module root. #### Source -[baseclient.ts:278](https://github.com/remotestorage/remotestorage.js/blob/4becb1901daee467dbfa441504b8a183899c93a2/src/baseclient.ts#L278) +[baseclient.ts:278](https://github.com/remotestorage/remotestorage.js/blob/1966eed75e2e4c81d5410b5a500cddf1f63a1cc0/src/baseclient.ts#L278) *** @@ -306,7 +306,7 @@ A new client operating on a subpath of the current base path #### Source -[baseclient.ts:65](https://github.com/remotestorage/remotestorage.js/blob/4becb1901daee467dbfa441504b8a183899c93a2/src/baseclient.ts#L65) +[baseclient.ts:65](https://github.com/remotestorage/remotestorage.js/blob/1966eed75e2e4c81d5410b5a500cddf1f63a1cc0/src/baseclient.ts#L65) *** @@ -338,7 +338,7 @@ A promise for the created/updated revision (ETag) #### Source -[baseclient.ts:167](https://github.com/remotestorage/remotestorage.js/blob/4becb1901daee467dbfa441504b8a183899c93a2/src/baseclient.ts#L167) +[baseclient.ts:167](https://github.com/remotestorage/remotestorage.js/blob/1966eed75e2e4c81d5410b5a500cddf1f63a1cc0/src/baseclient.ts#L167) *** @@ -377,7 +377,7 @@ Resolves with revision on success. Rejects with #### Source -[baseclient.ts:240](https://github.com/remotestorage/remotestorage.js/blob/4becb1901daee467dbfa441504b8a183899c93a2/src/baseclient.ts#L240) +[baseclient.ts:240](https://github.com/remotestorage/remotestorage.js/blob/1966eed75e2e4c81d5410b5a500cddf1f63a1cc0/src/baseclient.ts#L240) *** @@ -401,4 +401,4 @@ An object containing information about validation errors #### Source -[baseclient.ts:380](https://github.com/remotestorage/remotestorage.js/blob/4becb1901daee467dbfa441504b8a183899c93a2/src/baseclient.ts#L380) +[baseclient.ts:380](https://github.com/remotestorage/remotestorage.js/blob/1966eed75e2e4c81d5410b5a500cddf1f63a1cc0/src/baseclient.ts#L380) diff --git a/docs/api/caching/classes/Caching.md b/docs/api/caching/classes/Caching.md new file mode 100644 index 000000000..df7a4516f --- /dev/null +++ b/docs/api/caching/classes/Caching.md @@ -0,0 +1,145 @@ +# Class: Caching + +Caching + +Holds/manages caching configuration. + +## Methods + +### checkPath() + +> **checkPath**(`path`): `string` + +Retrieve caching setting for a given path, or its next parent +with a caching strategy set. + +#### Parameters + +• **path**: `string` + +Path to retrieve setting for + +#### Returns + +`string` + +caching strategy for the path + +#### Source + +[caching.ts:99](https://github.com/remotestorage/remotestorage.js/blob/1966eed75e2e4c81d5410b5a500cddf1f63a1cc0/src/caching.ts#L99) + +*** + +### disable() + +> **disable**(`path`): `void` + +Disable caching for a given path. + +Uses caching strategy ``FLUSH`` (meaning items are only cached until +successfully pushed to the remote). + +#### Parameters + +• **path**: `string` + +Path to disable caching for + +#### Returns + +`void` + +#### Source + +[caching.ts:74](https://github.com/remotestorage/remotestorage.js/blob/1966eed75e2e4c81d5410b5a500cddf1f63a1cc0/src/caching.ts#L74) + +*** + +### enable() + +> **enable**(`path`): `void` + +Enable caching for a given path. + +Uses caching strategy ``ALL``. + +#### Parameters + +• **path**: `string` + +Path to enable caching for + +#### Returns + +`void` + +#### Source + +[caching.ts:62](https://github.com/remotestorage/remotestorage.js/blob/1966eed75e2e4c81d5410b5a500cddf1f63a1cc0/src/caching.ts#L62) + +*** + +### onActivate() + +> **onActivate**(`cb`): `void` + +Set a callback for when caching is activated for a path. + +#### Parameters + +• **cb** + +Callback function + +#### Returns + +`void` + +#### Source + +[caching.ts:83](https://github.com/remotestorage/remotestorage.js/blob/1966eed75e2e4c81d5410b5a500cddf1f63a1cc0/src/caching.ts#L83) + +*** + +### reset() + +> **reset**(): `void` + +Reset the state of caching by deleting all caching information. + +#### Returns + +`void` + +#### Source + +[caching.ts:112](https://github.com/remotestorage/remotestorage.js/blob/1966eed75e2e4c81d5410b5a500cddf1f63a1cc0/src/caching.ts#L112) + +*** + +### set() + +> **set**(`path`, `strategy`): `void` + +Configure caching for a given path explicitly. + +Not needed when using ``enable``/``disable``. + +#### Parameters + +• **path**: `string` + +Path to cache + +• **strategy**: `"ALL"` \| `"SEEN"` \| `"FLUSH"` + +Caching strategy. One of 'ALL', 'SEEN', or 'FLUSH'. + +#### Returns + +`void` + +#### Source + +[caching.ts:28](https://github.com/remotestorage/remotestorage.js/blob/1966eed75e2e4c81d5410b5a500cddf1f63a1cc0/src/caching.ts#L28) diff --git a/docs/api/caching/index.md b/docs/api/caching/index.md new file mode 100644 index 000000000..d09e271f9 --- /dev/null +++ b/docs/api/caching/index.md @@ -0,0 +1,7 @@ +# caching + +## Index + +### Classes + +- [Caching](classes/Caching.md) diff --git a/docs/api/index.md b/docs/api/index.md index 2654d1b19..af641c0cf 100644 --- a/docs/api/index.md +++ b/docs/api/index.md @@ -1,2 +1,80 @@ -# JavaScript API +# remoteStorage.js +[![npm](https://img.shields.io/npm/v/remotestoragejs.svg)](https://www.npmjs.com/package/remotestoragejs) +[![Build Status](https://github.com/remotestorage/remotestorage.js/actions/workflows/test-and-lint.yml/badge.svg)](https://github.com/remotestorage/remotestorage.js/actions/workflows/test-and-lint.yml?query=branch%3Amaster) + +remoteStorage.js is a JavaScript library for storing user data locally in the +browser, as well as connecting to [remoteStorage](http://remotestorage.io) +servers and syncing data across devices and applications. It is also capable of +connecting and syncing data with a person's Dropbox or Google Drive account +(optional). + +The library is well-tested and actively maintained. It is safe to use in +production. + +### Where to get help? + +* See [remotestorage.io](http://remotestorage.io/) for general information + about the remoteStorage protocol +* Read [the docs](http://remotestoragejs.readthedocs.io/) (source files in `doc/`) + * [Why use this?](https://remotestoragejs.readthedocs.io/en/latest/why.html) + * [Getting started](https://remotestoragejs.readthedocs.io/en/latest/getting-started.html) + * [Data modules](https://remotestoragejs.readthedocs.io/en/latest/data-modules.html) + * [JavaScript API](https://remotestoragejs.readthedocs.io/en/latest/js-api.html) + * [Usage with Node.js](https://remotestoragejs.readthedocs.io/en/latest/nodejs.html) +* Ask questions on the [community forums](https://community.remotestorage.io/) +* Ask questions on IRC in [#remotestorage on Libera.Chat](ircs://irc.libera.chat:6697/remotestorage) + ([Web Chat](https://web.libera.chat/#remotestorage)) + (wait a bit, if nobody's responding right away) +* If you found a potential bug, or want to propose a change, [open an issue on + GitHub](https://github.com/remotestorage/remotestorage.js/issues). New issues + will usually receive a response within 24-48 hours. + +### Running a local test server + +To develop remoteStorage-enabled apps, you need to have a +remoteStorage-compatible storage account. We recommend +[php-remote-storage](https://github.com/fkooman/php-remote-storage) (PHP), or +[armadietto](https://github.com/remotestorage/armadietto) (node.js), or +[mysteryshack](https://github.com/untitaker/mysteryshack) (Rust) for running a +local test server, or for self-hosting an RS server. + +You can also get an account with a hoster, or use another +remoteStorage server implementation: [Servers](https://wiki.remotestorage.io/Servers). + +### Visual File Browser + +If you'd like a visual UI for inspecting any RS-compatible account, you can use the [RS Inspektor](https://gitea.kosmos.org/raucao/inspektor) app (which is also implemented using this library). + +### Developing, Contributing + +remoteStorage.js is a grassroots project, developed by the community, for the +community. We'd be happy to count you among the many [people who +contributed](https://github.com/remotestorage/remotestorage.js/graphs/contributors) +to the project so far! + +Read our [Contributing docs](https://remotestoragejs.readthedocs.io/en/latest/contributing.html) +to get started. + +### Versioning + +We adhere to [Semantic Versioning](http://semver.org/). This means that +breaking changes will result in a new major version. With npm, you can make +sure to only automatically upgrade to API-compatible versions by using either +the `^` prefix, or `x` as indicator for flexible numbers: + +```js +"devDependencies": { + "remotestoragejs": "1.x" // same as "^1.0.0" +} +``` + +### Credits + +Original authors: Niklas Cathor, Michiel de Jong + +See [list of all contributors](https://github.com/remotestorage/remotestorage.js/graphs/contributors) + +Previously sponsored by [NLnet](https://nlnet.nl) + +[![NLnet Logo](http://sockethub.org/res/img/nlnet-logo.svg)](https://nlnet.nl) diff --git a/docs/api/remotestorage/classes/RemoteStorage.md b/docs/api/remotestorage/classes/RemoteStorage.md index 70fadd4c9..81f52fcef 100644 --- a/docs/api/remotestorage/classes/RemoteStorage.md +++ b/docs/api/remotestorage/classes/RemoteStorage.md @@ -58,7 +58,7 @@ The user address (user@host) or URL to connect to. #### Source -[remotestorage.ts:377](https://github.com/remotestorage/remotestorage.js/blob/4becb1901daee467dbfa441504b8a183899c93a2/src/remotestorage.ts#L377) +[remotestorage.ts:377](https://github.com/remotestorage/remotestorage.js/blob/1966eed75e2e4c81d5410b5a500cddf1f63a1cc0/src/remotestorage.ts#L377) *** @@ -76,7 +76,7 @@ Disable remoteStorage logging #### Source -[remotestorage.ts:550](https://github.com/remotestorage/remotestorage.js/blob/4becb1901daee467dbfa441504b8a183899c93a2/src/remotestorage.ts#L550) +[remotestorage.ts:550](https://github.com/remotestorage/remotestorage.js/blob/1966eed75e2e4c81d5410b5a500cddf1f63a1cc0/src/remotestorage.ts#L550) *** @@ -95,7 +95,7 @@ cache. #### Source -[remotestorage.ts:460](https://github.com/remotestorage/remotestorage.js/blob/4becb1901daee467dbfa441504b8a183899c93a2/src/remotestorage.ts#L460) +[remotestorage.ts:460](https://github.com/remotestorage/remotestorage.js/blob/1966eed75e2e4c81d5410b5a500cddf1f63a1cc0/src/remotestorage.ts#L460) *** @@ -113,7 +113,7 @@ Enable remoteStorage logging. #### Source -[remotestorage.ts:541](https://github.com/remotestorage/remotestorage.js/blob/4becb1901daee467dbfa441504b8a183899c93a2/src/remotestorage.ts#L541) +[remotestorage.ts:541](https://github.com/remotestorage/remotestorage.js/blob/1966eed75e2e4c81d5410b5a500cddf1f63a1cc0/src/remotestorage.ts#L541) *** @@ -131,7 +131,7 @@ A number of milliseconds #### Source -[remotestorage.ts:820](https://github.com/remotestorage/remotestorage.js/blob/4becb1901daee467dbfa441504b8a183899c93a2/src/remotestorage.ts#L820) +[remotestorage.ts:820](https://github.com/remotestorage/remotestorage.js/blob/1966eed75e2e4c81d5410b5a500cddf1f63a1cc0/src/remotestorage.ts#L820) *** @@ -150,7 +150,7 @@ A number of milliseconds #### Source -[remotestorage.ts:845](https://github.com/remotestorage/remotestorage.js/blob/4becb1901daee467dbfa441504b8a183899c93a2/src/remotestorage.ts#L845) +[remotestorage.ts:845](https://github.com/remotestorage/remotestorage.js/blob/1966eed75e2e4c81d5410b5a500cddf1f63a1cc0/src/remotestorage.ts#L845) *** @@ -168,7 +168,7 @@ A number of milliseconds #### Source -[remotestorage.ts:854](https://github.com/remotestorage/remotestorage.js/blob/4becb1901daee467dbfa441504b8a183899c93a2/src/remotestorage.ts#L854) +[remotestorage.ts:854](https://github.com/remotestorage/remotestorage.js/blob/1966eed75e2e4c81d5410b5a500cddf1f63a1cc0/src/remotestorage.ts#L854) *** @@ -186,7 +186,7 @@ A number of milliseconds #### Source -[remotestorage.ts:797](https://github.com/remotestorage/remotestorage.js/blob/4becb1901daee467dbfa441504b8a183899c93a2/src/remotestorage.ts#L797) +[remotestorage.ts:797](https://github.com/remotestorage/remotestorage.js/blob/1966eed75e2e4c81d5410b5a500cddf1f63a1cc0/src/remotestorage.ts#L797) *** @@ -208,7 +208,7 @@ The same as . #### Source -[remotestorage.ts:559](https://github.com/remotestorage/remotestorage.js/blob/4becb1901daee467dbfa441504b8a183899c93a2/src/remotestorage.ts#L559) +[remotestorage.ts:559](https://github.com/remotestorage/remotestorage.js/blob/1966eed75e2e4c81d5410b5a500cddf1f63a1cc0/src/remotestorage.ts#L559) *** @@ -240,7 +240,7 @@ Handler function #### Source -[remotestorage.ts:529](https://github.com/remotestorage/remotestorage.js/blob/4becb1901daee467dbfa441504b8a183899c93a2/src/remotestorage.ts#L529) +[remotestorage.ts:529](https://github.com/remotestorage/remotestorage.js/blob/1966eed75e2e4c81d5410b5a500cddf1f63a1cc0/src/remotestorage.ts#L529) *** @@ -256,7 +256,7 @@ Reconnect the remote server to get a new authorization. #### Source -[remotestorage.ts:444](https://github.com/remotestorage/remotestorage.js/blob/4becb1901daee467dbfa441504b8a183899c93a2/src/remotestorage.ts#L444) +[remotestorage.ts:444](https://github.com/remotestorage/remotestorage.js/blob/1966eed75e2e4c81d5410b5a500cddf1f63a1cc0/src/remotestorage.ts#L444) *** @@ -285,7 +285,7 @@ A client with the specified scope (category/base directory) #### Source -[remotestorage.ts:782](https://github.com/remotestorage/remotestorage.js/blob/4becb1901daee467dbfa441504b8a183899c93a2/src/remotestorage.ts#L782) +[remotestorage.ts:782](https://github.com/remotestorage/remotestorage.js/blob/1966eed75e2e4c81d5410b5a500cddf1f63a1cc0/src/remotestorage.ts#L782) *** @@ -311,7 +311,7 @@ A config object with these properties: #### Source -[remotestorage.ts:570](https://github.com/remotestorage/remotestorage.js/blob/4becb1901daee467dbfa441504b8a183899c93a2/src/remotestorage.ts#L570) +[remotestorage.ts:570](https://github.com/remotestorage/remotestorage.js/blob/1966eed75e2e4c81d5410b5a500cddf1f63a1cc0/src/remotestorage.ts#L570) *** @@ -334,7 +334,7 @@ Sync interval in milliseconds (between 2000 and 3600000 [1 hour]) #### Source -[remotestorage.ts:830](https://github.com/remotestorage/remotestorage.js/blob/4becb1901daee467dbfa441504b8a183899c93a2/src/remotestorage.ts#L830) +[remotestorage.ts:830](https://github.com/remotestorage/remotestorage.js/blob/1966eed75e2e4c81d5410b5a500cddf1f63a1cc0/src/remotestorage.ts#L830) *** @@ -357,7 +357,7 @@ A valid HTTP(S) URI #### Source -[remotestorage.ts:612](https://github.com/remotestorage/remotestorage.js/blob/4becb1901daee467dbfa441504b8a183899c93a2/src/remotestorage.ts#L612) +[remotestorage.ts:612](https://github.com/remotestorage/remotestorage.js/blob/1966eed75e2e4c81d5410b5a500cddf1f63a1cc0/src/remotestorage.ts#L612) *** @@ -379,7 +379,7 @@ Timeout in milliseconds #### Source -[remotestorage.ts:863](https://github.com/remotestorage/remotestorage.js/blob/4becb1901daee467dbfa441504b8a183899c93a2/src/remotestorage.ts#L863) +[remotestorage.ts:863](https://github.com/remotestorage/remotestorage.js/blob/1966eed75e2e4c81d5410b5a500cddf1f63a1cc0/src/remotestorage.ts#L863) *** @@ -401,7 +401,7 @@ Sync interval in milliseconds (between 2000 and 3600000 [1 hour]) #### Source -[remotestorage.ts:806](https://github.com/remotestorage/remotestorage.js/blob/4becb1901daee467dbfa441504b8a183899c93a2/src/remotestorage.ts#L806) +[remotestorage.ts:806](https://github.com/remotestorage/remotestorage.js/blob/1966eed75e2e4c81d5410b5a500cddf1f63a1cc0/src/remotestorage.ts#L806) *** @@ -426,7 +426,7 @@ A Promise which resolves when the sync has finished #### Source -[remotestorage.ts:904](https://github.com/remotestorage/remotestorage.js/blob/4becb1901daee467dbfa441504b8a183899c93a2/src/remotestorage.ts#L904) +[remotestorage.ts:904](https://github.com/remotestorage/remotestorage.js/blob/1966eed75e2e4c81d5410b5a500cddf1f63a1cc0/src/remotestorage.ts#L904) *** @@ -442,4 +442,4 @@ Stop the periodic synchronization. #### Source -[remotestorage.ts:917](https://github.com/remotestorage/remotestorage.js/blob/4becb1901daee467dbfa441504b8a183899c93a2/src/remotestorage.ts#L917) +[remotestorage.ts:917](https://github.com/remotestorage/remotestorage.js/blob/1966eed75e2e4c81d5410b5a500cddf1f63a1cc0/src/remotestorage.ts#L917) diff --git a/docs/contributing/building.md b/docs/contributing/building.md new file mode 100644 index 000000000..87f50cc7d --- /dev/null +++ b/docs/contributing/building.md @@ -0,0 +1,49 @@ +# Building + +::: hint +::: title +Hint +::: + +We\'re using npm scripts for all common tasks, so check out the +`scripts` section in `package.json` to learn about what they\'re doing +exactly and what else is available. +::: + +## Setup + +``` console +$ npm install --force +``` + +This will install all dependencies. We currently use the `--force` flag +because of an issue with SphinxJS and TypeDoc (see +`1276`{.interpreted-text role="issue"}). + +## Development + +``` console +$ npm run dev +``` + +This will watch `src/` for changes and build `remotestorage.js` in the +`release/` directory every time you save a source file. Useful for +testing rs.js changes with an app, for example by creating a symlink to +`release/remotestorage.js`. + +This build includes [source +maps](https://www.html5rocks.com/en/tutorials/developertools/sourcemaps/) +directly, so you can easily place `debugger` statements in the code and +step through the actual source code in your browser\'s debugger tool. + +## Production + +``` console +$ npm run build:release +``` + +This creates the minified production build in `release/`. + +It also creates a separate source maps file, which you can link to in +case you want to (e.g. to improve exception tracking/debugging in +production). diff --git a/docs/contributing/code-overview.md b/docs/contributing/code-overview.md new file mode 100644 index 000000000..29d5ac02d --- /dev/null +++ b/docs/contributing/code-overview.md @@ -0,0 +1,32 @@ +# Code overview + +The code of remoteStorage.js consists of files in the `src/` folder of +this repo. These are built into a single file in the `release/` folder +using [webpack](http://webpack.github.io/). Unit tests live in the +`test/` folder and are based on +[Jaribu](https://github.com/silverbucket/jaribu). + +The structure of the code is based around feature loading. Most files in +`src/` correspond to a feature, e.g. `discover.ts` to +`RemoteStorage.Discover` or `caching.ts` to `RemoteStorage.Caching`. + +The feature loading happens synchronously during the page load in +`src/remotestorage.ts` (just including this script in your app will lead +to executing the code that loads the features). + +Most features load under their own name, but for `remoteStorage.local` a +choice is made between `RemoteStorage.IndexedDB`, +`RemoteStorage.LocalStorage` and `RemoteStorage.InMemoryCaching`, +depending on what the environment (browser, node.js, Electron, WebView, +or other) supports. + +For `remoteStorage.local` we then also have a [special +mixin](https://github.com/remotestorage/remotestorage.js/issues/777#issuecomment-57392440) +called `src/cachinglayer.ts`, which mixes in some common functions into +the object. + +The `remoteStorage.remote` feature is not loaded immediately, but only +when `RemoteStorage.Discover` calls `remoteStorage.setBackend()`, at +which point a choice is made between `RemoteStorage.WireClient`, +`RemoteStorage.GoogleDrive`, `RemoteStorage.Dropbox` (or any other +future backend) to become the `remote`. diff --git a/docs/contributing/docs.md b/docs/contributing/docs.md new file mode 100644 index 000000000..cdb6fbe25 --- /dev/null +++ b/docs/contributing/docs.md @@ -0,0 +1,108 @@ +# Documentation + +The documentation for remoteStorage.js is generated from +[reStructuredText](http://docutils.sourceforge.net/rst.html) files in +the `doc/` folder, as well as [TypeDoc](https://typedoc.org/) code +comments, which are being pulled in via special declarations in those +files. + +We use [Sphinx](http://www.sphinx-doc.org/) to generate the +documentation website, and the +[sphinx-js](https://pypi.python.org/pypi/sphinx-js/) extension for +handling the TypeDoc part. + +## How to write reStructuredText and TypeDoc + +For learning both the basics and advances features of reStructuredText, +we highly recommend the [reStructuredText +Primer](http://www.sphinx-doc.org/en/stable/rest.html) on the Sphinx +website. + +For TypeDoc, you can find guides as well as a detailed reference [on the +project\'s website](https://typedoc.org/). + +## Automatic builds and publishing + +The documentation is published via [Read the +Docs](https://readthedocs.org/). Whenever the Git repository\'s `master` +branch is pushed to GitHub, RTD will automatically build a new version +of the site and publish it to +[remotestoragejs.readthedocs.io](https://remotestoragejs.readthedocs.io). + +This means that if you want to contribute to the documentation, you +don\'t necessarily have to set up Sphinx and sphinx-js locally +(especially for small changes). However, if you want to preview what +your local changes look like when they are rendered as HTML, you will +have to set up local builds first. + +## How to build the docs on your machine + +### Setup + +1. [Install Python and PIP](https://pip.pypa.io/en/stable/installing/) + (likely already installed) + +2. Install sphinx-js and extensions (from repository root): + + ``` console + $ pip install -r doc/requirements.txt + ``` + +3. Install TypeScript and TypeDoc globally (so Sphinx can use them): + + ``` console + $ npm -g install typescript typedoc + ``` + +### Build + +Run the following command to automatically watch and build the +documentation: + +``` console +$ npm run autobuild-docs +``` + +This will start a web server, serving rendered HTML docs on +. + +::: hint +::: title +Hint +::: + +The autobuild cannot watch for changes in TypeDoc comments as of now, so +you will need to re-run the command, or change something in a `.rst` +file in order for code documentation changes to be re-built. +::: + +## How to build the docs using ReadTheDocs\' Docker image + +This is useful for troubleshooting when the ReadTheDocs build is +failing. + +### Setup + +1. [Install Docker](https://docs.docker.com/get-docker/) + +2. Pull the latest version of `readthedocs/build` image with the + `latest` tag from Docker Hub: + + ``` console + $ docker pull readthedocs/build:latest + ``` + +### Build + +1. Enter a `bash` session while attaching this project as a volume: + + ``` console + $ docker run --rm -it -v ${PWD}:/app readthedocs/build:latest bash + ``` + +2. Run the `build-with-conda.sh` script to setup conda environment and + build the docs like ReadTheDocs: + + ``` console + $ /app/doc/build-with-conda.sh + ``` diff --git a/docs/contributing/github-flow.md b/docs/contributing/github-flow.md new file mode 100644 index 000000000..dbe459e91 --- /dev/null +++ b/docs/contributing/github-flow.md @@ -0,0 +1,124 @@ +# GitHub workflow + +## General guidelines + +- When you start working on an existing GitHub issue (or you plan on + doing that in the immediate future), assign it to yourself, so that + others can see it and don\'t start working on it in parallel. +- When you create a branch to work on something, use the naming scheme + described further down in this document. +- Never push directly to the `master` branch for any changes to the + source code itself. +- As soon as you want others to review your changes, or even just + discuss them, create a pull request. Don\'t forget to explain + roughly what it is you\'re doing in that branch, i.e. what the + problem/idea is and what the result is supposed to be, when merging + the changes. If necessary or helpful, mention related discussions + from other issues. +- A pull request can be merged as soon as at least two people with + commit access to the repo have given a +1, meaning they reviewed and + tested the changes and have no further improvements to suggest. + +## Branch names + +Using common branch names, that include topics and issue IDs, makes +everyone\'s lives much easier, and keep the repo clean. Branches on our +organization repositories should be created using the following scheme: + +`[bugfix|feature|docs|refactor]/[issue id]-[description_with_underscores]` + +So for example, if you want to work on fixing a bug with let\'s say +initial sync, that is described in issue #423, the branch should look +something like: + +`bugfix/423-race_condition_on_initial_sync` + +And if it\'s an enhancement to the widget it could look like this e.g.: + +`feature/321-customizable_widget_content` + +If there\'s no issue yet, create one first! + +## Pulling changes + +Always use `--rebase` when pulling code from the remote repo. That way +your local changes are added on top of the current history, avoiding +merge commits and mixing up the commit history. You can set up Git to +use rebase on every pull by default by running +`git config --global pull.rebase true` once. + +If you also add the `autostash` option, Git will stash any changed files +before the pull and unstash them afterwards: +`git config --global rebase.autoStash true`. + +If you don\'t want to configure both options globally, or you prefer a +catchier command name for updating a repository with remote changes, we +recommend configuring an alias, like so: +`git config --global alias.up 'pull --rebase --autostash'`. Now you can +simply run `git up` in select repos, or everywhere. + +## Commit messages + +- The first line of the message (aptly called \"subject line\" in Git + terminology) should not be longer than 72 characters. +- If the subject line is not enough to describe the changes properly, + add a blank line after the subject line and then as much text as you + want, using normal language with capitalization, punctuation, etc. +- Always use messages that describe roughly *what* the change does + and, if not obvious, *why* this change leads to the desired result. +- Leave out any text that isn\'t directly associated with the changes, + that the commit introduces. Examples: \"as suggested by + \@chucknorris\", \"lol wtf was that\", \"not sure if this fixes + it\". +- Commit as much and often as possible locally (and with any message + that helps you during your work), and then clean up the history and + merge commits that belong together before pushing to the org repo. + You can do that with `git rebase -i [ref]` ([learn + more](http://www.reviewboard.org/docs/codebase/dev/git/clean-commits/#rewriting-history)). +- You can reference issues from commit messages by adding keywords + with issue numbers. Certain keywords will even close the issue + automatically, once a branch is merged into master. For example + `Fix widget flickering when opening bubble (fixes #423)` will close + issue #423 when appearing on the master branch at GitHub. + +## Reviewing pull requests + +- Check if it works, if it has unit tests, if the tests pass, and if + the linter is happy. +- Check if the code is understandable, with clear and unambiguous + names for functions and variables, and that it has TypeDoc comments + and a changelog entry. +- If the pull request was issued from a user\'s own repository, you + will have to fetch the code from there. If you haven\'t pulled from + their fork previously, you can add a new remote for it with + `git remote add [username] [repo-url]`. Then, `git fetch [username]` + will fetch code from this remote, so you can then check out their + branch using `git checkout [username]/branchname`. +- This will put you in a so-called \'detached HEAD\' state, but don\'t + worry, everything is fine! If you want to work on that code, just + create a new branch from there with the command Git tells you then, + or just go back to your code with e.g. `git checkout master` later.) + +## Merging pull requests + +- Once a pull request has two +1s for the latest changes from + collaborators, you can either merge it yourself or wait for somebody + to do it for you (which will happen very soon). +- If the new commits and their commit messages in that branch all make + sense on their own, you can use the merge button on GitHub directly. +- If there are a lot of small commits, which might not make sense on + their own, or pollute the main project history (often the case with + long running pull requests with a lot of additions during their + lifetime), fetch the latest changes to your local machine, and + either do an interactive rebase to clean up branch and merge + normally, or use `git merge --squash` to squash them all into one + commit during the merge. +- Whenever you squash multiple commits with either `git rebase -i` or + `git merge --squash`, make sure to follow the commit message + guidelines above. Don\'t just leave all old commit messages in there + (which is the default), but delete them and create a new meaningful + message for the whole changeset. +- When squashing/editing/amending other peoples\' commits, use + `--author` to set them as the original author. You don\'t need full + names for that, but just something that Git can find in the history. + It\'ll tell you if it can\'t find an author and let you do it again. diff --git a/docs/contributing/index.md b/docs/contributing/index.md new file mode 100644 index 000000000..8e52230a1 --- /dev/null +++ b/docs/contributing/index.md @@ -0,0 +1,13 @@ +# Contributing + +This section contains information and help for people wanting to +contribute to remoteStorage.js development. + +Every bit helps, even fixing a typo is worth a pull request! + +::: {.toctree maxdepth="2"} +contributing/code-overview.rst contributing/building.rst +contributing/testing.rst contributing/docs.rst +contributing/github-flow.rst contributing/release-checklist.rst +contributing/internals +::: diff --git a/docs/contributing/internals/cache-data-format.md b/docs/contributing/internals/cache-data-format.md new file mode 100644 index 000000000..5ac983661 --- /dev/null +++ b/docs/contributing/internals/cache-data-format.md @@ -0,0 +1,206 @@ +# Data format of the local cache + +This section describes the structure and concepts of the local cache. + +## Storing up to 4 revisions of each node + +Each cache node represents the versioning state of either one document +or one folder. The versioning state is represented by one or more of the +`common`, `local`, `remote`, and `push` revisions. Local changes are +stored in `local`, and in `push` while an outgoing request is active. +Remote changes that have either not been fetched yet, or have not been +merged with local changes yet, are stored in `remote`. + +## autoMerge + +The `sync.autoMerge` function will try to merge local and remote changes +into the common revision of a node. It may emit change events with a +\'conflict\' origin to indicate that an unpushed local change was +overruled by a remote change. + +When consulting the base client about the current value of a node, you +will get either its \'local\' revision if it exists, or its \'common\' +revision otherwise. The following are versioning tree diagrams of how +local and remote revisions of a node can interact: + +``` text +//in sync: +1) . . . . [common] + +//dirty: +2) . . . . [common] + \ + \ . . . . [remote] + +//local change: +3) . . . . [common] . . . . [local] + +//conflict (should autoMerge): +4) . . . . [common] . . . . [local] + \ + \ . . . . [remote] + +//pushing: +5) . . . . [common] . . . . [push] . . . . [local] + +//pushing, and known dirty (should abort the push, or just wait for the conflict to occur): +6) . . . . [common] . . . . [push] . . . . [local] + \ + \ . . . . [remote] +``` + +Each of `local`, `push`, `remote`, and `common` can have have following +properties: + +- for documents: + - body + - contentType + - contentLength + - revision + - timestamp +- for folders: + - itemsMap (itemName -\> true, or itemName -\> false to indicate + an unmerged deletion) + - revision + - timestamp + +NB: The timestamp represents the last sync time, not the last modified +time. It is used by the `isOutdated` function in `src/cachinglayer.js` +to determine if the data needs to be fetched from remote again, or can +be served from cache. + +## \"keep/revert\" conflict resolution + +RemoteStorage implements a hub-and-spokes versioning system, with one +central remoteStorage server (the hub) and any number of clients (the +spokes). The clients will typically be unhosted web apps based on this +JS lib (remotestorage.js), but they don\'t have to be; they can also be +based on other client implementations, they can be hosted web apps, +desktop apps, native smartphone apps, etcetera. New versions of subtrees +always start at one of these clients. They are then sent to the server, +and from there to all the other clients. The server assigns the revision +numbers and sends them to the initiating client using HTTP ETag response +headers in response to PUT requests. remotestorage.js is a library that +attempts to make it easy to build remoteStorage applications, by hiding +both the push/pull synchronization and the version merging from the app +developer. Versioning conflicts between the local client and the remote +server are initially resolved as a \'remote wins\', to which the client +code may respond with an explicit revert (putting the old, local version +back), any type of custom merge (putting the result of the merge in +place), or by doing nothing (\"keep\"), and leaving the remote result in +place. This system is called \"keep/revert\", since the library takes a +pro-active action (\'remote wins\'), which the app can then either keep, +or revert. + +Sync is tree-based: syncing a node is equivalent to syncing all its +children. There are two parts at play, that interact: transporting the +diffs to and from the remote server, and merging the local and remote +versions into one common version. Each document starts out as +non-existing in both its local and remote versions. From there on, it +can be created, updated, and deleted any number of times throughout its +history, both locally and remotely. If at some point in time it either +does not exist neither locally nor remotely, or its body and +content-type are the same byte-for-byte on both sides, then the two +stores are in agreement. If the document exists in only one of the +stores, or the document\'s body or its content-type differs between the +two stores, then the document is in conflict. + +The library is always aware of the latest local version, but it may or +may not be aware of the latest remote version, and therefore of whether +a conflict or agreement exists for the document. Likewise, the server is +not necessarily aware of the latest local version, if there are changes +that haven\'t been pushed out yet; nor does it care, though, since the +server does not get involved in conflict resolution. It only serializes +conditional updates from all clients into one canonical versioning +history. + +The lack of sync between client and server can be fixed by doing a GET, +PUT, or DELETE. A GET will return the current remote version; a +conditional PUT or DELETE will push out the change, while at the same +time checking if any unfetched remote changes exist. If they do, then +the push will fail, and the library will fetch instead. After this, the +library has a latest known common revision of the document, possibly a +local version if it was changed since then, and possibly a remote +version if it was changed since then, but the newer version has yet to +be retrieved. + +Before resolving a conflict, both revision histories are squashed. This +means that creating+deleting a document becomes a noop, and +deleting+creating, or updating it multiple times, becomes one single +update. Then, if the document was changed in different ways locally and +remotely, it goes into conflict state; if it was changed only locally or +only remotely, then the change is automatically accepted by the other +store (whether client to server or server to client). Note that in the +case of a successful conditional push request, this will already have +happened. + +Conflicts that are discovered by a document fetch, fire their +\'keep/revert\' event immediately. Conflicts that are discovered through +a parent folder fetch, or through a conditional push, fire their +\'keep/revert\' event after the new remote version is fetched. + +The library\'s conflict resolution strategy is \'remote wins\'. This +means that the module will receive them in the form of change events +with origin \'conflict\'. When receiving such a change event, the module +can still decide to revert it explicitly. + +As noted before, merging a subtree is done by merging each document that +exists within that subtree, in either or both stores. When the library +fetches a folder listing, it can detect a remote child change, which +then may or may not result in a conflict. When a folder listing comes +in, which has changed since the last time it was retrieved, four types +of information may be discovered: + +- which of the documents directly within the folder changed their + remote revision since the last check (new ETag on a document item) +- in which previously empty subtrees at least one document was created + (new folder item) +- in which subtrees all previously existing documents were deleted + (folder item disappeared) +- in which subtrees at least one document was either created, updated, + or deleted (new ETag on a folder item) + +All of these can occur in a folder that was at the same time either +unchanged, updated, or deleted locally. When updated, it might be that +different items were changed locally and remotely, or that the same item +was changed on both sides, either in the same way, or in different ways. + +The library handles all these cases so the module developer does not +need to worry about them. + +## Implications for module design + +There are a number of important implications for module design: + +- First of all, this sync process follows the \'asynchronous + synchronization\' design principle + (). Don\'t wait + for it to finish. The module should work with the local copy of the + data, and handle incoming updates through evented programming. The + only exception to this is where a body of data is too big to cache + locally, and the module needs to expose on-demand access of remote + data to the app. In all other cases, the module should expose the + local version as \'the truth\'. +- Even then, IndexedDB is not fast enough to access from a button + click. Make sure to put an in-memory caching layer in the module, + and return control to the app immediately. An example of this + approach is the SyncedMap data structure used in + . +- Use folders and subfolders. This allows the tree-based sync + algorithm to shine and efficiently detect changes in any of + potentially thousands of documents by checking the ETag from one + single HTTP request to the root folder of the tree. +- Use meaningful collections. Multiple clients can each edit a + different document without ever entering in conflict with each + other. But editing the same document is interpreted as a conflict. + For instance, when two calendar apps both schedule an event on a + certain date, this would be a conflict if the module stores one + document per day. However, if the module stores one document per + event, and instead uses one /folder/ for each day, then the two + events can co-exist on the same day without generating a conflict. + Documents are a unit of conflict, but folders are not. Another + example is storing todo-list items with long UUID hashes instead of + their list index numbers as document names. Editing item \"5\" would + conflict with inserting a new item \"5\". But if both items have a + long unique name, then they don\'t clash with each other. So make + sure to choose unique item names for items that should not conflict. diff --git a/docs/contributing/internals/caching.md b/docs/contributing/internals/caching.md new file mode 100644 index 000000000..aa3501181 --- /dev/null +++ b/docs/contributing/internals/caching.md @@ -0,0 +1,25 @@ +# Caching + +The caching strategies are stored in `remoteStorage.caching._rootPaths`. +For instance, on , it has +the value `{ /myfavoritedrinks/: "ALL" }`. + +These rootPaths are not stored in localStorage. If you refresh the page, +it is up to the app to set all caching strategies again during the page +load. + +The effect of the caching strategy is basically achieved through three +paths: + +1. Setting caching strategy \'ALL\' for a path creates an empty node + for that path, unless it already exists. +2. The sync process will then do a GET request, and create new nodes + under any folder with an \'ALL\' strategy, when that folder is + fetched. +3. The sync process will create a new task for any node under an + \'ALL\' strategy, unless a task already exists for one of its + ancestors. + +The result is all paths with an explicit \'ALL\' strategy will get +fetched, and if they are folders, then in the next round, all its +children will also be fetched, etcetera. diff --git a/docs/contributing/internals/discovery-bootstrap.md b/docs/contributing/internals/discovery-bootstrap.md new file mode 100644 index 000000000..399422e01 --- /dev/null +++ b/docs/contributing/internals/discovery-bootstrap.md @@ -0,0 +1,35 @@ +# Discovery bootstrap + +*This section describes how connecting to a storage works internally.* + +When the RemoteStorage instance is instantiated, it checks the fragment +of the URL to see if it contains an `access_token` or `remotestorage` +parameter. In the first case, the access token is given to the remote +using `remoteStorage.remote.configure()`. In the second case, WebFinger +discovery is triggered for the user address given (see [storage-first +section](https://tools.ietf.org/html/draft-dejong-remotestorage-09#section-11) +of the remoteStorage spec). + +The user can also set the user address through the widget, or the app +can call +`remoteStorage.remote.configure({userAddress: 'user@host.com'})` to set +the user address. + +When a user address is set, but no other remote parameters are known +yet, WebFinger discovery will be triggered. From the WebFinger response, +the library extract the storage base URL, the storage API, and the OAuth +dialog URL. + +If no OAuth URL is given, Implied Auth is triggered: + + +If an OAuth URL is known, but no token yet, the OAuth dance will be +started by setting the `location.href` of the window, redirecting the +user to that URL. When the dance comes back, the library will detect the +`access_token` from the window location during the page load, and from +that point onwards, the remote is connected. + +If the OAuth flow is PKCE, the window location will contain a `code` +parameter instead of `access_token`. RS then makes a fetch to +remote.TOKEN_URL with the code, to retrieve the access token, and +possibly a refresh token as well. diff --git a/docs/contributing/internals/index.md b/docs/contributing/internals/index.md new file mode 100644 index 000000000..9e57b2cfa --- /dev/null +++ b/docs/contributing/internals/index.md @@ -0,0 +1,9 @@ +# Libary internals + +This section contains information about some of the internals and +concepts of the remoteStorage.js library. + +::: {.toctree maxdepth="2"} +internals/discovery-bootstrap internals/caching +internals/cache-data-format +::: diff --git a/docs/contributing/release-checklist.md b/docs/contributing/release-checklist.md new file mode 100644 index 000000000..fcedc67cd --- /dev/null +++ b/docs/contributing/release-checklist.md @@ -0,0 +1,59 @@ +# Release checklist + +- Build library and manually test all browsers you have access to, + including mobile devices and private browsing mode + +- Create changelog since last release + + > - Collect and summarize changes using e.g.: + > + > ``` console + > $ git log --no-merges ..HEAD + > ``` + > + > - Add changes to [CHANGELOG.md]{.title-ref} + > + > - Commit to Git + +- Run `npm version patch|minor|major|x.x.x-rc1`. This will + automatically: + + > - run the test suite + > - update the version in package.json + > - create a release build + > - commit everything using version as commit description + > - create a Git tag for the version + > - push the release commit and tag to GitHub + +- Publish release notes on GitHub + + > - Go to + > and click \"Add release notes\" + > - Use version string as title and changelog items as description + > - For RCs and betas, tick the \"This is a pre-release\" option + > on the bottom + > - These notes will automatically be posted [to the community + > forums + > \]{.title-ref} + > after a while + +- Publish to npm (): + + ``` console + $ npm publish + ``` + +- Update to use + new release + + > - Replace `remotestorage.js` file with new release build + > - Check if everything is still working + > - Commit + > - `git push origin` + > - `git push 5apps master` + +- Link release announcement on Mastodon + (). This will automatically cross-post + to Twitter and IRC. + +- If it\'s an important release, also notify the Unhosted mailing list diff --git a/docs/contributing/testing.md b/docs/contributing/testing.md new file mode 100644 index 000000000..1f9752ae7 --- /dev/null +++ b/docs/contributing/testing.md @@ -0,0 +1,41 @@ +# Testing + +Before contributing to remoteStorage.js, make sure your patch passes the +test suite, and your code style passes the code linting suite. + +We use the [Jaribu](https://github.com/silverbucket/jaribu) framework +for our test suites and [JSHint](http://jshint.com/about/) for linting. +Both are set as dev dependencies in `package.json`, so after installing +those via `npm install`, you can use the following command to run +everything at once: + +``` console +$ npm run test +``` + +Or you can use the Jaribu executable directly in order to run the suite +for a single file: + +``` console +$ ./node_modules/.bin/jaribu test/unit/cachinglayer-suite.js +``` + +::: tip +::: title +Tip +::: + +If you add `./node_modules/.bin` to your `PATH`, you can call +executables in any npm project directly. For example in `~/.bashrc`, add +the line `export PATH=$PATH:./node_modules/.bin` (and run +`source ~/.bashrc` to load that change in open terminal sessions). Then +you can just run `jaribu test/unit/foo_suite.js`. +::: + +## Continous integration + +The rs.js test suite is run by GitHub Actions on every push to our repo +on GitHub. When you open a pull request, your code will be tested there, +too. You can check out the build status and history at +, and the CI +settings in `.github/workflows/test-and-lint.yml`. diff --git a/doc/cordova.rst b/docs/cordova.md similarity index 52% rename from doc/cordova.rst rename to docs/cordova.md index 511923ed4..71d3c1edb 100644 --- a/doc/cordova.rst +++ b/docs/cordova.md @@ -1,25 +1,26 @@ -Usage in Cordova apps -===================== +# Usage in Cordova apps -`Apache Cordova `_ is a mobile development +[Apache Cordova](https://cordova.apache.org) is a mobile development framework. It allows you to use standard web technologies - HTML5, CSS3, and JavaScript for cross-platform development. Applications execute within wrappers targeted to each platform, and rely on -standards-compliant API bindings to access each device's capabilities -such as sensors, data, network status, etc. [#f1]_ +standards-compliant API bindings to access each device\'s capabilities +such as sensors, data, network status, etc. -To use remoteStorage.js in a Cordova app, you need to have the `InAppBrowser plugin -`_ +To use remoteStorage.js in a Cordova app, you need to have the +[InAppBrowser +plugin](https://cordova.apache.org/docs/en/latest/reference/cordova-plugin-inappbrowser/) installed. Cordova apps are packaged for the different platforms and installed on -the device. The app doesn't need to be hosted as a web app (although it +the device. The app doesn\'t need to be hosted as a web app (although it can be as well). But for the remoteStorage connection to work, you need to provide a page that is accessible via a public URL. This will be used as the redirect URL during the OAuth flow. When a user connects their storage, the OAuth dialog will open in an -in-app browser window, set to show the address to prevent phishing attacks. +in-app browser window, set to show the address to prevent phishing +attacks. After the user authorizes the app, the server will redirect to the configured redirect URL with the authorization token added as a @@ -29,40 +30,36 @@ token from the URL and close the window. So the user doesn't actually see the page of the redirect URL and it does't need to have the remoteStorage.js library included or have any special logic at all. But you should still make sure that it can be -identified as belonging to your app. Storage providers will usually -show the URL in the OAuth dialog, and they may also link to it (e.g. -from the list of connected apps). +identified as belonging to your app. Storage providers will usually show +the URL in the OAuth dialog, and they may also link to it (e.g. from the +list of connected apps). You can configure the redirect URL for your app, either by calling -.. code:: javascript - - remoteStorage.setCordovaRedirectUri('https://myapp.example.com'); +``` javascript +remoteStorage.setCordovaRedirectUri('https://myapp.example.com'); +``` or as config when creating your rs instance: -.. code:: javascript - - const remoteStorage = new RemoteStorage({ - cordovaRedirectUri: 'https://myapp.example.com' - }); +``` javascript +const remoteStorage = new RemoteStorage({ + cordovaRedirectUri: 'https://myapp.example.com' +}); +``` No further action is needed and you can now use remoteStorage.js as with any other web app. -Google Drive config -------------------- - -If you wish to use the optional Google Drive adapter, you need to configure a -different user agent for your app. Otherwise the authorization page will show -an error to the user. - -In case you haven't set your own UA string already, here's how you can do it: - -.. code:: xml +## Google Drive config - +If you wish to use the optional Google Drive adapter, you need to +configure a different user agent for your app. Otherwise the +authorization page will show an error to the user. -.. rubric:: Footnotes +In case you haven\'t set your own UA string already, here\'s how you can +do it: -.. [#f1] Taken from https://cordova.apache.org/docs/en/latest/guide/overview/index.html +``` xml + +``` diff --git a/docs/data-modules/defining-a-module.md b/docs/data-modules/defining-a-module.md new file mode 100644 index 000000000..afe8c4ce0 --- /dev/null +++ b/docs/data-modules/defining-a-module.md @@ -0,0 +1,37 @@ +# Defining a module + +A data module is just a JavaScript object containing a module name and a +builder function. + +The builder function receives two +`base clients `{.interpreted-text role="doc"} when +loaded: one for private data stored in `/my-module-name/` and one for +public data stored in `/public/my-module-name/`. It must return an +object, defining the properties and functions to be used in the app as +`exports`: + +``` javascript +var Bookmarks = { name: 'bookmarks', builder: function(privateClient, publicClient) { + return { + exports: { + addBookmark: function() {} + } + } +}}; +``` + +You can then load it into your +`RemoteStorage `{.interpreted-text role="doc"} +instance either on initialization, or later using the `addModule()` +function: + + const remoteStorage = new RemoteStorage({ modules: [ Bookmarks ] }); + + // or later: + + remoteStorage.addModule(Bookmarks); + +It will then be available on the instance as its module name, allowing +you to call the functions and properties that the module exports: + + remoteStorage.bookmarks.addBookmark(); diff --git a/docs/data-modules/defining-data-types.md b/docs/data-modules/defining-data-types.md new file mode 100644 index 000000000..a94183c1a --- /dev/null +++ b/docs/data-modules/defining-data-types.md @@ -0,0 +1,87 @@ +# Defining data types + +Data types can be defined using the `declareType()` method. It expects a +name (which you can later use with `storeObject()`), as well as a [JSON +Schema](http://json-schema.org) object defining the actual structure and +formatting of your data. + +Consider this simplified example of an archive bookmark: + +``` javascript +var Bookmarks = { name: 'bookmarks', builder: function(privateClient, publicClient) { + + privateClient.declareType('archive-bookmark', { + "type": "object", + "properties": { + "id": { + "type": "string" + }, + "title": { + "type": "string" + }, + "url": { + "type": "string", + "format": "uri" + }, + "tags": { + "type": "array", + "default": [] + }, + }, + "required": [ "title", "url" ] + }); + + // ... +}}; +``` + +Now that we have a basic data type in place for storing bookmarks, we +can add a function for storing them. This will actually validate the +incoming data against the type\'s schema, and reject the promise with +detailed validation errors in case the data format doesn\'t match: + + var Bookmarks = { name: 'bookmarks', builder: function(privateClient, publicClient) { + // ... + + return { + exports: { + + add: function (bookmark) { + bookmark.id = md5Hash(bookmark.url); // hash URL for nice ID + var path = "archive/" + bookmark.id; // use hashed URL as filename as well + + return privateClient.storeObject("archive-bookmark", path, bookmark). + then(function() { + return bookmark; // return bookmark with added ID property + }); + } + + } + } + }}; + + // and in your app: + + remoteStorage.bookmarks.add({ + title: 'Unhosted Web Apps', + url: 'https://unhosted.org', + tags: ['unhosted', 'remotestorage', 'offline-first'] + }) + .then(() => { + console.log('stored bookmark successfully'); + }) + .catch((err) => { + console.error('validation error:', err); + }); + +::: hint +::: title +Hint +::: + +JSON Schema is very powerful and flexible. If you want to learn more +about it, check out the free e-book [Understanding JSON +Schema](https://spacetelescope.github.io/understanding-json-schema/) for +example. The complete official specs can be found at + +::: diff --git a/docs/data-modules/index.md b/docs/data-modules/index.md new file mode 100644 index 000000000..5ef4d1415 --- /dev/null +++ b/docs/data-modules/index.md @@ -0,0 +1,31 @@ +# Data modules + +A core idea of the remoteStorage protocol is that the same data can be +used by multiple apps. Imagine creating a to-do in one app, and tracking +time on it in another. + +Traditional Web apps make this possible with custom, proprietary APIs, +which are dependent on the app provider. Third party developers usually +need to register an application with the original provider to access +that data via the API, and this access can be revoked at any time. +remoteStorage and [unhosted web apps](https://unhosted.org) in general +give end users ultimate control over which apps have access to their +data. + +In order to make it easy and safe for your app data to be compatible +with other apps, we created the concept of data modules for rs.js, which +can be shared and developed collaboratively in the open. + +Data modules can contain as much or as little functionality as desired, +from defining data formats and types to data validation, formatting, +processing, transformation, encryption, indexing, and other use cases. + +Data modules make your app and its data interoperable with other apps. +Sharing your modules is generally encouraged, but it is also possible to +encapsulate custom functionality in a custom module made just for your +app. + +::: {.toctree caption="Contents" maxdepth="2"} +data-modules/defining-a-module data-modules/defining-data-types +data-modules/publishing-and-finding-modules +::: diff --git a/docs/data-modules/publishing-and-finding-modules.md b/docs/data-modules/publishing-and-finding-modules.md new file mode 100644 index 000000000..b982c5ed0 --- /dev/null +++ b/docs/data-modules/publishing-and-finding-modules.md @@ -0,0 +1,58 @@ +# Publishing and finding data modules + +## npm + +The recommended way for publishing data modules is as +[npm](https://www.npmjs.com/) packages. + +Our naming convention for rs.js modules is +`remotestorage-module-mymodulename`. Thus, you can also find them by +[searching npm for +\"remotestorage-module\"](https://www.npmjs.com/search?q=remotestorage-module). + +You can also add \"remotestorage-module\" and \"remotestorage\" to the +`keywords` property of your `package.json`. + +## GitHub & Co. + +If you use GitHub ‒ or any other code hosting/collaboration platform for +that matter ‒ for publishing your module\'s source code, please use the +same naming convention as for the npm module for the repo name. And +it\'s a good idea to add the topic/tag/label \"remotestorage-module\" +there as well, of course. + + + +::: hint +::: title +Hint +::: + +With npm, you can also install modules directly from a Git repo or +GitHub, pointing to just the repo or a branch name, tag, or commit: + +::: + +## Examples + +- For a real-world example of a data module package, see e.g. the + shares module [on + GitHub](https://github.com/skddc/remotestorage-module-shares) and + [on npm](https://www.npmjs.com/package/remotestorage-module-shares). + Check out `webpack.config.js` and the source code in `index.js` to + see how it is built and exported. + +::: note +::: title +Note +::: + +Unfortunately, we didn\'t have any package management for data modules +before rs.js 1.0. To be fair, JavaScript package managers weren\'t +actually a thing yet, when this functionality was added to the library. +However, it means we\'re still in the process of porting and publishing +modules and you won\'t find very many existing data modules on npm right +now. You can check the [old modules +repo](https://github.com/remotestorage/modules) for source code of +legacy modules. +::: diff --git a/docs/getting-started.md b/docs/getting-started/index.md similarity index 100% rename from docs/getting-started.md rename to docs/getting-started/index.md diff --git a/docs/index.md b/docs/index.md index fa4aa6d46..326a4a8a0 100644 --- a/docs/index.md +++ b/docs/index.md @@ -1,5 +1,14 @@ ---- -layout: doc ---- + # remoteStorage.js + +Welcome to the remoteStorage.js documentation! + +remoteStorage.js is a JavaScript library for storing user data locally +in the browser, as well as connecting to +[remoteStorage](/) servers and syncing data across +devices and applications. It is also capable of connecting and syncing +data with a person\'s Dropbox or Google Drive account (optional). + +> [!NOTE] +> For brevity\'s sake, we will also use the short name **rs.js** across these docs. diff --git a/docs/nodejs.md b/docs/nodejs.md new file mode 100644 index 000000000..cd46472f0 --- /dev/null +++ b/docs/nodejs.md @@ -0,0 +1,83 @@ +# Usage with Node.js + +Although remoteStorage.js was initially written for being used in +browsers, we do support using it in a Node.js environment as well. + +The main difference between rs.js in a browser and using it on a server +or in a CLI program is how to connect a storage. The RS protocol uses +the OAuth Implicit Grant flow for clients to receive a bearer token, +which they can use in HTTP requests. This works by redirecting back to +the Web application with the token attached to the redirect URI as a URI +fragment. + +Now, with rs.js in a browser, calling +`remoteStorage.connect('user@example.com')` will take care of the entire +OAuth process, including the parsing of the URI after the redirect, +saving the token to localStorage and changing the library\'s state to +connected. But in a node.js program, that\'s obviously not possible, +because there\'s no browser that will open the OAuth dialog and receive +the redirect with the token attached to the redirect URI. + +## connect() with a token + +For this reason, among others, you can call the connect function with a +token that you acquired beforehand: + +```JavaScript +remoteStorage.connect('user@example.com', 'abcdef123456') +``` + +This will skip the entire OAuth process, because you did that before in +some other way, of course. + +## Obtaining a token + +For some programs, like e.g. a server daemon, you can usually acquire +the token from your server manually, and then just configure it for +example as environment variable, when running your program. + +For CLI programs, and if you actually want to integrate the OAuth flow +in your program, one possible solution is the following: + +1. Set up a simple Web site/app, which you publish under a fitting + domain/URI that you can use as the OAuth redirect URI. +2. Have the user enter their user address and do a Webfinger lookup for + auth URL etc., e.g. using + [webfinger.js](https://www.npmjs.com/package/webfinger.js). +3. Create the OAuth request URI with the correct scope etc., and open a + browser window with that URI from your program (or prompt the user + to open it). +4. Have the Web app, which the user is being redirected to, show the + token to the user, in order for them to copy and enter in your + program +5. Connect with that token. + +You can find a complete example for this process in +[rs-backup](https://github.com/skddc/rs-backup), a remoteStorage backup +CLI program. In particular [its code for connecting a +storage](https://github.com/skddc/rs-backup/blob/v1.5.0/backup.js#L137-L160) +and the [simple Web page](https://github.com/skddc/rs-backup-auth-page) +its using for the redirect. + +::: tip NOTE +rs-backup is not using remoteStorage.js at all, which you might also +want to consider as an option when writing non-browser applications. +::: + +## Caveats + +- IndexedDB and localStorage are not supported by default in Node.js, + so the library will fall back to in-memory storage for caching data + locally. This means that unsynchronized data will be lost between + sessions and program executions. +- Node 18 includes `fetch` natively, but earlier versions do not, and so + it may be necessary to set `global.fetch` with a polyfill such as + [node-fetch](https://www.npmjs.com/package/node-fetch). + +## Examples + +- [hubot-remotestorage-logger](https://github.com/67P/hubot-remotestorage-logger), + a Hubot script that logs chat messages to remoteStorage-enabled + accounts using the + [chat-messages](https://www.npmjs.com/package/remotestorage-module-chat-messages) + module diff --git a/docs/typescript.md b/docs/typescript.md new file mode 100644 index 000000000..59cb736c9 --- /dev/null +++ b/docs/typescript.md @@ -0,0 +1,12 @@ +# Usage with TypeScript + +Since version `2.0.0`, the source code of rs.js itself has been ported +to TypeScript, and release builds now ship with generated type +definitions. Thus, there is no extra type definitions package to +import/require, and everything should just work out of the box. + +::: tip NOTE +There\'s still a lot of room for improvement in our TypeScript usage. If +you\'re experienced with TypeScript, and interested in contributing to +rs.js, your help in this area would be most appreciated. +::: From 53e2d43efdd299679ce3edb59e69633ec8ca5fb6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A2u=20Cao?= Date: Sun, 30 Jun 2024 15:43:14 +0200 Subject: [PATCH 13/50] WIP More documentation porting --- docs/contributing/building.md | 18 +++++------------- docs/contributing/docs.md | 16 ++++++++++------ docs/contributing/internals/index.md | 9 ++------- docs/contributing/release-checklist.md | 4 ++-- docs/contributing/testing.md | 11 ++++++----- docs/getting-started/how-to-add.md | 26 ++++++++++++++++++++------ docs/index.md | 12 +++++++----- 7 files changed, 52 insertions(+), 44 deletions(-) diff --git a/docs/contributing/building.md b/docs/contributing/building.md index 87f50cc7d..0296fe58f 100644 --- a/docs/contributing/building.md +++ b/docs/contributing/building.md @@ -1,10 +1,6 @@ # Building -::: hint -::: title -Hint -::: - +::: tip We\'re using npm scripts for all common tasks, so check out the `scripts` section in `package.json` to learn about what they\'re doing exactly and what else is available. @@ -12,17 +8,13 @@ exactly and what else is available. ## Setup -``` console -$ npm install --force +```sh +$ npm install ``` -This will install all dependencies. We currently use the `--force` flag -because of an issue with SphinxJS and TypeDoc (see -`1276`{.interpreted-text role="issue"}). - ## Development -``` console +```sh $ npm run dev ``` @@ -38,7 +30,7 @@ step through the actual source code in your browser\'s debugger tool. ## Production -``` console +```sh $ npm run build:release ``` diff --git a/docs/contributing/docs.md b/docs/contributing/docs.md index cdb6fbe25..4ab5733d1 100644 --- a/docs/contributing/docs.md +++ b/docs/contributing/docs.md @@ -1,3 +1,7 @@ +::: danger DEPRECATED +Needs a complete rewrite for the new TypeDoc + VitePress setup +::: + # Documentation The documentation for remoteStorage.js is generated from @@ -44,13 +48,13 @@ have to set up local builds first. 2. Install sphinx-js and extensions (from repository root): - ``` console + ```sh $ pip install -r doc/requirements.txt ``` 3. Install TypeScript and TypeDoc globally (so Sphinx can use them): - ``` console + ```sh $ npm -g install typescript typedoc ``` @@ -59,7 +63,7 @@ have to set up local builds first. Run the following command to automatically watch and build the documentation: -``` console +```sh $ npm run autobuild-docs ``` @@ -88,7 +92,7 @@ failing. 2. Pull the latest version of `readthedocs/build` image with the `latest` tag from Docker Hub: - ``` console + ```sh $ docker pull readthedocs/build:latest ``` @@ -96,13 +100,13 @@ failing. 1. Enter a `bash` session while attaching this project as a volume: - ``` console + ```sh $ docker run --rm -it -v ${PWD}:/app readthedocs/build:latest bash ``` 2. Run the `build-with-conda.sh` script to setup conda environment and build the docs like ReadTheDocs: - ``` console + ```sh $ /app/doc/build-with-conda.sh ``` diff --git a/docs/contributing/internals/index.md b/docs/contributing/internals/index.md index 9e57b2cfa..961a1cf7d 100644 --- a/docs/contributing/internals/index.md +++ b/docs/contributing/internals/index.md @@ -1,9 +1,4 @@ # Libary internals -This section contains information about some of the internals and -concepts of the remoteStorage.js library. - -::: {.toctree maxdepth="2"} -internals/discovery-bootstrap internals/caching -internals/cache-data-format -::: +This section contains information about some of the internals and concepts of +the remoteStorage.js library. diff --git a/docs/contributing/release-checklist.md b/docs/contributing/release-checklist.md index fcedc67cd..250d124bd 100644 --- a/docs/contributing/release-checklist.md +++ b/docs/contributing/release-checklist.md @@ -7,7 +7,7 @@ > - Collect and summarize changes using e.g.: > - > ``` console + > ```sh > $ git log --no-merges ..HEAD > ``` > @@ -39,7 +39,7 @@ - Publish to npm (): - ``` console + ```sh $ npm publish ``` diff --git a/docs/contributing/testing.md b/docs/contributing/testing.md index 1f9752ae7..5aadcd591 100644 --- a/docs/contributing/testing.md +++ b/docs/contributing/testing.md @@ -9,22 +9,23 @@ Both are set as dev dependencies in `package.json`, so after installing those via `npm install`, you can use the following command to run everything at once: -``` console +```sh $ npm run test ``` Or you can use the Jaribu executable directly in order to run the suite for a single file: -``` console +```sh $ ./node_modules/.bin/jaribu test/unit/cachinglayer-suite.js ``` -::: tip -::: title -Tip +::: warning +We're in the process of porting the tests to Mocha/Chai. Also see `npm run +test:mocha`. ::: +::: tip If you add `./node_modules/.bin` to your `PATH`, you can call executables in any npm project directly. For example in `~/.bashrc`, add the line `export PATH=$PATH:./node_modules/.bin` (and run diff --git a/docs/getting-started/how-to-add.md b/docs/getting-started/how-to-add.md index 7dffc4a70..a69f8779b 100644 --- a/docs/getting-started/how-to-add.md +++ b/docs/getting-started/how-to-add.md @@ -1,9 +1,8 @@ # Adding rs.js to an app -rs.js is distributed as a single `UMD (Universal Module -Definition)`{.interpreted-text role="abbr"} build, which means it should -work with all known JavaScript module systems, as well as without one -(using a global variable). +rs.js is distributed as a single UMD build, which means it should work with all known +JavaScript module systems, as well as without one (using a global variable). We recommend adding the library from a JavaScript package manager, although you may also just download the release build [from @@ -12,9 +11,24 @@ GitHub](https://github.com/remotestorage/remotestorage.js/releases). The package is available on npm as [remotestoragejs](https://www.npmjs.com/package/remotestoragejs): -``` console -npm install remotestoragejs +::: code-group + +```sh [npm] +$ npm add -D remotestoragejs +``` + +```sh [pnpm] +$ pnpm add -D remotestoragejs +``` + +```sh [yarn] +$ yarn add -D remotestoragejs +``` + +```sh [bun] +$ bun add -D remotestoragejs ``` +::: ## Examples diff --git a/docs/index.md b/docs/index.md index 326a4a8a0..3eb58dccf 100644 --- a/docs/index.md +++ b/docs/index.md @@ -4,11 +4,13 @@ Welcome to the remoteStorage.js documentation! -remoteStorage.js is a JavaScript library for storing user data locally -in the browser, as well as connecting to -[remoteStorage](/) servers and syncing data across -devices and applications. It is also capable of connecting and syncing -data with a person\'s Dropbox or Google Drive account (optional). +remoteStorage.js is a JavaScript/TypeScript library for storing user data +locally in the browser, as well as connecting to [remoteStorage](/) servers and +syncing data across devices and applications. It is also capable of connecting +and syncing data with a person\'s Dropbox or Google Drive account (optional). > [!NOTE] > For brevity\'s sake, we will also use the short name **rs.js** across these docs. + +See [Why use this?](why) if you just learned about remoteStorage, or head to +[Getting started](getting-started/) to jump right in. From 88078b71505fb475bccac02a900dae4a8a4e3bf4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A2u=20Cao?= Date: Sun, 30 Jun 2024 16:35:40 +0200 Subject: [PATCH 14/50] Port Caching API doc --- docs/api/caching/classes/Caching.md | 83 +++++++++++++++++++++++++---- src/caching.ts | 83 +++++++++++++++++++++++++---- 2 files changed, 147 insertions(+), 19 deletions(-) diff --git a/docs/api/caching/classes/Caching.md b/docs/api/caching/classes/Caching.md index df7a4516f..02b7dcdc5 100644 --- a/docs/api/caching/classes/Caching.md +++ b/docs/api/caching/classes/Caching.md @@ -1,8 +1,40 @@ # Class: Caching -Caching - -Holds/manages caching configuration. +The caching class gets initialized as `remoteStorage.caching`, unless the +[RemoteStorage](../../remotestorage/classes/RemoteStorage.md) instance is created with the option `cache: false`, disabling +caching entirely. + +In case your app hasn't explictly configured caching, the default setting is to +cache any documents that have been either created or requested since your app +loaded. For offline-capable apps, it usually makes sense to enable full, +automatic caching of all documents, which is what [enable](Caching.md#enable) will do. + +Enabling full caching has several benefits: + +* Speed of access: locally cached data is available to the app a lot faster. +* Offline mode: when all data is cached, it can also be read when your app + starts while being offline. +* Initial synchronization time: the amount of data your app caches can + have a significant impact on its startup time. + +Caching can be configured on a per-path basis. When caching is enabled for a +folder, it causes all subdirectories to be cached as well. + +## Caching strategies + +For each subtree, you can set the caching strategy to ``ALL``, ``SEEN`` +(default), and ``FLUSH``. + +* `ALL` means that once all outgoing changes have been pushed, sync will + start retrieving nodes to cache pro-actively. If a local copy exists + of everything, it will check on each sync whether the ETag of the root + folder changed, and retrieve remote changes if they exist. +* `SEEN` does this only for documents and folders that have been either + read from or written to at least once since connecting to the current + remote backend, plus their parent/ancestor folders up to the root (to + make tree-based sync possible). +* `FLUSH` will only cache outgoing changes, and forget them as soon as + they have been saved to remote successfully. ## Methods @@ -25,9 +57,18 @@ Path to retrieve setting for caching strategy for the path +#### Example + +```js +remoteStorage.caching.checkPath('documents/').then(strategy => { + console.log(`caching strategy for 'documents/': ${strategy}`)); + // "caching strategy for 'documents/': SEEN" +}); +``` + #### Source -[caching.ts:99](https://github.com/remotestorage/remotestorage.js/blob/1966eed75e2e4c81d5410b5a500cddf1f63a1cc0/src/caching.ts#L99) +[caching.ts:157](https://github.com/remotestorage/remotestorage.js/blob/e2bff1869cf784e0b2712889b7313d816e139b0c/src/caching.ts#L157) *** @@ -50,9 +91,15 @@ Path to disable caching for `void` +#### Example + +```js +remoteStorage.caching.disable('/bookmarks/'); +``` + #### Source -[caching.ts:74](https://github.com/remotestorage/remotestorage.js/blob/1966eed75e2e4c81d5410b5a500cddf1f63a1cc0/src/caching.ts#L74) +[caching.ts:124](https://github.com/remotestorage/remotestorage.js/blob/e2bff1869cf784e0b2712889b7313d816e139b0c/src/caching.ts#L124) *** @@ -74,9 +121,15 @@ Path to enable caching for `void` +#### Example + +```js +remoteStorage.caching.enable('/bookmarks/'); +``` + #### Source -[caching.ts:62](https://github.com/remotestorage/remotestorage.js/blob/1966eed75e2e4c81d5410b5a500cddf1f63a1cc0/src/caching.ts#L62) +[caching.ts:107](https://github.com/remotestorage/remotestorage.js/blob/e2bff1869cf784e0b2712889b7313d816e139b0c/src/caching.ts#L107) *** @@ -98,7 +151,7 @@ Callback function #### Source -[caching.ts:83](https://github.com/remotestorage/remotestorage.js/blob/1966eed75e2e4c81d5410b5a500cddf1f63a1cc0/src/caching.ts#L83) +[caching.ts:133](https://github.com/remotestorage/remotestorage.js/blob/e2bff1869cf784e0b2712889b7313d816e139b0c/src/caching.ts#L133) *** @@ -112,9 +165,15 @@ Reset the state of caching by deleting all caching information. `void` +#### Example + +```js +remoteStorage.caching.reset(); +``` + #### Source -[caching.ts:112](https://github.com/remotestorage/remotestorage.js/blob/1966eed75e2e4c81d5410b5a500cddf1f63a1cc0/src/caching.ts#L112) +[caching.ts:175](https://github.com/remotestorage/remotestorage.js/blob/e2bff1869cf784e0b2712889b7313d816e139b0c/src/caching.ts#L175) *** @@ -140,6 +199,12 @@ Caching strategy. One of 'ALL', 'SEEN', or 'FLUSH'. `void` +#### Example + +```js +remoteStorage.caching.set('/bookmarks/archive/', 'SEEN'); +``` + #### Source -[caching.ts:28](https://github.com/remotestorage/remotestorage.js/blob/1966eed75e2e4c81d5410b5a500cddf1f63a1cc0/src/caching.ts#L28) +[caching.ts:67](https://github.com/remotestorage/remotestorage.js/blob/e2bff1869cf784e0b2712889b7313d816e139b0c/src/caching.ts#L67) diff --git a/src/caching.ts b/src/caching.ts index f9832558e..119b94757 100644 --- a/src/caching.ts +++ b/src/caching.ts @@ -2,9 +2,43 @@ import { containingFolder, isFolder } from './util'; import log from './log'; /** - * @class Caching + * @class * - * Holds/manages caching configuration. + * The caching class gets initialized as `remoteStorage.caching`, unless the + * {@link remotestorage!RemoteStorage RemoteStorage} instance is created with the option `cache: false`, disabling + * caching entirely. + * + * In case your app hasn't explictly configured caching, the default setting is to + * cache any documents that have been either created or requested since your app + * loaded. For offline-capable apps, it usually makes sense to enable full, + * automatic caching of all documents, which is what {@link enable} will do. + * + * Enabling full caching has several benefits: + * + * * Speed of access: locally cached data is available to the app a lot faster. + * * Offline mode: when all data is cached, it can also be read when your app + * starts while being offline. + * * Initial synchronization time: the amount of data your app caches can + * have a significant impact on its startup time. + * + * Caching can be configured on a per-path basis. When caching is enabled for a + * folder, it causes all subdirectories to be cached as well. + * + * ## Caching strategies + * + * For each subtree, you can set the caching strategy to ``ALL``, ``SEEN`` + * (default), and ``FLUSH``. + * + * * `ALL` means that once all outgoing changes have been pushed, sync will + * start retrieving nodes to cache pro-actively. If a local copy exists + * of everything, it will check on each sync whether the ETag of the root + * folder changed, and retrieve remote changes if they exist. + * * `SEEN` does this only for documents and folders that have been either + * read from or written to at least once since connecting to the current + * remote backend, plus their parent/ancestor folders up to the root (to + * make tree-based sync possible). + * * `FLUSH` will only cache outgoing changes, and forget them as soon as + * they have been saved to remote successfully. **/ export class Caching { pendingActivations: string[] = []; @@ -22,8 +56,13 @@ export class Caching { * * Not needed when using ``enable``/``disable``. * - * @param {string} path - Path to cache - * @param {string} strategy - Caching strategy. One of 'ALL', 'SEEN', or 'FLUSH'. + * @param path - Path to cache + * @param strategy - Caching strategy. One of 'ALL', 'SEEN', or 'FLUSH'. + * + * @example + * ```js + * remoteStorage.caching.set('/bookmarks/archive/', 'SEEN'); + * ``` */ set (path: string, strategy: 'ALL' | 'SEEN' | 'FLUSH'): void { if (typeof path !== 'string') { @@ -57,7 +96,13 @@ export class Caching { * * Uses caching strategy ``ALL``. * - * @param {string} path - Path to enable caching for + * @param path - Path to enable caching for + * @returns + * + * @example + * ```js + * remoteStorage.caching.enable('/bookmarks/'); + * ``` */ enable (path: string): void { this.set(path, 'ALL'); @@ -69,7 +114,12 @@ export class Caching { * Uses caching strategy ``FLUSH`` (meaning items are only cached until * successfully pushed to the remote). * - * @param {string} path - Path to disable caching for + * @param path - Path to disable caching for + * + * @example + * ```js + * remoteStorage.caching.disable('/bookmarks/'); + * ``` */ disable (path: string): void { this.set(path, 'FLUSH'); @@ -78,7 +128,7 @@ export class Caching { /** * Set a callback for when caching is activated for a path. * - * @param {function} cb - Callback function + * @param cb - Callback function */ onActivate (cb: (firstPending: string) => void): void { log('[Caching] Setting activate handler', cb, this.pendingActivations); @@ -93,8 +143,16 @@ export class Caching { * Retrieve caching setting for a given path, or its next parent * with a caching strategy set. * - * @param {string} path - Path to retrieve setting for - * @returns {string} caching strategy for the path + * @param path - Path to retrieve setting for + * @returns caching strategy for the path + * + * @example + * ```js + * remoteStorage.caching.checkPath('documents/').then(strategy => { + * console.log(`caching strategy for 'documents/': ${strategy}`)); + * // "caching strategy for 'documents/': SEEN" + * }); + * ``` **/ checkPath (path: string): string { if (this._rootPaths[path] !== undefined) { @@ -108,6 +166,11 @@ export class Caching { /** * Reset the state of caching by deleting all caching information. + * + * @example + * ```js + * remoteStorage.caching.reset(); + * ``` **/ reset (): void { this._rootPaths = {}; @@ -116,7 +179,7 @@ export class Caching { /** * Setup function that is called on initialization. * - * @private + * @internal **/ static _rs_init (/*remoteStorage*/): void { return; From 8a48a5d694be2f061fe475e7bf439484edcd05be Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A2u=20Cao?= Date: Mon, 1 Jul 2024 14:06:20 +0200 Subject: [PATCH 15/50] Update API docs build --- docs/api/access/classes/Access.md | 2 +- docs/api/baseclient/classes/BaseClient.md | 30 +++++++-------- .../remotestorage/classes/RemoteStorage.md | 38 +++++++++---------- 3 files changed, 35 insertions(+), 35 deletions(-) diff --git a/docs/api/access/classes/Access.md b/docs/api/access/classes/Access.md index 925c97c49..2b23064a3 100644 --- a/docs/api/access/classes/Access.md +++ b/docs/api/access/classes/Access.md @@ -40,4 +40,4 @@ remoteStorage.access.claim('*', 'rw'); #### Source -[access.ts:73](https://github.com/remotestorage/remotestorage.js/blob/1966eed75e2e4c81d5410b5a500cddf1f63a1cc0/src/access.ts#L73) +[access.ts:73](https://github.com/remotestorage/remotestorage.js/blob/e2bff1869cf784e0b2712889b7313d816e139b0c/src/access.ts#L73) diff --git a/docs/api/baseclient/classes/BaseClient.md b/docs/api/baseclient/classes/BaseClient.md index 83d843e2f..d32c175a1 100644 --- a/docs/api/baseclient/classes/BaseClient.md +++ b/docs/api/baseclient/classes/BaseClient.md @@ -19,7 +19,7 @@ corresponding publicClient `/public//`. #### Source -[baseclient.ts:32](https://github.com/remotestorage/remotestorage.js/blob/1966eed75e2e4c81d5410b5a500cddf1f63a1cc0/src/baseclient.ts#L32) +[baseclient.ts:32](https://github.com/remotestorage/remotestorage.js/blob/e2bff1869cf784e0b2712889b7313d816e139b0c/src/baseclient.ts#L32) *** @@ -31,7 +31,7 @@ The [RemoteStorage](../../remotestorage/classes/RemoteStorage.md) instance this #### Source -[baseclient.ts:24](https://github.com/remotestorage/remotestorage.js/blob/1966eed75e2e4c81d5410b5a500cddf1f63a1cc0/src/baseclient.ts#L24) +[baseclient.ts:24](https://github.com/remotestorage/remotestorage.js/blob/e2bff1869cf784e0b2712889b7313d816e139b0c/src/baseclient.ts#L24) ## Methods @@ -63,7 +63,7 @@ The same instance this is called on to allow for method chaining #### Source -[baseclient.ts:321](https://github.com/remotestorage/remotestorage.js/blob/1966eed75e2e4c81d5410b5a500cddf1f63a1cc0/src/baseclient.ts#L321) +[baseclient.ts:321](https://github.com/remotestorage/remotestorage.js/blob/e2bff1869cf784e0b2712889b7313d816e139b0c/src/baseclient.ts#L321) *** @@ -93,7 +93,7 @@ A JSON Schema object describing the object type #### Source -[baseclient.ts:358](https://github.com/remotestorage/remotestorage.js/blob/1966eed75e2e4c81d5410b5a500cddf1f63a1cc0/src/baseclient.ts#L358) +[baseclient.ts:358](https://github.com/remotestorage/remotestorage.js/blob/e2bff1869cf784e0b2712889b7313d816e139b0c/src/baseclient.ts#L358) *** @@ -113,7 +113,7 @@ TODO: document #### Source -[baseclient.ts:345](https://github.com/remotestorage/remotestorage.js/blob/1966eed75e2e4c81d5410b5a500cddf1f63a1cc0/src/baseclient.ts#L345) +[baseclient.ts:345](https://github.com/remotestorage/remotestorage.js/blob/e2bff1869cf784e0b2712889b7313d816e139b0c/src/baseclient.ts#L345) *** @@ -142,7 +142,7 @@ A promise for an object #### Source -[baseclient.ts:100](https://github.com/remotestorage/remotestorage.js/blob/1966eed75e2e4c81d5410b5a500cddf1f63a1cc0/src/baseclient.ts#L100) +[baseclient.ts:100](https://github.com/remotestorage/remotestorage.js/blob/e2bff1869cf784e0b2712889b7313d816e139b0c/src/baseclient.ts#L100) *** @@ -173,7 +173,7 @@ A promise for an object #### Source -[baseclient.ts:144](https://github.com/remotestorage/remotestorage.js/blob/1966eed75e2e4c81d5410b5a500cddf1f63a1cc0/src/baseclient.ts#L144) +[baseclient.ts:144](https://github.com/remotestorage/remotestorage.js/blob/e2bff1869cf784e0b2712889b7313d816e139b0c/src/baseclient.ts#L144) *** @@ -199,7 +199,7 @@ The full URL of the item, including the storage origin #### Source -[baseclient.ts:297](https://github.com/remotestorage/remotestorage.js/blob/1966eed75e2e4c81d5410b5a500cddf1f63a1cc0/src/baseclient.ts#L297) +[baseclient.ts:297](https://github.com/remotestorage/remotestorage.js/blob/e2bff1869cf784e0b2712889b7313d816e139b0c/src/baseclient.ts#L297) *** @@ -228,7 +228,7 @@ A promise for an object representing child nodes #### Source -[baseclient.ts:79](https://github.com/remotestorage/remotestorage.js/blob/1966eed75e2e4c81d5410b5a500cddf1f63a1cc0/src/baseclient.ts#L79) +[baseclient.ts:79](https://github.com/remotestorage/remotestorage.js/blob/e2bff1869cf784e0b2712889b7313d816e139b0c/src/baseclient.ts#L79) *** @@ -259,7 +259,7 @@ A promise, which resolves with the requested object (or ``null`` #### Source -[baseclient.ts:203](https://github.com/remotestorage/remotestorage.js/blob/1966eed75e2e4c81d5410b5a500cddf1f63a1cc0/src/baseclient.ts#L203) +[baseclient.ts:203](https://github.com/remotestorage/remotestorage.js/blob/e2bff1869cf784e0b2712889b7313d816e139b0c/src/baseclient.ts#L203) *** @@ -281,7 +281,7 @@ Path relative to the module root. #### Source -[baseclient.ts:278](https://github.com/remotestorage/remotestorage.js/blob/1966eed75e2e4c81d5410b5a500cddf1f63a1cc0/src/baseclient.ts#L278) +[baseclient.ts:278](https://github.com/remotestorage/remotestorage.js/blob/e2bff1869cf784e0b2712889b7313d816e139b0c/src/baseclient.ts#L278) *** @@ -306,7 +306,7 @@ A new client operating on a subpath of the current base path #### Source -[baseclient.ts:65](https://github.com/remotestorage/remotestorage.js/blob/1966eed75e2e4c81d5410b5a500cddf1f63a1cc0/src/baseclient.ts#L65) +[baseclient.ts:65](https://github.com/remotestorage/remotestorage.js/blob/e2bff1869cf784e0b2712889b7313d816e139b0c/src/baseclient.ts#L65) *** @@ -338,7 +338,7 @@ A promise for the created/updated revision (ETag) #### Source -[baseclient.ts:167](https://github.com/remotestorage/remotestorage.js/blob/1966eed75e2e4c81d5410b5a500cddf1f63a1cc0/src/baseclient.ts#L167) +[baseclient.ts:167](https://github.com/remotestorage/remotestorage.js/blob/e2bff1869cf784e0b2712889b7313d816e139b0c/src/baseclient.ts#L167) *** @@ -377,7 +377,7 @@ Resolves with revision on success. Rejects with #### Source -[baseclient.ts:240](https://github.com/remotestorage/remotestorage.js/blob/1966eed75e2e4c81d5410b5a500cddf1f63a1cc0/src/baseclient.ts#L240) +[baseclient.ts:240](https://github.com/remotestorage/remotestorage.js/blob/e2bff1869cf784e0b2712889b7313d816e139b0c/src/baseclient.ts#L240) *** @@ -401,4 +401,4 @@ An object containing information about validation errors #### Source -[baseclient.ts:380](https://github.com/remotestorage/remotestorage.js/blob/1966eed75e2e4c81d5410b5a500cddf1f63a1cc0/src/baseclient.ts#L380) +[baseclient.ts:380](https://github.com/remotestorage/remotestorage.js/blob/e2bff1869cf784e0b2712889b7313d816e139b0c/src/baseclient.ts#L380) diff --git a/docs/api/remotestorage/classes/RemoteStorage.md b/docs/api/remotestorage/classes/RemoteStorage.md index 81f52fcef..3bc6a122b 100644 --- a/docs/api/remotestorage/classes/RemoteStorage.md +++ b/docs/api/remotestorage/classes/RemoteStorage.md @@ -58,7 +58,7 @@ The user address (user@host) or URL to connect to. #### Source -[remotestorage.ts:377](https://github.com/remotestorage/remotestorage.js/blob/1966eed75e2e4c81d5410b5a500cddf1f63a1cc0/src/remotestorage.ts#L377) +[remotestorage.ts:377](https://github.com/remotestorage/remotestorage.js/blob/e2bff1869cf784e0b2712889b7313d816e139b0c/src/remotestorage.ts#L377) *** @@ -76,7 +76,7 @@ Disable remoteStorage logging #### Source -[remotestorage.ts:550](https://github.com/remotestorage/remotestorage.js/blob/1966eed75e2e4c81d5410b5a500cddf1f63a1cc0/src/remotestorage.ts#L550) +[remotestorage.ts:550](https://github.com/remotestorage/remotestorage.js/blob/e2bff1869cf784e0b2712889b7313d816e139b0c/src/remotestorage.ts#L550) *** @@ -95,7 +95,7 @@ cache. #### Source -[remotestorage.ts:460](https://github.com/remotestorage/remotestorage.js/blob/1966eed75e2e4c81d5410b5a500cddf1f63a1cc0/src/remotestorage.ts#L460) +[remotestorage.ts:460](https://github.com/remotestorage/remotestorage.js/blob/e2bff1869cf784e0b2712889b7313d816e139b0c/src/remotestorage.ts#L460) *** @@ -113,7 +113,7 @@ Enable remoteStorage logging. #### Source -[remotestorage.ts:541](https://github.com/remotestorage/remotestorage.js/blob/1966eed75e2e4c81d5410b5a500cddf1f63a1cc0/src/remotestorage.ts#L541) +[remotestorage.ts:541](https://github.com/remotestorage/remotestorage.js/blob/e2bff1869cf784e0b2712889b7313d816e139b0c/src/remotestorage.ts#L541) *** @@ -131,7 +131,7 @@ A number of milliseconds #### Source -[remotestorage.ts:820](https://github.com/remotestorage/remotestorage.js/blob/1966eed75e2e4c81d5410b5a500cddf1f63a1cc0/src/remotestorage.ts#L820) +[remotestorage.ts:820](https://github.com/remotestorage/remotestorage.js/blob/e2bff1869cf784e0b2712889b7313d816e139b0c/src/remotestorage.ts#L820) *** @@ -150,7 +150,7 @@ A number of milliseconds #### Source -[remotestorage.ts:845](https://github.com/remotestorage/remotestorage.js/blob/1966eed75e2e4c81d5410b5a500cddf1f63a1cc0/src/remotestorage.ts#L845) +[remotestorage.ts:845](https://github.com/remotestorage/remotestorage.js/blob/e2bff1869cf784e0b2712889b7313d816e139b0c/src/remotestorage.ts#L845) *** @@ -168,7 +168,7 @@ A number of milliseconds #### Source -[remotestorage.ts:854](https://github.com/remotestorage/remotestorage.js/blob/1966eed75e2e4c81d5410b5a500cddf1f63a1cc0/src/remotestorage.ts#L854) +[remotestorage.ts:854](https://github.com/remotestorage/remotestorage.js/blob/e2bff1869cf784e0b2712889b7313d816e139b0c/src/remotestorage.ts#L854) *** @@ -186,7 +186,7 @@ A number of milliseconds #### Source -[remotestorage.ts:797](https://github.com/remotestorage/remotestorage.js/blob/1966eed75e2e4c81d5410b5a500cddf1f63a1cc0/src/remotestorage.ts#L797) +[remotestorage.ts:797](https://github.com/remotestorage/remotestorage.js/blob/e2bff1869cf784e0b2712889b7313d816e139b0c/src/remotestorage.ts#L797) *** @@ -208,7 +208,7 @@ The same as . #### Source -[remotestorage.ts:559](https://github.com/remotestorage/remotestorage.js/blob/1966eed75e2e4c81d5410b5a500cddf1f63a1cc0/src/remotestorage.ts#L559) +[remotestorage.ts:559](https://github.com/remotestorage/remotestorage.js/blob/e2bff1869cf784e0b2712889b7313d816e139b0c/src/remotestorage.ts#L559) *** @@ -240,7 +240,7 @@ Handler function #### Source -[remotestorage.ts:529](https://github.com/remotestorage/remotestorage.js/blob/1966eed75e2e4c81d5410b5a500cddf1f63a1cc0/src/remotestorage.ts#L529) +[remotestorage.ts:529](https://github.com/remotestorage/remotestorage.js/blob/e2bff1869cf784e0b2712889b7313d816e139b0c/src/remotestorage.ts#L529) *** @@ -256,7 +256,7 @@ Reconnect the remote server to get a new authorization. #### Source -[remotestorage.ts:444](https://github.com/remotestorage/remotestorage.js/blob/1966eed75e2e4c81d5410b5a500cddf1f63a1cc0/src/remotestorage.ts#L444) +[remotestorage.ts:444](https://github.com/remotestorage/remotestorage.js/blob/e2bff1869cf784e0b2712889b7313d816e139b0c/src/remotestorage.ts#L444) *** @@ -285,7 +285,7 @@ A client with the specified scope (category/base directory) #### Source -[remotestorage.ts:782](https://github.com/remotestorage/remotestorage.js/blob/1966eed75e2e4c81d5410b5a500cddf1f63a1cc0/src/remotestorage.ts#L782) +[remotestorage.ts:782](https://github.com/remotestorage/remotestorage.js/blob/e2bff1869cf784e0b2712889b7313d816e139b0c/src/remotestorage.ts#L782) *** @@ -311,7 +311,7 @@ A config object with these properties: #### Source -[remotestorage.ts:570](https://github.com/remotestorage/remotestorage.js/blob/1966eed75e2e4c81d5410b5a500cddf1f63a1cc0/src/remotestorage.ts#L570) +[remotestorage.ts:570](https://github.com/remotestorage/remotestorage.js/blob/e2bff1869cf784e0b2712889b7313d816e139b0c/src/remotestorage.ts#L570) *** @@ -334,7 +334,7 @@ Sync interval in milliseconds (between 2000 and 3600000 [1 hour]) #### Source -[remotestorage.ts:830](https://github.com/remotestorage/remotestorage.js/blob/1966eed75e2e4c81d5410b5a500cddf1f63a1cc0/src/remotestorage.ts#L830) +[remotestorage.ts:830](https://github.com/remotestorage/remotestorage.js/blob/e2bff1869cf784e0b2712889b7313d816e139b0c/src/remotestorage.ts#L830) *** @@ -357,7 +357,7 @@ A valid HTTP(S) URI #### Source -[remotestorage.ts:612](https://github.com/remotestorage/remotestorage.js/blob/1966eed75e2e4c81d5410b5a500cddf1f63a1cc0/src/remotestorage.ts#L612) +[remotestorage.ts:612](https://github.com/remotestorage/remotestorage.js/blob/e2bff1869cf784e0b2712889b7313d816e139b0c/src/remotestorage.ts#L612) *** @@ -379,7 +379,7 @@ Timeout in milliseconds #### Source -[remotestorage.ts:863](https://github.com/remotestorage/remotestorage.js/blob/1966eed75e2e4c81d5410b5a500cddf1f63a1cc0/src/remotestorage.ts#L863) +[remotestorage.ts:863](https://github.com/remotestorage/remotestorage.js/blob/e2bff1869cf784e0b2712889b7313d816e139b0c/src/remotestorage.ts#L863) *** @@ -401,7 +401,7 @@ Sync interval in milliseconds (between 2000 and 3600000 [1 hour]) #### Source -[remotestorage.ts:806](https://github.com/remotestorage/remotestorage.js/blob/1966eed75e2e4c81d5410b5a500cddf1f63a1cc0/src/remotestorage.ts#L806) +[remotestorage.ts:806](https://github.com/remotestorage/remotestorage.js/blob/e2bff1869cf784e0b2712889b7313d816e139b0c/src/remotestorage.ts#L806) *** @@ -426,7 +426,7 @@ A Promise which resolves when the sync has finished #### Source -[remotestorage.ts:904](https://github.com/remotestorage/remotestorage.js/blob/1966eed75e2e4c81d5410b5a500cddf1f63a1cc0/src/remotestorage.ts#L904) +[remotestorage.ts:904](https://github.com/remotestorage/remotestorage.js/blob/e2bff1869cf784e0b2712889b7313d816e139b0c/src/remotestorage.ts#L904) *** @@ -442,4 +442,4 @@ Stop the periodic synchronization. #### Source -[remotestorage.ts:917](https://github.com/remotestorage/remotestorage.js/blob/1966eed75e2e4c81d5410b5a500cddf1f63a1cc0/src/remotestorage.ts#L917) +[remotestorage.ts:917](https://github.com/remotestorage/remotestorage.js/blob/e2bff1869cf784e0b2712889b7313d816e139b0c/src/remotestorage.ts#L917) From e351b7bb818bf2bbee48801e4a450c5ebd134dba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A2u=20Cao?= Date: Mon, 1 Jul 2024 14:47:01 +0200 Subject: [PATCH 16/50] Update logo path --- docs/index.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/index.md b/docs/index.md index 3eb58dccf..b6dcccede 100644 --- a/docs/index.md +++ b/docs/index.md @@ -1,4 +1,4 @@ - + # remoteStorage.js From 48638984d1f5733a873280ff70dca6b6363193bf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A2u=20Cao?= Date: Tue, 2 Jul 2024 12:41:46 +0200 Subject: [PATCH 17/50] Remove VitePress cache dir from repo --- .gitignore | 3 +- docs/.vitepress/cache/deps/@theme_index.js | 257 - .../.vitepress/cache/deps/@theme_index.js.map | 7 - docs/.vitepress/cache/deps/_metadata.json | 40 - docs/.vitepress/cache/deps/chunk-B2WI2LE3.js | 9172 ------------- .../cache/deps/chunk-B2WI2LE3.js.map | 7 - docs/.vitepress/cache/deps/chunk-BJ3OZQ3N.js | 11451 ---------------- .../cache/deps/chunk-BJ3OZQ3N.js.map | 7 - docs/.vitepress/cache/deps/package.json | 3 - .../deps/vitepress___@vue_devtools-api.js | 4133 ------ .../deps/vitepress___@vue_devtools-api.js.map | 7 - .../cache/deps/vitepress___@vueuse_core.js | 567 - .../deps/vitepress___@vueuse_core.js.map | 7 - docs/.vitepress/cache/deps/vue.js | 323 - docs/.vitepress/cache/deps/vue.js.map | 7 - 15 files changed, 2 insertions(+), 25989 deletions(-) delete mode 100644 docs/.vitepress/cache/deps/@theme_index.js delete mode 100644 docs/.vitepress/cache/deps/@theme_index.js.map delete mode 100644 docs/.vitepress/cache/deps/_metadata.json delete mode 100644 docs/.vitepress/cache/deps/chunk-B2WI2LE3.js delete mode 100644 docs/.vitepress/cache/deps/chunk-B2WI2LE3.js.map delete mode 100644 docs/.vitepress/cache/deps/chunk-BJ3OZQ3N.js delete mode 100644 docs/.vitepress/cache/deps/chunk-BJ3OZQ3N.js.map delete mode 100644 docs/.vitepress/cache/deps/package.json delete mode 100644 docs/.vitepress/cache/deps/vitepress___@vue_devtools-api.js delete mode 100644 docs/.vitepress/cache/deps/vitepress___@vue_devtools-api.js.map delete mode 100644 docs/.vitepress/cache/deps/vitepress___@vueuse_core.js delete mode 100644 docs/.vitepress/cache/deps/vitepress___@vueuse_core.js.map delete mode 100644 docs/.vitepress/cache/deps/vue.js delete mode 100644 docs/.vitepress/cache/deps/vue.js.map diff --git a/.gitignore b/.gitignore index dd85fec89..f375c2245 100644 --- a/.gitignore +++ b/.gitignore @@ -5,8 +5,9 @@ *.log /build /gitno -node_modules +cache doc/code doc/_build doc/__pycache__/ +node_modules tags diff --git a/docs/.vitepress/cache/deps/@theme_index.js b/docs/.vitepress/cache/deps/@theme_index.js deleted file mode 100644 index 54e1c0565..000000000 --- a/docs/.vitepress/cache/deps/@theme_index.js +++ /dev/null @@ -1,257 +0,0 @@ -import { - useMediaQuery -} from "./chunk-B2WI2LE3.js"; -import { - computed, - ref, - shallowRef, - watch -} from "./chunk-BJ3OZQ3N.js"; - -// node_modules/vitepress/dist/client/theme-default/index.js -import "/home/basti/src/remotestorage/remotestorage.js/node_modules/vitepress/dist/client/theme-default/styles/fonts.css"; - -// node_modules/vitepress/dist/client/theme-default/without-fonts.js -import "/home/basti/src/remotestorage/remotestorage.js/node_modules/vitepress/dist/client/theme-default/styles/vars.css"; -import "/home/basti/src/remotestorage/remotestorage.js/node_modules/vitepress/dist/client/theme-default/styles/base.css"; -import "/home/basti/src/remotestorage/remotestorage.js/node_modules/vitepress/dist/client/theme-default/styles/icons.css"; -import "/home/basti/src/remotestorage/remotestorage.js/node_modules/vitepress/dist/client/theme-default/styles/utils.css"; -import "/home/basti/src/remotestorage/remotestorage.js/node_modules/vitepress/dist/client/theme-default/styles/components/custom-block.css"; -import "/home/basti/src/remotestorage/remotestorage.js/node_modules/vitepress/dist/client/theme-default/styles/components/vp-code.css"; -import "/home/basti/src/remotestorage/remotestorage.js/node_modules/vitepress/dist/client/theme-default/styles/components/vp-code-group.css"; -import "/home/basti/src/remotestorage/remotestorage.js/node_modules/vitepress/dist/client/theme-default/styles/components/vp-doc.css"; -import "/home/basti/src/remotestorage/remotestorage.js/node_modules/vitepress/dist/client/theme-default/styles/components/vp-sponsor.css"; -import VPBadge from "/home/basti/src/remotestorage/remotestorage.js/node_modules/vitepress/dist/client/theme-default/components/VPBadge.vue"; -import Layout from "/home/basti/src/remotestorage/remotestorage.js/node_modules/vitepress/dist/client/theme-default/Layout.vue"; -import { default as default2 } from "/home/basti/src/remotestorage/remotestorage.js/node_modules/vitepress/dist/client/theme-default/components/VPBadge.vue"; -import { default as default3 } from "/home/basti/src/remotestorage/remotestorage.js/node_modules/vitepress/dist/client/theme-default/components/VPImage.vue"; -import { default as default4 } from "/home/basti/src/remotestorage/remotestorage.js/node_modules/vitepress/dist/client/theme-default/components/VPButton.vue"; -import { default as default5 } from "/home/basti/src/remotestorage/remotestorage.js/node_modules/vitepress/dist/client/theme-default/components/VPHomeHero.vue"; -import { default as default6 } from "/home/basti/src/remotestorage/remotestorage.js/node_modules/vitepress/dist/client/theme-default/components/VPHomeFeatures.vue"; -import { default as default7 } from "/home/basti/src/remotestorage/remotestorage.js/node_modules/vitepress/dist/client/theme-default/components/VPHomeSponsors.vue"; -import { default as default8 } from "/home/basti/src/remotestorage/remotestorage.js/node_modules/vitepress/dist/client/theme-default/components/VPDocAsideSponsors.vue"; -import { default as default9 } from "/home/basti/src/remotestorage/remotestorage.js/node_modules/vitepress/dist/client/theme-default/components/VPSponsors.vue"; -import { default as default10 } from "/home/basti/src/remotestorage/remotestorage.js/node_modules/vitepress/dist/client/theme-default/components/VPTeamPage.vue"; -import { default as default11 } from "/home/basti/src/remotestorage/remotestorage.js/node_modules/vitepress/dist/client/theme-default/components/VPTeamPageTitle.vue"; -import { default as default12 } from "/home/basti/src/remotestorage/remotestorage.js/node_modules/vitepress/dist/client/theme-default/components/VPTeamPageSection.vue"; -import { default as default13 } from "/home/basti/src/remotestorage/remotestorage.js/node_modules/vitepress/dist/client/theme-default/components/VPTeamMembers.vue"; - -// node_modules/vitepress/dist/client/theme-default/support/utils.js -import { withBase } from "vitepress"; - -// node_modules/vitepress/dist/client/theme-default/composables/data.js -import { useData as useData$ } from "vitepress"; -var useData = useData$; - -// node_modules/vitepress/dist/client/theme-default/support/utils.js -function ensureStartingSlash(path) { - return /^\//.test(path) ? path : `/${path}`; -} - -// node_modules/vitepress/dist/client/theme-default/support/sidebar.js -function getSidebar(_sidebar, path) { - if (Array.isArray(_sidebar)) - return addBase(_sidebar); - if (_sidebar == null) - return []; - path = ensureStartingSlash(path); - const dir = Object.keys(_sidebar).sort((a, b) => { - return b.split("/").length - a.split("/").length; - }).find((dir2) => { - return path.startsWith(ensureStartingSlash(dir2)); - }); - const sidebar = dir ? _sidebar[dir] : []; - return Array.isArray(sidebar) ? addBase(sidebar) : addBase(sidebar.items, sidebar.base); -} -function getSidebarGroups(sidebar) { - const groups = []; - let lastGroupIndex = 0; - for (const index in sidebar) { - const item = sidebar[index]; - if (item.items) { - lastGroupIndex = groups.push(item); - continue; - } - if (!groups[lastGroupIndex]) { - groups.push({ items: [] }); - } - groups[lastGroupIndex].items.push(item); - } - return groups; -} -function addBase(items, _base) { - return [...items].map((_item) => { - const item = { ..._item }; - const base = item.base || _base; - if (base && item.link) - item.link = base + item.link; - if (item.items) - item.items = addBase(item.items, base); - return item; - }); -} - -// node_modules/vitepress/dist/client/theme-default/composables/sidebar.js -function useSidebar() { - const { frontmatter, page, theme: theme2 } = useData(); - const is960 = useMediaQuery("(min-width: 960px)"); - const isOpen = ref(false); - const _sidebar = computed(() => { - const sidebarConfig = theme2.value.sidebar; - const relativePath = page.value.relativePath; - return sidebarConfig ? getSidebar(sidebarConfig, relativePath) : []; - }); - const sidebar = ref(_sidebar.value); - watch(_sidebar, (next, prev) => { - if (JSON.stringify(next) !== JSON.stringify(prev)) - sidebar.value = _sidebar.value; - }); - const hasSidebar = computed(() => { - return frontmatter.value.sidebar !== false && sidebar.value.length > 0 && frontmatter.value.layout !== "home"; - }); - const leftAside = computed(() => { - if (hasAside) - return frontmatter.value.aside == null ? theme2.value.aside === "left" : frontmatter.value.aside === "left"; - return false; - }); - const hasAside = computed(() => { - if (frontmatter.value.layout === "home") - return false; - if (frontmatter.value.aside != null) - return !!frontmatter.value.aside; - return theme2.value.aside !== false; - }); - const isSidebarEnabled = computed(() => hasSidebar.value && is960.value); - const sidebarGroups = computed(() => { - return hasSidebar.value ? getSidebarGroups(sidebar.value) : []; - }); - function open() { - isOpen.value = true; - } - function close() { - isOpen.value = false; - } - function toggle() { - isOpen.value ? close() : open(); - } - return { - isOpen, - sidebar, - sidebarGroups, - hasSidebar, - hasAside, - leftAside, - isSidebarEnabled, - open, - close, - toggle - }; -} - -// node_modules/vitepress/dist/client/theme-default/composables/local-nav.js -import { onContentUpdated } from "vitepress"; - -// node_modules/vitepress/dist/client/theme-default/composables/outline.js -import { getScrollOffset } from "vitepress"; -var resolvedHeaders = []; -function getHeaders(range) { - const headers = [ - ...document.querySelectorAll(".VPDoc :where(h1,h2,h3,h4,h5,h6)") - ].filter((el) => el.id && el.hasChildNodes()).map((el) => { - const level = Number(el.tagName[1]); - return { - element: el, - title: serializeHeader(el), - link: "#" + el.id, - level - }; - }); - return resolveHeaders(headers, range); -} -function serializeHeader(h) { - let ret = ""; - for (const node of h.childNodes) { - if (node.nodeType === 1) { - if (node.classList.contains("VPBadge") || node.classList.contains("header-anchor") || node.classList.contains("ignore-header")) { - continue; - } - ret += node.textContent; - } else if (node.nodeType === 3) { - ret += node.textContent; - } - } - return ret.trim(); -} -function resolveHeaders(headers, range) { - if (range === false) { - return []; - } - const levelsRange = (typeof range === "object" && !Array.isArray(range) ? range.level : range) || 2; - const [high, low] = typeof levelsRange === "number" ? [levelsRange, levelsRange] : levelsRange === "deep" ? [2, 6] : levelsRange; - headers = headers.filter((h) => h.level >= high && h.level <= low); - resolvedHeaders.length = 0; - for (const { element, link } of headers) { - resolvedHeaders.push({ element, link }); - } - const ret = []; - outer: for (let i = 0; i < headers.length; i++) { - const cur = headers[i]; - if (i === 0) { - ret.push(cur); - } else { - for (let j = i - 1; j >= 0; j--) { - const prev = headers[j]; - if (prev.level < cur.level) { - ; - (prev.children || (prev.children = [])).push(cur); - continue outer; - } - } - ret.push(cur); - } - } - return ret; -} - -// node_modules/vitepress/dist/client/theme-default/composables/local-nav.js -function useLocalNav() { - const { theme: theme2, frontmatter } = useData(); - const headers = shallowRef([]); - const hasLocalNav = computed(() => { - return headers.value.length > 0; - }); - onContentUpdated(() => { - headers.value = getHeaders(frontmatter.value.outline ?? theme2.value.outline); - }); - return { - headers, - hasLocalNav - }; -} - -// node_modules/vitepress/dist/client/theme-default/without-fonts.js -var theme = { - Layout, - enhanceApp: ({ app }) => { - app.component("Badge", VPBadge); - } -}; -var without_fonts_default = theme; -export { - default2 as VPBadge, - default4 as VPButton, - default8 as VPDocAsideSponsors, - default6 as VPHomeFeatures, - default5 as VPHomeHero, - default7 as VPHomeSponsors, - default3 as VPImage, - default9 as VPSponsors, - default13 as VPTeamMembers, - default10 as VPTeamPage, - default12 as VPTeamPageSection, - default11 as VPTeamPageTitle, - without_fonts_default as default, - useLocalNav, - useSidebar -}; -//# sourceMappingURL=@theme_index.js.map diff --git a/docs/.vitepress/cache/deps/@theme_index.js.map b/docs/.vitepress/cache/deps/@theme_index.js.map deleted file mode 100644 index 3a14d0345..000000000 --- a/docs/.vitepress/cache/deps/@theme_index.js.map +++ /dev/null @@ -1,7 +0,0 @@ -{ - "version": 3, - "sources": ["../../../../node_modules/vitepress/dist/client/theme-default/index.js", "../../../../node_modules/vitepress/dist/client/theme-default/without-fonts.js", "../../../../node_modules/vitepress/dist/client/theme-default/support/utils.js", "../../../../node_modules/vitepress/dist/client/theme-default/composables/data.js", "../../../../node_modules/vitepress/dist/client/theme-default/support/sidebar.js", "../../../../node_modules/vitepress/dist/client/theme-default/composables/sidebar.js", "../../../../node_modules/vitepress/dist/client/theme-default/composables/local-nav.js", "../../../../node_modules/vitepress/dist/client/theme-default/composables/outline.js"], - "sourcesContent": ["import './styles/fonts.css';\nexport * from './without-fonts';\nexport { default as default } from './without-fonts';\n", "import './styles/vars.css';\nimport './styles/base.css';\nimport './styles/icons.css';\nimport './styles/utils.css';\nimport './styles/components/custom-block.css';\nimport './styles/components/vp-code.css';\nimport './styles/components/vp-code-group.css';\nimport './styles/components/vp-doc.css';\nimport './styles/components/vp-sponsor.css';\nimport VPBadge from './components/VPBadge.vue';\nimport Layout from './Layout.vue';\nexport { default as VPBadge } from './components/VPBadge.vue';\nexport { default as VPImage } from './components/VPImage.vue';\nexport { default as VPButton } from './components/VPButton.vue';\nexport { default as VPHomeHero } from './components/VPHomeHero.vue';\nexport { default as VPHomeFeatures } from './components/VPHomeFeatures.vue';\nexport { default as VPHomeSponsors } from './components/VPHomeSponsors.vue';\nexport { default as VPDocAsideSponsors } from './components/VPDocAsideSponsors.vue';\nexport { default as VPSponsors } from './components/VPSponsors.vue';\nexport { default as VPTeamPage } from './components/VPTeamPage.vue';\nexport { default as VPTeamPageTitle } from './components/VPTeamPageTitle.vue';\nexport { default as VPTeamPageSection } from './components/VPTeamPageSection.vue';\nexport { default as VPTeamMembers } from './components/VPTeamMembers.vue';\nexport { useSidebar } from './composables/sidebar';\nexport { useLocalNav } from './composables/local-nav';\nconst theme = {\n Layout,\n enhanceApp: ({ app }) => {\n app.component('Badge', VPBadge);\n }\n};\nexport default theme;\n", "import { withBase } from 'vitepress';\nimport { useData } from '../composables/data';\nimport { isExternal, treatAsHtml } from '../../shared';\nexport function throttleAndDebounce(fn, delay) {\n let timeoutId;\n let called = false;\n return () => {\n if (timeoutId)\n clearTimeout(timeoutId);\n if (!called) {\n fn();\n (called = true) && setTimeout(() => (called = false), delay);\n }\n else\n timeoutId = setTimeout(fn, delay);\n };\n}\nexport function ensureStartingSlash(path) {\n return /^\\//.test(path) ? path : `/${path}`;\n}\nexport function normalizeLink(url) {\n const { pathname, search, hash, protocol } = new URL(url, 'http://a.com');\n if (isExternal(url) ||\n url.startsWith('#') ||\n !protocol.startsWith('http') ||\n !treatAsHtml(pathname))\n return url;\n const { site } = useData();\n const normalizedPath = pathname.endsWith('/') || pathname.endsWith('.html')\n ? url\n : url.replace(/(?:(^\\.+)\\/)?.*$/, `$1${pathname.replace(/(\\.md)?$/, site.value.cleanUrls ? '' : '.html')}${search}${hash}`);\n return withBase(normalizedPath);\n}\n", "import { useData as useData$ } from 'vitepress';\nexport const useData = useData$;\n", "import { ensureStartingSlash } from './utils';\nimport { isActive } from '../../shared';\n/**\n * Get the `Sidebar` from sidebar option. This method will ensure to get correct\n * sidebar config from `MultiSideBarConfig` with various path combinations such\n * as matching `guide/` and `/guide/`. If no matching config was found, it will\n * return empty array.\n */\nexport function getSidebar(_sidebar, path) {\n if (Array.isArray(_sidebar))\n return addBase(_sidebar);\n if (_sidebar == null)\n return [];\n path = ensureStartingSlash(path);\n const dir = Object.keys(_sidebar)\n .sort((a, b) => {\n return b.split('/').length - a.split('/').length;\n })\n .find((dir) => {\n // make sure the multi sidebar key starts with slash too\n return path.startsWith(ensureStartingSlash(dir));\n });\n const sidebar = dir ? _sidebar[dir] : [];\n return Array.isArray(sidebar)\n ? addBase(sidebar)\n : addBase(sidebar.items, sidebar.base);\n}\n/**\n * Get or generate sidebar group from the given sidebar items.\n */\nexport function getSidebarGroups(sidebar) {\n const groups = [];\n let lastGroupIndex = 0;\n for (const index in sidebar) {\n const item = sidebar[index];\n if (item.items) {\n lastGroupIndex = groups.push(item);\n continue;\n }\n if (!groups[lastGroupIndex]) {\n groups.push({ items: [] });\n }\n groups[lastGroupIndex].items.push(item);\n }\n return groups;\n}\nexport function getFlatSideBarLinks(sidebar) {\n const links = [];\n function recursivelyExtractLinks(items) {\n for (const item of items) {\n if (item.text && item.link) {\n links.push({\n text: item.text,\n link: item.link,\n docFooterText: item.docFooterText\n });\n }\n if (item.items) {\n recursivelyExtractLinks(item.items);\n }\n }\n }\n recursivelyExtractLinks(sidebar);\n return links;\n}\n/**\n * Check if the given sidebar item contains any active link.\n */\nexport function hasActiveLink(path, items) {\n if (Array.isArray(items)) {\n return items.some((item) => hasActiveLink(path, item));\n }\n return isActive(path, items.link)\n ? true\n : items.items\n ? hasActiveLink(path, items.items)\n : false;\n}\nfunction addBase(items, _base) {\n return [...items].map((_item) => {\n const item = { ..._item };\n const base = item.base || _base;\n if (base && item.link)\n item.link = base + item.link;\n if (item.items)\n item.items = addBase(item.items, base);\n return item;\n });\n}\n", "import { useMediaQuery } from '@vueuse/core';\nimport { computed, onMounted, onUnmounted, ref, watch, watchEffect, watchPostEffect } from 'vue';\nimport { isActive } from '../../shared';\nimport { hasActiveLink as containsActiveLink, getSidebar, getSidebarGroups } from '../support/sidebar';\nimport { useData } from './data';\nexport function useSidebar() {\n const { frontmatter, page, theme } = useData();\n const is960 = useMediaQuery('(min-width: 960px)');\n const isOpen = ref(false);\n const _sidebar = computed(() => {\n const sidebarConfig = theme.value.sidebar;\n const relativePath = page.value.relativePath;\n return sidebarConfig ? getSidebar(sidebarConfig, relativePath) : [];\n });\n const sidebar = ref(_sidebar.value);\n watch(_sidebar, (next, prev) => {\n if (JSON.stringify(next) !== JSON.stringify(prev))\n sidebar.value = _sidebar.value;\n });\n const hasSidebar = computed(() => {\n return (frontmatter.value.sidebar !== false &&\n sidebar.value.length > 0 &&\n frontmatter.value.layout !== 'home');\n });\n const leftAside = computed(() => {\n if (hasAside)\n return frontmatter.value.aside == null\n ? theme.value.aside === 'left'\n : frontmatter.value.aside === 'left';\n return false;\n });\n const hasAside = computed(() => {\n if (frontmatter.value.layout === 'home')\n return false;\n if (frontmatter.value.aside != null)\n return !!frontmatter.value.aside;\n return theme.value.aside !== false;\n });\n const isSidebarEnabled = computed(() => hasSidebar.value && is960.value);\n const sidebarGroups = computed(() => {\n return hasSidebar.value ? getSidebarGroups(sidebar.value) : [];\n });\n function open() {\n isOpen.value = true;\n }\n function close() {\n isOpen.value = false;\n }\n function toggle() {\n isOpen.value ? close() : open();\n }\n return {\n isOpen,\n sidebar,\n sidebarGroups,\n hasSidebar,\n hasAside,\n leftAside,\n isSidebarEnabled,\n open,\n close,\n toggle\n };\n}\n/**\n * a11y: cache the element that opened the Sidebar (the menu button) then\n * focus that button again when Menu is closed with Escape key.\n */\nexport function useCloseSidebarOnEscape(isOpen, close) {\n let triggerElement;\n watchEffect(() => {\n triggerElement = isOpen.value\n ? document.activeElement\n : undefined;\n });\n onMounted(() => {\n window.addEventListener('keyup', onEscape);\n });\n onUnmounted(() => {\n window.removeEventListener('keyup', onEscape);\n });\n function onEscape(e) {\n if (e.key === 'Escape' && isOpen.value) {\n close();\n triggerElement?.focus();\n }\n }\n}\nexport function useSidebarControl(item) {\n const { page, hash } = useData();\n const collapsed = ref(false);\n const collapsible = computed(() => {\n return item.value.collapsed != null;\n });\n const isLink = computed(() => {\n return !!item.value.link;\n });\n const isActiveLink = ref(false);\n const updateIsActiveLink = () => {\n isActiveLink.value = isActive(page.value.relativePath, item.value.link);\n };\n watch([page, item, hash], updateIsActiveLink);\n onMounted(updateIsActiveLink);\n const hasActiveLink = computed(() => {\n if (isActiveLink.value) {\n return true;\n }\n return item.value.items\n ? containsActiveLink(page.value.relativePath, item.value.items)\n : false;\n });\n const hasChildren = computed(() => {\n return !!(item.value.items && item.value.items.length);\n });\n watchEffect(() => {\n collapsed.value = !!(collapsible.value && item.value.collapsed);\n });\n watchPostEffect(() => {\n ;\n (isActiveLink.value || hasActiveLink.value) && (collapsed.value = false);\n });\n function toggle() {\n if (collapsible.value) {\n collapsed.value = !collapsed.value;\n }\n }\n return {\n collapsed,\n collapsible,\n isLink,\n isActiveLink,\n hasActiveLink,\n hasChildren,\n toggle\n };\n}\n", "import { onContentUpdated } from 'vitepress';\nimport { computed, shallowRef } from 'vue';\nimport { getHeaders } from '../composables/outline';\nimport { useData } from './data';\nexport function useLocalNav() {\n const { theme, frontmatter } = useData();\n const headers = shallowRef([]);\n const hasLocalNav = computed(() => {\n return headers.value.length > 0;\n });\n onContentUpdated(() => {\n headers.value = getHeaders(frontmatter.value.outline ?? theme.value.outline);\n });\n return {\n headers,\n hasLocalNav\n };\n}\n", "import { getScrollOffset } from 'vitepress';\nimport { onMounted, onUnmounted, onUpdated } from 'vue';\nimport { throttleAndDebounce } from '../support/utils';\nimport { useAside } from './aside';\n// cached list of anchor elements from resolveHeaders\nconst resolvedHeaders = [];\nexport function resolveTitle(theme) {\n return ((typeof theme.outline === 'object' &&\n !Array.isArray(theme.outline) &&\n theme.outline.label) ||\n theme.outlineTitle ||\n 'On this page');\n}\nexport function getHeaders(range) {\n const headers = [\n ...document.querySelectorAll('.VPDoc :where(h1,h2,h3,h4,h5,h6)')\n ]\n .filter((el) => el.id && el.hasChildNodes())\n .map((el) => {\n const level = Number(el.tagName[1]);\n return {\n element: el,\n title: serializeHeader(el),\n link: '#' + el.id,\n level\n };\n });\n return resolveHeaders(headers, range);\n}\nfunction serializeHeader(h) {\n let ret = '';\n for (const node of h.childNodes) {\n if (node.nodeType === 1) {\n if (node.classList.contains('VPBadge') ||\n node.classList.contains('header-anchor') ||\n node.classList.contains('ignore-header')) {\n continue;\n }\n ret += node.textContent;\n }\n else if (node.nodeType === 3) {\n ret += node.textContent;\n }\n }\n return ret.trim();\n}\nexport function resolveHeaders(headers, range) {\n if (range === false) {\n return [];\n }\n const levelsRange = (typeof range === 'object' && !Array.isArray(range)\n ? range.level\n : range) || 2;\n const [high, low] = typeof levelsRange === 'number'\n ? [levelsRange, levelsRange]\n : levelsRange === 'deep'\n ? [2, 6]\n : levelsRange;\n headers = headers.filter((h) => h.level >= high && h.level <= low);\n // clear previous caches\n resolvedHeaders.length = 0;\n // update global header list for active link rendering\n for (const { element, link } of headers) {\n resolvedHeaders.push({ element, link });\n }\n const ret = [];\n outer: for (let i = 0; i < headers.length; i++) {\n const cur = headers[i];\n if (i === 0) {\n ret.push(cur);\n }\n else {\n for (let j = i - 1; j >= 0; j--) {\n const prev = headers[j];\n if (prev.level < cur.level) {\n ;\n (prev.children || (prev.children = [])).push(cur);\n continue outer;\n }\n }\n ret.push(cur);\n }\n }\n return ret;\n}\nexport function useActiveAnchor(container, marker) {\n const { isAsideEnabled } = useAside();\n const onScroll = throttleAndDebounce(setActiveLink, 100);\n let prevActiveLink = null;\n onMounted(() => {\n requestAnimationFrame(setActiveLink);\n window.addEventListener('scroll', onScroll);\n });\n onUpdated(() => {\n // sidebar update means a route change\n activateLink(location.hash);\n });\n onUnmounted(() => {\n window.removeEventListener('scroll', onScroll);\n });\n function setActiveLink() {\n if (!isAsideEnabled.value) {\n return;\n }\n const scrollY = window.scrollY;\n const innerHeight = window.innerHeight;\n const offsetHeight = document.body.offsetHeight;\n const isBottom = Math.abs(scrollY + innerHeight - offsetHeight) < 1;\n // resolvedHeaders may be repositioned, hidden or fix positioned\n const headers = resolvedHeaders\n .map(({ element, link }) => ({\n link,\n top: getAbsoluteTop(element)\n }))\n .filter(({ top }) => !Number.isNaN(top))\n .sort((a, b) => a.top - b.top);\n // no headers available for active link\n if (!headers.length) {\n activateLink(null);\n return;\n }\n // page top\n if (scrollY < 1) {\n activateLink(null);\n return;\n }\n // page bottom - highlight last link\n if (isBottom) {\n activateLink(headers[headers.length - 1].link);\n return;\n }\n // find the last header above the top of viewport\n let activeLink = null;\n for (const { link, top } of headers) {\n if (top > scrollY + getScrollOffset() + 4) {\n break;\n }\n activeLink = link;\n }\n activateLink(activeLink);\n }\n function activateLink(hash) {\n if (prevActiveLink) {\n prevActiveLink.classList.remove('active');\n }\n if (hash == null) {\n prevActiveLink = null;\n }\n else {\n prevActiveLink = container.value.querySelector(`a[href=\"${decodeURIComponent(hash)}\"]`);\n }\n const activeLink = prevActiveLink;\n if (activeLink) {\n activeLink.classList.add('active');\n marker.value.style.top = activeLink.offsetTop + 39 + 'px';\n marker.value.style.opacity = '1';\n }\n else {\n marker.value.style.top = '33px';\n marker.value.style.opacity = '0';\n }\n }\n}\nfunction getAbsoluteTop(element) {\n let offsetTop = 0;\n while (element !== document.body) {\n if (element === null) {\n // child element is:\n // - not attached to the DOM (display: none)\n // - set to fixed position (not scrollable)\n // - body or html element (null offsetParent)\n return NaN;\n }\n offsetTop += element.offsetTop;\n element = element.offsetParent;\n }\n return offsetTop;\n}\n"], - "mappings": ";;;;;;;;;;;AAAA,OAAO;;;ACAP,OAAO;AACP,OAAO;AACP,OAAO;AACP,OAAO;AACP,OAAO;AACP,OAAO;AACP,OAAO;AACP,OAAO;AACP,OAAO;AACP,OAAO,aAAa;AACpB,OAAO,YAAY;AACnB,SAAoB,WAAXA,gBAA0B;AACnC,SAAoB,WAAXA,gBAA0B;AACnC,SAAoB,WAAXA,gBAA2B;AACpC,SAAoB,WAAXA,gBAA6B;AACtC,SAAoB,WAAXA,gBAAiC;AAC1C,SAAoB,WAAXA,gBAAiC;AA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,MAAM;AACnB,YAAQ,QAAQ,WAAW,YAAY,MAAM,WAAWA,OAAM,MAAM,OAAO;AAAA,EAC/E,CAAC;AACD,SAAO;AAAA,IACH;AAAA,IACA;AAAA,EACJ;AACJ;;;ALQA,IAAM,QAAQ;AAAA,EACV;AAAA,EACA,YAAY,CAAC,EAAE,IAAI,MAAM;AACrB,QAAI,UAAU,SAAS,OAAO;AAAA,EAClC;AACJ;AACA,IAAO,wBAAQ;", - "names": ["default", "dir", "theme", "theme"] -} diff --git a/docs/.vitepress/cache/deps/_metadata.json b/docs/.vitepress/cache/deps/_metadata.json deleted file mode 100644 index d91b6c17b..000000000 --- a/docs/.vitepress/cache/deps/_metadata.json +++ /dev/null @@ -1,40 +0,0 @@ -{ - "hash": "379c5044", - "configHash": "11d6af3f", - "lockfileHash": "8f5d39ce", - "browserHash": "c1c2f060", - "optimized": { - "vue": { - "src": "../../../../node_modules/vue/dist/vue.runtime.esm-bundler.js", - "file": "vue.js", - "fileHash": "b519ae76", - "needsInterop": false - }, - "vitepress > @vue/devtools-api": { - "src": "../../../../node_modules/@vue/devtools-api/dist/index.js", - "file": "vitepress___@vue_devtools-api.js", - "fileHash": "6dfb9b58", - "needsInterop": false - }, - "vitepress > @vueuse/core": { - "src": "../../../../node_modules/@vueuse/core/index.mjs", - "file": "vitepress___@vueuse_core.js", - "fileHash": "e7f5068b", - "needsInterop": false - }, - "@theme/index": { - "src": "../../../../node_modules/vitepress/dist/client/theme-default/index.js", - "file": "@theme_index.js", - "fileHash": "ff18cad6", - "needsInterop": false - } - }, - "chunks": { - "chunk-B2WI2LE3": { - "file": "chunk-B2WI2LE3.js" - }, - "chunk-BJ3OZQ3N": { - "file": "chunk-BJ3OZQ3N.js" - } - } -} \ No newline at end of file diff --git a/docs/.vitepress/cache/deps/chunk-B2WI2LE3.js b/docs/.vitepress/cache/deps/chunk-B2WI2LE3.js deleted file mode 100644 index 4fed6e0cc..000000000 --- a/docs/.vitepress/cache/deps/chunk-B2WI2LE3.js +++ /dev/null @@ -1,9172 +0,0 @@ -import { - Fragment, - TransitionGroup, - computed, - customRef, - defineComponent, - effectScope, - getCurrentInstance, - getCurrentScope, - h, - inject, - isReactive, - isReadonly, - isRef, - markRaw, - nextTick, - onBeforeMount, - onBeforeUnmount, - onBeforeUpdate, - onMounted, - onScopeDispose, - onUnmounted, - onUpdated, - provide, - reactive, - readonly, - ref, - shallowReactive, - shallowRef, - toRef, - toRefs, - unref, - version, - watch, - watchEffect -} from "./chunk-BJ3OZQ3N.js"; - -// node_modules/vitepress/lib/vue-demi.mjs -var isVue2 = false; -var isVue3 = true; -function set(target, key, val) { - if (Array.isArray(target)) { - target.length = Math.max(target.length, key); - target.splice(key, 1, val); - return val; - } - target[key] = val; - return val; -} -function del(target, key) { - if (Array.isArray(target)) { - target.splice(key, 1); - return; - } - delete target[key]; -} - -// node_modules/@vueuse/shared/index.mjs -function computedEager(fn, options) { - var _a; - const result = shallowRef(); - watchEffect(() => { - result.value = fn(); - }, { - ...options, - flush: (_a = options == null ? void 0 : options.flush) != null ? _a : "sync" - }); - return readonly(result); -} -function computedWithControl(source, fn) { - let v = void 0; - let track; - let trigger; - const dirty = ref(true); - const update = () => { - dirty.value = true; - trigger(); - }; - watch(source, update, { flush: "sync" }); - const get2 = typeof fn === "function" ? fn : fn.get; - const set3 = typeof fn === "function" ? void 0 : fn.set; - const result = customRef((_track, _trigger) => { - track = _track; - trigger = _trigger; - return { - get() { - if (dirty.value) { - v = get2(); - dirty.value = false; - } - track(); - return v; - }, - set(v2) { - set3 == null ? void 0 : set3(v2); - } - }; - }); - if (Object.isExtensible(result)) - result.trigger = update; - return result; -} -function tryOnScopeDispose(fn) { - if (getCurrentScope()) { - onScopeDispose(fn); - return true; - } - return false; -} -function createEventHook() { - const fns = /* @__PURE__ */ new Set(); - const off = (fn) => { - fns.delete(fn); - }; - const on = (fn) => { - fns.add(fn); - const offFn = () => off(fn); - tryOnScopeDispose(offFn); - return { - off: offFn - }; - }; - const trigger = (...args) => { - return Promise.all(Array.from(fns).map((fn) => fn(...args))); - }; - return { - on, - off, - trigger - }; -} -function createGlobalState(stateFactory) { - let initialized = false; - let state; - const scope = effectScope(true); - return (...args) => { - if (!initialized) { - state = scope.run(() => stateFactory(...args)); - initialized = true; - } - return state; - }; -} -var localProvidedStateMap = /* @__PURE__ */ new WeakMap(); -var provideLocal = (key, value) => { - var _a; - const instance = (_a = getCurrentInstance()) == null ? void 0 : _a.proxy; - if (instance == null) - throw new Error("provideLocal must be called in setup"); - if (!localProvidedStateMap.has(instance)) - localProvidedStateMap.set(instance, /* @__PURE__ */ Object.create(null)); - const localProvidedState = localProvidedStateMap.get(instance); - localProvidedState[key] = value; - provide(key, value); -}; -var injectLocal = (...args) => { - var _a; - const key = args[0]; - const instance = (_a = getCurrentInstance()) == null ? void 0 : _a.proxy; - if (instance == null) - throw new Error("injectLocal must be called in setup"); - if (localProvidedStateMap.has(instance) && key in localProvidedStateMap.get(instance)) - return localProvidedStateMap.get(instance)[key]; - return inject(...args); -}; -function createInjectionState(composable, options) { - const key = (options == null ? void 0 : options.injectionKey) || Symbol(composable.name || "InjectionState"); - const defaultValue = options == null ? void 0 : options.defaultValue; - const useProvidingState = (...args) => { - const state = composable(...args); - provideLocal(key, state); - return state; - }; - const useInjectedState = () => injectLocal(key, defaultValue); - return [useProvidingState, useInjectedState]; -} -function createSharedComposable(composable) { - let subscribers = 0; - let state; - let scope; - const dispose = () => { - subscribers -= 1; - if (scope && subscribers <= 0) { - scope.stop(); - state = void 0; - scope = void 0; - } - }; - return (...args) => { - subscribers += 1; - if (!state) { - scope = effectScope(true); - state = scope.run(() => composable(...args)); - } - tryOnScopeDispose(dispose); - return state; - }; -} -function extendRef(ref2, extend, { enumerable = false, unwrap = true } = {}) { - if (!isVue3 && !version.startsWith("2.7.")) { - if (true) - throw new Error("[VueUse] extendRef only works in Vue 2.7 or above."); - return; - } - for (const [key, value] of Object.entries(extend)) { - if (key === "value") - continue; - if (isRef(value) && unwrap) { - Object.defineProperty(ref2, key, { - get() { - return value.value; - }, - set(v) { - value.value = v; - }, - enumerable - }); - } else { - Object.defineProperty(ref2, key, { value, enumerable }); - } - } - return ref2; -} -function get(obj, key) { - if (key == null) - return unref(obj); - return unref(obj)[key]; -} -function isDefined(v) { - return unref(v) != null; -} -function makeDestructurable(obj, arr) { - if (typeof Symbol !== "undefined") { - const clone = { ...obj }; - Object.defineProperty(clone, Symbol.iterator, { - enumerable: false, - value() { - let index = 0; - return { - next: () => ({ - value: arr[index++], - done: index > arr.length - }) - }; - } - }); - return clone; - } else { - return Object.assign([...arr], obj); - } -} -function toValue(r) { - return typeof r === "function" ? r() : unref(r); -} -var resolveUnref = toValue; -function reactify(fn, options) { - const unrefFn = (options == null ? void 0 : options.computedGetter) === false ? unref : toValue; - return function(...args) { - return computed(() => fn.apply(this, args.map((i) => unrefFn(i)))); - }; -} -function reactifyObject(obj, optionsOrKeys = {}) { - let keys2 = []; - let options; - if (Array.isArray(optionsOrKeys)) { - keys2 = optionsOrKeys; - } else { - options = optionsOrKeys; - const { includeOwnProperties = true } = optionsOrKeys; - keys2.push(...Object.keys(obj)); - if (includeOwnProperties) - keys2.push(...Object.getOwnPropertyNames(obj)); - } - return Object.fromEntries( - keys2.map((key) => { - const value = obj[key]; - return [ - key, - typeof value === "function" ? reactify(value.bind(obj), options) : value - ]; - }) - ); -} -function toReactive(objectRef) { - if (!isRef(objectRef)) - return reactive(objectRef); - const proxy = new Proxy({}, { - get(_, p, receiver) { - return unref(Reflect.get(objectRef.value, p, receiver)); - }, - set(_, p, value) { - if (isRef(objectRef.value[p]) && !isRef(value)) - objectRef.value[p].value = value; - else - objectRef.value[p] = value; - return true; - }, - deleteProperty(_, p) { - return Reflect.deleteProperty(objectRef.value, p); - }, - has(_, p) { - return Reflect.has(objectRef.value, p); - }, - ownKeys() { - return Object.keys(objectRef.value); - }, - getOwnPropertyDescriptor() { - return { - enumerable: true, - configurable: true - }; - } - }); - return reactive(proxy); -} -function reactiveComputed(fn) { - return toReactive(computed(fn)); -} -function reactiveOmit(obj, ...keys2) { - const flatKeys = keys2.flat(); - const predicate = flatKeys[0]; - return reactiveComputed(() => typeof predicate === "function" ? Object.fromEntries(Object.entries(toRefs(obj)).filter(([k, v]) => !predicate(toValue(v), k))) : Object.fromEntries(Object.entries(toRefs(obj)).filter((e) => !flatKeys.includes(e[0])))); -} -var isClient = typeof window !== "undefined" && typeof document !== "undefined"; -var isWorker = typeof WorkerGlobalScope !== "undefined" && globalThis instanceof WorkerGlobalScope; -var isDef = (val) => typeof val !== "undefined"; -var notNullish = (val) => val != null; -var assert = (condition, ...infos) => { - if (!condition) - console.warn(...infos); -}; -var toString = Object.prototype.toString; -var isObject = (val) => toString.call(val) === "[object Object]"; -var now = () => Date.now(); -var timestamp = () => +Date.now(); -var clamp = (n, min, max) => Math.min(max, Math.max(min, n)); -var noop = () => { -}; -var rand = (min, max) => { - min = Math.ceil(min); - max = Math.floor(max); - return Math.floor(Math.random() * (max - min + 1)) + min; -}; -var hasOwn = (val, key) => Object.prototype.hasOwnProperty.call(val, key); -var isIOS = getIsIOS(); -function getIsIOS() { - var _a, _b; - return isClient && ((_a = window == null ? void 0 : window.navigator) == null ? void 0 : _a.userAgent) && (/iP(?:ad|hone|od)/.test(window.navigator.userAgent) || ((_b = window == null ? void 0 : window.navigator) == null ? void 0 : _b.maxTouchPoints) > 2 && /iPad|Macintosh/.test(window == null ? void 0 : window.navigator.userAgent)); -} -function createFilterWrapper(filter, fn) { - function wrapper(...args) { - return new Promise((resolve, reject) => { - Promise.resolve(filter(() => fn.apply(this, args), { fn, thisArg: this, args })).then(resolve).catch(reject); - }); - } - return wrapper; -} -var bypassFilter = (invoke2) => { - return invoke2(); -}; -function debounceFilter(ms, options = {}) { - let timer; - let maxTimer; - let lastRejector = noop; - const _clearTimeout = (timer2) => { - clearTimeout(timer2); - lastRejector(); - lastRejector = noop; - }; - const filter = (invoke2) => { - const duration = toValue(ms); - const maxDuration = toValue(options.maxWait); - if (timer) - _clearTimeout(timer); - if (duration <= 0 || maxDuration !== void 0 && maxDuration <= 0) { - if (maxTimer) { - _clearTimeout(maxTimer); - maxTimer = null; - } - return Promise.resolve(invoke2()); - } - return new Promise((resolve, reject) => { - lastRejector = options.rejectOnCancel ? reject : resolve; - if (maxDuration && !maxTimer) { - maxTimer = setTimeout(() => { - if (timer) - _clearTimeout(timer); - maxTimer = null; - resolve(invoke2()); - }, maxDuration); - } - timer = setTimeout(() => { - if (maxTimer) - _clearTimeout(maxTimer); - maxTimer = null; - resolve(invoke2()); - }, duration); - }); - }; - return filter; -} -function throttleFilter(...args) { - let lastExec = 0; - let timer; - let isLeading = true; - let lastRejector = noop; - let lastValue; - let ms; - let trailing; - let leading; - let rejectOnCancel; - if (!isRef(args[0]) && typeof args[0] === "object") - ({ delay: ms, trailing = true, leading = true, rejectOnCancel = false } = args[0]); - else - [ms, trailing = true, leading = true, rejectOnCancel = false] = args; - const clear = () => { - if (timer) { - clearTimeout(timer); - timer = void 0; - lastRejector(); - lastRejector = noop; - } - }; - const filter = (_invoke) => { - const duration = toValue(ms); - const elapsed = Date.now() - lastExec; - const invoke2 = () => { - return lastValue = _invoke(); - }; - clear(); - if (duration <= 0) { - lastExec = Date.now(); - return invoke2(); - } - if (elapsed > duration && (leading || !isLeading)) { - lastExec = Date.now(); - invoke2(); - } else if (trailing) { - lastValue = new Promise((resolve, reject) => { - lastRejector = rejectOnCancel ? reject : resolve; - timer = setTimeout(() => { - lastExec = Date.now(); - isLeading = true; - resolve(invoke2()); - clear(); - }, Math.max(0, duration - elapsed)); - }); - } - if (!leading && !timer) - timer = setTimeout(() => isLeading = true, duration); - isLeading = false; - return lastValue; - }; - return filter; -} -function pausableFilter(extendFilter = bypassFilter) { - const isActive = ref(true); - function pause() { - isActive.value = false; - } - function resume() { - isActive.value = true; - } - const eventFilter = (...args) => { - if (isActive.value) - extendFilter(...args); - }; - return { isActive: readonly(isActive), pause, resume, eventFilter }; -} -var directiveHooks = { - mounted: isVue3 ? "mounted" : "inserted", - updated: isVue3 ? "updated" : "componentUpdated", - unmounted: isVue3 ? "unmounted" : "unbind" -}; -function cacheStringFunction(fn) { - const cache = /* @__PURE__ */ Object.create(null); - return (str) => { - const hit = cache[str]; - return hit || (cache[str] = fn(str)); - }; -} -var hyphenateRE = /\B([A-Z])/g; -var hyphenate = cacheStringFunction((str) => str.replace(hyphenateRE, "-$1").toLowerCase()); -var camelizeRE = /-(\w)/g; -var camelize = cacheStringFunction((str) => { - return str.replace(camelizeRE, (_, c) => c ? c.toUpperCase() : ""); -}); -function promiseTimeout(ms, throwOnTimeout = false, reason = "Timeout") { - return new Promise((resolve, reject) => { - if (throwOnTimeout) - setTimeout(() => reject(reason), ms); - else - setTimeout(resolve, ms); - }); -} -function identity(arg) { - return arg; -} -function createSingletonPromise(fn) { - let _promise; - function wrapper() { - if (!_promise) - _promise = fn(); - return _promise; - } - wrapper.reset = async () => { - const _prev = _promise; - _promise = void 0; - if (_prev) - await _prev; - }; - return wrapper; -} -function invoke(fn) { - return fn(); -} -function containsProp(obj, ...props) { - return props.some((k) => k in obj); -} -function increaseWithUnit(target, delta) { - var _a; - if (typeof target === "number") - return target + delta; - const value = ((_a = target.match(/^-?\d+\.?\d*/)) == null ? void 0 : _a[0]) || ""; - const unit = target.slice(value.length); - const result = Number.parseFloat(value) + delta; - if (Number.isNaN(result)) - return target; - return result + unit; -} -function objectPick(obj, keys2, omitUndefined = false) { - return keys2.reduce((n, k) => { - if (k in obj) { - if (!omitUndefined || obj[k] !== void 0) - n[k] = obj[k]; - } - return n; - }, {}); -} -function objectOmit(obj, keys2, omitUndefined = false) { - return Object.fromEntries(Object.entries(obj).filter(([key, value]) => { - return (!omitUndefined || value !== void 0) && !keys2.includes(key); - })); -} -function objectEntries(obj) { - return Object.entries(obj); -} -function getLifeCycleTarget(target) { - return target || getCurrentInstance(); -} -function toRef2(...args) { - if (args.length !== 1) - return toRef(...args); - const r = args[0]; - return typeof r === "function" ? readonly(customRef(() => ({ get: r, set: noop }))) : ref(r); -} -var resolveRef = toRef2; -function reactivePick(obj, ...keys2) { - const flatKeys = keys2.flat(); - const predicate = flatKeys[0]; - return reactiveComputed(() => typeof predicate === "function" ? Object.fromEntries(Object.entries(toRefs(obj)).filter(([k, v]) => predicate(toValue(v), k))) : Object.fromEntries(flatKeys.map((k) => [k, toRef2(obj, k)]))); -} -function refAutoReset(defaultValue, afterMs = 1e4) { - return customRef((track, trigger) => { - let value = toValue(defaultValue); - let timer; - const resetAfter = () => setTimeout(() => { - value = toValue(defaultValue); - trigger(); - }, toValue(afterMs)); - tryOnScopeDispose(() => { - clearTimeout(timer); - }); - return { - get() { - track(); - return value; - }, - set(newValue) { - value = newValue; - trigger(); - clearTimeout(timer); - timer = resetAfter(); - } - }; - }); -} -function useDebounceFn(fn, ms = 200, options = {}) { - return createFilterWrapper( - debounceFilter(ms, options), - fn - ); -} -function refDebounced(value, ms = 200, options = {}) { - const debounced = ref(value.value); - const updater = useDebounceFn(() => { - debounced.value = value.value; - }, ms, options); - watch(value, () => updater()); - return debounced; -} -function refDefault(source, defaultValue) { - return computed({ - get() { - var _a; - return (_a = source.value) != null ? _a : defaultValue; - }, - set(value) { - source.value = value; - } - }); -} -function useThrottleFn(fn, ms = 200, trailing = false, leading = true, rejectOnCancel = false) { - return createFilterWrapper( - throttleFilter(ms, trailing, leading, rejectOnCancel), - fn - ); -} -function refThrottled(value, delay = 200, trailing = true, leading = true) { - if (delay <= 0) - return value; - const throttled = ref(value.value); - const updater = useThrottleFn(() => { - throttled.value = value.value; - }, delay, trailing, leading); - watch(value, () => updater()); - return throttled; -} -function refWithControl(initial, options = {}) { - let source = initial; - let track; - let trigger; - const ref2 = customRef((_track, _trigger) => { - track = _track; - trigger = _trigger; - return { - get() { - return get2(); - }, - set(v) { - set3(v); - } - }; - }); - function get2(tracking = true) { - if (tracking) - track(); - return source; - } - function set3(value, triggering = true) { - var _a, _b; - if (value === source) - return; - const old = source; - if (((_a = options.onBeforeChange) == null ? void 0 : _a.call(options, value, old)) === false) - return; - source = value; - (_b = options.onChanged) == null ? void 0 : _b.call(options, value, old); - if (triggering) - trigger(); - } - const untrackedGet = () => get2(false); - const silentSet = (v) => set3(v, false); - const peek = () => get2(false); - const lay = (v) => set3(v, false); - return extendRef( - ref2, - { - get: get2, - set: set3, - untrackedGet, - silentSet, - peek, - lay - }, - { enumerable: true } - ); -} -var controlledRef = refWithControl; -function set2(...args) { - if (args.length === 2) { - const [ref2, value] = args; - ref2.value = value; - } - if (args.length === 3) { - if (isVue2) { - set(...args); - } else { - const [target, key, value] = args; - target[key] = value; - } - } -} -function watchWithFilter(source, cb, options = {}) { - const { - eventFilter = bypassFilter, - ...watchOptions - } = options; - return watch( - source, - createFilterWrapper( - eventFilter, - cb - ), - watchOptions - ); -} -function watchPausable(source, cb, options = {}) { - const { - eventFilter: filter, - ...watchOptions - } = options; - const { eventFilter, pause, resume, isActive } = pausableFilter(filter); - const stop = watchWithFilter( - source, - cb, - { - ...watchOptions, - eventFilter - } - ); - return { stop, pause, resume, isActive }; -} -function syncRef(left, right, ...[options]) { - const { - flush = "sync", - deep = false, - immediate = true, - direction = "both", - transform = {} - } = options || {}; - const watchers = []; - const transformLTR = "ltr" in transform && transform.ltr || ((v) => v); - const transformRTL = "rtl" in transform && transform.rtl || ((v) => v); - if (direction === "both" || direction === "ltr") { - watchers.push(watchPausable( - left, - (newValue) => { - watchers.forEach((w) => w.pause()); - right.value = transformLTR(newValue); - watchers.forEach((w) => w.resume()); - }, - { flush, deep, immediate } - )); - } - if (direction === "both" || direction === "rtl") { - watchers.push(watchPausable( - right, - (newValue) => { - watchers.forEach((w) => w.pause()); - left.value = transformRTL(newValue); - watchers.forEach((w) => w.resume()); - }, - { flush, deep, immediate } - )); - } - const stop = () => { - watchers.forEach((w) => w.stop()); - }; - return stop; -} -function syncRefs(source, targets, options = {}) { - const { - flush = "sync", - deep = false, - immediate = true - } = options; - if (!Array.isArray(targets)) - targets = [targets]; - return watch( - source, - (newValue) => targets.forEach((target) => target.value = newValue), - { flush, deep, immediate } - ); -} -function toRefs2(objectRef, options = {}) { - if (!isRef(objectRef)) - return toRefs(objectRef); - const result = Array.isArray(objectRef.value) ? Array.from({ length: objectRef.value.length }) : {}; - for (const key in objectRef.value) { - result[key] = customRef(() => ({ - get() { - return objectRef.value[key]; - }, - set(v) { - var _a; - const replaceRef = (_a = toValue(options.replaceRef)) != null ? _a : true; - if (replaceRef) { - if (Array.isArray(objectRef.value)) { - const copy = [...objectRef.value]; - copy[key] = v; - objectRef.value = copy; - } else { - const newObject = { ...objectRef.value, [key]: v }; - Object.setPrototypeOf(newObject, Object.getPrototypeOf(objectRef.value)); - objectRef.value = newObject; - } - } else { - objectRef.value[key] = v; - } - } - })); - } - return result; -} -function tryOnBeforeMount(fn, sync = true, target) { - const instance = getLifeCycleTarget(target); - if (instance) - onBeforeMount(fn, target); - else if (sync) - fn(); - else - nextTick(fn); -} -function tryOnBeforeUnmount(fn, target) { - const instance = getLifeCycleTarget(target); - if (instance) - onBeforeUnmount(fn, target); -} -function tryOnMounted(fn, sync = true, target) { - const instance = getLifeCycleTarget(); - if (instance) - onMounted(fn, target); - else if (sync) - fn(); - else - nextTick(fn); -} -function tryOnUnmounted(fn, target) { - const instance = getLifeCycleTarget(target); - if (instance) - onUnmounted(fn, target); -} -function createUntil(r, isNot = false) { - function toMatch(condition, { flush = "sync", deep = false, timeout, throwOnTimeout } = {}) { - let stop = null; - const watcher = new Promise((resolve) => { - stop = watch( - r, - (v) => { - if (condition(v) !== isNot) { - stop == null ? void 0 : stop(); - resolve(v); - } - }, - { - flush, - deep, - immediate: true - } - ); - }); - const promises = [watcher]; - if (timeout != null) { - promises.push( - promiseTimeout(timeout, throwOnTimeout).then(() => toValue(r)).finally(() => stop == null ? void 0 : stop()) - ); - } - return Promise.race(promises); - } - function toBe(value, options) { - if (!isRef(value)) - return toMatch((v) => v === value, options); - const { flush = "sync", deep = false, timeout, throwOnTimeout } = options != null ? options : {}; - let stop = null; - const watcher = new Promise((resolve) => { - stop = watch( - [r, value], - ([v1, v2]) => { - if (isNot !== (v1 === v2)) { - stop == null ? void 0 : stop(); - resolve(v1); - } - }, - { - flush, - deep, - immediate: true - } - ); - }); - const promises = [watcher]; - if (timeout != null) { - promises.push( - promiseTimeout(timeout, throwOnTimeout).then(() => toValue(r)).finally(() => { - stop == null ? void 0 : stop(); - return toValue(r); - }) - ); - } - return Promise.race(promises); - } - function toBeTruthy(options) { - return toMatch((v) => Boolean(v), options); - } - function toBeNull(options) { - return toBe(null, options); - } - function toBeUndefined(options) { - return toBe(void 0, options); - } - function toBeNaN(options) { - return toMatch(Number.isNaN, options); - } - function toContains(value, options) { - return toMatch((v) => { - const array = Array.from(v); - return array.includes(value) || array.includes(toValue(value)); - }, options); - } - function changed(options) { - return changedTimes(1, options); - } - function changedTimes(n = 1, options) { - let count = -1; - return toMatch(() => { - count += 1; - return count >= n; - }, options); - } - if (Array.isArray(toValue(r))) { - const instance = { - toMatch, - toContains, - changed, - changedTimes, - get not() { - return createUntil(r, !isNot); - } - }; - return instance; - } else { - const instance = { - toMatch, - toBe, - toBeTruthy, - toBeNull, - toBeNaN, - toBeUndefined, - changed, - changedTimes, - get not() { - return createUntil(r, !isNot); - } - }; - return instance; - } -} -function until(r) { - return createUntil(r); -} -function defaultComparator(value, othVal) { - return value === othVal; -} -function useArrayDifference(...args) { - var _a; - const list = args[0]; - const values = args[1]; - let compareFn = (_a = args[2]) != null ? _a : defaultComparator; - if (typeof compareFn === "string") { - const key = compareFn; - compareFn = (value, othVal) => value[key] === othVal[key]; - } - return computed(() => toValue(list).filter((x) => toValue(values).findIndex((y) => compareFn(x, y)) === -1)); -} -function useArrayEvery(list, fn) { - return computed(() => toValue(list).every((element, index, array) => fn(toValue(element), index, array))); -} -function useArrayFilter(list, fn) { - return computed(() => toValue(list).map((i) => toValue(i)).filter(fn)); -} -function useArrayFind(list, fn) { - return computed(() => toValue( - toValue(list).find((element, index, array) => fn(toValue(element), index, array)) - )); -} -function useArrayFindIndex(list, fn) { - return computed(() => toValue(list).findIndex((element, index, array) => fn(toValue(element), index, array))); -} -function findLast(arr, cb) { - let index = arr.length; - while (index-- > 0) { - if (cb(arr[index], index, arr)) - return arr[index]; - } - return void 0; -} -function useArrayFindLast(list, fn) { - return 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)) - )); -} -function isArrayIncludesOptions(obj) { - return isObject(obj) && containsProp(obj, "formIndex", "comparator"); -} -function useArrayIncludes(...args) { - var _a; - const list = args[0]; - const value = args[1]; - let comparator = args[2]; - let formIndex = 0; - if (isArrayIncludesOptions(comparator)) { - formIndex = (_a = comparator.fromIndex) != null ? _a : 0; - comparator = comparator.comparator; - } - if (typeof comparator === "string") { - const key = comparator; - comparator = (element, value2) => element[key] === toValue(value2); - } - comparator = comparator != null ? comparator : (element, value2) => element === toValue(value2); - return computed(() => toValue(list).slice(formIndex).some((element, index, array) => comparator( - toValue(element), - toValue(value), - index, - toValue(array) - ))); -} -function useArrayJoin(list, separator) { - return computed(() => toValue(list).map((i) => toValue(i)).join(toValue(separator))); -} -function useArrayMap(list, fn) { - return computed(() => toValue(list).map((i) => toValue(i)).map(fn)); -} -function useArrayReduce(list, reducer, ...args) { - const reduceCallback = (sum, value, index) => reducer(toValue(sum), toValue(value), index); - return computed(() => { - const resolved = toValue(list); - return args.length ? resolved.reduce(reduceCallback, toValue(args[0])) : resolved.reduce(reduceCallback); - }); -} -function useArraySome(list, fn) { - return computed(() => toValue(list).some((element, index, array) => fn(toValue(element), index, array))); -} -function uniq(array) { - return Array.from(new Set(array)); -} -function uniqueElementsBy(array, fn) { - return array.reduce((acc, v) => { - if (!acc.some((x) => fn(v, x, array))) - acc.push(v); - return acc; - }, []); -} -function useArrayUnique(list, compareFn) { - return computed(() => { - const resolvedList = toValue(list).map((element) => toValue(element)); - return compareFn ? uniqueElementsBy(resolvedList, compareFn) : uniq(resolvedList); - }); -} -function useCounter(initialValue = 0, options = {}) { - let _initialValue = unref(initialValue); - const count = ref(initialValue); - const { - max = Number.POSITIVE_INFINITY, - min = Number.NEGATIVE_INFINITY - } = options; - const inc = (delta = 1) => count.value = Math.max(Math.min(max, count.value + delta), min); - const dec = (delta = 1) => count.value = Math.min(Math.max(min, count.value - delta), max); - const get2 = () => count.value; - const set3 = (val) => count.value = Math.max(min, Math.min(max, val)); - const reset = (val = _initialValue) => { - _initialValue = val; - return set3(val); - }; - return { count, inc, dec, get: get2, set: set3, reset }; -} -var REGEX_PARSE = /^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[T\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/i; -var 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}|SSS/g; -function defaultMeridiem(hours, minutes, isLowercase, hasPeriod) { - let m = hours < 12 ? "AM" : "PM"; - if (hasPeriod) - m = m.split("").reduce((acc, curr) => acc += `${curr}.`, ""); - return isLowercase ? m.toLowerCase() : m; -} -function formatOrdinal(num) { - const suffixes = ["th", "st", "nd", "rd"]; - const v = num % 100; - return num + (suffixes[(v - 20) % 10] || suffixes[v] || suffixes[0]); -} -function formatDate(date, formatStr, options = {}) { - var _a; - const years = date.getFullYear(); - const month = date.getMonth(); - const days = date.getDate(); - const hours = date.getHours(); - const minutes = date.getMinutes(); - const seconds = date.getSeconds(); - const milliseconds = date.getMilliseconds(); - const day = date.getDay(); - const meridiem = (_a = options.customMeridiem) != null ? _a : defaultMeridiem; - const matches = { - Yo: () => formatOrdinal(years), - YY: () => String(years).slice(-2), - YYYY: () => years, - M: () => month + 1, - Mo: () => formatOrdinal(month + 1), - MM: () => `${month + 1}`.padStart(2, "0"), - MMM: () => date.toLocaleDateString(options.locales, { month: "short" }), - MMMM: () => date.toLocaleDateString(options.locales, { month: "long" }), - D: () => String(days), - Do: () => formatOrdinal(days), - DD: () => `${days}`.padStart(2, "0"), - H: () => String(hours), - Ho: () => formatOrdinal(hours), - HH: () => `${hours}`.padStart(2, "0"), - h: () => `${hours % 12 || 12}`.padStart(1, "0"), - ho: () => formatOrdinal(hours % 12 || 12), - hh: () => `${hours % 12 || 12}`.padStart(2, "0"), - m: () => String(minutes), - mo: () => formatOrdinal(minutes), - mm: () => `${minutes}`.padStart(2, "0"), - s: () => String(seconds), - so: () => formatOrdinal(seconds), - ss: () => `${seconds}`.padStart(2, "0"), - SSS: () => `${milliseconds}`.padStart(3, "0"), - d: () => day, - dd: () => date.toLocaleDateString(options.locales, { weekday: "narrow" }), - ddd: () => date.toLocaleDateString(options.locales, { weekday: "short" }), - dddd: () => date.toLocaleDateString(options.locales, { weekday: "long" }), - A: () => meridiem(hours, minutes), - AA: () => meridiem(hours, minutes, false, true), - a: () => meridiem(hours, minutes, true), - aa: () => meridiem(hours, minutes, true, true) - }; - return formatStr.replace(REGEX_FORMAT, (match, $1) => { - var _a2, _b; - return (_b = $1 != null ? $1 : (_a2 = matches[match]) == null ? void 0 : _a2.call(matches)) != null ? _b : match; - }); -} -function normalizeDate(date) { - if (date === null) - return new Date(Number.NaN); - if (date === void 0) - return /* @__PURE__ */ new Date(); - if (date instanceof Date) - return new Date(date); - if (typeof date === "string" && !/Z$/i.test(date)) { - const d = date.match(REGEX_PARSE); - if (d) { - const m = d[2] - 1 || 0; - const ms = (d[7] || "0").substring(0, 3); - return new Date(d[1], m, d[3] || 1, d[4] || 0, d[5] || 0, d[6] || 0, ms); - } - } - return new Date(date); -} -function useDateFormat(date, formatStr = "HH:mm:ss", options = {}) { - return computed(() => formatDate(normalizeDate(toValue(date)), toValue(formatStr), options)); -} -function useIntervalFn(cb, interval = 1e3, options = {}) { - const { - immediate = true, - immediateCallback = false - } = options; - let timer = null; - const isActive = ref(false); - function clean() { - if (timer) { - clearInterval(timer); - timer = null; - } - } - function pause() { - isActive.value = false; - clean(); - } - function resume() { - const intervalValue = toValue(interval); - if (intervalValue <= 0) - return; - isActive.value = true; - if (immediateCallback) - cb(); - clean(); - timer = setInterval(cb, intervalValue); - } - if (immediate && isClient) - resume(); - if (isRef(interval) || typeof interval === "function") { - const stopWatch = watch(interval, () => { - if (isActive.value && isClient) - resume(); - }); - tryOnScopeDispose(stopWatch); - } - tryOnScopeDispose(pause); - return { - isActive, - pause, - resume - }; -} -function useInterval(interval = 1e3, options = {}) { - const { - controls: exposeControls = false, - immediate = true, - callback - } = options; - const counter = ref(0); - const update = () => counter.value += 1; - const reset = () => { - counter.value = 0; - }; - const controls = useIntervalFn( - callback ? () => { - update(); - callback(counter.value); - } : update, - interval, - { immediate } - ); - if (exposeControls) { - return { - counter, - reset, - ...controls - }; - } else { - return counter; - } -} -function useLastChanged(source, options = {}) { - var _a; - const ms = ref((_a = options.initialValue) != null ? _a : null); - watch( - source, - () => ms.value = timestamp(), - options - ); - return ms; -} -function useTimeoutFn(cb, interval, options = {}) { - const { - immediate = true - } = options; - const isPending = ref(false); - let timer = null; - function clear() { - if (timer) { - clearTimeout(timer); - timer = null; - } - } - function stop() { - isPending.value = false; - clear(); - } - function start(...args) { - clear(); - isPending.value = true; - timer = setTimeout(() => { - isPending.value = false; - timer = null; - cb(...args); - }, toValue(interval)); - } - if (immediate) { - isPending.value = true; - if (isClient) - start(); - } - tryOnScopeDispose(stop); - return { - isPending: readonly(isPending), - start, - stop - }; -} -function useTimeout(interval = 1e3, options = {}) { - const { - controls: exposeControls = false, - callback - } = options; - const controls = useTimeoutFn( - callback != null ? callback : noop, - interval, - options - ); - const ready = computed(() => !controls.isPending.value); - if (exposeControls) { - return { - ready, - ...controls - }; - } else { - return ready; - } -} -function useToNumber(value, options = {}) { - const { - method = "parseFloat", - radix, - nanToZero - } = options; - return computed(() => { - let resolved = toValue(value); - if (typeof resolved === "string") - resolved = Number[method](resolved, radix); - if (nanToZero && Number.isNaN(resolved)) - resolved = 0; - return resolved; - }); -} -function useToString(value) { - return computed(() => `${toValue(value)}`); -} -function useToggle(initialValue = false, options = {}) { - const { - truthyValue = true, - falsyValue = false - } = options; - const valueIsRef = isRef(initialValue); - const _value = ref(initialValue); - function toggle(value) { - if (arguments.length) { - _value.value = value; - return _value.value; - } else { - const truthy = toValue(truthyValue); - _value.value = _value.value === truthy ? toValue(falsyValue) : truthy; - return _value.value; - } - } - if (valueIsRef) - return toggle; - else - return [_value, toggle]; -} -function watchArray(source, cb, options) { - let oldList = (options == null ? void 0 : options.immediate) ? [] : [...source instanceof Function ? source() : Array.isArray(source) ? source : toValue(source)]; - return watch(source, (newList, _, onCleanup) => { - const oldListRemains = Array.from({ length: oldList.length }); - const added = []; - for (const obj of newList) { - let found = false; - for (let i = 0; i < oldList.length; i++) { - if (!oldListRemains[i] && obj === oldList[i]) { - oldListRemains[i] = true; - found = true; - break; - } - } - if (!found) - added.push(obj); - } - const removed = oldList.filter((_2, i) => !oldListRemains[i]); - cb(newList, oldList, added, removed, onCleanup); - oldList = [...newList]; - }, options); -} -function watchAtMost(source, cb, options) { - const { - count, - ...watchOptions - } = options; - const current = ref(0); - const stop = watchWithFilter( - source, - (...args) => { - current.value += 1; - if (current.value >= toValue(count)) - nextTick(() => stop()); - cb(...args); - }, - watchOptions - ); - return { count: current, stop }; -} -function watchDebounced(source, cb, options = {}) { - const { - debounce = 0, - maxWait = void 0, - ...watchOptions - } = options; - return watchWithFilter( - source, - cb, - { - ...watchOptions, - eventFilter: debounceFilter(debounce, { maxWait }) - } - ); -} -function watchDeep(source, cb, options) { - return watch( - source, - cb, - { - ...options, - deep: true - } - ); -} -function watchIgnorable(source, cb, options = {}) { - const { - eventFilter = bypassFilter, - ...watchOptions - } = options; - const filteredCb = createFilterWrapper( - eventFilter, - cb - ); - let ignoreUpdates; - let ignorePrevAsyncUpdates; - let stop; - if (watchOptions.flush === "sync") { - const ignore = ref(false); - ignorePrevAsyncUpdates = () => { - }; - ignoreUpdates = (updater) => { - ignore.value = true; - updater(); - ignore.value = false; - }; - stop = watch( - source, - (...args) => { - if (!ignore.value) - filteredCb(...args); - }, - watchOptions - ); - } else { - const disposables = []; - const ignoreCounter = ref(0); - const syncCounter = ref(0); - ignorePrevAsyncUpdates = () => { - ignoreCounter.value = syncCounter.value; - }; - disposables.push( - watch( - source, - () => { - syncCounter.value++; - }, - { ...watchOptions, flush: "sync" } - ) - ); - ignoreUpdates = (updater) => { - const syncCounterPrev = syncCounter.value; - updater(); - ignoreCounter.value += syncCounter.value - syncCounterPrev; - }; - disposables.push( - watch( - source, - (...args) => { - const ignore = ignoreCounter.value > 0 && ignoreCounter.value === syncCounter.value; - ignoreCounter.value = 0; - syncCounter.value = 0; - if (ignore) - return; - filteredCb(...args); - }, - watchOptions - ) - ); - stop = () => { - disposables.forEach((fn) => fn()); - }; - } - return { stop, ignoreUpdates, ignorePrevAsyncUpdates }; -} -function watchImmediate(source, cb, options) { - return watch( - source, - cb, - { - ...options, - immediate: true - } - ); -} -function watchOnce(source, cb, options) { - const stop = watch(source, (...args) => { - nextTick(() => stop()); - return cb(...args); - }, options); - return stop; -} -function watchThrottled(source, cb, options = {}) { - const { - throttle = 0, - trailing = true, - leading = true, - ...watchOptions - } = options; - return watchWithFilter( - source, - cb, - { - ...watchOptions, - eventFilter: throttleFilter(throttle, trailing, leading) - } - ); -} -function watchTriggerable(source, cb, options = {}) { - let cleanupFn; - function onEffect() { - if (!cleanupFn) - return; - const fn = cleanupFn; - cleanupFn = void 0; - fn(); - } - function onCleanup(callback) { - cleanupFn = callback; - } - const _cb = (value, oldValue) => { - onEffect(); - return cb(value, oldValue, onCleanup); - }; - const res = watchIgnorable(source, _cb, options); - const { ignoreUpdates } = res; - const trigger = () => { - let res2; - ignoreUpdates(() => { - res2 = _cb(getWatchSources(source), getOldValue(source)); - }); - return res2; - }; - return { - ...res, - trigger - }; -} -function getWatchSources(sources) { - if (isReactive(sources)) - return sources; - if (Array.isArray(sources)) - return sources.map((item) => toValue(item)); - return toValue(sources); -} -function getOldValue(source) { - return Array.isArray(source) ? source.map(() => void 0) : void 0; -} -function whenever(source, cb, options) { - const stop = watch( - source, - (v, ov, onInvalidate) => { - if (v) { - if (options == null ? void 0 : options.once) - nextTick(() => stop()); - cb(v, ov, onInvalidate); - } - }, - { - ...options, - once: false - } - ); - return stop; -} - -// node_modules/@vueuse/core/index.mjs -function computedAsync(evaluationCallback, initialState, optionsOrRef) { - let options; - if (isRef(optionsOrRef)) { - options = { - evaluating: optionsOrRef - }; - } else { - options = optionsOrRef || {}; - } - const { - lazy = false, - evaluating = void 0, - shallow = true, - onError = noop - } = options; - const started = ref(!lazy); - const current = shallow ? shallowRef(initialState) : ref(initialState); - let counter = 0; - watchEffect(async (onInvalidate) => { - if (!started.value) - return; - counter++; - const counterAtBeginning = counter; - let hasFinished = false; - if (evaluating) { - Promise.resolve().then(() => { - evaluating.value = true; - }); - } - try { - const result = await evaluationCallback((cancelCallback) => { - onInvalidate(() => { - if (evaluating) - evaluating.value = false; - if (!hasFinished) - cancelCallback(); - }); - }); - if (counterAtBeginning === counter) - current.value = result; - } catch (e) { - onError(e); - } finally { - if (evaluating && counterAtBeginning === counter) - evaluating.value = false; - hasFinished = true; - } - }); - if (lazy) { - return computed(() => { - started.value = true; - return current.value; - }); - } else { - return current; - } -} -function computedInject(key, options, defaultSource, treatDefaultAsFactory) { - let source = inject(key); - if (defaultSource) - source = inject(key, defaultSource); - if (treatDefaultAsFactory) - source = inject(key, defaultSource, treatDefaultAsFactory); - if (typeof options === "function") { - return computed((ctx) => options(source, ctx)); - } else { - return computed({ - get: (ctx) => options.get(source, ctx), - set: options.set - }); - } -} -function createReusableTemplate(options = {}) { - if (!isVue3 && !version.startsWith("2.7.")) { - if (true) - throw new Error("[VueUse] createReusableTemplate only works in Vue 2.7 or above."); - return; - } - const { - inheritAttrs = true - } = options; - const render = shallowRef(); - const define = defineComponent({ - setup(_, { slots }) { - return () => { - render.value = slots.default; - }; - } - }); - const reuse = defineComponent({ - inheritAttrs, - setup(_, { attrs, slots }) { - return () => { - var _a; - if (!render.value && true) - throw new Error("[VueUse] Failed to find the definition of reusable template"); - const vnode = (_a = render.value) == null ? void 0 : _a.call(render, { ...keysToCamelKebabCase(attrs), $slots: slots }); - return inheritAttrs && (vnode == null ? void 0 : vnode.length) === 1 ? vnode[0] : vnode; - }; - } - }); - return makeDestructurable( - { define, reuse }, - [define, reuse] - ); -} -function keysToCamelKebabCase(obj) { - const newObj = {}; - for (const key in obj) - newObj[camelize(key)] = obj[key]; - return newObj; -} -function createTemplatePromise(options = {}) { - if (!isVue3) { - if (true) - throw new Error("[VueUse] createTemplatePromise only works in Vue 3 or above."); - return; - } - let index = 0; - const instances = ref([]); - function create(...args) { - const props = shallowReactive({ - key: index++, - args, - promise: void 0, - resolve: () => { - }, - reject: () => { - }, - isResolving: false, - options - }); - instances.value.push(props); - props.promise = new Promise((_resolve, _reject) => { - props.resolve = (v) => { - props.isResolving = true; - return _resolve(v); - }; - props.reject = _reject; - }).finally(() => { - props.promise = void 0; - const index2 = instances.value.indexOf(props); - if (index2 !== -1) - instances.value.splice(index2, 1); - }); - return props.promise; - } - function start(...args) { - if (options.singleton && instances.value.length > 0) - return instances.value[0].promise; - return create(...args); - } - const component = defineComponent((_, { slots }) => { - const renderList = () => instances.value.map((props) => { - var _a; - return h(Fragment, { key: props.key }, (_a = slots.default) == null ? void 0 : _a.call(slots, props)); - }); - if (options.transition) - return () => h(TransitionGroup, options.transition, renderList); - return renderList; - }); - component.start = start; - return component; -} -function createUnrefFn(fn) { - return function(...args) { - return fn.apply(this, args.map((i) => toValue(i))); - }; -} -function unrefElement(elRef) { - var _a; - const plain = toValue(elRef); - return (_a = plain == null ? void 0 : plain.$el) != null ? _a : plain; -} -var defaultWindow = isClient ? window : void 0; -var defaultDocument = isClient ? window.document : void 0; -var defaultNavigator = isClient ? window.navigator : void 0; -var defaultLocation = isClient ? window.location : void 0; -function useEventListener(...args) { - let target; - let events2; - let listeners; - let options; - if (typeof args[0] === "string" || Array.isArray(args[0])) { - [events2, listeners, options] = args; - target = defaultWindow; - } else { - [target, events2, listeners, options] = args; - } - if (!target) - return noop; - if (!Array.isArray(events2)) - events2 = [events2]; - if (!Array.isArray(listeners)) - listeners = [listeners]; - const cleanups = []; - const cleanup = () => { - cleanups.forEach((fn) => fn()); - cleanups.length = 0; - }; - const register = (el, event, listener, options2) => { - el.addEventListener(event, listener, options2); - return () => el.removeEventListener(event, listener, options2); - }; - const stopWatch = watch( - () => [unrefElement(target), toValue(options)], - ([el, options2]) => { - cleanup(); - if (!el) - return; - const optionsClone = isObject(options2) ? { ...options2 } : options2; - cleanups.push( - ...events2.flatMap((event) => { - return listeners.map((listener) => register(el, event, listener, optionsClone)); - }) - ); - }, - { immediate: true, flush: "post" } - ); - const stop = () => { - stopWatch(); - cleanup(); - }; - tryOnScopeDispose(stop); - return stop; -} -var _iOSWorkaround = false; -function onClickOutside(target, handler, options = {}) { - const { window: window2 = defaultWindow, ignore = [], capture = true, detectIframe = false } = options; - if (!window2) - return noop; - if (isIOS && !_iOSWorkaround) { - _iOSWorkaround = true; - Array.from(window2.document.body.children).forEach((el) => el.addEventListener("click", noop)); - window2.document.documentElement.addEventListener("click", noop); - } - let shouldListen = true; - const shouldIgnore = (event) => { - return ignore.some((target2) => { - if (typeof target2 === "string") { - return Array.from(window2.document.querySelectorAll(target2)).some((el) => el === event.target || event.composedPath().includes(el)); - } else { - const el = unrefElement(target2); - return el && (event.target === el || event.composedPath().includes(el)); - } - }); - }; - const listener = (event) => { - const el = unrefElement(target); - if (!el || el === event.target || event.composedPath().includes(el)) - return; - if (event.detail === 0) - shouldListen = !shouldIgnore(event); - if (!shouldListen) { - shouldListen = true; - return; - } - handler(event); - }; - const cleanup = [ - useEventListener(window2, "click", listener, { passive: true, capture }), - useEventListener(window2, "pointerdown", (e) => { - const el = unrefElement(target); - shouldListen = !shouldIgnore(e) && !!(el && !e.composedPath().includes(el)); - }, { passive: true }), - detectIframe && useEventListener(window2, "blur", (event) => { - setTimeout(() => { - var _a; - const el = unrefElement(target); - if (((_a = window2.document.activeElement) == null ? void 0 : _a.tagName) === "IFRAME" && !(el == null ? void 0 : el.contains(window2.document.activeElement))) { - handler(event); - } - }, 0); - }) - ].filter(Boolean); - const stop = () => cleanup.forEach((fn) => fn()); - return stop; -} -function createKeyPredicate(keyFilter) { - if (typeof keyFilter === "function") - return keyFilter; - else if (typeof keyFilter === "string") - return (event) => event.key === keyFilter; - else if (Array.isArray(keyFilter)) - return (event) => keyFilter.includes(event.key); - return () => true; -} -function onKeyStroke(...args) { - let key; - let handler; - let options = {}; - if (args.length === 3) { - key = args[0]; - handler = args[1]; - options = args[2]; - } else if (args.length === 2) { - if (typeof args[1] === "object") { - key = true; - handler = args[0]; - options = args[1]; - } else { - key = args[0]; - handler = args[1]; - } - } else { - key = true; - handler = args[0]; - } - const { - target = defaultWindow, - eventName = "keydown", - passive = false, - dedupe = false - } = options; - const predicate = createKeyPredicate(key); - const listener = (e) => { - if (e.repeat && toValue(dedupe)) - return; - if (predicate(e)) - handler(e); - }; - return useEventListener(target, eventName, listener, passive); -} -function onKeyDown(key, handler, options = {}) { - return onKeyStroke(key, handler, { ...options, eventName: "keydown" }); -} -function onKeyPressed(key, handler, options = {}) { - return onKeyStroke(key, handler, { ...options, eventName: "keypress" }); -} -function onKeyUp(key, handler, options = {}) { - return onKeyStroke(key, handler, { ...options, eventName: "keyup" }); -} -var DEFAULT_DELAY = 500; -var DEFAULT_THRESHOLD = 10; -function onLongPress(target, handler, options) { - var _a, _b; - const elementRef = computed(() => unrefElement(target)); - let timeout; - let posStart; - let startTimestamp; - let hasLongPressed = false; - function clear() { - if (timeout) { - clearTimeout(timeout); - timeout = void 0; - } - posStart = void 0; - startTimestamp = void 0; - hasLongPressed = false; - } - function onRelease(ev) { - var _a2, _b2, _c; - const [_startTimestamp, _posStart, _hasLongPressed] = [startTimestamp, posStart, hasLongPressed]; - clear(); - if (!(options == null ? void 0 : options.onMouseUp) || !_posStart || !_startTimestamp) - return; - if (((_a2 = options == null ? void 0 : options.modifiers) == null ? void 0 : _a2.self) && ev.target !== elementRef.value) - return; - if ((_b2 = options == null ? void 0 : options.modifiers) == null ? void 0 : _b2.prevent) - ev.preventDefault(); - if ((_c = options == null ? void 0 : options.modifiers) == null ? void 0 : _c.stop) - ev.stopPropagation(); - const dx = ev.x - _posStart.x; - const dy = ev.y - _posStart.y; - const distance = Math.sqrt(dx * dx + dy * dy); - options.onMouseUp(ev.timeStamp - _startTimestamp, distance, _hasLongPressed); - } - function onDown(ev) { - var _a2, _b2, _c, _d; - if (((_a2 = options == null ? void 0 : options.modifiers) == null ? void 0 : _a2.self) && ev.target !== elementRef.value) - return; - clear(); - if ((_b2 = options == null ? void 0 : options.modifiers) == null ? void 0 : _b2.prevent) - ev.preventDefault(); - if ((_c = options == null ? void 0 : options.modifiers) == null ? void 0 : _c.stop) - ev.stopPropagation(); - posStart = { - x: ev.x, - y: ev.y - }; - startTimestamp = ev.timeStamp; - timeout = setTimeout( - () => { - hasLongPressed = true; - handler(ev); - }, - (_d = options == null ? void 0 : options.delay) != null ? _d : DEFAULT_DELAY - ); - } - function onMove(ev) { - var _a2, _b2, _c, _d; - if (((_a2 = options == null ? void 0 : options.modifiers) == null ? void 0 : _a2.self) && ev.target !== elementRef.value) - return; - if (!posStart || (options == null ? void 0 : options.distanceThreshold) === false) - return; - if ((_b2 = options == null ? void 0 : options.modifiers) == null ? void 0 : _b2.prevent) - ev.preventDefault(); - if ((_c = options == null ? void 0 : options.modifiers) == null ? void 0 : _c.stop) - ev.stopPropagation(); - const dx = ev.x - posStart.x; - const dy = ev.y - posStart.y; - const distance = Math.sqrt(dx * dx + dy * dy); - if (distance >= ((_d = options == null ? void 0 : options.distanceThreshold) != null ? _d : DEFAULT_THRESHOLD)) - clear(); - } - const listenerOptions = { - capture: (_a = options == null ? void 0 : options.modifiers) == null ? void 0 : _a.capture, - once: (_b = options == null ? void 0 : options.modifiers) == null ? void 0 : _b.once - }; - const cleanup = [ - useEventListener(elementRef, "pointerdown", onDown, listenerOptions), - useEventListener(elementRef, "pointermove", onMove, listenerOptions), - useEventListener(elementRef, ["pointerup", "pointerleave"], onRelease, listenerOptions) - ]; - const stop = () => cleanup.forEach((fn) => fn()); - return stop; -} -function isFocusedElementEditable() { - const { activeElement, body } = document; - if (!activeElement) - return false; - if (activeElement === body) - return false; - switch (activeElement.tagName) { - case "INPUT": - case "TEXTAREA": - return true; - } - return activeElement.hasAttribute("contenteditable"); -} -function isTypedCharValid({ - keyCode, - metaKey, - ctrlKey, - altKey -}) { - if (metaKey || ctrlKey || altKey) - return false; - if (keyCode >= 48 && keyCode <= 57) - return true; - if (keyCode >= 65 && keyCode <= 90) - return true; - if (keyCode >= 97 && keyCode <= 122) - return true; - return false; -} -function onStartTyping(callback, options = {}) { - const { document: document2 = defaultDocument } = options; - const keydown = (event) => { - !isFocusedElementEditable() && isTypedCharValid(event) && callback(event); - }; - if (document2) - useEventListener(document2, "keydown", keydown, { passive: true }); -} -function templateRef(key, initialValue = null) { - const instance = getCurrentInstance(); - let _trigger = () => { - }; - const element = customRef((track, trigger) => { - _trigger = trigger; - return { - get() { - var _a, _b; - track(); - return (_b = (_a = instance == null ? void 0 : instance.proxy) == null ? void 0 : _a.$refs[key]) != null ? _b : initialValue; - }, - set() { - } - }; - }); - tryOnMounted(_trigger); - onUpdated(_trigger); - return element; -} -function useMounted() { - const isMounted = ref(false); - const instance = getCurrentInstance(); - if (instance) { - onMounted(() => { - isMounted.value = true; - }, isVue2 ? void 0 : instance); - } - return isMounted; -} -function useSupported(callback) { - const isMounted = useMounted(); - return computed(() => { - isMounted.value; - return Boolean(callback()); - }); -} -function useMutationObserver(target, callback, options = {}) { - const { window: window2 = defaultWindow, ...mutationOptions } = options; - let observer; - const isSupported = useSupported(() => window2 && "MutationObserver" in window2); - const cleanup = () => { - if (observer) { - observer.disconnect(); - observer = void 0; - } - }; - const targets = computed(() => { - const value = toValue(target); - const items = (Array.isArray(value) ? value : [value]).map(unrefElement).filter(notNullish); - return new Set(items); - }); - const stopWatch = watch( - () => targets.value, - (targets2) => { - cleanup(); - if (isSupported.value && targets2.size) { - observer = new MutationObserver(callback); - targets2.forEach((el) => observer.observe(el, mutationOptions)); - } - }, - { immediate: true, flush: "post" } - ); - const takeRecords = () => { - return observer == null ? void 0 : observer.takeRecords(); - }; - const stop = () => { - cleanup(); - stopWatch(); - }; - tryOnScopeDispose(stop); - return { - isSupported, - stop, - takeRecords - }; -} -function useActiveElement(options = {}) { - var _a; - const { - window: window2 = defaultWindow, - deep = true, - triggerOnRemoval = false - } = options; - const document2 = (_a = options.document) != null ? _a : window2 == null ? void 0 : window2.document; - const getDeepActiveElement = () => { - var _a2; - let element = document2 == null ? void 0 : document2.activeElement; - if (deep) { - while (element == null ? void 0 : element.shadowRoot) - element = (_a2 = element == null ? void 0 : element.shadowRoot) == null ? void 0 : _a2.activeElement; - } - return element; - }; - const activeElement = ref(); - const trigger = () => { - activeElement.value = getDeepActiveElement(); - }; - if (window2) { - useEventListener(window2, "blur", (event) => { - if (event.relatedTarget !== null) - return; - trigger(); - }, true); - useEventListener(window2, "focus", trigger, true); - } - if (triggerOnRemoval) { - useMutationObserver(document2, (mutations) => { - mutations.filter((m) => m.removedNodes.length).map((n) => Array.from(n.removedNodes)).flat().forEach((node) => { - if (node === activeElement.value) - trigger(); - }); - }, { - childList: true, - subtree: true - }); - } - trigger(); - return activeElement; -} -function useRafFn(fn, options = {}) { - const { - immediate = true, - fpsLimit = void 0, - window: window2 = defaultWindow - } = options; - const isActive = ref(false); - const intervalLimit = fpsLimit ? 1e3 / fpsLimit : null; - let previousFrameTimestamp = 0; - let rafId = null; - function loop(timestamp2) { - if (!isActive.value || !window2) - return; - if (!previousFrameTimestamp) - previousFrameTimestamp = timestamp2; - const delta = timestamp2 - previousFrameTimestamp; - if (intervalLimit && delta < intervalLimit) { - rafId = window2.requestAnimationFrame(loop); - return; - } - previousFrameTimestamp = timestamp2; - fn({ delta, timestamp: timestamp2 }); - rafId = window2.requestAnimationFrame(loop); - } - function resume() { - if (!isActive.value && window2) { - isActive.value = true; - previousFrameTimestamp = 0; - rafId = window2.requestAnimationFrame(loop); - } - } - function pause() { - isActive.value = false; - if (rafId != null && window2) { - window2.cancelAnimationFrame(rafId); - rafId = null; - } - } - if (immediate) - resume(); - tryOnScopeDispose(pause); - return { - isActive: readonly(isActive), - pause, - resume - }; -} -function useAnimate(target, keyframes, options) { - let config; - let animateOptions; - if (isObject(options)) { - config = options; - animateOptions = objectOmit(options, ["window", "immediate", "commitStyles", "persist", "onReady", "onError"]); - } else { - config = { duration: options }; - animateOptions = options; - } - const { - window: window2 = defaultWindow, - immediate = true, - commitStyles, - persist, - playbackRate: _playbackRate = 1, - onReady, - onError = (e) => { - console.error(e); - } - } = config; - const isSupported = useSupported(() => window2 && HTMLElement && "animate" in HTMLElement.prototype); - const animate = shallowRef(void 0); - const store = shallowReactive({ - startTime: null, - currentTime: null, - timeline: null, - playbackRate: _playbackRate, - pending: false, - playState: immediate ? "idle" : "paused", - replaceState: "active" - }); - const pending = computed(() => store.pending); - const playState = computed(() => store.playState); - const replaceState = computed(() => store.replaceState); - const startTime = computed({ - get() { - return store.startTime; - }, - set(value) { - store.startTime = value; - if (animate.value) - animate.value.startTime = value; - } - }); - const currentTime = computed({ - get() { - return store.currentTime; - }, - set(value) { - store.currentTime = value; - if (animate.value) { - animate.value.currentTime = value; - syncResume(); - } - } - }); - const timeline = computed({ - get() { - return store.timeline; - }, - set(value) { - store.timeline = value; - if (animate.value) - animate.value.timeline = value; - } - }); - const playbackRate = computed({ - get() { - return store.playbackRate; - }, - set(value) { - store.playbackRate = value; - if (animate.value) - animate.value.playbackRate = value; - } - }); - const play = () => { - if (animate.value) { - try { - animate.value.play(); - syncResume(); - } catch (e) { - syncPause(); - onError(e); - } - } else { - update(); - } - }; - const pause = () => { - var _a; - try { - (_a = animate.value) == null ? void 0 : _a.pause(); - syncPause(); - } catch (e) { - onError(e); - } - }; - const reverse = () => { - var _a; - !animate.value && update(); - try { - (_a = animate.value) == null ? void 0 : _a.reverse(); - syncResume(); - } catch (e) { - syncPause(); - onError(e); - } - }; - const finish = () => { - var _a; - try { - (_a = animate.value) == null ? void 0 : _a.finish(); - syncPause(); - } catch (e) { - onError(e); - } - }; - const cancel = () => { - var _a; - try { - (_a = animate.value) == null ? void 0 : _a.cancel(); - syncPause(); - } catch (e) { - onError(e); - } - }; - watch(() => unrefElement(target), (el) => { - el && update(); - }); - watch(() => keyframes, (value) => { - !animate.value && update(); - if (!unrefElement(target) && animate.value) { - animate.value.effect = new KeyframeEffect( - unrefElement(target), - toValue(value), - animateOptions - ); - } - }, { deep: true }); - tryOnMounted(() => { - nextTick(() => update(true)); - }); - tryOnScopeDispose(cancel); - function update(init) { - const el = unrefElement(target); - if (!isSupported.value || !el) - return; - if (!animate.value) - animate.value = el.animate(toValue(keyframes), animateOptions); - if (persist) - animate.value.persist(); - if (_playbackRate !== 1) - animate.value.playbackRate = _playbackRate; - if (init && !immediate) - animate.value.pause(); - else - syncResume(); - onReady == null ? void 0 : onReady(animate.value); - } - useEventListener(animate, ["cancel", "finish", "remove"], syncPause); - useEventListener(animate, "finish", () => { - var _a; - if (commitStyles) - (_a = animate.value) == null ? void 0 : _a.commitStyles(); - }); - const { resume: resumeRef, pause: pauseRef } = useRafFn(() => { - if (!animate.value) - return; - store.pending = animate.value.pending; - store.playState = animate.value.playState; - store.replaceState = animate.value.replaceState; - store.startTime = animate.value.startTime; - store.currentTime = animate.value.currentTime; - store.timeline = animate.value.timeline; - store.playbackRate = animate.value.playbackRate; - }, { immediate: false }); - function syncResume() { - if (isSupported.value) - resumeRef(); - } - function syncPause() { - if (isSupported.value && window2) - window2.requestAnimationFrame(pauseRef); - } - return { - isSupported, - animate, - // actions - play, - pause, - reverse, - finish, - cancel, - // state - pending, - playState, - replaceState, - startTime, - currentTime, - timeline, - playbackRate - }; -} -function useAsyncQueue(tasks, options) { - const { - interrupt = true, - onError = noop, - onFinished = noop, - signal - } = options || {}; - const promiseState = { - aborted: "aborted", - fulfilled: "fulfilled", - pending: "pending", - rejected: "rejected" - }; - const initialResult = Array.from(Array.from({ length: tasks.length }), () => ({ state: promiseState.pending, data: null })); - const result = reactive(initialResult); - const activeIndex = ref(-1); - if (!tasks || tasks.length === 0) { - onFinished(); - return { - activeIndex, - result - }; - } - function updateResult(state, res) { - activeIndex.value++; - result[activeIndex.value].data = res; - result[activeIndex.value].state = state; - } - tasks.reduce((prev, curr) => { - return prev.then((prevRes) => { - var _a; - if (signal == null ? void 0 : signal.aborted) { - updateResult(promiseState.aborted, new Error("aborted")); - return; - } - if (((_a = result[activeIndex.value]) == null ? void 0 : _a.state) === promiseState.rejected && interrupt) { - onFinished(); - return; - } - const done = curr(prevRes).then((currentRes) => { - updateResult(promiseState.fulfilled, currentRes); - activeIndex.value === tasks.length - 1 && onFinished(); - return currentRes; - }); - if (!signal) - return done; - return Promise.race([done, whenAborted(signal)]); - }).catch((e) => { - if (signal == null ? void 0 : signal.aborted) { - updateResult(promiseState.aborted, e); - return e; - } - updateResult(promiseState.rejected, e); - onError(); - return e; - }); - }, Promise.resolve()); - return { - activeIndex, - result - }; -} -function whenAborted(signal) { - return new Promise((resolve, reject) => { - const error = new Error("aborted"); - if (signal.aborted) - reject(error); - else - signal.addEventListener("abort", () => reject(error), { once: true }); - }); -} -function useAsyncState(promise, initialState, options) { - const { - immediate = true, - delay = 0, - onError = noop, - onSuccess = noop, - resetOnExecute = true, - shallow = true, - throwError - } = options != null ? options : {}; - const state = shallow ? shallowRef(initialState) : ref(initialState); - const isReady = ref(false); - const isLoading = ref(false); - const error = shallowRef(void 0); - async function execute(delay2 = 0, ...args) { - if (resetOnExecute) - state.value = initialState; - error.value = void 0; - isReady.value = false; - isLoading.value = true; - if (delay2 > 0) - await promiseTimeout(delay2); - const _promise = typeof promise === "function" ? promise(...args) : promise; - try { - const data = await _promise; - state.value = data; - isReady.value = true; - onSuccess(data); - } catch (e) { - error.value = e; - onError(e); - if (throwError) - throw e; - } finally { - isLoading.value = false; - } - return state.value; - } - if (immediate) - execute(delay); - const shell = { - state, - isReady, - isLoading, - error, - execute - }; - function waitUntilIsLoaded() { - return new Promise((resolve, reject) => { - until(isLoading).toBe(false).then(() => resolve(shell)).catch(reject); - }); - } - return { - ...shell, - then(onFulfilled, onRejected) { - return waitUntilIsLoaded().then(onFulfilled, onRejected); - } - }; -} -var defaults = { - array: (v) => JSON.stringify(v), - object: (v) => JSON.stringify(v), - set: (v) => JSON.stringify(Array.from(v)), - map: (v) => JSON.stringify(Object.fromEntries(v)), - null: () => "" -}; -function getDefaultSerialization(target) { - if (!target) - return defaults.null; - if (target instanceof Map) - return defaults.map; - else if (target instanceof Set) - return defaults.set; - else if (Array.isArray(target)) - return defaults.array; - else - return defaults.object; -} -function useBase64(target, options) { - const base64 = ref(""); - const promise = ref(); - function execute() { - if (!isClient) - return; - promise.value = new Promise((resolve, reject) => { - try { - const _target = toValue(target); - if (_target == null) { - resolve(""); - } else if (typeof _target === "string") { - resolve(blobToBase64(new Blob([_target], { type: "text/plain" }))); - } else if (_target instanceof Blob) { - resolve(blobToBase64(_target)); - } else if (_target instanceof ArrayBuffer) { - resolve(window.btoa(String.fromCharCode(...new Uint8Array(_target)))); - } else if (_target instanceof HTMLCanvasElement) { - resolve(_target.toDataURL(options == null ? void 0 : options.type, options == null ? void 0 : options.quality)); - } else if (_target instanceof HTMLImageElement) { - const img = _target.cloneNode(false); - img.crossOrigin = "Anonymous"; - imgLoaded(img).then(() => { - const canvas = document.createElement("canvas"); - const ctx = canvas.getContext("2d"); - canvas.width = img.width; - canvas.height = img.height; - ctx.drawImage(img, 0, 0, canvas.width, canvas.height); - resolve(canvas.toDataURL(options == null ? void 0 : options.type, options == null ? void 0 : options.quality)); - }).catch(reject); - } else if (typeof _target === "object") { - const _serializeFn = (options == null ? void 0 : options.serializer) || getDefaultSerialization(_target); - const serialized = _serializeFn(_target); - return resolve(blobToBase64(new Blob([serialized], { type: "application/json" }))); - } else { - reject(new Error("target is unsupported types")); - } - } catch (error) { - reject(error); - } - }); - promise.value.then((res) => base64.value = res); - return promise.value; - } - if (isRef(target) || typeof target === "function") - watch(target, execute, { immediate: true }); - else - execute(); - return { - base64, - promise, - execute - }; -} -function imgLoaded(img) { - return new Promise((resolve, reject) => { - if (!img.complete) { - img.onload = () => { - resolve(); - }; - img.onerror = reject; - } else { - resolve(); - } - }); -} -function blobToBase64(blob) { - return new Promise((resolve, reject) => { - const fr = new FileReader(); - fr.onload = (e) => { - resolve(e.target.result); - }; - fr.onerror = reject; - fr.readAsDataURL(blob); - }); -} -function useBattery(options = {}) { - const { navigator = defaultNavigator } = options; - const events2 = ["chargingchange", "chargingtimechange", "dischargingtimechange", "levelchange"]; - const isSupported = useSupported(() => navigator && "getBattery" in navigator && typeof navigator.getBattery === "function"); - const charging = ref(false); - const chargingTime = ref(0); - const dischargingTime = ref(0); - const level = ref(1); - let battery; - function updateBatteryInfo() { - charging.value = this.charging; - chargingTime.value = this.chargingTime || 0; - dischargingTime.value = this.dischargingTime || 0; - level.value = this.level; - } - if (isSupported.value) { - navigator.getBattery().then((_battery) => { - battery = _battery; - updateBatteryInfo.call(battery); - useEventListener(battery, events2, updateBatteryInfo, { passive: true }); - }); - } - return { - isSupported, - charging, - chargingTime, - dischargingTime, - level - }; -} -function useBluetooth(options) { - let { - acceptAllDevices = false - } = options || {}; - const { - filters = void 0, - optionalServices = void 0, - navigator = defaultNavigator - } = options || {}; - const isSupported = useSupported(() => navigator && "bluetooth" in navigator); - const device = shallowRef(void 0); - const error = shallowRef(null); - watch(device, () => { - connectToBluetoothGATTServer(); - }); - async function requestDevice() { - if (!isSupported.value) - return; - error.value = null; - if (filters && filters.length > 0) - acceptAllDevices = false; - try { - device.value = await (navigator == null ? void 0 : navigator.bluetooth.requestDevice({ - acceptAllDevices, - filters, - optionalServices - })); - } catch (err) { - error.value = err; - } - } - const server = ref(); - const isConnected = computed(() => { - var _a; - return ((_a = server.value) == null ? void 0 : _a.connected) || false; - }); - async function connectToBluetoothGATTServer() { - error.value = null; - if (device.value && device.value.gatt) { - device.value.addEventListener("gattserverdisconnected", () => { - }); - try { - server.value = await device.value.gatt.connect(); - } catch (err) { - error.value = err; - } - } - } - tryOnMounted(() => { - var _a; - if (device.value) - (_a = device.value.gatt) == null ? void 0 : _a.connect(); - }); - tryOnScopeDispose(() => { - var _a; - if (device.value) - (_a = device.value.gatt) == null ? void 0 : _a.disconnect(); - }); - return { - isSupported, - isConnected, - // Device: - device, - requestDevice, - // Server: - server, - // Errors: - error - }; -} -function useMediaQuery(query, options = {}) { - const { window: window2 = defaultWindow } = options; - const isSupported = useSupported(() => window2 && "matchMedia" in window2 && typeof window2.matchMedia === "function"); - let mediaQuery; - const matches = ref(false); - const handler = (event) => { - matches.value = event.matches; - }; - const cleanup = () => { - if (!mediaQuery) - return; - if ("removeEventListener" in mediaQuery) - mediaQuery.removeEventListener("change", handler); - else - mediaQuery.removeListener(handler); - }; - const stopWatch = watchEffect(() => { - if (!isSupported.value) - return; - cleanup(); - mediaQuery = window2.matchMedia(toValue(query)); - if ("addEventListener" in mediaQuery) - mediaQuery.addEventListener("change", handler); - else - mediaQuery.addListener(handler); - matches.value = mediaQuery.matches; - }); - tryOnScopeDispose(() => { - stopWatch(); - cleanup(); - mediaQuery = void 0; - }); - return matches; -} -var breakpointsTailwind = { - "sm": 640, - "md": 768, - "lg": 1024, - "xl": 1280, - "2xl": 1536 -}; -var breakpointsBootstrapV5 = { - xs: 0, - sm: 576, - md: 768, - lg: 992, - xl: 1200, - xxl: 1400 -}; -var breakpointsVuetifyV2 = { - xs: 0, - sm: 600, - md: 960, - lg: 1264, - xl: 1904 -}; -var breakpointsVuetifyV3 = { - xs: 0, - sm: 600, - md: 960, - lg: 1280, - xl: 1920, - xxl: 2560 -}; -var breakpointsVuetify = breakpointsVuetifyV2; -var breakpointsAntDesign = { - xs: 480, - sm: 576, - md: 768, - lg: 992, - xl: 1200, - xxl: 1600 -}; -var breakpointsQuasar = { - xs: 0, - sm: 600, - md: 1024, - lg: 1440, - xl: 1920 -}; -var breakpointsSematic = { - mobileS: 320, - mobileM: 375, - mobileL: 425, - tablet: 768, - laptop: 1024, - laptopL: 1440, - desktop4K: 2560 -}; -var breakpointsMasterCss = { - "3xs": 360, - "2xs": 480, - "xs": 600, - "sm": 768, - "md": 1024, - "lg": 1280, - "xl": 1440, - "2xl": 1600, - "3xl": 1920, - "4xl": 2560 -}; -var breakpointsPrimeFlex = { - sm: 576, - md: 768, - lg: 992, - xl: 1200 -}; -function useBreakpoints(breakpoints, options = {}) { - function getValue2(k, delta) { - let v = toValue(breakpoints[toValue(k)]); - if (delta != null) - v = increaseWithUnit(v, delta); - if (typeof v === "number") - v = `${v}px`; - return v; - } - const { window: window2 = defaultWindow, strategy = "min-width" } = options; - function match(query) { - if (!window2) - return false; - return window2.matchMedia(query).matches; - } - const greaterOrEqual = (k) => { - return useMediaQuery(() => `(min-width: ${getValue2(k)})`, options); - }; - const smallerOrEqual = (k) => { - return useMediaQuery(() => `(max-width: ${getValue2(k)})`, options); - }; - const shortcutMethods = Object.keys(breakpoints).reduce((shortcuts, k) => { - Object.defineProperty(shortcuts, k, { - get: () => strategy === "min-width" ? greaterOrEqual(k) : smallerOrEqual(k), - enumerable: true, - configurable: true - }); - return shortcuts; - }, {}); - function current() { - const points = Object.keys(breakpoints).map((i) => [i, greaterOrEqual(i)]); - return computed(() => points.filter(([, v]) => v.value).map(([k]) => k)); - } - return Object.assign(shortcutMethods, { - greaterOrEqual, - smallerOrEqual, - greater(k) { - return useMediaQuery(() => `(min-width: ${getValue2(k, 0.1)})`, options); - }, - smaller(k) { - return useMediaQuery(() => `(max-width: ${getValue2(k, -0.1)})`, options); - }, - between(a, b) { - return useMediaQuery(() => `(min-width: ${getValue2(a)}) and (max-width: ${getValue2(b, -0.1)})`, options); - }, - isGreater(k) { - return match(`(min-width: ${getValue2(k, 0.1)})`); - }, - isGreaterOrEqual(k) { - return match(`(min-width: ${getValue2(k)})`); - }, - isSmaller(k) { - return match(`(max-width: ${getValue2(k, -0.1)})`); - }, - isSmallerOrEqual(k) { - return match(`(max-width: ${getValue2(k)})`); - }, - isInBetween(a, b) { - return match(`(min-width: ${getValue2(a)}) and (max-width: ${getValue2(b, -0.1)})`); - }, - current, - active() { - const bps = current(); - return computed(() => bps.value.length === 0 ? "" : bps.value.at(-1)); - } - }); -} -function useBroadcastChannel(options) { - const { - name, - window: window2 = defaultWindow - } = options; - const isSupported = useSupported(() => window2 && "BroadcastChannel" in window2); - const isClosed = ref(false); - const channel = ref(); - const data = ref(); - const error = shallowRef(null); - const post = (data2) => { - if (channel.value) - channel.value.postMessage(data2); - }; - const close = () => { - if (channel.value) - channel.value.close(); - isClosed.value = true; - }; - if (isSupported.value) { - tryOnMounted(() => { - error.value = null; - channel.value = new BroadcastChannel(name); - channel.value.addEventListener("message", (e) => { - data.value = e.data; - }, { passive: true }); - channel.value.addEventListener("messageerror", (e) => { - error.value = e; - }, { passive: true }); - channel.value.addEventListener("close", () => { - isClosed.value = true; - }); - }); - } - tryOnScopeDispose(() => { - close(); - }); - return { - isSupported, - channel, - data, - post, - close, - error, - isClosed - }; -} -var WRITABLE_PROPERTIES = [ - "hash", - "host", - "hostname", - "href", - "pathname", - "port", - "protocol", - "search" -]; -function useBrowserLocation(options = {}) { - const { window: window2 = defaultWindow } = options; - const refs = Object.fromEntries( - WRITABLE_PROPERTIES.map((key) => [key, ref()]) - ); - for (const [key, ref2] of objectEntries(refs)) { - watch(ref2, (value) => { - if (!(window2 == null ? void 0 : window2.location) || window2.location[key] === value) - return; - window2.location[key] = value; - }); - } - const buildState = (trigger) => { - var _a; - const { state: state2, length } = (window2 == null ? void 0 : window2.history) || {}; - const { origin } = (window2 == null ? void 0 : window2.location) || {}; - for (const key of WRITABLE_PROPERTIES) - refs[key].value = (_a = window2 == null ? void 0 : window2.location) == null ? void 0 : _a[key]; - return reactive({ - trigger, - state: state2, - length, - origin, - ...refs - }); - }; - const state = ref(buildState("load")); - if (window2) { - useEventListener(window2, "popstate", () => state.value = buildState("popstate"), { passive: true }); - useEventListener(window2, "hashchange", () => state.value = buildState("hashchange"), { passive: true }); - } - return state; -} -function useCached(refValue, comparator = (a, b) => a === b, watchOptions) { - const cachedValue = ref(refValue.value); - watch(() => refValue.value, (value) => { - if (!comparator(value, cachedValue.value)) - cachedValue.value = value; - }, watchOptions); - return cachedValue; -} -function usePermission(permissionDesc, options = {}) { - const { - controls = false, - navigator = defaultNavigator - } = options; - const isSupported = useSupported(() => navigator && "permissions" in navigator); - let permissionStatus; - const desc = typeof permissionDesc === "string" ? { name: permissionDesc } : permissionDesc; - const state = ref(); - const onChange = () => { - if (permissionStatus) - state.value = permissionStatus.state; - }; - const query = createSingletonPromise(async () => { - if (!isSupported.value) - return; - if (!permissionStatus) { - try { - permissionStatus = await navigator.permissions.query(desc); - useEventListener(permissionStatus, "change", onChange); - onChange(); - } catch (e) { - state.value = "prompt"; - } - } - return permissionStatus; - }); - query(); - if (controls) { - return { - state, - isSupported, - query - }; - } else { - return state; - } -} -function useClipboard(options = {}) { - const { - navigator = defaultNavigator, - read = false, - source, - copiedDuring = 1500, - legacy = false - } = options; - const isClipboardApiSupported = useSupported(() => navigator && "clipboard" in navigator); - const permissionRead = usePermission("clipboard-read"); - const permissionWrite = usePermission("clipboard-write"); - const isSupported = computed(() => isClipboardApiSupported.value || legacy); - const text = ref(""); - const copied = ref(false); - const timeout = useTimeoutFn(() => copied.value = false, copiedDuring); - function updateText() { - if (isClipboardApiSupported.value && isAllowed(permissionRead.value)) { - navigator.clipboard.readText().then((value) => { - text.value = value; - }); - } else { - text.value = legacyRead(); - } - } - if (isSupported.value && read) - useEventListener(["copy", "cut"], updateText); - async function copy(value = toValue(source)) { - if (isSupported.value && value != null) { - if (isClipboardApiSupported.value && isAllowed(permissionWrite.value)) - await navigator.clipboard.writeText(value); - else - legacyCopy(value); - text.value = value; - copied.value = true; - timeout.start(); - } - } - function legacyCopy(value) { - const ta = document.createElement("textarea"); - ta.value = value != null ? value : ""; - ta.style.position = "absolute"; - ta.style.opacity = "0"; - document.body.appendChild(ta); - ta.select(); - document.execCommand("copy"); - ta.remove(); - } - function legacyRead() { - var _a, _b, _c; - return (_c = (_b = (_a = document == null ? void 0 : document.getSelection) == null ? void 0 : _a.call(document)) == null ? void 0 : _b.toString()) != null ? _c : ""; - } - function isAllowed(status) { - return status === "granted" || status === "prompt"; - } - return { - isSupported, - text, - copied, - copy - }; -} -function useClipboardItems(options = {}) { - const { - navigator = defaultNavigator, - read = false, - source, - copiedDuring = 1500 - } = options; - const isSupported = useSupported(() => navigator && "clipboard" in navigator); - const content = ref([]); - const copied = ref(false); - const timeout = useTimeoutFn(() => copied.value = false, copiedDuring); - function updateContent() { - if (isSupported.value) { - navigator.clipboard.read().then((items) => { - content.value = items; - }); - } - } - if (isSupported.value && read) - useEventListener(["copy", "cut"], updateContent); - async function copy(value = toValue(source)) { - if (isSupported.value && value != null) { - await navigator.clipboard.write(value); - content.value = value; - copied.value = true; - timeout.start(); - } - } - return { - isSupported, - content, - copied, - copy - }; -} -function cloneFnJSON(source) { - return JSON.parse(JSON.stringify(source)); -} -function useCloned(source, options = {}) { - const cloned = ref({}); - const { - manual, - clone = cloneFnJSON, - // watch options - deep = true, - immediate = true - } = options; - function sync() { - cloned.value = clone(toValue(source)); - } - if (!manual && (isRef(source) || typeof source === "function")) { - watch(source, sync, { - ...options, - deep, - immediate - }); - } else { - sync(); - } - return { cloned, sync }; -} -var _global = typeof globalThis !== "undefined" ? globalThis : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : {}; -var globalKey = "__vueuse_ssr_handlers__"; -var handlers = getHandlers(); -function getHandlers() { - if (!(globalKey in _global)) - _global[globalKey] = _global[globalKey] || {}; - return _global[globalKey]; -} -function getSSRHandler(key, fallback) { - return handlers[key] || fallback; -} -function setSSRHandler(key, fn) { - handlers[key] = fn; -} -function guessSerializerType(rawInit) { - return 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"; -} -var StorageSerializers = { - boolean: { - read: (v) => v === "true", - write: (v) => String(v) - }, - object: { - read: (v) => JSON.parse(v), - write: (v) => JSON.stringify(v) - }, - number: { - read: (v) => Number.parseFloat(v), - write: (v) => String(v) - }, - any: { - read: (v) => v, - write: (v) => String(v) - }, - string: { - read: (v) => v, - write: (v) => String(v) - }, - map: { - read: (v) => new Map(JSON.parse(v)), - write: (v) => JSON.stringify(Array.from(v.entries())) - }, - set: { - read: (v) => new Set(JSON.parse(v)), - write: (v) => JSON.stringify(Array.from(v)) - }, - date: { - read: (v) => new Date(v), - write: (v) => v.toISOString() - } -}; -var customStorageEventName = "vueuse-storage"; -function useStorage(key, defaults2, storage, options = {}) { - var _a; - const { - flush = "pre", - deep = true, - listenToStorageChanges = true, - writeDefaults = true, - mergeDefaults = false, - shallow, - window: window2 = defaultWindow, - eventFilter, - onError = (e) => { - console.error(e); - }, - initOnMounted - } = options; - const data = (shallow ? shallowRef : ref)(typeof defaults2 === "function" ? defaults2() : defaults2); - if (!storage) { - try { - storage = getSSRHandler("getDefaultStorage", () => { - var _a2; - return (_a2 = defaultWindow) == null ? void 0 : _a2.localStorage; - })(); - } catch (e) { - onError(e); - } - } - if (!storage) - return data; - const rawInit = toValue(defaults2); - const type = guessSerializerType(rawInit); - const serializer = (_a = options.serializer) != null ? _a : StorageSerializers[type]; - const { pause: pauseWatch, resume: resumeWatch } = watchPausable( - data, - () => write(data.value), - { flush, deep, eventFilter } - ); - if (window2 && listenToStorageChanges) { - tryOnMounted(() => { - useEventListener(window2, "storage", update); - useEventListener(window2, customStorageEventName, updateFromCustomEvent); - if (initOnMounted) - update(); - }); - } - if (!initOnMounted) - update(); - function dispatchWriteEvent(oldValue, newValue) { - if (window2) { - window2.dispatchEvent(new CustomEvent(customStorageEventName, { - detail: { - key, - oldValue, - newValue, - storageArea: storage - } - })); - } - } - function write(v) { - try { - const oldValue = storage.getItem(key); - if (v == null) { - dispatchWriteEvent(oldValue, null); - storage.removeItem(key); - } else { - const serialized = serializer.write(v); - if (oldValue !== serialized) { - storage.setItem(key, serialized); - dispatchWriteEvent(oldValue, serialized); - } - } - } catch (e) { - onError(e); - } - } - function read(event) { - const rawValue = event ? event.newValue : storage.getItem(key); - if (rawValue == null) { - if (writeDefaults && rawInit != null) - storage.setItem(key, serializer.write(rawInit)); - return rawInit; - } else if (!event && mergeDefaults) { - const value = serializer.read(rawValue); - if (typeof mergeDefaults === "function") - return mergeDefaults(value, rawInit); - else if (type === "object" && !Array.isArray(value)) - return { ...rawInit, ...value }; - return value; - } else if (typeof rawValue !== "string") { - return rawValue; - } else { - return serializer.read(rawValue); - } - } - function update(event) { - if (event && event.storageArea !== storage) - return; - if (event && event.key == null) { - data.value = rawInit; - return; - } - if (event && event.key !== key) - return; - pauseWatch(); - try { - if ((event == null ? void 0 : event.newValue) !== serializer.write(data.value)) - data.value = read(event); - } catch (e) { - onError(e); - } finally { - if (event) - nextTick(resumeWatch); - else - resumeWatch(); - } - } - function updateFromCustomEvent(event) { - update(event.detail); - } - return data; -} -function usePreferredDark(options) { - return useMediaQuery("(prefers-color-scheme: dark)", options); -} -function useColorMode(options = {}) { - const { - selector = "html", - attribute = "class", - initialValue = "auto", - window: window2 = defaultWindow, - storage, - storageKey = "vueuse-color-scheme", - listenToStorageChanges = true, - storageRef, - emitAuto, - disableTransition = true - } = options; - const modes = { - auto: "", - light: "light", - dark: "dark", - ...options.modes || {} - }; - const preferredDark = usePreferredDark({ window: window2 }); - const system = computed(() => preferredDark.value ? "dark" : "light"); - const store = storageRef || (storageKey == null ? toRef2(initialValue) : useStorage(storageKey, initialValue, storage, { window: window2, listenToStorageChanges })); - const state = computed(() => store.value === "auto" ? system.value : store.value); - const updateHTMLAttrs = getSSRHandler( - "updateHTMLAttrs", - (selector2, attribute2, value) => { - const el = typeof selector2 === "string" ? window2 == null ? void 0 : window2.document.querySelector(selector2) : unrefElement(selector2); - if (!el) - return; - let style; - if (disableTransition) { - style = window2.document.createElement("style"); - const styleString = "*,*::before,*::after{-webkit-transition:none!important;-moz-transition:none!important;-o-transition:none!important;-ms-transition:none!important;transition:none!important}"; - style.appendChild(document.createTextNode(styleString)); - window2.document.head.appendChild(style); - } - if (attribute2 === "class") { - const current = value.split(/\s/g); - Object.values(modes).flatMap((i) => (i || "").split(/\s/g)).filter(Boolean).forEach((v) => { - if (current.includes(v)) - el.classList.add(v); - else - el.classList.remove(v); - }); - } else { - el.setAttribute(attribute2, value); - } - if (disableTransition) { - window2.getComputedStyle(style).opacity; - document.head.removeChild(style); - } - } - ); - function defaultOnChanged(mode) { - var _a; - updateHTMLAttrs(selector, attribute, (_a = modes[mode]) != null ? _a : mode); - } - function onChanged(mode) { - if (options.onChanged) - options.onChanged(mode, defaultOnChanged); - else - defaultOnChanged(mode); - } - watch(state, onChanged, { flush: "post", immediate: true }); - tryOnMounted(() => onChanged(state.value)); - const auto = computed({ - get() { - return emitAuto ? store.value : state.value; - }, - set(v) { - store.value = v; - } - }); - try { - return Object.assign(auto, { store, system, state }); - } catch (e) { - return auto; - } -} -function useConfirmDialog(revealed = ref(false)) { - const confirmHook = createEventHook(); - const cancelHook = createEventHook(); - const revealHook = createEventHook(); - let _resolve = noop; - const reveal = (data) => { - revealHook.trigger(data); - revealed.value = true; - return new Promise((resolve) => { - _resolve = resolve; - }); - }; - const confirm = (data) => { - revealed.value = false; - confirmHook.trigger(data); - _resolve({ data, isCanceled: false }); - }; - const cancel = (data) => { - revealed.value = false; - cancelHook.trigger(data); - _resolve({ data, isCanceled: true }); - }; - return { - isRevealed: computed(() => revealed.value), - reveal, - confirm, - cancel, - onReveal: revealHook.on, - onConfirm: confirmHook.on, - onCancel: cancelHook.on - }; -} -function useCssVar(prop, target, options = {}) { - const { window: window2 = defaultWindow, initialValue = "", observe = false } = options; - const variable = ref(initialValue); - const elRef = computed(() => { - var _a; - return unrefElement(target) || ((_a = window2 == null ? void 0 : window2.document) == null ? void 0 : _a.documentElement); - }); - function updateCssVar() { - var _a; - const key = toValue(prop); - const el = toValue(elRef); - if (el && window2) { - const value = (_a = window2.getComputedStyle(el).getPropertyValue(key)) == null ? void 0 : _a.trim(); - variable.value = value || initialValue; - } - } - if (observe) { - useMutationObserver(elRef, updateCssVar, { - attributeFilter: ["style", "class"], - window: window2 - }); - } - watch( - [elRef, () => toValue(prop)], - updateCssVar, - { immediate: true } - ); - watch( - variable, - (val) => { - var _a; - if ((_a = elRef.value) == null ? void 0 : _a.style) - elRef.value.style.setProperty(toValue(prop), val); - } - ); - return variable; -} -function useCurrentElement(rootComponent) { - const vm = getCurrentInstance(); - const currentElement = computedWithControl( - () => null, - () => rootComponent ? unrefElement(rootComponent) : vm.proxy.$el - ); - onUpdated(currentElement.trigger); - onMounted(currentElement.trigger); - return currentElement; -} -function useCycleList(list, options) { - const state = shallowRef(getInitialValue()); - const listRef = toRef2(list); - const index = computed({ - get() { - var _a; - const targetList = listRef.value; - let index2 = (options == null ? void 0 : options.getIndexOf) ? options.getIndexOf(state.value, targetList) : targetList.indexOf(state.value); - if (index2 < 0) - index2 = (_a = options == null ? void 0 : options.fallbackIndex) != null ? _a : 0; - return index2; - }, - set(v) { - set3(v); - } - }); - function set3(i) { - const targetList = listRef.value; - const length = targetList.length; - const index2 = (i % length + length) % length; - const value = targetList[index2]; - state.value = value; - return value; - } - function shift(delta = 1) { - return set3(index.value + delta); - } - function next(n = 1) { - return shift(n); - } - function prev(n = 1) { - return shift(-n); - } - function getInitialValue() { - var _a, _b; - return (_b = toValue((_a = options == null ? void 0 : options.initialValue) != null ? _a : toValue(list)[0])) != null ? _b : void 0; - } - watch(listRef, () => set3(index.value)); - return { - state, - index, - next, - prev, - go: set3 - }; -} -function useDark(options = {}) { - const { - valueDark = "dark", - valueLight = "", - window: window2 = defaultWindow - } = options; - const mode = useColorMode({ - ...options, - onChanged: (mode2, defaultHandler) => { - var _a; - if (options.onChanged) - (_a = options.onChanged) == null ? void 0 : _a.call(options, mode2 === "dark", defaultHandler, mode2); - else - defaultHandler(mode2); - }, - modes: { - dark: valueDark, - light: valueLight - } - }); - const system = computed(() => { - if (mode.system) { - return mode.system.value; - } else { - const preferredDark = usePreferredDark({ window: window2 }); - return preferredDark.value ? "dark" : "light"; - } - }); - const isDark = computed({ - get() { - return mode.value === "dark"; - }, - set(v) { - const modeVal = v ? "dark" : "light"; - if (system.value === modeVal) - mode.value = "auto"; - else - mode.value = modeVal; - } - }); - return isDark; -} -function fnBypass(v) { - return v; -} -function fnSetSource(source, value) { - return source.value = value; -} -function defaultDump(clone) { - return clone ? typeof clone === "function" ? clone : cloneFnJSON : fnBypass; -} -function defaultParse(clone) { - return clone ? typeof clone === "function" ? clone : cloneFnJSON : fnBypass; -} -function useManualRefHistory(source, options = {}) { - const { - clone = false, - dump = defaultDump(clone), - parse = defaultParse(clone), - setSource = fnSetSource - } = options; - function _createHistoryRecord() { - return markRaw({ - snapshot: dump(source.value), - timestamp: timestamp() - }); - } - const last = ref(_createHistoryRecord()); - const undoStack = ref([]); - const redoStack = ref([]); - const _setSource = (record) => { - setSource(source, parse(record.snapshot)); - last.value = record; - }; - const commit = () => { - undoStack.value.unshift(last.value); - last.value = _createHistoryRecord(); - if (options.capacity && undoStack.value.length > options.capacity) - undoStack.value.splice(options.capacity, Number.POSITIVE_INFINITY); - if (redoStack.value.length) - redoStack.value.splice(0, redoStack.value.length); - }; - const clear = () => { - undoStack.value.splice(0, undoStack.value.length); - redoStack.value.splice(0, redoStack.value.length); - }; - const undo = () => { - const state = undoStack.value.shift(); - if (state) { - redoStack.value.unshift(last.value); - _setSource(state); - } - }; - const redo = () => { - const state = redoStack.value.shift(); - if (state) { - undoStack.value.unshift(last.value); - _setSource(state); - } - }; - const reset = () => { - _setSource(last.value); - }; - const history = computed(() => [last.value, ...undoStack.value]); - const canUndo = computed(() => undoStack.value.length > 0); - const canRedo = computed(() => redoStack.value.length > 0); - return { - source, - undoStack, - redoStack, - last, - history, - canUndo, - canRedo, - clear, - commit, - reset, - undo, - redo - }; -} -function useRefHistory(source, options = {}) { - const { - deep = false, - flush = "pre", - eventFilter - } = options; - const { - eventFilter: composedFilter, - pause, - resume: resumeTracking, - isActive: isTracking - } = pausableFilter(eventFilter); - const { - ignoreUpdates, - ignorePrevAsyncUpdates, - stop - } = watchIgnorable( - source, - commit, - { deep, flush, eventFilter: composedFilter } - ); - function setSource(source2, value) { - ignorePrevAsyncUpdates(); - ignoreUpdates(() => { - source2.value = value; - }); - } - const manualHistory = useManualRefHistory(source, { ...options, clone: options.clone || deep, setSource }); - const { clear, commit: manualCommit } = manualHistory; - function commit() { - ignorePrevAsyncUpdates(); - manualCommit(); - } - function resume(commitNow) { - resumeTracking(); - if (commitNow) - commit(); - } - function batch(fn) { - let canceled = false; - const cancel = () => canceled = true; - ignoreUpdates(() => { - fn(cancel); - }); - if (!canceled) - commit(); - } - function dispose() { - stop(); - clear(); - } - return { - ...manualHistory, - isTracking, - pause, - resume, - commit, - batch, - dispose - }; -} -function useDebouncedRefHistory(source, options = {}) { - const filter = options.debounce ? debounceFilter(options.debounce) : void 0; - const history = useRefHistory(source, { ...options, eventFilter: filter }); - return { - ...history - }; -} -function useDeviceMotion(options = {}) { - const { - window: window2 = defaultWindow, - eventFilter = bypassFilter - } = options; - const acceleration = ref({ x: null, y: null, z: null }); - const rotationRate = ref({ alpha: null, beta: null, gamma: null }); - const interval = ref(0); - const accelerationIncludingGravity = ref({ - x: null, - y: null, - z: null - }); - if (window2) { - const onDeviceMotion = createFilterWrapper( - eventFilter, - (event) => { - acceleration.value = event.acceleration; - accelerationIncludingGravity.value = event.accelerationIncludingGravity; - rotationRate.value = event.rotationRate; - interval.value = event.interval; - } - ); - useEventListener(window2, "devicemotion", onDeviceMotion); - } - return { - acceleration, - accelerationIncludingGravity, - rotationRate, - interval - }; -} -function useDeviceOrientation(options = {}) { - const { window: window2 = defaultWindow } = options; - const isSupported = useSupported(() => window2 && "DeviceOrientationEvent" in window2); - const isAbsolute = ref(false); - const alpha = ref(null); - const beta = ref(null); - const gamma = ref(null); - if (window2 && isSupported.value) { - useEventListener(window2, "deviceorientation", (event) => { - isAbsolute.value = event.absolute; - alpha.value = event.alpha; - beta.value = event.beta; - gamma.value = event.gamma; - }); - } - return { - isSupported, - isAbsolute, - alpha, - beta, - gamma - }; -} -function useDevicePixelRatio(options = {}) { - const { - window: window2 = defaultWindow - } = options; - const pixelRatio = ref(1); - if (window2) { - let observe2 = function() { - pixelRatio.value = window2.devicePixelRatio; - cleanup2(); - media = window2.matchMedia(`(resolution: ${pixelRatio.value}dppx)`); - media.addEventListener("change", observe2, { once: true }); - }, cleanup2 = function() { - media == null ? void 0 : media.removeEventListener("change", observe2); - }; - let media; - observe2(); - tryOnScopeDispose(cleanup2); - } - return { pixelRatio }; -} -function useDevicesList(options = {}) { - const { - navigator = defaultNavigator, - requestPermissions = false, - constraints = { audio: true, video: true }, - onUpdated: onUpdated2 - } = options; - const devices = ref([]); - const videoInputs = computed(() => devices.value.filter((i) => i.kind === "videoinput")); - const audioInputs = computed(() => devices.value.filter((i) => i.kind === "audioinput")); - const audioOutputs = computed(() => devices.value.filter((i) => i.kind === "audiooutput")); - const isSupported = useSupported(() => navigator && navigator.mediaDevices && navigator.mediaDevices.enumerateDevices); - const permissionGranted = ref(false); - let stream; - async function update() { - if (!isSupported.value) - return; - devices.value = await navigator.mediaDevices.enumerateDevices(); - onUpdated2 == null ? void 0 : onUpdated2(devices.value); - if (stream) { - stream.getTracks().forEach((t) => t.stop()); - stream = null; - } - } - async function ensurePermissions() { - if (!isSupported.value) - return false; - if (permissionGranted.value) - return true; - const { state, query } = usePermission("camera", { controls: true }); - await query(); - if (state.value !== "granted") { - stream = await navigator.mediaDevices.getUserMedia(constraints); - update(); - permissionGranted.value = true; - } else { - permissionGranted.value = true; - } - return permissionGranted.value; - } - if (isSupported.value) { - if (requestPermissions) - ensurePermissions(); - useEventListener(navigator.mediaDevices, "devicechange", update); - update(); - } - return { - devices, - ensurePermissions, - permissionGranted, - videoInputs, - audioInputs, - audioOutputs, - isSupported - }; -} -function useDisplayMedia(options = {}) { - var _a; - const enabled = ref((_a = options.enabled) != null ? _a : false); - const video = options.video; - const audio = options.audio; - const { navigator = defaultNavigator } = options; - const isSupported = useSupported(() => { - var _a2; - return (_a2 = navigator == null ? void 0 : navigator.mediaDevices) == null ? void 0 : _a2.getDisplayMedia; - }); - const constraint = { audio, video }; - const stream = shallowRef(); - async function _start() { - var _a2; - if (!isSupported.value || stream.value) - return; - stream.value = await navigator.mediaDevices.getDisplayMedia(constraint); - (_a2 = stream.value) == null ? void 0 : _a2.getTracks().forEach((t) => t.addEventListener("ended", stop)); - return stream.value; - } - async function _stop() { - var _a2; - (_a2 = stream.value) == null ? void 0 : _a2.getTracks().forEach((t) => t.stop()); - stream.value = void 0; - } - function stop() { - _stop(); - enabled.value = false; - } - async function start() { - await _start(); - if (stream.value) - enabled.value = true; - return stream.value; - } - watch( - enabled, - (v) => { - if (v) - _start(); - else - _stop(); - }, - { immediate: true } - ); - return { - isSupported, - stream, - start, - stop, - enabled - }; -} -function useDocumentVisibility(options = {}) { - const { document: document2 = defaultDocument } = options; - if (!document2) - return ref("visible"); - const visibility = ref(document2.visibilityState); - useEventListener(document2, "visibilitychange", () => { - visibility.value = document2.visibilityState; - }); - return visibility; -} -function useDraggable(target, options = {}) { - var _a, _b; - const { - pointerTypes, - preventDefault: preventDefault2, - stopPropagation, - exact, - onMove, - onEnd, - onStart, - initialValue, - axis = "both", - draggingElement = defaultWindow, - containerElement, - handle: draggingHandle = target - } = options; - const position = ref( - (_a = toValue(initialValue)) != null ? _a : { x: 0, y: 0 } - ); - const pressedDelta = ref(); - const filterEvent = (e) => { - if (pointerTypes) - return pointerTypes.includes(e.pointerType); - return true; - }; - const handleEvent = (e) => { - if (toValue(preventDefault2)) - e.preventDefault(); - if (toValue(stopPropagation)) - e.stopPropagation(); - }; - const start = (e) => { - var _a2; - if (e.button !== 0) - return; - if (toValue(options.disabled) || !filterEvent(e)) - return; - if (toValue(exact) && e.target !== toValue(target)) - return; - const container = toValue(containerElement); - const containerRect = (_a2 = container == null ? void 0 : container.getBoundingClientRect) == null ? void 0 : _a2.call(container); - const targetRect = toValue(target).getBoundingClientRect(); - const pos = { - x: e.clientX - (container ? targetRect.left - containerRect.left + container.scrollLeft : targetRect.left), - y: e.clientY - (container ? targetRect.top - containerRect.top + container.scrollTop : targetRect.top) - }; - if ((onStart == null ? void 0 : onStart(pos, e)) === false) - return; - pressedDelta.value = pos; - handleEvent(e); - }; - const move = (e) => { - if (toValue(options.disabled) || !filterEvent(e)) - return; - if (!pressedDelta.value) - return; - const container = toValue(containerElement); - const targetRect = toValue(target).getBoundingClientRect(); - let { x, y } = position.value; - if (axis === "x" || axis === "both") { - x = e.clientX - pressedDelta.value.x; - if (container) - x = Math.min(Math.max(0, x), container.scrollWidth - targetRect.width); - } - if (axis === "y" || axis === "both") { - y = e.clientY - pressedDelta.value.y; - if (container) - y = Math.min(Math.max(0, y), container.scrollHeight - targetRect.height); - } - position.value = { - x, - y - }; - onMove == null ? void 0 : onMove(position.value, e); - handleEvent(e); - }; - const end = (e) => { - if (toValue(options.disabled) || !filterEvent(e)) - return; - if (!pressedDelta.value) - return; - pressedDelta.value = void 0; - onEnd == null ? void 0 : onEnd(position.value, e); - handleEvent(e); - }; - if (isClient) { - const config = { capture: (_b = options.capture) != null ? _b : true }; - useEventListener(draggingHandle, "pointerdown", start, config); - useEventListener(draggingElement, "pointermove", move, config); - useEventListener(draggingElement, "pointerup", end, config); - } - return { - ...toRefs2(position), - position, - isDragging: computed(() => !!pressedDelta.value), - style: computed( - () => `left:${position.value.x}px;top:${position.value.y}px;` - ) - }; -} -function useDropZone(target, options = {}) { - const isOverDropZone = ref(false); - const files = shallowRef(null); - let counter = 0; - let isDataTypeIncluded = true; - if (isClient) { - const _options = typeof options === "function" ? { onDrop: options } : options; - const getFiles = (event) => { - var _a, _b; - const list = Array.from((_b = (_a = event.dataTransfer) == null ? void 0 : _a.files) != null ? _b : []); - return files.value = list.length === 0 ? null : list; - }; - useEventListener(target, "dragenter", (event) => { - var _a, _b; - const types = Array.from(((_a = event == null ? void 0 : event.dataTransfer) == null ? void 0 : _a.items) || []).map((i) => i.kind === "file" ? i.type : null).filter(notNullish); - if (_options.dataTypes && event.dataTransfer) { - const dataTypes = unref(_options.dataTypes); - isDataTypeIncluded = typeof dataTypes === "function" ? dataTypes(types) : dataTypes ? dataTypes.some((item) => types.includes(item)) : true; - if (!isDataTypeIncluded) - return; - } - event.preventDefault(); - counter += 1; - isOverDropZone.value = true; - (_b = _options.onEnter) == null ? void 0 : _b.call(_options, getFiles(event), event); - }); - useEventListener(target, "dragover", (event) => { - var _a; - if (!isDataTypeIncluded) - return; - event.preventDefault(); - (_a = _options.onOver) == null ? void 0 : _a.call(_options, getFiles(event), event); - }); - useEventListener(target, "dragleave", (event) => { - var _a; - if (!isDataTypeIncluded) - return; - event.preventDefault(); - counter -= 1; - if (counter === 0) - isOverDropZone.value = false; - (_a = _options.onLeave) == null ? void 0 : _a.call(_options, getFiles(event), event); - }); - useEventListener(target, "drop", (event) => { - var _a; - event.preventDefault(); - counter = 0; - isOverDropZone.value = false; - (_a = _options.onDrop) == null ? void 0 : _a.call(_options, getFiles(event), event); - }); - } - return { - files, - isOverDropZone - }; -} -function useResizeObserver(target, callback, options = {}) { - const { window: window2 = defaultWindow, ...observerOptions } = options; - let observer; - const isSupported = useSupported(() => window2 && "ResizeObserver" in window2); - const cleanup = () => { - if (observer) { - observer.disconnect(); - observer = void 0; - } - }; - const targets = computed(() => Array.isArray(target) ? target.map((el) => unrefElement(el)) : [unrefElement(target)]); - const stopWatch = watch( - targets, - (els) => { - cleanup(); - if (isSupported.value && window2) { - observer = new ResizeObserver(callback); - for (const _el of els) - _el && observer.observe(_el, observerOptions); - } - }, - { immediate: true, flush: "post" } - ); - const stop = () => { - cleanup(); - stopWatch(); - }; - tryOnScopeDispose(stop); - return { - isSupported, - stop - }; -} -function useElementBounding(target, options = {}) { - const { - reset = true, - windowResize = true, - windowScroll = true, - immediate = true - } = options; - const height = ref(0); - const bottom = ref(0); - const left = ref(0); - const right = ref(0); - const top = ref(0); - const width = ref(0); - const x = ref(0); - const y = ref(0); - function update() { - const el = unrefElement(target); - if (!el) { - if (reset) { - height.value = 0; - bottom.value = 0; - left.value = 0; - right.value = 0; - top.value = 0; - width.value = 0; - x.value = 0; - y.value = 0; - } - return; - } - const rect = el.getBoundingClientRect(); - height.value = rect.height; - bottom.value = rect.bottom; - left.value = rect.left; - right.value = rect.right; - top.value = rect.top; - width.value = rect.width; - x.value = rect.x; - y.value = rect.y; - } - useResizeObserver(target, update); - watch(() => unrefElement(target), (ele) => !ele && update()); - useMutationObserver(target, update, { - attributeFilter: ["style", "class"] - }); - if (windowScroll) - useEventListener("scroll", update, { capture: true, passive: true }); - if (windowResize) - useEventListener("resize", update, { passive: true }); - tryOnMounted(() => { - if (immediate) - update(); - }); - return { - height, - bottom, - left, - right, - top, - width, - x, - y, - update - }; -} -function useElementByPoint(options) { - const { - x, - y, - document: document2 = defaultDocument, - multiple, - interval = "requestAnimationFrame", - immediate = true - } = options; - const isSupported = useSupported(() => { - if (toValue(multiple)) - return document2 && "elementsFromPoint" in document2; - return document2 && "elementFromPoint" in document2; - }); - const element = ref(null); - const cb = () => { - var _a, _b; - element.value = toValue(multiple) ? (_a = document2 == null ? void 0 : document2.elementsFromPoint(toValue(x), toValue(y))) != null ? _a : [] : (_b = document2 == null ? void 0 : document2.elementFromPoint(toValue(x), toValue(y))) != null ? _b : null; - }; - const controls = interval === "requestAnimationFrame" ? useRafFn(cb, { immediate }) : useIntervalFn(cb, interval, { immediate }); - return { - isSupported, - element, - ...controls - }; -} -function useElementHover(el, options = {}) { - const { - delayEnter = 0, - delayLeave = 0, - window: window2 = defaultWindow - } = options; - const isHovered = ref(false); - let timer; - const toggle = (entering) => { - const delay = entering ? delayEnter : delayLeave; - if (timer) { - clearTimeout(timer); - timer = void 0; - } - if (delay) - timer = setTimeout(() => isHovered.value = entering, delay); - else - isHovered.value = entering; - }; - if (!window2) - return isHovered; - useEventListener(el, "mouseenter", () => toggle(true), { passive: true }); - useEventListener(el, "mouseleave", () => toggle(false), { passive: true }); - return isHovered; -} -function useElementSize(target, initialSize = { width: 0, height: 0 }, options = {}) { - const { window: window2 = defaultWindow, box = "content-box" } = options; - const isSVG = computed(() => { - var _a, _b; - return (_b = (_a = unrefElement(target)) == null ? void 0 : _a.namespaceURI) == null ? void 0 : _b.includes("svg"); - }); - const width = ref(initialSize.width); - const height = ref(initialSize.height); - const { stop: stop1 } = useResizeObserver( - target, - ([entry]) => { - const boxSize = box === "border-box" ? entry.borderBoxSize : box === "content-box" ? entry.contentBoxSize : entry.devicePixelContentBoxSize; - if (window2 && isSVG.value) { - const $elem = unrefElement(target); - if ($elem) { - const rect = $elem.getBoundingClientRect(); - width.value = rect.width; - height.value = rect.height; - } - } else { - if (boxSize) { - const formatBoxSize = Array.isArray(boxSize) ? boxSize : [boxSize]; - width.value = formatBoxSize.reduce((acc, { inlineSize }) => acc + inlineSize, 0); - height.value = formatBoxSize.reduce((acc, { blockSize }) => acc + blockSize, 0); - } else { - width.value = entry.contentRect.width; - height.value = entry.contentRect.height; - } - } - }, - options - ); - tryOnMounted(() => { - const ele = unrefElement(target); - if (ele) { - width.value = "offsetWidth" in ele ? ele.offsetWidth : initialSize.width; - height.value = "offsetHeight" in ele ? ele.offsetHeight : initialSize.height; - } - }); - const stop2 = watch( - () => unrefElement(target), - (ele) => { - width.value = ele ? initialSize.width : 0; - height.value = ele ? initialSize.height : 0; - } - ); - function stop() { - stop1(); - stop2(); - } - return { - width, - height, - stop - }; -} -function useIntersectionObserver(target, callback, options = {}) { - const { - root, - rootMargin = "0px", - threshold = 0.1, - window: window2 = defaultWindow, - immediate = true - } = options; - const isSupported = useSupported(() => window2 && "IntersectionObserver" in window2); - const targets = computed(() => { - const _target = toValue(target); - return (Array.isArray(_target) ? _target : [_target]).map(unrefElement).filter(notNullish); - }); - let cleanup = noop; - const isActive = ref(immediate); - const stopWatch = isSupported.value ? watch( - () => [targets.value, unrefElement(root), isActive.value], - ([targets2, root2]) => { - cleanup(); - if (!isActive.value) - return; - if (!targets2.length) - return; - const observer = new IntersectionObserver( - callback, - { - root: unrefElement(root2), - rootMargin, - threshold - } - ); - targets2.forEach((el) => el && observer.observe(el)); - cleanup = () => { - observer.disconnect(); - cleanup = noop; - }; - }, - { immediate, flush: "post" } - ) : noop; - const stop = () => { - cleanup(); - stopWatch(); - isActive.value = false; - }; - tryOnScopeDispose(stop); - return { - isSupported, - isActive, - pause() { - cleanup(); - isActive.value = false; - }, - resume() { - isActive.value = true; - }, - stop - }; -} -function useElementVisibility(element, options = {}) { - const { window: window2 = defaultWindow, scrollTarget, threshold = 0 } = options; - const elementIsVisible = ref(false); - useIntersectionObserver( - element, - (intersectionObserverEntries) => { - let isIntersecting = elementIsVisible.value; - let latestTime = 0; - for (const entry of intersectionObserverEntries) { - if (entry.time >= latestTime) { - latestTime = entry.time; - isIntersecting = entry.isIntersecting; - } - } - elementIsVisible.value = isIntersecting; - }, - { - root: scrollTarget, - window: window2, - threshold - } - ); - return elementIsVisible; -} -var events = /* @__PURE__ */ new Map(); -function useEventBus(key) { - const scope = getCurrentScope(); - function on(listener) { - var _a; - const listeners = events.get(key) || /* @__PURE__ */ new Set(); - listeners.add(listener); - events.set(key, listeners); - const _off = () => off(listener); - (_a = scope == null ? void 0 : scope.cleanups) == null ? void 0 : _a.push(_off); - return _off; - } - function once(listener) { - function _listener(...args) { - off(_listener); - listener(...args); - } - return on(_listener); - } - function off(listener) { - const listeners = events.get(key); - if (!listeners) - return; - listeners.delete(listener); - if (!listeners.size) - reset(); - } - function reset() { - events.delete(key); - } - function emit(event, payload) { - var _a; - (_a = events.get(key)) == null ? void 0 : _a.forEach((v) => v(event, payload)); - } - return { on, once, off, emit, reset }; -} -function resolveNestedOptions$1(options) { - if (options === true) - return {}; - return options; -} -function useEventSource(url, events2 = [], options = {}) { - const event = ref(null); - const data = ref(null); - const status = ref("CONNECTING"); - const eventSource = ref(null); - const error = shallowRef(null); - const urlRef = toRef2(url); - const lastEventId = shallowRef(null); - let explicitlyClosed = false; - let retried = 0; - const { - withCredentials = false, - immediate = true - } = options; - const close = () => { - if (isClient && eventSource.value) { - eventSource.value.close(); - eventSource.value = null; - status.value = "CLOSED"; - explicitlyClosed = true; - } - }; - const _init = () => { - if (explicitlyClosed || typeof urlRef.value === "undefined") - return; - const es = new EventSource(urlRef.value, { withCredentials }); - status.value = "CONNECTING"; - eventSource.value = es; - es.onopen = () => { - status.value = "OPEN"; - error.value = null; - }; - es.onerror = (e) => { - status.value = "CLOSED"; - error.value = e; - if (es.readyState === 2 && !explicitlyClosed && options.autoReconnect) { - es.close(); - const { - retries = -1, - delay = 1e3, - onFailed - } = resolveNestedOptions$1(options.autoReconnect); - retried += 1; - if (typeof retries === "number" && (retries < 0 || retried < retries)) - setTimeout(_init, delay); - else if (typeof retries === "function" && retries()) - setTimeout(_init, delay); - else - onFailed == null ? void 0 : onFailed(); - } - }; - es.onmessage = (e) => { - event.value = null; - data.value = e.data; - lastEventId.value = e.lastEventId; - }; - for (const event_name of events2) { - useEventListener(es, event_name, (e) => { - event.value = event_name; - data.value = e.data || null; - }); - } - }; - const open = () => { - if (!isClient) - return; - close(); - explicitlyClosed = false; - retried = 0; - _init(); - }; - if (immediate) - watch(urlRef, open, { immediate: true }); - tryOnScopeDispose(close); - return { - eventSource, - event, - data, - status, - error, - open, - close, - lastEventId - }; -} -function useEyeDropper(options = {}) { - const { initialValue = "" } = options; - const isSupported = useSupported(() => typeof window !== "undefined" && "EyeDropper" in window); - const sRGBHex = ref(initialValue); - async function open(openOptions) { - if (!isSupported.value) - return; - const eyeDropper = new window.EyeDropper(); - const result = await eyeDropper.open(openOptions); - sRGBHex.value = result.sRGBHex; - return result; - } - return { isSupported, sRGBHex, open }; -} -function useFavicon(newIcon = null, options = {}) { - const { - baseUrl = "", - rel = "icon", - document: document2 = defaultDocument - } = options; - const favicon = toRef2(newIcon); - const applyIcon = (icon) => { - const elements = document2 == null ? void 0 : document2.head.querySelectorAll(`link[rel*="${rel}"]`); - if (!elements || elements.length === 0) { - const link = document2 == null ? void 0 : document2.createElement("link"); - if (link) { - link.rel = rel; - link.href = `${baseUrl}${icon}`; - link.type = `image/${icon.split(".").pop()}`; - document2 == null ? void 0 : document2.head.append(link); - } - return; - } - elements == null ? void 0 : elements.forEach((el) => el.href = `${baseUrl}${icon}`); - }; - watch( - favicon, - (i, o) => { - if (typeof i === "string" && i !== o) - applyIcon(i); - }, - { immediate: true } - ); - return favicon; -} -var payloadMapping = { - json: "application/json", - text: "text/plain" -}; -function isFetchOptions(obj) { - return obj && containsProp(obj, "immediate", "refetch", "initialData", "timeout", "beforeFetch", "afterFetch", "onFetchError", "fetch", "updateDataOnError"); -} -var reAbsolute = /^(?:[a-z][a-z\d+\-.]*:)?\/\//i; -function isAbsoluteURL(url) { - return reAbsolute.test(url); -} -function headersToObject(headers) { - if (typeof Headers !== "undefined" && headers instanceof Headers) - return Object.fromEntries(headers.entries()); - return headers; -} -function combineCallbacks(combination, ...callbacks) { - if (combination === "overwrite") { - return async (ctx) => { - const callback = callbacks[callbacks.length - 1]; - if (callback) - return { ...ctx, ...await callback(ctx) }; - return ctx; - }; - } else { - return async (ctx) => { - for (const callback of callbacks) { - if (callback) - ctx = { ...ctx, ...await callback(ctx) }; - } - return ctx; - }; - } -} -function createFetch(config = {}) { - const _combination = config.combination || "chain"; - const _options = config.options || {}; - const _fetchOptions = config.fetchOptions || {}; - function useFactoryFetch(url, ...args) { - const computedUrl = computed(() => { - const baseUrl = toValue(config.baseUrl); - const targetUrl = toValue(url); - return baseUrl && !isAbsoluteURL(targetUrl) ? joinPaths(baseUrl, targetUrl) : targetUrl; - }); - let options = _options; - let fetchOptions = _fetchOptions; - if (args.length > 0) { - if (isFetchOptions(args[0])) { - options = { - ...options, - ...args[0], - beforeFetch: combineCallbacks(_combination, _options.beforeFetch, args[0].beforeFetch), - afterFetch: combineCallbacks(_combination, _options.afterFetch, args[0].afterFetch), - onFetchError: combineCallbacks(_combination, _options.onFetchError, args[0].onFetchError) - }; - } else { - fetchOptions = { - ...fetchOptions, - ...args[0], - headers: { - ...headersToObject(fetchOptions.headers) || {}, - ...headersToObject(args[0].headers) || {} - } - }; - } - } - if (args.length > 1 && isFetchOptions(args[1])) { - options = { - ...options, - ...args[1], - beforeFetch: combineCallbacks(_combination, _options.beforeFetch, args[1].beforeFetch), - afterFetch: combineCallbacks(_combination, _options.afterFetch, args[1].afterFetch), - onFetchError: combineCallbacks(_combination, _options.onFetchError, args[1].onFetchError) - }; - } - return useFetch(computedUrl, fetchOptions, options); - } - return useFactoryFetch; -} -function useFetch(url, ...args) { - var _a; - const supportsAbort = typeof AbortController === "function"; - let fetchOptions = {}; - let options = { - immediate: true, - refetch: false, - timeout: 0, - updateDataOnError: false - }; - const config = { - method: "GET", - type: "text", - payload: void 0 - }; - if (args.length > 0) { - if (isFetchOptions(args[0])) - options = { ...options, ...args[0] }; - else - fetchOptions = args[0]; - } - if (args.length > 1) { - if (isFetchOptions(args[1])) - options = { ...options, ...args[1] }; - } - const { - fetch = (_a = defaultWindow) == null ? void 0 : _a.fetch, - initialData, - timeout - } = options; - const responseEvent = createEventHook(); - const errorEvent = createEventHook(); - const finallyEvent = createEventHook(); - const isFinished = ref(false); - const isFetching = ref(false); - const aborted = ref(false); - const statusCode = ref(null); - const response = shallowRef(null); - const error = shallowRef(null); - const data = shallowRef(initialData || null); - const canAbort = computed(() => supportsAbort && isFetching.value); - let controller; - let timer; - const abort = () => { - if (supportsAbort) { - controller == null ? void 0 : controller.abort(); - controller = new AbortController(); - controller.signal.onabort = () => aborted.value = true; - fetchOptions = { - ...fetchOptions, - signal: controller.signal - }; - } - }; - const loading = (isLoading) => { - isFetching.value = isLoading; - isFinished.value = !isLoading; - }; - if (timeout) - timer = useTimeoutFn(abort, timeout, { immediate: false }); - let executeCounter = 0; - const execute = async (throwOnFailed = false) => { - var _a2, _b; - abort(); - loading(true); - error.value = null; - statusCode.value = null; - aborted.value = false; - executeCounter += 1; - const currentExecuteCounter = executeCounter; - const defaultFetchOptions = { - method: config.method, - headers: {} - }; - if (config.payload) { - const headers = headersToObject(defaultFetchOptions.headers); - const payload = toValue(config.payload); - if (!config.payloadType && payload && Object.getPrototypeOf(payload) === Object.prototype && !(payload instanceof FormData)) - config.payloadType = "json"; - if (config.payloadType) - headers["Content-Type"] = (_a2 = payloadMapping[config.payloadType]) != null ? _a2 : config.payloadType; - defaultFetchOptions.body = config.payloadType === "json" ? JSON.stringify(payload) : payload; - } - let isCanceled = false; - const context = { - url: toValue(url), - options: { - ...defaultFetchOptions, - ...fetchOptions - }, - cancel: () => { - isCanceled = true; - } - }; - if (options.beforeFetch) - Object.assign(context, await options.beforeFetch(context)); - if (isCanceled || !fetch) { - loading(false); - return Promise.resolve(null); - } - let responseData = null; - if (timer) - timer.start(); - return fetch( - context.url, - { - ...defaultFetchOptions, - ...context.options, - headers: { - ...headersToObject(defaultFetchOptions.headers), - ...headersToObject((_b = context.options) == null ? void 0 : _b.headers) - } - } - ).then(async (fetchResponse) => { - response.value = fetchResponse; - statusCode.value = fetchResponse.status; - responseData = await fetchResponse.clone()[config.type](); - if (!fetchResponse.ok) { - data.value = initialData || null; - throw new Error(fetchResponse.statusText); - } - if (options.afterFetch) { - ({ data: responseData } = await options.afterFetch({ - data: responseData, - response: fetchResponse - })); - } - data.value = responseData; - responseEvent.trigger(fetchResponse); - return fetchResponse; - }).catch(async (fetchError) => { - let errorData = fetchError.message || fetchError.name; - if (options.onFetchError) { - ({ error: errorData, data: responseData } = await options.onFetchError({ - data: responseData, - error: fetchError, - response: response.value - })); - } - error.value = errorData; - if (options.updateDataOnError) - data.value = responseData; - errorEvent.trigger(fetchError); - if (throwOnFailed) - throw fetchError; - return null; - }).finally(() => { - if (currentExecuteCounter === executeCounter) - loading(false); - if (timer) - timer.stop(); - finallyEvent.trigger(null); - }); - }; - const refetch = toRef2(options.refetch); - watch( - [ - refetch, - toRef2(url) - ], - ([refetch2]) => refetch2 && execute(), - { deep: true } - ); - const shell = { - isFinished: readonly(isFinished), - isFetching: readonly(isFetching), - statusCode, - response, - error, - data, - canAbort, - aborted, - abort, - execute, - onFetchResponse: responseEvent.on, - onFetchError: errorEvent.on, - onFetchFinally: finallyEvent.on, - // method - get: setMethod("GET"), - put: setMethod("PUT"), - post: setMethod("POST"), - delete: setMethod("DELETE"), - patch: setMethod("PATCH"), - head: setMethod("HEAD"), - options: setMethod("OPTIONS"), - // type - json: setType("json"), - text: setType("text"), - blob: setType("blob"), - arrayBuffer: setType("arrayBuffer"), - formData: setType("formData") - }; - function setMethod(method) { - return (payload, payloadType) => { - if (!isFetching.value) { - config.method = method; - config.payload = payload; - config.payloadType = payloadType; - if (isRef(config.payload)) { - watch( - [ - refetch, - toRef2(config.payload) - ], - ([refetch2]) => refetch2 && execute(), - { deep: true } - ); - } - return { - ...shell, - then(onFulfilled, onRejected) { - return waitUntilFinished().then(onFulfilled, onRejected); - } - }; - } - return void 0; - }; - } - function waitUntilFinished() { - return new Promise((resolve, reject) => { - until(isFinished).toBe(true).then(() => resolve(shell)).catch((error2) => reject(error2)); - }); - } - function setType(type) { - return () => { - if (!isFetching.value) { - config.type = type; - return { - ...shell, - then(onFulfilled, onRejected) { - return waitUntilFinished().then(onFulfilled, onRejected); - } - }; - } - return void 0; - }; - } - if (options.immediate) - Promise.resolve().then(() => execute()); - return { - ...shell, - then(onFulfilled, onRejected) { - return waitUntilFinished().then(onFulfilled, onRejected); - } - }; -} -function joinPaths(start, end) { - if (!start.endsWith("/") && !end.startsWith("/")) - return `${start}/${end}`; - return `${start}${end}`; -} -var DEFAULT_OPTIONS = { - multiple: true, - accept: "*", - reset: false, - directory: false -}; -function useFileDialog(options = {}) { - const { - document: document2 = defaultDocument - } = options; - const files = ref(null); - const { on: onChange, trigger } = createEventHook(); - let input; - if (document2) { - input = document2.createElement("input"); - input.type = "file"; - input.onchange = (event) => { - const result = event.target; - files.value = result.files; - trigger(files.value); - }; - } - const reset = () => { - files.value = null; - if (input && input.value) { - input.value = ""; - trigger(null); - } - }; - const open = (localOptions) => { - if (!input) - return; - const _options = { - ...DEFAULT_OPTIONS, - ...options, - ...localOptions - }; - input.multiple = _options.multiple; - input.accept = _options.accept; - input.webkitdirectory = _options.directory; - if (hasOwn(_options, "capture")) - input.capture = _options.capture; - if (_options.reset) - reset(); - input.click(); - }; - return { - files: readonly(files), - open, - reset, - onChange - }; -} -function useFileSystemAccess(options = {}) { - const { - window: _window = defaultWindow, - dataType = "Text" - } = options; - const window2 = _window; - const isSupported = useSupported(() => window2 && "showSaveFilePicker" in window2 && "showOpenFilePicker" in window2); - const fileHandle = ref(); - const data = ref(); - const file = ref(); - const fileName = computed(() => { - var _a, _b; - return (_b = (_a = file.value) == null ? void 0 : _a.name) != null ? _b : ""; - }); - const fileMIME = computed(() => { - var _a, _b; - return (_b = (_a = file.value) == null ? void 0 : _a.type) != null ? _b : ""; - }); - const fileSize = computed(() => { - var _a, _b; - return (_b = (_a = file.value) == null ? void 0 : _a.size) != null ? _b : 0; - }); - const fileLastModified = computed(() => { - var _a, _b; - return (_b = (_a = file.value) == null ? void 0 : _a.lastModified) != null ? _b : 0; - }); - async function open(_options = {}) { - if (!isSupported.value) - return; - const [handle] = await window2.showOpenFilePicker({ ...toValue(options), ..._options }); - fileHandle.value = handle; - await updateData(); - } - async function create(_options = {}) { - if (!isSupported.value) - return; - fileHandle.value = await window2.showSaveFilePicker({ ...options, ..._options }); - data.value = void 0; - await updateData(); - } - async function save(_options = {}) { - if (!isSupported.value) - return; - if (!fileHandle.value) - return saveAs(_options); - if (data.value) { - const writableStream = await fileHandle.value.createWritable(); - await writableStream.write(data.value); - await writableStream.close(); - } - await updateFile(); - } - async function saveAs(_options = {}) { - if (!isSupported.value) - return; - fileHandle.value = await window2.showSaveFilePicker({ ...options, ..._options }); - if (data.value) { - const writableStream = await fileHandle.value.createWritable(); - await writableStream.write(data.value); - await writableStream.close(); - } - await updateFile(); - } - async function updateFile() { - var _a; - file.value = await ((_a = fileHandle.value) == null ? void 0 : _a.getFile()); - } - async function updateData() { - var _a, _b; - await updateFile(); - const type = toValue(dataType); - if (type === "Text") - data.value = await ((_a = file.value) == null ? void 0 : _a.text()); - else if (type === "ArrayBuffer") - data.value = await ((_b = file.value) == null ? void 0 : _b.arrayBuffer()); - else if (type === "Blob") - data.value = file.value; - } - watch(() => toValue(dataType), updateData); - return { - isSupported, - data, - file, - fileName, - fileMIME, - fileSize, - fileLastModified, - open, - create, - save, - saveAs, - updateData - }; -} -function useFocus(target, options = {}) { - const { initialValue = false, focusVisible = false, preventScroll = false } = options; - const innerFocused = ref(false); - const targetElement = computed(() => unrefElement(target)); - useEventListener(targetElement, "focus", (event) => { - var _a, _b; - if (!focusVisible || ((_b = (_a = event.target).matches) == null ? void 0 : _b.call(_a, ":focus-visible"))) - innerFocused.value = true; - }); - useEventListener(targetElement, "blur", () => innerFocused.value = false); - const focused = computed({ - get: () => innerFocused.value, - set(value) { - var _a, _b; - if (!value && innerFocused.value) - (_a = targetElement.value) == null ? void 0 : _a.blur(); - else if (value && !innerFocused.value) - (_b = targetElement.value) == null ? void 0 : _b.focus({ preventScroll }); - } - }); - watch( - targetElement, - () => { - focused.value = initialValue; - }, - { immediate: true, flush: "post" } - ); - return { focused }; -} -function useFocusWithin(target, options = {}) { - const activeElement = useActiveElement(options); - const targetElement = computed(() => unrefElement(target)); - const focused = computed(() => targetElement.value && activeElement.value ? targetElement.value.contains(activeElement.value) : false); - return { focused }; -} -function useFps(options) { - var _a; - const fps = ref(0); - if (typeof performance === "undefined") - return fps; - const every = (_a = options == null ? void 0 : options.every) != null ? _a : 10; - let last = performance.now(); - let ticks = 0; - useRafFn(() => { - ticks += 1; - if (ticks >= every) { - const now2 = performance.now(); - const diff = now2 - last; - fps.value = Math.round(1e3 / (diff / ticks)); - last = now2; - ticks = 0; - } - }); - return fps; -} -var eventHandlers = [ - "fullscreenchange", - "webkitfullscreenchange", - "webkitendfullscreen", - "mozfullscreenchange", - "MSFullscreenChange" -]; -function useFullscreen(target, options = {}) { - const { - document: document2 = defaultDocument, - autoExit = false - } = options; - const targetRef = computed(() => { - var _a; - return (_a = unrefElement(target)) != null ? _a : document2 == null ? void 0 : document2.querySelector("html"); - }); - const isFullscreen = ref(false); - const requestMethod = computed(() => { - return [ - "requestFullscreen", - "webkitRequestFullscreen", - "webkitEnterFullscreen", - "webkitEnterFullScreen", - "webkitRequestFullScreen", - "mozRequestFullScreen", - "msRequestFullscreen" - ].find((m) => document2 && m in document2 || targetRef.value && m in targetRef.value); - }); - const exitMethod = computed(() => { - return [ - "exitFullscreen", - "webkitExitFullscreen", - "webkitExitFullScreen", - "webkitCancelFullScreen", - "mozCancelFullScreen", - "msExitFullscreen" - ].find((m) => document2 && m in document2 || targetRef.value && m in targetRef.value); - }); - const fullscreenEnabled = computed(() => { - return [ - "fullScreen", - "webkitIsFullScreen", - "webkitDisplayingFullscreen", - "mozFullScreen", - "msFullscreenElement" - ].find((m) => document2 && m in document2 || targetRef.value && m in targetRef.value); - }); - const fullscreenElementMethod = [ - "fullscreenElement", - "webkitFullscreenElement", - "mozFullScreenElement", - "msFullscreenElement" - ].find((m) => document2 && m in document2); - const isSupported = useSupported(() => targetRef.value && document2 && requestMethod.value !== void 0 && exitMethod.value !== void 0 && fullscreenEnabled.value !== void 0); - const isCurrentElementFullScreen = () => { - if (fullscreenElementMethod) - return (document2 == null ? void 0 : document2[fullscreenElementMethod]) === targetRef.value; - return false; - }; - const isElementFullScreen = () => { - if (fullscreenEnabled.value) { - if (document2 && document2[fullscreenEnabled.value] != null) { - return document2[fullscreenEnabled.value]; - } else { - const target2 = targetRef.value; - if ((target2 == null ? void 0 : target2[fullscreenEnabled.value]) != null) { - return Boolean(target2[fullscreenEnabled.value]); - } - } - } - return false; - }; - async function exit() { - if (!isSupported.value || !isFullscreen.value) - return; - if (exitMethod.value) { - if ((document2 == null ? void 0 : document2[exitMethod.value]) != null) { - await document2[exitMethod.value](); - } else { - const target2 = targetRef.value; - if ((target2 == null ? void 0 : target2[exitMethod.value]) != null) - await target2[exitMethod.value](); - } - } - isFullscreen.value = false; - } - async function enter() { - if (!isSupported.value || isFullscreen.value) - return; - if (isElementFullScreen()) - await exit(); - const target2 = targetRef.value; - if (requestMethod.value && (target2 == null ? void 0 : target2[requestMethod.value]) != null) { - await target2[requestMethod.value](); - isFullscreen.value = true; - } - } - async function toggle() { - await (isFullscreen.value ? exit() : enter()); - } - const handlerCallback = () => { - const isElementFullScreenValue = isElementFullScreen(); - if (!isElementFullScreenValue || isElementFullScreenValue && isCurrentElementFullScreen()) - isFullscreen.value = isElementFullScreenValue; - }; - useEventListener(document2, eventHandlers, handlerCallback, false); - useEventListener(() => unrefElement(targetRef), eventHandlers, handlerCallback, false); - if (autoExit) - tryOnScopeDispose(exit); - return { - isSupported, - isFullscreen, - enter, - exit, - toggle - }; -} -function mapGamepadToXbox360Controller(gamepad) { - return computed(() => { - if (gamepad.value) { - return { - buttons: { - a: gamepad.value.buttons[0], - b: gamepad.value.buttons[1], - x: gamepad.value.buttons[2], - y: gamepad.value.buttons[3] - }, - bumper: { - left: gamepad.value.buttons[4], - right: gamepad.value.buttons[5] - }, - triggers: { - left: gamepad.value.buttons[6], - right: gamepad.value.buttons[7] - }, - stick: { - left: { - horizontal: gamepad.value.axes[0], - vertical: gamepad.value.axes[1], - button: gamepad.value.buttons[10] - }, - right: { - horizontal: gamepad.value.axes[2], - vertical: gamepad.value.axes[3], - button: gamepad.value.buttons[11] - } - }, - dpad: { - up: gamepad.value.buttons[12], - down: gamepad.value.buttons[13], - left: gamepad.value.buttons[14], - right: gamepad.value.buttons[15] - }, - back: gamepad.value.buttons[8], - start: gamepad.value.buttons[9] - }; - } - return null; - }); -} -function useGamepad(options = {}) { - const { - navigator = defaultNavigator - } = options; - const isSupported = useSupported(() => navigator && "getGamepads" in navigator); - const gamepads = ref([]); - const onConnectedHook = createEventHook(); - const onDisconnectedHook = createEventHook(); - const stateFromGamepad = (gamepad) => { - const hapticActuators = []; - const vibrationActuator = "vibrationActuator" in gamepad ? gamepad.vibrationActuator : null; - if (vibrationActuator) - hapticActuators.push(vibrationActuator); - if (gamepad.hapticActuators) - hapticActuators.push(...gamepad.hapticActuators); - return { - id: gamepad.id, - index: gamepad.index, - connected: gamepad.connected, - mapping: gamepad.mapping, - timestamp: gamepad.timestamp, - vibrationActuator: gamepad.vibrationActuator, - hapticActuators, - axes: gamepad.axes.map((axes) => axes), - buttons: gamepad.buttons.map((button) => ({ pressed: button.pressed, touched: button.touched, value: button.value })) - }; - }; - const updateGamepadState = () => { - const _gamepads = (navigator == null ? void 0 : navigator.getGamepads()) || []; - for (const gamepad of _gamepads) { - if (gamepad && gamepads.value[gamepad.index]) - gamepads.value[gamepad.index] = stateFromGamepad(gamepad); - } - }; - const { isActive, pause, resume } = useRafFn(updateGamepadState); - const onGamepadConnected = (gamepad) => { - if (!gamepads.value.some(({ index }) => index === gamepad.index)) { - gamepads.value.push(stateFromGamepad(gamepad)); - onConnectedHook.trigger(gamepad.index); - } - resume(); - }; - const onGamepadDisconnected = (gamepad) => { - gamepads.value = gamepads.value.filter((x) => x.index !== gamepad.index); - onDisconnectedHook.trigger(gamepad.index); - }; - useEventListener("gamepadconnected", (e) => onGamepadConnected(e.gamepad)); - useEventListener("gamepaddisconnected", (e) => onGamepadDisconnected(e.gamepad)); - tryOnMounted(() => { - const _gamepads = (navigator == null ? void 0 : navigator.getGamepads()) || []; - for (const gamepad of _gamepads) { - if (gamepad && gamepads.value[gamepad.index]) - onGamepadConnected(gamepad); - } - }); - pause(); - return { - isSupported, - onConnected: onConnectedHook.on, - onDisconnected: onDisconnectedHook.on, - gamepads, - pause, - resume, - isActive - }; -} -function useGeolocation(options = {}) { - const { - enableHighAccuracy = true, - maximumAge = 3e4, - timeout = 27e3, - navigator = defaultNavigator, - immediate = true - } = options; - const isSupported = useSupported(() => navigator && "geolocation" in navigator); - const locatedAt = ref(null); - const error = shallowRef(null); - const coords = ref({ - accuracy: 0, - latitude: Number.POSITIVE_INFINITY, - longitude: Number.POSITIVE_INFINITY, - altitude: null, - altitudeAccuracy: null, - heading: null, - speed: null - }); - function updatePosition(position) { - locatedAt.value = position.timestamp; - coords.value = position.coords; - error.value = null; - } - let watcher; - function resume() { - if (isSupported.value) { - watcher = navigator.geolocation.watchPosition( - updatePosition, - (err) => error.value = err, - { - enableHighAccuracy, - maximumAge, - timeout - } - ); - } - } - if (immediate) - resume(); - function pause() { - if (watcher && navigator) - navigator.geolocation.clearWatch(watcher); - } - tryOnScopeDispose(() => { - pause(); - }); - return { - isSupported, - coords, - locatedAt, - error, - resume, - pause - }; -} -var defaultEvents$1 = ["mousemove", "mousedown", "resize", "keydown", "touchstart", "wheel"]; -var oneMinute = 6e4; -function useIdle(timeout = oneMinute, options = {}) { - const { - initialState = false, - listenForVisibilityChange = true, - events: events2 = defaultEvents$1, - window: window2 = defaultWindow, - eventFilter = throttleFilter(50) - } = options; - const idle = ref(initialState); - const lastActive = ref(timestamp()); - let timer; - const reset = () => { - idle.value = false; - clearTimeout(timer); - timer = setTimeout(() => idle.value = true, timeout); - }; - const onEvent = createFilterWrapper( - eventFilter, - () => { - lastActive.value = timestamp(); - reset(); - } - ); - if (window2) { - const document2 = window2.document; - for (const event of events2) - useEventListener(window2, event, onEvent, { passive: true }); - if (listenForVisibilityChange) { - useEventListener(document2, "visibilitychange", () => { - if (!document2.hidden) - onEvent(); - }); - } - reset(); - } - return { - idle, - lastActive, - reset - }; -} -async function loadImage(options) { - return new Promise((resolve, reject) => { - const img = new Image(); - const { src, srcset, sizes, class: clazz, loading, crossorigin, referrerPolicy } = options; - img.src = src; - if (srcset) - img.srcset = srcset; - if (sizes) - img.sizes = sizes; - if (clazz) - img.className = clazz; - if (loading) - img.loading = loading; - if (crossorigin) - img.crossOrigin = crossorigin; - if (referrerPolicy) - img.referrerPolicy = referrerPolicy; - img.onload = () => resolve(img); - img.onerror = reject; - }); -} -function useImage(options, asyncStateOptions = {}) { - const state = useAsyncState( - () => loadImage(toValue(options)), - void 0, - { - resetOnExecute: true, - ...asyncStateOptions - } - ); - watch( - () => toValue(options), - () => state.execute(asyncStateOptions.delay), - { deep: true } - ); - return state; -} -var ARRIVED_STATE_THRESHOLD_PIXELS = 1; -function useScroll(element, options = {}) { - const { - throttle = 0, - idle = 200, - onStop = noop, - onScroll = noop, - offset = { - left: 0, - right: 0, - top: 0, - bottom: 0 - }, - eventListenerOptions = { - capture: false, - passive: true - }, - behavior = "auto", - window: window2 = defaultWindow, - onError = (e) => { - console.error(e); - } - } = options; - const internalX = ref(0); - const internalY = ref(0); - const x = computed({ - get() { - return internalX.value; - }, - set(x2) { - scrollTo2(x2, void 0); - } - }); - const y = computed({ - get() { - return internalY.value; - }, - set(y2) { - scrollTo2(void 0, y2); - } - }); - function scrollTo2(_x, _y) { - var _a, _b, _c, _d; - if (!window2) - return; - const _element = toValue(element); - if (!_element) - return; - (_c = _element instanceof Document ? window2.document.body : _element) == null ? void 0 : _c.scrollTo({ - top: (_a = toValue(_y)) != null ? _a : y.value, - left: (_b = toValue(_x)) != null ? _b : x.value, - behavior: toValue(behavior) - }); - const scrollContainer = ((_d = _element == null ? void 0 : _element.document) == null ? void 0 : _d.documentElement) || (_element == null ? void 0 : _element.documentElement) || _element; - if (x != null) - internalX.value = scrollContainer.scrollLeft; - if (y != null) - internalY.value = scrollContainer.scrollTop; - } - const isScrolling = ref(false); - const arrivedState = reactive({ - left: true, - right: false, - top: true, - bottom: false - }); - const directions = reactive({ - left: false, - right: false, - top: false, - bottom: false - }); - const onScrollEnd = (e) => { - if (!isScrolling.value) - return; - isScrolling.value = false; - directions.left = false; - directions.right = false; - directions.top = false; - directions.bottom = false; - onStop(e); - }; - const onScrollEndDebounced = useDebounceFn(onScrollEnd, throttle + idle); - const setArrivedState = (target) => { - var _a; - if (!window2) - return; - const el = ((_a = target == null ? void 0 : target.document) == null ? void 0 : _a.documentElement) || (target == null ? void 0 : target.documentElement) || unrefElement(target); - const { display, flexDirection } = getComputedStyle(el); - const scrollLeft = el.scrollLeft; - directions.left = scrollLeft < internalX.value; - directions.right = scrollLeft > internalX.value; - const left = Math.abs(scrollLeft) <= (offset.left || 0); - const right = Math.abs(scrollLeft) + el.clientWidth >= el.scrollWidth - (offset.right || 0) - ARRIVED_STATE_THRESHOLD_PIXELS; - if (display === "flex" && flexDirection === "row-reverse") { - arrivedState.left = right; - arrivedState.right = left; - } else { - arrivedState.left = left; - arrivedState.right = right; - } - internalX.value = scrollLeft; - let scrollTop = el.scrollTop; - if (target === window2.document && !scrollTop) - scrollTop = window2.document.body.scrollTop; - directions.top = scrollTop < internalY.value; - directions.bottom = scrollTop > internalY.value; - const top = Math.abs(scrollTop) <= (offset.top || 0); - const bottom = Math.abs(scrollTop) + el.clientHeight >= el.scrollHeight - (offset.bottom || 0) - ARRIVED_STATE_THRESHOLD_PIXELS; - if (display === "flex" && flexDirection === "column-reverse") { - arrivedState.top = bottom; - arrivedState.bottom = top; - } else { - arrivedState.top = top; - arrivedState.bottom = bottom; - } - internalY.value = scrollTop; - }; - const onScrollHandler = (e) => { - var _a; - if (!window2) - return; - const eventTarget = (_a = e.target.documentElement) != null ? _a : e.target; - setArrivedState(eventTarget); - isScrolling.value = true; - onScrollEndDebounced(e); - onScroll(e); - }; - useEventListener( - element, - "scroll", - throttle ? useThrottleFn(onScrollHandler, throttle, true, false) : onScrollHandler, - eventListenerOptions - ); - tryOnMounted(() => { - try { - const _element = toValue(element); - if (!_element) - return; - setArrivedState(_element); - } catch (e) { - onError(e); - } - }); - useEventListener( - element, - "scrollend", - onScrollEnd, - eventListenerOptions - ); - return { - x, - y, - isScrolling, - arrivedState, - directions, - measure() { - const _element = toValue(element); - if (window2 && _element) - setArrivedState(_element); - } - }; -} -function resolveElement(el) { - if (typeof Window !== "undefined" && el instanceof Window) - return el.document.documentElement; - if (typeof Document !== "undefined" && el instanceof Document) - return el.documentElement; - return el; -} -function useInfiniteScroll(element, onLoadMore, options = {}) { - var _a; - const { - direction = "bottom", - interval = 100, - canLoadMore = () => true - } = options; - const state = reactive(useScroll( - element, - { - ...options, - offset: { - [direction]: (_a = options.distance) != null ? _a : 0, - ...options.offset - } - } - )); - const promise = ref(); - const isLoading = computed(() => !!promise.value); - const observedElement = computed(() => { - return resolveElement(toValue(element)); - }); - const isElementVisible = useElementVisibility(observedElement); - function checkAndLoad() { - state.measure(); - if (!observedElement.value || !isElementVisible.value || !canLoadMore(observedElement.value)) - return; - const { scrollHeight, clientHeight, scrollWidth, clientWidth } = observedElement.value; - const isNarrower = direction === "bottom" || direction === "top" ? scrollHeight <= clientHeight : scrollWidth <= clientWidth; - if (state.arrivedState[direction] || isNarrower) { - if (!promise.value) { - promise.value = Promise.all([ - onLoadMore(state), - new Promise((resolve) => setTimeout(resolve, interval)) - ]).finally(() => { - promise.value = null; - nextTick(() => checkAndLoad()); - }); - } - } - } - watch( - () => [state.arrivedState[direction], isElementVisible.value], - checkAndLoad, - { immediate: true } - ); - return { - isLoading - }; -} -var defaultEvents = ["mousedown", "mouseup", "keydown", "keyup"]; -function useKeyModifier(modifier, options = {}) { - const { - events: events2 = defaultEvents, - document: document2 = defaultDocument, - initial = null - } = options; - const state = ref(initial); - if (document2) { - events2.forEach((listenerEvent) => { - useEventListener(document2, listenerEvent, (evt) => { - if (typeof evt.getModifierState === "function") - state.value = evt.getModifierState(modifier); - }); - }); - } - return state; -} -function useLocalStorage(key, initialValue, options = {}) { - const { window: window2 = defaultWindow } = options; - return useStorage(key, initialValue, window2 == null ? void 0 : window2.localStorage, options); -} -var DefaultMagicKeysAliasMap = { - ctrl: "control", - command: "meta", - cmd: "meta", - option: "alt", - up: "arrowup", - down: "arrowdown", - left: "arrowleft", - right: "arrowright" -}; -function useMagicKeys(options = {}) { - const { - reactive: useReactive = false, - target = defaultWindow, - aliasMap = DefaultMagicKeysAliasMap, - passive = true, - onEventFired = noop - } = options; - const current = reactive(/* @__PURE__ */ new Set()); - const obj = { - toJSON() { - return {}; - }, - current - }; - const refs = useReactive ? reactive(obj) : obj; - const metaDeps = /* @__PURE__ */ new Set(); - const usedKeys = /* @__PURE__ */ new Set(); - function setRefs(key, value) { - if (key in refs) { - if (useReactive) - refs[key] = value; - else - refs[key].value = value; - } - } - function reset() { - current.clear(); - for (const key of usedKeys) - setRefs(key, false); - } - function updateRefs(e, value) { - var _a, _b; - const key = (_a = e.key) == null ? void 0 : _a.toLowerCase(); - const code = (_b = e.code) == null ? void 0 : _b.toLowerCase(); - const values = [code, key].filter(Boolean); - if (key) { - if (value) - current.add(key); - else - current.delete(key); - } - for (const key2 of values) { - usedKeys.add(key2); - setRefs(key2, value); - } - if (key === "meta" && !value) { - metaDeps.forEach((key2) => { - current.delete(key2); - setRefs(key2, false); - }); - metaDeps.clear(); - } else if (typeof e.getModifierState === "function" && e.getModifierState("Meta") && value) { - [...current, ...values].forEach((key2) => metaDeps.add(key2)); - } - } - useEventListener(target, "keydown", (e) => { - updateRefs(e, true); - return onEventFired(e); - }, { passive }); - useEventListener(target, "keyup", (e) => { - updateRefs(e, false); - return onEventFired(e); - }, { passive }); - useEventListener("blur", reset, { passive: true }); - useEventListener("focus", reset, { passive: true }); - const proxy = new Proxy( - refs, - { - get(target2, prop, rec) { - if (typeof prop !== "string") - return Reflect.get(target2, prop, rec); - prop = prop.toLowerCase(); - if (prop in aliasMap) - prop = aliasMap[prop]; - if (!(prop in refs)) { - if (/[+_-]/.test(prop)) { - const keys2 = prop.split(/[+_-]/g).map((i) => i.trim()); - refs[prop] = computed(() => keys2.every((key) => toValue(proxy[key]))); - } else { - refs[prop] = ref(false); - } - } - const r = Reflect.get(target2, prop, rec); - return useReactive ? toValue(r) : r; - } - } - ); - return proxy; -} -function usingElRef(source, cb) { - if (toValue(source)) - cb(toValue(source)); -} -function timeRangeToArray(timeRanges) { - let ranges = []; - for (let i = 0; i < timeRanges.length; ++i) - ranges = [...ranges, [timeRanges.start(i), timeRanges.end(i)]]; - return ranges; -} -function tracksToArray(tracks) { - return Array.from(tracks).map(({ label, kind, language, mode, activeCues, cues, inBandMetadataTrackDispatchType }, id) => ({ id, label, kind, language, mode, activeCues, cues, inBandMetadataTrackDispatchType })); -} -var defaultOptions = { - src: "", - tracks: [] -}; -function useMediaControls(target, options = {}) { - target = toRef2(target); - options = { - ...defaultOptions, - ...options - }; - const { - document: document2 = defaultDocument - } = options; - const currentTime = ref(0); - const duration = ref(0); - const seeking = ref(false); - const volume = ref(1); - const waiting = ref(false); - const ended = ref(false); - const playing = ref(false); - const rate = ref(1); - const stalled = ref(false); - const buffered = ref([]); - const tracks = ref([]); - const selectedTrack = ref(-1); - const isPictureInPicture = ref(false); - const muted = ref(false); - const supportsPictureInPicture = document2 && "pictureInPictureEnabled" in document2; - const sourceErrorEvent = createEventHook(); - const disableTrack = (track) => { - usingElRef(target, (el) => { - if (track) { - const id = typeof track === "number" ? track : track.id; - el.textTracks[id].mode = "disabled"; - } else { - for (let i = 0; i < el.textTracks.length; ++i) - el.textTracks[i].mode = "disabled"; - } - selectedTrack.value = -1; - }); - }; - const enableTrack = (track, disableTracks = true) => { - usingElRef(target, (el) => { - const id = typeof track === "number" ? track : track.id; - if (disableTracks) - disableTrack(); - el.textTracks[id].mode = "showing"; - selectedTrack.value = id; - }); - }; - const togglePictureInPicture = () => { - return new Promise((resolve, reject) => { - usingElRef(target, async (el) => { - if (supportsPictureInPicture) { - if (!isPictureInPicture.value) { - el.requestPictureInPicture().then(resolve).catch(reject); - } else { - document2.exitPictureInPicture().then(resolve).catch(reject); - } - } - }); - }); - }; - watchEffect(() => { - if (!document2) - return; - const el = toValue(target); - if (!el) - return; - const src = toValue(options.src); - let sources = []; - if (!src) - return; - if (typeof src === "string") - sources = [{ src }]; - else if (Array.isArray(src)) - sources = src; - else if (isObject(src)) - sources = [src]; - el.querySelectorAll("source").forEach((e) => { - e.removeEventListener("error", sourceErrorEvent.trigger); - e.remove(); - }); - sources.forEach(({ src: src2, type }) => { - const source = document2.createElement("source"); - source.setAttribute("src", src2); - source.setAttribute("type", type || ""); - source.addEventListener("error", sourceErrorEvent.trigger); - el.appendChild(source); - }); - el.load(); - }); - tryOnScopeDispose(() => { - const el = toValue(target); - if (!el) - return; - el.querySelectorAll("source").forEach((e) => e.removeEventListener("error", sourceErrorEvent.trigger)); - }); - watch([target, volume], () => { - const el = toValue(target); - if (!el) - return; - el.volume = volume.value; - }); - watch([target, muted], () => { - const el = toValue(target); - if (!el) - return; - el.muted = muted.value; - }); - watch([target, rate], () => { - const el = toValue(target); - if (!el) - return; - el.playbackRate = rate.value; - }); - watchEffect(() => { - if (!document2) - return; - const textTracks = toValue(options.tracks); - const el = toValue(target); - if (!textTracks || !textTracks.length || !el) - return; - el.querySelectorAll("track").forEach((e) => e.remove()); - textTracks.forEach(({ default: isDefault, kind, label, src, srcLang }, i) => { - const track = document2.createElement("track"); - track.default = isDefault || false; - track.kind = kind; - track.label = label; - track.src = src; - track.srclang = srcLang; - if (track.default) - selectedTrack.value = i; - el.appendChild(track); - }); - }); - const { ignoreUpdates: ignoreCurrentTimeUpdates } = watchIgnorable(currentTime, (time) => { - const el = toValue(target); - if (!el) - return; - el.currentTime = time; - }); - const { ignoreUpdates: ignorePlayingUpdates } = watchIgnorable(playing, (isPlaying) => { - const el = toValue(target); - if (!el) - return; - isPlaying ? el.play() : el.pause(); - }); - useEventListener(target, "timeupdate", () => ignoreCurrentTimeUpdates(() => currentTime.value = toValue(target).currentTime)); - useEventListener(target, "durationchange", () => duration.value = toValue(target).duration); - useEventListener(target, "progress", () => buffered.value = timeRangeToArray(toValue(target).buffered)); - useEventListener(target, "seeking", () => seeking.value = true); - useEventListener(target, "seeked", () => seeking.value = false); - useEventListener(target, ["waiting", "loadstart"], () => { - waiting.value = true; - ignorePlayingUpdates(() => playing.value = false); - }); - useEventListener(target, "loadeddata", () => waiting.value = false); - useEventListener(target, "playing", () => { - waiting.value = false; - ended.value = false; - ignorePlayingUpdates(() => playing.value = true); - }); - useEventListener(target, "ratechange", () => rate.value = toValue(target).playbackRate); - useEventListener(target, "stalled", () => stalled.value = true); - useEventListener(target, "ended", () => ended.value = true); - useEventListener(target, "pause", () => ignorePlayingUpdates(() => playing.value = false)); - useEventListener(target, "play", () => ignorePlayingUpdates(() => playing.value = true)); - useEventListener(target, "enterpictureinpicture", () => isPictureInPicture.value = true); - useEventListener(target, "leavepictureinpicture", () => isPictureInPicture.value = false); - useEventListener(target, "volumechange", () => { - const el = toValue(target); - if (!el) - return; - volume.value = el.volume; - muted.value = el.muted; - }); - const listeners = []; - const stop = watch([target], () => { - const el = toValue(target); - if (!el) - return; - stop(); - listeners[0] = useEventListener(el.textTracks, "addtrack", () => tracks.value = tracksToArray(el.textTracks)); - listeners[1] = useEventListener(el.textTracks, "removetrack", () => tracks.value = tracksToArray(el.textTracks)); - listeners[2] = useEventListener(el.textTracks, "change", () => tracks.value = tracksToArray(el.textTracks)); - }); - tryOnScopeDispose(() => listeners.forEach((listener) => listener())); - return { - currentTime, - duration, - waiting, - seeking, - ended, - stalled, - buffered, - playing, - rate, - // Volume - volume, - muted, - // Tracks - tracks, - selectedTrack, - enableTrack, - disableTrack, - // Picture in Picture - supportsPictureInPicture, - togglePictureInPicture, - isPictureInPicture, - // Events - onSourceError: sourceErrorEvent.on - }; -} -function getMapVue2Compat() { - const data = shallowReactive({}); - return { - get: (key) => data[key], - set: (key, value) => set(data, key, value), - has: (key) => hasOwn(data, key), - delete: (key) => del(data, key), - clear: () => { - Object.keys(data).forEach((key) => { - del(data, key); - }); - } - }; -} -function useMemoize(resolver, options) { - const initCache = () => { - if (options == null ? void 0 : options.cache) - return shallowReactive(options.cache); - if (isVue2) - return getMapVue2Compat(); - return shallowReactive(/* @__PURE__ */ new Map()); - }; - const cache = initCache(); - const generateKey = (...args) => (options == null ? void 0 : options.getKey) ? options.getKey(...args) : JSON.stringify(args); - const _loadData = (key, ...args) => { - cache.set(key, resolver(...args)); - return cache.get(key); - }; - const loadData = (...args) => _loadData(generateKey(...args), ...args); - const deleteData = (...args) => { - cache.delete(generateKey(...args)); - }; - const clearData = () => { - cache.clear(); - }; - const memoized = (...args) => { - const key = generateKey(...args); - if (cache.has(key)) - return cache.get(key); - return _loadData(key, ...args); - }; - memoized.load = loadData; - memoized.delete = deleteData; - memoized.clear = clearData; - memoized.generateKey = generateKey; - memoized.cache = cache; - return memoized; -} -function useMemory(options = {}) { - const memory = ref(); - const isSupported = useSupported(() => typeof performance !== "undefined" && "memory" in performance); - if (isSupported.value) { - const { interval = 1e3 } = options; - useIntervalFn(() => { - memory.value = performance.memory; - }, interval, { immediate: options.immediate, immediateCallback: options.immediateCallback }); - } - return { isSupported, memory }; -} -var UseMouseBuiltinExtractors = { - page: (event) => [event.pageX, event.pageY], - client: (event) => [event.clientX, event.clientY], - screen: (event) => [event.screenX, event.screenY], - movement: (event) => event instanceof Touch ? null : [event.movementX, event.movementY] -}; -function useMouse(options = {}) { - const { - type = "page", - touch = true, - resetOnTouchEnds = false, - initialValue = { x: 0, y: 0 }, - window: window2 = defaultWindow, - target = window2, - scroll = true, - eventFilter - } = options; - let _prevMouseEvent = null; - const x = ref(initialValue.x); - const y = ref(initialValue.y); - const sourceType = ref(null); - const extractor = typeof type === "function" ? type : UseMouseBuiltinExtractors[type]; - const mouseHandler = (event) => { - const result = extractor(event); - _prevMouseEvent = event; - if (result) { - [x.value, y.value] = result; - sourceType.value = "mouse"; - } - }; - const touchHandler = (event) => { - if (event.touches.length > 0) { - const result = extractor(event.touches[0]); - if (result) { - [x.value, y.value] = result; - sourceType.value = "touch"; - } - } - }; - const scrollHandler = () => { - if (!_prevMouseEvent || !window2) - return; - const pos = extractor(_prevMouseEvent); - if (_prevMouseEvent instanceof MouseEvent && pos) { - x.value = pos[0] + window2.scrollX; - y.value = pos[1] + window2.scrollY; - } - }; - const reset = () => { - x.value = initialValue.x; - y.value = initialValue.y; - }; - const mouseHandlerWrapper = eventFilter ? (event) => eventFilter(() => mouseHandler(event), {}) : (event) => mouseHandler(event); - const touchHandlerWrapper = eventFilter ? (event) => eventFilter(() => touchHandler(event), {}) : (event) => touchHandler(event); - const scrollHandlerWrapper = eventFilter ? () => eventFilter(() => scrollHandler(), {}) : () => scrollHandler(); - if (target) { - const listenerOptions = { passive: true }; - useEventListener(target, ["mousemove", "dragover"], mouseHandlerWrapper, listenerOptions); - if (touch && type !== "movement") { - useEventListener(target, ["touchstart", "touchmove"], touchHandlerWrapper, listenerOptions); - if (resetOnTouchEnds) - useEventListener(target, "touchend", reset, listenerOptions); - } - if (scroll && type === "page") - useEventListener(window2, "scroll", scrollHandlerWrapper, { passive: true }); - } - return { - x, - y, - sourceType - }; -} -function useMouseInElement(target, options = {}) { - const { - handleOutside = true, - window: window2 = defaultWindow - } = options; - const type = options.type || "page"; - const { x, y, sourceType } = useMouse(options); - const targetRef = ref(target != null ? target : window2 == null ? void 0 : window2.document.body); - const elementX = ref(0); - const elementY = ref(0); - const elementPositionX = ref(0); - const elementPositionY = ref(0); - const elementHeight = ref(0); - const elementWidth = ref(0); - const isOutside = ref(true); - let stop = () => { - }; - if (window2) { - stop = watch( - [targetRef, x, y], - () => { - const el = unrefElement(targetRef); - if (!el) - return; - const { - left, - top, - width, - height - } = el.getBoundingClientRect(); - elementPositionX.value = left + (type === "page" ? window2.pageXOffset : 0); - elementPositionY.value = top + (type === "page" ? window2.pageYOffset : 0); - elementHeight.value = height; - elementWidth.value = width; - const elX = x.value - elementPositionX.value; - const elY = y.value - elementPositionY.value; - isOutside.value = width === 0 || height === 0 || elX < 0 || elY < 0 || elX > width || elY > height; - if (handleOutside || !isOutside.value) { - elementX.value = elX; - elementY.value = elY; - } - }, - { immediate: true } - ); - useEventListener(document, "mouseleave", () => { - isOutside.value = true; - }); - } - return { - x, - y, - sourceType, - elementX, - elementY, - elementPositionX, - elementPositionY, - elementHeight, - elementWidth, - isOutside, - stop - }; -} -function useMousePressed(options = {}) { - const { - touch = true, - drag = true, - capture = false, - initialValue = false, - window: window2 = defaultWindow - } = options; - const pressed = ref(initialValue); - const sourceType = ref(null); - if (!window2) { - return { - pressed, - sourceType - }; - } - const onPressed = (srcType) => () => { - pressed.value = true; - sourceType.value = srcType; - }; - const onReleased = () => { - pressed.value = false; - sourceType.value = null; - }; - const target = computed(() => unrefElement(options.target) || window2); - useEventListener(target, "mousedown", onPressed("mouse"), { passive: true, capture }); - useEventListener(window2, "mouseleave", onReleased, { passive: true, capture }); - useEventListener(window2, "mouseup", onReleased, { passive: true, capture }); - if (drag) { - useEventListener(target, "dragstart", onPressed("mouse"), { passive: true, capture }); - useEventListener(window2, "drop", onReleased, { passive: true, capture }); - useEventListener(window2, "dragend", onReleased, { passive: true, capture }); - } - if (touch) { - useEventListener(target, "touchstart", onPressed("touch"), { passive: true, capture }); - useEventListener(window2, "touchend", onReleased, { passive: true, capture }); - useEventListener(window2, "touchcancel", onReleased, { passive: true, capture }); - } - return { - pressed, - sourceType - }; -} -function useNavigatorLanguage(options = {}) { - const { window: window2 = defaultWindow } = options; - const navigator = window2 == null ? void 0 : window2.navigator; - const isSupported = useSupported(() => navigator && "language" in navigator); - const language = ref(navigator == null ? void 0 : navigator.language); - useEventListener(window2, "languagechange", () => { - if (navigator) - language.value = navigator.language; - }); - return { - isSupported, - language - }; -} -function useNetwork(options = {}) { - const { window: window2 = defaultWindow } = options; - const navigator = window2 == null ? void 0 : window2.navigator; - const isSupported = useSupported(() => navigator && "connection" in navigator); - const isOnline = ref(true); - const saveData = ref(false); - const offlineAt = ref(void 0); - const onlineAt = ref(void 0); - const downlink = ref(void 0); - const downlinkMax = ref(void 0); - const rtt = ref(void 0); - const effectiveType = ref(void 0); - const type = ref("unknown"); - const connection = isSupported.value && navigator.connection; - function updateNetworkInformation() { - if (!navigator) - return; - isOnline.value = navigator.onLine; - offlineAt.value = isOnline.value ? void 0 : Date.now(); - onlineAt.value = isOnline.value ? Date.now() : void 0; - if (connection) { - downlink.value = connection.downlink; - downlinkMax.value = connection.downlinkMax; - effectiveType.value = connection.effectiveType; - rtt.value = connection.rtt; - saveData.value = connection.saveData; - type.value = connection.type; - } - } - if (window2) { - useEventListener(window2, "offline", () => { - isOnline.value = false; - offlineAt.value = Date.now(); - }); - useEventListener(window2, "online", () => { - isOnline.value = true; - onlineAt.value = Date.now(); - }); - } - if (connection) - useEventListener(connection, "change", updateNetworkInformation, false); - updateNetworkInformation(); - return { - isSupported, - isOnline, - saveData, - offlineAt, - onlineAt, - downlink, - downlinkMax, - effectiveType, - rtt, - type - }; -} -function useNow(options = {}) { - const { - controls: exposeControls = false, - interval = "requestAnimationFrame" - } = options; - const now2 = ref(/* @__PURE__ */ new Date()); - const update = () => now2.value = /* @__PURE__ */ new Date(); - const controls = interval === "requestAnimationFrame" ? useRafFn(update, { immediate: true }) : useIntervalFn(update, interval, { immediate: true }); - if (exposeControls) { - return { - now: now2, - ...controls - }; - } else { - return now2; - } -} -function useObjectUrl(object) { - const url = ref(); - const release = () => { - if (url.value) - URL.revokeObjectURL(url.value); - url.value = void 0; - }; - watch( - () => toValue(object), - (newObject) => { - release(); - if (newObject) - url.value = URL.createObjectURL(newObject); - }, - { immediate: true } - ); - tryOnScopeDispose(release); - return readonly(url); -} -function useClamp(value, min, max) { - if (typeof value === "function" || isReadonly(value)) - return computed(() => clamp(toValue(value), toValue(min), toValue(max))); - const _value = ref(value); - return computed({ - get() { - return _value.value = clamp(_value.value, toValue(min), toValue(max)); - }, - set(value2) { - _value.value = clamp(value2, toValue(min), toValue(max)); - } - }); -} -function useOffsetPagination(options) { - const { - total = Number.POSITIVE_INFINITY, - pageSize = 10, - page = 1, - onPageChange = noop, - onPageSizeChange = noop, - onPageCountChange = noop - } = options; - const currentPageSize = useClamp(pageSize, 1, Number.POSITIVE_INFINITY); - const pageCount = computed(() => Math.max( - 1, - Math.ceil(toValue(total) / toValue(currentPageSize)) - )); - const currentPage = useClamp(page, 1, pageCount); - const isFirstPage = computed(() => currentPage.value === 1); - const isLastPage = computed(() => currentPage.value === pageCount.value); - if (isRef(page)) { - syncRef(page, currentPage, { - direction: isReadonly(page) ? "ltr" : "both" - }); - } - if (isRef(pageSize)) { - syncRef(pageSize, currentPageSize, { - direction: isReadonly(pageSize) ? "ltr" : "both" - }); - } - function prev() { - currentPage.value--; - } - function next() { - currentPage.value++; - } - const returnValue = { - currentPage, - currentPageSize, - pageCount, - isFirstPage, - isLastPage, - prev, - next - }; - watch(currentPage, () => { - onPageChange(reactive(returnValue)); - }); - watch(currentPageSize, () => { - onPageSizeChange(reactive(returnValue)); - }); - watch(pageCount, () => { - onPageCountChange(reactive(returnValue)); - }); - return returnValue; -} -function useOnline(options = {}) { - const { isOnline } = useNetwork(options); - return isOnline; -} -function usePageLeave(options = {}) { - const { window: window2 = defaultWindow } = options; - const isLeft = ref(false); - const handler = (event) => { - if (!window2) - return; - event = event || window2.event; - const from = event.relatedTarget || event.toElement; - isLeft.value = !from; - }; - if (window2) { - useEventListener(window2, "mouseout", handler, { passive: true }); - useEventListener(window2.document, "mouseleave", handler, { passive: true }); - useEventListener(window2.document, "mouseenter", handler, { passive: true }); - } - return isLeft; -} -function useScreenOrientation(options = {}) { - const { - window: window2 = defaultWindow - } = options; - const isSupported = useSupported(() => window2 && "screen" in window2 && "orientation" in window2.screen); - const screenOrientation = isSupported.value ? window2.screen.orientation : {}; - const orientation = ref(screenOrientation.type); - const angle = ref(screenOrientation.angle || 0); - if (isSupported.value) { - useEventListener(window2, "orientationchange", () => { - orientation.value = screenOrientation.type; - angle.value = screenOrientation.angle; - }); - } - const lockOrientation = (type) => { - if (isSupported.value && typeof screenOrientation.lock === "function") - return screenOrientation.lock(type); - return Promise.reject(new Error("Not supported")); - }; - const unlockOrientation = () => { - if (isSupported.value && typeof screenOrientation.unlock === "function") - screenOrientation.unlock(); - }; - return { - isSupported, - orientation, - angle, - lockOrientation, - unlockOrientation - }; -} -function useParallax(target, options = {}) { - const { - deviceOrientationTiltAdjust = (i) => i, - deviceOrientationRollAdjust = (i) => i, - mouseTiltAdjust = (i) => i, - mouseRollAdjust = (i) => i, - window: window2 = defaultWindow - } = options; - const orientation = reactive(useDeviceOrientation({ window: window2 })); - const screenOrientation = reactive(useScreenOrientation({ window: window2 })); - const { - elementX: x, - elementY: y, - elementWidth: width, - elementHeight: height - } = useMouseInElement(target, { handleOutside: false, window: window2 }); - const source = computed(() => { - if (orientation.isSupported && (orientation.alpha != null && orientation.alpha !== 0 || orientation.gamma != null && orientation.gamma !== 0)) { - return "deviceOrientation"; - } - return "mouse"; - }); - const roll = computed(() => { - if (source.value === "deviceOrientation") { - let value; - switch (screenOrientation.orientation) { - case "landscape-primary": - value = orientation.gamma / 90; - break; - case "landscape-secondary": - value = -orientation.gamma / 90; - break; - case "portrait-primary": - value = -orientation.beta / 90; - break; - case "portrait-secondary": - value = orientation.beta / 90; - break; - default: - value = -orientation.beta / 90; - } - return deviceOrientationRollAdjust(value); - } else { - const value = -(y.value - height.value / 2) / height.value; - return mouseRollAdjust(value); - } - }); - const tilt = computed(() => { - if (source.value === "deviceOrientation") { - let value; - switch (screenOrientation.orientation) { - case "landscape-primary": - value = orientation.beta / 90; - break; - case "landscape-secondary": - value = -orientation.beta / 90; - break; - case "portrait-primary": - value = orientation.gamma / 90; - break; - case "portrait-secondary": - value = -orientation.gamma / 90; - break; - default: - value = orientation.gamma / 90; - } - return deviceOrientationTiltAdjust(value); - } else { - const value = (x.value - width.value / 2) / width.value; - return mouseTiltAdjust(value); - } - }); - return { roll, tilt, source }; -} -function useParentElement(element = useCurrentElement()) { - const parentElement = shallowRef(); - const update = () => { - const el = unrefElement(element); - if (el) - parentElement.value = el.parentElement; - }; - tryOnMounted(update); - watch(() => toValue(element), update); - return parentElement; -} -function usePerformanceObserver(options, callback) { - const { - window: window2 = defaultWindow, - immediate = true, - ...performanceOptions - } = options; - const isSupported = useSupported(() => window2 && "PerformanceObserver" in window2); - let observer; - const stop = () => { - observer == null ? void 0 : observer.disconnect(); - }; - const start = () => { - if (isSupported.value) { - stop(); - observer = new PerformanceObserver(callback); - observer.observe(performanceOptions); - } - }; - tryOnScopeDispose(stop); - if (immediate) - start(); - return { - isSupported, - start, - stop - }; -} -var defaultState = { - x: 0, - y: 0, - pointerId: 0, - pressure: 0, - tiltX: 0, - tiltY: 0, - width: 0, - height: 0, - twist: 0, - pointerType: null -}; -var keys = Object.keys(defaultState); -function usePointer(options = {}) { - const { - target = defaultWindow - } = options; - const isInside = ref(false); - const state = ref(options.initialValue || {}); - Object.assign(state.value, defaultState, state.value); - const handler = (event) => { - isInside.value = true; - if (options.pointerTypes && !options.pointerTypes.includes(event.pointerType)) - return; - state.value = objectPick(event, keys, false); - }; - if (target) { - const listenerOptions = { passive: true }; - useEventListener(target, ["pointerdown", "pointermove", "pointerup"], handler, listenerOptions); - useEventListener(target, "pointerleave", () => isInside.value = false, listenerOptions); - } - return { - ...toRefs2(state), - isInside - }; -} -function usePointerLock(target, options = {}) { - const { document: document2 = defaultDocument } = options; - const isSupported = useSupported(() => document2 && "pointerLockElement" in document2); - const element = ref(); - const triggerElement = ref(); - let targetElement; - if (isSupported.value) { - useEventListener(document2, "pointerlockchange", () => { - var _a; - const currentElement = (_a = document2.pointerLockElement) != null ? _a : element.value; - if (targetElement && currentElement === targetElement) { - element.value = document2.pointerLockElement; - if (!element.value) - targetElement = triggerElement.value = null; - } - }); - useEventListener(document2, "pointerlockerror", () => { - var _a; - const currentElement = (_a = document2.pointerLockElement) != null ? _a : element.value; - if (targetElement && currentElement === targetElement) { - const action = document2.pointerLockElement ? "release" : "acquire"; - throw new Error(`Failed to ${action} pointer lock.`); - } - }); - } - async function lock(e) { - var _a; - if (!isSupported.value) - throw new Error("Pointer Lock API is not supported by your browser."); - triggerElement.value = e instanceof Event ? e.currentTarget : null; - targetElement = e instanceof Event ? (_a = unrefElement(target)) != null ? _a : triggerElement.value : unrefElement(e); - if (!targetElement) - throw new Error("Target element undefined."); - targetElement.requestPointerLock(); - return await until(element).toBe(targetElement); - } - async function unlock() { - if (!element.value) - return false; - document2.exitPointerLock(); - await until(element).toBeNull(); - return true; - } - return { - isSupported, - element, - triggerElement, - lock, - unlock - }; -} -function usePointerSwipe(target, options = {}) { - const targetRef = toRef2(target); - const { - threshold = 50, - onSwipe, - onSwipeEnd, - onSwipeStart, - disableTextSelect = false - } = options; - const posStart = reactive({ x: 0, y: 0 }); - const updatePosStart = (x, y) => { - posStart.x = x; - posStart.y = y; - }; - const posEnd = reactive({ x: 0, y: 0 }); - const updatePosEnd = (x, y) => { - posEnd.x = x; - posEnd.y = y; - }; - const distanceX = computed(() => posStart.x - posEnd.x); - const distanceY = computed(() => posStart.y - posEnd.y); - const { max, abs } = Math; - const isThresholdExceeded = computed(() => max(abs(distanceX.value), abs(distanceY.value)) >= threshold); - const isSwiping = ref(false); - const isPointerDown = ref(false); - const direction = computed(() => { - if (!isThresholdExceeded.value) - return "none"; - if (abs(distanceX.value) > abs(distanceY.value)) { - return distanceX.value > 0 ? "left" : "right"; - } else { - return distanceY.value > 0 ? "up" : "down"; - } - }); - const eventIsAllowed = (e) => { - var _a, _b, _c; - const isReleasingButton = e.buttons === 0; - const isPrimaryButton = e.buttons === 1; - return (_c = (_b = (_a = options.pointerTypes) == null ? void 0 : _a.includes(e.pointerType)) != null ? _b : isReleasingButton || isPrimaryButton) != null ? _c : true; - }; - const stops = [ - useEventListener(target, "pointerdown", (e) => { - if (!eventIsAllowed(e)) - return; - isPointerDown.value = true; - const eventTarget = e.target; - eventTarget == null ? void 0 : eventTarget.setPointerCapture(e.pointerId); - const { clientX: x, clientY: y } = e; - updatePosStart(x, y); - updatePosEnd(x, y); - onSwipeStart == null ? void 0 : onSwipeStart(e); - }), - useEventListener(target, "pointermove", (e) => { - if (!eventIsAllowed(e)) - return; - if (!isPointerDown.value) - return; - const { clientX: x, clientY: y } = e; - updatePosEnd(x, y); - if (!isSwiping.value && isThresholdExceeded.value) - isSwiping.value = true; - if (isSwiping.value) - onSwipe == null ? void 0 : onSwipe(e); - }), - useEventListener(target, "pointerup", (e) => { - if (!eventIsAllowed(e)) - return; - if (isSwiping.value) - onSwipeEnd == null ? void 0 : onSwipeEnd(e, direction.value); - isPointerDown.value = false; - isSwiping.value = false; - }) - ]; - tryOnMounted(() => { - var _a, _b, _c, _d, _e, _f, _g, _h; - (_b = (_a = targetRef.value) == null ? void 0 : _a.style) == null ? void 0 : _b.setProperty("touch-action", "none"); - if (disableTextSelect) { - (_d = (_c = targetRef.value) == null ? void 0 : _c.style) == null ? void 0 : _d.setProperty("-webkit-user-select", "none"); - (_f = (_e = targetRef.value) == null ? void 0 : _e.style) == null ? void 0 : _f.setProperty("-ms-user-select", "none"); - (_h = (_g = targetRef.value) == null ? void 0 : _g.style) == null ? void 0 : _h.setProperty("user-select", "none"); - } - }); - const stop = () => stops.forEach((s) => s()); - return { - isSwiping: readonly(isSwiping), - direction: readonly(direction), - posStart: readonly(posStart), - posEnd: readonly(posEnd), - distanceX, - distanceY, - stop - }; -} -function usePreferredColorScheme(options) { - const isLight = useMediaQuery("(prefers-color-scheme: light)", options); - const isDark = useMediaQuery("(prefers-color-scheme: dark)", options); - return computed(() => { - if (isDark.value) - return "dark"; - if (isLight.value) - return "light"; - return "no-preference"; - }); -} -function usePreferredContrast(options) { - const isMore = useMediaQuery("(prefers-contrast: more)", options); - const isLess = useMediaQuery("(prefers-contrast: less)", options); - const isCustom = useMediaQuery("(prefers-contrast: custom)", options); - return computed(() => { - if (isMore.value) - return "more"; - if (isLess.value) - return "less"; - if (isCustom.value) - return "custom"; - return "no-preference"; - }); -} -function usePreferredLanguages(options = {}) { - const { window: window2 = defaultWindow } = options; - if (!window2) - return ref(["en"]); - const navigator = window2.navigator; - const value = ref(navigator.languages); - useEventListener(window2, "languagechange", () => { - value.value = navigator.languages; - }); - return value; -} -function usePreferredReducedMotion(options) { - const isReduced = useMediaQuery("(prefers-reduced-motion: reduce)", options); - return computed(() => { - if (isReduced.value) - return "reduce"; - return "no-preference"; - }); -} -function usePrevious(value, initialValue) { - const previous = shallowRef(initialValue); - watch( - toRef2(value), - (_, oldValue) => { - previous.value = oldValue; - }, - { flush: "sync" } - ); - return readonly(previous); -} -var topVarName = "--vueuse-safe-area-top"; -var rightVarName = "--vueuse-safe-area-right"; -var bottomVarName = "--vueuse-safe-area-bottom"; -var leftVarName = "--vueuse-safe-area-left"; -function useScreenSafeArea() { - const top = ref(""); - const right = ref(""); - const bottom = ref(""); - const left = ref(""); - if (isClient) { - const topCssVar = useCssVar(topVarName); - const rightCssVar = useCssVar(rightVarName); - const bottomCssVar = useCssVar(bottomVarName); - const leftCssVar = useCssVar(leftVarName); - topCssVar.value = "env(safe-area-inset-top, 0px)"; - rightCssVar.value = "env(safe-area-inset-right, 0px)"; - bottomCssVar.value = "env(safe-area-inset-bottom, 0px)"; - leftCssVar.value = "env(safe-area-inset-left, 0px)"; - update(); - useEventListener("resize", useDebounceFn(update)); - } - function update() { - top.value = getValue(topVarName); - right.value = getValue(rightVarName); - bottom.value = getValue(bottomVarName); - left.value = getValue(leftVarName); - } - return { - top, - right, - bottom, - left, - update - }; -} -function getValue(position) { - return getComputedStyle(document.documentElement).getPropertyValue(position); -} -function useScriptTag(src, onLoaded = noop, options = {}) { - const { - immediate = true, - manual = false, - type = "text/javascript", - async = true, - crossOrigin, - referrerPolicy, - noModule, - defer, - document: document2 = defaultDocument, - attrs = {} - } = options; - const scriptTag = ref(null); - let _promise = null; - const loadScript = (waitForScriptLoad) => new Promise((resolve, reject) => { - const resolveWithElement = (el2) => { - scriptTag.value = el2; - resolve(el2); - return el2; - }; - if (!document2) { - resolve(false); - return; - } - let shouldAppend = false; - let el = document2.querySelector(`script[src="${toValue(src)}"]`); - if (!el) { - el = document2.createElement("script"); - el.type = type; - el.async = async; - el.src = toValue(src); - if (defer) - el.defer = defer; - if (crossOrigin) - el.crossOrigin = crossOrigin; - if (noModule) - el.noModule = noModule; - if (referrerPolicy) - el.referrerPolicy = referrerPolicy; - Object.entries(attrs).forEach(([name, value]) => el == null ? void 0 : el.setAttribute(name, value)); - shouldAppend = true; - } else if (el.hasAttribute("data-loaded")) { - resolveWithElement(el); - } - el.addEventListener("error", (event) => reject(event)); - el.addEventListener("abort", (event) => reject(event)); - el.addEventListener("load", () => { - el.setAttribute("data-loaded", "true"); - onLoaded(el); - resolveWithElement(el); - }); - if (shouldAppend) - el = document2.head.appendChild(el); - if (!waitForScriptLoad) - resolveWithElement(el); - }); - const load = (waitForScriptLoad = true) => { - if (!_promise) - _promise = loadScript(waitForScriptLoad); - return _promise; - }; - const unload = () => { - if (!document2) - return; - _promise = null; - if (scriptTag.value) - scriptTag.value = null; - const el = document2.querySelector(`script[src="${toValue(src)}"]`); - if (el) - document2.head.removeChild(el); - }; - if (immediate && !manual) - tryOnMounted(load); - if (!manual) - tryOnUnmounted(unload); - return { scriptTag, load, unload }; -} -function checkOverflowScroll(ele) { - const style = window.getComputedStyle(ele); - if (style.overflowX === "scroll" || style.overflowY === "scroll" || style.overflowX === "auto" && ele.clientWidth < ele.scrollWidth || style.overflowY === "auto" && ele.clientHeight < ele.scrollHeight) { - return true; - } else { - const parent = ele.parentNode; - if (!parent || parent.tagName === "BODY") - return false; - return checkOverflowScroll(parent); - } -} -function preventDefault(rawEvent) { - const e = rawEvent || window.event; - const _target = e.target; - if (checkOverflowScroll(_target)) - return false; - if (e.touches.length > 1) - return true; - if (e.preventDefault) - e.preventDefault(); - return false; -} -var elInitialOverflow = /* @__PURE__ */ new WeakMap(); -function useScrollLock(element, initialState = false) { - const isLocked = ref(initialState); - let stopTouchMoveListener = null; - let initialOverflow = ""; - watch(toRef2(element), (el) => { - const target = resolveElement(toValue(el)); - if (target) { - const ele = target; - if (!elInitialOverflow.get(ele)) - elInitialOverflow.set(ele, ele.style.overflow); - if (ele.style.overflow !== "hidden") - initialOverflow = ele.style.overflow; - if (ele.style.overflow === "hidden") - return isLocked.value = true; - if (isLocked.value) - return ele.style.overflow = "hidden"; - } - }, { - immediate: true - }); - const lock = () => { - const el = resolveElement(toValue(element)); - if (!el || isLocked.value) - return; - if (isIOS) { - stopTouchMoveListener = useEventListener( - el, - "touchmove", - (e) => { - preventDefault(e); - }, - { passive: false } - ); - } - el.style.overflow = "hidden"; - isLocked.value = true; - }; - const unlock = () => { - const el = resolveElement(toValue(element)); - if (!el || !isLocked.value) - return; - isIOS && (stopTouchMoveListener == null ? void 0 : stopTouchMoveListener()); - el.style.overflow = initialOverflow; - elInitialOverflow.delete(el); - isLocked.value = false; - }; - tryOnScopeDispose(unlock); - return computed({ - get() { - return isLocked.value; - }, - set(v) { - if (v) - lock(); - else unlock(); - } - }); -} -function useSessionStorage(key, initialValue, options = {}) { - const { window: window2 = defaultWindow } = options; - return useStorage(key, initialValue, window2 == null ? void 0 : window2.sessionStorage, options); -} -function useShare(shareOptions = {}, options = {}) { - const { navigator = defaultNavigator } = options; - const _navigator = navigator; - const isSupported = useSupported(() => _navigator && "canShare" in _navigator); - const share = async (overrideOptions = {}) => { - if (isSupported.value) { - const data = { - ...toValue(shareOptions), - ...toValue(overrideOptions) - }; - let granted = true; - if (data.files && _navigator.canShare) - granted = _navigator.canShare({ files: data.files }); - if (granted) - return _navigator.share(data); - } - }; - return { - isSupported, - share - }; -} -var defaultSortFn = (source, compareFn) => source.sort(compareFn); -var defaultCompare = (a, b) => a - b; -function useSorted(...args) { - var _a, _b, _c, _d; - const [source] = args; - let compareFn = defaultCompare; - let options = {}; - if (args.length === 2) { - if (typeof args[1] === "object") { - options = args[1]; - compareFn = (_a = options.compareFn) != null ? _a : defaultCompare; - } else { - compareFn = (_b = args[1]) != null ? _b : defaultCompare; - } - } else if (args.length > 2) { - compareFn = (_c = args[1]) != null ? _c : defaultCompare; - options = (_d = args[2]) != null ? _d : {}; - } - const { - dirty = false, - sortFn = defaultSortFn - } = options; - if (!dirty) - return computed(() => sortFn([...toValue(source)], compareFn)); - watchEffect(() => { - const result = sortFn(toValue(source), compareFn); - if (isRef(source)) - source.value = result; - else - source.splice(0, source.length, ...result); - }); - return source; -} -function useSpeechRecognition(options = {}) { - const { - interimResults = true, - continuous = true, - window: window2 = defaultWindow - } = options; - const lang = toRef2(options.lang || "en-US"); - const isListening = ref(false); - const isFinal = ref(false); - const result = ref(""); - const error = shallowRef(void 0); - const toggle = (value = !isListening.value) => { - isListening.value = value; - }; - const start = () => { - isListening.value = true; - }; - const stop = () => { - isListening.value = false; - }; - const SpeechRecognition = window2 && (window2.SpeechRecognition || window2.webkitSpeechRecognition); - const isSupported = useSupported(() => SpeechRecognition); - let recognition; - if (isSupported.value) { - recognition = new SpeechRecognition(); - recognition.continuous = continuous; - recognition.interimResults = interimResults; - recognition.lang = toValue(lang); - recognition.onstart = () => { - isFinal.value = false; - }; - watch(lang, (lang2) => { - if (recognition && !isListening.value) - recognition.lang = lang2; - }); - recognition.onresult = (event) => { - const currentResult = event.results[event.resultIndex]; - const { transcript } = currentResult[0]; - isFinal.value = currentResult.isFinal; - result.value = transcript; - error.value = void 0; - }; - recognition.onerror = (event) => { - error.value = event; - }; - recognition.onend = () => { - isListening.value = false; - recognition.lang = toValue(lang); - }; - watch(isListening, () => { - if (isListening.value) - recognition.start(); - else - recognition.stop(); - }); - } - tryOnScopeDispose(() => { - isListening.value = false; - }); - return { - isSupported, - isListening, - isFinal, - recognition, - result, - error, - toggle, - start, - stop - }; -} -function useSpeechSynthesis(text, options = {}) { - const { - pitch = 1, - rate = 1, - volume = 1, - window: window2 = defaultWindow - } = options; - const synth = window2 && window2.speechSynthesis; - const isSupported = useSupported(() => synth); - const isPlaying = ref(false); - const status = ref("init"); - const spokenText = toRef2(text || ""); - const lang = toRef2(options.lang || "en-US"); - const error = shallowRef(void 0); - const toggle = (value = !isPlaying.value) => { - isPlaying.value = value; - }; - const bindEventsForUtterance = (utterance2) => { - utterance2.lang = toValue(lang); - utterance2.voice = toValue(options.voice) || null; - utterance2.pitch = toValue(pitch); - utterance2.rate = toValue(rate); - utterance2.volume = volume; - utterance2.onstart = () => { - isPlaying.value = true; - status.value = "play"; - }; - utterance2.onpause = () => { - isPlaying.value = false; - status.value = "pause"; - }; - utterance2.onresume = () => { - isPlaying.value = true; - status.value = "play"; - }; - utterance2.onend = () => { - isPlaying.value = false; - status.value = "end"; - }; - utterance2.onerror = (event) => { - error.value = event; - }; - }; - const utterance = computed(() => { - isPlaying.value = false; - status.value = "init"; - const newUtterance = new SpeechSynthesisUtterance(spokenText.value); - bindEventsForUtterance(newUtterance); - return newUtterance; - }); - const speak = () => { - synth.cancel(); - utterance && synth.speak(utterance.value); - }; - const stop = () => { - synth.cancel(); - isPlaying.value = false; - }; - if (isSupported.value) { - bindEventsForUtterance(utterance.value); - watch(lang, (lang2) => { - if (utterance.value && !isPlaying.value) - utterance.value.lang = lang2; - }); - if (options.voice) { - watch(options.voice, () => { - synth.cancel(); - }); - } - watch(isPlaying, () => { - if (isPlaying.value) - synth.resume(); - else - synth.pause(); - }); - } - tryOnScopeDispose(() => { - isPlaying.value = false; - }); - return { - isSupported, - isPlaying, - status, - utterance, - error, - stop, - toggle, - speak - }; -} -function useStepper(steps, initialStep) { - const stepsRef = ref(steps); - const stepNames = computed(() => Array.isArray(stepsRef.value) ? stepsRef.value : Object.keys(stepsRef.value)); - const index = ref(stepNames.value.indexOf(initialStep != null ? initialStep : stepNames.value[0])); - const current = computed(() => at(index.value)); - const isFirst = computed(() => index.value === 0); - const isLast = computed(() => index.value === stepNames.value.length - 1); - const next = computed(() => stepNames.value[index.value + 1]); - const previous = computed(() => stepNames.value[index.value - 1]); - function at(index2) { - if (Array.isArray(stepsRef.value)) - return stepsRef.value[index2]; - return stepsRef.value[stepNames.value[index2]]; - } - function get2(step) { - if (!stepNames.value.includes(step)) - return; - return at(stepNames.value.indexOf(step)); - } - function goTo(step) { - if (stepNames.value.includes(step)) - index.value = stepNames.value.indexOf(step); - } - function goToNext() { - if (isLast.value) - return; - index.value++; - } - function goToPrevious() { - if (isFirst.value) - return; - index.value--; - } - function goBackTo(step) { - if (isAfter(step)) - goTo(step); - } - function isNext(step) { - return stepNames.value.indexOf(step) === index.value + 1; - } - function isPrevious(step) { - return stepNames.value.indexOf(step) === index.value - 1; - } - function isCurrent(step) { - return stepNames.value.indexOf(step) === index.value; - } - function isBefore(step) { - return index.value < stepNames.value.indexOf(step); - } - function isAfter(step) { - return index.value > stepNames.value.indexOf(step); - } - return { - steps: stepsRef, - stepNames, - index, - current, - next, - previous, - isFirst, - isLast, - at, - get: get2, - goTo, - goToNext, - goToPrevious, - goBackTo, - isNext, - isPrevious, - isCurrent, - isBefore, - isAfter - }; -} -function useStorageAsync(key, initialValue, storage, options = {}) { - var _a; - const { - flush = "pre", - deep = true, - listenToStorageChanges = true, - writeDefaults = true, - mergeDefaults = false, - shallow, - window: window2 = defaultWindow, - eventFilter, - onError = (e) => { - console.error(e); - } - } = options; - const rawInit = toValue(initialValue); - const type = guessSerializerType(rawInit); - const data = (shallow ? shallowRef : ref)(initialValue); - const serializer = (_a = options.serializer) != null ? _a : StorageSerializers[type]; - if (!storage) { - try { - storage = getSSRHandler("getDefaultStorageAsync", () => { - var _a2; - return (_a2 = defaultWindow) == null ? void 0 : _a2.localStorage; - })(); - } catch (e) { - onError(e); - } - } - async function read(event) { - if (!storage || event && event.key !== key) - return; - try { - const rawValue = event ? event.newValue : await storage.getItem(key); - if (rawValue == null) { - data.value = rawInit; - if (writeDefaults && rawInit !== null) - await storage.setItem(key, await serializer.write(rawInit)); - } else if (mergeDefaults) { - const value = await serializer.read(rawValue); - if (typeof mergeDefaults === "function") - data.value = mergeDefaults(value, rawInit); - else if (type === "object" && !Array.isArray(value)) - data.value = { ...rawInit, ...value }; - else data.value = value; - } else { - data.value = await serializer.read(rawValue); - } - } catch (e) { - onError(e); - } - } - read(); - if (window2 && listenToStorageChanges) - useEventListener(window2, "storage", (e) => Promise.resolve().then(() => read(e))); - if (storage) { - watchWithFilter( - data, - async () => { - try { - if (data.value == null) - await storage.removeItem(key); - else - await storage.setItem(key, await serializer.write(data.value)); - } catch (e) { - onError(e); - } - }, - { - flush, - deep, - eventFilter - } - ); - } - return data; -} -var _id = 0; -function useStyleTag(css, options = {}) { - const isLoaded = ref(false); - const { - document: document2 = defaultDocument, - immediate = true, - manual = false, - id = `vueuse_styletag_${++_id}` - } = options; - const cssRef = ref(css); - let stop = () => { - }; - const load = () => { - if (!document2) - return; - const el = document2.getElementById(id) || document2.createElement("style"); - if (!el.isConnected) { - el.id = id; - if (options.media) - el.media = options.media; - document2.head.appendChild(el); - } - if (isLoaded.value) - return; - stop = watch( - cssRef, - (value) => { - el.textContent = value; - }, - { immediate: true } - ); - isLoaded.value = true; - }; - const unload = () => { - if (!document2 || !isLoaded.value) - return; - stop(); - document2.head.removeChild(document2.getElementById(id)); - isLoaded.value = false; - }; - if (immediate && !manual) - tryOnMounted(load); - if (!manual) - tryOnScopeDispose(unload); - return { - id, - css: cssRef, - unload, - load, - isLoaded: readonly(isLoaded) - }; -} -function useSwipe(target, options = {}) { - const { - threshold = 50, - onSwipe, - onSwipeEnd, - onSwipeStart, - passive = true, - window: window2 = defaultWindow - } = options; - const coordsStart = reactive({ x: 0, y: 0 }); - const coordsEnd = reactive({ x: 0, y: 0 }); - const diffX = computed(() => coordsStart.x - coordsEnd.x); - const diffY = computed(() => coordsStart.y - coordsEnd.y); - const { max, abs } = Math; - const isThresholdExceeded = computed(() => max(abs(diffX.value), abs(diffY.value)) >= threshold); - const isSwiping = ref(false); - const direction = computed(() => { - if (!isThresholdExceeded.value) - return "none"; - if (abs(diffX.value) > abs(diffY.value)) { - return diffX.value > 0 ? "left" : "right"; - } else { - return diffY.value > 0 ? "up" : "down"; - } - }); - const getTouchEventCoords = (e) => [e.touches[0].clientX, e.touches[0].clientY]; - const updateCoordsStart = (x, y) => { - coordsStart.x = x; - coordsStart.y = y; - }; - const updateCoordsEnd = (x, y) => { - coordsEnd.x = x; - coordsEnd.y = y; - }; - let listenerOptions; - const isPassiveEventSupported = checkPassiveEventSupport(window2 == null ? void 0 : window2.document); - if (!passive) - listenerOptions = isPassiveEventSupported ? { passive: false, capture: true } : { capture: true }; - else - listenerOptions = isPassiveEventSupported ? { passive: true } : { capture: false }; - const onTouchEnd = (e) => { - if (isSwiping.value) - onSwipeEnd == null ? void 0 : onSwipeEnd(e, direction.value); - isSwiping.value = false; - }; - const stops = [ - useEventListener(target, "touchstart", (e) => { - if (e.touches.length !== 1) - return; - if (listenerOptions.capture && !listenerOptions.passive) - e.preventDefault(); - const [x, y] = getTouchEventCoords(e); - updateCoordsStart(x, y); - updateCoordsEnd(x, y); - onSwipeStart == null ? void 0 : onSwipeStart(e); - }, listenerOptions), - useEventListener(target, "touchmove", (e) => { - if (e.touches.length !== 1) - return; - const [x, y] = getTouchEventCoords(e); - updateCoordsEnd(x, y); - if (!isSwiping.value && isThresholdExceeded.value) - isSwiping.value = true; - if (isSwiping.value) - onSwipe == null ? void 0 : onSwipe(e); - }, listenerOptions), - useEventListener(target, ["touchend", "touchcancel"], onTouchEnd, listenerOptions) - ]; - const stop = () => stops.forEach((s) => s()); - return { - isPassiveEventSupported, - isSwiping, - direction, - coordsStart, - coordsEnd, - lengthX: diffX, - lengthY: diffY, - stop - }; -} -function checkPassiveEventSupport(document2) { - if (!document2) - return false; - let supportsPassive = false; - const optionsBlock = { - get passive() { - supportsPassive = true; - return false; - } - }; - document2.addEventListener("x", noop, optionsBlock); - document2.removeEventListener("x", noop); - return supportsPassive; -} -function useTemplateRefsList() { - const refs = ref([]); - refs.value.set = (el) => { - if (el) - refs.value.push(el); - }; - onBeforeUpdate(() => { - refs.value.length = 0; - }); - return refs; -} -function useTextDirection(options = {}) { - const { - document: document2 = defaultDocument, - selector = "html", - observe = false, - initialValue = "ltr" - } = options; - function getValue2() { - var _a, _b; - return (_b = (_a = document2 == null ? void 0 : document2.querySelector(selector)) == null ? void 0 : _a.getAttribute("dir")) != null ? _b : initialValue; - } - const dir = ref(getValue2()); - tryOnMounted(() => dir.value = getValue2()); - if (observe && document2) { - useMutationObserver( - document2.querySelector(selector), - () => dir.value = getValue2(), - { attributes: true } - ); - } - return computed({ - get() { - return dir.value; - }, - set(v) { - var _a, _b; - dir.value = v; - if (!document2) - return; - if (dir.value) - (_a = document2.querySelector(selector)) == null ? void 0 : _a.setAttribute("dir", dir.value); - else - (_b = document2.querySelector(selector)) == null ? void 0 : _b.removeAttribute("dir"); - } - }); -} -function getRangesFromSelection(selection) { - var _a; - const rangeCount = (_a = selection.rangeCount) != null ? _a : 0; - return Array.from({ length: rangeCount }, (_, i) => selection.getRangeAt(i)); -} -function useTextSelection(options = {}) { - const { - window: window2 = defaultWindow - } = options; - const selection = ref(null); - const text = computed(() => { - var _a, _b; - return (_b = (_a = selection.value) == null ? void 0 : _a.toString()) != null ? _b : ""; - }); - const ranges = computed(() => selection.value ? getRangesFromSelection(selection.value) : []); - const rects = computed(() => ranges.value.map((range) => range.getBoundingClientRect())); - function onSelectionChange() { - selection.value = null; - if (window2) - selection.value = window2.getSelection(); - } - if (window2) - useEventListener(window2.document, "selectionchange", onSelectionChange); - return { - text, - rects, - ranges, - selection - }; -} -function useTextareaAutosize(options) { - var _a; - const textarea = ref(options == null ? void 0 : options.element); - const input = ref(options == null ? void 0 : options.input); - const styleProp = (_a = options == null ? void 0 : options.styleProp) != null ? _a : "height"; - const textareaScrollHeight = ref(1); - function triggerResize() { - var _a2; - if (!textarea.value) - return; - let height = ""; - textarea.value.style[styleProp] = "1px"; - textareaScrollHeight.value = (_a2 = textarea.value) == null ? void 0 : _a2.scrollHeight; - if (options == null ? void 0 : options.styleTarget) - toValue(options.styleTarget).style[styleProp] = `${textareaScrollHeight.value}px`; - else - height = `${textareaScrollHeight.value}px`; - textarea.value.style[styleProp] = height; - } - watch([input, textarea], () => nextTick(triggerResize), { immediate: true }); - watch(textareaScrollHeight, () => { - var _a2; - return (_a2 = options == null ? void 0 : options.onResize) == null ? void 0 : _a2.call(options); - }); - useResizeObserver(textarea, () => triggerResize()); - if (options == null ? void 0 : options.watch) - watch(options.watch, triggerResize, { immediate: true, deep: true }); - return { - textarea, - input, - triggerResize - }; -} -function useThrottledRefHistory(source, options = {}) { - const { throttle = 200, trailing = true } = options; - const filter = throttleFilter(throttle, trailing); - const history = useRefHistory(source, { ...options, eventFilter: filter }); - return { - ...history - }; -} -var DEFAULT_UNITS = [ - { max: 6e4, value: 1e3, name: "second" }, - { max: 276e4, value: 6e4, name: "minute" }, - { max: 72e6, value: 36e5, name: "hour" }, - { max: 5184e5, value: 864e5, name: "day" }, - { max: 24192e5, value: 6048e5, name: "week" }, - { max: 28512e6, value: 2592e6, name: "month" }, - { max: Number.POSITIVE_INFINITY, value: 31536e6, name: "year" } -]; -var DEFAULT_MESSAGES = { - justNow: "just now", - past: (n) => n.match(/\d/) ? `${n} ago` : n, - future: (n) => n.match(/\d/) ? `in ${n}` : n, - month: (n, past) => n === 1 ? past ? "last month" : "next month" : `${n} month${n > 1 ? "s" : ""}`, - year: (n, past) => n === 1 ? past ? "last year" : "next year" : `${n} year${n > 1 ? "s" : ""}`, - day: (n, past) => n === 1 ? past ? "yesterday" : "tomorrow" : `${n} day${n > 1 ? "s" : ""}`, - week: (n, past) => n === 1 ? past ? "last week" : "next week" : `${n} week${n > 1 ? "s" : ""}`, - hour: (n) => `${n} hour${n > 1 ? "s" : ""}`, - minute: (n) => `${n} minute${n > 1 ? "s" : ""}`, - second: (n) => `${n} second${n > 1 ? "s" : ""}`, - invalid: "" -}; -function DEFAULT_FORMATTER(date) { - return date.toISOString().slice(0, 10); -} -function useTimeAgo(time, options = {}) { - const { - controls: exposeControls = false, - updateInterval = 3e4 - } = options; - const { now: now2, ...controls } = useNow({ interval: updateInterval, controls: true }); - const timeAgo = computed(() => formatTimeAgo(new Date(toValue(time)), options, toValue(now2))); - if (exposeControls) { - return { - timeAgo, - ...controls - }; - } else { - return timeAgo; - } -} -function formatTimeAgo(from, options = {}, now2 = Date.now()) { - var _a; - const { - max, - messages = DEFAULT_MESSAGES, - fullDateFormatter = DEFAULT_FORMATTER, - units = DEFAULT_UNITS, - showSecond = false, - rounding = "round" - } = options; - const roundFn = typeof rounding === "number" ? (n) => +n.toFixed(rounding) : Math[rounding]; - const diff = +now2 - +from; - const absDiff = Math.abs(diff); - function getValue2(diff2, unit) { - return roundFn(Math.abs(diff2) / unit.value); - } - function format(diff2, unit) { - const val = getValue2(diff2, unit); - const past = diff2 > 0; - const str = applyFormat(unit.name, val, past); - return applyFormat(past ? "past" : "future", str, past); - } - function applyFormat(name, val, isPast) { - const formatter = messages[name]; - if (typeof formatter === "function") - return formatter(val, isPast); - return formatter.replace("{0}", val.toString()); - } - if (absDiff < 6e4 && !showSecond) - return messages.justNow; - if (typeof max === "number" && absDiff > max) - return fullDateFormatter(new Date(from)); - if (typeof max === "string") { - const unitMax = (_a = units.find((i) => i.name === max)) == null ? void 0 : _a.max; - if (unitMax && absDiff > unitMax) - return fullDateFormatter(new Date(from)); - } - for (const [idx, unit] of units.entries()) { - const val = getValue2(diff, unit); - if (val <= 0 && units[idx - 1]) - return format(diff, units[idx - 1]); - if (absDiff < unit.max) - return format(diff, unit); - } - return messages.invalid; -} -function useTimeoutPoll(fn, interval, timeoutPollOptions) { - const { start } = useTimeoutFn(loop, interval, { immediate: false }); - const isActive = ref(false); - async function loop() { - if (!isActive.value) - return; - await fn(); - start(); - } - function resume() { - if (!isActive.value) { - isActive.value = true; - loop(); - } - } - function pause() { - isActive.value = false; - } - if (timeoutPollOptions == null ? void 0 : timeoutPollOptions.immediate) - resume(); - tryOnScopeDispose(pause); - return { - isActive, - pause, - resume - }; -} -function useTimestamp(options = {}) { - const { - controls: exposeControls = false, - offset = 0, - immediate = true, - interval = "requestAnimationFrame", - callback - } = options; - const ts = ref(timestamp() + offset); - const update = () => ts.value = timestamp() + offset; - const cb = callback ? () => { - update(); - callback(ts.value); - } : update; - const controls = interval === "requestAnimationFrame" ? useRafFn(cb, { immediate }) : useIntervalFn(cb, interval, { immediate }); - if (exposeControls) { - return { - timestamp: ts, - ...controls - }; - } else { - return ts; - } -} -function useTitle(newTitle = null, options = {}) { - var _a, _b, _c; - const { - document: document2 = defaultDocument, - restoreOnUnmount = (t) => t - } = options; - const originalTitle = (_a = document2 == null ? void 0 : document2.title) != null ? _a : ""; - const title = toRef2((_b = newTitle != null ? newTitle : document2 == null ? void 0 : document2.title) != null ? _b : null); - const isReadonly2 = newTitle && typeof newTitle === "function"; - function format(t) { - if (!("titleTemplate" in options)) - return t; - const template = options.titleTemplate || "%s"; - return typeof template === "function" ? template(t) : toValue(template).replace(/%s/g, t); - } - watch( - title, - (t, o) => { - if (t !== o && document2) - document2.title = format(typeof t === "string" ? t : ""); - }, - { immediate: true } - ); - if (options.observe && !options.titleTemplate && document2 && !isReadonly2) { - useMutationObserver( - (_c = document2.head) == null ? void 0 : _c.querySelector("title"), - () => { - if (document2 && document2.title !== title.value) - title.value = format(document2.title); - }, - { childList: true } - ); - } - tryOnBeforeUnmount(() => { - if (restoreOnUnmount) { - const restoredTitle = restoreOnUnmount(originalTitle, title.value || ""); - if (restoredTitle != null && document2) - document2.title = restoredTitle; - } - }); - return title; -} -var _TransitionPresets = { - easeInSine: [0.12, 0, 0.39, 0], - easeOutSine: [0.61, 1, 0.88, 1], - easeInOutSine: [0.37, 0, 0.63, 1], - easeInQuad: [0.11, 0, 0.5, 0], - easeOutQuad: [0.5, 1, 0.89, 1], - easeInOutQuad: [0.45, 0, 0.55, 1], - easeInCubic: [0.32, 0, 0.67, 0], - easeOutCubic: [0.33, 1, 0.68, 1], - easeInOutCubic: [0.65, 0, 0.35, 1], - easeInQuart: [0.5, 0, 0.75, 0], - easeOutQuart: [0.25, 1, 0.5, 1], - easeInOutQuart: [0.76, 0, 0.24, 1], - easeInQuint: [0.64, 0, 0.78, 0], - easeOutQuint: [0.22, 1, 0.36, 1], - easeInOutQuint: [0.83, 0, 0.17, 1], - easeInExpo: [0.7, 0, 0.84, 0], - easeOutExpo: [0.16, 1, 0.3, 1], - easeInOutExpo: [0.87, 0, 0.13, 1], - easeInCirc: [0.55, 0, 1, 0.45], - easeOutCirc: [0, 0.55, 0.45, 1], - easeInOutCirc: [0.85, 0, 0.15, 1], - easeInBack: [0.36, 0, 0.66, -0.56], - easeOutBack: [0.34, 1.56, 0.64, 1], - easeInOutBack: [0.68, -0.6, 0.32, 1.6] -}; -var TransitionPresets = Object.assign({}, { linear: identity }, _TransitionPresets); -function createEasingFunction([p0, p1, p2, p3]) { - const a = (a1, a2) => 1 - 3 * a2 + 3 * a1; - const b = (a1, a2) => 3 * a2 - 6 * a1; - const c = (a1) => 3 * a1; - const calcBezier = (t, a1, a2) => ((a(a1, a2) * t + b(a1, a2)) * t + c(a1)) * t; - const getSlope = (t, a1, a2) => 3 * a(a1, a2) * t * t + 2 * b(a1, a2) * t + c(a1); - const getTforX = (x) => { - let aGuessT = x; - for (let i = 0; i < 4; ++i) { - const currentSlope = getSlope(aGuessT, p0, p2); - if (currentSlope === 0) - return aGuessT; - const currentX = calcBezier(aGuessT, p0, p2) - x; - aGuessT -= currentX / currentSlope; - } - return aGuessT; - }; - return (x) => p0 === p1 && p2 === p3 ? x : calcBezier(getTforX(x), p1, p3); -} -function lerp(a, b, alpha) { - return a + alpha * (b - a); -} -function toVec(t) { - return (typeof t === "number" ? [t] : t) || []; -} -function executeTransition(source, from, to, options = {}) { - var _a, _b; - const fromVal = toValue(from); - const toVal = toValue(to); - const v1 = toVec(fromVal); - const v2 = toVec(toVal); - const duration = (_a = toValue(options.duration)) != null ? _a : 1e3; - const startedAt = Date.now(); - const endAt = Date.now() + duration; - const trans = typeof options.transition === "function" ? options.transition : (_b = toValue(options.transition)) != null ? _b : identity; - const ease = typeof trans === "function" ? trans : createEasingFunction(trans); - return new Promise((resolve) => { - source.value = fromVal; - const tick = () => { - var _a2; - if ((_a2 = options.abort) == null ? void 0 : _a2.call(options)) { - resolve(); - return; - } - const now2 = Date.now(); - const alpha = ease((now2 - startedAt) / duration); - const arr = toVec(source.value).map((n, i) => lerp(v1[i], v2[i], alpha)); - if (Array.isArray(source.value)) - source.value = arr.map((n, i) => { - var _a3, _b2; - return lerp((_a3 = v1[i]) != null ? _a3 : 0, (_b2 = v2[i]) != null ? _b2 : 0, alpha); - }); - else if (typeof source.value === "number") - source.value = arr[0]; - if (now2 < endAt) { - requestAnimationFrame(tick); - } else { - source.value = toVal; - resolve(); - } - }; - tick(); - }); -} -function useTransition(source, options = {}) { - let currentId = 0; - const sourceVal = () => { - const v = toValue(source); - return typeof v === "number" ? v : v.map(toValue); - }; - const outputRef = ref(sourceVal()); - watch(sourceVal, async (to) => { - var _a, _b; - if (toValue(options.disabled)) - return; - const id = ++currentId; - if (options.delay) - await promiseTimeout(toValue(options.delay)); - if (id !== currentId) - return; - const toVal = Array.isArray(to) ? to.map(toValue) : toValue(to); - (_a = options.onStarted) == null ? void 0 : _a.call(options); - await executeTransition(outputRef, outputRef.value, toVal, { - ...options, - abort: () => { - var _a2; - return id !== currentId || ((_a2 = options.abort) == null ? void 0 : _a2.call(options)); - } - }); - (_b = options.onFinished) == null ? void 0 : _b.call(options); - }, { deep: true }); - watch(() => toValue(options.disabled), (disabled) => { - if (disabled) { - currentId++; - outputRef.value = sourceVal(); - } - }); - tryOnScopeDispose(() => { - currentId++; - }); - return computed(() => toValue(options.disabled) ? sourceVal() : outputRef.value); -} -function useUrlSearchParams(mode = "history", options = {}) { - const { - initialValue = {}, - removeNullishValues = true, - removeFalsyValues = false, - write: enableWrite = true, - window: window2 = defaultWindow - } = options; - if (!window2) - return reactive(initialValue); - const state = reactive({}); - function getRawParams() { - if (mode === "history") { - return window2.location.search || ""; - } else if (mode === "hash") { - const hash = window2.location.hash || ""; - const index = hash.indexOf("?"); - return index > 0 ? hash.slice(index) : ""; - } else { - return (window2.location.hash || "").replace(/^#/, ""); - } - } - function constructQuery(params) { - const stringified = params.toString(); - if (mode === "history") - return `${stringified ? `?${stringified}` : ""}${window2.location.hash || ""}`; - if (mode === "hash-params") - return `${window2.location.search || ""}${stringified ? `#${stringified}` : ""}`; - const hash = window2.location.hash || "#"; - const index = hash.indexOf("?"); - if (index > 0) - return `${hash.slice(0, index)}${stringified ? `?${stringified}` : ""}`; - return `${hash}${stringified ? `?${stringified}` : ""}`; - } - function read() { - return new URLSearchParams(getRawParams()); - } - function updateState(params) { - const unusedKeys = new Set(Object.keys(state)); - for (const key of params.keys()) { - const paramsForKey = params.getAll(key); - state[key] = paramsForKey.length > 1 ? paramsForKey : params.get(key) || ""; - unusedKeys.delete(key); - } - Array.from(unusedKeys).forEach((key) => delete state[key]); - } - const { pause, resume } = watchPausable( - state, - () => { - const params = new URLSearchParams(""); - Object.keys(state).forEach((key) => { - const mapEntry = state[key]; - if (Array.isArray(mapEntry)) - mapEntry.forEach((value) => params.append(key, value)); - else if (removeNullishValues && mapEntry == null) - params.delete(key); - else if (removeFalsyValues && !mapEntry) - params.delete(key); - else - params.set(key, mapEntry); - }); - write(params); - }, - { deep: true } - ); - function write(params, shouldUpdate) { - pause(); - if (shouldUpdate) - updateState(params); - window2.history.replaceState( - window2.history.state, - window2.document.title, - window2.location.pathname + constructQuery(params) - ); - resume(); - } - function onChanged() { - if (!enableWrite) - return; - write(read(), true); - } - useEventListener(window2, "popstate", onChanged, false); - if (mode !== "history") - useEventListener(window2, "hashchange", onChanged, false); - const initial = read(); - if (initial.keys().next().value) - updateState(initial); - else - Object.assign(state, initialValue); - return state; -} -function useUserMedia(options = {}) { - var _a, _b; - const enabled = ref((_a = options.enabled) != null ? _a : false); - const autoSwitch = ref((_b = options.autoSwitch) != null ? _b : true); - const constraints = ref(options.constraints); - const { navigator = defaultNavigator } = options; - const isSupported = useSupported(() => { - var _a2; - return (_a2 = navigator == null ? void 0 : navigator.mediaDevices) == null ? void 0 : _a2.getUserMedia; - }); - const stream = shallowRef(); - function getDeviceOptions(type) { - switch (type) { - case "video": { - if (constraints.value) - return constraints.value.video || false; - break; - } - case "audio": { - if (constraints.value) - return constraints.value.audio || false; - break; - } - } - } - async function _start() { - if (!isSupported.value || stream.value) - return; - stream.value = await navigator.mediaDevices.getUserMedia({ - video: getDeviceOptions("video"), - audio: getDeviceOptions("audio") - }); - return stream.value; - } - function _stop() { - var _a2; - (_a2 = stream.value) == null ? void 0 : _a2.getTracks().forEach((t) => t.stop()); - stream.value = void 0; - } - function stop() { - _stop(); - enabled.value = false; - } - async function start() { - await _start(); - if (stream.value) - enabled.value = true; - return stream.value; - } - async function restart() { - _stop(); - return await start(); - } - watch( - enabled, - (v) => { - if (v) - _start(); - else _stop(); - }, - { immediate: true } - ); - watch( - constraints, - () => { - if (autoSwitch.value && stream.value) - restart(); - }, - { immediate: true } - ); - tryOnScopeDispose(() => { - stop(); - }); - return { - isSupported, - stream, - start, - stop, - restart, - constraints, - enabled, - autoSwitch - }; -} -function useVModel(props, key, emit, options = {}) { - var _a, _b, _c, _d, _e; - const { - clone = false, - passive = false, - eventName, - deep = false, - defaultValue, - shouldEmit - } = options; - const vm = getCurrentInstance(); - const _emit = emit || (vm == null ? void 0 : vm.emit) || ((_a = vm == null ? void 0 : vm.$emit) == null ? void 0 : _a.bind(vm)) || ((_c = (_b = vm == null ? void 0 : vm.proxy) == null ? void 0 : _b.$emit) == null ? void 0 : _c.bind(vm == null ? void 0 : vm.proxy)); - let event = eventName; - if (!key) { - if (isVue2) { - const modelOptions = (_e = (_d = vm == null ? void 0 : vm.proxy) == null ? void 0 : _d.$options) == null ? void 0 : _e.model; - key = (modelOptions == null ? void 0 : modelOptions.value) || "value"; - if (!eventName) - event = (modelOptions == null ? void 0 : modelOptions.event) || "input"; - } else { - key = "modelValue"; - } - } - event = event || `update:${key.toString()}`; - const cloneFn = (val) => !clone ? val : typeof clone === "function" ? clone(val) : cloneFnJSON(val); - const getValue2 = () => isDef(props[key]) ? cloneFn(props[key]) : defaultValue; - const triggerEmit = (value) => { - if (shouldEmit) { - if (shouldEmit(value)) - _emit(event, value); - } else { - _emit(event, value); - } - }; - if (passive) { - const initialValue = getValue2(); - const proxy = ref(initialValue); - let isUpdating = false; - watch( - () => props[key], - (v) => { - if (!isUpdating) { - isUpdating = true; - proxy.value = cloneFn(v); - nextTick(() => isUpdating = false); - } - } - ); - watch( - proxy, - (v) => { - if (!isUpdating && (v !== props[key] || deep)) - triggerEmit(v); - }, - { deep } - ); - return proxy; - } else { - return computed({ - get() { - return getValue2(); - }, - set(value) { - triggerEmit(value); - } - }); - } -} -function useVModels(props, emit, options = {}) { - const ret = {}; - for (const key in props) { - ret[key] = useVModel( - props, - key, - emit, - options - ); - } - return ret; -} -function useVibrate(options) { - const { - pattern = [], - interval = 0, - navigator = defaultNavigator - } = options || {}; - const isSupported = useSupported(() => typeof navigator !== "undefined" && "vibrate" in navigator); - const patternRef = toRef2(pattern); - let intervalControls; - const vibrate = (pattern2 = patternRef.value) => { - if (isSupported.value) - navigator.vibrate(pattern2); - }; - const stop = () => { - if (isSupported.value) - navigator.vibrate(0); - intervalControls == null ? void 0 : intervalControls.pause(); - }; - if (interval > 0) { - intervalControls = useIntervalFn( - vibrate, - interval, - { - immediate: false, - immediateCallback: false - } - ); - } - return { - isSupported, - pattern, - intervalControls, - vibrate, - stop - }; -} -function useVirtualList(list, options) { - const { containerStyle, wrapperProps, scrollTo: scrollTo2, calculateRange, currentList, containerRef } = "itemHeight" in options ? useVerticalVirtualList(options, list) : useHorizontalVirtualList(options, list); - return { - list: currentList, - scrollTo: scrollTo2, - containerProps: { - ref: containerRef, - onScroll: () => { - calculateRange(); - }, - style: containerStyle - }, - wrapperProps - }; -} -function useVirtualListResources(list) { - const containerRef = ref(null); - const size = useElementSize(containerRef); - const currentList = ref([]); - const source = shallowRef(list); - const state = ref({ start: 0, end: 10 }); - return { state, source, currentList, size, containerRef }; -} -function createGetViewCapacity(state, source, itemSize) { - return (containerSize) => { - if (typeof itemSize === "number") - return Math.ceil(containerSize / itemSize); - const { start = 0 } = state.value; - let sum = 0; - let capacity = 0; - for (let i = start; i < source.value.length; i++) { - const size = itemSize(i); - sum += size; - capacity = i; - if (sum > containerSize) - break; - } - return capacity - start; - }; -} -function createGetOffset(source, itemSize) { - return (scrollDirection) => { - if (typeof itemSize === "number") - return Math.floor(scrollDirection / itemSize) + 1; - let sum = 0; - let offset = 0; - for (let i = 0; i < source.value.length; i++) { - const size = itemSize(i); - sum += size; - if (sum >= scrollDirection) { - offset = i; - break; - } - } - return offset + 1; - }; -} -function createCalculateRange(type, overscan, getOffset, getViewCapacity, { containerRef, state, currentList, source }) { - return () => { - const element = containerRef.value; - if (element) { - const offset = getOffset(type === "vertical" ? element.scrollTop : element.scrollLeft); - const viewCapacity = getViewCapacity(type === "vertical" ? element.clientHeight : element.clientWidth); - const from = offset - overscan; - const to = offset + viewCapacity + overscan; - state.value = { - start: from < 0 ? 0 : from, - end: to > source.value.length ? source.value.length : to - }; - currentList.value = source.value.slice(state.value.start, state.value.end).map((ele, index) => ({ - data: ele, - index: index + state.value.start - })); - } - }; -} -function createGetDistance(itemSize, source) { - return (index) => { - if (typeof itemSize === "number") { - const size2 = index * itemSize; - return size2; - } - const size = source.value.slice(0, index).reduce((sum, _, i) => sum + itemSize(i), 0); - return size; - }; -} -function useWatchForSizes(size, list, containerRef, calculateRange) { - watch([size.width, size.height, list, containerRef], () => { - calculateRange(); - }); -} -function createComputedTotalSize(itemSize, source) { - return computed(() => { - if (typeof itemSize === "number") - return source.value.length * itemSize; - return source.value.reduce((sum, _, index) => sum + itemSize(index), 0); - }); -} -var scrollToDictionaryForElementScrollKey = { - horizontal: "scrollLeft", - vertical: "scrollTop" -}; -function createScrollTo(type, calculateRange, getDistance, containerRef) { - return (index) => { - if (containerRef.value) { - containerRef.value[scrollToDictionaryForElementScrollKey[type]] = getDistance(index); - calculateRange(); - } - }; -} -function useHorizontalVirtualList(options, list) { - const resources = useVirtualListResources(list); - const { state, source, currentList, size, containerRef } = resources; - const containerStyle = { overflowX: "auto" }; - const { itemWidth, overscan = 5 } = options; - const getViewCapacity = createGetViewCapacity(state, source, itemWidth); - const getOffset = createGetOffset(source, itemWidth); - const calculateRange = createCalculateRange("horizontal", overscan, getOffset, getViewCapacity, resources); - const getDistanceLeft = createGetDistance(itemWidth, source); - const offsetLeft = computed(() => getDistanceLeft(state.value.start)); - const totalWidth = createComputedTotalSize(itemWidth, source); - useWatchForSizes(size, list, containerRef, calculateRange); - const scrollTo2 = createScrollTo("horizontal", calculateRange, getDistanceLeft, containerRef); - const wrapperProps = computed(() => { - return { - style: { - height: "100%", - width: `${totalWidth.value - offsetLeft.value}px`, - marginLeft: `${offsetLeft.value}px`, - display: "flex" - } - }; - }); - return { - scrollTo: scrollTo2, - calculateRange, - wrapperProps, - containerStyle, - currentList, - containerRef - }; -} -function useVerticalVirtualList(options, list) { - const resources = useVirtualListResources(list); - const { state, source, currentList, size, containerRef } = resources; - const containerStyle = { overflowY: "auto" }; - const { itemHeight, overscan = 5 } = options; - const getViewCapacity = createGetViewCapacity(state, source, itemHeight); - const getOffset = createGetOffset(source, itemHeight); - const calculateRange = createCalculateRange("vertical", overscan, getOffset, getViewCapacity, resources); - const getDistanceTop = createGetDistance(itemHeight, source); - const offsetTop = computed(() => getDistanceTop(state.value.start)); - const totalHeight = createComputedTotalSize(itemHeight, source); - useWatchForSizes(size, list, containerRef, calculateRange); - const scrollTo2 = createScrollTo("vertical", calculateRange, getDistanceTop, containerRef); - const wrapperProps = computed(() => { - return { - style: { - width: "100%", - height: `${totalHeight.value - offsetTop.value}px`, - marginTop: `${offsetTop.value}px` - } - }; - }); - return { - calculateRange, - scrollTo: scrollTo2, - containerStyle, - wrapperProps, - currentList, - containerRef - }; -} -function useWakeLock(options = {}) { - const { - navigator = defaultNavigator, - document: document2 = defaultDocument - } = options; - let wakeLock; - const isSupported = useSupported(() => navigator && "wakeLock" in navigator); - const isActive = ref(false); - async function onVisibilityChange() { - if (!isSupported.value || !wakeLock) - return; - if (document2 && document2.visibilityState === "visible") - wakeLock = await navigator.wakeLock.request("screen"); - isActive.value = !wakeLock.released; - } - if (document2) - useEventListener(document2, "visibilitychange", onVisibilityChange, { passive: true }); - async function request(type) { - if (!isSupported.value) - return; - wakeLock = await navigator.wakeLock.request(type); - isActive.value = !wakeLock.released; - } - async function release() { - if (!isSupported.value || !wakeLock) - return; - await wakeLock.release(); - isActive.value = !wakeLock.released; - wakeLock = null; - } - return { - isSupported, - isActive, - request, - release - }; -} -function useWebNotification(options = {}) { - const { - window: window2 = defaultWindow, - requestPermissions: _requestForPermissions = true - } = options; - const defaultWebNotificationOptions = options; - const isSupported = useSupported(() => { - if (!window2 || !("Notification" in window2)) - return false; - try { - new Notification(""); - } catch (e) { - return false; - } - return true; - }); - const permissionGranted = ref(isSupported.value && "permission" in Notification && Notification.permission === "granted"); - const notification = ref(null); - const ensurePermissions = async () => { - if (!isSupported.value) - return; - if (!permissionGranted.value && Notification.permission !== "denied") { - const result = await Notification.requestPermission(); - if (result === "granted") - permissionGranted.value = true; - } - return permissionGranted.value; - }; - const { on: onClick, trigger: clickTrigger } = createEventHook(); - const { on: onShow, trigger: showTrigger } = createEventHook(); - const { on: onError, trigger: errorTrigger } = createEventHook(); - const { on: onClose, trigger: closeTrigger } = createEventHook(); - const show = async (overrides) => { - if (!isSupported.value || !permissionGranted.value) - return; - const options2 = Object.assign({}, defaultWebNotificationOptions, overrides); - notification.value = new Notification(options2.title || "", options2); - notification.value.onclick = clickTrigger; - notification.value.onshow = showTrigger; - notification.value.onerror = errorTrigger; - notification.value.onclose = closeTrigger; - return notification.value; - }; - const close = () => { - if (notification.value) - notification.value.close(); - notification.value = null; - }; - if (_requestForPermissions) - tryOnMounted(ensurePermissions); - tryOnScopeDispose(close); - if (isSupported.value && window2) { - const document2 = window2.document; - useEventListener(document2, "visibilitychange", (e) => { - e.preventDefault(); - if (document2.visibilityState === "visible") { - close(); - } - }); - } - return { - isSupported, - notification, - ensurePermissions, - permissionGranted, - show, - close, - onClick, - onShow, - onError, - onClose - }; -} -var DEFAULT_PING_MESSAGE = "ping"; -function resolveNestedOptions(options) { - if (options === true) - return {}; - return options; -} -function useWebSocket(url, options = {}) { - const { - onConnected, - onDisconnected, - onError, - onMessage, - immediate = true, - autoClose = true, - protocols = [] - } = options; - const data = ref(null); - const status = ref("CLOSED"); - const wsRef = ref(); - const urlRef = toRef2(url); - let heartbeatPause; - let heartbeatResume; - let explicitlyClosed = false; - let retried = 0; - let bufferedData = []; - let pongTimeoutWait; - const _sendBuffer = () => { - if (bufferedData.length && wsRef.value && status.value === "OPEN") { - for (const buffer of bufferedData) - wsRef.value.send(buffer); - bufferedData = []; - } - }; - const resetHeartbeat = () => { - clearTimeout(pongTimeoutWait); - pongTimeoutWait = void 0; - }; - const close = (code = 1e3, reason) => { - if (!isClient || !wsRef.value) - return; - explicitlyClosed = true; - resetHeartbeat(); - heartbeatPause == null ? void 0 : heartbeatPause(); - wsRef.value.close(code, reason); - wsRef.value = void 0; - }; - const send = (data2, useBuffer = true) => { - if (!wsRef.value || status.value !== "OPEN") { - if (useBuffer) - bufferedData.push(data2); - return false; - } - _sendBuffer(); - wsRef.value.send(data2); - return true; - }; - const _init = () => { - if (explicitlyClosed || typeof urlRef.value === "undefined") - return; - const ws = new WebSocket(urlRef.value, protocols); - wsRef.value = ws; - status.value = "CONNECTING"; - ws.onopen = () => { - status.value = "OPEN"; - onConnected == null ? void 0 : onConnected(ws); - heartbeatResume == null ? void 0 : heartbeatResume(); - _sendBuffer(); - }; - ws.onclose = (ev) => { - status.value = "CLOSED"; - onDisconnected == null ? void 0 : onDisconnected(ws, ev); - if (!explicitlyClosed && options.autoReconnect) { - const { - retries = -1, - delay = 1e3, - onFailed - } = resolveNestedOptions(options.autoReconnect); - retried += 1; - if (typeof retries === "number" && (retries < 0 || retried < retries)) - setTimeout(_init, delay); - else if (typeof retries === "function" && retries()) - setTimeout(_init, delay); - else - onFailed == null ? void 0 : onFailed(); - } - }; - ws.onerror = (e) => { - onError == null ? void 0 : onError(ws, e); - }; - ws.onmessage = (e) => { - if (options.heartbeat) { - resetHeartbeat(); - const { - message = DEFAULT_PING_MESSAGE - } = resolveNestedOptions(options.heartbeat); - if (e.data === message) - return; - } - data.value = e.data; - onMessage == null ? void 0 : onMessage(ws, e); - }; - }; - if (options.heartbeat) { - const { - message = DEFAULT_PING_MESSAGE, - interval = 1e3, - pongTimeout = 1e3 - } = resolveNestedOptions(options.heartbeat); - const { pause, resume } = useIntervalFn( - () => { - send(message, false); - if (pongTimeoutWait != null) - return; - pongTimeoutWait = setTimeout(() => { - close(); - explicitlyClosed = false; - }, pongTimeout); - }, - interval, - { immediate: false } - ); - heartbeatPause = pause; - heartbeatResume = resume; - } - if (autoClose) { - if (isClient) - useEventListener("beforeunload", () => close()); - tryOnScopeDispose(close); - } - const open = () => { - if (!isClient && !isWorker) - return; - close(); - explicitlyClosed = false; - retried = 0; - _init(); - }; - if (immediate) - open(); - watch(urlRef, open); - return { - data, - status, - close, - send, - open, - ws: wsRef - }; -} -function useWebWorker(arg0, workerOptions, options) { - const { - window: window2 = defaultWindow - } = options != null ? options : {}; - const data = ref(null); - const worker = shallowRef(); - const post = (...args) => { - if (!worker.value) - return; - worker.value.postMessage(...args); - }; - const terminate = function terminate2() { - if (!worker.value) - return; - worker.value.terminate(); - }; - if (window2) { - if (typeof arg0 === "string") - worker.value = new Worker(arg0, workerOptions); - else if (typeof arg0 === "function") - worker.value = arg0(); - else - worker.value = arg0; - worker.value.onmessage = (e) => { - data.value = e.data; - }; - tryOnScopeDispose(() => { - if (worker.value) - worker.value.terminate(); - }); - } - return { - data, - post, - terminate, - worker - }; -} -function jobRunner(userFunc) { - return (e) => { - const userFuncArgs = e.data[0]; - return Promise.resolve(userFunc.apply(void 0, userFuncArgs)).then((result) => { - postMessage(["SUCCESS", result]); - }).catch((error) => { - postMessage(["ERROR", error]); - }); - }; -} -function depsParser(deps, localDeps) { - if (deps.length === 0 && localDeps.length === 0) - return ""; - const depsString = deps.map((dep) => `'${dep}'`).toString(); - const depsFunctionString = localDeps.filter((dep) => typeof dep === "function").map((fn) => { - const str = fn.toString(); - if (str.trim().startsWith("function")) { - return str; - } else { - const name = fn.name; - return `const ${name} = ${str}`; - } - }).join(";"); - const importString = `importScripts(${depsString});`; - return `${depsString.trim() === "" ? "" : importString} ${depsFunctionString}`; -} -function createWorkerBlobUrl(fn, deps, localDeps) { - const blobCode = `${depsParser(deps, localDeps)}; onmessage=(${jobRunner})(${fn})`; - const blob = new Blob([blobCode], { type: "text/javascript" }); - const url = URL.createObjectURL(blob); - return url; -} -function useWebWorkerFn(fn, options = {}) { - const { - dependencies = [], - localDependencies = [], - timeout, - window: window2 = defaultWindow - } = options; - const worker = ref(); - const workerStatus = ref("PENDING"); - const promise = ref({}); - const timeoutId = ref(); - const workerTerminate = (status = "PENDING") => { - if (worker.value && worker.value._url && window2) { - worker.value.terminate(); - URL.revokeObjectURL(worker.value._url); - promise.value = {}; - worker.value = void 0; - window2.clearTimeout(timeoutId.value); - workerStatus.value = status; - } - }; - workerTerminate(); - tryOnScopeDispose(workerTerminate); - const generateWorker = () => { - const blobUrl = createWorkerBlobUrl(fn, dependencies, localDependencies); - const newWorker = new Worker(blobUrl); - newWorker._url = blobUrl; - newWorker.onmessage = (e) => { - const { resolve = () => { - }, reject = () => { - } } = promise.value; - const [status, result] = e.data; - switch (status) { - case "SUCCESS": - resolve(result); - workerTerminate(status); - break; - default: - reject(result); - workerTerminate("ERROR"); - break; - } - }; - newWorker.onerror = (e) => { - const { reject = () => { - } } = promise.value; - e.preventDefault(); - reject(e); - workerTerminate("ERROR"); - }; - if (timeout) { - timeoutId.value = setTimeout( - () => workerTerminate("TIMEOUT_EXPIRED"), - timeout - ); - } - return newWorker; - }; - const callWorker = (...fnArgs) => new Promise((resolve, reject) => { - promise.value = { - resolve, - reject - }; - worker.value && worker.value.postMessage([[...fnArgs]]); - workerStatus.value = "RUNNING"; - }); - const workerFn = (...fnArgs) => { - if (workerStatus.value === "RUNNING") { - console.error( - "[useWebWorkerFn] You can only run one instance of the worker at a time." - ); - return Promise.reject(); - } - worker.value = generateWorker(); - return callWorker(...fnArgs); - }; - return { - workerFn, - workerStatus, - workerTerminate - }; -} -function useWindowFocus(options = {}) { - const { window: window2 = defaultWindow } = options; - if (!window2) - return ref(false); - const focused = ref(window2.document.hasFocus()); - useEventListener(window2, "blur", () => { - focused.value = false; - }); - useEventListener(window2, "focus", () => { - focused.value = true; - }); - return focused; -} -function useWindowScroll(options = {}) { - const { window: window2 = defaultWindow, behavior = "auto" } = options; - if (!window2) { - return { - x: ref(0), - y: ref(0) - }; - } - const internalX = ref(window2.scrollX); - const internalY = ref(window2.scrollY); - const x = computed({ - get() { - return internalX.value; - }, - set(x2) { - scrollTo({ left: x2, behavior }); - } - }); - const y = computed({ - get() { - return internalY.value; - }, - set(y2) { - scrollTo({ top: y2, behavior }); - } - }); - useEventListener( - window2, - "scroll", - () => { - internalX.value = window2.scrollX; - internalY.value = window2.scrollY; - }, - { - capture: false, - passive: true - } - ); - return { x, y }; -} -function useWindowSize(options = {}) { - const { - window: window2 = defaultWindow, - initialWidth = Number.POSITIVE_INFINITY, - initialHeight = Number.POSITIVE_INFINITY, - listenOrientation = true, - includeScrollbar = true - } = options; - const width = ref(initialWidth); - const height = ref(initialHeight); - const update = () => { - if (window2) { - if (includeScrollbar) { - width.value = window2.innerWidth; - height.value = window2.innerHeight; - } else { - width.value = window2.document.documentElement.clientWidth; - height.value = window2.document.documentElement.clientHeight; - } - } - }; - update(); - tryOnMounted(update); - useEventListener("resize", update, { passive: true }); - if (listenOrientation) { - const matches = useMediaQuery("(orientation: portrait)"); - watch(matches, () => update()); - } - return { width, height }; -} - -export { - computedEager, - computedWithControl, - tryOnScopeDispose, - createEventHook, - createGlobalState, - provideLocal, - injectLocal, - createInjectionState, - createSharedComposable, - extendRef, - get, - isDefined, - makeDestructurable, - toValue, - resolveUnref, - reactify, - reactifyObject, - toReactive, - reactiveComputed, - reactiveOmit, - isClient, - isWorker, - isDef, - notNullish, - assert, - isObject, - now, - timestamp, - clamp, - noop, - rand, - hasOwn, - isIOS, - createFilterWrapper, - bypassFilter, - debounceFilter, - throttleFilter, - pausableFilter, - directiveHooks, - hyphenate, - camelize, - promiseTimeout, - identity, - createSingletonPromise, - invoke, - containsProp, - increaseWithUnit, - objectPick, - objectOmit, - objectEntries, - getLifeCycleTarget, - toRef2 as toRef, - resolveRef, - reactivePick, - refAutoReset, - useDebounceFn, - refDebounced, - refDefault, - useThrottleFn, - refThrottled, - refWithControl, - controlledRef, - set2 as set, - watchWithFilter, - watchPausable, - syncRef, - syncRefs, - toRefs2 as toRefs, - tryOnBeforeMount, - tryOnBeforeUnmount, - tryOnMounted, - tryOnUnmounted, - until, - useArrayDifference, - useArrayEvery, - useArrayFilter, - useArrayFind, - useArrayFindIndex, - useArrayFindLast, - useArrayIncludes, - useArrayJoin, - useArrayMap, - useArrayReduce, - useArraySome, - useArrayUnique, - useCounter, - formatDate, - normalizeDate, - useDateFormat, - useIntervalFn, - useInterval, - useLastChanged, - useTimeoutFn, - useTimeout, - useToNumber, - useToString, - useToggle, - watchArray, - watchAtMost, - watchDebounced, - watchDeep, - watchIgnorable, - watchImmediate, - watchOnce, - watchThrottled, - watchTriggerable, - whenever, - computedAsync, - computedInject, - createReusableTemplate, - createTemplatePromise, - createUnrefFn, - unrefElement, - defaultWindow, - defaultDocument, - defaultNavigator, - defaultLocation, - useEventListener, - onClickOutside, - onKeyStroke, - onKeyDown, - onKeyPressed, - onKeyUp, - onLongPress, - onStartTyping, - templateRef, - useMounted, - useSupported, - useMutationObserver, - useActiveElement, - useRafFn, - useAnimate, - useAsyncQueue, - useAsyncState, - useBase64, - useBattery, - useBluetooth, - useMediaQuery, - breakpointsTailwind, - breakpointsBootstrapV5, - breakpointsVuetifyV2, - breakpointsVuetifyV3, - breakpointsVuetify, - breakpointsAntDesign, - breakpointsQuasar, - breakpointsSematic, - breakpointsMasterCss, - breakpointsPrimeFlex, - useBreakpoints, - useBroadcastChannel, - useBrowserLocation, - useCached, - usePermission, - useClipboard, - useClipboardItems, - cloneFnJSON, - useCloned, - getSSRHandler, - setSSRHandler, - StorageSerializers, - customStorageEventName, - useStorage, - usePreferredDark, - useColorMode, - useConfirmDialog, - useCssVar, - useCurrentElement, - useCycleList, - useDark, - useManualRefHistory, - useRefHistory, - useDebouncedRefHistory, - useDeviceMotion, - useDeviceOrientation, - useDevicePixelRatio, - useDevicesList, - useDisplayMedia, - useDocumentVisibility, - useDraggable, - useDropZone, - useResizeObserver, - useElementBounding, - useElementByPoint, - useElementHover, - useElementSize, - useIntersectionObserver, - useElementVisibility, - useEventBus, - useEventSource, - useEyeDropper, - useFavicon, - createFetch, - useFetch, - useFileDialog, - useFileSystemAccess, - useFocus, - useFocusWithin, - useFps, - useFullscreen, - mapGamepadToXbox360Controller, - useGamepad, - useGeolocation, - useIdle, - useImage, - useScroll, - useInfiniteScroll, - useKeyModifier, - useLocalStorage, - DefaultMagicKeysAliasMap, - useMagicKeys, - useMediaControls, - useMemoize, - useMemory, - useMouse, - useMouseInElement, - useMousePressed, - useNavigatorLanguage, - useNetwork, - useNow, - useObjectUrl, - useOffsetPagination, - useOnline, - usePageLeave, - useScreenOrientation, - useParallax, - useParentElement, - usePerformanceObserver, - usePointer, - usePointerLock, - usePointerSwipe, - usePreferredColorScheme, - usePreferredContrast, - usePreferredLanguages, - usePreferredReducedMotion, - usePrevious, - useScreenSafeArea, - useScriptTag, - useScrollLock, - useSessionStorage, - useShare, - useSorted, - useSpeechRecognition, - useSpeechSynthesis, - useStepper, - useStorageAsync, - useStyleTag, - useSwipe, - useTemplateRefsList, - useTextDirection, - useTextSelection, - useTextareaAutosize, - useThrottledRefHistory, - useTimeAgo, - formatTimeAgo, - useTimeoutPoll, - useTimestamp, - useTitle, - TransitionPresets, - executeTransition, - useTransition, - useUrlSearchParams, - useUserMedia, - useVModel, - useVModels, - useVibrate, - useVirtualList, - useWakeLock, - useWebNotification, - useWebSocket, - useWebWorker, - useWebWorkerFn, - useWindowFocus, - useWindowScroll, - useWindowSize -}; -/*! Bundled license information: - -vitepress/lib/vue-demi.mjs: - (** - * vue-demi v0.14.7 - * Copyright (c) 2020-present, Anthony Fu - * @license MIT - *) -*/ -//# sourceMappingURL=chunk-B2WI2LE3.js.map diff --git a/docs/.vitepress/cache/deps/chunk-B2WI2LE3.js.map b/docs/.vitepress/cache/deps/chunk-B2WI2LE3.js.map deleted file mode 100644 index 369d933b1..000000000 --- a/docs/.vitepress/cache/deps/chunk-B2WI2LE3.js.map +++ /dev/null @@ -1,7 +0,0 @@ -{ - "version": 3, - "sources": ["../../../../node_modules/vitepress/lib/vue-demi.mjs", "../../../../node_modules/@vueuse/shared/index.mjs", "../../../../node_modules/@vueuse/core/index.mjs"], - "sourcesContent": ["/**\n * vue-demi v0.14.7\n * Copyright (c) 2020-present, Anthony Fu\n * @license MIT\n */\n\nimport * as Vue from 'vue'\n\nvar isVue2 = false\nvar isVue3 = true\nvar Vue2 = undefined\n\nfunction install() {}\n\nexport function set(target, key, val) {\n if (Array.isArray(target)) {\n target.length = Math.max(target.length, key)\n target.splice(key, 1, val)\n return val\n }\n target[key] = val\n return val\n}\n\nexport function del(target, key) {\n if (Array.isArray(target)) {\n target.splice(key, 1)\n return\n }\n delete target[key]\n}\n\nexport * from 'vue'\nexport { Vue, Vue2, isVue2, isVue3, install }\n", "import { shallowRef, watchEffect, readonly, ref, watch, customRef, getCurrentScope, onScopeDispose, effectScope, getCurrentInstance, provide, inject, isVue3, version, isRef, unref, computed, reactive, toRefs as toRefs$1, toRef as toRef$1, isVue2, set as set$1, onBeforeMount, nextTick, onBeforeUnmount, onMounted, onUnmounted, isReactive } from 'vue-demi';\n\nfunction computedEager(fn, options) {\n var _a;\n const result = shallowRef();\n watchEffect(() => {\n result.value = fn();\n }, {\n ...options,\n flush: (_a = options == null ? void 0 : options.flush) != null ? _a : \"sync\"\n });\n return readonly(result);\n}\n\nfunction computedWithControl(source, fn) {\n let v = void 0;\n let track;\n let trigger;\n const dirty = ref(true);\n const update = () => {\n dirty.value = true;\n trigger();\n };\n watch(source, update, { flush: \"sync\" });\n const get = typeof fn === \"function\" ? fn : fn.get;\n const set = typeof fn === \"function\" ? void 0 : fn.set;\n const result = customRef((_track, _trigger) => {\n track = _track;\n trigger = _trigger;\n return {\n get() {\n if (dirty.value) {\n v = get();\n dirty.value = false;\n }\n track();\n return v;\n },\n set(v2) {\n set == null ? void 0 : set(v2);\n }\n };\n });\n if (Object.isExtensible(result))\n result.trigger = update;\n return result;\n}\n\nfunction tryOnScopeDispose(fn) {\n if (getCurrentScope()) {\n onScopeDispose(fn);\n return true;\n }\n return false;\n}\n\nfunction createEventHook() {\n const fns = /* @__PURE__ */ new Set();\n const off = (fn) => {\n fns.delete(fn);\n };\n const on = (fn) => {\n fns.add(fn);\n const offFn = () => off(fn);\n tryOnScopeDispose(offFn);\n return {\n off: offFn\n };\n };\n const trigger = (...args) => {\n return Promise.all(Array.from(fns).map((fn) => fn(...args)));\n };\n return {\n on,\n off,\n trigger\n };\n}\n\nfunction createGlobalState(stateFactory) {\n let initialized = false;\n let state;\n const scope = effectScope(true);\n return (...args) => {\n if (!initialized) {\n state = scope.run(() => stateFactory(...args));\n initialized = true;\n }\n return state;\n };\n}\n\nconst localProvidedStateMap = /* @__PURE__ */ new WeakMap();\n\nconst provideLocal = (key, value) => {\n var _a;\n const instance = (_a = getCurrentInstance()) == null ? void 0 : _a.proxy;\n if (instance == null)\n throw new Error(\"provideLocal must be called in setup\");\n if (!localProvidedStateMap.has(instance))\n localProvidedStateMap.set(instance, /* @__PURE__ */ Object.create(null));\n const localProvidedState = localProvidedStateMap.get(instance);\n localProvidedState[key] = value;\n provide(key, value);\n};\n\nconst injectLocal = (...args) => {\n var _a;\n const key = args[0];\n const instance = (_a = getCurrentInstance()) == null ? void 0 : _a.proxy;\n if (instance == null)\n throw new Error(\"injectLocal must be called in setup\");\n if (localProvidedStateMap.has(instance) && key in localProvidedStateMap.get(instance))\n return localProvidedStateMap.get(instance)[key];\n return inject(...args);\n};\n\nfunction createInjectionState(composable, options) {\n const key = (options == null ? void 0 : options.injectionKey) || Symbol(composable.name || \"InjectionState\");\n const defaultValue = options == null ? void 0 : options.defaultValue;\n const useProvidingState = (...args) => {\n const state = composable(...args);\n provideLocal(key, state);\n return state;\n };\n const useInjectedState = () => injectLocal(key, defaultValue);\n return [useProvidingState, useInjectedState];\n}\n\nfunction createSharedComposable(composable) {\n let subscribers = 0;\n let state;\n let scope;\n const dispose = () => {\n subscribers -= 1;\n if (scope && subscribers <= 0) {\n scope.stop();\n state = void 0;\n scope = void 0;\n }\n };\n return (...args) => {\n subscribers += 1;\n if (!state) {\n scope = effectScope(true);\n state = scope.run(() => composable(...args));\n }\n tryOnScopeDispose(dispose);\n return state;\n };\n}\n\nfunction extendRef(ref, extend, { enumerable = false, unwrap = true } = {}) {\n if (!isVue3 && !version.startsWith(\"2.7.\")) {\n if (process.env.NODE_ENV !== \"production\")\n throw new Error(\"[VueUse] extendRef only works in Vue 2.7 or above.\");\n return;\n }\n for (const [key, value] of Object.entries(extend)) {\n if (key === \"value\")\n continue;\n if (isRef(value) && unwrap) {\n Object.defineProperty(ref, key, {\n get() {\n return value.value;\n },\n set(v) {\n value.value = v;\n },\n enumerable\n });\n } else {\n Object.defineProperty(ref, key, { value, enumerable });\n }\n }\n return ref;\n}\n\nfunction get(obj, key) {\n if (key == null)\n return unref(obj);\n return unref(obj)[key];\n}\n\nfunction isDefined(v) {\n return unref(v) != null;\n}\n\nfunction makeDestructurable(obj, arr) {\n if (typeof Symbol !== \"undefined\") {\n const clone = { ...obj };\n Object.defineProperty(clone, Symbol.iterator, {\n enumerable: false,\n value() {\n let index = 0;\n return {\n next: () => ({\n value: arr[index++],\n done: index > arr.length\n })\n };\n }\n });\n return clone;\n } else {\n return Object.assign([...arr], obj);\n }\n}\n\nfunction toValue(r) {\n return typeof r === \"function\" ? r() : unref(r);\n}\nconst resolveUnref = toValue;\n\nfunction reactify(fn, options) {\n const unrefFn = (options == null ? void 0 : options.computedGetter) === false ? unref : toValue;\n return function(...args) {\n return computed(() => fn.apply(this, args.map((i) => unrefFn(i))));\n };\n}\n\nfunction reactifyObject(obj, optionsOrKeys = {}) {\n let keys = [];\n let options;\n if (Array.isArray(optionsOrKeys)) {\n keys = optionsOrKeys;\n } else {\n options = optionsOrKeys;\n const { includeOwnProperties = true } = optionsOrKeys;\n keys.push(...Object.keys(obj));\n if (includeOwnProperties)\n keys.push(...Object.getOwnPropertyNames(obj));\n }\n return Object.fromEntries(\n keys.map((key) => {\n const value = obj[key];\n return [\n key,\n typeof value === \"function\" ? reactify(value.bind(obj), options) : value\n ];\n })\n );\n}\n\nfunction toReactive(objectRef) {\n if (!isRef(objectRef))\n return reactive(objectRef);\n const proxy = new Proxy({}, {\n get(_, p, receiver) {\n return unref(Reflect.get(objectRef.value, p, receiver));\n },\n set(_, p, value) {\n if (isRef(objectRef.value[p]) && !isRef(value))\n objectRef.value[p].value = value;\n else\n objectRef.value[p] = value;\n return true;\n },\n deleteProperty(_, p) {\n return Reflect.deleteProperty(objectRef.value, p);\n },\n has(_, p) {\n return Reflect.has(objectRef.value, p);\n },\n ownKeys() {\n return Object.keys(objectRef.value);\n },\n getOwnPropertyDescriptor() {\n return {\n enumerable: true,\n configurable: true\n };\n }\n });\n return reactive(proxy);\n}\n\nfunction reactiveComputed(fn) {\n return toReactive(computed(fn));\n}\n\nfunction reactiveOmit(obj, ...keys) {\n const flatKeys = keys.flat();\n const predicate = flatKeys[0];\n return 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\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 if (!condition)\n 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 = () => {\n};\nconst rand = (min, max) => {\n min = Math.ceil(min);\n max = Math.floor(max);\n return 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 var _a, _b;\n return isClient && ((_a = window == null ? void 0 : window.navigator) == null ? void 0 : _a.userAgent) && (/iP(?:ad|hone|od)/.test(window.navigator.userAgent) || ((_b = window == null ? void 0 : window.navigator) == null ? void 0 : _b.maxTouchPoints) > 2 && /iPad|Macintosh/.test(window == null ? void 0 : window.navigator.userAgent));\n}\n\nfunction createFilterWrapper(filter, fn) {\n function wrapper(...args) {\n return new Promise((resolve, reject) => {\n Promise.resolve(filter(() => fn.apply(this, args), { fn, thisArg: this, args })).then(resolve).catch(reject);\n });\n }\n return wrapper;\n}\nconst bypassFilter = (invoke) => {\n return invoke();\n};\nfunction debounceFilter(ms, options = {}) {\n let timer;\n let maxTimer;\n let lastRejector = noop;\n const _clearTimeout = (timer2) => {\n clearTimeout(timer2);\n lastRejector();\n lastRejector = noop;\n };\n const filter = (invoke) => {\n const duration = toValue(ms);\n const maxDuration = toValue(options.maxWait);\n if (timer)\n _clearTimeout(timer);\n if (duration <= 0 || maxDuration !== void 0 && maxDuration <= 0) {\n if (maxTimer) {\n _clearTimeout(maxTimer);\n maxTimer = null;\n }\n return Promise.resolve(invoke());\n }\n return new Promise((resolve, reject) => {\n lastRejector = options.rejectOnCancel ? reject : resolve;\n if (maxDuration && !maxTimer) {\n maxTimer = setTimeout(() => {\n if (timer)\n _clearTimeout(timer);\n maxTimer = null;\n resolve(invoke());\n }, maxDuration);\n }\n timer = setTimeout(() => {\n if (maxTimer)\n _clearTimeout(maxTimer);\n maxTimer = null;\n resolve(invoke());\n }, duration);\n });\n };\n return filter;\n}\nfunction throttleFilter(...args) {\n let lastExec = 0;\n let timer;\n let isLeading = true;\n let lastRejector = noop;\n let lastValue;\n let ms;\n let trailing;\n let leading;\n let rejectOnCancel;\n if (!isRef(args[0]) && typeof args[0] === \"object\")\n ({ delay: ms, trailing = true, leading = true, rejectOnCancel = false } = args[0]);\n else\n [ms, trailing = true, leading = true, rejectOnCancel = false] = args;\n const clear = () => {\n if (timer) {\n clearTimeout(timer);\n timer = void 0;\n lastRejector();\n lastRejector = noop;\n }\n };\n const filter = (_invoke) => {\n const duration = toValue(ms);\n const elapsed = Date.now() - lastExec;\n const invoke = () => {\n return lastValue = _invoke();\n };\n clear();\n if (duration <= 0) {\n lastExec = Date.now();\n return invoke();\n }\n if (elapsed > duration && (leading || !isLeading)) {\n lastExec = Date.now();\n invoke();\n } else if (trailing) {\n lastValue = new Promise((resolve, reject) => {\n lastRejector = rejectOnCancel ? reject : resolve;\n timer = setTimeout(() => {\n lastExec = Date.now();\n isLeading = true;\n resolve(invoke());\n clear();\n }, Math.max(0, duration - elapsed));\n });\n }\n if (!leading && !timer)\n timer = setTimeout(() => isLeading = true, duration);\n isLeading = false;\n return lastValue;\n };\n return filter;\n}\nfunction pausableFilter(extendFilter = bypassFilter) {\n const isActive = ref(true);\n function pause() {\n isActive.value = false;\n }\n function resume() {\n isActive.value = true;\n }\n const eventFilter = (...args) => {\n if (isActive.value)\n extendFilter(...args);\n };\n return { isActive: readonly(isActive), pause, resume, eventFilter };\n}\n\nconst directiveHooks = {\n mounted: isVue3 ? \"mounted\" : \"inserted\",\n updated: isVue3 ? \"updated\" : \"componentUpdated\",\n unmounted: isVue3 ? \"unmounted\" : \"unbind\"\n};\n\nfunction cacheStringFunction(fn) {\n const cache = /* @__PURE__ */ Object.create(null);\n return (str) => {\n const hit = cache[str];\n return hit || (cache[str] = fn(str));\n };\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 return str.replace(camelizeRE, (_, c) => c ? c.toUpperCase() : \"\");\n});\n\nfunction promiseTimeout(ms, throwOnTimeout = false, reason = \"Timeout\") {\n return new Promise((resolve, reject) => {\n if (throwOnTimeout)\n setTimeout(() => reject(reason), ms);\n else\n setTimeout(resolve, ms);\n });\n}\nfunction identity(arg) {\n return arg;\n}\nfunction createSingletonPromise(fn) {\n let _promise;\n function wrapper() {\n if (!_promise)\n _promise = fn();\n return _promise;\n }\n wrapper.reset = async () => {\n const _prev = _promise;\n _promise = void 0;\n if (_prev)\n await _prev;\n };\n return wrapper;\n}\nfunction invoke(fn) {\n return fn();\n}\nfunction containsProp(obj, ...props) {\n return props.some((k) => k in obj);\n}\nfunction increaseWithUnit(target, delta) {\n var _a;\n if (typeof target === \"number\")\n return target + delta;\n const value = ((_a = target.match(/^-?\\d+\\.?\\d*/)) == null ? void 0 : _a[0]) || \"\";\n const unit = target.slice(value.length);\n const result = Number.parseFloat(value) + delta;\n if (Number.isNaN(result))\n return target;\n return result + unit;\n}\nfunction objectPick(obj, keys, omitUndefined = false) {\n return keys.reduce((n, k) => {\n if (k in obj) {\n if (!omitUndefined || obj[k] !== void 0)\n n[k] = obj[k];\n }\n return n;\n }, {});\n}\nfunction objectOmit(obj, keys, omitUndefined = false) {\n return Object.fromEntries(Object.entries(obj).filter(([key, value]) => {\n return (!omitUndefined || value !== void 0) && !keys.includes(key);\n }));\n}\nfunction objectEntries(obj) {\n return Object.entries(obj);\n}\nfunction getLifeCycleTarget(target) {\n return target || getCurrentInstance();\n}\n\nfunction toRef(...args) {\n if (args.length !== 1)\n return toRef$1(...args);\n const r = args[0];\n return typeof r === \"function\" ? readonly(customRef(() => ({ get: r, set: noop }))) : ref(r);\n}\nconst resolveRef = toRef;\n\nfunction reactivePick(obj, ...keys) {\n const flatKeys = keys.flat();\n const predicate = flatKeys[0];\n return 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\nfunction refAutoReset(defaultValue, afterMs = 1e4) {\n return customRef((track, trigger) => {\n let value = toValue(defaultValue);\n let timer;\n const resetAfter = () => setTimeout(() => {\n value = toValue(defaultValue);\n trigger();\n }, toValue(afterMs));\n tryOnScopeDispose(() => {\n clearTimeout(timer);\n });\n return {\n get() {\n track();\n return value;\n },\n set(newValue) {\n value = newValue;\n trigger();\n clearTimeout(timer);\n timer = resetAfter();\n }\n };\n });\n}\n\nfunction useDebounceFn(fn, ms = 200, options = {}) {\n return createFilterWrapper(\n debounceFilter(ms, options),\n fn\n );\n}\n\nfunction refDebounced(value, ms = 200, options = {}) {\n const debounced = ref(value.value);\n const updater = useDebounceFn(() => {\n debounced.value = value.value;\n }, ms, options);\n watch(value, () => updater());\n return debounced;\n}\n\nfunction refDefault(source, defaultValue) {\n return computed({\n get() {\n var _a;\n return (_a = source.value) != null ? _a : defaultValue;\n },\n set(value) {\n source.value = value;\n }\n });\n}\n\nfunction useThrottleFn(fn, ms = 200, trailing = false, leading = true, rejectOnCancel = false) {\n return createFilterWrapper(\n throttleFilter(ms, trailing, leading, rejectOnCancel),\n fn\n );\n}\n\nfunction refThrottled(value, delay = 200, trailing = true, leading = true) {\n if (delay <= 0)\n return value;\n const throttled = ref(value.value);\n const updater = useThrottleFn(() => {\n throttled.value = value.value;\n }, delay, trailing, leading);\n watch(value, () => updater());\n return throttled;\n}\n\nfunction refWithControl(initial, options = {}) {\n let source = initial;\n let track;\n let trigger;\n const ref = customRef((_track, _trigger) => {\n track = _track;\n trigger = _trigger;\n return {\n get() {\n return get();\n },\n set(v) {\n set(v);\n }\n };\n });\n function get(tracking = true) {\n if (tracking)\n track();\n return source;\n }\n function set(value, triggering = true) {\n var _a, _b;\n if (value === source)\n return;\n const old = source;\n if (((_a = options.onBeforeChange) == null ? void 0 : _a.call(options, value, old)) === false)\n return;\n source = value;\n (_b = options.onChanged) == null ? void 0 : _b.call(options, value, old);\n if (triggering)\n trigger();\n }\n const untrackedGet = () => get(false);\n const silentSet = (v) => set(v, false);\n const peek = () => get(false);\n const lay = (v) => set(v, false);\n return extendRef(\n ref,\n {\n get,\n set,\n untrackedGet,\n silentSet,\n peek,\n lay\n },\n { enumerable: true }\n );\n}\nconst controlledRef = refWithControl;\n\nfunction set(...args) {\n if (args.length === 2) {\n const [ref, value] = args;\n ref.value = value;\n }\n if (args.length === 3) {\n if (isVue2) {\n set$1(...args);\n } else {\n const [target, key, value] = args;\n target[key] = value;\n }\n }\n}\n\nfunction watchWithFilter(source, cb, options = {}) {\n const {\n eventFilter = bypassFilter,\n ...watchOptions\n } = options;\n return watch(\n source,\n createFilterWrapper(\n eventFilter,\n cb\n ),\n watchOptions\n );\n}\n\nfunction watchPausable(source, cb, options = {}) {\n const {\n eventFilter: filter,\n ...watchOptions\n } = options;\n const { eventFilter, pause, resume, isActive } = pausableFilter(filter);\n const stop = watchWithFilter(\n source,\n cb,\n {\n ...watchOptions,\n eventFilter\n }\n );\n return { stop, pause, resume, isActive };\n}\n\nfunction syncRef(left, right, ...[options]) {\n const {\n flush = \"sync\",\n deep = false,\n immediate = true,\n direction = \"both\",\n transform = {}\n } = options || {};\n const watchers = [];\n const transformLTR = \"ltr\" in transform && transform.ltr || ((v) => v);\n const transformRTL = \"rtl\" in transform && transform.rtl || ((v) => v);\n if (direction === \"both\" || direction === \"ltr\") {\n watchers.push(watchPausable(\n left,\n (newValue) => {\n watchers.forEach((w) => w.pause());\n right.value = transformLTR(newValue);\n watchers.forEach((w) => w.resume());\n },\n { flush, deep, immediate }\n ));\n }\n if (direction === \"both\" || direction === \"rtl\") {\n watchers.push(watchPausable(\n right,\n (newValue) => {\n watchers.forEach((w) => w.pause());\n left.value = transformRTL(newValue);\n watchers.forEach((w) => w.resume());\n },\n { flush, deep, immediate }\n ));\n }\n const stop = () => {\n watchers.forEach((w) => w.stop());\n };\n return stop;\n}\n\nfunction syncRefs(source, targets, options = {}) {\n const {\n flush = \"sync\",\n deep = false,\n immediate = true\n } = options;\n if (!Array.isArray(targets))\n targets = [targets];\n return watch(\n source,\n (newValue) => targets.forEach((target) => target.value = newValue),\n { flush, deep, immediate }\n );\n}\n\nfunction toRefs(objectRef, options = {}) {\n if (!isRef(objectRef))\n return toRefs$1(objectRef);\n const result = Array.isArray(objectRef.value) ? Array.from({ length: objectRef.value.length }) : {};\n for (const key in objectRef.value) {\n result[key] = customRef(() => ({\n get() {\n return objectRef.value[key];\n },\n set(v) {\n var _a;\n const replaceRef = (_a = toValue(options.replaceRef)) != null ? _a : true;\n if (replaceRef) {\n if (Array.isArray(objectRef.value)) {\n const copy = [...objectRef.value];\n copy[key] = v;\n objectRef.value = copy;\n } else {\n const newObject = { ...objectRef.value, [key]: v };\n Object.setPrototypeOf(newObject, Object.getPrototypeOf(objectRef.value));\n objectRef.value = newObject;\n }\n } else {\n objectRef.value[key] = v;\n }\n }\n }));\n }\n return result;\n}\n\nfunction tryOnBeforeMount(fn, sync = true, target) {\n const instance = getLifeCycleTarget(target);\n if (instance)\n onBeforeMount(fn, target);\n else if (sync)\n fn();\n else\n nextTick(fn);\n}\n\nfunction tryOnBeforeUnmount(fn, target) {\n const instance = getLifeCycleTarget(target);\n if (instance)\n onBeforeUnmount(fn, target);\n}\n\nfunction tryOnMounted(fn, sync = true, target) {\n const instance = getLifeCycleTarget();\n if (instance)\n onMounted(fn, target);\n else if (sync)\n fn();\n else\n nextTick(fn);\n}\n\nfunction tryOnUnmounted(fn, target) {\n const instance = getLifeCycleTarget(target);\n if (instance)\n onUnmounted(fn, target);\n}\n\nfunction createUntil(r, isNot = false) {\n function toMatch(condition, { flush = \"sync\", deep = false, timeout, throwOnTimeout } = {}) {\n let stop = null;\n const watcher = new Promise((resolve) => {\n stop = watch(\n r,\n (v) => {\n if (condition(v) !== isNot) {\n stop == null ? void 0 : stop();\n resolve(v);\n }\n },\n {\n flush,\n deep,\n immediate: true\n }\n );\n });\n const promises = [watcher];\n if (timeout != null) {\n promises.push(\n promiseTimeout(timeout, throwOnTimeout).then(() => toValue(r)).finally(() => stop == null ? void 0 : stop())\n );\n }\n return Promise.race(promises);\n }\n function toBe(value, options) {\n if (!isRef(value))\n return toMatch((v) => v === value, options);\n const { flush = \"sync\", deep = false, timeout, throwOnTimeout } = options != null ? options : {};\n let stop = null;\n const watcher = new Promise((resolve) => {\n stop = watch(\n [r, value],\n ([v1, v2]) => {\n if (isNot !== (v1 === v2)) {\n stop == null ? void 0 : stop();\n resolve(v1);\n }\n },\n {\n flush,\n deep,\n immediate: true\n }\n );\n });\n const promises = [watcher];\n if (timeout != null) {\n promises.push(\n promiseTimeout(timeout, throwOnTimeout).then(() => toValue(r)).finally(() => {\n stop == null ? void 0 : stop();\n return toValue(r);\n })\n );\n }\n return Promise.race(promises);\n }\n function toBeTruthy(options) {\n return toMatch((v) => Boolean(v), options);\n }\n function toBeNull(options) {\n return toBe(null, options);\n }\n function toBeUndefined(options) {\n return toBe(void 0, options);\n }\n function toBeNaN(options) {\n return toMatch(Number.isNaN, options);\n }\n function toContains(value, options) {\n return toMatch((v) => {\n const array = Array.from(v);\n return array.includes(value) || array.includes(toValue(value));\n }, options);\n }\n function changed(options) {\n return changedTimes(1, options);\n }\n function changedTimes(n = 1, options) {\n let count = -1;\n return toMatch(() => {\n count += 1;\n return count >= n;\n }, options);\n }\n if (Array.isArray(toValue(r))) {\n const instance = {\n toMatch,\n toContains,\n changed,\n changedTimes,\n get not() {\n return createUntil(r, !isNot);\n }\n };\n return instance;\n } else {\n const instance = {\n toMatch,\n toBe,\n toBeTruthy,\n toBeNull,\n toBeNaN,\n toBeUndefined,\n changed,\n changedTimes,\n get not() {\n return createUntil(r, !isNot);\n }\n };\n return instance;\n }\n}\nfunction until(r) {\n return createUntil(r);\n}\n\nfunction defaultComparator(value, othVal) {\n return value === othVal;\n}\nfunction useArrayDifference(...args) {\n var _a;\n const list = args[0];\n const values = args[1];\n let compareFn = (_a = args[2]) != null ? _a : defaultComparator;\n if (typeof compareFn === \"string\") {\n const key = compareFn;\n compareFn = (value, othVal) => value[key] === othVal[key];\n }\n return computed(() => toValue(list).filter((x) => toValue(values).findIndex((y) => compareFn(x, y)) === -1));\n}\n\nfunction useArrayEvery(list, fn) {\n return computed(() => toValue(list).every((element, index, array) => fn(toValue(element), index, array)));\n}\n\nfunction useArrayFilter(list, fn) {\n return computed(() => toValue(list).map((i) => toValue(i)).filter(fn));\n}\n\nfunction useArrayFind(list, fn) {\n return computed(() => toValue(\n toValue(list).find((element, index, array) => fn(toValue(element), index, array))\n ));\n}\n\nfunction useArrayFindIndex(list, fn) {\n return computed(() => toValue(list).findIndex((element, index, array) => fn(toValue(element), index, array)));\n}\n\nfunction findLast(arr, cb) {\n let index = arr.length;\n while (index-- > 0) {\n if (cb(arr[index], index, arr))\n return arr[index];\n }\n return void 0;\n}\nfunction useArrayFindLast(list, fn) {\n return computed(() => toValue(\n !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\nfunction isArrayIncludesOptions(obj) {\n return isObject(obj) && containsProp(obj, \"formIndex\", \"comparator\");\n}\nfunction useArrayIncludes(...args) {\n var _a;\n const list = args[0];\n const value = args[1];\n let comparator = args[2];\n let formIndex = 0;\n if (isArrayIncludesOptions(comparator)) {\n formIndex = (_a = comparator.fromIndex) != null ? _a : 0;\n comparator = comparator.comparator;\n }\n if (typeof comparator === \"string\") {\n const key = comparator;\n comparator = (element, value2) => element[key] === toValue(value2);\n }\n comparator = comparator != null ? comparator : (element, value2) => element === toValue(value2);\n return computed(() => toValue(list).slice(formIndex).some((element, index, array) => comparator(\n toValue(element),\n toValue(value),\n index,\n toValue(array)\n )));\n}\n\nfunction useArrayJoin(list, separator) {\n return computed(() => toValue(list).map((i) => toValue(i)).join(toValue(separator)));\n}\n\nfunction useArrayMap(list, fn) {\n return computed(() => toValue(list).map((i) => toValue(i)).map(fn));\n}\n\nfunction useArrayReduce(list, reducer, ...args) {\n const reduceCallback = (sum, value, index) => reducer(toValue(sum), toValue(value), index);\n return computed(() => {\n const resolved = toValue(list);\n return args.length ? resolved.reduce(reduceCallback, toValue(args[0])) : resolved.reduce(reduceCallback);\n });\n}\n\nfunction useArraySome(list, fn) {\n return computed(() => toValue(list).some((element, index, array) => fn(toValue(element), index, array)));\n}\n\nfunction uniq(array) {\n return Array.from(new Set(array));\n}\nfunction uniqueElementsBy(array, fn) {\n return array.reduce((acc, v) => {\n if (!acc.some((x) => fn(v, x, array)))\n acc.push(v);\n return acc;\n }, []);\n}\nfunction useArrayUnique(list, compareFn) {\n return computed(() => {\n const resolvedList = toValue(list).map((element) => toValue(element));\n return compareFn ? uniqueElementsBy(resolvedList, compareFn) : uniq(resolvedList);\n });\n}\n\nfunction useCounter(initialValue = 0, options = {}) {\n let _initialValue = unref(initialValue);\n const count = ref(initialValue);\n const {\n max = Number.POSITIVE_INFINITY,\n min = Number.NEGATIVE_INFINITY\n } = options;\n const inc = (delta = 1) => count.value = Math.max(Math.min(max, count.value + delta), min);\n const dec = (delta = 1) => count.value = Math.min(Math.max(min, count.value - delta), max);\n const get = () => count.value;\n const set = (val) => count.value = Math.max(min, Math.min(max, val));\n const reset = (val = _initialValue) => {\n _initialValue = val;\n return set(val);\n };\n return { count, inc, dec, get, set, reset };\n}\n\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}|SSS/g;\nfunction defaultMeridiem(hours, minutes, isLowercase, hasPeriod) {\n let m = hours < 12 ? \"AM\" : \"PM\";\n if (hasPeriod)\n m = m.split(\"\").reduce((acc, curr) => acc += `${curr}.`, \"\");\n return isLowercase ? m.toLowerCase() : m;\n}\nfunction formatOrdinal(num) {\n const suffixes = [\"th\", \"st\", \"nd\", \"rd\"];\n const v = num % 100;\n return num + (suffixes[(v - 20) % 10] || suffixes[v] || suffixes[0]);\n}\nfunction formatDate(date, formatStr, options = {}) {\n var _a;\n const years = date.getFullYear();\n const month = date.getMonth();\n const days = date.getDate();\n const hours = date.getHours();\n const minutes = date.getMinutes();\n const seconds = date.getSeconds();\n const milliseconds = date.getMilliseconds();\n const day = date.getDay();\n const meridiem = (_a = options.customMeridiem) != null ? _a : defaultMeridiem;\n const matches = {\n Yo: () => formatOrdinal(years),\n YY: () => String(years).slice(-2),\n YYYY: () => years,\n M: () => month + 1,\n Mo: () => formatOrdinal(month + 1),\n MM: () => `${month + 1}`.padStart(2, \"0\"),\n MMM: () => date.toLocaleDateString(options.locales, { month: \"short\" }),\n MMMM: () => date.toLocaleDateString(options.locales, { month: \"long\" }),\n D: () => String(days),\n Do: () => formatOrdinal(days),\n DD: () => `${days}`.padStart(2, \"0\"),\n H: () => String(hours),\n Ho: () => formatOrdinal(hours),\n HH: () => `${hours}`.padStart(2, \"0\"),\n h: () => `${hours % 12 || 12}`.padStart(1, \"0\"),\n ho: () => formatOrdinal(hours % 12 || 12),\n hh: () => `${hours % 12 || 12}`.padStart(2, \"0\"),\n m: () => String(minutes),\n mo: () => formatOrdinal(minutes),\n mm: () => `${minutes}`.padStart(2, \"0\"),\n s: () => String(seconds),\n so: () => formatOrdinal(seconds),\n ss: () => `${seconds}`.padStart(2, \"0\"),\n SSS: () => `${milliseconds}`.padStart(3, \"0\"),\n d: () => day,\n dd: () => date.toLocaleDateString(options.locales, { weekday: \"narrow\" }),\n ddd: () => date.toLocaleDateString(options.locales, { weekday: \"short\" }),\n dddd: () => date.toLocaleDateString(options.locales, { weekday: \"long\" }),\n A: () => meridiem(hours, minutes),\n AA: () => meridiem(hours, minutes, false, true),\n a: () => meridiem(hours, minutes, true),\n aa: () => meridiem(hours, minutes, true, true)\n };\n return formatStr.replace(REGEX_FORMAT, (match, $1) => {\n var _a2, _b;\n return (_b = $1 != null ? $1 : (_a2 = matches[match]) == null ? void 0 : _a2.call(matches)) != null ? _b : match;\n });\n}\nfunction normalizeDate(date) {\n if (date === null)\n return new Date(Number.NaN);\n if (date === void 0)\n return /* @__PURE__ */ new Date();\n if (date instanceof Date)\n return new Date(date);\n if (typeof date === \"string\" && !/Z$/i.test(date)) {\n const d = date.match(REGEX_PARSE);\n if (d) {\n const m = d[2] - 1 || 0;\n const ms = (d[7] || \"0\").substring(0, 3);\n return new Date(d[1], m, d[3] || 1, d[4] || 0, d[5] || 0, d[6] || 0, ms);\n }\n }\n return new Date(date);\n}\nfunction useDateFormat(date, formatStr = \"HH:mm:ss\", options = {}) {\n return computed(() => formatDate(normalizeDate(toValue(date)), toValue(formatStr), options));\n}\n\nfunction useIntervalFn(cb, interval = 1e3, options = {}) {\n const {\n immediate = true,\n immediateCallback = false\n } = options;\n let timer = null;\n const isActive = ref(false);\n function clean() {\n if (timer) {\n clearInterval(timer);\n timer = null;\n }\n }\n function pause() {\n isActive.value = false;\n clean();\n }\n function resume() {\n const intervalValue = toValue(interval);\n if (intervalValue <= 0)\n return;\n isActive.value = true;\n if (immediateCallback)\n cb();\n clean();\n timer = setInterval(cb, intervalValue);\n }\n if (immediate && isClient)\n resume();\n if (isRef(interval) || typeof interval === \"function\") {\n const stopWatch = watch(interval, () => {\n if (isActive.value && isClient)\n resume();\n });\n tryOnScopeDispose(stopWatch);\n }\n tryOnScopeDispose(pause);\n return {\n isActive,\n pause,\n resume\n };\n}\n\nfunction useInterval(interval = 1e3, options = {}) {\n const {\n controls: exposeControls = false,\n immediate = true,\n callback\n } = options;\n const counter = ref(0);\n const update = () => counter.value += 1;\n const reset = () => {\n counter.value = 0;\n };\n const controls = useIntervalFn(\n callback ? () => {\n update();\n callback(counter.value);\n } : update,\n interval,\n { immediate }\n );\n if (exposeControls) {\n return {\n counter,\n reset,\n ...controls\n };\n } else {\n return counter;\n }\n}\n\nfunction useLastChanged(source, options = {}) {\n var _a;\n const ms = ref((_a = options.initialValue) != null ? _a : null);\n watch(\n source,\n () => ms.value = timestamp(),\n options\n );\n return ms;\n}\n\nfunction useTimeoutFn(cb, interval, options = {}) {\n const {\n immediate = true\n } = options;\n const isPending = ref(false);\n let timer = null;\n function clear() {\n if (timer) {\n clearTimeout(timer);\n timer = null;\n }\n }\n function stop() {\n isPending.value = false;\n clear();\n }\n function start(...args) {\n clear();\n isPending.value = true;\n timer = setTimeout(() => {\n isPending.value = false;\n timer = null;\n cb(...args);\n }, toValue(interval));\n }\n if (immediate) {\n isPending.value = true;\n if (isClient)\n start();\n }\n tryOnScopeDispose(stop);\n return {\n isPending: readonly(isPending),\n start,\n stop\n };\n}\n\nfunction useTimeout(interval = 1e3, options = {}) {\n const {\n controls: exposeControls = false,\n callback\n } = options;\n const controls = useTimeoutFn(\n callback != null ? callback : noop,\n interval,\n options\n );\n const ready = computed(() => !controls.isPending.value);\n if (exposeControls) {\n return {\n ready,\n ...controls\n };\n } else {\n return ready;\n }\n}\n\nfunction useToNumber(value, options = {}) {\n const {\n method = \"parseFloat\",\n radix,\n nanToZero\n } = options;\n return computed(() => {\n let resolved = toValue(value);\n if (typeof resolved === \"string\")\n resolved = Number[method](resolved, radix);\n if (nanToZero && Number.isNaN(resolved))\n resolved = 0;\n return resolved;\n });\n}\n\nfunction useToString(value) {\n return computed(() => `${toValue(value)}`);\n}\n\nfunction useToggle(initialValue = false, options = {}) {\n const {\n truthyValue = true,\n falsyValue = false\n } = options;\n const valueIsRef = isRef(initialValue);\n const _value = ref(initialValue);\n function toggle(value) {\n if (arguments.length) {\n _value.value = value;\n return _value.value;\n } else {\n const truthy = toValue(truthyValue);\n _value.value = _value.value === truthy ? toValue(falsyValue) : truthy;\n return _value.value;\n }\n }\n if (valueIsRef)\n return toggle;\n else\n return [_value, toggle];\n}\n\nfunction watchArray(source, cb, options) {\n let oldList = (options == null ? void 0 : options.immediate) ? [] : [...source instanceof Function ? source() : Array.isArray(source) ? source : toValue(source)];\n return watch(source, (newList, _, onCleanup) => {\n const oldListRemains = Array.from({ length: oldList.length });\n const added = [];\n for (const obj of newList) {\n let found = false;\n for (let i = 0; i < oldList.length; i++) {\n if (!oldListRemains[i] && obj === oldList[i]) {\n oldListRemains[i] = true;\n found = true;\n break;\n }\n }\n if (!found)\n added.push(obj);\n }\n const removed = oldList.filter((_2, i) => !oldListRemains[i]);\n cb(newList, oldList, added, removed, onCleanup);\n oldList = [...newList];\n }, options);\n}\n\nfunction watchAtMost(source, cb, options) {\n const {\n count,\n ...watchOptions\n } = options;\n const current = ref(0);\n const stop = watchWithFilter(\n source,\n (...args) => {\n current.value += 1;\n if (current.value >= toValue(count))\n nextTick(() => stop());\n cb(...args);\n },\n watchOptions\n );\n return { count: current, stop };\n}\n\nfunction watchDebounced(source, cb, options = {}) {\n const {\n debounce = 0,\n maxWait = void 0,\n ...watchOptions\n } = options;\n return watchWithFilter(\n source,\n cb,\n {\n ...watchOptions,\n eventFilter: debounceFilter(debounce, { maxWait })\n }\n );\n}\n\nfunction watchDeep(source, cb, options) {\n return watch(\n source,\n cb,\n {\n ...options,\n deep: true\n }\n );\n}\n\nfunction watchIgnorable(source, cb, options = {}) {\n const {\n eventFilter = bypassFilter,\n ...watchOptions\n } = options;\n const filteredCb = createFilterWrapper(\n eventFilter,\n cb\n );\n let ignoreUpdates;\n let ignorePrevAsyncUpdates;\n let stop;\n if (watchOptions.flush === \"sync\") {\n const ignore = ref(false);\n ignorePrevAsyncUpdates = () => {\n };\n ignoreUpdates = (updater) => {\n ignore.value = true;\n updater();\n ignore.value = false;\n };\n stop = watch(\n source,\n (...args) => {\n if (!ignore.value)\n filteredCb(...args);\n },\n watchOptions\n );\n } else {\n const disposables = [];\n const ignoreCounter = ref(0);\n const syncCounter = ref(0);\n ignorePrevAsyncUpdates = () => {\n ignoreCounter.value = syncCounter.value;\n };\n disposables.push(\n watch(\n source,\n () => {\n syncCounter.value++;\n },\n { ...watchOptions, flush: \"sync\" }\n )\n );\n ignoreUpdates = (updater) => {\n const syncCounterPrev = syncCounter.value;\n updater();\n ignoreCounter.value += syncCounter.value - syncCounterPrev;\n };\n disposables.push(\n watch(\n source,\n (...args) => {\n const ignore = ignoreCounter.value > 0 && ignoreCounter.value === syncCounter.value;\n ignoreCounter.value = 0;\n syncCounter.value = 0;\n if (ignore)\n return;\n filteredCb(...args);\n },\n watchOptions\n )\n );\n stop = () => {\n disposables.forEach((fn) => fn());\n };\n }\n return { stop, ignoreUpdates, ignorePrevAsyncUpdates };\n}\n\nfunction watchImmediate(source, cb, options) {\n return watch(\n source,\n cb,\n {\n ...options,\n immediate: true\n }\n );\n}\n\nfunction watchOnce(source, cb, options) {\n const stop = watch(source, (...args) => {\n nextTick(() => stop());\n return cb(...args);\n }, options);\n return stop;\n}\n\nfunction watchThrottled(source, cb, options = {}) {\n const {\n throttle = 0,\n trailing = true,\n leading = true,\n ...watchOptions\n } = options;\n return watchWithFilter(\n source,\n cb,\n {\n ...watchOptions,\n eventFilter: throttleFilter(throttle, trailing, leading)\n }\n );\n}\n\nfunction watchTriggerable(source, cb, options = {}) {\n let cleanupFn;\n function onEffect() {\n if (!cleanupFn)\n return;\n const fn = cleanupFn;\n cleanupFn = void 0;\n fn();\n }\n function onCleanup(callback) {\n cleanupFn = callback;\n }\n const _cb = (value, oldValue) => {\n onEffect();\n return cb(value, oldValue, onCleanup);\n };\n const res = watchIgnorable(source, _cb, options);\n const { ignoreUpdates } = res;\n const trigger = () => {\n let res2;\n ignoreUpdates(() => {\n res2 = _cb(getWatchSources(source), getOldValue(source));\n });\n return res2;\n };\n return {\n ...res,\n trigger\n };\n}\nfunction getWatchSources(sources) {\n if (isReactive(sources))\n return sources;\n if (Array.isArray(sources))\n return sources.map((item) => toValue(item));\n return toValue(sources);\n}\nfunction getOldValue(source) {\n return Array.isArray(source) ? source.map(() => void 0) : void 0;\n}\n\nfunction whenever(source, cb, options) {\n const stop = watch(\n source,\n (v, ov, onInvalidate) => {\n if (v) {\n if (options == null ? void 0 : options.once)\n nextTick(() => stop());\n cb(v, ov, onInvalidate);\n }\n },\n {\n ...options,\n once: false\n }\n );\n return stop;\n}\n\nexport { assert, refAutoReset as autoResetRef, bypassFilter, camelize, clamp, computedEager, computedWithControl, containsProp, computedWithControl as controlledComputed, controlledRef, createEventHook, createFilterWrapper, createGlobalState, createInjectionState, reactify as createReactiveFn, createSharedComposable, createSingletonPromise, debounceFilter, refDebounced as debouncedRef, watchDebounced as debouncedWatch, directiveHooks, computedEager as eagerComputed, extendRef, formatDate, get, getLifeCycleTarget, hasOwn, hyphenate, identity, watchIgnorable as ignorableWatch, increaseWithUnit, injectLocal, invoke, isClient, isDef, isDefined, isIOS, isObject, isWorker, makeDestructurable, noop, normalizeDate, notNullish, now, objectEntries, objectOmit, objectPick, pausableFilter, watchPausable as pausableWatch, promiseTimeout, provideLocal, rand, reactify, reactifyObject, reactiveComputed, reactiveOmit, reactivePick, refAutoReset, refDebounced, refDefault, refThrottled, refWithControl, resolveRef, resolveUnref, set, syncRef, syncRefs, throttleFilter, refThrottled as throttledRef, watchThrottled as throttledWatch, timestamp, toReactive, toRef, toRefs, toValue, tryOnBeforeMount, tryOnBeforeUnmount, tryOnMounted, tryOnScopeDispose, tryOnUnmounted, until, useArrayDifference, useArrayEvery, useArrayFilter, useArrayFind, useArrayFindIndex, useArrayFindLast, useArrayIncludes, useArrayJoin, useArrayMap, useArrayReduce, useArraySome, useArrayUnique, useCounter, useDateFormat, refDebounced as useDebounce, useDebounceFn, useInterval, useIntervalFn, useLastChanged, refThrottled as useThrottle, useThrottleFn, useTimeout, useTimeoutFn, useToNumber, useToString, useToggle, watchArray, watchAtMost, watchDebounced, watchDeep, watchIgnorable, watchImmediate, watchOnce, watchPausable, watchThrottled, watchTriggerable, watchWithFilter, whenever };\n", "import { noop, makeDestructurable, camelize, toValue, isClient, isObject, tryOnScopeDispose, isIOS, tryOnMounted, notNullish, objectOmit, promiseTimeout, until, increaseWithUnit, objectEntries, createSingletonPromise, useTimeoutFn, pausableWatch, toRef, createEventHook, computedWithControl, timestamp, pausableFilter, watchIgnorable, debounceFilter, createFilterWrapper, bypassFilter, toRefs, useIntervalFn, containsProp, hasOwn, throttleFilter, useDebounceFn, useThrottleFn, clamp, syncRef, objectPick, tryOnUnmounted, watchWithFilter, tryOnBeforeUnmount, identity, isDef, isWorker } from '@vueuse/shared';\nexport * from '@vueuse/shared';\nimport { isRef, ref, shallowRef, watchEffect, computed, inject, isVue3, version, defineComponent, h, TransitionGroup, shallowReactive, Fragment, watch, getCurrentInstance, customRef, onUpdated, onMounted, isVue2, readonly, nextTick, reactive, markRaw, unref, getCurrentScope, set, del, isReadonly, onBeforeUpdate } from 'vue-demi';\n\nfunction computedAsync(evaluationCallback, initialState, optionsOrRef) {\n let options;\n if (isRef(optionsOrRef)) {\n options = {\n evaluating: optionsOrRef\n };\n } else {\n options = optionsOrRef || {};\n }\n const {\n lazy = false,\n evaluating = void 0,\n shallow = true,\n onError = noop\n } = options;\n const started = ref(!lazy);\n const current = shallow ? shallowRef(initialState) : ref(initialState);\n let counter = 0;\n watchEffect(async (onInvalidate) => {\n if (!started.value)\n return;\n counter++;\n const counterAtBeginning = counter;\n let hasFinished = false;\n if (evaluating) {\n Promise.resolve().then(() => {\n evaluating.value = true;\n });\n }\n try {\n const result = await evaluationCallback((cancelCallback) => {\n onInvalidate(() => {\n if (evaluating)\n evaluating.value = false;\n if (!hasFinished)\n cancelCallback();\n });\n });\n if (counterAtBeginning === counter)\n current.value = result;\n } catch (e) {\n onError(e);\n } finally {\n if (evaluating && counterAtBeginning === counter)\n evaluating.value = false;\n hasFinished = true;\n }\n });\n if (lazy) {\n return computed(() => {\n started.value = true;\n return current.value;\n });\n } else {\n return current;\n }\n}\n\nfunction computedInject(key, options, defaultSource, treatDefaultAsFactory) {\n let source = inject(key);\n if (defaultSource)\n source = inject(key, defaultSource);\n if (treatDefaultAsFactory)\n source = inject(key, defaultSource, treatDefaultAsFactory);\n if (typeof options === \"function\") {\n return computed((ctx) => options(source, ctx));\n } else {\n return computed({\n get: (ctx) => options.get(source, ctx),\n set: options.set\n });\n }\n}\n\nfunction createReusableTemplate(options = {}) {\n if (!isVue3 && !version.startsWith(\"2.7.\")) {\n if (process.env.NODE_ENV !== \"production\")\n throw new Error(\"[VueUse] createReusableTemplate only works in Vue 2.7 or above.\");\n return;\n }\n const {\n inheritAttrs = true\n } = options;\n const render = shallowRef();\n const define = /* #__PURE__ */ defineComponent({\n setup(_, { slots }) {\n return () => {\n render.value = slots.default;\n };\n }\n });\n const reuse = /* #__PURE__ */ defineComponent({\n inheritAttrs,\n setup(_, { attrs, slots }) {\n return () => {\n var _a;\n if (!render.value && process.env.NODE_ENV !== \"production\")\n throw new Error(\"[VueUse] Failed to find the definition of reusable template\");\n const vnode = (_a = render.value) == null ? void 0 : _a.call(render, { ...keysToCamelKebabCase(attrs), $slots: slots });\n return inheritAttrs && (vnode == null ? void 0 : vnode.length) === 1 ? vnode[0] : vnode;\n };\n }\n });\n return makeDestructurable(\n { define, reuse },\n [define, reuse]\n );\n}\nfunction keysToCamelKebabCase(obj) {\n const newObj = {};\n for (const key in obj)\n newObj[camelize(key)] = obj[key];\n return newObj;\n}\n\nfunction createTemplatePromise(options = {}) {\n if (!isVue3) {\n if (process.env.NODE_ENV !== \"production\")\n throw new Error(\"[VueUse] createTemplatePromise only works in Vue 3 or above.\");\n return;\n }\n let index = 0;\n const instances = ref([]);\n function create(...args) {\n const props = shallowReactive({\n key: index++,\n args,\n promise: void 0,\n resolve: () => {\n },\n reject: () => {\n },\n isResolving: false,\n options\n });\n instances.value.push(props);\n props.promise = new Promise((_resolve, _reject) => {\n props.resolve = (v) => {\n props.isResolving = true;\n return _resolve(v);\n };\n props.reject = _reject;\n }).finally(() => {\n props.promise = void 0;\n const index2 = instances.value.indexOf(props);\n if (index2 !== -1)\n instances.value.splice(index2, 1);\n });\n return props.promise;\n }\n function start(...args) {\n if (options.singleton && instances.value.length > 0)\n return instances.value[0].promise;\n return create(...args);\n }\n const component = /* #__PURE__ */ defineComponent((_, { slots }) => {\n const renderList = () => instances.value.map((props) => {\n var _a;\n return h(Fragment, { key: props.key }, (_a = slots.default) == null ? void 0 : _a.call(slots, props));\n });\n if (options.transition)\n return () => h(TransitionGroup, options.transition, renderList);\n return renderList;\n });\n component.start = start;\n return component;\n}\n\nfunction createUnrefFn(fn) {\n return function(...args) {\n return fn.apply(this, args.map((i) => toValue(i)));\n };\n}\n\nfunction unrefElement(elRef) {\n var _a;\n const plain = toValue(elRef);\n return (_a = plain == null ? void 0 : plain.$el) != null ? _a : plain;\n}\n\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\nfunction useEventListener(...args) {\n let target;\n let events;\n let listeners;\n let options;\n if (typeof args[0] === \"string\" || Array.isArray(args[0])) {\n [events, listeners, options] = args;\n target = defaultWindow;\n } else {\n [target, events, listeners, options] = args;\n }\n if (!target)\n return noop;\n if (!Array.isArray(events))\n events = [events];\n if (!Array.isArray(listeners))\n listeners = [listeners];\n const cleanups = [];\n const cleanup = () => {\n cleanups.forEach((fn) => fn());\n cleanups.length = 0;\n };\n const register = (el, event, listener, options2) => {\n el.addEventListener(event, listener, options2);\n return () => el.removeEventListener(event, listener, options2);\n };\n const stopWatch = watch(\n () => [unrefElement(target), toValue(options)],\n ([el, options2]) => {\n cleanup();\n if (!el)\n return;\n const optionsClone = isObject(options2) ? { ...options2 } : options2;\n cleanups.push(\n ...events.flatMap((event) => {\n return listeners.map((listener) => register(el, event, listener, optionsClone));\n })\n );\n },\n { immediate: true, flush: \"post\" }\n );\n const stop = () => {\n stopWatch();\n cleanup();\n };\n tryOnScopeDispose(stop);\n return stop;\n}\n\nlet _iOSWorkaround = false;\nfunction onClickOutside(target, handler, options = {}) {\n const { window = defaultWindow, ignore = [], capture = true, detectIframe = false } = options;\n if (!window)\n return noop;\n if (isIOS && !_iOSWorkaround) {\n _iOSWorkaround = true;\n Array.from(window.document.body.children).forEach((el) => el.addEventListener(\"click\", noop));\n window.document.documentElement.addEventListener(\"click\", noop);\n }\n let shouldListen = true;\n const shouldIgnore = (event) => {\n return ignore.some((target2) => {\n if (typeof target2 === \"string\") {\n return Array.from(window.document.querySelectorAll(target2)).some((el) => el === event.target || event.composedPath().includes(el));\n } else {\n const el = unrefElement(target2);\n return el && (event.target === el || event.composedPath().includes(el));\n }\n });\n };\n const listener = (event) => {\n const el = unrefElement(target);\n if (!el || el === event.target || event.composedPath().includes(el))\n return;\n if (event.detail === 0)\n shouldListen = !shouldIgnore(event);\n if (!shouldListen) {\n shouldListen = true;\n return;\n }\n handler(event);\n };\n const cleanup = [\n useEventListener(window, \"click\", listener, { passive: true, capture }),\n useEventListener(window, \"pointerdown\", (e) => {\n const el = unrefElement(target);\n shouldListen = !shouldIgnore(e) && !!(el && !e.composedPath().includes(el));\n }, { passive: true }),\n detectIframe && useEventListener(window, \"blur\", (event) => {\n setTimeout(() => {\n var _a;\n const el = unrefElement(target);\n if (((_a = window.document.activeElement) == null ? void 0 : _a.tagName) === \"IFRAME\" && !(el == null ? void 0 : el.contains(window.document.activeElement))) {\n handler(event);\n }\n }, 0);\n })\n ].filter(Boolean);\n const stop = () => cleanup.forEach((fn) => fn());\n return stop;\n}\n\nfunction createKeyPredicate(keyFilter) {\n if (typeof keyFilter === \"function\")\n return keyFilter;\n else if (typeof keyFilter === \"string\")\n return (event) => event.key === keyFilter;\n else if (Array.isArray(keyFilter))\n return (event) => keyFilter.includes(event.key);\n return () => true;\n}\nfunction onKeyStroke(...args) {\n let key;\n let handler;\n let options = {};\n if (args.length === 3) {\n key = args[0];\n handler = args[1];\n options = args[2];\n } else if (args.length === 2) {\n if (typeof args[1] === \"object\") {\n key = true;\n handler = args[0];\n options = args[1];\n } else {\n key = args[0];\n handler = args[1];\n }\n } else {\n key = true;\n handler = args[0];\n }\n const {\n target = defaultWindow,\n eventName = \"keydown\",\n passive = false,\n dedupe = false\n } = options;\n const predicate = createKeyPredicate(key);\n const listener = (e) => {\n if (e.repeat && toValue(dedupe))\n return;\n if (predicate(e))\n handler(e);\n };\n return useEventListener(target, eventName, listener, passive);\n}\nfunction onKeyDown(key, handler, options = {}) {\n return onKeyStroke(key, handler, { ...options, eventName: \"keydown\" });\n}\nfunction onKeyPressed(key, handler, options = {}) {\n return onKeyStroke(key, handler, { ...options, eventName: \"keypress\" });\n}\nfunction onKeyUp(key, handler, options = {}) {\n return onKeyStroke(key, handler, { ...options, eventName: \"keyup\" });\n}\n\nconst DEFAULT_DELAY = 500;\nconst DEFAULT_THRESHOLD = 10;\nfunction onLongPress(target, handler, options) {\n var _a, _b;\n const elementRef = computed(() => unrefElement(target));\n let timeout;\n let posStart;\n let startTimestamp;\n let hasLongPressed = false;\n function clear() {\n if (timeout) {\n clearTimeout(timeout);\n timeout = void 0;\n }\n posStart = void 0;\n startTimestamp = void 0;\n hasLongPressed = false;\n }\n function onRelease(ev) {\n var _a2, _b2, _c;\n const [_startTimestamp, _posStart, _hasLongPressed] = [startTimestamp, posStart, hasLongPressed];\n clear();\n if (!(options == null ? void 0 : options.onMouseUp) || !_posStart || !_startTimestamp)\n return;\n if (((_a2 = options == null ? void 0 : options.modifiers) == null ? void 0 : _a2.self) && ev.target !== elementRef.value)\n return;\n if ((_b2 = options == null ? void 0 : options.modifiers) == null ? void 0 : _b2.prevent)\n ev.preventDefault();\n if ((_c = options == null ? void 0 : options.modifiers) == null ? void 0 : _c.stop)\n ev.stopPropagation();\n const dx = ev.x - _posStart.x;\n const dy = ev.y - _posStart.y;\n const distance = Math.sqrt(dx * dx + dy * dy);\n options.onMouseUp(ev.timeStamp - _startTimestamp, distance, _hasLongPressed);\n }\n function onDown(ev) {\n var _a2, _b2, _c, _d;\n if (((_a2 = options == null ? void 0 : options.modifiers) == null ? void 0 : _a2.self) && ev.target !== elementRef.value)\n return;\n clear();\n if ((_b2 = options == null ? void 0 : options.modifiers) == null ? void 0 : _b2.prevent)\n ev.preventDefault();\n if ((_c = options == null ? void 0 : options.modifiers) == null ? void 0 : _c.stop)\n ev.stopPropagation();\n posStart = {\n x: ev.x,\n y: ev.y\n };\n startTimestamp = ev.timeStamp;\n timeout = setTimeout(\n () => {\n hasLongPressed = true;\n handler(ev);\n },\n (_d = options == null ? void 0 : options.delay) != null ? _d : DEFAULT_DELAY\n );\n }\n function onMove(ev) {\n var _a2, _b2, _c, _d;\n if (((_a2 = options == null ? void 0 : options.modifiers) == null ? void 0 : _a2.self) && ev.target !== elementRef.value)\n return;\n if (!posStart || (options == null ? void 0 : options.distanceThreshold) === false)\n return;\n if ((_b2 = options == null ? void 0 : options.modifiers) == null ? void 0 : _b2.prevent)\n ev.preventDefault();\n if ((_c = options == null ? void 0 : options.modifiers) == null ? void 0 : _c.stop)\n ev.stopPropagation();\n const dx = ev.x - posStart.x;\n const dy = ev.y - posStart.y;\n const distance = Math.sqrt(dx * dx + dy * dy);\n if (distance >= ((_d = options == null ? void 0 : options.distanceThreshold) != null ? _d : DEFAULT_THRESHOLD))\n clear();\n }\n const listenerOptions = {\n capture: (_a = options == null ? void 0 : options.modifiers) == null ? void 0 : _a.capture,\n once: (_b = options == null ? void 0 : options.modifiers) == null ? void 0 : _b.once\n };\n const cleanup = [\n useEventListener(elementRef, \"pointerdown\", onDown, listenerOptions),\n useEventListener(elementRef, \"pointermove\", onMove, listenerOptions),\n useEventListener(elementRef, [\"pointerup\", \"pointerleave\"], onRelease, listenerOptions)\n ];\n const stop = () => cleanup.forEach((fn) => fn());\n return stop;\n}\n\nfunction isFocusedElementEditable() {\n const { activeElement, body } = document;\n if (!activeElement)\n return false;\n if (activeElement === body)\n return false;\n switch (activeElement.tagName) {\n case \"INPUT\":\n case \"TEXTAREA\":\n return true;\n }\n return activeElement.hasAttribute(\"contenteditable\");\n}\nfunction isTypedCharValid({\n keyCode,\n metaKey,\n ctrlKey,\n altKey\n}) {\n if (metaKey || ctrlKey || altKey)\n return false;\n if (keyCode >= 48 && keyCode <= 57)\n return true;\n if (keyCode >= 65 && keyCode <= 90)\n return true;\n if (keyCode >= 97 && keyCode <= 122)\n return true;\n return false;\n}\nfunction onStartTyping(callback, options = {}) {\n const { document: document2 = defaultDocument } = options;\n const keydown = (event) => {\n !isFocusedElementEditable() && isTypedCharValid(event) && callback(event);\n };\n if (document2)\n useEventListener(document2, \"keydown\", keydown, { passive: true });\n}\n\nfunction templateRef(key, initialValue = null) {\n const instance = getCurrentInstance();\n let _trigger = () => {\n };\n const element = customRef((track, trigger) => {\n _trigger = trigger;\n return {\n get() {\n var _a, _b;\n track();\n return (_b = (_a = instance == null ? void 0 : instance.proxy) == null ? void 0 : _a.$refs[key]) != null ? _b : initialValue;\n },\n set() {\n }\n };\n });\n tryOnMounted(_trigger);\n onUpdated(_trigger);\n return element;\n}\n\nfunction useMounted() {\n const isMounted = ref(false);\n const instance = getCurrentInstance();\n if (instance) {\n onMounted(() => {\n isMounted.value = true;\n }, isVue2 ? void 0 : instance);\n }\n return isMounted;\n}\n\nfunction useSupported(callback) {\n const isMounted = useMounted();\n return computed(() => {\n isMounted.value;\n return Boolean(callback());\n });\n}\n\nfunction useMutationObserver(target, callback, options = {}) {\n const { window = defaultWindow, ...mutationOptions } = options;\n let observer;\n const isSupported = useSupported(() => window && \"MutationObserver\" in window);\n const cleanup = () => {\n if (observer) {\n observer.disconnect();\n observer = void 0;\n }\n };\n const targets = computed(() => {\n const value = toValue(target);\n const items = (Array.isArray(value) ? value : [value]).map(unrefElement).filter(notNullish);\n return new Set(items);\n });\n const stopWatch = watch(\n () => targets.value,\n (targets2) => {\n cleanup();\n if (isSupported.value && targets2.size) {\n observer = new MutationObserver(callback);\n targets2.forEach((el) => observer.observe(el, mutationOptions));\n }\n },\n { immediate: true, flush: \"post\" }\n );\n const takeRecords = () => {\n return observer == null ? void 0 : observer.takeRecords();\n };\n const stop = () => {\n cleanup();\n stopWatch();\n };\n tryOnScopeDispose(stop);\n return {\n isSupported,\n stop,\n takeRecords\n };\n}\n\nfunction useActiveElement(options = {}) {\n var _a;\n const {\n window = defaultWindow,\n deep = true,\n triggerOnRemoval = false\n } = options;\n const document = (_a = options.document) != null ? _a : window == null ? void 0 : window.document;\n const getDeepActiveElement = () => {\n var _a2;\n let element = document == null ? void 0 : document.activeElement;\n if (deep) {\n while (element == null ? void 0 : element.shadowRoot)\n element = (_a2 = element == null ? void 0 : element.shadowRoot) == null ? void 0 : _a2.activeElement;\n }\n return element;\n };\n const activeElement = ref();\n const trigger = () => {\n activeElement.value = getDeepActiveElement();\n };\n if (window) {\n useEventListener(window, \"blur\", (event) => {\n if (event.relatedTarget !== null)\n return;\n trigger();\n }, true);\n useEventListener(window, \"focus\", trigger, true);\n }\n if (triggerOnRemoval) {\n useMutationObserver(document, (mutations) => {\n mutations.filter((m) => m.removedNodes.length).map((n) => Array.from(n.removedNodes)).flat().forEach((node) => {\n if (node === activeElement.value)\n trigger();\n });\n }, {\n childList: true,\n subtree: true\n });\n }\n trigger();\n return activeElement;\n}\n\nfunction useRafFn(fn, options = {}) {\n const {\n immediate = true,\n fpsLimit = void 0,\n window = defaultWindow\n } = options;\n const isActive = ref(false);\n const intervalLimit = fpsLimit ? 1e3 / fpsLimit : null;\n let previousFrameTimestamp = 0;\n let rafId = null;\n function loop(timestamp) {\n if (!isActive.value || !window)\n return;\n if (!previousFrameTimestamp)\n previousFrameTimestamp = timestamp;\n const delta = timestamp - previousFrameTimestamp;\n if (intervalLimit && delta < intervalLimit) {\n rafId = window.requestAnimationFrame(loop);\n return;\n }\n previousFrameTimestamp = timestamp;\n fn({ delta, timestamp });\n rafId = window.requestAnimationFrame(loop);\n }\n function resume() {\n if (!isActive.value && window) {\n isActive.value = true;\n previousFrameTimestamp = 0;\n rafId = window.requestAnimationFrame(loop);\n }\n }\n function pause() {\n isActive.value = false;\n if (rafId != null && window) {\n window.cancelAnimationFrame(rafId);\n rafId = null;\n }\n }\n if (immediate)\n resume();\n tryOnScopeDispose(pause);\n return {\n isActive: readonly(isActive),\n pause,\n resume\n };\n}\n\nfunction useAnimate(target, keyframes, options) {\n let config;\n let animateOptions;\n if (isObject(options)) {\n config = options;\n animateOptions = objectOmit(options, [\"window\", \"immediate\", \"commitStyles\", \"persist\", \"onReady\", \"onError\"]);\n } else {\n config = { duration: options };\n animateOptions = options;\n }\n const {\n window = defaultWindow,\n immediate = true,\n commitStyles,\n persist,\n playbackRate: _playbackRate = 1,\n onReady,\n onError = (e) => {\n console.error(e);\n }\n } = config;\n const isSupported = useSupported(() => window && HTMLElement && \"animate\" in HTMLElement.prototype);\n const animate = shallowRef(void 0);\n const store = shallowReactive({\n startTime: null,\n currentTime: null,\n timeline: null,\n playbackRate: _playbackRate,\n pending: false,\n playState: immediate ? \"idle\" : \"paused\",\n replaceState: \"active\"\n });\n const pending = computed(() => store.pending);\n const playState = computed(() => store.playState);\n const replaceState = computed(() => store.replaceState);\n const startTime = computed({\n get() {\n return store.startTime;\n },\n set(value) {\n store.startTime = value;\n if (animate.value)\n animate.value.startTime = value;\n }\n });\n const currentTime = computed({\n get() {\n return store.currentTime;\n },\n set(value) {\n store.currentTime = value;\n if (animate.value) {\n animate.value.currentTime = value;\n syncResume();\n }\n }\n });\n const timeline = computed({\n get() {\n return store.timeline;\n },\n set(value) {\n store.timeline = value;\n if (animate.value)\n animate.value.timeline = value;\n }\n });\n const playbackRate = computed({\n get() {\n return store.playbackRate;\n },\n set(value) {\n store.playbackRate = value;\n if (animate.value)\n animate.value.playbackRate = value;\n }\n });\n const play = () => {\n if (animate.value) {\n try {\n animate.value.play();\n syncResume();\n } catch (e) {\n syncPause();\n onError(e);\n }\n } else {\n update();\n }\n };\n const pause = () => {\n var _a;\n try {\n (_a = animate.value) == null ? void 0 : _a.pause();\n syncPause();\n } catch (e) {\n onError(e);\n }\n };\n const reverse = () => {\n var _a;\n !animate.value && update();\n try {\n (_a = animate.value) == null ? void 0 : _a.reverse();\n syncResume();\n } catch (e) {\n syncPause();\n onError(e);\n }\n };\n const finish = () => {\n var _a;\n try {\n (_a = animate.value) == null ? void 0 : _a.finish();\n syncPause();\n } catch (e) {\n onError(e);\n }\n };\n const cancel = () => {\n var _a;\n try {\n (_a = animate.value) == null ? void 0 : _a.cancel();\n syncPause();\n } catch (e) {\n onError(e);\n }\n };\n watch(() => unrefElement(target), (el) => {\n el && update();\n });\n watch(() => keyframes, (value) => {\n !animate.value && update();\n if (!unrefElement(target) && animate.value) {\n animate.value.effect = new KeyframeEffect(\n unrefElement(target),\n toValue(value),\n animateOptions\n );\n }\n }, { deep: true });\n tryOnMounted(() => {\n nextTick(() => update(true));\n });\n tryOnScopeDispose(cancel);\n function update(init) {\n const el = unrefElement(target);\n if (!isSupported.value || !el)\n return;\n if (!animate.value)\n animate.value = el.animate(toValue(keyframes), animateOptions);\n if (persist)\n animate.value.persist();\n if (_playbackRate !== 1)\n animate.value.playbackRate = _playbackRate;\n if (init && !immediate)\n animate.value.pause();\n else\n syncResume();\n onReady == null ? void 0 : onReady(animate.value);\n }\n useEventListener(animate, [\"cancel\", \"finish\", \"remove\"], syncPause);\n useEventListener(animate, \"finish\", () => {\n var _a;\n if (commitStyles)\n (_a = animate.value) == null ? void 0 : _a.commitStyles();\n });\n const { resume: resumeRef, pause: pauseRef } = useRafFn(() => {\n if (!animate.value)\n return;\n store.pending = animate.value.pending;\n store.playState = animate.value.playState;\n store.replaceState = animate.value.replaceState;\n store.startTime = animate.value.startTime;\n store.currentTime = animate.value.currentTime;\n store.timeline = animate.value.timeline;\n store.playbackRate = animate.value.playbackRate;\n }, { immediate: false });\n function syncResume() {\n if (isSupported.value)\n resumeRef();\n }\n function syncPause() {\n if (isSupported.value && window)\n window.requestAnimationFrame(pauseRef);\n }\n return {\n isSupported,\n animate,\n // actions\n play,\n pause,\n reverse,\n finish,\n cancel,\n // state\n pending,\n playState,\n replaceState,\n startTime,\n currentTime,\n timeline,\n playbackRate\n };\n}\n\nfunction useAsyncQueue(tasks, options) {\n const {\n interrupt = true,\n onError = noop,\n onFinished = noop,\n signal\n } = options || {};\n const promiseState = {\n aborted: \"aborted\",\n fulfilled: \"fulfilled\",\n pending: \"pending\",\n rejected: \"rejected\"\n };\n const initialResult = Array.from(Array.from({ length: tasks.length }), () => ({ state: promiseState.pending, data: null }));\n const result = reactive(initialResult);\n const activeIndex = ref(-1);\n if (!tasks || tasks.length === 0) {\n onFinished();\n return {\n activeIndex,\n result\n };\n }\n function updateResult(state, res) {\n activeIndex.value++;\n result[activeIndex.value].data = res;\n result[activeIndex.value].state = state;\n }\n tasks.reduce((prev, curr) => {\n return prev.then((prevRes) => {\n var _a;\n if (signal == null ? void 0 : signal.aborted) {\n updateResult(promiseState.aborted, new Error(\"aborted\"));\n return;\n }\n if (((_a = result[activeIndex.value]) == null ? void 0 : _a.state) === promiseState.rejected && interrupt) {\n onFinished();\n return;\n }\n const done = curr(prevRes).then((currentRes) => {\n updateResult(promiseState.fulfilled, currentRes);\n activeIndex.value === tasks.length - 1 && onFinished();\n return currentRes;\n });\n if (!signal)\n return done;\n return Promise.race([done, whenAborted(signal)]);\n }).catch((e) => {\n if (signal == null ? void 0 : signal.aborted) {\n updateResult(promiseState.aborted, e);\n return e;\n }\n updateResult(promiseState.rejected, e);\n onError();\n return e;\n });\n }, Promise.resolve());\n return {\n activeIndex,\n result\n };\n}\nfunction whenAborted(signal) {\n return new Promise((resolve, reject) => {\n const error = new Error(\"aborted\");\n if (signal.aborted)\n reject(error);\n else\n signal.addEventListener(\"abort\", () => reject(error), { once: true });\n });\n}\n\nfunction useAsyncState(promise, initialState, options) {\n const {\n immediate = true,\n delay = 0,\n onError = noop,\n onSuccess = noop,\n resetOnExecute = true,\n shallow = true,\n throwError\n } = options != null ? options : {};\n const state = shallow ? shallowRef(initialState) : ref(initialState);\n const isReady = ref(false);\n const isLoading = ref(false);\n const error = shallowRef(void 0);\n async function execute(delay2 = 0, ...args) {\n if (resetOnExecute)\n state.value = initialState;\n error.value = void 0;\n isReady.value = false;\n isLoading.value = true;\n if (delay2 > 0)\n await promiseTimeout(delay2);\n const _promise = typeof promise === \"function\" ? promise(...args) : promise;\n try {\n const data = await _promise;\n state.value = data;\n isReady.value = true;\n onSuccess(data);\n } catch (e) {\n error.value = e;\n onError(e);\n if (throwError)\n throw e;\n } finally {\n isLoading.value = false;\n }\n return state.value;\n }\n if (immediate)\n execute(delay);\n const shell = {\n state,\n isReady,\n isLoading,\n error,\n execute\n };\n function waitUntilIsLoaded() {\n return new Promise((resolve, reject) => {\n until(isLoading).toBe(false).then(() => resolve(shell)).catch(reject);\n });\n }\n return {\n ...shell,\n then(onFulfilled, onRejected) {\n return waitUntilIsLoaded().then(onFulfilled, onRejected);\n }\n };\n}\n\nconst defaults = {\n array: (v) => JSON.stringify(v),\n object: (v) => JSON.stringify(v),\n set: (v) => JSON.stringify(Array.from(v)),\n map: (v) => JSON.stringify(Object.fromEntries(v)),\n null: () => \"\"\n};\nfunction getDefaultSerialization(target) {\n if (!target)\n return defaults.null;\n if (target instanceof Map)\n return defaults.map;\n else if (target instanceof Set)\n return defaults.set;\n else if (Array.isArray(target))\n return defaults.array;\n else\n return defaults.object;\n}\n\nfunction useBase64(target, options) {\n const base64 = ref(\"\");\n const promise = ref();\n function execute() {\n if (!isClient)\n return;\n promise.value = new Promise((resolve, reject) => {\n try {\n const _target = toValue(target);\n if (_target == null) {\n resolve(\"\");\n } else if (typeof _target === \"string\") {\n resolve(blobToBase64(new Blob([_target], { type: \"text/plain\" })));\n } else if (_target instanceof Blob) {\n resolve(blobToBase64(_target));\n } else if (_target instanceof ArrayBuffer) {\n resolve(window.btoa(String.fromCharCode(...new Uint8Array(_target))));\n } else if (_target instanceof HTMLCanvasElement) {\n resolve(_target.toDataURL(options == null ? void 0 : options.type, options == null ? void 0 : options.quality));\n } else if (_target instanceof HTMLImageElement) {\n const img = _target.cloneNode(false);\n img.crossOrigin = \"Anonymous\";\n imgLoaded(img).then(() => {\n const canvas = document.createElement(\"canvas\");\n const ctx = canvas.getContext(\"2d\");\n canvas.width = img.width;\n canvas.height = img.height;\n ctx.drawImage(img, 0, 0, canvas.width, canvas.height);\n resolve(canvas.toDataURL(options == null ? void 0 : options.type, options == null ? void 0 : options.quality));\n }).catch(reject);\n } else if (typeof _target === \"object\") {\n const _serializeFn = (options == null ? void 0 : options.serializer) || getDefaultSerialization(_target);\n const serialized = _serializeFn(_target);\n return resolve(blobToBase64(new Blob([serialized], { type: \"application/json\" })));\n } else {\n reject(new Error(\"target is unsupported types\"));\n }\n } catch (error) {\n reject(error);\n }\n });\n promise.value.then((res) => base64.value = res);\n return promise.value;\n }\n if (isRef(target) || typeof target === \"function\")\n watch(target, execute, { immediate: true });\n else\n execute();\n return {\n base64,\n promise,\n execute\n };\n}\nfunction imgLoaded(img) {\n return new Promise((resolve, reject) => {\n if (!img.complete) {\n img.onload = () => {\n resolve();\n };\n img.onerror = reject;\n } else {\n resolve();\n }\n });\n}\nfunction blobToBase64(blob) {\n return new Promise((resolve, reject) => {\n const fr = new FileReader();\n fr.onload = (e) => {\n resolve(e.target.result);\n };\n fr.onerror = reject;\n fr.readAsDataURL(blob);\n });\n}\n\nfunction useBattery(options = {}) {\n const { navigator = defaultNavigator } = options;\n const events = [\"chargingchange\", \"chargingtimechange\", \"dischargingtimechange\", \"levelchange\"];\n const isSupported = useSupported(() => navigator && \"getBattery\" in navigator && typeof navigator.getBattery === \"function\");\n const charging = ref(false);\n const chargingTime = ref(0);\n const dischargingTime = ref(0);\n const level = ref(1);\n let battery;\n function updateBatteryInfo() {\n charging.value = this.charging;\n chargingTime.value = this.chargingTime || 0;\n dischargingTime.value = this.dischargingTime || 0;\n level.value = this.level;\n }\n if (isSupported.value) {\n navigator.getBattery().then((_battery) => {\n battery = _battery;\n updateBatteryInfo.call(battery);\n useEventListener(battery, events, updateBatteryInfo, { passive: true });\n });\n }\n return {\n isSupported,\n charging,\n chargingTime,\n dischargingTime,\n level\n };\n}\n\nfunction useBluetooth(options) {\n let {\n acceptAllDevices = false\n } = options || {};\n const {\n filters = void 0,\n optionalServices = void 0,\n navigator = defaultNavigator\n } = options || {};\n const isSupported = useSupported(() => navigator && \"bluetooth\" in navigator);\n const device = shallowRef(void 0);\n const error = shallowRef(null);\n watch(device, () => {\n connectToBluetoothGATTServer();\n });\n async function requestDevice() {\n if (!isSupported.value)\n return;\n error.value = null;\n if (filters && filters.length > 0)\n acceptAllDevices = false;\n try {\n device.value = await (navigator == null ? void 0 : navigator.bluetooth.requestDevice({\n acceptAllDevices,\n filters,\n optionalServices\n }));\n } catch (err) {\n error.value = err;\n }\n }\n const server = ref();\n const isConnected = computed(() => {\n var _a;\n return ((_a = server.value) == null ? void 0 : _a.connected) || false;\n });\n async function connectToBluetoothGATTServer() {\n error.value = null;\n if (device.value && device.value.gatt) {\n device.value.addEventListener(\"gattserverdisconnected\", () => {\n });\n try {\n server.value = await device.value.gatt.connect();\n } catch (err) {\n error.value = err;\n }\n }\n }\n tryOnMounted(() => {\n var _a;\n if (device.value)\n (_a = device.value.gatt) == null ? void 0 : _a.connect();\n });\n tryOnScopeDispose(() => {\n var _a;\n if (device.value)\n (_a = device.value.gatt) == null ? void 0 : _a.disconnect();\n });\n return {\n isSupported,\n isConnected,\n // Device:\n device,\n requestDevice,\n // Server:\n server,\n // Errors:\n error\n };\n}\n\nfunction useMediaQuery(query, options = {}) {\n const { window = defaultWindow } = options;\n const isSupported = useSupported(() => window && \"matchMedia\" in window && typeof window.matchMedia === \"function\");\n let mediaQuery;\n const matches = ref(false);\n const handler = (event) => {\n matches.value = event.matches;\n };\n const cleanup = () => {\n if (!mediaQuery)\n return;\n if (\"removeEventListener\" in mediaQuery)\n mediaQuery.removeEventListener(\"change\", handler);\n else\n mediaQuery.removeListener(handler);\n };\n const stopWatch = watchEffect(() => {\n if (!isSupported.value)\n return;\n cleanup();\n mediaQuery = window.matchMedia(toValue(query));\n if (\"addEventListener\" in mediaQuery)\n mediaQuery.addEventListener(\"change\", handler);\n else\n mediaQuery.addListener(handler);\n matches.value = mediaQuery.matches;\n });\n tryOnScopeDispose(() => {\n stopWatch();\n cleanup();\n mediaQuery = void 0;\n });\n return matches;\n}\n\nconst breakpointsTailwind = {\n \"sm\": 640,\n \"md\": 768,\n \"lg\": 1024,\n \"xl\": 1280,\n \"2xl\": 1536\n};\nconst breakpointsBootstrapV5 = {\n xs: 0,\n sm: 576,\n md: 768,\n lg: 992,\n xl: 1200,\n xxl: 1400\n};\nconst breakpointsVuetifyV2 = {\n xs: 0,\n sm: 600,\n md: 960,\n lg: 1264,\n xl: 1904\n};\nconst breakpointsVuetifyV3 = {\n xs: 0,\n sm: 600,\n md: 960,\n lg: 1280,\n xl: 1920,\n xxl: 2560\n};\nconst breakpointsVuetify = breakpointsVuetifyV2;\nconst breakpointsAntDesign = {\n xs: 480,\n sm: 576,\n md: 768,\n lg: 992,\n xl: 1200,\n xxl: 1600\n};\nconst breakpointsQuasar = {\n xs: 0,\n sm: 600,\n md: 1024,\n lg: 1440,\n xl: 1920\n};\nconst breakpointsSematic = {\n mobileS: 320,\n mobileM: 375,\n mobileL: 425,\n tablet: 768,\n laptop: 1024,\n laptopL: 1440,\n desktop4K: 2560\n};\nconst breakpointsMasterCss = {\n \"3xs\": 360,\n \"2xs\": 480,\n \"xs\": 600,\n \"sm\": 768,\n \"md\": 1024,\n \"lg\": 1280,\n \"xl\": 1440,\n \"2xl\": 1600,\n \"3xl\": 1920,\n \"4xl\": 2560\n};\nconst breakpointsPrimeFlex = {\n sm: 576,\n md: 768,\n lg: 992,\n xl: 1200\n};\n\nfunction useBreakpoints(breakpoints, options = {}) {\n function getValue(k, delta) {\n let v = toValue(breakpoints[toValue(k)]);\n if (delta != null)\n v = increaseWithUnit(v, delta);\n if (typeof v === \"number\")\n v = `${v}px`;\n return v;\n }\n const { window = defaultWindow, strategy = \"min-width\" } = options;\n function match(query) {\n if (!window)\n return false;\n return window.matchMedia(query).matches;\n }\n const greaterOrEqual = (k) => {\n return useMediaQuery(() => `(min-width: ${getValue(k)})`, options);\n };\n const smallerOrEqual = (k) => {\n return useMediaQuery(() => `(max-width: ${getValue(k)})`, options);\n };\n const shortcutMethods = Object.keys(breakpoints).reduce((shortcuts, k) => {\n Object.defineProperty(shortcuts, k, {\n get: () => strategy === \"min-width\" ? greaterOrEqual(k) : smallerOrEqual(k),\n enumerable: true,\n configurable: true\n });\n return shortcuts;\n }, {});\n function current() {\n const points = Object.keys(breakpoints).map((i) => [i, greaterOrEqual(i)]);\n return computed(() => points.filter(([, v]) => v.value).map(([k]) => k));\n }\n return Object.assign(shortcutMethods, {\n greaterOrEqual,\n smallerOrEqual,\n greater(k) {\n return useMediaQuery(() => `(min-width: ${getValue(k, 0.1)})`, options);\n },\n smaller(k) {\n return useMediaQuery(() => `(max-width: ${getValue(k, -0.1)})`, options);\n },\n between(a, b) {\n return useMediaQuery(() => `(min-width: ${getValue(a)}) and (max-width: ${getValue(b, -0.1)})`, options);\n },\n isGreater(k) {\n return match(`(min-width: ${getValue(k, 0.1)})`);\n },\n isGreaterOrEqual(k) {\n return match(`(min-width: ${getValue(k)})`);\n },\n isSmaller(k) {\n return match(`(max-width: ${getValue(k, -0.1)})`);\n },\n isSmallerOrEqual(k) {\n return match(`(max-width: ${getValue(k)})`);\n },\n isInBetween(a, b) {\n return match(`(min-width: ${getValue(a)}) and (max-width: ${getValue(b, -0.1)})`);\n },\n current,\n active() {\n const bps = current();\n return computed(() => bps.value.length === 0 ? \"\" : bps.value.at(-1));\n }\n });\n}\n\nfunction useBroadcastChannel(options) {\n const {\n name,\n window = defaultWindow\n } = options;\n const isSupported = useSupported(() => window && \"BroadcastChannel\" in window);\n const isClosed = ref(false);\n const channel = ref();\n const data = ref();\n const error = shallowRef(null);\n const post = (data2) => {\n if (channel.value)\n channel.value.postMessage(data2);\n };\n const close = () => {\n if (channel.value)\n channel.value.close();\n isClosed.value = true;\n };\n if (isSupported.value) {\n tryOnMounted(() => {\n error.value = null;\n channel.value = new BroadcastChannel(name);\n channel.value.addEventListener(\"message\", (e) => {\n data.value = e.data;\n }, { passive: true });\n channel.value.addEventListener(\"messageerror\", (e) => {\n error.value = e;\n }, { passive: true });\n channel.value.addEventListener(\"close\", () => {\n isClosed.value = true;\n });\n });\n }\n tryOnScopeDispose(() => {\n close();\n });\n return {\n isSupported,\n channel,\n data,\n post,\n close,\n error,\n isClosed\n };\n}\n\nconst WRITABLE_PROPERTIES = [\n \"hash\",\n \"host\",\n \"hostname\",\n \"href\",\n \"pathname\",\n \"port\",\n \"protocol\",\n \"search\"\n];\nfunction useBrowserLocation(options = {}) {\n const { window = defaultWindow } = options;\n const refs = Object.fromEntries(\n WRITABLE_PROPERTIES.map((key) => [key, ref()])\n );\n for (const [key, ref2] of objectEntries(refs)) {\n watch(ref2, (value) => {\n if (!(window == null ? void 0 : window.location) || window.location[key] === value)\n return;\n window.location[key] = value;\n });\n }\n const buildState = (trigger) => {\n var _a;\n const { state: state2, length } = (window == null ? void 0 : window.history) || {};\n const { origin } = (window == null ? void 0 : window.location) || {};\n for (const key of WRITABLE_PROPERTIES)\n refs[key].value = (_a = window == null ? void 0 : window.location) == null ? void 0 : _a[key];\n return reactive({\n trigger,\n state: state2,\n length,\n origin,\n ...refs\n });\n };\n const state = ref(buildState(\"load\"));\n if (window) {\n useEventListener(window, \"popstate\", () => state.value = buildState(\"popstate\"), { passive: true });\n useEventListener(window, \"hashchange\", () => state.value = buildState(\"hashchange\"), { passive: true });\n }\n return state;\n}\n\nfunction useCached(refValue, comparator = (a, b) => a === b, watchOptions) {\n const cachedValue = ref(refValue.value);\n watch(() => refValue.value, (value) => {\n if (!comparator(value, cachedValue.value))\n cachedValue.value = value;\n }, watchOptions);\n return cachedValue;\n}\n\nfunction usePermission(permissionDesc, options = {}) {\n const {\n controls = false,\n navigator = defaultNavigator\n } = options;\n const isSupported = useSupported(() => navigator && \"permissions\" in navigator);\n let permissionStatus;\n const desc = typeof permissionDesc === \"string\" ? { name: permissionDesc } : permissionDesc;\n const state = ref();\n const onChange = () => {\n if (permissionStatus)\n state.value = permissionStatus.state;\n };\n const query = createSingletonPromise(async () => {\n if (!isSupported.value)\n return;\n if (!permissionStatus) {\n try {\n permissionStatus = await navigator.permissions.query(desc);\n useEventListener(permissionStatus, \"change\", onChange);\n onChange();\n } catch (e) {\n state.value = \"prompt\";\n }\n }\n return permissionStatus;\n });\n query();\n if (controls) {\n return {\n state,\n isSupported,\n query\n };\n } else {\n return state;\n }\n}\n\nfunction useClipboard(options = {}) {\n const {\n navigator = defaultNavigator,\n read = false,\n source,\n copiedDuring = 1500,\n legacy = false\n } = options;\n const isClipboardApiSupported = useSupported(() => navigator && \"clipboard\" in navigator);\n const permissionRead = usePermission(\"clipboard-read\");\n const permissionWrite = usePermission(\"clipboard-write\");\n const isSupported = computed(() => isClipboardApiSupported.value || legacy);\n const text = ref(\"\");\n const copied = ref(false);\n const timeout = useTimeoutFn(() => copied.value = false, copiedDuring);\n function updateText() {\n if (isClipboardApiSupported.value && isAllowed(permissionRead.value)) {\n navigator.clipboard.readText().then((value) => {\n text.value = value;\n });\n } else {\n text.value = legacyRead();\n }\n }\n if (isSupported.value && read)\n useEventListener([\"copy\", \"cut\"], updateText);\n async function copy(value = toValue(source)) {\n if (isSupported.value && value != null) {\n if (isClipboardApiSupported.value && isAllowed(permissionWrite.value))\n await navigator.clipboard.writeText(value);\n else\n legacyCopy(value);\n text.value = value;\n copied.value = true;\n timeout.start();\n }\n }\n function legacyCopy(value) {\n const ta = document.createElement(\"textarea\");\n ta.value = value != null ? value : \"\";\n ta.style.position = \"absolute\";\n ta.style.opacity = \"0\";\n document.body.appendChild(ta);\n ta.select();\n document.execCommand(\"copy\");\n ta.remove();\n }\n function legacyRead() {\n var _a, _b, _c;\n return (_c = (_b = (_a = document == null ? void 0 : document.getSelection) == null ? void 0 : _a.call(document)) == null ? void 0 : _b.toString()) != null ? _c : \"\";\n }\n function isAllowed(status) {\n return status === \"granted\" || status === \"prompt\";\n }\n return {\n isSupported,\n text,\n copied,\n copy\n };\n}\n\nfunction useClipboardItems(options = {}) {\n const {\n navigator = defaultNavigator,\n read = false,\n source,\n copiedDuring = 1500\n } = options;\n const isSupported = useSupported(() => navigator && \"clipboard\" in navigator);\n const content = ref([]);\n const copied = ref(false);\n const timeout = useTimeoutFn(() => copied.value = false, copiedDuring);\n function updateContent() {\n if (isSupported.value) {\n navigator.clipboard.read().then((items) => {\n content.value = items;\n });\n }\n }\n if (isSupported.value && read)\n useEventListener([\"copy\", \"cut\"], updateContent);\n async function copy(value = toValue(source)) {\n if (isSupported.value && value != null) {\n await navigator.clipboard.write(value);\n content.value = value;\n copied.value = true;\n timeout.start();\n }\n }\n return {\n isSupported,\n content,\n copied,\n copy\n };\n}\n\nfunction cloneFnJSON(source) {\n return JSON.parse(JSON.stringify(source));\n}\nfunction useCloned(source, options = {}) {\n const cloned = ref({});\n const {\n manual,\n clone = cloneFnJSON,\n // watch options\n deep = true,\n immediate = true\n } = options;\n function sync() {\n cloned.value = clone(toValue(source));\n }\n if (!manual && (isRef(source) || typeof source === \"function\")) {\n watch(source, sync, {\n ...options,\n deep,\n immediate\n });\n } else {\n sync();\n }\n return { cloned, sync };\n}\n\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 if (!(globalKey in _global))\n _global[globalKey] = _global[globalKey] || {};\n return _global[globalKey];\n}\nfunction getSSRHandler(key, fallback) {\n return handlers[key] || fallback;\n}\nfunction setSSRHandler(key, fn) {\n handlers[key] = fn;\n}\n\nfunction guessSerializerType(rawInit) {\n return 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\nconst StorageSerializers = {\n boolean: {\n read: (v) => v === \"true\",\n write: (v) => String(v)\n },\n object: {\n read: (v) => JSON.parse(v),\n write: (v) => JSON.stringify(v)\n },\n number: {\n read: (v) => Number.parseFloat(v),\n write: (v) => String(v)\n },\n any: {\n read: (v) => v,\n write: (v) => String(v)\n },\n string: {\n read: (v) => v,\n write: (v) => String(v)\n },\n map: {\n read: (v) => new Map(JSON.parse(v)),\n write: (v) => JSON.stringify(Array.from(v.entries()))\n },\n set: {\n read: (v) => new Set(JSON.parse(v)),\n write: (v) => JSON.stringify(Array.from(v))\n },\n date: {\n read: (v) => new Date(v),\n write: (v) => v.toISOString()\n }\n};\nconst customStorageEventName = \"vueuse-storage\";\nfunction useStorage(key, defaults, storage, options = {}) {\n var _a;\n const {\n flush = \"pre\",\n deep = true,\n listenToStorageChanges = true,\n writeDefaults = true,\n mergeDefaults = false,\n shallow,\n window = defaultWindow,\n eventFilter,\n onError = (e) => {\n console.error(e);\n },\n initOnMounted\n } = options;\n const data = (shallow ? shallowRef : ref)(typeof defaults === \"function\" ? defaults() : defaults);\n if (!storage) {\n try {\n storage = getSSRHandler(\"getDefaultStorage\", () => {\n var _a2;\n return (_a2 = defaultWindow) == null ? void 0 : _a2.localStorage;\n })();\n } catch (e) {\n onError(e);\n }\n }\n if (!storage)\n return data;\n const rawInit = toValue(defaults);\n const type = guessSerializerType(rawInit);\n const serializer = (_a = options.serializer) != null ? _a : StorageSerializers[type];\n const { pause: pauseWatch, resume: resumeWatch } = pausableWatch(\n data,\n () => write(data.value),\n { flush, deep, eventFilter }\n );\n if (window && listenToStorageChanges) {\n tryOnMounted(() => {\n useEventListener(window, \"storage\", update);\n useEventListener(window, customStorageEventName, updateFromCustomEvent);\n if (initOnMounted)\n update();\n });\n }\n if (!initOnMounted)\n update();\n function dispatchWriteEvent(oldValue, newValue) {\n if (window) {\n window.dispatchEvent(new CustomEvent(customStorageEventName, {\n detail: {\n key,\n oldValue,\n newValue,\n storageArea: storage\n }\n }));\n }\n }\n function write(v) {\n try {\n const oldValue = storage.getItem(key);\n if (v == null) {\n dispatchWriteEvent(oldValue, null);\n storage.removeItem(key);\n } else {\n const serialized = serializer.write(v);\n if (oldValue !== serialized) {\n storage.setItem(key, serialized);\n dispatchWriteEvent(oldValue, serialized);\n }\n }\n } catch (e) {\n onError(e);\n }\n }\n function read(event) {\n const rawValue = event ? event.newValue : storage.getItem(key);\n if (rawValue == null) {\n if (writeDefaults && rawInit != null)\n storage.setItem(key, serializer.write(rawInit));\n return rawInit;\n } else if (!event && mergeDefaults) {\n const value = serializer.read(rawValue);\n if (typeof mergeDefaults === \"function\")\n return mergeDefaults(value, rawInit);\n else if (type === \"object\" && !Array.isArray(value))\n return { ...rawInit, ...value };\n return value;\n } else if (typeof rawValue !== \"string\") {\n return rawValue;\n } else {\n return serializer.read(rawValue);\n }\n }\n function update(event) {\n if (event && event.storageArea !== storage)\n return;\n if (event && event.key == null) {\n data.value = rawInit;\n return;\n }\n if (event && event.key !== key)\n return;\n pauseWatch();\n try {\n if ((event == null ? void 0 : event.newValue) !== serializer.write(data.value))\n data.value = read(event);\n } catch (e) {\n onError(e);\n } finally {\n if (event)\n nextTick(resumeWatch);\n else\n resumeWatch();\n }\n }\n function updateFromCustomEvent(event) {\n update(event.detail);\n }\n return data;\n}\n\nfunction usePreferredDark(options) {\n return useMediaQuery(\"(prefers-color-scheme: dark)\", options);\n}\n\nfunction useColorMode(options = {}) {\n const {\n selector = \"html\",\n attribute = \"class\",\n initialValue = \"auto\",\n window = defaultWindow,\n storage,\n storageKey = \"vueuse-color-scheme\",\n listenToStorageChanges = true,\n storageRef,\n emitAuto,\n disableTransition = true\n } = options;\n const modes = {\n auto: \"\",\n light: \"light\",\n dark: \"dark\",\n ...options.modes || {}\n };\n const preferredDark = usePreferredDark({ window });\n const system = computed(() => preferredDark.value ? \"dark\" : \"light\");\n const store = storageRef || (storageKey == null ? toRef(initialValue) : useStorage(storageKey, initialValue, storage, { window, listenToStorageChanges }));\n const state = computed(() => store.value === \"auto\" ? system.value : store.value);\n const updateHTMLAttrs = getSSRHandler(\n \"updateHTMLAttrs\",\n (selector2, attribute2, value) => {\n const el = typeof selector2 === \"string\" ? window == null ? void 0 : window.document.querySelector(selector2) : unrefElement(selector2);\n if (!el)\n return;\n let style;\n if (disableTransition) {\n style = window.document.createElement(\"style\");\n const styleString = \"*,*::before,*::after{-webkit-transition:none!important;-moz-transition:none!important;-o-transition:none!important;-ms-transition:none!important;transition:none!important}\";\n style.appendChild(document.createTextNode(styleString));\n window.document.head.appendChild(style);\n }\n if (attribute2 === \"class\") {\n const current = value.split(/\\s/g);\n Object.values(modes).flatMap((i) => (i || \"\").split(/\\s/g)).filter(Boolean).forEach((v) => {\n if (current.includes(v))\n el.classList.add(v);\n else\n el.classList.remove(v);\n });\n } else {\n el.setAttribute(attribute2, value);\n }\n if (disableTransition) {\n window.getComputedStyle(style).opacity;\n document.head.removeChild(style);\n }\n }\n );\n function defaultOnChanged(mode) {\n var _a;\n updateHTMLAttrs(selector, attribute, (_a = modes[mode]) != null ? _a : mode);\n }\n function onChanged(mode) {\n if (options.onChanged)\n options.onChanged(mode, defaultOnChanged);\n else\n defaultOnChanged(mode);\n }\n watch(state, onChanged, { flush: \"post\", immediate: true });\n tryOnMounted(() => onChanged(state.value));\n const auto = computed({\n get() {\n return emitAuto ? store.value : state.value;\n },\n set(v) {\n store.value = v;\n }\n });\n try {\n return Object.assign(auto, { store, system, state });\n } catch (e) {\n return auto;\n }\n}\n\nfunction useConfirmDialog(revealed = ref(false)) {\n const confirmHook = createEventHook();\n const cancelHook = createEventHook();\n const revealHook = createEventHook();\n let _resolve = noop;\n const reveal = (data) => {\n revealHook.trigger(data);\n revealed.value = true;\n return new Promise((resolve) => {\n _resolve = resolve;\n });\n };\n const confirm = (data) => {\n revealed.value = false;\n confirmHook.trigger(data);\n _resolve({ data, isCanceled: false });\n };\n const cancel = (data) => {\n revealed.value = false;\n cancelHook.trigger(data);\n _resolve({ data, isCanceled: true });\n };\n return {\n isRevealed: computed(() => revealed.value),\n reveal,\n confirm,\n cancel,\n onReveal: revealHook.on,\n onConfirm: confirmHook.on,\n onCancel: cancelHook.on\n };\n}\n\nfunction useCssVar(prop, target, options = {}) {\n const { window = defaultWindow, initialValue = \"\", observe = false } = options;\n const variable = ref(initialValue);\n const elRef = computed(() => {\n var _a;\n return unrefElement(target) || ((_a = window == null ? void 0 : window.document) == null ? void 0 : _a.documentElement);\n });\n function updateCssVar() {\n var _a;\n const key = toValue(prop);\n const el = toValue(elRef);\n if (el && window) {\n const value = (_a = window.getComputedStyle(el).getPropertyValue(key)) == null ? void 0 : _a.trim();\n variable.value = value || initialValue;\n }\n }\n if (observe) {\n useMutationObserver(elRef, updateCssVar, {\n attributeFilter: [\"style\", \"class\"],\n window\n });\n }\n watch(\n [elRef, () => toValue(prop)],\n updateCssVar,\n { immediate: true }\n );\n watch(\n variable,\n (val) => {\n var _a;\n if ((_a = elRef.value) == null ? void 0 : _a.style)\n elRef.value.style.setProperty(toValue(prop), val);\n }\n );\n return variable;\n}\n\nfunction useCurrentElement(rootComponent) {\n const vm = getCurrentInstance();\n const currentElement = computedWithControl(\n () => null,\n () => rootComponent ? unrefElement(rootComponent) : vm.proxy.$el\n );\n onUpdated(currentElement.trigger);\n onMounted(currentElement.trigger);\n return currentElement;\n}\n\nfunction useCycleList(list, options) {\n const state = shallowRef(getInitialValue());\n const listRef = toRef(list);\n const index = computed({\n get() {\n var _a;\n const targetList = listRef.value;\n let index2 = (options == null ? void 0 : options.getIndexOf) ? options.getIndexOf(state.value, targetList) : targetList.indexOf(state.value);\n if (index2 < 0)\n index2 = (_a = options == null ? void 0 : options.fallbackIndex) != null ? _a : 0;\n return index2;\n },\n set(v) {\n set(v);\n }\n });\n function set(i) {\n const targetList = listRef.value;\n const length = targetList.length;\n const index2 = (i % length + length) % length;\n const value = targetList[index2];\n state.value = value;\n return value;\n }\n function shift(delta = 1) {\n return set(index.value + delta);\n }\n function next(n = 1) {\n return shift(n);\n }\n function prev(n = 1) {\n return shift(-n);\n }\n function getInitialValue() {\n var _a, _b;\n return (_b = toValue((_a = options == null ? void 0 : options.initialValue) != null ? _a : toValue(list)[0])) != null ? _b : void 0;\n }\n watch(listRef, () => set(index.value));\n return {\n state,\n index,\n next,\n prev,\n go: set\n };\n}\n\nfunction useDark(options = {}) {\n const {\n valueDark = \"dark\",\n valueLight = \"\",\n window = defaultWindow\n } = options;\n const mode = useColorMode({\n ...options,\n onChanged: (mode2, defaultHandler) => {\n var _a;\n if (options.onChanged)\n (_a = options.onChanged) == null ? void 0 : _a.call(options, mode2 === \"dark\", defaultHandler, mode2);\n else\n defaultHandler(mode2);\n },\n modes: {\n dark: valueDark,\n light: valueLight\n }\n });\n const system = computed(() => {\n if (mode.system) {\n return mode.system.value;\n } else {\n const preferredDark = usePreferredDark({ window });\n return preferredDark.value ? \"dark\" : \"light\";\n }\n });\n const isDark = computed({\n get() {\n return mode.value === \"dark\";\n },\n set(v) {\n const modeVal = v ? \"dark\" : \"light\";\n if (system.value === modeVal)\n mode.value = \"auto\";\n else\n mode.value = modeVal;\n }\n });\n return isDark;\n}\n\nfunction fnBypass(v) {\n return v;\n}\nfunction fnSetSource(source, value) {\n return source.value = value;\n}\nfunction defaultDump(clone) {\n return clone ? typeof clone === \"function\" ? clone : cloneFnJSON : fnBypass;\n}\nfunction defaultParse(clone) {\n return clone ? typeof clone === \"function\" ? clone : cloneFnJSON : fnBypass;\n}\nfunction useManualRefHistory(source, options = {}) {\n const {\n clone = false,\n dump = defaultDump(clone),\n parse = defaultParse(clone),\n setSource = fnSetSource\n } = options;\n function _createHistoryRecord() {\n return markRaw({\n snapshot: dump(source.value),\n timestamp: timestamp()\n });\n }\n const last = ref(_createHistoryRecord());\n const undoStack = ref([]);\n const redoStack = ref([]);\n const _setSource = (record) => {\n setSource(source, parse(record.snapshot));\n last.value = record;\n };\n const commit = () => {\n undoStack.value.unshift(last.value);\n last.value = _createHistoryRecord();\n if (options.capacity && undoStack.value.length > options.capacity)\n undoStack.value.splice(options.capacity, Number.POSITIVE_INFINITY);\n if (redoStack.value.length)\n redoStack.value.splice(0, redoStack.value.length);\n };\n const clear = () => {\n undoStack.value.splice(0, undoStack.value.length);\n redoStack.value.splice(0, redoStack.value.length);\n };\n const undo = () => {\n const state = undoStack.value.shift();\n if (state) {\n redoStack.value.unshift(last.value);\n _setSource(state);\n }\n };\n const redo = () => {\n const state = redoStack.value.shift();\n if (state) {\n undoStack.value.unshift(last.value);\n _setSource(state);\n }\n };\n const reset = () => {\n _setSource(last.value);\n };\n const history = computed(() => [last.value, ...undoStack.value]);\n const canUndo = computed(() => undoStack.value.length > 0);\n const canRedo = computed(() => redoStack.value.length > 0);\n return {\n source,\n undoStack,\n redoStack,\n last,\n history,\n canUndo,\n canRedo,\n clear,\n commit,\n reset,\n undo,\n redo\n };\n}\n\nfunction useRefHistory(source, options = {}) {\n const {\n deep = false,\n flush = \"pre\",\n eventFilter\n } = options;\n const {\n eventFilter: composedFilter,\n pause,\n resume: resumeTracking,\n isActive: isTracking\n } = pausableFilter(eventFilter);\n const {\n ignoreUpdates,\n ignorePrevAsyncUpdates,\n stop\n } = watchIgnorable(\n source,\n commit,\n { deep, flush, eventFilter: composedFilter }\n );\n function setSource(source2, value) {\n ignorePrevAsyncUpdates();\n ignoreUpdates(() => {\n source2.value = value;\n });\n }\n const manualHistory = useManualRefHistory(source, { ...options, clone: options.clone || deep, setSource });\n const { clear, commit: manualCommit } = manualHistory;\n function commit() {\n ignorePrevAsyncUpdates();\n manualCommit();\n }\n function resume(commitNow) {\n resumeTracking();\n if (commitNow)\n commit();\n }\n function batch(fn) {\n let canceled = false;\n const cancel = () => canceled = true;\n ignoreUpdates(() => {\n fn(cancel);\n });\n if (!canceled)\n commit();\n }\n function dispose() {\n stop();\n clear();\n }\n return {\n ...manualHistory,\n isTracking,\n pause,\n resume,\n commit,\n batch,\n dispose\n };\n}\n\nfunction useDebouncedRefHistory(source, options = {}) {\n const filter = options.debounce ? debounceFilter(options.debounce) : void 0;\n const history = useRefHistory(source, { ...options, eventFilter: filter });\n return {\n ...history\n };\n}\n\nfunction useDeviceMotion(options = {}) {\n const {\n window = defaultWindow,\n eventFilter = bypassFilter\n } = options;\n const acceleration = ref({ x: null, y: null, z: null });\n const rotationRate = ref({ alpha: null, beta: null, gamma: null });\n const interval = ref(0);\n const accelerationIncludingGravity = ref({\n x: null,\n y: null,\n z: null\n });\n if (window) {\n const onDeviceMotion = createFilterWrapper(\n eventFilter,\n (event) => {\n acceleration.value = event.acceleration;\n accelerationIncludingGravity.value = event.accelerationIncludingGravity;\n rotationRate.value = event.rotationRate;\n interval.value = event.interval;\n }\n );\n useEventListener(window, \"devicemotion\", onDeviceMotion);\n }\n return {\n acceleration,\n accelerationIncludingGravity,\n rotationRate,\n interval\n };\n}\n\nfunction useDeviceOrientation(options = {}) {\n const { window = defaultWindow } = options;\n const isSupported = useSupported(() => window && \"DeviceOrientationEvent\" in window);\n const isAbsolute = ref(false);\n const alpha = ref(null);\n const beta = ref(null);\n const gamma = ref(null);\n if (window && isSupported.value) {\n useEventListener(window, \"deviceorientation\", (event) => {\n isAbsolute.value = event.absolute;\n alpha.value = event.alpha;\n beta.value = event.beta;\n gamma.value = event.gamma;\n });\n }\n return {\n isSupported,\n isAbsolute,\n alpha,\n beta,\n gamma\n };\n}\n\nfunction useDevicePixelRatio(options = {}) {\n const {\n window = defaultWindow\n } = options;\n const pixelRatio = ref(1);\n if (window) {\n let observe2 = function() {\n pixelRatio.value = window.devicePixelRatio;\n cleanup2();\n media = window.matchMedia(`(resolution: ${pixelRatio.value}dppx)`);\n media.addEventListener(\"change\", observe2, { once: true });\n }, cleanup2 = function() {\n media == null ? void 0 : media.removeEventListener(\"change\", observe2);\n };\n let media;\n observe2();\n tryOnScopeDispose(cleanup2);\n }\n return { pixelRatio };\n}\n\nfunction useDevicesList(options = {}) {\n const {\n navigator = defaultNavigator,\n requestPermissions = false,\n constraints = { audio: true, video: true },\n onUpdated\n } = options;\n const devices = ref([]);\n const videoInputs = computed(() => devices.value.filter((i) => i.kind === \"videoinput\"));\n const audioInputs = computed(() => devices.value.filter((i) => i.kind === \"audioinput\"));\n const audioOutputs = computed(() => devices.value.filter((i) => i.kind === \"audiooutput\"));\n const isSupported = useSupported(() => navigator && navigator.mediaDevices && navigator.mediaDevices.enumerateDevices);\n const permissionGranted = ref(false);\n let stream;\n async function update() {\n if (!isSupported.value)\n return;\n devices.value = await navigator.mediaDevices.enumerateDevices();\n onUpdated == null ? void 0 : onUpdated(devices.value);\n if (stream) {\n stream.getTracks().forEach((t) => t.stop());\n stream = null;\n }\n }\n async function ensurePermissions() {\n if (!isSupported.value)\n return false;\n if (permissionGranted.value)\n return true;\n const { state, query } = usePermission(\"camera\", { controls: true });\n await query();\n if (state.value !== \"granted\") {\n stream = await navigator.mediaDevices.getUserMedia(constraints);\n update();\n permissionGranted.value = true;\n } else {\n permissionGranted.value = true;\n }\n return permissionGranted.value;\n }\n if (isSupported.value) {\n if (requestPermissions)\n ensurePermissions();\n useEventListener(navigator.mediaDevices, \"devicechange\", update);\n update();\n }\n return {\n devices,\n ensurePermissions,\n permissionGranted,\n videoInputs,\n audioInputs,\n audioOutputs,\n isSupported\n };\n}\n\nfunction useDisplayMedia(options = {}) {\n var _a;\n const enabled = ref((_a = options.enabled) != null ? _a : false);\n const video = options.video;\n const audio = options.audio;\n const { navigator = defaultNavigator } = options;\n const isSupported = useSupported(() => {\n var _a2;\n return (_a2 = navigator == null ? void 0 : navigator.mediaDevices) == null ? void 0 : _a2.getDisplayMedia;\n });\n const constraint = { audio, video };\n const stream = shallowRef();\n async function _start() {\n var _a2;\n if (!isSupported.value || stream.value)\n return;\n stream.value = await navigator.mediaDevices.getDisplayMedia(constraint);\n (_a2 = stream.value) == null ? void 0 : _a2.getTracks().forEach((t) => t.addEventListener(\"ended\", stop));\n return stream.value;\n }\n async function _stop() {\n var _a2;\n (_a2 = stream.value) == null ? void 0 : _a2.getTracks().forEach((t) => t.stop());\n stream.value = void 0;\n }\n function stop() {\n _stop();\n enabled.value = false;\n }\n async function start() {\n await _start();\n if (stream.value)\n enabled.value = true;\n return stream.value;\n }\n watch(\n enabled,\n (v) => {\n if (v)\n _start();\n else\n _stop();\n },\n { immediate: true }\n );\n return {\n isSupported,\n stream,\n start,\n stop,\n enabled\n };\n}\n\nfunction useDocumentVisibility(options = {}) {\n const { document = defaultDocument } = options;\n if (!document)\n return ref(\"visible\");\n const visibility = ref(document.visibilityState);\n useEventListener(document, \"visibilitychange\", () => {\n visibility.value = document.visibilityState;\n });\n return visibility;\n}\n\nfunction useDraggable(target, options = {}) {\n var _a, _b;\n const {\n pointerTypes,\n preventDefault,\n stopPropagation,\n exact,\n onMove,\n onEnd,\n onStart,\n initialValue,\n axis = \"both\",\n draggingElement = defaultWindow,\n containerElement,\n handle: draggingHandle = target\n } = options;\n const position = ref(\n (_a = toValue(initialValue)) != null ? _a : { x: 0, y: 0 }\n );\n const pressedDelta = ref();\n const filterEvent = (e) => {\n if (pointerTypes)\n return pointerTypes.includes(e.pointerType);\n return true;\n };\n const handleEvent = (e) => {\n if (toValue(preventDefault))\n e.preventDefault();\n if (toValue(stopPropagation))\n e.stopPropagation();\n };\n const start = (e) => {\n var _a2;\n if (e.button !== 0)\n return;\n if (toValue(options.disabled) || !filterEvent(e))\n return;\n if (toValue(exact) && e.target !== toValue(target))\n return;\n const container = toValue(containerElement);\n const containerRect = (_a2 = container == null ? void 0 : container.getBoundingClientRect) == null ? void 0 : _a2.call(container);\n const targetRect = toValue(target).getBoundingClientRect();\n const pos = {\n x: e.clientX - (container ? targetRect.left - containerRect.left + container.scrollLeft : targetRect.left),\n y: e.clientY - (container ? targetRect.top - containerRect.top + container.scrollTop : targetRect.top)\n };\n if ((onStart == null ? void 0 : onStart(pos, e)) === false)\n return;\n pressedDelta.value = pos;\n handleEvent(e);\n };\n const move = (e) => {\n if (toValue(options.disabled) || !filterEvent(e))\n return;\n if (!pressedDelta.value)\n return;\n const container = toValue(containerElement);\n const targetRect = toValue(target).getBoundingClientRect();\n let { x, y } = position.value;\n if (axis === \"x\" || axis === \"both\") {\n x = e.clientX - pressedDelta.value.x;\n if (container)\n x = Math.min(Math.max(0, x), container.scrollWidth - targetRect.width);\n }\n if (axis === \"y\" || axis === \"both\") {\n y = e.clientY - pressedDelta.value.y;\n if (container)\n y = Math.min(Math.max(0, y), container.scrollHeight - targetRect.height);\n }\n position.value = {\n x,\n y\n };\n onMove == null ? void 0 : onMove(position.value, e);\n handleEvent(e);\n };\n const end = (e) => {\n if (toValue(options.disabled) || !filterEvent(e))\n return;\n if (!pressedDelta.value)\n return;\n pressedDelta.value = void 0;\n onEnd == null ? void 0 : onEnd(position.value, e);\n handleEvent(e);\n };\n if (isClient) {\n const config = { capture: (_b = options.capture) != null ? _b : true };\n useEventListener(draggingHandle, \"pointerdown\", start, config);\n useEventListener(draggingElement, \"pointermove\", move, config);\n useEventListener(draggingElement, \"pointerup\", end, config);\n }\n return {\n ...toRefs(position),\n position,\n isDragging: computed(() => !!pressedDelta.value),\n style: computed(\n () => `left:${position.value.x}px;top:${position.value.y}px;`\n )\n };\n}\n\nfunction useDropZone(target, options = {}) {\n const isOverDropZone = ref(false);\n const files = shallowRef(null);\n let counter = 0;\n let isDataTypeIncluded = true;\n if (isClient) {\n const _options = typeof options === \"function\" ? { onDrop: options } : options;\n const getFiles = (event) => {\n var _a, _b;\n const list = Array.from((_b = (_a = event.dataTransfer) == null ? void 0 : _a.files) != null ? _b : []);\n return files.value = list.length === 0 ? null : list;\n };\n useEventListener(target, \"dragenter\", (event) => {\n var _a, _b;\n const types = Array.from(((_a = event == null ? void 0 : event.dataTransfer) == null ? void 0 : _a.items) || []).map((i) => i.kind === \"file\" ? i.type : null).filter(notNullish);\n if (_options.dataTypes && event.dataTransfer) {\n const dataTypes = unref(_options.dataTypes);\n isDataTypeIncluded = typeof dataTypes === \"function\" ? dataTypes(types) : dataTypes ? dataTypes.some((item) => types.includes(item)) : true;\n if (!isDataTypeIncluded)\n return;\n }\n event.preventDefault();\n counter += 1;\n isOverDropZone.value = true;\n (_b = _options.onEnter) == null ? void 0 : _b.call(_options, getFiles(event), event);\n });\n useEventListener(target, \"dragover\", (event) => {\n var _a;\n if (!isDataTypeIncluded)\n return;\n event.preventDefault();\n (_a = _options.onOver) == null ? void 0 : _a.call(_options, getFiles(event), event);\n });\n useEventListener(target, \"dragleave\", (event) => {\n var _a;\n if (!isDataTypeIncluded)\n return;\n event.preventDefault();\n counter -= 1;\n if (counter === 0)\n isOverDropZone.value = false;\n (_a = _options.onLeave) == null ? void 0 : _a.call(_options, getFiles(event), event);\n });\n useEventListener(target, \"drop\", (event) => {\n var _a;\n event.preventDefault();\n counter = 0;\n isOverDropZone.value = false;\n (_a = _options.onDrop) == null ? void 0 : _a.call(_options, getFiles(event), event);\n });\n }\n return {\n files,\n isOverDropZone\n };\n}\n\nfunction useResizeObserver(target, callback, options = {}) {\n const { window = defaultWindow, ...observerOptions } = options;\n let observer;\n const isSupported = useSupported(() => window && \"ResizeObserver\" in window);\n const cleanup = () => {\n if (observer) {\n observer.disconnect();\n observer = void 0;\n }\n };\n const targets = computed(() => Array.isArray(target) ? target.map((el) => unrefElement(el)) : [unrefElement(target)]);\n const stopWatch = watch(\n targets,\n (els) => {\n cleanup();\n if (isSupported.value && window) {\n observer = new ResizeObserver(callback);\n for (const _el of els)\n _el && observer.observe(_el, observerOptions);\n }\n },\n { immediate: true, flush: \"post\" }\n );\n const stop = () => {\n cleanup();\n stopWatch();\n };\n tryOnScopeDispose(stop);\n return {\n isSupported,\n stop\n };\n}\n\nfunction useElementBounding(target, options = {}) {\n const {\n reset = true,\n windowResize = true,\n windowScroll = true,\n immediate = true\n } = options;\n const height = ref(0);\n const bottom = ref(0);\n const left = ref(0);\n const right = ref(0);\n const top = ref(0);\n const width = ref(0);\n const x = ref(0);\n const y = ref(0);\n function update() {\n const el = unrefElement(target);\n if (!el) {\n if (reset) {\n height.value = 0;\n bottom.value = 0;\n left.value = 0;\n right.value = 0;\n top.value = 0;\n width.value = 0;\n x.value = 0;\n y.value = 0;\n }\n return;\n }\n const rect = el.getBoundingClientRect();\n height.value = rect.height;\n bottom.value = rect.bottom;\n left.value = rect.left;\n right.value = rect.right;\n top.value = rect.top;\n width.value = rect.width;\n x.value = rect.x;\n y.value = rect.y;\n }\n useResizeObserver(target, update);\n watch(() => unrefElement(target), (ele) => !ele && update());\n useMutationObserver(target, update, {\n attributeFilter: [\"style\", \"class\"]\n });\n if (windowScroll)\n useEventListener(\"scroll\", update, { capture: true, passive: true });\n if (windowResize)\n useEventListener(\"resize\", update, { passive: true });\n tryOnMounted(() => {\n if (immediate)\n update();\n });\n return {\n height,\n bottom,\n left,\n right,\n top,\n width,\n x,\n y,\n update\n };\n}\n\nfunction useElementByPoint(options) {\n const {\n x,\n y,\n document = defaultDocument,\n multiple,\n interval = \"requestAnimationFrame\",\n immediate = true\n } = options;\n const isSupported = useSupported(() => {\n if (toValue(multiple))\n return document && \"elementsFromPoint\" in document;\n return document && \"elementFromPoint\" in document;\n });\n const element = ref(null);\n const cb = () => {\n var _a, _b;\n element.value = toValue(multiple) ? (_a = document == null ? void 0 : document.elementsFromPoint(toValue(x), toValue(y))) != null ? _a : [] : (_b = document == null ? void 0 : document.elementFromPoint(toValue(x), toValue(y))) != null ? _b : null;\n };\n const controls = interval === \"requestAnimationFrame\" ? useRafFn(cb, { immediate }) : useIntervalFn(cb, interval, { immediate });\n return {\n isSupported,\n element,\n ...controls\n };\n}\n\nfunction useElementHover(el, options = {}) {\n const {\n delayEnter = 0,\n delayLeave = 0,\n window = defaultWindow\n } = options;\n const isHovered = ref(false);\n let timer;\n const toggle = (entering) => {\n const delay = entering ? delayEnter : delayLeave;\n if (timer) {\n clearTimeout(timer);\n timer = void 0;\n }\n if (delay)\n timer = setTimeout(() => isHovered.value = entering, delay);\n else\n isHovered.value = entering;\n };\n if (!window)\n return isHovered;\n useEventListener(el, \"mouseenter\", () => toggle(true), { passive: true });\n useEventListener(el, \"mouseleave\", () => toggle(false), { passive: true });\n return isHovered;\n}\n\nfunction useElementSize(target, initialSize = { width: 0, height: 0 }, options = {}) {\n const { window = defaultWindow, box = \"content-box\" } = options;\n const isSVG = computed(() => {\n var _a, _b;\n return (_b = (_a = unrefElement(target)) == null ? void 0 : _a.namespaceURI) == null ? void 0 : _b.includes(\"svg\");\n });\n const width = ref(initialSize.width);\n const height = ref(initialSize.height);\n const { stop: stop1 } = useResizeObserver(\n target,\n ([entry]) => {\n const boxSize = box === \"border-box\" ? entry.borderBoxSize : box === \"content-box\" ? entry.contentBoxSize : entry.devicePixelContentBoxSize;\n if (window && isSVG.value) {\n const $elem = unrefElement(target);\n if ($elem) {\n const rect = $elem.getBoundingClientRect();\n width.value = rect.width;\n height.value = rect.height;\n }\n } else {\n if (boxSize) {\n const formatBoxSize = Array.isArray(boxSize) ? boxSize : [boxSize];\n width.value = formatBoxSize.reduce((acc, { inlineSize }) => acc + inlineSize, 0);\n height.value = formatBoxSize.reduce((acc, { blockSize }) => acc + blockSize, 0);\n } else {\n width.value = entry.contentRect.width;\n height.value = entry.contentRect.height;\n }\n }\n },\n options\n );\n tryOnMounted(() => {\n const ele = unrefElement(target);\n if (ele) {\n width.value = \"offsetWidth\" in ele ? ele.offsetWidth : initialSize.width;\n height.value = \"offsetHeight\" in ele ? ele.offsetHeight : initialSize.height;\n }\n });\n const stop2 = watch(\n () => unrefElement(target),\n (ele) => {\n width.value = ele ? initialSize.width : 0;\n height.value = ele ? initialSize.height : 0;\n }\n );\n function stop() {\n stop1();\n stop2();\n }\n return {\n width,\n height,\n stop\n };\n}\n\nfunction useIntersectionObserver(target, callback, options = {}) {\n const {\n root,\n rootMargin = \"0px\",\n threshold = 0.1,\n window = defaultWindow,\n immediate = true\n } = options;\n const isSupported = useSupported(() => window && \"IntersectionObserver\" in window);\n const targets = computed(() => {\n const _target = toValue(target);\n return (Array.isArray(_target) ? _target : [_target]).map(unrefElement).filter(notNullish);\n });\n let cleanup = noop;\n const isActive = ref(immediate);\n const stopWatch = isSupported.value ? watch(\n () => [targets.value, unrefElement(root), isActive.value],\n ([targets2, root2]) => {\n cleanup();\n if (!isActive.value)\n return;\n if (!targets2.length)\n return;\n const observer = new IntersectionObserver(\n callback,\n {\n root: unrefElement(root2),\n rootMargin,\n threshold\n }\n );\n targets2.forEach((el) => el && observer.observe(el));\n cleanup = () => {\n observer.disconnect();\n cleanup = noop;\n };\n },\n { immediate, flush: \"post\" }\n ) : noop;\n const stop = () => {\n cleanup();\n stopWatch();\n isActive.value = false;\n };\n tryOnScopeDispose(stop);\n return {\n isSupported,\n isActive,\n pause() {\n cleanup();\n isActive.value = false;\n },\n resume() {\n isActive.value = true;\n },\n stop\n };\n}\n\nfunction useElementVisibility(element, options = {}) {\n const { window = defaultWindow, scrollTarget, threshold = 0 } = options;\n const elementIsVisible = ref(false);\n useIntersectionObserver(\n element,\n (intersectionObserverEntries) => {\n let isIntersecting = elementIsVisible.value;\n let latestTime = 0;\n for (const entry of intersectionObserverEntries) {\n if (entry.time >= latestTime) {\n latestTime = entry.time;\n isIntersecting = entry.isIntersecting;\n }\n }\n elementIsVisible.value = isIntersecting;\n },\n {\n root: scrollTarget,\n window,\n threshold\n }\n );\n return elementIsVisible;\n}\n\nconst events = /* @__PURE__ */ new Map();\n\nfunction useEventBus(key) {\n const scope = getCurrentScope();\n function on(listener) {\n var _a;\n const listeners = events.get(key) || /* @__PURE__ */ new Set();\n listeners.add(listener);\n events.set(key, listeners);\n const _off = () => off(listener);\n (_a = scope == null ? void 0 : scope.cleanups) == null ? void 0 : _a.push(_off);\n return _off;\n }\n function once(listener) {\n function _listener(...args) {\n off(_listener);\n listener(...args);\n }\n return on(_listener);\n }\n function off(listener) {\n const listeners = events.get(key);\n if (!listeners)\n return;\n listeners.delete(listener);\n if (!listeners.size)\n reset();\n }\n function reset() {\n events.delete(key);\n }\n function emit(event, payload) {\n var _a;\n (_a = events.get(key)) == null ? void 0 : _a.forEach((v) => v(event, payload));\n }\n return { on, once, off, emit, reset };\n}\n\nfunction resolveNestedOptions$1(options) {\n if (options === true)\n return {};\n return options;\n}\nfunction useEventSource(url, events = [], options = {}) {\n const event = ref(null);\n const data = ref(null);\n const status = ref(\"CONNECTING\");\n const eventSource = ref(null);\n const error = shallowRef(null);\n const urlRef = toRef(url);\n const lastEventId = shallowRef(null);\n let explicitlyClosed = false;\n let retried = 0;\n const {\n withCredentials = false,\n immediate = true\n } = options;\n const close = () => {\n if (isClient && eventSource.value) {\n eventSource.value.close();\n eventSource.value = null;\n status.value = \"CLOSED\";\n explicitlyClosed = true;\n }\n };\n const _init = () => {\n if (explicitlyClosed || typeof urlRef.value === \"undefined\")\n return;\n const es = new EventSource(urlRef.value, { withCredentials });\n status.value = \"CONNECTING\";\n eventSource.value = es;\n es.onopen = () => {\n status.value = \"OPEN\";\n error.value = null;\n };\n es.onerror = (e) => {\n status.value = \"CLOSED\";\n error.value = e;\n if (es.readyState === 2 && !explicitlyClosed && options.autoReconnect) {\n es.close();\n const {\n retries = -1,\n delay = 1e3,\n onFailed\n } = resolveNestedOptions$1(options.autoReconnect);\n retried += 1;\n if (typeof retries === \"number\" && (retries < 0 || retried < retries))\n setTimeout(_init, delay);\n else if (typeof retries === \"function\" && retries())\n setTimeout(_init, delay);\n else\n onFailed == null ? void 0 : onFailed();\n }\n };\n es.onmessage = (e) => {\n event.value = null;\n data.value = e.data;\n lastEventId.value = e.lastEventId;\n };\n for (const event_name of events) {\n useEventListener(es, event_name, (e) => {\n event.value = event_name;\n data.value = e.data || null;\n });\n }\n };\n const open = () => {\n if (!isClient)\n return;\n close();\n explicitlyClosed = false;\n retried = 0;\n _init();\n };\n if (immediate)\n watch(urlRef, open, { immediate: true });\n tryOnScopeDispose(close);\n return {\n eventSource,\n event,\n data,\n status,\n error,\n open,\n close,\n lastEventId\n };\n}\n\nfunction useEyeDropper(options = {}) {\n const { initialValue = \"\" } = options;\n const isSupported = useSupported(() => typeof window !== \"undefined\" && \"EyeDropper\" in window);\n const sRGBHex = ref(initialValue);\n async function open(openOptions) {\n if (!isSupported.value)\n return;\n const eyeDropper = new window.EyeDropper();\n const result = await eyeDropper.open(openOptions);\n sRGBHex.value = result.sRGBHex;\n return result;\n }\n return { isSupported, sRGBHex, open };\n}\n\nfunction useFavicon(newIcon = null, options = {}) {\n const {\n baseUrl = \"\",\n rel = \"icon\",\n document = defaultDocument\n } = options;\n const favicon = toRef(newIcon);\n const applyIcon = (icon) => {\n const elements = document == null ? void 0 : document.head.querySelectorAll(`link[rel*=\"${rel}\"]`);\n if (!elements || elements.length === 0) {\n const link = document == null ? void 0 : document.createElement(\"link\");\n if (link) {\n link.rel = rel;\n link.href = `${baseUrl}${icon}`;\n link.type = `image/${icon.split(\".\").pop()}`;\n document == null ? void 0 : document.head.append(link);\n }\n return;\n }\n elements == null ? void 0 : elements.forEach((el) => el.href = `${baseUrl}${icon}`);\n };\n watch(\n favicon,\n (i, o) => {\n if (typeof i === \"string\" && i !== o)\n applyIcon(i);\n },\n { immediate: true }\n );\n return favicon;\n}\n\nconst payloadMapping = {\n json: \"application/json\",\n text: \"text/plain\"\n};\nfunction isFetchOptions(obj) {\n return 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 return reAbsolute.test(url);\n}\nfunction headersToObject(headers) {\n if (typeof Headers !== \"undefined\" && headers instanceof Headers)\n return Object.fromEntries(headers.entries());\n return headers;\n}\nfunction combineCallbacks(combination, ...callbacks) {\n if (combination === \"overwrite\") {\n return async (ctx) => {\n const callback = callbacks[callbacks.length - 1];\n if (callback)\n return { ...ctx, ...await callback(ctx) };\n return ctx;\n };\n } else {\n return async (ctx) => {\n for (const callback of callbacks) {\n if (callback)\n ctx = { ...ctx, ...await callback(ctx) };\n }\n return ctx;\n };\n }\n}\nfunction createFetch(config = {}) {\n const _combination = config.combination || \"chain\";\n const _options = config.options || {};\n const _fetchOptions = config.fetchOptions || {};\n function useFactoryFetch(url, ...args) {\n const computedUrl = computed(() => {\n const baseUrl = toValue(config.baseUrl);\n const targetUrl = toValue(url);\n return baseUrl && !isAbsoluteURL(targetUrl) ? joinPaths(baseUrl, targetUrl) : targetUrl;\n });\n let options = _options;\n let fetchOptions = _fetchOptions;\n if (args.length > 0) {\n if (isFetchOptions(args[0])) {\n options = {\n ...options,\n ...args[0],\n beforeFetch: combineCallbacks(_combination, _options.beforeFetch, args[0].beforeFetch),\n afterFetch: combineCallbacks(_combination, _options.afterFetch, args[0].afterFetch),\n onFetchError: combineCallbacks(_combination, _options.onFetchError, args[0].onFetchError)\n };\n } else {\n fetchOptions = {\n ...fetchOptions,\n ...args[0],\n headers: {\n ...headersToObject(fetchOptions.headers) || {},\n ...headersToObject(args[0].headers) || {}\n }\n };\n }\n }\n if (args.length > 1 && isFetchOptions(args[1])) {\n options = {\n ...options,\n ...args[1],\n beforeFetch: combineCallbacks(_combination, _options.beforeFetch, args[1].beforeFetch),\n afterFetch: combineCallbacks(_combination, _options.afterFetch, args[1].afterFetch),\n onFetchError: combineCallbacks(_combination, _options.onFetchError, args[1].onFetchError)\n };\n }\n return useFetch(computedUrl, fetchOptions, options);\n }\n return useFactoryFetch;\n}\nfunction useFetch(url, ...args) {\n var _a;\n const supportsAbort = typeof AbortController === \"function\";\n let fetchOptions = {};\n let options = {\n immediate: true,\n refetch: false,\n timeout: 0,\n updateDataOnError: false\n };\n const config = {\n method: \"GET\",\n type: \"text\",\n payload: void 0\n };\n if (args.length > 0) {\n if (isFetchOptions(args[0]))\n options = { ...options, ...args[0] };\n else\n fetchOptions = args[0];\n }\n if (args.length > 1) {\n if (isFetchOptions(args[1]))\n options = { ...options, ...args[1] };\n }\n const {\n fetch = (_a = defaultWindow) == null ? void 0 : _a.fetch,\n initialData,\n timeout\n } = options;\n const responseEvent = createEventHook();\n const errorEvent = createEventHook();\n const finallyEvent = createEventHook();\n const isFinished = ref(false);\n const isFetching = ref(false);\n const aborted = ref(false);\n const statusCode = ref(null);\n const response = shallowRef(null);\n const error = shallowRef(null);\n const data = shallowRef(initialData || null);\n const canAbort = computed(() => supportsAbort && isFetching.value);\n let controller;\n let timer;\n const abort = () => {\n if (supportsAbort) {\n controller == null ? void 0 : controller.abort();\n controller = new AbortController();\n controller.signal.onabort = () => aborted.value = true;\n fetchOptions = {\n ...fetchOptions,\n signal: controller.signal\n };\n }\n };\n const loading = (isLoading) => {\n isFetching.value = isLoading;\n isFinished.value = !isLoading;\n };\n if (timeout)\n timer = useTimeoutFn(abort, timeout, { immediate: false });\n let executeCounter = 0;\n const execute = async (throwOnFailed = false) => {\n var _a2, _b;\n abort();\n loading(true);\n error.value = null;\n statusCode.value = null;\n aborted.value = false;\n executeCounter += 1;\n const currentExecuteCounter = executeCounter;\n const defaultFetchOptions = {\n method: config.method,\n headers: {}\n };\n if (config.payload) {\n const headers = headersToObject(defaultFetchOptions.headers);\n const payload = toValue(config.payload);\n if (!config.payloadType && payload && Object.getPrototypeOf(payload) === Object.prototype && !(payload instanceof FormData))\n config.payloadType = \"json\";\n if (config.payloadType)\n headers[\"Content-Type\"] = (_a2 = payloadMapping[config.payloadType]) != null ? _a2 : config.payloadType;\n defaultFetchOptions.body = config.payloadType === \"json\" ? JSON.stringify(payload) : payload;\n }\n let isCanceled = false;\n const context = {\n url: toValue(url),\n options: {\n ...defaultFetchOptions,\n ...fetchOptions\n },\n cancel: () => {\n isCanceled = true;\n }\n };\n if (options.beforeFetch)\n Object.assign(context, await options.beforeFetch(context));\n if (isCanceled || !fetch) {\n loading(false);\n return Promise.resolve(null);\n }\n let responseData = null;\n if (timer)\n timer.start();\n return fetch(\n context.url,\n {\n ...defaultFetchOptions,\n ...context.options,\n headers: {\n ...headersToObject(defaultFetchOptions.headers),\n ...headersToObject((_b = context.options) == null ? void 0 : _b.headers)\n }\n }\n ).then(async (fetchResponse) => {\n response.value = fetchResponse;\n statusCode.value = fetchResponse.status;\n responseData = await fetchResponse.clone()[config.type]();\n if (!fetchResponse.ok) {\n data.value = initialData || null;\n throw new Error(fetchResponse.statusText);\n }\n if (options.afterFetch) {\n ({ data: responseData } = await options.afterFetch({\n data: responseData,\n response: fetchResponse\n }));\n }\n data.value = responseData;\n responseEvent.trigger(fetchResponse);\n return fetchResponse;\n }).catch(async (fetchError) => {\n let errorData = fetchError.message || fetchError.name;\n if (options.onFetchError) {\n ({ error: errorData, data: responseData } = await options.onFetchError({\n data: responseData,\n error: fetchError,\n response: response.value\n }));\n }\n error.value = errorData;\n if (options.updateDataOnError)\n data.value = responseData;\n errorEvent.trigger(fetchError);\n if (throwOnFailed)\n throw fetchError;\n return null;\n }).finally(() => {\n if (currentExecuteCounter === executeCounter)\n loading(false);\n if (timer)\n timer.stop();\n finallyEvent.trigger(null);\n });\n };\n const refetch = toRef(options.refetch);\n watch(\n [\n refetch,\n toRef(url)\n ],\n ([refetch2]) => refetch2 && execute(),\n { deep: true }\n );\n const shell = {\n isFinished: readonly(isFinished),\n isFetching: readonly(isFetching),\n statusCode,\n response,\n error,\n data,\n canAbort,\n aborted,\n abort,\n execute,\n onFetchResponse: responseEvent.on,\n onFetchError: errorEvent.on,\n onFetchFinally: finallyEvent.on,\n // method\n get: setMethod(\"GET\"),\n put: setMethod(\"PUT\"),\n post: setMethod(\"POST\"),\n delete: setMethod(\"DELETE\"),\n patch: setMethod(\"PATCH\"),\n head: setMethod(\"HEAD\"),\n options: setMethod(\"OPTIONS\"),\n // type\n json: setType(\"json\"),\n text: setType(\"text\"),\n blob: setType(\"blob\"),\n arrayBuffer: setType(\"arrayBuffer\"),\n formData: setType(\"formData\")\n };\n function setMethod(method) {\n return (payload, payloadType) => {\n if (!isFetching.value) {\n config.method = method;\n config.payload = payload;\n config.payloadType = payloadType;\n if (isRef(config.payload)) {\n watch(\n [\n refetch,\n toRef(config.payload)\n ],\n ([refetch2]) => refetch2 && execute(),\n { deep: true }\n );\n }\n return {\n ...shell,\n then(onFulfilled, onRejected) {\n return waitUntilFinished().then(onFulfilled, onRejected);\n }\n };\n }\n return void 0;\n };\n }\n function waitUntilFinished() {\n return new Promise((resolve, reject) => {\n until(isFinished).toBe(true).then(() => resolve(shell)).catch((error2) => reject(error2));\n });\n }\n function setType(type) {\n return () => {\n if (!isFetching.value) {\n config.type = type;\n return {\n ...shell,\n then(onFulfilled, onRejected) {\n return waitUntilFinished().then(onFulfilled, onRejected);\n }\n };\n }\n return void 0;\n };\n }\n if (options.immediate)\n Promise.resolve().then(() => execute());\n return {\n ...shell,\n then(onFulfilled, onRejected) {\n return waitUntilFinished().then(onFulfilled, onRejected);\n }\n };\n}\nfunction joinPaths(start, end) {\n if (!start.endsWith(\"/\") && !end.startsWith(\"/\"))\n return `${start}/${end}`;\n return `${start}${end}`;\n}\n\nconst DEFAULT_OPTIONS = {\n multiple: true,\n accept: \"*\",\n reset: false,\n directory: false\n};\nfunction useFileDialog(options = {}) {\n const {\n document = defaultDocument\n } = options;\n const files = ref(null);\n const { on: onChange, trigger } = createEventHook();\n let input;\n if (document) {\n input = document.createElement(\"input\");\n input.type = \"file\";\n input.onchange = (event) => {\n const result = event.target;\n files.value = result.files;\n trigger(files.value);\n };\n }\n const reset = () => {\n files.value = null;\n if (input && input.value) {\n input.value = \"\";\n trigger(null);\n }\n };\n const open = (localOptions) => {\n if (!input)\n return;\n const _options = {\n ...DEFAULT_OPTIONS,\n ...options,\n ...localOptions\n };\n input.multiple = _options.multiple;\n input.accept = _options.accept;\n input.webkitdirectory = _options.directory;\n if (hasOwn(_options, \"capture\"))\n input.capture = _options.capture;\n if (_options.reset)\n reset();\n input.click();\n };\n return {\n files: readonly(files),\n open,\n reset,\n onChange\n };\n}\n\nfunction useFileSystemAccess(options = {}) {\n const {\n window: _window = defaultWindow,\n dataType = \"Text\"\n } = options;\n const window = _window;\n const isSupported = useSupported(() => window && \"showSaveFilePicker\" in window && \"showOpenFilePicker\" in window);\n const fileHandle = ref();\n const data = ref();\n const file = ref();\n const fileName = computed(() => {\n var _a, _b;\n return (_b = (_a = file.value) == null ? void 0 : _a.name) != null ? _b : \"\";\n });\n const fileMIME = computed(() => {\n var _a, _b;\n return (_b = (_a = file.value) == null ? void 0 : _a.type) != null ? _b : \"\";\n });\n const fileSize = computed(() => {\n var _a, _b;\n return (_b = (_a = file.value) == null ? void 0 : _a.size) != null ? _b : 0;\n });\n const fileLastModified = computed(() => {\n var _a, _b;\n return (_b = (_a = file.value) == null ? void 0 : _a.lastModified) != null ? _b : 0;\n });\n async function open(_options = {}) {\n if (!isSupported.value)\n return;\n const [handle] = await window.showOpenFilePicker({ ...toValue(options), ..._options });\n fileHandle.value = handle;\n await updateData();\n }\n async function create(_options = {}) {\n if (!isSupported.value)\n return;\n fileHandle.value = await window.showSaveFilePicker({ ...options, ..._options });\n data.value = void 0;\n await updateData();\n }\n async function save(_options = {}) {\n if (!isSupported.value)\n return;\n if (!fileHandle.value)\n return saveAs(_options);\n if (data.value) {\n const writableStream = await fileHandle.value.createWritable();\n await writableStream.write(data.value);\n await writableStream.close();\n }\n await updateFile();\n }\n async function saveAs(_options = {}) {\n if (!isSupported.value)\n return;\n fileHandle.value = await window.showSaveFilePicker({ ...options, ..._options });\n if (data.value) {\n const writableStream = await fileHandle.value.createWritable();\n await writableStream.write(data.value);\n await writableStream.close();\n }\n await updateFile();\n }\n async function updateFile() {\n var _a;\n file.value = await ((_a = fileHandle.value) == null ? void 0 : _a.getFile());\n }\n async function updateData() {\n var _a, _b;\n await updateFile();\n const type = toValue(dataType);\n if (type === \"Text\")\n data.value = await ((_a = file.value) == null ? void 0 : _a.text());\n else if (type === \"ArrayBuffer\")\n data.value = await ((_b = file.value) == null ? void 0 : _b.arrayBuffer());\n else if (type === \"Blob\")\n data.value = file.value;\n }\n watch(() => toValue(dataType), updateData);\n return {\n isSupported,\n data,\n file,\n fileName,\n fileMIME,\n fileSize,\n fileLastModified,\n open,\n create,\n save,\n saveAs,\n updateData\n };\n}\n\nfunction useFocus(target, options = {}) {\n const { initialValue = false, focusVisible = false, preventScroll = false } = options;\n const innerFocused = ref(false);\n const targetElement = computed(() => unrefElement(target));\n useEventListener(targetElement, \"focus\", (event) => {\n var _a, _b;\n if (!focusVisible || ((_b = (_a = event.target).matches) == null ? void 0 : _b.call(_a, \":focus-visible\")))\n innerFocused.value = true;\n });\n useEventListener(targetElement, \"blur\", () => innerFocused.value = false);\n const focused = computed({\n get: () => innerFocused.value,\n set(value) {\n var _a, _b;\n if (!value && innerFocused.value)\n (_a = targetElement.value) == null ? void 0 : _a.blur();\n else if (value && !innerFocused.value)\n (_b = targetElement.value) == null ? void 0 : _b.focus({ preventScroll });\n }\n });\n watch(\n targetElement,\n () => {\n focused.value = initialValue;\n },\n { immediate: true, flush: \"post\" }\n );\n return { focused };\n}\n\nfunction useFocusWithin(target, options = {}) {\n const activeElement = useActiveElement(options);\n const targetElement = computed(() => unrefElement(target));\n const focused = computed(() => targetElement.value && activeElement.value ? targetElement.value.contains(activeElement.value) : false);\n return { focused };\n}\n\nfunction useFps(options) {\n var _a;\n const fps = ref(0);\n if (typeof performance === \"undefined\")\n return fps;\n const every = (_a = options == null ? void 0 : options.every) != null ? _a : 10;\n let last = performance.now();\n let ticks = 0;\n useRafFn(() => {\n ticks += 1;\n if (ticks >= every) {\n const now = performance.now();\n const diff = now - last;\n fps.value = Math.round(1e3 / (diff / ticks));\n last = now;\n ticks = 0;\n }\n });\n return fps;\n}\n\nconst eventHandlers = [\n \"fullscreenchange\",\n \"webkitfullscreenchange\",\n \"webkitendfullscreen\",\n \"mozfullscreenchange\",\n \"MSFullscreenChange\"\n];\nfunction useFullscreen(target, options = {}) {\n const {\n document = defaultDocument,\n autoExit = false\n } = options;\n const targetRef = computed(() => {\n var _a;\n return (_a = unrefElement(target)) != null ? _a : document == null ? void 0 : document.querySelector(\"html\");\n });\n const isFullscreen = ref(false);\n const requestMethod = computed(() => {\n return [\n \"requestFullscreen\",\n \"webkitRequestFullscreen\",\n \"webkitEnterFullscreen\",\n \"webkitEnterFullScreen\",\n \"webkitRequestFullScreen\",\n \"mozRequestFullScreen\",\n \"msRequestFullscreen\"\n ].find((m) => document && m in document || targetRef.value && m in targetRef.value);\n });\n const exitMethod = computed(() => {\n return [\n \"exitFullscreen\",\n \"webkitExitFullscreen\",\n \"webkitExitFullScreen\",\n \"webkitCancelFullScreen\",\n \"mozCancelFullScreen\",\n \"msExitFullscreen\"\n ].find((m) => document && m in document || targetRef.value && m in targetRef.value);\n });\n const fullscreenEnabled = computed(() => {\n return [\n \"fullScreen\",\n \"webkitIsFullScreen\",\n \"webkitDisplayingFullscreen\",\n \"mozFullScreen\",\n \"msFullscreenElement\"\n ].find((m) => document && m in document || targetRef.value && m in targetRef.value);\n });\n const fullscreenElementMethod = [\n \"fullscreenElement\",\n \"webkitFullscreenElement\",\n \"mozFullScreenElement\",\n \"msFullscreenElement\"\n ].find((m) => document && m in document);\n const isSupported = useSupported(() => targetRef.value && document && requestMethod.value !== void 0 && exitMethod.value !== void 0 && fullscreenEnabled.value !== void 0);\n const isCurrentElementFullScreen = () => {\n if (fullscreenElementMethod)\n return (document == null ? void 0 : document[fullscreenElementMethod]) === targetRef.value;\n return false;\n };\n const isElementFullScreen = () => {\n if (fullscreenEnabled.value) {\n if (document && document[fullscreenEnabled.value] != null) {\n return document[fullscreenEnabled.value];\n } else {\n const target2 = targetRef.value;\n if ((target2 == null ? void 0 : target2[fullscreenEnabled.value]) != null) {\n return Boolean(target2[fullscreenEnabled.value]);\n }\n }\n }\n return false;\n };\n async function exit() {\n if (!isSupported.value || !isFullscreen.value)\n return;\n if (exitMethod.value) {\n if ((document == null ? void 0 : document[exitMethod.value]) != null) {\n await document[exitMethod.value]();\n } else {\n const target2 = targetRef.value;\n if ((target2 == null ? void 0 : target2[exitMethod.value]) != null)\n await target2[exitMethod.value]();\n }\n }\n isFullscreen.value = false;\n }\n async function enter() {\n if (!isSupported.value || isFullscreen.value)\n return;\n if (isElementFullScreen())\n await exit();\n const target2 = targetRef.value;\n if (requestMethod.value && (target2 == null ? void 0 : target2[requestMethod.value]) != null) {\n await target2[requestMethod.value]();\n isFullscreen.value = true;\n }\n }\n async function toggle() {\n await (isFullscreen.value ? exit() : enter());\n }\n const handlerCallback = () => {\n const isElementFullScreenValue = isElementFullScreen();\n if (!isElementFullScreenValue || isElementFullScreenValue && isCurrentElementFullScreen())\n isFullscreen.value = isElementFullScreenValue;\n };\n useEventListener(document, eventHandlers, handlerCallback, false);\n useEventListener(() => unrefElement(targetRef), eventHandlers, handlerCallback, false);\n if (autoExit)\n tryOnScopeDispose(exit);\n return {\n isSupported,\n isFullscreen,\n enter,\n exit,\n toggle\n };\n}\n\nfunction mapGamepadToXbox360Controller(gamepad) {\n return computed(() => {\n if (gamepad.value) {\n return {\n buttons: {\n a: gamepad.value.buttons[0],\n b: gamepad.value.buttons[1],\n x: gamepad.value.buttons[2],\n y: gamepad.value.buttons[3]\n },\n bumper: {\n left: gamepad.value.buttons[4],\n right: gamepad.value.buttons[5]\n },\n triggers: {\n left: gamepad.value.buttons[6],\n right: gamepad.value.buttons[7]\n },\n stick: {\n left: {\n horizontal: gamepad.value.axes[0],\n vertical: gamepad.value.axes[1],\n button: gamepad.value.buttons[10]\n },\n right: {\n horizontal: gamepad.value.axes[2],\n vertical: gamepad.value.axes[3],\n button: gamepad.value.buttons[11]\n }\n },\n dpad: {\n up: gamepad.value.buttons[12],\n down: gamepad.value.buttons[13],\n left: gamepad.value.buttons[14],\n right: gamepad.value.buttons[15]\n },\n back: gamepad.value.buttons[8],\n start: gamepad.value.buttons[9]\n };\n }\n return null;\n });\n}\nfunction useGamepad(options = {}) {\n const {\n navigator = defaultNavigator\n } = options;\n const isSupported = useSupported(() => navigator && \"getGamepads\" in navigator);\n const gamepads = ref([]);\n const onConnectedHook = createEventHook();\n const onDisconnectedHook = createEventHook();\n const stateFromGamepad = (gamepad) => {\n const hapticActuators = [];\n const vibrationActuator = \"vibrationActuator\" in gamepad ? gamepad.vibrationActuator : null;\n if (vibrationActuator)\n hapticActuators.push(vibrationActuator);\n if (gamepad.hapticActuators)\n hapticActuators.push(...gamepad.hapticActuators);\n return {\n id: gamepad.id,\n index: gamepad.index,\n connected: gamepad.connected,\n mapping: gamepad.mapping,\n timestamp: gamepad.timestamp,\n vibrationActuator: gamepad.vibrationActuator,\n hapticActuators,\n axes: gamepad.axes.map((axes) => axes),\n buttons: gamepad.buttons.map((button) => ({ pressed: button.pressed, touched: button.touched, value: button.value }))\n };\n };\n const updateGamepadState = () => {\n const _gamepads = (navigator == null ? void 0 : navigator.getGamepads()) || [];\n for (const gamepad of _gamepads) {\n if (gamepad && gamepads.value[gamepad.index])\n gamepads.value[gamepad.index] = stateFromGamepad(gamepad);\n }\n };\n const { isActive, pause, resume } = useRafFn(updateGamepadState);\n const onGamepadConnected = (gamepad) => {\n if (!gamepads.value.some(({ index }) => index === gamepad.index)) {\n gamepads.value.push(stateFromGamepad(gamepad));\n onConnectedHook.trigger(gamepad.index);\n }\n resume();\n };\n const onGamepadDisconnected = (gamepad) => {\n gamepads.value = gamepads.value.filter((x) => x.index !== gamepad.index);\n onDisconnectedHook.trigger(gamepad.index);\n };\n useEventListener(\"gamepadconnected\", (e) => onGamepadConnected(e.gamepad));\n useEventListener(\"gamepaddisconnected\", (e) => onGamepadDisconnected(e.gamepad));\n tryOnMounted(() => {\n const _gamepads = (navigator == null ? void 0 : navigator.getGamepads()) || [];\n for (const gamepad of _gamepads) {\n if (gamepad && gamepads.value[gamepad.index])\n onGamepadConnected(gamepad);\n }\n });\n pause();\n return {\n isSupported,\n onConnected: onConnectedHook.on,\n onDisconnected: onDisconnectedHook.on,\n gamepads,\n pause,\n resume,\n isActive\n };\n}\n\nfunction useGeolocation(options = {}) {\n const {\n enableHighAccuracy = true,\n maximumAge = 3e4,\n timeout = 27e3,\n navigator = defaultNavigator,\n immediate = true\n } = options;\n const isSupported = useSupported(() => navigator && \"geolocation\" in navigator);\n const locatedAt = ref(null);\n const error = shallowRef(null);\n const coords = ref({\n accuracy: 0,\n latitude: Number.POSITIVE_INFINITY,\n longitude: Number.POSITIVE_INFINITY,\n altitude: null,\n altitudeAccuracy: null,\n heading: null,\n speed: null\n });\n function updatePosition(position) {\n locatedAt.value = position.timestamp;\n coords.value = position.coords;\n error.value = null;\n }\n let watcher;\n function resume() {\n if (isSupported.value) {\n watcher = navigator.geolocation.watchPosition(\n updatePosition,\n (err) => error.value = err,\n {\n enableHighAccuracy,\n maximumAge,\n timeout\n }\n );\n }\n }\n if (immediate)\n resume();\n function pause() {\n if (watcher && navigator)\n navigator.geolocation.clearWatch(watcher);\n }\n tryOnScopeDispose(() => {\n pause();\n });\n return {\n isSupported,\n coords,\n locatedAt,\n error,\n resume,\n pause\n };\n}\n\nconst defaultEvents$1 = [\"mousemove\", \"mousedown\", \"resize\", \"keydown\", \"touchstart\", \"wheel\"];\nconst oneMinute = 6e4;\nfunction useIdle(timeout = oneMinute, options = {}) {\n const {\n initialState = false,\n listenForVisibilityChange = true,\n events = defaultEvents$1,\n window = defaultWindow,\n eventFilter = throttleFilter(50)\n } = options;\n const idle = ref(initialState);\n const lastActive = ref(timestamp());\n let timer;\n const reset = () => {\n idle.value = false;\n clearTimeout(timer);\n timer = setTimeout(() => idle.value = true, timeout);\n };\n const onEvent = createFilterWrapper(\n eventFilter,\n () => {\n lastActive.value = timestamp();\n reset();\n }\n );\n if (window) {\n const document = window.document;\n for (const event of events)\n useEventListener(window, event, onEvent, { passive: true });\n if (listenForVisibilityChange) {\n useEventListener(document, \"visibilitychange\", () => {\n if (!document.hidden)\n onEvent();\n });\n }\n reset();\n }\n return {\n idle,\n lastActive,\n reset\n };\n}\n\nasync function loadImage(options) {\n return new Promise((resolve, reject) => {\n const img = new Image();\n const { src, srcset, sizes, class: clazz, loading, crossorigin, referrerPolicy } = options;\n img.src = src;\n if (srcset)\n img.srcset = srcset;\n if (sizes)\n img.sizes = sizes;\n if (clazz)\n img.className = clazz;\n if (loading)\n img.loading = loading;\n if (crossorigin)\n img.crossOrigin = crossorigin;\n if (referrerPolicy)\n img.referrerPolicy = referrerPolicy;\n img.onload = () => resolve(img);\n img.onerror = reject;\n });\n}\nfunction useImage(options, asyncStateOptions = {}) {\n const state = useAsyncState(\n () => loadImage(toValue(options)),\n void 0,\n {\n resetOnExecute: true,\n ...asyncStateOptions\n }\n );\n watch(\n () => toValue(options),\n () => state.execute(asyncStateOptions.delay),\n { deep: true }\n );\n return state;\n}\n\nconst ARRIVED_STATE_THRESHOLD_PIXELS = 1;\nfunction useScroll(element, options = {}) {\n const {\n throttle = 0,\n idle = 200,\n onStop = noop,\n onScroll = noop,\n offset = {\n left: 0,\n right: 0,\n top: 0,\n bottom: 0\n },\n eventListenerOptions = {\n capture: false,\n passive: true\n },\n behavior = \"auto\",\n window = defaultWindow,\n onError = (e) => {\n console.error(e);\n }\n } = options;\n const internalX = ref(0);\n const internalY = ref(0);\n const x = computed({\n get() {\n return internalX.value;\n },\n set(x2) {\n scrollTo(x2, void 0);\n }\n });\n const y = computed({\n get() {\n return internalY.value;\n },\n set(y2) {\n scrollTo(void 0, y2);\n }\n });\n function scrollTo(_x, _y) {\n var _a, _b, _c, _d;\n if (!window)\n return;\n const _element = toValue(element);\n if (!_element)\n return;\n (_c = _element instanceof Document ? window.document.body : _element) == null ? void 0 : _c.scrollTo({\n top: (_a = toValue(_y)) != null ? _a : y.value,\n left: (_b = toValue(_x)) != null ? _b : x.value,\n behavior: toValue(behavior)\n });\n const scrollContainer = ((_d = _element == null ? void 0 : _element.document) == null ? void 0 : _d.documentElement) || (_element == null ? void 0 : _element.documentElement) || _element;\n if (x != null)\n internalX.value = scrollContainer.scrollLeft;\n if (y != null)\n internalY.value = scrollContainer.scrollTop;\n }\n const isScrolling = ref(false);\n const arrivedState = reactive({\n left: true,\n right: false,\n top: true,\n bottom: false\n });\n const directions = reactive({\n left: false,\n right: false,\n top: false,\n bottom: false\n });\n const onScrollEnd = (e) => {\n if (!isScrolling.value)\n return;\n isScrolling.value = false;\n directions.left = false;\n directions.right = false;\n directions.top = false;\n directions.bottom = false;\n onStop(e);\n };\n const onScrollEndDebounced = useDebounceFn(onScrollEnd, throttle + idle);\n const setArrivedState = (target) => {\n var _a;\n if (!window)\n return;\n const el = ((_a = target == null ? void 0 : target.document) == null ? void 0 : _a.documentElement) || (target == null ? void 0 : target.documentElement) || unrefElement(target);\n const { display, flexDirection } = getComputedStyle(el);\n const scrollLeft = el.scrollLeft;\n directions.left = scrollLeft < internalX.value;\n directions.right = scrollLeft > internalX.value;\n const left = Math.abs(scrollLeft) <= (offset.left || 0);\n const right = Math.abs(scrollLeft) + el.clientWidth >= el.scrollWidth - (offset.right || 0) - ARRIVED_STATE_THRESHOLD_PIXELS;\n if (display === \"flex\" && flexDirection === \"row-reverse\") {\n arrivedState.left = right;\n arrivedState.right = left;\n } else {\n arrivedState.left = left;\n arrivedState.right = right;\n }\n internalX.value = scrollLeft;\n let scrollTop = el.scrollTop;\n if (target === window.document && !scrollTop)\n scrollTop = window.document.body.scrollTop;\n directions.top = scrollTop < internalY.value;\n directions.bottom = scrollTop > internalY.value;\n const top = Math.abs(scrollTop) <= (offset.top || 0);\n const bottom = Math.abs(scrollTop) + el.clientHeight >= el.scrollHeight - (offset.bottom || 0) - ARRIVED_STATE_THRESHOLD_PIXELS;\n if (display === \"flex\" && flexDirection === \"column-reverse\") {\n arrivedState.top = bottom;\n arrivedState.bottom = top;\n } else {\n arrivedState.top = top;\n arrivedState.bottom = bottom;\n }\n internalY.value = scrollTop;\n };\n const onScrollHandler = (e) => {\n var _a;\n if (!window)\n return;\n const eventTarget = (_a = e.target.documentElement) != null ? _a : e.target;\n setArrivedState(eventTarget);\n isScrolling.value = true;\n onScrollEndDebounced(e);\n onScroll(e);\n };\n useEventListener(\n element,\n \"scroll\",\n throttle ? useThrottleFn(onScrollHandler, throttle, true, false) : onScrollHandler,\n eventListenerOptions\n );\n tryOnMounted(() => {\n try {\n const _element = toValue(element);\n if (!_element)\n return;\n setArrivedState(_element);\n } catch (e) {\n onError(e);\n }\n });\n useEventListener(\n element,\n \"scrollend\",\n onScrollEnd,\n eventListenerOptions\n );\n return {\n x,\n y,\n isScrolling,\n arrivedState,\n directions,\n measure() {\n const _element = toValue(element);\n if (window && _element)\n setArrivedState(_element);\n }\n };\n}\n\nfunction resolveElement(el) {\n if (typeof Window !== \"undefined\" && el instanceof Window)\n return el.document.documentElement;\n if (typeof Document !== \"undefined\" && el instanceof Document)\n return el.documentElement;\n return el;\n}\n\nfunction useInfiniteScroll(element, onLoadMore, options = {}) {\n var _a;\n const {\n direction = \"bottom\",\n interval = 100,\n canLoadMore = () => true\n } = options;\n const state = reactive(useScroll(\n element,\n {\n ...options,\n offset: {\n [direction]: (_a = options.distance) != null ? _a : 0,\n ...options.offset\n }\n }\n ));\n const promise = ref();\n const isLoading = computed(() => !!promise.value);\n const observedElement = computed(() => {\n return resolveElement(toValue(element));\n });\n const isElementVisible = useElementVisibility(observedElement);\n function checkAndLoad() {\n state.measure();\n if (!observedElement.value || !isElementVisible.value || !canLoadMore(observedElement.value))\n return;\n const { scrollHeight, clientHeight, scrollWidth, clientWidth } = observedElement.value;\n const isNarrower = direction === \"bottom\" || direction === \"top\" ? scrollHeight <= clientHeight : scrollWidth <= clientWidth;\n if (state.arrivedState[direction] || isNarrower) {\n if (!promise.value) {\n promise.value = Promise.all([\n onLoadMore(state),\n new Promise((resolve) => setTimeout(resolve, interval))\n ]).finally(() => {\n promise.value = null;\n nextTick(() => checkAndLoad());\n });\n }\n }\n }\n watch(\n () => [state.arrivedState[direction], isElementVisible.value],\n checkAndLoad,\n { immediate: true }\n );\n return {\n isLoading\n };\n}\n\nconst defaultEvents = [\"mousedown\", \"mouseup\", \"keydown\", \"keyup\"];\nfunction useKeyModifier(modifier, options = {}) {\n const {\n events = defaultEvents,\n document = defaultDocument,\n initial = null\n } = options;\n const state = ref(initial);\n if (document) {\n events.forEach((listenerEvent) => {\n useEventListener(document, listenerEvent, (evt) => {\n if (typeof evt.getModifierState === \"function\")\n state.value = evt.getModifierState(modifier);\n });\n });\n }\n return state;\n}\n\nfunction useLocalStorage(key, initialValue, options = {}) {\n const { window = defaultWindow } = options;\n return useStorage(key, initialValue, window == null ? void 0 : window.localStorage, options);\n}\n\nconst DefaultMagicKeysAliasMap = {\n ctrl: \"control\",\n command: \"meta\",\n cmd: \"meta\",\n option: \"alt\",\n up: \"arrowup\",\n down: \"arrowdown\",\n left: \"arrowleft\",\n right: \"arrowright\"\n};\n\nfunction useMagicKeys(options = {}) {\n const {\n reactive: useReactive = false,\n target = defaultWindow,\n aliasMap = DefaultMagicKeysAliasMap,\n passive = true,\n onEventFired = noop\n } = options;\n const current = reactive(/* @__PURE__ */ new Set());\n const obj = {\n toJSON() {\n return {};\n },\n current\n };\n const refs = useReactive ? reactive(obj) : obj;\n const metaDeps = /* @__PURE__ */ new Set();\n const usedKeys = /* @__PURE__ */ new Set();\n function setRefs(key, value) {\n if (key in refs) {\n if (useReactive)\n refs[key] = value;\n else\n refs[key].value = value;\n }\n }\n function reset() {\n current.clear();\n for (const key of usedKeys)\n setRefs(key, false);\n }\n function updateRefs(e, value) {\n var _a, _b;\n const key = (_a = e.key) == null ? void 0 : _a.toLowerCase();\n const code = (_b = e.code) == null ? void 0 : _b.toLowerCase();\n const values = [code, key].filter(Boolean);\n if (key) {\n if (value)\n current.add(key);\n else\n current.delete(key);\n }\n for (const key2 of values) {\n usedKeys.add(key2);\n setRefs(key2, value);\n }\n if (key === \"meta\" && !value) {\n metaDeps.forEach((key2) => {\n current.delete(key2);\n setRefs(key2, false);\n });\n metaDeps.clear();\n } else if (typeof e.getModifierState === \"function\" && e.getModifierState(\"Meta\") && value) {\n [...current, ...values].forEach((key2) => metaDeps.add(key2));\n }\n }\n useEventListener(target, \"keydown\", (e) => {\n updateRefs(e, true);\n return onEventFired(e);\n }, { passive });\n useEventListener(target, \"keyup\", (e) => {\n updateRefs(e, false);\n return onEventFired(e);\n }, { passive });\n useEventListener(\"blur\", reset, { passive: true });\n useEventListener(\"focus\", reset, { passive: true });\n const proxy = new Proxy(\n refs,\n {\n get(target2, prop, rec) {\n if (typeof prop !== \"string\")\n return Reflect.get(target2, prop, rec);\n prop = prop.toLowerCase();\n if (prop in aliasMap)\n prop = aliasMap[prop];\n if (!(prop in refs)) {\n if (/[+_-]/.test(prop)) {\n const keys = prop.split(/[+_-]/g).map((i) => i.trim());\n refs[prop] = computed(() => keys.every((key) => toValue(proxy[key])));\n } else {\n refs[prop] = ref(false);\n }\n }\n const r = Reflect.get(target2, prop, rec);\n return useReactive ? toValue(r) : r;\n }\n }\n );\n return proxy;\n}\n\nfunction usingElRef(source, cb) {\n if (toValue(source))\n cb(toValue(source));\n}\nfunction timeRangeToArray(timeRanges) {\n let ranges = [];\n for (let i = 0; i < timeRanges.length; ++i)\n ranges = [...ranges, [timeRanges.start(i), timeRanges.end(i)]];\n return ranges;\n}\nfunction tracksToArray(tracks) {\n return Array.from(tracks).map(({ label, kind, language, mode, activeCues, cues, inBandMetadataTrackDispatchType }, id) => ({ id, label, kind, language, mode, activeCues, cues, inBandMetadataTrackDispatchType }));\n}\nconst defaultOptions = {\n src: \"\",\n tracks: []\n};\nfunction useMediaControls(target, options = {}) {\n target = toRef(target);\n options = {\n ...defaultOptions,\n ...options\n };\n const {\n document = defaultDocument\n } = options;\n const currentTime = ref(0);\n const duration = ref(0);\n const seeking = ref(false);\n const volume = ref(1);\n const waiting = ref(false);\n const ended = ref(false);\n const playing = ref(false);\n const rate = ref(1);\n const stalled = ref(false);\n const buffered = ref([]);\n const tracks = ref([]);\n const selectedTrack = ref(-1);\n const isPictureInPicture = ref(false);\n const muted = ref(false);\n const supportsPictureInPicture = document && \"pictureInPictureEnabled\" in document;\n const sourceErrorEvent = createEventHook();\n const disableTrack = (track) => {\n usingElRef(target, (el) => {\n if (track) {\n const id = typeof track === \"number\" ? track : track.id;\n el.textTracks[id].mode = \"disabled\";\n } else {\n for (let i = 0; i < el.textTracks.length; ++i)\n el.textTracks[i].mode = \"disabled\";\n }\n selectedTrack.value = -1;\n });\n };\n const enableTrack = (track, disableTracks = true) => {\n usingElRef(target, (el) => {\n const id = typeof track === \"number\" ? track : track.id;\n if (disableTracks)\n disableTrack();\n el.textTracks[id].mode = \"showing\";\n selectedTrack.value = id;\n });\n };\n const togglePictureInPicture = () => {\n return new Promise((resolve, reject) => {\n usingElRef(target, async (el) => {\n if (supportsPictureInPicture) {\n if (!isPictureInPicture.value) {\n el.requestPictureInPicture().then(resolve).catch(reject);\n } else {\n document.exitPictureInPicture().then(resolve).catch(reject);\n }\n }\n });\n });\n };\n watchEffect(() => {\n if (!document)\n return;\n const el = toValue(target);\n if (!el)\n return;\n const src = toValue(options.src);\n let sources = [];\n if (!src)\n return;\n if (typeof src === \"string\")\n sources = [{ src }];\n else if (Array.isArray(src))\n sources = src;\n else if (isObject(src))\n sources = [src];\n el.querySelectorAll(\"source\").forEach((e) => {\n e.removeEventListener(\"error\", sourceErrorEvent.trigger);\n e.remove();\n });\n sources.forEach(({ src: src2, type }) => {\n const source = document.createElement(\"source\");\n source.setAttribute(\"src\", src2);\n source.setAttribute(\"type\", type || \"\");\n source.addEventListener(\"error\", sourceErrorEvent.trigger);\n el.appendChild(source);\n });\n el.load();\n });\n tryOnScopeDispose(() => {\n const el = toValue(target);\n if (!el)\n return;\n el.querySelectorAll(\"source\").forEach((e) => e.removeEventListener(\"error\", sourceErrorEvent.trigger));\n });\n watch([target, volume], () => {\n const el = toValue(target);\n if (!el)\n return;\n el.volume = volume.value;\n });\n watch([target, muted], () => {\n const el = toValue(target);\n if (!el)\n return;\n el.muted = muted.value;\n });\n watch([target, rate], () => {\n const el = toValue(target);\n if (!el)\n return;\n el.playbackRate = rate.value;\n });\n watchEffect(() => {\n if (!document)\n return;\n const textTracks = toValue(options.tracks);\n const el = toValue(target);\n if (!textTracks || !textTracks.length || !el)\n return;\n el.querySelectorAll(\"track\").forEach((e) => e.remove());\n textTracks.forEach(({ default: isDefault, kind, label, src, srcLang }, i) => {\n const track = document.createElement(\"track\");\n track.default = isDefault || false;\n track.kind = kind;\n track.label = label;\n track.src = src;\n track.srclang = srcLang;\n if (track.default)\n selectedTrack.value = i;\n el.appendChild(track);\n });\n });\n const { ignoreUpdates: ignoreCurrentTimeUpdates } = watchIgnorable(currentTime, (time) => {\n const el = toValue(target);\n if (!el)\n return;\n el.currentTime = time;\n });\n const { ignoreUpdates: ignorePlayingUpdates } = watchIgnorable(playing, (isPlaying) => {\n const el = toValue(target);\n if (!el)\n return;\n isPlaying ? el.play() : el.pause();\n });\n useEventListener(target, \"timeupdate\", () => ignoreCurrentTimeUpdates(() => currentTime.value = toValue(target).currentTime));\n useEventListener(target, \"durationchange\", () => duration.value = toValue(target).duration);\n useEventListener(target, \"progress\", () => buffered.value = timeRangeToArray(toValue(target).buffered));\n useEventListener(target, \"seeking\", () => seeking.value = true);\n useEventListener(target, \"seeked\", () => seeking.value = false);\n useEventListener(target, [\"waiting\", \"loadstart\"], () => {\n waiting.value = true;\n ignorePlayingUpdates(() => playing.value = false);\n });\n useEventListener(target, \"loadeddata\", () => waiting.value = false);\n useEventListener(target, \"playing\", () => {\n waiting.value = false;\n ended.value = false;\n ignorePlayingUpdates(() => playing.value = true);\n });\n useEventListener(target, \"ratechange\", () => rate.value = toValue(target).playbackRate);\n useEventListener(target, \"stalled\", () => stalled.value = true);\n useEventListener(target, \"ended\", () => ended.value = true);\n useEventListener(target, \"pause\", () => ignorePlayingUpdates(() => playing.value = false));\n useEventListener(target, \"play\", () => ignorePlayingUpdates(() => playing.value = true));\n useEventListener(target, \"enterpictureinpicture\", () => isPictureInPicture.value = true);\n useEventListener(target, \"leavepictureinpicture\", () => isPictureInPicture.value = false);\n useEventListener(target, \"volumechange\", () => {\n const el = toValue(target);\n if (!el)\n return;\n volume.value = el.volume;\n muted.value = el.muted;\n });\n const listeners = [];\n const stop = watch([target], () => {\n const el = toValue(target);\n if (!el)\n return;\n stop();\n listeners[0] = useEventListener(el.textTracks, \"addtrack\", () => tracks.value = tracksToArray(el.textTracks));\n listeners[1] = useEventListener(el.textTracks, \"removetrack\", () => tracks.value = tracksToArray(el.textTracks));\n listeners[2] = useEventListener(el.textTracks, \"change\", () => tracks.value = tracksToArray(el.textTracks));\n });\n tryOnScopeDispose(() => listeners.forEach((listener) => listener()));\n return {\n currentTime,\n duration,\n waiting,\n seeking,\n ended,\n stalled,\n buffered,\n playing,\n rate,\n // Volume\n volume,\n muted,\n // Tracks\n tracks,\n selectedTrack,\n enableTrack,\n disableTrack,\n // Picture in Picture\n supportsPictureInPicture,\n togglePictureInPicture,\n isPictureInPicture,\n // Events\n onSourceError: sourceErrorEvent.on\n };\n}\n\nfunction getMapVue2Compat() {\n const data = shallowReactive({});\n return {\n get: (key) => data[key],\n set: (key, value) => set(data, key, value),\n has: (key) => hasOwn(data, key),\n delete: (key) => del(data, key),\n clear: () => {\n Object.keys(data).forEach((key) => {\n del(data, key);\n });\n }\n };\n}\nfunction useMemoize(resolver, options) {\n const initCache = () => {\n if (options == null ? void 0 : options.cache)\n return shallowReactive(options.cache);\n if (isVue2)\n return getMapVue2Compat();\n return shallowReactive(/* @__PURE__ */ new Map());\n };\n const cache = initCache();\n const generateKey = (...args) => (options == null ? void 0 : options.getKey) ? options.getKey(...args) : JSON.stringify(args);\n const _loadData = (key, ...args) => {\n cache.set(key, resolver(...args));\n return cache.get(key);\n };\n const loadData = (...args) => _loadData(generateKey(...args), ...args);\n const deleteData = (...args) => {\n cache.delete(generateKey(...args));\n };\n const clearData = () => {\n cache.clear();\n };\n const memoized = (...args) => {\n const key = generateKey(...args);\n if (cache.has(key))\n return cache.get(key);\n return _loadData(key, ...args);\n };\n memoized.load = loadData;\n memoized.delete = deleteData;\n memoized.clear = clearData;\n memoized.generateKey = generateKey;\n memoized.cache = cache;\n return memoized;\n}\n\nfunction useMemory(options = {}) {\n const memory = ref();\n const isSupported = useSupported(() => typeof performance !== \"undefined\" && \"memory\" in performance);\n if (isSupported.value) {\n const { interval = 1e3 } = options;\n useIntervalFn(() => {\n memory.value = performance.memory;\n }, interval, { immediate: options.immediate, immediateCallback: options.immediateCallback });\n }\n return { isSupported, memory };\n}\n\nconst UseMouseBuiltinExtractors = {\n page: (event) => [event.pageX, event.pageY],\n client: (event) => [event.clientX, event.clientY],\n screen: (event) => [event.screenX, event.screenY],\n movement: (event) => event instanceof Touch ? null : [event.movementX, event.movementY]\n};\nfunction useMouse(options = {}) {\n const {\n type = \"page\",\n touch = true,\n resetOnTouchEnds = false,\n initialValue = { x: 0, y: 0 },\n window = defaultWindow,\n target = window,\n scroll = true,\n eventFilter\n } = options;\n let _prevMouseEvent = null;\n const x = ref(initialValue.x);\n const y = ref(initialValue.y);\n const sourceType = ref(null);\n const extractor = typeof type === \"function\" ? type : UseMouseBuiltinExtractors[type];\n const mouseHandler = (event) => {\n const result = extractor(event);\n _prevMouseEvent = event;\n if (result) {\n [x.value, y.value] = result;\n sourceType.value = \"mouse\";\n }\n };\n const touchHandler = (event) => {\n if (event.touches.length > 0) {\n const result = extractor(event.touches[0]);\n if (result) {\n [x.value, y.value] = result;\n sourceType.value = \"touch\";\n }\n }\n };\n const scrollHandler = () => {\n if (!_prevMouseEvent || !window)\n return;\n const pos = extractor(_prevMouseEvent);\n if (_prevMouseEvent instanceof MouseEvent && pos) {\n x.value = pos[0] + window.scrollX;\n y.value = pos[1] + window.scrollY;\n }\n };\n const reset = () => {\n x.value = initialValue.x;\n y.value = initialValue.y;\n };\n const mouseHandlerWrapper = eventFilter ? (event) => eventFilter(() => mouseHandler(event), {}) : (event) => mouseHandler(event);\n const touchHandlerWrapper = eventFilter ? (event) => eventFilter(() => touchHandler(event), {}) : (event) => touchHandler(event);\n const scrollHandlerWrapper = eventFilter ? () => eventFilter(() => scrollHandler(), {}) : () => scrollHandler();\n if (target) {\n const listenerOptions = { passive: true };\n useEventListener(target, [\"mousemove\", \"dragover\"], mouseHandlerWrapper, listenerOptions);\n if (touch && type !== \"movement\") {\n useEventListener(target, [\"touchstart\", \"touchmove\"], touchHandlerWrapper, listenerOptions);\n if (resetOnTouchEnds)\n useEventListener(target, \"touchend\", reset, listenerOptions);\n }\n if (scroll && type === \"page\")\n useEventListener(window, \"scroll\", scrollHandlerWrapper, { passive: true });\n }\n return {\n x,\n y,\n sourceType\n };\n}\n\nfunction useMouseInElement(target, options = {}) {\n const {\n handleOutside = true,\n window = defaultWindow\n } = options;\n const type = options.type || \"page\";\n const { x, y, sourceType } = useMouse(options);\n const targetRef = ref(target != null ? target : window == null ? void 0 : window.document.body);\n const elementX = ref(0);\n const elementY = ref(0);\n const elementPositionX = ref(0);\n const elementPositionY = ref(0);\n const elementHeight = ref(0);\n const elementWidth = ref(0);\n const isOutside = ref(true);\n let stop = () => {\n };\n if (window) {\n stop = watch(\n [targetRef, x, y],\n () => {\n const el = unrefElement(targetRef);\n if (!el)\n return;\n const {\n left,\n top,\n width,\n height\n } = el.getBoundingClientRect();\n elementPositionX.value = left + (type === \"page\" ? window.pageXOffset : 0);\n elementPositionY.value = top + (type === \"page\" ? window.pageYOffset : 0);\n elementHeight.value = height;\n elementWidth.value = width;\n const elX = x.value - elementPositionX.value;\n const elY = y.value - elementPositionY.value;\n isOutside.value = width === 0 || height === 0 || elX < 0 || elY < 0 || elX > width || elY > height;\n if (handleOutside || !isOutside.value) {\n elementX.value = elX;\n elementY.value = elY;\n }\n },\n { immediate: true }\n );\n useEventListener(document, \"mouseleave\", () => {\n isOutside.value = true;\n });\n }\n return {\n x,\n y,\n sourceType,\n elementX,\n elementY,\n elementPositionX,\n elementPositionY,\n elementHeight,\n elementWidth,\n isOutside,\n stop\n };\n}\n\nfunction useMousePressed(options = {}) {\n const {\n touch = true,\n drag = true,\n capture = false,\n initialValue = false,\n window = defaultWindow\n } = options;\n const pressed = ref(initialValue);\n const sourceType = ref(null);\n if (!window) {\n return {\n pressed,\n sourceType\n };\n }\n const onPressed = (srcType) => () => {\n pressed.value = true;\n sourceType.value = srcType;\n };\n const onReleased = () => {\n pressed.value = false;\n sourceType.value = null;\n };\n const target = computed(() => unrefElement(options.target) || window);\n useEventListener(target, \"mousedown\", onPressed(\"mouse\"), { passive: true, capture });\n useEventListener(window, \"mouseleave\", onReleased, { passive: true, capture });\n useEventListener(window, \"mouseup\", onReleased, { passive: true, capture });\n if (drag) {\n useEventListener(target, \"dragstart\", onPressed(\"mouse\"), { passive: true, capture });\n useEventListener(window, \"drop\", onReleased, { passive: true, capture });\n useEventListener(window, \"dragend\", onReleased, { passive: true, capture });\n }\n if (touch) {\n useEventListener(target, \"touchstart\", onPressed(\"touch\"), { passive: true, capture });\n useEventListener(window, \"touchend\", onReleased, { passive: true, capture });\n useEventListener(window, \"touchcancel\", onReleased, { passive: true, capture });\n }\n return {\n pressed,\n sourceType\n };\n}\n\nfunction useNavigatorLanguage(options = {}) {\n const { window = defaultWindow } = options;\n const navigator = window == null ? void 0 : window.navigator;\n const isSupported = useSupported(() => navigator && \"language\" in navigator);\n const language = ref(navigator == null ? void 0 : navigator.language);\n useEventListener(window, \"languagechange\", () => {\n if (navigator)\n language.value = navigator.language;\n });\n return {\n isSupported,\n language\n };\n}\n\nfunction useNetwork(options = {}) {\n const { window = defaultWindow } = options;\n const navigator = window == null ? void 0 : window.navigator;\n const isSupported = useSupported(() => navigator && \"connection\" in navigator);\n const isOnline = ref(true);\n const saveData = ref(false);\n const offlineAt = ref(void 0);\n const onlineAt = ref(void 0);\n const downlink = ref(void 0);\n const downlinkMax = ref(void 0);\n const rtt = ref(void 0);\n const effectiveType = ref(void 0);\n const type = ref(\"unknown\");\n const connection = isSupported.value && navigator.connection;\n function updateNetworkInformation() {\n if (!navigator)\n return;\n isOnline.value = navigator.onLine;\n offlineAt.value = isOnline.value ? void 0 : Date.now();\n onlineAt.value = isOnline.value ? Date.now() : void 0;\n if (connection) {\n downlink.value = connection.downlink;\n downlinkMax.value = connection.downlinkMax;\n effectiveType.value = connection.effectiveType;\n rtt.value = connection.rtt;\n saveData.value = connection.saveData;\n type.value = connection.type;\n }\n }\n if (window) {\n useEventListener(window, \"offline\", () => {\n isOnline.value = false;\n offlineAt.value = Date.now();\n });\n useEventListener(window, \"online\", () => {\n isOnline.value = true;\n onlineAt.value = Date.now();\n });\n }\n if (connection)\n useEventListener(connection, \"change\", updateNetworkInformation, false);\n updateNetworkInformation();\n return {\n isSupported,\n isOnline,\n saveData,\n offlineAt,\n onlineAt,\n downlink,\n downlinkMax,\n effectiveType,\n rtt,\n type\n };\n}\n\nfunction useNow(options = {}) {\n const {\n controls: exposeControls = false,\n interval = \"requestAnimationFrame\"\n } = options;\n const now = ref(/* @__PURE__ */ new Date());\n const update = () => now.value = /* @__PURE__ */ new Date();\n const controls = interval === \"requestAnimationFrame\" ? useRafFn(update, { immediate: true }) : useIntervalFn(update, interval, { immediate: true });\n if (exposeControls) {\n return {\n now,\n ...controls\n };\n } else {\n return now;\n }\n}\n\nfunction useObjectUrl(object) {\n const url = ref();\n const release = () => {\n if (url.value)\n URL.revokeObjectURL(url.value);\n url.value = void 0;\n };\n watch(\n () => toValue(object),\n (newObject) => {\n release();\n if (newObject)\n url.value = URL.createObjectURL(newObject);\n },\n { immediate: true }\n );\n tryOnScopeDispose(release);\n return readonly(url);\n}\n\nfunction useClamp(value, min, max) {\n if (typeof value === \"function\" || isReadonly(value))\n return computed(() => clamp(toValue(value), toValue(min), toValue(max)));\n const _value = ref(value);\n return computed({\n get() {\n return _value.value = clamp(_value.value, toValue(min), toValue(max));\n },\n set(value2) {\n _value.value = clamp(value2, toValue(min), toValue(max));\n }\n });\n}\n\nfunction useOffsetPagination(options) {\n const {\n total = Number.POSITIVE_INFINITY,\n pageSize = 10,\n page = 1,\n onPageChange = noop,\n onPageSizeChange = noop,\n onPageCountChange = noop\n } = options;\n const currentPageSize = useClamp(pageSize, 1, Number.POSITIVE_INFINITY);\n const pageCount = computed(() => Math.max(\n 1,\n Math.ceil(toValue(total) / toValue(currentPageSize))\n ));\n const currentPage = useClamp(page, 1, pageCount);\n const isFirstPage = computed(() => currentPage.value === 1);\n const isLastPage = computed(() => currentPage.value === pageCount.value);\n if (isRef(page)) {\n syncRef(page, currentPage, {\n direction: isReadonly(page) ? \"ltr\" : \"both\"\n });\n }\n if (isRef(pageSize)) {\n syncRef(pageSize, currentPageSize, {\n direction: isReadonly(pageSize) ? \"ltr\" : \"both\"\n });\n }\n function prev() {\n currentPage.value--;\n }\n function next() {\n currentPage.value++;\n }\n const returnValue = {\n currentPage,\n currentPageSize,\n pageCount,\n isFirstPage,\n isLastPage,\n prev,\n next\n };\n watch(currentPage, () => {\n onPageChange(reactive(returnValue));\n });\n watch(currentPageSize, () => {\n onPageSizeChange(reactive(returnValue));\n });\n watch(pageCount, () => {\n onPageCountChange(reactive(returnValue));\n });\n return returnValue;\n}\n\nfunction useOnline(options = {}) {\n const { isOnline } = useNetwork(options);\n return isOnline;\n}\n\nfunction usePageLeave(options = {}) {\n const { window = defaultWindow } = options;\n const isLeft = ref(false);\n const handler = (event) => {\n if (!window)\n return;\n event = event || window.event;\n const from = event.relatedTarget || event.toElement;\n isLeft.value = !from;\n };\n if (window) {\n useEventListener(window, \"mouseout\", handler, { passive: true });\n useEventListener(window.document, \"mouseleave\", handler, { passive: true });\n useEventListener(window.document, \"mouseenter\", handler, { passive: true });\n }\n return isLeft;\n}\n\nfunction useScreenOrientation(options = {}) {\n const {\n window = defaultWindow\n } = options;\n const isSupported = useSupported(() => window && \"screen\" in window && \"orientation\" in window.screen);\n const screenOrientation = isSupported.value ? window.screen.orientation : {};\n const orientation = ref(screenOrientation.type);\n const angle = ref(screenOrientation.angle || 0);\n if (isSupported.value) {\n useEventListener(window, \"orientationchange\", () => {\n orientation.value = screenOrientation.type;\n angle.value = screenOrientation.angle;\n });\n }\n const lockOrientation = (type) => {\n if (isSupported.value && typeof screenOrientation.lock === \"function\")\n return screenOrientation.lock(type);\n return Promise.reject(new Error(\"Not supported\"));\n };\n const unlockOrientation = () => {\n if (isSupported.value && typeof screenOrientation.unlock === \"function\")\n screenOrientation.unlock();\n };\n return {\n isSupported,\n orientation,\n angle,\n lockOrientation,\n unlockOrientation\n };\n}\n\nfunction useParallax(target, options = {}) {\n const {\n deviceOrientationTiltAdjust = (i) => i,\n deviceOrientationRollAdjust = (i) => i,\n mouseTiltAdjust = (i) => i,\n mouseRollAdjust = (i) => i,\n window = defaultWindow\n } = options;\n const orientation = reactive(useDeviceOrientation({ window }));\n const screenOrientation = reactive(useScreenOrientation({ window }));\n const {\n elementX: x,\n elementY: y,\n elementWidth: width,\n elementHeight: height\n } = useMouseInElement(target, { handleOutside: false, window });\n const source = computed(() => {\n if (orientation.isSupported && (orientation.alpha != null && orientation.alpha !== 0 || orientation.gamma != null && orientation.gamma !== 0)) {\n return \"deviceOrientation\";\n }\n return \"mouse\";\n });\n const roll = computed(() => {\n if (source.value === \"deviceOrientation\") {\n let value;\n switch (screenOrientation.orientation) {\n case \"landscape-primary\":\n value = orientation.gamma / 90;\n break;\n case \"landscape-secondary\":\n value = -orientation.gamma / 90;\n break;\n case \"portrait-primary\":\n value = -orientation.beta / 90;\n break;\n case \"portrait-secondary\":\n value = orientation.beta / 90;\n break;\n default:\n value = -orientation.beta / 90;\n }\n return deviceOrientationRollAdjust(value);\n } else {\n const value = -(y.value - height.value / 2) / height.value;\n return mouseRollAdjust(value);\n }\n });\n const tilt = computed(() => {\n if (source.value === \"deviceOrientation\") {\n let value;\n switch (screenOrientation.orientation) {\n case \"landscape-primary\":\n value = orientation.beta / 90;\n break;\n case \"landscape-secondary\":\n value = -orientation.beta / 90;\n break;\n case \"portrait-primary\":\n value = orientation.gamma / 90;\n break;\n case \"portrait-secondary\":\n value = -orientation.gamma / 90;\n break;\n default:\n value = orientation.gamma / 90;\n }\n return deviceOrientationTiltAdjust(value);\n } else {\n const value = (x.value - width.value / 2) / width.value;\n return mouseTiltAdjust(value);\n }\n });\n return { roll, tilt, source };\n}\n\nfunction useParentElement(element = useCurrentElement()) {\n const parentElement = shallowRef();\n const update = () => {\n const el = unrefElement(element);\n if (el)\n parentElement.value = el.parentElement;\n };\n tryOnMounted(update);\n watch(() => toValue(element), update);\n return parentElement;\n}\n\nfunction usePerformanceObserver(options, callback) {\n const {\n window = defaultWindow,\n immediate = true,\n ...performanceOptions\n } = options;\n const isSupported = useSupported(() => window && \"PerformanceObserver\" in window);\n let observer;\n const stop = () => {\n observer == null ? void 0 : observer.disconnect();\n };\n const start = () => {\n if (isSupported.value) {\n stop();\n observer = new PerformanceObserver(callback);\n observer.observe(performanceOptions);\n }\n };\n tryOnScopeDispose(stop);\n if (immediate)\n start();\n return {\n isSupported,\n start,\n stop\n };\n}\n\nconst defaultState = {\n x: 0,\n y: 0,\n pointerId: 0,\n pressure: 0,\n tiltX: 0,\n tiltY: 0,\n width: 0,\n height: 0,\n twist: 0,\n pointerType: null\n};\nconst keys = /* @__PURE__ */ Object.keys(defaultState);\nfunction usePointer(options = {}) {\n const {\n target = defaultWindow\n } = options;\n const isInside = ref(false);\n const state = ref(options.initialValue || {});\n Object.assign(state.value, defaultState, state.value);\n const handler = (event) => {\n isInside.value = true;\n if (options.pointerTypes && !options.pointerTypes.includes(event.pointerType))\n return;\n state.value = objectPick(event, keys, false);\n };\n if (target) {\n const listenerOptions = { passive: true };\n useEventListener(target, [\"pointerdown\", \"pointermove\", \"pointerup\"], handler, listenerOptions);\n useEventListener(target, \"pointerleave\", () => isInside.value = false, listenerOptions);\n }\n return {\n ...toRefs(state),\n isInside\n };\n}\n\nfunction usePointerLock(target, options = {}) {\n const { document = defaultDocument } = options;\n const isSupported = useSupported(() => document && \"pointerLockElement\" in document);\n const element = ref();\n const triggerElement = ref();\n let targetElement;\n if (isSupported.value) {\n useEventListener(document, \"pointerlockchange\", () => {\n var _a;\n const currentElement = (_a = document.pointerLockElement) != null ? _a : element.value;\n if (targetElement && currentElement === targetElement) {\n element.value = document.pointerLockElement;\n if (!element.value)\n targetElement = triggerElement.value = null;\n }\n });\n useEventListener(document, \"pointerlockerror\", () => {\n var _a;\n const currentElement = (_a = document.pointerLockElement) != null ? _a : element.value;\n if (targetElement && currentElement === targetElement) {\n const action = document.pointerLockElement ? \"release\" : \"acquire\";\n throw new Error(`Failed to ${action} pointer lock.`);\n }\n });\n }\n async function lock(e) {\n var _a;\n if (!isSupported.value)\n throw new Error(\"Pointer Lock API is not supported by your browser.\");\n triggerElement.value = e instanceof Event ? e.currentTarget : null;\n targetElement = e instanceof Event ? (_a = unrefElement(target)) != null ? _a : triggerElement.value : unrefElement(e);\n if (!targetElement)\n throw new Error(\"Target element undefined.\");\n targetElement.requestPointerLock();\n return await until(element).toBe(targetElement);\n }\n async function unlock() {\n if (!element.value)\n return false;\n document.exitPointerLock();\n await until(element).toBeNull();\n return true;\n }\n return {\n isSupported,\n element,\n triggerElement,\n lock,\n unlock\n };\n}\n\nfunction usePointerSwipe(target, options = {}) {\n const targetRef = toRef(target);\n const {\n threshold = 50,\n onSwipe,\n onSwipeEnd,\n onSwipeStart,\n disableTextSelect = false\n } = options;\n const posStart = reactive({ x: 0, y: 0 });\n const updatePosStart = (x, y) => {\n posStart.x = x;\n posStart.y = y;\n };\n const posEnd = reactive({ x: 0, y: 0 });\n const updatePosEnd = (x, y) => {\n posEnd.x = x;\n posEnd.y = y;\n };\n const distanceX = computed(() => posStart.x - posEnd.x);\n const distanceY = computed(() => posStart.y - posEnd.y);\n const { max, abs } = Math;\n const isThresholdExceeded = computed(() => max(abs(distanceX.value), abs(distanceY.value)) >= threshold);\n const isSwiping = ref(false);\n const isPointerDown = ref(false);\n const direction = computed(() => {\n if (!isThresholdExceeded.value)\n return \"none\";\n if (abs(distanceX.value) > abs(distanceY.value)) {\n return distanceX.value > 0 ? \"left\" : \"right\";\n } else {\n return distanceY.value > 0 ? \"up\" : \"down\";\n }\n });\n const eventIsAllowed = (e) => {\n var _a, _b, _c;\n const isReleasingButton = e.buttons === 0;\n const isPrimaryButton = e.buttons === 1;\n return (_c = (_b = (_a = options.pointerTypes) == null ? void 0 : _a.includes(e.pointerType)) != null ? _b : isReleasingButton || isPrimaryButton) != null ? _c : true;\n };\n const stops = [\n useEventListener(target, \"pointerdown\", (e) => {\n if (!eventIsAllowed(e))\n return;\n isPointerDown.value = true;\n const eventTarget = e.target;\n eventTarget == null ? void 0 : eventTarget.setPointerCapture(e.pointerId);\n const { clientX: x, clientY: y } = e;\n updatePosStart(x, y);\n updatePosEnd(x, y);\n onSwipeStart == null ? void 0 : onSwipeStart(e);\n }),\n useEventListener(target, \"pointermove\", (e) => {\n if (!eventIsAllowed(e))\n return;\n if (!isPointerDown.value)\n return;\n const { clientX: x, clientY: y } = e;\n updatePosEnd(x, y);\n if (!isSwiping.value && isThresholdExceeded.value)\n isSwiping.value = true;\n if (isSwiping.value)\n onSwipe == null ? void 0 : onSwipe(e);\n }),\n useEventListener(target, \"pointerup\", (e) => {\n if (!eventIsAllowed(e))\n return;\n if (isSwiping.value)\n onSwipeEnd == null ? void 0 : onSwipeEnd(e, direction.value);\n isPointerDown.value = false;\n isSwiping.value = false;\n })\n ];\n tryOnMounted(() => {\n var _a, _b, _c, _d, _e, _f, _g, _h;\n (_b = (_a = targetRef.value) == null ? void 0 : _a.style) == null ? void 0 : _b.setProperty(\"touch-action\", \"none\");\n if (disableTextSelect) {\n (_d = (_c = targetRef.value) == null ? void 0 : _c.style) == null ? void 0 : _d.setProperty(\"-webkit-user-select\", \"none\");\n (_f = (_e = targetRef.value) == null ? void 0 : _e.style) == null ? void 0 : _f.setProperty(\"-ms-user-select\", \"none\");\n (_h = (_g = targetRef.value) == null ? void 0 : _g.style) == null ? void 0 : _h.setProperty(\"user-select\", \"none\");\n }\n });\n const stop = () => stops.forEach((s) => s());\n return {\n isSwiping: readonly(isSwiping),\n direction: readonly(direction),\n posStart: readonly(posStart),\n posEnd: readonly(posEnd),\n distanceX,\n distanceY,\n stop\n };\n}\n\nfunction usePreferredColorScheme(options) {\n const isLight = useMediaQuery(\"(prefers-color-scheme: light)\", options);\n const isDark = useMediaQuery(\"(prefers-color-scheme: dark)\", options);\n return computed(() => {\n if (isDark.value)\n return \"dark\";\n if (isLight.value)\n return \"light\";\n return \"no-preference\";\n });\n}\n\nfunction usePreferredContrast(options) {\n const isMore = useMediaQuery(\"(prefers-contrast: more)\", options);\n const isLess = useMediaQuery(\"(prefers-contrast: less)\", options);\n const isCustom = useMediaQuery(\"(prefers-contrast: custom)\", options);\n return computed(() => {\n if (isMore.value)\n return \"more\";\n if (isLess.value)\n return \"less\";\n if (isCustom.value)\n return \"custom\";\n return \"no-preference\";\n });\n}\n\nfunction usePreferredLanguages(options = {}) {\n const { window = defaultWindow } = options;\n if (!window)\n return ref([\"en\"]);\n const navigator = window.navigator;\n const value = ref(navigator.languages);\n useEventListener(window, \"languagechange\", () => {\n value.value = navigator.languages;\n });\n return value;\n}\n\nfunction usePreferredReducedMotion(options) {\n const isReduced = useMediaQuery(\"(prefers-reduced-motion: reduce)\", options);\n return computed(() => {\n if (isReduced.value)\n return \"reduce\";\n return \"no-preference\";\n });\n}\n\nfunction usePrevious(value, initialValue) {\n const previous = shallowRef(initialValue);\n watch(\n toRef(value),\n (_, oldValue) => {\n previous.value = oldValue;\n },\n { flush: \"sync\" }\n );\n return readonly(previous);\n}\n\nconst topVarName = \"--vueuse-safe-area-top\";\nconst rightVarName = \"--vueuse-safe-area-right\";\nconst bottomVarName = \"--vueuse-safe-area-bottom\";\nconst leftVarName = \"--vueuse-safe-area-left\";\nfunction useScreenSafeArea() {\n const top = ref(\"\");\n const right = ref(\"\");\n const bottom = ref(\"\");\n const left = ref(\"\");\n if (isClient) {\n const topCssVar = useCssVar(topVarName);\n const rightCssVar = useCssVar(rightVarName);\n const bottomCssVar = useCssVar(bottomVarName);\n const leftCssVar = useCssVar(leftVarName);\n topCssVar.value = \"env(safe-area-inset-top, 0px)\";\n rightCssVar.value = \"env(safe-area-inset-right, 0px)\";\n bottomCssVar.value = \"env(safe-area-inset-bottom, 0px)\";\n leftCssVar.value = \"env(safe-area-inset-left, 0px)\";\n update();\n useEventListener(\"resize\", useDebounceFn(update));\n }\n function update() {\n top.value = getValue(topVarName);\n right.value = getValue(rightVarName);\n bottom.value = getValue(bottomVarName);\n left.value = getValue(leftVarName);\n }\n return {\n top,\n right,\n bottom,\n left,\n update\n };\n}\nfunction getValue(position) {\n return getComputedStyle(document.documentElement).getPropertyValue(position);\n}\n\nfunction useScriptTag(src, onLoaded = noop, options = {}) {\n const {\n immediate = true,\n manual = false,\n type = \"text/javascript\",\n async = true,\n crossOrigin,\n referrerPolicy,\n noModule,\n defer,\n document = defaultDocument,\n attrs = {}\n } = options;\n const scriptTag = ref(null);\n let _promise = null;\n const loadScript = (waitForScriptLoad) => new Promise((resolve, reject) => {\n const resolveWithElement = (el2) => {\n scriptTag.value = el2;\n resolve(el2);\n return el2;\n };\n if (!document) {\n resolve(false);\n return;\n }\n let shouldAppend = false;\n let el = document.querySelector(`script[src=\"${toValue(src)}\"]`);\n if (!el) {\n el = document.createElement(\"script\");\n el.type = type;\n el.async = async;\n el.src = toValue(src);\n if (defer)\n el.defer = defer;\n if (crossOrigin)\n el.crossOrigin = crossOrigin;\n if (noModule)\n el.noModule = noModule;\n if (referrerPolicy)\n el.referrerPolicy = referrerPolicy;\n Object.entries(attrs).forEach(([name, value]) => el == null ? void 0 : el.setAttribute(name, value));\n shouldAppend = true;\n } else if (el.hasAttribute(\"data-loaded\")) {\n resolveWithElement(el);\n }\n el.addEventListener(\"error\", (event) => reject(event));\n el.addEventListener(\"abort\", (event) => reject(event));\n el.addEventListener(\"load\", () => {\n el.setAttribute(\"data-loaded\", \"true\");\n onLoaded(el);\n resolveWithElement(el);\n });\n if (shouldAppend)\n el = document.head.appendChild(el);\n if (!waitForScriptLoad)\n resolveWithElement(el);\n });\n const load = (waitForScriptLoad = true) => {\n if (!_promise)\n _promise = loadScript(waitForScriptLoad);\n return _promise;\n };\n const unload = () => {\n if (!document)\n return;\n _promise = null;\n if (scriptTag.value)\n scriptTag.value = null;\n const el = document.querySelector(`script[src=\"${toValue(src)}\"]`);\n if (el)\n document.head.removeChild(el);\n };\n if (immediate && !manual)\n tryOnMounted(load);\n if (!manual)\n tryOnUnmounted(unload);\n return { scriptTag, load, unload };\n}\n\nfunction checkOverflowScroll(ele) {\n const style = window.getComputedStyle(ele);\n if (style.overflowX === \"scroll\" || style.overflowY === \"scroll\" || style.overflowX === \"auto\" && ele.clientWidth < ele.scrollWidth || style.overflowY === \"auto\" && ele.clientHeight < ele.scrollHeight) {\n return true;\n } else {\n const parent = ele.parentNode;\n if (!parent || parent.tagName === \"BODY\")\n return false;\n return checkOverflowScroll(parent);\n }\n}\nfunction preventDefault(rawEvent) {\n const e = rawEvent || window.event;\n const _target = e.target;\n if (checkOverflowScroll(_target))\n return false;\n if (e.touches.length > 1)\n return true;\n if (e.preventDefault)\n e.preventDefault();\n return false;\n}\nconst elInitialOverflow = /* @__PURE__ */ new WeakMap();\nfunction useScrollLock(element, initialState = false) {\n const isLocked = ref(initialState);\n let stopTouchMoveListener = null;\n let initialOverflow = \"\";\n watch(toRef(element), (el) => {\n const target = resolveElement(toValue(el));\n if (target) {\n const ele = target;\n if (!elInitialOverflow.get(ele))\n elInitialOverflow.set(ele, ele.style.overflow);\n if (ele.style.overflow !== \"hidden\")\n initialOverflow = ele.style.overflow;\n if (ele.style.overflow === \"hidden\")\n return isLocked.value = true;\n if (isLocked.value)\n return ele.style.overflow = \"hidden\";\n }\n }, {\n immediate: true\n });\n const lock = () => {\n const el = resolveElement(toValue(element));\n if (!el || isLocked.value)\n return;\n if (isIOS) {\n stopTouchMoveListener = useEventListener(\n el,\n \"touchmove\",\n (e) => {\n preventDefault(e);\n },\n { passive: false }\n );\n }\n el.style.overflow = \"hidden\";\n isLocked.value = true;\n };\n const unlock = () => {\n const el = resolveElement(toValue(element));\n if (!el || !isLocked.value)\n return;\n isIOS && (stopTouchMoveListener == null ? void 0 : stopTouchMoveListener());\n el.style.overflow = initialOverflow;\n elInitialOverflow.delete(el);\n isLocked.value = false;\n };\n tryOnScopeDispose(unlock);\n return computed({\n get() {\n return isLocked.value;\n },\n set(v) {\n if (v)\n lock();\n else unlock();\n }\n });\n}\n\nfunction useSessionStorage(key, initialValue, options = {}) {\n const { window = defaultWindow } = options;\n return useStorage(key, initialValue, window == null ? void 0 : window.sessionStorage, options);\n}\n\nfunction useShare(shareOptions = {}, options = {}) {\n const { navigator = defaultNavigator } = options;\n const _navigator = navigator;\n const isSupported = useSupported(() => _navigator && \"canShare\" in _navigator);\n const share = async (overrideOptions = {}) => {\n if (isSupported.value) {\n const data = {\n ...toValue(shareOptions),\n ...toValue(overrideOptions)\n };\n let granted = true;\n if (data.files && _navigator.canShare)\n granted = _navigator.canShare({ files: data.files });\n if (granted)\n return _navigator.share(data);\n }\n };\n return {\n isSupported,\n share\n };\n}\n\nconst defaultSortFn = (source, compareFn) => source.sort(compareFn);\nconst defaultCompare = (a, b) => a - b;\nfunction useSorted(...args) {\n var _a, _b, _c, _d;\n const [source] = args;\n let compareFn = defaultCompare;\n let options = {};\n if (args.length === 2) {\n if (typeof args[1] === \"object\") {\n options = args[1];\n compareFn = (_a = options.compareFn) != null ? _a : defaultCompare;\n } else {\n compareFn = (_b = args[1]) != null ? _b : defaultCompare;\n }\n } else if (args.length > 2) {\n compareFn = (_c = args[1]) != null ? _c : defaultCompare;\n options = (_d = args[2]) != null ? _d : {};\n }\n const {\n dirty = false,\n sortFn = defaultSortFn\n } = options;\n if (!dirty)\n return computed(() => sortFn([...toValue(source)], compareFn));\n watchEffect(() => {\n const result = sortFn(toValue(source), compareFn);\n if (isRef(source))\n source.value = result;\n else\n source.splice(0, source.length, ...result);\n });\n return source;\n}\n\nfunction useSpeechRecognition(options = {}) {\n const {\n interimResults = true,\n continuous = true,\n window = defaultWindow\n } = options;\n const lang = toRef(options.lang || \"en-US\");\n const isListening = ref(false);\n const isFinal = ref(false);\n const result = ref(\"\");\n const error = shallowRef(void 0);\n const toggle = (value = !isListening.value) => {\n isListening.value = value;\n };\n const start = () => {\n isListening.value = true;\n };\n const stop = () => {\n isListening.value = false;\n };\n const SpeechRecognition = window && (window.SpeechRecognition || window.webkitSpeechRecognition);\n const isSupported = useSupported(() => SpeechRecognition);\n let recognition;\n if (isSupported.value) {\n recognition = new SpeechRecognition();\n recognition.continuous = continuous;\n recognition.interimResults = interimResults;\n recognition.lang = toValue(lang);\n recognition.onstart = () => {\n isFinal.value = false;\n };\n watch(lang, (lang2) => {\n if (recognition && !isListening.value)\n recognition.lang = lang2;\n });\n recognition.onresult = (event) => {\n const currentResult = event.results[event.resultIndex];\n const { transcript } = currentResult[0];\n isFinal.value = currentResult.isFinal;\n result.value = transcript;\n error.value = void 0;\n };\n recognition.onerror = (event) => {\n error.value = event;\n };\n recognition.onend = () => {\n isListening.value = false;\n recognition.lang = toValue(lang);\n };\n watch(isListening, () => {\n if (isListening.value)\n recognition.start();\n else\n recognition.stop();\n });\n }\n tryOnScopeDispose(() => {\n isListening.value = false;\n });\n return {\n isSupported,\n isListening,\n isFinal,\n recognition,\n result,\n error,\n toggle,\n start,\n stop\n };\n}\n\nfunction useSpeechSynthesis(text, options = {}) {\n const {\n pitch = 1,\n rate = 1,\n volume = 1,\n window = defaultWindow\n } = options;\n const synth = window && window.speechSynthesis;\n const isSupported = useSupported(() => synth);\n const isPlaying = ref(false);\n const status = ref(\"init\");\n const spokenText = toRef(text || \"\");\n const lang = toRef(options.lang || \"en-US\");\n const error = shallowRef(void 0);\n const toggle = (value = !isPlaying.value) => {\n isPlaying.value = value;\n };\n const bindEventsForUtterance = (utterance2) => {\n utterance2.lang = toValue(lang);\n utterance2.voice = toValue(options.voice) || null;\n utterance2.pitch = toValue(pitch);\n utterance2.rate = toValue(rate);\n utterance2.volume = volume;\n utterance2.onstart = () => {\n isPlaying.value = true;\n status.value = \"play\";\n };\n utterance2.onpause = () => {\n isPlaying.value = false;\n status.value = \"pause\";\n };\n utterance2.onresume = () => {\n isPlaying.value = true;\n status.value = \"play\";\n };\n utterance2.onend = () => {\n isPlaying.value = false;\n status.value = \"end\";\n };\n utterance2.onerror = (event) => {\n error.value = event;\n };\n };\n const utterance = computed(() => {\n isPlaying.value = false;\n status.value = \"init\";\n const newUtterance = new SpeechSynthesisUtterance(spokenText.value);\n bindEventsForUtterance(newUtterance);\n return newUtterance;\n });\n const speak = () => {\n synth.cancel();\n utterance && synth.speak(utterance.value);\n };\n const stop = () => {\n synth.cancel();\n isPlaying.value = false;\n };\n if (isSupported.value) {\n bindEventsForUtterance(utterance.value);\n watch(lang, (lang2) => {\n if (utterance.value && !isPlaying.value)\n utterance.value.lang = lang2;\n });\n if (options.voice) {\n watch(options.voice, () => {\n synth.cancel();\n });\n }\n watch(isPlaying, () => {\n if (isPlaying.value)\n synth.resume();\n else\n synth.pause();\n });\n }\n tryOnScopeDispose(() => {\n isPlaying.value = false;\n });\n return {\n isSupported,\n isPlaying,\n status,\n utterance,\n error,\n stop,\n toggle,\n speak\n };\n}\n\nfunction useStepper(steps, initialStep) {\n const stepsRef = ref(steps);\n const stepNames = computed(() => Array.isArray(stepsRef.value) ? stepsRef.value : Object.keys(stepsRef.value));\n const index = ref(stepNames.value.indexOf(initialStep != null ? initialStep : stepNames.value[0]));\n const current = computed(() => at(index.value));\n const isFirst = computed(() => index.value === 0);\n const isLast = computed(() => index.value === stepNames.value.length - 1);\n const next = computed(() => stepNames.value[index.value + 1]);\n const previous = computed(() => stepNames.value[index.value - 1]);\n function at(index2) {\n if (Array.isArray(stepsRef.value))\n return stepsRef.value[index2];\n return stepsRef.value[stepNames.value[index2]];\n }\n function get(step) {\n if (!stepNames.value.includes(step))\n return;\n return at(stepNames.value.indexOf(step));\n }\n function goTo(step) {\n if (stepNames.value.includes(step))\n index.value = stepNames.value.indexOf(step);\n }\n function goToNext() {\n if (isLast.value)\n return;\n index.value++;\n }\n function goToPrevious() {\n if (isFirst.value)\n return;\n index.value--;\n }\n function goBackTo(step) {\n if (isAfter(step))\n goTo(step);\n }\n function isNext(step) {\n return stepNames.value.indexOf(step) === index.value + 1;\n }\n function isPrevious(step) {\n return stepNames.value.indexOf(step) === index.value - 1;\n }\n function isCurrent(step) {\n return stepNames.value.indexOf(step) === index.value;\n }\n function isBefore(step) {\n return index.value < stepNames.value.indexOf(step);\n }\n function isAfter(step) {\n return index.value > stepNames.value.indexOf(step);\n }\n return {\n steps: stepsRef,\n stepNames,\n index,\n current,\n next,\n previous,\n isFirst,\n isLast,\n at,\n get,\n goTo,\n goToNext,\n goToPrevious,\n goBackTo,\n isNext,\n isPrevious,\n isCurrent,\n isBefore,\n isAfter\n };\n}\n\nfunction useStorageAsync(key, initialValue, storage, options = {}) {\n var _a;\n const {\n flush = \"pre\",\n deep = true,\n listenToStorageChanges = true,\n writeDefaults = true,\n mergeDefaults = false,\n shallow,\n window = defaultWindow,\n eventFilter,\n onError = (e) => {\n console.error(e);\n }\n } = options;\n const rawInit = toValue(initialValue);\n const type = guessSerializerType(rawInit);\n const data = (shallow ? shallowRef : ref)(initialValue);\n const serializer = (_a = options.serializer) != null ? _a : StorageSerializers[type];\n if (!storage) {\n try {\n storage = getSSRHandler(\"getDefaultStorageAsync\", () => {\n var _a2;\n return (_a2 = defaultWindow) == null ? void 0 : _a2.localStorage;\n })();\n } catch (e) {\n onError(e);\n }\n }\n async function read(event) {\n if (!storage || event && event.key !== key)\n return;\n try {\n const rawValue = event ? event.newValue : await storage.getItem(key);\n if (rawValue == null) {\n data.value = rawInit;\n if (writeDefaults && rawInit !== null)\n await storage.setItem(key, await serializer.write(rawInit));\n } else if (mergeDefaults) {\n const value = await serializer.read(rawValue);\n if (typeof mergeDefaults === \"function\")\n data.value = mergeDefaults(value, rawInit);\n else if (type === \"object\" && !Array.isArray(value))\n data.value = { ...rawInit, ...value };\n else data.value = value;\n } else {\n data.value = await serializer.read(rawValue);\n }\n } catch (e) {\n onError(e);\n }\n }\n read();\n if (window && listenToStorageChanges)\n useEventListener(window, \"storage\", (e) => Promise.resolve().then(() => read(e)));\n if (storage) {\n watchWithFilter(\n data,\n async () => {\n try {\n if (data.value == null)\n await storage.removeItem(key);\n else\n await storage.setItem(key, await serializer.write(data.value));\n } catch (e) {\n onError(e);\n }\n },\n {\n flush,\n deep,\n eventFilter\n }\n );\n }\n return data;\n}\n\nlet _id = 0;\nfunction useStyleTag(css, options = {}) {\n const isLoaded = ref(false);\n const {\n document = defaultDocument,\n immediate = true,\n manual = false,\n id = `vueuse_styletag_${++_id}`\n } = options;\n const cssRef = ref(css);\n let stop = () => {\n };\n const load = () => {\n if (!document)\n return;\n const el = document.getElementById(id) || document.createElement(\"style\");\n if (!el.isConnected) {\n el.id = id;\n if (options.media)\n el.media = options.media;\n document.head.appendChild(el);\n }\n if (isLoaded.value)\n return;\n stop = watch(\n cssRef,\n (value) => {\n el.textContent = value;\n },\n { immediate: true }\n );\n isLoaded.value = true;\n };\n const unload = () => {\n if (!document || !isLoaded.value)\n return;\n stop();\n document.head.removeChild(document.getElementById(id));\n isLoaded.value = false;\n };\n if (immediate && !manual)\n tryOnMounted(load);\n if (!manual)\n tryOnScopeDispose(unload);\n return {\n id,\n css: cssRef,\n unload,\n load,\n isLoaded: readonly(isLoaded)\n };\n}\n\nfunction useSwipe(target, options = {}) {\n const {\n threshold = 50,\n onSwipe,\n onSwipeEnd,\n onSwipeStart,\n passive = true,\n window = defaultWindow\n } = options;\n const coordsStart = reactive({ x: 0, y: 0 });\n const coordsEnd = reactive({ x: 0, y: 0 });\n const diffX = computed(() => coordsStart.x - coordsEnd.x);\n const diffY = computed(() => coordsStart.y - coordsEnd.y);\n const { max, abs } = Math;\n const isThresholdExceeded = computed(() => max(abs(diffX.value), abs(diffY.value)) >= threshold);\n const isSwiping = ref(false);\n const direction = computed(() => {\n if (!isThresholdExceeded.value)\n return \"none\";\n if (abs(diffX.value) > abs(diffY.value)) {\n return diffX.value > 0 ? \"left\" : \"right\";\n } else {\n return diffY.value > 0 ? \"up\" : \"down\";\n }\n });\n const getTouchEventCoords = (e) => [e.touches[0].clientX, e.touches[0].clientY];\n const updateCoordsStart = (x, y) => {\n coordsStart.x = x;\n coordsStart.y = y;\n };\n const updateCoordsEnd = (x, y) => {\n coordsEnd.x = x;\n coordsEnd.y = y;\n };\n let listenerOptions;\n const isPassiveEventSupported = checkPassiveEventSupport(window == null ? void 0 : window.document);\n if (!passive)\n listenerOptions = isPassiveEventSupported ? { passive: false, capture: true } : { capture: true };\n else\n listenerOptions = isPassiveEventSupported ? { passive: true } : { capture: false };\n const onTouchEnd = (e) => {\n if (isSwiping.value)\n onSwipeEnd == null ? void 0 : onSwipeEnd(e, direction.value);\n isSwiping.value = false;\n };\n const stops = [\n useEventListener(target, \"touchstart\", (e) => {\n if (e.touches.length !== 1)\n return;\n if (listenerOptions.capture && !listenerOptions.passive)\n e.preventDefault();\n const [x, y] = getTouchEventCoords(e);\n updateCoordsStart(x, y);\n updateCoordsEnd(x, y);\n onSwipeStart == null ? void 0 : onSwipeStart(e);\n }, listenerOptions),\n useEventListener(target, \"touchmove\", (e) => {\n if (e.touches.length !== 1)\n return;\n const [x, y] = getTouchEventCoords(e);\n updateCoordsEnd(x, y);\n if (!isSwiping.value && isThresholdExceeded.value)\n isSwiping.value = true;\n if (isSwiping.value)\n onSwipe == null ? void 0 : onSwipe(e);\n }, listenerOptions),\n useEventListener(target, [\"touchend\", \"touchcancel\"], onTouchEnd, listenerOptions)\n ];\n const stop = () => stops.forEach((s) => s());\n return {\n isPassiveEventSupported,\n isSwiping,\n direction,\n coordsStart,\n coordsEnd,\n lengthX: diffX,\n lengthY: diffY,\n stop\n };\n}\nfunction checkPassiveEventSupport(document) {\n if (!document)\n return false;\n let supportsPassive = false;\n const optionsBlock = {\n get passive() {\n supportsPassive = true;\n return false;\n }\n };\n document.addEventListener(\"x\", noop, optionsBlock);\n document.removeEventListener(\"x\", noop);\n return supportsPassive;\n}\n\nfunction useTemplateRefsList() {\n const refs = ref([]);\n refs.value.set = (el) => {\n if (el)\n refs.value.push(el);\n };\n onBeforeUpdate(() => {\n refs.value.length = 0;\n });\n return refs;\n}\n\nfunction useTextDirection(options = {}) {\n const {\n document = defaultDocument,\n selector = \"html\",\n observe = false,\n initialValue = \"ltr\"\n } = options;\n function getValue() {\n var _a, _b;\n return (_b = (_a = document == null ? void 0 : document.querySelector(selector)) == null ? void 0 : _a.getAttribute(\"dir\")) != null ? _b : initialValue;\n }\n const dir = ref(getValue());\n tryOnMounted(() => dir.value = getValue());\n if (observe && document) {\n useMutationObserver(\n document.querySelector(selector),\n () => dir.value = getValue(),\n { attributes: true }\n );\n }\n return computed({\n get() {\n return dir.value;\n },\n set(v) {\n var _a, _b;\n dir.value = v;\n if (!document)\n return;\n if (dir.value)\n (_a = document.querySelector(selector)) == null ? void 0 : _a.setAttribute(\"dir\", dir.value);\n else\n (_b = document.querySelector(selector)) == null ? void 0 : _b.removeAttribute(\"dir\");\n }\n });\n}\n\nfunction getRangesFromSelection(selection) {\n var _a;\n const rangeCount = (_a = selection.rangeCount) != null ? _a : 0;\n return Array.from({ length: rangeCount }, (_, i) => selection.getRangeAt(i));\n}\nfunction useTextSelection(options = {}) {\n const {\n window = defaultWindow\n } = options;\n const selection = ref(null);\n const text = computed(() => {\n var _a, _b;\n return (_b = (_a = selection.value) == null ? void 0 : _a.toString()) != null ? _b : \"\";\n });\n const ranges = computed(() => selection.value ? getRangesFromSelection(selection.value) : []);\n const rects = computed(() => ranges.value.map((range) => range.getBoundingClientRect()));\n function onSelectionChange() {\n selection.value = null;\n if (window)\n selection.value = window.getSelection();\n }\n if (window)\n useEventListener(window.document, \"selectionchange\", onSelectionChange);\n return {\n text,\n rects,\n ranges,\n selection\n };\n}\n\nfunction useTextareaAutosize(options) {\n var _a;\n const textarea = ref(options == null ? void 0 : options.element);\n const input = ref(options == null ? void 0 : options.input);\n const styleProp = (_a = options == null ? void 0 : options.styleProp) != null ? _a : \"height\";\n const textareaScrollHeight = ref(1);\n function triggerResize() {\n var _a2;\n if (!textarea.value)\n return;\n let height = \"\";\n textarea.value.style[styleProp] = \"1px\";\n textareaScrollHeight.value = (_a2 = textarea.value) == null ? void 0 : _a2.scrollHeight;\n if (options == null ? void 0 : options.styleTarget)\n toValue(options.styleTarget).style[styleProp] = `${textareaScrollHeight.value}px`;\n else\n height = `${textareaScrollHeight.value}px`;\n textarea.value.style[styleProp] = height;\n }\n watch([input, textarea], () => nextTick(triggerResize), { immediate: true });\n watch(textareaScrollHeight, () => {\n var _a2;\n return (_a2 = options == null ? void 0 : options.onResize) == null ? void 0 : _a2.call(options);\n });\n useResizeObserver(textarea, () => triggerResize());\n if (options == null ? void 0 : options.watch)\n watch(options.watch, triggerResize, { immediate: true, deep: true });\n return {\n textarea,\n input,\n triggerResize\n };\n}\n\nfunction useThrottledRefHistory(source, options = {}) {\n const { throttle = 200, trailing = true } = options;\n const filter = throttleFilter(throttle, trailing);\n const history = useRefHistory(source, { ...options, eventFilter: filter });\n return {\n ...history\n };\n}\n\nconst DEFAULT_UNITS = [\n { max: 6e4, value: 1e3, name: \"second\" },\n { max: 276e4, value: 6e4, name: \"minute\" },\n { max: 72e6, value: 36e5, name: \"hour\" },\n { max: 5184e5, value: 864e5, name: \"day\" },\n { max: 24192e5, value: 6048e5, name: \"week\" },\n { max: 28512e6, value: 2592e6, name: \"month\" },\n { max: Number.POSITIVE_INFINITY, value: 31536e6, name: \"year\" }\n];\nconst DEFAULT_MESSAGES = {\n justNow: \"just now\",\n past: (n) => n.match(/\\d/) ? `${n} ago` : n,\n future: (n) => n.match(/\\d/) ? `in ${n}` : n,\n month: (n, past) => n === 1 ? past ? \"last month\" : \"next month\" : `${n} month${n > 1 ? \"s\" : \"\"}`,\n year: (n, past) => n === 1 ? past ? \"last year\" : \"next year\" : `${n} year${n > 1 ? \"s\" : \"\"}`,\n day: (n, past) => n === 1 ? past ? \"yesterday\" : \"tomorrow\" : `${n} day${n > 1 ? \"s\" : \"\"}`,\n week: (n, past) => n === 1 ? past ? \"last week\" : \"next week\" : `${n} week${n > 1 ? \"s\" : \"\"}`,\n hour: (n) => `${n} hour${n > 1 ? \"s\" : \"\"}`,\n minute: (n) => `${n} minute${n > 1 ? \"s\" : \"\"}`,\n second: (n) => `${n} second${n > 1 ? \"s\" : \"\"}`,\n invalid: \"\"\n};\nfunction DEFAULT_FORMATTER(date) {\n return date.toISOString().slice(0, 10);\n}\nfunction useTimeAgo(time, options = {}) {\n const {\n controls: exposeControls = false,\n updateInterval = 3e4\n } = options;\n const { now, ...controls } = useNow({ interval: updateInterval, controls: true });\n const timeAgo = computed(() => formatTimeAgo(new Date(toValue(time)), options, toValue(now)));\n if (exposeControls) {\n return {\n timeAgo,\n ...controls\n };\n } else {\n return timeAgo;\n }\n}\nfunction formatTimeAgo(from, options = {}, now = Date.now()) {\n var _a;\n const {\n max,\n messages = DEFAULT_MESSAGES,\n fullDateFormatter = DEFAULT_FORMATTER,\n units = DEFAULT_UNITS,\n showSecond = false,\n rounding = \"round\"\n } = options;\n const roundFn = typeof rounding === \"number\" ? (n) => +n.toFixed(rounding) : Math[rounding];\n const diff = +now - +from;\n const absDiff = Math.abs(diff);\n function getValue(diff2, unit) {\n return roundFn(Math.abs(diff2) / unit.value);\n }\n function format(diff2, unit) {\n const val = getValue(diff2, unit);\n const past = diff2 > 0;\n const str = applyFormat(unit.name, val, past);\n return applyFormat(past ? \"past\" : \"future\", str, past);\n }\n function applyFormat(name, val, isPast) {\n const formatter = messages[name];\n if (typeof formatter === \"function\")\n return formatter(val, isPast);\n return formatter.replace(\"{0}\", val.toString());\n }\n if (absDiff < 6e4 && !showSecond)\n return messages.justNow;\n if (typeof max === \"number\" && absDiff > max)\n return fullDateFormatter(new Date(from));\n if (typeof max === \"string\") {\n const unitMax = (_a = units.find((i) => i.name === max)) == null ? void 0 : _a.max;\n if (unitMax && absDiff > unitMax)\n return fullDateFormatter(new Date(from));\n }\n for (const [idx, unit] of units.entries()) {\n const val = getValue(diff, unit);\n if (val <= 0 && units[idx - 1])\n return format(diff, units[idx - 1]);\n if (absDiff < unit.max)\n return format(diff, unit);\n }\n return messages.invalid;\n}\n\nfunction useTimeoutPoll(fn, interval, timeoutPollOptions) {\n const { start } = useTimeoutFn(loop, interval, { immediate: false });\n const isActive = ref(false);\n async function loop() {\n if (!isActive.value)\n return;\n await fn();\n start();\n }\n function resume() {\n if (!isActive.value) {\n isActive.value = true;\n loop();\n }\n }\n function pause() {\n isActive.value = false;\n }\n if (timeoutPollOptions == null ? void 0 : timeoutPollOptions.immediate)\n resume();\n tryOnScopeDispose(pause);\n return {\n isActive,\n pause,\n resume\n };\n}\n\nfunction useTimestamp(options = {}) {\n const {\n controls: exposeControls = false,\n offset = 0,\n immediate = true,\n interval = \"requestAnimationFrame\",\n callback\n } = options;\n const ts = ref(timestamp() + offset);\n const update = () => ts.value = timestamp() + offset;\n const cb = callback ? () => {\n update();\n callback(ts.value);\n } : update;\n const controls = interval === \"requestAnimationFrame\" ? useRafFn(cb, { immediate }) : useIntervalFn(cb, interval, { immediate });\n if (exposeControls) {\n return {\n timestamp: ts,\n ...controls\n };\n } else {\n return ts;\n }\n}\n\nfunction useTitle(newTitle = null, options = {}) {\n var _a, _b, _c;\n const {\n document = defaultDocument,\n restoreOnUnmount = (t) => t\n } = options;\n const originalTitle = (_a = document == null ? void 0 : document.title) != null ? _a : \"\";\n const title = toRef((_b = newTitle != null ? newTitle : document == null ? void 0 : document.title) != null ? _b : null);\n const isReadonly = newTitle && typeof newTitle === \"function\";\n function format(t) {\n if (!(\"titleTemplate\" in options))\n return t;\n const template = options.titleTemplate || \"%s\";\n return typeof template === \"function\" ? template(t) : toValue(template).replace(/%s/g, t);\n }\n watch(\n title,\n (t, o) => {\n if (t !== o && document)\n document.title = format(typeof t === \"string\" ? t : \"\");\n },\n { immediate: true }\n );\n if (options.observe && !options.titleTemplate && document && !isReadonly) {\n useMutationObserver(\n (_c = document.head) == null ? void 0 : _c.querySelector(\"title\"),\n () => {\n if (document && document.title !== title.value)\n title.value = format(document.title);\n },\n { childList: true }\n );\n }\n tryOnBeforeUnmount(() => {\n if (restoreOnUnmount) {\n const restoredTitle = restoreOnUnmount(originalTitle, title.value || \"\");\n if (restoredTitle != null && document)\n document.title = restoredTitle;\n }\n });\n return title;\n}\n\nconst _TransitionPresets = {\n easeInSine: [0.12, 0, 0.39, 0],\n easeOutSine: [0.61, 1, 0.88, 1],\n easeInOutSine: [0.37, 0, 0.63, 1],\n easeInQuad: [0.11, 0, 0.5, 0],\n easeOutQuad: [0.5, 1, 0.89, 1],\n easeInOutQuad: [0.45, 0, 0.55, 1],\n easeInCubic: [0.32, 0, 0.67, 0],\n easeOutCubic: [0.33, 1, 0.68, 1],\n easeInOutCubic: [0.65, 0, 0.35, 1],\n easeInQuart: [0.5, 0, 0.75, 0],\n easeOutQuart: [0.25, 1, 0.5, 1],\n easeInOutQuart: [0.76, 0, 0.24, 1],\n easeInQuint: [0.64, 0, 0.78, 0],\n easeOutQuint: [0.22, 1, 0.36, 1],\n easeInOutQuint: [0.83, 0, 0.17, 1],\n easeInExpo: [0.7, 0, 0.84, 0],\n easeOutExpo: [0.16, 1, 0.3, 1],\n easeInOutExpo: [0.87, 0, 0.13, 1],\n easeInCirc: [0.55, 0, 1, 0.45],\n easeOutCirc: [0, 0.55, 0.45, 1],\n easeInOutCirc: [0.85, 0, 0.15, 1],\n easeInBack: [0.36, 0, 0.66, -0.56],\n easeOutBack: [0.34, 1.56, 0.64, 1],\n easeInOutBack: [0.68, -0.6, 0.32, 1.6]\n};\nconst TransitionPresets = /* @__PURE__ */ Object.assign({}, { linear: identity }, _TransitionPresets);\nfunction createEasingFunction([p0, p1, p2, p3]) {\n const a = (a1, a2) => 1 - 3 * a2 + 3 * a1;\n const b = (a1, a2) => 3 * a2 - 6 * a1;\n const c = (a1) => 3 * a1;\n const calcBezier = (t, a1, a2) => ((a(a1, a2) * t + b(a1, a2)) * t + c(a1)) * t;\n const getSlope = (t, a1, a2) => 3 * a(a1, a2) * t * t + 2 * b(a1, a2) * t + c(a1);\n const getTforX = (x) => {\n let aGuessT = x;\n for (let i = 0; i < 4; ++i) {\n const currentSlope = getSlope(aGuessT, p0, p2);\n if (currentSlope === 0)\n return aGuessT;\n const currentX = calcBezier(aGuessT, p0, p2) - x;\n aGuessT -= currentX / currentSlope;\n }\n return aGuessT;\n };\n return (x) => p0 === p1 && p2 === p3 ? x : calcBezier(getTforX(x), p1, p3);\n}\nfunction lerp(a, b, alpha) {\n return a + alpha * (b - a);\n}\nfunction toVec(t) {\n return (typeof t === \"number\" ? [t] : t) || [];\n}\nfunction executeTransition(source, from, to, options = {}) {\n var _a, _b;\n const fromVal = toValue(from);\n const toVal = toValue(to);\n const v1 = toVec(fromVal);\n const v2 = toVec(toVal);\n const duration = (_a = toValue(options.duration)) != null ? _a : 1e3;\n const startedAt = Date.now();\n const endAt = Date.now() + duration;\n const trans = typeof options.transition === \"function\" ? options.transition : (_b = toValue(options.transition)) != null ? _b : identity;\n const ease = typeof trans === \"function\" ? trans : createEasingFunction(trans);\n return new Promise((resolve) => {\n source.value = fromVal;\n const tick = () => {\n var _a2;\n if ((_a2 = options.abort) == null ? void 0 : _a2.call(options)) {\n resolve();\n return;\n }\n const now = Date.now();\n const alpha = ease((now - startedAt) / duration);\n const arr = toVec(source.value).map((n, i) => lerp(v1[i], v2[i], alpha));\n if (Array.isArray(source.value))\n source.value = arr.map((n, i) => {\n var _a3, _b2;\n return lerp((_a3 = v1[i]) != null ? _a3 : 0, (_b2 = v2[i]) != null ? _b2 : 0, alpha);\n });\n else if (typeof source.value === \"number\")\n source.value = arr[0];\n if (now < endAt) {\n requestAnimationFrame(tick);\n } else {\n source.value = toVal;\n resolve();\n }\n };\n tick();\n });\n}\nfunction useTransition(source, options = {}) {\n let currentId = 0;\n const sourceVal = () => {\n const v = toValue(source);\n return typeof v === \"number\" ? v : v.map(toValue);\n };\n const outputRef = ref(sourceVal());\n watch(sourceVal, async (to) => {\n var _a, _b;\n if (toValue(options.disabled))\n return;\n const id = ++currentId;\n if (options.delay)\n await promiseTimeout(toValue(options.delay));\n if (id !== currentId)\n return;\n const toVal = Array.isArray(to) ? to.map(toValue) : toValue(to);\n (_a = options.onStarted) == null ? void 0 : _a.call(options);\n await executeTransition(outputRef, outputRef.value, toVal, {\n ...options,\n abort: () => {\n var _a2;\n return id !== currentId || ((_a2 = options.abort) == null ? void 0 : _a2.call(options));\n }\n });\n (_b = options.onFinished) == null ? void 0 : _b.call(options);\n }, { deep: true });\n watch(() => toValue(options.disabled), (disabled) => {\n if (disabled) {\n currentId++;\n outputRef.value = sourceVal();\n }\n });\n tryOnScopeDispose(() => {\n currentId++;\n });\n return computed(() => toValue(options.disabled) ? sourceVal() : outputRef.value);\n}\n\nfunction useUrlSearchParams(mode = \"history\", options = {}) {\n const {\n initialValue = {},\n removeNullishValues = true,\n removeFalsyValues = false,\n write: enableWrite = true,\n window = defaultWindow\n } = options;\n if (!window)\n return reactive(initialValue);\n const state = reactive({});\n function getRawParams() {\n if (mode === \"history\") {\n return window.location.search || \"\";\n } else if (mode === \"hash\") {\n const hash = window.location.hash || \"\";\n const index = hash.indexOf(\"?\");\n return index > 0 ? hash.slice(index) : \"\";\n } else {\n return (window.location.hash || \"\").replace(/^#/, \"\");\n }\n }\n function constructQuery(params) {\n const stringified = params.toString();\n if (mode === \"history\")\n return `${stringified ? `?${stringified}` : \"\"}${window.location.hash || \"\"}`;\n if (mode === \"hash-params\")\n return `${window.location.search || \"\"}${stringified ? `#${stringified}` : \"\"}`;\n const hash = window.location.hash || \"#\";\n const index = hash.indexOf(\"?\");\n if (index > 0)\n return `${hash.slice(0, index)}${stringified ? `?${stringified}` : \"\"}`;\n return `${hash}${stringified ? `?${stringified}` : \"\"}`;\n }\n function read() {\n return new URLSearchParams(getRawParams());\n }\n function updateState(params) {\n const unusedKeys = new Set(Object.keys(state));\n for (const key of params.keys()) {\n const paramsForKey = params.getAll(key);\n state[key] = paramsForKey.length > 1 ? paramsForKey : params.get(key) || \"\";\n unusedKeys.delete(key);\n }\n Array.from(unusedKeys).forEach((key) => delete state[key]);\n }\n const { pause, resume } = pausableWatch(\n state,\n () => {\n const params = new URLSearchParams(\"\");\n Object.keys(state).forEach((key) => {\n const mapEntry = state[key];\n if (Array.isArray(mapEntry))\n mapEntry.forEach((value) => params.append(key, value));\n else if (removeNullishValues && mapEntry == null)\n params.delete(key);\n else if (removeFalsyValues && !mapEntry)\n params.delete(key);\n else\n params.set(key, mapEntry);\n });\n write(params);\n },\n { deep: true }\n );\n function write(params, shouldUpdate) {\n pause();\n if (shouldUpdate)\n updateState(params);\n window.history.replaceState(\n window.history.state,\n window.document.title,\n window.location.pathname + constructQuery(params)\n );\n resume();\n }\n function onChanged() {\n if (!enableWrite)\n return;\n write(read(), true);\n }\n useEventListener(window, \"popstate\", onChanged, false);\n if (mode !== \"history\")\n useEventListener(window, \"hashchange\", onChanged, false);\n const initial = read();\n if (initial.keys().next().value)\n updateState(initial);\n else\n Object.assign(state, initialValue);\n return state;\n}\n\nfunction useUserMedia(options = {}) {\n var _a, _b;\n const enabled = ref((_a = options.enabled) != null ? _a : false);\n const autoSwitch = ref((_b = options.autoSwitch) != null ? _b : true);\n const constraints = ref(options.constraints);\n const { navigator = defaultNavigator } = options;\n const isSupported = useSupported(() => {\n var _a2;\n return (_a2 = navigator == null ? void 0 : navigator.mediaDevices) == null ? void 0 : _a2.getUserMedia;\n });\n const stream = shallowRef();\n function getDeviceOptions(type) {\n switch (type) {\n case \"video\": {\n if (constraints.value)\n return constraints.value.video || false;\n break;\n }\n case \"audio\": {\n if (constraints.value)\n return constraints.value.audio || false;\n break;\n }\n }\n }\n async function _start() {\n if (!isSupported.value || stream.value)\n return;\n stream.value = await navigator.mediaDevices.getUserMedia({\n video: getDeviceOptions(\"video\"),\n audio: getDeviceOptions(\"audio\")\n });\n return stream.value;\n }\n function _stop() {\n var _a2;\n (_a2 = stream.value) == null ? void 0 : _a2.getTracks().forEach((t) => t.stop());\n stream.value = void 0;\n }\n function stop() {\n _stop();\n enabled.value = false;\n }\n async function start() {\n await _start();\n if (stream.value)\n enabled.value = true;\n return stream.value;\n }\n async function restart() {\n _stop();\n return await start();\n }\n watch(\n enabled,\n (v) => {\n if (v)\n _start();\n else _stop();\n },\n { immediate: true }\n );\n watch(\n constraints,\n () => {\n if (autoSwitch.value && stream.value)\n restart();\n },\n { immediate: true }\n );\n tryOnScopeDispose(() => {\n stop();\n });\n return {\n isSupported,\n stream,\n start,\n stop,\n restart,\n constraints,\n enabled,\n autoSwitch\n };\n}\n\nfunction useVModel(props, key, emit, options = {}) {\n var _a, _b, _c, _d, _e;\n const {\n clone = false,\n passive = false,\n eventName,\n deep = false,\n defaultValue,\n shouldEmit\n } = options;\n const vm = getCurrentInstance();\n const _emit = emit || (vm == null ? void 0 : vm.emit) || ((_a = vm == null ? void 0 : vm.$emit) == null ? void 0 : _a.bind(vm)) || ((_c = (_b = vm == null ? void 0 : vm.proxy) == null ? void 0 : _b.$emit) == null ? void 0 : _c.bind(vm == null ? void 0 : vm.proxy));\n let event = eventName;\n if (!key) {\n if (isVue2) {\n const modelOptions = (_e = (_d = vm == null ? void 0 : vm.proxy) == null ? void 0 : _d.$options) == null ? void 0 : _e.model;\n key = (modelOptions == null ? void 0 : modelOptions.value) || \"value\";\n if (!eventName)\n event = (modelOptions == null ? void 0 : modelOptions.event) || \"input\";\n } else {\n key = \"modelValue\";\n }\n }\n event = event || `update:${key.toString()}`;\n const cloneFn = (val) => !clone ? val : typeof clone === \"function\" ? clone(val) : cloneFnJSON(val);\n const getValue = () => isDef(props[key]) ? cloneFn(props[key]) : defaultValue;\n const triggerEmit = (value) => {\n if (shouldEmit) {\n if (shouldEmit(value))\n _emit(event, value);\n } else {\n _emit(event, value);\n }\n };\n if (passive) {\n const initialValue = getValue();\n const proxy = ref(initialValue);\n let isUpdating = false;\n watch(\n () => props[key],\n (v) => {\n if (!isUpdating) {\n isUpdating = true;\n proxy.value = cloneFn(v);\n nextTick(() => isUpdating = false);\n }\n }\n );\n watch(\n proxy,\n (v) => {\n if (!isUpdating && (v !== props[key] || deep))\n triggerEmit(v);\n },\n { deep }\n );\n return proxy;\n } else {\n return computed({\n get() {\n return getValue();\n },\n set(value) {\n triggerEmit(value);\n }\n });\n }\n}\n\nfunction useVModels(props, emit, options = {}) {\n const ret = {};\n for (const key in props) {\n ret[key] = useVModel(\n props,\n key,\n emit,\n options\n );\n }\n return ret;\n}\n\nfunction useVibrate(options) {\n const {\n pattern = [],\n interval = 0,\n navigator = defaultNavigator\n } = options || {};\n const isSupported = useSupported(() => typeof navigator !== \"undefined\" && \"vibrate\" in navigator);\n const patternRef = toRef(pattern);\n let intervalControls;\n const vibrate = (pattern2 = patternRef.value) => {\n if (isSupported.value)\n navigator.vibrate(pattern2);\n };\n const stop = () => {\n if (isSupported.value)\n navigator.vibrate(0);\n intervalControls == null ? void 0 : intervalControls.pause();\n };\n if (interval > 0) {\n intervalControls = useIntervalFn(\n vibrate,\n interval,\n {\n immediate: false,\n immediateCallback: false\n }\n );\n }\n return {\n isSupported,\n pattern,\n intervalControls,\n vibrate,\n stop\n };\n}\n\nfunction useVirtualList(list, options) {\n const { containerStyle, wrapperProps, scrollTo, calculateRange, currentList, containerRef } = \"itemHeight\" in options ? useVerticalVirtualList(options, list) : useHorizontalVirtualList(options, list);\n return {\n list: currentList,\n scrollTo,\n containerProps: {\n ref: containerRef,\n onScroll: () => {\n calculateRange();\n },\n style: containerStyle\n },\n wrapperProps\n };\n}\nfunction useVirtualListResources(list) {\n const containerRef = ref(null);\n const size = useElementSize(containerRef);\n const currentList = ref([]);\n const source = shallowRef(list);\n const state = ref({ start: 0, end: 10 });\n return { state, source, currentList, size, containerRef };\n}\nfunction createGetViewCapacity(state, source, itemSize) {\n return (containerSize) => {\n if (typeof itemSize === \"number\")\n return Math.ceil(containerSize / itemSize);\n const { start = 0 } = state.value;\n let sum = 0;\n let capacity = 0;\n for (let i = start; i < source.value.length; i++) {\n const size = itemSize(i);\n sum += size;\n capacity = i;\n if (sum > containerSize)\n break;\n }\n return capacity - start;\n };\n}\nfunction createGetOffset(source, itemSize) {\n return (scrollDirection) => {\n if (typeof itemSize === \"number\")\n return Math.floor(scrollDirection / itemSize) + 1;\n let sum = 0;\n let offset = 0;\n for (let i = 0; i < source.value.length; i++) {\n const size = itemSize(i);\n sum += size;\n if (sum >= scrollDirection) {\n offset = i;\n break;\n }\n }\n return offset + 1;\n };\n}\nfunction createCalculateRange(type, overscan, getOffset, getViewCapacity, { containerRef, state, currentList, source }) {\n return () => {\n const element = containerRef.value;\n if (element) {\n const offset = getOffset(type === \"vertical\" ? element.scrollTop : element.scrollLeft);\n const viewCapacity = getViewCapacity(type === \"vertical\" ? element.clientHeight : element.clientWidth);\n const from = offset - overscan;\n const to = offset + viewCapacity + overscan;\n state.value = {\n start: from < 0 ? 0 : from,\n end: to > source.value.length ? source.value.length : to\n };\n currentList.value = source.value.slice(state.value.start, state.value.end).map((ele, index) => ({\n data: ele,\n index: index + state.value.start\n }));\n }\n };\n}\nfunction createGetDistance(itemSize, source) {\n return (index) => {\n if (typeof itemSize === \"number\") {\n const size2 = index * itemSize;\n return size2;\n }\n const size = source.value.slice(0, index).reduce((sum, _, i) => sum + itemSize(i), 0);\n return size;\n };\n}\nfunction useWatchForSizes(size, list, containerRef, calculateRange) {\n watch([size.width, size.height, list, containerRef], () => {\n calculateRange();\n });\n}\nfunction createComputedTotalSize(itemSize, source) {\n return computed(() => {\n if (typeof itemSize === \"number\")\n return source.value.length * itemSize;\n return source.value.reduce((sum, _, index) => sum + itemSize(index), 0);\n });\n}\nconst scrollToDictionaryForElementScrollKey = {\n horizontal: \"scrollLeft\",\n vertical: \"scrollTop\"\n};\nfunction createScrollTo(type, calculateRange, getDistance, containerRef) {\n return (index) => {\n if (containerRef.value) {\n containerRef.value[scrollToDictionaryForElementScrollKey[type]] = getDistance(index);\n calculateRange();\n }\n };\n}\nfunction useHorizontalVirtualList(options, list) {\n const resources = useVirtualListResources(list);\n const { state, source, currentList, size, containerRef } = resources;\n const containerStyle = { overflowX: \"auto\" };\n const { itemWidth, overscan = 5 } = options;\n const getViewCapacity = createGetViewCapacity(state, source, itemWidth);\n const getOffset = createGetOffset(source, itemWidth);\n const calculateRange = createCalculateRange(\"horizontal\", overscan, getOffset, getViewCapacity, resources);\n const getDistanceLeft = createGetDistance(itemWidth, source);\n const offsetLeft = computed(() => getDistanceLeft(state.value.start));\n const totalWidth = createComputedTotalSize(itemWidth, source);\n useWatchForSizes(size, list, containerRef, calculateRange);\n const scrollTo = createScrollTo(\"horizontal\", calculateRange, getDistanceLeft, containerRef);\n const wrapperProps = computed(() => {\n return {\n style: {\n height: \"100%\",\n width: `${totalWidth.value - offsetLeft.value}px`,\n marginLeft: `${offsetLeft.value}px`,\n display: \"flex\"\n }\n };\n });\n return {\n scrollTo,\n calculateRange,\n wrapperProps,\n containerStyle,\n currentList,\n containerRef\n };\n}\nfunction useVerticalVirtualList(options, list) {\n const resources = useVirtualListResources(list);\n const { state, source, currentList, size, containerRef } = resources;\n const containerStyle = { overflowY: \"auto\" };\n const { itemHeight, overscan = 5 } = options;\n const getViewCapacity = createGetViewCapacity(state, source, itemHeight);\n const getOffset = createGetOffset(source, itemHeight);\n const calculateRange = createCalculateRange(\"vertical\", overscan, getOffset, getViewCapacity, resources);\n const getDistanceTop = createGetDistance(itemHeight, source);\n const offsetTop = computed(() => getDistanceTop(state.value.start));\n const totalHeight = createComputedTotalSize(itemHeight, source);\n useWatchForSizes(size, list, containerRef, calculateRange);\n const scrollTo = createScrollTo(\"vertical\", calculateRange, getDistanceTop, containerRef);\n const wrapperProps = computed(() => {\n return {\n style: {\n width: \"100%\",\n height: `${totalHeight.value - offsetTop.value}px`,\n marginTop: `${offsetTop.value}px`\n }\n };\n });\n return {\n calculateRange,\n scrollTo,\n containerStyle,\n wrapperProps,\n currentList,\n containerRef\n };\n}\n\nfunction useWakeLock(options = {}) {\n const {\n navigator = defaultNavigator,\n document = defaultDocument\n } = options;\n let wakeLock;\n const isSupported = useSupported(() => navigator && \"wakeLock\" in navigator);\n const isActive = ref(false);\n async function onVisibilityChange() {\n if (!isSupported.value || !wakeLock)\n return;\n if (document && document.visibilityState === \"visible\")\n wakeLock = await navigator.wakeLock.request(\"screen\");\n isActive.value = !wakeLock.released;\n }\n if (document)\n useEventListener(document, \"visibilitychange\", onVisibilityChange, { passive: true });\n async function request(type) {\n if (!isSupported.value)\n return;\n wakeLock = await navigator.wakeLock.request(type);\n isActive.value = !wakeLock.released;\n }\n async function release() {\n if (!isSupported.value || !wakeLock)\n return;\n await wakeLock.release();\n isActive.value = !wakeLock.released;\n wakeLock = null;\n }\n return {\n isSupported,\n isActive,\n request,\n release\n };\n}\n\nfunction useWebNotification(options = {}) {\n const {\n window = defaultWindow,\n requestPermissions: _requestForPermissions = true\n } = options;\n const defaultWebNotificationOptions = options;\n const isSupported = useSupported(() => {\n if (!window || !(\"Notification\" in window))\n return false;\n try {\n new Notification(\"\");\n } catch (e) {\n return false;\n }\n return true;\n });\n const permissionGranted = ref(isSupported.value && \"permission\" in Notification && Notification.permission === \"granted\");\n const notification = ref(null);\n const ensurePermissions = async () => {\n if (!isSupported.value)\n return;\n if (!permissionGranted.value && Notification.permission !== \"denied\") {\n const result = await Notification.requestPermission();\n if (result === \"granted\")\n permissionGranted.value = true;\n }\n return permissionGranted.value;\n };\n const { on: onClick, trigger: clickTrigger } = createEventHook();\n const { on: onShow, trigger: showTrigger } = createEventHook();\n const { on: onError, trigger: errorTrigger } = createEventHook();\n const { on: onClose, trigger: closeTrigger } = createEventHook();\n const show = async (overrides) => {\n if (!isSupported.value || !permissionGranted.value)\n return;\n const options2 = Object.assign({}, defaultWebNotificationOptions, overrides);\n notification.value = new Notification(options2.title || \"\", options2);\n notification.value.onclick = clickTrigger;\n notification.value.onshow = showTrigger;\n notification.value.onerror = errorTrigger;\n notification.value.onclose = closeTrigger;\n return notification.value;\n };\n const close = () => {\n if (notification.value)\n notification.value.close();\n notification.value = null;\n };\n if (_requestForPermissions)\n tryOnMounted(ensurePermissions);\n tryOnScopeDispose(close);\n if (isSupported.value && window) {\n const document = window.document;\n useEventListener(document, \"visibilitychange\", (e) => {\n e.preventDefault();\n if (document.visibilityState === \"visible\") {\n close();\n }\n });\n }\n return {\n isSupported,\n notification,\n ensurePermissions,\n permissionGranted,\n show,\n close,\n onClick,\n onShow,\n onError,\n onClose\n };\n}\n\nconst DEFAULT_PING_MESSAGE = \"ping\";\nfunction resolveNestedOptions(options) {\n if (options === true)\n return {};\n return options;\n}\nfunction useWebSocket(url, options = {}) {\n const {\n onConnected,\n onDisconnected,\n onError,\n onMessage,\n immediate = true,\n autoClose = true,\n protocols = []\n } = options;\n const data = ref(null);\n const status = ref(\"CLOSED\");\n const wsRef = ref();\n const urlRef = toRef(url);\n let heartbeatPause;\n let heartbeatResume;\n let explicitlyClosed = false;\n let retried = 0;\n let bufferedData = [];\n let pongTimeoutWait;\n const _sendBuffer = () => {\n if (bufferedData.length && wsRef.value && status.value === \"OPEN\") {\n for (const buffer of bufferedData)\n wsRef.value.send(buffer);\n bufferedData = [];\n }\n };\n const resetHeartbeat = () => {\n clearTimeout(pongTimeoutWait);\n pongTimeoutWait = void 0;\n };\n const close = (code = 1e3, reason) => {\n if (!isClient || !wsRef.value)\n return;\n explicitlyClosed = true;\n resetHeartbeat();\n heartbeatPause == null ? void 0 : heartbeatPause();\n wsRef.value.close(code, reason);\n wsRef.value = void 0;\n };\n const send = (data2, useBuffer = true) => {\n if (!wsRef.value || status.value !== \"OPEN\") {\n if (useBuffer)\n bufferedData.push(data2);\n return false;\n }\n _sendBuffer();\n wsRef.value.send(data2);\n return true;\n };\n const _init = () => {\n if (explicitlyClosed || typeof urlRef.value === \"undefined\")\n return;\n const ws = new WebSocket(urlRef.value, protocols);\n wsRef.value = ws;\n status.value = \"CONNECTING\";\n ws.onopen = () => {\n status.value = \"OPEN\";\n onConnected == null ? void 0 : onConnected(ws);\n heartbeatResume == null ? void 0 : heartbeatResume();\n _sendBuffer();\n };\n ws.onclose = (ev) => {\n status.value = \"CLOSED\";\n onDisconnected == null ? void 0 : onDisconnected(ws, ev);\n if (!explicitlyClosed && options.autoReconnect) {\n const {\n retries = -1,\n delay = 1e3,\n onFailed\n } = resolveNestedOptions(options.autoReconnect);\n retried += 1;\n if (typeof retries === \"number\" && (retries < 0 || retried < retries))\n setTimeout(_init, delay);\n else if (typeof retries === \"function\" && retries())\n setTimeout(_init, delay);\n else\n onFailed == null ? void 0 : onFailed();\n }\n };\n ws.onerror = (e) => {\n onError == null ? void 0 : onError(ws, e);\n };\n ws.onmessage = (e) => {\n if (options.heartbeat) {\n resetHeartbeat();\n const {\n message = DEFAULT_PING_MESSAGE\n } = resolveNestedOptions(options.heartbeat);\n if (e.data === message)\n return;\n }\n data.value = e.data;\n onMessage == null ? void 0 : onMessage(ws, e);\n };\n };\n if (options.heartbeat) {\n const {\n message = DEFAULT_PING_MESSAGE,\n interval = 1e3,\n pongTimeout = 1e3\n } = resolveNestedOptions(options.heartbeat);\n const { pause, resume } = useIntervalFn(\n () => {\n send(message, false);\n if (pongTimeoutWait != null)\n return;\n pongTimeoutWait = setTimeout(() => {\n close();\n explicitlyClosed = false;\n }, pongTimeout);\n },\n interval,\n { immediate: false }\n );\n heartbeatPause = pause;\n heartbeatResume = resume;\n }\n if (autoClose) {\n if (isClient)\n useEventListener(\"beforeunload\", () => close());\n tryOnScopeDispose(close);\n }\n const open = () => {\n if (!isClient && !isWorker)\n return;\n close();\n explicitlyClosed = false;\n retried = 0;\n _init();\n };\n if (immediate)\n open();\n watch(urlRef, open);\n return {\n data,\n status,\n close,\n send,\n open,\n ws: wsRef\n };\n}\n\nfunction useWebWorker(arg0, workerOptions, options) {\n const {\n window = defaultWindow\n } = options != null ? options : {};\n const data = ref(null);\n const worker = shallowRef();\n const post = (...args) => {\n if (!worker.value)\n return;\n worker.value.postMessage(...args);\n };\n const terminate = function terminate2() {\n if (!worker.value)\n return;\n worker.value.terminate();\n };\n if (window) {\n if (typeof arg0 === \"string\")\n worker.value = new Worker(arg0, workerOptions);\n else if (typeof arg0 === \"function\")\n worker.value = arg0();\n else\n worker.value = arg0;\n worker.value.onmessage = (e) => {\n data.value = e.data;\n };\n tryOnScopeDispose(() => {\n if (worker.value)\n worker.value.terminate();\n });\n }\n return {\n data,\n post,\n terminate,\n worker\n };\n}\n\nfunction jobRunner(userFunc) {\n return (e) => {\n const userFuncArgs = e.data[0];\n return Promise.resolve(userFunc.apply(void 0, userFuncArgs)).then((result) => {\n postMessage([\"SUCCESS\", result]);\n }).catch((error) => {\n postMessage([\"ERROR\", error]);\n });\n };\n}\n\nfunction depsParser(deps, localDeps) {\n if (deps.length === 0 && localDeps.length === 0)\n return \"\";\n const depsString = deps.map((dep) => `'${dep}'`).toString();\n const depsFunctionString = localDeps.filter((dep) => typeof dep === \"function\").map((fn) => {\n const str = fn.toString();\n if (str.trim().startsWith(\"function\")) {\n return str;\n } else {\n const name = fn.name;\n return `const ${name} = ${str}`;\n }\n }).join(\";\");\n const importString = `importScripts(${depsString});`;\n return `${depsString.trim() === \"\" ? \"\" : importString} ${depsFunctionString}`;\n}\n\nfunction createWorkerBlobUrl(fn, deps, localDeps) {\n const blobCode = `${depsParser(deps, localDeps)}; onmessage=(${jobRunner})(${fn})`;\n const blob = new Blob([blobCode], { type: \"text/javascript\" });\n const url = URL.createObjectURL(blob);\n return url;\n}\n\nfunction useWebWorkerFn(fn, options = {}) {\n const {\n dependencies = [],\n localDependencies = [],\n timeout,\n window = defaultWindow\n } = options;\n const worker = ref();\n const workerStatus = ref(\"PENDING\");\n const promise = ref({});\n const timeoutId = ref();\n const workerTerminate = (status = \"PENDING\") => {\n if (worker.value && worker.value._url && window) {\n worker.value.terminate();\n URL.revokeObjectURL(worker.value._url);\n promise.value = {};\n worker.value = void 0;\n window.clearTimeout(timeoutId.value);\n workerStatus.value = status;\n }\n };\n workerTerminate();\n tryOnScopeDispose(workerTerminate);\n const generateWorker = () => {\n const blobUrl = createWorkerBlobUrl(fn, dependencies, localDependencies);\n const newWorker = new Worker(blobUrl);\n newWorker._url = blobUrl;\n newWorker.onmessage = (e) => {\n const { resolve = () => {\n }, reject = () => {\n } } = promise.value;\n const [status, result] = e.data;\n switch (status) {\n case \"SUCCESS\":\n resolve(result);\n workerTerminate(status);\n break;\n default:\n reject(result);\n workerTerminate(\"ERROR\");\n break;\n }\n };\n newWorker.onerror = (e) => {\n const { reject = () => {\n } } = promise.value;\n e.preventDefault();\n reject(e);\n workerTerminate(\"ERROR\");\n };\n if (timeout) {\n timeoutId.value = setTimeout(\n () => workerTerminate(\"TIMEOUT_EXPIRED\"),\n timeout\n );\n }\n return newWorker;\n };\n const callWorker = (...fnArgs) => new Promise((resolve, reject) => {\n promise.value = {\n resolve,\n reject\n };\n worker.value && worker.value.postMessage([[...fnArgs]]);\n workerStatus.value = \"RUNNING\";\n });\n const workerFn = (...fnArgs) => {\n if (workerStatus.value === \"RUNNING\") {\n console.error(\n \"[useWebWorkerFn] You can only run one instance of the worker at a time.\"\n );\n return Promise.reject();\n }\n worker.value = generateWorker();\n return callWorker(...fnArgs);\n };\n return {\n workerFn,\n workerStatus,\n workerTerminate\n };\n}\n\nfunction useWindowFocus(options = {}) {\n const { window = defaultWindow } = options;\n if (!window)\n return ref(false);\n const focused = ref(window.document.hasFocus());\n useEventListener(window, \"blur\", () => {\n focused.value = false;\n });\n useEventListener(window, \"focus\", () => {\n focused.value = true;\n });\n return focused;\n}\n\nfunction useWindowScroll(options = {}) {\n const { window = defaultWindow, behavior = \"auto\" } = options;\n if (!window) {\n return {\n x: ref(0),\n y: ref(0)\n };\n }\n const internalX = ref(window.scrollX);\n const internalY = ref(window.scrollY);\n const x = computed({\n get() {\n return internalX.value;\n },\n set(x2) {\n scrollTo({ left: x2, behavior });\n }\n });\n const y = computed({\n get() {\n return internalY.value;\n },\n set(y2) {\n scrollTo({ top: y2, behavior });\n }\n });\n useEventListener(\n window,\n \"scroll\",\n () => {\n internalX.value = window.scrollX;\n internalY.value = window.scrollY;\n },\n {\n capture: false,\n passive: true\n }\n );\n return { x, y };\n}\n\nfunction useWindowSize(options = {}) {\n const {\n window = defaultWindow,\n initialWidth = Number.POSITIVE_INFINITY,\n initialHeight = Number.POSITIVE_INFINITY,\n listenOrientation = true,\n includeScrollbar = true\n } = options;\n const width = ref(initialWidth);\n const height = ref(initialHeight);\n const update = () => {\n if (window) {\n if (includeScrollbar) {\n width.value = window.innerWidth;\n height.value = window.innerHeight;\n } else {\n width.value = window.document.documentElement.clientWidth;\n height.value = window.document.documentElement.clientHeight;\n }\n }\n };\n update();\n tryOnMounted(update);\n useEventListener(\"resize\", update, { passive: true });\n if (listenOrientation) {\n const matches = useMediaQuery(\"(orientation: portrait)\");\n watch(matches, () => update());\n }\n return { width, height };\n}\n\nexport { DefaultMagicKeysAliasMap, StorageSerializers, TransitionPresets, computedAsync as asyncComputed, breakpointsAntDesign, breakpointsBootstrapV5, breakpointsMasterCss, breakpointsPrimeFlex, breakpointsQuasar, breakpointsSematic, breakpointsTailwind, breakpointsVuetify, breakpointsVuetifyV2, breakpointsVuetifyV3, cloneFnJSON, computedAsync, computedInject, createFetch, createReusableTemplate, createTemplatePromise, createUnrefFn, customStorageEventName, defaultDocument, defaultLocation, defaultNavigator, defaultWindow, executeTransition, formatTimeAgo, getSSRHandler, mapGamepadToXbox360Controller, onClickOutside, onKeyDown, onKeyPressed, onKeyStroke, onKeyUp, onLongPress, onStartTyping, setSSRHandler, templateRef, unrefElement, useActiveElement, useAnimate, useAsyncQueue, useAsyncState, useBase64, useBattery, useBluetooth, useBreakpoints, useBroadcastChannel, useBrowserLocation, useCached, useClipboard, useClipboardItems, useCloned, useColorMode, useConfirmDialog, 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, usePrevious, useRafFn, useRefHistory, useResizeObserver, useScreenOrientation, useScreenSafeArea, useScriptTag, useScroll, useScrollLock, useSessionStorage, useShare, useSorted, useSpeechRecognition, useSpeechSynthesis, useStepper, useStorage, useStorageAsync, useStyleTag, useSupported, useSwipe, useTemplateRefsList, useTextDirection, useTextSelection, useTextareaAutosize, useThrottledRefHistory, useTimeAgo, useTimeoutPoll, useTimestamp, useTitle, useTransition, useUrlSearchParams, useUserMedia, useVModel, useVModels, useVibrate, useVirtualList, useWakeLock, useWebNotification, useWebSocket, useWebWorker, useWebWorkerFn, useWindowFocus, useWindowScroll, useWindowSize };\n"], - "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAQA,IAAI,SAAS;AACb,IAAI,SAAS;AAKN,SAAS,IAAI,QAAQ,KAAK,KAAK;AACpC,MAAI,MAAM,QAAQ,MAAM,GAAG;AACzB,WAAO,SAAS,KAAK,IAAI,OAAO,QAAQ,GAAG;AAC3C,WAAO,OAAO,KAAK,GAAG,GAAG;AACzB,WAAO;AAAA,EACT;AACA,SAAO,GAAG,IAAI;AACd,SAAO;AACT;AAEO,SAAS,IAAI,QAAQ,KAAK;AAC/B,MAAI,MAAM,QAAQ,MAAM,GAAG;AACzB,WAAO,OAAO,KAAK,CAAC;AACpB;AAAA,EACF;AACA,SAAO,OAAO,GAAG;AACnB;;;AC5BA,SAAS,cAAc,IAAI,SAAS;AAClC,MAAI;AACJ,QAAM,SAAS,WAAW;AAC1B,cAAY,MAAM;AAChB,WAAO,QAAQ,GAAG;AAAA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B,gBAAgB,OAAO;AAAA,IACvB,oBAAoB;AAAA,IACpB,mBAAmB;AAAA,EACrB,IAAI;AACJ,QAAM,QAAQ,IAAI,YAAY;AAC9B,QAAM,SAAS,IAAI,aAAa;AAChC,QAAM,SAAS,MAAM;AACnB,QAAIA,SAAQ;AACV,UAAI,kBAAkB;AACpB,cAAM,QAAQA,QAAO;AACrB,eAAO,QAAQA,QAAO;AAAA,MACxB,OAAO;AACL,cAAM,QAAQA,QAAO,SAAS,gBAAgB;AAC9C,eAAO,QAAQA,QAAO,SAAS,gBAAgB;AAAA,MACjD;AAAA,IACF;AAAA,EACF;AACA,SAAO;AACP,eAAa,MAAM;AACnB,mBAAiB,UAAU,QAAQ,EAAE,SAAS,KAAK,CAAC;AACpD,MAAI,mBAAmB;AACrB,UAAM,UAAU,cAAc,yBAAyB;AACvD,UAAM,SAAS,MAAM,OAAO,CAAC;AAAA,EAC/B;AACA,SAAO,EAAE,OAAO,OAAO;AACzB;", - "names": ["get", "set", "ref", "keys", "invoke", "toRef", "toRefs", "events", "window", "document", "timestamp", "getValue", "defaults", "toRef", "set", "onUpdated", "preventDefault", "toRefs", "now", "scrollTo", "keys", "get", "isReadonly"] -} diff --git a/docs/.vitepress/cache/deps/chunk-BJ3OZQ3N.js b/docs/.vitepress/cache/deps/chunk-BJ3OZQ3N.js deleted file mode 100644 index d9c17b1d5..000000000 --- a/docs/.vitepress/cache/deps/chunk-BJ3OZQ3N.js +++ /dev/null @@ -1,11451 +0,0 @@ -// node_modules/@vue/shared/dist/shared.esm-bundler.js -function makeMap(str, expectsLowerCase) { - const set2 = new Set(str.split(",")); - return expectsLowerCase ? (val) => set2.has(val.toLowerCase()) : (val) => set2.has(val); -} -var EMPTY_OBJ = true ? Object.freeze({}) : {}; -var EMPTY_ARR = true ? Object.freeze([]) : []; -var NOOP = () => { -}; -var NO = () => false; -var isOn = (key) => key.charCodeAt(0) === 111 && key.charCodeAt(1) === 110 && // uppercase letter -(key.charCodeAt(2) > 122 || key.charCodeAt(2) < 97); -var isModelListener = (key) => key.startsWith("onUpdate:"); -var extend = Object.assign; -var remove = (arr, el) => { - const i = arr.indexOf(el); - if (i > -1) { - arr.splice(i, 1); - } -}; -var hasOwnProperty = Object.prototype.hasOwnProperty; -var hasOwn = (val, key) => hasOwnProperty.call(val, key); -var isArray = Array.isArray; -var isMap = (val) => toTypeString(val) === "[object Map]"; -var isSet = (val) => toTypeString(val) === "[object Set]"; -var isDate = (val) => toTypeString(val) === "[object Date]"; -var isRegExp = (val) => toTypeString(val) === "[object RegExp]"; -var isFunction = (val) => typeof val === "function"; -var isString = (val) => typeof val === "string"; -var isSymbol = (val) => typeof val === "symbol"; -var isObject = (val) => val !== null && typeof val === "object"; -var isPromise = (val) => { - return (isObject(val) || isFunction(val)) && isFunction(val.then) && isFunction(val.catch); -}; -var objectToString = Object.prototype.toString; -var toTypeString = (value) => objectToString.call(value); -var toRawType = (value) => { - return toTypeString(value).slice(8, -1); -}; -var isPlainObject = (val) => toTypeString(val) === "[object Object]"; -var isIntegerKey = (key) => isString(key) && key !== "NaN" && key[0] !== "-" && "" + parseInt(key, 10) === key; -var isReservedProp = makeMap( - // the leading comma is intentional so empty string "" is also included - ",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted" -); -var isBuiltInDirective = makeMap( - "bind,cloak,else-if,else,for,html,if,model,on,once,pre,show,slot,text,memo" -); -var cacheStringFunction = (fn) => { - const cache = /* @__PURE__ */ Object.create(null); - return (str) => { - const hit = cache[str]; - return hit || (cache[str] = fn(str)); - }; -}; -var camelizeRE = /-(\w)/g; -var camelize = cacheStringFunction((str) => { - return str.replace(camelizeRE, (_, c) => c ? c.toUpperCase() : ""); -}); -var hyphenateRE = /\B([A-Z])/g; -var hyphenate = cacheStringFunction( - (str) => str.replace(hyphenateRE, "-$1").toLowerCase() -); -var capitalize = cacheStringFunction((str) => { - return str.charAt(0).toUpperCase() + str.slice(1); -}); -var toHandlerKey = cacheStringFunction((str) => { - const s = str ? `on${capitalize(str)}` : ``; - return s; -}); -var hasChanged = (value, oldValue) => !Object.is(value, oldValue); -var invokeArrayFns = (fns, ...arg) => { - for (let i = 0; i < fns.length; i++) { - fns[i](...arg); - } -}; -var def = (obj, key, value, writable = false) => { - Object.defineProperty(obj, key, { - configurable: true, - enumerable: false, - writable, - value - }); -}; -var looseToNumber = (val) => { - const n = parseFloat(val); - return isNaN(n) ? val : n; -}; -var toNumber = (val) => { - const n = isString(val) ? Number(val) : NaN; - return isNaN(n) ? val : n; -}; -var _globalThis; -var getGlobalThis = () => { - return _globalThis || (_globalThis = typeof globalThis !== "undefined" ? globalThis : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : {}); -}; -var GLOBALS_ALLOWED = "Infinity,undefined,NaN,isFinite,isNaN,parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,BigInt,console,Error"; -var isGloballyAllowed = makeMap(GLOBALS_ALLOWED); -function normalizeStyle(value) { - if (isArray(value)) { - const res = {}; - for (let i = 0; i < value.length; i++) { - const item = value[i]; - const normalized = isString(item) ? parseStringStyle(item) : normalizeStyle(item); - if (normalized) { - for (const key in normalized) { - res[key] = normalized[key]; - } - } - } - return res; - } else if (isString(value) || isObject(value)) { - return value; - } -} -var listDelimiterRE = /;(?![^(]*\))/g; -var propertyDelimiterRE = /:([^]+)/; -var styleCommentRE = /\/\*[^]*?\*\//g; -function parseStringStyle(cssText) { - const ret = {}; - cssText.replace(styleCommentRE, "").split(listDelimiterRE).forEach((item) => { - if (item) { - const tmp = item.split(propertyDelimiterRE); - tmp.length > 1 && (ret[tmp[0].trim()] = tmp[1].trim()); - } - }); - return ret; -} -function stringifyStyle(styles) { - let ret = ""; - if (!styles || isString(styles)) { - return ret; - } - for (const key in styles) { - const value = styles[key]; - if (isString(value) || typeof value === "number") { - const normalizedKey = key.startsWith(`--`) ? key : hyphenate(key); - ret += `${normalizedKey}:${value};`; - } - } - return ret; -} -function normalizeClass(value) { - let res = ""; - if (isString(value)) { - res = value; - } else if (isArray(value)) { - for (let i = 0; i < value.length; i++) { - const normalized = normalizeClass(value[i]); - if (normalized) { - res += normalized + " "; - } - } - } else if (isObject(value)) { - for (const name in value) { - if (value[name]) { - res += name + " "; - } - } - } - return res.trim(); -} -function normalizeProps(props) { - if (!props) return null; - let { class: klass, style } = props; - if (klass && !isString(klass)) { - props.class = normalizeClass(klass); - } - if (style) { - props.style = normalizeStyle(style); - } - return props; -} -var HTML_TAGS = "html,body,base,head,link,meta,style,title,address,article,aside,footer,header,hgroup,h1,h2,h3,h4,h5,h6,nav,section,div,dd,dl,dt,figcaption,figure,picture,hr,img,li,main,ol,p,pre,ul,a,b,abbr,bdi,bdo,br,cite,code,data,dfn,em,i,kbd,mark,q,rp,rt,ruby,s,samp,small,span,strong,sub,sup,time,u,var,wbr,area,audio,map,track,video,embed,object,param,source,canvas,script,noscript,del,ins,caption,col,colgroup,table,thead,tbody,td,th,tr,button,datalist,fieldset,form,input,label,legend,meter,optgroup,option,output,progress,select,textarea,details,dialog,menu,summary,template,blockquote,iframe,tfoot"; -var SVG_TAGS = "svg,animate,animateMotion,animateTransform,circle,clipPath,color-profile,defs,desc,discard,ellipse,feBlend,feColorMatrix,feComponentTransfer,feComposite,feConvolveMatrix,feDiffuseLighting,feDisplacementMap,feDistantLight,feDropShadow,feFlood,feFuncA,feFuncB,feFuncG,feFuncR,feGaussianBlur,feImage,feMerge,feMergeNode,feMorphology,feOffset,fePointLight,feSpecularLighting,feSpotLight,feTile,feTurbulence,filter,foreignObject,g,hatch,hatchpath,image,line,linearGradient,marker,mask,mesh,meshgradient,meshpatch,meshrow,metadata,mpath,path,pattern,polygon,polyline,radialGradient,rect,set,solidcolor,stop,switch,symbol,text,textPath,title,tspan,unknown,use,view"; -var MATH_TAGS = "annotation,annotation-xml,maction,maligngroup,malignmark,math,menclose,merror,mfenced,mfrac,mfraction,mglyph,mi,mlabeledtr,mlongdiv,mmultiscripts,mn,mo,mover,mpadded,mphantom,mprescripts,mroot,mrow,ms,mscarries,mscarry,msgroup,msline,mspace,msqrt,msrow,mstack,mstyle,msub,msubsup,msup,mtable,mtd,mtext,mtr,munder,munderover,none,semantics"; -var VOID_TAGS = "area,base,br,col,embed,hr,img,input,link,meta,param,source,track,wbr"; -var isHTMLTag = makeMap(HTML_TAGS); -var isSVGTag = makeMap(SVG_TAGS); -var isMathMLTag = makeMap(MATH_TAGS); -var isVoidTag = makeMap(VOID_TAGS); -var specialBooleanAttrs = `itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly`; -var isSpecialBooleanAttr = makeMap(specialBooleanAttrs); -var isBooleanAttr = makeMap( - specialBooleanAttrs + `,async,autofocus,autoplay,controls,default,defer,disabled,hidden,inert,loop,open,required,reversed,scoped,seamless,checked,muted,multiple,selected` -); -function includeBooleanAttr(value) { - return !!value || value === ""; -} -var isKnownHtmlAttr = makeMap( - `accept,accept-charset,accesskey,action,align,allow,alt,async,autocapitalize,autocomplete,autofocus,autoplay,background,bgcolor,border,buffered,capture,challenge,charset,checked,cite,class,code,codebase,color,cols,colspan,content,contenteditable,contextmenu,controls,coords,crossorigin,csp,data,datetime,decoding,default,defer,dir,dirname,disabled,download,draggable,dropzone,enctype,enterkeyhint,for,form,formaction,formenctype,formmethod,formnovalidate,formtarget,headers,height,hidden,high,href,hreflang,http-equiv,icon,id,importance,inert,integrity,ismap,itemprop,keytype,kind,label,lang,language,loading,list,loop,low,manifest,max,maxlength,minlength,media,min,multiple,muted,name,novalidate,open,optimum,pattern,ping,placeholder,poster,preload,radiogroup,readonly,referrerpolicy,rel,required,reversed,rows,rowspan,sandbox,scope,scoped,selected,shape,size,sizes,slot,span,spellcheck,src,srcdoc,srclang,srcset,start,step,style,summary,tabindex,target,title,translate,type,usemap,value,width,wrap` -); -var isKnownSvgAttr = makeMap( - `xmlns,accent-height,accumulate,additive,alignment-baseline,alphabetic,amplitude,arabic-form,ascent,attributeName,attributeType,azimuth,baseFrequency,baseline-shift,baseProfile,bbox,begin,bias,by,calcMode,cap-height,class,clip,clipPathUnits,clip-path,clip-rule,color,color-interpolation,color-interpolation-filters,color-profile,color-rendering,contentScriptType,contentStyleType,crossorigin,cursor,cx,cy,d,decelerate,descent,diffuseConstant,direction,display,divisor,dominant-baseline,dur,dx,dy,edgeMode,elevation,enable-background,end,exponent,fill,fill-opacity,fill-rule,filter,filterRes,filterUnits,flood-color,flood-opacity,font-family,font-size,font-size-adjust,font-stretch,font-style,font-variant,font-weight,format,from,fr,fx,fy,g1,g2,glyph-name,glyph-orientation-horizontal,glyph-orientation-vertical,glyphRef,gradientTransform,gradientUnits,hanging,height,href,hreflang,horiz-adv-x,horiz-origin-x,id,ideographic,image-rendering,in,in2,intercept,k,k1,k2,k3,k4,kernelMatrix,kernelUnitLength,kerning,keyPoints,keySplines,keyTimes,lang,lengthAdjust,letter-spacing,lighting-color,limitingConeAngle,local,marker-end,marker-mid,marker-start,markerHeight,markerUnits,markerWidth,mask,maskContentUnits,maskUnits,mathematical,max,media,method,min,mode,name,numOctaves,offset,opacity,operator,order,orient,orientation,origin,overflow,overline-position,overline-thickness,panose-1,paint-order,path,pathLength,patternContentUnits,patternTransform,patternUnits,ping,pointer-events,points,pointsAtX,pointsAtY,pointsAtZ,preserveAlpha,preserveAspectRatio,primitiveUnits,r,radius,referrerPolicy,refX,refY,rel,rendering-intent,repeatCount,repeatDur,requiredExtensions,requiredFeatures,restart,result,rotate,rx,ry,scale,seed,shape-rendering,slope,spacing,specularConstant,specularExponent,speed,spreadMethod,startOffset,stdDeviation,stemh,stemv,stitchTiles,stop-color,stop-opacity,strikethrough-position,strikethrough-thickness,string,stroke,stroke-dasharray,stroke-dashoffset,stroke-linecap,stroke-linejoin,stroke-miterlimit,stroke-opacity,stroke-width,style,surfaceScale,systemLanguage,tabindex,tableValues,target,targetX,targetY,text-anchor,text-decoration,text-rendering,textLength,to,transform,transform-origin,type,u1,u2,underline-position,underline-thickness,unicode,unicode-bidi,unicode-range,units-per-em,v-alphabetic,v-hanging,v-ideographic,v-mathematical,values,vector-effect,version,vert-adv-y,vert-origin-x,vert-origin-y,viewBox,viewTarget,visibility,width,widths,word-spacing,writing-mode,x,x-height,x1,x2,xChannelSelector,xlink:actuate,xlink:arcrole,xlink:href,xlink:role,xlink:show,xlink:title,xlink:type,xmlns:xlink,xml:base,xml:lang,xml:space,y,y1,y2,yChannelSelector,z,zoomAndPan` -); -function isRenderableAttrValue(value) { - if (value == null) { - return false; - } - const type = typeof value; - return type === "string" || type === "number" || type === "boolean"; -} -function looseCompareArrays(a, b) { - if (a.length !== b.length) return false; - let equal = true; - for (let i = 0; equal && i < a.length; i++) { - equal = looseEqual(a[i], b[i]); - } - return equal; -} -function looseEqual(a, b) { - if (a === b) return true; - let aValidType = isDate(a); - let bValidType = isDate(b); - if (aValidType || bValidType) { - return aValidType && bValidType ? a.getTime() === b.getTime() : false; - } - aValidType = isSymbol(a); - bValidType = isSymbol(b); - if (aValidType || bValidType) { - return a === b; - } - aValidType = isArray(a); - bValidType = isArray(b); - if (aValidType || bValidType) { - return aValidType && bValidType ? looseCompareArrays(a, b) : false; - } - aValidType = isObject(a); - bValidType = isObject(b); - if (aValidType || bValidType) { - if (!aValidType || !bValidType) { - return false; - } - const aKeysCount = Object.keys(a).length; - const bKeysCount = Object.keys(b).length; - if (aKeysCount !== bKeysCount) { - return false; - } - for (const key in a) { - const aHasKey = a.hasOwnProperty(key); - const bHasKey = b.hasOwnProperty(key); - if (aHasKey && !bHasKey || !aHasKey && bHasKey || !looseEqual(a[key], b[key])) { - return false; - } - } - } - return String(a) === String(b); -} -function looseIndexOf(arr, val) { - return arr.findIndex((item) => looseEqual(item, val)); -} -var toDisplayString = (val) => { - return isString(val) ? val : val == null ? "" : isArray(val) || isObject(val) && (val.toString === objectToString || !isFunction(val.toString)) ? JSON.stringify(val, replacer, 2) : String(val); -}; -var replacer = (_key, val) => { - if (val && val.__v_isRef) { - return replacer(_key, val.value); - } else if (isMap(val)) { - return { - [`Map(${val.size})`]: [...val.entries()].reduce( - (entries, [key, val2], i) => { - entries[stringifySymbol(key, i) + " =>"] = val2; - return entries; - }, - {} - ) - }; - } else if (isSet(val)) { - return { - [`Set(${val.size})`]: [...val.values()].map((v) => stringifySymbol(v)) - }; - } else if (isSymbol(val)) { - return stringifySymbol(val); - } else if (isObject(val) && !isArray(val) && !isPlainObject(val)) { - return String(val); - } - return val; -}; -var stringifySymbol = (v, i = "") => { - var _a; - return ( - // Symbol.description in es2019+ so we need to cast here to pass - // the lib: es2016 check - isSymbol(v) ? `Symbol(${(_a = v.description) != null ? _a : i})` : v - ); -}; - -// node_modules/@vue/reactivity/dist/reactivity.esm-bundler.js -function warn(msg, ...args) { - console.warn(`[Vue warn] ${msg}`, ...args); -} -var activeEffectScope; -var EffectScope = class { - constructor(detached = false) { - this.detached = detached; - this._active = true; - this.effects = []; - this.cleanups = []; - this.parent = activeEffectScope; - if (!detached && activeEffectScope) { - this.index = (activeEffectScope.scopes || (activeEffectScope.scopes = [])).push( - this - ) - 1; - } - } - get active() { - return this._active; - } - run(fn) { - if (this._active) { - const currentEffectScope = activeEffectScope; - try { - activeEffectScope = this; - return fn(); - } finally { - activeEffectScope = currentEffectScope; - } - } else if (true) { - warn(`cannot run an inactive effect scope.`); - } - } - /** - * This should only be called on non-detached scopes - * @internal - */ - on() { - activeEffectScope = this; - } - /** - * This should only be called on non-detached scopes - * @internal - */ - off() { - activeEffectScope = this.parent; - } - stop(fromParent) { - if (this._active) { - let i, l; - for (i = 0, l = this.effects.length; i < l; i++) { - this.effects[i].stop(); - } - for (i = 0, l = this.cleanups.length; i < l; i++) { - this.cleanups[i](); - } - if (this.scopes) { - for (i = 0, l = this.scopes.length; i < l; i++) { - this.scopes[i].stop(true); - } - } - if (!this.detached && this.parent && !fromParent) { - const last = this.parent.scopes.pop(); - if (last && last !== this) { - this.parent.scopes[this.index] = last; - last.index = this.index; - } - } - this.parent = void 0; - this._active = false; - } - } -}; -function effectScope(detached) { - return new EffectScope(detached); -} -function recordEffectScope(effect2, scope = activeEffectScope) { - if (scope && scope.active) { - scope.effects.push(effect2); - } -} -function getCurrentScope() { - return activeEffectScope; -} -function onScopeDispose(fn) { - if (activeEffectScope) { - activeEffectScope.cleanups.push(fn); - } else if (true) { - warn( - `onScopeDispose() is called when there is no active effect scope to be associated with.` - ); - } -} -var activeEffect; -var ReactiveEffect = class { - constructor(fn, trigger2, scheduler, scope) { - this.fn = fn; - this.trigger = trigger2; - this.scheduler = scheduler; - this.active = true; - this.deps = []; - this._dirtyLevel = 5; - this._trackId = 0; - this._runnings = 0; - this._shouldSchedule = false; - this._depsLength = 0; - recordEffectScope(this, scope); - } - get dirty() { - if (this._dirtyLevel === 2) - return false; - if (this._dirtyLevel === 3 || this._dirtyLevel === 4) { - this._dirtyLevel = 1; - pauseTracking(); - for (let i = 0; i < this._depsLength; i++) { - const dep = this.deps[i]; - if (dep.computed) { - if (dep.computed.effect._dirtyLevel === 2) - return true; - triggerComputed(dep.computed); - if (this._dirtyLevel >= 5) { - break; - } - } - } - if (this._dirtyLevel === 1) { - this._dirtyLevel = 0; - } - resetTracking(); - } - return this._dirtyLevel >= 5; - } - set dirty(v) { - this._dirtyLevel = v ? 5 : 0; - } - run() { - this._dirtyLevel = 0; - if (!this.active) { - return this.fn(); - } - let lastShouldTrack = shouldTrack; - let lastEffect = activeEffect; - try { - shouldTrack = true; - activeEffect = this; - this._runnings++; - preCleanupEffect(this); - return this.fn(); - } finally { - postCleanupEffect(this); - this._runnings--; - activeEffect = lastEffect; - shouldTrack = lastShouldTrack; - } - } - stop() { - if (this.active) { - preCleanupEffect(this); - postCleanupEffect(this); - this.onStop && this.onStop(); - this.active = false; - } - } -}; -function triggerComputed(computed3) { - return computed3.value; -} -function preCleanupEffect(effect2) { - effect2._trackId++; - effect2._depsLength = 0; -} -function postCleanupEffect(effect2) { - if (effect2.deps.length > effect2._depsLength) { - for (let i = effect2._depsLength; i < effect2.deps.length; i++) { - cleanupDepEffect(effect2.deps[i], effect2); - } - effect2.deps.length = effect2._depsLength; - } -} -function cleanupDepEffect(dep, effect2) { - const trackId = dep.get(effect2); - if (trackId !== void 0 && effect2._trackId !== trackId) { - dep.delete(effect2); - if (dep.size === 0) { - dep.cleanup(); - } - } -} -function effect(fn, options) { - if (fn.effect instanceof ReactiveEffect) { - fn = fn.effect.fn; - } - const _effect = new ReactiveEffect(fn, NOOP, () => { - if (_effect.dirty) { - _effect.run(); - } - }); - if (options) { - extend(_effect, options); - if (options.scope) recordEffectScope(_effect, options.scope); - } - if (!options || !options.lazy) { - _effect.run(); - } - const runner = _effect.run.bind(_effect); - runner.effect = _effect; - return runner; -} -function stop(runner) { - runner.effect.stop(); -} -var shouldTrack = true; -var pauseScheduleStack = 0; -var trackStack = []; -function pauseTracking() { - trackStack.push(shouldTrack); - shouldTrack = false; -} -function resetTracking() { - const last = trackStack.pop(); - shouldTrack = last === void 0 ? true : last; -} -function pauseScheduling() { - pauseScheduleStack++; -} -function resetScheduling() { - pauseScheduleStack--; - while (!pauseScheduleStack && queueEffectSchedulers.length) { - queueEffectSchedulers.shift()(); - } -} -function trackEffect(effect2, dep, debuggerEventExtraInfo) { - var _a; - if (dep.get(effect2) !== effect2._trackId) { - dep.set(effect2, effect2._trackId); - const oldDep = effect2.deps[effect2._depsLength]; - if (oldDep !== dep) { - if (oldDep) { - cleanupDepEffect(oldDep, effect2); - } - effect2.deps[effect2._depsLength++] = dep; - } else { - effect2._depsLength++; - } - if (true) { - (_a = effect2.onTrack) == null ? void 0 : _a.call(effect2, extend({ effect: effect2 }, debuggerEventExtraInfo)); - } - } -} -var queueEffectSchedulers = []; -function triggerEffects(dep, dirtyLevel, debuggerEventExtraInfo) { - var _a; - pauseScheduling(); - for (const effect2 of dep.keys()) { - if (!dep.computed && effect2.computed) { - if (dep.get(effect2) === effect2._trackId && effect2._runnings > 0) { - effect2._dirtyLevel = 2; - continue; - } - } - let tracking; - if (effect2._dirtyLevel < dirtyLevel && (tracking != null ? tracking : tracking = dep.get(effect2) === effect2._trackId)) { - effect2._shouldSchedule || (effect2._shouldSchedule = effect2._dirtyLevel === 0); - if (effect2.computed && effect2._dirtyLevel === 2) { - effect2._shouldSchedule = true; - } - effect2._dirtyLevel = dirtyLevel; - } - if (effect2._shouldSchedule && (tracking != null ? tracking : tracking = dep.get(effect2) === effect2._trackId)) { - if (true) { - (_a = effect2.onTrigger) == null ? void 0 : _a.call(effect2, extend({ effect: effect2 }, debuggerEventExtraInfo)); - } - effect2.trigger(); - if ((!effect2._runnings || effect2.allowRecurse) && effect2._dirtyLevel !== 3) { - effect2._shouldSchedule = false; - if (effect2.scheduler) { - queueEffectSchedulers.push(effect2.scheduler); - } - } - } - } - resetScheduling(); -} -var createDep = (cleanup, computed3) => { - const dep = /* @__PURE__ */ new Map(); - dep.cleanup = cleanup; - dep.computed = computed3; - return dep; -}; -var targetMap = /* @__PURE__ */ new WeakMap(); -var ITERATE_KEY = Symbol(true ? "iterate" : ""); -var MAP_KEY_ITERATE_KEY = Symbol(true ? "Map key iterate" : ""); -function track(target, type, key) { - if (shouldTrack && activeEffect) { - let depsMap = targetMap.get(target); - if (!depsMap) { - targetMap.set(target, depsMap = /* @__PURE__ */ new Map()); - } - let dep = depsMap.get(key); - if (!dep) { - depsMap.set(key, dep = createDep(() => depsMap.delete(key))); - } - trackEffect( - activeEffect, - dep, - true ? { - target, - type, - key - } : void 0 - ); - } -} -function trigger(target, type, key, newValue, oldValue, oldTarget) { - const depsMap = targetMap.get(target); - if (!depsMap) { - return; - } - let deps = []; - if (type === "clear") { - deps = [...depsMap.values()]; - } else if (key === "length" && isArray(target)) { - const newLength = Number(newValue); - depsMap.forEach((dep, key2) => { - if (key2 === "length" || !isSymbol(key2) && key2 >= newLength) { - deps.push(dep); - } - }); - } else { - if (key !== void 0) { - deps.push(depsMap.get(key)); - } - switch (type) { - case "add": - if (!isArray(target)) { - deps.push(depsMap.get(ITERATE_KEY)); - if (isMap(target)) { - deps.push(depsMap.get(MAP_KEY_ITERATE_KEY)); - } - } else if (isIntegerKey(key)) { - deps.push(depsMap.get("length")); - } - break; - case "delete": - if (!isArray(target)) { - deps.push(depsMap.get(ITERATE_KEY)); - if (isMap(target)) { - deps.push(depsMap.get(MAP_KEY_ITERATE_KEY)); - } - } - break; - case "set": - if (isMap(target)) { - deps.push(depsMap.get(ITERATE_KEY)); - } - break; - } - } - pauseScheduling(); - for (const dep of deps) { - if (dep) { - triggerEffects( - dep, - 5, - true ? { - target, - type, - key, - newValue, - oldValue, - oldTarget - } : void 0 - ); - } - } - resetScheduling(); -} -function getDepFromReactive(object, key) { - const depsMap = targetMap.get(object); - return depsMap && depsMap.get(key); -} -var isNonTrackableKeys = makeMap(`__proto__,__v_isRef,__isVue`); -var builtInSymbols = new Set( - Object.getOwnPropertyNames(Symbol).filter((key) => key !== "arguments" && key !== "caller").map((key) => Symbol[key]).filter(isSymbol) -); -var arrayInstrumentations = createArrayInstrumentations(); -function createArrayInstrumentations() { - const instrumentations = {}; - ["includes", "indexOf", "lastIndexOf"].forEach((key) => { - instrumentations[key] = function(...args) { - const arr = toRaw(this); - for (let i = 0, l = this.length; i < l; i++) { - track(arr, "get", i + ""); - } - const res = arr[key](...args); - if (res === -1 || res === false) { - return arr[key](...args.map(toRaw)); - } else { - return res; - } - }; - }); - ["push", "pop", "shift", "unshift", "splice"].forEach((key) => { - instrumentations[key] = function(...args) { - pauseTracking(); - pauseScheduling(); - const res = toRaw(this)[key].apply(this, args); - resetScheduling(); - resetTracking(); - return res; - }; - }); - return instrumentations; -} -function hasOwnProperty2(key) { - if (!isSymbol(key)) key = String(key); - const obj = toRaw(this); - track(obj, "has", key); - return obj.hasOwnProperty(key); -} -var BaseReactiveHandler = class { - constructor(_isReadonly = false, _isShallow = false) { - this._isReadonly = _isReadonly; - this._isShallow = _isShallow; - } - get(target, key, receiver) { - const isReadonly2 = this._isReadonly, isShallow2 = this._isShallow; - if (key === "__v_isReactive") { - return !isReadonly2; - } else if (key === "__v_isReadonly") { - return isReadonly2; - } else if (key === "__v_isShallow") { - return isShallow2; - } else if (key === "__v_raw") { - if (receiver === (isReadonly2 ? isShallow2 ? shallowReadonlyMap : readonlyMap : isShallow2 ? shallowReactiveMap : reactiveMap).get(target) || // receiver is not the reactive proxy, but has the same prototype - // this means the reciever is a user proxy of the reactive proxy - Object.getPrototypeOf(target) === Object.getPrototypeOf(receiver)) { - return target; - } - return; - } - const targetIsArray = isArray(target); - if (!isReadonly2) { - if (targetIsArray && hasOwn(arrayInstrumentations, key)) { - return Reflect.get(arrayInstrumentations, key, receiver); - } - if (key === "hasOwnProperty") { - return hasOwnProperty2; - } - } - const res = Reflect.get(target, key, receiver); - if (isSymbol(key) ? builtInSymbols.has(key) : isNonTrackableKeys(key)) { - return res; - } - if (!isReadonly2) { - track(target, "get", key); - } - if (isShallow2) { - return res; - } - if (isRef(res)) { - return targetIsArray && isIntegerKey(key) ? res : res.value; - } - if (isObject(res)) { - return isReadonly2 ? readonly(res) : reactive(res); - } - return res; - } -}; -var MutableReactiveHandler = class extends BaseReactiveHandler { - constructor(isShallow2 = false) { - super(false, isShallow2); - } - set(target, key, value, receiver) { - let oldValue = target[key]; - if (!this._isShallow) { - const isOldValueReadonly = isReadonly(oldValue); - if (!isShallow(value) && !isReadonly(value)) { - oldValue = toRaw(oldValue); - value = toRaw(value); - } - if (!isArray(target) && isRef(oldValue) && !isRef(value)) { - if (isOldValueReadonly) { - return false; - } else { - oldValue.value = value; - return true; - } - } - } - const hadKey = isArray(target) && isIntegerKey(key) ? Number(key) < target.length : hasOwn(target, key); - const result = Reflect.set(target, key, value, receiver); - if (target === toRaw(receiver)) { - if (!hadKey) { - trigger(target, "add", key, value); - } else if (hasChanged(value, oldValue)) { - trigger(target, "set", key, value, oldValue); - } - } - return result; - } - deleteProperty(target, key) { - const hadKey = hasOwn(target, key); - const oldValue = target[key]; - const result = Reflect.deleteProperty(target, key); - if (result && hadKey) { - trigger(target, "delete", key, void 0, oldValue); - } - return result; - } - has(target, key) { - const result = Reflect.has(target, key); - if (!isSymbol(key) || !builtInSymbols.has(key)) { - track(target, "has", key); - } - return result; - } - ownKeys(target) { - track( - target, - "iterate", - isArray(target) ? "length" : ITERATE_KEY - ); - return Reflect.ownKeys(target); - } -}; -var ReadonlyReactiveHandler = class extends BaseReactiveHandler { - constructor(isShallow2 = false) { - super(true, isShallow2); - } - set(target, key) { - if (true) { - warn( - `Set operation on key "${String(key)}" failed: target is readonly.`, - target - ); - } - return true; - } - deleteProperty(target, key) { - if (true) { - warn( - `Delete operation on key "${String(key)}" failed: target is readonly.`, - target - ); - } - return true; - } -}; -var mutableHandlers = new MutableReactiveHandler(); -var readonlyHandlers = new ReadonlyReactiveHandler(); -var shallowReactiveHandlers = new MutableReactiveHandler( - true -); -var shallowReadonlyHandlers = new ReadonlyReactiveHandler(true); -var toShallow = (value) => value; -var getProto = (v) => Reflect.getPrototypeOf(v); -function get(target, key, isReadonly2 = false, isShallow2 = false) { - target = target["__v_raw"]; - const rawTarget = toRaw(target); - const rawKey = toRaw(key); - if (!isReadonly2) { - if (hasChanged(key, rawKey)) { - track(rawTarget, "get", key); - } - track(rawTarget, "get", rawKey); - } - const { has: has2 } = getProto(rawTarget); - const wrap = isShallow2 ? toShallow : isReadonly2 ? toReadonly : toReactive; - if (has2.call(rawTarget, key)) { - return wrap(target.get(key)); - } else if (has2.call(rawTarget, rawKey)) { - return wrap(target.get(rawKey)); - } else if (target !== rawTarget) { - target.get(key); - } -} -function has(key, isReadonly2 = false) { - const target = this["__v_raw"]; - const rawTarget = toRaw(target); - const rawKey = toRaw(key); - if (!isReadonly2) { - if (hasChanged(key, rawKey)) { - track(rawTarget, "has", key); - } - track(rawTarget, "has", rawKey); - } - return key === rawKey ? target.has(key) : target.has(key) || target.has(rawKey); -} -function size(target, isReadonly2 = false) { - target = target["__v_raw"]; - !isReadonly2 && track(toRaw(target), "iterate", ITERATE_KEY); - return Reflect.get(target, "size", target); -} -function add(value) { - value = toRaw(value); - const target = toRaw(this); - const proto = getProto(target); - const hadKey = proto.has.call(target, value); - if (!hadKey) { - target.add(value); - trigger(target, "add", value, value); - } - return this; -} -function set(key, value) { - value = toRaw(value); - const target = toRaw(this); - const { has: has2, get: get2 } = getProto(target); - let hadKey = has2.call(target, key); - if (!hadKey) { - key = toRaw(key); - hadKey = has2.call(target, key); - } else if (true) { - checkIdentityKeys(target, has2, key); - } - const oldValue = get2.call(target, key); - target.set(key, value); - if (!hadKey) { - trigger(target, "add", key, value); - } else if (hasChanged(value, oldValue)) { - trigger(target, "set", key, value, oldValue); - } - return this; -} -function deleteEntry(key) { - const target = toRaw(this); - const { has: has2, get: get2 } = getProto(target); - let hadKey = has2.call(target, key); - if (!hadKey) { - key = toRaw(key); - hadKey = has2.call(target, key); - } else if (true) { - checkIdentityKeys(target, has2, key); - } - const oldValue = get2 ? get2.call(target, key) : void 0; - const result = target.delete(key); - if (hadKey) { - trigger(target, "delete", key, void 0, oldValue); - } - return result; -} -function clear() { - const target = toRaw(this); - const hadItems = target.size !== 0; - const oldTarget = true ? isMap(target) ? new Map(target) : new Set(target) : void 0; - const result = target.clear(); - if (hadItems) { - trigger(target, "clear", void 0, void 0, oldTarget); - } - return result; -} -function createForEach(isReadonly2, isShallow2) { - return function forEach(callback, thisArg) { - const observed = this; - const target = observed["__v_raw"]; - const rawTarget = toRaw(target); - const wrap = isShallow2 ? toShallow : isReadonly2 ? toReadonly : toReactive; - !isReadonly2 && track(rawTarget, "iterate", ITERATE_KEY); - return target.forEach((value, key) => { - return callback.call(thisArg, wrap(value), wrap(key), observed); - }); - }; -} -function createIterableMethod(method, isReadonly2, isShallow2) { - return function(...args) { - const target = this["__v_raw"]; - const rawTarget = toRaw(target); - const targetIsMap = isMap(rawTarget); - const isPair = method === "entries" || method === Symbol.iterator && targetIsMap; - const isKeyOnly = method === "keys" && targetIsMap; - const innerIterator = target[method](...args); - const wrap = isShallow2 ? toShallow : isReadonly2 ? toReadonly : toReactive; - !isReadonly2 && track( - rawTarget, - "iterate", - isKeyOnly ? MAP_KEY_ITERATE_KEY : ITERATE_KEY - ); - return { - // iterator protocol - next() { - const { value, done } = innerIterator.next(); - return done ? { value, done } : { - value: isPair ? [wrap(value[0]), wrap(value[1])] : wrap(value), - done - }; - }, - // iterable protocol - [Symbol.iterator]() { - return this; - } - }; - }; -} -function createReadonlyMethod(type) { - return function(...args) { - if (true) { - const key = args[0] ? `on key "${args[0]}" ` : ``; - warn( - `${capitalize(type)} operation ${key}failed: target is readonly.`, - toRaw(this) - ); - } - return type === "delete" ? false : type === "clear" ? void 0 : this; - }; -} -function createInstrumentations() { - const mutableInstrumentations2 = { - get(key) { - return get(this, key); - }, - get size() { - return size(this); - }, - has, - add, - set, - delete: deleteEntry, - clear, - forEach: createForEach(false, false) - }; - const shallowInstrumentations2 = { - get(key) { - return get(this, key, false, true); - }, - get size() { - return size(this); - }, - has, - add, - set, - delete: deleteEntry, - clear, - forEach: createForEach(false, true) - }; - const readonlyInstrumentations2 = { - get(key) { - return get(this, key, true); - }, - get size() { - return size(this, true); - }, - has(key) { - return has.call(this, key, true); - }, - add: createReadonlyMethod("add"), - set: createReadonlyMethod("set"), - delete: createReadonlyMethod("delete"), - clear: createReadonlyMethod("clear"), - forEach: createForEach(true, false) - }; - const shallowReadonlyInstrumentations2 = { - get(key) { - return get(this, key, true, true); - }, - get size() { - return size(this, true); - }, - has(key) { - return has.call(this, key, true); - }, - add: createReadonlyMethod("add"), - set: createReadonlyMethod("set"), - delete: createReadonlyMethod("delete"), - clear: createReadonlyMethod("clear"), - forEach: createForEach(true, true) - }; - const iteratorMethods = [ - "keys", - "values", - "entries", - Symbol.iterator - ]; - iteratorMethods.forEach((method) => { - mutableInstrumentations2[method] = createIterableMethod(method, false, false); - readonlyInstrumentations2[method] = createIterableMethod(method, true, false); - shallowInstrumentations2[method] = createIterableMethod(method, false, true); - shallowReadonlyInstrumentations2[method] = createIterableMethod( - method, - true, - true - ); - }); - return [ - mutableInstrumentations2, - readonlyInstrumentations2, - shallowInstrumentations2, - shallowReadonlyInstrumentations2 - ]; -} -var [ - mutableInstrumentations, - readonlyInstrumentations, - shallowInstrumentations, - shallowReadonlyInstrumentations -] = createInstrumentations(); -function createInstrumentationGetter(isReadonly2, shallow) { - const instrumentations = shallow ? isReadonly2 ? shallowReadonlyInstrumentations : shallowInstrumentations : isReadonly2 ? readonlyInstrumentations : mutableInstrumentations; - return (target, key, receiver) => { - if (key === "__v_isReactive") { - return !isReadonly2; - } else if (key === "__v_isReadonly") { - return isReadonly2; - } else if (key === "__v_raw") { - return target; - } - return Reflect.get( - hasOwn(instrumentations, key) && key in target ? instrumentations : target, - key, - receiver - ); - }; -} -var mutableCollectionHandlers = { - get: createInstrumentationGetter(false, false) -}; -var shallowCollectionHandlers = { - get: createInstrumentationGetter(false, true) -}; -var readonlyCollectionHandlers = { - get: createInstrumentationGetter(true, false) -}; -var shallowReadonlyCollectionHandlers = { - get: createInstrumentationGetter(true, true) -}; -function checkIdentityKeys(target, has2, key) { - const rawKey = toRaw(key); - if (rawKey !== key && has2.call(target, rawKey)) { - const type = toRawType(target); - warn( - `Reactive ${type} contains both the raw and reactive versions of the same object${type === `Map` ? ` as keys` : ``}, which can lead to inconsistencies. Avoid differentiating between the raw and reactive versions of an object and only use the reactive version if possible.` - ); - } -} -var reactiveMap = /* @__PURE__ */ new WeakMap(); -var shallowReactiveMap = /* @__PURE__ */ new WeakMap(); -var readonlyMap = /* @__PURE__ */ new WeakMap(); -var shallowReadonlyMap = /* @__PURE__ */ new WeakMap(); -function targetTypeMap(rawType) { - switch (rawType) { - case "Object": - case "Array": - return 1; - case "Map": - case "Set": - case "WeakMap": - case "WeakSet": - return 2; - default: - return 0; - } -} -function getTargetType(value) { - return value["__v_skip"] || !Object.isExtensible(value) ? 0 : targetTypeMap(toRawType(value)); -} -function reactive(target) { - if (isReadonly(target)) { - return target; - } - return createReactiveObject( - target, - false, - mutableHandlers, - mutableCollectionHandlers, - reactiveMap - ); -} -function shallowReactive(target) { - return createReactiveObject( - target, - false, - shallowReactiveHandlers, - shallowCollectionHandlers, - shallowReactiveMap - ); -} -function readonly(target) { - return createReactiveObject( - target, - true, - readonlyHandlers, - readonlyCollectionHandlers, - readonlyMap - ); -} -function shallowReadonly(target) { - return createReactiveObject( - target, - true, - shallowReadonlyHandlers, - shallowReadonlyCollectionHandlers, - shallowReadonlyMap - ); -} -function createReactiveObject(target, isReadonly2, baseHandlers, collectionHandlers, proxyMap) { - if (!isObject(target)) { - if (true) { - warn( - `value cannot be made ${isReadonly2 ? "readonly" : "reactive"}: ${String( - target - )}` - ); - } - return target; - } - if (target["__v_raw"] && !(isReadonly2 && target["__v_isReactive"])) { - return target; - } - const existingProxy = proxyMap.get(target); - if (existingProxy) { - return existingProxy; - } - const targetType = getTargetType(target); - if (targetType === 0) { - return target; - } - const proxy = new Proxy( - target, - targetType === 2 ? collectionHandlers : baseHandlers - ); - proxyMap.set(target, proxy); - return proxy; -} -function isReactive(value) { - if (isReadonly(value)) { - return isReactive(value["__v_raw"]); - } - return !!(value && value["__v_isReactive"]); -} -function isReadonly(value) { - return !!(value && value["__v_isReadonly"]); -} -function isShallow(value) { - return !!(value && value["__v_isShallow"]); -} -function isProxy(value) { - return value ? !!value["__v_raw"] : false; -} -function toRaw(observed) { - const raw = observed && observed["__v_raw"]; - return raw ? toRaw(raw) : observed; -} -function markRaw(value) { - if (Object.isExtensible(value)) { - def(value, "__v_skip", true); - } - return value; -} -var toReactive = (value) => isObject(value) ? reactive(value) : value; -var toReadonly = (value) => isObject(value) ? readonly(value) : value; -var COMPUTED_SIDE_EFFECT_WARN = `Computed is still dirty after getter evaluation, likely because a computed is mutating its own dependency in its getter. State mutations in computed getters should be avoided. Check the docs for more details: https://vuejs.org/guide/essentials/computed.html#getters-should-be-side-effect-free`; -var ComputedRefImpl = class { - constructor(getter, _setter, isReadonly2, isSSR) { - this.getter = getter; - this._setter = _setter; - this.dep = void 0; - this.__v_isRef = true; - this["__v_isReadonly"] = false; - this.effect = new ReactiveEffect( - () => getter(this._value), - () => triggerRefValue( - this, - this.effect._dirtyLevel === 3 ? 3 : 4 - ) - ); - this.effect.computed = this; - this.effect.active = this._cacheable = !isSSR; - this["__v_isReadonly"] = isReadonly2; - } - get value() { - const self2 = toRaw(this); - if ((!self2._cacheable || self2.effect.dirty) && hasChanged(self2._value, self2._value = self2.effect.run())) { - triggerRefValue(self2, 5); - } - trackRefValue(self2); - if (self2.effect._dirtyLevel >= 2) { - if (this._warnRecursive) { - warn(COMPUTED_SIDE_EFFECT_WARN, ` - -getter: `, this.getter); - } - triggerRefValue(self2, 3); - } - return self2._value; - } - set value(newValue) { - this._setter(newValue); - } - // #region polyfill _dirty for backward compatibility third party code for Vue <= 3.3.x - get _dirty() { - return this.effect.dirty; - } - set _dirty(v) { - this.effect.dirty = v; - } - // #endregion -}; -function computed(getterOrOptions, debugOptions, isSSR = false) { - let getter; - let setter; - const onlyGetter = isFunction(getterOrOptions); - if (onlyGetter) { - getter = getterOrOptions; - setter = true ? () => { - warn("Write operation failed: computed value is readonly"); - } : NOOP; - } else { - getter = getterOrOptions.get; - setter = getterOrOptions.set; - } - const cRef = new ComputedRefImpl(getter, setter, onlyGetter || !setter, isSSR); - if (debugOptions && !isSSR) { - cRef.effect.onTrack = debugOptions.onTrack; - cRef.effect.onTrigger = debugOptions.onTrigger; - } - return cRef; -} -function trackRefValue(ref2) { - var _a; - if (shouldTrack && activeEffect) { - ref2 = toRaw(ref2); - trackEffect( - activeEffect, - (_a = ref2.dep) != null ? _a : ref2.dep = createDep( - () => ref2.dep = void 0, - ref2 instanceof ComputedRefImpl ? ref2 : void 0 - ), - true ? { - target: ref2, - type: "get", - key: "value" - } : void 0 - ); - } -} -function triggerRefValue(ref2, dirtyLevel = 5, newVal, oldVal) { - ref2 = toRaw(ref2); - const dep = ref2.dep; - if (dep) { - triggerEffects( - dep, - dirtyLevel, - true ? { - target: ref2, - type: "set", - key: "value", - newValue: newVal, - oldValue: oldVal - } : void 0 - ); - } -} -function isRef(r) { - return !!(r && r.__v_isRef === true); -} -function ref(value) { - return createRef(value, false); -} -function shallowRef(value) { - return createRef(value, true); -} -function createRef(rawValue, shallow) { - if (isRef(rawValue)) { - return rawValue; - } - return new RefImpl(rawValue, shallow); -} -var RefImpl = class { - constructor(value, __v_isShallow) { - this.__v_isShallow = __v_isShallow; - this.dep = void 0; - this.__v_isRef = true; - this._rawValue = __v_isShallow ? value : toRaw(value); - this._value = __v_isShallow ? value : toReactive(value); - } - get value() { - trackRefValue(this); - return this._value; - } - set value(newVal) { - const useDirectValue = this.__v_isShallow || isShallow(newVal) || isReadonly(newVal); - newVal = useDirectValue ? newVal : toRaw(newVal); - if (hasChanged(newVal, this._rawValue)) { - const oldVal = this._rawValue; - this._rawValue = newVal; - this._value = useDirectValue ? newVal : toReactive(newVal); - triggerRefValue(this, 5, newVal, oldVal); - } - } -}; -function triggerRef(ref2) { - triggerRefValue(ref2, 5, true ? ref2.value : void 0); -} -function unref(ref2) { - return isRef(ref2) ? ref2.value : ref2; -} -function toValue(source) { - return isFunction(source) ? source() : unref(source); -} -var shallowUnwrapHandlers = { - get: (target, key, receiver) => unref(Reflect.get(target, key, receiver)), - set: (target, key, value, receiver) => { - const oldValue = target[key]; - if (isRef(oldValue) && !isRef(value)) { - oldValue.value = value; - return true; - } else { - return Reflect.set(target, key, value, receiver); - } - } -}; -function proxyRefs(objectWithRefs) { - return isReactive(objectWithRefs) ? objectWithRefs : new Proxy(objectWithRefs, shallowUnwrapHandlers); -} -var CustomRefImpl = class { - constructor(factory) { - this.dep = void 0; - this.__v_isRef = true; - const { get: get2, set: set2 } = factory( - () => trackRefValue(this), - () => triggerRefValue(this) - ); - this._get = get2; - this._set = set2; - } - get value() { - return this._get(); - } - set value(newVal) { - this._set(newVal); - } -}; -function customRef(factory) { - return new CustomRefImpl(factory); -} -function toRefs(object) { - if (!isProxy(object)) { - warn(`toRefs() expects a reactive object but received a plain one.`); - } - const ret = isArray(object) ? new Array(object.length) : {}; - for (const key in object) { - ret[key] = propertyToRef(object, key); - } - return ret; -} -var ObjectRefImpl = class { - constructor(_object, _key, _defaultValue) { - this._object = _object; - this._key = _key; - this._defaultValue = _defaultValue; - this.__v_isRef = true; - } - get value() { - const val = this._object[this._key]; - return val === void 0 ? this._defaultValue : val; - } - set value(newVal) { - this._object[this._key] = newVal; - } - get dep() { - return getDepFromReactive(toRaw(this._object), this._key); - } -}; -var GetterRefImpl = class { - constructor(_getter) { - this._getter = _getter; - this.__v_isRef = true; - this.__v_isReadonly = true; - } - get value() { - return this._getter(); - } -}; -function toRef(source, key, defaultValue) { - if (isRef(source)) { - return source; - } else if (isFunction(source)) { - return new GetterRefImpl(source); - } else if (isObject(source) && arguments.length > 1) { - return propertyToRef(source, key, defaultValue); - } else { - return ref(source); - } -} -function propertyToRef(source, key, defaultValue) { - const val = source[key]; - return isRef(val) ? val : new ObjectRefImpl(source, key, defaultValue); -} -var TrackOpTypes = { - "GET": "get", - "HAS": "has", - "ITERATE": "iterate" -}; -var TriggerOpTypes = { - "SET": "set", - "ADD": "add", - "DELETE": "delete", - "CLEAR": "clear" -}; - -// node_modules/@vue/runtime-core/dist/runtime-core.esm-bundler.js -var stack = []; -function pushWarningContext(vnode) { - stack.push(vnode); -} -function popWarningContext() { - stack.pop(); -} -function warn$1(msg, ...args) { - pauseTracking(); - const instance = stack.length ? stack[stack.length - 1].component : null; - const appWarnHandler = instance && instance.appContext.config.warnHandler; - const trace = getComponentTrace(); - if (appWarnHandler) { - callWithErrorHandling( - appWarnHandler, - instance, - 11, - [ - // eslint-disable-next-line no-restricted-syntax - msg + args.map((a) => { - var _a, _b; - return (_b = (_a = a.toString) == null ? void 0 : _a.call(a)) != null ? _b : JSON.stringify(a); - }).join(""), - instance && instance.proxy, - trace.map( - ({ vnode }) => `at <${formatComponentName(instance, vnode.type)}>` - ).join("\n"), - trace - ] - ); - } else { - const warnArgs = [`[Vue warn]: ${msg}`, ...args]; - if (trace.length && // avoid spamming console during tests - true) { - warnArgs.push(` -`, ...formatTrace(trace)); - } - console.warn(...warnArgs); - } - resetTracking(); -} -function getComponentTrace() { - let currentVNode = stack[stack.length - 1]; - if (!currentVNode) { - return []; - } - const normalizedStack = []; - while (currentVNode) { - const last = normalizedStack[0]; - if (last && last.vnode === currentVNode) { - last.recurseCount++; - } else { - normalizedStack.push({ - vnode: currentVNode, - recurseCount: 0 - }); - } - const parentInstance = currentVNode.component && currentVNode.component.parent; - currentVNode = parentInstance && parentInstance.vnode; - } - return normalizedStack; -} -function formatTrace(trace) { - const logs = []; - trace.forEach((entry, i) => { - logs.push(...i === 0 ? [] : [` -`], ...formatTraceEntry(entry)); - }); - return logs; -} -function formatTraceEntry({ vnode, recurseCount }) { - const postfix = recurseCount > 0 ? `... (${recurseCount} recursive calls)` : ``; - const isRoot = vnode.component ? vnode.component.parent == null : false; - const open = ` at <${formatComponentName( - vnode.component, - vnode.type, - isRoot - )}`; - const close = `>` + postfix; - return vnode.props ? [open, ...formatProps(vnode.props), close] : [open + close]; -} -function formatProps(props) { - const res = []; - const keys = Object.keys(props); - keys.slice(0, 3).forEach((key) => { - res.push(...formatProp(key, props[key])); - }); - if (keys.length > 3) { - res.push(` ...`); - } - return res; -} -function formatProp(key, value, raw) { - if (isString(value)) { - value = JSON.stringify(value); - return raw ? value : [`${key}=${value}`]; - } else if (typeof value === "number" || typeof value === "boolean" || value == null) { - return raw ? value : [`${key}=${value}`]; - } else if (isRef(value)) { - value = formatProp(key, toRaw(value.value), true); - return raw ? value : [`${key}=Ref<`, value, `>`]; - } else if (isFunction(value)) { - return [`${key}=fn${value.name ? `<${value.name}>` : ``}`]; - } else { - value = toRaw(value); - return raw ? value : [`${key}=`, value]; - } -} -function assertNumber(val, type) { - if (false) return; - if (val === void 0) { - return; - } else if (typeof val !== "number") { - warn$1(`${type} is not a valid number - got ${JSON.stringify(val)}.`); - } else if (isNaN(val)) { - warn$1(`${type} is NaN - the duration expression might be incorrect.`); - } -} -var ErrorCodes = { - "SETUP_FUNCTION": 0, - "0": "SETUP_FUNCTION", - "RENDER_FUNCTION": 1, - "1": "RENDER_FUNCTION", - "WATCH_GETTER": 2, - "2": "WATCH_GETTER", - "WATCH_CALLBACK": 3, - "3": "WATCH_CALLBACK", - "WATCH_CLEANUP": 4, - "4": "WATCH_CLEANUP", - "NATIVE_EVENT_HANDLER": 5, - "5": "NATIVE_EVENT_HANDLER", - "COMPONENT_EVENT_HANDLER": 6, - "6": "COMPONENT_EVENT_HANDLER", - "VNODE_HOOK": 7, - "7": "VNODE_HOOK", - "DIRECTIVE_HOOK": 8, - "8": "DIRECTIVE_HOOK", - "TRANSITION_HOOK": 9, - "9": "TRANSITION_HOOK", - "APP_ERROR_HANDLER": 10, - "10": "APP_ERROR_HANDLER", - "APP_WARN_HANDLER": 11, - "11": "APP_WARN_HANDLER", - "FUNCTION_REF": 12, - "12": "FUNCTION_REF", - "ASYNC_COMPONENT_LOADER": 13, - "13": "ASYNC_COMPONENT_LOADER", - "SCHEDULER": 14, - "14": "SCHEDULER" -}; -var ErrorTypeStrings$1 = { - ["sp"]: "serverPrefetch hook", - ["bc"]: "beforeCreate hook", - ["c"]: "created hook", - ["bm"]: "beforeMount hook", - ["m"]: "mounted hook", - ["bu"]: "beforeUpdate hook", - ["u"]: "updated", - ["bum"]: "beforeUnmount hook", - ["um"]: "unmounted hook", - ["a"]: "activated hook", - ["da"]: "deactivated hook", - ["ec"]: "errorCaptured hook", - ["rtc"]: "renderTracked hook", - ["rtg"]: "renderTriggered hook", - [0]: "setup function", - [1]: "render function", - [2]: "watcher getter", - [3]: "watcher callback", - [4]: "watcher cleanup function", - [5]: "native event handler", - [6]: "component event handler", - [7]: "vnode hook", - [8]: "directive hook", - [9]: "transition hook", - [10]: "app errorHandler", - [11]: "app warnHandler", - [12]: "ref function", - [13]: "async component loader", - [14]: "scheduler flush. This is likely a Vue internals bug. Please open an issue at https://github.com/vuejs/core ." -}; -function callWithErrorHandling(fn, instance, type, args) { - try { - return args ? fn(...args) : fn(); - } catch (err) { - handleError(err, instance, type); - } -} -function callWithAsyncErrorHandling(fn, instance, type, args) { - if (isFunction(fn)) { - const res = callWithErrorHandling(fn, instance, type, args); - if (res && isPromise(res)) { - res.catch((err) => { - handleError(err, instance, type); - }); - } - return res; - } - if (isArray(fn)) { - const values = []; - for (let i = 0; i < fn.length; i++) { - values.push(callWithAsyncErrorHandling(fn[i], instance, type, args)); - } - return values; - } else if (true) { - warn$1( - `Invalid value type passed to callWithAsyncErrorHandling(): ${typeof fn}` - ); - } -} -function handleError(err, instance, type, throwInDev = true) { - const contextVNode = instance ? instance.vnode : null; - if (instance) { - let cur = instance.parent; - const exposedInstance = instance.proxy; - const errorInfo = true ? ErrorTypeStrings$1[type] : `https://vuejs.org/error-reference/#runtime-${type}`; - while (cur) { - const errorCapturedHooks = cur.ec; - if (errorCapturedHooks) { - for (let i = 0; i < errorCapturedHooks.length; i++) { - if (errorCapturedHooks[i](err, exposedInstance, errorInfo) === false) { - return; - } - } - } - cur = cur.parent; - } - const appErrorHandler = instance.appContext.config.errorHandler; - if (appErrorHandler) { - pauseTracking(); - callWithErrorHandling( - appErrorHandler, - null, - 10, - [err, exposedInstance, errorInfo] - ); - resetTracking(); - return; - } - } - logError(err, type, contextVNode, throwInDev); -} -function logError(err, type, contextVNode, throwInDev = true) { - if (true) { - const info = ErrorTypeStrings$1[type]; - if (contextVNode) { - pushWarningContext(contextVNode); - } - warn$1(`Unhandled error${info ? ` during execution of ${info}` : ``}`); - if (contextVNode) { - popWarningContext(); - } - if (throwInDev) { - throw err; - } else { - console.error(err); - } - } else { - console.error(err); - } -} -var isFlushing = false; -var isFlushPending = false; -var queue = []; -var flushIndex = 0; -var pendingPostFlushCbs = []; -var activePostFlushCbs = null; -var postFlushIndex = 0; -var resolvedPromise = Promise.resolve(); -var currentFlushPromise = null; -var RECURSION_LIMIT = 100; -function nextTick(fn) { - const p2 = currentFlushPromise || resolvedPromise; - return fn ? p2.then(this ? fn.bind(this) : fn) : p2; -} -function findInsertionIndex(id) { - let start = flushIndex + 1; - let end = queue.length; - while (start < end) { - const middle = start + end >>> 1; - const middleJob = queue[middle]; - const middleJobId = getId(middleJob); - if (middleJobId < id || middleJobId === id && middleJob.pre) { - start = middle + 1; - } else { - end = middle; - } - } - return start; -} -function queueJob(job) { - if (!queue.length || !queue.includes( - job, - isFlushing && job.allowRecurse ? flushIndex + 1 : flushIndex - )) { - if (job.id == null) { - queue.push(job); - } else { - queue.splice(findInsertionIndex(job.id), 0, job); - } - queueFlush(); - } -} -function queueFlush() { - if (!isFlushing && !isFlushPending) { - isFlushPending = true; - currentFlushPromise = resolvedPromise.then(flushJobs); - } -} -function invalidateJob(job) { - const i = queue.indexOf(job); - if (i > flushIndex) { - queue.splice(i, 1); - } -} -function queuePostFlushCb(cb) { - if (!isArray(cb)) { - if (!activePostFlushCbs || !activePostFlushCbs.includes( - cb, - cb.allowRecurse ? postFlushIndex + 1 : postFlushIndex - )) { - pendingPostFlushCbs.push(cb); - } - } else { - pendingPostFlushCbs.push(...cb); - } - queueFlush(); -} -function flushPreFlushCbs(instance, seen, i = isFlushing ? flushIndex + 1 : 0) { - if (true) { - seen = seen || /* @__PURE__ */ new Map(); - } - for (; i < queue.length; i++) { - const cb = queue[i]; - if (cb && cb.pre) { - if (instance && cb.id !== instance.uid) { - continue; - } - if (checkRecursiveUpdates(seen, cb)) { - continue; - } - queue.splice(i, 1); - i--; - cb(); - } - } -} -function flushPostFlushCbs(seen) { - if (pendingPostFlushCbs.length) { - const deduped = [...new Set(pendingPostFlushCbs)].sort( - (a, b) => getId(a) - getId(b) - ); - pendingPostFlushCbs.length = 0; - if (activePostFlushCbs) { - activePostFlushCbs.push(...deduped); - return; - } - activePostFlushCbs = deduped; - if (true) { - seen = seen || /* @__PURE__ */ new Map(); - } - for (postFlushIndex = 0; postFlushIndex < activePostFlushCbs.length; postFlushIndex++) { - const cb = activePostFlushCbs[postFlushIndex]; - if (checkRecursiveUpdates(seen, cb)) { - continue; - } - if (cb.active !== false) cb(); - } - activePostFlushCbs = null; - postFlushIndex = 0; - } -} -var getId = (job) => job.id == null ? Infinity : job.id; -var comparator = (a, b) => { - const diff = getId(a) - getId(b); - if (diff === 0) { - if (a.pre && !b.pre) return -1; - if (b.pre && !a.pre) return 1; - } - return diff; -}; -function flushJobs(seen) { - isFlushPending = false; - isFlushing = true; - if (true) { - seen = seen || /* @__PURE__ */ new Map(); - } - queue.sort(comparator); - const check = true ? (job) => checkRecursiveUpdates(seen, job) : NOOP; - try { - for (flushIndex = 0; flushIndex < queue.length; flushIndex++) { - const job = queue[flushIndex]; - if (job && job.active !== false) { - if (check(job)) { - continue; - } - callWithErrorHandling(job, null, 14); - } - } - } finally { - flushIndex = 0; - queue.length = 0; - flushPostFlushCbs(seen); - isFlushing = false; - currentFlushPromise = null; - if (queue.length || pendingPostFlushCbs.length) { - flushJobs(seen); - } - } -} -function checkRecursiveUpdates(seen, fn) { - if (!seen.has(fn)) { - seen.set(fn, 1); - } else { - const count = seen.get(fn); - if (count > RECURSION_LIMIT) { - const instance = fn.ownerInstance; - const componentName = instance && getComponentName(instance.type); - handleError( - `Maximum recursive updates exceeded${componentName ? ` in component <${componentName}>` : ``}. This means you have a reactive effect that is mutating its own dependencies and thus recursively triggering itself. Possible sources include component template, render function, updated hook or watcher source function.`, - null, - 10 - ); - return true; - } else { - seen.set(fn, count + 1); - } - } -} -var isHmrUpdating = false; -var hmrDirtyComponents = /* @__PURE__ */ new Set(); -if (true) { - getGlobalThis().__VUE_HMR_RUNTIME__ = { - createRecord: tryWrap(createRecord), - rerender: tryWrap(rerender), - reload: tryWrap(reload) - }; -} -var map = /* @__PURE__ */ new Map(); -function registerHMR(instance) { - const id = instance.type.__hmrId; - let record = map.get(id); - if (!record) { - createRecord(id, instance.type); - record = map.get(id); - } - record.instances.add(instance); -} -function unregisterHMR(instance) { - map.get(instance.type.__hmrId).instances.delete(instance); -} -function createRecord(id, initialDef) { - if (map.has(id)) { - return false; - } - map.set(id, { - initialDef: normalizeClassComponent(initialDef), - instances: /* @__PURE__ */ new Set() - }); - return true; -} -function normalizeClassComponent(component) { - return isClassComponent(component) ? component.__vccOpts : component; -} -function rerender(id, newRender) { - const record = map.get(id); - if (!record) { - return; - } - record.initialDef.render = newRender; - [...record.instances].forEach((instance) => { - if (newRender) { - instance.render = newRender; - normalizeClassComponent(instance.type).render = newRender; - } - instance.renderCache = []; - isHmrUpdating = true; - instance.effect.dirty = true; - instance.update(); - isHmrUpdating = false; - }); -} -function reload(id, newComp) { - const record = map.get(id); - if (!record) return; - newComp = normalizeClassComponent(newComp); - updateComponentDef(record.initialDef, newComp); - const instances = [...record.instances]; - for (const instance of instances) { - const oldComp = normalizeClassComponent(instance.type); - if (!hmrDirtyComponents.has(oldComp)) { - if (oldComp !== record.initialDef) { - updateComponentDef(oldComp, newComp); - } - hmrDirtyComponents.add(oldComp); - } - instance.appContext.propsCache.delete(instance.type); - instance.appContext.emitsCache.delete(instance.type); - instance.appContext.optionsCache.delete(instance.type); - if (instance.ceReload) { - hmrDirtyComponents.add(oldComp); - instance.ceReload(newComp.styles); - hmrDirtyComponents.delete(oldComp); - } else if (instance.parent) { - instance.parent.effect.dirty = true; - queueJob(() => { - instance.parent.update(); - hmrDirtyComponents.delete(oldComp); - }); - } else if (instance.appContext.reload) { - instance.appContext.reload(); - } else if (typeof window !== "undefined") { - window.location.reload(); - } else { - console.warn( - "[HMR] Root or manually mounted instance modified. Full reload required." - ); - } - } - queuePostFlushCb(() => { - for (const instance of instances) { - hmrDirtyComponents.delete( - normalizeClassComponent(instance.type) - ); - } - }); -} -function updateComponentDef(oldComp, newComp) { - extend(oldComp, newComp); - for (const key in oldComp) { - if (key !== "__file" && !(key in newComp)) { - delete oldComp[key]; - } - } -} -function tryWrap(fn) { - return (id, arg) => { - try { - return fn(id, arg); - } catch (e) { - console.error(e); - console.warn( - `[HMR] Something went wrong during Vue component hot-reload. Full reload required.` - ); - } - }; -} -var devtools$1; -var buffer = []; -var devtoolsNotInstalled = false; -function emit$1(event, ...args) { - if (devtools$1) { - devtools$1.emit(event, ...args); - } else if (!devtoolsNotInstalled) { - buffer.push({ event, args }); - } -} -function setDevtoolsHook$1(hook, target) { - var _a, _b; - devtools$1 = hook; - if (devtools$1) { - devtools$1.enabled = true; - buffer.forEach(({ event, args }) => devtools$1.emit(event, ...args)); - buffer = []; - } else if ( - // handle late devtools injection - only do this if we are in an actual - // browser environment to avoid the timer handle stalling test runner exit - // (#4815) - typeof window !== "undefined" && // some envs mock window but not fully - window.HTMLElement && // also exclude jsdom - // eslint-disable-next-line no-restricted-syntax - !((_b = (_a = window.navigator) == null ? void 0 : _a.userAgent) == null ? void 0 : _b.includes("jsdom")) - ) { - const replay = target.__VUE_DEVTOOLS_HOOK_REPLAY__ = target.__VUE_DEVTOOLS_HOOK_REPLAY__ || []; - replay.push((newHook) => { - setDevtoolsHook$1(newHook, target); - }); - setTimeout(() => { - if (!devtools$1) { - target.__VUE_DEVTOOLS_HOOK_REPLAY__ = null; - devtoolsNotInstalled = true; - buffer = []; - } - }, 3e3); - } else { - devtoolsNotInstalled = true; - buffer = []; - } -} -function devtoolsInitApp(app, version2) { - emit$1("app:init", app, version2, { - Fragment, - Text, - Comment, - Static - }); -} -function devtoolsUnmountApp(app) { - emit$1("app:unmount", app); -} -var devtoolsComponentAdded = createDevtoolsComponentHook( - "component:added" - /* COMPONENT_ADDED */ -); -var devtoolsComponentUpdated = createDevtoolsComponentHook( - "component:updated" - /* COMPONENT_UPDATED */ -); -var _devtoolsComponentRemoved = createDevtoolsComponentHook( - "component:removed" - /* COMPONENT_REMOVED */ -); -var devtoolsComponentRemoved = (component) => { - if (devtools$1 && typeof devtools$1.cleanupBuffer === "function" && // remove the component if it wasn't buffered - !devtools$1.cleanupBuffer(component)) { - _devtoolsComponentRemoved(component); - } -}; -function createDevtoolsComponentHook(hook) { - return (component) => { - emit$1( - hook, - component.appContext.app, - component.uid, - component.parent ? component.parent.uid : void 0, - component - ); - }; -} -var devtoolsPerfStart = createDevtoolsPerformanceHook( - "perf:start" - /* PERFORMANCE_START */ -); -var devtoolsPerfEnd = createDevtoolsPerformanceHook( - "perf:end" - /* PERFORMANCE_END */ -); -function createDevtoolsPerformanceHook(hook) { - return (component, type, time) => { - emit$1(hook, component.appContext.app, component.uid, component, type, time); - }; -} -function devtoolsComponentEmit(component, event, params) { - emit$1( - "component:emit", - component.appContext.app, - component, - event, - params - ); -} -function emit(instance, event, ...rawArgs) { - if (instance.isUnmounted) return; - const props = instance.vnode.props || EMPTY_OBJ; - if (true) { - const { - emitsOptions, - propsOptions: [propsOptions] - } = instance; - if (emitsOptions) { - if (!(event in emitsOptions) && true) { - if (!propsOptions || !(toHandlerKey(event) in propsOptions)) { - warn$1( - `Component emitted event "${event}" but it is neither declared in the emits option nor as an "${toHandlerKey(event)}" prop.` - ); - } - } else { - const validator = emitsOptions[event]; - if (isFunction(validator)) { - const isValid = validator(...rawArgs); - if (!isValid) { - warn$1( - `Invalid event arguments: event validation failed for event "${event}".` - ); - } - } - } - } - } - let args = rawArgs; - const isModelListener2 = event.startsWith("update:"); - const modelArg = isModelListener2 && event.slice(7); - if (modelArg && modelArg in props) { - const modifiersKey = `${modelArg === "modelValue" ? "model" : modelArg}Modifiers`; - const { number, trim } = props[modifiersKey] || EMPTY_OBJ; - if (trim) { - args = rawArgs.map((a) => isString(a) ? a.trim() : a); - } - if (number) { - args = rawArgs.map(looseToNumber); - } - } - if (true) { - devtoolsComponentEmit(instance, event, args); - } - if (true) { - const lowerCaseEvent = event.toLowerCase(); - if (lowerCaseEvent !== event && props[toHandlerKey(lowerCaseEvent)]) { - warn$1( - `Event "${lowerCaseEvent}" is emitted in component ${formatComponentName( - instance, - instance.type - )} but the handler is registered for "${event}". Note that HTML attributes are case-insensitive and you cannot use v-on to listen to camelCase events when using in-DOM templates. You should probably use "${hyphenate( - event - )}" instead of "${event}".` - ); - } - } - let handlerName; - let handler = props[handlerName = toHandlerKey(event)] || // also try camelCase event handler (#2249) - props[handlerName = toHandlerKey(camelize(event))]; - if (!handler && isModelListener2) { - handler = props[handlerName = toHandlerKey(hyphenate(event))]; - } - if (handler) { - callWithAsyncErrorHandling( - handler, - instance, - 6, - args - ); - } - const onceHandler = props[handlerName + `Once`]; - if (onceHandler) { - if (!instance.emitted) { - instance.emitted = {}; - } else if (instance.emitted[handlerName]) { - return; - } - instance.emitted[handlerName] = true; - callWithAsyncErrorHandling( - onceHandler, - instance, - 6, - args - ); - } -} -function normalizeEmitsOptions(comp, appContext, asMixin = false) { - const cache = appContext.emitsCache; - const cached = cache.get(comp); - if (cached !== void 0) { - return cached; - } - const raw = comp.emits; - let normalized = {}; - let hasExtends = false; - if (__VUE_OPTIONS_API__ && !isFunction(comp)) { - const extendEmits = (raw2) => { - const normalizedFromExtend = normalizeEmitsOptions(raw2, appContext, true); - if (normalizedFromExtend) { - hasExtends = true; - extend(normalized, normalizedFromExtend); - } - }; - if (!asMixin && appContext.mixins.length) { - appContext.mixins.forEach(extendEmits); - } - if (comp.extends) { - extendEmits(comp.extends); - } - if (comp.mixins) { - comp.mixins.forEach(extendEmits); - } - } - if (!raw && !hasExtends) { - if (isObject(comp)) { - cache.set(comp, null); - } - return null; - } - if (isArray(raw)) { - raw.forEach((key) => normalized[key] = null); - } else { - extend(normalized, raw); - } - if (isObject(comp)) { - cache.set(comp, normalized); - } - return normalized; -} -function isEmitListener(options, key) { - if (!options || !isOn(key)) { - return false; - } - key = key.slice(2).replace(/Once$/, ""); - return hasOwn(options, key[0].toLowerCase() + key.slice(1)) || hasOwn(options, hyphenate(key)) || hasOwn(options, key); -} -var currentRenderingInstance = null; -var currentScopeId = null; -function setCurrentRenderingInstance(instance) { - const prev = currentRenderingInstance; - currentRenderingInstance = instance; - currentScopeId = instance && instance.type.__scopeId || null; - return prev; -} -function pushScopeId(id) { - currentScopeId = id; -} -function popScopeId() { - currentScopeId = null; -} -var withScopeId = (_id) => withCtx; -function withCtx(fn, ctx = currentRenderingInstance, isNonScopedSlot) { - if (!ctx) return fn; - if (fn._n) { - return fn; - } - const renderFnWithContext = (...args) => { - if (renderFnWithContext._d) { - setBlockTracking(-1); - } - const prevInstance = setCurrentRenderingInstance(ctx); - let res; - try { - res = fn(...args); - } finally { - setCurrentRenderingInstance(prevInstance); - if (renderFnWithContext._d) { - setBlockTracking(1); - } - } - if (true) { - devtoolsComponentUpdated(ctx); - } - return res; - }; - renderFnWithContext._n = true; - renderFnWithContext._c = true; - renderFnWithContext._d = true; - return renderFnWithContext; -} -var accessedAttrs = false; -function markAttrsAccessed() { - accessedAttrs = true; -} -function renderComponentRoot(instance) { - const { - type: Component, - vnode, - proxy, - withProxy, - propsOptions: [propsOptions], - slots, - attrs, - emit: emit2, - render: render2, - renderCache, - props, - data, - setupState, - ctx, - inheritAttrs - } = instance; - const prev = setCurrentRenderingInstance(instance); - let result; - let fallthroughAttrs; - if (true) { - accessedAttrs = false; - } - try { - if (vnode.shapeFlag & 4) { - const proxyToUse = withProxy || proxy; - const thisProxy = setupState.__isScriptSetup ? new Proxy(proxyToUse, { - get(target, key, receiver) { - warn$1( - `Property '${String( - key - )}' was accessed via 'this'. Avoid using 'this' in templates.` - ); - return Reflect.get(target, key, receiver); - } - }) : proxyToUse; - result = normalizeVNode( - render2.call( - thisProxy, - proxyToUse, - renderCache, - true ? shallowReadonly(props) : props, - setupState, - data, - ctx - ) - ); - fallthroughAttrs = attrs; - } else { - const render22 = Component; - if (attrs === props) { - markAttrsAccessed(); - } - result = normalizeVNode( - render22.length > 1 ? render22( - true ? shallowReadonly(props) : props, - true ? { - get attrs() { - markAttrsAccessed(); - return shallowReadonly(attrs); - }, - slots, - emit: emit2 - } : { attrs, slots, emit: emit2 } - ) : render22( - true ? shallowReadonly(props) : props, - null - ) - ); - fallthroughAttrs = Component.props ? attrs : getFunctionalFallthrough(attrs); - } - } catch (err) { - blockStack.length = 0; - handleError(err, instance, 1); - result = createVNode(Comment); - } - let root = result; - let setRoot = void 0; - if (result.patchFlag > 0 && result.patchFlag & 2048) { - [root, setRoot] = getChildRoot(result); - } - if (fallthroughAttrs && inheritAttrs !== false) { - const keys = Object.keys(fallthroughAttrs); - const { shapeFlag } = root; - if (keys.length) { - if (shapeFlag & (1 | 6)) { - if (propsOptions && keys.some(isModelListener)) { - fallthroughAttrs = filterModelListeners( - fallthroughAttrs, - propsOptions - ); - } - root = cloneVNode(root, fallthroughAttrs, false, true); - } else if (!accessedAttrs && root.type !== Comment) { - const allAttrs = Object.keys(attrs); - const eventAttrs = []; - const extraAttrs = []; - for (let i = 0, l = allAttrs.length; i < l; i++) { - const key = allAttrs[i]; - if (isOn(key)) { - if (!isModelListener(key)) { - eventAttrs.push(key[2].toLowerCase() + key.slice(3)); - } - } else { - extraAttrs.push(key); - } - } - if (extraAttrs.length) { - warn$1( - `Extraneous non-props attributes (${extraAttrs.join(", ")}) were passed to component but could not be automatically inherited because component renders fragment or text root nodes.` - ); - } - if (eventAttrs.length) { - warn$1( - `Extraneous non-emits event listeners (${eventAttrs.join(", ")}) were passed to component but could not be automatically inherited because component renders fragment or text root nodes. If the listener is intended to be a component custom event listener only, declare it using the "emits" option.` - ); - } - } - } - } - if (vnode.dirs) { - if (!isElementRoot(root)) { - warn$1( - `Runtime directive used on component with non-element root node. The directives will not function as intended.` - ); - } - root = cloneVNode(root, null, false, true); - root.dirs = root.dirs ? root.dirs.concat(vnode.dirs) : vnode.dirs; - } - if (vnode.transition) { - if (!isElementRoot(root)) { - warn$1( - `Component inside renders non-element root node that cannot be animated.` - ); - } - root.transition = vnode.transition; - } - if (setRoot) { - setRoot(root); - } else { - result = root; - } - setCurrentRenderingInstance(prev); - return result; -} -var getChildRoot = (vnode) => { - const rawChildren = vnode.children; - const dynamicChildren = vnode.dynamicChildren; - const childRoot = filterSingleRoot(rawChildren, false); - if (!childRoot) { - return [vnode, void 0]; - } else if (childRoot.patchFlag > 0 && childRoot.patchFlag & 2048) { - return getChildRoot(childRoot); - } - const index = rawChildren.indexOf(childRoot); - const dynamicIndex = dynamicChildren ? dynamicChildren.indexOf(childRoot) : -1; - const setRoot = (updatedRoot) => { - rawChildren[index] = updatedRoot; - if (dynamicChildren) { - if (dynamicIndex > -1) { - dynamicChildren[dynamicIndex] = updatedRoot; - } else if (updatedRoot.patchFlag > 0) { - vnode.dynamicChildren = [...dynamicChildren, updatedRoot]; - } - } - }; - return [normalizeVNode(childRoot), setRoot]; -}; -function filterSingleRoot(children, recurse = true) { - let singleRoot; - for (let i = 0; i < children.length; i++) { - const child = children[i]; - if (isVNode(child)) { - if (child.type !== Comment || child.children === "v-if") { - if (singleRoot) { - return; - } else { - singleRoot = child; - if (recurse && singleRoot.patchFlag > 0 && singleRoot.patchFlag & 2048) { - return filterSingleRoot(singleRoot.children); - } - } - } - } else { - return; - } - } - return singleRoot; -} -var getFunctionalFallthrough = (attrs) => { - let res; - for (const key in attrs) { - if (key === "class" || key === "style" || isOn(key)) { - (res || (res = {}))[key] = attrs[key]; - } - } - return res; -}; -var filterModelListeners = (attrs, props) => { - const res = {}; - for (const key in attrs) { - if (!isModelListener(key) || !(key.slice(9) in props)) { - res[key] = attrs[key]; - } - } - return res; -}; -var isElementRoot = (vnode) => { - return vnode.shapeFlag & (6 | 1) || vnode.type === Comment; -}; -function shouldUpdateComponent(prevVNode, nextVNode, optimized) { - const { props: prevProps, children: prevChildren, component } = prevVNode; - const { props: nextProps, children: nextChildren, patchFlag } = nextVNode; - const emits = component.emitsOptions; - if ((prevChildren || nextChildren) && isHmrUpdating) { - return true; - } - if (nextVNode.dirs || nextVNode.transition) { - return true; - } - if (optimized && patchFlag >= 0) { - if (patchFlag & 1024) { - return true; - } - if (patchFlag & 16) { - if (!prevProps) { - return !!nextProps; - } - return hasPropsChanged(prevProps, nextProps, emits); - } else if (patchFlag & 8) { - const dynamicProps = nextVNode.dynamicProps; - for (let i = 0; i < dynamicProps.length; i++) { - const key = dynamicProps[i]; - if (nextProps[key] !== prevProps[key] && !isEmitListener(emits, key)) { - return true; - } - } - } - } else { - if (prevChildren || nextChildren) { - if (!nextChildren || !nextChildren.$stable) { - return true; - } - } - if (prevProps === nextProps) { - return false; - } - if (!prevProps) { - return !!nextProps; - } - if (!nextProps) { - return true; - } - return hasPropsChanged(prevProps, nextProps, emits); - } - return false; -} -function hasPropsChanged(prevProps, nextProps, emitsOptions) { - const nextKeys = Object.keys(nextProps); - if (nextKeys.length !== Object.keys(prevProps).length) { - return true; - } - for (let i = 0; i < nextKeys.length; i++) { - const key = nextKeys[i]; - if (nextProps[key] !== prevProps[key] && !isEmitListener(emitsOptions, key)) { - return true; - } - } - return false; -} -function updateHOCHostEl({ vnode, parent }, el) { - while (parent) { - const root = parent.subTree; - if (root.suspense && root.suspense.activeBranch === vnode) { - root.el = vnode.el; - } - if (root === vnode) { - (vnode = parent.vnode).el = el; - parent = parent.parent; - } else { - break; - } - } -} -var COMPONENTS = "components"; -var DIRECTIVES = "directives"; -function resolveComponent(name, maybeSelfReference) { - return resolveAsset(COMPONENTS, name, true, maybeSelfReference) || name; -} -var NULL_DYNAMIC_COMPONENT = Symbol.for("v-ndc"); -function resolveDynamicComponent(component) { - if (isString(component)) { - return resolveAsset(COMPONENTS, component, false) || component; - } else { - return component || NULL_DYNAMIC_COMPONENT; - } -} -function resolveDirective(name) { - return resolveAsset(DIRECTIVES, name); -} -function resolveAsset(type, name, warnMissing = true, maybeSelfReference = false) { - const instance = currentRenderingInstance || currentInstance; - if (instance) { - const Component = instance.type; - if (type === COMPONENTS) { - const selfName = getComponentName( - Component, - false - ); - if (selfName && (selfName === name || selfName === camelize(name) || selfName === capitalize(camelize(name)))) { - return Component; - } - } - const res = ( - // local registration - // check instance[type] first which is resolved for options API - resolve(instance[type] || Component[type], name) || // global registration - resolve(instance.appContext[type], name) - ); - if (!res && maybeSelfReference) { - return Component; - } - if (warnMissing && !res) { - const extra = type === COMPONENTS ? ` -If this is a native custom element, make sure to exclude it from component resolution via compilerOptions.isCustomElement.` : ``; - warn$1(`Failed to resolve ${type.slice(0, -1)}: ${name}${extra}`); - } - return res; - } else if (true) { - warn$1( - `resolve${capitalize(type.slice(0, -1))} can only be used in render() or setup().` - ); - } -} -function resolve(registry, name) { - return registry && (registry[name] || registry[camelize(name)] || registry[capitalize(camelize(name))]); -} -var isSuspense = (type) => type.__isSuspense; -var suspenseId = 0; -var SuspenseImpl = { - name: "Suspense", - // In order to make Suspense tree-shakable, we need to avoid importing it - // directly in the renderer. The renderer checks for the __isSuspense flag - // on a vnode's type and calls the `process` method, passing in renderer - // internals. - __isSuspense: true, - process(n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized, rendererInternals) { - if (n1 == null) { - mountSuspense( - n2, - container, - anchor, - parentComponent, - parentSuspense, - namespace, - slotScopeIds, - optimized, - rendererInternals - ); - } else { - if (parentSuspense && parentSuspense.deps > 0 && !n1.suspense.isInFallback) { - n2.suspense = n1.suspense; - n2.suspense.vnode = n2; - n2.el = n1.el; - return; - } - patchSuspense( - n1, - n2, - container, - anchor, - parentComponent, - namespace, - slotScopeIds, - optimized, - rendererInternals - ); - } - }, - hydrate: hydrateSuspense, - create: createSuspenseBoundary, - normalize: normalizeSuspenseChildren -}; -var Suspense = SuspenseImpl; -function triggerEvent(vnode, name) { - const eventListener = vnode.props && vnode.props[name]; - if (isFunction(eventListener)) { - eventListener(); - } -} -function mountSuspense(vnode, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized, rendererInternals) { - const { - p: patch, - o: { createElement } - } = rendererInternals; - const hiddenContainer = createElement("div"); - const suspense = vnode.suspense = createSuspenseBoundary( - vnode, - parentSuspense, - parentComponent, - container, - hiddenContainer, - anchor, - namespace, - slotScopeIds, - optimized, - rendererInternals - ); - patch( - null, - suspense.pendingBranch = vnode.ssContent, - hiddenContainer, - null, - parentComponent, - suspense, - namespace, - slotScopeIds - ); - if (suspense.deps > 0) { - triggerEvent(vnode, "onPending"); - triggerEvent(vnode, "onFallback"); - patch( - null, - vnode.ssFallback, - container, - anchor, - parentComponent, - null, - // fallback tree will not have suspense context - namespace, - slotScopeIds - ); - setActiveBranch(suspense, vnode.ssFallback); - } else { - suspense.resolve(false, true); - } -} -function patchSuspense(n1, n2, container, anchor, parentComponent, namespace, slotScopeIds, optimized, { p: patch, um: unmount, o: { createElement } }) { - const suspense = n2.suspense = n1.suspense; - suspense.vnode = n2; - n2.el = n1.el; - const newBranch = n2.ssContent; - const newFallback = n2.ssFallback; - const { activeBranch, pendingBranch, isInFallback, isHydrating } = suspense; - if (pendingBranch) { - suspense.pendingBranch = newBranch; - if (isSameVNodeType(newBranch, pendingBranch)) { - patch( - pendingBranch, - newBranch, - suspense.hiddenContainer, - null, - parentComponent, - suspense, - namespace, - slotScopeIds, - optimized - ); - if (suspense.deps <= 0) { - suspense.resolve(); - } else if (isInFallback) { - if (!isHydrating) { - patch( - activeBranch, - newFallback, - container, - anchor, - parentComponent, - null, - // fallback tree will not have suspense context - namespace, - slotScopeIds, - optimized - ); - setActiveBranch(suspense, newFallback); - } - } - } else { - suspense.pendingId = suspenseId++; - if (isHydrating) { - suspense.isHydrating = false; - suspense.activeBranch = pendingBranch; - } else { - unmount(pendingBranch, parentComponent, suspense); - } - suspense.deps = 0; - suspense.effects.length = 0; - suspense.hiddenContainer = createElement("div"); - if (isInFallback) { - patch( - null, - newBranch, - suspense.hiddenContainer, - null, - parentComponent, - suspense, - namespace, - slotScopeIds, - optimized - ); - if (suspense.deps <= 0) { - suspense.resolve(); - } else { - patch( - activeBranch, - newFallback, - container, - anchor, - parentComponent, - null, - // fallback tree will not have suspense context - namespace, - slotScopeIds, - optimized - ); - setActiveBranch(suspense, newFallback); - } - } else if (activeBranch && isSameVNodeType(newBranch, activeBranch)) { - patch( - activeBranch, - newBranch, - container, - anchor, - parentComponent, - suspense, - namespace, - slotScopeIds, - optimized - ); - suspense.resolve(true); - } else { - patch( - null, - newBranch, - suspense.hiddenContainer, - null, - parentComponent, - suspense, - namespace, - slotScopeIds, - optimized - ); - if (suspense.deps <= 0) { - suspense.resolve(); - } - } - } - } else { - if (activeBranch && isSameVNodeType(newBranch, activeBranch)) { - patch( - activeBranch, - newBranch, - container, - anchor, - parentComponent, - suspense, - namespace, - slotScopeIds, - optimized - ); - setActiveBranch(suspense, newBranch); - } else { - triggerEvent(n2, "onPending"); - suspense.pendingBranch = newBranch; - if (newBranch.shapeFlag & 512) { - suspense.pendingId = newBranch.component.suspenseId; - } else { - suspense.pendingId = suspenseId++; - } - patch( - null, - newBranch, - suspense.hiddenContainer, - null, - parentComponent, - suspense, - namespace, - slotScopeIds, - optimized - ); - if (suspense.deps <= 0) { - suspense.resolve(); - } else { - const { timeout, pendingId } = suspense; - if (timeout > 0) { - setTimeout(() => { - if (suspense.pendingId === pendingId) { - suspense.fallback(newFallback); - } - }, timeout); - } else if (timeout === 0) { - suspense.fallback(newFallback); - } - } - } - } -} -var hasWarned = false; -function createSuspenseBoundary(vnode, parentSuspense, parentComponent, container, hiddenContainer, anchor, namespace, slotScopeIds, optimized, rendererInternals, isHydrating = false) { - if (!hasWarned) { - hasWarned = true; - console[console.info ? "info" : "log"]( - ` is an experimental feature and its API will likely change.` - ); - } - const { - p: patch, - m: move, - um: unmount, - n: next, - o: { parentNode, remove: remove2 } - } = rendererInternals; - let parentSuspenseId; - const isSuspensible = isVNodeSuspensible(vnode); - if (isSuspensible) { - if (parentSuspense && parentSuspense.pendingBranch) { - parentSuspenseId = parentSuspense.pendingId; - parentSuspense.deps++; - } - } - const timeout = vnode.props ? toNumber(vnode.props.timeout) : void 0; - if (true) { - assertNumber(timeout, `Suspense timeout`); - } - const initialAnchor = anchor; - const suspense = { - vnode, - parent: parentSuspense, - parentComponent, - namespace, - container, - hiddenContainer, - deps: 0, - pendingId: suspenseId++, - timeout: typeof timeout === "number" ? timeout : -1, - activeBranch: null, - pendingBranch: null, - isInFallback: !isHydrating, - isHydrating, - isUnmounted: false, - effects: [], - resolve(resume = false, sync = false) { - if (true) { - if (!resume && !suspense.pendingBranch) { - throw new Error( - `suspense.resolve() is called without a pending branch.` - ); - } - if (suspense.isUnmounted) { - throw new Error( - `suspense.resolve() is called on an already unmounted suspense boundary.` - ); - } - } - const { - vnode: vnode2, - activeBranch, - pendingBranch, - pendingId, - effects, - parentComponent: parentComponent2, - container: container2 - } = suspense; - let delayEnter = false; - if (suspense.isHydrating) { - suspense.isHydrating = false; - } else if (!resume) { - delayEnter = activeBranch && pendingBranch.transition && pendingBranch.transition.mode === "out-in"; - if (delayEnter) { - activeBranch.transition.afterLeave = () => { - if (pendingId === suspense.pendingId) { - move( - pendingBranch, - container2, - anchor === initialAnchor ? next(activeBranch) : anchor, - 0 - ); - queuePostFlushCb(effects); - } - }; - } - if (activeBranch) { - if (parentNode(activeBranch.el) !== suspense.hiddenContainer) { - anchor = next(activeBranch); - } - unmount(activeBranch, parentComponent2, suspense, true); - } - if (!delayEnter) { - move(pendingBranch, container2, anchor, 0); - } - } - setActiveBranch(suspense, pendingBranch); - suspense.pendingBranch = null; - suspense.isInFallback = false; - let parent = suspense.parent; - let hasUnresolvedAncestor = false; - while (parent) { - if (parent.pendingBranch) { - parent.effects.push(...effects); - hasUnresolvedAncestor = true; - break; - } - parent = parent.parent; - } - if (!hasUnresolvedAncestor && !delayEnter) { - queuePostFlushCb(effects); - } - suspense.effects = []; - if (isSuspensible) { - if (parentSuspense && parentSuspense.pendingBranch && parentSuspenseId === parentSuspense.pendingId) { - parentSuspense.deps--; - if (parentSuspense.deps === 0 && !sync) { - parentSuspense.resolve(); - } - } - } - triggerEvent(vnode2, "onResolve"); - }, - fallback(fallbackVNode) { - if (!suspense.pendingBranch) { - return; - } - const { vnode: vnode2, activeBranch, parentComponent: parentComponent2, container: container2, namespace: namespace2 } = suspense; - triggerEvent(vnode2, "onFallback"); - const anchor2 = next(activeBranch); - const mountFallback = () => { - if (!suspense.isInFallback) { - return; - } - patch( - null, - fallbackVNode, - container2, - anchor2, - parentComponent2, - null, - // fallback tree will not have suspense context - namespace2, - slotScopeIds, - optimized - ); - setActiveBranch(suspense, fallbackVNode); - }; - const delayEnter = fallbackVNode.transition && fallbackVNode.transition.mode === "out-in"; - if (delayEnter) { - activeBranch.transition.afterLeave = mountFallback; - } - suspense.isInFallback = true; - unmount( - activeBranch, - parentComponent2, - null, - // no suspense so unmount hooks fire now - true - // shouldRemove - ); - if (!delayEnter) { - mountFallback(); - } - }, - move(container2, anchor2, type) { - suspense.activeBranch && move(suspense.activeBranch, container2, anchor2, type); - suspense.container = container2; - }, - next() { - return suspense.activeBranch && next(suspense.activeBranch); - }, - registerDep(instance, setupRenderEffect, optimized2) { - const isInPendingSuspense = !!suspense.pendingBranch; - if (isInPendingSuspense) { - suspense.deps++; - } - const hydratedEl = instance.vnode.el; - instance.asyncDep.catch((err) => { - handleError(err, instance, 0); - }).then((asyncSetupResult) => { - if (instance.isUnmounted || suspense.isUnmounted || suspense.pendingId !== instance.suspenseId) { - return; - } - instance.asyncResolved = true; - const { vnode: vnode2 } = instance; - if (true) { - pushWarningContext(vnode2); - } - handleSetupResult(instance, asyncSetupResult, false); - if (hydratedEl) { - vnode2.el = hydratedEl; - } - const placeholder = !hydratedEl && instance.subTree.el; - setupRenderEffect( - instance, - vnode2, - // component may have been moved before resolve. - // if this is not a hydration, instance.subTree will be the comment - // placeholder. - parentNode(hydratedEl || instance.subTree.el), - // anchor will not be used if this is hydration, so only need to - // consider the comment placeholder case. - hydratedEl ? null : next(instance.subTree), - suspense, - namespace, - optimized2 - ); - if (placeholder) { - remove2(placeholder); - } - updateHOCHostEl(instance, vnode2.el); - if (true) { - popWarningContext(); - } - if (isInPendingSuspense && --suspense.deps === 0) { - suspense.resolve(); - } - }); - }, - unmount(parentSuspense2, doRemove) { - suspense.isUnmounted = true; - if (suspense.activeBranch) { - unmount( - suspense.activeBranch, - parentComponent, - parentSuspense2, - doRemove - ); - } - if (suspense.pendingBranch) { - unmount( - suspense.pendingBranch, - parentComponent, - parentSuspense2, - doRemove - ); - } - } - }; - return suspense; -} -function hydrateSuspense(node, vnode, parentComponent, parentSuspense, namespace, slotScopeIds, optimized, rendererInternals, hydrateNode) { - const suspense = vnode.suspense = createSuspenseBoundary( - vnode, - parentSuspense, - parentComponent, - node.parentNode, - // eslint-disable-next-line no-restricted-globals - document.createElement("div"), - null, - namespace, - slotScopeIds, - optimized, - rendererInternals, - true - ); - const result = hydrateNode( - node, - suspense.pendingBranch = vnode.ssContent, - parentComponent, - suspense, - slotScopeIds, - optimized - ); - if (suspense.deps === 0) { - suspense.resolve(false, true); - } - return result; -} -function normalizeSuspenseChildren(vnode) { - const { shapeFlag, children } = vnode; - const isSlotChildren = shapeFlag & 32; - vnode.ssContent = normalizeSuspenseSlot( - isSlotChildren ? children.default : children - ); - vnode.ssFallback = isSlotChildren ? normalizeSuspenseSlot(children.fallback) : createVNode(Comment); -} -function normalizeSuspenseSlot(s) { - let block; - if (isFunction(s)) { - const trackBlock = isBlockTreeEnabled && s._c; - if (trackBlock) { - s._d = false; - openBlock(); - } - s = s(); - if (trackBlock) { - s._d = true; - block = currentBlock; - closeBlock(); - } - } - if (isArray(s)) { - const singleChild = filterSingleRoot(s); - if (!singleChild && s.filter((child) => child !== NULL_DYNAMIC_COMPONENT).length > 0) { - warn$1(` slots expect a single root node.`); - } - s = singleChild; - } - s = normalizeVNode(s); - if (block && !s.dynamicChildren) { - s.dynamicChildren = block.filter((c) => c !== s); - } - return s; -} -function queueEffectWithSuspense(fn, suspense) { - if (suspense && suspense.pendingBranch) { - if (isArray(fn)) { - suspense.effects.push(...fn); - } else { - suspense.effects.push(fn); - } - } else { - queuePostFlushCb(fn); - } -} -function setActiveBranch(suspense, branch) { - suspense.activeBranch = branch; - const { vnode, parentComponent } = suspense; - let el = branch.el; - while (!el && branch.component) { - branch = branch.component.subTree; - el = branch.el; - } - vnode.el = el; - if (parentComponent && parentComponent.subTree === vnode) { - parentComponent.vnode.el = el; - updateHOCHostEl(parentComponent, el); - } -} -function isVNodeSuspensible(vnode) { - const suspensible = vnode.props && vnode.props.suspensible; - return suspensible != null && suspensible !== false; -} -function injectHook(type, hook, target = currentInstance, prepend = false) { - if (target) { - const hooks = target[type] || (target[type] = []); - const wrappedHook = hook.__weh || (hook.__weh = (...args) => { - pauseTracking(); - const reset = setCurrentInstance(target); - const res = callWithAsyncErrorHandling(hook, target, type, args); - reset(); - resetTracking(); - return res; - }); - if (prepend) { - hooks.unshift(wrappedHook); - } else { - hooks.push(wrappedHook); - } - return wrappedHook; - } else if (true) { - const apiName = toHandlerKey(ErrorTypeStrings$1[type].replace(/ hook$/, "")); - warn$1( - `${apiName} is called when there is no active component instance to be associated with. Lifecycle injection APIs can only be used during execution of setup(). If you are using async setup(), make sure to register lifecycle hooks before the first await statement.` - ); - } -} -var createHook = (lifecycle) => (hook, target = currentInstance) => { - if (!isInSSRComponentSetup || lifecycle === "sp") { - injectHook(lifecycle, (...args) => hook(...args), target); - } -}; -var onBeforeMount = createHook("bm"); -var onMounted = createHook("m"); -var onBeforeUpdate = createHook("bu"); -var onUpdated = createHook("u"); -var onBeforeUnmount = createHook("bum"); -var onUnmounted = createHook("um"); -var onServerPrefetch = createHook("sp"); -var onRenderTriggered = createHook( - "rtg" -); -var onRenderTracked = createHook( - "rtc" -); -function onErrorCaptured(hook, target = currentInstance) { - injectHook("ec", hook, target); -} -function validateDirectiveName(name) { - if (isBuiltInDirective(name)) { - warn$1("Do not use built-in directive ids as custom directive id: " + name); - } -} -function withDirectives(vnode, directives) { - if (currentRenderingInstance === null) { - warn$1(`withDirectives can only be used inside render functions.`); - return vnode; - } - const instance = getComponentPublicInstance(currentRenderingInstance); - const bindings = vnode.dirs || (vnode.dirs = []); - for (let i = 0; i < directives.length; i++) { - let [dir, value, arg, modifiers = EMPTY_OBJ] = directives[i]; - if (dir) { - if (isFunction(dir)) { - dir = { - mounted: dir, - updated: dir - }; - } - if (dir.deep) { - traverse(value); - } - bindings.push({ - dir, - instance, - value, - oldValue: void 0, - arg, - modifiers - }); - } - } - return vnode; -} -function invokeDirectiveHook(vnode, prevVNode, instance, name) { - const bindings = vnode.dirs; - const oldBindings = prevVNode && prevVNode.dirs; - for (let i = 0; i < bindings.length; i++) { - const binding = bindings[i]; - if (oldBindings) { - binding.oldValue = oldBindings[i].value; - } - let hook = binding.dir[name]; - if (hook) { - pauseTracking(); - callWithAsyncErrorHandling(hook, instance, 8, [ - vnode.el, - binding, - vnode, - prevVNode - ]); - resetTracking(); - } - } -} -function renderList(source, renderItem, cache, index) { - let ret; - const cached = cache && cache[index]; - if (isArray(source) || isString(source)) { - ret = new Array(source.length); - for (let i = 0, l = source.length; i < l; i++) { - ret[i] = renderItem(source[i], i, void 0, cached && cached[i]); - } - } else if (typeof source === "number") { - if (!Number.isInteger(source)) { - warn$1(`The v-for range expect an integer value but got ${source}.`); - } - ret = new Array(source); - for (let i = 0; i < source; i++) { - ret[i] = renderItem(i + 1, i, void 0, cached && cached[i]); - } - } else if (isObject(source)) { - if (source[Symbol.iterator]) { - ret = Array.from( - source, - (item, i) => renderItem(item, i, void 0, cached && cached[i]) - ); - } else { - const keys = Object.keys(source); - ret = new Array(keys.length); - for (let i = 0, l = keys.length; i < l; i++) { - const key = keys[i]; - ret[i] = renderItem(source[key], key, i, cached && cached[i]); - } - } - } else { - ret = []; - } - if (cache) { - cache[index] = ret; - } - return ret; -} -function createSlots(slots, dynamicSlots) { - for (let i = 0; i < dynamicSlots.length; i++) { - const slot = dynamicSlots[i]; - if (isArray(slot)) { - for (let j = 0; j < slot.length; j++) { - slots[slot[j].name] = slot[j].fn; - } - } else if (slot) { - slots[slot.name] = slot.key ? (...args) => { - const res = slot.fn(...args); - if (res) res.key = slot.key; - return res; - } : slot.fn; - } - } - return slots; -} -function defineComponent(options, extraOptions) { - return isFunction(options) ? ( - // #8326: extend call and options.name access are considered side-effects - // by Rollup, so we have to wrap it in a pure-annotated IIFE. - (() => extend({ name: options.name }, extraOptions, { setup: options }))() - ) : options; -} -var isAsyncWrapper = (i) => !!i.type.__asyncLoader; -function defineAsyncComponent(source) { - if (isFunction(source)) { - source = { loader: source }; - } - const { - loader, - loadingComponent, - errorComponent, - delay = 200, - timeout, - // undefined = never times out - suspensible = true, - onError: userOnError - } = source; - let pendingRequest = null; - let resolvedComp; - let retries = 0; - const retry = () => { - retries++; - pendingRequest = null; - return load(); - }; - const load = () => { - let thisRequest; - return pendingRequest || (thisRequest = pendingRequest = loader().catch((err) => { - err = err instanceof Error ? err : new Error(String(err)); - if (userOnError) { - return new Promise((resolve2, reject) => { - const userRetry = () => resolve2(retry()); - const userFail = () => reject(err); - userOnError(err, userRetry, userFail, retries + 1); - }); - } else { - throw err; - } - }).then((comp) => { - if (thisRequest !== pendingRequest && pendingRequest) { - return pendingRequest; - } - if (!comp) { - warn$1( - `Async component loader resolved to undefined. If you are using retry(), make sure to return its return value.` - ); - } - if (comp && (comp.__esModule || comp[Symbol.toStringTag] === "Module")) { - comp = comp.default; - } - if (comp && !isObject(comp) && !isFunction(comp)) { - throw new Error(`Invalid async component load result: ${comp}`); - } - resolvedComp = comp; - return comp; - })); - }; - return defineComponent({ - name: "AsyncComponentWrapper", - __asyncLoader: load, - get __asyncResolved() { - return resolvedComp; - }, - setup() { - const instance = currentInstance; - if (resolvedComp) { - return () => createInnerComp(resolvedComp, instance); - } - const onError = (err) => { - pendingRequest = null; - handleError( - err, - instance, - 13, - !errorComponent - ); - }; - if (suspensible && instance.suspense || isInSSRComponentSetup) { - return load().then((comp) => { - return () => createInnerComp(comp, instance); - }).catch((err) => { - onError(err); - return () => errorComponent ? createVNode(errorComponent, { - error: err - }) : null; - }); - } - const loaded = ref(false); - const error = ref(); - const delayed = ref(!!delay); - if (delay) { - setTimeout(() => { - delayed.value = false; - }, delay); - } - if (timeout != null) { - setTimeout(() => { - if (!loaded.value && !error.value) { - const err = new Error( - `Async component timed out after ${timeout}ms.` - ); - onError(err); - error.value = err; - } - }, timeout); - } - load().then(() => { - loaded.value = true; - if (instance.parent && isKeepAlive(instance.parent.vnode)) { - instance.parent.effect.dirty = true; - queueJob(instance.parent.update); - } - }).catch((err) => { - onError(err); - error.value = err; - }); - return () => { - if (loaded.value && resolvedComp) { - return createInnerComp(resolvedComp, instance); - } else if (error.value && errorComponent) { - return createVNode(errorComponent, { - error: error.value - }); - } else if (loadingComponent && !delayed.value) { - return createVNode(loadingComponent); - } - }; - } - }); -} -function createInnerComp(comp, parent) { - const { ref: ref2, props, children, ce } = parent.vnode; - const vnode = createVNode(comp, props, children); - vnode.ref = ref2; - vnode.ce = ce; - delete parent.vnode.ce; - return vnode; -} -function renderSlot(slots, name, props = {}, fallback, noSlotted) { - if (currentRenderingInstance.isCE || currentRenderingInstance.parent && isAsyncWrapper(currentRenderingInstance.parent) && currentRenderingInstance.parent.isCE) { - if (name !== "default") props.name = name; - return createVNode("slot", props, fallback && fallback()); - } - let slot = slots[name]; - if (slot && slot.length > 1) { - warn$1( - `SSR-optimized slot function detected in a non-SSR-optimized render function. You need to mark this component with $dynamic-slots in the parent template.` - ); - slot = () => []; - } - if (slot && slot._c) { - slot._d = false; - } - openBlock(); - const validSlotContent = slot && ensureValidVNode(slot(props)); - const rendered = createBlock( - Fragment, - { - key: props.key || // slot content array of a dynamic conditional slot may have a branch - // key attached in the `createSlots` helper, respect that - validSlotContent && validSlotContent.key || `_${name}` - }, - validSlotContent || (fallback ? fallback() : []), - validSlotContent && slots._ === 1 ? 64 : -2 - ); - if (!noSlotted && rendered.scopeId) { - rendered.slotScopeIds = [rendered.scopeId + "-s"]; - } - if (slot && slot._c) { - slot._d = true; - } - return rendered; -} -function ensureValidVNode(vnodes) { - return vnodes.some((child) => { - if (!isVNode(child)) return true; - if (child.type === Comment) return false; - if (child.type === Fragment && !ensureValidVNode(child.children)) - return false; - return true; - }) ? vnodes : null; -} -function toHandlers(obj, preserveCaseIfNecessary) { - const ret = {}; - if (!isObject(obj)) { - warn$1(`v-on with no argument expects an object value.`); - return ret; - } - for (const key in obj) { - ret[preserveCaseIfNecessary && /[A-Z]/.test(key) ? `on:${key}` : toHandlerKey(key)] = obj[key]; - } - return ret; -} -var getPublicInstance = (i) => { - if (!i) return null; - if (isStatefulComponent(i)) return getComponentPublicInstance(i); - return getPublicInstance(i.parent); -}; -var publicPropertiesMap = ( - // Move PURE marker to new line to workaround compiler discarding it - // due to type annotation - extend(/* @__PURE__ */ Object.create(null), { - $: (i) => i, - $el: (i) => i.vnode.el, - $data: (i) => i.data, - $props: (i) => true ? shallowReadonly(i.props) : i.props, - $attrs: (i) => true ? shallowReadonly(i.attrs) : i.attrs, - $slots: (i) => true ? shallowReadonly(i.slots) : i.slots, - $refs: (i) => true ? shallowReadonly(i.refs) : i.refs, - $parent: (i) => getPublicInstance(i.parent), - $root: (i) => getPublicInstance(i.root), - $emit: (i) => i.emit, - $options: (i) => __VUE_OPTIONS_API__ ? resolveMergedOptions(i) : i.type, - $forceUpdate: (i) => i.f || (i.f = () => { - i.effect.dirty = true; - queueJob(i.update); - }), - $nextTick: (i) => i.n || (i.n = nextTick.bind(i.proxy)), - $watch: (i) => __VUE_OPTIONS_API__ ? instanceWatch.bind(i) : NOOP - }) -); -var isReservedPrefix = (key) => key === "_" || key === "$"; -var hasSetupBinding = (state, key) => state !== EMPTY_OBJ && !state.__isScriptSetup && hasOwn(state, key); -var PublicInstanceProxyHandlers = { - get({ _: instance }, key) { - if (key === "__v_skip") { - return true; - } - const { ctx, setupState, data, props, accessCache, type, appContext } = instance; - if (key === "__isVue") { - return true; - } - let normalizedProps; - if (key[0] !== "$") { - const n = accessCache[key]; - if (n !== void 0) { - switch (n) { - case 1: - return setupState[key]; - case 2: - return data[key]; - case 4: - return ctx[key]; - case 3: - return props[key]; - } - } else if (hasSetupBinding(setupState, key)) { - accessCache[key] = 1; - return setupState[key]; - } else if (data !== EMPTY_OBJ && hasOwn(data, key)) { - accessCache[key] = 2; - return data[key]; - } else if ( - // only cache other properties when instance has declared (thus stable) - // props - (normalizedProps = instance.propsOptions[0]) && hasOwn(normalizedProps, key) - ) { - accessCache[key] = 3; - return props[key]; - } else if (ctx !== EMPTY_OBJ && hasOwn(ctx, key)) { - accessCache[key] = 4; - return ctx[key]; - } else if (!__VUE_OPTIONS_API__ || shouldCacheAccess) { - accessCache[key] = 0; - } - } - const publicGetter = publicPropertiesMap[key]; - let cssModule, globalProperties; - if (publicGetter) { - if (key === "$attrs") { - track(instance.attrs, "get", ""); - markAttrsAccessed(); - } else if (key === "$slots") { - track(instance, "get", key); - } - return publicGetter(instance); - } else if ( - // css module (injected by vue-loader) - (cssModule = type.__cssModules) && (cssModule = cssModule[key]) - ) { - return cssModule; - } else if (ctx !== EMPTY_OBJ && hasOwn(ctx, key)) { - accessCache[key] = 4; - return ctx[key]; - } else if ( - // global properties - globalProperties = appContext.config.globalProperties, hasOwn(globalProperties, key) - ) { - { - return globalProperties[key]; - } - } else if (currentRenderingInstance && (!isString(key) || // #1091 avoid internal isRef/isVNode checks on component instance leading - // to infinite warning loop - key.indexOf("__v") !== 0)) { - if (data !== EMPTY_OBJ && isReservedPrefix(key[0]) && hasOwn(data, key)) { - warn$1( - `Property ${JSON.stringify( - key - )} must be accessed via $data because it starts with a reserved character ("$" or "_") and is not proxied on the render context.` - ); - } else if (instance === currentRenderingInstance) { - warn$1( - `Property ${JSON.stringify(key)} was accessed during render but is not defined on instance.` - ); - } - } - }, - set({ _: instance }, key, value) { - const { data, setupState, ctx } = instance; - if (hasSetupBinding(setupState, key)) { - setupState[key] = value; - return true; - } else if (setupState.__isScriptSetup && hasOwn(setupState, key)) { - warn$1(`Cannot mutate