@valaxyjs/devtools 1.0.0-rc.11 → 1.0.0-rc.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +138 -12
- package/dist/client/assets/FeedbackEmptyState-Dj1YkJE0.js +1 -0
- package/dist/client/assets/LayoutCard-qUVYVRud.js +1 -0
- package/dist/client/assets/PopperContent-CgXMlFkV.js +3 -0
- package/dist/client/assets/VDCheckbox-CH2V3bFJ.js +1 -0
- package/dist/client/assets/VDNumberField-DVmMsYPC.js +1 -0
- package/dist/client/assets/VDPostListItem-D3Rn_PcJ.js +1 -0
- package/dist/client/assets/VDPostPanel-BWZUkoQC.js +1 -0
- package/dist/client/assets/VDPostPanel-CbCth8UW.css +1 -0
- package/dist/client/assets/VDSelect-4SBTowKT.js +1 -0
- package/dist/client/assets/VDToggleGroup-BOVPTJ4m.js +1 -0
- package/dist/client/assets/addons-CF1AfuFX.js +1 -0
- package/dist/client/assets/archives-CDa7i8eC.js +1 -0
- package/dist/client/assets/batch-edit-DIvZaav7.js +1 -0
- package/dist/client/assets/batch-edit-UNPFWmV7.css +1 -0
- package/dist/client/assets/browser-agent-rpc-BXhoSh1z-BPEkUHEg.js +1 -0
- package/dist/client/assets/categories-Bk3lMeb1.js +1 -0
- package/dist/client/assets/collections-BHxAwkoL.js +1 -0
- package/dist/client/assets/colors-CdKJdJxa.js +1 -0
- package/dist/client/assets/config-B09dyTTS.js +1 -0
- package/dist/client/assets/debug-CMQbsCep.js +1 -0
- package/dist/client/assets/debug-DcFlBZjk.css +1 -0
- package/dist/client/assets/index-Cyol-EzD.css +1 -0
- package/dist/client/assets/index-DUZ9khG8.js +4 -0
- package/dist/client/assets/nanoid-Cya-tyvy.js +1 -0
- package/dist/client/assets/pages-BWRkr8em.js +1 -0
- package/dist/client/assets/posts-mlMGwcAv.js +1 -0
- package/dist/client/assets/rpc-D36U2nIU.js +4 -0
- package/dist/client/assets/runtime-core.esm-bundler-B8D2lM98.js +3 -0
- package/dist/client/assets/runtime-dom.esm-bundler-Btnku4nR.js +2 -0
- package/dist/client/assets/settings-BZuYgjIU.js +1 -0
- package/dist/client/assets/splitpanes.esm-CrBmgK88.js +1 -0
- package/dist/client/assets/tags-DUuGVO-R.js +1 -0
- package/dist/client/assets/virtual_intlify-i18n-0-CRury7qB.js +1 -0
- package/dist/client/assets/virtual_intlify-i18n-1-FM-gmUYx.js +1 -0
- package/{LICENSE → dist/client/icons/LICENSE} +1 -1
- package/dist/client/icons/README.md +2 -0
- package/dist/client/icons/archive.svg +1 -0
- package/dist/client/icons/article.svg +1 -0
- package/dist/client/icons/books.svg +1 -0
- package/dist/client/icons/bug.svg +1 -0
- package/dist/client/icons/folders.svg +1 -0
- package/dist/client/icons/gear-six.svg +1 -0
- package/dist/client/icons/hash.svg +1 -0
- package/dist/client/icons/pencil-simple.svg +1 -0
- package/dist/client/icons/puzzle-piece.svg +1 -0
- package/dist/client/icons/sliders-horizontal.svg +1 -0
- package/dist/client/icons/squares-four.svg +1 -0
- package/dist/client/index.html +9 -5
- package/dist/client-api.d.mts +18 -0
- package/dist/client-api.d.ts +18 -0
- package/dist/client-api.mjs +52 -0
- package/dist/index.d.mts +10 -5
- package/dist/index.d.ts +10 -5
- package/dist/index.mjs +114 -626
- package/dist/node/definition.d.mts +9 -0
- package/dist/node/definition.d.ts +9 -0
- package/dist/node/definition.mjs +826 -0
- package/dist/node/mcp.d.mts +26 -0
- package/dist/node/mcp.d.ts +26 -0
- package/dist/node/mcp.mjs +250 -0
- package/dist/page.d.mts +12 -0
- package/dist/page.d.ts +12 -0
- package/dist/page.mjs +29 -0
- package/dist/plugin.d.mts +48 -0
- package/dist/plugin.d.ts +48 -0
- package/dist/plugin.mjs +5 -0
- package/dist/shared/devtools.B-vZo-vB.mjs +46 -0
- package/dist/shared/devtools.BOLo8y6t.d.mts +58 -0
- package/dist/shared/devtools.BzWtXMed.mjs +3 -0
- package/dist/shared/devtools.CBhjeyeH.mjs +16 -0
- package/dist/shared/devtools.CNAj6Cjx.d.ts +58 -0
- package/dist/shared/devtools.DV0tVpWA.d.mts +95 -0
- package/dist/shared/devtools.O-VZ9RtQ.d.mts +30 -0
- package/dist/shared/devtools.O-VZ9RtQ.d.ts +30 -0
- package/dist/shared/devtools.lzRAl5dD.d.ts +95 -0
- package/dist/shared/rpc.d.mts +171 -0
- package/dist/shared/rpc.d.ts +171 -0
- package/dist/shared/rpc.mjs +1 -0
- package/package.json +52 -26
- package/rpc.d.ts +1 -100
- package/dist/client/assets/VDButton-BxA3M5c6.js +0 -1
- package/dist/client/assets/VDCheckbox-BsLMqi9S.js +0 -1
- package/dist/client/assets/VDInput-B27GE15-.js +0 -1
- package/dist/client/assets/VDInput-BtxYqBt3.css +0 -1
- package/dist/client/assets/VDNumberField-YjWV-ued.js +0 -1
- package/dist/client/assets/VDPostListItem-DF0Kvz0k.js +0 -1
- package/dist/client/assets/VDPostPanel-Bkkd-Lkf.css +0 -1
- package/dist/client/assets/VDPostPanel-Dci0SDJM.js +0 -1
- package/dist/client/assets/VDSelect-C-luq5qS.js +0 -1
- package/dist/client/assets/VDToggleGroup-epojOkcK.js +0 -1
- package/dist/client/assets/archives-DSGEfYQX.js +0 -1
- package/dist/client/assets/batch-edit-BYL9g3v4.css +0 -1
- package/dist/client/assets/batch-edit-DUNlYX2Q.js +0 -1
- package/dist/client/assets/categories-O8ONgJl6.js +0 -1
- package/dist/client/assets/collections-Rf9R5xIW.js +0 -1
- package/dist/client/assets/config-B6eJg8re.js +0 -1
- package/dist/client/assets/index-BjYrNlmK.js +0 -6
- package/dist/client/assets/index-wVxzDvm5.css +0 -1
- package/dist/client/assets/pages-CHon8Zex.js +0 -1
- package/dist/client/assets/posts-B80Fz55d.js +0 -1
- package/dist/client/assets/settings-B9Vkun7j.js +0 -1
- package/dist/client/assets/splitpanes.esm-B-DN0qHF.js +0 -1
- package/dist/client/assets/tags-B_Je2XwK.js +0 -1
- package/dist/client/assets/virtual_intlify-i18n-0-C_fbdMlw.js +0 -1
- package/dist/client/assets/virtual_intlify-i18n-1-CjutLn3A.js +0 -1
- package/dist/client/assets/vue.runtime.esm-bundler-DqDZGG6R.js +0 -4
package/README.md
CHANGED
|
@@ -1,26 +1,152 @@
|
|
|
1
1
|
# @valaxyjs/devtools
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Valaxy's post, collection, and source-config tools, powered by [Devframe](https://devfra.me/) and hosted in [Vite DevTools](https://devtools.vite.dev/).
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
5
|
+
## Using Valaxy
|
|
6
|
+
|
|
7
|
+
Run `valaxy dev` and open **Valaxy** in the Vite DevTools floating dock. On first connection, enter the one-time code shown in the terminal. Vue DevTools remains available for Vue component/state inspection.
|
|
8
|
+
|
|
9
|
+
The same UI is available at `<base>__valaxy_devtools__/`. Directly opened pages can manage files; page highlighting requires an embedded panel or a same-origin opener. Set `devtools: false` in `valaxy.config.ts` to disable the tools. Production builds exclude them; MCP is disabled by default.
|
|
10
|
+
|
|
11
|
+
Primary pages (including categories and tags) live in the native **Valaxy** sidebar. Top-level navigation uses Hub's public [shared-iframe soft navigation](https://devfra.me/guide/client-context#shared-iframe-soft-navigation): one `frameId` and a localized `subTabs` manifest keep the router and host selection synchronized without reloading the panel. Page-level filters, such as published/draft posts, remain inside their page. Direct opens use `@antfu/design`'s `LayoutSideNav` with the same entries; narrow standalone windows use a navigation dialog.
|
|
12
|
+
|
|
13
|
+
Embedded panels discover their registered frame-navigation anchor through the public `devframe:docks` shared state. This also handles Hub restoring an older panel URL after an upgrade; navigation ownership does not depend on a query parameter. An iframe without that registered host keeps its local navigation.
|
|
14
|
+
|
|
15
|
+
Unsaved frontmatter drafts are retained per file when switching pages, posts, or addon panels in the current session. Saving remains explicit. Reloading the browser clears these in-memory drafts; external file changes offer an explicit reload action.
|
|
16
|
+
|
|
17
|
+
**Page Debug** replaces the Yun theme's default floating Valaxy Debug widget. It shows the site's viewport and matching breakpoints, current route/query/params, live frontmatter, and the runtime site summary and theme configuration. It follows the browser page rather than the article selected for editing. These read-only snapshots arrive over the local page channel; the current page is not shared across browser tabs. Direct opens without a parent/opener show an empty state. The existing **Config** page still edits source files. The legacy `ValaxyDebug` component remains available for themes that explicitly mount it.
|
|
18
|
+
|
|
19
|
+
JSON inspection uses the official [`@devframes/service-shiki`](https://devfra.me/add-ons/services/shiki) service, declared by the Valaxy Devframe for both native Vite DevTools and standalone hosts. Code is sent to the local development server for highlighting and caching; Shiki grammars and themes stay out of the DevTools client bundle. `VDCodeBlock` renders the service's escaped HTML with Vitesse light/dark colors following the shared theme preference. Pending or unavailable highlighting falls back to current plain text; outdated responses cannot replace newer page data.
|
|
20
|
+
|
|
21
|
+
## Vite integration
|
|
22
|
+
|
|
23
|
+
Requires Vite 8.3+. Valaxy configures this automatically. For other hosts:
|
|
24
|
+
|
|
25
|
+
```ts
|
|
26
|
+
import ValaxyDevtools from '@valaxyjs/devtools'
|
|
27
|
+
import { defineConfig } from 'vite'
|
|
28
|
+
|
|
29
|
+
export default defineConfig({
|
|
30
|
+
devtools: { apply: 'serve', mcp: false },
|
|
31
|
+
plugins: [ValaxyDevtools({ userRoot: '/absolute/path/to/blog' })],
|
|
32
|
+
})
|
|
8
33
|
```
|
|
9
34
|
|
|
35
|
+
Install `@vitejs/devtools` alongside Vite when enabling the native host. If Vite DevTools is disabled, the plugin serves the same authenticated Devframe directly at `<base>__valaxy_devtools__/` without a dock. Do not register an additional Valaxy Devframe in that process.
|
|
36
|
+
|
|
37
|
+
`createValaxyDevframe` is exported from `@valaxyjs/devtools/definition` for other Devframe hosts. `@valaxyjs/devtools/page` exports `createValaxyPageBridge(router, { getDebug? })` for page context; the optional callback provides a `ValaxyPageDebug` snapshot. Call `sync()` when non-route diagnostics change and `close()` on teardown. Valaxy registers this automatically, including resize/config updates and cleanup. `@valaxyjs/devtools/rpc` retains the public operation types.
|
|
38
|
+
|
|
39
|
+
RPC reads source configuration, not Valaxy's fully merged runtime config. Markdown operations validate paths within the site and keep the Markdown body. A Vite watcher refreshes file lists; an editor draft is retained when the file changes externally, with an explicit reload action.
|
|
40
|
+
|
|
41
|
+
## MCP content tools
|
|
42
|
+
|
|
43
|
+
Set `mcp: true` in `valaxy.config.ts` to enable the built-in, local read-only MCP endpoint at `<base>__valaxy_mcp`. This is independent of the `devtools` panel setting and runs only during development. The terminal prints the connection URL and required `Origin` header. Dependencies are included; no extra MCP package installation is needed.
|
|
44
|
+
|
|
45
|
+
The isolated endpoint exposes `valaxy_list_posts`, `valaxy_search_pages`, `valaxy_read_page`, `valaxy_list_collections`, `valaxy_inspect_page`, and `valaxy_check_page`. Inspection and checks use Valaxy's route pipeline to report resolved article state and actionable diagnostics. The same operations are available through `valaxy inspect/check --file pages/posts/hello.md --json` and `createContentService()` from `valaxy/node`. It does not expose management RPCs, addon tools, shared state, or source configuration. Drafts are excluded unless `mcp: { includeDrafts: true }` is configured; hidden and protected pages remain excluded. Use `mcp: false` and restart to disable it.
|
|
46
|
+
|
|
47
|
+
For a custom Vite host, add `ValaxyMcp({ userRoot })` from `@valaxyjs/devtools/mcp` to `plugins`. This standalone form exposes the four source-reading tools; supplying the optional `content` provider adds framework inspection/checking. Valaxy wires this provider automatically. Do not enable the Vite DevTools host's MCP option to expose these content tools; they use a separate context and endpoint. See [Work with AI](https://valaxy.site/guide/work-with-ai#mcp) for client configuration, scope, and limits.
|
|
48
|
+
|
|
49
|
+
## Development
|
|
50
|
+
|
|
51
|
+
The UI uses the same [`@antfu/design`](https://github.com/antfu/design) components, styles, and UnoCSS preset as Devframe Hub UI. The preset is scoped to the DevTools SPA; blog/theme styles are unaffected. Buttons, selects, checkboxes, textareas, dialogs, cards, and feedback use the public components. Native inputs and the remaining Reka controls preserve Valaxy's datalist, numeric, and date behavior while using the same semantic tokens.
|
|
52
|
+
|
|
53
|
+
Same-origin panels share the Hub's `devframes-color-scheme` preference. The optional `ConnectionMeta.configs.ui.branding.primaryColor` sets `--devframe-primary`, with a Vite-colored fallback when opened without a Hub. This does not install another Hub. Narrow panels stack the list and editor vertically.
|
|
54
|
+
|
|
55
|
+
Keep UI colors on the preset's `bg-base`, `bg-raised`, `color-muted`, `border-base`, and primary tokens. The dedicated `src/client/uno.config.ts` is loaded through UnoCSS so the design package's TypeScript preset is transpiled correctly. `colorjs.io` is its build-time peer dependency.
|
|
56
|
+
|
|
57
|
+
From the repository root:
|
|
58
|
+
|
|
10
59
|
```bash
|
|
11
|
-
pnpm
|
|
60
|
+
pnpm run build
|
|
61
|
+
pnpm demo # built panel in a real Valaxy site
|
|
62
|
+
pnpm devtools # frontend HMR on http://localhost:5001, demo/yun data
|
|
12
63
|
```
|
|
13
64
|
|
|
65
|
+
Use the terminal code to authorize the development SPA. There is no separate REST proxy to configure.
|
|
66
|
+
|
|
14
67
|
```bash
|
|
15
|
-
|
|
16
|
-
pnpm
|
|
68
|
+
pnpm exec vitest run test/devtools
|
|
69
|
+
pnpm run typecheck
|
|
70
|
+
pnpm run build:devtools
|
|
17
71
|
```
|
|
18
72
|
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
73
|
+
## Addon extensions (experimental API v1)
|
|
74
|
+
|
|
75
|
+
Vite DevTools remains the default host. Its native Dock has a **Valaxy** group containing the main panel's page entries and independent addon panels. The page entries share one iframe; each addon panel retains its own iframe. Valaxy owns the blog UI and extension API; it does not create a second Hub. The same panels can open directly, including when Vite DevTools is disabled.
|
|
76
|
+
|
|
77
|
+
An enabled addon opts in with a lazy Node-side `devtools` loader. Put it on the object returned by the addon factory, or on an addon entry in `valaxy.config.ts`:
|
|
78
|
+
|
|
79
|
+
```ts
|
|
80
|
+
import { defineValaxyConfig } from 'valaxy'
|
|
81
|
+
|
|
82
|
+
export default defineValaxyConfig({
|
|
83
|
+
addons: [{
|
|
84
|
+
name: 'valaxy-addon-example',
|
|
85
|
+
devtools: () => import('valaxy-addon-example/devtools'),
|
|
86
|
+
}],
|
|
87
|
+
})
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
The loader receives `{ userRoot, addonRoot, options }`. Its result is a plugin or a module whose default export is a plugin. Disabled addons and production builds do not load it. A bare addon name alone does not discover a DevTools entry; use the addon factory or the explicit loader above. Restart the dev server after changing registration.
|
|
91
|
+
|
|
92
|
+
```ts
|
|
93
|
+
import { fileURLToPath } from 'node:url'
|
|
94
|
+
import { defineValaxyDevtoolsPlugin } from '@valaxyjs/devtools/plugin'
|
|
95
|
+
|
|
96
|
+
export default defineValaxyDevtoolsPlugin({
|
|
97
|
+
apiVersion: 1,
|
|
98
|
+
id: 'example',
|
|
99
|
+
name: 'Example',
|
|
100
|
+
panels: [{
|
|
101
|
+
id: 'overview',
|
|
102
|
+
title: 'Example Overview',
|
|
103
|
+
icon: 'ph:puzzle-piece',
|
|
104
|
+
clientAssets: fileURLToPath(new URL('./client', import.meta.url)),
|
|
105
|
+
}],
|
|
106
|
+
editor: {
|
|
107
|
+
fields: [{ key: 'reviewNote', label: 'Review note', type: 'textarea', maxLength: 160 }],
|
|
108
|
+
actions: [{
|
|
109
|
+
id: 'check',
|
|
110
|
+
label: 'Check note',
|
|
111
|
+
run: ({ draft }) => ({ message: draft.reviewNote ? 'Note is present.' : 'Add a review note.', severity: 'info' }),
|
|
112
|
+
}],
|
|
113
|
+
},
|
|
114
|
+
async setup({ data }) {
|
|
115
|
+
await data.onChanged(() => {
|
|
116
|
+
// Invalidate addon-owned derived data here.
|
|
117
|
+
})
|
|
118
|
+
},
|
|
119
|
+
})
|
|
22
120
|
```
|
|
23
121
|
|
|
24
|
-
|
|
25
|
-
|
|
122
|
+
Build panel assets with Vite `base: './'` and hash routing. Ship the resulting directory in the addon package. Each panel uses a namespaced URL under `<base>__valaxy_addons__/<plugin>/<panel>/`; sibling mounts avoid overlapping the main SPA's history fallback. IDs must use lowercase letters, digits and hyphens, starting with a letter. Valaxy rejects duplicate IDs, conflicting editor fields and missing built assets with a startup error.
|
|
123
|
+
|
|
124
|
+
Inside a registered panel:
|
|
125
|
+
|
|
126
|
+
```ts
|
|
127
|
+
import { connectValaxyDevtools, onValaxyPageChanged } from '@valaxyjs/devtools/client-api'
|
|
128
|
+
|
|
129
|
+
const { client, data } = await connectValaxyDevtools({ webmcp: false })
|
|
130
|
+
const posts = await data.getPostList()
|
|
131
|
+
const page = await data.getPageData(posts.posts[0].filePath)
|
|
132
|
+
const config = await data.getConfig()
|
|
133
|
+
const stop = await data.onChanged(() => { /* refresh derived views */ })
|
|
134
|
+
const stopPage = onValaxyPageChanged((page) => { /* page is undefined without site context */ })
|
|
135
|
+
|
|
136
|
+
// On panel teardown:
|
|
137
|
+
stop()
|
|
138
|
+
stopPage()
|
|
139
|
+
client.close?.()
|
|
26
140
|
```
|
|
141
|
+
|
|
142
|
+
`connectValaxyDevtools()` discovers the main Valaxy endpoint from a registered panel's URL, including direct standalone opens. Pass `baseURL` explicitly when serving a panel from a custom URL. An already connected Devframe panel can instead call `createValaxyDevtoolsClient(client)`. Both expose the same read-only API as Node `setup({ data })`: options, posts, page frontmatter, collections, source configuration, and `onChanged()`. The subscription is an invalidation signal; refetch data instead of expecting file contents in the event. Handle connection status and refresh on reconnect. Always unsubscribe on teardown. Node data subscriptions are also cleaned up automatically when Valaxy closes.
|
|
143
|
+
|
|
144
|
+
Page context stays local to the current browser via `onValaxyPageChanged()`. It is not server-global state and is undefined for a panel opened without a site parent/opener. `getPageData()` accepts the absolute file path returned by the post list, or a path such as `pages/posts/hello.md`; it does not interpret route URLs as filenames. Config reads reflect source files, not the fully merged runtime configuration.
|
|
145
|
+
|
|
146
|
+
For addon-specific RPC, `setup({ rpc })` accepts Devframe `defineRpcFunction()` definitions. A function named `inspect` in addon `example` becomes `valaxy:addon:example:inspect`. Declare the corresponding Devframe RPC type augmentation in the addon when using typed client calls. Register timers/listeners with `onDispose()`. Other hosts using `createValaxyDevframe()` must call the returned definition's `dispose()` during teardown; the Vite adapter does this on close and restart.
|
|
147
|
+
|
|
148
|
+
Editor fields support text, textarea, boolean, number and select. They are optional top-level frontmatter values, rendered in their addon's group, with explicit Add/Remove controls. Opening a post adds no defaults. Values are validated on the server for normal saves, batch edits and migration. Core editor fields and dangerous keys cannot be replaced. This first version has no arbitrary component injection or automatic saves. Actions receive the saved `page`, unsaved `draft` and read-only `data`; they return a message and severity. An action does not save the draft. An addon is trusted project code, not a sandbox.
|
|
149
|
+
|
|
150
|
+
The UI retains the shared Hub design system. Publication state uses explicit colors (published green, draft amber); tags and categories use deterministic identity colors. Accent text and subtle surfaces adapt to light/dark mode, while selection and focus continue to use the host brand color.
|
|
151
|
+
|
|
152
|
+
See the runnable [SEO addon example](./examples/seo-addon/README.md) for a complete independent panel, change subscription, four editor field types and a draft check. It is a reference implementation, not a production SEO feature.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{E as e,Zn as t,b as n,k as r,mt as i,tr as a,xt as o,y as s}from"./runtime-core.esm-bundler-B8D2lM98.js";var c={class:`px-6 py-10 text-center op-fade flex flex-col gap-2 items-center justify-center`},l={key:0,class:`text-sm color-base font-medium`},u={key:1,class:`text-xs op-mute max-w-prose`},d={key:2,class:`mt-2 flex gap-2 items-center`},f=r({__name:`FeedbackEmptyState`,props:{title:{},icon:{}},setup(r){return(f,p)=>(i(),n(`div`,c,[o(f.$slots,`icon`,{},()=>[r.icon?(i(),n(`span`,{key:0,class:t([r.icon,`text-3xl op-mute`]),"aria-hidden":`true`},null,2)):s(``,!0)]),r.title||f.$slots.default?(i(),n(`div`,l,[o(f.$slots,`default`,{},()=>[e(a(r.title),1)])])):s(``,!0),f.$slots.hint?(i(),n(`div`,u,[o(f.$slots,`hint`)])):s(``,!0),f.$slots.actions?(i(),n(`div`,d,[o(f.$slots,`actions`)])):s(``,!0)]))}});export{f as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{Zn as e,k as t,mt as n,qt as r,v as i,wt as a,xt as o}from"./runtime-core.esm-bundler-B8D2lM98.js";var s=t({__name:`LayoutCard`,props:{as:{},padding:{type:Boolean,default:!0},elevated:{type:Boolean}},setup(t){return(s,c)=>(n(),i(a(t.as||`div`),{class:e([`border border-base rounded-xl bg-raised`,[{"p-4":t.padding},{"shadow-sm":t.elevated}]])},{default:r(()=>[o(s.$slots,`default`)]),_:3},8,[`class`]))}});export{s as t};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import{C as e,E as t,S as n,_ as r,a as i,b as a,c as o,d as s,f as c,g as l,h as u,i as d,l as f,m as p,n as m,o as h,p as g,r as _,s as v,t as y,u as b,v as x,w as S,x as C,y as w}from"./runtime-dom.esm-bundler-Btnku4nR.js";import{$ as T,$n as ee,$t as te,A as ne,At as E,B as D,Bt as re,C as ie,Cn as ae,Ct as oe,D as se,Dn as ce,Dt as le,E as ue,En as O,Et as de,F as fe,Ft as pe,G as me,Gt as he,H as ge,Ht as k,I as _e,It as ve,J as ye,Jt as be,K as xe,Kt as Se,L as Ce,Lt as we,M as Te,Mn as Ee,Mt as De,N as Oe,Nt as ke,O as Ae,On as A,Ot as je,P as Me,Pt as Ne,Q as Pe,Qt as Fe,R as Ie,Rt as Le,S as Re,Sn as ze,St as Be,T as Ve,Tn as He,Tt as Ue,U as We,Ut as Ge,V as Ke,Vt as qe,W as Je,Wt as Ye,X as Xe,Xt as Ze,Y as Qe,Yt as $e,Z as et,Zn as tt,Zt as nt,_ as rt,_n as it,_t as at,a as ot,an as st,at as ct,b as lt,bn as j,bt as ut,c as dt,cn as ft,ct as pt,d as mt,dn as ht,dt as gt,en as _t,er as vt,et as yt,f as bt,fn as xt,ft as St,g as M,gn as Ct,gt as wt,h as Tt,hn as Et,ht as Dt,i as Ot,in as kt,it as At,j as jt,jn as Mt,jt as Nt,k as N,kt as Pt,l as Ft,ln as It,lt as Lt,m as Rt,mn as zt,mt as P,n as Bt,nn as Vt,nr as Ht,nt as Ut,o as Wt,on as Gt,ot as Kt,p as qt,pn as Jt,pt as Yt,q as Xt,qt as Zt,r as Qt,rn as $t,rt as en,s as tn,sn as nn,st as rn,t as an,tn as on,tr as sn,tt as F,u as cn,un as ln,ut as un,v as I,vn as L,vt as dn,w as fn,wn as pn,wt as mn,x as hn,xn as gn,xt as R,y as _n,yn as vn,yt as yn,z as bn,zt as xn}from"./runtime-core.esm-bundler-B8D2lM98.js";var Sn=t({BaseTransition:()=>an,BaseTransitionPropsValidators:()=>Bt,Comment:()=>Qt,DeprecationTypes:()=>null,EffectScope:()=>Fe,ErrorCodes:()=>Ot,ErrorTypeStrings:()=>ot,Fragment:()=>Wt,KeepAlive:()=>tn,ReactiveEffect:()=>te,Static:()=>dt,Suspense:()=>Ft,Teleport:()=>cn,Text:()=>mt,TrackOpTypes:()=>_t,Transition:()=>y,TransitionGroup:()=>m,TriggerOpTypes:()=>on,VueElement:()=>_,assertNumber:()=>bt,callWithAsyncErrorHandling:()=>qt,callWithErrorHandling:()=>Rt,camelize:()=>Mt,capitalize:()=>Ee,cloneVNode:()=>Tt,compatUtils:()=>null,compile:()=>Cn,computed:()=>M,createApp:()=>d,createBlock:()=>I,createCommentVNode:()=>_n,createElementBlock:()=>lt,createElementVNode:()=>rt,createHydrationRenderer:()=>hn,createPropsRestProxy:()=>Re,createRenderer:()=>ie,createSSRApp:()=>i,createSlots:()=>fn,createStaticVNode:()=>Ve,createTextVNode:()=>ue,createVNode:()=>se,customRef:()=>Vt,defineAsyncComponent:()=>Ae,defineComponent:()=>N,defineCustomElement:()=>h,defineEmits:()=>ne,defineExpose:()=>jt,defineModel:()=>Te,defineOptions:()=>Oe,defineProps:()=>Me,defineSSRCustomElement:()=>v,defineSlots:()=>fe,devtools:()=>_e,effect:()=>$t,effectScope:()=>kt,getCurrentInstance:()=>Ce,getCurrentScope:()=>st,getCurrentWatcher:()=>Gt,getTransitionRawChildren:()=>Ie,guardReactiveProps:()=>bn,h:()=>D,handleError:()=>Ke,hasInjectionContext:()=>ge,hydrate:()=>o,hydrateOnIdle:()=>We,hydrateOnInteraction:()=>Je,hydrateOnMediaQuery:()=>me,hydrateOnVisible:()=>xe,initCustomFormatter:()=>Xt,initDirectivesForSSR:()=>f,inject:()=>ye,isMemoSame:()=>Qe,isProxy:()=>nn,isReactive:()=>ft,isReadonly:()=>It,isRef:()=>ln,isRuntimeOnly:()=>Xe,isShallow:()=>ht,isVNode:()=>et,markRaw:()=>xt,mergeDefaults:()=>Pe,mergeModels:()=>T,mergeProps:()=>yt,nextTick:()=>F,nodeOps:()=>b,normalizeClass:()=>tt,normalizeProps:()=>ee,normalizeStyle:()=>vt,onActivated:()=>Ut,onBeforeMount:()=>en,onBeforeUnmount:()=>At,onBeforeUpdate:()=>ct,onDeactivated:()=>Kt,onErrorCaptured:()=>rn,onMounted:()=>pt,onRenderTracked:()=>Lt,onRenderTriggered:()=>un,onScopeDispose:()=>Jt,onServerPrefetch:()=>gt,onUnmounted:()=>St,onUpdated:()=>Yt,onWatcherCleanup:()=>zt,openBlock:()=>P,patchProp:()=>s,popScopeId:()=>Dt,provide:()=>wt,proxyRefs:()=>Et,pushScopeId:()=>at,queuePostFlushCb:()=>dn,reactive:()=>Ct,readonly:()=>it,ref:()=>L,registerRuntimeCompiler:()=>yn,render:()=>c,renderList:()=>ut,renderSlot:()=>R,resolveComponent:()=>Be,resolveDirective:()=>oe,resolveDynamicComponent:()=>mn,resolveFilter:()=>null,resolveTransitionHooks:()=>Ue,setBlockTracking:()=>de,setDevtoolsHook:()=>le,setTransitionHooks:()=>je,shallowReactive:()=>vn,shallowReadonly:()=>j,shallowRef:()=>gn,ssrContextKey:()=>Pt,ssrUtils:()=>E,stop:()=>ze,toDisplayString:()=>sn,toHandlerKey:()=>Ht,toHandlers:()=>Nt,toRaw:()=>ae,toRef:()=>pn,toRefs:()=>He,toValue:()=>O,transformVNodeArgs:()=>De,triggerRef:()=>ce,unref:()=>A,useAttrs:()=>ke,useCssModule:()=>g,useCssVars:()=>p,useHost:()=>u,useId:()=>Ne,useModel:()=>pe,useSSRContext:()=>ve,useShadowRoot:()=>l,useSlots:()=>we,useTemplateRef:()=>Le,useTransitionState:()=>xn,vModelCheckbox:()=>r,vModelDynamic:()=>x,vModelRadio:()=>w,vModelSelect:()=>a,vModelText:()=>C,vShow:()=>n,version:()=>re,warn:()=>qe,watch:()=>k,watchEffect:()=>Ge,watchPostEffect:()=>Ye,watchSyncEffect:()=>he,withAsyncContext:()=>Se,withCtx:()=>Zt,withDefaults:()=>be,withDirectives:()=>$e,withKeys:()=>e,withMemo:()=>Ze,withModifiers:()=>S,withScopeId:()=>nt}),Cn=()=>{},wn={key:0,class:`color-muted text-xs shrink-0`},Tn=[`type`,`placeholder`,`aria-label`,`list`,`disabled`],En={key:1,class:`color-muted text-xs shrink-0`},Dn=N({inheritAttrs:!1,__name:`VDInput`,props:T({placeholder:{},size:{},type:{},list:{},disabled:{type:Boolean}},{modelValue:{},modelModifiers:{}}),emits:[`update:modelValue`],setup(e,{expose:t}){let n=pe(e,`modelValue`),r=ke(),i=L();return t({focus:()=>i.value?.focus()}),(t,a)=>(P(),lt(`div`,{class:tt([[A(r).class,e.size===`md`?`h-9`:`h-7`,{op50:e.disabled}],`px-2 border border-base rounded bg-raised inline-flex gap-1.5 items-center min-w-0 transition focus-within:ring-2 focus-within:ring-primary-500/40`]),style:vt(A(r).style)},[t.$slots.prefix?(P(),lt(`span`,wn,[R(t.$slots,`prefix`)])):_n(``,!0),$e(rt(`input`,yt({ref_key:`input`,ref:i},{...A(r),class:void 0,style:void 0},{"onUpdate:modelValue":a[0]||=e=>n.value=e,type:e.type||`text`,placeholder:e.placeholder,"aria-label":typeof A(r)[`aria-label`]==`string`?A(r)[`aria-label`]:e.placeholder,list:e.list,disabled:e.disabled,class:`color-base text-sm outline-none bg-transparent flex-1 min-w-0 w-full placeholder:color-faint`}),null,16,Tn),[[x,n.value]]),t.$slots.suffix?(P(),lt(`span`,En,[R(t.$slots,`suffix`)])):_n(``,!0)],6))}});function On(e,t){let n=typeof e==`string`&&!t?`${e}Context`:t,r=Symbol(n);return[t=>{let n=ye(r,t);if(n||n===null)return n;throw Error(`Injection \`${r.toString()}\` not found. Component must be used within ${Array.isArray(e)?`one of the following components: ${e.join(`, `)}`:`\`${e}\``}`)},e=>(wt(r,e),e)]}function z(){let e=document.activeElement;if(e==null)return null;for(;e!=null&&e.shadowRoot!=null&&e.shadowRoot.activeElement!=null;)e=e.shadowRoot.activeElement;return e}function kn(e,t,n){let r=n.originalEvent.target,i=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&r.addEventListener(e,t,{once:!0}),r.dispatchEvent(i)}function An(e){return e==null}function jn(e,t){return st()?(Jt(e,t),!0):!1}function Mn(){let e=new Set,t=t=>{e.delete(t)};return{on:n=>{e.add(n);let r=()=>t(n);return jn(r),{off:r}},off:t,trigger:(...t)=>Promise.all(Array.from(e).map(e=>e(...t))),clear:()=>{e.clear()}}}function Nn(e){let t=!1,n,r=kt(!0);return((...i)=>(t||=(n=r.run(()=>e(...i)),!0),n))}var B=typeof window<`u`&&typeof document<`u`;typeof WorkerGlobalScope<`u`&&globalThis instanceof WorkerGlobalScope;var Pn=e=>e!==void 0,Fn=Object.prototype.toString,In=e=>Fn.call(e)===`[object Object]`,Ln=Rn();function Rn(){var e,t;return B&&!!((e=window)!=null&&(e=e.navigator)!=null&&e.userAgent)&&(/iP(?:ad|hone|od)/.test(window.navigator.userAgent)||((t=window)==null||(t=t.navigator)==null?void 0:t.maxTouchPoints)>2&&/iPad|Macintosh/.test(window?.navigator.userAgent))}function zn(e){return Array.isArray(e)?e:[e]}function Bn(e){return e||Ce()}function Vn(e){if(!B)return e;let t=0,n,r,i=()=>{--t,r&&t<=0&&(r.stop(),n=void 0,r=void 0)};return((...a)=>(t+=1,r||(r=kt(!0),n=r.run(()=>e(...a))),jn(i),n))}function Hn(e){return ln(e)?Ct(new Proxy({},{get(t,n,r){return A(Reflect.get(e.value,n,r))},set(t,n,r){return ln(e.value[n])&&!ln(r)?e.value[n].value=r:e.value[n]=r,!0},deleteProperty(t,n){return Reflect.deleteProperty(e.value,n)},has(t,n){return Reflect.has(e.value,n)},ownKeys(){return Object.keys(e.value)},getOwnPropertyDescriptor(){return{enumerable:!0,configurable:!0}}})):Ct(e)}function Un(e){return Hn(M(e))}function Wn(e,...t){let n=t.flat(),r=n[0];return Un(()=>Object.fromEntries(typeof r==`function`?Object.entries(He(e)).filter(([e,t])=>!r(O(t),e)):Object.entries(He(e)).filter(e=>!n.includes(e[0]))))}function Gn(e,t=1e4){return Vt((n,r)=>{let i=O(e),a,o=()=>setTimeout(()=>{i=O(e),r()},O(t));return jn(()=>{clearTimeout(a)}),{get(){return n(),i},set(e){i=e,r(),clearTimeout(a),a=o()}}})}function Kn(e,t){Bn(t)&&At(e,t)}function qn(e,t,n={}){let{immediate:r=!0,immediateCallback:i=!1}=n,a=gn(!1),o;function s(){o&&=(clearTimeout(o),void 0)}function c(){a.value=!1,s()}function l(...n){i&&e(),s(),a.value=!0,o=setTimeout(()=>{a.value=!1,o=void 0,e(...n)},O(t))}return r&&(a.value=!0,B&&l()),jn(c),{isPending:j(a),start:l,stop:c}}function Jn(e,t,n){return k(e,t,{...n,immediate:!0})}var Yn=B?window:void 0;B&&window.document,B&&window.navigator,B&&window.location;function V(e){let t=O(e);return t?.$el??t}function Xn(...e){let t=(e,t,n,r)=>(e.addEventListener(t,n,r),()=>e.removeEventListener(t,n,r)),n=M(()=>{let t=zn(O(e[0])).filter(e=>e!=null);return t.every(e=>typeof e!=`string`)?t:void 0});return Jn(()=>[n.value?.map(e=>V(e))??[Yn].filter(e=>e!=null),zn(O(n.value?e[1]:e[0])),zn(A(n.value?e[2]:e[1])),O(n.value?e[3]:e[2])],([e,n,r,i],a,o)=>{if(!e?.length||!n?.length||!r?.length)return;let s=In(i)?{...i}:i,c=e.flatMap(e=>n.flatMap(n=>r.map(r=>t(e,n,r,s))));o(()=>{c.forEach(e=>e())})},{flush:`post`})}function Zn(){let e=gn(!1),t=Ce();return t&&pt(()=>{e.value=!0},t),e}function Qn(e){let t=Zn();return M(()=>(t.value,!!e()))}function $n(e){return typeof e==`function`?e:typeof e==`string`?t=>t.key===e:Array.isArray(e)?t=>e.includes(t.key):()=>!0}function er(...e){let t,n,r={};e.length===3?(t=e[0],n=e[1],r=e[2]):e.length===2?typeof e[1]==`object`?(t=!0,n=e[0],r=e[1]):(t=e[0],n=e[1]):(t=!0,n=e[0]);let{target:i=Yn,eventName:a=`keydown`,passive:o=!1,dedupe:s=!1}=r,c=$n(t);return Xn(i,a,e=>{e.repeat&&O(s)||c(e)&&n(e)},o)}function tr(e){return JSON.parse(JSON.stringify(e))}function nr(e,t,n={}){let{window:r=Yn,...i}=n,a,o=Qn(()=>r&&`ResizeObserver`in r),s=()=>{a&&=(a.disconnect(),void 0)},c=k(M(()=>{let t=O(e);return Array.isArray(t)?t.map(e=>V(e)):[V(t)]}),e=>{if(s(),o.value&&r){a=new ResizeObserver(t);for(let t of e)t&&a.observe(t,i)}},{immediate:!0,flush:`post`}),l=()=>{s(),c()};return jn(l),{isSupported:o,stop:l}}function rr(e,t,n,r={}){var i,a;let{clone:o=!1,passive:s=!1,eventName:c,deep:l=!1,defaultValue:u,shouldEmit:d}=r,f=Ce(),p=n||f?.emit||(f==null||(i=f.$emit)==null?void 0:i.bind(f))||(f==null||(a=f.proxy)==null||(a=a.$emit)==null?void 0:a.bind(f?.proxy)),m=c;t||=`modelValue`,m||=`update:${t.toString()}`;let h=e=>o?typeof o==`function`?o(e):tr(e):e,g=()=>Pn(e[t])?h(e[t]):u,_=e=>{d?d(e)&&p(m,e):p(m,e)};if(s){let n=L(g()),r=!1;return k(()=>e[t],e=>{r||(r=!0,n.value=h(e),F(()=>r=!1))}),k(n,n=>{!r&&(n!==e[t]||l)&&_(n)},{deep:l}),n}return M({get(){return g()},set(e){_(e)}})}function ir(e){return e?e.flatMap(e=>e.type===Wt?ir(e.children):[e]):[]}var[ar,or]=On(`ConfigProvider`),H=Ct({layersRoot:new Set,layersWithOutsidePointerEventsDisabled:new Set,originalBodyPointerEvents:void 0,branches:new Set});function sr(e){if(typeof e!=`object`||!e)return!1;let t=Object.getPrototypeOf(e);return t!==null&&t!==Object.prototype&&Object.getPrototypeOf(t)!==null||Symbol.iterator in e?!1:Symbol.toStringTag in e?Object.prototype.toString.call(e)===`[object Module]`:!0}function cr(e,t,n=`.`,r){if(!sr(t))return cr(e,{},n,r);let i={...t};for(let t of Object.keys(e)){if(t===`__proto__`||t===`constructor`)continue;let a=e[t];a!=null&&(r&&r(i,t,a,n)||(i[t]=Array.isArray(a)&&Array.isArray(i[t])?[...a,...i[t]]:sr(a)&&sr(i[t])?cr(a,i[t],(n?`${n}.`:``)+t.toString(),r):a))}return i}function lr(e){return(...t)=>t.reduce((t,n)=>cr(t,n,``,e),{})}var ur=lr(),dr=Vn(()=>{let e=L(new Map),t=L(),n=M(()=>{for(let t of e.value.values())if(t)return!0;return!1}),r=ar({scrollBody:L(!0)}),i=null,a=()=>{document.body.style.paddingRight=``,document.body.style.marginRight=``,H.layersWithOutsidePointerEventsDisabled.size===0&&(document.body.style.pointerEvents=``),document.documentElement.style.removeProperty(`--scrollbar-width`),document.body.style.overflow=t.value??``,Ln&&i?.(),t.value=void 0};return k(n,(e,o)=>{if(!B)return;if(!e){o&&a();return}t.value===void 0&&(t.value=document.body.style.overflow);let s=window.innerWidth-document.documentElement.clientWidth,c={padding:s,margin:0},l=r.scrollBody?.value?typeof r.scrollBody.value==`object`?ur({padding:r.scrollBody.value.padding===!0?s:r.scrollBody.value.padding,margin:r.scrollBody.value.margin===!0?s:r.scrollBody.value.margin},c):c:{padding:0,margin:0};s>0&&(document.body.style.paddingRight=typeof l.padding==`number`?`${l.padding}px`:String(l.padding),document.body.style.marginRight=typeof l.margin==`number`?`${l.margin}px`:String(l.margin),document.documentElement.style.setProperty(`--scrollbar-width`,`${s}px`),document.body.style.overflow=`hidden`),Ln&&(i=Xn(document,`touchmove`,e=>mr(e),{passive:!1})),F(()=>{n.value&&(document.body.style.pointerEvents=`none`,document.body.style.overflow=`hidden`)})},{immediate:!0,flush:`sync`}),e});function fr(e){let t=Math.random().toString(36).substring(2,7),n=dr();n.value.set(t,e??!1);let r=M({get:()=>n.value.get(t)??!1,set:e=>n.value.set(t,e)});return Kn(()=>{n.value.delete(t)}),r}function pr(e){let t=window.getComputedStyle(e);if(t.overflowX===`scroll`||t.overflowY===`scroll`||t.overflowX===`auto`&&e.clientWidth<e.scrollWidth||t.overflowY===`auto`&&e.clientHeight<e.scrollHeight)return!0;{let t=e.parentNode;return!(t instanceof Element)||t.tagName===`BODY`?!1:pr(t)}}function mr(e){let t=e||window.event,n=t.target;return n instanceof Element&&pr(n)?!1:t.touches.length>1||(t.preventDefault&&t.cancelable&&t.preventDefault(),!1)}function hr(e){let t=ar({dir:L(`ltr`)});return M(()=>e?.value||t.dir?.value||`ltr`)}function gr(e){let t=Ce(),n=t?.type.emits,r={};return n?.length||console.warn(`No emitted event found. Please check component: ${t?.type.__name}`),n?.forEach(t=>{r[Ht(Mt(t))]=(...n)=>e(t,...n)}),r}function _r(){let e=Ce(),t=L(),n=M(()=>r());Yt(()=>{n.value!==r()&&ce(t)});function r(){return t.value&&`$el`in t.value&&[`#text`,`#comment`].includes(t.value.$el.nodeName)?t.value.$el.nextElementSibling:V(t)}let i=Object.assign({},e.exposed),a={};for(let t in e.props)Object.defineProperty(a,t,{enumerable:!0,configurable:!0,get:()=>e.props[t]});if(Object.keys(i).length>0)for(let e in i)Object.defineProperty(a,e,{enumerable:!0,configurable:!0,get:()=>i[e]});Object.defineProperty(a,"$el",{enumerable:!0,configurable:!0,get:()=>e.vnode.el}),e.exposed=a;function o(n){if(t.value=n,n&&(Object.defineProperty(a,"$el",{enumerable:!0,configurable:!0,get:()=>n instanceof Element?n:n.$el}),!(n instanceof Element)&&!Object.hasOwn(n,`$el`))){let t=n.$.exposed,r=Object.assign({},a);for(let e in t)Object.defineProperty(r,e,{enumerable:!0,configurable:!0,get:()=>t[e]});e.exposed=r}}return{forwardRef:o,currentRef:t,currentElement:n}}function vr(e){let t=Ce(),n=Object.keys(t?.type.props??{}).reduce((e,n)=>{let r=(t?.type.props[n]).default;return r!==void 0&&(e[n]=r),e},{}),r=pn(e);return M(()=>{let e={},i=t?.vnode.props??{};return Object.keys(i).forEach(t=>{e[Mt(t)]=i[t]}),Object.keys({...n,...e}).reduce((e,t)=>(r.value[t]!==void 0&&(e[t]=r.value[t]),e),{})})}function yr(e,t){let n=vr(e),r=t?gr(t):{};return M(()=>({...n.value,...r}))}var br=function(e){return typeof document>`u`?null:(Array.isArray(e)?e[0]:e).ownerDocument.body},xr=new WeakMap,Sr=new WeakMap,Cr={},wr=0,Tr=function(e){return e&&(e.host||Tr(e.parentNode))},Er=function(e,t){return t.map(function(t){if(e.contains(t))return t;var n=Tr(t);return n&&e.contains(n)?n:(console.error(`aria-hidden`,t,`in not contained inside`,e,`. Doing nothing`),null)}).filter(function(e){return!!e})},Dr=function(e,t,n,r){var i=Er(t,Array.isArray(e)?e:[e]);Cr[n]||(Cr[n]=new WeakMap);var a=Cr[n],o=[],s=new Set,c=new Set(i),l=function(e){e&&!s.has(e)&&(s.add(e),l(e.parentNode))};i.forEach(l);var u=function(e){e&&!c.has(e)&&Array.prototype.forEach.call(e.children,function(e){if(s.has(e))u(e);else try{var t=e.getAttribute(r),i=t!==null&&t!==`false`,c=(xr.get(e)||0)+1,l=(a.get(e)||0)+1;xr.set(e,c),a.set(e,l),o.push(e),c===1&&i&&Sr.set(e,!0),l===1&&e.setAttribute(n,`true`),i||e.setAttribute(r,`true`)}catch(t){console.error(`aria-hidden: cannot operate on `,e,t)}})};return u(t),s.clear(),wr++,function(){o.forEach(function(e){var t=xr.get(e)-1,i=a.get(e)-1;xr.set(e,t),a.set(e,i),t||(Sr.has(e)||e.removeAttribute(r),Sr.delete(e)),i||e.removeAttribute(n)}),wr--,wr||(xr=new WeakMap,xr=new WeakMap,Sr=new WeakMap,Cr={})}},Or=function(e,t,n){n===void 0&&(n=`data-aria-hidden`);var r=Array.from(Array.isArray(e)?e:[e]),i=t||br(e);return i?(r.push.apply(r,Array.from(i.querySelectorAll(`[aria-live], script`))),Dr(r,i,n,`aria-hidden`)):function(){return null}};function kr(e){let t;k(()=>V(e),e=>{let n=!1;try{n=!!e?.closest(`[popover]:not(:popover-open)`)}catch{}e&&!n?t=Or(e):t&&t()}),St(()=>{t&&t()})}var Ar=0;function jr(e,t=`reka`){if(e)return e;let n,r=ar({useId:void 0});return n=r.useId?r.useId():`useId`in Sn?Ne?.():`${++Ar}`,t?`${t}-${n}`:n}function Mr(e){let t=L(),n=M(()=>t.value?.width??0),r=M(()=>t.value?.height??0),i;return pt(()=>{let n=V(e);n?(t.value={width:n.offsetWidth,height:n.offsetHeight},i=new ResizeObserver(e=>{if(!Array.isArray(e)||!e.length)return;let r=e[0],i,a;if(`borderBoxSize`in r){let e=r.borderBoxSize,t=Array.isArray(e)?e[0]:e;i=t.inlineSize,a=t.blockSize}else i=n.offsetWidth,a=n.offsetHeight;t.value={width:i,height:a}}),i.observe(n,{box:`border-box`})):t.value=void 0}),St(()=>{i?.disconnect(),i=void 0}),{width:n,height:r}}function Nr(e,t){let n=L(e);function r(e){return t[n.value][e]??n.value}return{state:n,dispatch:e=>{n.value=r(e)}}}function Pr(e,t){let n=L({}),r=L(`none`),i=L(e),a=e.value?`mounted`:`unmounted`,o,s=t.value?.ownerDocument.defaultView??Yn,{state:c,dispatch:l}=Nr(a,{mounted:{UNMOUNT:`unmounted`,ANIMATION_OUT:`unmountSuspended`},unmountSuspended:{MOUNT:`mounted`,ANIMATION_END:`unmounted`},unmounted:{MOUNT:`mounted`}}),u=e=>{if(B){let n=new CustomEvent(e,{bubbles:!1,cancelable:!1});t.value?.dispatchEvent(n)}};k(e,async(e,i)=>{let a=i!==e;if(await F(),a){let a=r.value,o=Fr(t.value);e?(l(`MOUNT`),u(`enter`),o===`none`&&u(`after-enter`)):o===`none`||o===`undefined`||n.value?.display===`none`?(l(`UNMOUNT`),u(`leave`),u(`after-leave`)):i&&a!==o?(l(`ANIMATION_OUT`),u(`leave`)):(l(`UNMOUNT`),u(`after-leave`))}},{immediate:!0});let d=e=>{if(e.target!==t.value)return;let n=Fr(t.value),r=n.includes(CSS.escape(e.animationName)),a=c.value===`mounted`?`enter`:`leave`;if(r&&(u(`after-${a}`),l(`ANIMATION_END`),!i.value)){let e=t.value.style.animationFillMode;t.value.style.animationFillMode=`forwards`,o=s?.setTimeout(()=>{t.value?.style.animationFillMode===`forwards`&&(t.value.style.animationFillMode=e)})}n===`none`&&l(`ANIMATION_END`)},f=e=>{e.target===t.value&&(r.value=Fr(t.value))},p=k(t,(e,t)=>{e?(n.value=getComputedStyle(e),e.addEventListener(`animationstart`,f),e.addEventListener(`animationcancel`,d),e.addEventListener(`animationend`,d)):(l(`ANIMATION_END`),o!==void 0&&s?.clearTimeout(o),t?.removeEventListener(`animationstart`,f),t?.removeEventListener(`animationcancel`,d),t?.removeEventListener(`animationend`,d))},{immediate:!0}),m=k(c,()=>{let e=Fr(t.value);r.value=c.value===`mounted`?e:`none`});return St(()=>{p(),m(),t.value&&(t.value.removeEventListener(`animationstart`,f),t.value.removeEventListener(`animationcancel`,d),t.value.removeEventListener(`animationend`,d)),o!==void 0&&s?.clearTimeout(o)}),{isPresent:M(()=>[`mounted`,`unmountSuspended`].includes(c.value))}}function Fr(e){return e&&getComputedStyle(e).animationName||`none`}var Ir=N({name:`Presence`,props:{present:{type:Boolean,required:!0},forceMount:{type:Boolean}},slots:{},setup(e,{slots:t,expose:n}){let{present:r,forceMount:i}=He(e),a=L(),{isPresent:o}=Pr(r,a);n({present:o});let s=t.default({present:o.value});s=ir(s||[]);let c=Ce();if(s&&s?.length>1){let e=c?.parent?.type.name?`<${c.parent.type.name} />`:`component`;throw Error([`Detected an invalid children for \`${e}\` for \`Presence\` component.`,``,"Note: Presence works similarly to `v-if` directly, but it waits for animation/transition to finished before unmounting. So it expect only one direct child of valid VNode type.",`You can apply a few solutions:`,["Provide a single child element so that `presence` directive attach correctly.",`Ensure the first child is an actual element instead of a raw text node or comment node.`].map(e=>` - ${e}`).join(`
|
|
2
|
+
`)].join(`
|
|
3
|
+
`))}return()=>i.value||r.value||o.value?D(t.default({present:o.value})[0],{ref:e=>{let t=V(e);return t?.hasAttribute===void 0||(t?.hasAttribute(`data-reka-popper-content-wrapper`)?a.value=t.firstElementChild:a.value=t),t}}):null}}),Lr=N({name:`PrimitiveSlot`,inheritAttrs:!1,setup(e,{attrs:t,slots:n}){return()=>{if(!n.default)return null;let e=ir(n.default()),r=e.findIndex(e=>e.type!==Qt);if(r===-1)return e;let i=e[r];delete i.props?.ref;let a=i.props?yt(t,i.props):t,o=Tt({...i,props:{}},a);return e.length===1?o:(e[r]=o,e)}}}),Rr=[`area`,`img`,`input`],zr=N({name:`Primitive`,inheritAttrs:!1,props:{asChild:{type:Boolean,default:!1},as:{type:[String,Object],default:`div`}},setup(e,{attrs:t,slots:n}){let r=e.asChild?`template`:e.as;return typeof r==`string`&&Rr.includes(r)?()=>D(r,t):r===`template`?()=>D(Lr,t,{default:n.default}):()=>D(e.as,t,{default:n.default})}}),Br=`dismissableLayer.pointerDownOutside`,Vr=`dismissableLayer.focusOutside`;function Hr(e,t){if(!(t instanceof Element))return!1;let n=t.closest(`[data-dismissable-layer]`),r=e.dataset.dismissableLayer===``?e:e.querySelector(`[data-dismissable-layer]`),i=Array.from(e.ownerDocument.querySelectorAll(`[data-dismissable-layer]`));return!!(n&&(r===n||i.indexOf(r)<i.indexOf(n)))}function Ur(e,t,n=!0){let r=t?.value?.ownerDocument??globalThis?.document,i=L(!1),a=L(()=>{});return Ge(o=>{if(!B||!O(n))return;let s=async n=>{let o=n.target;if(t?.value&&o){if(Hr(t.value,o)){i.value=!1;return}if(n.target&&!i.value){let t={originalEvent:n};function i(){kn(Br,e,t)}n.pointerType===`touch`?(r.removeEventListener(`click`,a.value),a.value=i,r.addEventListener(`click`,a.value,{once:!0})):i()}else r.removeEventListener(`click`,a.value);i.value=!1}},c=window.setTimeout(()=>{r.addEventListener(`pointerdown`,s)},0);o(()=>{window.clearTimeout(c),r.removeEventListener(`pointerdown`,s),r.removeEventListener(`click`,a.value)})}),{onPointerDownCapture:()=>{O(n)&&(i.value=!0)}}}function Wr(e,t,n=!0){let r=t?.value?.ownerDocument??globalThis?.document,i=L(!1);return Ge(a=>{if(!B||!O(n))return;let o=async n=>{if(!t?.value)return;await F(),await F();let r=n.target;t.value&&r&&!Hr(t.value,r)&&n.target&&!i.value&&kn(Vr,e,{originalEvent:n})};r.addEventListener(`focusin`,o),a(()=>r.removeEventListener(`focusin`,o))}),{onFocusCapture:()=>{O(n)&&(i.value=!0)},onBlurCapture:()=>{O(n)&&(i.value=!1)}}}var Gr=N({__name:`DismissableLayer`,props:{disableOutsidePointerEvents:{type:Boolean,required:!1,default:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1},present:{type:Boolean,required:!1,default:!0}},emits:[`escapeKeyDown`,`pointerDownOutside`,`focusOutside`,`interactOutside`,`dismiss`],setup(e,{emit:t}){let n=e,r=t,{forwardRef:i,currentElement:a}=_r(),o=M(()=>a.value?.ownerDocument??globalThis.document),s=M(()=>H.layersRoot),c=M(()=>a.value?Array.from(s.value).indexOf(a.value):-1),l=M(()=>H.layersWithOutsidePointerEventsDisabled.size>0),u=M(()=>{let e=Array.from(s.value),[t]=[...H.layersWithOutsidePointerEventsDisabled].slice(-1),n=e.indexOf(t);return c.value>=n}),d=Ur(async e=>{let t=[...H.branches].some(t=>t?.contains(e.target));n.present&&u.value&&!t&&(r(`pointerDownOutside`,e),r(`interactOutside`,e),await F(),e.defaultPrevented||r(`dismiss`))},a,()=>n.present),f=Wr(e=>{let t=[...H.branches].some(t=>t?.contains(e.target));n.present&&!t&&(r(`focusOutside`,e),r(`interactOutside`,e),e.defaultPrevented||r(`dismiss`))},a);return er(`Escape`,e=>{n.present&&c.value===s.value.size-1&&(r(`escapeKeyDown`,e),e.defaultPrevented||r(`dismiss`))}),k([a,()=>n.disableOutsidePointerEvents,()=>n.present],([e,t,n],r,i)=>{e&&n&&t&&(H.layersWithOutsidePointerEventsDisabled.size===0&&(H.originalBodyPointerEvents=o.value.body.style.pointerEvents,o.value.body.style.pointerEvents=`none`),H.layersWithOutsidePointerEventsDisabled.add(e),i(()=>{H.layersWithOutsidePointerEventsDisabled.delete(e),H.layersWithOutsidePointerEventsDisabled.size===0&&!An(H.originalBodyPointerEvents)&&(o.value.body.style.pointerEvents=H.originalBodyPointerEvents)}))},{immediate:!0}),k([a,()=>n.present],([e,t],n,r)=>{e&&t&&(s.value.add(e),r(()=>{s.value.delete(e)}))},{immediate:!0}),Ge(e=>{e(()=>{a.value&&(s.value.delete(a.value),H.layersWithOutsidePointerEventsDisabled.delete(a.value))})}),(e,t)=>(P(),I(A(zr),{ref:A(i),"as-child":e.asChild,as:e.as,"data-dismissable-layer":``,style:vt({pointerEvents:l.value?u.value?`auto`:`none`:void 0}),onFocusCapture:A(f).onFocusCapture,onBlurCapture:A(f).onBlurCapture,onPointerdownCapture:A(d).onPointerDownCapture},{default:Zt(()=>[R(e.$slots,`default`)]),_:3},8,[`as-child`,`as`,`style`,`onFocusCapture`,`onBlurCapture`,`onPointerdownCapture`]))}}),Kr=Nn(()=>L([]));function qr(){let e=Kr();return{add(t){let n=e.value[0];t!==n&&n?.pause(),e.value=Jr(e.value,t),e.value.unshift(t)},remove(t){e.value=Jr(e.value,t),e.value[0]?.resume()}}}function Jr(e,t){let n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}var Yr=`focusScope.autoFocusOnMount`,Xr=`focusScope.autoFocusOnUnmount`,Zr={bubbles:!1,cancelable:!0};function Qr(e,{select:t=!1}={}){let n=z();for(let r of e)if(U(r,{select:t}),z()!==n)return!0}function $r(e){let t=ei(e);return[ti(t,e),ti(t.reverse(),e)]}function ei(e){let t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>{let t=e.tagName===`INPUT`&&e.type===`hidden`;return e.disabled||e.hidden||t?NodeFilter.FILTER_SKIP:e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function ti(e,t){for(let n of e)if(!ni(n,{upTo:t}))return n}function ni(e,{upTo:t}){if(getComputedStyle(e).visibility===`hidden`)return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display===`none`)return!0;e=e.parentElement}return!1}function ri(e){return e instanceof HTMLInputElement&&`select`in e}function U(e,{select:t=!1}={}){if(e&&e.focus){let n=z();e.focus({preventScroll:!0}),e!==n&&ri(e)&&t&&e.select()}}var ii=N({__name:`FocusScope`,props:{loop:{type:Boolean,required:!1,default:!1},trapped:{type:Boolean,required:!1,default:!1},present:{type:Boolean,required:!1,default:!0},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},emits:[`mountAutoFocus`,`unmountAutoFocus`],setup(e,{emit:t}){let n=e,r=t,{currentRef:i,currentElement:a}=_r(),o=L(null),s=qr(),c=Ct({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}});Ge(e=>{if(!B)return;let t=a.value;if(!n.trapped)return;function r(e){if(c.paused||!t)return;let n=e.target;t.contains(n)?o.value=n:U(o.value,{select:!0})}function i(e){if(c.paused||!t)return;let n=e.relatedTarget;n!==null&&(t.contains(n)||U(o.value,{select:!0}))}function s(e){let n=o.value;if(n===null||!e.some(e=>e.removedNodes.length>0))return;let r=z();r&&t.contains(r)||t.contains(n)||U(t)}document.addEventListener(`focusin`,r),document.addEventListener(`focusout`,i);let l=new MutationObserver(s);t&&l.observe(t,{childList:!0,subtree:!0}),e(()=>{document.removeEventListener(`focusin`,r),document.removeEventListener(`focusout`,i),l.disconnect()})});function l(e,t){let n=new CustomEvent(Yr,Zr),i=e=>r(`mountAutoFocus`,e);e.addEventListener(Yr,i),e.dispatchEvent(n),e.removeEventListener(Yr,i),n.defaultPrevented||(Qr(ei(e),{select:!0}),z()===t&&U(e))}Ge(async e=>{let t=a.value;if(await F(),!t)return;n.present!==!1&&s.add(c);let i=z();!t.contains(i)&&n.present!==!1&&l(t,i),e(()=>{let e=new CustomEvent(Xr,Zr),n=e=>{r(`unmountAutoFocus`,e)};t.addEventListener(Xr,n),t.dispatchEvent(e),t.setAttribute(`data-focus-scope-unmounting`,``),setTimeout(()=>{e.defaultPrevented||U(i??document.body,{select:!0}),t.removeEventListener(Xr,n),s.remove(c),t.removeAttribute(`data-focus-scope-unmounting`)},0)})}),k(()=>n.present,async(e,t)=>{if(!B)return;if(e===!1&&t===!0){s.remove(c);return}if(e!==!0||t!==!1)return;s.add(c),await F();let n=a.value;if(!n)return;let r=z();n.contains(r)||l(n,r)});function u(e){if(!n.loop&&!n.trapped||c.paused)return;let t=e.key===`Tab`&&!e.altKey&&!e.ctrlKey&&!e.metaKey,r=z();if(t&&r){let t=e.currentTarget,[i,a]=$r(t);i&&a?!e.shiftKey&&r===a?(e.preventDefault(),n.loop&&U(i,{select:!0})):e.shiftKey&&r===i&&(e.preventDefault(),n.loop&&U(a,{select:!0})):r===t&&e.preventDefault()}}return(e,t)=>(P(),I(A(zr),{ref_key:`currentRef`,ref:i,tabindex:`-1`,"as-child":e.asChild,as:e.as,onKeydown:u},{default:Zt(()=>[R(e.$slots,`default`)]),_:3},8,[`as-child`,`as`]))}}),ai=[`Enter`,` `],oi=[`ArrowDown`,`PageUp`,`Home`],si=[`ArrowUp`,`PageDown`,`End`];[...oi,...si],[...ai],[...ai];function ci(e){return e?`open`:`closed`}function li(e){let t=z();for(let n of e)if(n===t||(n.focus(),z()!==t))return}var ui=N({__name:`Teleport`,props:{to:{type:null,required:!1},disabled:{type:Boolean,required:!1},defer:{type:Boolean,required:!1},forceMount:{type:Boolean,required:!1}},setup(e){let t=e,n=ar({}),r=M(()=>t.to??n.teleportTo?.value??`body`),i=Zn();return(e,t)=>A(i)||e.forceMount?(P(),I(cn,{key:0,to:r.value,disabled:e.disabled,defer:e.defer},[R(e.$slots,`default`)],8,[`to`,`disabled`,`defer`])):_n(`v-if`,!0)}}),di=N({__name:`VisuallyHidden`,props:{feature:{type:String,required:!1,default:`focusable`},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:`span`}},setup(e){return(e,t)=>(P(),I(A(zr),{as:e.as,"as-child":e.asChild,"aria-hidden":e.feature===`focusable`||e.feature===`fully-hidden`?`true`:void 0,"data-hidden":e.feature===`fully-hidden`?``:void 0,tabindex:e.feature===`fully-hidden`?`-1`:void 0,style:{position:`absolute`,border:0,width:`1px`,height:`1px`,padding:0,margin:`-1px`,overflow:`hidden`,clip:`rect(0, 0, 0, 0)`,clipPath:`inset(50%)`,whiteSpace:`nowrap`,wordWrap:`normal`,top:`-1px`,left:`-1px`}},{default:Zt(()=>[R(e.$slots,`default`)]),_:3},8,[`as`,`as-child`,`aria-hidden`,`data-hidden`,`tabindex`]))}}),[fi,pi]=On(`PopperRoot`),mi=N({inheritAttrs:!1,__name:`PopperRoot`,setup(e){let t=L();return pi({anchor:t,onAnchorChange:e=>t.value=e}),(e,t)=>R(e.$slots,`default`)}}),hi=N({__name:`PopperAnchor`,props:{reference:{type:null,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},setup(e){let t=e,{forwardRef:n,currentElement:r}=_r(),i=fi();return Ye(()=>{i.onAnchorChange(t.reference??r.value)}),(e,t)=>(P(),I(A(zr),{ref:A(n),as:e.as,"as-child":e.asChild},{default:Zt(()=>[R(e.$slots,`default`)]),_:3},8,[`as`,`as-child`]))}});function gi(e){return e!==null}function _i(e){return{name:`transformOrigin`,options:e,fn(t){let{placement:n,rects:r,middlewareData:i}=t,a=i.arrow?.centerOffset!==0,o=a?0:e.arrowWidth,s=a?0:e.arrowHeight,[c,l]=vi(n),u={start:e.dir===`rtl`?`100%`:`0%`,center:`50%`,end:e.dir===`rtl`?`0%`:`100%`}[l],d={start:`0%`,center:`50%`,end:`100%`}[l],f=(i.arrow?.x??0)+o/2,p=(i.arrow?.y??0)+s/2,m=``,h=``;return c===`bottom`?(m=a?u:`${f}px`,h=`${-s}px`):c===`top`?(m=a?u:`${f}px`,h=`${r.floating.height+s}px`):c===`right`?(m=`${-s}px`,h=a?d:`${p}px`):c===`left`&&(m=`${r.floating.width+s}px`,h=a?d:`${p}px`),{data:{x:m,y:h}}}}}function vi(e){let[t,n=`center`]=e.split(`-`);return[t,n]}var yi=[`top`,`right`,`bottom`,`left`],W=Math.min,G=Math.max,bi=Math.round,xi=Math.floor,K=e=>({x:e,y:e}),Si={left:`right`,right:`left`,bottom:`top`,top:`bottom`};function Ci(e,t,n){return G(e,W(t,n))}function q(e,t){return typeof e==`function`?e(t):e}function J(e){return e.split(`-`)[0]}function wi(e){return e.split(`-`)[1]}function Ti(e){return e===`x`?`y`:`x`}function Ei(e){return e===`y`?`height`:`width`}function Y(e){let t=e[0];return t===`t`||t===`b`?`y`:`x`}function Di(e){return Ti(Y(e))}function Oi(e,t,n){n===void 0&&(n=!1);let r=wi(e),i=Di(e),a=Ei(i),o=i===`x`?r===(n?`end`:`start`)?`right`:`left`:r===`start`?`bottom`:`top`;return t.reference[a]>t.floating[a]&&(o=Li(o)),[o,Li(o)]}function ki(e){let t=Li(e);return[Ai(e),t,Ai(t)]}function Ai(e){return e.includes(`start`)?e.replace(`start`,`end`):e.replace(`end`,`start`)}var ji=[`left`,`right`],Mi=[`right`,`left`],Ni=[`top`,`bottom`],Pi=[`bottom`,`top`];function Fi(e,t,n){switch(e){case`top`:case`bottom`:return n?t?Mi:ji:t?ji:Mi;case`left`:case`right`:return t?Ni:Pi;default:return[]}}function Ii(e,t,n,r){let i=wi(e),a=Fi(J(e),n===`start`,r);return i&&(a=a.map(e=>e+`-`+i),t&&(a=a.concat(a.map(Ai)))),a}function Li(e){let t=J(e);return Si[t]+e.slice(t.length)}function Ri(e){return{top:e.top??0,right:e.right??0,bottom:e.bottom??0,left:e.left??0}}function zi(e){return typeof e==`number`?{top:e,right:e,bottom:e,left:e}:Ri(e)}function Bi(e){let{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}function Vi(e,t,n){let{reference:r,floating:i}=e,a=Y(t),o=Di(t),s=Ei(o),c=J(t),l=a===`y`,u=r.x+r.width/2-i.width/2,d=r.y+r.height/2-i.height/2,f=r[s]/2-i[s]/2,p;switch(c){case`top`:p={x:u,y:r.y-i.height};break;case`bottom`:p={x:u,y:r.y+r.height};break;case`right`:p={x:r.x+r.width,y:d};break;case`left`:p={x:r.x-i.width,y:d};break;default:p={x:r.x,y:r.y}}let m=wi(t);return m&&(p[o]+=f*(m===`end`?1:-1)*(n&&l?-1:1)),p}async function Hi(e,t){t===void 0&&(t={});let{x:n,y:r,platform:i,rects:a,elements:o,strategy:s}=e,{boundary:c=`clippingAncestors`,rootBoundary:l=`viewport`,elementContext:u=`floating`,altBoundary:d=!1,padding:f=0}=q(t,e),p=zi(f),m=o[d?u===`floating`?`reference`:`floating`:u],h=Bi(await i.getClippingRect({element:await(i.isElement==null?void 0:i.isElement(m))??!0?m:m.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(o.floating)),boundary:c,rootBoundary:l,strategy:s})),g=u===`floating`?{x:n,y:r,width:a.floating.width,height:a.floating.height}:a.reference,_=await(i.getOffsetParent==null?void 0:i.getOffsetParent(o.floating)),v=await(i.isElement==null?void 0:i.isElement(_))&&await(i.getScale==null?void 0:i.getScale(_))||{x:1,y:1},y=Bi(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:o,rect:g,offsetParent:_,strategy:s}):g);return{top:(h.top-y.top+p.top)/v.y,bottom:(y.bottom-h.bottom+p.bottom)/v.y,left:(h.left-y.left+p.left)/v.x,right:(y.right-h.right+p.right)/v.x}}var Ui=50,Wi=async(e,t,n)=>{let{placement:r=`bottom`,strategy:i=`absolute`,middleware:a=[],platform:o}=n,s=o.detectOverflow?o:{...o,detectOverflow:Hi},c=await(o.isRTL==null?void 0:o.isRTL(t)),l=await o.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:d}=Vi(l,r,c),f=r,p=0,m={};for(let n=0;n<a.length;n++){let h=a[n];if(!h)continue;let{name:g,fn:_}=h,{x:v,y,data:b,reset:x}=await _({x:u,y:d,initialPlacement:r,placement:f,strategy:i,middlewareData:m,rects:l,platform:s,elements:{reference:e,floating:t}});u=v??u,d=y??d,m[g]={...m[g],...b},x&&p<Ui&&(p++,typeof x==`object`&&(x.placement&&(f=x.placement),x.rects&&(l=x.rects===!0?await o.getElementRects({reference:e,floating:t,strategy:i}):x.rects),{x:u,y:d}=Vi(l,f,c)),n=-1)}return{x:u,y:d,placement:f,strategy:i,middlewareData:m}},Gi=e=>({name:`arrow`,options:e,async fn(t){let{x:n,y:r,placement:i,rects:a,platform:o,elements:s,middlewareData:c}=t,{element:l,padding:u=0}=q(e,t)||{};if(l==null)return{};let d=zi(u),f={x:n,y:r},p=Di(i),m=Ei(p),h=await o.getDimensions(l),g=p===`y`,_=g?`top`:`left`,v=g?`bottom`:`right`,y=g?`clientHeight`:`clientWidth`,b=a.reference[m]+a.reference[p]-f[p]-a.floating[m],x=f[p]-a.reference[p],S=await(o.getOffsetParent==null?void 0:o.getOffsetParent(l)),C=S?S[y]:0;(!C||!await(o.isElement==null?void 0:o.isElement(S)))&&(C=s.floating[y]||a.floating[m]);let w=b/2-x/2,T=C/2-h[m]/2-1,ee=W(d[_],T),te=W(d[v],T),ne=C-h[m]-te,E=C/2-h[m]/2+w,D=Ci(ee,E,ne),re=!c.arrow&&wi(i)!=null&&E!==D&&a.reference[m]/2-(E<ee?ee:te)-h[m]/2<0,ie=re?E<ee?E-ee:E-ne:0;return{[p]:f[p]+ie,data:{[p]:D,centerOffset:E-D-ie,...re&&{alignmentOffset:ie}},reset:re}}}),Ki=function(e){return e===void 0&&(e={}),{name:`flip`,options:e,async fn(t){var n;let{placement:r,middlewareData:i,rects:a,initialPlacement:o,platform:s,elements:c}=t,{mainAxis:l=!0,crossAxis:u=!0,fallbackPlacements:d,fallbackStrategy:f=`bestFit`,fallbackAxisSideDirection:p=`none`,flipAlignment:m=!0,...h}=q(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};let g=J(r),_=Y(o),v=J(o)===o,y=await(s.isRTL==null?void 0:s.isRTL(c.floating)),b=d||(v||!m?[Li(o)]:ki(o)),x=p!==`none`;!d&&x&&b.push(...Ii(o,m,p,y));let S=[o,...b],C=await s.detectOverflow(t,h),w=[],T=i.flip?.overflows||[];if(l&&w.push(C[g]),u){let e=Oi(r,a,y);w.push(C[e[0]],C[e[1]])}if(T=[...T,{placement:r,overflows:w}],!w.every(e=>e<=0)){let e=(i.flip?.index||0)+1,t=S[e];if(t&&(u!==`alignment`||_===Y(t)||T.every(e=>Y(e.placement)!==_||e.overflows[0]>0)))return{data:{index:e,overflows:T},reset:{placement:t}};let n=T.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0]?.placement;if(!n)switch(f){case`bestFit`:{let e=T.filter(e=>{if(x){let t=Y(e.placement);return t===_||t===`y`}return!0}).map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0]?.[0];e&&(n=e);break}case`initialPlacement`:n=o}if(r!==n)return{reset:{placement:n}}}return{}}}};function qi(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Ji(e){return yi.some(t=>e[t]>=0)}var Yi=function(e){return e===void 0&&(e={}),{name:`hide`,options:e,async fn(t){let{rects:n,platform:r}=t,{strategy:i=`referenceHidden`,...a}=q(e,t);switch(i){case`referenceHidden`:{let e=qi(await r.detectOverflow(t,{...a,elementContext:`reference`}),n.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:Ji(e)}}}case`escaped`:{let e=qi(await r.detectOverflow(t,{...a,altBoundary:!0}),n.floating);return{data:{escapedOffsets:e,escaped:Ji(e)}}}default:return{}}}}},Xi=new Set([`left`,`top`]);async function Zi(e,t){let{placement:n,platform:r,elements:i}=e,a=await(r.isRTL==null?void 0:r.isRTL(i.floating)),o=J(n),s=wi(n),c=Y(n)===`y`,l=Xi.has(o)?-1:1,u=a&&c?-1:1,d=q(t,e),{mainAxis:f,crossAxis:p,alignmentAxis:m}=typeof d==`number`?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return s&&typeof m==`number`&&(p=s===`end`?m*-1:m),c?{x:p*u,y:f*l}:{x:f*l,y:p*u}}var Qi=function(e){return e===void 0&&(e=0),{name:`offset`,options:e,async fn(t){var n;let{x:r,y:i,placement:a,middlewareData:o}=t,s=await Zi(t,e);return a===o.offset?.placement&&(n=o.arrow)!=null&&n.alignmentOffset?{}:{x:r+s.x,y:i+s.y,data:{...s,placement:a}}}}},$i=function(e){return e===void 0&&(e={}),{name:`shift`,options:e,async fn(t){let{x:n,y:r,placement:i,platform:a}=t,{mainAxis:o=!0,crossAxis:s=!1,limiter:c={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...l}=q(e,t),u={x:n,y:r},d=await a.detectOverflow(t,l),f=Y(i),p=Ti(f),m=u[p],h=u[f],g=(e,t)=>Ci(t+d[e===`y`?`top`:`left`],t,t-d[e===`y`?`bottom`:`right`]);o&&(m=g(p,m)),s&&(h=g(f,h));let _=c.fn({...t,[p]:m,[f]:h});return{..._,data:{x:_.x-n,y:_.y-r,enabled:{[p]:o,[f]:s}}}}}},ea=function(e){return e===void 0&&(e={}),{options:e,fn(t){let{x:n,y:r,placement:i,rects:a,middlewareData:o}=t,{offset:s=0,mainAxis:c=!0,crossAxis:l=!0}=q(e,t),u={x:n,y:r},d=Y(i),f=Ti(d),p=u[f],m=u[d],h=q(s,t),g=typeof h==`number`?{mainAxis:h,crossAxis:0}:{mainAxis:h.mainAxis??0,crossAxis:h.crossAxis??0};if(c){let e=f===`y`?`height`:`width`,t=a.reference[f]-a.floating[e]+g.mainAxis,n=a.reference[f]+a.reference[e]-g.mainAxis;p<t?p=t:p>n&&(p=n)}if(l){let e=f===`y`?`width`:`height`,t=Xi.has(J(i)),n=a.reference[d]-a.floating[e]+(t&&o.offset?.[d]||0)+(t?0:g.crossAxis),r=a.reference[d]+a.reference[e]+(t?0:o.offset?.[d]||0)-(t?g.crossAxis:0);m<n?m=n:m>r&&(m=r)}return{[f]:p,[d]:m}}}},ta=function(e){return e===void 0&&(e={}),{name:`size`,options:e,async fn(t){let{placement:n,rects:r,platform:i,elements:a}=t,{apply:o=()=>{},...s}=q(e,t),c=await i.detectOverflow(t,s),l=J(n),u=wi(n),d=Y(n)===`y`,{width:f,height:p}=r.floating,m,h;l===`top`||l===`bottom`?(m=l,h=u===(await(i.isRTL==null?void 0:i.isRTL(a.floating))?`start`:`end`)?`left`:`right`):(h=l,m=u===`end`?`top`:`bottom`);let g=p-c.top-c.bottom,_=f-c.left-c.right,v=W(p-c[m],g),y=W(f-c[h],_),b=t.middlewareData.shift,x=!b,S=v,C=y;b!=null&&b.enabled.x&&(C=_),b!=null&&b.enabled.y&&(S=g),x&&!u&&(d?C=f-2*G(c.left,c.right):S=p-2*G(c.top,c.bottom)),await o({...t,availableWidth:C,availableHeight:S});let w=await i.getDimensions(a.floating);return f!==w.width||p!==w.height?{reset:{rects:!0}}:{}}}};function na(){return typeof window<`u`}function ra(e){return ia(e)?(e.nodeName||``).toLowerCase():`#document`}function X(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Z(e){return((ia(e)?e.ownerDocument:e.document)||window.document)?.documentElement}function ia(e){return na()?e instanceof Node||e instanceof X(e).Node:!1}function Q(e){return na()?e instanceof Element||e instanceof X(e).Element:!1}function aa(e){return na()?e instanceof HTMLElement||e instanceof X(e).HTMLElement:!1}function oa(e){return!na()||typeof ShadowRoot>`u`?!1:e instanceof ShadowRoot||e instanceof X(e).ShadowRoot}function sa(e){let{overflow:t,overflowX:n,overflowY:r,display:i}=$(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&i!==`inline`&&i!==`contents`}function ca(e){return/^(table|td|th)$/.test(ra(e))}function la(e){try{if(e.matches(`:popover-open`))return!0}catch{}try{return e.matches(`:modal`)}catch{return!1}}var ua=/transform|translate|scale|rotate|perspective|filter/,da=/paint|layout|strict|content/,fa=e=>!!e&&e!==`none`,pa;function ma(e){let t=Q(e)?$(e):e;return fa(t.transform)||fa(t.translate)||fa(t.scale)||fa(t.rotate)||fa(t.perspective)||!ga()&&(fa(t.backdropFilter)||fa(t.filter))||ua.test(t.willChange||``)||da.test(t.contain||``)}function ha(e){let t=ya(e);for(;aa(t)&&!_a(t);){if(ma(t))return t;if(la(t))return null;t=ya(t)}return null}function ga(){return pa??=typeof CSS<`u`&&CSS.supports&&CSS.supports(`-webkit-backdrop-filter`,`none`),pa}function _a(e){return/^(html|body|#document)$/.test(ra(e))}function $(e){return X(e).getComputedStyle(e)}function va(e){return Q(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function ya(e){if(ra(e)===`html`)return e;let t=e.assignedSlot||e.parentNode||oa(e)&&e.host||Z(e);return oa(t)?t.host:t}function ba(e){let t=ya(e);return _a(t)?(e.ownerDocument||e).body:aa(t)&&sa(t)?t:ba(t)}function xa(e,t,n){t===void 0&&(t=[]),n===void 0&&(n=!0);let r=ba(e),i=r===e.ownerDocument?.body,a=X(r);if(i){let e=Sa(a);return t.concat(a,a.visualViewport||[],sa(r)?r:[],e&&n?xa(e):[])}return t.concat(r,xa(r,[],n))}function Sa(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Ca(e){let t=$(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,i=aa(e),a=i?e.offsetWidth:n,o=i?e.offsetHeight:r,s=bi(n)!==a||bi(r)!==o;return s&&(n=a,r=o),{width:n,height:r,$:s}}function wa(e){return Q(e)?e:e.contextElement}function Ta(e){let t=wa(e);if(!aa(t))return K(1);let n=t.getBoundingClientRect(),{width:r,height:i,$:a}=Ca(t),o=(a?bi(n.width):n.width)/r,s=(a?bi(n.height):n.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!s||!Number.isFinite(s))&&(s=1),{x:o,y:s}}var Ea=K(0);function Da(e){let t=X(e);return!ga()||!t.visualViewport?Ea:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Oa(e,t,n){return t===void 0&&(t=!1),!!n&&t&&n===X(e)}function ka(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);let i=e.getBoundingClientRect(),a=wa(e),o=K(1);t&&(r?Q(r)&&(o=Ta(r)):o=Ta(e));let s=Oa(a,n,r)?Da(a):K(0),c=(i.left+s.x)/o.x,l=(i.top+s.y)/o.y,u=i.width/o.x,d=i.height/o.y;if(a&&r){let e=X(a),t=Q(r)?X(r):r,n=e,i=Sa(n);for(;i&&t!==n;){let e=Ta(i),t=i.getBoundingClientRect(),r=$(i),a=t.left+(i.clientLeft+parseFloat(r.paddingLeft))*e.x,o=t.top+(i.clientTop+parseFloat(r.paddingTop))*e.y;c*=e.x,l*=e.y,u*=e.x,d*=e.y,c+=a,l+=o,n=X(i),i=Sa(n)}}return Bi({width:u,height:d,x:c,y:l})}function Aa(e,t){let n=va(e).scrollLeft;return t?t.left+n:ka(Z(e)).left+n}function ja(e,t){let n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-Aa(e,n),y:n.top+t.scrollTop}}function Ma(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e,a=i===`fixed`,o=Z(r),s=t?la(t.floating):!1;if(r===o||s&&a)return n;let c={scrollLeft:0,scrollTop:0},l=K(1),u=K(0),d=aa(r);if((d||!a)&&((ra(r)!==`body`||sa(o))&&(c=va(r)),d)){let e=ka(r);l=Ta(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}let f=o&&!d&&!a?ja(o,c):K(0);return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-c.scrollLeft*l.x+u.x+f.x,y:n.y*l.y-c.scrollTop*l.y+u.y+f.y}}function Na(e){return e.getClientRects?Array.from(e.getClientRects()):[]}function Pa(e){let t=va(e),n=e.ownerDocument.body,r=G(e.scrollWidth,e.clientWidth,n.scrollWidth,n.clientWidth),i=G(e.scrollHeight,e.clientHeight,n.scrollHeight,n.clientHeight),a=-t.scrollLeft+Aa(e),o=-t.scrollTop;return $(n).direction===`rtl`&&(a+=G(e.clientWidth,n.clientWidth)-r),{width:r,height:i,x:a,y:o}}var Fa=25;function Ia(e,t,n){n===void 0&&(n=`viewport`);let r=n===`layoutViewport`,i=X(e),a=Z(e),o=i.visualViewport,s=a.clientWidth,c=a.clientHeight,l=0,u=0;if(o){let e=!ga()||t===`fixed`;r?e||(l=-o.offsetLeft,u=-o.offsetTop):(s=o.width,c=o.height,e&&(l=o.offsetLeft,u=o.offsetTop))}if(Aa(a)<=0){let e=a.ownerDocument,t=e.body,n=getComputedStyle(t),r=e.compatMode===`CSS1Compat`&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,i=Math.abs(a.clientWidth-t.clientWidth-r),o=getComputedStyle(a).scrollbarGutter===`stable both-edges`?i/2:i;o<=Fa&&(s-=o)}return{width:s,height:c,x:l,y:u}}function La(e,t){let n=ka(e,!0,t===`fixed`),r=n.top+e.clientTop,i=n.left+e.clientLeft,a=Ta(e);return{width:e.clientWidth*a.x,height:e.clientHeight*a.y,x:i*a.x,y:r*a.y}}function Ra(e,t,n){let r;if(t===`viewport`||t===`layoutViewport`)r=Ia(e,n,t);else if(t===`document`)r=Pa(Z(e));else if(Q(t))r=La(t,n);else{let n=Da(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return Bi(r)}function za(e,t){let n=t.get(e);if(n)return n;let r=xa(e,[],!1).filter(e=>Q(e)&&ra(e)!==`body`),i=null,a=$(e).position===`fixed`,o=a?ya(e):e;for(;Q(o)&&!_a(o);){let e=$(o),t=ma(o),n=i?i.position:a?`fixed`:``;!t&&(n===`fixed`||n===`absolute`&&e.position===`static`)?r=r.filter(e=>e!==o):i=e,o=ya(o)}return t.set(e,r),r}function Ba(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e,a=[...n===`clippingAncestors`?la(t)?[]:za(t,this._c):[].concat(n),r],o=Ra(t,a[0],i),s=o.top,c=o.right,l=o.bottom,u=o.left;for(let e=1;e<a.length;e++){let n=Ra(t,a[e],i);s=G(n.top,s),c=W(n.right,c),l=W(n.bottom,l),u=G(n.left,u)}return{width:c-u,height:l-s,x:u,y:s}}function Va(e){let{width:t,height:n}=Ca(e);return{width:t,height:n}}function Ha(e,t,n){let r=aa(t),i=Z(t),a=n===`fixed`,o=ka(e,!0,a,t),s={scrollLeft:0,scrollTop:0},c=K(0);if((r||!a)&&((ra(t)!==`body`||sa(i))&&(s=va(t)),r)){let e=ka(t,!0,a,t);c.x=e.x+t.clientLeft,c.y=e.y+t.clientTop}!r&&i&&(c.x=Aa(i));let l=i&&!r&&!a?ja(i,s):K(0);return{x:o.left+s.scrollLeft-c.x-l.x,y:o.top+s.scrollTop-c.y-l.y,width:o.width,height:o.height}}function Ua(e){return $(e).position===`static`}function Wa(e,t){if(!aa(e)||$(e).position===`fixed`)return null;if(t)return t(e);let n=e.offsetParent;return Z(e)===n&&(n=n.ownerDocument.body),n}function Ga(e,t){let n=X(e);if(la(e))return n;if(!aa(e)){let t=ya(e);for(;t&&!_a(t);){if(Q(t)&&!Ua(t))return t;t=ya(t)}return n}let r=Wa(e,t);for(;r&&ca(r)&&Ua(r);)r=Wa(r,t);return r&&_a(r)&&Ua(r)&&!ma(r)?n:r||ha(e)||n}var Ka=async function(e){let t=this.getOffsetParent||Ga,n=this.getDimensions,r=await n(e.floating);return{reference:Ha(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function qa(e){return $(e).direction===`rtl`}var Ja={convertOffsetParentRelativeRectToViewportRelativeRect:Ma,getDocumentElement:Z,getClippingRect:Ba,getOffsetParent:Ga,getElementRects:Ka,getClientRects:Na,getDimensions:Va,getScale:Ta,isElement:Q,isRTL:qa};function Ya(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Xa(e,t,n){let r=null,i,a=Z(e);function o(){var e;clearTimeout(i),(e=r)==null||e.disconnect(),r=null}function s(n,c){n===void 0&&(n=!1),c===void 0&&(c=1),o();let l=e.getBoundingClientRect(),{left:u,top:d,width:f,height:p}=l;if(n||t(),!f||!p)return;let m=xi(d),h=xi(a.clientWidth-(u+f)),g=xi(a.clientHeight-(d+p)),_=xi(u),v={rootMargin:-m+`px `+-h+`px `+-g+`px `+-_+`px`,threshold:G(0,W(1,c))||1},y=!0;function b(t){let n=t[0].intersectionRatio;if(!Ya(l,e.getBoundingClientRect()))return s();if(n!==c){if(!y)return s();n?s(!1,n):i=setTimeout(()=>{s(!1,1e-7)},1e3)}y=!1}try{r=new IntersectionObserver(b,{...v,root:a.ownerDocument})}catch{r=new IntersectionObserver(b,v)}r.observe(e)}let c=X(e),l=()=>s(n);return c.addEventListener(`resize`,l),s(!0),()=>{c.removeEventListener(`resize`,l),o()}}function Za(e,t,n,r){r===void 0&&(r={});let{ancestorScroll:i=!0,ancestorResize:a=!0,elementResize:o=typeof ResizeObserver==`function`,layoutShift:s=typeof IntersectionObserver==`function`,animationFrame:c=!1}=r,l=wa(e),u=i||a?[...l?xa(l):[],...t?xa(t):[]]:[];u.forEach(e=>{i&&e.addEventListener(`scroll`,n),a&&e.addEventListener(`resize`,n)});let d=l&&s?Xa(l,n,a):null,f=-1,p=null;o&&(p=new ResizeObserver(e=>{let[r]=e;r&&r.target===l&&p&&t&&(p.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var e;(e=p)==null||e.observe(t)})),n()}),l&&!c&&p.observe(l),t&&p.observe(t));let m,h=c?ka(e):null;c&&g();function g(){let t=ka(e);h&&!Ya(h,t)&&n(),h=t,m=requestAnimationFrame(g)}return n(),()=>{var e;u.forEach(e=>{i&&e.removeEventListener(`scroll`,n),a&&e.removeEventListener(`resize`,n)}),d?.(),(e=p)==null||e.disconnect(),p=null,c&&cancelAnimationFrame(m)}}var Qa=Qi,$a=$i,eo=Ki,to=ta,no=Yi,ro=Gi,io=ea,ao=(e,t,n)=>{let r=new Map,i=n??{},a={...Ja,...i.platform,_c:r};return Wi(e,t,{...i,platform:a})};function oo(e){return typeof e==`object`&&!!e&&`$el`in e}function so(e){if(oo(e)){let t=e.$el;return ia(t)&&ra(t)===`#comment`?null:t}return e}function co(e){return typeof e==`function`?e():A(e)}function lo(e){return{name:`arrow`,options:e,fn(t){let n=so(co(e.element));return n==null?{}:ro({element:n,padding:e.padding}).fn(t)}}}function uo(e){return typeof window>`u`?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function fo(e,t){let n=uo(e);return Math.round(t*n)/n}function po(e,t,n){n===void 0&&(n={});let r=n.whileElementsMounted,i=M(()=>co(n.open)??!0),a=M(()=>co(n.middleware)),o=M(()=>co(n.placement)??`bottom`),s=M(()=>co(n.strategy)??`absolute`),c=M(()=>co(n.transform)??!0),l=M(()=>so(e.value)),u=M(()=>so(t.value)),d=L(0),f=L(0),p=L(s.value),m=L(o.value),h=gn({}),g=L(!1),_=M(()=>{let e={position:p.value,left:`0`,top:`0`};if(!u.value)return e;let t=fo(u.value,d.value),n=fo(u.value,f.value);return c.value?{...e,transform:`translate(`+t+`px, `+n+`px)`,...uo(u.value)>=1.5&&{willChange:`transform`}}:{position:p.value,left:t+`px`,top:n+`px`}}),v;function y(){if(l.value==null||u.value==null)return;let e=i.value;ao(l.value,u.value,{middleware:a.value,placement:o.value,strategy:s.value}).then(t=>{d.value=t.x,f.value=t.y,p.value=t.strategy,m.value=t.placement,h.value=t.middlewareData,g.value=e!==!1})}function b(){typeof v==`function`&&(v(),v=void 0)}function x(){if(b(),r===void 0){y();return}if(l.value!=null&&u.value!=null){v=r(l.value,u.value,y);return}}function S(){i.value||(g.value=!1)}return k([a,o,s,i],y,{flush:`sync`}),k([l,u],x,{flush:`sync`}),k(i,S,{flush:`sync`}),st()&&Jt(b),{x:j(d),y:j(f),strategy:j(p),placement:j(m),middlewareData:j(h),isPositioned:j(g),floatingStyles:_,update:y}}var mo=[`dir`],ho={side:`bottom`,sideOffset:0,sideFlip:!0,align:`center`,alignOffset:0,alignFlip:!0,arrowPadding:0,hideShiftedArrow:!0,avoidCollisions:!0,collisionBoundary:()=>[],collisionPadding:0,sticky:`partial`,hideWhenDetached:!1,positionStrategy:`fixed`,updatePositionStrategy:`optimized`,prioritizePosition:!1},[go,_o]=On(`PopperContent`),vo=N({inheritAttrs:!1,__name:`PopperContent`,props:Pe({memoDependencies:{type:Array,required:!1},side:{type:null,required:!1},sideOffset:{type:Number,required:!1},sideFlip:{type:Boolean,required:!1},align:{type:null,required:!1},alignOffset:{type:Number,required:!1},alignFlip:{type:Boolean,required:!1},avoidCollisions:{type:Boolean,required:!1},collisionBoundary:{type:null,required:!1},collisionPadding:{type:[Number,Object],required:!1},arrowPadding:{type:Number,required:!1},hideShiftedArrow:{type:Boolean,required:!1},sticky:{type:String,required:!1},hideWhenDetached:{type:Boolean,required:!1},positionStrategy:{type:String,required:!1},updatePositionStrategy:{type:String,required:!1},disableUpdateOnLayoutShift:{type:Boolean,required:!1},prioritizePosition:{type:Boolean,required:!1},reference:{type:null,required:!1},dir:{type:String,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1}},{...ho}),emits:[`placed`],setup(e,{emit:t}){let n=e,r=t,i=fi(),{forwardRef:a,currentElement:o}=_r(),s=hr(M(()=>n.dir)),c=L(),l=L(),{width:u,height:d}=Mr(l),f=M(()=>n.side+(n.align===`center`?``:`-${n.align}`)),p=M(()=>typeof n.collisionPadding==`number`?n.collisionPadding:{top:0,right:0,bottom:0,left:0,...n.collisionPadding}),m=M(()=>Array.isArray(n.collisionBoundary)?n.collisionBoundary:[n.collisionBoundary]),h=M(()=>({padding:p.value,boundary:m.value.filter(gi),altBoundary:m.value.length>0})),g=M(()=>({mainAxis:n.sideFlip,crossAxis:n.alignFlip})),_=M(()=>[Qa({mainAxis:n.sideOffset+d.value,alignmentAxis:n.alignOffset}),n.prioritizePosition&&n.avoidCollisions&&eo({...h.value,...g.value}),n.avoidCollisions&&$a({mainAxis:!0,crossAxis:!!n.prioritizePosition,limiter:n.sticky===`partial`?io():void 0,...h.value}),!n.prioritizePosition&&n.avoidCollisions&&eo({...h.value,...g.value}),to({...h.value,apply:({elements:e,rects:t,availableWidth:n,availableHeight:r})=>{let{width:i,height:a}=t.reference,o=e.floating.style;o.setProperty(`--reka-popper-available-width`,`${n}px`),o.setProperty(`--reka-popper-available-height`,`${r}px`),o.setProperty(`--reka-popper-anchor-width`,`${i}px`),o.setProperty(`--reka-popper-anchor-height`,`${a}px`)}}),l.value&&lo({element:l.value,padding:n.arrowPadding}),_i({arrowWidth:u.value,arrowHeight:d.value,dir:s.value}),n.hideWhenDetached&&no({strategy:`referenceHidden`,...h.value})]),{floatingStyles:v,placement:y,isPositioned:b,middlewareData:x,update:S}=po(M(()=>n.reference??i.anchor.value),c,{strategy:n.positionStrategy,placement:f,whileElementsMounted:(...e)=>Za(...e,{layoutShift:!n.disableUpdateOnLayoutShift,animationFrame:n.updatePositionStrategy===`always`}),middleware:_}),C=M(()=>vi(y.value)[0]),w=M(()=>vi(y.value)[1]);Ye(()=>{b.value&&r(`placed`)});let T=M(()=>{let e=x.value.arrow?.centerOffset!==0;return n.hideShiftedArrow&&e}),ee=L(``);return Ge(()=>{o.value&&(ee.value=window.getComputedStyle(o.value).zIndex)}),_o({placedSide:C,onArrowChange:e=>l.value=e,arrowX:M(()=>x.value.arrow?.x??0),arrowY:M(()=>x.value.arrow?.y??0),shouldHideArrow:T}),(e,t)=>(P(),lt(`div`,{ref_key:`floatingRef`,ref:c,"data-reka-popper-content-wrapper":``,dir:A(s),style:vt({...A(v),transform:A(b)?A(v).transform:`translate(0, -200%)`,minWidth:`max-content`,zIndex:ee.value,"--reka-popper-transform-origin":[A(x).transformOrigin?.x,A(x).transformOrigin?.y].join(` `),...A(x).hide?.referenceHidden&&{visibility:`hidden`,pointerEvents:`none`}})},[n.memoDependencies?Ze([n.asChild,n.as,C.value,w.value,A(b),...Object.values(e.$attrs),...n.memoDependencies],()=>(P(),I(A(zr),yt({key:0,ref:A(a)},e.$attrs,{"as-child":n.asChild,as:n.as,"data-side":C.value,"data-align":w.value,style:{animation:A(b)?void 0:`none`}}),{default:Zt(()=>[R(e.$slots,`default`)]),_:3},16,[`as-child`,`as`,`data-side`,`data-align`,`style`])),t,0):(P(),I(A(zr),yt({key:1,ref:A(a)},e.$attrs,{"as-child":n.asChild,as:n.as,"data-side":C.value,"data-align":w.value,dir:A(s),style:{animation:A(b)?void 0:`none`}}),{default:Zt(()=>[R(e.$slots,`default`)]),_:3},16,[`as-child`,`as`,`data-side`,`data-align`,`dir`,`style`]))],12,mo))}});export{Wn as A,V as C,Mn as D,rr as E,kn as F,z as I,On as L,jn as M,qn as N,B as O,An as P,Dn as R,ar as S,nr as T,_r as _,ui as a,fr as b,ii as c,Lr as d,Ir as f,vr as g,yr as h,di as i,Gn as j,Un as k,Gr as l,kr as m,hi as n,li as o,jr as p,mi as r,ci as s,vo as t,zr as u,gr as v,Xn as w,ur as x,hr as y};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{C as e,w as t}from"./runtime-dom.esm-bundler-Btnku4nR.js";import{$ as n,D as r,E as i,Ft as a,Nt as o,On as s,Zn as c,_ as l,b as u,et as d,g as f,k as p,mt as m,o as h,qt as g,tr as _,tt as v,v as y,vn as b,wt as x,xt as S,y as C}from"./runtime-core.esm-bundler-B8D2lM98.js";import{E as w,L as T,P as E,_ as D,f as O,u as k}from"./PopperContent-CgXMlFkV.js";import{d as A,g as j,n as M,o as N,p as P,u as F}from"./VDSelect-4SBTowKT.js";var I=/[\p{Script=Han}\p{Script=Hiragana}\p{Script=Katakana}\p{Script=Hangul}\p{Script=Bopomofo}]/u,L=/android/i;function R(){return typeof navigator<`u`&&L.test(navigator.userAgent)}function z(e){let t=b(!1),n=b(!0),r=b(!1),i=f(()=>t.value&&n.value);function a(){t.value=!0,n.value=!0,r.value=!1}function o(e){e.data&&(I.test(e.data)?(n.value=!0,r.value=!0):R()&&!r.value&&(n.value=!1))}function s(n){v(()=>{t.value=!1,e?.(n)})}return{isComposing:t,shouldDeferInput:i,handleCompositionStart:a,handleCompositionUpdate:o,handleCompositionEnd:s}}function B(){return{ALT:`Alt`,ARROW_DOWN:`ArrowDown`,ARROW_LEFT:`ArrowLeft`,ARROW_RIGHT:`ArrowRight`,ARROW_UP:`ArrowUp`,BACKSPACE:`Backspace`,CAPS_LOCK:`CapsLock`,CONTROL:`Control`,DELETE:`Delete`,END:`End`,ENTER:`Enter`,ESCAPE:`Escape`,F1:`F1`,F10:`F10`,F11:`F11`,F12:`F12`,F2:`F2`,F3:`F3`,F4:`F4`,F5:`F5`,F6:`F6`,F7:`F7`,F8:`F8`,F9:`F9`,HOME:`Home`,META:`Meta`,PAGE_DOWN:`PageDown`,PAGE_UP:`PageUp`,SHIFT:`Shift`,SPACE:` `,TAB:`Tab`,CTRL:`Control`,ASTERISK:`*`,SPACE_CODE:`Space`}}var[V,H]=T(`CheckboxGroupRoot`);function U(e){return e===`indeterminate`}function W(e){return U(e)?`indeterminate`:e?`checked`:`unchecked`}var[G,K]=T(`CheckboxRoot`),q=p({inheritAttrs:!1,__name:`CheckboxRoot`,props:{defaultValue:{type:null,required:!1},modelValue:{type:null,required:!1,default:void 0},disabled:{type:Boolean,required:!1},value:{type:null,required:!1,default:`on`},id:{type:String,required:!1},trueValue:{type:null,required:!1,default:()=>!0},falseValue:{type:null,required:!1,default:()=>!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:`button`},name:{type:String,required:!1},required:{type:Boolean,required:!1}},emits:[`update:modelValue`],setup(n,{emit:r}){let i=n,a=r,{forwardRef:c,currentElement:l}=D(),p=V(null),_=w(i,`modelValue`,a,{defaultValue:i.defaultValue??i.falseValue,passive:i.modelValue===void 0}),v=f(()=>p?.disabled.value||i.disabled),b=f(()=>j(_.value,i.trueValue)),T=f(()=>E(p?.modelValue.value)?_.value===`indeterminate`?`indeterminate`:b.value:P(p.modelValue.value,i.value));function O(){if(E(p?.modelValue.value))_.value===`indeterminate`?_.value=i.trueValue:_.value=b.value?i.falseValue:i.trueValue;else{let e=[...p.modelValue.value||[]];if(P(e,i.value)){let t=e.findIndex(e=>j(e,i.value));e.splice(t,1)}else e.push(i.value);p.modelValue.value=e}}let I=A(l),L=F(),R=o(),z=f(()=>{if(!R[`aria-label`])return i.id&&l.value?document.querySelector(`[for="${i.id}"]`)?.innerText:void 0});return K({disabled:v,state:T}),(n,r)=>(m(),u(h,null,[(m(),y(x(s(p)?.rovingFocus.value?s(M):s(k)),d({...n.$attrs,...s(L)},{id:n.id,ref:s(c),role:`checkbox`,"as-child":n.asChild,as:n.as,type:n.as===`button`?`button`:void 0,"aria-checked":s(U)(T.value)?`mixed`:T.value,"aria-required":n.required,"aria-label":n.$attrs[`aria-label`]||z.value,"data-state":s(W)(T.value),"data-disabled":v.value?``:void 0,disabled:v.value,focusable:s(p)?.rovingFocus.value?!v.value:void 0,onKeydown:e(t(()=>{},[`prevent`]),[`enter`]),onClick:O}),{default:g(()=>[S(n.$slots,`default`,{modelValue:s(_),state:T.value})]),_:3},16,[`id`,`as-child`,`as`,`type`,`aria-checked`,`aria-required`,`aria-label`,`data-state`,`data-disabled`,`disabled`,`focusable`,`onKeydown`])),s(I)&&n.name&&!s(p)?(m(),y(s(N),d({key:0,type:`checkbox`,checked:!!T.value,name:n.name,value:n.value,disabled:v.value,required:n.required},s(L)),null,16,[`checked`,`name`,`value`,`disabled`,`required`])):C(`v-if`,!0)],64))}}),J=p({__name:`CheckboxIndicator`,props:{forceMount:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:`span`}},setup(e){let{forwardRef:t}=D(),n=G();return(e,i)=>(m(),y(s(O),{present:e.forceMount||s(U)(s(n).state.value)||s(n).state.value===!0},{default:g(()=>[r(s(k),d({ref:s(t),"data-state":s(W)(s(n).state.value),"data-disabled":s(n).disabled.value?``:void 0,style:{pointerEvents:`none`},"as-child":e.asChild,as:e.as},e.$attrs),{default:g(()=>[S(e.$slots,`default`)]),_:3},16,[`data-state`,`data-disabled`,`as-child`,`as`])]),_:3},8,[`present`]))}}),Y=`outline-none border border-base rounded bg-raised flex h-4 w-4 transition items-center justify-center data-[state=checked]:border-primary-500 data-[state=checked]:bg-primary-500 focus-visible:ring-2 focus-visible:ring-primary-500/40`,X=p({inheritAttrs:!1,__name:`FormCheckbox`,props:n({label:{},disabled:{type:Boolean}},{modelValue:{type:Boolean,default:!1},modelModifiers:{}}),emits:[`update:modelValue`],setup(e){let t=a(e,`modelValue`);return(n,a)=>e.label||n.$slots.default?(m(),u(`label`,d({key:0},n.$attrs,{class:[`text-sm inline-flex gap-1.5 cursor-pointer select-none items-center`,{"op-fade saturate-0 pointer-events-none":e.disabled}]}),[r(s(q),{modelValue:t.value,"onUpdate:modelValue":a[0]||=e=>t.value=e,disabled:e.disabled,class:c(Y)},{default:g(()=>[r(s(J),{class:`text-white`},{default:g(()=>[...a[2]||=[l(`div`,{class:`i-ph:check-bold text-micro text-white mt--1px`,"aria-hidden":`true`},null,-1)]]),_:1})]),_:1},8,[`modelValue`,`disabled`]),l(`span`,null,[S(n.$slots,`default`,{},()=>[i(_(e.label),1)])])],16)):(m(),y(s(q),d({key:1},n.$attrs,{modelValue:t.value,"onUpdate:modelValue":a[1]||=e=>t.value=e,disabled:e.disabled,class:Y}),{default:g(()=>[r(s(J),{class:`text-white`},{default:g(()=>[...a[3]||=[l(`div`,{class:`i-ph:check-bold text-micro text-white mt--1px`,"aria-hidden":`true`},null,-1)]]),_:1})]),_:1},16,[`modelValue`,`disabled`]))}}),Z=p({__name:`VDCheckbox`,props:n({disabled:{type:Boolean}},{modelValue:{type:Boolean},modelModifiers:{}}),emits:[`update:modelValue`],setup(e){let t=a(e,`modelValue`);return(n,r)=>(m(),y(X,{modelValue:t.value,"onUpdate:modelValue":r[0]||=e=>t.value=e,disabled:e.disabled},null,8,[`modelValue`,`disabled`]))}});export{B as n,z as r,Z as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{w as e}from"./runtime-dom.esm-bundler-Btnku4nR.js";import{$ as t,D as n,Ft as r,Ht as i,On as a,Tn as o,Zn as s,_ as c,ct as l,et as u,g as d,k as f,mt as p,qt as m,v as h,vn as g,xt as _,y as v}from"./runtime-core.esm-bundler-B8D2lM98.js";import{C as y,D as b,E as x,I as S,L as C,O as w,P as T,S as E,k as D,u as O,w as k}from"./PopperContent-CgXMlFkV.js";import{c as A,d as ee,h as j,m as te,o as ne}from"./VDSelect-4SBTowKT.js";import{n as M,r as N}from"./VDCheckbox-CH2V3bFJ.js";function P(e){let t=E({locale:g(`en`)});return d(()=>e?.value||t.locale?.value||`en`)}var F=new Map,I=!1;try{I=new Intl.NumberFormat(`de-DE`,{signDisplay:`exceptZero`}).resolvedOptions().signDisplay===`exceptZero`}catch{}var L=!1;try{L=new Intl.NumberFormat(`de-DE`,{style:`unit`,unit:`degree`}).resolvedOptions().style===`unit`}catch{}var R={degree:{narrow:{default:`°`,"ja-JP":` 度`,"zh-TW":`度`,"sl-SI":` °`}}},z=class{format(e){let t=``;if(t=!I&&this.options.signDisplay!=null?re(this.numberFormatter,this.options.signDisplay,e):this.numberFormatter.format(e),this.options.style===`unit`&&!L){let{unit:e,unitDisplay:n=`short`,locale:r}=this.resolvedOptions();if(!e)return t;let i=R[e]?.[n];t+=i[r]||i.default}return t}formatToParts(e){return this.numberFormatter.formatToParts(e)}formatRange(e,t){if(typeof this.numberFormatter.formatRange==`function`)return this.numberFormatter.formatRange(e,t);if(t<e)throw RangeError(`End date must be >= start date`);return`${this.format(e)} \u{2013} ${this.format(t)}`}formatRangeToParts(e,t){if(typeof this.numberFormatter.formatRangeToParts==`function`)return this.numberFormatter.formatRangeToParts(e,t);if(t<e)throw RangeError(`End date must be >= start date`);let n=this.numberFormatter.formatToParts(e),r=this.numberFormatter.formatToParts(t);return[...n.map(e=>({...e,source:`startRange`})),{type:`literal`,value:` – `,source:`shared`},...r.map(e=>({...e,source:`endRange`}))]}resolvedOptions(){let e=this.numberFormatter.resolvedOptions();return!I&&this.options.signDisplay!=null&&(e={...e,signDisplay:this.options.signDisplay}),!L&&this.options.style===`unit`&&(e={...e,style:`unit`,unit:this.options.unit,unitDisplay:this.options.unitDisplay}),e}constructor(e,t={}){this.numberFormatter=B(e,t),this.options=t}};function B(e,t={}){let{numberingSystem:n}=t;if(n&&e.includes(`-nu-`)&&(e.includes(`-u-`)||(e+=`-u-`),e+=`-nu-${n}`),t.style===`unit`&&!L){let{unit:e,unitDisplay:n=`short`}=t;if(!e)throw Error(`unit option must be provided with style: "unit"`);if(!R[e]?.[n])throw Error(`Unsupported unit ${e} with unitDisplay = ${n}`);t={...t,style:`decimal`}}let r=e+(t?Object.entries(t).sort((e,t)=>e[0]<t[0]?-1:1).join():``);if(F.has(r))return F.get(r);let i=new Intl.NumberFormat(e,t);return F.set(r,i),i}function re(e,t,n){if(t===`auto`)return e.format(n);if(t===`never`)return e.format(Math.abs(n));{let r=!1;if(t===`always`?r=n>0||Object.is(n,0):t===`exceptZero`&&(Object.is(n,-0)||Object.is(n,0)?n=Math.abs(n):r=n>0),r){let t=e.format(-n),r=e.format(n),i=t.replace(r,``).replace(/\u200e|\u061C/,``);return[...i].length!==1&&console.warn(`@react-aria/i18n polyfill for NumberFormat signDisplay: Unsupported case`),t.replace(r,`!!!`).replace(i,`+`).replace(`!!!`,r)}return e.format(n)}}var ie=RegExp(`^.*\\(.*\\).*$`),ae=[`latn`,`arab`,`hanidec`,`deva`,`beng`,`fullwide`],V=class{parse(e){return U(this.locale,this.options,e).parse(e)}isValidPartialNumber(e,t,n){return U(this.locale,this.options,e).isValidPartialNumber(e,t,n)}getNumberingSystem(e){return U(this.locale,this.options,e).options.numberingSystem}constructor(e,t={}){this.locale=e,this.options=t}},H=new Map;function U(e,t,n){let r=W(e,t);if(!e.includes(`-nu-`)&&!r.isValidPartialNumber(n)){for(let i of ae)if(i!==r.options.numberingSystem){let r=W(e+(e.includes(`-u-`)?`-nu-`:`-u-nu-`)+i,t);if(r.isValidPartialNumber(n))return r}}return r}function W(e,t){let n=e+(t?Object.entries(t).sort((e,t)=>e[0]<t[0]?-1:1).join():``),r=H.get(n);return r||(r=new G(e,t),H.set(n,r)),r}var G=class{parse(e){let t=this.sanitize(e);if(this.symbols.group&&(t=Y(t,this.symbols.group,``)),this.symbols.decimal&&(t=t.replace(this.symbols.decimal,`.`)),this.symbols.minusSign&&(t=t.replace(this.symbols.minusSign,`-`)),t=t.replace(this.symbols.numeral,this.symbols.index),this.options.style===`percent`){let e=t.indexOf(`-`);t=t.replace(`-`,``),t=t.replace(`+`,``);let n=t.indexOf(`.`);n===-1&&(n=t.length),t=t.replace(`.`,``),t=n-2==0?`0.${t}`:n-2==-1?`0.0${t}`:n-2==-2?`0.00`:`${t.slice(0,n-2)}.${t.slice(n-2)}`,e>-1&&(t=`-${t}`)}let n=t?+t:NaN;if(isNaN(n))return NaN;if(this.options.style===`percent`){let e={...this.options,style:`decimal`,minimumFractionDigits:Math.min((this.options.minimumFractionDigits??0)+2,20),maximumFractionDigits:Math.min((this.options.maximumFractionDigits??0)+2,20)};return new V(this.locale,e).parse(new z(this.locale,e).format(n))}return this.options.currencySign===`accounting`&&ie.test(e)&&(n=-1*n),n}sanitize(e){return e=e.replace(this.symbols.literals,``),this.symbols.minusSign&&(e=e.replace(`-`,this.symbols.minusSign)),this.options.numberingSystem===`arab`&&(this.symbols.decimal&&(e=e.replace(`,`,this.symbols.decimal),e=e.replace(`،`,this.symbols.decimal)),this.symbols.group&&(e=Y(e,`.`,this.symbols.group))),this.symbols.group===`’`&&e.includes(`'`)&&(e=Y(e,`'`,this.symbols.group)),this.options.locale===`fr-FR`&&this.symbols.group&&(e=Y(e,` `,this.symbols.group),e=Y(e,/\u00A0/g,this.symbols.group)),e}isValidPartialNumber(e,t=-1/0,n=1/0){return e=this.sanitize(e),this.symbols.minusSign&&e.startsWith(this.symbols.minusSign)&&t<0?e=e.slice(this.symbols.minusSign.length):this.symbols.plusSign&&e.startsWith(this.symbols.plusSign)&&n>0&&(e=e.slice(this.symbols.plusSign.length)),this.symbols.group&&e.startsWith(this.symbols.group)||this.symbols.decimal&&e.indexOf(this.symbols.decimal)>-1&&this.options.maximumFractionDigits===0?!1:(this.symbols.group&&(e=Y(e,this.symbols.group,``)),e=e.replace(this.symbols.numeral,``),this.symbols.decimal&&(e=e.replace(this.symbols.decimal,``)),e.length===0)}constructor(e,t={}){this.locale=e,t.roundingIncrement!==1&&t.roundingIncrement!=null&&(t.maximumFractionDigits==null&&t.minimumFractionDigits==null?(t.maximumFractionDigits=0,t.minimumFractionDigits=0):t.maximumFractionDigits==null?t.maximumFractionDigits=t.minimumFractionDigits:t.minimumFractionDigits??=t.maximumFractionDigits),this.formatter=new Intl.NumberFormat(e,t),this.options=this.formatter.resolvedOptions(),this.symbols=J(e,this.formatter,this.options,t),this.options.style===`percent`&&((this.options.minimumFractionDigits??0)>18||(this.options.maximumFractionDigits??0)>18)&&console.warn(`NumberParser cannot handle percentages with greater than 18 decimal places, please reduce the number in your options.`)}},K=new Set([`decimal`,`fraction`,`integer`,`minusSign`,`plusSign`,`group`]),q=[0,4,2,1,11,20,3,7,100,21,.1,1.1];function J(e,t,n,r){let i=new Intl.NumberFormat(e,{...n,minimumSignificantDigits:1,maximumSignificantDigits:21,roundingIncrement:1,roundingPriority:`auto`,roundingMode:`halfExpand`}),a=i.formatToParts(-10000.111),o=i.formatToParts(10000.111),s=q.map(e=>i.formatToParts(e)),c=a.find(e=>e.type===`minusSign`)?.value??`-`,l=o.find(e=>e.type===`plusSign`)?.value;!l&&(r?.signDisplay===`exceptZero`||r?.signDisplay===`always`)&&(l=`+`);let u=new Intl.NumberFormat(e,{...n,minimumFractionDigits:2,maximumFractionDigits:2}).formatToParts(.001).find(e=>e.type===`decimal`)?.value,d=a.find(e=>e.type===`group`)?.value,f=a.filter(e=>!K.has(e.type)).map(e=>X(e.value)),p=s.flatMap(e=>e.filter(e=>!K.has(e.type)).map(e=>X(e.value))),m=[...new Set([...f,...p])].sort((e,t)=>t.length-e.length),h=m.length===0?RegExp(`[\\p{White_Space}]`,`gu`):RegExp(`${m.join(`|`)}|[\\p{White_Space}]`,`gu`),g=[...new Intl.NumberFormat(n.locale,{useGrouping:!1}).format(9876543210)].reverse(),_=new Map(g.map((e,t)=>[e,t])),v=RegExp(`[${g.join(``)}]`,`g`);return{minusSign:c,plusSign:l,decimal:u,group:d,literals:h,numeral:v,index:e=>String(_.get(e))}}function Y(e,t,n){return e.replaceAll?e.replaceAll(t,n):e.split(t).join(n)}function X(e){return e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`)}function Z(e){let{disabled:t}=e,n=g(),r=b(),i=()=>window.clearTimeout(n.value),a=e=>{i(),!t.value&&(r.trigger(),n.value=window.setTimeout(()=>{a(60)},e))},o=()=>{a(400)},s=()=>{i()},c=g(!1),l=d(()=>y(e.target)),u=e=>{e.button!==0||c.value||(e.preventDefault(),c.value=!0,o())},f=()=>{c.value=!1,s()};return w&&(k(l||window,`pointerdown`,u),k(window,`pointerup`,f),k(window,`pointercancel`,f)),{isPressed:c,onTrigger:r.on}}function oe(e,t=g({})){return D(()=>new z(e.value,t.value))}function se(e,t=g({})){return D(()=>new V(e.value,t.value))}function Q(e,t,n){let r=e===`+`?t+n:t-n;if(t%1!=0||n%1!=0){let i=t.toString().split(`.`),a=n.toString().split(`.`),o=i[1]&&i[1].length||0,s=a[1]&&a[1].length||0,c=10**Math.max(o,s);t=Math.round(t*c),n=Math.round(n*c),r=e===`+`?t+n:t-n,r/=c}return r}var[$,ce]=C(`NumberFieldRoot`),le=f({inheritAttrs:!1,__name:`NumberFieldRoot`,props:{defaultValue:{type:Number,required:!1,default:void 0},modelValue:{type:[Number,null],required:!1},min:{type:Number,required:!1},max:{type:Number,required:!1},step:{type:Number,required:!1,default:1},stepSnapping:{type:Boolean,required:!1,default:!0},focusOnChange:{type:Boolean,required:!1,default:!0},formatOptions:{type:null,required:!1},locale:{type:String,required:!1},disabled:{type:Boolean,required:!1},readonly:{type:Boolean,required:!1},disableWheelChange:{type:Boolean,required:!1},invertWheelChange:{type:Boolean,required:!1},id:{type:String,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:`div`},name:{type:String,required:!1},required:{type:Boolean,required:!1}},emits:[`update:modelValue`],setup(e,{emit:t}){let n=e,r=t,{disabled:i,readonly:s,disableWheelChange:c,invertWheelChange:l,min:f,max:y,step:b,stepSnapping:S,formatOptions:C,id:w,locale:E}=o(n),D=x(n,`modelValue`,r,{defaultValue:n.defaultValue,passive:n.modelValue===void 0}),{primitiveElement:k,currentElement:M}=A(),N=P(E),F=ee(M),I=g(),L=d(()=>T(D.value)||isNaN(D.value)?!1:z(`decrease`,D.value)>=D.value),R=d(()=>T(D.value)||isNaN(D.value)?!1:z(`increase`,D.value)<=D.value);function z(e,t,n=1){let r=b.value??1,i=e===`increase`?`+`:`-`,a;if(S.value&&!isNaN(r)){let o=j(t,f.value,y.value,r);if(o===t)a=Q(i,t,r*n);else{let s=e===`increase`?o>t?o:Q(`+`,o,r):o<t?o:Q(`-`,o,r);a=n>1?Q(i,s,r*(n-1)):s}}else a=Q(i,t,r*n);return J(a)}function B(e,t=1){if(n.focusOnChange&&I.value?.focus(),n.disabled||n.readonly)return;let r=H.parse(I.value?.value??``);if(isNaN(r)){D.value=J(f.value??0);return}D.value=z(e,r,t)}function re(e=1){B(`increase`,e)}function ie(e=1){B(`decrease`,e)}function ae(e){e===`min`&&f.value!==void 0?D.value=J(f.value):e===`max`&&y.value!==void 0&&(D.value=J(y.value))}let V=oe(N,C),H=se(N,C),U=d(()=>V.resolvedOptions().maximumFractionDigits>0?`decimal`:`numeric`),W=oe(N,C),G=d(()=>T(D.value)||isNaN(D.value)?``:W.format(D.value));function K(e){return H.isValidPartialNumber(e,f.value,y.value)}function q(e){I.value&&(I.value.value=e)}function J(e){let t;return t=b.value===void 0||isNaN(b.value)||!S.value?te(e,f.value,y.value):j(e,f.value,y.value,b.value),t=H.parse(V.format(t)),t}function Y(e){let t=H.parse(e);return D.value=isNaN(t)?void 0:J(t),e.length?q(G.value):q(e)}return ce({modelValue:D,handleDecrease:ie,handleIncrease:re,handleMinMaxValue:ae,inputMode:U,inputEl:I,onInputElement:e=>I.value=e,textValue:G,readonly:s,validate:K,applyInputValue:Y,disabled:i,disableWheelChange:c,invertWheelChange:l,max:y,min:f,isDecreaseDisabled:L,isIncreaseDisabled:R,id:w}),(e,t)=>(p(),h(a(O),u(e.$attrs,{ref_key:`primitiveElement`,ref:k,role:`group`,as:e.as,"as-child":e.asChild,"data-disabled":a(i)?``:void 0,"data-readonly":a(s)?``:void 0}),{default:m(()=>[_(e.$slots,`default`,{modelValue:a(D),textValue:G.value,readonly:a(s)}),a(F)&&e.name?(p(),h(a(ne),{key:0,type:`text`,value:a(D),name:e.name,disabled:a(i),readonly:a(s),required:e.required},null,8,[`value`,`name`,`disabled`,`readonly`,`required`])):v(`v-if`,!0)]),_:3},16,[`as`,`as-child`,`data-disabled`,`data-readonly`]))}}),ue=f({__name:`NumberFieldDecrement`,props:{disabled:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:`button`}},setup(t){let n=t,r=$(),i=d(()=>r.disabled?.value||r.readonly.value||n.disabled||r.isDecreaseDisabled.value),{primitiveElement:o,currentElement:s}=A(),{isPressed:c,onTrigger:l}=Z({target:s,disabled:i});return l(()=>{r.handleDecrease()}),(t,r)=>(p(),h(a(O),u(n,{ref_key:`primitiveElement`,ref:o,tabindex:`-1`,"aria-label":`Decrease`,type:t.as===`button`?`button`:void 0,style:{userSelect:a(c)?`none`:void 0},disabled:i.value?``:void 0,"data-disabled":i.value?``:void 0,"data-pressed":a(c)?`true`:void 0,onContextmenu:r[0]||=e(()=>{},[`prevent`])}),{default:m(()=>[_(t.$slots,`default`)]),_:3},16,[`type`,`style`,`disabled`,`data-disabled`,`data-pressed`]))}}),de=f({__name:`NumberFieldIncrement`,props:{disabled:{type:Boolean,required:!1},asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:`button`}},setup(t){let n=t,r=$(),i=d(()=>r.disabled?.value||r.readonly.value||n.disabled||r.isIncreaseDisabled.value),{primitiveElement:o,currentElement:s}=A(),{isPressed:c,onTrigger:l}=Z({target:s,disabled:i});return l(()=>{r.handleIncrease()}),(t,r)=>(p(),h(a(O),u(n,{ref_key:`primitiveElement`,ref:o,tabindex:`-1`,"aria-label":`Increase`,type:t.as===`button`?`button`:void 0,style:{userSelect:a(c)?`none`:void 0},disabled:i.value?``:void 0,"data-disabled":i.value?``:void 0,"data-pressed":a(c)?`true`:void 0,onContextmenu:r[0]||=e(()=>{},[`prevent`])}),{default:m(()=>[_(t.$slots,`default`)]),_:3},16,[`type`,`style`,`disabled`,`data-disabled`,`data-pressed`]))}}),fe=f({__name:`NumberFieldInput`,props:{asChild:{type:Boolean,required:!1},as:{type:null,required:!1,default:`input`}},setup(e){let t=e,{primitiveElement:n,currentElement:r}=A(),o=$(),s=M(),{isComposing:c,handleCompositionStart:d,handleCompositionEnd:f}=N();function v(e){if(!(c.value||e.isComposing))switch(e.key){case s.ARROW_UP:e.preventDefault(),o.handleIncrease();break;case s.ARROW_DOWN:e.preventDefault(),o.handleDecrease();break;case s.PAGE_UP:e.preventDefault(),o.handleIncrease(10);break;case s.PAGE_DOWN:e.preventDefault(),o.handleDecrease(10);break;case s.HOME:e.preventDefault(),o.handleMinMaxValue(`min`);break;case s.END:e.preventDefault(),o.handleMinMaxValue(`max`);break;case s.ENTER:o.applyInputValue(e.target?.value)}}function y(e){o.disableWheelChange.value||e.target===S()&&(Math.abs(e.deltaY)<=Math.abs(e.deltaX)||(e.preventDefault(),e.deltaY>0?o.invertWheelChange.value?o.handleDecrease():o.handleIncrease():e.deltaY<0&&(o.invertWheelChange.value?o.handleIncrease():o.handleDecrease())))}l(()=>{o.onInputElement(r.value)});let b=g(o.textValue.value);i(()=>o.textValue.value,()=>{b.value=o.textValue.value},{immediate:!0,deep:!0});function x(){requestAnimationFrame(()=>{b.value=o.textValue.value})}return(e,r)=>(p(),h(a(O),u(t,{id:a(o).id.value,ref_key:`primitiveElement`,ref:n,value:b.value,role:`spinbutton`,type:`text`,tabindex:`0`,inputmode:a(o).inputMode.value,disabled:a(o).disabled.value?``:void 0,"data-disabled":a(o).disabled.value?``:void 0,readonly:a(o).readonly.value?``:void 0,"data-readonly":a(o).readonly.value?``:void 0,autocomplete:`off`,autocorrect:`off`,spellcheck:`false`,"aria-roledescription":`Number field`,"aria-valuenow":a(o).modelValue.value,"aria-valuemin":a(o).min.value,"aria-valuemax":a(o).max.value,onKeydown:v,onWheel:y,onBeforeinput:r[0]||=e=>{if(e.isComposing||e.inputType.startsWith(`delete`)||e.inputType.startsWith(`history`))return;let t=e.target,n=t.value.slice(0,t.selectionStart??void 0)+(e.data??``)+t.value.slice(t.selectionEnd??void 0);a(o).validate(n)||e.preventDefault()},onInput:r[1]||=e=>{let t=e.target;b.value=t.value},onChange:x,onBlur:r[2]||=e=>a(o).applyInputValue(e.target?.value),onCompositionstart:a(d),onCompositionend:a(f)}),{default:m(()=>[_(e.$slots,`default`)]),_:3},16,[`id`,`value`,`inputmode`,`disabled`,`data-disabled`,`readonly`,`data-readonly`,`aria-valuenow`,`aria-valuemin`,`aria-valuemax`,`onCompositionstart`,`onCompositionend`]))}}),pe=f({inheritAttrs:!1,__name:`VDNumberField`,props:t({min:{},max:{},step:{}},{modelValue:{},modelModifiers:{}}),emits:[`update:modelValue`],setup(e){let t=r(e,`modelValue`);return(r,i)=>(p(),h(a(le),{modelValue:t.value,"onUpdate:modelValue":i[0]||=e=>t.value=e,min:e.min,max:e.max,step:e.step||1,class:s([r.$attrs.class,`inline-flex items-center border border-base rounded bg-raised overflow-hidden focus-within:ring-2 focus-within:ring-primary-500/40`])},{default:m(()=>[n(a(ue),{class:`inline-flex items-center justify-center w-6 h-6 text-xs color-muted hover:bg-hover cursor-pointer transition-colors`},{default:m(()=>[...i[1]||=[c(`div`,{class:`i-ri:subtract-line`},null,-1)]]),_:1}),n(a(fe),u({...r.$attrs,class:void 0},{class:`w-12 text-center text-xs bg-base color-base border-x border-base outline-none py-1`}),null,16),n(a(de),{class:`inline-flex items-center justify-center w-6 h-6 text-xs color-muted hover:bg-hover cursor-pointer transition-colors`},{default:m(()=>[...i[2]||=[c(`div`,{class:`i-ri:add-line`},null,-1)]]),_:1})]),_:1},8,[`modelValue`,`min`,`max`,`step`,`class`]))}});export{P as n,pe as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{D as e,T as t,w as n}from"./runtime-dom.esm-bundler-Btnku4nR.js";import{E as r,On as i,Zn as a,_ as o,b as s,bt as c,g as l,k as u,mt as d,o as f,tr as p,y as m}from"./runtime-core.esm-bundler-B8D2lM98.js";import{D as h,T as g,f as _,o as v,r as y,v as b,y as x}from"./index-DUZ9khG8.js";import{t as S}from"./i18n-BBTb3XL7.js";var C=t(((e,t)=>{(function(n,r){typeof e==`object`&&t!==void 0?t.exports=r():typeof define==`function`&&define.amd?define(r):(n=typeof globalThis<`u`?globalThis:n||self).dayjs_plugin_relativeTime=r()})(e,(function(){return function(e,t,n){e||={};var r=t.prototype,i={future:`in %s`,past:`%s ago`,s:`a few seconds`,m:`a minute`,mm:`%d minutes`,h:`an hour`,hh:`%d hours`,d:`a day`,dd:`%d days`,M:`a month`,MM:`%d months`,y:`a year`,yy:`%d years`};function a(e,t,n,i){return r.fromToBase(e,t,n,i)}n.en.relativeTime=i,r.fromToBase=function(t,r,a,o,s){for(var c,l,u,d=a.$locale().relativeTime||i,f=e.thresholds||[{l:`s`,r:44,d:`second`},{l:`m`,r:89},{l:`mm`,r:44,d:`minute`},{l:`h`,r:89},{l:`hh`,r:21,d:`hour`},{l:`d`,r:35},{l:`dd`,r:25,d:`day`},{l:`M`,r:45},{l:`MM`,r:10,d:`month`},{l:`y`,r:17},{l:`yy`,d:`year`}],p=f.length,m=0;m<p;m+=1){var h=f[m];h.d&&(c=o?n(t).diff(a,h.d,!0):a.diff(t,h.d,!0));var g=(e.rounding||Math.round)(Math.abs(c));if(u=c>0,g<=h.r||!h.r){g<=1&&m>0&&(h=f[m-1]);var _=d[h.l];s&&(g=s(``+g)),l=typeof _==`string`?_.replace(`%d`,g):_(g,r,h.l,u);break}}if(r)return l;var v=u?d.future:d.past;return typeof v==`function`?v(l):v.replace(`%s`,l)},r.to=function(e,t){return a(e,t,this,!0)},r.from=function(e,t){return a(e,t,this)};var o=function(e){return e.$u?n.utc():n()};r.toNow=function(e){return this.to(o(this),e)},r.fromNow=function(e){return this.from(o(this),e)}}}))})),w=e(_(),1),T=e(C(),1),E=[`data-active`],D={class:`flex items-center gap-1.5`},O=[`aria-pressed`],k={key:1,class:`text-[10px] px-1.5 py-0.5 rounded bg-amber-100 text-amber-700 dark:bg-amber-900/30 dark:text-amber-400 flex-shrink-0`},A={key:0,class:`flex items-center gap-2 mt-0.5 text-xs op-50`},j={class:`font-mono`},M={class:`inline-flex items-center gap-0.5`},N={key:0,class:`text-[10px]`},P=u({__name:`VDPostListItem`,props:{post:{}},setup(e){let t=e,{locale:u}=h();w.default.extend(T.default);function _(e){x.value=e}function C(e){let t=(g.value.siteUrl||b.value.siteUrl||window.location.origin).replace(/\/$/,``);window.open(`${t}${e.routePath}`,`_blank`)}let P=l(()=>x.value?.routePath===t.post.routePath||y.value===t.post.routePath),F=l(()=>g.value.listDensity===`compact`),I=l(()=>S(t.post.frontmatter.title||``,u.value)),L=l(()=>(0,w.default)(t.post.frontmatter.date).format(`YYYY-MM-DD`)),R=l(()=>(0,w.default)(t.post.frontmatter.updated||t.post.frontmatter.date).fromNow()),z=l(()=>{let e=t.post.frontmatter.categories;return e?typeof e==`string`?e:Array.isArray(e)?e.length>0&&Array.isArray(e[0])?e[0].join(` > `):e.join(` > `):``:``}),B=l(()=>{let e=t.post.frontmatter.tags;return!e||!Array.isArray(e)?[]:e});return(t,l)=>(d(),s(`li`,{class:a([`group border-b border-mute cursor-pointer transition-colors px-3`,[P.value?`bg-active border-l-2 border-l-primary-500`:`hover:bg-hover border-l-2 border-l-transparent`,F.value?`py-1`:`py-2`]]),"data-active":P.value||void 0,onClick:l[3]||=t=>_(e.post)},[o(`div`,D,[e.post.filePath?(d(),s(`button`,{key:0,class:`op-40 hover:op-100 transition-opacity text-xs filter-grayscale-100 hover:filter-grayscale-0 flex-shrink-0`,title:`Open in editor`,onClick:l[0]||=n(t=>i(v)({file:e.post.filePath,line:2}),[`stop`])},[...l[4]||=[o(`div`,{"i-vscode-icons:file-type-vscode":``},null,-1)]])):m(``,!0),o(`button`,{class:`flex-1 text-left text-sm font-medium truncate rounded`,"aria-pressed":P.value,onClick:l[1]||=n(t=>_(e.post),[`stop`])},p(I.value),9,O),e.post.frontmatter.draft?(d(),s(`span`,k,`DRAFT`)):m(``,!0),o(`button`,{class:`op-40 hover:op-100 transition-opacity text-xs flex-shrink-0`,title:`Open in browser`,onClick:l[2]||=n(t=>C(e.post),[`stop`])},[...l[5]||=[o(`div`,{class:`i-ri:external-link-line`},null,-1)]])]),F.value?m(``,!0):(d(),s(`div`,A,[o(`span`,j,p(L.value),1),l[9]||=o(`span`,null,`·`,-1),o(`span`,null,p(R.value),1),z.value?(d(),s(f,{key:0},[l[7]||=o(`span`,null,`·`,-1),o(`span`,M,[l[6]||=o(`div`,{class:`i-ri:folder-2-line text-[10px]`},null,-1),r(p(z.value),1)])],64)):m(``,!0),B.value.length>0?(d(),s(f,{key:1},[l[8]||=o(`span`,null,`·`,-1),(d(!0),s(f,null,c(B.value.slice(0,2),e=>(d(),s(`span`,{key:e,class:`text-[10px]`},`#`+p(e),1))),128)),B.value.length>2?(d(),s(`span`,N,`+`+p(B.value.length-2),1)):m(``,!0)],64)):m(``,!0)]))],10,E))}});export{P as t};
|