cliproxyui 0.0.0-stage → 0.1.0-nightly.4
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/LICENSE +21 -0
- package/README.md +87 -2
- package/dist/assets/_app-DGVg1XD1.js +4 -0
- package/dist/assets/_app-jvDa3raD.js +1 -0
- package/dist/assets/alert-aY2YmsVd.js +1 -0
- package/dist/assets/api-C-UxNz44.js +41 -0
- package/dist/assets/app-sidebar-BUmxtq_q.js +1 -0
- package/dist/assets/arrow-up-DbxS_q_V.js +1 -0
- package/dist/assets/badge-cpmxToOc.js +1 -0
- package/dist/assets/blocks-DpV3DGhB.js +1 -0
- package/dist/assets/boxes-D9licxdx.js +1 -0
- package/dist/assets/browser-CraaQKji.js +105 -0
- package/dist/assets/chevron-down-B8qUVOIH.js +1 -0
- package/dist/assets/circle-alert-DlF13jAd.js +1 -0
- package/dist/assets/common-D7NLwpzc.js +1 -0
- package/dist/assets/credentials-xbw6g-mr.js +2 -0
- package/dist/assets/dialog-C-ShosiU.js +1 -0
- package/dist/assets/empty-DJ8hqLzj.js +1 -0
- package/dist/assets/field-DicRK2FZ.js +1 -0
- package/dist/assets/file-text-ZsvNwG5V.js +1 -0
- package/dist/assets/geist-cyrillic-ext-wght-normal-DjL33-gN.woff2 +0 -0
- package/dist/assets/geist-cyrillic-wght-normal-BEAKL7Jp.woff2 +0 -0
- package/dist/assets/geist-latin-ext-wght-normal-DC-KSUi6.woff2 +0 -0
- package/dist/assets/geist-latin-wght-normal-BgDaEnEv.woff2 +0 -0
- package/dist/assets/geist-mono-cyrillic-ext-wght-normal-X_5orZeX.woff2 +0 -0
- package/dist/assets/geist-mono-cyrillic-wght-normal-DiZS0aHC.woff2 +0 -0
- package/dist/assets/geist-mono-latin-ext-wght-normal-Bwz-egvJ.woff2 +0 -0
- package/dist/assets/geist-mono-latin-wght-normal-XN7g48iV.woff2 +0 -0
- package/dist/assets/geist-mono-symbols2-wght-normal-CO5SzqOn.woff2 +0 -0
- package/dist/assets/geist-mono-vietnamese-wght-normal-DadHysG0.woff2 +0 -0
- package/dist/assets/geist-vietnamese-wght-normal-6IgcOCM7.woff2 +0 -0
- package/dist/assets/index-C7v75HBM.css +2 -0
- package/dist/assets/index-uQS_KYtd.js +11 -0
- package/dist/assets/input-Dh8dFfxy.js +1 -0
- package/dist/assets/input-group-DpoRdZxD.js +1 -0
- package/dist/assets/key-round-BLuPRdh8.js +1 -0
- package/dist/assets/keys-Dv8QW_WE.js +1 -0
- package/dist/assets/label-C9hnVP0y.js +1 -0
- package/dist/assets/lib-DydV5RQR.js +4 -0
- package/dist/assets/link-yq9FV5fc.js +1 -0
- package/dist/assets/login-CU72fmCH.js +1 -0
- package/dist/assets/logs-D_XhM4le.js +5 -0
- package/dist/assets/pencil-CAWIkPWT.js +1 -0
- package/dist/assets/play-BNDEKVrS.js +1 -0
- package/dist/assets/playground-BxELvzE7.js +2 -0
- package/dist/assets/plus-CyTUTCmq.js +1 -0
- package/dist/assets/popover-S2NdPm5E.js +1 -0
- package/dist/assets/preload-helper-bGdBmpYQ.js +1 -0
- package/dist/assets/progress-tR31jY5M.js +6 -0
- package/dist/assets/providers-BMTSb_Np.js +1 -0
- package/dist/assets/providers-DuxSszrR.js +1 -0
- package/dist/assets/queries-CIH8uhSE.js +1 -0
- package/dist/assets/root-CDpNo7ef.js +1 -0
- package/dist/assets/rotate-ccw-B4JISZWY.js +1 -0
- package/dist/assets/search-B-_9W0mx.js +1 -0
- package/dist/assets/select-_EZUR7zv.js +1 -0
- package/dist/assets/separator-Dqk6yy26.js +1 -0
- package/dist/assets/settings-Dbbpq1hD.js +3 -0
- package/dist/assets/setup-BjcUob8V.js +1 -0
- package/dist/assets/sheet-CMjp20qt.js +1 -0
- package/dist/assets/shield-check-Bn5iy-k9.js +1 -0
- package/dist/assets/square-XV9CUKSq.js +1 -0
- package/dist/assets/switch-Cvehhd4k.js +1 -0
- package/dist/assets/table-4SrUCzrm.js +1 -0
- package/dist/assets/toggle-group-DEQSRG6O.js +1 -0
- package/dist/assets/usage-DZOpLQUB.js +1 -0
- package/dist/assets/usage-charts-Cqy4eNI6.js +65 -0
- package/dist/assets/use-now-Dx6_ZMNf.js +1 -0
- package/dist/assets/use-stick-to-bottom-B9pJZIEo.js +1 -0
- package/dist/assets/useMatch-BKY5ZvJq.js +1 -0
- package/dist/assets/useNavigate-DHxoX8xc.js +1 -0
- package/dist/assets/useRouter-DXJCa-Dc.js +1 -0
- package/dist/favicon.svg +1 -0
- package/dist/index.html +21 -0
- package/dist-server/app.js +255 -0
- package/dist-server/auth.js +65 -0
- package/dist-server/binary.js +121 -0
- package/dist-server/cli.js +72 -0
- package/dist-server/cpa-config.js +69 -0
- package/dist-server/env.js +29 -0
- package/dist-server/index.js +44 -0
- package/dist-server/service.js +205 -0
- package/dist-server/state.js +19 -0
- package/dist-server/supervisor.js +175 -0
- package/dist-server/urls.js +12 -0
- package/dist-server/usage.js +191 -0
- package/package.json +73 -4
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 wynn-dev
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,3 +1,88 @@
|
|
|
1
|
-
#
|
|
1
|
+
# CPA Console
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
A self-contained web console for [CLIProxyAPI](https://github.com/router-for-me/CLIProxyAPI). One command downloads
|
|
4
|
+
CPA, runs it as a supervised process and gives you a polished UI to manage it. You don't install CPA separately.
|
|
5
|
+
|
|
6
|
+
- **Process management**: installs the latest CPA release for your platform (checksum-verified), restarts it if it
|
|
7
|
+
crashes, and updates it in one click.
|
|
8
|
+
- **Usage analytics**: CPA only keeps per-request usage for a few minutes. The console drains it continuously into
|
|
9
|
+
SQLite, so you get history by model, credential, client key and provider, with tokens, latency and failures.
|
|
10
|
+
- **Credentials**: OAuth sign-in, file uploads, enable/disable, cooldowns, per-credential traffic and bulk actions.
|
|
11
|
+
- **API providers & client keys**: structured editors instead of raw YAML.
|
|
12
|
+
- **Settings**: documented forms for routing, retries, networking and logging, plus a YAML editor with diff review.
|
|
13
|
+
- **Logs & playground**: live log tail, CPA process output, request and error logs, and a streaming chat tester.
|
|
14
|
+
|
|
15
|
+
## Quick start
|
|
16
|
+
|
|
17
|
+
Requires Node.js 22.13 or newer.
|
|
18
|
+
|
|
19
|
+
```sh
|
|
20
|
+
npx cliproxyui
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
The console prints a setup link (and opens it if it can). Open it and pick the proxy port. The management key is
|
|
24
|
+
pre-generated, so save it, then click **Start CLIProxyAPI**. CPA is already downloading in the background while you
|
|
25
|
+
fill in the form.
|
|
26
|
+
|
|
27
|
+
Clients then connect straight to CPA, e.g. `http://<server>:8317/v1`, using the client key shown on the Overview page.
|
|
28
|
+
|
|
29
|
+
### Keep it running
|
|
30
|
+
|
|
31
|
+
```sh
|
|
32
|
+
npx cliproxyui service install
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
This installs a background service that starts at boot: systemd on Linux (a user service, or a system service when
|
|
36
|
+
run as root) and launchd on macOS. It installs the latest nightly into the data directory, so it never depends on the
|
|
37
|
+
npx cache. `service status` and `service uninstall` do what you'd expect; uninstalling keeps your data.
|
|
38
|
+
|
|
39
|
+
### Updating
|
|
40
|
+
|
|
41
|
+
The console is a rolling nightly: every merge to `main` publishes a new build to npm under the default `latest` tag.
|
|
42
|
+
When a newer build exists, the console's sidebar shows **Update available** with the exact command, including any
|
|
43
|
+
`--data`, `--port` or `--host` options the console runs with. For a service, that re-runs `service install`, which
|
|
44
|
+
reinstalls the latest nightly and keeps your data. For a foreground run, stop the console and run the npx command
|
|
45
|
+
again; npx fetches the new build. CLIProxyAPI itself updates from the Overview page.
|
|
46
|
+
|
|
47
|
+
### Options
|
|
48
|
+
|
|
49
|
+
```
|
|
50
|
+
cliproxyui [start] [--port 8320] [--host 0.0.0.0] [--data ~/.cpa-console] [--no-open]
|
|
51
|
+
cliproxyui service install|uninstall|status [same options]
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
| Flag | Env | Default | |
|
|
55
|
+
| --- | --- | --- | --- |
|
|
56
|
+
| `--port` | `PORT` | `8320` | Console port |
|
|
57
|
+
| `--host` | `HOST` | `0.0.0.0` | Bind address. Use `127.0.0.1` behind a reverse proxy or SSH tunnel |
|
|
58
|
+
| `--data` | `CPA_CONSOLE_DATA` | `~/.cpa-console` | CPA binary, `config.yaml`, auth files, logs, usage database |
|
|
59
|
+
| | `TRUST_PROXY` | | Set to `1` behind a reverse proxy, so failed-login limits apply per client (from `X-Forwarded-For`) |
|
|
60
|
+
| | `USAGE_RETENTION_DAYS` | `90` | How long request history is kept |
|
|
61
|
+
| | `GITHUB_TOKEN` | | Optional; avoids GitHub API rate limits when checking for CPA releases |
|
|
62
|
+
|
|
63
|
+
## Security notes
|
|
64
|
+
|
|
65
|
+
- The setup link contains a one-time token. Until setup is done, anyone with the link can claim the instance, so
|
|
66
|
+
finish setup right away.
|
|
67
|
+
- The console serves plain HTTP. To reach it over the internet, put it behind a TLS-terminating reverse proxy
|
|
68
|
+
(Caddy, nginx), with `HOST=127.0.0.1` and `TRUST_PROXY=1`, or use an SSH tunnel.
|
|
69
|
+
- Five wrong keys from one address lock that address out for 15 minutes.
|
|
70
|
+
- The console checks the management key itself before forwarding anything to CPA. CPA's remote management stays
|
|
71
|
+
disabled, because the console reaches it over localhost.
|
|
72
|
+
|
|
73
|
+
## Development
|
|
74
|
+
|
|
75
|
+
```sh
|
|
76
|
+
pnpm install # also builds, via `prepare`
|
|
77
|
+
CPA_CONSOLE_DATA=/tmp/cpa-dev pnpm dev
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
`pnpm dev` runs the console server on `:8320` in watch mode and Vite on `:5173`. Open the Vite URL; the setup link
|
|
81
|
+
printed by the server works there too if you change its port to 5173.
|
|
82
|
+
|
|
83
|
+
Stack: Vite, React 19, TanStack Router / Query / Table, shadcn/ui (Radix, Tailwind v4) and Recharts; the server is
|
|
84
|
+
Hono on Node, with `node:sqlite` for usage history.
|
|
85
|
+
|
|
86
|
+
## License
|
|
87
|
+
|
|
88
|
+
MIT
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import{H as e,W as t,o as n,r}from"./api-C-UxNz44.js";import{O as i,T as a,a as o,c as s,d as c,f as l,h as u,i as d,l as f,m as p,n as m,o as h,p as g,s as _,t as v}from"./common-D7NLwpzc.js";import{a as y,n as b,t as x}from"./queries-CIH8uhSE.js";import{t as S}from"./link-yq9FV5fc.js";import{n as C,o as w}from"./app-sidebar-BUmxtq_q.js";import{c as T,l as E,n as D,r as O,s as k,u as A}from"./usage-charts-Cqy4eNI6.js";import{t as j}from"./play-BNDEKVrS.js";import{t as ee}from"./square-XV9CUKSq.js";import{t as te}from"./progress-tR31jY5M.js";import{X as ne,_ as M,g as N,h as P,yt as F}from"./index-uQS_KYtd.js";import{a as I,c as L,i as R,n as z,r as B,s as V}from"./input-Dh8dFfxy.js";import{i as H,r as U,t as W}from"./alert-aY2YmsVd.js";import{r as G}from"./providers-DuxSszrR.js";import{t as K}from"./badge-cpmxToOc.js";import{t as re}from"./use-now-Dx6_ZMNf.js";var q={name:`arrow-down-to-line`,size:24,node:[[`path`,{d:`M12 17V3`,key:`1cwfxf`}],[`path`,{d:`m6 11 6 6 6-6`,key:`12ii2o`}],[`path`,{d:`M19 21H5`,key:`150jfl`}]]};q.node;var ie=e(q),J={name:`arrow-right`,size:24,node:[[`path`,{d:`M5 12h14`,key:`1ays0h`}],[`path`,{d:`m12 5 7 7-7 7`,key:`xquz4c`}]]};J.node;var Y=e(J),X=t();function ae(e,t){let n=e.replace(/^v/,``).split(`.`).map(Number),r=t.replace(/^v/,``).split(`.`).map(Number);for(let e=0;e<Math.max(n.length,r.length);e++){let t=(n[e]??0)-(r[e]??0);if(t)return t}return 0}function oe(){let e=re(6e4),{data:t}=i(x.status()),r=t?.process.state===`running`,s=i(b.summary({from:e-864e5,to:e})),c=s.data?.totals;return(0,X.jsxs)(X.Fragment,{children:[(0,X.jsx)(m,{title:`Overview`,description:`Health of your CLIProxyAPI instance and the last 24 hours of traffic.`}),(0,X.jsx)(se,{status:t}),(0,X.jsxs)(`div`,{className:`grid gap-4 sm:grid-cols-2 xl:grid-cols-4`,children:[(0,X.jsx)(o,{label:`Requests · 24h`,icon:k,loading:!s.data,value:g(c?.requests),hint:c?.failed?`${g(c.failed)} failed`:`No failures`}),(0,X.jsx)(o,{label:`Success rate`,icon:A,loading:!s.data,value:c?.requests?p(1-c.failed/c.requests):`—`,hint:`Across all credentials`}),(0,X.jsx)(o,{label:`Tokens · 24h`,icon:E,loading:!s.data,value:f(c?.total),hint:c?.total?`${f(c.input)} in · ${f(c.output)} out · ${f(c.cached)} cached`:void 0}),(0,X.jsx)(o,{label:`Avg latency`,icon:T,loading:!s.data,value:l(c?.avgLatency),hint:c?.avgTtft?`${l(c.avgTtft)} to first token`:void 0})]}),(0,X.jsxs)(`div`,{className:`grid gap-4 lg:grid-cols-3`,children:[(0,X.jsxs)(z,{className:`lg:col-span-2`,children:[(0,X.jsxs)(V,{children:[(0,X.jsx)(L,{children:`Requests`}),(0,X.jsx)(I,{children:`Last 24 hours`}),(0,X.jsx)(B,{children:(0,X.jsx)(n,{variant:`ghost`,size:`sm`,asChild:!0,children:(0,X.jsxs)(S,{to:`/usage`,children:[`Usage `,(0,X.jsx)(Y,{})]})})})]}),(0,X.jsx)(R,{children:s.data?(0,X.jsx)(O,{series:s.data.series,bucketMs:s.data.bucketMs}):(0,X.jsx)(a,{className:`h-64 w-full`})})]}),(0,X.jsx)(ce,{enabled:r})]}),(0,X.jsxs)(`div`,{className:`grid gap-4 lg:grid-cols-3`,children:[(0,X.jsxs)(z,{children:[(0,X.jsxs)(V,{children:[(0,X.jsx)(L,{children:`Top models`}),(0,X.jsx)(I,{children:`By requests, last 24 hours`})]}),(0,X.jsx)(R,{children:(0,X.jsx)(D,{items:(s.data?.byModel??[]).slice(0,6).map(e=>({key:e.key,label:e.key||`unknown`,value:e.requests,hint:`${f(e.total)} tok`}))})})]}),(0,X.jsx)(le,{status:t})]})]})}function se({status:e}){let t=F(),o=i(x.latestRelease()),l=y({mutationFn:e=>r(`/process/${e}`,{method:`POST`}),onSettled:()=>t.invalidateQueries({queryKey:[`console`,`status`]})}),u=y({mutationFn:e=>r(`/release/install`,{body:{tag:e}}),onError:e=>P.error(`Could not install CLIProxyAPI`,{description:e.message}),onSettled:()=>t.invalidateQueries({queryKey:[`console`,`status`]})});if(!e)return(0,X.jsx)(a,{className:`h-36 w-full rounded-xl`});let{process:d,cpa:f}=e,p=C[d.state],m=f.install,g=m&&![`done`,`error`].includes(m.phase),v=o.data&&f.version&&ae(o.data.tag,f.version)>0,b=l.isPending||d.state===`starting`||d.state===`stopping`||!!g;return(0,X.jsxs)(z,{children:[(0,X.jsxs)(V,{children:[(0,X.jsxs)(L,{className:`flex items-center gap-2.5`,children:[`CLIProxyAPI`,(0,X.jsxs)(K,{variant:`outline`,className:`gap-1.5`,children:[(0,X.jsx)(h,{tone:p.tone,pulse:d.state===`starting`}),p.label]})]}),(0,X.jsxs)(I,{children:[`Managed by this console · data in `,e.dataDir]}),(0,X.jsx)(B,{className:`flex gap-2`,children:d.state===`running`||d.state===`starting`?(0,X.jsxs)(X.Fragment,{children:[(0,X.jsxs)(n,{variant:`outline`,size:`sm`,disabled:b,onClick:()=>l.mutate(`restart`),children:[l.isPending&&l.variables===`restart`?(0,X.jsx)(M,{}):(0,X.jsx)(ne,{}),`Restart`]}),(0,X.jsxs)(n,{variant:`outline`,size:`sm`,disabled:b,onClick:()=>N({title:`Stop CLIProxyAPI?`,description:`Clients will get connection errors until you start it again. It stays stopped across console restarts.`,confirmLabel:`Stop`,destructive:!0,onConfirm:()=>l.mutateAsync(`stop`)}),children:[(0,X.jsx)(ee,{}),`Stop`]})]}):f.version?(0,X.jsxs)(n,{size:`sm`,disabled:b,onClick:()=>l.mutate(`start`),children:[l.isPending?(0,X.jsx)(M,{}):(0,X.jsx)(j,{}),`Start`]}):(0,X.jsxs)(n,{size:`sm`,disabled:!!g||u.isPending,onClick:()=>u.mutate(void 0),children:[g||u.isPending?(0,X.jsx)(M,{}):(0,X.jsx)(ie,{}),`Install CLIProxyAPI`]})})]}),(0,X.jsxs)(R,{className:`space-y-4`,children:[(0,X.jsxs)(`dl`,{className:`grid grid-cols-2 gap-x-6 gap-y-3 text-sm sm:grid-cols-4`,children:[(0,X.jsx)(Z,{label:`Version`,value:f.version??`Not installed`}),(0,X.jsx)(Z,{label:`Uptime`,value:d.startedAt?c(Date.now()-d.startedAt):`—`}),(0,X.jsx)(Z,{label:`Listening on`,value:e.config?`${e.config.host||`0.0.0.0`}:${d.port??e.config.port}`:`—`}),(0,X.jsx)(Z,{label:`Crash restarts`,value:d.restarts?String(d.restarts):`None`})]}),d.state===`running`&&e.config&&d.port&&e.config.port!==d.port&&(0,X.jsxs)(W,{children:[(0,X.jsx)(H,{children:`Restart to apply the new port`}),(0,X.jsxs)(U,{children:[`config.yaml now uses port `,e.config.port,`, but CLIProxyAPI is still listening on `,d.port,`.`]})]}),d.lastError&&d.state!==`running`&&(0,X.jsxs)(W,{variant:`destructive`,children:[(0,X.jsx)(H,{children:`Last error`}),(0,X.jsx)(U,{className:`font-mono text-xs`,children:d.lastError})]}),g&&m&&(0,X.jsxs)(`div`,{className:`space-y-2 rounded-lg border bg-muted/40 p-3`,children:[(0,X.jsxs)(`div`,{className:`flex items-center justify-between text-sm`,children:[(0,X.jsxs)(`span`,{className:`flex items-center gap-2 font-medium`,children:[(0,X.jsx)(M,{}),` Installing `,m.tag,` · `,m.phase]}),m.total>0&&(0,X.jsxs)(`span`,{className:`text-xs text-muted-foreground tabular`,children:[s(m.received),` / `,s(m.total)]})]}),(0,X.jsx)(te,{value:m.total?m.received/m.total*100:50})]}),m?.phase===`error`&&(0,X.jsxs)(W,{variant:`destructive`,children:[(0,X.jsxs)(H,{children:[`Update to `,m.tag,` failed`]}),(0,X.jsx)(U,{children:m.error})]}),v&&!g&&o.data&&(0,X.jsxs)(`div`,{className:`flex flex-wrap items-center gap-3 rounded-lg border border-chart-1/30 bg-chart-1/5 p-3 text-sm`,children:[(0,X.jsx)(w,{className:`size-4 text-chart-1`}),(0,X.jsxs)(`span`,{className:`flex-1`,children:[(0,X.jsx)(`span`,{className:`font-medium`,children:o.data.tag}),` is available`,(0,X.jsxs)(`span`,{className:`text-muted-foreground`,children:[` · released `,_(o.data.publishedAt),` · `]}),(0,X.jsx)(`a`,{href:o.data.url,target:`_blank`,rel:`noreferrer`,className:`underline underline-offset-4`,children:`Release notes`})]}),(0,X.jsx)(n,{size:`sm`,onClick:()=>N({title:`Update to ${o.data.tag}?`,description:`The release is downloaded and checksum-verified first. CLIProxyAPI then restarts, which interrupts in-flight requests for a moment.`,confirmLabel:`Update`,onConfirm:()=>u.mutateAsync(o.data.tag)}),children:`Update`})]})]})]})}function Z({label:e,value:t}){return(0,X.jsxs)(`div`,{className:`space-y-0.5`,children:[(0,X.jsx)(`dt`,{className:`text-xs text-muted-foreground`,children:e}),(0,X.jsx)(`dd`,{className:`truncate font-medium tabular`,children:t})]})}function Q(e){return e.disabled?`disabled`:e.status===`error`?`error`:e.unavailable||(e.cooldowns?.length??0)>0?`cooling`:`ok`}function ce({enabled:e}){let{data:t,isLoading:r}=i({...x.credentials(),enabled:e}),o=t?.files??[],s={ok:0,cooling:0,error:0,disabled:0};for(let e of o)s[Q(e)]++;let c=o.filter(e=>[`cooling`,`error`].includes(Q(e))).slice(0,4);return(0,X.jsxs)(z,{children:[(0,X.jsxs)(V,{children:[(0,X.jsx)(L,{children:`Credentials`}),(0,X.jsx)(I,{children:o.length?`${o.length} OAuth credentials`:`OAuth accounts in rotation`}),(0,X.jsx)(B,{children:(0,X.jsx)(n,{variant:`ghost`,size:`sm`,asChild:!0,children:(0,X.jsxs)(S,{to:`/credentials`,children:[`Manage `,(0,X.jsx)(Y,{})]})})})]}),(0,X.jsx)(R,{className:`space-y-4`,children:r?(0,X.jsx)(a,{className:`h-24 w-full`}):o.length===0?(0,X.jsxs)(`div`,{className:`rounded-lg border border-dashed p-6 text-center text-sm text-muted-foreground`,children:[`No credentials yet.`,` `,(0,X.jsx)(S,{to:`/credentials`,className:`text-foreground underline underline-offset-4`,children:`Add one`})]}):(0,X.jsxs)(X.Fragment,{children:[(0,X.jsxs)(`div`,{className:`grid grid-cols-2 gap-2 text-sm`,children:[(0,X.jsx)($,{tone:`good`,label:`Healthy`,n:s.ok}),(0,X.jsx)($,{tone:`warn`,label:`Cooling down`,n:s.cooling}),(0,X.jsx)($,{tone:`bad`,label:`Error`,n:s.error}),(0,X.jsx)($,{tone:`idle`,label:`Disabled`,n:s.disabled})]}),c.length>0&&(0,X.jsx)(`ul`,{className:`space-y-2 border-t pt-3`,children:c.map(e=>(0,X.jsxs)(`li`,{className:`flex items-center gap-2 text-sm`,children:[(0,X.jsx)(h,{tone:Q(e)===`error`?`bad`:`warn`}),(0,X.jsx)(`span`,{className:`min-w-0 flex-1 truncate`,children:e.email||e.label||e.name}),(0,X.jsx)(`span`,{className:`shrink-0 text-xs text-muted-foreground`,children:G(e.provider)})]},e.id))})]})})]})}function $({tone:e,label:t,n}){return(0,X.jsxs)(`div`,{className:`flex items-center gap-2 rounded-md border px-3 py-2`,children:[(0,X.jsx)(h,{tone:n?e:`idle`}),(0,X.jsx)(`span`,{className:`flex-1 text-muted-foreground`,children:t}),(0,X.jsx)(`span`,{className:`font-medium tabular`,children:n})]})}function le({status:e}){let t=e?.config?.port??8317,n=`${window.location.protocol}//${window.location.hostname}:${t}/v1`,r=e?.config?.clientKeys[0],i=e=>`curl ${n}/chat/completions \\
|
|
2
|
+
-H "Authorization: Bearer ${e}" \\
|
|
3
|
+
-H "Content-Type: application/json" \\
|
|
4
|
+
-d '{"model": "<model>", "messages": [{"role": "user", "content": "Hello"}]}'`,a=i(r??`<client-key>`);return(0,X.jsxs)(z,{className:`lg:col-span-2`,children:[(0,X.jsxs)(V,{children:[(0,X.jsx)(L,{children:`Connect a client`}),(0,X.jsx)(I,{children:`Point any OpenAI, Claude or Gemini compatible tool at the proxy.`})]}),(0,X.jsxs)(R,{className:`space-y-4`,children:[(0,X.jsxs)(`div`,{className:`grid gap-3 sm:grid-cols-2`,children:[(0,X.jsxs)(`div`,{className:`space-y-1.5`,children:[(0,X.jsx)(`div`,{className:`text-xs text-muted-foreground`,children:`Base URL`}),(0,X.jsxs)(`div`,{className:`flex items-center justify-between gap-2 rounded-md border bg-muted/40 py-1 pr-1 pl-3`,children:[(0,X.jsx)(`code`,{className:`truncate font-mono text-[13px]`,children:n}),(0,X.jsx)(v,{value:n})]})]}),(0,X.jsxs)(`div`,{className:`space-y-1.5`,children:[(0,X.jsxs)(`div`,{className:`flex items-center justify-between text-xs text-muted-foreground`,children:[`Client key`,(0,X.jsx)(S,{to:`/keys`,className:`hover:text-foreground`,children:`Manage keys`})]}),(0,X.jsx)(`div`,{className:`flex items-center rounded-md border bg-muted/40 py-1 pr-1 pl-3`,children:r?(0,X.jsx)(d,{value:r,className:`w-full justify-between`}):(0,X.jsx)(`span`,{className:`py-1 text-sm text-muted-foreground`,children:`No client keys`})})]})]}),(0,X.jsxs)(`div`,{className:`relative`,children:[(0,X.jsx)(`pre`,{className:`overflow-x-auto rounded-lg border bg-muted/40 p-3 pr-10 font-mono text-xs leading-relaxed`,children:i(r?u(r):`<client-key>`)}),(0,X.jsx)(v,{value:a,className:`absolute top-1.5 right-1.5`})]})]})]})}export{oe as component};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{G as e,J as t,W as n,o as r}from"./api-C-UxNz44.js";import{O as i}from"./common-D7NLwpzc.js";import{t as a}from"./queries-CIH8uhSE.js";import{t as o}from"./link-yq9FV5fc.js";import{t as s}from"./useNavigate-DHxoX8xc.js";import{a as c,i as l,r as u,t as d}from"./app-sidebar-BUmxtq_q.js";import{$ as f,J as p,O as m}from"./index-uQS_KYtd.js";var h=t(e()),g=n();function _(){let e=s(),{data:t}=i(a.status());(0,h.useEffect)(()=>{let t=()=>e({to:`/login`});return window.addEventListener(`cpa-console:logout`,t),()=>window.removeEventListener(`cpa-console:logout`,t)},[e]);let n=t?.process.state;return(0,g.jsxs)(l,{children:[(0,g.jsx)(d,{}),(0,g.jsxs)(u,{className:`min-w-0`,children:[(0,g.jsxs)(`header`,{className:`sticky top-0 z-10 flex h-14 shrink-0 items-center gap-2 rounded-t-xl border-b bg-background/80 px-4 backdrop-blur`,children:[(0,g.jsx)(c,{className:`-ml-1`}),(0,g.jsx)(`div`,{className:`flex-1`}),(0,g.jsx)(m,{})]}),(n===`stopped`||n===`crashed`)&&(0,g.jsxs)(`div`,{className:`flex items-center gap-3 border-b bg-critical/10 px-6 py-2.5 text-sm`,children:[(0,g.jsx)(p,{className:`size-4 shrink-0 text-critical`}),(0,g.jsxs)(`span`,{className:`flex-1`,children:[`CLIProxyAPI is `,n,`. Management pages are unavailable until it runs.`,t?.process.lastError&&(0,g.jsxs)(`span`,{className:`text-muted-foreground`,children:[` `,t.process.lastError]})]}),(0,g.jsx)(r,{size:`sm`,variant:`outline`,asChild:!0,children:(0,g.jsx)(o,{to:`/`,children:`Go to overview`})})]}),(0,g.jsx)(`div`,{className:`mx-auto w-full max-w-7xl flex-1 space-y-6 p-4 md:p-6 lg:p-8`,children:(0,g.jsx)(f,{})})]})]})}export{_ as component};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{G as e,R as t,W as n,z as r}from"./api-C-UxNz44.js";e();var i=n(),a=r(`group/alert relative grid w-full gap-0.5 rounded-lg border px-2.5 py-2 text-left text-sm has-data-[slot=alert-action]:relative has-data-[slot=alert-action]:pr-18 has-[>svg]:grid-cols-[auto_1fr] has-[>svg]:gap-x-2 *:[svg]:row-span-2 *:[svg]:translate-y-0.5 *:[svg]:text-current *:[svg:not([class*='size-'])]:size-4`,{variants:{variant:{default:`bg-card text-card-foreground`,destructive:`bg-card text-destructive *:data-[slot=alert-description]:text-destructive/90 *:[svg]:text-current`}},defaultVariants:{variant:`default`}});function o({className:e,variant:n,...r}){return(0,i.jsx)(`div`,{"data-slot":`alert`,role:`alert`,className:t(a({variant:n}),e),...r})}function s({className:e,...n}){return(0,i.jsx)(`div`,{"data-slot":`alert-title`,className:t(`font-medium group-has-[>svg]/alert:col-start-2 [&_a]:underline [&_a]:underline-offset-3 [&_a]:hover:text-foreground`,e),...n})}function c({className:e,...n}){return(0,i.jsx)(`div`,{"data-slot":`alert-description`,className:t(`text-sm text-balance text-muted-foreground md:text-pretty [&_a]:underline [&_a]:underline-offset-3 [&_a]:hover:text-foreground [&_p:not(:last-child)]:mb-4`,e),...n})}function l({className:e,...n}){return(0,i.jsx)(`div`,{"data-slot":`alert-action`,className:t(`absolute top-2 right-2`,e),...n})}export{s as i,l as n,c as r,o as t};
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t),e=null),t.exports),s=(e,n)=>{let r={};for(var i in e)t(r,i,{get:e[i],enumerable:!0});return n||t(r,Symbol.toStringTag,{value:`Module`}),r},c=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;l<u;l++)d=c[l],!a.call(e,d)&&d!==o&&t(e,d,{get:(e=>i[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},l=(n,r,o)=>(o=n==null?{}:e(i(n)),c(r||!n||!n.__esModule||!a.call(n,`default`)?t(o,`default`,{value:n,enumerable:!0}):o,n)),u=o((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.portal`),r=Symbol.for(`react.fragment`),i=Symbol.for(`react.strict_mode`),a=Symbol.for(`react.profiler`),o=Symbol.for(`react.consumer`),s=Symbol.for(`react.context`),c=Symbol.for(`react.forward_ref`),l=Symbol.for(`react.suspense`),u=Symbol.for(`react.memo`),d=Symbol.for(`react.lazy`),f=Symbol.for(`react.activity`),p=Symbol.for(`react.view_transition`),m=Symbol.iterator;function h(e){return typeof e!=`object`||!e?null:(e=m&&e[m]||e[`@@iterator`],typeof e==`function`?e:null)}var g={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},_=Object.assign,v={};function y(e,t,n){this.props=e,this.context=t,this.refs=v,this.updater=n||g}y.prototype.isReactComponent={},y.prototype.setState=function(e,t){if(typeof e!=`object`&&typeof e!=`function`&&e!=null)throw Error(`takes an object of state variables to update or a function which returns an object of state variables.`);this.updater.enqueueSetState(this,e,t,`setState`)},y.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,`forceUpdate`)};function b(){}b.prototype=y.prototype;function x(e,t,n){this.props=e,this.context=t,this.refs=v,this.updater=n||g}var S=x.prototype=new b;S.constructor=x,_(S,y.prototype),S.isPureReactComponent=!0;var C=Array.isArray;function w(){}var T={H:null,A:null,T:null,S:null},E=Object.prototype.hasOwnProperty;function D(e,n,r){var i=r.ref;return{$$typeof:t,type:e,key:n,ref:i===void 0?null:i,props:r}}function O(e,t){return D(e.type,t,e.props)}function k(e){return typeof e==`object`&&!!e&&e.$$typeof===t}function A(e){var t={"=":`=0`,":":`=2`};return`$`+e.replace(/[=:]/g,function(e){return t[e]})}var j=/\/+/g;function M(e,t){return typeof e==`object`&&e&&e.key!=null?A(``+e.key):t.toString(36)}function N(e){switch(e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason;default:switch(typeof e.status==`string`?e.then(w,w):(e.status=`pending`,e.then(function(t){e.status===`pending`&&(e.status=`fulfilled`,e.value=t)},function(t){e.status===`pending`&&(e.status=`rejected`,e.reason=t)})),e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason}}throw e}function P(e,r,i,a,o){var s=typeof e;(s===`undefined`||s===`boolean`)&&(e=null);var c=!1;if(e===null)c=!0;else switch(s){case`bigint`:case`string`:case`number`:c=!0;break;case`object`:switch(e.$$typeof){case t:case n:c=!0;break;case d:return c=e._init,P(c(e._payload),r,i,a,o)}}if(c)return o=o(e),c=a===``?`.`+M(e,0):a,C(o)?(i=``,c!=null&&(i=c.replace(j,`$&/`)+`/`),P(o,r,i,``,function(e){return e})):o!=null&&(k(o)&&(o=O(o,i+(o.key==null||e&&e.key===o.key?``:(``+o.key).replace(j,`$&/`)+`/`)+c)),r.push(o)),1;c=0;var l=a===``?`.`:a+`:`;if(C(e))for(var u=0;u<e.length;u++)a=e[u],s=l+M(a,u),c+=P(a,r,i,s,o);else if(u=h(e),typeof u==`function`)for(e=u.call(e),u=0;!(a=e.next()).done;)a=a.value,s=l+M(a,u++),c+=P(a,r,i,s,o);else if(s===`object`){if(typeof e.then==`function`)return P(N(e),r,i,a,o);throw r=String(e),Error(`Objects are not valid as a React child (found: `+(r===`[object Object]`?`object with keys {`+Object.keys(e).join(`, `)+`}`:r)+`). If you meant to render a collection of children, use an array instead.`)}return c}function F(e,t,n){if(e==null)return e;var r=[],i=0;return P(e,r,``,``,function(e){return t.call(n,e,i++)}),r}function I(e){if(e._status===-1){var t=e._result,n=t();n.then(function(t){(e._status===0||e._status===-1)&&(e._status=1,e._result=t,n.status===void 0&&(n.status=`fulfilled`,n.value=t))},function(t){(e._status===0||e._status===-1)&&(e._status=2,e._result=t,n.status===void 0&&(n.status=`rejected`,n.reason=t))}),e._status===-1&&(e._status=0,e._result=n)}if(e._status===1)return e._result.default;throw e._result}var L=typeof reportError==`function`?reportError:function(e){if(typeof window==`object`&&typeof window.ErrorEvent==`function`){var t=new window.ErrorEvent(`error`,{bubbles:!0,cancelable:!0,message:typeof e==`object`&&e&&typeof e.message==`string`?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process==`object`&&typeof process.emit==`function`){process.emit(`uncaughtException`,e);return}console.error(e)};function R(e){var t=T.T,n={};n.types=t===null?null:t.types,T.T=n;try{var r=e(),i=T.S;i!==null&&i(n,r),typeof r==`object`&&r&&typeof r.then==`function`&&r.then(w,L)}catch(e){L(e)}finally{t!==null&&n.types!==null&&(t.types=n.types),T.T=t}}function z(e){var t=T.T;if(t!==null){var n=t.types;n===null?t.types=[e]:n.indexOf(e)===-1&&n.push(e)}else R(z.bind(null,e))}var ee={map:F,forEach:function(e,t,n){F(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return F(e,function(){t++}),t},toArray:function(e){return F(e,function(e){return e})||[]},only:function(e){if(!k(e))throw Error(`React.Children.only expected to receive a single React element child.`);return e}};e.Activity=f,e.Children=ee,e.Component=y,e.Fragment=r,e.Profiler=a,e.PureComponent=x,e.StrictMode=i,e.Suspense=l,e.ViewTransition=p,e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=T,e.__COMPILER_RUNTIME={__proto__:null,c:function(e){return T.H.useMemoCache(e)}},e.addTransitionType=z,e.cache=function(e){return function(){return e.apply(null,arguments)}},e.cacheSignal=function(){return null},e.cloneElement=function(e,t,n){if(e==null)throw Error(`The argument must be a React element, but you passed `+e+`.`);var r=_({},e.props),i=e.key;if(t!=null)for(a in t.key!==void 0&&(i=``+t.key),t)!E.call(t,a)||a===`key`||a===`__self`||a===`__source`||a===`ref`&&t.ref===void 0||(r[a]=t[a]);var a=arguments.length-2;if(a===1)r.children=n;else if(1<a){for(var o=Array(a),s=0;s<a;s++)o[s]=arguments[s+2];r.children=o}return D(e.type,i,r)},e.createContext=function(e){return e={$$typeof:s,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null},e.Provider=e,e.Consumer={$$typeof:o,_context:e},e},e.createElement=function(e,t,n){var r,i={},a=null;if(t!=null)for(r in t.key!==void 0&&(a=``+t.key),t)E.call(t,r)&&r!==`key`&&r!==`__self`&&r!==`__source`&&(i[r]=t[r]);var o=arguments.length-2;if(o===1)i.children=n;else if(1<o){for(var s=Array(o),c=0;c<o;c++)s[c]=arguments[c+2];i.children=s}if(e&&e.defaultProps)for(r in o=e.defaultProps,o)i[r]===void 0&&(i[r]=o[r]);return D(e,a,i)},e.createRef=function(){return{current:null}},e.forwardRef=function(e){return{$$typeof:c,render:e}},e.isValidElement=k,e.lazy=function(e){return{$$typeof:d,_payload:{_status:-1,_result:e},_init:I}},e.memo=function(e,t){return{$$typeof:u,type:e,compare:t===void 0?null:t}},e.startTransition=R,e.unstable_useCacheRefresh=function(){return T.H.useCacheRefresh()},e.use=function(e){return T.H.use(e)},e.useActionState=function(e,t,n){return T.H.useActionState(e,t,n)},e.useCallback=function(e,t){return T.H.useCallback(e,t)},e.useContext=function(e){return T.H.useContext(e)},e.useDebugValue=function(){},e.useDeferredValue=function(e,t){return T.H.useDeferredValue(e,t)},e.useEffect=function(e,t){return T.H.useEffect(e,t)},e.useEffectEvent=function(e){return T.H.useEffectEvent(e)},e.useId=function(){return T.H.useId()},e.useImperativeHandle=function(e,t,n){return T.H.useImperativeHandle(e,t,n)},e.useInsertionEffect=function(e,t){return T.H.useInsertionEffect(e,t)},e.useLayoutEffect=function(e,t){return T.H.useLayoutEffect(e,t)},e.useMemo=function(e,t){return T.H.useMemo(e,t)},e.useOptimistic=function(e,t){return T.H.useOptimistic(e,t)},e.useReducer=function(e,t,n){return T.H.useReducer(e,t,n)},e.useRef=function(e){return T.H.useRef(e)},e.useState=function(e){return T.H.useState(e)},e.useSyncExternalStore=function(e,t,n){return T.H.useSyncExternalStore(e,t,n)},e.useTransition=function(){return T.H.useTransition()},e.version=`19.3.0`})),d=o(((e,t)=>{t.exports=u()})),f=o((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.fragment`);function r(e,n,r){var i=null;if(r!==void 0&&(i=``+r),n.key!==void 0&&(i=``+n.key),`key`in n)for(var a in r={},n)a!==`key`&&(r[a]=n[a]);else r=n;return n=r.ref,{$$typeof:t,type:e,key:i,ref:n===void 0?null:n,props:r}}e.Fragment=n,e.jsx=r,e.jsxs=r})),p=o(((e,t)=>{t.exports=f()})),m=o((e=>{var t=d();function n(e){var t=`https://react.dev/errors/`+e;if(1<arguments.length){t+=`?args[]=`+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+=`&args[]=`+encodeURIComponent(arguments[n])}return`Minified React error #`+e+`; visit `+t+` for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`}function r(){}var i={d:{f:r,r:function(){throw Error(n(522))},D:r,C:r,L:r,m:r,X:r,S:r,M:r},p:0,findDOMNode:null},a=Symbol.for(`react.portal`),o=Symbol.for(`react.recoverable`),s=Symbol.for(`react.optimistic_key`);function c(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:a,key:r==null?null:r===s?s:``+r,children:e,containerInfo:t,implementation:n}}var l=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function u(e,t){if(e===`font`)return``;if(typeof t==`string`)return t===`use-credentials`?t:``}e.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=i,e.browser=function(e){return{$$typeof:o,_reason:e}},e.createPortal=function(e,t){var r=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)throw Error(n(299));return c(e,t,null,r)},e.flushSync=function(e){var t=l.T,n=i.p;try{if(l.T=null,i.p=2,e)return e()}finally{l.T=t,i.p=n,i.d.f()}},e.preconnect=function(e,t){typeof e==`string`&&(t?(t=t.crossOrigin,t=typeof t==`string`?t===`use-credentials`?t:``:void 0):t=null,i.d.C(e,t))},e.prefetchDNS=function(e){typeof e==`string`&&i.d.D(e)},e.preinit=function(e,t){if(typeof e==`string`&&t&&typeof t.as==`string`){var n=t.as,r=u(n,t.crossOrigin),a=typeof t.integrity==`string`?t.integrity:void 0,o=typeof t.fetchPriority==`string`?t.fetchPriority:void 0;n===`style`?i.d.S(e,typeof t.precedence==`string`?t.precedence:void 0,{crossOrigin:r,integrity:a,fetchPriority:o}):n===`script`&&i.d.X(e,{crossOrigin:r,integrity:a,fetchPriority:o,nonce:typeof t.nonce==`string`?t.nonce:void 0})}},e.preinitModule=function(e,t){if(typeof e==`string`){if(typeof t==`object`&&t){if(t.as==null||t.as===`script`){var n=u(t.as,t.crossOrigin);i.d.M(e,{crossOrigin:n,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0,fetchPriority:typeof t.fetchPriority==`string`?t.fetchPriority:void 0})}}else t??i.d.M(e)}},e.preload=function(e,t){if(typeof e==`string`&&typeof t==`object`&&t&&typeof t.as==`string`){var n=t.as,r=u(n,t.crossOrigin);i.d.L(e,n,{crossOrigin:r,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0,type:typeof t.type==`string`?t.type:void 0,fetchPriority:typeof t.fetchPriority==`string`?t.fetchPriority:void 0,referrerPolicy:typeof t.referrerPolicy==`string`?t.referrerPolicy:void 0,imageSrcSet:typeof t.imageSrcSet==`string`?t.imageSrcSet:void 0,imageSizes:typeof t.imageSizes==`string`?t.imageSizes:void 0,media:typeof t.media==`string`?t.media:void 0})}},e.preloadModule=function(e,t){if(typeof e==`string`){if(t){var n=u(t.as,t.crossOrigin);i.d.m(e,{as:typeof t.as==`string`&&t.as!==`script`?t.as:void 0,crossOrigin:n,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0,fetchPriority:typeof t.fetchPriority==`string`?t.fetchPriority:void 0})}else i.d.m(e)}},e.requestFormReset=function(e){i.d.r(e)},e.unstable_batchedUpdates=function(e,t){return e(t)},e.useFormState=function(e,t,n){return l.H.useFormState(e,t,n)},e.useFormStatus=function(){return l.H.useHostTransitionStatus()},e.version=`19.3.0`})),h=o(((e,t)=>{function n(){if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE==`function`)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=m()})),g=l(d(),1),_=e=>e?.replace(/([a-z0-9])([A-Z])/g,`$1-$2`).toLowerCase();function v(e,t,n=[]){if(t==null)throw Error(`[lucide]: iconNode is required when icon name is used`);return{name:_(e),size:24,node:t,...n.length>0?{aliases:n}:{}}}var y=e=>{let t=``,n=!1;for(let r of e)r===`-`||r===`_`||r<=` `?n=t.length>0:(t.length===0?t+=r.toLowerCase():t+=n?r.toUpperCase():r,n=!1);return t},b=e=>{let t=y(e);return t.charAt(0).toUpperCase()+t.slice(1)},x=(...e)=>e.filter((e,t,n)=>!!e&&e.trim()!==``&&n.indexOf(e)===t).join(` `).trim(),S={xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":2,"stroke-linecap":`round`,"stroke-linejoin":`round`};function C(e){return e!=null}function w(e,t={}){let n=t.attributeNames??{},r=e=>n[e]??e,i=e.size??e.width??S.width,a=e.size??e.height??S.height,o=e.aliases?.filter(e=>typeof e==`string`&&e.trim()!==``).map(e=>`lucide-${e}`)??[],s=[...e.name?[`lucide-${e.name}`]:[],...o],c=t.className?.split(` `).filter(Boolean)??[],l=t.includeDefaultClasses===!1?x(...c):x(`lucide`,...s,...c),u=t.absoluteStrokeWidth?Number(t.strokeWidth??S[`stroke-width`])*Number(e.size??e.width??S.width)/Number(t.size??t.width??S.width):t.strokeWidth??S[`stroke-width`];return[`svg`,{...Object.entries(S).reduce((e,[t,n])=>(e[r(t)]=n,e),{}),...`color`in t&&t.color&&{[r(`stroke`)]:t.color},...`size`in t&&C(t.size)&&{[r(`width`)]:t.size,[r(`height`)]:t.size},...`width`in t&&C(t.width)&&{[r(`width`)]:t.width},...`height`in t&&C(t.height)&&{[r(`height`)]:t.height},[r(`stroke-width`)]:u,...l&&{[r(`class`)]:l},[r(`viewBox`)]:`0 0 ${i} ${a}`,...t.hasA11yProp===!1?{[r(`aria-hidden`)]:`true`}:{},...`attributes`in t&&t.attributes},e.node.map(e=>{let[n,i,a]=e,o=t.nonScalingStroke?{[r(`vector-effect`)]:`non-scaling-stroke`,...i}:i;return a?[n,o,a]:[n,o]})]}function T(e,t={}){return w(e,{...t,attributeNames:{...t.attributeNames,class:`className`,"stroke-width":`strokeWidth`,"stroke-linecap":`strokeLinecap`,"stroke-linejoin":`strokeLinejoin`,"vector-effect":`vectorEffect`}})}var E=e=>{for(let t in e)if(t.startsWith(`aria-`)||t===`role`||t===`title`)return!0;return!1},D=(0,g.createContext)({}),O=()=>(0,g.useContext)(D),k=(0,g.forwardRef)(({color:e,size:t,width:n,height:r,strokeWidth:i,absoluteStrokeWidth:a,nonScalingStroke:o,className:s=``,children:c,iconNode:l=[],icon:u={node:l,aliases:[],size:24},...d},f)=>{let{size:p=24,strokeWidth:m=2,absoluteStrokeWidth:h=!1,nonScalingStroke:_=!1,color:v=`currentColor`,className:y=``}=O()??{},b=!!c||E(d),[S,C,w=[]]=T(u,{color:e??v,width:n??t??p,height:r??t??p,strokeWidth:i??m,absoluteStrokeWidth:a??h,nonScalingStroke:o??_,className:x(y,s),hasA11yProp:b,attributes:d});return(0,g.createElement)(S,{ref:f,...C},[...w.map(([e,t])=>(0,g.createElement)(e,t)),...Array.isArray(c)?c:[c]])});function A(e,t=[],n=[]){let r=typeof e==`string`?v(e,t,n):e,i=(0,g.forwardRef)(({className:e,...t},n)=>(0,g.createElement)(k,{ref:n,icon:r,className:e,...t}));return r.name&&(i.displayName=b(r.name)),i}var j={name:`check`,size:24,node:[[`path`,{d:`M20 6 9 17l-5-5`,key:`1gmf2c`}]]};j.node;var M=A(j),N=p(),P=l(h(),1);function F(e){var t,n,r=``;if(typeof e==`string`||typeof e==`number`)r+=e;else if(typeof e==`object`){if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=F(e[t]))&&(r&&(r+=` `),r+=n)}else for(n in e)e[n]&&(r&&(r+=` `),r+=n)}return r}function I(){for(var e,t,n=0,r=``,i=arguments.length;n<i;n++)(e=arguments[n])&&(t=F(e))&&(r&&(r+=` `),r+=t);return r}var L=e=>typeof e==`boolean`?`${e}`:e===0?`0`:e,R=I,z=(e,t)=>n=>{if(t?.variants==null)return R(e,n?.class,n?.className);let{variants:r,defaultVariants:i}=t,a=Object.keys(r).map(e=>{let t=n?.[e],a=i?.[e];if(t===null)return null;let o=L(t)||L(a);return r[e][o]}),o=n&&Object.entries(n).reduce((e,t)=>{let[n,r]=t;return r===void 0||(e[n]=r),e},{});return R(e,a,t?.compoundVariants?.reduce((e,t)=>{let{class:n,className:r,...a}=t;return Object.entries(a).every(e=>{let[t,n]=e;return Array.isArray(n)?n.includes({...i,...o}[t]):{...i,...o}[t]===n})?[...e,n,r]:e},[]),n?.class,n?.className)},ee=48,B=(e,t=0)=>{let n=new Int32Array(e.length);for(let r=0;r<e.length;r++)n[r]=e.charCodeAt(r)-ee-t;return n},te=e=>{let t=new Int32Array(e.length+1);for(let n=0;n<e.length;n++)t[n+1]=t[n]+e[n];return t},V=e=>{let t=new Int32Array(e.length),n=0;for(let r=0;r<e.length;r++){let i=e.charCodeAt(r)-ee;n+=i>>>1^-(i&1),t[r]=n}return t},H=384,ne=[],U=te(B(`E0500002005282000000002000150000020021820000011200000003022202000300004200120000200420001200021200301200010400162000010000220021010:2192001200220012000220012000200200200400010200040000000000400200108200110100000022010313000162002000020020012020080213000228200000000082000000000120002000120020020040101020300130001001010`)),re=te(B(`:11111111211111119311546544411119731869:671397415686432441111111111161114151214313433415:78311132233313187211117221449443411141111151152226611131111112212518142224214215421421542142424242516171151615616347111111111197911327451111111111111111111113134714133513411111311111111111111111111112444411111342312715245411117:3`)),ie=`@containerabcdefghinlmoprstunderlineviawzccentlignnimatespectuto-colsrowsaglorightnessckdrop-sisbcontrastfiltergrayscalehue-rotateinvertopacityslurrightnessaturateepia-coniclinearpositionradialsizeockurrderttom-belrstxyespacing-xyaretoursorlnt-umnsendspantartainentrasteividerop-shadowurationcorationlay-xyasendillexontromlter-featuresstretchapr-xyayscaleidow-colsrowsue-rotatedentlinesetvert-beringsxyeshadoweiadingftnest-clamp-imageabein-lrstxyskx--b-coniclpositionrsizet-x-y-fromto-fromto-inearfromto-fromto-adialfromto-fromtofromtofromtofromtoblockhinlinew-screenesblockhinlinewbjectpacityrutlinederigin-offsetbelrstxyesrspective-originaceholderioghtng-offsettateundedw-xyz-belrstlreseslr-endspantartaturatecepiahizekewpace-taleroll-xyz-barmpbelrstxyesbelrstxyes-thumbrackadowrink-xyxyartrokeabextora-shadowpckingnsformitionlate-xyz-offsetill-changeoom`,ae=(()=>{let e=U.length-1,t=new Int32Array(e);for(let n=e-1;n>=0;n--){let e=1,r=n+1;for(let i=U[n];i<U[n+1];i++)e+=t[r],r+=t[r];t[n]=e}let n=new Int32Array(U[e]),r=0;for(let i=0;i<e;i++){let e=i+1;for(let a=U[i];a<U[i+1];a++)n[r++]=e,e+=t[e]}return n})(),oe=B(`02000000000000900<=0?000B000F00F00ŏI0J0LNPRTVX0000]_a00000000000000000000000rst0000000zŏ00000000000
ŏ0000000ŏ00000000000000000000000000000000000000000000000000000000000000Ë000000000000000000000Þ000000000000000000ð0000000ø0ùúûüýþÿĀāĂ㥹Ć000000000000000000000000000000000000000000ħ0ĨĪ00000000000000000000ļĽ00000Ŭ000000`,1),se=te(B(`123333359346463635126536711576`)),ce=B(`93203242332583253248325D>E?F@03263243255B:032523853:0325B:8GA032542H<C=12727B:0328432553;D>E?3257D>032585:0325B:;0328B:032`),le=B(`012113445661666666789111:5;;;;;;;;444;;;:62999<1161=62>>?61:21@ABCD4446996:64E:::;:?::64:F114GHHIHHHHIHH1HH1HH1HHHHHH::EEJ4444::EE4444441691;644444114244444:;K6666555555555555555999666664444444444444444444444226?6:66644L9M?D:111::::6DE199`),ue=V(`020200202020020020020020020020200200200200200200200002020202001003040106000200200200200200200200200200200200200200200200200200200200200200200200200200200200020020020020020020002020200202002002002002002002002002002020002002020020200220200200200200200200200200200200020020020000200020002000200200200020020020002000200200200020020202002020202000200200020022000200200020020002002000200220002002000200W0Z00020020002002020002002000200g0j0002002000200200020020002002000200200020020002000200002000002002002002002000200020000200002002002002002002002020020020200200200200200200200200202020020020020020020020020002002002020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020002002002002002002000200200200200200200200200200020202020002000200020002002002002000020200200`),de=(()=>{let e=new Int32Array(319).fill(-1),t=V(`02422242:222222242224222242442222222422222244442242226224222426222422442462222422622222222626222462242622422622422424242422222222422222222242422222222222222222622442224222222222222224424442262222222222222222222226224222424242422224422422422222`),n=V(`02222222222222222222202222222222222222222222221422222222222222222222222222222222222Y\\222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222221422222222222222222222222222222222222222Ŀł222222222222222222`);for(let r=0;r<t.length;r++)e[t[r]]=n[r];return e})(),fe=`container |break-after- all auto avoid avoid-page column left page right|break-before- all auto avoid avoid-page column left page right|break-inside-a uto void void-column void-page|box-decoration- clone slice|box- border content| contents flow-root hidden table table-caption table-cell table-column table-column-group table-footer-group table-header-group table-row table-row-group| not-sr-only sr-only|float- end left none right start|clear- both end left none right start|isolat e ion-auto|overflow- auto clip hidden scroll visible|overflow-x- auto clip hidden scroll visible|overflow-y- auto clip hidden scroll visible|overscroll- auto contain none|overscroll-x- auto contain none|overscroll-y- auto contain none| absolute fixed relative static sticky| collapse invisible visible|justify- around baseline between center center-safe end end-safe evenly normal start stretch|justify-items- center center-safe end end-safe normal start stretch|justify-self- auto center center-safe end end-safe start stretch|items- baseline baseline-last center center-safe end end-safe start stretch|self- auto baseline baseline-last center center-safe end end-safe start stretch|place-content- around baseline between center center-safe end end-safe evenly start stretch|place-items- baseline center center-safe end end-safe start stretch|place-self- auto center center-safe end end-safe start stretch| antialiased subpixel-antialiased| italic not-italic|normal-nums |ordinal |slashed-zero | lining-nums oldstyle-nums| proportional-nums tabular-nums| diagonal-fractions stacked-fractions| no-underline overline| capitalize lowercase normal-case uppercase|truncate |whitespace- break-spaces normal nowrap pre pre-line pre-wrap|break- all keep normal words|wrap- anywhere break-word normal|hyphens- auto manual none|mix-blend- color color-burn color-dodge darken difference exclusion hard-light hue lighten luminosity multiply normal overlay plus-darker plus-lighter saturation screen soft-light|table- auto fixed|caption- bottom top|backface- hidden visible|appearance- auto none|scheme- dark light light-dark normal only-dark only-light|field-sizing- content fixed|pointer-events- auto none|resize -none -x -y|snap- align-none center end start|snap- always normal|snap- both none x y|snap- mandatory proximity|touch- auto manipulation none|touch-pan- left right x|touch-pan- down up y|touch-pinch-zoom |select- all auto none text|forced-color-adjust- auto none| normal size| baseline bottom middle sub super text-bottom text-top top| bounce none ping pulse spin| auto square video| auto fr max min px|none | auto full px| fixed local scroll|clip- border content padding text|origin- border content padding| bottom bottom-left bottom-right center left left-bottom left-top right right-bottom right-top top top-left top-right| no-repeat repeat repeat-round repeat-space repeat-x repeat-y| auto contain cover| gradient-to-b gradient-to-bl gradient-to-br gradient-to-l gradient-to-r gradient-to-t gradient-to-tl gradient-to-tr none|blend- color color-burn color-dodge darken difference exclusion hard-light hue lighten luminosity multiply normal overlay saturation screen soft-light|to- b bl br l r t tl tr| auto dvh fit full lh lvh max min px screen svh| dashed dotted double hidden none solid| collapse separate|px |auto |full | content none strict| inline-size size|layout |paint |style | around baseline between center center-safe end end-safe evenly normal start stretch| alias all-scroll auto cell col-resize context-menu copy crosshair default e-resize ew-resize grab grabbing help move n-resize ne-resize nesw-resize no-drop none not-allowed ns-resize nw-resize nwse-resize pointer progress row-resize s-resize se-resize sw-resize text vertical-text w-resize wait zoom-in zoom-out| dashed dotted double solid wavy| auto from-font|reverse |initial | in in-out initial linear out| col col-reverse row row-reverse| nowrap wrap wrap-reverse| auto initial none| black bold extrabold extralight light medium normal semibold thin| condensed expanded extra-condensed extra-expanded normal semi-condensed semi-expanded ultra-condensed ultra-expanded|flow- col col-dense dense row row-dense| none subgrid| auto dvh dvw fit full lh lvh lvw max min px screen svh svw| block flex grid table| auto dvw fit full lvw max min px screen svw| loose none normal px relaxed snug tight|through |item | inside outside| decimal disc none| auto px| clip-border clip-content clip-fill clip-padding clip-stroke clip-view no-clip| add exclude intersect subtract| alpha luminance match|origin- border content fill padding stroke view|type- alpha luminance| circle ellipse| closest-corner closest-side farthest-corner farthest-side|at- bottom bottom-left bottom-right center left left-bottom left-top right right-bottom right-top top top-left top-right| dvh fit full lh lvh max min none px screen svh| auto dvh dvw fit full lh lvh lvw max min none px screen svh svw| dvw fit full lvw max min none px screen svw| auto dvh dvw fit full lvh lvw max min none prose px svh svw| auto dvh dvw fit full lvh lvw max min none px screen svh svw| contain cover fill none scale-down| first last none| distant dramatic midrange near none normal|inset | full none|3d | auto smooth|gutter- auto both stable| auto none thin| inner none| auto dvh dvw fit full lvh lvw max min px svh svw|base | center end justify left right start| clip ellipsis| balance nowrap pretty wrap| normal tight tighter wide wider widest| cpu gpu none| 3d flat| all colors none opacity shadow transform| discrete normal| full px| auto dvh dvw fit full lvh lvw max min px screen svh svw| auto contents scroll transform`.split(`|`).map(e=>{let t=e.split(` `),n=t.shift();for(let e=0;e<t.length;e++)t[e]=n+t[e];return t}),pe=V(`0000000000000000000000000000000000000000000000000000000000000262242:6@200000006:240B428:4422400002046044222426220026642642462026224222824220022400000000\\00N222422242222222224062242222222422226264222422222222222222442804222422222222222222222222220<4<0204260002444020204224422`),me=V(`ɠ222222222222222222222222222222222222222222222222222222222222˕4222226>ʶ22ʷʺʷ2ʸʷ42ʴ2ʓ22>621422ɶ222ɹɼɷɺɷɺ22ɱ42222ɨ2ɧ26622ɘɓ244ƸƵ222]d24242ǖǓƚÄȫ2263ȨȥȨ2222222ǣ222222222222222222ǂƽ2ƾƵ2222222422222ƜƑ22222222222222222222144Ŧţ22Ţş222222222222222222222ĸ2ı68ĦģĦɡŰ4Ġ«®ĝ822ĔđĔ2ē2222622`),he=V(`02222222222222222222222222222222222222222222222222222222222222222202022222222222EH2200IL021042222Y\\222IL0cf2e10j2222U00X202[^2y0000120|{~22
:22|22222222222G000qOVI00000}2>40000B00000I¨©000¬00000000000000021M®00°000000000000000000000222HGHa1º222¿2À2222ÉÌ000°2±`),ge=new Int32Array(995),_e=new Int32Array(995),ve=new Int32Array(995),ye=``,be=new Int32Array(1038);{let e=new Map,t=0,n=0;for(let r=0;r<pe.length;r++)for(let i of fe[he[r]]){let a=e.get(i);a===void 0&&(a=t++,e.set(i,a),be[a*2]=ye.length,be[a*2+1]=i.length,ye+=i),ge[n]=pe[r],_e[n]=me[r],ve[n]=a,n++}}var xe=V(`0b2N:222@R>F@286¦2@H2D266226FB22B2>BD\\6N22222Z222D222p`),Se=te(B(`1::24444432:442:44:44>222222:44:4421322511111311111114`)),Ce=V(`24A;33N=C@H4A;33N=C@<27;83:;8393NQ:3NQʰ222ˉºŴŽ2R2=18cƴÅŇ=cĞÛC1ƈǝȈ:ħ25=11D3A@4=<1;1DEr25;11B3?<6;:371BCn9@7=<8192>2E121@9@EHE@9>2T25511<398454131<=V25511<398454131<=ƧNž2Đå242L222290000f22500ɛ000ǘ222`),we=B(`ij`),Te=B(``),Ee=B(`1`),De={GROUP_COUNT:H,customValidatorNames:ne,edgeStart:U,labelStart:re,labelText:ie,edgeTarget:ae,nodeGroup:oe,nodeVlist:de,vlistPat:se,vlistOps:ce,vlistRef:le,vlistGroup:ue,litAnchor:ge,litGroup:_e,litPool:ve,poolOffsets:be,poolText:ye,adjGid:xe,adjStart:Se,adjTgt:Ce,patGid:we,patTgt:Te,postfixLookupGroups:Ee,orderSensitiveModifiers:`* ** after backdrop before details-content file first-letter first-line marker placeholder selection`},Oe=`line`in Error(),ke=-1,Ae=-1,je=(e,t,n)=>{let r=2166136261;for(let i=t;i<n;i++)r=Math.imul(r^e.charCodeAt(i),16777619);return r},Me=(e,t,n)=>{let r=n-t,i=Math.imul(r,2654435761)^e.charCodeAt(t);if(r>3){let a=r>>2,o=r>>1;i=Math.imul(i^e.charCodeAt(t+1)<<8^e.charCodeAt(t+2)<<16^e.charCodeAt(t+a),2246822507),i=Math.imul(i^e.charCodeAt(t+o)<<8^e.charCodeAt(t+o+a)<<16^e.charCodeAt(n-3),3266489909),i^=e.charCodeAt(n-2)<<8^e.charCodeAt(n-1)<<16;for(let r=t+3,a=n-4;r<t+8&&r<a;r++,a--)i=Math.imul(i^e.charCodeAt(r)^e.charCodeAt(a)<<8,16777619)}return i^i>>>15},Ne=(e,t,n={})=>{let{GROUP_COUNT:r,edgeStart:i,labelStart:a,labelText:o,edgeTarget:s,nodeGroup:c,nodeVlist:l,vlistPat:u,vlistOps:d,vlistRef:f,vlistGroup:p,litAnchor:m,litGroup:h,litPool:g,poolOffsets:_,poolText:v,adjGid:y,adjStart:b,adjTgt:x,patGid:S,patTgt:C,postfixLookupGroups:w,customValidatorNames:T,orderSensitiveModifiers:E}=e,D=new Int32Array(r).fill(-1);for(let e=0;e<y.length;e++)D[y[e]]=e;let O=0;for(let e=0;e+1<b.length;e++){let t=b[e+1]-b[e];t>O&&(O=t)}let k=32;for(;k<2*(1+O+S.length);)k<<=1;let A=new Int32Array(f.length+1);for(let e=0;e<f.length;e++)A[e+1]=A[e]+u[f[e]+1]-u[f[e]];let j=new Uint8Array(r);for(let e=0;e<w.length;e++)j[w[e]]=1;let M=i.length-1,N=new Uint8Array(M),P=0,F=!0;for(let e=0;e<m.length;e++){N[m[e]]=1;let t=_[g[e]*2+1];t>P&&(P=t);let n=v.charCodeAt(_[g[e]*2]);(n===91||n===40)&&(F=!1)}let I=1;for(;I<m.length*2;)I<<=1;let L=new Int32Array(I).fill(-1);for(let e=0;e<m.length;e++){let t=_[g[e]*2],n=(je(v,t,t+_[g[e]*2+1])^Math.imul(m[e],2654435761)|0)&I-1;for(;L[n]!==-1;)n=n+1&I-1;L[n]=e}let R=(e,t,n,r)=>{let i=(je(t,n,r)^Math.imul(e,2654435761)|0)&I-1,a=r-n;for(;;){let r=L[i];if(r===-1)return-1;if(m[r]===e&&_[g[r]*2+1]===a){let e=_[g[r]*2],i=!0;for(let r=0;r<a;r++)if(v.charCodeAt(e+r)!==t.charCodeAt(n+r)){i=!1;break}if(i)return h[r]}i=i+1&I-1}},z=n.cacheSize??8192,ee=n.prefix??e.prefix??``,B=ee===``?``:ee+`:`,te=B.length,V=(T??[]).map(e=>{let n=t&&t[e];if(!n)throw Error(`cn: missing validator `+e);return n}),H=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,ne=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,U=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,re=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,ie=0,ae=-1,oe=-1,se=-1,ce=-1,le=e=>e>=97&&e<=122||e>=65&&e<=90||e>=48&&e<=57||e===95,ue=e=>/\s/.test(String.fromCharCode(e)),de=(e,t,n)=>{if(ie=0,ae=-1,n-t<3)return;let r=e.charCodeAt(t),i=e.charCodeAt(n-1);if(r===91&&i===93)ie=1;else if(r===40&&i===41)ie=2;else return;se=t+1,ce=n-1;let a=t+1;if(le(e.charCodeAt(a))){for(a++;a<n-1;){let t=e.charCodeAt(a);if(!le(t)&&t!==45)break;a++}a<n-2&&e.charCodeAt(a)===58&&(ae=t+1,oe=a,se=a+1)}},fe=(e,t,n,r)=>{if(n-t!==r.length)return!1;for(let n=0;n<r.length;n++)if(e.charCodeAt(t+n)!==r.charCodeAt(n))return!1;return!0},pe=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,me=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,he=e=>!!e&&!Number.isNaN(Number(e)),ge=(e,t,n)=>{if(n-t<11||!fe(e,t,t+10,`@container`))return!1;if(e.charCodeAt(t+10)===47)return n-t>=12;let r=e.charCodeAt(t+11);return r===115&&n-t>=17&&fe(e,t+10,t+16,`-size/`)||r===110&&n-t>=19&&fe(e,t+10,t+18,`-normal/`)},_e=[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2],ve=`length|number|number weight|family-name|position percentage|length size bg-size|image url|shadow|length|family-name|position percentage|length size bg-size|image url|shadow|number weight`.split(`|`).map(e=>e.split(` `)),ye=[2,3,1,0,0,0,4,5,0,0,0,0,0,1,1],be=(e,t,n,r)=>{if(e>=10){if(e>=25)return V[e-25](t.slice(n,r));let i=e-10;if(ie!==_e[i])return!1;if(ae>=0){for(let e of ve[i])if(fe(t,ae,oe,e))return!0;return!1}switch(ye[i]){case 0:return!1;case 1:return!0;case 2:{let e=t.slice(se,ce);return H.test(e)&&!ne.test(e)}case 3:return he(t.slice(se,ce));case 4:return re.test(t.slice(se,ce));default:return U.test(t.slice(se,ce))}}switch(e){case 0:return!0;case 1:return ie===0;case 2:return ie===1;case 3:return ie===2;case 4:return pe.test(t.slice(n,r));case 5:return he(t.slice(n,r));case 6:{let e=t.slice(n,r);return!!e&&Number.isInteger(Number(e))}case 7:return r>n&&t.charCodeAt(r-1)===37&&he(t.slice(n,r-1));case 8:return me.test(t.slice(n,r));default:return ge(t,n,r)}},xe=new Set(typeof E==`string`?E.split(` `):E),Se=(e,t,n,r,i,a)=>{let o=je(t,n,r)^(i?2654435769:0),s=e.get(o);if(s!==void 0)outer:for(let e=0;e<s.length;e++){let a=s[e];if(a.imp===i&&a.k.length===r-n){for(let e=0;e<a.k.length;e++)if(a.k.charCodeAt(e)!==t.charCodeAt(n+e))continue outer;return a.id}}else e.set(o,s=[]);let c=t.slice(n,r),l=a(c);return s.push({k:c,imp:i,id:l}),l},Ce=new Map,we=new Map,Te=2,Ee=4096,De=(e,t)=>{let n=[],r=0,i=0,a=0;for(let t=0;t<e.length;t++){let o=e.charCodeAt(t);r===0&&i===0&&o===58?(n.push(e.slice(a,t)),a=t+1):o===91?r++:o===93?r--:o===40?i++:o===41&&i--}n.push(e.slice(a));let o=n[0];if(n.length>1){let e=[],t=[];for(let r of n)r.charCodeAt(0)===91||xe.has(r)?(t.length&&(e.push(...t.sort()),t=[]),e.push(r)):t.push(r);t.length&&e.push(...t.sort()),o=e.join(`:`)}let s=t?o+` !`:o,c=we.get(s);return c===void 0&&we.set(s,c=Te++),c},Ne=new Map,Pe=r,Fe=r+4096,Le=()=>Pe++,Re=2097152,ze=8192,Be=new Int32Array(ze),Ve=Array(ze).fill(null),He=new Int32Array(ze),Ue=new Int32Array(ze),We=new Uint8Array(ze),Ge=0,Ke=(e,t,n,r,i,a,o,s)=>{let c=e;if(Ve[e]!==null){if(Ve[e|1]===null)c=e|1;else if(!(Ge++&3))c=e|Ge>>2&1;else return}Ve[c]=t.slice(n,r),Be[c]=i,He[c]=a,Ue[c]=o,We[c]=s},qe=()=>Ve.fill(null),W=256,Je=[new Int32Array(W),new Int32Array(W),new Int32Array(W),new Int32Array(W)],[G,Ye,Xe,Ze]=Je,Qe=new Uint8Array(W),$e=new Uint8Array(W),et=()=>{W*=2,Je=Je.map(e=>{let t=new Int32Array(W);return t.set(e),t}),[G,Ye,Xe,Ze]=Je;let e=new Uint8Array(W);e.set(Qe),Qe=e,$e=new Uint8Array(W)},tt=64,nt=new Int32Array(tt),rt=new Int32Array(tt),it=new Int32Array(r),at=2048,ot=21,st=new Float64Array(at),ct=new Int32Array(at),K=0,lt=(e,t)=>{if(e===0&&t<r)return it[t]===K?1:(it[t]=K,0);let n=e*2097152+t+1,i=Math.imul(n,2654435761)>>>ot;for(;ct[i]===K;){if(st[i]===n)return 1;i=i+1&at-1}return st[i]=n,ct[i]=K,0},ut=(e,t,n,r,i)=>{if(n-t>=2&&e.charCodeAt(t)===91&&e.charCodeAt(n-1)===93){let r=-1;for(let i=t+1;i<n-1;i++)if(e.charCodeAt(i)===58){r=i;break}return r===-1||r===t+1?ke:Se(Ne,e,t+1,r,0,Le)}if(r>=0&&c[r]>=0)return c[r];for(let t=i-1;t>=0;t--){let r=rt[t];if(r>n)continue;let i=nt[t],a=n-r;if(N[i]===1&&a>0&&a<=P){let t=e.charCodeAt(r);if(F===!1||t!==91&&t!==40){let t=R(i,e,r,n);if(t>=0)return t}}let o=l[i];if(o<0)continue;let s=f[o],c=u[s],m=u[s+1];if(c===m)continue;de(e,r,n);let h=A[o]-c;for(let t=c;t<m;t++)if(be(d[t],e,r,n))return p[h+t]}return ke},q=e=>{let t=e.length,n=0,c=0,u=!1;(Te>Ee||Ce.size>Ee)&&(Ce=new Map,we=new Map,Te=2,qe()),Pe>Fe&&(Ne=new Map,Pe=r,qe());let d=0;for(;d<t;){let f=e.charCodeAt(d);if(f===32||f>=9&&f<=13||f>=160&&ue(f)){f!==32&&(u=!0),d++;continue}let p=d,m=0;for(;d<t;){if(f=e.charCodeAt(d),f<=32){if(f===32)break;if(f>=9&&f<=13){u=!0;break}}else if(f>=160&&ue(f)){u=!0;break}m=Math.imul(m^f,16777619),d++}let h=d,g=h-p;n===W&&et();let _=n++;G[_]=p,Ye[_]=h,c+=g,m^=Math.imul(g,2654435761);let v=m^m>>>15,y=v&8190;{let t=-1;if(Be[y]===v&&Ve[y]!==null&&Ve[y].length===g?t=y:Be[y|1]===v&&Ve[y|1]!==null&&Ve[y|1].length===g&&(t=y|1),t>=0){let n=Ve[t],r=!0;for(let t=0;t<g;t++)if(n.charCodeAt(t)!==e.charCodeAt(p+t)){r=!1;break}if(r){Xe[_]=He[t],Ze[_]=Ue[t],Qe[_]=We[t];continue}}}let b=p;if(te!==0){if(h-p<=te||!e.startsWith(B,p)){Xe[_]=ke,Ke(y,e,p,h,v,ke,0,0);continue}b=p+te}let x=0,S=0,C=-1,w=-1;for(let t=b;t<h;t++){let n=e.charCodeAt(t);if(x===0&&S===0){if(n===58){C=t;continue}if(n===47){w=t;continue}}n===91?x++:n===93?x--:n===40?S++:n===41&&S--}let T=C>=b?C+1:b,E=T,D=h,O=!1,k=0;D>E&&e.charCodeAt(D-1)===33?(O=!0,D--):D>E&&e.charCodeAt(E)===33&&(O=!0,E++,k=1);let A=-1;w>T&&(A=w+k,A>=D&&(A=-1));let M=E;D-E>1&&e.charCodeAt(E)===45&&(M=E+1);let P=0,F=0,I=0,L=-1,R=0;(l[0]>=0||N[0]===1)&&(nt[0]=0,rt[0]=M,R=1);let z=Ae,ee=0;for(let t=M;t<D;t++)if(t===A&&(z=F<I?Ae:P,ee=R),P!==Ae){let n=e.charCodeAt(t),r=-1;if(F<I)o.charCodeAt(F)===n?(F++,F===I&&(r=P=L)):P=Ae;else{let e=i[P],t=i[P+1],c=Ae;for(let i=e;i<t;i++){let e=a[i];if(o.charCodeAt(e)===n){a[i+1]-e===1?r=c=s[i]:(F=e+1,I=a[i+1],L=s[i],c=P);break}}P=c}if(r>=0&&(l[r]>=0||N[r]===1)&&t+1<D&&e.charCodeAt(t+1)===45){if(R===tt){tt*=2;let e=new Int32Array(tt);e.set(nt),nt=e;let t=new Int32Array(tt);t.set(rt),rt=t}nt[R]=r,rt[R]=t+2,R++}}A===D&&(z=F<I?Ae:P,ee=R);let V=F<I?Ae:P,H,ne=!1;if(A>=0){if(ne=!0,H=ut(e,E,A,z,ee),H!==ke&&H<r&&j[H]){let t=ut(e,E,D,V,R);t!==ke&&t!==H&&(H=t,ne=!1)}else H===ke&&(H=ut(e,E,D,V,R),ne=!1)}else H=ut(e,E,D,V,R);let U=0,re=0;H===ke?Xe[_]=ke:(re=+!!ne,U=b>=C?+!!O:Se(Ce,e,b,C,+!!O,e=>De(e,O)),Xe[_]=H,Qe[_]=re,Ze[_]=U),Ke(y,e,p,h,v,H,U,re)}if(n===0)return``;if(n===1)return G[0]===0&&Ye[0]===t?e:e.slice(G[0],Ye[0]);if(n*k>at){for(;n*k>at;)at<<=1,ot--;st=new Float64Array(at),ct=new Int32Array(at)}if(Te>=Re||Pe>=Re)throw Error(`cn: too many distinct classes in one merge`);K=K+1|0,K===0&&(it.fill(0),ct.fill(0),K=1);let f=!1;for(let e=n-1;e>=0;e--){let t=Xe[e];if(t===ke){$e[e]=1;continue}let n=Ze[e];if(lt(n,t)===1)$e[e]=0,f=!0;else if($e[e]=1,t<r){let r=D[t];if(r>=0)for(let e=b[r];e<b[r+1];e++)lt(n,x[e]);if(Qe[e]&1)for(let e=0;e<S.length;e++)S[e]===t&<(n,C[e])}}if(!f&&!u&&t===c+n-1)return e;let p=``,m=0;for(;m<n;){if(!$e[m]){m++;continue}let t=G[m],r=Ye[m],i=m+1;for(;i<n&&$e[i]&&G[i]===r+1&&e.charCodeAt(r)===32;)r=Ye[i],i++;p.length>0&&(p+=` `),p+=e.slice(t,r),m=i}return p},dt=16384,ft=new Int32Array(dt*2),J=0,Y=1,pt=Object.create(null),mt=Object.create(null),ht=new Map,gt=new Map,_t=0,vt=0,yt=()=>{J^=dt,Y=Y+1|0,vt=0},bt=e=>{let t=pt[e];if(t!==void 0)return t;let n=Me(e,0,e.length),r=(n&16383)+J,i=ft[r]===(n^Y)||ft[r^dt]===(n^Y-1);return i&&(t=mt[e],t!==void 0)?(pt[e]=t,t):(t=q(e),i?(pt[e]=t,++_t>z&&(_t=0,mt=pt,pt=Object.create(null),yt())):(ft[r]=n^Y,++vt>dt&&yt()),t)},xt=e=>{let t=ht.get(e);if(t!==void 0)return t;let n=Me(e,0,e.length),r=(n&16383)+J,i=ft[r]===(n^Y)||ft[r^dt]===(n^Y-1);return i&&(t=gt.get(e),t!==void 0)?(ht.set(e,t),t):(t=q(e),i?(ht.set(e,t),++_t>z&&(_t=0,gt=ht,ht=new Map,yt())):(ft[r]=n^Y,++vt>dt&&yt()),t)},St=e=>{let t=Me(e,0,e.length),n=(t&16383)+J;return ft[n]===(t^Y)||ft[n^dt]===(t^Y-1)||(ft[n]=t^Y,++vt>dt&&yt(),!1)},X=z===0?q:Oe?e=>{let t=ht.get(e);return t===void 0?xt(e):t}:bt;return{merge:function(){return arguments.length===1&&typeof arguments[0]==`string`?X(arguments[0]):X(Ie.apply(null,arguments))},mergeString:X,seenBefore:z===0?()=>!1:St,mergeUncached:q}},Pe=(e,t)=>{if(!e)return``;if(typeof e==`string`)return e;let n=``;if(typeof e.length==`number`&&(!t||Array.isArray(e))){let r=e;for(let e=0;e<r.length;e++){let i=r[e];if(!i)continue;let a=typeof i==`string`?i:Pe(i,t);a&&(n&&(n+=` `),n+=a)}return n}if(t){if(typeof e==`number`)return``+e;if(typeof e==`object`)for(let t in e)e[t]&&(n&&(n+=` `),n+=t)}return n},Fe=(e,t)=>{let n=``;for(let r=0;r<e.length;r++){let i=e[r];if(!i)continue;let a=typeof i==`string`?i:Pe(i,t);a&&(n&&(n+=` `),n+=a)}return n},Ie=function(){return Fe(arguments,!1)},Le=256,Re=16,ze=1024,Be=4096,Ve=(e,t)=>{let n=t===void 0?()=>!0:t.seenBefore,r=t===void 0?e:t.mergeUncached,i=new Map,a=new Map,o=0,s=null,c=null,l=[],u=[],d=0,f=(t,n,r)=>{c===null&&(c=Array(Be).fill(``),l=Array(Be).fill(``),u=Array(Be).fill(``));let i=Me(t,0,t.length)&4094;if(c[i]===t&&l[i]===n)return u[i];if(c[i|1]===t&&l[i|1]===n)return u[i|1];let a=e(r?n+` `+t:t),o=c[i]===``?i:i|(c[i|1]===``?1:d++&1);return c[o]=t,l[o]=n,u[o]=a,a},p=(e,t,n,r)=>{let i=0;if(t){if(t!==e.a0)return!1;i=1}if(n){if(n!==(i===0?e.a0:e.a1))return!1;i++}if(r){if(r!==(i===0?e.a0:i===1?e.a1:e.a2))return!1;i++}return i===e.t},m=(e,t)=>{let n=e.a,r=0;for(let e=0;e<t.length;e++){let i=t[e];if(i){if(i!==n[r])return!1;r++}}return r===e.t},h=(t,c)=>{let l=t.length,u=s===null?null:s.n;if(!c){if(u!==null&&m(u,t))return s=u,u.r;if(s!==null&&s!==u&&m(s,t))return s.r}let d=``,p=-1,h=0,g=!1;for(let e=0;e<l;e++){let n=t[e];if(n){if(typeof n!=`string`){if(n=t[e]=Pe(n,!0),!n)continue;g=!0}p<0&&(d=n,p=e),h++}}if(h===0)return``;if(h===1)return e(d);if(g){if(u!==null&&m(u,t))return s=u,u.r;if(s!==null&&s!==u&&m(s,t))return s.r}let _=i.get(d);_===void 0&&(_=a.get(d),_!==void 0&&i.set(d,_));let v=null;if(_!==void 0){if(_.skip>0){_.skip--,s=null;let e=d;for(let n=p+1;n<l;n++){let r=t[n];r&&(e+=` `+r)}return f(e,``,!1)}let e=_.e;outer:for(let n=0;n<e.length;n++){let r=e[n];if(r.t!==h)continue;let i=r.a,a=1;for(let e=p+1;e<l;e++){let n=t[e];if(n&&n!==i[a++])continue outer}v=r;break}v!==null&&(_.miss=0)}if(v===null){let s=d,c=[d];for(let e=p+1;e<l;e++){let n=t[e];n&&(s+=` `+n,c.push(n))}if(!n(s))return r(s);v={r:e(s),t:c.length,a0:c[0],a1:c[1],a2:c[2]??``,a:c,n:null},_===void 0?i.set(d,_={e:[],miss:0,skip:0,at:0}):++_.miss>Re&&(_.miss=Re,_.skip=ze,_.e.length=0,_.at=0);let u=_.e;u.length<Le?u.push(v):(u[_.at]=v,_.at=_.at+1&255),++o>1e3&&(o=0,a=i,i=new Map)}return s!==null&&s!==v&&(s.n=v),s=v,v.r},g=t=>Array.isArray(t)?h(t.slice(),!1):e(Pe(t,!0));return function(t,n,r){let a=arguments.length;if((a|1)==3){let e=s;if(e!==null){let i=e.n;if(i!==null&&p(i,t,n,r))return s=i,i.r;if(e!==i&&p(e,t,n,r))return e.r}if(a===2&&typeof n==`string`&&n!==``){let e=i.get(t);if(e!==void 0&&e.skip>0)return e.skip--,s=null,f(n,t,!0)}return h([t,n,r],!0)}if(a===1)return typeof t==`string`?e(t):g(t);let o=s;if(o!==null){let e=o.n;if(e!==null){let t=e.a,n=0,r=!0;for(let e=0;e<a;e++){let i=arguments[e];if(i){if(i!==t[n]){r=!1;break}n++}}if(r&&n===e.t)return s=e,e.r}if(o!==e){let e=o.a,t=0,n=!0;for(let r=0;r<a;r++){let i=arguments[r];if(i){if(i!==e[t]){n=!1;break}t++}}if(n&&t===o.t)return o.r}}let c=[];for(let e=0;e<a;e++)c.push(arguments[e]);return h(c,!0)}},He=Ne(De),Ue=Ve(He.mergeString,He);He.merge;var We=Object.defineProperty,Ge=(e,t)=>We(e,`name`,{value:t,configurable:!0});function Ke(e,t){if(typeof e==`function`)return e(t);e!=null&&(e.current=t)}Ge(Ke,`setRef`);function qe(...e){return t=>{let n=!1,r=e.map(e=>{let r=Ke(e,t);return!n&&typeof r==`function`&&(n=!0),r});if(n)return()=>{for(let t=0;t<r.length;t++){let n=r[t];typeof n==`function`?n():Ke(e[t],null)}}}}Ge(qe,`composeRefs`);function W(...e){return g.useCallback(qe(...e),e)}Ge(W,`useComposedRefs`);var Je=Object.defineProperty,G=(e,t)=>Je(e,`name`,{value:t,configurable:!0});function Ye(e){let t=g.forwardRef((t,n)=>{let{children:r,...i}=t,a=null,o=!1,s=[];it(r)&&typeof K==`function`&&(r=K(r._payload)),g.Children.forEach(r,e=>{if(nt(e)){o=!0;let t=e,n=`child`in t.props?t.props.child:t.props.children;it(n)&&typeof K==`function`&&(n=K(n._payload)),a=$e(t,n),s.push(a?.props?.children)}else s.push(e)}),a?a=g.cloneElement(a,void 0,s):!o&&g.Children.count(r)===1&&g.isValidElement(r)&&(a=r);let c=a?tt(a):void 0,l=W(n,c);if(!a){if(r||r===0)throw Error(o?ct(e):st(e));return r}let u=et(i,a.props??{});return a.type!==g.Fragment&&(u.ref=n?l:c),g.cloneElement(a,u)});return t.displayName=`${e}.Slot`,t}G(Ye,`createSlot`);var Xe=Ye(`Slot`),Ze=Symbol.for(`radix.slottable`);function Qe(e){let t=G(e=>`child`in e?e.children(e.child):e.children,`Slottable`);return t.displayName=`${e}.Slottable`,t.__radixId=Ze,t}G(Qe,`createSlottable`);var $e=G((e,t)=>{if(`child`in e.props){let t=e.props.child;return g.isValidElement(t)?g.cloneElement(t,void 0,e.props.children(t.props.children)):null}return g.isValidElement(t)?t:null},`getSlottableElementFromSlottable`);function et(e,t){let n={...t};for(let r in t){let i=e[r],a=t[r];/^on[A-Z]/.test(r)?i&&a?n[r]=(...e)=>{let t=a(...e);return i(...e),t}:i&&(n[r]=i):r===`style`?n[r]={...i,...a}:r===`className`?n[r]=[i,a].filter(Boolean).join(` `):r===`aria-describedby`&&(n[r]=ot(a,i))}return{...e,...n}}G(et,`mergeProps`);function tt(e){let t=Object.getOwnPropertyDescriptor(e.props,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}G(tt,`getElementRef`);function nt(e){return g.isValidElement(e)&&typeof e.type==`function`&&`__radixId`in e.type&&e.type.__radixId===Ze}G(nt,`isSlottable`);var rt=Symbol.for(`react.lazy`);function it(e){return typeof e==`object`&&!!e&&`$$typeof`in e&&e.$$typeof===rt&&`_payload`in e&&at(e._payload)}G(it,`isLazyComponent`);function at(e){return typeof e==`object`&&!!e&&`then`in e}G(at,`isPromiseLike`);function ot(...e){let t=new Set;for(let n of e)if(typeof n==`string`)for(let e of String(n).trim().split(/\s+/))e&&t.add(e);return t.size>0?Array.from(t).join(` `):void 0}G(ot,`concatAriaDescribedby`);var st=G(e=>`${e} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`,`createSlotError`),ct=G(e=>`${e} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`,`createSlottableError`),K=g.use,lt=Object.defineProperty,ut=(e,t)=>lt(e,`name`,{value:t,configurable:!0}),q=[`a`,`button`,`div`,`form`,`h2`,`h3`,`img`,`input`,`label`,`li`,`nav`,`ol`,`p`,`select`,`span`,`svg`,`ul`].reduce((e,t)=>{let n=Ye(`Primitive.${t}`),r=g.forwardRef((e,r)=>{let{asChild:i,...a}=e,o=i?n:t;return typeof window<`u`&&(window[Symbol.for(`radix-ui`)]=!0),(0,N.jsx)(o,{...a,ref:r})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function dt(e,t){e&&P.flushSync(()=>e.dispatchEvent(t))}ut(dt,`dispatchDiscreteCustomEvent`);var ft=Object.defineProperty,J=(e,t)=>ft(e,`name`,{value:t,configurable:!0});function Y(e,t){let n=g.createContext(t);n.displayName=e+`Context`;let r=J(e=>{let{children:t,...r}=e,i=g.useMemo(()=>r,Object.values(r));return(0,N.jsx)(n.Provider,{value:i,children:t})},`Provider`);r.displayName=e+`Provider`;function i(r,i={}){let{optional:a=!1}=i,o=g.useContext(n);if(o)return o;if(t!==void 0)return t;if(!a)throw Error(`\`${r}\` must be used within \`${e}\``)}return J(i,`useContext`),[r,i]}J(Y,`createContext`);function pt(e,t=[]){let n=[];function r(t,r){let i=g.createContext(r);i.displayName=t+`Context`;let a=n.length;n=[...n,r];let o=J(t=>{let{scope:n,children:r,...o}=t,s=n?.[e]?.[a]||i,c=g.useMemo(()=>o,Object.values(o));return(0,N.jsx)(s.Provider,{value:c,children:r})},`Provider`);o.displayName=t+`Provider`;function s(n,o,s={}){let{optional:c=!1}=s,l=o?.[e]?.[a]||i,u=g.useContext(l);if(u)return u;if(r!==void 0)return r;if(!c)throw Error(`\`${n}\` must be used within \`${t}\``)}return J(s,`useContext`),[o,s]}J(r,`createContext`);let i=J(()=>{let t=n.map(e=>g.createContext(e));return J(function(n){let r=n?.[e]||t;return g.useMemo(()=>({[`__scope${e}`]:{...n,[e]:r}}),[n,r])},`useScope`)},`createScope`);return i.scopeName=e,[r,mt(i,...t)]}J(pt,`createContextScope`);function mt(...e){let t=e[0];if(e.length===1)return t;let n=J(()=>{let n=e.map(e=>({useScope:e(),scopeName:e.scopeName}));return J(function(e){let r=n.reduce((t,{useScope:n,scopeName:r})=>{let i=n(e)[`__scope${r}`];return{...t,...i}},{});return g.useMemo(()=>({[`__scope${t.scopeName}`]:r}),[r])},`useComposedScopes`)},`createScope`);return n.scopeName=t.scopeName,n}J(mt,`composeContextScopes`);var ht=Object.defineProperty,gt=(e,t)=>ht(e,`name`,{value:t,configurable:!0}),_t=!!(typeof window<`u`&&window.document&&window.document.createElement);function vt(e,t,{checkForDefaultPrevented:n=!0}={}){return gt(function(r){if(e?.(r),n===!1||!r||!r.defaultPrevented)return t?.(r)},`handleEvent`)}gt(vt,`composeEventHandlers`);function yt(e){if(!_t)throw Error(`Cannot access window outside of the DOM`);return e?.ownerDocument?.defaultView??window}gt(yt,`getOwnerWindow`);function bt(e){if(!_t)throw Error(`Cannot access document outside of the DOM`);return e?.ownerDocument??document}gt(bt,`getOwnerDocument`);function xt(e,t=!1){let{activeElement:n}=bt(e);if(!n?.nodeName)return null;if(St(n)&&n.contentDocument)return xt(n.contentDocument.body,t);if(t){let e=n.getAttribute(`aria-activedescendant`);if(e){let t=bt(n).getElementById(e);if(t)return t}}return n}gt(xt,`getActiveElement`);function St(e){return e.tagName===`IFRAME`}gt(St,`isFrame`);var X=globalThis?.document?g.useLayoutEffect:()=>{},Ct=Object.defineProperty,wt=(e,t)=>Ct(e,`name`,{value:t,configurable:!0}),Tt=g.useEffectEvent,Et=g.useInsertionEffect;function Dt(e){if(typeof Tt==`function`)return Tt(e);let t=g.useRef(()=>{throw Error(`Cannot call an event handler while rendering.`)});return typeof Et==`function`?Et(()=>{t.current=e}):X(()=>{t.current=e}),g.useMemo(()=>((...e)=>t.current?.(...e)),[])}wt(Dt,`useEffectEvent`);var Ot=Object.defineProperty,kt=(e,t)=>Ot(e,`name`,{value:t,configurable:!0}),At=g.useInsertionEffect||X;function jt({prop:e,defaultProp:t,onChange:n=kt(()=>{},`onChange`),caller:r}){let[i,a,o]=Mt({defaultProp:t,onChange:n}),s=e!==void 0;return[s?e:i,g.useCallback(t=>{if(s){let n=Nt(t)?t(e):t;n!==e&&o.current?.(n)}else a(t)},[s,e,a,o])]}kt(jt,`useControllableState`);function Mt({defaultProp:e,onChange:t}){let[n,r]=g.useState(e),i=g.useRef(n),a=g.useRef(t);return At(()=>{a.current=t},[t]),g.useEffect(()=>{i.current!==n&&(a.current?.(n),i.current=n)},[n,i]),[n,r,a]}kt(Mt,`useUncontrolledState`);function Nt(e){return typeof e==`function`}kt(Nt,`isFunction`);var Pt=Symbol(`RADIX:SYNC_STATE`);function Ft(e,t,n,r){let{prop:i,defaultProp:a,onChange:o,caller:s}=t,c=i!==void 0,l=Dt(o),u=[{...n,state:a}];r&&u.push(r);let[d,f]=g.useReducer((t,n)=>{if(n.type===Pt)return{...t,state:n.state};let r=e(t,n);return c&&!Object.is(r.state,t.state)&&l(r.state),r},...u),p=d.state,m=g.useRef(p);g.useEffect(()=>{m.current!==p&&(m.current=p,c||l(p))},[p,m,c]);let h=g.useMemo(()=>i===void 0?d:{...d,state:i},[d,i]);return g.useEffect(()=>{c&&!Object.is(i,d.state)&&f({type:Pt,state:i})},[i,d.state,c]),[h,f]}kt(Ft,`useControllableStateReducer`);var It=Object.defineProperty,Lt=(e,t)=>It(e,`name`,{value:t,configurable:!0});function Rt(e,t){return g.useReducer((e,n)=>t[e][n]??e,e)}Lt(Rt,`useStateMachine`);var zt=Lt(e=>{let{present:t,children:n}=e,r=Bt(t),i=typeof n==`function`?n({present:r.isPresent}):g.Children.only(n),a=Ht(r.ref,Wt(i));return typeof n==`function`||r.isPresent?g.cloneElement(i,{ref:a}):null},`Presence`);function Bt(e){let[t,n]=g.useState(),r=g.useRef(null),i=g.useRef(e),a=g.useRef(`none`),o=g.useRef(void 0),[s,c]=Rt(e?`mounted`:`unmounted`,{mounted:{UNMOUNT:`unmounted`,ANIMATION_OUT:`unmountSuspended`},unmountSuspended:{MOUNT:`mounted`,ANIMATION_END:`unmounted`},unmounted:{MOUNT:`mounted`}});return g.useEffect(()=>{s===`mounted`?(a.current=o.current??Ut(r.current),o.current=void 0):a.current=`none`},[s]),X(()=>{let t=r.current,n=i.current;if(n!==e){let r=a.current,s=Ut(t);e?(o.current=s,c(`MOUNT`)):s===`none`||t?.display===`none`?c(`UNMOUNT`):c(n&&r!==s?`ANIMATION_OUT`:`UNMOUNT`),i.current=e}},[e,c]),X(()=>{if(t){let e,n=t.ownerDocument.defaultView??window,o=Lt(a=>{let o=Ut(r.current).includes(CSS.escape(a.animationName));if(a.target===t&&o&&(c(`ANIMATION_END`),!i.current)){let r=t.style.animationFillMode;t.style.animationFillMode=`forwards`,e=n.setTimeout(()=>{t.style.animationFillMode===`forwards`&&(t.style.animationFillMode=r)})}},`handleAnimationEnd`),s=Lt(e=>{e.target===t&&(a.current=Ut(r.current))},`handleAnimationStart`);return t.addEventListener(`animationstart`,s),t.addEventListener(`animationcancel`,o),t.addEventListener(`animationend`,o),()=>{n.clearTimeout(e),t.removeEventListener(`animationstart`,s),t.removeEventListener(`animationcancel`,o),t.removeEventListener(`animationend`,o)}}c(`ANIMATION_END`)},[t,c]),{isPresent:[`mounted`,`unmountSuspended`].includes(s),ref:g.useCallback(e=>{if(e){let t=getComputedStyle(e);r.current=t,o.current=Ut(t)}else r.current=null;n(e)},[])}}Lt(Bt,`usePresence`);function Vt(e,t){if(typeof e==`function`)return e(t);e!=null&&(e.current=t)}Lt(Vt,`setRef`);function Ht(...e){let t=g.useRef(e);return t.current=e,g.useCallback(e=>{let n=t.current,r=!1,i=n.map(t=>{let n=Vt(t,e);return!r&&typeof n==`function`&&(r=!0),n});if(r)return()=>{for(let e=0;e<i.length;e++){let t=i[e];typeof t==`function`?t():Vt(n[e],null)}}},[])}Lt(Ht,`useStableComposedRefs`);function Ut(e){return e?.animationName||`none`}Lt(Ut,`getAnimationName`);function Wt(e){let t=Object.getOwnPropertyDescriptor(e.props,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}Lt(Wt,`getElementRef`);var Gt=Object.defineProperty,Kt=(e,t)=>Gt(e,`name`,{value:t,configurable:!0}),qt=g.useId||(()=>void 0),Jt=0;function Yt(e){let[t,n]=g.useState(qt());return X(()=>{e||n(e=>e??String(Jt++))},[e]),e||(t?`radix-${t}`:``)}Kt(Yt,`useId`);var Xt=Object.defineProperty,Zt=(e,t)=>Xt(e,`name`,{value:t,configurable:!0});function Qt(e){let t=g.useRef(e);return g.useEffect(()=>{t.current=e}),g.useMemo(()=>((...e)=>t.current?.(...e)),[])}Zt(Qt,`useCallbackRef`);var $t=Object.defineProperty,Z=(e,t)=>$t(e,`name`,{value:t,configurable:!0}),en=`dismissableLayer.update`,tn=`dismissableLayer.pointerDownOutside`,nn=`dismissableLayer.focusOutside`,rn,an=g.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set,dismissableSurfaces:new Set}),on=g.forwardRef(Z(function(e,t){let{disableOutsidePointerEvents:n=!1,deferPointerDownOutside:r=!1,onEscapeKeyDown:i,onPointerDownOutside:a,onFocusOutside:o,onInteractOutside:s,onDismiss:c,...l}=e,u=g.useContext(an),[d,f]=g.useState(null),p=d?.ownerDocument??globalThis?.document,[,m]=g.useState({}),h=W(t,f),_=Array.from(u.layers),[v]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),y=v?_.indexOf(v):-1,b=d?_.indexOf(d):-1,x=u.layersWithOutsidePointerEventsDisabled.size>0,S=b>=y,C=g.useRef(!1),w=ln(e=>{a?.(e),s?.(e),e.defaultPrevented||c?.()},{ownerDocument:p,deferPointerDownOutside:r,isDeferredPointerDownOutsideRef:C,dismissableSurfaces:u.dismissableSurfaces,shouldHandlePointerDownOutside:g.useCallback(e=>{if(!(e instanceof Node))return!1;let t=[...u.branches].some(t=>t.contains(e));return S&&!t},[u.branches,S])}),T=un(e=>{if(r&&C.current)return;let t=e.target;[...u.branches].some(e=>e.contains(t))||(o?.(e),s?.(e),e.defaultPrevented||c?.())},p),E=d?b===_.length-1:!1,D=Qt(e=>{e.key===`Escape`&&(i?.(e),!e.defaultPrevented&&c&&(e.preventDefault(),c()))});return g.useEffect(()=>{if(E)return p.addEventListener(`keydown`,D,{capture:!0}),()=>p.removeEventListener(`keydown`,D,{capture:!0})},[p,E,D]),g.useEffect(()=>{if(d)return n&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(rn=p.body.style.pointerEvents,p.body.style.pointerEvents=`none`),u.layersWithOutsidePointerEventsDisabled.add(d)),u.layers.add(d),dn(),()=>{n&&(u.layersWithOutsidePointerEventsDisabled.delete(d),u.layersWithOutsidePointerEventsDisabled.size===0&&(p.body.style.pointerEvents=rn))}},[d,p,n,u]),g.useEffect(()=>()=>{d&&(u.layers.delete(d),u.layersWithOutsidePointerEventsDisabled.delete(d),dn())},[d,u]),g.useEffect(()=>{let e=Z(()=>m({}),`handleUpdate`);return document.addEventListener(en,e),()=>document.removeEventListener(en,e)},[]),(0,N.jsx)(q.div,{...l,ref:h,style:{pointerEvents:x?S?`auto`:`none`:void 0,...e.style},onFocusCapture:vt(e.onFocusCapture,T.onFocusCapture),onBlurCapture:vt(e.onBlurCapture,T.onBlurCapture),onPointerDownCapture:vt(e.onPointerDownCapture,w.onPointerDownCapture)})},`DismissableLayer`));function sn(){let e=g.useContext(an),[t,n]=g.useState(null);return g.useEffect(()=>{if(t)return e.dismissableSurfaces.add(t),()=>{e.dismissableSurfaces.delete(t)}},[t,e.dismissableSurfaces]),n}Z(sn,`useDismissableLayerSurface`);var cn=Z(()=>!0,`IS_TRUE`);function ln(e,t){let{ownerDocument:n=globalThis?.document,deferPointerDownOutside:r=!1,isDeferredPointerDownOutsideRef:i,dismissableSurfaces:a,shouldHandlePointerDownOutside:o=cn}=t,s=Qt(e),c=g.useRef(!1),l=g.useRef(!1),u=g.useRef(new Map),d=g.useRef(()=>{});return g.useEffect(()=>{function e(){l.current=!1,i.current=!1,u.current.clear()}Z(e,`resetOutsideInteraction`);function t(){return Array.from(u.current.values()).some(Boolean)}Z(t,`isOutsideInteractionIntercepted`);function f(e){if(!l.current)return;let t=e.target;t instanceof Node&&[...a].some(e=>e.contains(t))||u.current.set(e.type,!0),e.type===`click`&&window.setTimeout(()=>{l.current&&d.current()},0)}Z(f,`handleInteractionCapture`);function p(e){l.current&&u.current.set(e.type,!1)}Z(p,`handleInteractionBubble`);let m=Z(a=>{if(a.target&&!c.current){let f=function(){n.removeEventListener(`click`,d.current);let r=t();e(),r||fn(tn,s,p,{discrete:!0})};if(Z(f,`handleAndDispatchPointerDownOutsideEvent`),!o(a.target)){n.removeEventListener(`click`,d.current),e(),c.current=!1;return}let p={originalEvent:a};l.current=!0,i.current=r&&a.button===0,u.current.clear(),!r||a.button!==0?f():(n.removeEventListener(`click`,d.current),d.current=f,n.addEventListener(`click`,d.current,{once:!0}))}else n.removeEventListener(`click`,d.current),e();c.current=!1},`handlePointerDown`),h=[`pointerup`,`mousedown`,`mouseup`,`touchstart`,`touchend`,`click`];for(let e of h)n.addEventListener(e,f,!0),n.addEventListener(e,p);let g=window.setTimeout(()=>{n.addEventListener(`pointerdown`,m)},0);return()=>{window.clearTimeout(g),n.removeEventListener(`pointerdown`,m),n.removeEventListener(`click`,d.current);for(let e of h)n.removeEventListener(e,f,!0),n.removeEventListener(e,p)}},[n,s,r,i,a,o]),{onPointerDownCapture:Z(()=>c.current=!0,`onPointerDownCapture`)}}Z(ln,`usePointerDownOutside`);function un(e,t=globalThis?.document){let n=Qt(e),r=g.useRef(!1);return g.useEffect(()=>{let e=Z(e=>{e.target&&!r.current&&fn(nn,n,{originalEvent:e},{discrete:!1})},`handleFocus`);return t.addEventListener(`focusin`,e),()=>t.removeEventListener(`focusin`,e)},[t,n]),{onFocusCapture:Z(()=>r.current=!0,`onFocusCapture`),onBlurCapture:Z(()=>r.current=!1,`onBlurCapture`)}}Z(un,`useFocusOutside`);function dn(){let e=new CustomEvent(en);document.dispatchEvent(e)}Z(dn,`dispatchUpdate`);function fn(e,t,n,{discrete:r}){let i=n.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),r?dt(i,a):i.dispatchEvent(a)}Z(fn,`handleAndDispatchCustomEvent`);var pn=Object.defineProperty,Q=(e,t)=>pn(e,`name`,{value:t,configurable:!0}),mn=`focusScope.autoFocusOnMount`,hn=`focusScope.autoFocusOnUnmount`,gn={bubbles:!1,cancelable:!0},_n=g.forwardRef(Q(function(e,t){let{loop:n=!1,trapped:r=!1,branches:i,onMountAutoFocus:a,onUnmountAutoFocus:o,...s}=e,[c,l]=g.useState(null),u=Qt(a),d=Qt(o),f=g.useRef(null),p=W(t,l),m=g.useRef(i);g.useEffect(()=>{m.current=i});let h=g.useCallback(e=>e?c?.contains(e)?!0:!!m.current?.some(t=>t.contains(e)):!1,[c]),_=g.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;g.useEffect(()=>{if(r){let e=function(e){if(_.paused||!c)return;let t=e.target;h(t)?f.current=t:On(f.current,{select:!0})},t=function(e){if(_.paused||!c)return;let t=e.relatedTarget;t!==null&&(h(t)||On(f.current,{select:!0}))},n=function(e){if(document.activeElement===document.body)for(let t of e)t.removedNodes.length>0&&On(c)};Q(e,`handleFocusIn`),Q(t,`handleFocusOut`),Q(n,`handleMutations`),document.addEventListener(`focusin`,e),document.addEventListener(`focusout`,t);let r=new MutationObserver(n);return c&&r.observe(c,{childList:!0,subtree:!0}),()=>{document.removeEventListener(`focusin`,e),document.removeEventListener(`focusout`,t),r.disconnect()}}},[r,c,_.paused,h]),g.useEffect(()=>{if(c){kn.add(_);let e=document.activeElement;if(!c.contains(e)){let t=new CustomEvent(mn,gn);c.addEventListener(mn,u),c.dispatchEvent(t),t.defaultPrevented||(Sn(Mn(wn(c)),{select:!0}),document.activeElement===e&&On(c))}return()=>{c.removeEventListener(mn,u),setTimeout(()=>{let t=new CustomEvent(hn,gn);c.addEventListener(hn,d),c.dispatchEvent(t),t.defaultPrevented||On(e??document.body,{select:!0}),c.removeEventListener(hn,d),kn.remove(_)},0)}}},[c,u,d,_]);let v=g.useCallback(e=>{if(!n&&!r||_.paused)return;let t=e.key===`Tab`&&!e.altKey&&!e.ctrlKey&&!e.metaKey,i=document.activeElement;if(t&&i){let t=e.currentTarget,[r,a]=Cn(t);r&&a?!e.shiftKey&&i===a?(e.preventDefault(),n&&On(r,{select:!0})):e.shiftKey&&i===r&&(e.preventDefault(),n&&On(a,{select:!0})):i===t&&e.preventDefault()}},[n,r,_.paused]);return(0,N.jsx)(q.div,{tabIndex:-1,...s,ref:p,onKeyDown:v})},`FocusScope`)),vn=g.createContext(null);function yn({registry:e,children:t}){return e?(0,N.jsx)(vn.Provider,{value:e,children:t}):t}Q(yn,`FocusScopeBranchProvider`);function bn(){let[e,t]=g.useState([]);return{nodes:e,registry:g.useMemo(()=>({add:Q(e=>t(t=>t.includes(e)?t:[...t,e]),`add`),remove:Q(e=>t(t=>t.filter(t=>t!==e)),`remove`)}),[])}}Q(bn,`useFocusScopeBranchRegistry`);function xn(e){let t=g.useContext(vn);g.useEffect(()=>{if(e&&t)return t.add(e),()=>t.remove(e)},[e,t])}Q(xn,`useFocusScopeBranch`);function Sn(e,{select:t=!1}={}){let n=document.activeElement;for(let r of e)if(On(r,{select:t}),document.activeElement!==n)return}Q(Sn,`focusFirst`);function Cn(e){let t=wn(e);return[Tn(t,e),Tn(t.reverse(),e)]}Q(Cn,`getTabbableEdges`);function wn(e){let t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:Q(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},`acceptNode`)});for(;n.nextNode();)t.push(n.currentNode);return t}Q(wn,`getTabbableCandidates`);function Tn(e,t){let n=typeof t.checkVisibility==`function`&&t.checkVisibility({checkVisibilityCSS:!0});for(let r of e)if(!(n?!r.checkVisibility({checkVisibilityCSS:!0}):En(r,{upTo:t})))return r}Q(Tn,`findVisible`);function En(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}Q(En,`isHidden`);function Dn(e){return e instanceof HTMLInputElement&&`select`in e}Q(Dn,`isSelectableInput`);function On(e,{select:t=!1}={}){if(e&&e.focus){let n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&Dn(e)&&t&&e.select()}}Q(On,`focus`);var kn=An();function An(){let e=[];return{add(t){let n=e[0];t!==n&&n?.pause(),e=jn(e,t),e.unshift(t)},remove(t){e=jn(e,t),e[0]?.resume()}}}Q(An,`createFocusScopesStack`);function jn(e,t){let n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}Q(jn,`arrayRemove`);function Mn(e){return e.filter(e=>e.tagName!==`A`)}Q(Mn,`removeLinks`);var Nn=Object.defineProperty,Pn=g.forwardRef(((e,t)=>Nn(e,`name`,{value:t,configurable:!0}))(function(e,t){let{container:n,...r}=e,[i,a]=g.useState(!1);X(()=>a(!0),[]);let o=n||i&&globalThis?.document?.body;return o?P.createPortal((0,N.jsx)(q.div,{...r,ref:t}),o):null},`Portal`)),Fn=Object.defineProperty,In=(e,t)=>Fn(e,`name`,{value:t,configurable:!0}),Ln=0,Rn=null;function zn(e){return Bn(),e.children}In(zn,`FocusGuards`);function Bn(){g.useEffect(()=>{Rn||={start:Vn(),end:Vn()};let{start:e,end:t}=Rn;return document.body.firstElementChild!==e&&document.body.insertAdjacentElement(`afterbegin`,e),document.body.lastElementChild!==t&&document.body.insertAdjacentElement(`beforeend`,t),Ln++,()=>{Ln===1&&(Rn?.start.remove(),Rn?.end.remove(),Rn=null),Ln=Math.max(0,Ln-1)}},[])}In(Bn,`useFocusGuards`);function Vn(){let e=document.createElement(`span`);return e.setAttribute(`data-radix-focus-guard`,``),e.tabIndex=0,e.style.outline=`none`,e.style.opacity=`0`,e.style.position=`fixed`,e.style.pointerEvents=`none`,e}In(Vn,`createFocusGuard`);var Hn=function(){return Hn=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n],t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},Hn.apply(this,arguments)};function Un(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols==`function`)for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n}function Wn(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,a;r<i;r++)(a||!(r in t))&&(a||=Array.prototype.slice.call(t,0,r),a[r]=t[r]);return e.concat(a||Array.prototype.slice.call(t))}var Gn=`right-scroll-bar-position`,Kn=`width-before-scroll-bar`,qn=`with-scroll-bars-hidden`,Jn=`--removed-body-scroll-bar-size`;function Yn(e,t){return typeof e==`function`?e(t):e&&(e.current=t),e}function Xn(e,t){var n=(0,g.useState)(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(e){var t=n.value;t!==e&&(n.value=e,n.callback(e,t))}}}})[0];return n.callback=t,n.facade}var Zn=typeof window<`u`?g.useLayoutEffect:g.useEffect,Qn=new WeakMap;function $n(e,t){var n=Xn(t||null,function(t){return e.forEach(function(e){return Yn(e,t)})});return Zn(function(){var t=Qn.get(n);if(t){var r=new Set(t),i=new Set(e),a=n.current;r.forEach(function(e){i.has(e)||Yn(e,null)}),i.forEach(function(e){r.has(e)||Yn(e,a)})}Qn.set(n,e)},[e]),n}function er(e){return e}function tr(e,t){t===void 0&&(t=er);var n=[],r=!1;return{read:function(){if(r)throw Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(e){var i=t(e,r);return n.push(i),function(){n=n.filter(function(e){return e!==i})}},assignSyncMedium:function(e){for(r=!0;n.length;){var t=n;n=[],t.forEach(e)}n={push:function(t){return e(t)},filter:function(){return n}}},assignMedium:function(e){r=!0;var t=[];if(n.length){var i=n;n=[],i.forEach(e),t=n}var a=function(){var n=t;t=[],n.forEach(e)},o=function(){return Promise.resolve().then(a)};o(),n={push:function(e){t.push(e),o()},filter:function(e){return t=t.filter(e),n}}}}}function nr(e){e===void 0&&(e={});var t=tr(null);return t.options=Hn({async:!0,ssr:!1},e),t}var rr=function(e){var t=e.sideCar,n=Un(e,[`sideCar`]);if(!t)throw Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw Error(`Sidecar medium not found`);return g.createElement(r,Hn({},n))};rr.isSideCarExport=!0;function ir(e,t){return e.useMedium(t),rr}var ar=nr(),or=function(){},sr=g.forwardRef(function(e,t){var n=g.useRef(null),r=g.useState({onScrollCapture:or,onWheelCapture:or,onTouchMoveCapture:or}),i=r[0],a=r[1],o=e.forwardProps,s=e.children,c=e.className,l=e.removeScrollBar,u=e.enabled,d=e.shards,f=e.sideCar,p=e.noRelative,m=e.noIsolation,h=e.inert,_=e.allowPinchZoom,v=e.as,y=v===void 0?`div`:v,b=e.gapMode,x=Un(e,[`forwardProps`,`children`,`className`,`removeScrollBar`,`enabled`,`shards`,`sideCar`,`noRelative`,`noIsolation`,`inert`,`allowPinchZoom`,`as`,`gapMode`]),S=f,C=$n([n,t]),w=Hn(Hn({},x),i);return g.createElement(g.Fragment,null,u&&g.createElement(S,{sideCar:ar,removeScrollBar:l,shards:d,noRelative:p,noIsolation:m,inert:h,setCallbacks:a,allowPinchZoom:!!_,lockRef:n,gapMode:b}),o?g.cloneElement(g.Children.only(s),Hn(Hn({},w),{ref:C})):g.createElement(y,Hn({},w,{className:c,ref:C}),s))});sr.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},sr.classNames={fullWidth:Kn,zeroRight:Gn};var cr=function(){if(typeof __webpack_nonce__<`u`)return __webpack_nonce__};function lr(){if(!document)return null;var e=document.createElement(`style`);e.type=`text/css`;var t=cr();return t&&e.setAttribute(`nonce`,t),e}function ur(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function dr(e){(document.head||document.getElementsByTagName(`head`)[0]).appendChild(e)}var fr=function(){var e=0,t=null;return{add:function(n){e==0&&(t=lr())&&(ur(t,n),dr(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},pr=function(){var e=fr();return function(t,n){g.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},mr=function(){var e=pr();return function(t){var n=t.styles,r=t.dynamic;return e(n,r),null}},hr={left:0,top:0,right:0,gap:0},gr=function(e){return parseInt(e||``,10)||0},_r=function(e){var t=window.getComputedStyle(document.body),n=t[e===`padding`?`paddingLeft`:`marginLeft`],r=t[e===`padding`?`paddingTop`:`marginTop`],i=t[e===`padding`?`paddingRight`:`marginRight`];return[gr(n),gr(r),gr(i)]},vr=function(e){if(e===void 0&&(e=`margin`),typeof window>`u`)return hr;var t=_r(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},yr=mr(),br=`data-scroll-locked`,xr=function(e,t,n,r){var i=e.left,a=e.top,o=e.right,s=e.gap;return n===void 0&&(n=`margin`),`
|
|
2
|
+
.${qn} {
|
|
3
|
+
overflow: hidden ${r};
|
|
4
|
+
padding-right: ${s}px ${r};
|
|
5
|
+
}
|
|
6
|
+
body[${br}] {
|
|
7
|
+
overflow: hidden ${r};
|
|
8
|
+
overscroll-behavior: contain;
|
|
9
|
+
${[t&&`position: relative ${r};`,n===`margin`&&`
|
|
10
|
+
padding-left: ${i}px;
|
|
11
|
+
padding-top: ${a}px;
|
|
12
|
+
padding-right: ${o}px;
|
|
13
|
+
margin-left:0;
|
|
14
|
+
margin-top:0;
|
|
15
|
+
margin-right: ${s}px ${r};
|
|
16
|
+
`,n===`padding`&&`padding-right: ${s}px ${r};`].filter(Boolean).join(``)}
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
.${Gn} {
|
|
20
|
+
right: ${s}px ${r};
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
.${Kn} {
|
|
24
|
+
margin-right: ${s}px ${r};
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
.${Gn} .${Gn} {
|
|
28
|
+
right: 0 ${r};
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.${Kn} .${Kn} {
|
|
32
|
+
margin-right: 0 ${r};
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
body[${br}] {
|
|
36
|
+
${Jn}: ${s}px;
|
|
37
|
+
}
|
|
38
|
+
`},Sr=function(){var e=parseInt(document.body.getAttribute(`data-scroll-locked`)||`0`,10);return isFinite(e)?e:0},Cr=function(){g.useEffect(function(){return document.body.setAttribute(br,(Sr()+1).toString()),function(){var e=Sr()-1;e<=0?document.body.removeAttribute(br):document.body.setAttribute(br,e.toString())}},[])},wr=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,i=r===void 0?`margin`:r;Cr();var a=g.useMemo(function(){return vr(i)},[i]);return g.createElement(yr,{styles:xr(a,!t,i,n?``:`!important`)})},Tr=!1;if(typeof window<`u`)try{var Er=Object.defineProperty({},"passive",{get:function(){return Tr=!0,!0}});window.addEventListener(`test`,Er,Er),window.removeEventListener(`test`,Er,Er)}catch{Tr=!1}var Dr=Tr?{passive:!1}:!1,Or=function(e){return e.tagName===`TEXTAREA`},kr=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!==`hidden`&&!(n.overflowY===n.overflowX&&!Or(e)&&n[t]===`visible`)},Ar=function(e){return kr(e,`overflowY`)},jr=function(e){return kr(e,`overflowX`)},Mr=function(e,t){var n=t.ownerDocument,r=t;do{if(typeof ShadowRoot<`u`&&r instanceof ShadowRoot&&(r=r.host),Fr(e,r)){var i=Ir(e,r);if(i[1]>i[2])return!0}r=r.parentNode}while(r&&r!==n.body);return!1},Nr=function(e){return[e.scrollTop,e.scrollHeight,e.clientHeight]},Pr=function(e){return[e.scrollLeft,e.scrollWidth,e.clientWidth]},Fr=function(e,t){return e===`v`?Ar(t):jr(t)},Ir=function(e,t){return e===`v`?Nr(t):Pr(t)},Lr=function(e,t){return e===`h`&&t===`rtl`?-1:1},Rr=function(e,t,n,r,i){var a=Lr(e,window.getComputedStyle(t).direction),o=a*r,s=n.target,c=t.contains(s),l=!1,u=o>0,d=0,f=0;do{if(!s)break;var p=Ir(e,s),m=p[0],h=p[1]-p[2]-a*m;(m||h)&&Fr(e,s)&&(d+=h,f+=m);var g=s.parentNode;s=g&&g.nodeType===Node.DOCUMENT_FRAGMENT_NODE?g.host:g}while(!c&&s!==document.body||c&&(t.contains(s)||t===s));return(u&&(i&&Math.abs(d)<1||!i&&o>d)||!u&&(i&&Math.abs(f)<1||!i&&-o>f))&&(l=!0),l},zr=function(e){return`changedTouches`in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},Br=function(e){return[e.deltaX,e.deltaY]},Vr=function(e){return e&&`current`in e?e.current:e},Hr=function(e,t){return e[0]===t[0]&&e[1]===t[1]},Ur=function(e){return`
|
|
39
|
+
.block-interactivity-${e} {pointer-events: none;}
|
|
40
|
+
.allow-interactivity-${e} {pointer-events: all;}
|
|
41
|
+
`},Wr=0,Gr=[];function Kr(e){var t=g.useRef([]),n=g.useRef([0,0]),r=g.useRef(),i=g.useState(Wr++)[0],a=g.useState(mr)[0],o=g.useRef(e);g.useEffect(function(){o.current=e},[e]),g.useEffect(function(){if(e.inert){document.body.classList.add(`block-interactivity-${i}`);var t=Wn([e.lockRef.current],(e.shards||[]).map(Vr),!0).filter(Boolean);return t.forEach(function(e){return e.classList.add(`allow-interactivity-${i}`)}),function(){document.body.classList.remove(`block-interactivity-${i}`),t.forEach(function(e){return e.classList.remove(`allow-interactivity-${i}`)})}}},[e.inert,e.lockRef.current,e.shards]);var s=g.useCallback(function(e,t){if(`touches`in e&&e.touches.length===2||e.type===`wheel`&&e.ctrlKey)return!o.current.allowPinchZoom;var i=zr(e),a=n.current,s=`deltaX`in e?e.deltaX:a[0]-i[0],c=`deltaY`in e?e.deltaY:a[1]-i[1],l,u=e.target,d=Math.abs(s)>Math.abs(c)?`h`:`v`;if(`touches`in e&&d===`h`&&u.type===`range`)return!1;var f=window.getSelection(),p=f&&f.anchorNode;if(p&&(p===u||p.contains(u)))return!1;var m=Mr(d,u);if(!m)return!0;if(m?l=d:(l=d===`v`?`h`:`v`,m=Mr(d,u)),!m)return!1;if(!r.current&&`changedTouches`in e&&(s||c)&&(r.current=l),!l)return!0;var h=r.current||l;return Rr(h,t,e,h===`h`?s:c,!0)},[]),c=g.useCallback(function(e){var n=e;if(Gr.length&&Gr[Gr.length-1]===a){var r=`deltaY`in n?Br(n):zr(n),i=t.current.filter(function(e){return e.name===n.type&&(e.target===n.target||n.target===e.shadowParent)&&Hr(e.delta,r)})[0];if(i&&i.should)n.cancelable&&n.preventDefault();else if(!i){var c=(o.current.shards||[]).map(Vr).filter(Boolean).filter(function(e){return e.contains(n.target)});(c.length>0?s(n,c[0]):!o.current.noIsolation)&&n.cancelable&&n.preventDefault()}}},[]),l=g.useCallback(function(e,n,r,i){var a={name:e,delta:n,target:r,should:i,shadowParent:qr(r)};t.current.push(a),setTimeout(function(){t.current=t.current.filter(function(e){return e!==a})},1)},[]),u=g.useCallback(function(e){n.current=zr(e),r.current=void 0},[]),d=g.useCallback(function(t){l(t.type,Br(t),t.target,s(t,e.lockRef.current))},[]),f=g.useCallback(function(t){l(t.type,zr(t),t.target,s(t,e.lockRef.current))},[]);g.useEffect(function(){return Gr.push(a),e.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:f}),document.addEventListener(`wheel`,c,Dr),document.addEventListener(`touchmove`,c,Dr),document.addEventListener(`touchstart`,u,Dr),function(){Gr=Gr.filter(function(e){return e!==a}),document.removeEventListener(`wheel`,c,Dr),document.removeEventListener(`touchmove`,c,Dr),document.removeEventListener(`touchstart`,u,Dr)}},[]);var p=e.removeScrollBar,m=e.inert;return g.createElement(g.Fragment,null,m?g.createElement(a,{styles:Ur(i)}):null,p?g.createElement(wr,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function qr(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}var Jr=ir(ar,Kr),Yr=g.forwardRef(function(e,t){return g.createElement(sr,Hn({},e,{ref:t,sideCar:Jr}))});Yr.classNames=sr.classNames;var Xr=function(e){return typeof document>`u`?null:(Array.isArray(e)?e[0]:e).ownerDocument.body},Zr=new WeakMap,Qr=new WeakMap,$r={},ei=0,ti=function(e){return e&&(e.host||ti(e.parentNode))},ni=function(e,t){return t.map(function(t){if(e.contains(t))return t;var n=ti(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})},ri=function(e,t,n,r){var i=ni(t,Array.isArray(e)?e:[e]);$r[n]||($r[n]=new WeakMap);var a=$r[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=(Zr.get(e)||0)+1,l=(a.get(e)||0)+1;Zr.set(e,c),a.set(e,l),o.push(e),c===1&&i&&Qr.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(),ei++,function(){o.forEach(function(e){var t=Zr.get(e)-1,i=a.get(e)-1;Zr.set(e,t),a.set(e,i),t||(Qr.has(e)||e.removeAttribute(r),Qr.delete(e)),i||e.removeAttribute(n)}),ei--,ei||(Zr=new WeakMap,Zr=new WeakMap,Qr=new WeakMap,$r={})}},ii=function(e,t,n){n===void 0&&(n=`data-aria-hidden`);var r=Array.from(Array.isArray(e)?e:[e]),i=t||Xr(e);return i?(r.push.apply(r,Array.from(i.querySelectorAll(`[aria-live], script`))),ri(r,i,n,`aria-hidden`)):function(){return null}},ai=Object.defineProperty,oi=(e,t)=>ai(e,`name`,{value:t,configurable:!0});function si(e){let[t,n]=g.useState(void 0);return X(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});let t=0,r=new ResizeObserver(r=>{if(!Array.isArray(r)||!r.length)return;let i=r[0];window.cancelAnimationFrame(t),t=window.requestAnimationFrame(()=>{let t,r;if(`borderBoxSize`in i){let e=i.borderBoxSize,n=Array.isArray(e)?e[0]:e;t=n.inlineSize,r=n.blockSize}else t=e.offsetWidth,r=e.offsetHeight;n({width:t,height:r})})});return r.observe(e,{box:`border-box`}),()=>{window.cancelAnimationFrame(t),r.unobserve(e)}}n(void 0)},[e]),t}oi(si,`useSize`);var ci=[`top`,`right`,`bottom`,`left`],li=Math.min,ui=Math.max,di=Math.round,fi=Math.floor,pi=e=>({x:e,y:e}),mi={left:`right`,right:`left`,bottom:`top`,top:`bottom`};function hi(e,t,n){return ui(e,li(t,n))}function gi(e,t){return typeof e==`function`?e(t):e}function _i(e){return e.split(`-`)[0]}function vi(e){return e.split(`-`)[1]}function yi(e){return e===`x`?`y`:`x`}function bi(e){return e===`y`?`height`:`width`}function xi(e){let t=e[0];return t===`t`||t===`b`?`y`:`x`}function Si(e){return yi(xi(e))}function Ci(e,t,n){n===void 0&&(n=!1);let r=vi(e),i=Si(e),a=bi(i),o=i===`x`?r===(n?`end`:`start`)?`right`:`left`:r===`start`?`bottom`:`top`;return t.reference[a]>t.floating[a]&&(o=Mi(o)),[o,Mi(o)]}function wi(e){let t=Mi(e);return[Ti(e),t,Ti(t)]}function Ti(e){return e.includes(`start`)?e.replace(`start`,`end`):e.replace(`end`,`start`)}var Ei=[`left`,`right`],Di=[`right`,`left`],Oi=[`top`,`bottom`],ki=[`bottom`,`top`];function Ai(e,t,n){switch(e){case`top`:case`bottom`:return n?t?Di:Ei:t?Ei:Di;case`left`:case`right`:return t?Oi:ki;default:return[]}}function ji(e,t,n,r){let i=vi(e),a=Ai(_i(e),n===`start`,r);return i&&(a=a.map(e=>e+`-`+i),t&&(a=a.concat(a.map(Ti)))),a}function Mi(e){let t=_i(e);return mi[t]+e.slice(t.length)}function Ni(e){return{top:e.top??0,right:e.right??0,bottom:e.bottom??0,left:e.left??0}}function Pi(e){return typeof e==`number`?{top:e,right:e,bottom:e,left:e}:Ni(e)}function Fi(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 Ii(e,t,n){let{reference:r,floating:i}=e,a=xi(t),o=Si(t),s=bi(o),c=_i(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=vi(t);return m&&(p[o]+=f*(m===`end`?1:-1)*(n&&l?-1:1)),p}async function Li(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}=gi(t,e),p=Pi(f),m=o[d?u===`floating`?`reference`:`floating`:u],h=Fi(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=Fi(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 Ri=50,zi=async(e,t,n)=>{let{placement:r=`bottom`,strategy:i=`absolute`,middleware:a=[],platform:o}=n,s=o.detectOverflow?o:{...o,detectOverflow:Li},c=await(o.isRTL==null?void 0:o.isRTL(t)),l=await o.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:d}=Ii(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<Ri&&(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}=Ii(l,f,c)),n=-1)}return{x:u,y:d,placement:f,strategy:i,middlewareData:m}},Bi=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}=gi(e,t)||{};if(l==null)return{};let d=Pi(u),f={x:n,y:r},p=Si(i),m=bi(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,E=li(d[_],T),D=li(d[v],T),O=C-h[m]-D,k=C/2-h[m]/2+w,A=hi(E,k,O),j=!c.arrow&&vi(i)!=null&&k!==A&&a.reference[m]/2-(k<E?E:D)-h[m]/2<0,M=j?k<E?k-E:k-O:0;return{[p]:f[p]+M,data:{[p]:A,centerOffset:k-A-M,...j&&{alignmentOffset:M}},reset:j}}}),Vi=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}=gi(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};let g=_i(r),_=xi(o),v=_i(o)===o,y=await(s.isRTL==null?void 0:s.isRTL(c.floating)),b=d||(v||!m?[Mi(o)]:wi(o)),x=p!==`none`;!d&&x&&b.push(...ji(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=Ci(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`||_===xi(t)||T.every(e=>xi(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=xi(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 Hi(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Ui(e){return ci.some(t=>e[t]>=0)}var Wi=function(e){return e===void 0&&(e={}),{name:`hide`,options:e,async fn(t){let{rects:n,platform:r}=t,{strategy:i=`referenceHidden`,...a}=gi(e,t);switch(i){case`referenceHidden`:{let e=Hi(await r.detectOverflow(t,{...a,elementContext:`reference`}),n.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:Ui(e)}}}case`escaped`:{let e=Hi(await r.detectOverflow(t,{...a,altBoundary:!0}),n.floating);return{data:{escapedOffsets:e,escaped:Ui(e)}}}default:return{}}}}},Gi=new Set([`left`,`top`]);async function Ki(e,t){let{placement:n,platform:r,elements:i}=e,a=await(r.isRTL==null?void 0:r.isRTL(i.floating)),o=_i(n),s=vi(n),c=xi(n)===`y`,l=Gi.has(o)?-1:1,u=a&&c?-1:1,d=gi(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 Ki(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}}}}},Ji=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}=gi(e,t),u={x:n,y:r},d=await a.detectOverflow(t,l),f=xi(i),p=yi(f),m=u[p],h=u[f],g=(e,t)=>hi(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}}}}}},Yi=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}=gi(e,t),u={x:n,y:r},d=xi(i),f=yi(d),p=u[f],m=u[d],h=gi(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=Gi.has(_i(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}}}},Xi=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}=gi(e,t),c=await i.detectOverflow(t,s),l=_i(n),u=vi(n),d=xi(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=li(p-c[m],g),y=li(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*ui(c.left,c.right):S=p-2*ui(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 Zi(){return typeof window<`u`}function Qi(e){return ea(e)?(e.nodeName||``).toLowerCase():`#document`}function $(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function $i(e){return((ea(e)?e.ownerDocument:e.document)||window.document)?.documentElement}function ea(e){return Zi()?e instanceof Node||e instanceof $(e).Node:!1}function ta(e){return Zi()?e instanceof Element||e instanceof $(e).Element:!1}function na(e){return Zi()?e instanceof HTMLElement||e instanceof $(e).HTMLElement:!1}function ra(e){return!Zi()||typeof ShadowRoot>`u`?!1:e instanceof ShadowRoot||e instanceof $(e).ShadowRoot}function ia(e){let{overflow:t,overflowX:n,overflowY:r,display:i}=ha(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&i!==`inline`&&i!==`contents`}function aa(e){return/^(table|td|th)$/.test(Qi(e))}function oa(e){try{if(e.matches(`:popover-open`))return!0}catch{}try{return e.matches(`:modal`)}catch{return!1}}var sa=/transform|translate|scale|rotate|perspective|filter/,ca=/paint|layout|strict|content/,la=e=>!!e&&e!==`none`,ua;function da(e){let t=ta(e)?ha(e):e;return la(t.transform)||la(t.translate)||la(t.scale)||la(t.rotate)||la(t.perspective)||!pa()&&(la(t.backdropFilter)||la(t.filter))||sa.test(t.willChange||``)||ca.test(t.contain||``)}function fa(e){let t=_a(e);for(;na(t)&&!ma(t);){if(da(t))return t;if(oa(t))return null;t=_a(t)}return null}function pa(){return ua??=typeof CSS<`u`&&CSS.supports&&CSS.supports(`-webkit-backdrop-filter`,`none`),ua}function ma(e){return/^(html|body|#document)$/.test(Qi(e))}function ha(e){return $(e).getComputedStyle(e)}function ga(e){return ta(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function _a(e){if(Qi(e)===`html`)return e;let t=e.assignedSlot||e.parentNode||ra(e)&&e.host||$i(e);return ra(t)?t.host:t}function va(e){let t=_a(e);return ma(t)?(e.ownerDocument||e).body:na(t)&&ia(t)?t:va(t)}function ya(e,t,n){t===void 0&&(t=[]),n===void 0&&(n=!0);let r=va(e),i=r===e.ownerDocument?.body,a=$(r);if(i){let e=ba(a);return t.concat(a,a.visualViewport||[],ia(r)?r:[],e&&n?ya(e):[])}return t.concat(r,ya(r,[],n))}function ba(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function xa(e){let t=ha(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,i=na(e),a=i?e.offsetWidth:n,o=i?e.offsetHeight:r,s=di(n)!==a||di(r)!==o;return s&&(n=a,r=o),{width:n,height:r,$:s}}function Sa(e){return ta(e)?e:e.contextElement}function Ca(e){let t=Sa(e);if(!na(t))return pi(1);let n=t.getBoundingClientRect(),{width:r,height:i,$:a}=xa(t),o=(a?di(n.width):n.width)/r,s=(a?di(n.height):n.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!s||!Number.isFinite(s))&&(s=1),{x:o,y:s}}var wa=pi(0);function Ta(e){let t=$(e);return!pa()||!t.visualViewport?wa:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Ea(e,t,n){return t===void 0&&(t=!1),!!n&&t&&n===$(e)}function Da(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);let i=e.getBoundingClientRect(),a=Sa(e),o=pi(1);t&&(r?ta(r)&&(o=Ca(r)):o=Ca(e));let s=Ea(a,n,r)?Ta(a):pi(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=$(a),t=ta(r)?$(r):r,n=e,i=ba(n);for(;i&&t!==n;){let e=Ca(i),t=i.getBoundingClientRect(),r=ha(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=$(i),i=ba(n)}}return Fi({width:u,height:d,x:c,y:l})}function Oa(e,t){let n=ga(e).scrollLeft;return t?t.left+n:Da($i(e)).left+n}function ka(e,t){let n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-Oa(e,n),y:n.top+t.scrollTop}}function Aa(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e,a=i===`fixed`,o=$i(r),s=t?oa(t.floating):!1;if(r===o||s&&a)return n;let c={scrollLeft:0,scrollTop:0},l=pi(1),u=pi(0),d=na(r);if((d||!a)&&((Qi(r)!==`body`||ia(o))&&(c=ga(r)),d)){let e=Da(r);l=Ca(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}let f=o&&!d&&!a?ka(o,c):pi(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 ja(e){return e.getClientRects?Array.from(e.getClientRects()):[]}function Ma(e){let t=ga(e),n=e.ownerDocument.body,r=ui(e.scrollWidth,e.clientWidth,n.scrollWidth,n.clientWidth),i=ui(e.scrollHeight,e.clientHeight,n.scrollHeight,n.clientHeight),a=-t.scrollLeft+Oa(e),o=-t.scrollTop;return ha(n).direction===`rtl`&&(a+=ui(e.clientWidth,n.clientWidth)-r),{width:r,height:i,x:a,y:o}}var Na=25;function Pa(e,t,n){n===void 0&&(n=`viewport`);let r=n===`layoutViewport`,i=$(e),a=$i(e),o=i.visualViewport,s=a.clientWidth,c=a.clientHeight,l=0,u=0;if(o){let e=!pa()||t===`fixed`;r?e||(l=-o.offsetLeft,u=-o.offsetTop):(s=o.width,c=o.height,e&&(l=o.offsetLeft,u=o.offsetTop))}if(Oa(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<=Na&&(s-=o)}return{width:s,height:c,x:l,y:u}}function Fa(e,t){let n=Da(e,!0,t===`fixed`),r=n.top+e.clientTop,i=n.left+e.clientLeft,a=Ca(e);return{width:e.clientWidth*a.x,height:e.clientHeight*a.y,x:i*a.x,y:r*a.y}}function Ia(e,t,n){let r;if(t===`viewport`||t===`layoutViewport`)r=Pa(e,n,t);else if(t===`document`)r=Ma($i(e));else if(ta(t))r=Fa(t,n);else{let n=Ta(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return Fi(r)}function La(e,t){let n=t.get(e);if(n)return n;let r=ya(e,[],!1).filter(e=>ta(e)&&Qi(e)!==`body`),i=null,a=ha(e).position===`fixed`,o=a?_a(e):e;for(;ta(o)&&!ma(o);){let e=ha(o),t=da(o),n=i?i.position:a?`fixed`:``;!t&&(n===`fixed`||n===`absolute`&&e.position===`static`)?r=r.filter(e=>e!==o):i=e,o=_a(o)}return t.set(e,r),r}function Ra(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e,a=[...n===`clippingAncestors`?oa(t)?[]:La(t,this._c):[].concat(n),r],o=Ia(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=Ia(t,a[e],i);s=ui(n.top,s),c=li(n.right,c),l=li(n.bottom,l),u=ui(n.left,u)}return{width:c-u,height:l-s,x:u,y:s}}function za(e){let{width:t,height:n}=xa(e);return{width:t,height:n}}function Ba(e,t,n){let r=na(t),i=$i(t),a=n===`fixed`,o=Da(e,!0,a,t),s={scrollLeft:0,scrollTop:0},c=pi(0);if((r||!a)&&((Qi(t)!==`body`||ia(i))&&(s=ga(t)),r)){let e=Da(t,!0,a,t);c.x=e.x+t.clientLeft,c.y=e.y+t.clientTop}!r&&i&&(c.x=Oa(i));let l=i&&!r&&!a?ka(i,s):pi(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 Va(e){return ha(e).position===`static`}function Ha(e,t){if(!na(e)||ha(e).position===`fixed`)return null;if(t)return t(e);let n=e.offsetParent;return $i(e)===n&&(n=n.ownerDocument.body),n}function Ua(e,t){let n=$(e);if(oa(e))return n;if(!na(e)){let t=_a(e);for(;t&&!ma(t);){if(ta(t)&&!Va(t))return t;t=_a(t)}return n}let r=Ha(e,t);for(;r&&aa(r)&&Va(r);)r=Ha(r,t);return r&&ma(r)&&Va(r)&&!da(r)?n:r||fa(e)||n}var Wa=async function(e){let t=this.getOffsetParent||Ua,n=this.getDimensions,r=await n(e.floating);return{reference:Ba(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function Ga(e){return ha(e).direction===`rtl`}var Ka={convertOffsetParentRelativeRectToViewportRelativeRect:Aa,getDocumentElement:$i,getClippingRect:Ra,getOffsetParent:Ua,getElementRects:Wa,getClientRects:ja,getDimensions:za,getScale:Ca,isElement:ta,isRTL:Ga};function qa(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Ja(e,t,n){let r=null,i,a=$i(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=fi(d),h=fi(a.clientWidth-(u+f)),g=fi(a.clientHeight-(d+p)),_=fi(u),v={rootMargin:-m+`px `+-h+`px `+-g+`px `+-_+`px`,threshold:ui(0,li(1,c))||1},y=!0;function b(t){let n=t[0].intersectionRatio;if(!qa(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=$(e),l=()=>s(n);return c.addEventListener(`resize`,l),s(!0),()=>{c.removeEventListener(`resize`,l),o()}}function Ya(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=Sa(e),u=i||a?[...l?ya(l):[],...t?ya(t):[]]:[];u.forEach(e=>{i&&e.addEventListener(`scroll`,n),a&&e.addEventListener(`resize`,n)});let d=l&&s?Ja(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?Da(e):null;c&&g();function g(){let t=Da(e);h&&!qa(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 Xa=qi,Za=Ji,Qa=Vi,$a=Xi,eo=Wi,to=Bi,no=Yi,ro=(e,t,n)=>{let r=new Map,i=n??{},a={...Ka,...i.platform,_c:r};return zi(e,t,{...i,platform:a})},io=typeof document<`u`?g.useLayoutEffect:function(){};function ao(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e==`function`&&e.toString()===t.toString())return!0;let n,r,i;if(e&&t&&typeof e==`object`){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!ao(e[r],t[r]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,i[r]))return!1;for(r=n;r--!==0;){let n=i[r];if(!(n===`_owner`&&e.$$typeof)&&!ao(e[n],t[n]))return!1}return!0}return e!==e&&t!==t}function oo(e){return typeof window>`u`?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function so(e,t){let n=oo(e);return Math.round(t*n)/n}function co(e){let t=g.useRef(e);return io(()=>{t.current=e}),t}function lo(e){e===void 0&&(e={});let{placement:t=`bottom`,strategy:n=`absolute`,middleware:r=[],platform:i,elements:{reference:a,floating:o}={},transform:s=!0,whileElementsMounted:c,open:l}=e,[u,d]=g.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[f,p]=g.useState(r);ao(f,r)||p(r);let[m,h]=g.useState(null),[_,v]=g.useState(null),y=g.useCallback(e=>{e!==C.current&&(C.current=e,h(e))},[]),b=g.useCallback(e=>{e!==w.current&&(w.current=e,v(e))},[]),x=a||m,S=o||_,C=g.useRef(null),w=g.useRef(null),T=g.useRef(u),E=c!=null,D=co(c),O=co(i),k=co(l),A=g.useCallback(()=>{if(!C.current||!w.current)return;let e={placement:t,strategy:n,middleware:f};O.current&&(e.platform=O.current),ro(C.current,w.current,e).then(e=>{let t={...e,isPositioned:k.current!==!1};j.current&&!ao(T.current,t)&&(T.current=t,P.flushSync(()=>{d(t)}))})},[f,t,n,O,k]);io(()=>{l===!1&&T.current.isPositioned&&(T.current.isPositioned=!1,d(e=>({...e,isPositioned:!1})))},[l]);let j=g.useRef(!1);io(()=>(j.current=!0,()=>{j.current=!1}),[]),io(()=>{if(x&&(C.current=x),S&&(w.current=S),x&&S){if(D.current)return D.current(x,S,A);A()}},[x,S,A,D,E]);let M=g.useMemo(()=>({reference:C,floating:w,setReference:y,setFloating:b}),[y,b]),N=g.useMemo(()=>({reference:x,floating:S}),[x,S]),F=g.useMemo(()=>{let e={position:n,left:0,top:0};if(!N.floating)return e;let t=so(N.floating,u.x),r=so(N.floating,u.y);return s?{...e,transform:`translate(`+t+`px, `+r+`px)`,...oo(N.floating)>=1.5&&{willChange:`transform`}}:{position:n,left:t,top:r}},[n,s,N.floating,u.x,u.y]);return g.useMemo(()=>({...u,update:A,refs:M,elements:N,floatingStyles:F}),[u,A,M,N,F])}var uo=e=>{function t(e){return{}.hasOwnProperty.call(e,`current`)}return{name:`arrow`,options:e,fn(n){let{element:r,padding:i}=typeof e==`function`?e(n):e;return r&&t(r)?r.current==null?{}:to({element:r.current,padding:i}).fn(n):r?to({element:r,padding:i}).fn(n):{}}}},fo=(e,t)=>{let n=Xa(e);return{name:n.name,fn:n.fn,options:[e,t]}},po=(e,t)=>{let n=Za(e);return{name:n.name,fn:n.fn,options:[e,t]}},mo=(e,t)=>({fn:no(e).fn,options:[e,t]}),ho=(e,t)=>{let n=Qa(e);return{name:n.name,fn:n.fn,options:[e,t]}},go=(e,t)=>{let n=$a(e);return{name:n.name,fn:n.fn,options:[e,t]}},_o=(e,t)=>{let n=eo(e);return{name:n.name,fn:n.fn,options:[e,t]}},vo=(e,t)=>{let n=uo(e);return{name:n.name,fn:n.fn,options:[e,t]}},yo=Object.defineProperty,bo=g.forwardRef(((e,t)=>yo(e,`name`,{value:t,configurable:!0}))(function(e,t){let{children:n,width:r=10,height:i=5,...a}=e;return(0,N.jsx)(q.svg,{...a,ref:t,width:r,height:i,viewBox:`0 0 30 10`,preserveAspectRatio:`none`,children:e.asChild?n:(0,N.jsx)(`polygon`,{points:`0,0 30,0 15,10`})})},`Arrow`)),xo=Object.defineProperty,So=(e,t)=>xo(e,`name`,{value:t,configurable:!0}),Co={Partial:`partial`,Always:`always`},wo={Optimized:`optimized`,Always:`always`},To=`Popper`,[Eo,Do]=pt(To),[Oo,ko]=Eo(To),Ao=So(e=>{let{__scopePopper:t,children:n}=e,[r,i]=g.useState(null),[a,o]=g.useState(void 0);return(0,N.jsx)(Oo,{scope:t,anchor:r,onAnchorChange:i,placementState:a,setPlacementState:o,children:n})},`Popper`),jo=`PopperAnchor`,Mo=g.forwardRef(So(function(e,t){let{__scopePopper:n,virtualRef:r,...i}=e,a=ko(jo,n),o=g.useRef(null),s=a.onAnchorChange,c=W(t,g.useCallback(e=>{o.current=e,e&&s(e)},[s])),l=g.useRef(null);g.useEffect(()=>{if(!r)return;let e=l.current;l.current=r.current,e!==l.current&&s(l.current)});let u=a.placementState&&Ho(a.placementState),d=u?.[0],f=u?.[1];return r?null:(0,N.jsx)(q.div,{"data-radix-popper-side":d,"data-radix-popper-align":f,...i,ref:c})},`PopperAnchor`)),No=`PopperContent`,[Po,Fo]=Eo(No),Io=g.forwardRef(So(function(e,t){let{__scopePopper:n,side:r=`bottom`,sideOffset:i=0,align:a=`center`,alignOffset:o=0,arrowPadding:s=0,avoidCollisions:c=!0,collisionBoundary:l=[],collisionPadding:u=0,sticky:d=Co.Partial,hideWhenDetached:f=!1,updatePositionStrategy:p=wo.Optimized,onPlaced:m,...h}=e,_=ko(No,n),[v,y]=g.useState(null),b=W(t,y),[x,S]=g.useState(null),C=si(x),w=C?.width??0,T=C?.height??0,E=r+(a===`center`?``:`-`+a),D=typeof u==`number`?u:{top:0,right:0,bottom:0,left:0,...u},O=Array.isArray(l)?l:[l],k=O.length>0,A={padding:D,boundary:O.filter(Bo),altBoundary:k},{refs:j,floatingStyles:M,placement:P,isPositioned:F,middlewareData:I}=lo({strategy:`fixed`,placement:E,whileElementsMounted:So((...e)=>Ya(...e,{animationFrame:p===wo.Always}),`whileElementsMounted`),elements:{reference:_.anchor},middleware:[fo({mainAxis:i+T,alignmentAxis:o}),c&&po({mainAxis:!0,crossAxis:!1,limiter:d===Co.Partial?mo():void 0,...A}),c&&ho({...A}),go({...A,apply:So(({elements:e,rects:t,availableWidth:n,availableHeight:r})=>{let{width:i,height:a}=t.reference,o=e.floating.style;o.setProperty(`--radix-popper-available-width`,`${n}px`),o.setProperty(`--radix-popper-available-height`,`${r}px`),o.setProperty(`--radix-popper-anchor-width`,`${i}px`),o.setProperty(`--radix-popper-anchor-height`,`${a}px`)},`apply`)}),x&&vo({element:x,padding:s}),Vo({arrowWidth:w,arrowHeight:T}),f&&_o({strategy:`referenceHidden`,...A,boundary:k?A.boundary:void 0})]}),L=_.setPlacementState;X(()=>(L(P),()=>{L(void 0)}),[P,L]);let[R,z]=Ho(P),ee=Qt(m);X(()=>{F&&ee?.()},[F,ee]);let B=I.arrow?.x,te=I.arrow?.y,V=I.arrow?.centerOffset!==0,[H,ne]=g.useState();return X(()=>{v&&ne(window.getComputedStyle(v).zIndex)},[v]),(0,N.jsx)(`div`,{ref:j.setFloating,"data-radix-popper-content-wrapper":``,style:{...M,transform:F?M.transform:`translate(0, -200%)`,minWidth:`max-content`,zIndex:H,"--radix-popper-transform-origin":[I.transformOrigin?.x,I.transformOrigin?.y].join(` `),...I.hide?.referenceHidden&&{visibility:`hidden`,pointerEvents:`none`}},dir:e.dir,children:(0,N.jsx)(Po,{scope:n,placedSide:R,placedAlign:z,onArrowChange:S,arrowX:B,arrowY:te,shouldHideArrow:V,children:(0,N.jsx)(q.div,{"data-side":R,"data-align":z,...h,ref:b,style:{...h.style,animation:F?h.style?.animation:`none`}})})})},`PopperContent`)),Lo=`PopperArrow`,Ro={top:`bottom`,right:`left`,bottom:`top`,left:`right`},zo=g.forwardRef(So(function(e,t){let{__scopePopper:n,...r}=e,i=Fo(Lo,n),a=Ro[i.placedSide];return(0,N.jsx)(`span`,{ref:i.onArrowChange,style:{position:`absolute`,left:i.arrowX,top:i.arrowY,[a]:0,transformOrigin:{top:``,right:`0 0`,bottom:`center 0`,left:`100% 0`}[i.placedSide],transform:{top:`translateY(100%)`,right:`translateY(50%) rotate(90deg) translateX(-50%)`,bottom:`rotate(180deg)`,left:`translateY(50%) rotate(-90deg) translateX(50%)`}[i.placedSide],visibility:i.shouldHideArrow?`hidden`:void 0},children:(0,N.jsx)(bo,{...r,ref:t,style:{...r.style,display:`block`}})})},`PopperArrow`));function Bo(e){return e!==null}So(Bo,`isNotNull`);var Vo=So(e=>({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]=Ho(n),u={start:`0%`,center:`50%`,end:`100%`}[l],d=(i.arrow?.x??0)+o/2,f=(i.arrow?.y??0)+s/2,p=``,m=``;return c===`bottom`?(p=a?u:`${d}px`,m=`${-s}px`):c===`top`?(p=a?u:`${d}px`,m=`${r.floating.height+s}px`):c===`right`?(p=`${-s}px`,m=a?u:`${f}px`):c===`left`&&(p=`${r.floating.width+s}px`,m=a?u:`${f}px`),{data:{x:p,y:m}}}}),`transformOrigin`);function Ho(e){let[t,n=`center`]=e.split(`-`);return[t,n]}So(Ho,`getSideAndAlignFromPlacement`);var Uo=z(`group/button inline-flex shrink-0 items-center justify-center rounded-lg border border-transparent bg-clip-padding text-sm font-medium whitespace-nowrap transition-all outline-none select-none focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 active:not-aria-[haspopup]:translate-y-px disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4`,{variants:{variant:{default:`bg-primary text-primary-foreground hover:bg-primary/80`,outline:`border-border bg-background hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:border-input dark:bg-input/30 dark:hover:bg-input/50`,secondary:`bg-secondary text-secondary-foreground hover:bg-[color-mix(in_oklch,var(--secondary),var(--foreground)_5%)] aria-expanded:bg-secondary aria-expanded:text-secondary-foreground`,ghost:`hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:hover:bg-muted/50`,destructive:`bg-destructive/10 text-destructive hover:bg-destructive/20 focus-visible:border-destructive/40 focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:hover:bg-destructive/30 dark:focus-visible:ring-destructive/40`,link:`text-primary underline-offset-4 hover:underline`},size:{default:`h-8 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2`,xs:`h-6 gap-1 rounded-[min(var(--radius-md),10px)] px-2 text-xs in-data-[slot=button-group]:rounded-lg has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3`,sm:`h-7 gap-1 rounded-[min(var(--radius-md),12px)] px-2.5 text-[0.8rem] in-data-[slot=button-group]:rounded-lg has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3.5`,lg:`h-9 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2`,icon:`size-8`,"icon-xs":`size-6 rounded-[min(var(--radius-md),10px)] in-data-[slot=button-group]:rounded-lg [&_svg:not([class*='size-'])]:size-3`,"icon-sm":`size-7 rounded-[min(var(--radius-md),12px)] in-data-[slot=button-group]:rounded-lg`,"icon-lg":`size-9`}},defaultVariants:{variant:`default`,size:`default`}});function Wo({className:e,variant:t=`default`,size:n=`default`,asChild:r=!1,...i}){let a=r?Xe:`button`;return(0,N.jsx)(a,{"data-slot":`button`,"data-variant":t,"data-size":n,className:Ue(Uo({variant:t,size:n,className:e})),...i})}var Go=`cpa-console.key`,Ko={get:()=>localStorage.getItem(Go)??void 0,set:e=>localStorage.setItem(Go,e),clear:()=>localStorage.removeItem(Go)},qo=class extends Error{status;body;constructor(e,t,n){super(t),this.status=e,this.body=n}};function Jo(e,t){if(e&&typeof e==`object`){let t=e;if(t.message&&t.error)return`${t.message} (${t.error})`;if(t.message||t.error)return t.message||t.error}return typeof e==`string`&&e.trim()?e.trim():`Request failed with HTTP ${t}`}async function Yo(e,t={}){let n=new URL(e,window.location.origin);for(let[e,r]of Object.entries(t.query??{}))r!=null&&r!==``&&n.searchParams.set(e,String(r));let r={...t.headers},i=t.key??Ko.get();i&&(r.Authorization=`Bearer ${i}`);let a,o=t.body;o instanceof FormData||o instanceof Blob||typeof o==`string`?a=o:o!==void 0&&(a=JSON.stringify(o),r[`Content-Type`]=`application/json`);let s=await fetch(n,{method:t.method??(a?`POST`:`GET`),headers:r,body:a});if(t.raw&&s.ok)return s;let c=await s.text(),l=c;if(s.headers.get(`content-type`)?.includes(`json`)&&c)try{l=JSON.parse(c)}catch{}if(!s.ok)throw s.status===401&&!t.key&&(Ko.clear(),window.dispatchEvent(new Event(`cpa-console:logout`))),new qo(s.status,Jo(l,s.status),l);return l}var Xo=(e,t)=>Yo(`/v8/management${e}`,t),Zo=(e,t)=>Yo(`/console/api${e}`,t);async function Qo(e,t){let n=await(await Xo(e,{raw:!0})).blob(),r=document.createElement(`a`);r.href=URL.createObjectURL(n),r.download=t,r.click(),URL.revokeObjectURL(r.href)}export{pt as A,I as B,sn as C,jt as D,zt as E,Qe as F,d as G,A as H,qe as I,l as J,o as K,W as L,dt as M,Xe as N,X as O,Ye as P,Ue as R,on as S,Yt as T,h as U,M as V,p as W,Pn as _,Xo as a,xn as b,Ao as c,Io as d,Do as f,Bn as g,Yr as h,Qo as i,q as j,vt as k,Mo as l,ii as m,Ko as n,Wo as o,si as p,s as q,Zo as r,Uo as s,qo as t,zo as u,_n as v,Qt as w,bn as x,yn as y,z};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{G as e,H as t,J as n,N as r,R as i,W as a,n as o,o as s,r as c,z as l}from"./api-C-UxNz44.js";import{O as u,o as d,t as f}from"./common-D7NLwpzc.js";import{t as p}from"./queries-CIH8uhSE.js";import{n as m,t as h}from"./link-yq9FV5fc.js";import{n as g}from"./useMatch-BKY5ZvJq.js";import{t as _}from"./useRouter-DXJCa-Dc.js";import{t as ee}from"./useNavigate-DHxoX8xc.js";import{t as te}from"./blocks-DpV3DGhB.js";import{t as ne}from"./key-round-BLuPRdh8.js";import{t as re}from"./shield-check-Bn5iy-k9.js";import{a as ie,n as ae,o as oe,r as se,s as v,t as y}from"./dialog-C-ShosiU.js";import"./separator-Dqk6yy26.js";import{D as b,Y as x,f as S,m as C,p as w,yt as T}from"./index-uQS_KYtd.js";import"./input-Dh8dFfxy.js";import{a as E,n as ce,o as le,r as ue,t as de}from"./sheet-CMjp20qt.js";function D(e){let t=_();return m(t.stores.location,g(e,t))}var O={name:`activity`,size:24,node:[[`path`,{d:`M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2`,key:`169zse`}]]};O.node;var k=t(O),A={name:`chart-column`,size:24,node:[[`path`,{d:`M3 3v16a2 2 0 0 0 2 2h16`,key:`c24i48`}],[`path`,{d:`M18 17V9`,key:`2bz60n`}],[`path`,{d:`M13 17V5`,key:`1frdt8`}],[`path`,{d:`M8 17v-3`,key:`17ska0`}]],aliases:[`bar-chart-3`]};A.node;var j=t(A),M={name:`circle-arrow-up`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`m16 12-4-4-4 4`,key:`177agl`}],[`path`,{d:`M12 16V8`,key:`1sbj14`}]],aliases:[`arrow-up-circle`]};M.node;var N=t(M),P={name:`flask-conical`,size:24,node:[[`path`,{d:`M14 2v6a2 2 0 0 0 .245.96l5.51 10.08A2 2 0 0 1 18 22H6a2 2 0 0 1-1.755-2.96l5.51-10.08A2 2 0 0 0 10 8V2`,key:`18mbvz`}],[`path`,{d:`M6.453 15h11.094`,key:`3shlmq`}],[`path`,{d:`M8.5 2h7`,key:`csnxdl`}]]};P.node;var F=t(P),I={name:`layout-dashboard`,size:24,node:[[`rect`,{width:`7`,height:`9`,x:`3`,y:`3`,rx:`1`,key:`10lvy0`}],[`rect`,{width:`7`,height:`5`,x:`14`,y:`3`,rx:`1`,key:`16une8`}],[`rect`,{width:`7`,height:`9`,x:`14`,y:`12`,rx:`1`,key:`1hutg5`}],[`rect`,{width:`7`,height:`5`,x:`3`,y:`16`,rx:`1`,key:`ldoo1y`}]]};I.node;var L=t(I),R={name:`log-out`,size:24,node:[[`path`,{d:`m16 17 5-5-5-5`,key:`1bji2h`}],[`path`,{d:`M21 12H9`,key:`dn1m92`}],[`path`,{d:`M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4`,key:`1uf3rs`}]]};R.node;var z=t(R),B={name:`panel-left`,size:24,node:[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}],[`path`,{d:`M9 3v18`,key:`fh3hqa`}]],aliases:[`sidebar`]};B.node;var V=t(B),H={name:`settings`,size:24,node:[[`path`,{d:`M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915`,key:`1i5ecw`}],[`circle`,{cx:`12`,cy:`12`,r:`3`,key:`1v7zrd`}]]};H.node;var fe=t(H),U=a(),W=e=>Number(e.match(/-nightly\.(\d+)$/)?.[1]??NaN);function pe({version:e}){let{data:t}=u({queryKey:[`console`,`latest`],queryFn:()=>c(`/console/latest`),staleTime:18e5,retry:!1});return t&&W(t.latest)>W(t.current)?(0,U.jsxs)(y,{children:[(0,U.jsx)(v,{asChild:!0,children:(0,U.jsxs)(`button`,{className:`flex w-full items-center gap-2 rounded-md px-2 py-1 text-left text-xs text-chart-1 hover:bg-sidebar-accent group-data-[collapsible=icon]:hidden`,children:[(0,U.jsx)(N,{className:`size-3.5`}),(0,U.jsx)(`span`,{className:`flex-1`,children:`Update available`}),(0,U.jsx)(`span`,{className:`text-muted-foreground`,children:t.latest.replace(/^.*-nightly\./,`#`)})]})}),(0,U.jsxs)(ae,{children:[(0,U.jsxs)(ie,{children:[(0,U.jsx)(oe,{children:`Update CPA Console`}),(0,U.jsxs)(se,{children:[`You're on `,t.current,`; the latest nightly is `,t.latest,`.`,` `,t.service?`Run this on the server. It reinstalls the service with the latest nightly and keeps your data and CLIProxyAPI settings.`:`Stop the console, then run this on the server to start the latest nightly.`]})]}),(0,U.jsxs)(`div`,{className:`relative`,children:[(0,U.jsx)(`pre`,{className:`overflow-x-auto rounded-lg border bg-muted/40 p-3 pr-10 font-mono text-xs leading-relaxed whitespace-pre-wrap break-all`,children:t.command}),(0,U.jsx)(f,{value:t.command,className:`absolute top-1.5 right-1.5`})]})]})]}):(0,U.jsxs)(`span`,{className:`flex items-center gap-2 px-2 py-1 text-xs text-muted-foreground group-data-[collapsible=icon]:hidden`,children:[(0,U.jsx)(k,{className:`size-3.5`}),`Console `,e??``]})}var G=n(e(),1),K=768;function me(){let[e,t]=G.useState(void 0);return G.useEffect(()=>{let e=window.matchMedia(`(max-width: 767px)`),n=()=>{t(window.innerWidth<K)};return e.addEventListener(`change`,n),t(window.innerWidth<K),()=>e.removeEventListener(`change`,n)},[]),!!e}var he=`sidebar_state`,ge=604800,_e=`16rem`,ve=`18rem`,ye=`3rem`,be=`b`,q=G.createContext(null);function J(){let e=G.useContext(q);if(!e)throw Error(`useSidebar must be used within a SidebarProvider.`);return e}function xe({defaultOpen:e=!0,open:t,onOpenChange:n,className:r,style:a,children:o,...s}){let c=me(),[l,u]=G.useState(!1),[d,f]=G.useState(e),p=t??d,m=G.useCallback(e=>{let t=typeof e==`function`?e(p):e;n?n(t):f(t),document.cookie=`${he}=${t}; path=/; max-age=${ge}`},[n,p]),h=G.useCallback(()=>c?u(e=>!e):m(e=>!e),[c,m,u]);G.useEffect(()=>{let e=e=>{e.key===be&&(e.metaKey||e.ctrlKey)&&(e.preventDefault(),h())};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[h]);let g=p?`expanded`:`collapsed`,_=G.useMemo(()=>({state:g,open:p,setOpen:m,isMobile:c,openMobile:l,setOpenMobile:u,toggleSidebar:h}),[g,p,m,c,l,u,h]);return(0,U.jsx)(q.Provider,{value:_,children:(0,U.jsx)(`div`,{"data-slot":`sidebar-wrapper`,style:{"--sidebar-width":_e,"--sidebar-width-icon":ye,...a},className:i(`group/sidebar-wrapper flex min-h-svh w-full has-data-[variant=inset]:bg-sidebar`,r),...s,children:o})})}function Se({side:e=`left`,variant:t=`sidebar`,collapsible:n=`offcanvas`,className:r,children:a,dir:o,...s}){let{isMobile:c,state:l,openMobile:u,setOpenMobile:d}=J();return n===`none`?(0,U.jsx)(`div`,{"data-slot":`sidebar`,className:i(`flex h-full w-(--sidebar-width) flex-col bg-sidebar text-sidebar-foreground`,r),...s,children:a}):c?(0,U.jsx)(de,{open:u,onOpenChange:d,...s,children:(0,U.jsxs)(ce,{dir:o,"data-sidebar":`sidebar`,"data-slot":`sidebar`,"data-mobile":`true`,className:`w-(--sidebar-width) bg-sidebar p-0 text-sidebar-foreground [&>button]:hidden`,style:{"--sidebar-width":ve},side:e,children:[(0,U.jsxs)(E,{className:`sr-only`,children:[(0,U.jsx)(le,{children:`Sidebar`}),(0,U.jsx)(ue,{children:`Displays the mobile sidebar.`})]}),(0,U.jsx)(`div`,{className:`flex h-full w-full flex-col`,children:a})]})}):(0,U.jsxs)(`div`,{className:`group peer hidden text-sidebar-foreground md:block`,"data-state":l,"data-collapsible":l===`collapsed`?n:``,"data-variant":t,"data-side":e,"data-slot":`sidebar`,children:[(0,U.jsx)(`div`,{"data-slot":`sidebar-gap`,className:i(`relative w-(--sidebar-width) bg-transparent transition-[width] duration-200 ease-linear`,`group-data-[collapsible=offcanvas]:w-0`,`group-data-[side=right]:rotate-180`,t===`floating`||t===`inset`?`group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4)))]`:`group-data-[collapsible=icon]:w-(--sidebar-width-icon)`)}),(0,U.jsx)(`div`,{"data-slot":`sidebar-container`,"data-side":e,className:i(`fixed inset-y-0 z-10 hidden h-svh w-(--sidebar-width) transition-[left,right,width] duration-200 ease-linear data-[side=left]:left-0 data-[side=left]:group-data-[collapsible=offcanvas]:left-[calc(var(--sidebar-width)*-1)] data-[side=right]:right-0 data-[side=right]:group-data-[collapsible=offcanvas]:right-[calc(var(--sidebar-width)*-1)] md:flex`,t===`floating`||t===`inset`?`p-2 group-data-[collapsible=icon]:w-[calc(var(--sidebar-width-icon)+(--spacing(4))+2px)]`:`group-data-[collapsible=icon]:w-(--sidebar-width-icon) group-data-[side=left]:border-r group-data-[side=right]:border-l`,r),...s,children:(0,U.jsx)(`div`,{"data-sidebar":`sidebar`,"data-slot":`sidebar-inner`,className:`flex size-full flex-col bg-sidebar group-data-[variant=floating]:rounded-lg group-data-[variant=floating]:shadow-sm group-data-[variant=floating]:ring-1 group-data-[variant=floating]:ring-sidebar-border`,children:a})})]})}function Ce({className:e,onClick:t,...n}){let{toggleSidebar:r}=J();return(0,U.jsxs)(s,{"data-sidebar":`trigger`,"data-slot":`sidebar-trigger`,variant:`ghost`,size:`icon-sm`,className:i(e),onClick:e=>{t?.(e),r()},...n,children:[(0,U.jsx)(V,{}),(0,U.jsx)(`span`,{className:`sr-only`,children:`Toggle Sidebar`})]})}function Y({className:e,...t}){return(0,U.jsx)(`main`,{"data-slot":`sidebar-inset`,className:i(`relative flex w-full flex-1 flex-col bg-background md:peer-data-[variant=inset]:m-2 md:peer-data-[variant=inset]:ml-0 md:peer-data-[variant=inset]:rounded-xl md:peer-data-[variant=inset]:shadow-sm md:peer-data-[variant=inset]:peer-data-[state=collapsed]:ml-2`,e),...t})}function we({className:e,...t}){return(0,U.jsx)(`div`,{"data-slot":`sidebar-header`,"data-sidebar":`header`,className:i(`flex flex-col gap-2 p-2`,e),...t})}function Te({className:e,...t}){return(0,U.jsx)(`div`,{"data-slot":`sidebar-footer`,"data-sidebar":`footer`,className:i(`flex flex-col gap-2 p-2`,e),...t})}function Ee({className:e,...t}){return(0,U.jsx)(`div`,{"data-slot":`sidebar-content`,"data-sidebar":`content`,className:i(`no-scrollbar flex min-h-0 flex-1 flex-col gap-0 overflow-auto group-data-[collapsible=icon]:overflow-hidden`,e),...t})}function De({className:e,...t}){return(0,U.jsx)(`div`,{"data-slot":`sidebar-group`,"data-sidebar":`group`,className:i(`relative flex w-full min-w-0 flex-col p-2`,e),...t})}function Oe({className:e,asChild:t=!1,...n}){let a=t?r:`div`;return(0,U.jsx)(a,{"data-slot":`sidebar-group-label`,"data-sidebar":`group-label`,className:i(`flex h-8 shrink-0 items-center rounded-md px-2 text-xs font-medium text-sidebar-foreground/70 ring-sidebar-ring outline-hidden transition-[margin,opacity] duration-200 ease-linear group-data-[collapsible=icon]:-mt-8 group-data-[collapsible=icon]:opacity-0 focus-visible:ring-2 [&>svg]:size-4 [&>svg]:shrink-0`,e),...n})}function ke({className:e,...t}){return(0,U.jsx)(`div`,{"data-slot":`sidebar-group-content`,"data-sidebar":`group-content`,className:i(`w-full text-sm`,e),...t})}function X({className:e,...t}){return(0,U.jsx)(`ul`,{"data-slot":`sidebar-menu`,"data-sidebar":`menu`,className:i(`flex w-full min-w-0 flex-col gap-0`,e),...t})}function Z({className:e,...t}){return(0,U.jsx)(`li`,{"data-slot":`sidebar-menu-item`,"data-sidebar":`menu-item`,className:i(`group/menu-item relative`,e),...t})}var Ae=l(`peer/menu-button group/menu-button flex w-full items-center gap-2 overflow-hidden rounded-md p-2 text-left text-sm ring-sidebar-ring outline-hidden transition-[width,height,padding] group-has-data-[sidebar=menu-action]/menu-item:pr-8 group-data-[collapsible=icon]:size-8! group-data-[collapsible=icon]:p-2! hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:ring-2 active:bg-sidebar-accent active:text-sidebar-accent-foreground disabled:pointer-events-none disabled:opacity-50 aria-disabled:pointer-events-none aria-disabled:opacity-50 data-open:hover:bg-sidebar-accent data-open:hover:text-sidebar-accent-foreground data-active:bg-sidebar-accent data-active:font-medium data-active:text-sidebar-accent-foreground [&_svg]:size-4 [&_svg]:shrink-0 [&>span:last-child]:truncate`,{variants:{variant:{default:`hover:bg-sidebar-accent hover:text-sidebar-accent-foreground`,outline:`bg-background shadow-[0_0_0_1px_var(--sidebar-border)] hover:bg-sidebar-accent hover:text-sidebar-accent-foreground hover:shadow-[0_0_0_1px_var(--sidebar-accent)]`},size:{default:`h-8 text-sm`,sm:`h-7 text-xs`,lg:`h-12 text-sm group-data-[collapsible=icon]:p-0!`}},defaultVariants:{variant:`default`,size:`default`}});function Q({asChild:e=!1,isActive:t=!1,variant:n=`default`,size:a=`default`,tooltip:o,className:s,...c}){let l=e?r:`button`,{isMobile:u,state:d}=J(),f=(0,U.jsx)(l,{"data-slot":`sidebar-menu-button`,"data-sidebar":`menu-button`,"data-size":a,"data-active":t,className:i(Ae({variant:n,size:a}),s),...c});return o?(typeof o==`string`&&(o={children:o}),(0,U.jsxs)(S,{children:[(0,U.jsx)(C,{asChild:!0,children:f}),(0,U.jsx)(w,{side:`right`,align:`center`,hidden:d!==`collapsed`||u,...o})]})):f}var je=[{label:`Monitor`,items:[{to:`/`,label:`Overview`,icon:L},{to:`/usage`,label:`Usage`,icon:j},{to:`/logs`,label:`Logs`,icon:x}]},{label:`Manage`,items:[{to:`/credentials`,label:`Credentials`,icon:re},{to:`/providers`,label:`API providers`,icon:te},{to:`/keys`,label:`Client keys`,icon:ne},{to:`/settings`,label:`Settings`,icon:fe}]},{label:`Tools`,items:[{to:`/playground`,label:`Playground`,icon:F}]}],$={running:{label:`Running`,tone:`good`},starting:{label:`Starting`,tone:`warn`},stopping:{label:`Stopping`,tone:`warn`},stopped:{label:`Stopped`,tone:`idle`},crashed:{label:`Crashed`,tone:`bad`}};function Me(){let{data:e}=u(p.status()),t=T(),n=ee(),r=D({select:e=>e.pathname}),i=e?.process.state,a=i?$[i]:void 0;return(0,U.jsxs)(Se,{variant:`inset`,collapsible:`icon`,children:[(0,U.jsx)(we,{children:(0,U.jsx)(X,{children:(0,U.jsx)(Z,{children:(0,U.jsx)(Q,{size:`lg`,asChild:!0,children:(0,U.jsxs)(h,{to:`/`,children:[(0,U.jsx)(b,{className:`size-8 shrink-0`}),(0,U.jsxs)(`div`,{className:`grid flex-1 text-left leading-tight`,children:[(0,U.jsx)(`span`,{className:`truncate font-semibold`,children:`CPA Console`}),(0,U.jsxs)(`span`,{className:`flex items-center gap-1.5 truncate text-xs text-muted-foreground`,children:[a&&(0,U.jsx)(d,{tone:a.tone,pulse:i===`starting`}),a?`${a.label} · ${e?.cpa.version??`not installed`}`:`Connecting…`]})]})]})})})})}),(0,U.jsx)(Ee,{children:je.map(e=>(0,U.jsxs)(De,{children:[(0,U.jsx)(Oe,{children:e.label}),(0,U.jsx)(ke,{children:(0,U.jsx)(X,{children:e.items.map(e=>(0,U.jsx)(Z,{children:(0,U.jsx)(Q,{asChild:!0,tooltip:e.label,isActive:e.to===`/`?r===`/`:r.startsWith(e.to),children:(0,U.jsxs)(h,{to:e.to,children:[(0,U.jsx)(e.icon,{}),(0,U.jsx)(`span`,{children:e.label})]})})},e.to))})})]},e.label))}),(0,U.jsx)(Te,{children:(0,U.jsxs)(X,{children:[(0,U.jsx)(Z,{children:(0,U.jsxs)(Q,{tooltip:`Sign out`,onClick:()=>{o.clear(),t.clear(),n({to:`/login`})},children:[(0,U.jsx)(z,{}),(0,U.jsx)(`span`,{children:`Sign out`})]})}),(0,U.jsx)(Z,{children:(0,U.jsx)(pe,{version:e?.consoleVersion})})]})})]})}export{Ce as a,xe as i,$ as n,N as o,Y as r,Me as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{H as e}from"./api-C-UxNz44.js";var t={name:`arrow-up`,size:24,node:[[`path`,{d:`m5 12 7-7 7 7`,key:`hav0vg`}],[`path`,{d:`M12 19V5`,key:`x0mq9r`}]]};t.node;var n=e(t);export{n as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{G as e,N as t,R as n,W as r,z as i}from"./api-C-UxNz44.js";e();var a=r(),o=i(`group/badge inline-flex h-5 w-fit shrink-0 items-center justify-center gap-1 overflow-hidden rounded-4xl border border-transparent px-2 py-0.5 text-xs font-medium whitespace-nowrap transition-all focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&>svg]:pointer-events-none [&>svg]:size-3!`,{variants:{variant:{default:`bg-primary text-primary-foreground [a]:hover:bg-primary/80`,secondary:`bg-secondary text-secondary-foreground [a]:hover:bg-secondary/80`,destructive:`bg-destructive/10 text-destructive focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:focus-visible:ring-destructive/40 [a]:hover:bg-destructive/20`,outline:`border-border text-foreground [a]:hover:bg-muted [a]:hover:text-muted-foreground`,ghost:`hover:bg-muted hover:text-muted-foreground dark:hover:bg-muted/50`,link:`text-primary underline-offset-4 hover:underline`}},defaultVariants:{variant:`default`}});function s({className:e,variant:r=`default`,asChild:i=!1,...s}){let c=i?t:`span`;return(0,a.jsx)(c,{"data-slot":`badge`,"data-variant":r,className:n(o({variant:r}),e),...s})}export{s as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{H as e}from"./api-C-UxNz44.js";var t={name:`blocks`,size:24,node:[[`path`,{d:`M10 22V7a1 1 0 0 0-1-1H4a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-5a1 1 0 0 0-1-1H2`,key:`1ah6g2`}],[`rect`,{x:`14`,y:`2`,width:`8`,height:`8`,rx:`1`,key:`88lufb`}]]};t.node;var n=e(t);export{n as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{H as e}from"./api-C-UxNz44.js";var t={name:`boxes`,size:24,node:[[`path`,{d:`M2.97 12.92A2 2 0 0 0 2 14.63v3.24a2 2 0 0 0 .97 1.71l3 1.8a2 2 0 0 0 2.06 0L12 19v-5.5l-5-3-4.03 2.42Z`,key:`lc1i9w`}],[`path`,{d:`m7 16.5-4.74-2.85`,key:`1o9zyk`}],[`path`,{d:`m7 16.5 5-3`,key:`va8pkn`}],[`path`,{d:`M7 16.5v5.17`,key:`jnp8gn`}],[`path`,{d:`M12 13.5V19l3.97 2.38a2 2 0 0 0 2.06 0l3-1.8a2 2 0 0 0 .97-1.71v-3.24a2 2 0 0 0-.97-1.71L17 10.5l-5 3Z`,key:`8zsnat`}],[`path`,{d:`m17 16.5-5-3`,key:`8arw3v`}],[`path`,{d:`m17 16.5 4.74-2.85`,key:`8rfmw`}],[`path`,{d:`M17 16.5v5.17`,key:`k6z78m`}],[`path`,{d:`M7.97 4.42A2 2 0 0 0 7 6.13v4.37l5 3 5-3V6.13a2 2 0 0 0-.97-1.71l-3-1.8a2 2 0 0 0-2.06 0l-3 1.8Z`,key:`1xygjf`}],[`path`,{d:`M12 8 7.26 5.15`,key:`1vbdud`}],[`path`,{d:`m12 8 4.74-2.85`,key:`3rx089`}],[`path`,{d:`M12 13.5V8`,key:`1io7kd`}]]};t.node;var n=e(t);export{n as t};
|