omnigateway 0.2.0 → 0.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (42) hide show
  1. package/bin/omni.js +527 -228
  2. package/gateway.js +763 -401
  3. package/package.json +1 -1
  4. package/public/assets/{Chip-BB_5C1Zp.js → Chip-C4X8tf5z.js} +1 -1
  5. package/public/assets/Confirm-BnmH8Gn0.js +4 -0
  6. package/public/assets/{CopyValue-CRQDLo7k.js → CopyValue-B-uR4Js-.js} +5 -5
  7. package/public/assets/{Field-uHZxl4fI.js → Field-Ct4SeDZD.js} +2 -2
  8. package/public/assets/{Lamp-B-5SjXbG.js → Lamp-CBOwqG5K.js} +7 -7
  9. package/public/assets/{Meter-DI_BRUKt.js → Meter-COdz0dwY.js} +1 -1
  10. package/public/assets/{Modal-CI6jk2D4.js → Modal-DMFUHQ-A.js} +8 -8
  11. package/public/assets/{Rack-D1WJswv3.js → Rack-DAbY9x1I.js} +18 -18
  12. package/public/assets/{Readout-BocZ2HXP.js → Readout-Bl2kD9Tl.js} +6 -2
  13. package/public/assets/{States-Bbiu5cHE.js → States-D5Memn8D.js} +4 -4
  14. package/public/assets/{Table-CdPWxYaz.js → Table-DObRatbW.js} +1 -1
  15. package/public/assets/{Toggle-CiLC67Dw.js → Toggle-Dkjlvck5.js} +1 -1
  16. package/public/assets/{TokenBreakdown-B96iPBm9.js → TokenBreakdown-oXP49ZTa.js} +5 -2
  17. package/public/assets/_app-Brc2wQZm.js +1 -0
  18. package/public/assets/_app.accounts-I9RXUiyi.js +54 -0
  19. package/public/assets/{_app.console-Daz4aKhf.js → _app.console-BVVpryIB.js} +10 -10
  20. package/public/assets/_app.index-83Ig4FUL.js +62 -0
  21. package/public/assets/_app.keys-KeP6L4g_.js +39 -0
  22. package/public/assets/_app.logs-B5oh01Ls.js +32 -0
  23. package/public/assets/_app.models-BuOFMZUN.js +144 -0
  24. package/public/assets/{_app.settings-a0FKyQAi.js → _app.settings-BN436vI2.js} +4 -4
  25. package/public/assets/_app.usage-C528VOia.js +166 -0
  26. package/public/assets/catalog-kJ53n_fc.js +1 -0
  27. package/public/assets/{dist-C-IbPRiV.js → dist-CnzT-Ut2.js} +1 -1
  28. package/public/assets/index-CE-KQ-ju.js +172 -0
  29. package/public/assets/{login-CTvH_KAd.js → login-2LpCZOtB.js} +8 -8
  30. package/public/assets/{queries-D2o-X8Pj.js → queries-1zRLkX-Q.js} +27 -27
  31. package/public/assets/{trash-2-BcZb-sCT.js → trash-2-Da6cLgPn.js} +1 -1
  32. package/public/index.html +2 -2
  33. package/public/assets/Confirm-B6aAiVbT.js +0 -4
  34. package/public/assets/_app-BBOF6A0T.js +0 -1
  35. package/public/assets/_app.accounts-BNkhpvaB.js +0 -54
  36. package/public/assets/_app.index-LO6d38oe.js +0 -62
  37. package/public/assets/_app.keys-kBqLqoFf.js +0 -39
  38. package/public/assets/_app.logs-_wYNS47N.js +0 -32
  39. package/public/assets/_app.models-Cjng8ohC.js +0 -144
  40. package/public/assets/_app.usage-D3KtgLrC.js +0 -166
  41. package/public/assets/catalog-C_OQ0icG.js +0 -1
  42. package/public/assets/index-PW6EvVh5.js +0 -170
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "omnigateway",
3
- "version": "0.2.0",
3
+ "version": "0.2.1",
4
4
  "description": "Self-hosted AI gateway with Anthropic- and OpenAI-compatible APIs, an admin console, and a CLI",
5
5
  "license": "MIT",
6
6
  "author": "Harismawan <mail@harismawan.com>",
@@ -1,4 +1,4 @@
1
- import{G as e,Mt as t}from"./queries-D2o-X8Pj.js";var n=t(),r={neutral:{fg:`var(--ink-dim)`,bg:`transparent`},ok:{fg:`var(--ok)`,bg:`var(--ok-wash)`},warn:{fg:`var(--warn)`,bg:`var(--warn-wash)`},down:{fg:`var(--down)`,bg:`var(--down-wash)`},accent:{fg:`var(--accent)`,bg:`var(--accent-wash)`}},i=e.span`
1
+ import{K as e,Nt as t}from"./queries-1zRLkX-Q.js";var n=t(),r={neutral:{fg:`var(--ink-dim)`,bg:`transparent`},ok:{fg:`var(--ok)`,bg:`var(--ok-wash)`},warn:{fg:`var(--warn)`,bg:`var(--warn-wash)`},down:{fg:`var(--down)`,bg:`var(--down-wash)`},accent:{fg:`var(--accent)`,bg:`var(--accent-wash)`}},i=e.span`
2
2
  display: inline-flex;
3
3
  align-items: center;
4
4
  gap: 4px;
@@ -0,0 +1,4 @@
1
+ import{K as e,Nt as t,V as n}from"./queries-1zRLkX-Q.js";import{h as r}from"./Rack-DAbY9x1I.js";import{t as i}from"./Modal-DMFUHQ-A.js";var a=r(`plus`,[[`path`,{d:`M5 12h14`,key:`1ays0h`}],[`path`,{d:`M12 5v14`,key:`s699le`}]]),o=t(),s=e.p`
2
+ font-size: 13px;
3
+ color: ${({theme:e})=>e.color.inkDim};
4
+ `;function c({open:e,onOpenChange:t,title:r,body:a,confirmLabel:c,busy:l,onConfirm:u}){return(0,o.jsx)(i,{open:e,onOpenChange:t,title:r,width:`420px`,footer:(0,o.jsxs)(o.Fragment,{children:[(0,o.jsx)(n,{type:`button`,onClick:()=>t(!1),children:`Cancel`}),(0,o.jsx)(n,{type:`button`,$variant:`danger`,disabled:l===!0,onClick:u,children:c})]}),children:(0,o.jsx)(s,{children:a})})}export{a as n,c as t};
@@ -1,4 +1,4 @@
1
- import{G as e,L as t,Mt as n,Nt as r,V as i,Zt as a}from"./queries-D2o-X8Pj.js";import{h as o}from"./Rack-D1WJswv3.js";var s=o(`check`,[[`path`,{d:`M20 6 9 17l-5-5`,key:`1gmf2c`}]]),c=o(`copy`,[[`rect`,{width:`14`,height:`14`,x:`8`,y:`8`,rx:`2`,ry:`2`,key:`17jyea`}],[`path`,{d:`M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2`,key:`zix9uf`}]]),l=a(r(),1);function u(e){if(e===null||typeof getSelection!=`function`)return!1;let t=getSelection();if(t===null)return!1;try{let n=document.createRange();return n.selectNodeContents(e),t.removeAllRanges(),t.addRange(n),!0}catch{return!1}}async function d(e,t){if(typeof navigator<`u`&&navigator.clipboard!==void 0)try{return await navigator.clipboard.writeText(e),`copied`}catch{}let n=u(t??null);if(n&&typeof document.execCommand==`function`)try{if(document.execCommand(`copy`))return`copied`}catch{}return n?`selected`:`failed`}var f=n(),p=e.div`
1
+ import{H as e,K as t,Nt as n,Pt as r,Qt as i,R as a}from"./queries-1zRLkX-Q.js";import{h as o}from"./Rack-DAbY9x1I.js";var s=o(`check`,[[`path`,{d:`M20 6 9 17l-5-5`,key:`1gmf2c`}]]),c=o(`copy`,[[`rect`,{width:`14`,height:`14`,x:`8`,y:`8`,rx:`2`,ry:`2`,key:`17jyea`}],[`path`,{d:`M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2`,key:`zix9uf`}]]),l=i(r(),1);function u(e){if(e===null||typeof getSelection!=`function`)return!1;let t=getSelection();if(t===null)return!1;try{let n=document.createRange();return n.selectNodeContents(e),t.removeAllRanges(),t.addRange(n),!0}catch{return!1}}async function d(e,t){if(typeof navigator<`u`&&navigator.clipboard!==void 0)try{return await navigator.clipboard.writeText(e),`copied`}catch{}let n=u(t??null);if(n&&typeof document.execCommand==`function`)try{if(document.execCommand(`copy`))return`copied`}catch{}return n?`selected`:`failed`}var f=n(),p=t.div`
2
2
  display: flex;
3
3
  align-items: stretch;
4
4
  gap: 0;
@@ -6,7 +6,7 @@ import{G as e,L as t,Mt as n,Nt as r,V as i,Zt as a}from"./queries-D2o-X8Pj.js";
6
6
  border-radius: ${({theme:e})=>e.radius.control};
7
7
  background: ${({theme:e})=>e.color.panelSunk};
8
8
  overflow: hidden;
9
- `,m=e.code`
9
+ `,m=t.code`
10
10
  flex: 1;
11
11
  min-width: 0;
12
12
  padding: 7px 8px;
@@ -14,14 +14,14 @@ import{G as e,L as t,Mt as n,Nt as r,V as i,Zt as a}from"./queries-D2o-X8Pj.js";
14
14
  font-size: 12px;
15
15
  word-break: break-all;
16
16
  user-select: all;
17
- `,h=e(i)`
17
+ `,h=t(e)`
18
18
  border: 0;
19
19
  border-left: 1px solid ${({theme:e})=>e.color.ruleStrong};
20
20
  border-radius: 0;
21
21
  height: auto;
22
22
  width: 32px;
23
23
  flex: none;
24
- `,g=e.p`
24
+ `,g=t.p`
25
25
  font-size: 11px;
26
26
  color: ${({theme:e})=>e.color.warn};
27
- `,_={selected:`Your browser would not copy it. The value is selected — copy it with your keyboard.`,failed:`Your browser would not copy it. Select the value and copy it by hand.`};function v({value:e,label:n}){let[r,i]=(0,l.useState)(null),a=(0,l.useRef)(null);(0,l.useEffect)(()=>{if(r!==`copied`)return;let e=setTimeout(()=>i(null),1600);return()=>clearTimeout(e)},[r]);let o=(0,l.useCallback)(()=>{d(e,a.current).then(i)},[e]),u=r===`copied`,v=r===null?void 0:_[r];return(0,f.jsxs)(t,{$gap:1,children:[(0,f.jsxs)(p,{children:[(0,f.jsx)(m,{ref:a,children:e}),(0,f.jsx)(h,{type:`button`,$variant:`ghost`,onClick:o,"aria-label":u?`Copied`:n,title:u?`Copied`:n,children:u?(0,f.jsx)(s,{}):(0,f.jsx)(c,{})})]}),v===void 0?null:(0,f.jsx)(g,{role:`status`,children:v})]})}export{v as t};
27
+ `,_={selected:`Your browser would not copy it. The value is selected — copy it with your keyboard.`,failed:`Your browser would not copy it. Select the value and copy it by hand.`};function v({value:e,label:t}){let[n,r]=(0,l.useState)(null),i=(0,l.useRef)(null);(0,l.useEffect)(()=>{if(n!==`copied`)return;let e=setTimeout(()=>r(null),1600);return()=>clearTimeout(e)},[n]);let o=(0,l.useCallback)(()=>{d(e,i.current).then(r)},[e]),u=n===`copied`,v=n===null?void 0:_[n];return(0,f.jsxs)(a,{$gap:1,children:[(0,f.jsxs)(p,{children:[(0,f.jsx)(m,{ref:i,children:e}),(0,f.jsx)(h,{type:`button`,$variant:`ghost`,onClick:o,"aria-label":u?`Copied`:t,title:u?`Copied`:t,children:u?(0,f.jsx)(s,{}):(0,f.jsx)(c,{})})]}),v===void 0?null:(0,f.jsx)(g,{role:`status`,children:v})]})}export{v as t};
@@ -1,4 +1,4 @@
1
- import{G as e,Mt as t,Nt as n,Zt as r,j as i}from"./queries-D2o-X8Pj.js";var a=r(n(),1),o=t(),s=`
1
+ import{K as e,M as t,Nt as n,Pt as r,Qt as i}from"./queries-1zRLkX-Q.js";var a=i(r(),1),o=n(),s=`
2
2
  width: 100%;
3
3
  border-radius: 3px;
4
4
  transition: border-color 120ms ease;
@@ -59,7 +59,7 @@ import{G as e,Mt as t,Nt as n,Zt as r,j as i}from"./queries-D2o-X8Pj.js";var a=r
59
59
  `,f=e.p`
60
60
  font-size: 11px;
61
61
  color: ${({theme:e})=>e.color.down};
62
- `;function p({label:e,hint:t,problem:n,children:r}){let s=(0,a.useId)(),c=n===void 0?t===void 0?void 0:`${s}-hint`:`${s}-problem`;return(0,o.jsxs)(u,{children:[(0,o.jsx)(i,{as:`label`,htmlFor:s,children:e}),r({id:s,"aria-describedby":c}),n===void 0?t===void 0?null:(0,o.jsx)(d,{id:`${s}-hint`,children:t}):(0,o.jsx)(f,{id:`${s}-problem`,children:n})]})}var m=e(c).attrs({type:`number`,inputMode:`decimal`})`
62
+ `;function p({label:e,hint:n,problem:r,children:i}){let s=(0,a.useId)(),c=r===void 0?n===void 0?void 0:`${s}-hint`:`${s}-problem`;return(0,o.jsxs)(u,{children:[(0,o.jsx)(t,{as:`label`,htmlFor:s,children:e}),i({id:s,"aria-describedby":c}),r===void 0?n===void 0?null:(0,o.jsx)(d,{id:`${s}-hint`,children:n}):(0,o.jsx)(f,{id:`${s}-problem`,children:r})]})}var m=e(c).attrs({type:`number`,inputMode:`decimal`})`
63
63
  text-align: right;
64
64
  padding-right: 6px;
65
65
  `;export{l as i,c as n,m as r,p as t};
@@ -1,22 +1,22 @@
1
- import{G as e,H as t,Mt as n,W as r}from"./queries-D2o-X8Pj.js";function i(e,t){if(e.length===0)return null;let n=[...e].sort((e,t)=>e-t);return n[Math.min(n.length-1,Math.max(0,Math.ceil(t*n.length)-1))]??null}function a(e){return e.state===`pending`}function o(e){return e.filter(e=>!a(e))}function s(e){return a(e)?!1:e.status>=400||e.errorCode!==null}var c={ok:`●`,warn:`◐`,down:`○`,idle:`·`,live:`●`};function l(e){return a(e)?`live`:s(e)?`down`:`ok`}function u(e){return a(e)?`in flight`:s(e)?`failed with ${e.status}`:`succeeded`}function d(e,t){let n=o(e),r=[],a=0,c=0,l=0,u=0,d=0,f=0;for(let e of n)s(e)&&(a+=1),e.ttftMs!==null&&Number.isFinite(e.ttftMs)&&r.push(e.ttftMs),c+=e.costUsd,l+=e.inputTokens,u+=e.outputTokens,d+=e.cacheReadTokens,f+=e.cacheWriteTokens;let p=t/6e4;return{requests:n.length,errors:a,errorRate:n.length===0?0:a/n.length,ratePerMin:p<=0?0:n.length/p,ttftP50:i(r,.5),ttftP95:i(r,.95),costUsd:c,inputTokens:l,outputTokens:u,cacheReadTokens:d,cacheWriteTokens:f}}function f(e,t){let n=o(e),{now:r,spanMs:a,count:c}=t,l=a/c,u=r-a,d=Array.from({length:c},(e,t)=>({at:u+t*l,total:0,errors:0,costUsd:0,tokens:0,ttftMs:null})),f=Array.from({length:c},()=>[]);for(let e of n){if(e.at<u||e.at>r)continue;let t=Math.min(c-1,Math.floor((e.at-u)/l)),n=d[t];n!==void 0&&(n.total+=1,n.costUsd+=e.costUsd,n.tokens+=e.inputTokens+e.outputTokens+e.cacheReadTokens+e.cacheWriteTokens,s(e)&&(n.errors+=1),e.ttftMs!==null&&Number.isFinite(e.ttftMs)&&f[t]?.push(e.ttftMs))}for(let[e,t]of d.entries())t.ttftMs=i(f[e]??[],.5);return d}var p={tokenRejected:`reconnect needed — provider rejected the refresh token`,expiredNoRefresh:`reconnect needed — token expired with nothing to refresh from`};function m(e,t,n,r=null){if(!n){let e=r===`tokenRejected`||r===`expiredNoRefresh`;return{state:e?`down`:`idle`,note:e?p[r]:`disabled`,ttftMs:null,lastUsedAt:null,consecutiveFailures:0}}if(e.length===0)return{state:`idle`,note:`unused`,ttftMs:null,lastUsedAt:null,consecutiveFailures:0};let i=`ok`,a=``,o=null,s=null,c=0;for(let n of e){if(n.ewmaTtftMs!==null&&(o=o===null?n.ewmaTtftMs:Math.max(o,n.ewmaTtftMs)),n.lastUsedAt!==null&&(s=s===null?n.lastUsedAt:Math.max(s,n.lastUsedAt)),c=Math.max(c,n.consecutiveFailures),n.breakerState===`open`){i=`down`,a=`breaker open`;continue}if(n.rateLimitedUntil!==null&&n.rateLimitedUntil>t&&i!==`down`){i=`warn`,a=`rate limited`;continue}n.breakerState===`halfOpen`&&i===`ok`&&(i=`warn`,a=`probing`)}return{state:i,note:a,ttftMs:o,lastUsedAt:s,consecutiveFailures:c}}var h={fiveHour:`5h`,daily:`24h`,weekly:`7d`};function g(e){return Math.max(e,6e4)*3}function _(e,t,n){return e.observedAt<=0||t-e.observedAt>g(n)}function v(e,t,n,r){let i=h[e.windowType];return e.observedAt<=0?`${i} · never observed`:_(e,t,n)?`${i} · stale, read ${r(e.observedAt,t)}`:e.resetsAt===null?i:`${i} · resets ${r(e.resetsAt,t)}`}var y={fiveHour:0,daily:1,weekly:2};function b(e){return e.filter(e=>e.limit!==null&&e.limit>0).map(e=>({window:e,fraction:Math.min(1,e.used/e.limit)})).sort((e,t)=>y[e.window.windowType]-y[t.window.windowType])}function x(e,t){let n=new Map;for(let r of e){let e=t(r),i=n.get(e);i===void 0?n.set(e,[r]):i.push(r)}return n}var S=n(),C=t`
1
+ import{G as e,K as t,Nt as n,U as r}from"./queries-1zRLkX-Q.js";function i(e,t){if(e.length===0)return null;let n=[...e].sort((e,t)=>e-t);return n[Math.min(n.length-1,Math.max(0,Math.ceil(t*n.length)-1))]??null}function a(e){return e.state===`pending`}function o(e){return e.filter(e=>!a(e))}function s(e){return a(e)?!1:e.status>=400||e.errorCode!==null}var c={ok:`●`,warn:`◐`,down:`○`,idle:`·`,live:`●`};function l(e){return a(e)?`live`:s(e)?`down`:`ok`}function u(e){return a(e)?`in flight`:s(e)?`failed with ${e.status}`:`succeeded`}function d(e,t){let n=o(e),r=[],a=0,c=0,l=0,u=0,d=0,f=0;for(let e of n)s(e)&&(a+=1),e.ttftMs!==null&&Number.isFinite(e.ttftMs)&&r.push(e.ttftMs),c+=e.costUsd,l+=e.inputTokens,u+=e.outputTokens,d+=e.cacheReadTokens,f+=e.cacheWriteTokens;let p=t/6e4;return{requests:n.length,errors:a,errorRate:n.length===0?0:a/n.length,ratePerMin:p<=0?0:n.length/p,ttftP50:i(r,.5),ttftP95:i(r,.95),costUsd:c,inputTokens:l,outputTokens:u,cacheReadTokens:d,cacheWriteTokens:f}}function f(e,t){let n=o(e),{now:r,spanMs:a,count:c}=t,l=a/c,u=r-a,d=Array.from({length:c},(e,t)=>({at:u+t*l,total:0,errors:0,costUsd:0,tokens:0,ttftMs:null})),f=Array.from({length:c},()=>[]);for(let e of n){if(e.at<u||e.at>r)continue;let t=Math.min(c-1,Math.floor((e.at-u)/l)),n=d[t];n!==void 0&&(n.total+=1,n.costUsd+=e.costUsd,n.tokens+=e.inputTokens+e.outputTokens+e.cacheReadTokens+e.cacheWriteTokens,s(e)&&(n.errors+=1),e.ttftMs!==null&&Number.isFinite(e.ttftMs)&&f[t]?.push(e.ttftMs))}for(let[e,t]of d.entries())t.ttftMs=i(f[e]??[],.5);return d}var p={tokenRejected:`reconnect needed — provider rejected the refresh token`,expiredNoRefresh:`reconnect needed — token expired with nothing to refresh from`};function m(e,t,n,r=null){if(!n){let e=r===`tokenRejected`||r===`expiredNoRefresh`;return{state:e?`down`:`idle`,note:e?p[r]:`disabled`,ttftMs:null,lastUsedAt:null,consecutiveFailures:0}}if(e.length===0)return{state:`idle`,note:`unused`,ttftMs:null,lastUsedAt:null,consecutiveFailures:0};let i=`ok`,a=``,o=null,s=null,c=0;for(let n of e){if(n.ewmaTtftMs!==null&&(o=o===null?n.ewmaTtftMs:Math.max(o,n.ewmaTtftMs)),n.lastUsedAt!==null&&(s=s===null?n.lastUsedAt:Math.max(s,n.lastUsedAt)),c=Math.max(c,n.consecutiveFailures),n.breakerState===`open`){i=`down`,a=`breaker open`;continue}if(n.rateLimitedUntil!==null&&n.rateLimitedUntil>t&&i!==`down`){i=`warn`,a=`rate limited`;continue}n.breakerState===`halfOpen`&&i===`ok`&&(i=`warn`,a=`probing`)}return{state:i,note:a,ttftMs:o,lastUsedAt:s,consecutiveFailures:c}}var h={fiveHour:`5h`,daily:`24h`,weekly:`7d`};function g(e){return Math.max(e,6e4)*3}function _(e,t,n){return e.observedAt<=0||t-e.observedAt>g(n)}function v(e,t,n,r){let i=h[e.windowType];return e.observedAt<=0?`${i} · never observed`:_(e,t,n)?`${i} · stale, read ${r(e.observedAt,t)}`:e.resetsAt===null?i:`${i} · resets ${r(e.resetsAt,t)}`}var y={fiveHour:0,daily:1,weekly:2};function b(e){return e.filter(e=>e.limit!==null&&e.limit>0).map(e=>({window:e,fraction:Math.min(1,e.used/e.limit)})).sort((e,t)=>y[e.window.windowType]-y[t.window.windowType])}function x(e,t){let n=new Map;for(let r of e){let e=t(r),i=n.get(e);i===void 0?n.set(e,[r]):i.push(r)}return n}var S=n(),C=r`
2
2
  0%, 100% { opacity: 1; }
3
3
  50% { opacity: 0.28; }
4
- `,w=r`
4
+ `,w=e`
5
5
  color: ${({theme:e})=>e.color.ok};
6
6
  animation: ${C} 1.2s ease-in-out infinite;
7
7
 
8
8
  @media (prefers-reduced-motion: reduce) {
9
9
  animation: none;
10
10
  }
11
- `,T={ok:r`
11
+ `,T={ok:e`
12
12
  color: ${({theme:e})=>e.color.ok};
13
- `,warn:r`
13
+ `,warn:e`
14
14
  color: ${({theme:e})=>e.color.warn};
15
- `,down:r`
15
+ `,down:e`
16
16
  color: ${({theme:e})=>e.color.down};
17
- `,idle:r`
17
+ `,idle:e`
18
18
  color: ${({theme:e})=>e.color.inkFaint};
19
- `,live:w},E=e.span`
19
+ `,live:w},E=t.span`
20
20
  font-family: ${({theme:e})=>e.font.mono};
21
21
  font-size: 12px;
22
22
  line-height: 1;
@@ -1,4 +1,4 @@
1
- import{G as e,Mt as t}from"./queries-D2o-X8Pj.js";var n=t(),r=e.div`
1
+ import{K as e,Nt as t}from"./queries-1zRLkX-Q.js";var n=t(),r=e.div`
2
2
  position: relative;
3
3
  width: 100%;
4
4
  height: ${({$height:e})=>e}px;
@@ -1,4 +1,4 @@
1
- import{G as e,I as t,J as n,Mt as r,Nt as i,V as a,Zt as o,j as s}from"./queries-D2o-X8Pj.js";import{h as c}from"./Rack-D1WJswv3.js";import{a as l,c as u,i as d,n as f,o as p,r as m,s as h,t as g}from"./dist-C-IbPRiV.js";var _=c(`x`,[[`path`,{d:`M18 6 6 18`,key:`1bl5f8`}],[`path`,{d:`m6 6 12 12`,key:`d8bk6v`}]]),v=r(),ee=o(n(),1),y=o(i(),1),b=Object.defineProperty,x=(e,t)=>b(e,`name`,{value:t,configurable:!0});function S(e,t){return y.useReducer((e,n)=>t[e][n]??e,e)}x(S,`useStateMachine`);var C=x(e=>{let{present:t,children:n}=e,r=te(t),i=typeof n==`function`?n({present:r.isPresent}):y.Children.only(n),a=T(r.ref,D(i));return typeof n==`function`||r.isPresent?y.cloneElement(i,{ref:a}):null},`Presence`);function te(e){let[t,n]=y.useState(),r=y.useRef(null),i=y.useRef(e),a=y.useRef(`none`),o=y.useRef(void 0),[s,c]=S(e?`mounted`:`unmounted`,{mounted:{UNMOUNT:`unmounted`,ANIMATION_OUT:`unmountSuspended`},unmountSuspended:{MOUNT:`mounted`,ANIMATION_END:`unmounted`},unmounted:{MOUNT:`mounted`}});return y.useEffect(()=>{s===`mounted`?(a.current=o.current??E(r.current),o.current=void 0):a.current=`none`},[s]),f(()=>{let t=r.current,n=i.current;if(n!==e){let r=a.current,s=E(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]),f(()=>{if(t){let e,n=t.ownerDocument.defaultView??window,o=x(a=>{let o=E(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=x(e=>{e.target===t&&(a.current=E(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:y.useCallback(e=>{if(e){let t=getComputedStyle(e);r.current=t,o.current=E(t)}else r.current=null;n(e)},[])}}x(te,`usePresence`);function w(e,t){if(typeof e==`function`)return e(t);e!=null&&(e.current=t)}x(w,`setRef`);function T(...e){let t=y.useRef(e);return t.current=e,y.useCallback(e=>{let n=t.current,r=!1,i=n.map(t=>{let n=w(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():w(n[e],null)}}},[])}x(T,`useStableComposedRefs`);function E(e){return e?.animationName||`none`}x(E,`getAnimationName`);function D(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)}x(D,`getElementRef`);var ne=Object.defineProperty,O=(e,t)=>ne(e,`name`,{value:t,configurable:!0}),re=y.useId||(()=>void 0),ie=0;function k(e){let[t,n]=y.useState(re());return f(()=>{e||n(e=>e??String(ie++))},[e]),e||(t?`radix-${t}`:``)}O(k,`useId`);var ae=Object.defineProperty,oe=(e,t)=>ae(e,`name`,{value:t,configurable:!0});function A(e){let t=y.useRef(e);return y.useEffect(()=>{t.current=e}),y.useMemo(()=>((...e)=>t.current?.(...e)),[])}oe(A,`useCallbackRef`);var se=Object.defineProperty,j=(e,t)=>se(e,`name`,{value:t,configurable:!0}),ce=`dismissableLayer.update`,le=`dismissableLayer.pointerDownOutside`,ue=`dismissableLayer.focusOutside`,de,fe=y.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set,dismissableSurfaces:new Set}),pe=y.forwardRef(j(function(e,t){let{disableOutsidePointerEvents:n=!1,deferPointerDownOutside:r=!1,onEscapeKeyDown:i,onPointerDownOutside:a,onFocusOutside:o,onInteractOutside:s,onDismiss:c,...d}=e,f=y.useContext(fe),[p,h]=y.useState(null),g=p?.ownerDocument??globalThis?.document,[,_]=y.useState({}),ee=u(t,h),b=Array.from(f.layers),[x]=[...f.layersWithOutsidePointerEventsDisabled].slice(-1),S=x?b.indexOf(x):-1,C=p?b.indexOf(p):-1,te=f.layersWithOutsidePointerEventsDisabled.size>0,w=C>=S,T=y.useRef(!1),E=ge(e=>{a?.(e),s?.(e),e.defaultPrevented||c?.()},{ownerDocument:g,deferPointerDownOutside:r,isDeferredPointerDownOutsideRef:T,dismissableSurfaces:f.dismissableSurfaces,shouldHandlePointerDownOutside:y.useCallback(e=>{if(!(e instanceof Node))return!1;let t=[...f.branches].some(t=>t.contains(e));return w&&!t},[f.branches,w])}),D=_e(e=>{if(r&&T.current)return;let t=e.target;[...f.branches].some(e=>e.contains(t))||(o?.(e),s?.(e),e.defaultPrevented||c?.())},g),ne=p?C===b.length-1:!1,O=A(e=>{e.key===`Escape`&&(i?.(e),!e.defaultPrevented&&c&&(e.preventDefault(),c()))});return y.useEffect(()=>{if(ne)return g.addEventListener(`keydown`,O,{capture:!0}),()=>g.removeEventListener(`keydown`,O,{capture:!0})},[g,ne,O]),y.useEffect(()=>{if(p)return n&&(f.layersWithOutsidePointerEventsDisabled.size===0&&(de=g.body.style.pointerEvents,g.body.style.pointerEvents=`none`),f.layersWithOutsidePointerEventsDisabled.add(p)),f.layers.add(p),ve(),()=>{n&&(f.layersWithOutsidePointerEventsDisabled.delete(p),f.layersWithOutsidePointerEventsDisabled.size===0&&(g.body.style.pointerEvents=de))}},[p,g,n,f]),y.useEffect(()=>()=>{p&&(f.layers.delete(p),f.layersWithOutsidePointerEventsDisabled.delete(p),ve())},[p,f]),y.useEffect(()=>{let e=j(()=>_({}),`handleUpdate`);return document.addEventListener(ce,e),()=>document.removeEventListener(ce,e)},[]),(0,v.jsx)(l.div,{...d,ref:ee,style:{pointerEvents:te?w?`auto`:`none`:void 0,...e.style},onFocusCapture:m(e.onFocusCapture,D.onFocusCapture),onBlurCapture:m(e.onBlurCapture,D.onBlurCapture),onPointerDownCapture:m(e.onPointerDownCapture,E.onPointerDownCapture)})},`DismissableLayer`));function me(){let e=y.useContext(fe),[t,n]=y.useState(null);return y.useEffect(()=>{if(t)return e.dismissableSurfaces.add(t),()=>{e.dismissableSurfaces.delete(t)}},[t,e.dismissableSurfaces]),n}j(me,`useDismissableLayerSurface`);var he=j(()=>!0,`IS_TRUE`);function ge(e,t){let{ownerDocument:n=globalThis?.document,deferPointerDownOutside:r=!1,isDeferredPointerDownOutsideRef:i,dismissableSurfaces:a,shouldHandlePointerDownOutside:o=he}=t,s=A(e),c=y.useRef(!1),l=y.useRef(!1),u=y.useRef(new Map),d=y.useRef(()=>{});return y.useEffect(()=>{function e(){l.current=!1,i.current=!1,u.current.clear()}j(e,`resetOutsideInteraction`);function t(){return Array.from(u.current.values()).some(Boolean)}j(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)}j(f,`handleInteractionCapture`);function p(e){l.current&&u.current.set(e.type,!1)}j(p,`handleInteractionBubble`);let m=j(a=>{if(a.target&&!c.current){let f=function(){n.removeEventListener(`click`,d.current);let r=t();e(),r||ye(le,s,p,{discrete:!0})};if(j(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:j(()=>c.current=!0,`onPointerDownCapture`)}}j(ge,`usePointerDownOutside`);function _e(e,t=globalThis?.document){let n=A(e),r=y.useRef(!1);return y.useEffect(()=>{let e=j(e=>{e.target&&!r.current&&ye(ue,n,{originalEvent:e},{discrete:!1})},`handleFocus`);return t.addEventListener(`focusin`,e),()=>t.removeEventListener(`focusin`,e)},[t,n]),{onFocusCapture:j(()=>r.current=!0,`onFocusCapture`),onBlurCapture:j(()=>r.current=!1,`onBlurCapture`)}}j(_e,`useFocusOutside`);function ve(){let e=new CustomEvent(ce);document.dispatchEvent(e)}j(ve,`dispatchUpdate`);function ye(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?p(i,a):i.dispatchEvent(a)}j(ye,`handleAndDispatchCustomEvent`);var be=Object.defineProperty,M=(e,t)=>be(e,`name`,{value:t,configurable:!0}),xe=`focusScope.autoFocusOnMount`,Se=`focusScope.autoFocusOnUnmount`,Ce={bubbles:!1,cancelable:!0},we=y.forwardRef(M(function(e,t){let{loop:n=!1,trapped:r=!1,onMountAutoFocus:i,onUnmountAutoFocus:a,...o}=e,[s,c]=y.useState(null),d=A(i),f=A(a),p=y.useRef(null),m=u(t,c),h=y.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;y.useEffect(()=>{if(r){let e=function(e){if(h.paused||!s)return;let t=e.target;s.contains(t)?p.current=t:N(p.current,{select:!0})},t=function(e){if(h.paused||!s)return;let t=e.relatedTarget;t!==null&&(s.contains(t)||N(p.current,{select:!0}))},n=function(e){if(document.activeElement===document.body)for(let t of e)t.removedNodes.length>0&&N(s)};M(e,`handleFocusIn`),M(t,`handleFocusOut`),M(n,`handleMutations`),document.addEventListener(`focusin`,e),document.addEventListener(`focusout`,t);let r=new MutationObserver(n);return s&&r.observe(s,{childList:!0,subtree:!0}),()=>{document.removeEventListener(`focusin`,e),document.removeEventListener(`focusout`,t),r.disconnect()}}},[r,s,h.paused]),y.useEffect(()=>{if(s){je.add(h);let e=document.activeElement;if(!s.contains(e)){let t=new CustomEvent(xe,Ce);s.addEventListener(xe,d),s.dispatchEvent(t),t.defaultPrevented||(Te(Ne(De(s)),{select:!0}),document.activeElement===e&&N(s))}return()=>{s.removeEventListener(xe,d),setTimeout(()=>{let t=new CustomEvent(Se,Ce);s.addEventListener(Se,f),s.dispatchEvent(t),t.defaultPrevented||N(e??document.body,{select:!0}),s.removeEventListener(Se,f),je.remove(h)},0)}}},[s,d,f,h]);let g=y.useCallback(e=>{if(!n&&!r||h.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]=Ee(t);r&&a?!e.shiftKey&&i===a?(e.preventDefault(),n&&N(r,{select:!0})):e.shiftKey&&i===r&&(e.preventDefault(),n&&N(a,{select:!0})):i===t&&e.preventDefault()}},[n,r,h.paused]);return(0,v.jsx)(l.div,{tabIndex:-1,...o,ref:m,onKeyDown:g})},`FocusScope`));function Te(e,{select:t=!1}={}){let n=document.activeElement;for(let r of e)if(N(r,{select:t}),document.activeElement!==n)return}M(Te,`focusFirst`);function Ee(e){let t=De(e);return[Oe(t,e),Oe(t.reverse(),e)]}M(Ee,`getTabbableEdges`);function De(e){let t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:M(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}M(De,`getTabbableCandidates`);function Oe(e,t){let n=typeof t.checkVisibility==`function`&&t.checkVisibility({checkVisibilityCSS:!0});for(let r of e)if(!(n?!r.checkVisibility({checkVisibilityCSS:!0}):ke(r,{upTo:t})))return r}M(Oe,`findVisible`);function ke(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}M(ke,`isHidden`);function Ae(e){return e instanceof HTMLInputElement&&`select`in e}M(Ae,`isSelectableInput`);function N(e,{select:t=!1}={}){if(e&&e.focus){let n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&Ae(e)&&t&&e.select()}}M(N,`focus`);var je=Me();function Me(){let e=[];return{add(t){let n=e[0];t!==n&&n?.pause(),e=P(e,t),e.unshift(t)},remove(t){e=P(e,t),e[0]?.resume()}}}M(Me,`createFocusScopesStack`);function P(e,t){let n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}M(P,`arrayRemove`);function Ne(e){return e.filter(e=>e.tagName!==`A`)}M(Ne,`removeLinks`);var Pe=Object.defineProperty,Fe=y.forwardRef(((e,t)=>Pe(e,`name`,{value:t,configurable:!0}))(function(e,t){let{container:n,...r}=e,[i,a]=y.useState(!1);f(()=>a(!0),[]);let o=n||i&&globalThis?.document?.body;return o?ee.createPortal((0,v.jsx)(l.div,{...r,ref:t}),o):null},`Portal`)),Ie=Object.defineProperty,Le=(e,t)=>Ie(e,`name`,{value:t,configurable:!0}),F=0,I=null;function Re(e){return ze(),e.children}Le(Re,`FocusGuards`);function ze(){y.useEffect(()=>{I||={start:Be(),end:Be()};let{start:e,end:t}=I;return document.body.firstElementChild!==e&&document.body.insertAdjacentElement(`afterbegin`,e),document.body.lastElementChild!==t&&document.body.insertAdjacentElement(`beforeend`,t),F++,()=>{F===1&&(I?.start.remove(),I?.end.remove(),I=null),F=Math.max(0,F-1)}},[])}Le(ze,`useFocusGuards`);function Be(){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}Le(Be,`createFocusGuard`);var L=function(){return L=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},L.apply(this,arguments)};function Ve(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 He(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 R=`right-scroll-bar-position`,z=`width-before-scroll-bar`,Ue=`with-scroll-bars-hidden`,We=`--removed-body-scroll-bar-size`;function B(e,t){return typeof e==`function`?e(t):e&&(e.current=t),e}function Ge(e,t){var n=(0,y.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 Ke=typeof window<`u`?y.useLayoutEffect:y.useEffect,qe=new WeakMap;function Je(e,t){var n=Ge(t||null,function(t){return e.forEach(function(e){return B(e,t)})});return Ke(function(){var t=qe.get(n);if(t){var r=new Set(t),i=new Set(e),a=n.current;r.forEach(function(e){i.has(e)||B(e,null)}),i.forEach(function(e){r.has(e)||B(e,a)})}qe.set(n,e)},[e]),n}function Ye(e){return e}function Xe(e,t){t===void 0&&(t=Ye);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 Ze(e){e===void 0&&(e={});var t=Xe(null);return t.options=L({async:!0,ssr:!1},e),t}var Qe=function(e){var t=e.sideCar,n=Ve(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 y.createElement(r,L({},n))};Qe.isSideCarExport=!0;function $e(e,t){return e.useMedium(t),Qe}var et=Ze(),tt=function(){},V=y.forwardRef(function(e,t){var n=y.useRef(null),r=y.useState({onScrollCapture:tt,onWheelCapture:tt,onTouchMoveCapture:tt}),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,g=e.allowPinchZoom,_=e.as,v=_===void 0?`div`:_,ee=e.gapMode,b=Ve(e,[`forwardProps`,`children`,`className`,`removeScrollBar`,`enabled`,`shards`,`sideCar`,`noRelative`,`noIsolation`,`inert`,`allowPinchZoom`,`as`,`gapMode`]),x=f,S=Je([n,t]),C=L(L({},b),i);return y.createElement(y.Fragment,null,u&&y.createElement(x,{sideCar:et,removeScrollBar:l,shards:d,noRelative:p,noIsolation:m,inert:h,setCallbacks:a,allowPinchZoom:!!g,lockRef:n,gapMode:ee}),o?y.cloneElement(y.Children.only(s),L(L({},C),{ref:S})):y.createElement(v,L({},C,{className:c,ref:S}),s))});V.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},V.classNames={fullWidth:z,zeroRight:R};var nt,rt=function(){if(nt)return nt;if(typeof __webpack_nonce__<`u`)return __webpack_nonce__};function it(){if(!document)return null;var e=document.createElement(`style`);e.type=`text/css`;var t=rt();return t&&e.setAttribute(`nonce`,t),e}function at(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function ot(e){(document.head||document.getElementsByTagName(`head`)[0]).appendChild(e)}var st=function(){var e=0,t=null;return{add:function(n){e==0&&(t=it())&&(at(t,n),ot(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},ct=function(){var e=st();return function(t,n){y.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},lt=function(){var e=ct();return function(t){var n=t.styles,r=t.dynamic;return e(n,r),null}},ut={left:0,top:0,right:0,gap:0},dt=function(e){return parseInt(e||``,10)||0},ft=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[dt(n),dt(r),dt(i)]},pt=function(e){if(e===void 0&&(e=`margin`),typeof window>`u`)return ut;var t=ft(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])}},mt=lt(),H=`data-scroll-locked`,ht=function(e,t,n,r){var i=e.left,a=e.top,o=e.right,s=e.gap;return n===void 0&&(n=`margin`),`
1
+ import{H as e,K as t,L as n,M as r,Nt as i,Pt as a,Qt as o,Y as s}from"./queries-1zRLkX-Q.js";import{h as c}from"./Rack-DAbY9x1I.js";import{a as l,c as u,i as d,n as f,o as p,r as m,s as h,t as g}from"./dist-CnzT-Ut2.js";var _=c(`x`,[[`path`,{d:`M18 6 6 18`,key:`1bl5f8`}],[`path`,{d:`m6 6 12 12`,key:`d8bk6v`}]]),v=i(),ee=o(s(),1),y=o(a(),1),b=Object.defineProperty,x=(e,t)=>b(e,`name`,{value:t,configurable:!0});function S(e,t){return y.useReducer((e,n)=>t[e][n]??e,e)}x(S,`useStateMachine`);var C=x(e=>{let{present:t,children:n}=e,r=te(t),i=typeof n==`function`?n({present:r.isPresent}):y.Children.only(n),a=T(r.ref,D(i));return typeof n==`function`||r.isPresent?y.cloneElement(i,{ref:a}):null},`Presence`);function te(e){let[t,n]=y.useState(),r=y.useRef(null),i=y.useRef(e),a=y.useRef(`none`),o=y.useRef(void 0),[s,c]=S(e?`mounted`:`unmounted`,{mounted:{UNMOUNT:`unmounted`,ANIMATION_OUT:`unmountSuspended`},unmountSuspended:{MOUNT:`mounted`,ANIMATION_END:`unmounted`},unmounted:{MOUNT:`mounted`}});return y.useEffect(()=>{s===`mounted`?(a.current=o.current??E(r.current),o.current=void 0):a.current=`none`},[s]),f(()=>{let t=r.current,n=i.current;if(n!==e){let r=a.current,s=E(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]),f(()=>{if(t){let e,n=t.ownerDocument.defaultView??window,o=x(a=>{let o=E(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=x(e=>{e.target===t&&(a.current=E(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:y.useCallback(e=>{if(e){let t=getComputedStyle(e);r.current=t,o.current=E(t)}else r.current=null;n(e)},[])}}x(te,`usePresence`);function w(e,t){if(typeof e==`function`)return e(t);e!=null&&(e.current=t)}x(w,`setRef`);function T(...e){let t=y.useRef(e);return t.current=e,y.useCallback(e=>{let n=t.current,r=!1,i=n.map(t=>{let n=w(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():w(n[e],null)}}},[])}x(T,`useStableComposedRefs`);function E(e){return e?.animationName||`none`}x(E,`getAnimationName`);function D(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)}x(D,`getElementRef`);var ne=Object.defineProperty,O=(e,t)=>ne(e,`name`,{value:t,configurable:!0}),re=y.useId||(()=>void 0),ie=0;function k(e){let[t,n]=y.useState(re());return f(()=>{e||n(e=>e??String(ie++))},[e]),e||(t?`radix-${t}`:``)}O(k,`useId`);var ae=Object.defineProperty,oe=(e,t)=>ae(e,`name`,{value:t,configurable:!0});function A(e){let t=y.useRef(e);return y.useEffect(()=>{t.current=e}),y.useMemo(()=>((...e)=>t.current?.(...e)),[])}oe(A,`useCallbackRef`);var se=Object.defineProperty,j=(e,t)=>se(e,`name`,{value:t,configurable:!0}),ce=`dismissableLayer.update`,le=`dismissableLayer.pointerDownOutside`,ue=`dismissableLayer.focusOutside`,de,fe=y.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set,dismissableSurfaces:new Set}),pe=y.forwardRef(j(function(e,t){let{disableOutsidePointerEvents:n=!1,deferPointerDownOutside:r=!1,onEscapeKeyDown:i,onPointerDownOutside:a,onFocusOutside:o,onInteractOutside:s,onDismiss:c,...d}=e,f=y.useContext(fe),[p,h]=y.useState(null),g=p?.ownerDocument??globalThis?.document,[,_]=y.useState({}),ee=u(t,h),b=Array.from(f.layers),[x]=[...f.layersWithOutsidePointerEventsDisabled].slice(-1),S=x?b.indexOf(x):-1,C=p?b.indexOf(p):-1,te=f.layersWithOutsidePointerEventsDisabled.size>0,w=C>=S,T=y.useRef(!1),E=ge(e=>{a?.(e),s?.(e),e.defaultPrevented||c?.()},{ownerDocument:g,deferPointerDownOutside:r,isDeferredPointerDownOutsideRef:T,dismissableSurfaces:f.dismissableSurfaces,shouldHandlePointerDownOutside:y.useCallback(e=>{if(!(e instanceof Node))return!1;let t=[...f.branches].some(t=>t.contains(e));return w&&!t},[f.branches,w])}),D=_e(e=>{if(r&&T.current)return;let t=e.target;[...f.branches].some(e=>e.contains(t))||(o?.(e),s?.(e),e.defaultPrevented||c?.())},g),ne=p?C===b.length-1:!1,O=A(e=>{e.key===`Escape`&&(i?.(e),!e.defaultPrevented&&c&&(e.preventDefault(),c()))});return y.useEffect(()=>{if(ne)return g.addEventListener(`keydown`,O,{capture:!0}),()=>g.removeEventListener(`keydown`,O,{capture:!0})},[g,ne,O]),y.useEffect(()=>{if(p)return n&&(f.layersWithOutsidePointerEventsDisabled.size===0&&(de=g.body.style.pointerEvents,g.body.style.pointerEvents=`none`),f.layersWithOutsidePointerEventsDisabled.add(p)),f.layers.add(p),ve(),()=>{n&&(f.layersWithOutsidePointerEventsDisabled.delete(p),f.layersWithOutsidePointerEventsDisabled.size===0&&(g.body.style.pointerEvents=de))}},[p,g,n,f]),y.useEffect(()=>()=>{p&&(f.layers.delete(p),f.layersWithOutsidePointerEventsDisabled.delete(p),ve())},[p,f]),y.useEffect(()=>{let e=j(()=>_({}),`handleUpdate`);return document.addEventListener(ce,e),()=>document.removeEventListener(ce,e)},[]),(0,v.jsx)(l.div,{...d,ref:ee,style:{pointerEvents:te?w?`auto`:`none`:void 0,...e.style},onFocusCapture:m(e.onFocusCapture,D.onFocusCapture),onBlurCapture:m(e.onBlurCapture,D.onBlurCapture),onPointerDownCapture:m(e.onPointerDownCapture,E.onPointerDownCapture)})},`DismissableLayer`));function me(){let e=y.useContext(fe),[t,n]=y.useState(null);return y.useEffect(()=>{if(t)return e.dismissableSurfaces.add(t),()=>{e.dismissableSurfaces.delete(t)}},[t,e.dismissableSurfaces]),n}j(me,`useDismissableLayerSurface`);var he=j(()=>!0,`IS_TRUE`);function ge(e,t){let{ownerDocument:n=globalThis?.document,deferPointerDownOutside:r=!1,isDeferredPointerDownOutsideRef:i,dismissableSurfaces:a,shouldHandlePointerDownOutside:o=he}=t,s=A(e),c=y.useRef(!1),l=y.useRef(!1),u=y.useRef(new Map),d=y.useRef(()=>{});return y.useEffect(()=>{function e(){l.current=!1,i.current=!1,u.current.clear()}j(e,`resetOutsideInteraction`);function t(){return Array.from(u.current.values()).some(Boolean)}j(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)}j(f,`handleInteractionCapture`);function p(e){l.current&&u.current.set(e.type,!1)}j(p,`handleInteractionBubble`);let m=j(a=>{if(a.target&&!c.current){let f=function(){n.removeEventListener(`click`,d.current);let r=t();e(),r||ye(le,s,p,{discrete:!0})};if(j(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:j(()=>c.current=!0,`onPointerDownCapture`)}}j(ge,`usePointerDownOutside`);function _e(e,t=globalThis?.document){let n=A(e),r=y.useRef(!1);return y.useEffect(()=>{let e=j(e=>{e.target&&!r.current&&ye(ue,n,{originalEvent:e},{discrete:!1})},`handleFocus`);return t.addEventListener(`focusin`,e),()=>t.removeEventListener(`focusin`,e)},[t,n]),{onFocusCapture:j(()=>r.current=!0,`onFocusCapture`),onBlurCapture:j(()=>r.current=!1,`onBlurCapture`)}}j(_e,`useFocusOutside`);function ve(){let e=new CustomEvent(ce);document.dispatchEvent(e)}j(ve,`dispatchUpdate`);function ye(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?p(i,a):i.dispatchEvent(a)}j(ye,`handleAndDispatchCustomEvent`);var be=Object.defineProperty,M=(e,t)=>be(e,`name`,{value:t,configurable:!0}),xe=`focusScope.autoFocusOnMount`,Se=`focusScope.autoFocusOnUnmount`,Ce={bubbles:!1,cancelable:!0},we=y.forwardRef(M(function(e,t){let{loop:n=!1,trapped:r=!1,onMountAutoFocus:i,onUnmountAutoFocus:a,...o}=e,[s,c]=y.useState(null),d=A(i),f=A(a),p=y.useRef(null),m=u(t,c),h=y.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;y.useEffect(()=>{if(r){let e=function(e){if(h.paused||!s)return;let t=e.target;s.contains(t)?p.current=t:N(p.current,{select:!0})},t=function(e){if(h.paused||!s)return;let t=e.relatedTarget;t!==null&&(s.contains(t)||N(p.current,{select:!0}))},n=function(e){if(document.activeElement===document.body)for(let t of e)t.removedNodes.length>0&&N(s)};M(e,`handleFocusIn`),M(t,`handleFocusOut`),M(n,`handleMutations`),document.addEventListener(`focusin`,e),document.addEventListener(`focusout`,t);let r=new MutationObserver(n);return s&&r.observe(s,{childList:!0,subtree:!0}),()=>{document.removeEventListener(`focusin`,e),document.removeEventListener(`focusout`,t),r.disconnect()}}},[r,s,h.paused]),y.useEffect(()=>{if(s){je.add(h);let e=document.activeElement;if(!s.contains(e)){let t=new CustomEvent(xe,Ce);s.addEventListener(xe,d),s.dispatchEvent(t),t.defaultPrevented||(Te(Ne(De(s)),{select:!0}),document.activeElement===e&&N(s))}return()=>{s.removeEventListener(xe,d),setTimeout(()=>{let t=new CustomEvent(Se,Ce);s.addEventListener(Se,f),s.dispatchEvent(t),t.defaultPrevented||N(e??document.body,{select:!0}),s.removeEventListener(Se,f),je.remove(h)},0)}}},[s,d,f,h]);let g=y.useCallback(e=>{if(!n&&!r||h.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]=Ee(t);r&&a?!e.shiftKey&&i===a?(e.preventDefault(),n&&N(r,{select:!0})):e.shiftKey&&i===r&&(e.preventDefault(),n&&N(a,{select:!0})):i===t&&e.preventDefault()}},[n,r,h.paused]);return(0,v.jsx)(l.div,{tabIndex:-1,...o,ref:m,onKeyDown:g})},`FocusScope`));function Te(e,{select:t=!1}={}){let n=document.activeElement;for(let r of e)if(N(r,{select:t}),document.activeElement!==n)return}M(Te,`focusFirst`);function Ee(e){let t=De(e);return[Oe(t,e),Oe(t.reverse(),e)]}M(Ee,`getTabbableEdges`);function De(e){let t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:M(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}M(De,`getTabbableCandidates`);function Oe(e,t){let n=typeof t.checkVisibility==`function`&&t.checkVisibility({checkVisibilityCSS:!0});for(let r of e)if(!(n?!r.checkVisibility({checkVisibilityCSS:!0}):ke(r,{upTo:t})))return r}M(Oe,`findVisible`);function ke(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}M(ke,`isHidden`);function Ae(e){return e instanceof HTMLInputElement&&`select`in e}M(Ae,`isSelectableInput`);function N(e,{select:t=!1}={}){if(e&&e.focus){let n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&Ae(e)&&t&&e.select()}}M(N,`focus`);var je=Me();function Me(){let e=[];return{add(t){let n=e[0];t!==n&&n?.pause(),e=P(e,t),e.unshift(t)},remove(t){e=P(e,t),e[0]?.resume()}}}M(Me,`createFocusScopesStack`);function P(e,t){let n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}M(P,`arrayRemove`);function Ne(e){return e.filter(e=>e.tagName!==`A`)}M(Ne,`removeLinks`);var Pe=Object.defineProperty,Fe=y.forwardRef(((e,t)=>Pe(e,`name`,{value:t,configurable:!0}))(function(e,t){let{container:n,...r}=e,[i,a]=y.useState(!1);f(()=>a(!0),[]);let o=n||i&&globalThis?.document?.body;return o?ee.createPortal((0,v.jsx)(l.div,{...r,ref:t}),o):null},`Portal`)),Ie=Object.defineProperty,Le=(e,t)=>Ie(e,`name`,{value:t,configurable:!0}),F=0,I=null;function Re(e){return ze(),e.children}Le(Re,`FocusGuards`);function ze(){y.useEffect(()=>{I||={start:Be(),end:Be()};let{start:e,end:t}=I;return document.body.firstElementChild!==e&&document.body.insertAdjacentElement(`afterbegin`,e),document.body.lastElementChild!==t&&document.body.insertAdjacentElement(`beforeend`,t),F++,()=>{F===1&&(I?.start.remove(),I?.end.remove(),I=null),F=Math.max(0,F-1)}},[])}Le(ze,`useFocusGuards`);function Be(){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}Le(Be,`createFocusGuard`);var L=function(){return L=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},L.apply(this,arguments)};function Ve(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 He(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 R=`right-scroll-bar-position`,z=`width-before-scroll-bar`,Ue=`with-scroll-bars-hidden`,We=`--removed-body-scroll-bar-size`;function B(e,t){return typeof e==`function`?e(t):e&&(e.current=t),e}function Ge(e,t){var n=(0,y.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 Ke=typeof window<`u`?y.useLayoutEffect:y.useEffect,qe=new WeakMap;function Je(e,t){var n=Ge(t||null,function(t){return e.forEach(function(e){return B(e,t)})});return Ke(function(){var t=qe.get(n);if(t){var r=new Set(t),i=new Set(e),a=n.current;r.forEach(function(e){i.has(e)||B(e,null)}),i.forEach(function(e){r.has(e)||B(e,a)})}qe.set(n,e)},[e]),n}function Ye(e){return e}function Xe(e,t){t===void 0&&(t=Ye);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 Ze(e){e===void 0&&(e={});var t=Xe(null);return t.options=L({async:!0,ssr:!1},e),t}var Qe=function(e){var t=e.sideCar,n=Ve(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 y.createElement(r,L({},n))};Qe.isSideCarExport=!0;function $e(e,t){return e.useMedium(t),Qe}var et=Ze(),tt=function(){},V=y.forwardRef(function(e,t){var n=y.useRef(null),r=y.useState({onScrollCapture:tt,onWheelCapture:tt,onTouchMoveCapture:tt}),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,g=e.allowPinchZoom,_=e.as,v=_===void 0?`div`:_,ee=e.gapMode,b=Ve(e,[`forwardProps`,`children`,`className`,`removeScrollBar`,`enabled`,`shards`,`sideCar`,`noRelative`,`noIsolation`,`inert`,`allowPinchZoom`,`as`,`gapMode`]),x=f,S=Je([n,t]),C=L(L({},b),i);return y.createElement(y.Fragment,null,u&&y.createElement(x,{sideCar:et,removeScrollBar:l,shards:d,noRelative:p,noIsolation:m,inert:h,setCallbacks:a,allowPinchZoom:!!g,lockRef:n,gapMode:ee}),o?y.cloneElement(y.Children.only(s),L(L({},C),{ref:S})):y.createElement(v,L({},C,{className:c,ref:S}),s))});V.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},V.classNames={fullWidth:z,zeroRight:R};var nt,rt=function(){if(nt)return nt;if(typeof __webpack_nonce__<`u`)return __webpack_nonce__};function it(){if(!document)return null;var e=document.createElement(`style`);e.type=`text/css`;var t=rt();return t&&e.setAttribute(`nonce`,t),e}function at(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function ot(e){(document.head||document.getElementsByTagName(`head`)[0]).appendChild(e)}var st=function(){var e=0,t=null;return{add:function(n){e==0&&(t=it())&&(at(t,n),ot(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},ct=function(){var e=st();return function(t,n){y.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},lt=function(){var e=ct();return function(t){var n=t.styles,r=t.dynamic;return e(n,r),null}},ut={left:0,top:0,right:0,gap:0},dt=function(e){return parseInt(e||``,10)||0},ft=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[dt(n),dt(r),dt(i)]},pt=function(e){if(e===void 0&&(e=`margin`),typeof window>`u`)return ut;var t=ft(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])}},mt=lt(),H=`data-scroll-locked`,ht=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
2
  .${Ue} {
3
3
  overflow: hidden ${r};
4
4
  padding-right: ${s}px ${r};
@@ -38,13 +38,13 @@ import{G as e,I as t,J as n,Mt as r,Nt as i,V as a,Zt as o,j as s}from"./queries
38
38
  `},gt=function(){var e=parseInt(document.body.getAttribute(`data-scroll-locked`)||`0`,10);return isFinite(e)?e:0},_t=function(){y.useEffect(function(){return document.body.setAttribute(H,(gt()+1).toString()),function(){var e=gt()-1;e<=0?document.body.removeAttribute(H):document.body.setAttribute(H,e.toString())}},[])},vt=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,i=r===void 0?`margin`:r;_t();var a=y.useMemo(function(){return pt(i)},[i]);return y.createElement(mt,{styles:ht(a,!t,i,n?``:`!important`)})},yt=!1;if(typeof window<`u`)try{var U=Object.defineProperty({},"passive",{get:function(){return yt=!0,!0}});window.addEventListener(`test`,U,U),window.removeEventListener(`test`,U,U)}catch{yt=!1}var W=yt?{passive:!1}:!1,bt=function(e){return e.tagName===`TEXTAREA`},xt=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!==`hidden`&&!(n.overflowY===n.overflowX&&!bt(e)&&n[t]===`visible`)},St=function(e){return xt(e,`overflowY`)},Ct=function(e){return xt(e,`overflowX`)},wt=function(e,t){var n=t.ownerDocument,r=t;do{if(typeof ShadowRoot<`u`&&r instanceof ShadowRoot&&(r=r.host),Dt(e,r)){var i=Ot(e,r);if(i[1]>i[2])return!0}r=r.parentNode}while(r&&r!==n.body);return!1},Tt=function(e){return[e.scrollTop,e.scrollHeight,e.clientHeight]},Et=function(e){return[e.scrollLeft,e.scrollWidth,e.clientWidth]},Dt=function(e,t){return e===`v`?St(t):Ct(t)},Ot=function(e,t){return e===`v`?Tt(t):Et(t)},kt=function(e,t){return e===`h`&&t===`rtl`?-1:1},At=function(e,t,n,r,i){var a=kt(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=Ot(e,s),m=p[0],h=p[1]-p[2]-a*m;(m||h)&&Dt(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},G=function(e){return`changedTouches`in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},jt=function(e){return[e.deltaX,e.deltaY]},Mt=function(e){return e&&`current`in e?e.current:e},Nt=function(e,t){return e[0]===t[0]&&e[1]===t[1]},Pt=function(e){return`
39
39
  .block-interactivity-${e} {pointer-events: none;}
40
40
  .allow-interactivity-${e} {pointer-events: all;}
41
- `},Ft=0,K=[];function It(e){var t=y.useRef([]),n=y.useRef([0,0]),r=y.useRef(),i=y.useState(Ft++)[0],a=y.useState(lt)[0],o=y.useRef(e);y.useEffect(function(){o.current=e},[e]),y.useEffect(function(){if(e.inert){document.body.classList.add(`block-interactivity-${i}`);var t=He([e.lockRef.current],(e.shards||[]).map(Mt),!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=y.useCallback(function(e,t){if(`touches`in e&&e.touches.length===2||e.type===`wheel`&&e.ctrlKey)return!o.current.allowPinchZoom;var i=G(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=wt(d,u);if(!m)return!0;if(m?l=d:(l=d===`v`?`h`:`v`,m=wt(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 At(h,t,e,h===`h`?s:c,!0)},[]),c=y.useCallback(function(e){var n=e;if(!(!K.length||K[K.length-1]!==a)){var r=`deltaY`in n?jt(n):G(n),i=t.current.filter(function(e){return e.name===n.type&&(e.target===n.target||n.target===e.shadowParent)&&Nt(e.delta,r)})[0];if(i&&i.should){n.cancelable&&n.preventDefault();return}if(!i){var c=(o.current.shards||[]).map(Mt).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=y.useCallback(function(e,n,r,i){var a={name:e,delta:n,target:r,should:i,shadowParent:Lt(r)};t.current.push(a),setTimeout(function(){t.current=t.current.filter(function(e){return e!==a})},1)},[]),u=y.useCallback(function(e){n.current=G(e),r.current=void 0},[]),d=y.useCallback(function(t){l(t.type,jt(t),t.target,s(t,e.lockRef.current))},[]),f=y.useCallback(function(t){l(t.type,G(t),t.target,s(t,e.lockRef.current))},[]);y.useEffect(function(){return K.push(a),e.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:f}),document.addEventListener(`wheel`,c,W),document.addEventListener(`touchmove`,c,W),document.addEventListener(`touchstart`,u,W),function(){K=K.filter(function(e){return e!==a}),document.removeEventListener(`wheel`,c,W),document.removeEventListener(`touchmove`,c,W),document.removeEventListener(`touchstart`,u,W)}},[]);var p=e.removeScrollBar,m=e.inert;return y.createElement(y.Fragment,null,m?y.createElement(a,{styles:Pt(i)}):null,p?y.createElement(vt,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function Lt(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}var Rt=$e(et,It),zt=y.forwardRef(function(e,t){return y.createElement(V,L({},e,{ref:t,sideCar:Rt}))});zt.classNames=V.classNames;var Bt=function(e){return typeof document>`u`?null:(Array.isArray(e)?e[0]:e).ownerDocument.body},q=new WeakMap,J=new WeakMap,Y={},Vt=0,Ht=function(e){return e&&(e.host||Ht(e.parentNode))},Ut=function(e,t){return t.map(function(t){if(e.contains(t))return t;var n=Ht(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})},Wt=function(e,t,n,r){var i=Ut(t,Array.isArray(e)?e:[e]);Y[n]||(Y[n]=new WeakMap);var a=Y[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=(q.get(e)||0)+1,l=(a.get(e)||0)+1;q.set(e,c),a.set(e,l),o.push(e),c===1&&i&&J.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(),Vt++,function(){o.forEach(function(e){var t=q.get(e)-1,i=a.get(e)-1;q.set(e,t),a.set(e,i),t||(J.has(e)||e.removeAttribute(r),J.delete(e)),i||e.removeAttribute(n)}),Vt--,Vt||(q=new WeakMap,q=new WeakMap,J=new WeakMap,Y={})}},Gt=function(e,t,n){n===void 0&&(n=`data-aria-hidden`);var r=Array.from(Array.isArray(e)?e:[e]),i=t||Bt(e);return i?(r.push.apply(r,Array.from(i.querySelectorAll(`[aria-live], script`))),Wt(r,i,n,`aria-hidden`)):function(){return null}},Kt=Object.defineProperty,X=(e,t)=>Kt(e,`name`,{value:t,configurable:!0}),qt=`Dialog`,[Jt,Yt]=d(qt),[Xt,Z]=Jt(qt),Zt=X(e=>{let{__scopeDialog:t,children:n,open:r,defaultOpen:i,onOpenChange:a,modal:o=!0}=e,s=y.useRef(null),c=y.useRef(null),[l,u]=g({prop:r,defaultProp:i??!1,onChange:a,caller:qt}),[d,f]=y.useState(0),[p,m]=y.useState(0);return(0,v.jsx)(Xt,{scope:t,triggerRef:s,contentRef:c,contentId:k(),titleId:k(),descriptionId:k(),titlePresent:d>0,descriptionPresent:p>0,setTitleCount:f,setDescriptionCount:m,open:l,onOpenChange:u,onOpenToggle:y.useCallback(()=>u(e=>!e),[u]),modal:o,children:n})},`Dialog`),Qt=`DialogPortal`,[$t,en]=Jt(Qt,{forceMount:void 0}),tn=X(e=>{let{__scopeDialog:t,forceMount:n,children:r,container:i}=e,a=Z(Qt,t);return(0,v.jsx)($t,{scope:t,forceMount:n,children:y.Children.map(r,e=>(0,v.jsx)(C,{present:n||a.open,children:(0,v.jsx)(Fe,{asChild:!0,container:i,children:e})}))})},`DialogPortal`),nn=`DialogOverlay`,rn=y.forwardRef(X(function(e,t){let n=en(nn,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,a=Z(nn,e.__scopeDialog);return a.modal?(0,v.jsx)(C,{present:r||a.open,children:(0,v.jsx)(on,{...i,ref:t})}):null},`DialogOverlay`)),an=h(`DialogOverlay.RemoveScroll`),on=y.forwardRef(X(function(e,t){let{__scopeDialog:n,...r}=e,i=Z(nn,n),a=me(),o=u(t,a);return(0,v.jsx)(zt,{as:an,allowPinchZoom:!0,shards:[i.contentRef],children:(0,v.jsx)(l.div,{"data-state":$(i.open),...r,ref:o,style:{pointerEvents:`auto`,...r.style}})})},`DialogOverlayImpl`)),Q=`DialogContent`,sn=y.forwardRef(X(function(e,t){let n=en(Q,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,a=Z(Q,e.__scopeDialog);return(0,v.jsx)(C,{present:r||a.open,children:a.modal?(0,v.jsx)(cn,{...i,ref:t}):(0,v.jsx)(ln,{...i,ref:t})})},`DialogContent`)),cn=y.forwardRef(X(function(e,t){let n=Z(Q,e.__scopeDialog),r=y.useRef(null),i=u(t,n.contentRef,r);return y.useEffect(()=>{let e=r.current;if(e)return Gt(e)},[]),(0,v.jsx)(un,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:n.open,onCloseAutoFocus:m(e.onCloseAutoFocus,e=>{e.preventDefault(),n.triggerRef.current?.focus()}),onPointerDownOutside:m(e.onPointerDownOutside,e=>{let t=e.detail.originalEvent,n=t.button===0&&t.ctrlKey===!0;(t.button===2||n)&&e.preventDefault()}),onFocusOutside:m(e.onFocusOutside,e=>e.preventDefault())})},`DialogContentModal`)),ln=y.forwardRef(X(function(e,t){let n=Z(Q,e.__scopeDialog),r=y.useRef(!1),i=y.useRef(!1);return(0,v.jsx)(un,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:t=>{e.onCloseAutoFocus?.(t),t.defaultPrevented||(r.current||n.triggerRef.current?.focus(),t.preventDefault()),r.current=!1,i.current=!1},onInteractOutside:t=>{e.onInteractOutside?.(t),t.defaultPrevented||(r.current=!0,t.detail.originalEvent.type===`pointerdown`&&(i.current=!0));let a=t.target;n.triggerRef.current?.contains(a)&&t.preventDefault(),t.detail.originalEvent.type===`focusin`&&i.current&&t.preventDefault()}})},`DialogContentNonModal`)),un=y.forwardRef(X(function(e,t){let{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:a,...o}=e,s=Z(Q,n);return ze(),(0,v.jsx)(v.Fragment,{children:(0,v.jsx)(we,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:i,onUnmountAutoFocus:a,children:(0,v.jsx)(pe,{role:`dialog`,id:s.contentId,"aria-describedby":s.descriptionPresent?s.descriptionId:void 0,"aria-labelledby":s.titlePresent?s.titleId:void 0,"data-state":$(s.open),...o,ref:t,deferPointerDownOutside:!0,onDismiss:()=>s.onOpenChange(!1)})})})},`DialogContentImpl`)),dn=`DialogTitle`,fn=y.forwardRef(X(function(e,t){let{__scopeDialog:n,...r}=e,i=Z(dn,n),{setTitleCount:a}=i;return f(()=>(a(e=>e+1),()=>a(e=>e-1)),[a]),(0,v.jsx)(l.h2,{id:i.titleId,...r,ref:t})},`DialogTitle`)),pn=`DialogDescription`,mn=y.forwardRef(X(function(e,t){let{__scopeDialog:n,...r}=e,i=Z(pn,n),{setDescriptionCount:a}=i;return f(()=>(a(e=>e+1),()=>a(e=>e-1)),[a]),(0,v.jsx)(l.p,{id:i.descriptionId,...r,ref:t})},`DialogDescription`)),hn=`DialogClose`,gn=y.forwardRef(X(function(e,t){let{__scopeDialog:n,...r}=e,i=Z(hn,n);return(0,v.jsx)(l.button,{type:`button`,...r,ref:t,onClick:m(e.onClick,()=>i.onOpenChange(!1))})},`DialogClose`));function $(e){return e?`open`:`closed`}X($,`getState`);var _n=e(rn)`
41
+ `},Ft=0,K=[];function It(e){var t=y.useRef([]),n=y.useRef([0,0]),r=y.useRef(),i=y.useState(Ft++)[0],a=y.useState(lt)[0],o=y.useRef(e);y.useEffect(function(){o.current=e},[e]),y.useEffect(function(){if(e.inert){document.body.classList.add(`block-interactivity-${i}`);var t=He([e.lockRef.current],(e.shards||[]).map(Mt),!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=y.useCallback(function(e,t){if(`touches`in e&&e.touches.length===2||e.type===`wheel`&&e.ctrlKey)return!o.current.allowPinchZoom;var i=G(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=wt(d,u);if(!m)return!0;if(m?l=d:(l=d===`v`?`h`:`v`,m=wt(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 At(h,t,e,h===`h`?s:c,!0)},[]),c=y.useCallback(function(e){var n=e;if(!(!K.length||K[K.length-1]!==a)){var r=`deltaY`in n?jt(n):G(n),i=t.current.filter(function(e){return e.name===n.type&&(e.target===n.target||n.target===e.shadowParent)&&Nt(e.delta,r)})[0];if(i&&i.should){n.cancelable&&n.preventDefault();return}if(!i){var c=(o.current.shards||[]).map(Mt).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=y.useCallback(function(e,n,r,i){var a={name:e,delta:n,target:r,should:i,shadowParent:Lt(r)};t.current.push(a),setTimeout(function(){t.current=t.current.filter(function(e){return e!==a})},1)},[]),u=y.useCallback(function(e){n.current=G(e),r.current=void 0},[]),d=y.useCallback(function(t){l(t.type,jt(t),t.target,s(t,e.lockRef.current))},[]),f=y.useCallback(function(t){l(t.type,G(t),t.target,s(t,e.lockRef.current))},[]);y.useEffect(function(){return K.push(a),e.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:f}),document.addEventListener(`wheel`,c,W),document.addEventListener(`touchmove`,c,W),document.addEventListener(`touchstart`,u,W),function(){K=K.filter(function(e){return e!==a}),document.removeEventListener(`wheel`,c,W),document.removeEventListener(`touchmove`,c,W),document.removeEventListener(`touchstart`,u,W)}},[]);var p=e.removeScrollBar,m=e.inert;return y.createElement(y.Fragment,null,m?y.createElement(a,{styles:Pt(i)}):null,p?y.createElement(vt,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function Lt(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}var Rt=$e(et,It),zt=y.forwardRef(function(e,t){return y.createElement(V,L({},e,{ref:t,sideCar:Rt}))});zt.classNames=V.classNames;var Bt=function(e){return typeof document>`u`?null:(Array.isArray(e)?e[0]:e).ownerDocument.body},q=new WeakMap,J=new WeakMap,Y={},Vt=0,Ht=function(e){return e&&(e.host||Ht(e.parentNode))},Ut=function(e,t){return t.map(function(t){if(e.contains(t))return t;var n=Ht(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})},Wt=function(e,t,n,r){var i=Ut(t,Array.isArray(e)?e:[e]);Y[n]||(Y[n]=new WeakMap);var a=Y[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=(q.get(e)||0)+1,l=(a.get(e)||0)+1;q.set(e,c),a.set(e,l),o.push(e),c===1&&i&&J.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(),Vt++,function(){o.forEach(function(e){var t=q.get(e)-1,i=a.get(e)-1;q.set(e,t),a.set(e,i),t||(J.has(e)||e.removeAttribute(r),J.delete(e)),i||e.removeAttribute(n)}),Vt--,Vt||(q=new WeakMap,q=new WeakMap,J=new WeakMap,Y={})}},Gt=function(e,t,n){n===void 0&&(n=`data-aria-hidden`);var r=Array.from(Array.isArray(e)?e:[e]),i=t||Bt(e);return i?(r.push.apply(r,Array.from(i.querySelectorAll(`[aria-live], script`))),Wt(r,i,n,`aria-hidden`)):function(){return null}},Kt=Object.defineProperty,X=(e,t)=>Kt(e,`name`,{value:t,configurable:!0}),qt=`Dialog`,[Jt,Yt]=d(qt),[Xt,Z]=Jt(qt),Zt=X(e=>{let{__scopeDialog:t,children:n,open:r,defaultOpen:i,onOpenChange:a,modal:o=!0}=e,s=y.useRef(null),c=y.useRef(null),[l,u]=g({prop:r,defaultProp:i??!1,onChange:a,caller:qt}),[d,f]=y.useState(0),[p,m]=y.useState(0);return(0,v.jsx)(Xt,{scope:t,triggerRef:s,contentRef:c,contentId:k(),titleId:k(),descriptionId:k(),titlePresent:d>0,descriptionPresent:p>0,setTitleCount:f,setDescriptionCount:m,open:l,onOpenChange:u,onOpenToggle:y.useCallback(()=>u(e=>!e),[u]),modal:o,children:n})},`Dialog`),Qt=`DialogPortal`,[$t,en]=Jt(Qt,{forceMount:void 0}),tn=X(e=>{let{__scopeDialog:t,forceMount:n,children:r,container:i}=e,a=Z(Qt,t);return(0,v.jsx)($t,{scope:t,forceMount:n,children:y.Children.map(r,e=>(0,v.jsx)(C,{present:n||a.open,children:(0,v.jsx)(Fe,{asChild:!0,container:i,children:e})}))})},`DialogPortal`),nn=`DialogOverlay`,rn=y.forwardRef(X(function(e,t){let n=en(nn,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,a=Z(nn,e.__scopeDialog);return a.modal?(0,v.jsx)(C,{present:r||a.open,children:(0,v.jsx)(on,{...i,ref:t})}):null},`DialogOverlay`)),an=h(`DialogOverlay.RemoveScroll`),on=y.forwardRef(X(function(e,t){let{__scopeDialog:n,...r}=e,i=Z(nn,n),a=me(),o=u(t,a);return(0,v.jsx)(zt,{as:an,allowPinchZoom:!0,shards:[i.contentRef],children:(0,v.jsx)(l.div,{"data-state":$(i.open),...r,ref:o,style:{pointerEvents:`auto`,...r.style}})})},`DialogOverlayImpl`)),Q=`DialogContent`,sn=y.forwardRef(X(function(e,t){let n=en(Q,e.__scopeDialog),{forceMount:r=n.forceMount,...i}=e,a=Z(Q,e.__scopeDialog);return(0,v.jsx)(C,{present:r||a.open,children:a.modal?(0,v.jsx)(cn,{...i,ref:t}):(0,v.jsx)(ln,{...i,ref:t})})},`DialogContent`)),cn=y.forwardRef(X(function(e,t){let n=Z(Q,e.__scopeDialog),r=y.useRef(null),i=u(t,n.contentRef,r);return y.useEffect(()=>{let e=r.current;if(e)return Gt(e)},[]),(0,v.jsx)(un,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:n.open,onCloseAutoFocus:m(e.onCloseAutoFocus,e=>{e.preventDefault(),n.triggerRef.current?.focus()}),onPointerDownOutside:m(e.onPointerDownOutside,e=>{let t=e.detail.originalEvent,n=t.button===0&&t.ctrlKey===!0;(t.button===2||n)&&e.preventDefault()}),onFocusOutside:m(e.onFocusOutside,e=>e.preventDefault())})},`DialogContentModal`)),ln=y.forwardRef(X(function(e,t){let n=Z(Q,e.__scopeDialog),r=y.useRef(!1),i=y.useRef(!1);return(0,v.jsx)(un,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:t=>{e.onCloseAutoFocus?.(t),t.defaultPrevented||(r.current||n.triggerRef.current?.focus(),t.preventDefault()),r.current=!1,i.current=!1},onInteractOutside:t=>{e.onInteractOutside?.(t),t.defaultPrevented||(r.current=!0,t.detail.originalEvent.type===`pointerdown`&&(i.current=!0));let a=t.target;n.triggerRef.current?.contains(a)&&t.preventDefault(),t.detail.originalEvent.type===`focusin`&&i.current&&t.preventDefault()}})},`DialogContentNonModal`)),un=y.forwardRef(X(function(e,t){let{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:i,onCloseAutoFocus:a,...o}=e,s=Z(Q,n);return ze(),(0,v.jsx)(v.Fragment,{children:(0,v.jsx)(we,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:i,onUnmountAutoFocus:a,children:(0,v.jsx)(pe,{role:`dialog`,id:s.contentId,"aria-describedby":s.descriptionPresent?s.descriptionId:void 0,"aria-labelledby":s.titlePresent?s.titleId:void 0,"data-state":$(s.open),...o,ref:t,deferPointerDownOutside:!0,onDismiss:()=>s.onOpenChange(!1)})})})},`DialogContentImpl`)),dn=`DialogTitle`,fn=y.forwardRef(X(function(e,t){let{__scopeDialog:n,...r}=e,i=Z(dn,n),{setTitleCount:a}=i;return f(()=>(a(e=>e+1),()=>a(e=>e-1)),[a]),(0,v.jsx)(l.h2,{id:i.titleId,...r,ref:t})},`DialogTitle`)),pn=`DialogDescription`,mn=y.forwardRef(X(function(e,t){let{__scopeDialog:n,...r}=e,i=Z(pn,n),{setDescriptionCount:a}=i;return f(()=>(a(e=>e+1),()=>a(e=>e-1)),[a]),(0,v.jsx)(l.p,{id:i.descriptionId,...r,ref:t})},`DialogDescription`)),hn=`DialogClose`,gn=y.forwardRef(X(function(e,t){let{__scopeDialog:n,...r}=e,i=Z(hn,n);return(0,v.jsx)(l.button,{type:`button`,...r,ref:t,onClick:m(e.onClick,()=>i.onOpenChange(!1))})},`DialogClose`));function $(e){return e?`open`:`closed`}X($,`getState`);var _n=t(rn)`
42
42
  position: fixed;
43
43
  inset: 0;
44
44
  z-index: ${({theme:e})=>e.z.overlay};
45
45
  background: oklch(0 0 0 / 0.5);
46
46
  backdrop-filter: blur(2px);
47
- `,vn=e(sn)`
47
+ `,vn=t(sn)`
48
48
  position: fixed;
49
49
  z-index: ${({theme:e})=>e.z.dialog};
50
50
  top: 50%;
@@ -58,25 +58,25 @@ import{G as e,I as t,J as n,Mt as r,Nt as i,V as a,Zt as o,j as s}from"./queries
58
58
  border: 1px solid ${({theme:e})=>e.color.ruleStrong};
59
59
  border-radius: ${({theme:e})=>e.radius.panel};
60
60
  box-shadow: 0 12px 40px oklch(0 0 0 / 0.35);
61
- `,yn=e.div`
61
+ `,yn=t.div`
62
62
  display: flex;
63
63
  align-items: center;
64
64
  gap: ${({theme:e})=>e.space(2)};
65
65
  padding: ${({theme:e})=>`${e.space(2)} ${e.space(2)} ${e.space(2)} ${e.space(3)}`};
66
66
  border-bottom: 1px solid ${({theme:e})=>e.color.rule};
67
67
  background: ${({theme:e})=>e.color.panelSunk};
68
- `,bn=e.div`
68
+ `,bn=t.div`
69
69
  padding: ${({theme:e})=>e.space(3)};
70
70
  overflow-y: auto;
71
- `,xn=e.div`
71
+ `,xn=t.div`
72
72
  display: flex;
73
73
  justify-content: flex-end;
74
74
  gap: ${({theme:e})=>e.space(2)};
75
75
  padding: ${({theme:e})=>`${e.space(2)} ${e.space(3)}`};
76
76
  border-top: 1px solid ${({theme:e})=>e.color.rule};
77
77
  background: ${({theme:e})=>e.color.panelSunk};
78
- `,Sn=e(mn)`
78
+ `,Sn=t(mn)`
79
79
  margin: 0 0 ${({theme:e})=>e.space(3)};
80
80
  font-size: 12px;
81
81
  color: ${({theme:e})=>e.color.inkDim};
82
- `;function Cn({open:e,onOpenChange:n,title:r,description:i,footer:o,width:c=`560px`,children:l}){return(0,v.jsx)(Zt,{open:e,onOpenChange:n,children:(0,v.jsxs)(tn,{children:[(0,v.jsx)(_n,{}),(0,v.jsxs)(vn,{$width:c,children:[(0,v.jsxs)(yn,{children:[(0,v.jsx)(fn,{asChild:!0,children:(0,v.jsx)(s,{as:`h2`,children:r})}),(0,v.jsx)(t,{}),(0,v.jsx)(gn,{asChild:!0,children:(0,v.jsx)(a,{type:`button`,$variant:`ghost`,$size:`sm`,"aria-label":`Close`,children:(0,v.jsx)(_,{})})})]}),(0,v.jsxs)(bn,{children:[i===void 0?null:(0,v.jsx)(Sn,{children:i}),l]}),o===void 0?null:(0,v.jsx)(xn,{children:o})]})]})})}export{Cn as t};
82
+ `;function Cn({open:t,onOpenChange:i,title:a,description:o,footer:s,width:c=`560px`,children:l}){return(0,v.jsx)(Zt,{open:t,onOpenChange:i,children:(0,v.jsxs)(tn,{children:[(0,v.jsx)(_n,{}),(0,v.jsxs)(vn,{$width:c,children:[(0,v.jsxs)(yn,{children:[(0,v.jsx)(fn,{asChild:!0,children:(0,v.jsx)(r,{as:`h2`,children:a})}),(0,v.jsx)(n,{}),(0,v.jsx)(gn,{asChild:!0,children:(0,v.jsx)(e,{type:`button`,$variant:`ghost`,$size:`sm`,"aria-label":`Close`,children:(0,v.jsx)(_,{})})})]}),(0,v.jsxs)(bn,{children:[o===void 0?null:(0,v.jsx)(Sn,{children:o}),l]}),s===void 0?null:(0,v.jsx)(xn,{children:s})]})]})})}export{Cn as t};
@@ -1,9 +1,9 @@
1
- import{B as e,G as t,I as n,M as r,Mt as i,Nt as a,P as o,V as s,Y as c,Zt as l,_ as u,j as d,q as f,v as p,z as m}from"./queries-D2o-X8Pj.js";import{t as h}from"./index-PW6EvVh5.js";import{f as g,r as _,t as v}from"./Lamp-B-5SjXbG.js";var y=l(a(),1),b=(...e)=>e.filter((e,t,n)=>!!e&&e.trim()!==``&&n.indexOf(e)===t).join(` `).trim(),x=e=>e.replace(/([a-z0-9])([A-Z])/g,`$1-$2`).toLowerCase(),S=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,t,n)=>n?n.toUpperCase():t.toLowerCase()),C=e=>{let t=S(e);return t.charAt(0).toUpperCase()+t.slice(1)},w={xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:2,strokeLinecap:`round`,strokeLinejoin:`round`},T=e=>{for(let t in e)if(t.startsWith(`aria-`)||t===`role`||t===`title`)return!0;return!1},E=(0,y.createContext)({}),D=()=>(0,y.useContext)(E),O=(0,y.forwardRef)(({color:e,size:t,strokeWidth:n,absoluteStrokeWidth:r,className:i=``,children:a,iconNode:o,...s},c)=>{let{size:l=24,strokeWidth:u=2,absoluteStrokeWidth:d=!1,color:f=`currentColor`,className:p=``}=D()??{},m=r??d?Number(n??u)*24/Number(t??l):n??u;return(0,y.createElement)(`svg`,{ref:c,...w,width:t??l??w.width,height:t??l??w.height,stroke:e??f,strokeWidth:m,className:b(`lucide`,p,i),...!a&&!T(s)&&{"aria-hidden":`true`},...s},[...o.map(([e,t])=>(0,y.createElement)(e,t)),...Array.isArray(a)?a:[a]])}),k=(e,t)=>{let n=(0,y.forwardRef)(({className:n,...r},i)=>(0,y.createElement)(O,{ref:i,iconNode:t,className:b(`lucide-${x(C(e))}`,`lucide-${e}`,n),...r}));return n.displayName=C(e),n},A=k(`activity`,[[`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`}]]),ee=k(`boxes`,[[`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`}]]),te=k(`cable`,[[`path`,{d:`M17 19a1 1 0 0 1-1-1v-2a2 2 0 0 1 2-2h2a2 2 0 0 1 2 2v2a1 1 0 0 1-1 1z`,key:`trhst0`}],[`path`,{d:`M17 21v-2`,key:`ds4u3f`}],[`path`,{d:`M19 14V6.5a1 1 0 0 0-7 0v11a1 1 0 0 1-7 0V10`,key:`1mo9zo`}],[`path`,{d:`M21 21v-2`,key:`eo0ou`}],[`path`,{d:`M3 5V3`,key:`1k5hjh`}],[`path`,{d:`M4 10a2 2 0 0 1-2-2V6a1 1 0 0 1 1-1h4a1 1 0 0 1 1 1v2a2 2 0 0 1-2 2z`,key:`1dd30t`}],[`path`,{d:`M7 5V3`,key:`1t1388`}]]),ne=k(`gauge`,[[`path`,{d:`m12 14 4-4`,key:`9kzdfg`}],[`path`,{d:`M3.34 19a10 10 0 1 1 17.32 0`,key:`19p75a`}]]),re=k(`key-round`,[[`path`,{d:`M2.586 17.414A2 2 0 0 0 2 18.828V21a1 1 0 0 0 1 1h3a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h1a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h.172a2 2 0 0 0 1.414-.586l.814-.814a6.5 6.5 0 1 0-4-4z`,key:`1s6t7t`}],[`circle`,{cx:`16.5`,cy:`7.5`,r:`.5`,fill:`currentColor`,key:`w0ekpg`}]]),ie=k(`log-out`,[[`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`}]]),ae=k(`monitor-cog`,[[`path`,{d:`M12 17v4`,key:`1riwvh`}],[`path`,{d:`m14.305 7.53.923-.382`,key:`1mlnsw`}],[`path`,{d:`m15.228 4.852-.923-.383`,key:`82mpwg`}],[`path`,{d:`m16.852 3.228-.383-.924`,key:`ln4sir`}],[`path`,{d:`m16.852 8.772-.383.923`,key:`1dejw0`}],[`path`,{d:`m19.148 3.228.383-.924`,key:`192kgf`}],[`path`,{d:`m19.53 9.696-.382-.924`,key:`fiavlr`}],[`path`,{d:`m20.772 4.852.924-.383`,key:`1j8mgp`}],[`path`,{d:`m20.772 7.148.924.383`,key:`zix9be`}],[`path`,{d:`M22 13v2a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h7`,key:`1tnzv8`}],[`path`,{d:`M8 21h8`,key:`1ev6f3`}],[`circle`,{cx:`18`,cy:`6`,r:`3`,key:`1h7g24`}]]),oe=k(`moon`,[[`path`,{d:`M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401`,key:`kfwtm`}]]),se=k(`scroll-text`,[[`path`,{d:`M15 12h-5`,key:`r7krc0`}],[`path`,{d:`M15 8h-5`,key:`1khuty`}],[`path`,{d:`M19 17V5a2 2 0 0 0-2-2H4`,key:`zz82l3`}],[`path`,{d:`M8 21h12a2 2 0 0 0 2-2v-1a1 1 0 0 0-1-1H11a1 1 0 0 0-1 1v1a2 2 0 1 1-4 0V5a2 2 0 1 0-4 0v2a1 1 0 0 0 1 1h3`,key:`1ph1d7`}]]),ce=k(`sliders-horizontal`,[[`path`,{d:`M10 5H3`,key:`1qgfaw`}],[`path`,{d:`M12 19H3`,key:`yhmn1j`}],[`path`,{d:`M14 3v4`,key:`1sua03`}],[`path`,{d:`M16 17v4`,key:`1q0r14`}],[`path`,{d:`M21 12h-9`,key:`1o4lsq`}],[`path`,{d:`M21 19h-5`,key:`1rlt1p`}],[`path`,{d:`M21 5h-7`,key:`1oszz2`}],[`path`,{d:`M8 10v4`,key:`tgpxqk`}],[`path`,{d:`M8 12H3`,key:`a7s4jb`}]]),le=k(`sun`,[[`circle`,{cx:`12`,cy:`12`,r:`4`,key:`4exip2`}],[`path`,{d:`M12 2v2`,key:`tus03m`}],[`path`,{d:`M12 20v2`,key:`1lh1kg`}],[`path`,{d:`m4.93 4.93 1.41 1.41`,key:`149t6j`}],[`path`,{d:`m17.66 17.66 1.41 1.41`,key:`ptbguv`}],[`path`,{d:`M2 12h2`,key:`1t8f8n`}],[`path`,{d:`M20 12h2`,key:`1q8mjw`}],[`path`,{d:`m6.34 17.66-1.41 1.41`,key:`1m8zz5`}],[`path`,{d:`m19.07 4.93-1.41 1.41`,key:`1shlcs`}]]),j=k(`terminal`,[[`path`,{d:`M12 19h8`,key:`baeox8`}],[`path`,{d:`m4 17 6-6-6-6`,key:`1yngyt`}]]),M=new Intl.NumberFormat(`en-US`,{notation:`compact`,maximumFractionDigits:1}),N=new Intl.NumberFormat(`en-US`);function P(e){return Number.isFinite(e)?e<1e4?N.format(Math.round(e)):M.format(e).toLowerCase():`—`}function F(e){return Number.isFinite(e)?e===0?`$0`:e<.01?`$${e.toFixed(4)}`:e<100?`$${e.toFixed(2)}`:`$${M.format(e).toLowerCase()}`:`—`}function I(e){return e==null||!Number.isFinite(e)?`—`:e<1e3?`${Math.round(e)}ms`:e<6e4?`${(e/1e3).toFixed(1)}s`:`${Math.round(e/6e4)}m`}function L(e,t=1){return Number.isFinite(e)?`${(e*100).toFixed(t)}%`:`—`}var R=[[6e4,1e3,`s`],[36e5,6e4,`m`],[864e5,36e5,`h`],[1/0,864e5,`d`]];function z(e){let t=Math.abs(e);if(t<1e3)return`0s`;let n=R.find(([e])=>t<e);return n===void 0?`—`:`${Math.floor(t/n[1])}${n[2]}`}function B(e,t=Date.now()){if(e==null||!Number.isFinite(e))return`—`;let n=e-t;return Math.abs(n)<5e3?`just now`:n<0?`${z(n)} ago`:`in ${z(n)}`}function V(e){return new Date(e).toLocaleTimeString(`en-GB`,{hour12:!1})}function H(e){return e==null||!Number.isFinite(e)?`—`:new Date(e).toLocaleString(`en-GB`,{year:`numeric`,month:`short`,day:`2-digit`,hour:`2-digit`,minute:`2-digit`,hour12:!1})}function U(e,t=8){return e.length<=t?e:`${e.slice(0,t)}…`}var W=i(),G=(0,y.createContext)(null);function ue({children:e}){let[t,n]=(0,y.useState)(!0),r=(0,y.useCallback)(()=>n(e=>!e),[]),i=(0,y.useMemo)(()=>({live:t,toggle:r,cadence:e=>t?e:!1}),[t,r]);return(0,W.jsx)(G,{value:i,children:e})}function K(){return(0,y.use)(G)??{live:!1,toggle:()=>{},cadence:()=>!1}}var de=t.svg`
1
+ import{B as e,F as t,H as n,J as r,K as i,L as a,M as o,N as s,Nt as c,Pt as l,Qt as u,V as d,X as f,v as p,y as m}from"./queries-1zRLkX-Q.js";import{t as h}from"./index-CE-KQ-ju.js";import{f as g,r as _,t as v}from"./Lamp-CBOwqG5K.js";var y=u(l(),1),b=(...e)=>e.filter((e,t,n)=>!!e&&e.trim()!==``&&n.indexOf(e)===t).join(` `).trim(),x=e=>e.replace(/([a-z0-9])([A-Z])/g,`$1-$2`).toLowerCase(),S=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,t,n)=>n?n.toUpperCase():t.toLowerCase()),C=e=>{let t=S(e);return t.charAt(0).toUpperCase()+t.slice(1)},w={xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:2,strokeLinecap:`round`,strokeLinejoin:`round`},T=e=>{for(let t in e)if(t.startsWith(`aria-`)||t===`role`||t===`title`)return!0;return!1},E=(0,y.createContext)({}),D=()=>(0,y.useContext)(E),O=(0,y.forwardRef)(({color:e,size:t,strokeWidth:n,absoluteStrokeWidth:r,className:i=``,children:a,iconNode:o,...s},c)=>{let{size:l=24,strokeWidth:u=2,absoluteStrokeWidth:d=!1,color:f=`currentColor`,className:p=``}=D()??{},m=r??d?Number(n??u)*24/Number(t??l):n??u;return(0,y.createElement)(`svg`,{ref:c,...w,width:t??l??w.width,height:t??l??w.height,stroke:e??f,strokeWidth:m,className:b(`lucide`,p,i),...!a&&!T(s)&&{"aria-hidden":`true`},...s},[...o.map(([e,t])=>(0,y.createElement)(e,t)),...Array.isArray(a)?a:[a]])}),k=(e,t)=>{let n=(0,y.forwardRef)(({className:n,...r},i)=>(0,y.createElement)(O,{ref:i,iconNode:t,className:b(`lucide-${x(C(e))}`,`lucide-${e}`,n),...r}));return n.displayName=C(e),n},A=k(`activity`,[[`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`}]]),ee=k(`boxes`,[[`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`}]]),te=k(`cable`,[[`path`,{d:`M17 19a1 1 0 0 1-1-1v-2a2 2 0 0 1 2-2h2a2 2 0 0 1 2 2v2a1 1 0 0 1-1 1z`,key:`trhst0`}],[`path`,{d:`M17 21v-2`,key:`ds4u3f`}],[`path`,{d:`M19 14V6.5a1 1 0 0 0-7 0v11a1 1 0 0 1-7 0V10`,key:`1mo9zo`}],[`path`,{d:`M21 21v-2`,key:`eo0ou`}],[`path`,{d:`M3 5V3`,key:`1k5hjh`}],[`path`,{d:`M4 10a2 2 0 0 1-2-2V6a1 1 0 0 1 1-1h4a1 1 0 0 1 1 1v2a2 2 0 0 1-2 2z`,key:`1dd30t`}],[`path`,{d:`M7 5V3`,key:`1t1388`}]]),ne=k(`gauge`,[[`path`,{d:`m12 14 4-4`,key:`9kzdfg`}],[`path`,{d:`M3.34 19a10 10 0 1 1 17.32 0`,key:`19p75a`}]]),re=k(`key-round`,[[`path`,{d:`M2.586 17.414A2 2 0 0 0 2 18.828V21a1 1 0 0 0 1 1h3a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h1a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h.172a2 2 0 0 0 1.414-.586l.814-.814a6.5 6.5 0 1 0-4-4z`,key:`1s6t7t`}],[`circle`,{cx:`16.5`,cy:`7.5`,r:`.5`,fill:`currentColor`,key:`w0ekpg`}]]),ie=k(`log-out`,[[`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`}]]),ae=k(`monitor-cog`,[[`path`,{d:`M12 17v4`,key:`1riwvh`}],[`path`,{d:`m14.305 7.53.923-.382`,key:`1mlnsw`}],[`path`,{d:`m15.228 4.852-.923-.383`,key:`82mpwg`}],[`path`,{d:`m16.852 3.228-.383-.924`,key:`ln4sir`}],[`path`,{d:`m16.852 8.772-.383.923`,key:`1dejw0`}],[`path`,{d:`m19.148 3.228.383-.924`,key:`192kgf`}],[`path`,{d:`m19.53 9.696-.382-.924`,key:`fiavlr`}],[`path`,{d:`m20.772 4.852.924-.383`,key:`1j8mgp`}],[`path`,{d:`m20.772 7.148.924.383`,key:`zix9be`}],[`path`,{d:`M22 13v2a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h7`,key:`1tnzv8`}],[`path`,{d:`M8 21h8`,key:`1ev6f3`}],[`circle`,{cx:`18`,cy:`6`,r:`3`,key:`1h7g24`}]]),oe=k(`moon`,[[`path`,{d:`M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401`,key:`kfwtm`}]]),se=k(`scroll-text`,[[`path`,{d:`M15 12h-5`,key:`r7krc0`}],[`path`,{d:`M15 8h-5`,key:`1khuty`}],[`path`,{d:`M19 17V5a2 2 0 0 0-2-2H4`,key:`zz82l3`}],[`path`,{d:`M8 21h12a2 2 0 0 0 2-2v-1a1 1 0 0 0-1-1H11a1 1 0 0 0-1 1v1a2 2 0 1 1-4 0V5a2 2 0 1 0-4 0v2a1 1 0 0 0 1 1h3`,key:`1ph1d7`}]]),ce=k(`sliders-horizontal`,[[`path`,{d:`M10 5H3`,key:`1qgfaw`}],[`path`,{d:`M12 19H3`,key:`yhmn1j`}],[`path`,{d:`M14 3v4`,key:`1sua03`}],[`path`,{d:`M16 17v4`,key:`1q0r14`}],[`path`,{d:`M21 12h-9`,key:`1o4lsq`}],[`path`,{d:`M21 19h-5`,key:`1rlt1p`}],[`path`,{d:`M21 5h-7`,key:`1oszz2`}],[`path`,{d:`M8 10v4`,key:`tgpxqk`}],[`path`,{d:`M8 12H3`,key:`a7s4jb`}]]),le=k(`sun`,[[`circle`,{cx:`12`,cy:`12`,r:`4`,key:`4exip2`}],[`path`,{d:`M12 2v2`,key:`tus03m`}],[`path`,{d:`M12 20v2`,key:`1lh1kg`}],[`path`,{d:`m4.93 4.93 1.41 1.41`,key:`149t6j`}],[`path`,{d:`m17.66 17.66 1.41 1.41`,key:`ptbguv`}],[`path`,{d:`M2 12h2`,key:`1t8f8n`}],[`path`,{d:`M20 12h2`,key:`1q8mjw`}],[`path`,{d:`m6.34 17.66-1.41 1.41`,key:`1m8zz5`}],[`path`,{d:`m19.07 4.93-1.41 1.41`,key:`1shlcs`}]]),j=k(`terminal`,[[`path`,{d:`M12 19h8`,key:`baeox8`}],[`path`,{d:`m4 17 6-6-6-6`,key:`1yngyt`}]]),M=new Intl.NumberFormat(`en-US`,{notation:`compact`,maximumFractionDigits:1}),N=new Intl.NumberFormat(`en-US`);function P(e){return Number.isFinite(e)?e<1e4?N.format(Math.round(e)):M.format(e).toLowerCase():`—`}function F(e){return Number.isFinite(e)?e===0?`$0`:e<.01?`$${e.toFixed(4)}`:e<100?`$${e.toFixed(2)}`:`$${M.format(e).toLowerCase()}`:`—`}function I(e){return e==null||!Number.isFinite(e)?`—`:e<1e3?`${Math.round(e)}ms`:e<6e4?`${(e/1e3).toFixed(1)}s`:`${Math.round(e/6e4)}m`}function L(e,t=1){return Number.isFinite(e)?`${(e*100).toFixed(t)}%`:`—`}var R=[[6e4,1e3,`s`],[36e5,6e4,`m`],[864e5,36e5,`h`],[1/0,864e5,`d`]];function z(e){let t=Math.abs(e);if(t<1e3)return`0s`;let n=R.find(([e])=>t<e);return n===void 0?`—`:`${Math.floor(t/n[1])}${n[2]}`}function B(e,t=Date.now()){if(e==null||!Number.isFinite(e))return`—`;let n=e-t;return Math.abs(n)<5e3?`just now`:n<0?`${z(n)} ago`:`in ${z(n)}`}function V(e){return new Date(e).toLocaleTimeString(`en-GB`,{hour12:!1})}function H(e){return e==null||!Number.isFinite(e)?`—`:new Date(e).toLocaleString(`en-GB`,{year:`numeric`,month:`short`,day:`2-digit`,hour:`2-digit`,minute:`2-digit`,hour12:!1})}function U(e,t=8){return e.length<=t?e:`${e.slice(0,t)}…`}var W=c(),G=(0,y.createContext)(null);function ue({children:e}){let[t,n]=(0,y.useState)(!0),r=(0,y.useCallback)(()=>n(e=>!e),[]),i=(0,y.useMemo)(()=>({live:t,toggle:r,cadence:e=>t?e:!1}),[t,r]);return(0,W.jsx)(G,{value:i,children:e})}function K(){return(0,y.use)(G)??{live:!1,toggle:()=>{},cadence:()=>!1}}var de=i.svg`
2
2
  display: block;
3
3
  width: 100%;
4
4
  height: 100%;
5
5
  overflow: visible;
6
- `;function q(e,t,n,r){if(e.length===0)return``;let i=e.length===1?0:t/(e.length-1);return e.map((e,t)=>{let a=t*i,o=n-(r===0?0:e/r*n);return`${t===0?`M`:`L`}${a.toFixed(2)},${o.toFixed(2)}`}).join(` `)}function J({values:e,overlay:t,height:n=28,color:r,overlayColor:i,scaleTo:a,label:o,className:s}){let c=(0,y.useId)(),l=a===void 0?Math.max(1,...e,...t??[]):Math.max(1,a),u=q(e,100,n,l),d=u.length===0?``:`${u} L100,${n} L0,${n} Z`;return(0,W.jsxs)(de,{className:s,viewBox:`0 0 100 ${n}`,preserveAspectRatio:`none`,role:`img`,"aria-label":o,style:{height:n},children:[(0,W.jsx)(`defs`,{children:(0,W.jsxs)(`linearGradient`,{id:c,x1:`0`,y1:`0`,x2:`0`,y2:`1`,children:[(0,W.jsx)(`stop`,{offset:`0%`,stopColor:r??`var(--accent)`,stopOpacity:`0.28`}),(0,W.jsx)(`stop`,{offset:`100%`,stopColor:r??`var(--accent)`,stopOpacity:`0`})]})}),d.length===0?null:(0,W.jsx)(`path`,{d,fill:`url(#${c})`}),t===void 0?null:(0,W.jsx)(`path`,{d:q(t,100,n,l),fill:`none`,stroke:i??`var(--down)`,strokeWidth:`1.25`,vectorEffect:`non-scaling-stroke`}),(0,W.jsx)(`path`,{d:u,fill:`none`,stroke:r??`var(--accent)`,strokeWidth:`1.5`,strokeLinejoin:`round`,vectorEffect:`non-scaling-stroke`})]})}var fe=t.header`
6
+ `;function q(e,t,n,r){if(e.length===0)return``;let i=e.length===1?0:t/(e.length-1);return e.map((e,t)=>{let a=t*i,o=n-(r===0?0:e/r*n);return`${t===0?`M`:`L`}${a.toFixed(2)},${o.toFixed(2)}`}).join(` `)}function J({values:e,overlay:t,height:n=28,color:r,overlayColor:i,scaleTo:a,label:o,className:s}){let c=(0,y.useId)(),l=a===void 0?Math.max(1,...e,...t??[]):Math.max(1,a),u=q(e,100,n,l),d=u.length===0?``:`${u} L100,${n} L0,${n} Z`;return(0,W.jsxs)(de,{className:s,viewBox:`0 0 100 ${n}`,preserveAspectRatio:`none`,role:`img`,"aria-label":o,style:{height:n},children:[(0,W.jsx)(`defs`,{children:(0,W.jsxs)(`linearGradient`,{id:c,x1:`0`,y1:`0`,x2:`0`,y2:`1`,children:[(0,W.jsx)(`stop`,{offset:`0%`,stopColor:r??`var(--accent)`,stopOpacity:`0.28`}),(0,W.jsx)(`stop`,{offset:`100%`,stopColor:r??`var(--accent)`,stopOpacity:`0`})]})}),d.length===0?null:(0,W.jsx)(`path`,{d,fill:`url(#${c})`}),t===void 0?null:(0,W.jsx)(`path`,{d:q(t,100,n,l),fill:`none`,stroke:i??`var(--down)`,strokeWidth:`1.25`,vectorEffect:`non-scaling-stroke`}),(0,W.jsx)(`path`,{d:u,fill:`none`,stroke:r??`var(--accent)`,strokeWidth:`1.5`,strokeLinejoin:`round`,vectorEffect:`non-scaling-stroke`})]})}var fe=i.header`
7
7
  grid-area: chassis;
8
8
  display: flex;
9
9
  align-items: center;
@@ -12,11 +12,11 @@ import{B as e,G as t,I as n,M as r,Mt as i,Nt as a,P as o,V as s,Y as c,Zt as l,
12
12
  padding: 0 ${({theme:e})=>e.space(3)};
13
13
  border-bottom: 1px solid ${({theme:e})=>e.color.rule};
14
14
  background: ${({theme:e})=>e.color.panel};
15
- ${m}
15
+ ${e}
16
16
  position: sticky;
17
17
  top: 0;
18
18
  z-index: ${({theme:e})=>e.z.chassis};
19
- `,pe=t.div`
19
+ `,pe=i.div`
20
20
  display: flex;
21
21
  align-items: baseline;
22
22
  gap: 7px;
@@ -26,31 +26,31 @@ import{B as e,G as t,I as n,M as r,Mt as i,Nt as a,P as o,V as s,Y as c,Zt as l,
26
26
  font-size: 12px;
27
27
  text-transform: uppercase;
28
28
  flex: none;
29
- `,me=t(o)`
29
+ `,me=i(t)`
30
30
  gap: ${({theme:e})=>e.space(3)};
31
31
  overflow: hidden;
32
32
 
33
33
  @media (max-width: 860px) {
34
34
  display: none;
35
35
  }
36
- `,Y=t.div`
36
+ `,Y=i.div`
37
37
  display: flex;
38
38
  align-items: baseline;
39
39
  gap: 6px;
40
40
  padding-left: ${({theme:e})=>e.space(3)};
41
41
  border-left: 1px solid ${({theme:e})=>e.color.rule};
42
42
  white-space: nowrap;
43
- `,he=t(Y)`
43
+ `,he=i(Y)`
44
44
  width: 96px;
45
45
  align-items: center;
46
- `,ge=t.div`
46
+ `,ge=i.div`
47
47
  flex: 1;
48
48
  min-width: 0;
49
- `,_e=t(e)`
49
+ `,_e=i(d)`
50
50
  gap: 6px;
51
51
  font-family: ${({theme:e})=>e.font.mono};
52
52
  letter-spacing: 0.08em;
53
- `,X=[`system`,`light`,`dark`],Z={system:`Match system theme`,light:`Light theme`,dark:`Dark theme`},Q=6e5;function ve(){let e=c(),{live:t,toggle:i,cadence:a}=K(),{mode:o,setMode:l}=h(),f=u(),m=p(200,a(1e4)),b=Date.now(),x=(0,y.useMemo)(()=>(m.data??[]).filter(e=>b-e.at<=Q),[m.data,b]),S=g(x,Q),C=_(x,{now:b,spanMs:Q,count:24}),w=X[(X.indexOf(o)+1)%X.length]??`system`,T=o===`light`?le:o===`dark`?oe:ae,E=m.isError||S.errorRate>=.25?`down`:S.errorRate>=.05?`warn`:x.length===0?`idle`:`ok`;return(0,W.jsxs)(fe,{children:[(0,W.jsxs)(pe,{children:[(0,W.jsx)(v,{state:E,label:m.isError?`gateway unreachable`:`error rate ${L(S.errorRate)}`}),`Omnigateway`]}),(0,W.jsxs)(me,{children:[(0,W.jsxs)(he,{children:[(0,W.jsx)(d,{children:`req`}),(0,W.jsx)(ge,{children:(0,W.jsx)(J,{values:C.map(e=>e.total),overlay:C.map(e=>e.errors),height:22,label:`${S.requests} requests in the last 10 minutes`})})]}),(0,W.jsxs)(Y,{children:[(0,W.jsx)(d,{children:`rate`}),(0,W.jsx)(r,{children:S.ratePerMin.toFixed(1)}),(0,W.jsx)(d,{children:`/min`})]}),(0,W.jsxs)(Y,{children:[(0,W.jsx)(d,{children:`err`}),(0,W.jsx)(r,{style:{color:S.errorRate>=.05?`var(--down)`:void 0},children:L(S.errorRate)})]}),(0,W.jsxs)(Y,{children:[(0,W.jsx)(d,{children:`ttft p50`}),(0,W.jsx)(r,{children:I(S.ttftP50)})]}),(0,W.jsxs)(Y,{children:[(0,W.jsx)(d,{children:`spend`}),(0,W.jsx)(r,{children:F(S.costUsd)})]})]}),(0,W.jsx)(n,{}),(0,W.jsxs)(_e,{type:`button`,$size:`sm`,onClick:i,"aria-pressed":t,title:t?`Pause polling`:`Resume polling`,children:[(0,W.jsx)(v,{state:t?`ok`:`idle`,label:t?`polling`:`paused`}),t?`LIVE`:`PAUSED`]}),(0,W.jsx)(s,{type:`button`,$variant:`ghost`,$size:`sm`,onClick:()=>l(w),"aria-label":Z[o],title:`${Z[o]} — switch to ${Z[w].toLowerCase()}`,children:(0,W.jsx)(T,{})}),(0,W.jsx)(s,{type:`button`,$variant:`ghost`,$size:`sm`,"aria-label":`Sign out`,title:`Sign out`,disabled:f.isPending,onClick:()=>{f.mutate(void 0,{onSuccess:()=>void e({to:`/login`})})},children:(0,W.jsx)(ie,{})})]})}var ye=[{to:`/`,label:`Rack`,blurb:`Live state of every account and model`,Icon:A},{to:`/accounts`,label:`Accounts`,blurb:`Provider credentials and their health`,Icon:te},{to:`/models`,label:`Models`,blurb:`Virtual models, targets, and routing`,Icon:ee},{to:`/keys`,label:`Keys`,blurb:`Gateway API keys and their limits`,Icon:re},{to:`/usage`,label:`Usage`,blurb:`Requests, tokens, and spend over time`,Icon:ne},{to:`/logs`,label:`Logs`,blurb:`Recent requests, one row each`,Icon:se},{to:`/console`,label:`Console`,blurb:`The gateway's own output, as it was printed`,Icon:j},{to:`/settings`,label:`Settings`,blurb:`Routing weights, retries, retention`,Icon:ce}],be=t.nav`
53
+ `,X=[`system`,`light`,`dark`],Z={system:`Match system theme`,light:`Light theme`,dark:`Dark theme`},Q=6e5;function ve(){let e=f(),{live:t,toggle:r,cadence:i}=K(),{mode:c,setMode:l}=h(),u=p(),d=m(200,i(1e4)),b=Date.now(),x=(0,y.useMemo)(()=>(d.data??[]).filter(e=>b-e.at<=Q),[d.data,b]),S=g(x,Q),C=_(x,{now:b,spanMs:Q,count:24}),w=X[(X.indexOf(c)+1)%X.length]??`system`,T=c===`light`?le:c===`dark`?oe:ae,E=d.isError||S.errorRate>=.25?`down`:S.errorRate>=.05?`warn`:x.length===0?`idle`:`ok`;return(0,W.jsxs)(fe,{children:[(0,W.jsxs)(pe,{children:[(0,W.jsx)(v,{state:E,label:d.isError?`gateway unreachable`:`error rate ${L(S.errorRate)}`}),`Omnigateway`]}),(0,W.jsxs)(me,{children:[(0,W.jsxs)(he,{children:[(0,W.jsx)(o,{children:`req`}),(0,W.jsx)(ge,{children:(0,W.jsx)(J,{values:C.map(e=>e.total),overlay:C.map(e=>e.errors),height:22,label:`${S.requests} requests in the last 10 minutes`})})]}),(0,W.jsxs)(Y,{children:[(0,W.jsx)(o,{children:`rate`}),(0,W.jsx)(s,{children:S.ratePerMin.toFixed(1)}),(0,W.jsx)(o,{children:`/min`})]}),(0,W.jsxs)(Y,{children:[(0,W.jsx)(o,{children:`err`}),(0,W.jsx)(s,{style:{color:S.errorRate>=.05?`var(--down)`:void 0},children:L(S.errorRate)})]}),(0,W.jsxs)(Y,{children:[(0,W.jsx)(o,{children:`ttft p50`}),(0,W.jsx)(s,{children:I(S.ttftP50)})]}),(0,W.jsxs)(Y,{children:[(0,W.jsx)(o,{children:`spend`}),(0,W.jsx)(s,{children:F(S.costUsd)})]})]}),(0,W.jsx)(a,{}),(0,W.jsxs)(_e,{type:`button`,$size:`sm`,onClick:r,"aria-pressed":t,title:t?`Pause polling`:`Resume polling`,children:[(0,W.jsx)(v,{state:t?`ok`:`idle`,label:t?`polling`:`paused`}),t?`LIVE`:`PAUSED`]}),(0,W.jsx)(n,{type:`button`,$variant:`ghost`,$size:`sm`,onClick:()=>l(w),"aria-label":Z[c],title:`${Z[c]} — switch to ${Z[w].toLowerCase()}`,children:(0,W.jsx)(T,{})}),(0,W.jsx)(n,{type:`button`,$variant:`ghost`,$size:`sm`,"aria-label":`Sign out`,title:`Sign out`,disabled:u.isPending,onClick:()=>{u.mutate(void 0,{onSuccess:()=>void e({to:`/login`})})},children:(0,W.jsx)(ie,{})})]})}var ye=[{to:`/`,label:`Rack`,blurb:`Live state of every account and model`,Icon:A},{to:`/accounts`,label:`Accounts`,blurb:`Provider credentials and their health`,Icon:te},{to:`/models`,label:`Models`,blurb:`Virtual models, targets, and routing`,Icon:ee},{to:`/keys`,label:`Keys`,blurb:`Gateway API keys and their limits`,Icon:re},{to:`/usage`,label:`Usage`,blurb:`Requests, tokens, and spend over time`,Icon:ne},{to:`/logs`,label:`Logs`,blurb:`Recent requests, one row each`,Icon:se},{to:`/console`,label:`Console`,blurb:`The gateway's own output, as it was printed`,Icon:j},{to:`/settings`,label:`Settings`,blurb:`Routing weights, retries, retention`,Icon:ce}],be=i.nav`
54
54
  grid-area: rail;
55
55
  display: flex;
56
56
  flex-direction: column;
@@ -66,7 +66,7 @@ import{B as e,G as t,I as n,M as r,Mt as i,Nt as a,P as o,V as s,Y as c,Zt as l,
66
66
  border-right: 0;
67
67
  border-bottom: 1px solid ${({theme:e})=>e.color.rule};
68
68
  }
69
- `,xe=t(f)`
69
+ `,xe=i(r)`
70
70
  display: flex;
71
71
  align-items: center;
72
72
  gap: ${({theme:e})=>e.space(2)};
@@ -97,7 +97,7 @@ import{B as e,G as t,I as n,M as r,Mt as i,Nt as a,P as o,V as s,Y as c,Zt as l,
97
97
  border-left-color: ${({theme:e})=>e.color.accent};
98
98
  color: ${({theme:e})=>e.color.accent};
99
99
  }
100
- `;function Se(){return(0,W.jsx)(be,{"aria-label":`Console sections`,children:ye.map(({to:e,label:t,blurb:n,Icon:r})=>(0,W.jsxs)(xe,{to:e,title:n,activeOptions:{exact:e===`/`},children:[(0,W.jsx)(r,{}),t]},e))})}var Ce=t.div`
100
+ `;function Se(){return(0,W.jsx)(be,{"aria-label":`Console sections`,children:ye.map(({to:e,label:t,blurb:n,Icon:r})=>(0,W.jsxs)(xe,{to:e,title:n,activeOptions:{exact:e===`/`},children:[(0,W.jsx)(r,{}),t]},e))})}var Ce=i.div`
101
101
  display: grid;
102
102
  grid-template-areas:
103
103
  "chassis chassis"
@@ -116,7 +116,7 @@ import{B as e,G as t,I as n,M as r,Mt as i,Nt as a,P as o,V as s,Y as c,Zt as l,
116
116
  grid-template-columns: minmax(0, 1fr);
117
117
  grid-template-rows: auto auto minmax(0, 1fr);
118
118
  }
119
- `,$=t.main`
119
+ `,$=i.main`
120
120
  grid-area: main;
121
121
  padding: ${({theme:e})=>e.space(4)};
122
122
  display: flex;
@@ -129,23 +129,23 @@ import{B as e,G as t,I as n,M as r,Mt as i,Nt as a,P as o,V as s,Y as c,Zt as l,
129
129
  @media (max-width: 720px) {
130
130
  padding: ${({theme:e})=>e.space(3)};
131
131
  }
132
- `;function we({children:e}){return(0,W.jsxs)(Ce,{"data-testid":`rack-shell`,children:[(0,W.jsx)(ve,{}),(0,W.jsx)(Se,{}),(0,W.jsx)($,{children:e})]})}var Te=t.div`
132
+ `;function we({children:e}){return(0,W.jsxs)(Ce,{"data-testid":`rack-shell`,children:[(0,W.jsx)(ve,{}),(0,W.jsx)(Se,{}),(0,W.jsx)($,{children:e})]})}var Te=i.div`
133
133
  display: flex;
134
134
  align-items: flex-end;
135
135
  gap: ${({theme:e})=>e.space(3)};
136
136
  flex-wrap: wrap;
137
- `,Ee=t.h1`
137
+ `,Ee=i.h1`
138
138
  font-size: 20px;
139
139
  font-weight: 600;
140
140
  font-stretch: 88%;
141
141
  letter-spacing: -0.01em;
142
- `,De=t.p`
142
+ `,De=i.p`
143
143
  font-size: 13px;
144
144
  color: ${({theme:e})=>e.color.inkDim};
145
145
  max-width: 68ch;
146
- `,Oe=t.div`
146
+ `,Oe=i.div`
147
147
  display: flex;
148
148
  flex-direction: column;
149
149
  gap: 6px;
150
150
  min-width: 0;
151
- `;function ke({legend:e,title:t,summary:r,actions:i}){return(0,W.jsxs)(Te,{children:[(0,W.jsxs)(Oe,{children:[(0,W.jsx)(d,{children:e}),(0,W.jsx)(Ee,{children:t}),(0,W.jsx)(De,{children:r})]}),(0,W.jsx)(n,{}),i]})}export{K as a,H as c,L as d,B as f,k as h,ue as i,z as l,U as m,we as n,V as o,F as p,J as r,P as s,ke as t,I as u};
151
+ `;function ke({legend:e,title:t,summary:n,actions:r}){return(0,W.jsxs)(Te,{children:[(0,W.jsxs)(Oe,{children:[(0,W.jsx)(o,{children:e}),(0,W.jsx)(Ee,{children:t}),(0,W.jsx)(De,{children:n})]}),(0,W.jsx)(a,{}),r]})}export{K as a,H as c,L as d,B as f,k as h,ue as i,z as l,U as m,we as n,V as o,F as p,J as r,P as s,ke as t,I as u};
@@ -1,4 +1,4 @@
1
- import{G as e,Mt as t,j as n}from"./queries-D2o-X8Pj.js";var r=t(),i=e.div`
1
+ import{K as e,M as t,Nt as n}from"./queries-1zRLkX-Q.js";var r=n(),i=e.div`
2
2
  display: flex;
3
3
  flex-direction: column;
4
4
  gap: 6px;
@@ -10,6 +10,10 @@ import{G as e,Mt as t,j as n}from"./queries-D2o-X8Pj.js";var r=t(),i=e.div`
10
10
  `,a=e.div`
11
11
  display: flex;
12
12
  align-items: baseline;
13
+ /* A unit is usually a word beside the number, but it is allowed to be a
14
+ whole breakdown. Wrapping keeps a long one inside the card instead of
15
+ running past its edge, since neither the number nor the unit can shrink. */
16
+ flex-wrap: wrap;
13
17
  gap: 4px;
14
18
  font-family: ${({theme:e})=>e.font.mono};
15
19
  font-variant-numeric: tabular-nums;
@@ -24,4 +28,4 @@ import{G as e,Mt as t,j as n}from"./queries-D2o-X8Pj.js";var r=t(),i=e.div`
24
28
  color: ${({theme:e})=>e.color.inkFaint};
25
29
  `,s=e.div`
26
30
  margin-top: 2px;
27
- `;function c({legend:e,value:t,unit:c,tone:l,trace:u,className:d}){return(0,r.jsxs)(i,{className:d,children:[(0,r.jsx)(n,{children:e}),(0,r.jsxs)(a,{...l===void 0?{}:{$tone:l},children:[(0,r.jsx)(`span`,{children:t}),c===void 0?null:(0,r.jsx)(o,{children:c})]}),u===void 0?null:(0,r.jsx)(s,{children:u})]})}export{c as t};
31
+ `;function c({legend:e,value:n,unit:c,tone:l,trace:u,className:d}){return(0,r.jsxs)(i,{className:d,children:[(0,r.jsx)(t,{children:e}),(0,r.jsxs)(a,{...l===void 0?{}:{$tone:l},children:[(0,r.jsx)(`span`,{children:n}),c===void 0?null:(0,r.jsx)(o,{children:c})]}),u===void 0?null:(0,r.jsx)(s,{children:u})]})}export{c as t};
@@ -1,4 +1,4 @@
1
- import{B as e,G as t,H as n,I as r,Mt as i,O as a,P as o,j as s}from"./queries-D2o-X8Pj.js";var c=i(),l=t.section`
1
+ import{F as e,K as t,L as n,M as r,Nt as i,U as a,V as o,k as s}from"./queries-1zRLkX-Q.js";var c=i(),l=t.section`
2
2
  background: ${({theme:e})=>e.color.panel};
3
3
  border: 1px solid ${({theme:e})=>e.color.rule};
4
4
  border-radius: ${({theme:e})=>e.radius.panel};
@@ -22,7 +22,7 @@ import{B as e,G as t,H as n,I as r,Mt as i,O as a,P as o,j as s}from"./queries-D
22
22
  padding: ${({theme:e})=>`${e.space(2)} ${e.space(3)}`};
23
23
  border-top: 1px solid ${({theme:e})=>e.color.rule};
24
24
  background: ${({theme:e})=>e.color.panelSunk};
25
- `;function p({legend:e,meta:t,actions:n,footer:i,flush:a,className:p,children:m}){return(0,c.jsxs)(l,{className:p,children:[(0,c.jsxs)(u,{children:[(0,c.jsx)(s,{children:e}),t===void 0?null:(0,c.jsx)(s,{as:`span`,children:t}),(0,c.jsx)(r,{}),n===void 0?null:(0,c.jsx)(o,{$gap:1,children:n})]}),(0,c.jsx)(d,{...a===!0?{$flush:!0}:{},children:m}),i===void 0?null:(0,c.jsx)(f,{children:i})]})}var m=t.div`
25
+ `;function p({legend:t,meta:i,actions:a,footer:o,flush:s,className:p,children:m}){return(0,c.jsxs)(l,{className:p,children:[(0,c.jsxs)(u,{children:[(0,c.jsx)(r,{children:t}),i===void 0?null:(0,c.jsx)(r,{as:`span`,children:i}),(0,c.jsx)(n,{}),a===void 0?null:(0,c.jsx)(e,{$gap:1,children:a})]}),(0,c.jsx)(d,{...s===!0?{$flush:!0}:{},children:m}),o===void 0?null:(0,c.jsx)(f,{children:o})]})}var m=t.div`
26
26
  display: flex;
27
27
  flex-direction: column;
28
28
  align-items: center;
@@ -34,9 +34,9 @@ import{B as e,G as t,H as n,I as r,Mt as i,O as a,P as o,j as s}from"./queries-D
34
34
  max-width: 44ch;
35
35
  font-size: 13px;
36
36
  color: ${({theme:e})=>e.color.inkDim};
37
- `;function g({legend:e,message:t,action:n}){return(0,c.jsxs)(m,{children:[(0,c.jsx)(s,{children:e}),(0,c.jsx)(h,{children:t}),n]})}var _=t(h)`
37
+ `;function g({legend:e,message:t,action:n}){return(0,c.jsxs)(m,{children:[(0,c.jsx)(r,{children:e}),(0,c.jsx)(h,{children:t}),n]})}var _=t(h)`
38
38
  color: ${({theme:e})=>e.color.down};
39
- `;function v(e){return e instanceof a||e instanceof Error?e.message:`The gateway did not answer.`}function y({legend:t=`Request failed`,error:n,onRetry:r}){return(0,c.jsxs)(m,{children:[(0,c.jsx)(s,{children:t}),(0,c.jsx)(_,{children:v(n)}),r===void 0?null:(0,c.jsx)(e,{type:`button`,$size:`sm`,onClick:r,children:`Try again`})]})}var b=n`
39
+ `;function v(e){return e instanceof s||e instanceof Error?e.message:`The gateway did not answer.`}function y({legend:e=`Request failed`,error:t,onRetry:n}){return(0,c.jsxs)(m,{children:[(0,c.jsx)(r,{children:e}),(0,c.jsx)(_,{children:v(t)}),n===void 0?null:(0,c.jsx)(o,{type:`button`,$size:`sm`,onClick:n,children:`Try again`})]})}var b=a`
40
40
  0% { opacity: 0.35; }
41
41
  50% { opacity: 0.7; }
42
42
  100% { opacity: 0.35; }
@@ -1,4 +1,4 @@
1
- import{G as e}from"./queries-D2o-X8Pj.js";var t=e.table`
1
+ import{K as e}from"./queries-1zRLkX-Q.js";var t=e.table`
2
2
  width: 100%;
3
3
  border-collapse: collapse;
4
4
  font-size: 12.5px;
@@ -1,4 +1,4 @@
1
- import{G as e,Mt as t,Nt as n,Zt as r}from"./queries-D2o-X8Pj.js";import{a as i,c as a,i as o,n as s,r as c,t as l}from"./dist-C-IbPRiV.js";var u=r(n(),1),d=Object.defineProperty,f=(e,t)=>d(e,`name`,{value:t,configurable:!0});function p(e){let[t,n]=u.useState(void 0);return s(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});let t=new ResizeObserver(t=>{if(!Array.isArray(t)||!t.length)return;let r=t[0],i,a;if(`borderBoxSize`in r){let e=r.borderBoxSize,t=Array.isArray(e)?e[0]:e;i=t.inlineSize,a=t.blockSize}else i=e.offsetWidth,a=e.offsetHeight;n({width:i,height:a})});return t.observe(e,{box:`border-box`}),()=>t.unobserve(e)}n(void 0)},[e]),t}f(p,`useSize`);var m=t(),h=Object.defineProperty,g=(e,t)=>h(e,`name`,{value:t,configurable:!0}),_=`Switch`,[v,y]=o(_),[b,x]=v(_);function S(e){let{__scopeSwitch:t,checked:n,children:r,defaultChecked:i,disabled:a,form:o,name:s,onCheckedChange:c,required:d,value:f=`on`,internal_do_not_use_render:p}=e,[h,g]=l({prop:n,defaultProp:i??!1,onChange:c,caller:_}),[v,y]=u.useState(null),[x,S]=u.useState(null),C=u.useRef(!1),[w,T]=u.useReducer(e=>e+1,0),E={checked:h,setChecked:g,disabled:a,control:v,setControl:y,name:s,form:o,value:f,hasConsumerStoppedPropagationRef:C,userInteractionCount:w,onUserInteraction:T,required:d,defaultChecked:i,isFormControl:!v||!!o||!!v.closest(`form`),bubbleInput:x,setBubbleInput:S};return(0,m.jsx)(b,{scope:t,...E,children:A(p)?p(E):r})}g(S,`SwitchProvider`);var C=`SwitchTrigger`,w=u.forwardRef(g(function({__scopeSwitch:e,onClick:t,...n},r){let{control:o,form:s,value:l,disabled:d,checked:f,required:p,setControl:h,setChecked:_,hasConsumerStoppedPropagationRef:v,onUserInteraction:y,isFormControl:b,bubbleInput:S}=x(C,e),w=a(r,h),T=u.useRef(f);return u.useEffect(()=>{let e=s?o?.ownerDocument.getElementById(s):o?.form;if(e instanceof HTMLFormElement){let t=g(()=>_(T.current),`reset`);return e.addEventListener(`reset`,t),()=>e.removeEventListener(`reset`,t)}},[o,s,_]),(0,m.jsx)(i.button,{type:`button`,role:`switch`,"aria-checked":f,"aria-required":p,"data-state":j(f),"data-disabled":d?``:void 0,disabled:d,value:l,...n,ref:w,onClick:c(t,e=>{y(),_(e=>!e),S&&b&&(v.current=e.isPropagationStopped(),v.current||e.stopPropagation())})})},`SwitchTrigger`)),T=u.forwardRef(g(function(e,t){let{__scopeSwitch:n,name:r,checked:i,defaultChecked:a,required:o,disabled:s,value:c,onCheckedChange:l,form:u,...d}=e;return(0,m.jsx)(S,{__scopeSwitch:n,checked:i,defaultChecked:a,disabled:s,required:o,onCheckedChange:l,name:r,form:u,value:c,internal_do_not_use_render:({isFormControl:e})=>(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)(w,{...d,ref:t,__scopeSwitch:n}),e&&(0,m.jsx)(k,{__scopeSwitch:n})]})})},`Switch`)),E=`SwitchThumb`,D=u.forwardRef(g(function(e,t){let{__scopeSwitch:n,...r}=e,a=x(E,n);return(0,m.jsx)(i.span,{"data-state":j(a.checked),"data-disabled":a.disabled?``:void 0,...r,ref:t})},`SwitchThumb`)),O=`SwitchBubbleInput`,k=u.forwardRef(g(function({__scopeSwitch:e,onClick:t,...n},r){let{control:o,hasConsumerStoppedPropagationRef:s,userInteractionCount:l,checked:d,defaultChecked:f,required:h,disabled:g,name:_,value:v,form:y,bubbleInput:b,setBubbleInput:S}=x(O,e),C=a(r,S),w=p(o),T=u.useRef(!1),E=u.useRef(d),D=u.useRef(l);u.useEffect(()=>{let e=b;if(!e)return;let t=window.HTMLInputElement.prototype,n=Object.getOwnPropertyDescriptor(t,`checked`).set,r=l!==D.current;D.current=l;let i=E.current!==d;E.current=d;let a=!(r&&s.current);if(i&&n){T.current=!r;let t=new Event(`click`,{bubbles:a});n.call(e,d),e.dispatchEvent(t),T.current=!1}},[b,d,s,l]);let k=u.useRef(d);return(0,m.jsx)(i.input,{type:`checkbox`,"aria-hidden":!0,defaultChecked:f??k.current,required:h,disabled:g,name:_,value:v,form:y,...n,tabIndex:-1,ref:C,onClick:c(t,e=>{T.current&&e.stopPropagation()}),style:{...n.style,...w,position:`absolute`,pointerEvents:`none`,opacity:0,margin:0,transform:`translateX(-100%)`}})},`SwitchBubbleInput`));function A(e){return typeof e==`function`}g(A,`isFunction`);function j(e){return e?`checked`:`unchecked`}g(j,`getState`);var M=e(T)`
1
+ import{K as e,Nt as t,Pt as n,Qt as r}from"./queries-1zRLkX-Q.js";import{a as i,c as a,i as o,n as s,r as c,t as l}from"./dist-CnzT-Ut2.js";var u=r(n(),1),d=Object.defineProperty,f=(e,t)=>d(e,`name`,{value:t,configurable:!0});function p(e){let[t,n]=u.useState(void 0);return s(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});let t=new ResizeObserver(t=>{if(!Array.isArray(t)||!t.length)return;let r=t[0],i,a;if(`borderBoxSize`in r){let e=r.borderBoxSize,t=Array.isArray(e)?e[0]:e;i=t.inlineSize,a=t.blockSize}else i=e.offsetWidth,a=e.offsetHeight;n({width:i,height:a})});return t.observe(e,{box:`border-box`}),()=>t.unobserve(e)}n(void 0)},[e]),t}f(p,`useSize`);var m=t(),h=Object.defineProperty,g=(e,t)=>h(e,`name`,{value:t,configurable:!0}),_=`Switch`,[v,y]=o(_),[b,x]=v(_);function S(e){let{__scopeSwitch:t,checked:n,children:r,defaultChecked:i,disabled:a,form:o,name:s,onCheckedChange:c,required:d,value:f=`on`,internal_do_not_use_render:p}=e,[h,g]=l({prop:n,defaultProp:i??!1,onChange:c,caller:_}),[v,y]=u.useState(null),[x,S]=u.useState(null),C=u.useRef(!1),[w,T]=u.useReducer(e=>e+1,0),E={checked:h,setChecked:g,disabled:a,control:v,setControl:y,name:s,form:o,value:f,hasConsumerStoppedPropagationRef:C,userInteractionCount:w,onUserInteraction:T,required:d,defaultChecked:i,isFormControl:!v||!!o||!!v.closest(`form`),bubbleInput:x,setBubbleInput:S};return(0,m.jsx)(b,{scope:t,...E,children:A(p)?p(E):r})}g(S,`SwitchProvider`);var C=`SwitchTrigger`,w=u.forwardRef(g(function({__scopeSwitch:e,onClick:t,...n},r){let{control:o,form:s,value:l,disabled:d,checked:f,required:p,setControl:h,setChecked:_,hasConsumerStoppedPropagationRef:v,onUserInteraction:y,isFormControl:b,bubbleInput:S}=x(C,e),w=a(r,h),T=u.useRef(f);return u.useEffect(()=>{let e=s?o?.ownerDocument.getElementById(s):o?.form;if(e instanceof HTMLFormElement){let t=g(()=>_(T.current),`reset`);return e.addEventListener(`reset`,t),()=>e.removeEventListener(`reset`,t)}},[o,s,_]),(0,m.jsx)(i.button,{type:`button`,role:`switch`,"aria-checked":f,"aria-required":p,"data-state":j(f),"data-disabled":d?``:void 0,disabled:d,value:l,...n,ref:w,onClick:c(t,e=>{y(),_(e=>!e),S&&b&&(v.current=e.isPropagationStopped(),v.current||e.stopPropagation())})})},`SwitchTrigger`)),T=u.forwardRef(g(function(e,t){let{__scopeSwitch:n,name:r,checked:i,defaultChecked:a,required:o,disabled:s,value:c,onCheckedChange:l,form:u,...d}=e;return(0,m.jsx)(S,{__scopeSwitch:n,checked:i,defaultChecked:a,disabled:s,required:o,onCheckedChange:l,name:r,form:u,value:c,internal_do_not_use_render:({isFormControl:e})=>(0,m.jsxs)(m.Fragment,{children:[(0,m.jsx)(w,{...d,ref:t,__scopeSwitch:n}),e&&(0,m.jsx)(k,{__scopeSwitch:n})]})})},`Switch`)),E=`SwitchThumb`,D=u.forwardRef(g(function(e,t){let{__scopeSwitch:n,...r}=e,a=x(E,n);return(0,m.jsx)(i.span,{"data-state":j(a.checked),"data-disabled":a.disabled?``:void 0,...r,ref:t})},`SwitchThumb`)),O=`SwitchBubbleInput`,k=u.forwardRef(g(function({__scopeSwitch:e,onClick:t,...n},r){let{control:o,hasConsumerStoppedPropagationRef:s,userInteractionCount:l,checked:d,defaultChecked:f,required:h,disabled:g,name:_,value:v,form:y,bubbleInput:b,setBubbleInput:S}=x(O,e),C=a(r,S),w=p(o),T=u.useRef(!1),E=u.useRef(d),D=u.useRef(l);u.useEffect(()=>{let e=b;if(!e)return;let t=window.HTMLInputElement.prototype,n=Object.getOwnPropertyDescriptor(t,`checked`).set,r=l!==D.current;D.current=l;let i=E.current!==d;E.current=d;let a=!(r&&s.current);if(i&&n){T.current=!r;let t=new Event(`click`,{bubbles:a});n.call(e,d),e.dispatchEvent(t),T.current=!1}},[b,d,s,l]);let k=u.useRef(d);return(0,m.jsx)(i.input,{type:`checkbox`,"aria-hidden":!0,defaultChecked:f??k.current,required:h,disabled:g,name:_,value:v,form:y,...n,tabIndex:-1,ref:C,onClick:c(t,e=>{T.current&&e.stopPropagation()}),style:{...n.style,...w,position:`absolute`,pointerEvents:`none`,opacity:0,margin:0,transform:`translateX(-100%)`}})},`SwitchBubbleInput`));function A(e){return typeof e==`function`}g(A,`isFunction`);function j(e){return e?`checked`:`unchecked`}g(j,`getState`);var M=e(T)`
2
2
  all: unset;
3
3
  width: 30px;
4
4
  height: 16px;
@@ -1,7 +1,10 @@
1
- import{G as e,H as t,Mt as n}from"./queries-D2o-X8Pj.js";import{h as r,s as i}from"./Rack-D1WJswv3.js";var a=r(`arrow-down`,[[`path`,{d:`M12 5v14`,key:`s699le`}],[`path`,{d:`m19 12-7 7-7-7`,key:`1idqje`}]]),o=r(`arrow-up`,[[`path`,{d:`m5 12 7-7 7 7`,key:`hav0vg`}],[`path`,{d:`M12 19V5`,key:`x0mq9r`}]]),s=r(`database`,[[`ellipse`,{cx:`12`,cy:`5`,rx:`9`,ry:`3`,key:`msslwz`}],[`path`,{d:`M3 5V19A9 3 0 0 0 21 19V5`,key:`1wlel7`}],[`path`,{d:`M3 12A9 3 0 0 0 21 12`,key:`mv7ke4`}]]),c=n(),l=new Intl.NumberFormat(`en-US`);function u(e){return`${l.format(e.inputTokens)} input, ${l.format(e.outputTokens)} output, ${l.format(e.cacheReadTokens)} cache read, ${l.format(e.cacheWriteTokens)} cache write tokens`}var d=e.span`
1
+ import{K as e,Nt as t,U as n}from"./queries-1zRLkX-Q.js";import{h as r,s as i}from"./Rack-DAbY9x1I.js";var a=r(`arrow-down`,[[`path`,{d:`M12 5v14`,key:`s699le`}],[`path`,{d:`m19 12-7 7-7-7`,key:`1idqje`}]]),o=r(`arrow-up`,[[`path`,{d:`m5 12 7-7 7 7`,key:`hav0vg`}],[`path`,{d:`M12 19V5`,key:`x0mq9r`}]]),s=r(`database`,[[`ellipse`,{cx:`12`,cy:`5`,rx:`9`,ry:`3`,key:`msslwz`}],[`path`,{d:`M3 5V19A9 3 0 0 0 21 19V5`,key:`1wlel7`}],[`path`,{d:`M3 12A9 3 0 0 0 21 12`,key:`mv7ke4`}]]),c=t(),l=new Intl.NumberFormat(`en-US`);function u(e){return`${l.format(e.inputTokens)} input, ${l.format(e.outputTokens)} output, ${l.format(e.cacheReadTokens)} cache read, ${l.format(e.cacheWriteTokens)} cache write tokens`}var d=e.span`
2
2
  display: inline-flex;
3
3
  align-items: center;
4
+ flex-wrap: wrap;
4
5
  gap: 6px;
6
+ /* Wrapping happens between the four classes, never inside one: a count
7
+ broken across lines from its own arrow reads as a different number. */
5
8
  white-space: nowrap;
6
9
  `,f=e.span`
7
10
  display: inline-flex;
@@ -13,7 +16,7 @@ import{G as e,H as t,Mt as n}from"./queries-D2o-X8Pj.js";import{h as r,s as i}fr
13
16
  height: 12px;
14
17
  stroke-width: 1.75;
15
18
  }
16
- `,p=t`
19
+ `,p=n`
17
20
  from { clip-path: inset(0 2ch 0 0); }
18
21
  to { clip-path: inset(0 0 0 0); }
19
22
  `,m=e.span`
@@ -0,0 +1 @@
1
+ import{Nt as e}from"./queries-1zRLkX-Q.js";import{o as t}from"./index-CE-KQ-ju.js";import{i as n,n as r}from"./Rack-DAbY9x1I.js";var i=e(),a=()=>(0,i.jsx)(n,{children:(0,i.jsx)(r,{children:(0,i.jsx)(t,{})})});export{a as component};