omnigateway 0.4.10 → 0.4.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/omni.js +198 -25
- package/gateway.js +225 -29
- package/package.json +1 -1
- package/public/assets/{CopyValue-CcE2vXiA.js → CopyValue-By5BAgv7.js} +1 -1
- package/public/assets/{Rack-Bbk1hAor.js → Rack-fDZClWZL.js} +1 -1
- package/public/assets/{Toggle-DGsa7LWV.js → Toggle-ClEeOh0F.js} +1 -1
- package/public/assets/{TokenBreakdown-Do_4AmfF.js → TokenBreakdown-D70VeZ2N.js} +1 -1
- package/public/assets/{_app-UpbTpRCt.js → _app-CDPKnQ72.js} +1 -1
- package/public/assets/{_app.accounts-CPG3iaDT.js → _app.accounts-Dz0ox4Br.js} +1 -1
- package/public/assets/{_app.console-BaGTRPEe.js → _app.console-hPUmmYjp.js} +1 -1
- package/public/assets/{_app.database-DA2aB-ij.js → _app.database-DGtP4NdG.js} +1 -1
- package/public/assets/{_app.index-CDjVA5Ix.js → _app.index-COcCAmbH.js} +1 -1
- package/public/assets/{_app.keys-Bf8HiloS.js → _app.keys-yTXTbKTA.js} +1 -1
- package/public/assets/{_app.logs-DTF9RDhN.js → _app.logs-BhMvO_Fx.js} +1 -1
- package/public/assets/{_app.models-B6_6bC3z.js → _app.models-0S3rurIl.js} +1 -1
- package/public/assets/{_app.plugins._pluginId-Dl_jYunC.js → _app.plugins._pluginId-B-ZDQNPU.js} +1 -1
- package/public/assets/_app.settings-DTnFwTeA.js +46 -0
- package/public/assets/{_app.usage-D4TLCm9J.js → _app.usage-C2-VLiq9.js} +1 -1
- package/public/assets/{index-CJZIRJ43.js → index-COwhxKU7.js} +2 -2
- package/public/assets/{login-Bu6texfZ.js → login-DjfMomJJ.js} +1 -1
- package/public/assets/plus-UDQ_BTEr.js +1 -0
- package/public/assets/{trash-2-5CCUKFQ0.js → trash-2-U2ViYZum.js} +1 -1
- package/public/index.html +1 -1
- package/public/assets/_app.settings-Dh6lrqws.js +0 -46
- package/public/assets/plus-Z1kRC6KA.js +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{c as e,d as t,f as n,l as r,p as i,u as a}from"./Rack-
|
|
1
|
+
import{c as e,d as t,f as n,l as r,p as i,u as a}from"./Rack-fDZClWZL.js";import*as o from"react";import{Fragment as s,jsx as c,jsxs as l}from"react/jsx-runtime";import u from"styled-components";var d=Object.defineProperty,f=(e,t)=>d(e,`name`,{value:t,configurable:!0});function p(e){let[t,n]=o.useState(void 0);return r(()=>{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=Object.defineProperty,h=(e,t)=>m(e,`name`,{value:t,configurable:!0}),g=`Switch`,[_,v]=t(g),[y,b]=_(g);function x(t){let{__scopeSwitch:n,checked:r,children:i,defaultChecked:a,disabled:s,form:l,name:u,onCheckedChange:d,required:f,value:p=`on`,internal_do_not_use_render:m}=t,[h,_]=e({prop:r,defaultProp:a??!1,onChange:d,caller:g}),[v,b]=o.useState(null),[x,S]=o.useState(null),C=o.useRef(!1),[w,T]=o.useReducer(e=>e+1,0),E={checked:h,setChecked:_,disabled:s,control:v,setControl:b,name:u,form:l,value:p,hasConsumerStoppedPropagationRef:C,userInteractionCount:w,onUserInteraction:T,required:f,defaultChecked:a,isFormControl:!v||!!l||!!v.closest(`form`),bubbleInput:x,setBubbleInput:S};return c(y,{scope:n,...E,children:k(m)?m(E):i})}h(x,`SwitchProvider`);var S=`SwitchTrigger`,C=o.forwardRef(h(function({__scopeSwitch:e,onClick:t,...r},s){let{control:l,form:u,value:d,disabled:f,checked:p,required:m,setControl:g,setChecked:_,hasConsumerStoppedPropagationRef:v,onUserInteraction:y,isFormControl:x,bubbleInput:C}=b(S,e),w=i(s,g),T=o.useRef(p);return o.useEffect(()=>{let e=u?l?.ownerDocument.getElementById(u):l?.form;if(e instanceof HTMLFormElement){let t=h(()=>_(T.current),`reset`);return e.addEventListener(`reset`,t),()=>e.removeEventListener(`reset`,t)}},[l,u,_]),c(n.button,{type:`button`,role:`switch`,"aria-checked":p,"aria-required":m,"data-state":A(p),"data-disabled":f?``:void 0,disabled:f,value:d,...r,ref:w,onClick:a(t,e=>{y(),_(e=>!e),C&&x&&(v.current=e.isPropagationStopped(),v.current||e.stopPropagation())})})},`SwitchTrigger`)),w=o.forwardRef(h(function(e,t){let{__scopeSwitch:n,name:r,checked:i,defaultChecked:a,required:o,disabled:u,value:d,onCheckedChange:f,form:p,...m}=e;return c(x,{__scopeSwitch:n,checked:i,defaultChecked:a,disabled:u,required:o,onCheckedChange:f,name:r,form:p,value:d,internal_do_not_use_render:({isFormControl:e})=>l(s,{children:[c(C,{...m,ref:t,__scopeSwitch:n}),e&&c(O,{__scopeSwitch:n})]})})},`Switch`)),T=`SwitchThumb`,E=o.forwardRef(h(function(e,t){let{__scopeSwitch:r,...i}=e,a=b(T,r);return c(n.span,{"data-state":A(a.checked),"data-disabled":a.disabled?``:void 0,...i,ref:t})},`SwitchThumb`)),D=`SwitchBubbleInput`,O=o.forwardRef(h(function({__scopeSwitch:e,onClick:t,...r},s){let{control:l,hasConsumerStoppedPropagationRef:u,userInteractionCount:d,checked:f,defaultChecked:m,required:h,disabled:g,name:_,value:v,form:y,bubbleInput:x,setBubbleInput:S}=b(D,e),C=i(s,S),w=p(l),T=o.useRef(!1),E=o.useRef(f),O=o.useRef(d);o.useEffect(()=>{let e=x;if(!e)return;let t=window.HTMLInputElement.prototype,n=Object.getOwnPropertyDescriptor(t,`checked`).set,r=d!==O.current;O.current=d;let i=E.current!==f;E.current=f;let a=!(r&&u.current);if(i&&n){T.current=!r;let t=new Event(`click`,{bubbles:a});n.call(e,f),e.dispatchEvent(t),T.current=!1}},[x,f,u,d]);let k=o.useRef(f);return c(n.input,{type:`checkbox`,"aria-hidden":!0,defaultChecked:m??k.current,required:h,disabled:g,name:_,value:v,form:y,...r,tabIndex:-1,ref:C,onClick:a(t,e=>{T.current&&e.stopPropagation()}),style:{...r.style,...w,position:`absolute`,pointerEvents:`none`,opacity:0,margin:0,transform:`translateX(-100%)`}})},`SwitchBubbleInput`));function k(e){return typeof e==`function`}h(k,`isFunction`);function A(e){return e?`checked`:`unchecked`}h(A,`getState`);var j=u(w)`
|
|
2
2
|
all: unset;
|
|
3
3
|
width: 30px;
|
|
4
4
|
height: 16px;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{g as e,h as t}from"./Rack-
|
|
1
|
+
import{g as e,h as t}from"./Rack-fDZClWZL.js";import{D as n}from"./States-DtkkMzEu.js";import{jsx as r,jsxs as i}from"react/jsx-runtime";import a,{keyframes as o}from"styled-components";var s=e(`arrow-down`,[[`path`,{d:`M12 5v14`,key:`s699le`}],[`path`,{d:`m19 12-7 7-7-7`,key:`1idqje`}]]),c=e(`arrow-up`,[[`path`,{d:`m5 12 7-7 7 7`,key:`hav0vg`}],[`path`,{d:`M12 19V5`,key:`x0mq9r`}]]),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=a.span`
|
|
2
2
|
display: inline-flex;
|
|
3
3
|
align-items: center;
|
|
4
4
|
flex-wrap: wrap;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{n as e}from"./Match-BWa6L0L1.js";import{i as t,n}from"./Rack-
|
|
1
|
+
import{n as e}from"./Match-BWa6L0L1.js";import{i as t,n}from"./Rack-fDZClWZL.js";import{jsx as r}from"react/jsx-runtime";var i=()=>r(t,{children:r(n,{children:r(e,{})})});export{i as component};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{A as e,C as t,E as n,J as r,T as i,Y as a,c as o,dt as s,t as c,w as l}from"./shared-Cct_4xwp.js";import{$ as u,A as d,W as f,at as p,et as m,f as h,g,h as _,l as v,lt as y,nt as b,r as x,rt as S,u as C,ut as w,v as T,z as E}from"./queries-CX9mStps.js";import{a as D,g as O,o as k,s as ee,t as A}from"./Rack-
|
|
1
|
+
import{A as e,C as t,E as n,J as r,T as i,Y as a,c as o,dt as s,t as c,w as l}from"./shared-Cct_4xwp.js";import{$ as u,A as d,W as f,at as p,et as m,f as h,g,h as _,l as v,lt as y,nt as b,r as x,rt as S,u as C,ut as w,v as T,z as E}from"./queries-CX9mStps.js";import{a as D,g as O,o as k,s as ee,t as A}from"./Rack-fDZClWZL.js";import{n as te,r as ne,t as re}from"./CopyValue-By5BAgv7.js";import{t as j}from"./plus-UDQ_BTEr.js";import{t as M}from"./trash-2-U2ViYZum.js";import{t as N}from"./Toggle-ClEeOh0F.js";import{A as P,C as F,D as I,M as L,O as ie,P as ae,S as oe,T as se,_ as ce,a as le,b as ue,c as de,d as R,i as z,k as fe,l as pe,m as me,n as he,o as ge,r as _e,t as ve,u as ye,v as be,y as xe}from"./States-DtkkMzEu.js";import{t as Se}from"./Chip-BltJSw8A.js";import{i as B,n as V,r as Ce,t as H}from"./Field-B79Yxdit.js";import{t as we}from"./Meter-stpt3vQu.js";import{t as U}from"./Panel-CoulMx6R.js";import{i as Te,n as W,r as G,t as Ee}from"./Table-CVDZ69Zx.js";import{t as De}from"./catalog-BBKm8Ih8.js";import*as Oe from"react";import{Fragment as ke,forwardRef as Ae,useCallback as je,useEffect as Me,useState as K}from"react";import{Fragment as q,jsx as J,jsxs as Y}from"react/jsx-runtime";import X from"styled-components";var Ne=O(`external-link`,[[`path`,{d:`M15 3h6v6`,key:`1q9fwt`}],[`path`,{d:`M10 14 21 3`,key:`gplh6r`}],[`path`,{d:`M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6`,key:`a6xqqp`}]]),Pe=Object.keys(De);function Fe(e){return De[e].authTypes}function Ie(e){return Fe(e).includes(`oauth`)?`oauth`:`apiKey`}var Le={oauth:`Authorize in the browser`,apiKey:`Paste an API key`},Z={anthropic:`Anthropic`,openai:`OpenAI`,kimi:`Kimi`,kilo:`Kilo`,grok:`Grok`,custom:`OpenAI Compatible`},Re={anthropic:`Authorize in the browser, then paste the code Anthropic shows you.`,openai:`Authorize in the browser. When it redirects to localhost, paste the whole URL.`,kimi:`Enter the code on Kimi's device page. This dialog finishes on its own.`,kilo:`Approve the code on Kilo's device page. This dialog finishes on its own.`,grok:`Authorize in the browser. When it redirects to 127.0.0.1, paste the whole URL.`,custom:`Enter endpoint metadata and API key.`},ze={openai:`http://localhost:1455/auth/callback?code=…`,grok:`http://127.0.0.1:56121/callback?code=…`},Be=X.ol`
|
|
2
2
|
display: flex;
|
|
3
3
|
flex-direction: column;
|
|
4
4
|
gap: ${({theme:e})=>e.space(3)};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{d as e,nt as t,t as n,tt as r}from"./queries-CX9mStps.js";import{a as i,t as a}from"./Rack-
|
|
1
|
+
import{d as e,nt as t,t as n,tt as r}from"./queries-CX9mStps.js";import{a as i,t as a}from"./Rack-fDZClWZL.js";import{D as o,n as s,r as c,t as l}from"./States-DtkkMzEu.js";import{i as u}from"./Field-B79Yxdit.js";import{t as d}from"./Panel-CoulMx6R.js";import{useLayoutEffect as f,useRef as p,useState as m}from"react";import{jsx as h,jsxs as g}from"react/jsx-runtime";import _ from"styled-components";var v=[100,200,500],y=[{value:``,label:`All levels`},{value:`debug`,label:`Debug and above`},{value:`info`,label:`Info and above`},{value:`warn`,label:`Warnings and errors`},{value:`error`,label:`Errors only`}],b=_(t)`
|
|
2
2
|
gap: ${({theme:e})=>e.space(2)};
|
|
3
3
|
flex-wrap: wrap;
|
|
4
4
|
`,x=_(u)`
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{$ as e,H as t,I as n,K as r,N as i,Q as a,S as o,_ as s,a as c,at as l,b as u,lt as d,m as f,nt as p,ot as m,rt as h}from"./queries-CX9mStps.js";import{g,o as _,t as v}from"./Rack-
|
|
1
|
+
import{$ as e,H as t,I as n,K as r,N as i,Q as a,S as o,_ as s,a as c,at as l,b as u,lt as d,m as f,nt as p,ot as m,rt as h}from"./queries-CX9mStps.js";import{g,o as _,t as v}from"./Rack-fDZClWZL.js";import{A as y,O as b,i as x,j as S,n as C,r as w,t as T,w as E}from"./States-DtkkMzEu.js";import{r as D,t as O}from"./Field-B79Yxdit.js";import{t as k}from"./Meter-stpt3vQu.js";import{t as A}from"./Panel-CoulMx6R.js";import{i as j,n as M,r as N,t as P}from"./Table-CVDZ69Zx.js";import{t as F}from"./Readout-D1XEfywe.js";import{n as I}from"./reasons-Cb8yF4Oy.js";import{useQueryClient as L}from"@tanstack/react-query";import{useCallback as R,useState as z}from"react";import{Fragment as B,jsx as V,jsxs as H}from"react/jsx-runtime";import U from"styled-components";var W=g(`camera`,[[`path`,{d:`M13.997 4a2 2 0 0 1 1.76 1.05l.486.9A2 2 0 0 0 18.003 7H20a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V9a2 2 0 0 1 2-2h1.997a2 2 0 0 0 1.759-1.048l.489-.904A2 2 0 0 1 10.004 4z`,key:`18u6gg`}],[`circle`,{cx:`12`,cy:`13`,r:`3`,key:`1vg3eu`}]]),G=g(`minimize-2`,[[`path`,{d:`m14 10 7-7`,key:`oa77jy`}],[`path`,{d:`M20 10h-6V4`,key:`mjg0md`}],[`path`,{d:`m3 21 7-7`,key:`tjx5ai`}],[`path`,{d:`M4 14h6v6`,key:`rmj7iw`}]]),K=[{id:`keepLatest`,label:`Snapshots kept`,hint:`How many survive regardless of age. The newest is always kept, whatever both numbers say.`,unit:`files`,max:100},{id:`maxAgeDays`,label:`Maximum age`,hint:`Older snapshots are pruned after every new one and on the hourly maintenance sweep.`,unit:`days`,max:3650}],q=U.p`
|
|
2
2
|
font-size: 12px;
|
|
3
3
|
color: ${({theme:e})=>e.color.down};
|
|
4
4
|
`,J=U.p`
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{$ as e,D as t,G as n,O as r,Q as i,at as a,dt as o,et as s,g as c,h as l,it as u,lt as d,nt as f,ot as p,rt as m,z as h}from"./queries-CX9mStps.js";import{a as g,r as _,t as ee}from"./Rack-
|
|
1
|
+
import{$ as e,D as t,G as n,O as r,Q as i,at as a,dt as o,et as s,g as c,h as l,it as u,lt as d,nt as f,ot as p,rt as m,z as h}from"./queries-CX9mStps.js";import{a as g,r as _,t as ee}from"./Rack-fDZClWZL.js";import{n as v,t as y}from"./TokenBreakdown-D70VeZ2N.js";import{A as b,D as x,E as S,M as C,N as w,a as T,b as te,d as E,g as D,h as O,j as k,l as A,n as j,o as M,p as N,s as P,t as F,u as I,v as ne,x as re}from"./States-DtkkMzEu.js";import{n as L,t as R}from"./Chip-BltJSw8A.js";import{t as z}from"./Meter-stpt3vQu.js";import{t as B}from"./Panel-CoulMx6R.js";import{i as V,n as H,r as U,t as W}from"./Table-CVDZ69Zx.js";import{t as G}from"./Readout-D1XEfywe.js";import{Fragment as K,jsx as q,jsxs as J}from"react/jsx-runtime";import Y from"styled-components";var X=Y(p)`
|
|
2
2
|
font-weight: 500;
|
|
3
3
|
display: block;
|
|
4
4
|
max-width: 24ch;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{$ as e,C as t,O as n,P as r,R as i,at as a,et as o,lt as s,nt as c,ot as l,p as u,rt as d,ut as f}from"./queries-CX9mStps.js";import{m as p,o as m,s as h,t as g}from"./Rack-
|
|
1
|
+
import{$ as e,C as t,O as n,P as r,R as i,at as a,et as o,lt as s,nt as c,ot as l,p as u,rt as d,ut as f}from"./queries-CX9mStps.js";import{m as p,o as m,s as h,t as g}from"./Rack-fDZClWZL.js";import{n as _,r as v,t as y}from"./CopyValue-By5BAgv7.js";import{t as b}from"./plus-UDQ_BTEr.js";import{t as x}from"./Toggle-ClEeOh0F.js";import{O as S,i as C,n as w,r as T,t as E}from"./States-DtkkMzEu.js";import{t as D}from"./Chip-BltJSw8A.js";import{n as O,r as k,t as A}from"./Field-B79Yxdit.js";import{t as j}from"./Meter-stpt3vQu.js";import{t as M}from"./Panel-CoulMx6R.js";import{i as N,n as P,r as F,t as I}from"./Table-CVDZ69Zx.js";import{Fragment as L,useState as R}from"react";import{Fragment as z,jsx as B,jsxs as V}from"react/jsx-runtime";import H from"styled-components";var U=[{dimension:`requests`,window:`1m`},{dimension:`requests`,window:`5h`},{dimension:`requests`,window:`1w`},{dimension:`tokens`,window:`1m`},{dimension:`tokens`,window:`5h`},{dimension:`tokens`,window:`1w`},{dimension:`spend`,window:`5h`},{dimension:`spend`,window:`1w`},{dimension:`concurrency`,window:null}];function W(e){return e.window===null?e.dimension:`${e.dimension}:${e.window}`}var G={requests:`Requests`,tokens:`Tokens`,spend:`Spend`,concurrency:`Concurrent`},ee={"1m":`per minute`,"5h":`per 5 hours`,"1w":`per week`};function K(e){let t=G[e.dimension];return e.window===null?t:`${t} ${ee[e.window]}`}function q(e,t){return e===`spend`?`$${t<1?t.toFixed(4):t.toFixed(2)}`:t.toLocaleString(`en-US`)}function J(e){return e.used===null||e.limit<=0?null:Math.max(0,e.used/e.limit)}function te(e){let t=null,n=-1;for(let r of e){let e=J(r);e!==null&&e>n&&(t=r,n=e)}return t}function Y(e){let t={};for(let e of U)t[W(e)]=``;if(e===null)return t;for(let n of U){let r=n.window===null?e.concurrency:n.dimension===`requests`?e.requests?.[n.window]:n.dimension===`tokens`?e.tokens?.[n.window]:n.window===`1m`?void 0:e.spend?.[n.window];r!=null&&(t[W(n)]=String(r))}return t}function X(e){let t={},n={},r={},i;for(let a of U){let o=(e[W(a)]??``).trim();if(o.length===0)continue;let s=Number(o),c=a.dimension===`spend`;if(!Number.isFinite(s)||s<=0||!c&&!Number.isInteger(s))return{problem:c?`${K(a)} must be an amount above zero, or blank for no limit.`:`${K(a)} must be a whole number above zero, or blank for no limit.`};a.window===null?i=s:a.dimension===`requests`?t[a.window]=s:a.dimension===`tokens`?n[a.window]=s:a.window!==`1m`&&(r[a.window]=s)}return{limits:{...Object.keys(t).length>0?{requests:t}:{},...Object.keys(n).length>0?{tokens:n}:{},...Object.keys(r).length>0?{spend:r}:{},...i===void 0?{}:{concurrency:i}}}}var Z=H.div`
|
|
2
2
|
display: grid;
|
|
3
3
|
grid-template-columns: repeat(3, minmax(0, 1fr));
|
|
4
4
|
gap: ${({theme:e})=>e.space(2)};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{$ as e,C as t,D as n,at as r,et as i,g as ee,j as a,lt as o,n as te,nt as s,ot as c,rt as l,s as u}from"./queries-CX9mStps.js";import{a as ne,s as re,t as ie}from"./Rack-
|
|
1
|
+
import{$ as e,C as t,D as n,at as r,et as i,g as ee,j as a,lt as o,n as te,nt as s,ot as c,rt as l,s as u}from"./queries-CX9mStps.js";import{a as ne,s as re,t as ie}from"./Rack-fDZClWZL.js";import{n as d,r as f,t as p}from"./TokenBreakdown-D70VeZ2N.js";import{A as m,D as h,E as g,F as _,N as v,O as y,a as ae,f as b,g as oe,h as se,k as ce,n as x,p as S,r as C,t as w}from"./States-DtkkMzEu.js";import{n as T,t as E}from"./Chip-BltJSw8A.js";import{i as D,n as O}from"./Field-B79Yxdit.js";import{t as k}from"./Panel-CoulMx6R.js";import{i as le,n as A,r as j,t as ue}from"./Table-CVDZ69Zx.js";import{useEffect as M,useMemo as N,useState as P}from"react";import{Fragment as F,jsx as I,jsxs as L}from"react/jsx-runtime";import R from"styled-components";var z={none:{legend:`Not captured`,message:`Body capture was not running for this request. It needs OMNI_BODY_LOGGING_ALLOWED in the environment and the body logging setting turned on, and the calling key must not have opted out.`},missing:{legend:`Captured, then lost`,message:`This request was captured, but its artifact is no longer on disk. Retention or the row cap has since pruned it, or something removed the file underneath the gateway.`},corrupt:{legend:`Captured, but unreadable`,message:`This request was captured and the artifact is still on disk, but it failed its checksum or would not decrypt. Changing OMNI_ENCRYPTION_KEY invalidates every artifact written under the old one.`}},B=new Intl.NumberFormat(`en-US`),V=R.p`
|
|
2
2
|
font-size: 12px;
|
|
3
3
|
color: ${({theme:e})=>e.color.inkDim};
|
|
4
4
|
max-width: 62ch;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{$ as e,F as t,O as n,at as r,et as i,g as a,it as o,lt as s,nt as c,ot as l,ut as u,x as d,y as f,z as p}from"./queries-CX9mStps.js";import{r as m}from"./index-
|
|
1
|
+
import{$ as e,F as t,O as n,at as r,et as i,g as a,it as o,lt as s,nt as c,ot as l,ut as u,x as d,y as f,z as p}from"./queries-CX9mStps.js";import{r as m}from"./index-COwhxKU7.js";import{g as h,o as g,t as _}from"./Rack-fDZClWZL.js";import{t as v}from"./plus-UDQ_BTEr.js";import{t as y}from"./trash-2-U2ViYZum.js";import{t as b}from"./Toggle-ClEeOh0F.js";import{i as x,n as S,r as C,t as w}from"./States-DtkkMzEu.js";import{n as T,t as E}from"./Chip-BltJSw8A.js";import{i as D,n as O,r as k,t as A}from"./Field-B79Yxdit.js";import{t as j}from"./Meter-stpt3vQu.js";import{t as M}from"./Panel-CoulMx6R.js";import{i as N,n as ee,r as P,t as F}from"./catalog-BBKm8Ih8.js";import{useEffect as I,useId as te,useState as L}from"react";import{Fragment as R,jsx as z,jsxs as B}from"react/jsx-runtime";import V from"styled-components";var ne=h(`play`,[[`path`,{d:`M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z`,key:`10ikf1`}]]),re=h(`rotate-ccw`,[[`path`,{d:`M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8`,key:`1357e3`}],[`path`,{d:`M3 3v5h5`,key:`1xhq8a`}]]),H=[`tier`,`health`,`quota`,`cost`,`latency`,`load`],ie={tier:`How preferred this tier is`,health:`Consecutive failures and breaker state`,quota:`Headroom in the tightest window, against how much of it is left`,cost:`Price of this request against the other candidates`,latency:`Observed time to first token`,load:`Requests in flight on this pair right now`},ae=V.li`
|
|
2
2
|
padding: ${({theme:e})=>e.space(2)} 0;
|
|
3
3
|
border-bottom: 1px solid ${({theme:e})=>e.color.rule};
|
|
4
4
|
|
package/public/assets/{_app.plugins._pluginId-Dl_jYunC.js → _app.plugins._pluginId-B-ZDQNPU.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{J as e,X as t,Y as n,Z as r,at as i,k as a}from"./queries-CX9mStps.js";import{a as o,s}from"./index-
|
|
1
|
+
import{J as e,X as t,Y as n,Z as r,at as i,k as a}from"./queries-CX9mStps.js";import{a as o,s}from"./index-COwhxKU7.js";import{t as c}from"./Rack-fDZClWZL.js";import{n as l,r as u,t as d}from"./States-DtkkMzEu.js";import{t as f}from"./Panel-CoulMx6R.js";import{Component as p,Suspense as m,createContext as h,lazy as g,useContext as _,useMemo as v}from"react";import{Fragment as y,jsx as b,jsxs as x}from"react/jsx-runtime";import S from"styled-components";import{pluginApiPath as C}from"@omnigateway/dashboard-sdk";var w=new Map;function T(i){let a=w.get(i);if(a!==void 0)return a;let o={get:(e,t)=>n(C(i,e),t),post:(e,n)=>t(C(i,e),n),put:(e,t)=>r(C(i,e),t),del:t=>e(C(i,t))};return w.set(i,o),o}var E=h(e=>s(()=>import(e),[]));E.Provider;function D(){return _(E)}function O(e,t){let n=e?.default;if(n==null)throw Error(`plugin ${t} has no default export from definePluginUI`);if(typeof n.mount!=`function`)throw Error(`plugin ${t} exported a default without a mount function`);return n}function k(e,t,n){return g(async()=>{let r=O(await n(t),e);return{default:()=>r.mount({pluginId:e,api:T(e)})}})}var A=S.p`
|
|
2
2
|
font-size: 13px;
|
|
3
3
|
color: ${({theme:e})=>e.color.down};
|
|
4
4
|
`,j=S.p`
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import{$ as e,L as t,O as n,at as r,c as i,et as a,it as o,lt as s,nt as c,o as l,z as u}from"./queries-CX9mStps.js";import{t as d}from"./Rack-fDZClWZL.js";import{t as f}from"./Toggle-ClEeOh0F.js";import{i as p,n as m,r as h}from"./States-DtkkMzEu.js";import{i as g,n as _,t as v}from"./Field-B79Yxdit.js";import{t as y}from"./Meter-stpt3vQu.js";import{t as b}from"./Panel-CoulMx6R.js";import{useEffect as x,useState as S}from"react";import{Fragment as C,jsx as w,jsxs as T}from"react/jsx-runtime";import E from"styled-components";var D=[{id:`claude`,label:`Claude Code`,where:`settings.json under ~/.claude`},{id:`opencode`,label:`opencode`,where:`opencode.json in your project`}],O=E(a)`
|
|
2
|
+
display: block;
|
|
3
|
+
white-space: pre;
|
|
4
|
+
overflow-x: auto;
|
|
5
|
+
padding: 0.75rem;
|
|
6
|
+
background: ${({theme:e})=>e.color.panelSunk};
|
|
7
|
+
border: 1px solid ${({theme:e})=>e.color.rule};
|
|
8
|
+
border-radius: 4px;
|
|
9
|
+
font-size: 0.8125rem;
|
|
10
|
+
line-height: 1.5;
|
|
11
|
+
`,k=E.div`
|
|
12
|
+
color: ${({theme:e})=>e.color.inkDim};
|
|
13
|
+
font-size: 0.8125rem;
|
|
14
|
+
margin-bottom: 0.25rem;
|
|
15
|
+
`,A=E.p`
|
|
16
|
+
color: ${({theme:e})=>e.color.inkDim};
|
|
17
|
+
font-size: 0.8125rem;
|
|
18
|
+
margin: 0;
|
|
19
|
+
`,j=E.div`
|
|
20
|
+
display: grid;
|
|
21
|
+
grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr));
|
|
22
|
+
gap: ${({theme:e})=>e.space(2)};
|
|
23
|
+
`,M=[{key:`defaultModel`,label:`Default model`,required:!0},{key:`fableModel`,label:`Fable model`,required:!1},{key:`opusModel`,label:`Opus model`,required:!1},{key:`sonnetModel`,label:`Sonnet model`,required:!1},{key:`haikuModel`,label:`Haiku model`,required:!1}];function N(){let[e,t]=S(`claude`),[i,o]=S(()=>({claude:{},opencode:{}})),u=n(),d=i[e],f=typeof d.defaultModel==`string`&&d.defaultModel!==``?d:void 0,_=l(e,f),y=D.find(t=>t.id===e);return w(b,{legend:`Agent setup`,children:T(r,{children:[w(c,{children:D.map(n=>w(s,{type:`button`,$variant:n.id===e?`primary`:`ghost`,onClick:()=>t(n.id),children:n.label},n.id))}),T(A,{children:[y?.where,`. The key is a placeholder — paste your own over it. Or run`,` `,T(a,{children:[`omni setup `,e]}),` to write these files directly.`]}),(u.data?.length??0)>0?w(j,{children:M.map(t=>w(v,{label:t.label,children:n=>T(g,{...n,value:d[t.key]??``,onChange:n=>o(r=>({...r,[e]:{...r[e],[t.key]:n.target.value||void 0}})),children:[w(`option`,{value:``,children:t.required?`Choose a pool`:`Not mapped`}),u.data?.map(e=>w(`option`,{value:e.id,children:e.id},e.id))]})},t.key))}):null,u.isLoading?w(h,{rows:2}):_.isError?w(m,{error:_.error,onRetry:()=>void _.refetch()}):_.isLoading?w(h,{rows:4}):(u.data?.length??0)===0?w(A,{children:`No virtual models configured yet, so there is nothing to point a client at.`}):f===void 0?T(A,{children:[`Choose a default model to generate `,y?.label,` settings.`]}):_.data===void 0||_.data.length===0?w(A,{children:`No virtual models configured yet, so there is nothing to point a client at.`}):_.data.map(e=>T(`div`,{children:[w(k,{children:e.path}),w(O,{as:`pre`,children:e.contents.trimEnd()})]},e.path)),_.isError?w(A,{children:p(_.error)}):null]})})}var P=[{id:`tier`,label:`Tier`,blurb:`How strongly a lower tier is preferred.`},{id:`health`,label:`Health`,blurb:`Penalty for recent failures and an open breaker.`},{id:`quota`,label:`Quota`,blurb:`Preference for accounts keeping ahead of their window's burn rate.`},{id:`cost`,label:`Cost`,blurb:`Preference for the cheaper target of the candidates.`},{id:`latency`,label:`Latency`,blurb:`Preference for the faster observed first token.`},{id:`load`,label:`Load`,blurb:`Preference for accounts with fewer requests in flight right now.`}],F=[{id:`maxAttempts`,label:`Attempts per request`,hint:`How many candidates dispatch may try before giving up. 1 disables failover.`,unit:`attempts`,step:1,min:1},{id:`requestDeadlineMs`,label:`Request deadline`,hint:`How long a request may take across all attempts. 0 disables only OmniGateway's deadline.`,unit:`ms`,step:1e3,min:0},{id:`breakerThreshold`,label:`Breaker threshold`,hint:`Consecutive failures on one account and model before it is taken out of rotation.`,unit:`failures`,step:1,min:1},{id:`breakerCooldownMs`,label:`Breaker cooldown`,hint:`Base wait before a tripped account is probed again. Doubles per extra failure.`,unit:`ms`,step:1e3,min:1},{id:`logRetentionDays`,label:`Log retention`,hint:`How long request rows are kept before maintenance prunes them.`,unit:`days`,step:1,min:1},{id:`quotaPollIntervalMs`,label:`Quota poll interval`,hint:`How often each account's provider is asked for its remaining quota. 0 disables polling. Takes effect on restart.`,unit:`ms`,step:6e4,min:0}],I=E.div`
|
|
24
|
+
display: grid;
|
|
25
|
+
grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
|
|
26
|
+
gap: ${({theme:e})=>e.space(3)};
|
|
27
|
+
`,L=E(r)`
|
|
28
|
+
gap: 6px;
|
|
29
|
+
`,R=E.p`
|
|
30
|
+
font-size: 11px;
|
|
31
|
+
color: ${({theme:e})=>e.color.inkDim};
|
|
32
|
+
`,z=E.p`
|
|
33
|
+
font-size: 12px;
|
|
34
|
+
color: ${({theme:e})=>e.color.down};
|
|
35
|
+
`,B=E.p`
|
|
36
|
+
font-size: 12px;
|
|
37
|
+
color: ${({theme:e})=>e.color.ok};
|
|
38
|
+
`,V=E.p`
|
|
39
|
+
font-size: 12px;
|
|
40
|
+
color: ${({theme:e})=>e.color.warn};
|
|
41
|
+
max-width: 72ch;
|
|
42
|
+
|
|
43
|
+
code {
|
|
44
|
+
font-family: ${({theme:e})=>e.font.mono};
|
|
45
|
+
}
|
|
46
|
+
`;function H(e){let t={};for(let n of P)t[`w.${n.id}`]=String(e.weights[n.id]);for(let n of F)t[n.id]=String(e[n.id]);return t.rtkEnabled=String(e.rtkEnabled),t.autoCacheEnabled=String(e.autoCacheEnabled),t.bodyLoggingEnabled=String(e.bodyLoggingEnabled),t.bodyLoggingCaptureStreamChunks=String(e.bodyLoggingCaptureStreamChunks),t}function U(e){let t={};for(let n of P){let r=(e[`w.${n.id}`]??``).trim(),i=Number(r);if(r.length===0||!Number.isFinite(i))return{ok:!1,problem:`${n.label} must be a number.`};t[n.id]=i}let n={};for(let t of F){let r=(e[t.id]??``).trim(),i=Number(r);if(r.length===0||!Number.isInteger(i)||i<t.min)return{ok:!1,problem:`${t.label} must be a whole number of ${t.min} or more.`};n[t.id]=i}return n.maxAttempts>10?{ok:!1,problem:`Attempts per request cannot exceed 10.`}:{ok:!0,settings:{weights:t,...n,rtkEnabled:e.rtkEnabled===`true`,autoCacheEnabled:e.autoCacheEnabled===`true`,bodyLoggingEnabled:e.bodyLoggingEnabled===`true`,bodyLoggingCaptureStreamChunks:e.bodyLoggingCaptureStreamChunks===`true`}}}function W(){let n=u(),l=i(),g=t(),[E,D]=S({}),[O,k]=S(null),[A,j]=S(!1);x(()=>{n.data!==void 0&&D(H(n.data))},[n.data]);let M=Math.max(1e-4,...P.map(e=>Math.abs(Number(E[`w.${e.id}`])||0)));return T(C,{children:[w(d,{legend:`Settings`,title:`Routing and retention`,summary:`These apply to every request the gateway routes. Changes take effect on the next request; nothing is restarted.`,actions:w(s,{type:`button`,$variant:`primary`,disabled:g.isPending||n.isLoading,onClick:()=>{j(!1);let e=U(E);if(!e.ok){k(e.problem);return}k(null),g.mutate(e.settings,{onSuccess:()=>j(!0),onError:e=>k(p(e))})},children:g.isPending?`Saving…`:`Save changes`})}),n.isError?w(b,{legend:`Settings`,children:w(m,{error:n.error,onRetry:()=>void n.refetch()})}):n.isLoading?w(b,{legend:`Settings`,children:w(h,{rows:6})}):T(r,{$gap:4,children:[w(b,{legend:`Scoring weights`,meta:`relative to each other`,footer:T(c,{children:[w(e,{children:`A candidate's score is the sum of each term times its weight, then multiplied by the account and target weights.`}),w(o,{})]}),children:w(I,{children:P.map(e=>{let t=Number(E[`w.${e.id}`])||0;return T(L,{children:[w(v,{label:e.label,children:t=>w(_,{...t,type:`number`,step:.5,value:E[`w.${e.id}`]??``,onChange:t=>D({...E,[`w.${e.id}`]:t.target.value})})}),w(y,{fraction:Math.abs(t)/M,height:4,tone:`var(--accent)`,label:`${e.label} weight ${t}`}),w(R,{children:e.blurb})]},e.id)})})}),w(b,{legend:`Limits`,children:w(I,{children:F.map(t=>w(L,{children:w(v,{label:t.label,hint:t.hint,children:n=>T(c,{$gap:2,children:[w(_,{...n,type:`number`,min:t.min,step:t.step,value:E[t.id]??``,onChange:e=>D({...E,[t.id]:e.target.value})}),w(e,{children:t.unit})]})})},t.id))})}),w(b,{legend:`Historical tool results`,children:T(c,{$gap:3,$align:`start`,children:[w(f,{checked:E.rtkEnabled===`true`,onCheckedChange:e=>D({...E,rtkEnabled:String(e)}),label:`Enable RTK compression`}),w(R,{children:`Compress recognized historical non-error tool results before provider dispatch. Confirmed non-shell tools are excluded; unknown-origin results may be compressed only when a built-in detector recognizes a high-confidence shell-output format. Compression is deterministic and lossy. Disabled by default.`})]})}),w(b,{legend:`Prompt caching`,children:T(c,{$gap:3,$align:`start`,children:[w(f,{checked:E.autoCacheEnabled===`true`,onCheckedChange:e=>D({...E,autoCacheEnabled:String(e)}),label:`Add a cache breakpoint when a client sends none`}),w(R,{children:`Anthropic only caches a prompt the request marks, so a client that marks nothing pays full price to resend the same prefix every turn. This marks the end of the system prompt on Anthropic requests that carry no breakpoint of their own. Requests that already mark one are left exactly as they arrived, and prompts too short to be cacheable are skipped. Enabled by default.`})]})}),w(b,{legend:`Request and response bodies`,meta:l.data===!0?`permitted by the environment`:`not permitted`,children:T(r,{$gap:3,children:[l.data===!0?null:T(V,{children:[`This gateway was started without `,w(`code`,{children:`OMNI_BODY_LOGGING_ALLOWED`}),`, so nothing below can record anything. Set it in the installation's `,w(`code`,{children:`.env`}),` `,`and restart before turning capture on. Two keys mean an admin session on its own cannot start recording prompts.`]}),T(c,{$gap:3,$align:`start`,children:[w(f,{checked:E.bodyLoggingEnabled===`true`,disabled:l.data!==!0,onCheckedChange:e=>D({...E,bodyLoggingEnabled:String(e)}),label:`Capture request and response bodies`}),w(R,{children:`Stores what each client sent and what each provider returned, encrypted under OMNI_ENCRYPTION_KEY beside the database. Bearer tokens and API keys are masked first and headers are never captured. Bodies expire on the log retention window above, and the newest 100,000 requests are kept whatever that window says. Off by default.`})]}),T(c,{$gap:3,$align:`start`,children:[w(f,{checked:E.bodyLoggingCaptureStreamChunks===`true`,disabled:l.data!==!0||E.bodyLoggingEnabled!==`true`,onCheckedChange:e=>D({...E,bodyLoggingCaptureStreamChunks:String(e)}),label:`Also keep raw stream frames`}),w(R,{children:`Retains the raw SSE frames of each attempt as well as the reassembled response. The only way to debug stream framing itself, and by far the most expensive thing capture can store, so it is gated separately rather than implied.`})]})]})}),O===null?null:w(z,{role:`alert`,children:O}),A&&O===null?w(B,{role:`status`,children:`Settings saved.`}):null,w(N,{}),w(b,{legend:`Known limits`,children:T(r,{$gap:2,children:[T(c,{$gap:2,children:[w(a,{$dim:!0,children:`rate limits`}),w(R,{children:`Per-key rate limits are counted inside one gateway process and reset when it restarts. They are not shared across instances.`})]}),T(c,{$gap:2,children:[w(a,{$dim:!0,children:`logs`}),w(R,{children:`Request rows record routing and token counts only. Prompts and responses are written only when body capture above is on, and to a separate encrypted store; credentials are never written to either.`})]})]})})]})]})}var G=W;export{G as component};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{$ as e,A as t,At as n,B as r,C as i,Ct as a,D as o,Dt as s,E as c,Et as l,F as u,G as d,H as f,I as p,J as m,K as h,L as g,M as _,Mt as v,N as y,O as b,Ot as x,P as S,Q as C,R as ee,S as w,St as te,T,Tt as E,U as D,V as ne,W as re,X as ie,Y as ae,Z as oe,_ as se,_t as ce,a as le,at as O,b as k,bt as A,c as j,ct as M,d as ue,dt as de,et as fe,f as N,ft as pe,g as me,gt as he,h as ge,ht as _e,i as ve,it as ye,j as be,jt as xe,k as Se,kt as Ce,l as we,lt as Te,m as Ee,mt as De,n as Oe,nt as ke,o as Ae,ot as je,p as Me,pt as Ne,q as Pe,r as Fe,rt as Ie,s as P,st as Le,t as Re,tt as ze,u as Be,ut as Ve,v as He,vt as Ue,w as We,wt as Ge,x as F,xt as Ke,y as qe,yt as Je,z as Ye}from"./shared-Cct_4xwp.js";import{$ as Xe,C as Ze,G as I,O as Qe,Q as $e,at as L,et as R,g as et,nt as tt,ot as nt,rt}from"./queries-CX9mStps.js";import{i as it,n as at,r as ot}from"./index-CJZIRJ43.js";import{a as st,r as z,t as ct}from"./Rack-Bbk1hAor.js";import{A as lt,D as B,N as V,j as H,n as ut,r as dt,t as ft}from"./States-DtkkMzEu.js";import{t as pt}from"./Panel-CoulMx6R.js";import{i as mt,n as U,r as W,t as ht}from"./Table-CVDZ69Zx.js";import{t as gt}from"./catalog-BBKm8Ih8.js";import{t as G}from"./Readout-D1XEfywe.js";import*as K from"react";import{PureComponent as _t,forwardRef as vt,useMemo as q,useRef as yt,useState as bt}from"react";import{jsx as J,jsxs as Y}from"react/jsx-runtime";import X from"styled-components";function xt(e,t){return e.graphicalItems.cartesianItems.find(e=>e.id===t)?.xAxisId??0}function St(e,t){return e.graphicalItems.cartesianItems.find(e=>e.id===t)?.yAxisId??0}var Ct=(e,t,n)=>C(e,`xAxis`,xt(e,t),n),wt=(e,t,n)=>fe(e,`xAxis`,xt(e,t),n),Tt=(e,t,n)=>C(e,`yAxis`,St(e,t),n),Et=(e,t,n)=>fe(e,`yAxis`,St(e,t),n),Dt=A([M,Ct,Tt,wt,Et],(e,t,n,r,i)=>Ue(e,`xAxis`)?Ne(t,r,!1):Ne(n,i,!1)),Ot=A([ze,(e,t)=>t],(e,t)=>e.filter(e=>e.type===`area`).find(e=>e.id===t)),kt=e=>{var t=M(e);return Ue(t,`xAxis`)?`yAxis`:`xAxis`},At=(e,t)=>kt(e)===`yAxis`?St(e,t):xt(e,t),jt=(t,n,r)=>e(t,kt(t),At(t,n),r),Mt=A([Ot,jt],(e,t)=>{if(e!=null&&t!=null){var n=e.stackId,r=ke(e);if(n!=null&&r!=null){var i=(t[n]?.stackedData)?.find(e=>e.key===r);if(i!=null)return i.map(e=>[e[0],e[1]])}}}),Nt=A([Ot,jt],(e,t)=>{if(e!=null&&e.stackId!=null&&t!=null){var n=t[e.stackId];if(n!=null)return n.graphicalItems.map(e=>e.dataKey).filter(E)}}),Pt=A([M,Ct,Tt,wt,Et,Mt,O,Dt,Ot,ye,Nt],(e,t,n,r,i,a,o,s,c,l,u)=>{var d=o.chartData,f=o.dataStartIndex,p=o.dataEndIndex;if(!(c==null||e!==`horizontal`&&e!==`vertical`||t==null||n==null||r==null||i==null||r.length===0||i.length===0||s==null)){var m=c.data,h=m&&m.length>0?m:d?.slice(f,p+1);if(h!=null)return pn({layout:e,xAxis:t,yAxis:n,xAxisTicks:r,yAxisTicks:i,dataStartIndex:f,areaSettings:c,stackedData:a,displayedData:h,chartBaseValue:l,bandSize:s,stackDataKeys:u})}}),Ft=[`animationElapsedTime`,`isAnimating`,`isEntrance`,`layout`,`isRange`,`stroke`,`connectNulls`],It=[`id`,`baseLine`];function Lt(){return Lt=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Lt.apply(null,arguments)}function Rt(e,t){if(e==null)return{};var n,r,i=zt(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function zt(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function Bt(e){var t=e.alpha,n=e.baseLine,r=e.points,i=e.strokeWidth,a=r[0]?.x,o=r[r.length-1]?.x;if(!Je(a)||!Je(o))return null;var c=t*Math.abs(a-o),l=Math.max(...r.map(e=>e.y||0));return s(n)?l=Math.max(n,l):n&&Array.isArray(n)&&n.length&&(l=Math.max(...n.map(e=>e.y||0),l)),s(l)?K.createElement(`rect`,{x:a<o?a:a-c,y:0,width:c,height:Math.floor(l+(i?parseInt(`${i}`,10):1))}):null}function Vt(e){var t=e.alpha,n=e.baseLine,r=e.points,i=e.strokeWidth,a=r[0]?.y,o=r[r.length-1]?.y;if(!Je(a)||!Je(o))return null;var c=t*Math.abs(a-o),l=Math.max(...r.map(e=>e.x||0));return s(n)?l=Math.max(n,l):n&&Array.isArray(n)&&n.length&&(l=Math.max(...n.map(e=>e.x||0),l)),s(l)?K.createElement(`rect`,{x:0,y:a<o?a:a-c,width:l+(i?parseInt(`${i}`,10):1),height:Math.floor(c)}):null}function Ht(e){var t=e.alpha,n=e.layout,r=e.points,i=e.baseLine,a=e.strokeWidth;return n===`vertical`?K.createElement(Vt,{alpha:t,points:r,baseLine:i,strokeWidth:a}):K.createElement(Bt,{alpha:t,points:r,baseLine:i,strokeWidth:a})}function Ut(e){var t=e.animationElapsedTime,n=t===void 0?1:t,r=e.isAnimating,i=r!==void 0&&r,a=e.isEntrance,o=a!==void 0&&a,s=e.layout,c=e.isRange,l=e.stroke,u=e.connectNulls,d=Rt(e,Ft),f=s===`vertical`?`vertical`:`horizontal`,m=u??!1,h=p(),g=d.id,_=d.baseLine,v=Rt(d,It),y=xe(v),b=K.createElement(je,Lt({},d,{id:g,baseLine:_,connectNulls:m,stroke:`none`,className:`recharts-area-area`,layout:f})),x=l!==`none`&&K.createElement(je,Lt({},y,{className:`recharts-area-curve`,layout:f,type:d.type,connectNulls:m,fill:`none`,stroke:l,points:d.points})),S=l!==`none`&&c&&Array.isArray(_)&&K.createElement(je,Lt({},y,{className:`recharts-area-curve`,layout:f,type:d.type,connectNulls:m,fill:`none`,stroke:l,points:_}));return o&&(i||n<1)?K.createElement(Ce,null,K.createElement(`defs`,null,K.createElement(`clipPath`,{id:h},K.createElement(Ht,{alpha:n,points:d.points??[],baseLine:_,layout:f,strokeWidth:d.strokeWidth}))),K.createElement(Ce,{clipPath:`url(#${h})`},b,x,S)):K.createElement(K.Fragment,null,b,x,S)}var Wt=[`id`],Gt=[`activeDot`,`animationBegin`,`animationDuration`,`animationEasing`,`connectNulls`,`dot`,`fill`,`fillOpacity`,`hide`,`isAnimationActive`,`legendType`,`stroke`,`xAxisId`,`yAxisId`];function Kt(){return Kt=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Kt.apply(null,arguments)}function qt(e,t){if(e==null)return{};var n,r,i=Jt(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function Jt(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function Yt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Z(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?Yt(Object(n),!0).forEach(function(t){Xt(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Yt(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Xt(e,t,n){return(t=Zt(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Zt(e){var t=Qt(e,`string`);return typeof t==`symbol`?t:t+``}function Qt(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}var $t={activeDot:!0,animationBegin:0,animationDuration:1500,animationEasing:`ease`,animationMatchBy:ne,animationInterpolateFn:(e,t)=>e==null?[]:t===1?e.flatMap(e=>e.status===`removed`?[]:[e.next]):e.flatMap(e=>e.status===`matched`?[Z(Z({},e.next),{},{x:a(e.prev.x,e.next.x,t),y:a(e.prev.y,e.next.y,t)})]:e.status===`added`?[e.next]:[]),connectNulls:!1,dot:!1,fill:`#3182bd`,fillOpacity:.6,hide:!1,isAnimationActive:`auto`,legendType:`line`,stroke:`#3182bd`,strokeWidth:1,type:`linear`,label:!1,shape:Ut,xAxisId:0,yAxisId:0,zIndex:Ie.area};function en(e,t){return e&&e!==`none`?e:t}var tn=e=>{var t=e.dataKey,n=e.name,r=e.stroke,i=e.fill,a=e.legendType;return[{inactive:e.hide,dataKey:t,type:a,color:en(r,i),value:he(n,t),payload:e}]},nn=K.memo(e=>{var t=e.dataKey,n=e.data,r=e.stroke,i=e.strokeWidth,a=e.fill,o=e.name,s=e.hide,c=e.unit,l=e.formatter,u=e.tooltipType,d=e.id,f={dataDefinedOnItem:n,getPosition:x,settings:{stroke:r,strokeWidth:i,fill:a,dataKey:t,nameKey:void 0,name:he(o,t),hide:s,type:u,color:en(r,a),unit:c,formatter:l,graphicalItemId:d}};return K.createElement(D,{tooltipEntrySettings:f})});function rn(e){var t=e.clipPathId,n=e.points,r=e.props,i=r.needClip,a=r.dot,o=r.dataKey,s=xe(r);return K.createElement(y,{points:n,dot:a,className:`recharts-area-dots`,dotClassName:`recharts-area-dot`,dataKey:o,baseProps:s,needClip:i,clipPathId:t})}function an(e){var t=e.showLabels,n=e.children,r=e.points.map(e=>{var t={x:e.x??0,y:e.y??0,width:0,lowerWidth:0,upperWidth:0,height:0};return Z(Z({},t),{},{value:e.value,payload:e.payload,parentViewBox:void 0,viewBox:t,fill:void 0})});return K.createElement(h,{value:t?r:void 0},n)}function on(e){var t=e.points,r=e.baseLine,i=e.needClip,a=e.clipPathId,o=e.props,s=e.animationElapsedTime,c=e.isAnimating,l=e.isEntrance,u=o.layout,d=o.type,f=o.stroke,p=o.connectNulls,m=o.isRange,h=o.shape,g=o.id,_=qt(o,Wt),v=Z(Z({},n(_)),{},{id:g,points:t,connectNulls:p,type:d,baseLine:r,layout:u,stroke:f,isRange:m,animationElapsedTime:s,isAnimating:c,isEntrance:l});return K.createElement(K.Fragment,null,t?.length>1&&K.createElement(Ce,{clipPath:i?`url(#clipPath-${a})`:void 0},K.createElement(re,{option:h,DefaultShape:$t.shape,shapeProps:v})),K.createElement(rn,{points:t,props:_,clipPathId:a}))}function sn(e,t,n){if(s(e)){var r=s(t)?t:void 0;return a(r,e,n)}if(l(e)||Ge(e)){var i=s(t)?t:void 0;return a(i,0,n)}return e}function cn(e){var t=e.needClip,n=e.clipPathId,i=e.props,a=e.previousPointsRef,o=e.previousBaselineRef,s=i.points,c=i.baseLine,l=i.isAnimationActive,u=i.animationBegin,d=i.animationDuration,f=i.animationEasing,p=i.animationMatchBy,m=i.animationInterpolateFn,h=q(()=>({points:s,baseLine:c}),[s,c]),_=Ye(h,o),v=Te(),y=ee(i.onAnimationStart,i.onAnimationEnd),b=y.isAnimating,x=y.handleAnimationStart,S=y.handleAnimationEnd,C=_.startValue;if(v==null)return null;var w=Array.isArray(c)&&Array.isArray(C)?r(C,c,p):Array.isArray(c)?r(null,c,p):null;return K.createElement(g,{animationInput:h,animationIdPrefix:`recharts-area-`,items:s,previousItemsRef:a,isAnimationActive:l,animationBegin:u,animationDuration:d,animationEasing:f,onAnimationStart:x,onAnimationEnd:S,animationInterpolateFn:m,animationMatchBy:p,layout:v},(e,r,a)=>{var o=r===1?c:Array.isArray(c)?m(w,r,v):a?c:sn(c,C,r);return _.syncStepValue(o,r),K.createElement(an,{showLabels:!b,points:s},i.children,K.createElement(on,{points:e,baseLine:o,needClip:t,clipPathId:n,props:i,animationElapsedTime:r,isAnimating:b||r<1,isEntrance:a}),K.createElement(Pe,{label:i.label}))})}function ln(e){var t=e.needClip,n=e.clipPathId,r=e.props,i=yt(null),a=yt();return K.createElement(cn,{needClip:t,clipPathId:n,props:r,previousPointsRef:i,previousBaselineRef:a})}var un=class extends _t{render(){var e=this.props,t=e.hide,n=e.dot,r=e.points,i=e.className,a=e.top,s=e.left,c=e.needClip,l=e.xAxisId,u=e.yAxisId,f=e.width,p=e.height,m=e.id,h=e.baseLine,g=e.zIndex;if(t)return null;var _=v(`recharts-area`,i),y=m,x=o(n),S=x.r,C=x.strokeWidth,ee=d(n),w=S*2+C,te=c?`url(#clipPath-${ee?``:`dots-`}${y})`:void 0;return K.createElement(ie,{zIndex:g},K.createElement(Ce,{className:_},c&&K.createElement(`defs`,null,K.createElement(b,{clipPathId:y,xAxisId:l,yAxisId:u}),!ee&&K.createElement(`clipPath`,{id:`clipPath-dots-${y}`},K.createElement(`rect`,{x:s-w/2,y:a-w/2,width:f+w,height:p+w}))),K.createElement(ln,{needClip:c,clipPathId:y,props:this.props})),K.createElement(be,{points:r,mainColor:en(this.props.stroke,this.props.fill),itemDataKey:this.props.dataKey,activeDot:this.props.activeDot,clipPath:te}),this.props.isRange&&Array.isArray(h)&&K.createElement(be,{points:h,mainColor:en(this.props.stroke,this.props.fill),itemDataKey:this.props.dataKey,activeDot:this.props.activeDot,clipPath:te}))}};function dn(e){var t=e.activeDot,n=e.animationBegin,r=e.animationDuration,i=e.animationEasing,a=e.connectNulls,o=e.dot,s=e.fill,c=e.fillOpacity,l=e.hide,u=e.isAnimationActive,d=e.legendType,f=e.stroke,p=e.xAxisId,m=e.yAxisId,h=qt(e,Gt),g=Ve(),v=oe(),y=Se(p,m).needClip,b=pe(),x=Ke(t=>Pt(t,e.id,b))??{},S=x.points,C=x.isRange,ee=x.baseLine,w=_();if(g!==`horizontal`&&g!==`vertical`||w==null||v!==`AreaChart`&&v!==`ComposedChart`)return null;var te=w.height,T=w.width,E=w.x,D=w.y;return!S||!S.length?null:K.createElement(un,Kt({},h,{activeDot:t,animationBegin:n,animationDuration:r,animationEasing:i,baseLine:ee,connectNulls:a,dot:o,fill:s,fillOpacity:c,height:te,hide:l,layout:g,isAnimationActive:u,isRange:C,legendType:d,needClip:y,points:S,stroke:f,width:T,left:E,top:D,xAxisId:p,yAxisId:m}))}var fn=(e,t,n,r,i)=>{var a=n??t;if(s(a))return a;var o=e===`horizontal`?i:r,c=o.scale.domain();if(o.type===`number`){var l=Math.max(c[0],c[1]),u=Math.min(c[0],c[1]);return a===`dataMin`?u:a===`dataMax`||l<0?l:Math.max(Math.min(c[0],c[1]),0)}return a===`dataMin`?c[0]:a===`dataMax`?c[1]:c[0]};function pn(e){var t=e.areaSettings,n=t.connectNulls,r=t.baseValue,i=t.dataKey,a=e.stackedData,o=e.layout,s=e.chartBaseValue,c=e.xAxis,l=e.yAxis,u=e.displayedData,d=e.dataStartIndex,f=e.xAxisTicks,p=e.yAxisTicks,m=e.bandSize,h=e.stackDataKeys,g=a&&a.length,_=fn(o,s,r,c,l),v=o===`horizontal`,y=!1,b=u.map((e,t)=>{var r;if(g)r=a[d+t];else{var o=ce(e,i);Array.isArray(o)?(r=o,y=!0):r=[_,o]}var s=r?.[1]??null,u=ce(e,i),b=g&&u==null&&h!=null&&h.length>0&&h.every(t=>ce(e,t)==null),x=s==null||g&&!n&&u==null||b;return v?{x:De({axis:c,ticks:f,bandSize:m,entry:e,index:t}),y:x?null:l.scale.map(s)??null,value:r,payload:e}:{x:x?null:c.scale.map(s)??null,y:De({axis:l,ticks:p,bandSize:m,entry:e,index:t}),value:r,payload:e}});return{points:b,baseLine:(g||y?b.map(e=>{var t=Array.isArray(e.value)?e.value[0]:null;return v?{x:e.x,y:t!=null&&e.y!=null?l.scale.map(t)??null:null,payload:e.payload}:{x:t==null?null:c.scale.map(t)??null,y:e.y,payload:e.payload}}):v?l.scale.map(_):c.scale.map(_))??0,isRange:y}}function mn(e){var t=te(e,$t),n=pe();return K.createElement(u,{id:t.id,type:`area`},e=>K.createElement(K.Fragment,null,K.createElement(f,{legendPayload:tn(t)}),K.createElement(nn,{dataKey:t.dataKey,data:t.data,stroke:t.stroke,strokeWidth:t.strokeWidth,fill:t.fill,name:t.name,hide:t.hide,unit:t.unit,formatter:t.formatter,tooltipType:t.tooltipType,id:e}),K.createElement(S,{type:`area`,id:e,data:t.data,dataKey:t.dataKey,xAxisId:t.xAxisId,yAxisId:t.yAxisId,zAxisId:0,stackId:_e(t.stackId),hide:t.hide,barSize:void 0,baseValue:t.baseValue,isPanorama:n,connectNulls:t.connectNulls}),K.createElement(dn,Kt({},t,{id:e}))))}var hn=K.memo(mn,Le);hn.displayName=`Area`;var gn=[`axis`],_n=vt((e,t)=>K.createElement(i,{chartName:`AreaChart`,defaultTooltipEventType:`axis`,validateTooltipEventTypes:gn,tooltipPayloadSearcher:ae,categoricalChartProps:e,ref:t})),vn=[`axis`],yn=vt((e,t)=>K.createElement(i,{chartName:`ComposedChart`,defaultTooltipEventType:`axis`,validateTooltipEventTypes:vn,tooltipPayloadSearcher:ae,categoricalChartProps:e,ref:t})),bn=53,Q=9,xn=2,Sn=X.div`
|
|
1
|
+
import{$ as e,A as t,At as n,B as r,C as i,Ct as a,D as o,Dt as s,E as c,Et as l,F as u,G as d,H as f,I as p,J as m,K as h,L as g,M as _,Mt as v,N as y,O as b,Ot as x,P as S,Q as C,R as ee,S as w,St as te,T,Tt as E,U as D,V as ne,W as re,X as ie,Y as ae,Z as oe,_ as se,_t as ce,a as le,at as O,b as k,bt as A,c as j,ct as M,d as ue,dt as de,et as fe,f as N,ft as pe,g as me,gt as he,h as ge,ht as _e,i as ve,it as ye,j as be,jt as xe,k as Se,kt as Ce,l as we,lt as Te,m as Ee,mt as De,n as Oe,nt as ke,o as Ae,ot as je,p as Me,pt as Ne,q as Pe,r as Fe,rt as Ie,s as P,st as Le,t as Re,tt as ze,u as Be,ut as Ve,v as He,vt as Ue,w as We,wt as Ge,x as F,xt as Ke,y as qe,yt as Je,z as Ye}from"./shared-Cct_4xwp.js";import{$ as Xe,C as Ze,G as I,O as Qe,Q as $e,at as L,et as R,g as et,nt as tt,ot as nt,rt}from"./queries-CX9mStps.js";import{i as it,n as at,r as ot}from"./index-COwhxKU7.js";import{a as st,r as z,t as ct}from"./Rack-fDZClWZL.js";import{A as lt,D as B,N as V,j as H,n as ut,r as dt,t as ft}from"./States-DtkkMzEu.js";import{t as pt}from"./Panel-CoulMx6R.js";import{i as mt,n as U,r as W,t as ht}from"./Table-CVDZ69Zx.js";import{t as gt}from"./catalog-BBKm8Ih8.js";import{t as G}from"./Readout-D1XEfywe.js";import*as K from"react";import{PureComponent as _t,forwardRef as vt,useMemo as q,useRef as yt,useState as bt}from"react";import{jsx as J,jsxs as Y}from"react/jsx-runtime";import X from"styled-components";function xt(e,t){return e.graphicalItems.cartesianItems.find(e=>e.id===t)?.xAxisId??0}function St(e,t){return e.graphicalItems.cartesianItems.find(e=>e.id===t)?.yAxisId??0}var Ct=(e,t,n)=>C(e,`xAxis`,xt(e,t),n),wt=(e,t,n)=>fe(e,`xAxis`,xt(e,t),n),Tt=(e,t,n)=>C(e,`yAxis`,St(e,t),n),Et=(e,t,n)=>fe(e,`yAxis`,St(e,t),n),Dt=A([M,Ct,Tt,wt,Et],(e,t,n,r,i)=>Ue(e,`xAxis`)?Ne(t,r,!1):Ne(n,i,!1)),Ot=A([ze,(e,t)=>t],(e,t)=>e.filter(e=>e.type===`area`).find(e=>e.id===t)),kt=e=>{var t=M(e);return Ue(t,`xAxis`)?`yAxis`:`xAxis`},At=(e,t)=>kt(e)===`yAxis`?St(e,t):xt(e,t),jt=(t,n,r)=>e(t,kt(t),At(t,n),r),Mt=A([Ot,jt],(e,t)=>{if(e!=null&&t!=null){var n=e.stackId,r=ke(e);if(n!=null&&r!=null){var i=(t[n]?.stackedData)?.find(e=>e.key===r);if(i!=null)return i.map(e=>[e[0],e[1]])}}}),Nt=A([Ot,jt],(e,t)=>{if(e!=null&&e.stackId!=null&&t!=null){var n=t[e.stackId];if(n!=null)return n.graphicalItems.map(e=>e.dataKey).filter(E)}}),Pt=A([M,Ct,Tt,wt,Et,Mt,O,Dt,Ot,ye,Nt],(e,t,n,r,i,a,o,s,c,l,u)=>{var d=o.chartData,f=o.dataStartIndex,p=o.dataEndIndex;if(!(c==null||e!==`horizontal`&&e!==`vertical`||t==null||n==null||r==null||i==null||r.length===0||i.length===0||s==null)){var m=c.data,h=m&&m.length>0?m:d?.slice(f,p+1);if(h!=null)return pn({layout:e,xAxis:t,yAxis:n,xAxisTicks:r,yAxisTicks:i,dataStartIndex:f,areaSettings:c,stackedData:a,displayedData:h,chartBaseValue:l,bandSize:s,stackDataKeys:u})}}),Ft=[`animationElapsedTime`,`isAnimating`,`isEntrance`,`layout`,`isRange`,`stroke`,`connectNulls`],It=[`id`,`baseLine`];function Lt(){return Lt=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Lt.apply(null,arguments)}function Rt(e,t){if(e==null)return{};var n,r,i=zt(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function zt(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function Bt(e){var t=e.alpha,n=e.baseLine,r=e.points,i=e.strokeWidth,a=r[0]?.x,o=r[r.length-1]?.x;if(!Je(a)||!Je(o))return null;var c=t*Math.abs(a-o),l=Math.max(...r.map(e=>e.y||0));return s(n)?l=Math.max(n,l):n&&Array.isArray(n)&&n.length&&(l=Math.max(...n.map(e=>e.y||0),l)),s(l)?K.createElement(`rect`,{x:a<o?a:a-c,y:0,width:c,height:Math.floor(l+(i?parseInt(`${i}`,10):1))}):null}function Vt(e){var t=e.alpha,n=e.baseLine,r=e.points,i=e.strokeWidth,a=r[0]?.y,o=r[r.length-1]?.y;if(!Je(a)||!Je(o))return null;var c=t*Math.abs(a-o),l=Math.max(...r.map(e=>e.x||0));return s(n)?l=Math.max(n,l):n&&Array.isArray(n)&&n.length&&(l=Math.max(...n.map(e=>e.x||0),l)),s(l)?K.createElement(`rect`,{x:0,y:a<o?a:a-c,width:l+(i?parseInt(`${i}`,10):1),height:Math.floor(c)}):null}function Ht(e){var t=e.alpha,n=e.layout,r=e.points,i=e.baseLine,a=e.strokeWidth;return n===`vertical`?K.createElement(Vt,{alpha:t,points:r,baseLine:i,strokeWidth:a}):K.createElement(Bt,{alpha:t,points:r,baseLine:i,strokeWidth:a})}function Ut(e){var t=e.animationElapsedTime,n=t===void 0?1:t,r=e.isAnimating,i=r!==void 0&&r,a=e.isEntrance,o=a!==void 0&&a,s=e.layout,c=e.isRange,l=e.stroke,u=e.connectNulls,d=Rt(e,Ft),f=s===`vertical`?`vertical`:`horizontal`,m=u??!1,h=p(),g=d.id,_=d.baseLine,v=Rt(d,It),y=xe(v),b=K.createElement(je,Lt({},d,{id:g,baseLine:_,connectNulls:m,stroke:`none`,className:`recharts-area-area`,layout:f})),x=l!==`none`&&K.createElement(je,Lt({},y,{className:`recharts-area-curve`,layout:f,type:d.type,connectNulls:m,fill:`none`,stroke:l,points:d.points})),S=l!==`none`&&c&&Array.isArray(_)&&K.createElement(je,Lt({},y,{className:`recharts-area-curve`,layout:f,type:d.type,connectNulls:m,fill:`none`,stroke:l,points:_}));return o&&(i||n<1)?K.createElement(Ce,null,K.createElement(`defs`,null,K.createElement(`clipPath`,{id:h},K.createElement(Ht,{alpha:n,points:d.points??[],baseLine:_,layout:f,strokeWidth:d.strokeWidth}))),K.createElement(Ce,{clipPath:`url(#${h})`},b,x,S)):K.createElement(K.Fragment,null,b,x,S)}var Wt=[`id`],Gt=[`activeDot`,`animationBegin`,`animationDuration`,`animationEasing`,`connectNulls`,`dot`,`fill`,`fillOpacity`,`hide`,`isAnimationActive`,`legendType`,`stroke`,`xAxisId`,`yAxisId`];function Kt(){return Kt=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Kt.apply(null,arguments)}function qt(e,t){if(e==null)return{};var n,r,i=Jt(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)===-1&&{}.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}function Jt(e,t){if(e==null)return{};var n={};for(var r in e)if({}.hasOwnProperty.call(e,r)){if(t.indexOf(r)!==-1)continue;n[r]=e[r]}return n}function Yt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Z(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?Yt(Object(n),!0).forEach(function(t){Xt(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Yt(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function Xt(e,t,n){return(t=Zt(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Zt(e){var t=Qt(e,`string`);return typeof t==`symbol`?t:t+``}function Qt(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}var $t={activeDot:!0,animationBegin:0,animationDuration:1500,animationEasing:`ease`,animationMatchBy:ne,animationInterpolateFn:(e,t)=>e==null?[]:t===1?e.flatMap(e=>e.status===`removed`?[]:[e.next]):e.flatMap(e=>e.status===`matched`?[Z(Z({},e.next),{},{x:a(e.prev.x,e.next.x,t),y:a(e.prev.y,e.next.y,t)})]:e.status===`added`?[e.next]:[]),connectNulls:!1,dot:!1,fill:`#3182bd`,fillOpacity:.6,hide:!1,isAnimationActive:`auto`,legendType:`line`,stroke:`#3182bd`,strokeWidth:1,type:`linear`,label:!1,shape:Ut,xAxisId:0,yAxisId:0,zIndex:Ie.area};function en(e,t){return e&&e!==`none`?e:t}var tn=e=>{var t=e.dataKey,n=e.name,r=e.stroke,i=e.fill,a=e.legendType;return[{inactive:e.hide,dataKey:t,type:a,color:en(r,i),value:he(n,t),payload:e}]},nn=K.memo(e=>{var t=e.dataKey,n=e.data,r=e.stroke,i=e.strokeWidth,a=e.fill,o=e.name,s=e.hide,c=e.unit,l=e.formatter,u=e.tooltipType,d=e.id,f={dataDefinedOnItem:n,getPosition:x,settings:{stroke:r,strokeWidth:i,fill:a,dataKey:t,nameKey:void 0,name:he(o,t),hide:s,type:u,color:en(r,a),unit:c,formatter:l,graphicalItemId:d}};return K.createElement(D,{tooltipEntrySettings:f})});function rn(e){var t=e.clipPathId,n=e.points,r=e.props,i=r.needClip,a=r.dot,o=r.dataKey,s=xe(r);return K.createElement(y,{points:n,dot:a,className:`recharts-area-dots`,dotClassName:`recharts-area-dot`,dataKey:o,baseProps:s,needClip:i,clipPathId:t})}function an(e){var t=e.showLabels,n=e.children,r=e.points.map(e=>{var t={x:e.x??0,y:e.y??0,width:0,lowerWidth:0,upperWidth:0,height:0};return Z(Z({},t),{},{value:e.value,payload:e.payload,parentViewBox:void 0,viewBox:t,fill:void 0})});return K.createElement(h,{value:t?r:void 0},n)}function on(e){var t=e.points,r=e.baseLine,i=e.needClip,a=e.clipPathId,o=e.props,s=e.animationElapsedTime,c=e.isAnimating,l=e.isEntrance,u=o.layout,d=o.type,f=o.stroke,p=o.connectNulls,m=o.isRange,h=o.shape,g=o.id,_=qt(o,Wt),v=Z(Z({},n(_)),{},{id:g,points:t,connectNulls:p,type:d,baseLine:r,layout:u,stroke:f,isRange:m,animationElapsedTime:s,isAnimating:c,isEntrance:l});return K.createElement(K.Fragment,null,t?.length>1&&K.createElement(Ce,{clipPath:i?`url(#clipPath-${a})`:void 0},K.createElement(re,{option:h,DefaultShape:$t.shape,shapeProps:v})),K.createElement(rn,{points:t,props:_,clipPathId:a}))}function sn(e,t,n){if(s(e)){var r=s(t)?t:void 0;return a(r,e,n)}if(l(e)||Ge(e)){var i=s(t)?t:void 0;return a(i,0,n)}return e}function cn(e){var t=e.needClip,n=e.clipPathId,i=e.props,a=e.previousPointsRef,o=e.previousBaselineRef,s=i.points,c=i.baseLine,l=i.isAnimationActive,u=i.animationBegin,d=i.animationDuration,f=i.animationEasing,p=i.animationMatchBy,m=i.animationInterpolateFn,h=q(()=>({points:s,baseLine:c}),[s,c]),_=Ye(h,o),v=Te(),y=ee(i.onAnimationStart,i.onAnimationEnd),b=y.isAnimating,x=y.handleAnimationStart,S=y.handleAnimationEnd,C=_.startValue;if(v==null)return null;var w=Array.isArray(c)&&Array.isArray(C)?r(C,c,p):Array.isArray(c)?r(null,c,p):null;return K.createElement(g,{animationInput:h,animationIdPrefix:`recharts-area-`,items:s,previousItemsRef:a,isAnimationActive:l,animationBegin:u,animationDuration:d,animationEasing:f,onAnimationStart:x,onAnimationEnd:S,animationInterpolateFn:m,animationMatchBy:p,layout:v},(e,r,a)=>{var o=r===1?c:Array.isArray(c)?m(w,r,v):a?c:sn(c,C,r);return _.syncStepValue(o,r),K.createElement(an,{showLabels:!b,points:s},i.children,K.createElement(on,{points:e,baseLine:o,needClip:t,clipPathId:n,props:i,animationElapsedTime:r,isAnimating:b||r<1,isEntrance:a}),K.createElement(Pe,{label:i.label}))})}function ln(e){var t=e.needClip,n=e.clipPathId,r=e.props,i=yt(null),a=yt();return K.createElement(cn,{needClip:t,clipPathId:n,props:r,previousPointsRef:i,previousBaselineRef:a})}var un=class extends _t{render(){var e=this.props,t=e.hide,n=e.dot,r=e.points,i=e.className,a=e.top,s=e.left,c=e.needClip,l=e.xAxisId,u=e.yAxisId,f=e.width,p=e.height,m=e.id,h=e.baseLine,g=e.zIndex;if(t)return null;var _=v(`recharts-area`,i),y=m,x=o(n),S=x.r,C=x.strokeWidth,ee=d(n),w=S*2+C,te=c?`url(#clipPath-${ee?``:`dots-`}${y})`:void 0;return K.createElement(ie,{zIndex:g},K.createElement(Ce,{className:_},c&&K.createElement(`defs`,null,K.createElement(b,{clipPathId:y,xAxisId:l,yAxisId:u}),!ee&&K.createElement(`clipPath`,{id:`clipPath-dots-${y}`},K.createElement(`rect`,{x:s-w/2,y:a-w/2,width:f+w,height:p+w}))),K.createElement(ln,{needClip:c,clipPathId:y,props:this.props})),K.createElement(be,{points:r,mainColor:en(this.props.stroke,this.props.fill),itemDataKey:this.props.dataKey,activeDot:this.props.activeDot,clipPath:te}),this.props.isRange&&Array.isArray(h)&&K.createElement(be,{points:h,mainColor:en(this.props.stroke,this.props.fill),itemDataKey:this.props.dataKey,activeDot:this.props.activeDot,clipPath:te}))}};function dn(e){var t=e.activeDot,n=e.animationBegin,r=e.animationDuration,i=e.animationEasing,a=e.connectNulls,o=e.dot,s=e.fill,c=e.fillOpacity,l=e.hide,u=e.isAnimationActive,d=e.legendType,f=e.stroke,p=e.xAxisId,m=e.yAxisId,h=qt(e,Gt),g=Ve(),v=oe(),y=Se(p,m).needClip,b=pe(),x=Ke(t=>Pt(t,e.id,b))??{},S=x.points,C=x.isRange,ee=x.baseLine,w=_();if(g!==`horizontal`&&g!==`vertical`||w==null||v!==`AreaChart`&&v!==`ComposedChart`)return null;var te=w.height,T=w.width,E=w.x,D=w.y;return!S||!S.length?null:K.createElement(un,Kt({},h,{activeDot:t,animationBegin:n,animationDuration:r,animationEasing:i,baseLine:ee,connectNulls:a,dot:o,fill:s,fillOpacity:c,height:te,hide:l,layout:g,isAnimationActive:u,isRange:C,legendType:d,needClip:y,points:S,stroke:f,width:T,left:E,top:D,xAxisId:p,yAxisId:m}))}var fn=(e,t,n,r,i)=>{var a=n??t;if(s(a))return a;var o=e===`horizontal`?i:r,c=o.scale.domain();if(o.type===`number`){var l=Math.max(c[0],c[1]),u=Math.min(c[0],c[1]);return a===`dataMin`?u:a===`dataMax`||l<0?l:Math.max(Math.min(c[0],c[1]),0)}return a===`dataMin`?c[0]:a===`dataMax`?c[1]:c[0]};function pn(e){var t=e.areaSettings,n=t.connectNulls,r=t.baseValue,i=t.dataKey,a=e.stackedData,o=e.layout,s=e.chartBaseValue,c=e.xAxis,l=e.yAxis,u=e.displayedData,d=e.dataStartIndex,f=e.xAxisTicks,p=e.yAxisTicks,m=e.bandSize,h=e.stackDataKeys,g=a&&a.length,_=fn(o,s,r,c,l),v=o===`horizontal`,y=!1,b=u.map((e,t)=>{var r;if(g)r=a[d+t];else{var o=ce(e,i);Array.isArray(o)?(r=o,y=!0):r=[_,o]}var s=r?.[1]??null,u=ce(e,i),b=g&&u==null&&h!=null&&h.length>0&&h.every(t=>ce(e,t)==null),x=s==null||g&&!n&&u==null||b;return v?{x:De({axis:c,ticks:f,bandSize:m,entry:e,index:t}),y:x?null:l.scale.map(s)??null,value:r,payload:e}:{x:x?null:c.scale.map(s)??null,y:De({axis:l,ticks:p,bandSize:m,entry:e,index:t}),value:r,payload:e}});return{points:b,baseLine:(g||y?b.map(e=>{var t=Array.isArray(e.value)?e.value[0]:null;return v?{x:e.x,y:t!=null&&e.y!=null?l.scale.map(t)??null:null,payload:e.payload}:{x:t==null?null:c.scale.map(t)??null,y:e.y,payload:e.payload}}):v?l.scale.map(_):c.scale.map(_))??0,isRange:y}}function mn(e){var t=te(e,$t),n=pe();return K.createElement(u,{id:t.id,type:`area`},e=>K.createElement(K.Fragment,null,K.createElement(f,{legendPayload:tn(t)}),K.createElement(nn,{dataKey:t.dataKey,data:t.data,stroke:t.stroke,strokeWidth:t.strokeWidth,fill:t.fill,name:t.name,hide:t.hide,unit:t.unit,formatter:t.formatter,tooltipType:t.tooltipType,id:e}),K.createElement(S,{type:`area`,id:e,data:t.data,dataKey:t.dataKey,xAxisId:t.xAxisId,yAxisId:t.yAxisId,zAxisId:0,stackId:_e(t.stackId),hide:t.hide,barSize:void 0,baseValue:t.baseValue,isPanorama:n,connectNulls:t.connectNulls}),K.createElement(dn,Kt({},t,{id:e}))))}var hn=K.memo(mn,Le);hn.displayName=`Area`;var gn=[`axis`],_n=vt((e,t)=>K.createElement(i,{chartName:`AreaChart`,defaultTooltipEventType:`axis`,validateTooltipEventTypes:gn,tooltipPayloadSearcher:ae,categoricalChartProps:e,ref:t})),vn=[`axis`],yn=vt((e,t)=>K.createElement(i,{chartName:`ComposedChart`,defaultTooltipEventType:`axis`,validateTooltipEventTypes:vn,tooltipPayloadSearcher:ae,categoricalChartProps:e,ref:t})),bn=53,Q=9,xn=2,Sn=X.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
gap: ${xn}px;
|
|
4
4
|
`,Cn=X.div`
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/_app-
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/_app-CDPKnQ72.js","assets/Match-BWa6L0L1.js","assets/queries-CX9mStps.js","assets/matchContext-BOenO3J2.js","assets/Rack-fDZClWZL.js","assets/States-DtkkMzEu.js","assets/login-DjfMomJJ.js","assets/Field-B79Yxdit.js","assets/Panel-CoulMx6R.js","assets/reasons-Cb8yF4Oy.js","assets/_app.index-COcCAmbH.js","assets/TokenBreakdown-D70VeZ2N.js","assets/Chip-BltJSw8A.js","assets/Meter-stpt3vQu.js","assets/Table-CVDZ69Zx.js","assets/Readout-D1XEfywe.js","assets/_app.accounts-Dz0ox4Br.js","assets/shared-Cct_4xwp.js","assets/CopyValue-By5BAgv7.js","assets/plus-UDQ_BTEr.js","assets/trash-2-U2ViYZum.js","assets/Toggle-ClEeOh0F.js","assets/catalog-BBKm8Ih8.js","assets/_app.console-hPUmmYjp.js","assets/_app.database-DGtP4NdG.js","assets/_app.keys-yTXTbKTA.js","assets/_app.logs-BhMvO_Fx.js","assets/_app.models-0S3rurIl.js","assets/_app.settings-DTnFwTeA.js","assets/_app.usage-C2-VLiq9.js","assets/_app.plugins._pluginId-B-ZDQNPU.js"])))=>i.map(i=>d[i]);
|
|
2
2
|
import{$ as e,At as t,Bt as n,Ct as r,Dt as i,Et as a,Ft as o,Gt as s,Ht as c,It as l,Kt as u,Lt as d,Mt as f,Nt as p,Ot as m,Pt as h,Rt as g,St as _,Tt as v,Ut as y,Vt as b,Wt as x,Y as S,at as C,bt as ee,dt as w,ft as T,gt as E,ht as D,i as te,jt as ne,kt as re,lt as ie,pt as ae,q as oe,qt as se,vt as ce,wt as le,xt as ue,yt as de,zt as fe}from"./queries-CX9mStps.js";import{a as pe,i as me,n as he,o as ge,r as _e,t as ve}from"./Match-BWa6L0L1.js";import{n as ye,r as be,t as xe}from"./matchContext-BOenO3J2.js";import{MutationCache as Se,QueryCache as Ce,QueryClient as we,QueryClientProvider as Te}from"@tanstack/react-query";import*as O from"react";import Ee,{StrictMode as De,createContext as Oe,use as ke,useCallback as Ae,useEffect as je,useState as Me}from"react";import{Fragment as Ne,jsx as k,jsxs as Pe}from"react/jsx-runtime";import{createRoot as Fe}from"react-dom/client";import Ie,{ThemeProvider as Le,createGlobalStyle as Re}from"styled-components";(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),t.credentials=e.crossOrigin===`use-credentials`?`include`:e.crossOrigin===`anonymous`?`omit`:`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();function ze(){try{return sessionStorage}catch{return}}var Be=`tsr-scroll-restoration-v1_3`,Ve=ze();function He(){try{return JSON.parse(Ve?.getItem(`tsr-scroll-restoration-v1_3`)||`{}`)}catch{return{}}}function Ue(){try{Ve?.setItem(Be,JSON.stringify(A))}catch{}}var A=He(),We=`data-scroll-restoration-id`,Ge=e=>e.state.__TSR_key||e.href;function Ke(e){let t=e.getAttribute(We);if(t)return`[${We}="${t}"]`;let n=``,r=e,i;for(;i=r.parentNode;){let e=1,t=r;for(;t=t.previousElementSibling;)e++;let a=`${r.localName}:nth-child(${e})`;n=n?`${a} > ${n}`:a,r=i}return n}var qe=!1,Je=`window`;function Ye(e){try{return typeof e==`function`?e():document.querySelector(e)}catch{}}function Xe(e){let t=new Set;for(let n of e){if(n===Je)continue;let e=Ye(n);e&&t.add(e)}return t}function Ze(e,t){let n=t??e.options.scrollRestoration,r=e._scroll;n&&(r.restoring=!0);let i=e.options.getScrollRestorationKey||Ge,a=new Set,o=e=>{let t=A[e]||={};for(let e of a)e===document?t[Je]={scrollX,scrollY}:e.isConnected&&(t[Ke(e)]={scrollX:e.scrollLeft,scrollY:e.scrollTop})};n&&!r.restoration&&(r.restoration=!0,qe=!1,history.scrollRestoration=`manual`,document.addEventListener(`scroll`,e=>{qe||a.add(e.target)},!0),e.subscribe(`onBeforeLoad`,e=>{e.fromLocation&&o(i(e.fromLocation)),a.clear()}),addEventListener(`pagehide`,()=>{o(i(e.stores.resolvedLocation.get()??e.stores.location.get())),Ue()})),!r.reset&&(r.reset=!0,e.subscribe(`onRendered`,t=>{let n=e.options.scrollRestorationBehavior,o=e.options.scrollToTopSelectors,s=r.next,c=r.hash,l;if(a.clear(),r.next=!0,r.hash=!1,typeof e.options.scrollRestoration==`function`&&!e.options.scrollRestoration({location:e.latestLocation}))return;let u=i(t.toLocation),d=t.fromLocation&&i(t.fromLocation);if(r.restoring&&d&&d!==u){let e=A[d];if(e){let t=A[u];for(let n in e){if(n===Je){if(s)continue}else{let e=Ye(n);if(!e||s&&o&&(l??=Xe(o),l.has(e)))continue}t||=A[u]={},t[n]??=e[n]}}}qe=!0;try{let e=t.toLocation.hash,i=t.toLocation.state.__hashScrollIntoViewOptions??!0,a=!1;if(s){!e&&o&&(l??=Xe(o));let t=e&&i&&c,s=r.restoring?A[u]:void 0;if(s)for(let e in s){let{scrollX:r,scrollY:i}=s[e];if(e===Je){if(t)continue;scrollTo({top:i,left:r,behavior:n}),a=!0}else{let t=Ye(e);t&&(t.scrollLeft=r,t.scrollTop=i,l?.delete(t))}}if(!e){let e={top:0,left:0,behavior:n};if(a||scrollTo(e),l)for(let t of l)t.scrollTo(e)}}!a&&e&&i&&document.getElementById(e)?.scrollIntoView(i)}finally{qe=!1}}))}function Qe(e,t=String){let n=new URLSearchParams;for(let r in e){let i=e[r];i!==void 0&&n.set(r,t(i))}return n.toString()}function $e(e){return e?e===`false`?!1:e===`true`?!0:e*0==0&&+e+``===e?+e:e:``}function et(e){let t=new URLSearchParams(e),n=Object.create(null);for(let[e,r]of t.entries()){let t=n[e];t==null?n[e]=$e(r):Array.isArray(t)?t.push($e(r)):n[e]=[t,$e(r)]}return n}var tt=/^(?:\s|["[{\d-]|fa|nu|tr)/,nt=it(JSON.parse),rt=at(JSON.stringify,JSON.parse);function it(e){return t=>{t[0]===`?`&&(t=t.substring(1));let n=et(t);for(let t in n){let r=n[t];if(typeof r==`string`)try{n[t]=e(r)}catch{}}return n}}function at(e,t){let n=t===JSON.parse;function r(r){if(r&&typeof r==`object`)try{return e(r)}catch{}else if(t&&typeof r==`string`){if(n&&!tt.test(r))return r;try{return t(r),e(r)}catch{}}return r}return e=>{let t=Qe(e,r);return t?`?${t}`:``}}function ot(e){if(e.statusCode=e.statusCode||e.code||307,!e._builtLocation&&!e.reloadDocument&&typeof e.href==`string`)try{new URL(e.href),e.reloadDocument=!0}catch{}let t=new Headers(e.headers);e.href&&t.get(`Location`)===null&&t.set(`Location`,e.href);let n=new Response(null,{status:e.statusCode,headers:t});if(n.options=e,e.throw)throw n;return n}function st(e){return e instanceof Response&&!!e.options}function ct(e){return{input:({url:t})=>{for(let n of e)t=ut(n,t);return t},output:({url:t})=>{for(let n=e.length-1;n>=0;n--)t=dt(e[n],t);return t}}}function lt(e){let t=r(e.basepath),n=`/${t}`,i=e.caseSensitive?n:n.toLowerCase(),a=`${i}/`;return{input:({url:t})=>{let r=e.caseSensitive?t.pathname:t.pathname.toLowerCase();return r===i?t.pathname=`/`:r.startsWith(a)&&(t.pathname=t.pathname.slice(n.length)),t},output:({url:e})=>(e.pathname=ue([`/`,t,e.pathname]),e)}}function ut(e,t){let n=e?.input?.({url:t});if(n){if(typeof n==`string`)return new URL(n);if(n instanceof URL)return n}return t}function dt(e,t){let n=e?.output?.({url:t});if(n){if(typeof n==`string`)return new URL(n);if(n instanceof URL)return n}return t}function ft(e,t){let{createMutableStore:n,createReadonlyStore:r,batch:i}=t,a=new Map,s=n(`idle`),c=n(e),l=n(void 0),u=n([]),d=r(()=>u.get().map(e=>a.get(e).get())),f=r(()=>({status:s.get(),isLoading:s.get()===`pending`,matches:d.get(),location:c.get(),resolvedLocation:l.get()}));function p(e){let t=a.get(e);return t||(t=n(void 0),a.set(e,t)),t}let m={status:s,location:c,resolvedLocation:l,ids:u,matches:d,byRoute:a,__store:f,getMatchStore:p,setMatches:h};function h(e){let t=u.get(),n=e.map(e=>e.routeId);i(()=>{o(t,n)||u.set(n);for(let e of t)n.includes(e)||a.get(e).set(()=>void 0);for(let t of e){let e=p(t.routeId);e.get()!==t&&e.set(t)}})}return m}var j=`__TSR_index`,pt=`popstate`,mt=`beforeunload`;function ht(e){let t=e.getLocation(),n=new Set,r=r=>{t=e.getLocation(),n.forEach(e=>e({location:t,action:r}))},i=n=>{e.notifyOnIndexChange??!0?r(n):t=e.getLocation()},a=async({task:n,navigateOpts:r,...i})=>{if(r?.ignoreBlocker??!1){n();return}let a=e.getBlockers?.()??[],o=i.type===`PUSH`||i.type===`REPLACE`;if(typeof document<`u`&&a.length&&o)for(let n of a){let r=yt(i.path,i.state);if(await n.blockerFn({currentLocation:t,nextLocation:r,action:i.type})){e.onBlocked?.();return}}n()};return{get location(){return t},get length(){return e.getLength()},subscribers:n,subscribe:e=>(n.add(e),()=>{n.delete(e)}),push:(n,i,o)=>{let s=t.state[j];i=gt(s+1,i),a({task:()=>{e.pushState(n,i),r({type:`PUSH`})},navigateOpts:o,type:`PUSH`,path:n,state:i})},replace:(n,i,o)=>{let s=t.state[j];i=gt(s,i),a({task:()=>{e.replaceState(n,i),r({type:`REPLACE`})},navigateOpts:o,type:`REPLACE`,path:n,state:i})},go:(t,n)=>{a({task:()=>{e.go(t),i({type:`GO`,index:t})},navigateOpts:n,type:`GO`})},back:t=>{a({task:()=>{e.back(t?.ignoreBlocker??!1),i({type:`BACK`})},navigateOpts:t,type:`BACK`})},forward:t=>{a({task:()=>{e.forward(t?.ignoreBlocker??!1),i({type:`FORWARD`})},navigateOpts:t,type:`FORWARD`})},canGoBack:()=>t.state[j]!==0,createHref:t=>e.createHref(t),block:t=>{if(!e.setBlockers)return()=>{};let n=e.getBlockers?.()??[];return e.setBlockers([...n,t]),()=>{let n=e.getBlockers?.()??[];e.setBlockers?.(n.filter(e=>e!==t))}},flush:()=>e.flush?.(),destroy:()=>e.destroy?.(),notify:r}}function gt(e,t){t||={};let n=bt();return{...t,key:n,__TSR_key:n,[j]:e}}function _t(e){let t=e?.window??(typeof document<`u`?window:void 0),n=t.history.pushState,r=t.history.replaceState,i=[],a=()=>i,o=e=>i=e,s=e?.createHref??(e=>e),c=e?.parseLocation??(()=>yt(`${t.location.pathname}${t.location.search}${t.location.hash}`,t.history.state));if(!t.history.state?.__TSR_key&&!t.history.state?.key){let e=bt();t.history.replaceState({[j]:0,key:e,__TSR_key:e},``)}let l=c(),u,d=!1,f=!1,p=!1,m=!1,h=()=>l,g,_=()=>{g&&(S._ignoreSubscribers=!0,(g[2]?t.history.pushState:t.history.replaceState)(g[1],``,g[0]),S._ignoreSubscribers=!1,g=void 0,u=void 0)},v=(e,t,n)=>{let r=s(t),i=!!g;i||(u=l),l=yt(t,n),g=[r,n,g?.[2]||e],i||queueMicrotask(()=>_())},y=e=>{l=c(),S.notify({type:e})},b=async()=>{if(f){f=!1;return}let e=c(),n=e.state[j]-l.state[j],r=n===1,i=n===-1,o=!r&&!i||d;d=!1;let s=o?`GO`:i?`BACK`:`FORWARD`,u=o?{type:`GO`,index:n}:{type:i?`BACK`:`FORWARD`};if(p)p=!1;else{let n=a();if(typeof document<`u`&&n.length){for(let r of n)if(await r.blockerFn({currentLocation:l,nextLocation:e,action:s})){f=!0,t.history.go(1),S.notify(u);return}}}l=c(),S.notify(u)},x=e=>{if(m){m=!1;return}let t=!1,n=a();if(typeof document<`u`&&n.length)for(let e of n){let n=e.enableBeforeUnload??!0;if(n===!0){t=!0;break}if(typeof n==`function`&&n()===!0){t=!0;break}}if(t)return e.preventDefault(),e.returnValue=``},S=ht({getLocation:h,getLength:()=>t.history.length,pushState:(e,t)=>v(!0,e,t),replaceState:(e,t)=>v(!1,e,t),back:e=>(e&&(p=!0),m=!0,t.history.back()),forward:e=>{e&&(p=!0),m=!0,t.history.forward()},go:e=>{d=!0,t.history.go(e)},createHref:e=>s(e),flush:_,destroy:()=>{t.history.pushState=n,t.history.replaceState=r,t.removeEventListener(mt,x,{capture:!0}),t.removeEventListener(pt,b)},onBlocked:()=>{u&&l!==u&&(l=u)},getBlockers:a,setBlockers:o,notifyOnIndexChange:!1});return t.addEventListener(mt,x,{capture:!0}),t.addEventListener(pt,b),t.history.pushState=function(...e){let r=n.apply(t.history,e);return S._ignoreSubscribers||y(`PUSH`),r},t.history.replaceState=function(...e){let n=r.apply(t.history,e);return S._ignoreSubscribers||y(`REPLACE`),n},S}function vt(e){let t=e.replace(/[\x00-\x1f\x7f]/g,``);return t.startsWith(`//`)&&(t=`/`+t.replace(/^\/+/,``)),t}function yt(e,t){let n=vt(e),r=n.indexOf(`#`),i=n.indexOf(`?`),a=bt();return{href:n,pathname:n.substring(0,r>0?i>0?Math.min(r,i):r:i>0?i:n.length),hash:r>-1?n.substring(r):``,search:i>-1?n.slice(i,r===-1?void 0:r):``,state:t||{[j]:0,key:a,__TSR_key:a}}}function bt(){return(Math.random()+1).toString(36).substring(7)}function xt(e){return e.options.loader||e.options.beforeLoad||e.lazyFn||e.options.component?.preload||e.options.pendingComponent?.preload}function St(e,t){return{fromLocation:t,toLocation:e,pathChanged:t?.pathname!==e.pathname,hrefChanged:t?.href!==e.href,hashChanged:t?.hash!==e.hash}}function Ct({key:e,__TSR_key:t,__TSR_index:n,__hashScrollIntoViewOptions:r,...i}){return i}function wt(e,t,n,r){for(let i of t){if(r?.()===!1)return;n.some(e=>e.routeId===i.routeId)||e.routesById[i.routeId].options.onLeave?.(i)}for(let i of n){if(r?.()===!1)return;e.routesById[i.routeId].options[t.some(e=>e.routeId===i.routeId)?`onStay`:`onEnter`]?.(i)}}var Tt=class{constructor(e,a){this.tempLocationKey=`${Math.round(Math.random()*1e7)}`,this._scroll={next:!0},this.subscribers=new Set,this._cache=new Map,this._committed=[],this.routeBranchCache=new WeakMap,this.lightweightCache=new WeakMap,this.startTransition=async e=>(e(),!1),this.update=e=>{let t=this.options,n=this.basepath??t?.basepath??`/`,i=this.basepath===void 0,a=t?.rewrite;if(this.options={...t,...e},this.isServer=this.options.isServer??!1??typeof document>`u`,this.protocolAllowlist=new Set(this.options.protocolAllowlist),this.options.pathParamsAllowedCharacters&&(this.pathParamsDecoder=de(this.options.pathParamsAllowedCharacters)),(!this.history||this.options.history&&this.options.history!==this.history)&&(this.history=this.options.history?this.options.history:_t()),this.origin=this.options.origin,this.origin||=window?.origin&&window.origin!==`null`?window.origin:`http://localhost`,this.history&&this.updateLatestLocation(),this.options.routeTree!==this.routeTree){this.routeTree=this.options.routeTree;let e;this.resolvePathCache=f(1e3),e=this.buildRouteTree(),this.setRoutes(e)}if(!this.stores&&this.latestLocation){let e=this.getStoreConfig(this);this.batch=e.batch,this.stores=ft(this.latestLocation,e),Ze(this)}let o=this.options.basepath??`/`,s=this.options.rewrite;if(i||n!==o||a!==s){this.basepath=o;let e=[],t=r(o);t&&t!==`/`&&e.push(lt({basepath:o})),s&&e.push(s),this.rewrite=e.length===0?void 0:e.length===1?e[0]:ct(e),this.history&&this.updateLatestLocation(),this.stores&&this.stores.location.set(this.latestLocation)}},this.updateLatestLocation=()=>{this.latestLocation=this.parseLocation(this.history.location,this.latestLocation)},this.buildRouteTree=()=>{let e=ne(this.routeTree,this.options.caseSensitive,(e,t)=>{e.init({originalIndex:t})});return this.options.routeMasks&&t(this.options.routeMasks,e.processedTree),e},this.subscribe=(e,t)=>{let n={eventType:e,fn:t};return this.subscribers.add(n),()=>{this.subscribers.delete(n)}},this.emit=e=>{for(let t of this.subscribers)if(t.eventType===e.type)try{t.fn(e)}catch(e){console.error(e)}},this.parseLocation=(e,t)=>{let n=({pathname:e,search:n,hash:r,href:i,state:a})=>{if(!this.rewrite&&!/[ \x00-\x1f\x7f\u0080-\uffff]/.test(e)){let i=this.options.parseSearch(n),o=this.options.stringifySearch(i);return{href:e+o+r,publicHref:e+o+r,pathname:l(e).path,external:!1,searchStr:o,search:x(t?.search,i),hash:l(r.slice(1)).path,state:s(t?.state,a)}}let o=new URL(i,this.origin),c=ut(this.rewrite,o),u=this.options.parseSearch(c.search),d=this.options.stringifySearch(u);return c.search=d,{href:c.href.replace(c.origin,``),publicHref:i,pathname:l(c.pathname).path,external:!!this.rewrite&&c.origin!==this.origin,searchStr:d,search:x(t?.search,u),hash:l(c.hash.slice(1)).path,state:s(t?.state,a)}},r=n(e),{__tempLocation:i,__tempKey:a}=r.state;if(i&&(!a||a===this.tempLocationKey)){let e=n(i);return e.state.key=r.state.key,e.state.__TSR_key=r.state.__TSR_key,delete e.state.__tempLocation,{...e,maskedLocation:r}}return r},this.resolvePathWithBase=(e,t)=>_({base:e,to:t.includes(`//`)?ce(t):t,trailingSlash:this.options.trailingSlash,cache:this.resolvePathCache}),this.matchRoutes=(e,t,n)=>typeof e==`string`?this.matchRoutesInternal({pathname:e,search:t},n):this.matchRoutesInternal(e,t),this.getMatchedRoutes=e=>{let t=Object.create(null),n=m(v(e),this.processedTree,!0);return n&&Object.assign(t,n.rawParams),[n?.branch||[this.routesById.__root__],t,n?.route]},this.buildLocation=e=>{let t=(t={})=>{let r=t._fromLocation||this._pendingLocation||this.latestLocation,i=this.matchRoutesLightweight(r);t.from;let a=t.unsafeRelative===`path`?r.pathname:t.from??i[1],o=t.to?`${t.to}`:void 0,c=i[2],u=Object.assign(Object.create(null),i[3]),d=o?.charCodeAt(0)===47?`/`:this.resolvePathWithBase(a,`.`),f=o?this.resolvePathWithBase(d,o):d,p=jt(t.params,u),m=this.routesByPath[v(f)],h;if(m)h=this.getRouteBranch(m);else if(f.includes(`$`))h=[];else{let[e,t,n]=this.getMatchedRoutes(f);h=e,this.options.notFoundRoute&&(!n||n.path!==`/`&&t[`**`])&&(h=[...h,this.options.notFoundRoute])}if(h.length&&n(p))for(let e of h){let t=e.options.params?.stringify??e.options.stringifyParams;if(t)try{Object.assign(p,t(p))}catch{}}let _=e.leaveParams?f:l(ee({path:f,params:p,decoder:this.pathParamsDecoder,server:this.isServer}).interpolatedPath).path,y=c;if(e._includeValidateSearch&&this.options.search?.strict){let e={};h.forEach(t=>{if(t.options.validateSearch)try{Object.assign(e,Ot(t.options.validateSearch,{...e,...y}))}catch{}}),y=e}y=kt(y,t,h,e._includeValidateSearch),y=x(c,y);let b=this.options.stringifySearch(y),S=t.hash===!0?r.hash:t.hash?fe(t.hash,r.hash):void 0,C=S?`#${S}`:``,w=t.state===!0?r.state:t.state?fe(t.state,r.state):{};w=s(r.state,w);let T=`${_}${b}${C}`,E,D,te=!1;if(this.rewrite){let e=new URL(T,this.origin),t=dt(this.rewrite,e);E=e.href.replace(e.origin,``),t.origin===this.origin?D=t.pathname+t.search+t.hash:(D=t.href,te=!0)}else E=g(T),D=E;return{publicHref:D,href:E,pathname:_,search:y,searchStr:b,state:w,hash:S??``,external:te,unmaskOnReload:t.unmaskOnReload}},r=(n={},r)=>{let a=t(n),o=r?t(r):void 0;if(!o){let n=Object.create(null);if(this.options.routeMasks){let s=i(a.pathname,this.processedTree);if(s){Object.assign(n,s.rawParams);let{from:i,params:a,...c}=s.route,l=jt(a,n);r={from:e.from,...c,params:l},o=t(r)}}}return o&&(a.maskedLocation=o),a};return e.mask?r(e,{from:e.from,...e.mask}):r(e)},this.commitLocation=async({viewTransition:e,ignoreBlocker:t,...n})=>{let r,i=v(this.latestLocation.href)===v(n.href)&&d(Ct(n.state),Ct(this.latestLocation.state)),a=this._commitPromise,o,s=new Promise(e=>{o=e});if(s.resolve=()=>{o(),a?.resolve()},this._commitPromise=s,i)this.load();else{let{maskedLocation:i,hashScrollIntoView:a,...o}=n;i&&(o={...i,state:{...i.state,__tempKey:void 0,__tempLocation:{...o,search:o.searchStr,state:{...o.state,__tempKey:void 0,__tempLocation:void 0,__TSR_key:void 0,key:void 0}}}},(o.unmaskOnReload??this.options.unmaskOnReload??!1)&&(o.state.__tempKey=this.tempLocationKey)),o.state.__hashScrollIntoViewOptions=a??this.options.defaultHashScrollIntoView??!0,this.shouldViewTransition=e,r=n.replace?`REPLACE`:`PUSH`,this.history[r===`REPLACE`?`replace`:`push`](o.publicHref,o.state,{ignoreBlocker:t}),this.history.subscribers.size||this.load({action:{type:r}})}return this._scroll.next=n.resetScroll??!0,this._commitPromise},this.buildAndCommitLocation=({replace:e,resetScroll:t,hashScrollIntoView:n,viewTransition:r,ignoreBlocker:i,_redirects:a,href:o,...s}={})=>{if(o){let t=this.history.location.state.__TSR_index,n=yt(o,{__TSR_index:e?t:t+1}),r=new URL(n.pathname,this.origin);s.to=ut(this.rewrite,r).pathname,s.search=this.options.parseSearch(n.search),s.hash=n.hash.slice(1)}let c=this.buildLocation({...s,_includeValidateSearch:!0});a&&(c._redirects=a),this._pendingLocation=c;let l=this.commitLocation({...c,viewTransition:r,replace:e,resetScroll:t,hashScrollIntoView:n,ignoreBlocker:i});return queueMicrotask(()=>{this._pendingLocation===c&&(this._pendingLocation=void 0)}),l},this.navigate=async({to:e,reloadDocument:t,href:n,publicHref:r,...i})=>{let a=!1;if(n)try{new URL(`${n}`),a=!0}catch{}if(a&&!t&&(t=!0),t){if(e!==void 0||!n){let t=this.buildLocation({to:e,...i});n??=t.publicHref,r??=t.publicHref}let t=!a&&r?r:n;if(b(t,this.protocolAllowlist))return;if(!i.ignoreBlocker){let e=this.history.getBlockers?.()??[];for(let t of e)if(t?.blockerFn&&await t.blockerFn({currentLocation:this.latestLocation,nextLocation:this.latestLocation,action:`PUSH`}))return}i.replace?window.location.replace(t):window.location.href=t;return}return this.buildAndCommitLocation({...i,href:n,to:e,_isNavigate:!0})},this.load=async e=>{this.updateLatestLocation(),e?.action&&(this._scroll.hash=e.action.type===`PUSH`||e.action.type===`REPLACE`),await ln(this,e)},this.startViewTransition=e=>{let t=this.shouldViewTransition??this.options.defaultViewTransition;if(this.shouldViewTransition=void 0,t&&typeof document.startViewTransition==`function`){let n;if(typeof t==`object`&&window.CSS?.supports?.(`selector(:active-view-transition-type(a))`)){let r=this.latestLocation,i=this.stores.resolvedLocation.get(),a=typeof t.types==`function`?t.types(St(r,i)):t.types;if(a===!1)return e();n={update:e,types:a}}else n=e;return document.startViewTransition(n).updateCallbackDone}return e()},this.invalidate=e=>{let t=this._committed,n=e?.filter,r=this._preloads,i=new Set([...t,...this._cache.values(),...[...r?.values()??[]].flat(),...this._tx?.[3]??[]].filter(e=>!n||n(e)).map(e=>e.id)),a=[];for(let[e,t]of r??[])t.some(e=>i.has(e.id))&&(r.delete(e),a.push(e));let o=t=>{if(i.has(t.id)){let n=this.routesById[t.routeId],r={...t,invalid:!0,...(e?.forcePending||t.status===`error`||t.status===`notFound`)&&xt(n)?{status:`pending`,error:void 0}:void 0};return t._flight=void 0,r}return t};this._committed=t.map(o);for(let[t,n]of this._cache)i.has(t)&&(n.invalid=!0,e?.forcePending&&(n.status=`pending`));for(let e of i)this._flights?.delete(e);for(let e of a)e.abort();return this.shouldViewTransition=!1,this.load({sync:e?.sync})},this.resolveRedirect=e=>{let t=e.headers.get(`Location`);if(!e.options.href||e.options._builtLocation){let t=(e.options._builtLocation??this.buildLocation(e.options)).publicHref||`/`;e.options.href=t,e.headers.set(`Location`,t)}else if(t)try{let n=new URL(t);if(this.origin&&n.origin===this.origin){let t=n.pathname+n.search+n.hash;e.options.href=t,e.headers.set(`Location`,t)}}catch{}if(e.options.href&&!e.options._builtLocation&&b(e.options.href,this.protocolAllowlist))throw Error(`Redirect blocked: unsafe protocol`);return e.headers.get(`Location`)||e.headers.set(`Location`,e.options.href),e},this.clearCache=e=>{let t=this._cache,n=this._preloads,r=e?.filter,i=[],a=[];for(let[e,n]of t)(!r||r(n))&&(a.push(e),i.push(n));let o=[];for(let[e,t]of n??[])(!r||t.some(r))&&(o.push(e),i.push(...t));for(let e of a)t.delete(e);for(let e of o)n.delete(e);for(let e of i){let t=e._flight;e._flight=void 0,t&&!--t[2]&&(this._flights?.get(e.id)===t&&this._flights.delete(e.id),o.push(t[1]))}for(let e of o)e.abort()},this.loadRouteChunk=M,this.preloadRoute=e=>un(this,e),this.matchRoute=(e,t)=>{let n={...e,to:e.to?this.resolvePathWithBase(e.from||``,e.to):void 0,params:e.params||{},leaveParams:!0},r=this.buildLocation(n),i=this.stores.status.get()===`pending`;if(t?.pending&&!i)return!1;let a=t?.pending??!i?this.latestLocation:this.stores.resolvedLocation.get()||this.stores.location.get(),o=re(r.pathname,t?.caseSensitive??!1,t?.fuzzy??!1,a.pathname,this.processedTree);return!o||e.params&&!d(o.rawParams,e.params,{partial:!0})?!1:t?.includeSearch??!0?d(a.search,r.search,{partial:!0})?o.rawParams:!1:o.rawParams},this.getStoreConfig=a,this.update({defaultPreloadDelay:50,defaultPendingMs:1e3,defaultPendingMinMs:500,context:void 0,...e,caseSensitive:e.caseSensitive??!1,notFoundMode:e.notFoundMode??`fuzzy`,stringifySearch:e.stringifySearch??rt,parseSearch:e.parseSearch??nt,protocolAllowlist:e.protocolAllowlist??h}),self.__TSR_ROUTER__=this}isShell(){return!!this.options.isShell}get state(){return this.stores.__store.get()}setRoutes({routesById:e,routesByPath:t,processedTree:n}){this.routesById=e,this.routesByPath=t,this.processedTree=n;let r=this.options.notFoundRoute;r&&(r.init({originalIndex:99999999999}),this.routesById[r.id]=r)}getRouteBranch(e){let t=this.routeBranchCache.get(e);return t||(t=a(e),this.routeBranchCache.set(e,t)),t}matchRoutesInternal(e,t){let[n,r,i]=this.getMatchedRoutes(e.pathname),a=n,o=!1;(i?i.path!==`/`&&r[`**`]:v(e.pathname))&&(this.options.notFoundRoute?a=[...a,this.options.notFoundRoute]:o=!0);let c=o?At(this.options.notFoundMode,a):void 0,l=Array(a.length),u=this._committed,d=(e,t)=>{let n=u[t];return n?.routeId===e.id?n:e===this.options.notFoundRoute?u.find(t=>t.routeId===e.id):void 0},f;for(let n=0;n<a.length;n++){let i=a[n],o=l[n-1],u,p,m;{let n=o?.search??e.search,r=o?._strictSearch??void 0;try{let e=Ot(i.options.validateSearch,{...n})??void 0;u={...n,...e},p={...r,...e}}catch(e){let r=e;if(e instanceof Et||(r=new Et(e.message,{cause:e})),t?.throwOnError)throw r;u=n,p={},m=r}}let h=``,g=``;try{h=i.options.loaderDeps?.({search:u})??``,g=h&&JSON.stringify(h)||``}catch(e){if(t?.throwOnError)throw e;m??=e}let{interpolatedPath:_,usedParams:v}=ee({path:i.fullPath,params:r,decoder:this.pathParamsDecoder,server:this.isServer}),y=i.id+_+g,b=d(i,n),S=this._cache.get(y)??(b?.id===y?b:void 0);f=S?._strictParams??Object.assign(v,f);let C;if(!S)try{Mt(i,f)}catch(e){if(C=ge(e)||st(e)?e:new Dt(e.message,{cause:e}),t?.throwOnError)throw C}let w=b?`stay`:`enter`,T;if(S)T={...S,cause:w,search:x(b?b.search:S.search,u),_strictSearch:p,searchError:m};else{let e=xt(i)?`pending`:`success`;T={id:y,ssr:i.options.ssr,index:n,routeId:i.id,params:b?.params??f,_strictParams:f,pathname:_,updatedAt:Date.now(),search:b?x(b.search,u):u,_strictSearch:p,searchError:m,status:e,isFetching:!1,error:void 0,paramsError:C,context:{},abortController:t?._controller??new AbortController,cause:w,loaderDeps:b?s(b.loaderDeps,h):h,invalid:!1,preload:!1,staticData:i.options.staticData||{},fullPath:i.fullPath}}let E=c===i.id;T._notFound&&!E&&(T.error=void 0),T._notFound=E,l[n]=T}for(let e=0;e<l.length;e++){let n=l[e];n.params=n.cause===`stay`?x(n.params,f):f,t?._controller&&(n.context={})}return l}matchRoutesLightweight(e){let t=y(this.stores.ids.get()),n=t?this.stores.byRoute.get(t).get():void 0,r=n?.id,i=this.lightweightCache.get(e);if(i&&i[0]===r)return i[1];let[a,o]=this.getMatchedRoutes(e.pathname),s=y(a),c={...e.search};for(let e of a)try{Object.assign(c,Ot(e.options.validateSearch,c))}catch{}let l=n&&n.routeId===s.id&&n.pathname===e.pathname,u;if(l)u=n.params;else{let e=Object.assign(Object.create(null),o);for(let t of a)try{Mt(t,e)}catch{}u=e}let d=[a,s.fullPath,c,u];return this.lightweightCache.set(e,[r,d]),d}},Et=class extends Error{},Dt=class extends Error{};function Ot(e,t){if(e==null)return{};if(`~standard`in e){let n=e[`~standard`].validate(t);if(n instanceof Promise)throw new Et(`Async validation not supported`);if(n.issues)throw new Et(JSON.stringify(n.issues,void 0,2),{cause:n});return n.value}return`parse`in e?e.parse(t):typeof e==`function`?e(t):{}}function kt(e,t,n,r){let i=[];for(let e of n){let t=e.options;`search`in t?t.search?.middlewares&&i.push(...t.search.middlewares):(t.preSearchFilters||t.postSearchFilters)&&i.push(({search:e,next:n})=>{let r=n(t.preSearchFilters?t.preSearchFilters.reduce((e,t)=>t(e),e):e);return t.postSearchFilters?t.postSearchFilters.reduce((e,t)=>t(e),r):r});let n=t.validateSearch;n&&i.push(({search:e,next:t,meta:i})=>{let a=t(e);if(r)try{let e=Ot(n,a);if(i&&e)for(let t in e)t in a||(i.defaulted||=new Map).set(t,e[t]);return{...a,...e}}catch{}return a})}let a=(e,n,r)=>{if(e>=i.length){if(!t.search)return{};if(t.search===!0)return n;let e=fe(t.search,n);return r&&(r.explicit=e),e}return i[e]({search:n,next:(t,n)=>{if(n){let n=r||{};return{search:a(e+1,t,n),meta:n}}return a(e+1,t,r)},meta:r})};return a(0,e)}function At(e,t){if(e!==`root`){let e;for(let n=t.length-1;n>=0;n--){let r=t[n];if(r.options.notFoundComponent)return r.id;e||=r.children&&r.id}if(e)return e}return be}function jt(e,t){return e===!1||e===null?Object.create(null):(e??!0)===!0?t:Object.assign(t,fe(e,t))}function Mt(e,t){let n=e.options.params?.parse??e.options.parseParams;n&&Object.assign(t,n(t))}function Nt(e,t){return e.options[t]?.preload?.()}function Pt(e,t){let n=Nt(e,`component`),r=Nt(e,`pendingComponent`),i=t&&r?r.then(t):r;return t&&!r&&t(),n&&i?Promise.all([n,i]).then(()=>{}):n??i}function M(e,t,n){let r=()=>t===!1?void 0:t?Nt(e,t):Pt(e,n),i=e._lazy;if(i)return i===!0?r():i.then(r);if(!e.lazyFn)return r();let a=e.lazyFn().then(t=>{{let{id:n,...r}=t.options;Object.assign(e.options,r),e._lazy=!0}},t=>{throw e._lazy=void 0,t});return e._lazy=a,a.then(r)}function Ft(e){let t=e.findIndex(e=>e.status!==`success`||e._notFound)+1;return t&&t<e.length?e.slice(0,t):e}var N=0,P=1,It=2,F=3,I=4;function L(e){return typeof e[0]==`number`}function R(e,t){return t.aborted?Promise.race([Promise.reject(t),e]):new Promise((n,r)=>{let i=()=>r(t);t.addEventListener(`abort`,i,{once:!0}),Promise.resolve(e).then(n,r).finally(()=>t.removeEventListener(`abort`,i))})}function z(e,t){return e.routesById[t.routeId]}function B(e,t,n){return st(e)?[F,e]:ge(e)?(e.routeId||=n,[It,e]):(t&&typeof e?.then==`function`&&(e=Error(`A Promise was thrown`,{cause:e})),t?[P,e]:[N,e])}function Lt(e,t){let n=B(t,!0,e.id);if(n[0]!==P)return n;try{e.options.onError?.(n[1])}catch(t){n=B(t,!0,e.id)}return n}function V(e,t,n){return n[0].signal.aborted||!n[2]()?(n[0].abort(),[I]):Lt(e,t)}function Rt(e,t){return n=>e.navigate({...n,_fromLocation:t})}async function zt(e,t,n,r,i,a){let[o,s]=t,c=n[0].signal,l=!!n[4];for(let t=n[7]??0;t<r;t++){let r=s[t],i=z(e,r);r.abortController=n[0];let u=s[t-1]?.context??e.options.context??{},d={params:r.params,location:o,navigate:Rt(e,o),buildLocation:e.buildLocation,cause:l?`preload`:r.cause,abortController:n[0],preload:l,matches:s,routeId:i.id},f=u;try{let e=r._ctx;!e&&i.options.context&&(e=r._ctx=i.options.context({...d,deps:r.loaderDeps,context:u})||{}),f={...u,...e},r.context=f}catch(a){return H(e,r),[t,V(i,a,n)]}if(c.aborted||!n[2]())return n[0].abort(),[t,[I]];let p=r.paramsError??r.searchError;if(p!==void 0)return H(e,r),[t,V(i,p,n)];let m=i.options.beforeLoad;if(!m)continue;let h={...d,search:r.search,context:f,...e.options.additionalContext},g=r.status;g===`success`&&t>=a&&(r.status=`pending`),n[8]?.();try{W(e,r,`beforeLoad`,n[0]);let a=await R(m(h),c);if(!n[2]())return n[0].abort(),[t,[I]];let o=B(a,!1,i.id);if(o[0]!==N)return H(e,r),[t,o];r.context={...f,...a}}catch(a){return H(e,r),[t,V(i,a,n)]}finally{g===`success`&&r.status===`pending`&&(r.status=`success`),W(e,r,!1,n[0])}}i()}function Bt(e,t,n){if(!(!n||--n[2])){if(e._flights?.get(t.id)===n){let n=e._tx;if(n&&!n[0].signal.aborted&&!n[3].includes(t)&&n[3].some(e=>e.id===t.id)&&n[3].some(e=>e.isFetching===`beforeLoad`))return;e._flights.delete(t.id)}return n[1]}}function H(e,t){let n=t._flight;t._flight=void 0,Bt(e,t,n)?.abort()}function U(e,t,n,r){let i=[];for(let a of t)if(!n?.includes(a)){let t=a._flight;if(a._flight=void 0,r&&t?.[2]===1&&e._flights?.get(a.id)===t&&n?.some(e=>e.id===a.id))t[2]=0;else{let n=Bt(e,a,t);n&&i.push(n)}}for(let e of i)e.abort()}function Vt(e){for(let t of e){let e=t._flight;e&&e[2]++}}function W(e,t,n,r){if(t.isFetching=n,r&&e._tx?.[0]!==r)return;let i=e.stores.byRoute.get(t.routeId),a=i?.get();a?.id===t.id&&i.set({...a,isFetching:n})}function Ht(e,t,n,r,i,a,o){let s=t[0];return{params:n.params,location:s,navigate:Rt(e,s),cause:o?`preload`:n.cause,abortController:i,preload:o,deps:n.loaderDeps,parentMatchPromise:a,context:n.context,route:r,...e.options.additionalContext}}async function Ut(e,t,n,r,i,a,o,s){let c=s.signal;if(c.aborted)return[I];if(!i)return[N,void 0];let l=n._flight;W(e,n,`loader`,s);try{if(!l){let s=new AbortController;l=[Promise.resolve().then(()=>i(Ht(e,t,n,r,s,a,o))).then(e=>B(e,!1,r.id),e=>B(e,!0,r.id)).then(t=>(t[0]!==N&&e._flights?.get(n.id)===l&&(e._flights.delete(n.id),l[2]||s.abort()),t[0]===P&&l[2]?Lt(r,t[1]):t)),s,1],(e._flights??=new Map).set(n.id,l)}return n._flight=l,n.abortController=l[1],await R(l[0],c)}catch(t){if(t!==c)throw t;return H(e,n),[I]}finally{W(e,n,!1,s)}}function Wt(e,t,n){t[0]===N?(e.loaderData=t[1],e.error=void 0,e.status=`success`,e.invalid=!1,e.updatedAt=Date.now(),e.preload=n):t[0]!==F&&(e.status=`success`,e.error=void 0,e.invalid=!0)}function Gt(e,t,n){let r=e._cache.get(t.id);if(r!==n||e._committed.some(e=>e.id===t.id&&e._flight===t._flight))return;let i={...t,_notFound:void 0,context:{}};i._flight&&i._flight[2]++,e._cache.set(t.id,i),r&&H(e,r)}function Kt(e,t){return t[0]===P||t[0]===It?{...e,status:t[0]===P?`error`:`notFound`,error:t[1],_flight:void 0}:e}function qt(e,t,n,r,i,a,o){let s=t[1][n],c=z(e,s),l=!!a[4],u=l?e._cache.get(s.id):void 0,d,f=!1,p;try{if(s.status===`success`&&(d=c.options.shouldReload,typeof d==`function`&&(d=d(Ht(e,t,s,c,a[0],i,l))),a[2]()||(a[0].abort(),p=[I])),!p)if(s.status!==`success`)f=!0;else{let t=a[4]||s.preload?c.options.preloadStaleTime??e.options.defaultPreloadStaleTime??3e4:c.options.staleTime??e.options.defaultStaleTime??0;f=!!(s.invalid||d||d===void 0&&Date.now()-s.updatedAt>=t&&(a[6]||s.cause===`enter`||a[3].some(e=>e.routeId===s.routeId&&e.id!==s.id)))}}catch(t){s.invalid=!0,H(e,s),p=V(c,t,a)}let m=c.options.loader,h=typeof m==`function`?m:m?.handler,g=(!l||c.options.preload!==!1)&&m?e._flights?.get(s.id):void 0;g===s._flight||p?g=void 0:g&&!f&&!l&&d===void 0?f=!0:f||(g=void 0);let _=!!(m&&f&&s.status===`success`&&!l&&!a[5]&&((typeof m==`function`?void 0:m?.staleReloadMode)??e.options.defaultStaleReloadMode)!==`blocking`),v=f&&(!l||c.options.preload!==!1),y=v&&!_&&(s.status!==`success`||!!m),b=c.lazyFn&&c._lazy!==!0?a[8]:void 0;if(v&&!m&&(s.invalid=!1,s.updatedAt=Date.now()),g&&g[2]++,y){let t=s._flight;s._flight=g,Bt(e,s,t)?.abort(),s.status===`success`&&n>=o&&(s.status=`pending`),a[8]?.()}v||(s.isFetching=!1);let x=(p?Promise.resolve(p):y?Ut(e,t,s,c,h,i,l,a[0]):Promise.resolve([N,s.loaderData])).then(t=>(y&&(Wt(s,t,l),t[0]===N&&(l&&m&&!a[0].signal.aborted&&Gt(e,s,u),s.status=`pending`)),t)),S=R(Promise.resolve().then(()=>M(c,void 0,b)),a[0].signal).then(()=>void 0,e=>[n,V(c,e,a)]).then(e=>x.then(t=>(y&&!e&&t[0]===N&&s.status===`pending`&&a[2]()&&(s.status=`success`,a[8]?.()),e)));if(r.push([n,x,S]),!_)return x.then(e=>Kt(s,e));let C={...s,status:`pending`,preload:!1,_flight:g};s.invalid=!1,s.isFetching=`loader`;let ee=Ut(e,t,C,c,h,i,!1,a[0]).then(e=>(s.isFetching=!1,Wt(C,e,!1),e));return(t[2]??=[]).push([n,ee,S,C]),ee.then(e=>Kt(C,e))}async function Jt(e,t,n,r,i=0){let a=n?.[1][1],o=a?.routeId?t.findIndex(e=>e.routeId===a.routeId):n?.[0]??t.length-1;o<0&&(o=0);for(let n=o;n>=0;n--){let i=z(e,t[n]),a=M(i,!1);if(a)try{await R(a,r)}catch(e){if(e===r)throw e}if(i.options.notFoundComponent)return n}return a?.routeId?o:i}function G(e,t){t[2]&&=(U(e,t[2].map(e=>e[3])),void 0)}async function Yt(e,t,n,r){let i;try{await Promise.all(e.map(e=>e[1].then(async t=>{let a=e[0];if(!(r&&a>=await r)){if(t[0]>=F)throw[a,t];!i&&t[0]!==N&&(i=[a,t],await Promise.all((n??[]).map(e=>{if(!(e[0]<=a))return e[1].then(t=>{if(t[0]===F)throw[e[0],t]})})))}})))}catch(e){return e}return t??i}async function Xt(e,t,n,r,i,a,o){let s=t[1],c=await a,l=!1,u=s.findIndex(e=>e._notFound),d=t=>t[1][0]===It?Jt(e,s,t,r.signal):t[0],f=u<0?s.length:u;if((c?.[1][0]??0)>=F)f=0;else if(c){f=c[2]??=await d(c);for(let e of n){if(e[0]>=f)break;let t=await e[1];if(t[0]!==N&&t[0]<F&&!(`loaderData`in s[e[0]])){c=[e[0],t],f=c[2]=await d(c);break}}}for(let e of n){if(e[0]>=f)break;let t=await e[2];if(t){c=t;break}}if((c?.[1][0]??0)>=F){let n=c[1];if(n[0]!==F||n[1].options.reloadDocument||i<20)return G(e,t),n;l=!0,c=[0,[P,Error(`Too many redirects`)]]}let p=c?c[2]??await d(c):u;if(p>=0){let i=c?.[1],a=i?.[0],u=s[p],d=i?.[1],f=()=>{i&&(u._notFound=void 0,a===P?u.status=`error`:(d.routeId=u.routeId,u.routeId===e.routeTree.id?(u.status=`success`,u._notFound=!0):u.status=`notFound`),u.error=d,u.isFetching=!1)};f();let m=z(e,u);try{await R(i?Promise.resolve().then(()=>M(m,a===P?`errorComponent`:`notFoundComponent`)):Promise.all([M(m),M(m,`notFoundComponent`)]),r.signal)}catch(n){if(n===r.signal)return G(e,t),[I]}i?l&&(r.abort(),await Promise.all([...n.map(e=>e[1]),...n.map(e=>e[2]),...(t[2]??[]).map(e=>e[1])]),G(e,t),U(e,s),f()):(u.status=`success`,o?.())}return t}async function Zt(e,t,n,r=0,i=t[1].length){let a=t[1];for(let t=r;t<i;t++){let r=a[t],i=z(e,r).options;if(i.head||i.scripts)try{let t={ssr:e.options.ssr,matches:a,match:r,params:r.params,loaderData:r.loaderData},[o,s]=await R(Promise.all([i.head?.(t),i.scripts?.(t)]),n);r.meta=o?.meta,r.links=o?.links,r.headScripts=o?.scripts,r.styles=o?.styles,r.scripts=s}catch(e){if(e===n)break;console.error(e)}if(r.status!==`success`||r._notFound)break}return t}async function Qt(e,t,n,r){let i=[t,n],a=e.stores.matches.get(),o=n.findIndex(e=>e._notFound);if(e.options.notFoundMode!==`root`&&o>=0){let t=await Jt(e,i[1],void 0,r[0].signal,o);t!==o&&(n[o]._notFound=void 0,n[t]._notFound=!0),o=t}let s=o<0?n.length:o+1,c=0;for(;c<s&&c!==o;){let e=n[c],t=r[3][c],i=a[c];if(t?.id!==e.id||t.status!==`success`||t._notFound||e.preload||i?.id!==e.id||i.status!==`success`||i._notFound)break;c++}let l=[],u=r[7]??0,d=u?Promise.resolve(i[1][u-1]):void 0,f=()=>{for(let t=u;t<s&&!r[0].signal.aborted;t++)d=qt(e,i,t,l,d,r,c)},p=await zt(e,i,r,s,f,c);if(p&&(r[5]=!0,s=p[0],p[1][0]===It?(p[2]=await Jt(e,i[1],p,r[0].signal),s=Math.min(s,p[2]+1)):p[1][0]>=F&&(s=0),f()),r[2]()&&!r[4]){let t=[];for(let[n,r]of e._flights??[])r[2]||(e._flights.delete(n),t.push(r[1]));for(let e of t)e.abort()}let m;try{let t=Xt(e,i,l,r[0],r[1],Yt(l,p,i[2]),r[8]);i[2]?.length&&(i[3]=Yt(i[2],void 0,void 0,t.then(e=>L(e)?0:Ft(e[1]).length,()=>0))),m=await t}catch(t){throw G(e,i),t}return L(m)?m:Zt(e,m,r[0].signal,r[7]===m[1].length?r[7]:0)}function $t(e,t){if(e._tx!==t)return;let n=e._pending,r=!1,i=n?.[0][3][n[1]]?.id;n?.[0]!==t&&(n&&t[3][n[1]]?.id===i?(n[0]=t,r=!0):(clearTimeout(n?.[3]),e._pending=n=void 0));let a=t[3],o=e.stores.matches.get(),s=-1,c,l,u,d=!1;for(let t=0;t<a.length;t++){let n=a[t],r=n.status===`success`;if(d=o[t]?.id===n.id&&o[t]?.status===`pending`,r&&!d)continue;let i=z(e,n);if(c=r&&d||n.invalid?0:i.options.pendingMs??e.options.defaultPendingMs,u=i.options.pendingComponent??e.options.defaultPendingComponent,!u||typeof c!=`number`||c===1/0)return;s=t,l=i.options.pendingMinMs??e.options.defaultPendingMinMs??0;break}if(s<0)return;let f=a[s].id;if((!n||n[1]!==s||i!==f)&&(clearTimeout(n?.[3]),e._pending=n=[t,s,d?Date.now()+l:t[4]+c,void 0,d?Promise.resolve(!0):void 0,u]),n[4]&&!r&&n[5]===u)return;if(n[5]=u,!n[4]){clearTimeout(n[3]);let r=n[2]-Date.now();if(r>0){n[3]=setTimeout(()=>$t(e,t),r);return}n[2]=0}let p=a.map(e=>({...e,_flight:void 0}));p[s].status=`pending`;let m=e.startTransition(()=>e.stores.setMatches(p),p).then(t=>(t&&e._pending===n&&n[4]===m&&!n[2]&&(n[2]=Date.now()+l),t));n[4]=m}function en(e,t){let n=e._pending;n?.[0]===t&&(clearTimeout(n[3]),e._pending=void 0)}function tn(e,t){e._committed=t,e.stores.setMatches(t)}function nn(e,t){U(e,t[1]),G(e,t)}function rn(e,t,n,r){let i=e._committed,a=e._cache;for(let e of n)e.preload=!1,r&&(e._assetEnd=void 0);let o=Ft(n).length,s=new Map,c=Date.now();for(let t of[...i,...a.values()]){if(t.status!==`success`||n.some((e,n)=>e.id===t.id&&(n<o||e.status===`success`)))continue;let r=z(e,t);!r.options.loader||c-t.updatedAt>=(t.preload?r.options.preloadGcTime??e.options.defaultPreloadGcTime??3e5:r.options.gcTime??e.options.defaultGcTime??3e5)||s.set(t.id,a.get(t.id)===t?t:{...t,_flight:void 0,isFetching:!1,context:{}})}t[3]=[],e._cache=s,tn(e,n),U(e,[...a.values(),...i],[...n,...s.values()]),wt(e,i,n,()=>e._tx===t)}async function K(e,t){let n=e._tx;for(;n&&n!==t;){if(await n[5],e._tx===n)return;n=e._tx}}async function an(e,t,n){await e.navigate({...n.options,replace:!0,ignoreBlocker:!0,_redirects:t[1]+1})}function on(e,t){en(e,t),t[0].abort(),U(e,t[3]),t[3]=[],e._tx===t&&(e.batch(()=>{e.stores.status.set(`idle`),e.stores.setMatches(e._committed)}),e._tx===t&&(e._commitPromise?.resolve(),e._commitPromise=void 0))}async function sn(e,t,n,r,i){let a=n.map(e=>({...e}));Vt(a);for(let t of r)H(e,a[t[0]]),a[t[0]]=t[3];let o=[t[2],a],s;try{s=await Xt(e,o,r,t[0],t[1],i)}catch(t){throw U(e,a),t}if(L(s)){U(e,a),s[0]===F&&e._tx===t&&e._committed===n&&await an(e,t,s[1]);return}let c=await Zt(e,s,t[0].signal);if(e._tx!==t||e._committed!==n){U(e,c[1]);return}for(let t of c[1]){let n=e._cache.get(t.id);n?._flight&&n._flight===t._flight&&(e._cache.delete(t.id),H(e,n))}tn(e,c[1]),U(e,n,c[1])}async function cn(e,t,n,r,i,a){let o=[t[0],t[1],()=>e._tx===t&&!!t[3].length,e._committed,void 0,i,n,a,r],s=await Qt(e,t[2],t[3],o);if(L(s)){s[0]===F&&e._tx===t?(en(e,t),U(e,t[3]),t[3]=[],e._tx===t&&await an(e,t,s[1])):on(e,t);return}let c=e._pending;if(c?.[0]===t&&(clearTimeout(c[3]),c[4])){let n=t[0].signal,r=!1;try{r=await R(c[4],n)}catch(e){if(e!==n)throw e}if(r&&e._pending===c&&c[0]===t){let e=c[2]-Date.now();if(e>0){try{await R(new Promise(t=>{c[3]=setTimeout(t,e)}),n)}catch{}clearTimeout(c[3])}}}if(e._tx!==t){en(e,t),nn(e,s);return}let l=t[2],u=St(l,e.stores.resolvedLocation.get()),d=s[2];await e.startViewTransition(async()=>{if(e._tx!==t){nn(e,s);return}let n=await e.startTransition(()=>{en(e,t),rn(e,t,s[1],a),e._tx===t&&(e.emit({type:`onLoad`,...u}),e._tx===t&&e.emit({type:`onBeforeRouteMount`,...u}))},s[1]);if(e._tx!==t){G(e,s);return}d?.length&&sn(e,t,s[1],d,s[3]).catch(console.error),e.batch(()=>{e.stores.resolvedLocation.set(l),e.stores.status.set(`idle`),e._tx===t&&e.emit({type:`onResolved`,...u}),n&&e._tx===t&&e.emit({type:`onRendered`,...u})}),e._tx===t&&(e._commitPromise?.resolve(),e._commitPromise=void 0)})}async function ln(e,t){let n=e._tx,r=e.stores.resolvedLocation.get(),i=r??e.stores.location.get(),a=e.latestLocation,o=e._pendingLocation,s=o?.href===a.href?o._redirects??0:0,c=e._handoff,l=c?.[0](),u=new AbortController,d=e._preflight;if(e._preflight=u,l||c?.[1](),d?.abort(),u.signal.aborted){await K(e,n);return}let f=St(a,r);if(e.emit({type:`onBeforeNavigate`,...f}),u.signal.aborted||e.emit({type:`onBeforeLoad`,...f}),u.signal.aborted){await K(e,n);return}let p=i.href===a.href,m,h=u;try{m=e.matchRoutes(a,{_controller:u}),Vt(m)}catch(t){if(u.abort(),!st(t)){await K(e),e._commitPromise?.resolve(),e._commitPromise=void 0;return}await e.navigate({...t.options,replace:!0,ignoreBlocker:!0}),await K(e,n);return}let g=l?c[1](m):void 0;if(g?h=l:l?.abort(),u.signal.aborted){U(e,m),await K(e,n);return}e._preflight=void 0;let _=[h,s,a,m,Date.now(),Promise.resolve().then(()=>cn(e,_,p,()=>$t(e,_),t?.sync,g)).catch(()=>{e._tx===_&&on(e,_)})];if(e._tx=_,n){for(let t of e.stores.matches.get()){if(e._tx!==_)break;t.isFetching&&W(e,t,!1)}n[0].abort(),U(e,n[3],_[3],!0)}if(e._tx!==_){U(e,_[3]),_[3]=[],await K(e,_);return}e.batch(()=>{e.stores.status.set(`pending`),e.stores.location.set(a)}),!r&&!m.some(e=>e._notFound)&&$t(e,_);try{await _[5]}finally{await K(e,_)}}async function un(e,t,n=0){if(n>20)return;let r=t._builtLocation??e.buildLocation(t),i=e._committed,a=new AbortController,o;try{o=e.matchRoutes(r,{_controller:a}),Vt(o)}catch(e){a.abort(),ge(e)||console.error(e);return}(e._preloads??=new Map).set(a,o);let s;try{let t;try{t=await Qt(e,r,o,[a,n,()=>!0,i,!0])}finally{s=e._preloads.delete(a),U(e,o),a.abort()}if(!L(t))return t[1];if(s&&t[0]===F&&!t[1].options.reloadDocument)return un(e,{...t[1].options,_fromLocation:r},n+1)}catch(e){ge(e)||console.error(e)}}var dn=class{get to(){return this._to}get id(){return this._id}get path(){return this._path}get fullPath(){return this._fullPath}constructor(e){if(this.init=e=>{this.originalIndex=e.originalIndex;let t=this.options,n=!t?.path&&!t?.id;this.parentRoute=this.options.getParentRoute?.(),n?this._path=be:this.parentRoute||p();let r=n?be:t?.path;r&&r!==`/`&&(r=le(r));let i=t?.id||r,a=n?be:ue([this.parentRoute.id===`__root__`?``:this.parentRoute.id,i]);r===`__root__`&&(r=`/`),a!==`__root__`&&(a=ue([`/`,a]));let o=a===`__root__`?`/`:ue([this.parentRoute.fullPath,r]);this._path=r,this._id=a,this._fullPath=o,this._to=v(o)},this.addChildren=e=>this._addFileChildren(e),this._addFileChildren=e=>(Array.isArray(e)&&(this.children=e),typeof e==`object`&&e&&(this.children=Object.values(e)),this),this._addFileTypes=()=>this,this.updateLoader=e=>(Object.assign(this.options,e),this),this.update=e=>(Object.assign(this.options,e),this),this.lazy=e=>(this.lazyFn=e,this),this.redirect=e=>ot({from:this.fullPath,...e}),this.options=e||{},this.isRoot=!e?.getParentRoute,e?.id&&e?.path)throw Error(`Route cannot have both an 'id' and a 'path' option.`)}},fn=class extends dn{constructor(e){super(e)}},q=(e=>(e[e.None=0]=`None`,e[e.Mutable=1]=`Mutable`,e[e.Watching=2]=`Watching`,e[e.RecursedCheck=4]=`RecursedCheck`,e[e.Recursed=8]=`Recursed`,e[e.Dirty=16]=`Dirty`,e[e.Pending=32]=`Pending`,e))(q||{});function pn({update:e,notify:t,unwatched:n}){return{link:r,unlink:i,propagate:a,checkDirty:o,shallowPropagate:s};function r(e,t,n){let r=t.depsTail;if(r!==void 0&&r.dep===e)return;let i=r===void 0?t.deps:r.nextDep;if(i!==void 0&&i.dep===e){i.version=n,t.depsTail=i;return}let a=e.subsTail;if(a!==void 0&&a.version===n&&a.sub===t)return;let o=t.depsTail=e.subsTail={version:n,dep:e,sub:t,prevDep:r,nextDep:i,prevSub:a,nextSub:void 0};i!==void 0&&(i.prevDep=o),r===void 0?t.deps=o:r.nextDep=o,a===void 0?e.subs=o:a.nextSub=o}function i(e,t=e.sub){let r=e.dep,i=e.prevDep,a=e.nextDep,o=e.nextSub,s=e.prevSub;return a===void 0?t.depsTail=i:a.prevDep=i,i===void 0?t.deps=a:i.nextDep=a,o===void 0?r.subsTail=s:o.prevSub=s,s===void 0?(r.subs=o)===void 0&&n(r):s.nextSub=o,a}function a(e){let n=e.nextSub,r;top:do{let i=e.sub,a=i.flags;if(a&60?a&12?a&4?!(a&48)&&c(e,i)?(i.flags=a|40,a&=1):a=0:i.flags=a&-9|32:a=0:i.flags=a|32,a&2&&t(i),a&1){let t=i.subs;if(t!==void 0){let i=(e=t).nextSub;i!==void 0&&(r={value:n,prev:r},n=i);continue}}if((e=n)!==void 0){n=e.nextSub;continue}for(;r!==void 0;)if(e=r.value,r=r.prev,e!==void 0){n=e.nextSub;continue top}break}while(!0)}function o(t,n){let r,i=0,a=!1;top:do{let o=t.dep,c=o.flags;if(n.flags&16)a=!0;else if((c&17)==17){if(e(o)){let e=o.subs;e.nextSub!==void 0&&s(e),a=!0}}else if((c&33)==33){(t.nextSub!==void 0||t.prevSub!==void 0)&&(r={value:t,prev:r}),t=o.deps,n=o,++i;continue}if(!a){let e=t.nextDep;if(e!==void 0){t=e;continue}}for(;i--;){let i=n.subs,o=i.nextSub!==void 0;if(o?(t=r.value,r=r.prev):t=i,a){if(e(n)){o&&s(i),n=t.sub;continue}a=!1}else n.flags&=-33;n=t.sub;let c=t.nextDep;if(c!==void 0){t=c;continue top}}return a}while(!0)}function s(e){do{let n=e.sub,r=n.flags;(r&48)==32&&(n.flags=r|16,(r&6)==2&&t(n))}while((e=e.nextSub)!==void 0)}function c(e,t){let n=t.depsTail;for(;n!==void 0;){if(n===e)return!0;n=n.prevDep}return!1}}function mn(e,t,n){let r=typeof e==`object`,i=r?e:void 0;return{next:(r?e.next:e)?.bind(i),error:(r?e.error:t)?.bind(i),complete:(r?e.complete:n)?.bind(i)}}var hn=[],gn=0,{link:_n,unlink:vn,propagate:yn,checkDirty:bn,shallowPropagate:xn}=pn({update(e){return e._update()},notify(e){hn[Cn++]=e,e.flags&=~q.Watching},unwatched(e){e.depsTail!==void 0&&(e.depsTail=void 0,e.flags=q.Mutable|q.Dirty,En(e))}}),Sn=0,Cn=0,J,wn=0;function Tn(e){try{++wn,e()}finally{--wn||Dn()}}function En(e){let t=e.depsTail,n=t===void 0?e.deps:t.nextDep;for(;n!==void 0;)n=vn(n,e)}function Dn(){if(!(wn>0)){for(;Sn<Cn;){let e=hn[Sn];hn[Sn++]=void 0,e.notify()}Sn=0,Cn=0}}function On(e,t){let n=typeof e==`function`,r=e,i={_snapshot:n?void 0:e,subs:void 0,subsTail:void 0,deps:void 0,depsTail:void 0,flags:n?q.None:q.Mutable,get(){return J!==void 0&&_n(i,J,gn),i._snapshot},subscribe(e){let t=mn(e),n={current:!1},r=kn(()=>{i.get(),n.current?t.next?.(i._snapshot):n.current=!0});return{unsubscribe:()=>{r.stop()}}},_update(e){let a=J,o=t?.compare??Object.is;if(n)J=i,++gn,i.depsTail=void 0;else if(e===void 0)return!1;n&&(i.flags=q.Mutable|q.RecursedCheck);try{let t=i._snapshot,a=typeof e==`function`?e(t):e===void 0&&n?r(t):e;return t===void 0||!o(t,a)?(i._snapshot=a,!0):!1}finally{J=a,n&&(i.flags&=~q.RecursedCheck),En(i)}}};return n?(i.flags=q.Mutable|q.Dirty,i.get=function(){let e=i.flags;if(e&q.Dirty||e&q.Pending&&bn(i.deps,i)){if(i._update()){let e=i.subs;e!==void 0&&xn(e)}}else e&q.Pending&&(i.flags=e&~q.Pending);return J!==void 0&&_n(i,J,gn),i._snapshot}):i.set=function(e){if(i._update(e)){let e=i.subs;e!==void 0&&(yn(e),xn(e),Dn())}},i}function kn(e){let t=()=>{let t=J;J=n,++gn,n.depsTail=void 0,n.flags=q.Watching|q.RecursedCheck;try{return e()}finally{J=t,n.flags&=~q.RecursedCheck,En(n)}},n={deps:void 0,depsTail:void 0,subs:void 0,subsTail:void 0,flags:q.Watching|q.RecursedCheck,notify(){let e=this.flags;e&q.Dirty||e&q.Pending&&bn(this.deps,this)?t():this.flags=q.Watching},stop(){this.flags=q.None,this.depsTail=void 0,En(this)}};return t(),n}var An={};function jn(e,t){let n=O.useRef();return r=>{let i=e?.select?e.select(r):r;return e?.structuralSharing??t.options.defaultStructuralSharing?n.current=s(n.current,i):i}}function Y(e){let t=D(),n=O.useContext(e.from?xe:ye),r=e.from??n,i=t.stores.getMatchStore(r),a=jn(e,t),o=ae(i,e=>e?a(e):An);if(o!==An)return o;(e.shouldThrow??!0)&&p()}function Mn(e){return Y({from:e.from,strict:e.strict,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.loaderData):t.loaderData})}function Nn(e){let{select:t,...n}=e;return Y({...n,select:e=>t?t(e.loaderDeps):e.loaderDeps})}function Pn(e){return Y({from:e.from,shouldThrow:e.shouldThrow,structuralSharing:e.structuralSharing,strict:e.strict,select:t=>{let n=e.strict===!1?t.params:t._strictParams;return e.select?e.select(n):n}})}function Fn(e){return Y({from:e.from,strict:e.strict,shouldThrow:e.shouldThrow,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.search):t.search})}function In(e){return Y({...e,select:t=>e.select?e.select(t.context):t.context})}var Ln=class extends dn{constructor(e){super(e),this.useMatch=e=>Y({select:e?.select,from:this.id,structuralSharing:e?.structuralSharing}),this.useRouteContext=e=>In({...e,from:this.id}),this.useSearch=e=>Fn({select:e?.select,structuralSharing:e?.structuralSharing,from:this.id}),this.useParams=e=>Pn({select:e?.select,structuralSharing:e?.structuralSharing,from:this.id}),this.useLoaderDeps=e=>Nn({...e,from:this.id}),this.useLoaderData=e=>Mn({...e,from:this.id}),this.useNavigate=()=>T({from:this.fullPath}),this.Link=Ee.forwardRef((e,t)=>k(w,{ref:t,from:this.fullPath,...e}))}};function Rn(e){return new Ln(e)}function zn(){return e=>Vn(e)}var Bn=class extends fn{constructor(e){super(e),this.useMatch=e=>Y({select:e?.select,from:this.id,structuralSharing:e?.structuralSharing}),this.useRouteContext=e=>In({...e,from:this.id}),this.useSearch=e=>Fn({select:e?.select,structuralSharing:e?.structuralSharing,from:this.id}),this.useParams=e=>Pn({select:e?.select,structuralSharing:e?.structuralSharing,from:this.id}),this.useLoaderDeps=e=>Nn({...e,from:this.id}),this.useLoaderData=e=>Mn({...e,from:this.id}),this.useNavigate=()=>T({from:this.fullPath}),this.Link=Ee.forwardRef((e,t)=>k(w,{ref:t,from:this.fullPath,...e}))}};function Vn(e){return new Bn(e)}function X(e){return e=>{let t=Rn(e);return t.isRoot=!1,t}}function Z(e,t){let n,r,i,a=()=>(n||=(i=void 0,e().then(e=>{n=void 0,r=e[t??`default`]}).catch(e=>{n=void 0,i=e})),n),o=function(e){if(i){if(c(i)&&typeof sessionStorage<`u`){let e=`tanstack_router_reload:${i.message}`;if(!sessionStorage.getItem(e))throw sessionStorage.setItem(e,`1`),window.location.reload(),new Promise(()=>{})}throw i}if(!r)if(u)u(a());else throw a();return O.createElement(r,e)};return o.preload=a,o}function Hn(e,t){let n=e[1];e.length=0,n?.(t)}function Un({t:e}){let t=D(),n=t._rendered??=[];return t.startTransition=(r,i)=>new Promise((a,o)=>{Hn(n,!1),n.push(i,a),e(t),O.startTransition(()=>{try{r()}catch(e){n[1]===a&&(n.length=0),o(e)}})}),se(()=>{let e=t.history.subscribe(t.load);t.updateLatestLocation();let r=t.latestLocation,i=t.buildLocation({to:r.pathname,search:!0,params:!0,hash:!0,state:!0,_includeValidateSearch:!0});if(v(r.publicHref)!==v(i.publicHref))return t.commitLocation({...i,replace:!0,ignoreBlocker:!0}),e;let a=t.stores.resolvedLocation.get();return a?.href===r.href&&a.state.__TSR_key===r.state.__TSR_key?n.push(t.stores.matches.get(),e=>{e&&t.emit({type:`onRendered`,...St(a,a)})}):t._tx||t.load().catch(console.error),e},[t,t.history]),null}function Wn(){let e=D(),t=e.routesById[be],n=_e(e,t),r=e.ssr?me:O.Suspense,i=Pe(Ne,{children:[k(Un,{t:O.useState()[1]}),k(r,{fallback:n,children:k(Gn,{})})]});return e.options.InnerWrap?k(e.options.InnerWrap,{children:i}):i}function Gn(){let e=D(),t=e._rendered,n=ae(e.stores.matches,e=>t[0]??e),r=n[0],i=r?.routeId;se(()=>{t[0]===n&&Hn(t,!0)},[t,n]);let a=i?k(ve,{routeId:i}):null;return k(ye.Provider,{value:i,children:e.options.disableGlobalCatchBoundary?a:k(pe,{getResetKey:()=>r,onCatch:void 0,children:a})})}var Kn=e=>({createMutableStore:On,createReadonlyStore:On,batch:Tn}),qn=e=>new Jn(e),Jn=class extends Tt{constructor(e){super(e,Kn)}};function Yn({router:e,children:t,...r}){n(r)&&e.update({...e.options,...r,context:{...e.options.context,...r.context}});let i=k(E.Provider,{value:e,children:t});return e.options.Wrap?k(e.options.Wrap,{children:i}):i}function Xn({router:e,...t}){return k(Yn,{router:e,...t,children:k(Wn,{})})}var Zn=Ie.div`
|
|
3
3
|
display: flex;
|
|
4
4
|
align-items: center;
|
|
@@ -10,7 +10,7 @@ import{$ as e,At as t,Bt as n,Ct as r,Dt as i,Et as a,Ft as o,Gt as s,Ht as c,It
|
|
|
10
10
|
font-size: 13px;
|
|
11
11
|
color: ${({theme:e})=>e.color.inkDim};
|
|
12
12
|
max-width: 48ch;
|
|
13
|
-
`,$n=zn()({component:he,notFoundComponent:()=>k(Zn,{children:Pe(C,{$gap:3,style:{alignItems:`center`},children:[k(e,{children:`Not found`}),k(Qn,{children:`This console has no screen at that address.`}),k(ie,{as:`a`,href:`/`,$variant:`primary`,$size:`sm`,children:`Back to the rack`})]})})}),er=`modulepreload`,tr=function(e){return`/`+e},nr={},Q=function(e,t,n){let r=Promise.resolve();if(t&&t.length>0){let e=document.getElementsByTagName(`link`),i=document.querySelector(`meta[property=csp-nonce]`),a=i?.nonce||i?.getAttribute(`nonce`);function o(e){return Promise.all(e.map(e=>Promise.resolve(e).then(e=>({status:`fulfilled`,value:e}),e=>({status:`rejected`,reason:e}))))}function s(e){return import.meta.resolve?import.meta.resolve(e):new URL(e,import.meta.url).href}r=o(t.map(t=>{if(t=tr(t,n),t=s(t),t in nr)return;nr[t]=!0;let r=t.endsWith(`.css`);for(let n=e.length-1;n>=0;n--){let i=e[n];if(i.href===t&&(!r||i.rel===`stylesheet`))return}let i=document.createElement(`link`);if(i.rel=r?`stylesheet`:er,r||(i.as=`script`),i.crossOrigin=``,i.href=t,a&&i.setAttribute(`nonce`,a),document.head.appendChild(i),r)return new Promise((e,n)=>{i.addEventListener(`load`,e),i.addEventListener(`error`,()=>n(Error(`Unable to preload CSS for ${t}`)))})}))}function i(e){let t=new Event(`vite:preloadError`,{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e}return r.then(t=>{for(let e of t||[])e.status===`rejected`&&i(e.reason);return e().catch(i)})},rr=X(`/_app`)({beforeLoad:async({context:e,location:t})=>{if(!(await e.queryClient.ensureQueryData({queryKey:te.status,queryFn:()=>S(`/api/status`),revalidateIfStale:!0})).authenticated)throw ot({to:`/login`,search:{next:t.href}})},component:Z(()=>Q(()=>import(`./_app-
|
|
13
|
+
`,$n=zn()({component:he,notFoundComponent:()=>k(Zn,{children:Pe(C,{$gap:3,style:{alignItems:`center`},children:[k(e,{children:`Not found`}),k(Qn,{children:`This console has no screen at that address.`}),k(ie,{as:`a`,href:`/`,$variant:`primary`,$size:`sm`,children:`Back to the rack`})]})})}),er=`modulepreload`,tr=function(e){return`/`+e},nr={},Q=function(e,t,n){let r=Promise.resolve();if(t&&t.length>0){let e=document.getElementsByTagName(`link`),i=document.querySelector(`meta[property=csp-nonce]`),a=i?.nonce||i?.getAttribute(`nonce`);function o(e){return Promise.all(e.map(e=>Promise.resolve(e).then(e=>({status:`fulfilled`,value:e}),e=>({status:`rejected`,reason:e}))))}function s(e){return import.meta.resolve?import.meta.resolve(e):new URL(e,import.meta.url).href}r=o(t.map(t=>{if(t=tr(t,n),t=s(t),t in nr)return;nr[t]=!0;let r=t.endsWith(`.css`);for(let n=e.length-1;n>=0;n--){let i=e[n];if(i.href===t&&(!r||i.rel===`stylesheet`))return}let i=document.createElement(`link`);if(i.rel=r?`stylesheet`:er,r||(i.as=`script`),i.crossOrigin=``,i.href=t,a&&i.setAttribute(`nonce`,a),document.head.appendChild(i),r)return new Promise((e,n)=>{i.addEventListener(`load`,e),i.addEventListener(`error`,()=>n(Error(`Unable to preload CSS for ${t}`)))})}))}function i(e){let t=new Event(`vite:preloadError`,{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e}return r.then(t=>{for(let e of t||[])e.status===`rejected`&&i(e.reason);return e().catch(i)})},rr=X(`/_app`)({beforeLoad:async({context:e,location:t})=>{if(!(await e.queryClient.ensureQueryData({queryKey:te.status,queryFn:()=>S(`/api/status`),revalidateIfStale:!0})).authenticated)throw ot({to:`/login`,search:{next:t.href}})},component:Z(()=>Q(()=>import(`./_app-CDPKnQ72.js`),__vite__mapDeps([0,1,2,3,4,5])),`component`)}),ir=X(`/login`)({validateSearch:e=>({...typeof e.next==`string`?{next:e.next}:{},...typeof e.reason==`string`?{reason:e.reason}:{}}),component:Z(()=>Q(()=>import(`./login-DjfMomJJ.js`),__vite__mapDeps([6,2,5,7,8,9])),`component`)}),ar=X(`/_app/`)({component:Z(()=>Q(()=>import(`./_app.index-COcCAmbH.js`),__vite__mapDeps([10,2,4,5,11,12,13,8,14,15])),`component`)}),or=X(`/_app/accounts`)({component:Z(()=>Q(()=>import(`./_app.accounts-Dz0ox4Br.js`),__vite__mapDeps([16,17,2,5,4,18,19,20,21,12,7,13,8,14,22])),`component`)}),sr=X(`/_app/console`)({component:Z(()=>Q(()=>import(`./_app.console-hPUmmYjp.js`),__vite__mapDeps([23,2,4,5,7,8])),`component`)}),cr=X(`/_app/database`)({component:Z(()=>Q(()=>import(`./_app.database-DGtP4NdG.js`),__vite__mapDeps([24,2,4,5,7,13,8,14,15,9])),`component`)}),lr=X(`/_app/keys`)({component:Z(()=>Q(()=>import(`./_app.keys-yTXTbKTA.js`),__vite__mapDeps([25,2,4,5,18,19,21,12,7,13,8,14])),`component`)}),ur=X(`/_app/logs`)({component:Z(()=>Q(()=>import(`./_app.logs-BhMvO_Fx.js`),__vite__mapDeps([26,2,4,5,11,12,7,8,14])),`component`)}),dr=X(`/_app/models`)({component:Z(()=>Q(()=>import(`./_app.models-0S3rurIl.js`),__vite__mapDeps([27,2,4,5,19,20,21,12,7,13,8,22])),`component`)}),fr=X(`/_app/settings`)({component:Z(()=>Q(()=>import(`./_app.settings-DTnFwTeA.js`),__vite__mapDeps([28,2,4,5,21,7,13,8])),`component`)}),pr=X(`/_app/usage`)({component:Z(()=>Q(()=>import(`./_app.usage-C2-VLiq9.js`),__vite__mapDeps([29,17,2,5,4,8,14,22,15])),`component`)}),mr=X(`/_app/plugins/$pluginId`)({component:Z(()=>Q(()=>import(`./_app.plugins._pluginId-B-ZDQNPU.js`),__vite__mapDeps([30,2,4,5,8])),`component`)}),$=rr.update({id:`/_app`,getParentRoute:()=>$n}),hr=ir.update({id:`/login`,path:`/login`,getParentRoute:()=>$n}),gr=ar.update({id:`/`,path:`/`,getParentRoute:()=>$}),_r={AppAccountsRoute:or.update({id:`/accounts`,path:`/accounts`,getParentRoute:()=>$}),AppConsoleRoute:sr.update({id:`/console`,path:`/console`,getParentRoute:()=>$}),AppDatabaseRoute:cr.update({id:`/database`,path:`/database`,getParentRoute:()=>$}),AppKeysRoute:lr.update({id:`/keys`,path:`/keys`,getParentRoute:()=>$}),AppLogsRoute:ur.update({id:`/logs`,path:`/logs`,getParentRoute:()=>$}),AppModelsRoute:dr.update({id:`/models`,path:`/models`,getParentRoute:()=>$}),AppSettingsRoute:fr.update({id:`/settings`,path:`/settings`,getParentRoute:()=>$}),AppUsageRoute:pr.update({id:`/usage`,path:`/usage`,getParentRoute:()=>$}),AppIndexRoute:gr,AppPluginsPluginIdRoute:mr.update({id:`/plugins/$pluginId`,path:`/plugins/$pluginId`,getParentRoute:()=>$})},vr={AppRoute:$._addFileChildren(_r),LoginRoute:hr},yr=$n._addFileChildren(vr)._addFileTypes();function br(e){let t=t=>{!(t instanceof oe)||!t.isUnauthenticated||e.isLoginRoute()||e.onUnauthenticated()};return new we({queryCache:new Ce({onError:t}),mutationCache:new Se({onError:t}),defaultOptions:{queries:{retry:(e,t)=>t instanceof oe&&t.isUnauthenticated?!1:e<2,staleTime:5e3,refetchOnWindowFocus:!0},mutations:{retry:!1}}})}var xr=Re`
|
|
14
14
|
:root {
|
|
15
15
|
color-scheme: light;
|
|
16
16
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{$ as e,B as t,T as n,U as r,at as i,ct as a,ft as o,lt as s,nt as c}from"./queries-CX9mStps.js";import{o as l}from"./index-
|
|
1
|
+
import{$ as e,B as t,T as n,U as r,at as i,ct as a,ft as o,lt as s,nt as c}from"./queries-CX9mStps.js";import{o as l}from"./index-COwhxKU7.js";import{a as u,i as d}from"./States-DtkkMzEu.js";import{n as f,t as p}from"./Field-B79Yxdit.js";import{n as m}from"./Panel-CoulMx6R.js";import{t as h}from"./reasons-Cb8yF4Oy.js";import{useState as g}from"react";import{jsx as _,jsxs as v}from"react/jsx-runtime";import y from"styled-components";var b=y.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
align-items: center;
|
|
4
4
|
justify-content: center;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{g as e}from"./Rack-fDZClWZL.js";var t=e(`plus`,[[`path`,{d:`M5 12h14`,key:`1ays0h`}],[`path`,{d:`M12 5v14`,key:`s699le`}]]);export{t};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{g as e}from"./Rack-
|
|
1
|
+
import{g as e}from"./Rack-fDZClWZL.js";var t=e(`trash-2`,[[`path`,{d:`M10 11v6`,key:`nco0om`}],[`path`,{d:`M14 11v6`,key:`outv1u`}],[`path`,{d:`M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6`,key:`miytrc`}],[`path`,{d:`M3 6h18`,key:`d0wm0j`}],[`path`,{d:`M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2`,key:`e791ji`}]]);export{t};
|
package/public/index.html
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
<link rel="icon" href="/favicon.svg" type="image/svg+xml" />
|
|
10
10
|
<title>OmniGateway — One endpoint in front of the AI accounts you already pay for.</title>
|
|
11
11
|
<script type="importmap">{"imports":{"react":"/shared/react.js","react/jsx-runtime":"/shared/jsx-runtime.js","react-dom":"/shared/react-dom.js","react-dom/client":"/shared/react-dom-client.js","styled-components":"/shared/styled-components.js","@tanstack/react-query":"/shared/react-query.js","@omnigateway/dashboard-sdk":"/shared/dashboard-sdk.js"}}</script>
|
|
12
|
-
<script type="module" crossorigin src="/assets/index-
|
|
12
|
+
<script type="module" crossorigin src="/assets/index-COwhxKU7.js"></script>
|
|
13
13
|
<link rel="modulepreload" crossorigin href="/assets/queries-CX9mStps.js">
|
|
14
14
|
<link rel="modulepreload" crossorigin href="/assets/matchContext-BOenO3J2.js">
|
|
15
15
|
<link rel="modulepreload" crossorigin href="/assets/Match-BWa6L0L1.js">
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
import{$ as e,L as t,O as n,at as r,c as i,et as a,it as o,lt as s,nt as c,o as l,z as u}from"./queries-CX9mStps.js";import{t as d}from"./Rack-Bbk1hAor.js";import{t as f}from"./Toggle-DGsa7LWV.js";import{i as p,n as m,r as h}from"./States-DtkkMzEu.js";import{i as g,n as _,t as v}from"./Field-B79Yxdit.js";import{t as y}from"./Meter-stpt3vQu.js";import{t as b}from"./Panel-CoulMx6R.js";import{useEffect as x,useState as S}from"react";import{Fragment as C,jsx as w,jsxs as T}from"react/jsx-runtime";import E from"styled-components";var D=[{id:`claude`,label:`Claude Code`,where:`settings.json under ~/.claude`},{id:`opencode`,label:`opencode`,where:`opencode.json in your project`}],O=E(a)`
|
|
2
|
-
display: block;
|
|
3
|
-
white-space: pre;
|
|
4
|
-
overflow-x: auto;
|
|
5
|
-
padding: 0.75rem;
|
|
6
|
-
background: ${({theme:e})=>e.color.panelSunk};
|
|
7
|
-
border: 1px solid ${({theme:e})=>e.color.rule};
|
|
8
|
-
border-radius: 4px;
|
|
9
|
-
font-size: 0.8125rem;
|
|
10
|
-
line-height: 1.5;
|
|
11
|
-
`,k=E.div`
|
|
12
|
-
color: ${({theme:e})=>e.color.inkDim};
|
|
13
|
-
font-size: 0.8125rem;
|
|
14
|
-
margin-bottom: 0.25rem;
|
|
15
|
-
`,A=E.p`
|
|
16
|
-
color: ${({theme:e})=>e.color.inkDim};
|
|
17
|
-
font-size: 0.8125rem;
|
|
18
|
-
margin: 0;
|
|
19
|
-
`,j=E.div`
|
|
20
|
-
display: grid;
|
|
21
|
-
grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr));
|
|
22
|
-
gap: ${({theme:e})=>e.space(2)};
|
|
23
|
-
`,M=[{key:`defaultModel`,label:`Default model`,required:!0},{key:`fableModel`,label:`Fable model`,required:!1},{key:`opusModel`,label:`Opus model`,required:!1},{key:`sonnetModel`,label:`Sonnet model`,required:!1},{key:`haikuModel`,label:`Haiku model`,required:!1}];function N(){let[e,t]=S(`claude`),[i,o]=S(()=>({claude:{},opencode:{}})),u=n(),d=i[e],f=typeof d.defaultModel==`string`&&d.defaultModel!==``?d:void 0,_=l(e,f),y=D.find(t=>t.id===e);return w(b,{legend:`Agent setup`,children:T(r,{children:[w(c,{children:D.map(n=>w(s,{type:`button`,$variant:n.id===e?`primary`:`ghost`,onClick:()=>t(n.id),children:n.label},n.id))}),T(A,{children:[y?.where,`. The key is a placeholder — paste your own over it. Or run`,` `,T(a,{children:[`omni setup `,e]}),` to write these files directly.`]}),(u.data?.length??0)>0?w(j,{children:M.map(t=>w(v,{label:t.label,children:n=>T(g,{...n,value:d[t.key]??``,onChange:n=>o(r=>({...r,[e]:{...r[e],[t.key]:n.target.value||void 0}})),children:[w(`option`,{value:``,children:t.required?`Choose a pool`:`Not mapped`}),u.data?.map(e=>w(`option`,{value:e.id,children:e.id},e.id))]})},t.key))}):null,u.isLoading?w(h,{rows:2}):_.isError?w(m,{error:_.error,onRetry:()=>void _.refetch()}):_.isLoading?w(h,{rows:4}):(u.data?.length??0)===0?w(A,{children:`No virtual models configured yet, so there is nothing to point a client at.`}):f===void 0?T(A,{children:[`Choose a default model to generate `,y?.label,` settings.`]}):_.data===void 0||_.data.length===0?w(A,{children:`No virtual models configured yet, so there is nothing to point a client at.`}):_.data.map(e=>T(`div`,{children:[w(k,{children:e.path}),w(O,{as:`pre`,children:e.contents.trimEnd()})]},e.path)),_.isError?w(A,{children:p(_.error)}):null]})})}var P=[{id:`tier`,label:`Tier`,blurb:`How strongly a lower tier is preferred.`},{id:`health`,label:`Health`,blurb:`Penalty for recent failures and an open breaker.`},{id:`quota`,label:`Quota`,blurb:`Preference for accounts keeping ahead of their window's burn rate.`},{id:`cost`,label:`Cost`,blurb:`Preference for the cheaper target of the candidates.`},{id:`latency`,label:`Latency`,blurb:`Preference for the faster observed first token.`},{id:`load`,label:`Load`,blurb:`Preference for accounts with fewer requests in flight right now.`}],F=[{id:`maxAttempts`,label:`Attempts per request`,hint:`How many candidates dispatch may try before giving up. 1 disables failover.`,unit:`attempts`,step:1,min:1},{id:`requestDeadlineMs`,label:`Request deadline`,hint:`How long a request may take across all attempts. 0 disables only OmniGateway's deadline.`,unit:`ms`,step:1e3,min:0},{id:`breakerThreshold`,label:`Breaker threshold`,hint:`Consecutive failures on one account and model before it is taken out of rotation.`,unit:`failures`,step:1,min:1},{id:`breakerCooldownMs`,label:`Breaker cooldown`,hint:`Base wait before a tripped account is probed again. Doubles per extra failure.`,unit:`ms`,step:1e3,min:1},{id:`logRetentionDays`,label:`Log retention`,hint:`How long request rows are kept before maintenance prunes them.`,unit:`days`,step:1,min:1},{id:`quotaPollIntervalMs`,label:`Quota poll interval`,hint:`How often each account's provider is asked for its remaining quota. 0 disables polling. Takes effect on restart.`,unit:`ms`,step:6e4,min:0}],I=E.div`
|
|
24
|
-
display: grid;
|
|
25
|
-
grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
|
|
26
|
-
gap: ${({theme:e})=>e.space(3)};
|
|
27
|
-
`,L=E(r)`
|
|
28
|
-
gap: 6px;
|
|
29
|
-
`,R=E.p`
|
|
30
|
-
font-size: 11px;
|
|
31
|
-
color: ${({theme:e})=>e.color.inkDim};
|
|
32
|
-
`,z=E.p`
|
|
33
|
-
font-size: 12px;
|
|
34
|
-
color: ${({theme:e})=>e.color.down};
|
|
35
|
-
`,B=E.p`
|
|
36
|
-
font-size: 12px;
|
|
37
|
-
color: ${({theme:e})=>e.color.ok};
|
|
38
|
-
`,V=E.p`
|
|
39
|
-
font-size: 12px;
|
|
40
|
-
color: ${({theme:e})=>e.color.warn};
|
|
41
|
-
max-width: 72ch;
|
|
42
|
-
|
|
43
|
-
code {
|
|
44
|
-
font-family: ${({theme:e})=>e.font.mono};
|
|
45
|
-
}
|
|
46
|
-
`;function H(e){let t={};for(let n of P)t[`w.${n.id}`]=String(e.weights[n.id]);for(let n of F)t[n.id]=String(e[n.id]);return t.rtkEnabled=String(e.rtkEnabled),t.bodyLoggingEnabled=String(e.bodyLoggingEnabled),t.bodyLoggingCaptureStreamChunks=String(e.bodyLoggingCaptureStreamChunks),t}function U(e){let t={};for(let n of P){let r=(e[`w.${n.id}`]??``).trim(),i=Number(r);if(r.length===0||!Number.isFinite(i))return{ok:!1,problem:`${n.label} must be a number.`};t[n.id]=i}let n={};for(let t of F){let r=(e[t.id]??``).trim(),i=Number(r);if(r.length===0||!Number.isInteger(i)||i<t.min)return{ok:!1,problem:`${t.label} must be a whole number of ${t.min} or more.`};n[t.id]=i}return n.maxAttempts>10?{ok:!1,problem:`Attempts per request cannot exceed 10.`}:{ok:!0,settings:{weights:t,...n,rtkEnabled:e.rtkEnabled===`true`,bodyLoggingEnabled:e.bodyLoggingEnabled===`true`,bodyLoggingCaptureStreamChunks:e.bodyLoggingCaptureStreamChunks===`true`}}}function W(){let n=u(),l=i(),g=t(),[E,D]=S({}),[O,k]=S(null),[A,j]=S(!1);x(()=>{n.data!==void 0&&D(H(n.data))},[n.data]);let M=Math.max(1e-4,...P.map(e=>Math.abs(Number(E[`w.${e.id}`])||0)));return T(C,{children:[w(d,{legend:`Settings`,title:`Routing and retention`,summary:`These apply to every request the gateway routes. Changes take effect on the next request; nothing is restarted.`,actions:w(s,{type:`button`,$variant:`primary`,disabled:g.isPending||n.isLoading,onClick:()=>{j(!1);let e=U(E);if(!e.ok){k(e.problem);return}k(null),g.mutate(e.settings,{onSuccess:()=>j(!0),onError:e=>k(p(e))})},children:g.isPending?`Saving…`:`Save changes`})}),n.isError?w(b,{legend:`Settings`,children:w(m,{error:n.error,onRetry:()=>void n.refetch()})}):n.isLoading?w(b,{legend:`Settings`,children:w(h,{rows:6})}):T(r,{$gap:4,children:[w(b,{legend:`Scoring weights`,meta:`relative to each other`,footer:T(c,{children:[w(e,{children:`A candidate's score is the sum of each term times its weight, then multiplied by the account and target weights.`}),w(o,{})]}),children:w(I,{children:P.map(e=>{let t=Number(E[`w.${e.id}`])||0;return T(L,{children:[w(v,{label:e.label,children:t=>w(_,{...t,type:`number`,step:.5,value:E[`w.${e.id}`]??``,onChange:t=>D({...E,[`w.${e.id}`]:t.target.value})})}),w(y,{fraction:Math.abs(t)/M,height:4,tone:`var(--accent)`,label:`${e.label} weight ${t}`}),w(R,{children:e.blurb})]},e.id)})})}),w(b,{legend:`Limits`,children:w(I,{children:F.map(t=>w(L,{children:w(v,{label:t.label,hint:t.hint,children:n=>T(c,{$gap:2,children:[w(_,{...n,type:`number`,min:t.min,step:t.step,value:E[t.id]??``,onChange:e=>D({...E,[t.id]:e.target.value})}),w(e,{children:t.unit})]})})},t.id))})}),w(b,{legend:`Historical tool results`,children:T(c,{$gap:3,$align:`start`,children:[w(f,{checked:E.rtkEnabled===`true`,onCheckedChange:e=>D({...E,rtkEnabled:String(e)}),label:`Enable RTK compression`}),w(R,{children:`Compress recognized historical non-error tool results before provider dispatch. Confirmed non-shell tools are excluded; unknown-origin results may be compressed only when a built-in detector recognizes a high-confidence shell-output format. Compression is deterministic and lossy. Disabled by default.`})]})}),w(b,{legend:`Request and response bodies`,meta:l.data===!0?`permitted by the environment`:`not permitted`,children:T(r,{$gap:3,children:[l.data===!0?null:T(V,{children:[`This gateway was started without `,w(`code`,{children:`OMNI_BODY_LOGGING_ALLOWED`}),`, so nothing below can record anything. Set it in the installation's `,w(`code`,{children:`.env`}),` `,`and restart before turning capture on. Two keys mean an admin session on its own cannot start recording prompts.`]}),T(c,{$gap:3,$align:`start`,children:[w(f,{checked:E.bodyLoggingEnabled===`true`,disabled:l.data!==!0,onCheckedChange:e=>D({...E,bodyLoggingEnabled:String(e)}),label:`Capture request and response bodies`}),w(R,{children:`Stores what each client sent and what each provider returned, encrypted under OMNI_ENCRYPTION_KEY beside the database. Bearer tokens and API keys are masked first and headers are never captured. Bodies expire on the log retention window above, and the newest 100,000 requests are kept whatever that window says. Off by default.`})]}),T(c,{$gap:3,$align:`start`,children:[w(f,{checked:E.bodyLoggingCaptureStreamChunks===`true`,disabled:l.data!==!0||E.bodyLoggingEnabled!==`true`,onCheckedChange:e=>D({...E,bodyLoggingCaptureStreamChunks:String(e)}),label:`Also keep raw stream frames`}),w(R,{children:`Retains the raw SSE frames of each attempt as well as the reassembled response. The only way to debug stream framing itself, and by far the most expensive thing capture can store, so it is gated separately rather than implied.`})]})]})}),O===null?null:w(z,{role:`alert`,children:O}),A&&O===null?w(B,{role:`status`,children:`Settings saved.`}):null,w(N,{}),w(b,{legend:`Known limits`,children:T(r,{$gap:2,children:[T(c,{$gap:2,children:[w(a,{$dim:!0,children:`rate limits`}),w(R,{children:`Per-key rate limits are counted inside one gateway process and reset when it restarts. They are not shared across instances.`})]}),T(c,{$gap:2,children:[w(a,{$dim:!0,children:`logs`}),w(R,{children:`Request rows record routing and token counts only. Prompts and responses are written only when body capture above is on, and to a separate encrypted store; credentials are never written to either.`})]})]})})]})]})}var G=W;export{G as component};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{g as e}from"./Rack-Bbk1hAor.js";var t=e(`plus`,[[`path`,{d:`M5 12h14`,key:`1ays0h`}],[`path`,{d:`M12 5v14`,key:`s699le`}]]);export{t};
|