omnigateway 0.11.1 → 0.11.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (36) hide show
  1. package/bin/omni.js +1 -1
  2. package/gateway.js +1 -1
  3. package/package.json +1 -1
  4. package/public/assets/{Chip-BBNaA-sL.js → Chip-iJNHhgJ6.js} +6 -1
  5. package/public/assets/{CopyValue-DQMqneTT.js → CopyValue-kMuDjb96.js} +1 -1
  6. package/public/assets/{Field-DcNu4yw-.js → Field-BYBri2NV.js} +1 -1
  7. package/public/assets/{Lamp-CosPf-gw.js → Lamp-lkkWBrFM.js} +2 -1
  8. package/public/assets/{Panel-BlNr9j6-.js → Panel-CWmOTDAP.js} +6 -0
  9. package/public/assets/{Rack-BGrdPQRN.js → Rack-B4L2xB7-.js} +9 -2
  10. package/public/assets/{Readout-D8Ofl3Gz.js → Readout-BTh732hP.js} +1 -1
  11. package/public/assets/{RequestTable-B5pOnwDe.js → RequestTable-DSmx72OY.js} +1 -1
  12. package/public/assets/{SummaryDeck-DAvCcP_N.js → SummaryDeck-BUMth482.js} +1 -1
  13. package/public/assets/{Toggle-ZS3zIMNF.js → Toggle-DAjywMl5.js} +1 -1
  14. package/public/assets/{TokenBreakdown-VV2U0Fgv.js → TokenBreakdown-DQuX2IKR.js} +3 -1
  15. package/public/assets/{WindowChart-eqPzFE06.js → WindowChart-UHzWV_Tx.js} +1 -1
  16. package/public/assets/{_app-CWXzHdhc.js → _app-Drf03PWk.js} +1 -1
  17. package/public/assets/{_app.accounts-wJdiS7Ue.js → _app.accounts-Dd35v-5U.js} +1 -1
  18. package/public/assets/{_app.console-DPuEIJl7.js → _app.console-C9P3N79h.js} +1 -1
  19. package/public/assets/{_app.database-BWxxqrNy.js → _app.database-DV09HTfL.js} +1 -1
  20. package/public/assets/{_app.index-C_jGPDHc.js → _app.index-CJm4vBIM.js} +1 -1
  21. package/public/assets/{_app.keys-vLOZaX9s.js → _app.keys-BJYRaiSr.js} +1 -1
  22. package/public/assets/{_app.logs-4fRTXz5H.js → _app.logs-CwfEU7mb.js} +1 -1
  23. package/public/assets/{_app.models-BFWk7FBf.js → _app.models-BicZeVmX.js} +1 -1
  24. package/public/assets/{_app.plugins._pluginId-B2R5TEp9.js → _app.plugins._pluginId-BaZPH3Oh.js} +1 -1
  25. package/public/assets/{_app.settings-BKUhzFsw.js → _app.settings-neenlxM-.js} +1 -1
  26. package/public/assets/{_app.usage-Dme4K70C.js → _app.usage-CXj0B5qT.js} +1 -1
  27. package/public/assets/{chevron-right-CL2vJUko.js → chevron-right-f-3aPVhf.js} +1 -1
  28. package/public/assets/{client-DIfYMjPd.js → client-BAOwDPZ1.js} +1 -1
  29. package/public/assets/{index-teScS3wF.js → index-B8HiPc8p.js} +3 -3
  30. package/public/assets/{login-CCLJgPoH.js → login-COCaKiJ3.js} +1 -1
  31. package/public/assets/plus-DLJ5ZcBJ.js +1 -0
  32. package/public/assets/{preload-helper-Dv9CFok1.js → preload-helper-KDDEULHo.js} +1 -1
  33. package/public/assets/{shared-5YRtk6PC.js → shared-CNTPQfFU.js} +1 -1
  34. package/public/assets/{trash-2-CLOg_lJ7.js → trash-2-C937U0RF.js} +1 -1
  35. package/public/index.html +5 -5
  36. package/public/assets/plus-C3pkG04C.js +0 -1
package/bin/omni.js CHANGED
@@ -36042,7 +36042,7 @@ function createServiceDeps(input2) {
36042
36042
  }
36043
36043
 
36044
36044
  // apps/cli/src/version.ts
36045
- var VERSION = "0.11.1";
36045
+ var VERSION = "0.11.3";
36046
36046
 
36047
36047
  // apps/cli/src/commands/service.ts
36048
36048
  function gatewayArgv(root) {
package/gateway.js CHANGED
@@ -60938,7 +60938,7 @@ function createRing(limits = DEFAULT_RING_LIMITS) {
60938
60938
  }
60939
60939
 
60940
60940
  // apps/gateway/src/version.ts
60941
- var VERSION = "0.11.1";
60941
+ var VERSION = "0.11.3";
60942
60942
 
60943
60943
  // apps/gateway/src/app.ts
60944
60944
  var ADMIN_SESSION_TTL_MS = 12 * 60 * 60 * 1000;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "omnigateway",
3
- "version": "0.11.1",
3
+ "version": "0.11.3",
4
4
  "description": "Self-hosted AI gateway with Anthropic- and OpenAI-compatible APIs, an admin console, and a CLI",
5
5
  "license": "MIT",
6
6
  "author": "Harismawan <mail@harismawan.com>",
@@ -1,6 +1,7 @@
1
- import{m as e}from"./Rack-BGrdPQRN.js";import{jsx as t}from"react/jsx-runtime";import n from"styled-components";var r={neutral:{fg:`var(--ink-dim)`,bg:`transparent`},ok:{fg:`var(--ok)`,bg:`var(--ok-wash)`},warn:{fg:`var(--warn)`,bg:`var(--warn-wash)`},down:{fg:`var(--down)`,bg:`var(--down-wash)`},accent:{fg:`var(--accent)`,bg:`var(--accent-wash)`}},i=n.span`
1
+ import{m as e}from"./Rack-B4L2xB7-.js";import{jsx as t}from"react/jsx-runtime";import n from"styled-components";var r={neutral:{fg:`var(--ink-dim)`,bg:`transparent`},ok:{fg:`var(--ok)`,bg:`var(--ok-wash)`},warn:{fg:`var(--warn)`,bg:`var(--warn-wash)`},down:{fg:`var(--down)`,bg:`var(--down-wash)`},accent:{fg:`var(--accent)`,bg:`var(--accent-wash)`}},i=n.span`
2
2
  display: inline-flex;
3
3
  align-items: center;
4
+ line-height: 1;
4
5
  gap: 4px;
5
6
  height: 18px;
6
7
  padding: 0 6px;
@@ -12,6 +13,10 @@ import{m as e}from"./Rack-BGrdPQRN.js";import{jsx as t}from"react/jsx-runtime";i
12
13
  font-size: 10.5px;
13
14
  letter-spacing: 0.02em;
14
15
  white-space: nowrap;
16
+
17
+ svg {
18
+ transform: translateY(-0.5px);
19
+ }
15
20
  `,a=n.span`
16
21
  display: inline-flex;
17
22
  align-items: center;
@@ -1,4 +1,4 @@
1
- import{C as e,O as t}from"./Panel-BlNr9j6-.js";import{b as n}from"./Rack-BGrdPQRN.js";import{useCallback as r,useEffect as i,useRef as a,useState as o}from"react";import{jsx as s,jsxs as c}from"react/jsx-runtime";import l from"styled-components";var u=n(`check`,[[`path`,{d:`M20 6 9 17l-5-5`,key:`1gmf2c`}]]),d=n(`copy`,[[`rect`,{width:`14`,height:`14`,x:`8`,y:`8`,rx:`2`,ry:`2`,key:`17jyea`}],[`path`,{d:`M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2`,key:`zix9uf`}]]);function f(e){if(e===null||typeof getSelection!=`function`)return!1;let t=getSelection();if(t===null)return!1;try{let n=document.createRange();return n.selectNodeContents(e),t.removeAllRanges(),t.addRange(n),!0}catch{return!1}}async function p(e,t){if(typeof navigator<`u`&&navigator.clipboard!==void 0)try{return await navigator.clipboard.writeText(e),`copied`}catch{}let n=f(t??null);if(n&&typeof document.execCommand==`function`)try{if(document.execCommand(`copy`))return`copied`}catch{}return n?`selected`:`failed`}var m=l.div`
1
+ import{C as e,O as t}from"./Panel-CWmOTDAP.js";import{b as n}from"./Rack-B4L2xB7-.js";import{useCallback as r,useEffect as i,useRef as a,useState as o}from"react";import{jsx as s,jsxs as c}from"react/jsx-runtime";import l from"styled-components";var u=n(`check`,[[`path`,{d:`M20 6 9 17l-5-5`,key:`1gmf2c`}]]),d=n(`copy`,[[`rect`,{width:`14`,height:`14`,x:`8`,y:`8`,rx:`2`,ry:`2`,key:`17jyea`}],[`path`,{d:`M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2`,key:`zix9uf`}]]);function f(e){if(e===null||typeof getSelection!=`function`)return!1;let t=getSelection();if(t===null)return!1;try{let n=document.createRange();return n.selectNodeContents(e),t.removeAllRanges(),t.addRange(n),!0}catch{return!1}}async function p(e,t){if(typeof navigator<`u`&&navigator.clipboard!==void 0)try{return await navigator.clipboard.writeText(e),`copied`}catch{}let n=f(t??null);if(n&&typeof document.execCommand==`function`)try{if(document.execCommand(`copy`))return`copied`}catch{}return n?`selected`:`failed`}var m=l.div`
2
2
  display: flex;
3
3
  align-items: stretch;
4
4
  gap: 0;
@@ -1,4 +1,4 @@
1
- import{_ as e}from"./Panel-BlNr9j6-.js";import{useId as t}from"react";import{jsx as n,jsxs as r}from"react/jsx-runtime";import i from"styled-components";var a=`
1
+ import{_ as e}from"./Panel-CWmOTDAP.js";import{useId as t}from"react";import{jsx as n,jsxs as r}from"react/jsx-runtime";import i from"styled-components";var a=`
2
2
  width: 100%;
3
3
  border-radius: 3px;
4
4
  transition: border-color 120ms ease;
@@ -1,4 +1,4 @@
1
- import{c as e,d as t,f as n,k as r,l as i,m as a,p as o,u as s}from"./Panel-BlNr9j6-.js";import{queryOptions as c,useMutation as l,useQuery as u,useQueryClient as d}from"@tanstack/react-query";import*as f from"react";import p,{useCallback as m,useDebugValue as h,useEffect as g,useMemo as _,useRef as v,useSyncExternalStore as y}from"react";import{jsx as b}from"react/jsx-runtime";import x,{css as S,keyframes as ee}from"styled-components";var C=f.use,w=f.useLayoutEffect;function te(e,t,n){f.useEffect(()=>{if(!e.current||n||typeof IntersectionObserver!=`function`)return()=>t();let r=new IntersectionObserver(e=>{t(e.pop())},{rootMargin:`100px`});return r.observe(e.current),()=>{r.disconnect(),t()}},[t,n,e])}function ne(e){let t=f.useRef(null);return f.useImperativeHandle(e,()=>t.current,[]),t}function T(e){return e[e.length-1]}function re(e,t){return typeof e==`function`?e(t):e}var E=Object.prototype.hasOwnProperty,D=Object.prototype.propertyIsEnumerable;function ie(e){for(let t in e)if(E.call(e,t))return!0;return!1}var ae=()=>Object.create(null),oe=(e,t)=>se(e,t,ae);function se(e,t,n=()=>({}),r=0){if(e===t)return e;if(r>500)return t;let i=t,a=ue(e)&&ue(i);if(!a&&!(O(e)&&O(i)))return i;let o=a?e:ce(e);if(!o)return i;let s=a?i:ce(i);if(!s)return i;let c=o.length,l=s.length,u=a?Array(l):n(),d=0;for(let t=0;t<l;t++){let o=a?t:s[t],l=e[o],f=i[o];if(l===f){u[o]=l,(a?t<c:E.call(e,o))&&d++;continue}if(l===null||f===null||typeof l!=`object`||typeof f!=`object`){u[o]=f;continue}let p=se(l,f,n,r+1);u[o]=p,p===l&&d++}return c===l&&d===c?e:u}function ce(e){let t=Object.keys(e);if(t.length!==Object.getOwnPropertyNames(e).length)return!1;let n=Object.getOwnPropertySymbols(e);if(n.length===0)return t;for(let r of n){if(!D.call(e,r))return!1;t.push(r)}return t}function O(e){if(!le(e))return!1;let t=e.constructor;if(t===void 0)return!0;let n=t.prototype;return!(!le(n)||!n.hasOwnProperty(`isPrototypeOf`))}function le(e){return Object.prototype.toString.call(e)===`[object Object]`}function ue(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function k(e,t,n){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return!1;for(let r=0,i=e.length;r<i;r++)if(!k(e[r],t[r],n))return!1;return!0}if(O(e)&&O(t)){let r=n?.ignoreUndefined??!0;if(n?.partial){for(let i in t)if((!r||t[i]!==void 0)&&!k(e[i],t[i],n))return!1;return!0}let i=0;if(!r)i=Object.keys(e).length;else for(let t in e)e[t]!==void 0&&i++;let a=0;for(let o in t)if((!r||t[o]!==void 0)&&(a++,a>i||!k(e[o],t[o],n)))return!1;return i===a}return!1}function de(e){return typeof e?.message==`string`?e.message.startsWith(`Failed to fetch dynamically imported module`)||e.message.startsWith(`error loading dynamically imported module`)||e.message.startsWith(`Importing a module script failed`):!1}var fe=/[\x00-\x1f\x7f"<>`{}]/g;function pe(e){return e.replace(fe,e=>`%`+e.charCodeAt(0).toString(16).toUpperCase().padStart(2,`0`))}function me(e){let t;try{t=decodeURI(e)}catch{t=e.replaceAll(/%[0-9A-F]{2}/gi,e=>{try{return decodeURI(e)}catch{return e}})}return pe(t)}var he=[`http:`,`https:`,`mailto:`,`tel:`];function A(e,t){if(!e)return!1;try{let n=new URL(e);return!t.has(n.protocol)}catch{return!1}}function j(e){if(!e||!/[%\\\x00-\x1f\x7f]/.test(e)&&!e.startsWith(`//`))return{path:e,handledProtocolRelativeURL:!1};let t=/%25|%5C/gi,n=0,r=``,i;for(;(i=t.exec(e))!==null;)r+=me(e.slice(n,i.index))+i[0],n=t.lastIndex;r+=me(n?e.slice(n):e);let a=!1;return r.startsWith(`//`)&&(a=!0,r=`/`+r.replace(/^\/+/,``)),{path:r,handledProtocolRelativeURL:a}}function ge(e){return/\s|[^\u0000-\u007F]/.test(e)?e.replace(/\s|[^\u0000-\u007F]/gu,encodeURIComponent):e}function _e(e,t){if(e===t)return!0;if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}function M(){throw Error(`Invariant failed`)}function N(e){let t=new Map,n,r,i=e=>{e.next&&(e.prev?(e.prev.next=e.next,e.next.prev=e.prev,e.next=void 0,r&&(r.next=e,e.prev=r)):(e.next.prev=void 0,n=e.next,e.next=void 0,r&&(e.prev=r,r.next=e)),r=e)};return{get(e){let n=t.get(e);if(n)return i(n),n.value},set(a,o){if(t.size>=e&&n){let e=n;t.delete(e.key),e.next&&(n=e.next,e.next.prev=void 0),e===r&&(r=void 0)}let s=t.get(a);if(s)s.value=o,i(s);else{let e={key:a,value:o,prev:r};r&&(r.next=e),r=e,n||=e,t.set(a,e)}},clear(){t.clear(),n=void 0,r=void 0}}}var P=4,F=5;function I(e,t,n=new Uint16Array(6)){let r=e.indexOf(`/`,t),i=r===-1?e.length:r,a=e.substring(t,i);if(!a||!a.includes(`$`))return n[0]=0,n[1]=t,n[2]=t,n[3]=i,n[4]=i,n[5]=i,n;if(a===`$`){let r=e.length;return n[0]=2,n[1]=t,n[2]=t,n[3]=r,n[4]=r,n[5]=r,n}if(a.charCodeAt(0)===36)return n[0]=1,n[1]=t,n[2]=t+1,n[3]=i,n[4]=i,n[5]=i,n;let o=a.indexOf(`{`),s;if(o!==-1&&o+1<a.length&&(s=a.indexOf(`}`,o))!==-1){let r=a.charCodeAt(o+1);if(r===45){if(o+2<a.length&&a.charCodeAt(o+2)===36){let e=o+3,r=s;if(e<r)return n[0]=3,n[1]=t+o,n[2]=t+e,n[3]=t+r,n[4]=t+s+1,n[5]=i,n}}else if(r===36){let r=o+1,a=o+2;return a===s?(n[0]=2,n[1]=t+o,n[2]=t+r,n[3]=t+a,n[4]=t+s+1,n[5]=e.length,n):(n[0]=1,n[1]=t+o,n[2]=t+a,n[3]=t+s,n[4]=t+s+1,n[5]=i,n)}}return n[0]=0,n[1]=t,n[2]=t,n[3]=i,n[4]=i,n[5]=i,n}function L(e,t,n,r,i,a,o,s){s?.(n);let c=r;{let r=n.fullPath??n.from,s=n.options,l=r.length,u=s?.caseSensitive??e,d=s?.params?.parse??s?.parseParams;for(;c<l;){let e=I(r,c,t),n,s=c,l=e[5];c=l+1,a++;let f=e[0];switch(f){case 0:{let t=r.substring(e[2],e[3]),o=t,s;u?s=i.static??=new Map:(o=t.toLowerCase(),s=i.staticInsensitive??=new Map);let c=s.get(o);if(c)n=c;else{let e=z(r);e.parent=i,e.depth=a,n=e,s.set(o,e)}break}case 1:case 3:case 2:{let t=r.substring(s,e[1]),c=r.substring(e[4],l),p=u&&!!(t||c);u||(t=t.toLowerCase(),c=c.toLowerCase());let m=f===1?i.dynamic:f===3?i.optional:i.wildcard,h=f!==2&&!d&&m?.find(e=>!e.parse&&e.caseSensitive===p&&e.prefix===t&&e.suffix===c);if(h)n=h;else{let e=B(f,r,p,t,c);n=e,e.parent=i,e.depth=a;let s;s=f===1?i.dynamic??=[]:f===3?i.optional??=[]:i.wildcard??=[],s.push(e),s.length===2&&o?.push(s)}break}}i=n}if(d&&n.children&&!n.isRoot&&n.id&&n.id.charCodeAt(n.id.lastIndexOf(`/`)+1)===95){let e=z(r);e.kind=F,e.parent=i,a++,e.depth=a,i.pathless??=[],i.pathless.push(e),i=e}let f=(n.path||!n.children)&&!n.isRoot;if(f&&r.endsWith(`/`)){let e=z(r);e.kind=P,e.parent=i,a++,e.depth=a,i.index=e,i=e}i.parse=d??null,i.priority=s?.params?.priority??0,f&&!i.route&&(i.route=n,i.fullPath=r)}if(n.children)for(let r of n.children)L(e,t,r,c,i,a,o,s)}function R(e,t){if(e.parse&&!t.parse)return-1;if(!e.parse&&t.parse)return 1;if(e.parse&&t.parse&&(e.priority||t.priority))return t.priority-e.priority;if(e.prefix&&t.prefix&&e.prefix!==t.prefix){if(e.prefix.startsWith(t.prefix))return-1;if(t.prefix.startsWith(e.prefix))return 1}if(e.suffix&&t.suffix&&e.suffix!==t.suffix){if(e.suffix.endsWith(t.suffix))return-1;if(t.suffix.endsWith(e.suffix))return 1}return e.prefix&&!t.prefix?-1:!e.prefix&&t.prefix?1:e.suffix&&!t.suffix?-1:!e.suffix&&t.suffix?1:e.caseSensitive&&!t.caseSensitive?-1:!e.caseSensitive&&t.caseSensitive?1:0}function z(e){return{kind:0,depth:0,pathless:null,index:null,static:null,staticInsensitive:null,dynamic:null,optional:null,wildcard:null,route:null,fullPath:e,parent:null,parse:null,priority:0}}function B(e,t,n,r,i){return{kind:e,depth:0,pathless:null,index:null,static:null,staticInsensitive:null,dynamic:null,optional:null,wildcard:null,route:null,fullPath:t,parent:null,parse:null,priority:0,caseSensitive:n,prefix:r,suffix:i}}function V(e,t){let n=z(`/`),r=new Uint16Array(6),i=[];for(let t of e)L(!1,r,t,1,n,0,i);for(let e of i)e.sort(R);t.masksTree=n,t.flatCache=N(1e3)}function H(e,t){e||=`/`;let n=t.flatCache.get(e);if(n!==void 0)return n;let r=Se(e,t.masksTree);return t.flatCache.set(e,r),r}function ve(e,t,n,r,i){e||=`/`,r||=`/`;let a=t?`case\0${e}`:e,o=i.singleCache.get(a);return o||(o=z(`/`),L(t,new Uint16Array(6),{from:e},1,o,0),i.singleCache.set(a,o)),Se(r,o,n)}function ye(e,t,n=!1){let r=n?e:`nofuzz\0${e}`,i=t.matchCache.get(r);if(i!==void 0)return i;e||=`/`;let a;try{a=Se(e,t.segmentTree,n)}catch(e){if(e instanceof URIError)a=null;else throw e}return a&&(a.branch=we(a.route)),t.matchCache.set(r,a),a}function be(e){return e===`/`?e:e.replace(/\/{1,}$/,``)}function xe(e,t=!1,n){let r=z(e.fullPath),i=new Uint16Array(6),a=[],o={},s={},c=0;L(t,i,e,1,r,0,a,e=>{if(n?.(e,c),e.id in o&&M(),o[e.id]=e,c!==0&&e.path){let t=be(e.fullPath);(!s[t]||e.fullPath.endsWith(`/`))&&(s[t]=e)}c++});for(let e of a)e.sort(R);return{processedTree:{segmentTree:r,singleCache:N(1e3),matchCache:N(1e3),flatCache:null,masksTree:null},routesById:o,routesByPath:s}}function Se(e,t,n=!1){let r=e.split(`/`),i=Ee(e,r,t,n);if(!i)return null;let[a]=Ce(e,r,i);return{route:i.node.route,rawParams:a}}function Ce(e,t,n){let r=Te(n.node),i=null,a=Object.create(null),o=n.extract?.part??0,s=n.extract?.node??0,c=n.extract?.path??0,l=n.extract?.segment??0;for(;s<r.length;o++,s++,c++,l++){let u=r[s];if(u.kind===P)break;if(u.kind===F){l--,o--,c--;continue}let d=t[o],f=c;if(d&&(c+=d.length),u.kind===1){i??=n.node.fullPath.split(`/`);let e=i[l],t=u.prefix.length;if(e.charCodeAt(t)===123){let n=u.suffix.length,r=e.substring(t+2,e.length-n-1),i=d.substring(t,d.length-n);a[r]=decodeURIComponent(i)}else{let t=e.substring(1);a[t]=decodeURIComponent(d)}}else if(u.kind===3){if(n.skipped&1<<s){o--,c=f-1;continue}i??=n.node.fullPath.split(`/`);let e=i[l],t=u.prefix.length,r=u.suffix.length,p=e.substring(t+3,e.length-r-1),m=u.suffix||u.prefix?d.substring(t,d.length-r):d;m&&(a[p]=decodeURIComponent(m))}else if(u.kind===2){let t=u,n=e.substring(f+t.prefix.length,e.length-t.suffix.length),r=decodeURIComponent(n);a[`*`]=r,a._splat=r;break}}return n.rawParams&&Object.assign(a,n.rawParams),[a,{part:o,node:s,path:c,segment:l}]}function we(e){let t=[e];for(;e.parentRoute;)e=e.parentRoute,t.push(e);return t.reverse(),t}function Te(e){let t=Array(e.depth+1);do t[e.depth]=e,e=e.parent;while(e);return t}function Ee(e,t,n,r){if(e===`/`&&n.index)return{node:n.index,skipped:0};let i=!T(t),a=i&&e!==`/`,o=t.length-+!!i,s=[{node:n,index:1,skipped:0,statics:0,dynamics:0,optionals:0}],c=null,l=null;for(;s.length;){let n=s.pop(),{node:i,index:u,skipped:d,statics:f,dynamics:p,optionals:m}=n,{extract:h,rawParams:g}=n;if(i.kind===2&&i.route&&!W(l,n))continue;if(i.parse){if(!Oe(e,t,n))continue;g=n.rawParams,h=n.extract}r&&i.route&&i.kind!==P&&W(c,n)&&(c=n);let _=u===o;if(_&&(i.route&&(!a||i.kind===P||i.kind===2)&&W(l,n)&&(l=n),!i.optional&&!i.wildcard&&!i.index&&!i.pathless))continue;let v=_?void 0:t[u],y;if(_&&i.index){let n={node:i.index,index:u,skipped:d,statics:f,dynamics:p,optionals:m,extract:h,rawParams:g},r=!0;if(i.index.parse&&(Oe(e,t,n)||(r=!1)),r){if(!p&&!m&&!d&&De(f,o))return n;W(l,n)&&(l=n)}}if(i.wildcard)for(let e=i.wildcard.length-1;e>=0;e--){let n=i.wildcard[e],{prefix:r,suffix:a}=n;if(!r||!_&&(n.caseSensitive?v:y??=v.toLowerCase()).startsWith(r)){if(a){if(_)continue;let e=t.slice(u).join(`/`),i=e.slice(-a.length);if((n.caseSensitive?i:i.toLowerCase())!==a||e.length-a.length<r.length)continue}s.push({node:n,index:o,skipped:d,statics:f,dynamics:p,optionals:m,extract:h,rawParams:g})}}if(i.optional){let e=d|1<<i.depth+1;for(let t=i.optional.length-1;t>=0;t--){let n=i.optional[t];s.push({node:n,index:u,skipped:e,statics:f,dynamics:p,optionals:m,extract:h,rawParams:g})}if(!_)for(let e=i.optional.length-1;e>=0;e--){let t=i.optional[e],{prefix:n,suffix:r}=t;if(n||r){let e=t.caseSensitive?v:y??=v.toLowerCase();if(n&&!e.startsWith(n)||r&&e.indexOf(r,e.length-r.length)<n.length)continue}s.push({node:t,index:u+1,skipped:d,statics:f,dynamics:p,optionals:m+U(o,u),extract:h,rawParams:g})}}if(!_&&i.dynamic&&v)for(let e=i.dynamic.length-1;e>=0;e--){let t=i.dynamic[e],{prefix:n,suffix:r}=t;if(n||r){let e=t.caseSensitive?v:y??=v.toLowerCase();if(n&&!e.startsWith(n)||r&&e.indexOf(r,e.length-r.length)<n.length)continue}s.push({node:t,index:u+1,skipped:d,statics:f,dynamics:p+U(o,u),optionals:m,extract:h,rawParams:g})}if(!_&&i.staticInsensitive){let e=i.staticInsensitive.get(y??=v.toLowerCase());e&&s.push({node:e,index:u+1,skipped:d,statics:f+U(o,u),dynamics:p,optionals:m,extract:h,rawParams:g})}if(!_&&i.static){let e=i.static.get(v);e&&s.push({node:e,index:u+1,skipped:d,statics:f+U(o,u),dynamics:p,optionals:m,extract:h,rawParams:g})}if(i.pathless)for(let e=i.pathless.length-1;e>=0;e--){let t=i.pathless[e];s.push({node:t,index:u,skipped:d,statics:f,dynamics:p,optionals:m,extract:h,rawParams:g})}}if(l)return l;if(r&&c){let n=c.index;for(let e=0;e<c.index;e++)n+=t[e].length;let r=n===e.length?`/`:e.slice(n);return c.rawParams??=Object.create(null),c.rawParams[`**`]=decodeURIComponent(r),c}return null}function U(e,t){return 2**(e-t-1)}function De(e,t){return e===2**(t-1)-1}function Oe(e,t,n){let r,i;try{[r,i]=Ce(e,t,n)}catch{return null}if(n.rawParams=r,n.extract=i,!n.node.parse)return!0;try{if(n.node.parse(r)===!1)return null}catch{}return!0}function W(e,t){return!e||t.statics>e.statics||t.statics===e.statics&&(t.dynamics>e.dynamics||t.dynamics===e.dynamics&&(t.optionals>e.optionals||t.optionals===e.optionals&&((t.node.kind===P)>(e.node.kind===P)||t.node.kind===P==(e.node.kind===P)&&t.node.depth>e.node.depth)))}function ke(e){return G(e.filter(e=>e!==void 0).join(`/`))}function G(e){return e.replace(/\/{2,}/g,`/`)}function Ae(e){return e===`/`?e:e.replace(/^\/{1,}/,``)}function je(e){let t=e.length;return t>1&&e[t-1]===`/`?e.replace(/\/{1,}$/,``):e}function Me(e){return je(Ae(e))}function K(e,t){return e?.endsWith(`/`)&&e!==`/`&&e!==`${t}/`?e.slice(0,-1):e}function Ne(e,t,n){return K(e,n)===K(t,n)}function Pe({base:e,to:t,trailingSlash:n=`never`,cache:r}){if(t.includes(`//`)&&(t=G(t)),t.startsWith(`/`))return t.length===1||n===`preserve`?t:n===`always`?t.endsWith(`/`)?t:`${t}/`:t.endsWith(`/`)?t.slice(0,-1):t;let i=t===`.`,a;if(r){a=i?e:e+`\0`+t;let n=r.get(a);if(n)return n}let o;if(i)o=e.split(`/`);else{for(e.includes(`//`)&&(e=G(e)),o=e.split(`/`);o.length>1&&T(o)===``;)o.pop();let n=t.split(`/`);for(let e=0,t=n.length;e<t;e++){let r=n[e];r===``?e?e===t-1&&o.push(r):o=[r]:r===`..`?o.length>1?o.pop():o=[``]:r===`.`||o.push(r)}}o.length>1&&(T(o)===``?n===`never`&&o.pop():n===`always`&&o.push(``));let s=o.join(`/`),c=(i?G(s):s)||`/`;return a&&r&&r.set(a,c),c}function Fe(e){let t=new Map(e.map(e=>[encodeURIComponent(e),e])),n=Array.from(t.keys()).map(e=>e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`)).join(`|`),r=new RegExp(n,`g`);return e=>e.replace(r,e=>t.get(e)??e)}function Ie(e,t,n){let r=t[e];return typeof r==`string`?e===`_splat`?/^[a-zA-Z0-9\-._~!/]*$/.test(r)?r:r.split(`/`).map(e=>Re(e,n)).join(`/`):Re(r,n):r}function Le({path:e,params:t,decoder:n,...r}){let i=!1,a=Object.create(null);if(!e||e===`/`)return{interpolatedPath:`/`,usedParams:a,isMissingParams:i};if(!e.includes(`$`))return{interpolatedPath:e,usedParams:a,isMissingParams:i};let o=e.length,s=0,c,l=``;for(;s<o;){let r=s;c=I(e,r,c);let o=c[5];if(s=o+1,r===o)continue;let u=c[0];if(u===0){l+=`/`+e.substring(r,o);continue}if(u===2){let s=t._splat;a._splat=s,a[`*`]=s;let u=e.substring(r,c[1]),d=e.substring(c[4],o);if(!s){i=!0,(u||d)&&(l+=`/`+u+d);continue}let f=Ie(`_splat`,t,n);l+=`/`+u+f+d;continue}if(u===1){let s=e.substring(c[2],c[3]);!i&&!(s in t)&&(i=!0),a[s]=t[s];let u=e.substring(r,c[1]),d=e.substring(c[4],o),f=Ie(s,t,n)??`undefined`;l+=`/`+u+f+d;continue}if(u===3){let i=e.substring(c[2],c[3]),s=t[i];if(s==null)continue;a[i]=s;let u=e.substring(r,c[1]),d=e.substring(c[4],o),f=Ie(i,t,n)??``;l+=`/`+u+f+d;continue}}return e.endsWith(`/`)&&(l+=`/`),{usedParams:a,interpolatedPath:l||`/`,isMissingParams:i}}function Re(e,t){let n=encodeURIComponent(e);return t?.(n)??n}var ze=`Error preloading route! ☝️`;function Be({children:e,fallback:t=null}){return b(p.Fragment,{children:Ve()?e:t})}function Ve(){return p.useSyncExternalStore(He,()=>!0,()=>!1)}function He(){return()=>{}}function Ue(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var We=typeof Object.is==`function`?Object.is:Ue;function Ge(e,t,n,r,i){let a=v(null),o;a.current===null?(o={hasValue:!1,value:null},a.current=o):o=a.current;let[s,c]=_(()=>{let e=!1,a,s,c=t=>{if(!e){e=!0,a=t;let n=r(t);if(i!==void 0&&o.hasValue){let e=o.value;if(i(e,n))return s=e,e}return s=n,n}let n=s;if(We(a,t))return n;let c=r(t);return i?.(n,c)?(a=t,n):(a=t,s=c,c)},l=n===void 0?null:n;return[()=>c(t()),l===null?void 0:()=>c(l())]},[t,n,r,i,o]),l=y(e,s,c);return g(()=>{o.hasValue=!0,o.value=l},[l,o]),h(l),l}function Ke(e,t){return e===t}function qe(e,t,n=Ke){let r=m(t=>{if(!e)return()=>{};let{unsubscribe:n}=e.subscribe(t);return n},[e]),i=m(()=>e?.get(),[e]);return Ge(r,i,i,t,n)}function Je(e){let t=r();return f.useCallback(n=>t.navigate({...n,from:n.from??e?.from}),[e?.from,t])}function Ye(e){let t=f.useRef(e);return k(t.current,e,{ignoreUndefined:!1})||(t.current=e),t.current}function Xe(e,t){return e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]}function Ze(e,t,n){if(e?.external)return A(e.href,n)?void 0:e.href;if(!ot(t)&&typeof t==`string`&&t.indexOf(`:`)!==-1)try{return new URL(t),A(t,n)?void 0:t}catch{}}function Qe(e,t,n,r,i,a){if(a)return!1;if(n?.exact){if(!Ne(e.pathname,t.pathname,r))return!1}else{let n=K(e.pathname,r),i=K(t.pathname,r);if(!n.startsWith(i)||n.length!==i.length&&n[i.length]!==`/`)return!1}return(n?.includeSearch??!0)&&!k(e.search,t.search,{partial:!n?.exact,ignoreUndefined:!n?.explicitUndefined})?!1:!n?.includeHash||i&&e.hash===t.hash}function $e(e,t){let n=r(),i=ne(t),{activeProps:a,inactiveProps:o,activeOptions:s,to:c,preload:l,preloadDelay:u,preloadIntentProximity:d,hashScrollIntoView:p,replace:m,startTransition:h,resetScroll:g,viewTransition:_,children:v,target:y,disabled:b,style:x,className:S,onClick:ee,onBlur:C,onFocus:w,onMouseEnter:T,onMouseLeave:E,onTouchStart:D,ignoreBlocker:ie,params:ae,search:oe,hash:se,state:ce,mask:O,reloadDocument:le,unsafeRelative:ue,from:k,_fromLocation:de,...fe}=e,pe=Ve(),me=Ye(e.search),he=Ye(e.params),A=Ye(s),j=f.useMemo(()=>e,[n,e.from,e._fromLocation,e.hash,e.to,me,he,e.state,e.mask,e.unsafeRelative]),ge=f.useCallback(e=>{let t=n.buildLocation({_fromLocation:e,...j}),r=at(t.maskedLocation?t.maskedLocation.publicHref:t.publicHref,t.maskedLocation?t.maskedLocation.external:t.external,n.history,b),i=Ze(r,c,n.protocolAllowlist);return[r?.href,i,Qe(e,t,A,n.basepath,pe,i!==void 0)]},[A,b,pe,j,n,c]),[_e,M,N]=qe(n.stores.location,ge,Xe),P=N?re(a,{})??tt:et,F=N?et:re(o,{})??et,I=[S,P.className,F.className].filter(Boolean).join(` `),L=(x||P.style||F.style)&&{...x,...P.style,...F.style},R=f.useRef(!1),z=e.reloadDocument||M||b?!1:l??n.options.defaultPreload,B=u??n.options.defaultPreloadDelay??0,V=f.useCallback(()=>{n.preloadRoute(j).catch(e=>{console.warn(e),console.warn(ze)})},[n,j]),H=f.useCallback(e=>{if(!e){it(i);return}if(!(e.isIntersecting??z===`intent`)){e.isIntersecting===!1&&it(i);return}if(!B){V();return}q.has(i)||q.set(i,setTimeout(()=>{q.delete(i),V()},B))},[V,i,z,B]);te(i,H,z!==`viewport`),f.useEffect(()=>{R.current||z===`render`&&(V(),R.current=!0)},[V,z]);let ve=e=>{let t=e.currentTarget.getAttribute(`target`),r=y===void 0?t:y;!b&&!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)&&!e.defaultPrevented&&(!r||r===`_self`)&&e.button===0&&(e.preventDefault(),n.navigate({...j,replace:m,resetScroll:g,hashScrollIntoView:p,startTransition:h,viewTransition:_,ignoreBlocker:ie}))};if(M)return{...fe,ref:i,href:M,...v&&{children:v},...y&&{target:y},...b&&{disabled:b},...x&&{style:x},...S&&{className:S},...ee&&{onClick:ee},...C&&{onBlur:C},...w&&{onFocus:w},...T&&{onMouseEnter:T},...E&&{onMouseLeave:E},...D&&{onTouchStart:D}};let ye=()=>{z===`intent`&&V()},be=()=>{z===`intent`&&it(i)};return{...fe,...P,...F,href:_e,ref:i,onClick:J([ee,ve]),onBlur:J([C,be]),onFocus:J([w,H]),onMouseEnter:J([T,H]),onMouseLeave:J([E,be]),onTouchStart:J([D,ye]),disabled:!!b,target:y,...L&&{style:L},...I&&{className:I},...b&&nt,...N&&rt}}var et={},tt={className:`active`},nt={role:`link`,"aria-disabled":!0},rt={"data-status":`active`,"aria-current":`page`},q=new WeakMap,it=e=>{clearTimeout(q.get(e)),q.delete(e)},J=e=>t=>{for(let n of e)if(n){if(t.defaultPrevented)return;n(t)}};function at(e,t,n,r){if(!r)return t?{href:e,external:!0}:{href:n.createHref(e)||`/`,external:!1}}function ot(e){if(typeof e!=`string`)return!1;let t=e.charCodeAt(0);return t===47?e.charCodeAt(1)!==47:t===46}var st=f.forwardRef((e,t)=>{let{_asChild:n,...r}=e,{type:i,...a}=$e(r,t),o=typeof r.children==`function`?r.children({isActive:a[`data-status`]===`active`}):r.children;if(!n){let{disabled:e,...t}=a;return f.createElement(`a`,t,o)}return f.createElement(n,a,o)}),Y={status:[`status`],credentials:[`credentials`],credentialHealth:[`credentials`,`health`],models:[`models`],keys:[`keys`],settings:[`settings`],agentSetup:(e,t)=>[`agent-setup`,e,t??null],usage:e=>[`usage`,e.grain??`raw`,e.groupBy,e.splitBy??null,e.since,e.until??null],quotaHistory:e=>[`quota-history`,e.credentialId,e.since,e.until??null],logs:e=>[`logs`,e],requestBody:e=>[`logs`,`body`,e],clientSummary:[`client`,`summary`],clientUsage:e=>[`client`,`usage`,e.grain??`raw`,e.groupBy,e.splitBy??null,e.since,e.until??null],clientLogs:e=>[`client`,`logs`,e],clientQuota:[`client`,`quota`],clientQuotaHistory:e=>[`client`,`quota-history`,e.since,e.until??null],console:(e,t,n)=>[`console`,e,t,n],nodes:[`nodes`],database:[`database`],snapshots:[`database`,`snapshots`],lifecycle:[`lifecycle`],plugins:[`plugins`],catalog:[`catalog`]},ct=c({queryKey:Y.catalog,queryFn:async({signal:e})=>{let{providers:t}=await i(`/api/catalog`,e);return[...t].sort((e,t)=>e.order-t.order)},staleTime:3e5});function lt(){return u(ct)}function ut(e,t){return e.find(e=>e.id===t)}function dt(){return u({queryKey:Y.status,queryFn:({signal:e})=>i(`/api/status`,e),staleTime:3e4})}function ft(){return u({queryKey:Y.credentials,queryFn:async({signal:e})=>(await i(`/api/credentials`,e)).credentials})}function pt(e=1e4){return u({queryKey:Y.credentialHealth,queryFn:({signal:e})=>i(`/api/credentials/health`,e),refetchInterval:e})}function mt(e,t=!0){return u({queryKey:Y.quotaHistory(e),enabled:t,queryFn:({signal:t})=>i(a(`/api/credentials/quota/history`,{credentialId:e.credentialId,since:e.since,...e.until===void 0?{}:{until:e.until}}),t),refetchInterval:!1})}function ht(){return u({queryKey:Y.models,queryFn:async({signal:e})=>(await i(`/api/models`,e)).models})}function gt(){return u({queryKey:Y.keys,queryFn:async({signal:e})=>(await i(`/api/keys`,e)).keys})}var _t={queryKey:Y.settings,queryFn:({signal:e})=>i(`/api/settings`,e)};function vt(){return u({..._t,select:e=>e.settings})}function yt(){return u({..._t,select:e=>e.bodyLoggingAllowed&&e.settings.bodyLoggingEnabled})}function bt(){return u({..._t,select:e=>e.bodyLoggingAllowed})}function xt(){return u({..._t,select:e=>e.dayOffsetMinutes??null})}function St(e,t){return u({queryKey:Y.agentSetup(e,t),enabled:t!==void 0,queryFn:async({signal:n})=>(await i(a(`/api/agent-setup`,{client:e,...t??{}}),n)).files})}function Ct(e,t=6e4){return u({queryKey:Y.usage(e),queryFn:async({signal:t})=>(await i(a(`/api/usage`,{groupBy:e.groupBy,since:e.since,...e.grain===void 0?{}:{grain:e.grain},...e.splitBy===void 0?{}:{splitBy:e.splitBy},...e.until===void 0?{}:{until:e.until}}),t)).rows,refetchInterval:t})}var wt=2e3;function Tt(e=100,t=wt){return u({queryKey:Y.logs(e),queryFn:async({signal:t})=>(await i(a(`/api/logs`,{limit:e}),t)).logs,refetchInterval:t})}function Et(e){return u({queryKey:Y.requestBody(e??``),enabled:e!==null,queryFn:({signal:t})=>i(`/api/requests/${encodeURIComponent(e??``)}/body`,t),refetchInterval:!1})}var Dt=5e3;function Ot(e=200,t=``,n=Dt,r=``){return u({queryKey:Y.console(e,t,r),queryFn:async({signal:n})=>i(a(`/api/console`,{lines:e,...t===``?{}:{level:t},...r===``?{}:{node:r}}),n),refetchInterval:n})}var kt=3e4;function At(){return u({queryKey:Y.nodes,queryFn:async({signal:e})=>i(`/api/nodes`,e),refetchInterval:kt})}function jt(){return u({queryKey:Y.database,queryFn:({signal:e})=>i(`/api/database`,e),refetchInterval:!1,refetchOnWindowFocus:!1,staleTime:1/0})}function Mt(e){return`/api/database/snapshots/${encodeURIComponent(e)}/download`}function Nt(){return u({queryKey:Y.snapshots,queryFn:async({signal:e})=>(await i(`/api/database/snapshots`,e)).snapshots,refetchInterval:!1})}function X(e){e.invalidateQueries({queryKey:Y.database})}function Pt(){let e=d();return l({mutationFn:()=>t(`/api/database/snapshots`),onSuccess:()=>X(e)})}function Ft(){let e=d();return l({mutationFn:e=>n(`/api/database/retention`,e),onSuccess:()=>{X(e),e.invalidateQueries({queryKey:Y.settings})}})}function It(){let e=d();return l({mutationFn:()=>t(`/api/database/vacuum`),onSuccess:()=>X(e)})}function Lt(){let t=d();return l({mutationFn:()=>e(`/api/database/bodies`),onSuccess:()=>{X(t),t.invalidateQueries({queryKey:[`logs`]})}})}function Rt(){let t=d();return l({mutationFn:t=>e(`/api/database/snapshots/${encodeURIComponent(t)}`),onSuccess:()=>X(t)})}function zt(){return l({mutationFn:e=>t(`/api/database/snapshots/${encodeURIComponent(e)}/restore`)})}function Bt(){return l({mutationFn:e=>t(`/api/database/import`,e)})}function Vt(){return u({queryKey:Y.lifecycle,queryFn:({signal:e})=>i(`/api/lifecycle`,e),refetchInterval:!1})}function Ht(){return l({mutationFn:()=>t(`/api/lifecycle/restart`)})}function Ut(){return l({mutationFn:()=>t(`/api/lifecycle/shutdown`)})}function Wt(){let e=d();return l({mutationFn:({mode:e,secret:n})=>e===`client`?t(`/api/client/login`,{key:n}):t(`/api/login`,{password:n,...e===`viewer`?{mode:`viewer`}:{}}),onSuccess:()=>e.invalidateQueries()})}function Gt(){let e=d();return l({mutationFn:e=>t(`/api/setup`,{password:e}),onSuccess:()=>e.invalidateQueries()})}function Kt(){let e=d();return l({mutationFn:()=>t(`/api/logout`),onSuccess:()=>{e.clear()}})}function qt(){let e=d();return l({mutationFn:()=>t(`/api/client/logout`),onSuccess:()=>e.clear()})}var Jt={queryKey:Y.clientSummary,queryFn:({signal:e})=>i(`/api/client/summary`,e)};function Yt(){return u(Jt)}function Xt(){return u({...Jt,select:e=>e.dayOffsetMinutes??null})}function Zt(e,t=6e4){return u({queryKey:Y.clientUsage(e),queryFn:({signal:t})=>i(a(`/api/client/usage`,{groupBy:e.groupBy,since:e.since,...e.grain===void 0?{}:{grain:e.grain},...e.splitBy===void 0?{}:{splitBy:e.splitBy},...e.until===void 0?{}:{until:e.until}}),t),refetchInterval:t})}function Qt(e=100,t=wt){return u({queryKey:Y.clientLogs(e),queryFn:async({signal:t})=>(await i(a(`/api/client/logs`,{limit:e}),t)).logs,refetchInterval:t})}function $t(e=6e4){return u({queryKey:Y.clientQuota,queryFn:async({signal:e})=>(await i(`/api/client/quota`,e)).accounts,refetchInterval:e})}function en(e,t=!0){return u({queryKey:Y.clientQuotaHistory(e),enabled:t,queryFn:({signal:t})=>i(a(`/api/client/quota/history`,{since:e.since,...e.until===void 0?{}:{until:e.until}}),t),refetchInterval:3e5})}function tn(){let e=d();return l({mutationFn:({id:e,patch:t})=>s(`/api/credentials/${e}`,t),onSuccess:()=>{e.invalidateQueries({queryKey:Y.credentials}),e.invalidateQueries({queryKey:Y.credentialHealth})}})}function nn(){let t=d();return l({mutationFn:t=>e(`/api/credentials/${t}`),onSuccess:()=>{t.invalidateQueries({queryKey:Y.credentials}),t.invalidateQueries({queryKey:Y.credentialHealth})}})}function rn(){let e=d();return l({mutationFn:e=>n(`/api/models/${encodeURIComponent(e.id)}`,e),onSuccess:()=>e.invalidateQueries({queryKey:Y.models})})}function an(){let t=d();return l({mutationFn:t=>e(`/api/models/${encodeURIComponent(t)}`),onSuccess:()=>t.invalidateQueries({queryKey:Y.models})})}function on(){return l({mutationFn:({modelId:e,need:n})=>t(`/api/models/${encodeURIComponent(e)}/dry-run`,n)})}function sn(){let e=d();return l({mutationFn:e=>t(`/api/keys`,e),onSuccess:()=>e.invalidateQueries({queryKey:Y.keys})})}function cn(){let e=d();return l({mutationFn:({id:e,limits:t})=>n(`/api/keys/${e}/limits`,{limits:t}),onSuccess:()=>e.invalidateQueries({queryKey:Y.keys})})}function ln(){let e=d();return l({mutationFn:({id:e,modelAllowlist:t})=>n(`/api/keys/${e}/models`,{modelAllowlist:t}),onSuccess:()=>e.invalidateQueries({queryKey:Y.keys})})}function un(){let e=d();return l({mutationFn:({id:e,expiresAt:t})=>n(`/api/keys/${e}/expiry`,{expiresAt:t}),onSuccess:()=>e.invalidateQueries({queryKey:Y.keys})})}function dn(){let t=d();return l({mutationFn:t=>e(`/api/keys/${t}`),onSuccess:()=>t.invalidateQueries({queryKey:Y.keys})})}function fn(){let e=d();return l({mutationFn:e=>n(`/api/settings`,e),onSuccess:()=>e.invalidateQueries({queryKey:Y.settings})})}function pn(){return l({mutationFn:e=>n(`/api/settings/password`,e)})}function mn(){let e=d();return l({mutationFn:e=>n(`/api/settings/viewer-password`,{password:e}),onSuccess:()=>e.invalidateQueries({queryKey:Y.status})})}function hn(){return l({mutationFn:e=>t(`/api/connect/start`,e)})}function gn(){let e=d();return l({mutationFn:e=>t(`/api/credentials`,e),onSuccess:()=>e.invalidateQueries({queryKey:Y.credentials})})}function _n(){let e=d();return l({mutationFn:e=>t(`/api/connect/finish`,e),onSuccess:()=>e.invalidateQueries({queryKey:Y.credentials})})}function vn(){return u({queryKey:Y.plugins,queryFn:async({signal:e})=>(await i(`/api/plugins`,e)).plugins,staleTime:3e5})}async function yn(e){let t=await o(`/api/connect/poll`,{method:`POST`,body:{flowId:e},accept:[202]});return t.status===202?{status:`pending`}:t.data}var bn=new Intl.NumberFormat(`en-US`,{notation:`compact`,maximumFractionDigits:1}),xn=new Intl.NumberFormat(`en-US`);function Sn(e){return Number.isFinite(e)?e<1e4?xn.format(Math.round(e)):bn.format(e).toLowerCase():`—`}function Cn(e){return Number.isFinite(e)?e===0?`$0`:e<.01?`$${e.toFixed(4)}`:e<100?`$${e.toFixed(2)}`:`$${bn.format(e).toLowerCase()}`:`—`}function wn(e){return e==null||!Number.isFinite(e)?`—`:e<1e3?`${Math.round(e)}ms`:e<6e4?`${(e/1e3).toFixed(1)}s`:`${Math.round(e/6e4)}m`}function Tn(e,t=1){return Number.isFinite(e)?`${(e*100).toFixed(t)}%`:`—`}var En=[[6e4,1e3,`s`],[36e5,6e4,`m`],[864e5,36e5,`h`],[1/0,864e5,`d`]];function Dn(e){let t=Math.abs(e);if(t<1e3)return`0s`;let n=En.find(([e])=>t<e);return n===void 0?`—`:`${Math.floor(t/n[1])}${n[2]}`}function On(e,t=Date.now()){if(e==null||!Number.isFinite(e))return`—`;let n=e-t;return Math.abs(n)<5e3?`just now`:n<0?`${Dn(n)} ago`:`in ${Dn(n)}`}function kn(e){return new Date(e).toLocaleTimeString(`en-GB`,{hour12:!1})}var An=864e5;function jn(e,t){let n=new Date(e),r=n.toLocaleTimeString(`en-GB`,{hour:`2-digit`,minute:`2-digit`,hour12:!1});return Mn(t)?`${n.toLocaleDateString(`en-GB`,{day:`2-digit`,month:`short`})} ${r}`:r}function Mn(e){return e>=An}function Nn(e){return e==null||!Number.isFinite(e)?`—`:new Date(e).toLocaleString(`en-GB`,{year:`numeric`,month:`short`,day:`2-digit`,hour:`2-digit`,minute:`2-digit`,hour12:!1})}var Pn=[`B`,`KiB`,`MiB`,`GiB`,`TiB`];function Fn(e){if(e==null||!Number.isFinite(e))return`—`;if(Math.abs(e)<1024)return`${Math.round(e)} B`;let t=e,n=0;for(;Math.abs(t)>=1024&&n<Pn.length-1;)t/=1024,n+=1;return`${t.toFixed(1)} ${Pn[n]}`}function In(e,t=8){return e.length<=t?e:`${e.slice(0,t)}…`}var Ln={fiveHour:18e6,daily:864e5,weekly:6048e5};function Rn(e,t){return t!==null&&t>0?t:Ln[e]}var zn=6e4;function Z(e,t){return e===null||t===null?e===t:Math.abs(e-t)<=zn}function Bn(e,t){return e.resetsAt!==null&&e.resetsAt<=t}function Vn(e,t){return t===void 0?`unknown`:e.observedAt>0&&t.stale?`stale`:t.ratePerHour===null||e.limit===null||e.limit<=0?`unknown`:t.survives===!1&&t.exhaustsAt!==null?`empty`:t.survives===!0?`ok`:`unknown`}function Hn(e,t){if(t.provider!==e.provider)return!1;let n=Symbol(`unusable-endpoint`);return(e=>e===void 0||e===``?void 0:e)(e.endpointId)===(e=>{if(e!==void 0)return typeof e==`string`&&e!==``?e:n})(t.providerData.endpointId)?e.credentialId===void 0||t.id===e.credentialId:!1}var Un=(e,t)=>e.revokedAt===null&&(e.expiresAt===null||e.expiresAt>t);function Wn(e,t){if(e.length===0)return null;let n=[...e].sort((e,t)=>e-t);return n[Math.min(n.length-1,Math.max(0,Math.ceil(t*n.length)-1))]??null}function Q(e){return e.state===`pending`}function Gn(e){return e.filter(e=>!Q(e))}function $(e){return Q(e)?!1:e.status>=400||e.errorCode!==null}var Kn={ok:`●`,warn:`◐`,down:`○`,idle:`·`,live:`●`};function qn(e){return Q(e)?`live`:$(e)?`down`:`ok`}function Jn(e){return Q(e)?`in flight`:$(e)?`failed with ${e.status}`:`succeeded`}function Yn(e,t){let n=Gn(e),r=[],i=0,a=0,o=0,s=0,c=0,l=0;for(let e of n)$(e)&&(i+=1),e.ttftMs!==null&&Number.isFinite(e.ttftMs)&&r.push(e.ttftMs),a+=e.costUsd,o+=e.inputTokens,s+=e.outputTokens,c+=e.cacheReadTokens,l+=e.cacheWriteTokens;let u=t/6e4;return{requests:n.length,errors:i,errorRate:n.length===0?0:i/n.length,ratePerMin:u<=0?0:n.length/u,ttftP50:Wn(r,.5),ttftP95:Wn(r,.95),costUsd:a,inputTokens:o,outputTokens:s,cacheReadTokens:c,cacheWriteTokens:l}}function Xn(e,t){let n=Gn(e),{now:r,spanMs:i,count:a}=t,o=i/a,s=r-i,c=Array.from({length:a},(e,t)=>({at:s+t*o,total:0,errors:0,costUsd:0,tokens:0,ttftMs:null})),l=Array.from({length:a},()=>[]);for(let e of n){if(e.at<s||e.at>r)continue;let t=Math.min(a-1,Math.floor((e.at-s)/o)),n=c[t];n!==void 0&&(n.total+=1,n.costUsd+=e.costUsd,n.tokens+=e.inputTokens+e.outputTokens+e.cacheReadTokens+e.cacheWriteTokens,$(e)&&(n.errors+=1),e.ttftMs!==null&&Number.isFinite(e.ttftMs)&&l[t]?.push(e.ttftMs))}for(let[e,t]of c.entries())t.ttftMs=Wn(l[e]??[],.5);return c}var Zn={tokenRejected:`reconnect needed — provider rejected the refresh token`,expiredNoRefresh:`reconnect needed — token expired with nothing to refresh from`};function Qn(e,t,n,r=null){if(!n){let e=r===`tokenRejected`||r===`expiredNoRefresh`;return{state:e?`down`:`idle`,note:e?Zn[r]:`disabled`,consecutiveFailures:0}}let i=`ok`,a=``,o=0;for(let n of e){if(o=Math.max(o,n.consecutiveFailures),n.breakerState===`open`){i=`down`,a=`breaker open`;continue}if(n.rateLimitedUntil!==null&&n.rateLimitedUntil>t&&i!==`down`){i=`warn`,a=`rate limited`;continue}n.breakerState===`halfOpen`&&i===`ok`&&(i=`warn`,a=`probing`)}return{state:i,note:a,consecutiveFailures:o}}var $n={fiveHour:`5h`,daily:`24h`,weekly:`7d`};function er(e){return Math.max(e,6e4)*3}function tr(e,t,n){return e.observedAt<=0||t-e.observedAt>er(n)}function nr(e,t){return t?.ratePerHour===void 0||t.ratePerHour===null||e.limit===null||e.limit<=0?null:t.ratePerHour/e.limit}function rr(e,t){return e.find(e=>e.windowType===t)}function ir(e,t,n,r,i){return ar(e,{stale:tr(e,t,n),rolledOver:Bn(e,t),estimateStale:i===void 0||i.stale,survives:i?.survives??null,exhaustsAt:i?.exhaustsAt??null},t,r)}function ar(e,t,n,r){let i=$n[e.windowType];if(e.observedAt<=0)return`${i} · never observed`;if(t.stale)return`${i} · stale, read ${r(e.observedAt,n)}`;if(t.rolledOver)return`${i} · rolled over, waiting for the next reading`;if(e.resetsAt===null)return i;let a=`resets ${r(e.resetsAt,n)}`;return t.estimateStale||t.survives!==!1||t.exhaustsAt===null?`${i} · ${a}`:`${i} · ${t.exhaustsAt<=n?`empty now`:`empty ~${Dn(t.exhaustsAt-n)}`} · ${a}`}function or(e){return{observedAt:e.observedAt,windowType:e.windowType,windowMs:e.windowMs,resetsAt:e.resetsAt,usedRatio:e.limit===null||e.limit<=0?null:Math.min(1,Math.max(0,e.used/e.limit))}}function sr(e,t){if(e.usedRatio!==0||t.usedRatio!==0)return!1;let n=Rn(e.windowType,e.windowMs),r=Rn(t.windowType,t.windowMs);return n===r&&Z(e.resetsAt,e.observedAt+n)&&Z(t.resetsAt,t.observedAt+r)&&!Z(t.resetsAt,e.resetsAt)}function cr(e){let t=e.filter(e=>e.usedRatio!==null).sort((e,t)=>e.observedAt-t.observedAt),n=[],r;for(let e of t){let t={at:e.observedAt,percent:Math.min(100,e.usedRatio*100)},i={resetsAt:e.resetsAt,startsAt:e.resetsAt===null?null:e.resetsAt-Rn(e.windowType,e.windowMs)},a=n[n.length-1],o=r!==void 0&&sr(r,e);a===void 0||r===void 0||!o&&!Z(e.resetsAt,r.resetsAt)?n.push({key:`window-${n.length}`,points:[t],...i}):(a.points.push(t),a.resetsAt=o?null:i.resetsAt,a.startsAt=o?null:i.startsAt),r=e}return n}function lr(e,t){let{usedRatio:n,observedAt:r}=t;if(n===null)return[...e];let i=e.findLastIndex(e=>Z(e.resetsAt,t.resetsAt)),a=e[i];if(a===void 0)return[...e];let o=a.points[a.points.length-1];if(o===void 0||o.at>=r)return[...e];let s={at:r,percent:Math.min(100,n*100)};return e.map((e,t)=>t===i?{...e,points:[...e.points,s]}:e)}function ur(e){return e.startsAt===null||e.resetsAt===null?null:{from:{at:e.startsAt,percent:0},to:{at:e.resetsAt,percent:100}}}var dr=36e5;function fr(e,t){let{usedRatio:n,resetsAt:r,observedAt:i}=e,a=t;if(n===null||r===null||a===null||a<=0)return null;let o=Math.min(100,n*100),s=a*100,c={at:i,percent:o},l=o+s*((r-i)/dr);return l<=100?{from:c,to:{at:r,percent:l}}:{from:c,to:{at:i+(100-o)/s*dr,percent:100}}}var pr={fiveHour:0,daily:1,weekly:2};function mr(e){return e.filter(e=>e.limit!==null&&e.limit>0).map(e=>({window:e,fraction:Math.min(1,e.used/e.limit)})).sort((e,t)=>pr[e.window.windowType]-pr[t.window.windowType])}function hr(e,t){let n=new Map;for(let r of e){let e=t(r),i=n.get(e);i===void 0?n.set(e,[r]):i.push(r)}return n}var gr=ee`
1
+ import{c as e,d as t,f as n,k as r,l as i,m as a,p as o,u as s}from"./Panel-CWmOTDAP.js";import{queryOptions as c,useMutation as l,useQuery as u,useQueryClient as d}from"@tanstack/react-query";import*as f from"react";import p,{useCallback as m,useDebugValue as h,useEffect as g,useMemo as _,useRef as v,useSyncExternalStore as y}from"react";import{jsx as b}from"react/jsx-runtime";import x,{css as S,keyframes as ee}from"styled-components";var C=f.use,w=f.useLayoutEffect;function te(e,t,n){f.useEffect(()=>{if(!e.current||n||typeof IntersectionObserver!=`function`)return()=>t();let r=new IntersectionObserver(e=>{t(e.pop())},{rootMargin:`100px`});return r.observe(e.current),()=>{r.disconnect(),t()}},[t,n,e])}function ne(e){let t=f.useRef(null);return f.useImperativeHandle(e,()=>t.current,[]),t}function T(e){return e[e.length-1]}function re(e,t){return typeof e==`function`?e(t):e}var E=Object.prototype.hasOwnProperty,D=Object.prototype.propertyIsEnumerable;function ie(e){for(let t in e)if(E.call(e,t))return!0;return!1}var ae=()=>Object.create(null),oe=(e,t)=>se(e,t,ae);function se(e,t,n=()=>({}),r=0){if(e===t)return e;if(r>500)return t;let i=t,a=ue(e)&&ue(i);if(!a&&!(O(e)&&O(i)))return i;let o=a?e:ce(e);if(!o)return i;let s=a?i:ce(i);if(!s)return i;let c=o.length,l=s.length,u=a?Array(l):n(),d=0;for(let t=0;t<l;t++){let o=a?t:s[t],l=e[o],f=i[o];if(l===f){u[o]=l,(a?t<c:E.call(e,o))&&d++;continue}if(l===null||f===null||typeof l!=`object`||typeof f!=`object`){u[o]=f;continue}let p=se(l,f,n,r+1);u[o]=p,p===l&&d++}return c===l&&d===c?e:u}function ce(e){let t=Object.keys(e);if(t.length!==Object.getOwnPropertyNames(e).length)return!1;let n=Object.getOwnPropertySymbols(e);if(n.length===0)return t;for(let r of n){if(!D.call(e,r))return!1;t.push(r)}return t}function O(e){if(!le(e))return!1;let t=e.constructor;if(t===void 0)return!0;let n=t.prototype;return!(!le(n)||!n.hasOwnProperty(`isPrototypeOf`))}function le(e){return Object.prototype.toString.call(e)===`[object Object]`}function ue(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function k(e,t,n){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return!1;for(let r=0,i=e.length;r<i;r++)if(!k(e[r],t[r],n))return!1;return!0}if(O(e)&&O(t)){let r=n?.ignoreUndefined??!0;if(n?.partial){for(let i in t)if((!r||t[i]!==void 0)&&!k(e[i],t[i],n))return!1;return!0}let i=0;if(!r)i=Object.keys(e).length;else for(let t in e)e[t]!==void 0&&i++;let a=0;for(let o in t)if((!r||t[o]!==void 0)&&(a++,a>i||!k(e[o],t[o],n)))return!1;return i===a}return!1}function de(e){return typeof e?.message==`string`?e.message.startsWith(`Failed to fetch dynamically imported module`)||e.message.startsWith(`error loading dynamically imported module`)||e.message.startsWith(`Importing a module script failed`):!1}var fe=/[\x00-\x1f\x7f"<>`{}]/g;function pe(e){return e.replace(fe,e=>`%`+e.charCodeAt(0).toString(16).toUpperCase().padStart(2,`0`))}function me(e){let t;try{t=decodeURI(e)}catch{t=e.replaceAll(/%[0-9A-F]{2}/gi,e=>{try{return decodeURI(e)}catch{return e}})}return pe(t)}var he=[`http:`,`https:`,`mailto:`,`tel:`];function A(e,t){if(!e)return!1;try{let n=new URL(e);return!t.has(n.protocol)}catch{return!1}}function j(e){if(!e||!/[%\\\x00-\x1f\x7f]/.test(e)&&!e.startsWith(`//`))return{path:e,handledProtocolRelativeURL:!1};let t=/%25|%5C/gi,n=0,r=``,i;for(;(i=t.exec(e))!==null;)r+=me(e.slice(n,i.index))+i[0],n=t.lastIndex;r+=me(n?e.slice(n):e);let a=!1;return r.startsWith(`//`)&&(a=!0,r=`/`+r.replace(/^\/+/,``)),{path:r,handledProtocolRelativeURL:a}}function ge(e){return/\s|[^\u0000-\u007F]/.test(e)?e.replace(/\s|[^\u0000-\u007F]/gu,encodeURIComponent):e}function _e(e,t){if(e===t)return!0;if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}function M(){throw Error(`Invariant failed`)}function N(e){let t=new Map,n,r,i=e=>{e.next&&(e.prev?(e.prev.next=e.next,e.next.prev=e.prev,e.next=void 0,r&&(r.next=e,e.prev=r)):(e.next.prev=void 0,n=e.next,e.next=void 0,r&&(e.prev=r,r.next=e)),r=e)};return{get(e){let n=t.get(e);if(n)return i(n),n.value},set(a,o){if(t.size>=e&&n){let e=n;t.delete(e.key),e.next&&(n=e.next,e.next.prev=void 0),e===r&&(r=void 0)}let s=t.get(a);if(s)s.value=o,i(s);else{let e={key:a,value:o,prev:r};r&&(r.next=e),r=e,n||=e,t.set(a,e)}},clear(){t.clear(),n=void 0,r=void 0}}}var P=4,F=5;function I(e,t,n=new Uint16Array(6)){let r=e.indexOf(`/`,t),i=r===-1?e.length:r,a=e.substring(t,i);if(!a||!a.includes(`$`))return n[0]=0,n[1]=t,n[2]=t,n[3]=i,n[4]=i,n[5]=i,n;if(a===`$`){let r=e.length;return n[0]=2,n[1]=t,n[2]=t,n[3]=r,n[4]=r,n[5]=r,n}if(a.charCodeAt(0)===36)return n[0]=1,n[1]=t,n[2]=t+1,n[3]=i,n[4]=i,n[5]=i,n;let o=a.indexOf(`{`),s;if(o!==-1&&o+1<a.length&&(s=a.indexOf(`}`,o))!==-1){let r=a.charCodeAt(o+1);if(r===45){if(o+2<a.length&&a.charCodeAt(o+2)===36){let e=o+3,r=s;if(e<r)return n[0]=3,n[1]=t+o,n[2]=t+e,n[3]=t+r,n[4]=t+s+1,n[5]=i,n}}else if(r===36){let r=o+1,a=o+2;return a===s?(n[0]=2,n[1]=t+o,n[2]=t+r,n[3]=t+a,n[4]=t+s+1,n[5]=e.length,n):(n[0]=1,n[1]=t+o,n[2]=t+a,n[3]=t+s,n[4]=t+s+1,n[5]=i,n)}}return n[0]=0,n[1]=t,n[2]=t,n[3]=i,n[4]=i,n[5]=i,n}function L(e,t,n,r,i,a,o,s){s?.(n);let c=r;{let r=n.fullPath??n.from,s=n.options,l=r.length,u=s?.caseSensitive??e,d=s?.params?.parse??s?.parseParams;for(;c<l;){let e=I(r,c,t),n,s=c,l=e[5];c=l+1,a++;let f=e[0];switch(f){case 0:{let t=r.substring(e[2],e[3]),o=t,s;u?s=i.static??=new Map:(o=t.toLowerCase(),s=i.staticInsensitive??=new Map);let c=s.get(o);if(c)n=c;else{let e=z(r);e.parent=i,e.depth=a,n=e,s.set(o,e)}break}case 1:case 3:case 2:{let t=r.substring(s,e[1]),c=r.substring(e[4],l),p=u&&!!(t||c);u||(t=t.toLowerCase(),c=c.toLowerCase());let m=f===1?i.dynamic:f===3?i.optional:i.wildcard,h=f!==2&&!d&&m?.find(e=>!e.parse&&e.caseSensitive===p&&e.prefix===t&&e.suffix===c);if(h)n=h;else{let e=B(f,r,p,t,c);n=e,e.parent=i,e.depth=a;let s;s=f===1?i.dynamic??=[]:f===3?i.optional??=[]:i.wildcard??=[],s.push(e),s.length===2&&o?.push(s)}break}}i=n}if(d&&n.children&&!n.isRoot&&n.id&&n.id.charCodeAt(n.id.lastIndexOf(`/`)+1)===95){let e=z(r);e.kind=F,e.parent=i,a++,e.depth=a,i.pathless??=[],i.pathless.push(e),i=e}let f=(n.path||!n.children)&&!n.isRoot;if(f&&r.endsWith(`/`)){let e=z(r);e.kind=P,e.parent=i,a++,e.depth=a,i.index=e,i=e}i.parse=d??null,i.priority=s?.params?.priority??0,f&&!i.route&&(i.route=n,i.fullPath=r)}if(n.children)for(let r of n.children)L(e,t,r,c,i,a,o,s)}function R(e,t){if(e.parse&&!t.parse)return-1;if(!e.parse&&t.parse)return 1;if(e.parse&&t.parse&&(e.priority||t.priority))return t.priority-e.priority;if(e.prefix&&t.prefix&&e.prefix!==t.prefix){if(e.prefix.startsWith(t.prefix))return-1;if(t.prefix.startsWith(e.prefix))return 1}if(e.suffix&&t.suffix&&e.suffix!==t.suffix){if(e.suffix.endsWith(t.suffix))return-1;if(t.suffix.endsWith(e.suffix))return 1}return e.prefix&&!t.prefix?-1:!e.prefix&&t.prefix?1:e.suffix&&!t.suffix?-1:!e.suffix&&t.suffix?1:e.caseSensitive&&!t.caseSensitive?-1:!e.caseSensitive&&t.caseSensitive?1:0}function z(e){return{kind:0,depth:0,pathless:null,index:null,static:null,staticInsensitive:null,dynamic:null,optional:null,wildcard:null,route:null,fullPath:e,parent:null,parse:null,priority:0}}function B(e,t,n,r,i){return{kind:e,depth:0,pathless:null,index:null,static:null,staticInsensitive:null,dynamic:null,optional:null,wildcard:null,route:null,fullPath:t,parent:null,parse:null,priority:0,caseSensitive:n,prefix:r,suffix:i}}function V(e,t){let n=z(`/`),r=new Uint16Array(6),i=[];for(let t of e)L(!1,r,t,1,n,0,i);for(let e of i)e.sort(R);t.masksTree=n,t.flatCache=N(1e3)}function H(e,t){e||=`/`;let n=t.flatCache.get(e);if(n!==void 0)return n;let r=Se(e,t.masksTree);return t.flatCache.set(e,r),r}function ve(e,t,n,r,i){e||=`/`,r||=`/`;let a=t?`case\0${e}`:e,o=i.singleCache.get(a);return o||(o=z(`/`),L(t,new Uint16Array(6),{from:e},1,o,0),i.singleCache.set(a,o)),Se(r,o,n)}function ye(e,t,n=!1){let r=n?e:`nofuzz\0${e}`,i=t.matchCache.get(r);if(i!==void 0)return i;e||=`/`;let a;try{a=Se(e,t.segmentTree,n)}catch(e){if(e instanceof URIError)a=null;else throw e}return a&&(a.branch=we(a.route)),t.matchCache.set(r,a),a}function be(e){return e===`/`?e:e.replace(/\/{1,}$/,``)}function xe(e,t=!1,n){let r=z(e.fullPath),i=new Uint16Array(6),a=[],o={},s={},c=0;L(t,i,e,1,r,0,a,e=>{if(n?.(e,c),e.id in o&&M(),o[e.id]=e,c!==0&&e.path){let t=be(e.fullPath);(!s[t]||e.fullPath.endsWith(`/`))&&(s[t]=e)}c++});for(let e of a)e.sort(R);return{processedTree:{segmentTree:r,singleCache:N(1e3),matchCache:N(1e3),flatCache:null,masksTree:null},routesById:o,routesByPath:s}}function Se(e,t,n=!1){let r=e.split(`/`),i=Ee(e,r,t,n);if(!i)return null;let[a]=Ce(e,r,i);return{route:i.node.route,rawParams:a}}function Ce(e,t,n){let r=Te(n.node),i=null,a=Object.create(null),o=n.extract?.part??0,s=n.extract?.node??0,c=n.extract?.path??0,l=n.extract?.segment??0;for(;s<r.length;o++,s++,c++,l++){let u=r[s];if(u.kind===P)break;if(u.kind===F){l--,o--,c--;continue}let d=t[o],f=c;if(d&&(c+=d.length),u.kind===1){i??=n.node.fullPath.split(`/`);let e=i[l],t=u.prefix.length;if(e.charCodeAt(t)===123){let n=u.suffix.length,r=e.substring(t+2,e.length-n-1),i=d.substring(t,d.length-n);a[r]=decodeURIComponent(i)}else{let t=e.substring(1);a[t]=decodeURIComponent(d)}}else if(u.kind===3){if(n.skipped&1<<s){o--,c=f-1;continue}i??=n.node.fullPath.split(`/`);let e=i[l],t=u.prefix.length,r=u.suffix.length,p=e.substring(t+3,e.length-r-1),m=u.suffix||u.prefix?d.substring(t,d.length-r):d;m&&(a[p]=decodeURIComponent(m))}else if(u.kind===2){let t=u,n=e.substring(f+t.prefix.length,e.length-t.suffix.length),r=decodeURIComponent(n);a[`*`]=r,a._splat=r;break}}return n.rawParams&&Object.assign(a,n.rawParams),[a,{part:o,node:s,path:c,segment:l}]}function we(e){let t=[e];for(;e.parentRoute;)e=e.parentRoute,t.push(e);return t.reverse(),t}function Te(e){let t=Array(e.depth+1);do t[e.depth]=e,e=e.parent;while(e);return t}function Ee(e,t,n,r){if(e===`/`&&n.index)return{node:n.index,skipped:0};let i=!T(t),a=i&&e!==`/`,o=t.length-+!!i,s=[{node:n,index:1,skipped:0,statics:0,dynamics:0,optionals:0}],c=null,l=null;for(;s.length;){let n=s.pop(),{node:i,index:u,skipped:d,statics:f,dynamics:p,optionals:m}=n,{extract:h,rawParams:g}=n;if(i.kind===2&&i.route&&!W(l,n))continue;if(i.parse){if(!Oe(e,t,n))continue;g=n.rawParams,h=n.extract}r&&i.route&&i.kind!==P&&W(c,n)&&(c=n);let _=u===o;if(_&&(i.route&&(!a||i.kind===P||i.kind===2)&&W(l,n)&&(l=n),!i.optional&&!i.wildcard&&!i.index&&!i.pathless))continue;let v=_?void 0:t[u],y;if(_&&i.index){let n={node:i.index,index:u,skipped:d,statics:f,dynamics:p,optionals:m,extract:h,rawParams:g},r=!0;if(i.index.parse&&(Oe(e,t,n)||(r=!1)),r){if(!p&&!m&&!d&&De(f,o))return n;W(l,n)&&(l=n)}}if(i.wildcard)for(let e=i.wildcard.length-1;e>=0;e--){let n=i.wildcard[e],{prefix:r,suffix:a}=n;if(!r||!_&&(n.caseSensitive?v:y??=v.toLowerCase()).startsWith(r)){if(a){if(_)continue;let e=t.slice(u).join(`/`),i=e.slice(-a.length);if((n.caseSensitive?i:i.toLowerCase())!==a||e.length-a.length<r.length)continue}s.push({node:n,index:o,skipped:d,statics:f,dynamics:p,optionals:m,extract:h,rawParams:g})}}if(i.optional){let e=d|1<<i.depth+1;for(let t=i.optional.length-1;t>=0;t--){let n=i.optional[t];s.push({node:n,index:u,skipped:e,statics:f,dynamics:p,optionals:m,extract:h,rawParams:g})}if(!_)for(let e=i.optional.length-1;e>=0;e--){let t=i.optional[e],{prefix:n,suffix:r}=t;if(n||r){let e=t.caseSensitive?v:y??=v.toLowerCase();if(n&&!e.startsWith(n)||r&&e.indexOf(r,e.length-r.length)<n.length)continue}s.push({node:t,index:u+1,skipped:d,statics:f,dynamics:p,optionals:m+U(o,u),extract:h,rawParams:g})}}if(!_&&i.dynamic&&v)for(let e=i.dynamic.length-1;e>=0;e--){let t=i.dynamic[e],{prefix:n,suffix:r}=t;if(n||r){let e=t.caseSensitive?v:y??=v.toLowerCase();if(n&&!e.startsWith(n)||r&&e.indexOf(r,e.length-r.length)<n.length)continue}s.push({node:t,index:u+1,skipped:d,statics:f,dynamics:p+U(o,u),optionals:m,extract:h,rawParams:g})}if(!_&&i.staticInsensitive){let e=i.staticInsensitive.get(y??=v.toLowerCase());e&&s.push({node:e,index:u+1,skipped:d,statics:f+U(o,u),dynamics:p,optionals:m,extract:h,rawParams:g})}if(!_&&i.static){let e=i.static.get(v);e&&s.push({node:e,index:u+1,skipped:d,statics:f+U(o,u),dynamics:p,optionals:m,extract:h,rawParams:g})}if(i.pathless)for(let e=i.pathless.length-1;e>=0;e--){let t=i.pathless[e];s.push({node:t,index:u,skipped:d,statics:f,dynamics:p,optionals:m,extract:h,rawParams:g})}}if(l)return l;if(r&&c){let n=c.index;for(let e=0;e<c.index;e++)n+=t[e].length;let r=n===e.length?`/`:e.slice(n);return c.rawParams??=Object.create(null),c.rawParams[`**`]=decodeURIComponent(r),c}return null}function U(e,t){return 2**(e-t-1)}function De(e,t){return e===2**(t-1)-1}function Oe(e,t,n){let r,i;try{[r,i]=Ce(e,t,n)}catch{return null}if(n.rawParams=r,n.extract=i,!n.node.parse)return!0;try{if(n.node.parse(r)===!1)return null}catch{}return!0}function W(e,t){return!e||t.statics>e.statics||t.statics===e.statics&&(t.dynamics>e.dynamics||t.dynamics===e.dynamics&&(t.optionals>e.optionals||t.optionals===e.optionals&&((t.node.kind===P)>(e.node.kind===P)||t.node.kind===P==(e.node.kind===P)&&t.node.depth>e.node.depth)))}function ke(e){return G(e.filter(e=>e!==void 0).join(`/`))}function G(e){return e.replace(/\/{2,}/g,`/`)}function Ae(e){return e===`/`?e:e.replace(/^\/{1,}/,``)}function je(e){let t=e.length;return t>1&&e[t-1]===`/`?e.replace(/\/{1,}$/,``):e}function Me(e){return je(Ae(e))}function K(e,t){return e?.endsWith(`/`)&&e!==`/`&&e!==`${t}/`?e.slice(0,-1):e}function Ne(e,t,n){return K(e,n)===K(t,n)}function Pe({base:e,to:t,trailingSlash:n=`never`,cache:r}){if(t.includes(`//`)&&(t=G(t)),t.startsWith(`/`))return t.length===1||n===`preserve`?t:n===`always`?t.endsWith(`/`)?t:`${t}/`:t.endsWith(`/`)?t.slice(0,-1):t;let i=t===`.`,a;if(r){a=i?e:e+`\0`+t;let n=r.get(a);if(n)return n}let o;if(i)o=e.split(`/`);else{for(e.includes(`//`)&&(e=G(e)),o=e.split(`/`);o.length>1&&T(o)===``;)o.pop();let n=t.split(`/`);for(let e=0,t=n.length;e<t;e++){let r=n[e];r===``?e?e===t-1&&o.push(r):o=[r]:r===`..`?o.length>1?o.pop():o=[``]:r===`.`||o.push(r)}}o.length>1&&(T(o)===``?n===`never`&&o.pop():n===`always`&&o.push(``));let s=o.join(`/`),c=(i?G(s):s)||`/`;return a&&r&&r.set(a,c),c}function Fe(e){let t=new Map(e.map(e=>[encodeURIComponent(e),e])),n=Array.from(t.keys()).map(e=>e.replace(/[.*+?^${}()|[\]\\]/g,`\\$&`)).join(`|`),r=new RegExp(n,`g`);return e=>e.replace(r,e=>t.get(e)??e)}function Ie(e,t,n){let r=t[e];return typeof r==`string`?e===`_splat`?/^[a-zA-Z0-9\-._~!/]*$/.test(r)?r:r.split(`/`).map(e=>Re(e,n)).join(`/`):Re(r,n):r}function Le({path:e,params:t,decoder:n,...r}){let i=!1,a=Object.create(null);if(!e||e===`/`)return{interpolatedPath:`/`,usedParams:a,isMissingParams:i};if(!e.includes(`$`))return{interpolatedPath:e,usedParams:a,isMissingParams:i};let o=e.length,s=0,c,l=``;for(;s<o;){let r=s;c=I(e,r,c);let o=c[5];if(s=o+1,r===o)continue;let u=c[0];if(u===0){l+=`/`+e.substring(r,o);continue}if(u===2){let s=t._splat;a._splat=s,a[`*`]=s;let u=e.substring(r,c[1]),d=e.substring(c[4],o);if(!s){i=!0,(u||d)&&(l+=`/`+u+d);continue}let f=Ie(`_splat`,t,n);l+=`/`+u+f+d;continue}if(u===1){let s=e.substring(c[2],c[3]);!i&&!(s in t)&&(i=!0),a[s]=t[s];let u=e.substring(r,c[1]),d=e.substring(c[4],o),f=Ie(s,t,n)??`undefined`;l+=`/`+u+f+d;continue}if(u===3){let i=e.substring(c[2],c[3]),s=t[i];if(s==null)continue;a[i]=s;let u=e.substring(r,c[1]),d=e.substring(c[4],o),f=Ie(i,t,n)??``;l+=`/`+u+f+d;continue}}return e.endsWith(`/`)&&(l+=`/`),{usedParams:a,interpolatedPath:l||`/`,isMissingParams:i}}function Re(e,t){let n=encodeURIComponent(e);return t?.(n)??n}var ze=`Error preloading route! ☝️`;function Be({children:e,fallback:t=null}){return b(p.Fragment,{children:Ve()?e:t})}function Ve(){return p.useSyncExternalStore(He,()=>!0,()=>!1)}function He(){return()=>{}}function Ue(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var We=typeof Object.is==`function`?Object.is:Ue;function Ge(e,t,n,r,i){let a=v(null),o;a.current===null?(o={hasValue:!1,value:null},a.current=o):o=a.current;let[s,c]=_(()=>{let e=!1,a,s,c=t=>{if(!e){e=!0,a=t;let n=r(t);if(i!==void 0&&o.hasValue){let e=o.value;if(i(e,n))return s=e,e}return s=n,n}let n=s;if(We(a,t))return n;let c=r(t);return i?.(n,c)?(a=t,n):(a=t,s=c,c)},l=n===void 0?null:n;return[()=>c(t()),l===null?void 0:()=>c(l())]},[t,n,r,i,o]),l=y(e,s,c);return g(()=>{o.hasValue=!0,o.value=l},[l,o]),h(l),l}function Ke(e,t){return e===t}function qe(e,t,n=Ke){let r=m(t=>{if(!e)return()=>{};let{unsubscribe:n}=e.subscribe(t);return n},[e]),i=m(()=>e?.get(),[e]);return Ge(r,i,i,t,n)}function Je(e){let t=r();return f.useCallback(n=>t.navigate({...n,from:n.from??e?.from}),[e?.from,t])}function Ye(e){let t=f.useRef(e);return k(t.current,e,{ignoreUndefined:!1})||(t.current=e),t.current}function Xe(e,t){return e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]}function Ze(e,t,n){if(e?.external)return A(e.href,n)?void 0:e.href;if(!ot(t)&&typeof t==`string`&&t.indexOf(`:`)!==-1)try{return new URL(t),A(t,n)?void 0:t}catch{}}function Qe(e,t,n,r,i,a){if(a)return!1;if(n?.exact){if(!Ne(e.pathname,t.pathname,r))return!1}else{let n=K(e.pathname,r),i=K(t.pathname,r);if(!n.startsWith(i)||n.length!==i.length&&n[i.length]!==`/`)return!1}return(n?.includeSearch??!0)&&!k(e.search,t.search,{partial:!n?.exact,ignoreUndefined:!n?.explicitUndefined})?!1:!n?.includeHash||i&&e.hash===t.hash}function $e(e,t){let n=r(),i=ne(t),{activeProps:a,inactiveProps:o,activeOptions:s,to:c,preload:l,preloadDelay:u,preloadIntentProximity:d,hashScrollIntoView:p,replace:m,startTransition:h,resetScroll:g,viewTransition:_,children:v,target:y,disabled:b,style:x,className:S,onClick:ee,onBlur:C,onFocus:w,onMouseEnter:T,onMouseLeave:E,onTouchStart:D,ignoreBlocker:ie,params:ae,search:oe,hash:se,state:ce,mask:O,reloadDocument:le,unsafeRelative:ue,from:k,_fromLocation:de,...fe}=e,pe=Ve(),me=Ye(e.search),he=Ye(e.params),A=Ye(s),j=f.useMemo(()=>e,[n,e.from,e._fromLocation,e.hash,e.to,me,he,e.state,e.mask,e.unsafeRelative]),ge=f.useCallback(e=>{let t=n.buildLocation({_fromLocation:e,...j}),r=at(t.maskedLocation?t.maskedLocation.publicHref:t.publicHref,t.maskedLocation?t.maskedLocation.external:t.external,n.history,b),i=Ze(r,c,n.protocolAllowlist);return[r?.href,i,Qe(e,t,A,n.basepath,pe,i!==void 0)]},[A,b,pe,j,n,c]),[_e,M,N]=qe(n.stores.location,ge,Xe),P=N?re(a,{})??tt:et,F=N?et:re(o,{})??et,I=[S,P.className,F.className].filter(Boolean).join(` `),L=(x||P.style||F.style)&&{...x,...P.style,...F.style},R=f.useRef(!1),z=e.reloadDocument||M||b?!1:l??n.options.defaultPreload,B=u??n.options.defaultPreloadDelay??0,V=f.useCallback(()=>{n.preloadRoute(j).catch(e=>{console.warn(e),console.warn(ze)})},[n,j]),H=f.useCallback(e=>{if(!e){it(i);return}if(!(e.isIntersecting??z===`intent`)){e.isIntersecting===!1&&it(i);return}if(!B){V();return}q.has(i)||q.set(i,setTimeout(()=>{q.delete(i),V()},B))},[V,i,z,B]);te(i,H,z!==`viewport`),f.useEffect(()=>{R.current||z===`render`&&(V(),R.current=!0)},[V,z]);let ve=e=>{let t=e.currentTarget.getAttribute(`target`),r=y===void 0?t:y;!b&&!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)&&!e.defaultPrevented&&(!r||r===`_self`)&&e.button===0&&(e.preventDefault(),n.navigate({...j,replace:m,resetScroll:g,hashScrollIntoView:p,startTransition:h,viewTransition:_,ignoreBlocker:ie}))};if(M)return{...fe,ref:i,href:M,...v&&{children:v},...y&&{target:y},...b&&{disabled:b},...x&&{style:x},...S&&{className:S},...ee&&{onClick:ee},...C&&{onBlur:C},...w&&{onFocus:w},...T&&{onMouseEnter:T},...E&&{onMouseLeave:E},...D&&{onTouchStart:D}};let ye=()=>{z===`intent`&&V()},be=()=>{z===`intent`&&it(i)};return{...fe,...P,...F,href:_e,ref:i,onClick:J([ee,ve]),onBlur:J([C,be]),onFocus:J([w,H]),onMouseEnter:J([T,H]),onMouseLeave:J([E,be]),onTouchStart:J([D,ye]),disabled:!!b,target:y,...L&&{style:L},...I&&{className:I},...b&&nt,...N&&rt}}var et={},tt={className:`active`},nt={role:`link`,"aria-disabled":!0},rt={"data-status":`active`,"aria-current":`page`},q=new WeakMap,it=e=>{clearTimeout(q.get(e)),q.delete(e)},J=e=>t=>{for(let n of e)if(n){if(t.defaultPrevented)return;n(t)}};function at(e,t,n,r){if(!r)return t?{href:e,external:!0}:{href:n.createHref(e)||`/`,external:!1}}function ot(e){if(typeof e!=`string`)return!1;let t=e.charCodeAt(0);return t===47?e.charCodeAt(1)!==47:t===46}var st=f.forwardRef((e,t)=>{let{_asChild:n,...r}=e,{type:i,...a}=$e(r,t),o=typeof r.children==`function`?r.children({isActive:a[`data-status`]===`active`}):r.children;if(!n){let{disabled:e,...t}=a;return f.createElement(`a`,t,o)}return f.createElement(n,a,o)}),Y={status:[`status`],credentials:[`credentials`],credentialHealth:[`credentials`,`health`],models:[`models`],keys:[`keys`],settings:[`settings`],agentSetup:(e,t)=>[`agent-setup`,e,t??null],usage:e=>[`usage`,e.grain??`raw`,e.groupBy,e.splitBy??null,e.since,e.until??null],quotaHistory:e=>[`quota-history`,e.credentialId,e.since,e.until??null],logs:e=>[`logs`,e],requestBody:e=>[`logs`,`body`,e],clientSummary:[`client`,`summary`],clientUsage:e=>[`client`,`usage`,e.grain??`raw`,e.groupBy,e.splitBy??null,e.since,e.until??null],clientLogs:e=>[`client`,`logs`,e],clientQuota:[`client`,`quota`],clientQuotaHistory:e=>[`client`,`quota-history`,e.since,e.until??null],console:(e,t,n)=>[`console`,e,t,n],nodes:[`nodes`],database:[`database`],snapshots:[`database`,`snapshots`],lifecycle:[`lifecycle`],plugins:[`plugins`],catalog:[`catalog`]},ct=c({queryKey:Y.catalog,queryFn:async({signal:e})=>{let{providers:t}=await i(`/api/catalog`,e);return[...t].sort((e,t)=>e.order-t.order)},staleTime:3e5});function lt(){return u(ct)}function ut(e,t){return e.find(e=>e.id===t)}function dt(){return u({queryKey:Y.status,queryFn:({signal:e})=>i(`/api/status`,e),staleTime:3e4})}function ft(){return u({queryKey:Y.credentials,queryFn:async({signal:e})=>(await i(`/api/credentials`,e)).credentials})}function pt(e=1e4){return u({queryKey:Y.credentialHealth,queryFn:({signal:e})=>i(`/api/credentials/health`,e),refetchInterval:e})}function mt(e,t=!0){return u({queryKey:Y.quotaHistory(e),enabled:t,queryFn:({signal:t})=>i(a(`/api/credentials/quota/history`,{credentialId:e.credentialId,since:e.since,...e.until===void 0?{}:{until:e.until}}),t),refetchInterval:!1})}function ht(){return u({queryKey:Y.models,queryFn:async({signal:e})=>(await i(`/api/models`,e)).models})}function gt(){return u({queryKey:Y.keys,queryFn:async({signal:e})=>(await i(`/api/keys`,e)).keys})}var _t={queryKey:Y.settings,queryFn:({signal:e})=>i(`/api/settings`,e)};function vt(){return u({..._t,select:e=>e.settings})}function yt(){return u({..._t,select:e=>e.bodyLoggingAllowed&&e.settings.bodyLoggingEnabled})}function bt(){return u({..._t,select:e=>e.bodyLoggingAllowed})}function xt(){return u({..._t,select:e=>e.dayOffsetMinutes??null})}function St(e,t){return u({queryKey:Y.agentSetup(e,t),enabled:t!==void 0,queryFn:async({signal:n})=>(await i(a(`/api/agent-setup`,{client:e,...t??{}}),n)).files})}function Ct(e,t=6e4){return u({queryKey:Y.usage(e),queryFn:async({signal:t})=>(await i(a(`/api/usage`,{groupBy:e.groupBy,since:e.since,...e.grain===void 0?{}:{grain:e.grain},...e.splitBy===void 0?{}:{splitBy:e.splitBy},...e.until===void 0?{}:{until:e.until}}),t)).rows,refetchInterval:t})}var wt=2e3;function Tt(e=100,t=wt){return u({queryKey:Y.logs(e),queryFn:async({signal:t})=>(await i(a(`/api/logs`,{limit:e}),t)).logs,refetchInterval:t})}function Et(e){return u({queryKey:Y.requestBody(e??``),enabled:e!==null,queryFn:({signal:t})=>i(`/api/requests/${encodeURIComponent(e??``)}/body`,t),refetchInterval:!1})}var Dt=5e3;function Ot(e=200,t=``,n=Dt,r=``){return u({queryKey:Y.console(e,t,r),queryFn:async({signal:n})=>i(a(`/api/console`,{lines:e,...t===``?{}:{level:t},...r===``?{}:{node:r}}),n),refetchInterval:n})}var kt=3e4;function At(){return u({queryKey:Y.nodes,queryFn:async({signal:e})=>i(`/api/nodes`,e),refetchInterval:kt})}function jt(){return u({queryKey:Y.database,queryFn:({signal:e})=>i(`/api/database`,e),refetchInterval:!1,refetchOnWindowFocus:!1,staleTime:1/0})}function Mt(e){return`/api/database/snapshots/${encodeURIComponent(e)}/download`}function Nt(){return u({queryKey:Y.snapshots,queryFn:async({signal:e})=>(await i(`/api/database/snapshots`,e)).snapshots,refetchInterval:!1})}function X(e){e.invalidateQueries({queryKey:Y.database})}function Pt(){let e=d();return l({mutationFn:()=>t(`/api/database/snapshots`),onSuccess:()=>X(e)})}function Ft(){let e=d();return l({mutationFn:e=>n(`/api/database/retention`,e),onSuccess:()=>{X(e),e.invalidateQueries({queryKey:Y.settings})}})}function It(){let e=d();return l({mutationFn:()=>t(`/api/database/vacuum`),onSuccess:()=>X(e)})}function Lt(){let t=d();return l({mutationFn:()=>e(`/api/database/bodies`),onSuccess:()=>{X(t),t.invalidateQueries({queryKey:[`logs`]})}})}function Rt(){let t=d();return l({mutationFn:t=>e(`/api/database/snapshots/${encodeURIComponent(t)}`),onSuccess:()=>X(t)})}function zt(){return l({mutationFn:e=>t(`/api/database/snapshots/${encodeURIComponent(e)}/restore`)})}function Bt(){return l({mutationFn:e=>t(`/api/database/import`,e)})}function Vt(){return u({queryKey:Y.lifecycle,queryFn:({signal:e})=>i(`/api/lifecycle`,e),refetchInterval:!1})}function Ht(){return l({mutationFn:()=>t(`/api/lifecycle/restart`)})}function Ut(){return l({mutationFn:()=>t(`/api/lifecycle/shutdown`)})}function Wt(){let e=d();return l({mutationFn:({mode:e,secret:n})=>e===`client`?t(`/api/client/login`,{key:n}):t(`/api/login`,{password:n,...e===`viewer`?{mode:`viewer`}:{}}),onSuccess:()=>e.invalidateQueries()})}function Gt(){let e=d();return l({mutationFn:e=>t(`/api/setup`,{password:e}),onSuccess:()=>e.invalidateQueries()})}function Kt(){let e=d();return l({mutationFn:()=>t(`/api/logout`),onSuccess:()=>{e.clear()}})}function qt(){let e=d();return l({mutationFn:()=>t(`/api/client/logout`),onSuccess:()=>e.clear()})}var Jt={queryKey:Y.clientSummary,queryFn:({signal:e})=>i(`/api/client/summary`,e)};function Yt(){return u(Jt)}function Xt(){return u({...Jt,select:e=>e.dayOffsetMinutes??null})}function Zt(e,t=6e4){return u({queryKey:Y.clientUsage(e),queryFn:({signal:t})=>i(a(`/api/client/usage`,{groupBy:e.groupBy,since:e.since,...e.grain===void 0?{}:{grain:e.grain},...e.splitBy===void 0?{}:{splitBy:e.splitBy},...e.until===void 0?{}:{until:e.until}}),t),refetchInterval:t})}function Qt(e=100,t=wt){return u({queryKey:Y.clientLogs(e),queryFn:async({signal:t})=>(await i(a(`/api/client/logs`,{limit:e}),t)).logs,refetchInterval:t})}function $t(e=6e4){return u({queryKey:Y.clientQuota,queryFn:async({signal:e})=>(await i(`/api/client/quota`,e)).accounts,refetchInterval:e})}function en(e,t=!0){return u({queryKey:Y.clientQuotaHistory(e),enabled:t,queryFn:({signal:t})=>i(a(`/api/client/quota/history`,{since:e.since,...e.until===void 0?{}:{until:e.until}}),t),refetchInterval:3e5})}function tn(){let e=d();return l({mutationFn:({id:e,patch:t})=>s(`/api/credentials/${e}`,t),onSuccess:()=>{e.invalidateQueries({queryKey:Y.credentials}),e.invalidateQueries({queryKey:Y.credentialHealth})}})}function nn(){let t=d();return l({mutationFn:t=>e(`/api/credentials/${t}`),onSuccess:()=>{t.invalidateQueries({queryKey:Y.credentials}),t.invalidateQueries({queryKey:Y.credentialHealth})}})}function rn(){let e=d();return l({mutationFn:e=>n(`/api/models/${encodeURIComponent(e.id)}`,e),onSuccess:()=>e.invalidateQueries({queryKey:Y.models})})}function an(){let t=d();return l({mutationFn:t=>e(`/api/models/${encodeURIComponent(t)}`),onSuccess:()=>t.invalidateQueries({queryKey:Y.models})})}function on(){return l({mutationFn:({modelId:e,need:n})=>t(`/api/models/${encodeURIComponent(e)}/dry-run`,n)})}function sn(){let e=d();return l({mutationFn:e=>t(`/api/keys`,e),onSuccess:()=>e.invalidateQueries({queryKey:Y.keys})})}function cn(){let e=d();return l({mutationFn:({id:e,limits:t})=>n(`/api/keys/${e}/limits`,{limits:t}),onSuccess:()=>e.invalidateQueries({queryKey:Y.keys})})}function ln(){let e=d();return l({mutationFn:({id:e,modelAllowlist:t})=>n(`/api/keys/${e}/models`,{modelAllowlist:t}),onSuccess:()=>e.invalidateQueries({queryKey:Y.keys})})}function un(){let e=d();return l({mutationFn:({id:e,expiresAt:t})=>n(`/api/keys/${e}/expiry`,{expiresAt:t}),onSuccess:()=>e.invalidateQueries({queryKey:Y.keys})})}function dn(){let t=d();return l({mutationFn:t=>e(`/api/keys/${t}`),onSuccess:()=>t.invalidateQueries({queryKey:Y.keys})})}function fn(){let e=d();return l({mutationFn:e=>n(`/api/settings`,e),onSuccess:()=>e.invalidateQueries({queryKey:Y.settings})})}function pn(){return l({mutationFn:e=>n(`/api/settings/password`,e)})}function mn(){let e=d();return l({mutationFn:e=>n(`/api/settings/viewer-password`,{password:e}),onSuccess:()=>e.invalidateQueries({queryKey:Y.status})})}function hn(){return l({mutationFn:e=>t(`/api/connect/start`,e)})}function gn(){let e=d();return l({mutationFn:e=>t(`/api/credentials`,e),onSuccess:()=>e.invalidateQueries({queryKey:Y.credentials})})}function _n(){let e=d();return l({mutationFn:e=>t(`/api/connect/finish`,e),onSuccess:()=>e.invalidateQueries({queryKey:Y.credentials})})}function vn(){return u({queryKey:Y.plugins,queryFn:async({signal:e})=>(await i(`/api/plugins`,e)).plugins,staleTime:3e5})}async function yn(e){let t=await o(`/api/connect/poll`,{method:`POST`,body:{flowId:e},accept:[202]});return t.status===202?{status:`pending`}:t.data}var bn=new Intl.NumberFormat(`en-US`,{notation:`compact`,maximumFractionDigits:1}),xn=new Intl.NumberFormat(`en-US`);function Sn(e){return Number.isFinite(e)?e<1e4?xn.format(Math.round(e)):bn.format(e).toLowerCase():`—`}function Cn(e){return Number.isFinite(e)?e===0?`$0`:e<.01?`$${e.toFixed(4)}`:e<100?`$${e.toFixed(2)}`:`$${bn.format(e).toLowerCase()}`:`—`}function wn(e){return e==null||!Number.isFinite(e)?`—`:e<1e3?`${Math.round(e)}ms`:e<6e4?`${(e/1e3).toFixed(1)}s`:`${Math.round(e/6e4)}m`}function Tn(e,t=1){return Number.isFinite(e)?`${(e*100).toFixed(t)}%`:`—`}var En=[[6e4,1e3,`s`],[36e5,6e4,`m`],[864e5,36e5,`h`],[1/0,864e5,`d`]];function Dn(e){let t=Math.abs(e);if(t<1e3)return`0s`;let n=En.find(([e])=>t<e);return n===void 0?`—`:`${Math.floor(t/n[1])}${n[2]}`}function On(e,t=Date.now()){if(e==null||!Number.isFinite(e))return`—`;let n=e-t;return Math.abs(n)<5e3?`just now`:n<0?`${Dn(n)} ago`:`in ${Dn(n)}`}function kn(e){return new Date(e).toLocaleTimeString(`en-GB`,{hour12:!1})}var An=864e5;function jn(e,t){let n=new Date(e),r=n.toLocaleTimeString(`en-GB`,{hour:`2-digit`,minute:`2-digit`,hour12:!1});return Mn(t)?`${n.toLocaleDateString(`en-GB`,{day:`2-digit`,month:`short`})} ${r}`:r}function Mn(e){return e>=An}function Nn(e){return e==null||!Number.isFinite(e)?`—`:new Date(e).toLocaleString(`en-GB`,{year:`numeric`,month:`short`,day:`2-digit`,hour:`2-digit`,minute:`2-digit`,hour12:!1})}var Pn=[`B`,`KiB`,`MiB`,`GiB`,`TiB`];function Fn(e){if(e==null||!Number.isFinite(e))return`—`;if(Math.abs(e)<1024)return`${Math.round(e)} B`;let t=e,n=0;for(;Math.abs(t)>=1024&&n<Pn.length-1;)t/=1024,n+=1;return`${t.toFixed(1)} ${Pn[n]}`}function In(e,t=8){return e.length<=t?e:`${e.slice(0,t)}…`}var Ln={fiveHour:18e6,daily:864e5,weekly:6048e5};function Rn(e,t){return t!==null&&t>0?t:Ln[e]}var zn=6e4;function Z(e,t){return e===null||t===null?e===t:Math.abs(e-t)<=zn}function Bn(e,t){return e.resetsAt!==null&&e.resetsAt<=t}function Vn(e,t){return t===void 0?`unknown`:e.observedAt>0&&t.stale?`stale`:t.ratePerHour===null||e.limit===null||e.limit<=0?`unknown`:t.survives===!1&&t.exhaustsAt!==null?`empty`:t.survives===!0?`ok`:`unknown`}function Hn(e,t){if(t.provider!==e.provider)return!1;let n=Symbol(`unusable-endpoint`);return(e=>e===void 0||e===``?void 0:e)(e.endpointId)===(e=>{if(e!==void 0)return typeof e==`string`&&e!==``?e:n})(t.providerData.endpointId)?e.credentialId===void 0||t.id===e.credentialId:!1}var Un=(e,t)=>e.revokedAt===null&&(e.expiresAt===null||e.expiresAt>t);function Wn(e,t){if(e.length===0)return null;let n=[...e].sort((e,t)=>e-t);return n[Math.min(n.length-1,Math.max(0,Math.ceil(t*n.length)-1))]??null}function Q(e){return e.state===`pending`}function Gn(e){return e.filter(e=>!Q(e))}function $(e){return Q(e)?!1:e.status>=400||e.errorCode!==null}var Kn={ok:`●`,warn:`◐`,down:`○`,idle:`·`,live:`●`};function qn(e){return Q(e)?`live`:$(e)?`down`:`ok`}function Jn(e){return Q(e)?`in flight`:$(e)?`failed with ${e.status}`:`succeeded`}function Yn(e,t){let n=Gn(e),r=[],i=0,a=0,o=0,s=0,c=0,l=0;for(let e of n)$(e)&&(i+=1),e.ttftMs!==null&&Number.isFinite(e.ttftMs)&&r.push(e.ttftMs),a+=e.costUsd,o+=e.inputTokens,s+=e.outputTokens,c+=e.cacheReadTokens,l+=e.cacheWriteTokens;let u=t/6e4;return{requests:n.length,errors:i,errorRate:n.length===0?0:i/n.length,ratePerMin:u<=0?0:n.length/u,ttftP50:Wn(r,.5),ttftP95:Wn(r,.95),costUsd:a,inputTokens:o,outputTokens:s,cacheReadTokens:c,cacheWriteTokens:l}}function Xn(e,t){let n=Gn(e),{now:r,spanMs:i,count:a}=t,o=i/a,s=r-i,c=Array.from({length:a},(e,t)=>({at:s+t*o,total:0,errors:0,costUsd:0,tokens:0,ttftMs:null})),l=Array.from({length:a},()=>[]);for(let e of n){if(e.at<s||e.at>r)continue;let t=Math.min(a-1,Math.floor((e.at-s)/o)),n=c[t];n!==void 0&&(n.total+=1,n.costUsd+=e.costUsd,n.tokens+=e.inputTokens+e.outputTokens+e.cacheReadTokens+e.cacheWriteTokens,$(e)&&(n.errors+=1),e.ttftMs!==null&&Number.isFinite(e.ttftMs)&&l[t]?.push(e.ttftMs))}for(let[e,t]of c.entries())t.ttftMs=Wn(l[e]??[],.5);return c}var Zn={tokenRejected:`reconnect needed — provider rejected the refresh token`,expiredNoRefresh:`reconnect needed — token expired with nothing to refresh from`};function Qn(e,t,n,r=null){if(!n){let e=r===`tokenRejected`||r===`expiredNoRefresh`;return{state:e?`down`:`idle`,note:e?Zn[r]:`disabled`,consecutiveFailures:0}}let i=`ok`,a=``,o=0;for(let n of e){if(o=Math.max(o,n.consecutiveFailures),n.breakerState===`open`){i=`down`,a=`breaker open`;continue}if(n.rateLimitedUntil!==null&&n.rateLimitedUntil>t&&i!==`down`){i=`warn`,a=`rate limited`;continue}n.breakerState===`halfOpen`&&i===`ok`&&(i=`warn`,a=`probing`)}return{state:i,note:a,consecutiveFailures:o}}var $n={fiveHour:`5h`,daily:`24h`,weekly:`7d`};function er(e){return Math.max(e,6e4)*3}function tr(e,t,n){return e.observedAt<=0||t-e.observedAt>er(n)}function nr(e,t){return t?.ratePerHour===void 0||t.ratePerHour===null||e.limit===null||e.limit<=0?null:t.ratePerHour/e.limit}function rr(e,t){return e.find(e=>e.windowType===t)}function ir(e,t,n,r,i){return ar(e,{stale:tr(e,t,n),rolledOver:Bn(e,t),estimateStale:i===void 0||i.stale,survives:i?.survives??null,exhaustsAt:i?.exhaustsAt??null},t,r)}function ar(e,t,n,r){let i=$n[e.windowType];if(e.observedAt<=0)return`${i} · never observed`;if(t.stale)return`${i} · stale, read ${r(e.observedAt,n)}`;if(t.rolledOver)return`${i} · rolled over, waiting for the next reading`;if(e.resetsAt===null)return i;let a=`resets ${r(e.resetsAt,n)}`;return t.estimateStale||t.survives!==!1||t.exhaustsAt===null?`${i} · ${a}`:`${i} · ${t.exhaustsAt<=n?`empty now`:`empty ~${Dn(t.exhaustsAt-n)}`} · ${a}`}function or(e){return{observedAt:e.observedAt,windowType:e.windowType,windowMs:e.windowMs,resetsAt:e.resetsAt,usedRatio:e.limit===null||e.limit<=0?null:Math.min(1,Math.max(0,e.used/e.limit))}}function sr(e,t){if(e.usedRatio!==0||t.usedRatio!==0)return!1;let n=Rn(e.windowType,e.windowMs),r=Rn(t.windowType,t.windowMs);return n===r&&Z(e.resetsAt,e.observedAt+n)&&Z(t.resetsAt,t.observedAt+r)&&!Z(t.resetsAt,e.resetsAt)}function cr(e){let t=e.filter(e=>e.usedRatio!==null).sort((e,t)=>e.observedAt-t.observedAt),n=[],r;for(let e of t){let t={at:e.observedAt,percent:Math.min(100,e.usedRatio*100)},i={resetsAt:e.resetsAt,startsAt:e.resetsAt===null?null:e.resetsAt-Rn(e.windowType,e.windowMs)},a=n[n.length-1],o=r!==void 0&&sr(r,e);a===void 0||r===void 0||!o&&!Z(e.resetsAt,r.resetsAt)?n.push({key:`window-${n.length}`,points:[t],...i}):(a.points.push(t),a.resetsAt=o?null:i.resetsAt,a.startsAt=o?null:i.startsAt),r=e}return n}function lr(e,t){let{usedRatio:n,observedAt:r}=t;if(n===null)return[...e];let i=e.findLastIndex(e=>Z(e.resetsAt,t.resetsAt)),a=e[i];if(a===void 0)return[...e];let o=a.points[a.points.length-1];if(o===void 0||o.at>=r)return[...e];let s={at:r,percent:Math.min(100,n*100)};return e.map((e,t)=>t===i?{...e,points:[...e.points,s]}:e)}function ur(e){return e.startsAt===null||e.resetsAt===null?null:{from:{at:e.startsAt,percent:0},to:{at:e.resetsAt,percent:100}}}var dr=36e5;function fr(e,t){let{usedRatio:n,resetsAt:r,observedAt:i}=e,a=t;if(n===null||r===null||a===null||a<=0)return null;let o=Math.min(100,n*100),s=a*100,c={at:i,percent:o},l=o+s*((r-i)/dr);return l<=100?{from:c,to:{at:r,percent:l}}:{from:c,to:{at:i+(100-o)/s*dr,percent:100}}}var pr={fiveHour:0,daily:1,weekly:2};function mr(e){return e.filter(e=>e.limit!==null&&e.limit>0).map(e=>({window:e,fraction:Math.min(1,e.used/e.limit)})).sort((e,t)=>pr[e.window.windowType]-pr[t.window.windowType])}function hr(e,t){let n=new Map;for(let r of e){let e=t(r),i=n.get(e);i===void 0?n.set(e,[r]):i.push(r)}return n}var gr=ee`
2
2
  0%, 100% { opacity: 1; }
3
3
  50% { opacity: 0.28; }
4
4
  `,_r=S`
@@ -21,5 +21,6 @@ import{c as e,d as t,f as n,k as r,l as i,m as a,p as o,u as s}from"./Panel-BlNr
21
21
  font-size: 12px;
22
22
  line-height: 1;
23
23
  flex: none;
24
+ transform: translateY(-1.5px);
24
25
  ${({$state:e})=>vr[e]}
25
26
  `;function br({state:e,label:t,className:n}){return b(yr,{$state:e,className:n,role:`img`,"aria-label":t,title:t,children:Kn[e]})}export{qt as $,Be as $t,kn as A,Et as At,Dt as B,mn as Bt,Rn as C,de as Cn,Kt as Ct,Hn as D,C as Dn,vn as Dt,Vn as E,se as En,At as Et,Tn as F,Ft,Y as G,dt as Gt,ct as H,Gt as Ht,On as I,fn as It,yt as J,It as Jt,Mt as K,tn as Kt,Cn as L,un as Lt,Nn as M,zt as Mt,Dn as N,dn as Nt,Fn as O,w as On,lt as Ot,wn as P,rn as Pt,Xt as Q,Ge as Qt,Mn as R,cn as Rt,lr as S,A as Sn,Wt as St,Bn as T,oe as Tn,ht as Tt,ut as U,Ut,wt as V,vt as Vt,yn as W,Nt as Wt,pn as X,Je as Xt,bt as Y,st as Yt,Lt as Z,qe as Zt,cr as _,j as _n,Rt as _t,ur as a,Ae as an,_n as at,or as b,re as bn,gt as bt,hr as c,H as cn,gn as ct,tr as d,V as dn,pt as dt,Fe as en,Qt as et,Jn as f,xe as fn,ft,ar as g,_e as gn,an as gt,ir as h,he as hn,nn as ht,Xn as i,Me as in,Zt as it,Sn as j,Ht as jt,jn as k,mt as kt,$ as l,ye as ln,sn as lt,fr as m,M as mn,xt as mt,$n as n,ke as nn,en as nt,rr as o,je as on,hn as ot,qn as p,N as pn,jt as pt,St as q,Ct as qt,pr as r,Pe as rn,Yt as rt,Qn as s,we as sn,Ot as st,br as t,Le as tn,$t as tt,Q as u,ve as un,Pt as ut,mr as v,k as vn,on as vt,Un as w,T as wn,Tt as wt,Yn as x,ie as xn,Vt as xt,nr as y,ge as yn,Bt as yt,In as z,ln as zt};
@@ -44,6 +44,7 @@ import*as e from"react";import{jsx as t,jsxs as n}from"react/jsx-runtime";import
44
44
  display: inline-flex;
45
45
  align-items: center;
46
46
  justify-content: center;
47
+ line-height: 1;
47
48
  gap: ${({theme:e})=>e.space(1.5)};
48
49
  border: 1px solid transparent;
49
50
  border-radius: ${({theme:e})=>e.radius.control};
@@ -66,10 +67,15 @@ import*as e from"react";import{jsx as t,jsxs as n}from"react/jsx-runtime";import
66
67
  svg {
67
68
  width: 14px;
68
69
  height: 14px;
70
+ transform: translateY(-0.5px);
69
71
  }
70
72
  `,d=r(u)`
71
73
  padding: 0;
72
74
  width: ${({$size:e})=>e===`sm`?`24px`:`30px`};
75
+
76
+ svg {
77
+ transform: none;
78
+ }
73
79
  `,f=r.span`
74
80
  font-size: 10px;
75
81
  font-weight: 600;
@@ -1,4 +1,4 @@
1
- import{Ct as e,Dt as t,F as n,L as r,P as i,Ut as a,Xt as o,Yt as s,i as c,jt as l,t as u,wt as d,x as f,xt as p}from"./Lamp-CosPf-gw.js";import{C as m,D as h,E as g,O as _,S as v,T as y,_ as b,b as x,o as S,v as C}from"./Panel-BlNr9j6-.js";import*as w from"react";import{createContext as ee,createElement as T,forwardRef as te,use as ne,useCallback as re,useContext as ie,useEffect as ae,useId as oe,useMemo as se,useState as E}from"react";import{Fragment as D,jsx as O,jsxs as k}from"react/jsx-runtime";import A,{ThemeProvider as ce,createGlobalStyle as le,css as ue}from"styled-components";import{LiveProvider as de,useLive as fe}from"@omnigateway/dashboard-sdk";import*as pe from"react-dom";var me=(...e)=>e.filter((e,t,n)=>!!e&&e.trim()!==``&&n.indexOf(e)===t).join(` `).trim(),he=e=>e.replace(/([a-z0-9])([A-Z])/g,`$1-$2`).toLowerCase(),ge=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,t,n)=>n?n.toUpperCase():t.toLowerCase()),_e=e=>{let t=ge(e);return t.charAt(0).toUpperCase()+t.slice(1)},ve={xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:2,strokeLinecap:`round`,strokeLinejoin:`round`},ye=e=>{for(let t in e)if(t.startsWith(`aria-`)||t===`role`||t===`title`)return!0;return!1},be=ee({}),xe=()=>ie(be),Se=te(({color:e,size:t,strokeWidth:n,absoluteStrokeWidth:r,className:i=``,children:a,iconNode:o,...s},c)=>{let{size:l=24,strokeWidth:u=2,absoluteStrokeWidth:d=!1,color:f=`currentColor`,className:p=``}=xe()??{},m=r??d?Number(n??u)*24/Number(t??l):n??u;return T(`svg`,{ref:c,...ve,width:t??l??ve.width,height:t??l??ve.height,stroke:e??f,strokeWidth:m,className:me(`lucide`,p,i),...!a&&!ye(s)&&{"aria-hidden":`true`},...s},[...o.map(([e,t])=>T(e,t)),...Array.isArray(a)?a:[a]])}),j=(e,t)=>{let n=te(({className:n,...r},i)=>T(Se,{ref:i,iconNode:t,className:me(`lucide-${he(_e(e))}`,`lucide-${e}`,n),...r}));return n.displayName=_e(e),n},Ce=j(`activity`,[[`path`,{d:`M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2`,key:`169zse`}]]),we=j(`blocks`,[[`path`,{d:`M10 22V7a1 1 0 0 0-1-1H4a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-5a1 1 0 0 0-1-1H2`,key:`1ah6g2`}],[`rect`,{x:`14`,y:`2`,width:`8`,height:`8`,rx:`1`,key:`88lufb`}]]),Te=j(`boxes`,[[`path`,{d:`M2.97 12.92A2 2 0 0 0 2 14.63v3.24a2 2 0 0 0 .97 1.71l3 1.8a2 2 0 0 0 2.06 0L12 19v-5.5l-5-3-4.03 2.42Z`,key:`lc1i9w`}],[`path`,{d:`m7 16.5-4.74-2.85`,key:`1o9zyk`}],[`path`,{d:`m7 16.5 5-3`,key:`va8pkn`}],[`path`,{d:`M7 16.5v5.17`,key:`jnp8gn`}],[`path`,{d:`M12 13.5V19l3.97 2.38a2 2 0 0 0 2.06 0l3-1.8a2 2 0 0 0 .97-1.71v-3.24a2 2 0 0 0-.97-1.71L17 10.5l-5 3Z`,key:`8zsnat`}],[`path`,{d:`m17 16.5-5-3`,key:`8arw3v`}],[`path`,{d:`m17 16.5 4.74-2.85`,key:`8rfmw`}],[`path`,{d:`M17 16.5v5.17`,key:`k6z78m`}],[`path`,{d:`M7.97 4.42A2 2 0 0 0 7 6.13v4.37l5 3 5-3V6.13a2 2 0 0 0-.97-1.71l-3-1.8a2 2 0 0 0-2.06 0l-3 1.8Z`,key:`1xygjf`}],[`path`,{d:`M12 8 7.26 5.15`,key:`1vbdud`}],[`path`,{d:`m12 8 4.74-2.85`,key:`3rx089`}],[`path`,{d:`M12 13.5V8`,key:`1io7kd`}]]),Ee=j(`cable`,[[`path`,{d:`M17 19a1 1 0 0 1-1-1v-2a2 2 0 0 1 2-2h2a2 2 0 0 1 2 2v2a1 1 0 0 1-1 1z`,key:`trhst0`}],[`path`,{d:`M17 21v-2`,key:`ds4u3f`}],[`path`,{d:`M19 14V6.5a1 1 0 0 0-7 0v11a1 1 0 0 1-7 0V10`,key:`1mo9zo`}],[`path`,{d:`M21 21v-2`,key:`eo0ou`}],[`path`,{d:`M3 5V3`,key:`1k5hjh`}],[`path`,{d:`M4 10a2 2 0 0 1-2-2V6a1 1 0 0 1 1-1h4a1 1 0 0 1 1 1v2a2 2 0 0 1-2 2z`,key:`1dd30t`}],[`path`,{d:`M7 5V3`,key:`1t1388`}]]),De=j(`database`,[[`ellipse`,{cx:`12`,cy:`5`,rx:`9`,ry:`3`,key:`msslwz`}],[`path`,{d:`M3 5V19A9 3 0 0 0 21 19V5`,key:`1wlel7`}],[`path`,{d:`M3 12A9 3 0 0 0 21 12`,key:`mv7ke4`}]]),Oe=j(`gauge`,[[`path`,{d:`m12 14 4-4`,key:`9kzdfg`}],[`path`,{d:`M3.34 19a10 10 0 1 1 17.32 0`,key:`19p75a`}]]),ke=j(`key-round`,[[`path`,{d:`M2.586 17.414A2 2 0 0 0 2 18.828V21a1 1 0 0 0 1 1h3a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h1a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h.172a2 2 0 0 0 1.414-.586l.814-.814a6.5 6.5 0 1 0-4-4z`,key:`1s6t7t`}],[`circle`,{cx:`16.5`,cy:`7.5`,r:`.5`,fill:`currentColor`,key:`w0ekpg`}]]),Ae=j(`log-out`,[[`path`,{d:`m16 17 5-5-5-5`,key:`1bji2h`}],[`path`,{d:`M21 12H9`,key:`dn1m92`}],[`path`,{d:`M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4`,key:`1uf3rs`}]]),je=j(`monitor-cog`,[[`path`,{d:`M12 17v4`,key:`1riwvh`}],[`path`,{d:`m14.305 7.53.923-.382`,key:`1mlnsw`}],[`path`,{d:`m15.228 4.852-.923-.383`,key:`82mpwg`}],[`path`,{d:`m16.852 3.228-.383-.924`,key:`ln4sir`}],[`path`,{d:`m16.852 8.772-.383.923`,key:`1dejw0`}],[`path`,{d:`m19.148 3.228.383-.924`,key:`192kgf`}],[`path`,{d:`m19.53 9.696-.382-.924`,key:`fiavlr`}],[`path`,{d:`m20.772 4.852.924-.383`,key:`1j8mgp`}],[`path`,{d:`m20.772 7.148.924.383`,key:`zix9be`}],[`path`,{d:`M22 13v2a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h7`,key:`1tnzv8`}],[`path`,{d:`M8 21h8`,key:`1ev6f3`}],[`circle`,{cx:`18`,cy:`6`,r:`3`,key:`1h7g24`}]]),Me=j(`moon`,[[`path`,{d:`M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401`,key:`kfwtm`}]]),Ne=j(`power`,[[`path`,{d:`M12 2v10`,key:`mnfbl`}],[`path`,{d:`M18.4 6.6a9 9 0 1 1-12.77.04`,key:`obofu9`}]]),Pe=j(`rotate-cw`,[[`path`,{d:`M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8`,key:`1p45f6`}],[`path`,{d:`M21 3v5h-5`,key:`1q7to0`}]]),Fe=j(`scroll-text`,[[`path`,{d:`M15 12h-5`,key:`r7krc0`}],[`path`,{d:`M15 8h-5`,key:`1khuty`}],[`path`,{d:`M19 17V5a2 2 0 0 0-2-2H4`,key:`zz82l3`}],[`path`,{d:`M8 21h12a2 2 0 0 0 2-2v-1a1 1 0 0 0-1-1H11a1 1 0 0 0-1 1v1a2 2 0 1 1-4 0V5a2 2 0 1 0-4 0v2a1 1 0 0 0 1 1h3`,key:`1ph1d7`}]]),Ie=j(`sliders-horizontal`,[[`path`,{d:`M10 5H3`,key:`1qgfaw`}],[`path`,{d:`M12 19H3`,key:`yhmn1j`}],[`path`,{d:`M14 3v4`,key:`1sua03`}],[`path`,{d:`M16 17v4`,key:`1q0r14`}],[`path`,{d:`M21 12h-9`,key:`1o4lsq`}],[`path`,{d:`M21 19h-5`,key:`1rlt1p`}],[`path`,{d:`M21 5h-7`,key:`1oszz2`}],[`path`,{d:`M8 10v4`,key:`tgpxqk`}],[`path`,{d:`M8 12H3`,key:`a7s4jb`}]]),Le=j(`sun`,[[`circle`,{cx:`12`,cy:`12`,r:`4`,key:`4exip2`}],[`path`,{d:`M12 2v2`,key:`tus03m`}],[`path`,{d:`M12 20v2`,key:`1lh1kg`}],[`path`,{d:`m4.93 4.93 1.41 1.41`,key:`149t6j`}],[`path`,{d:`m17.66 17.66 1.41 1.41`,key:`ptbguv`}],[`path`,{d:`M2 12h2`,key:`1t8f8n`}],[`path`,{d:`M20 12h2`,key:`1q8mjw`}],[`path`,{d:`m6.34 17.66-1.41 1.41`,key:`1m8zz5`}],[`path`,{d:`m19.07 4.93-1.41 1.41`,key:`1shlcs`}]]),Re=j(`terminal`,[[`path`,{d:`M12 19h8`,key:`baeox8`}],[`path`,{d:`m4 17 6-6-6-6`,key:`1yngyt`}]]),ze=j(`x`,[[`path`,{d:`M18 6 6 18`,key:`1bl5f8`}],[`path`,{d:`m6 6 12 12`,key:`d8bk6v`}]]);function Be(e,t){return e.flatMap(({id:e,colour:n})=>{let r=n?.[t];return typeof r==`string`?[`--p-${e}: ${r};`]:[]}).join(`
1
+ import{Ct as e,Dt as t,F as n,L as r,P as i,Ut as a,Xt as o,Yt as s,i as c,jt as l,t as u,wt as d,x as f,xt as p}from"./Lamp-lkkWBrFM.js";import{C as m,D as h,E as g,O as _,S as v,T as y,_ as b,b as x,o as S,v as C}from"./Panel-CWmOTDAP.js";import*as w from"react";import{createContext as ee,createElement as T,forwardRef as te,use as ne,useCallback as re,useContext as ie,useEffect as ae,useId as oe,useMemo as se,useState as E}from"react";import{Fragment as D,jsx as O,jsxs as k}from"react/jsx-runtime";import A,{ThemeProvider as ce,createGlobalStyle as le,css as ue}from"styled-components";import{LiveProvider as de,useLive as fe}from"@omnigateway/dashboard-sdk";import*as pe from"react-dom";var me=(...e)=>e.filter((e,t,n)=>!!e&&e.trim()!==``&&n.indexOf(e)===t).join(` `).trim(),he=e=>e.replace(/([a-z0-9])([A-Z])/g,`$1-$2`).toLowerCase(),ge=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,t,n)=>n?n.toUpperCase():t.toLowerCase()),_e=e=>{let t=ge(e);return t.charAt(0).toUpperCase()+t.slice(1)},ve={xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:2,strokeLinecap:`round`,strokeLinejoin:`round`},ye=e=>{for(let t in e)if(t.startsWith(`aria-`)||t===`role`||t===`title`)return!0;return!1},be=ee({}),xe=()=>ie(be),Se=te(({color:e,size:t,strokeWidth:n,absoluteStrokeWidth:r,className:i=``,children:a,iconNode:o,...s},c)=>{let{size:l=24,strokeWidth:u=2,absoluteStrokeWidth:d=!1,color:f=`currentColor`,className:p=``}=xe()??{},m=r??d?Number(n??u)*24/Number(t??l):n??u;return T(`svg`,{ref:c,...ve,width:t??l??ve.width,height:t??l??ve.height,stroke:e??f,strokeWidth:m,className:me(`lucide`,p,i),...!a&&!ye(s)&&{"aria-hidden":`true`},...s},[...o.map(([e,t])=>T(e,t)),...Array.isArray(a)?a:[a]])}),j=(e,t)=>{let n=te(({className:n,...r},i)=>T(Se,{ref:i,iconNode:t,className:me(`lucide-${he(_e(e))}`,`lucide-${e}`,n),...r}));return n.displayName=_e(e),n},Ce=j(`activity`,[[`path`,{d:`M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2`,key:`169zse`}]]),we=j(`blocks`,[[`path`,{d:`M10 22V7a1 1 0 0 0-1-1H4a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-5a1 1 0 0 0-1-1H2`,key:`1ah6g2`}],[`rect`,{x:`14`,y:`2`,width:`8`,height:`8`,rx:`1`,key:`88lufb`}]]),Te=j(`boxes`,[[`path`,{d:`M2.97 12.92A2 2 0 0 0 2 14.63v3.24a2 2 0 0 0 .97 1.71l3 1.8a2 2 0 0 0 2.06 0L12 19v-5.5l-5-3-4.03 2.42Z`,key:`lc1i9w`}],[`path`,{d:`m7 16.5-4.74-2.85`,key:`1o9zyk`}],[`path`,{d:`m7 16.5 5-3`,key:`va8pkn`}],[`path`,{d:`M7 16.5v5.17`,key:`jnp8gn`}],[`path`,{d:`M12 13.5V19l3.97 2.38a2 2 0 0 0 2.06 0l3-1.8a2 2 0 0 0 .97-1.71v-3.24a2 2 0 0 0-.97-1.71L17 10.5l-5 3Z`,key:`8zsnat`}],[`path`,{d:`m17 16.5-5-3`,key:`8arw3v`}],[`path`,{d:`m17 16.5 4.74-2.85`,key:`8rfmw`}],[`path`,{d:`M17 16.5v5.17`,key:`k6z78m`}],[`path`,{d:`M7.97 4.42A2 2 0 0 0 7 6.13v4.37l5 3 5-3V6.13a2 2 0 0 0-.97-1.71l-3-1.8a2 2 0 0 0-2.06 0l-3 1.8Z`,key:`1xygjf`}],[`path`,{d:`M12 8 7.26 5.15`,key:`1vbdud`}],[`path`,{d:`m12 8 4.74-2.85`,key:`3rx089`}],[`path`,{d:`M12 13.5V8`,key:`1io7kd`}]]),Ee=j(`cable`,[[`path`,{d:`M17 19a1 1 0 0 1-1-1v-2a2 2 0 0 1 2-2h2a2 2 0 0 1 2 2v2a1 1 0 0 1-1 1z`,key:`trhst0`}],[`path`,{d:`M17 21v-2`,key:`ds4u3f`}],[`path`,{d:`M19 14V6.5a1 1 0 0 0-7 0v11a1 1 0 0 1-7 0V10`,key:`1mo9zo`}],[`path`,{d:`M21 21v-2`,key:`eo0ou`}],[`path`,{d:`M3 5V3`,key:`1k5hjh`}],[`path`,{d:`M4 10a2 2 0 0 1-2-2V6a1 1 0 0 1 1-1h4a1 1 0 0 1 1 1v2a2 2 0 0 1-2 2z`,key:`1dd30t`}],[`path`,{d:`M7 5V3`,key:`1t1388`}]]),De=j(`database`,[[`ellipse`,{cx:`12`,cy:`5`,rx:`9`,ry:`3`,key:`msslwz`}],[`path`,{d:`M3 5V19A9 3 0 0 0 21 19V5`,key:`1wlel7`}],[`path`,{d:`M3 12A9 3 0 0 0 21 12`,key:`mv7ke4`}]]),Oe=j(`gauge`,[[`path`,{d:`m12 14 4-4`,key:`9kzdfg`}],[`path`,{d:`M3.34 19a10 10 0 1 1 17.32 0`,key:`19p75a`}]]),ke=j(`key-round`,[[`path`,{d:`M2.586 17.414A2 2 0 0 0 2 18.828V21a1 1 0 0 0 1 1h3a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h1a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h.172a2 2 0 0 0 1.414-.586l.814-.814a6.5 6.5 0 1 0-4-4z`,key:`1s6t7t`}],[`circle`,{cx:`16.5`,cy:`7.5`,r:`.5`,fill:`currentColor`,key:`w0ekpg`}]]),Ae=j(`log-out`,[[`path`,{d:`m16 17 5-5-5-5`,key:`1bji2h`}],[`path`,{d:`M21 12H9`,key:`dn1m92`}],[`path`,{d:`M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4`,key:`1uf3rs`}]]),je=j(`monitor-cog`,[[`path`,{d:`M12 17v4`,key:`1riwvh`}],[`path`,{d:`m14.305 7.53.923-.382`,key:`1mlnsw`}],[`path`,{d:`m15.228 4.852-.923-.383`,key:`82mpwg`}],[`path`,{d:`m16.852 3.228-.383-.924`,key:`ln4sir`}],[`path`,{d:`m16.852 8.772-.383.923`,key:`1dejw0`}],[`path`,{d:`m19.148 3.228.383-.924`,key:`192kgf`}],[`path`,{d:`m19.53 9.696-.382-.924`,key:`fiavlr`}],[`path`,{d:`m20.772 4.852.924-.383`,key:`1j8mgp`}],[`path`,{d:`m20.772 7.148.924.383`,key:`zix9be`}],[`path`,{d:`M22 13v2a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h7`,key:`1tnzv8`}],[`path`,{d:`M8 21h8`,key:`1ev6f3`}],[`circle`,{cx:`18`,cy:`6`,r:`3`,key:`1h7g24`}]]),Me=j(`moon`,[[`path`,{d:`M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401`,key:`kfwtm`}]]),Ne=j(`power`,[[`path`,{d:`M12 2v10`,key:`mnfbl`}],[`path`,{d:`M18.4 6.6a9 9 0 1 1-12.77.04`,key:`obofu9`}]]),Pe=j(`rotate-cw`,[[`path`,{d:`M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8`,key:`1p45f6`}],[`path`,{d:`M21 3v5h-5`,key:`1q7to0`}]]),Fe=j(`scroll-text`,[[`path`,{d:`M15 12h-5`,key:`r7krc0`}],[`path`,{d:`M15 8h-5`,key:`1khuty`}],[`path`,{d:`M19 17V5a2 2 0 0 0-2-2H4`,key:`zz82l3`}],[`path`,{d:`M8 21h12a2 2 0 0 0 2-2v-1a1 1 0 0 0-1-1H11a1 1 0 0 0-1 1v1a2 2 0 1 1-4 0V5a2 2 0 1 0-4 0v2a1 1 0 0 0 1 1h3`,key:`1ph1d7`}]]),Ie=j(`sliders-horizontal`,[[`path`,{d:`M10 5H3`,key:`1qgfaw`}],[`path`,{d:`M12 19H3`,key:`yhmn1j`}],[`path`,{d:`M14 3v4`,key:`1sua03`}],[`path`,{d:`M16 17v4`,key:`1q0r14`}],[`path`,{d:`M21 12h-9`,key:`1o4lsq`}],[`path`,{d:`M21 19h-5`,key:`1rlt1p`}],[`path`,{d:`M21 5h-7`,key:`1oszz2`}],[`path`,{d:`M8 10v4`,key:`tgpxqk`}],[`path`,{d:`M8 12H3`,key:`a7s4jb`}]]),Le=j(`sun`,[[`circle`,{cx:`12`,cy:`12`,r:`4`,key:`4exip2`}],[`path`,{d:`M12 2v2`,key:`tus03m`}],[`path`,{d:`M12 20v2`,key:`1lh1kg`}],[`path`,{d:`m4.93 4.93 1.41 1.41`,key:`149t6j`}],[`path`,{d:`m17.66 17.66 1.41 1.41`,key:`ptbguv`}],[`path`,{d:`M2 12h2`,key:`1t8f8n`}],[`path`,{d:`M20 12h2`,key:`1q8mjw`}],[`path`,{d:`m6.34 17.66-1.41 1.41`,key:`1m8zz5`}],[`path`,{d:`m19.07 4.93-1.41 1.41`,key:`1shlcs`}]]),Re=j(`terminal`,[[`path`,{d:`M12 19h8`,key:`baeox8`}],[`path`,{d:`m4 17 6-6-6-6`,key:`1yngyt`}]]),ze=j(`x`,[[`path`,{d:`M18 6 6 18`,key:`1bl5f8`}],[`path`,{d:`m6 6 12 12`,key:`d8bk6v`}]]);function Be(e,t){return e.flatMap(({id:e,colour:n})=>{let r=n?.[t];return typeof r==`string`?[`--p-${e}: ${r};`]:[]}).join(`
2
2
  `)}var Ve=le`
3
3
  :root {
4
4
  ${({$providers:e})=>Be(e,`light`)}
@@ -107,6 +107,11 @@ import{Ct as e,Dt as t,F as n,L as r,P as i,Ut as a,Xt as o,Yt as s,i as c,jt as
107
107
  color: inherit;
108
108
  }
109
109
 
110
+ svg {
111
+ display: block;
112
+ flex-shrink: 0;
113
+ }
114
+
110
115
  a {
111
116
  color: inherit;
112
117
  text-decoration: none;
@@ -168,7 +173,7 @@ import{Ct as e,Dt as t,F as n,L as r,P as i,Ut as a,Xt as o,Yt as s,i as c,jt as
168
173
  z-index: ${({theme:e})=>e.z.chassis};
169
174
  `,at=A.div`
170
175
  display: flex;
171
- align-items: baseline;
176
+ align-items: center;
172
177
  gap: 7px;
173
178
  font-stretch: 74%;
174
179
  font-weight: 700;
@@ -365,6 +370,7 @@ import{Ct as e,Dt as t,F as n,L as r,P as i,Ut as a,Xt as o,Yt as s,i as c,jt as
365
370
  `,ma=ue`
366
371
  display: flex;
367
372
  align-items: center;
373
+ line-height: 1;
368
374
  gap: ${({theme:e})=>e.space(2)};
369
375
  padding: 7px ${({theme:e})=>e.space(2)};
370
376
  border-radius: ${({theme:e})=>e.radius.control};
@@ -381,6 +387,7 @@ import{Ct as e,Dt as t,F as n,L as r,P as i,Ut as a,Xt as o,Yt as s,i as c,jt as
381
387
  width: 15px;
382
388
  height: 15px;
383
389
  flex: none;
390
+ transform: translateY(-1px);
384
391
  }
385
392
  `,ha=A(s)`
386
393
  ${ma}
@@ -1,4 +1,4 @@
1
- import{_ as e}from"./Panel-BlNr9j6-.js";import{jsx as t,jsxs as n}from"react/jsx-runtime";import r from"styled-components";var i=r.div`
1
+ import{_ as e}from"./Panel-CWmOTDAP.js";import{jsx as t,jsxs as n}from"react/jsx-runtime";import r from"styled-components";var i=r.div`
2
2
  display: flex;
3
3
  flex-direction: column;
4
4
  gap: 6px;
@@ -1,4 +1,4 @@
1
- import{A as e,L as t,M as n,N as r,P as i,f as a,j as o,l as s,p as c,t as l,u,z as d}from"./Lamp-CosPf-gw.js";import{C as f,_ as p,b as m,v as h,w as g}from"./Panel-BlNr9j6-.js";import{n as _,r as v,t as y}from"./TokenBreakdown-VV2U0Fgv.js";import{n as b,t as x}from"./Chip-BBNaA-sL.js";import{i as S,n as C,r as w,t as T}from"./Table-CVDZ69Zx.js";import{useEffect as E,useState as D}from"react";import{Fragment as O,jsx as k,jsxs as A}from"react/jsx-runtime";import j from"styled-components";function M(e){let[t,n]=D(Date.now);return E(()=>{if(!e)return;n(Date.now());let t=window.setInterval(()=>n(Date.now()),1e3);return()=>window.clearInterval(t)},[e]),t}function N(e,t,n){if(t.length===0||e.requestedModel.toLowerCase().includes(t)||(e.resolvedModel??``).toLowerCase().includes(t)||(e.errorCode??``).toLowerCase().includes(t))return!0;if(n===void 0)return!1;let r=e.credentialId==null?``:n.accounts.get(e.credentialId)??``,i=e.apiKeyId==null?``:n.keys.get(e.apiKeyId)??e.apiKeyId;return r.toLowerCase().includes(t)||i.toLowerCase().includes(t)}function P(e,t,n,r){let i=n.trim().toLowerCase();return e.filter(e=>(t!==`failed`||s(e))&&N(e,i,r))}function F({log:e}){return k(C,{$align:`right`,$mono:!0,...u(e)?{"aria-label":`processing`}:{title:v(e)},children:u(e)?k(y,{}):k(_,{tokens:e})})}function I({rows:o,now:s,names:f,onOpen:_}){return A(T,{children:[k(`thead`,{children:A(`tr`,{children:[k(w,{}),k(w,{$align:`right`,children:`Time`}),k(w,{children:`Requested`}),k(w,{children:`Routed to`}),f===void 0?null:A(O,{children:[k(w,{children:`Account`}),k(w,{children:`Key`})]}),k(w,{$align:`right`,children:`Try`}),k(w,{$align:`right`,children:`TTFT`}),k(w,{$align:`right`,children:`Total`}),k(w,{$align:`right`,children:`Tokens`}),k(w,{$align:`right`,children:`Cost`}),k(w,{children:`Outcome`})]})}),k(`tbody`,{children:o.map(o=>A(S,{$selectable:!0,onClick:()=>_(o),children:[k(C,{children:k(l,{state:c(o),label:a(o)})}),k(C,{$align:`right`,$mono:!0,title:n(o.at),children:e(o.at)}),k(C,{$mono:!0,children:k(g,{style:{display:`block`,maxWidth:`20ch`},children:o.requestedModel||`—`})}),k(C,{children:o.resolvedProvider===null?k(p,{children:u(o)?`routing…`:`not routed`}):A(m,{$gap:1,children:[k(b,{provider:o.resolvedProvider}),k(h,{$dim:!0,children:o.resolvedModel??`—`})]})}),f===void 0?null:A(O,{children:[k(C,{children:k(g,{style:{display:`block`,maxWidth:`18ch`},children:o.credentialId==null?`—`:f.accounts.get(o.credentialId)??d(o.credentialId)})}),k(C,{children:k(g,{style:{display:`block`,maxWidth:`16ch`},title:o.apiKeyId??void 0,children:o.apiKeyId==null?`—`:f.keys.get(o.apiKeyId)??d(o.apiKeyId)})})]}),k(C,{$align:`right`,$mono:!0,children:u(o)?`—`:o.attempts}),k(C,{$align:`right`,$mono:!0,children:u(o)?`—`:i(o.ttftMs)}),k(C,{$align:`right`,$mono:!0,children:u(o)?r(Math.max(0,s-o.at)):i(o.durationMs)}),k(F,{log:o}),k(C,{$align:`right`,$mono:!0,children:u(o)?`—`:t(o.costUsd)}),k(C,{children:u(o)?k(x,{$tone:`accent`,children:`live`}):o.errorCode===null?k(x,{$tone:`ok`,children:o.status}):k(x,{$tone:`down`,children:o.errorCode})})]},o.id))})]})}var L=j.dl`
1
+ import{A as e,L as t,M as n,N as r,P as i,f as a,j as o,l as s,p as c,t as l,u,z as d}from"./Lamp-lkkWBrFM.js";import{C as f,_ as p,b as m,v as h,w as g}from"./Panel-CWmOTDAP.js";import{n as _,r as v,t as y}from"./TokenBreakdown-DQuX2IKR.js";import{n as b,t as x}from"./Chip-iJNHhgJ6.js";import{i as S,n as C,r as w,t as T}from"./Table-CVDZ69Zx.js";import{useEffect as E,useState as D}from"react";import{Fragment as O,jsx as k,jsxs as A}from"react/jsx-runtime";import j from"styled-components";function M(e){let[t,n]=D(Date.now);return E(()=>{if(!e)return;n(Date.now());let t=window.setInterval(()=>n(Date.now()),1e3);return()=>window.clearInterval(t)},[e]),t}function N(e,t,n){if(t.length===0||e.requestedModel.toLowerCase().includes(t)||(e.resolvedModel??``).toLowerCase().includes(t)||(e.errorCode??``).toLowerCase().includes(t))return!0;if(n===void 0)return!1;let r=e.credentialId==null?``:n.accounts.get(e.credentialId)??``,i=e.apiKeyId==null?``:n.keys.get(e.apiKeyId)??e.apiKeyId;return r.toLowerCase().includes(t)||i.toLowerCase().includes(t)}function P(e,t,n,r){let i=n.trim().toLowerCase();return e.filter(e=>(t!==`failed`||s(e))&&N(e,i,r))}function F({log:e}){return k(C,{$align:`right`,$mono:!0,...u(e)?{"aria-label":`processing`}:{title:v(e)},children:u(e)?k(y,{}):k(_,{tokens:e})})}function I({rows:o,now:s,names:f,onOpen:_}){return A(T,{children:[k(`thead`,{children:A(`tr`,{children:[k(w,{}),k(w,{$align:`right`,children:`Time`}),k(w,{children:`Requested`}),k(w,{children:`Routed to`}),f===void 0?null:A(O,{children:[k(w,{children:`Account`}),k(w,{children:`Key`})]}),k(w,{$align:`right`,children:`Try`}),k(w,{$align:`right`,children:`TTFT`}),k(w,{$align:`right`,children:`Total`}),k(w,{$align:`right`,children:`Tokens`}),k(w,{$align:`right`,children:`Cost`}),k(w,{children:`Outcome`})]})}),k(`tbody`,{children:o.map(o=>A(S,{$selectable:!0,onClick:()=>_(o),children:[k(C,{children:k(l,{state:c(o),label:a(o)})}),k(C,{$align:`right`,$mono:!0,title:n(o.at),children:e(o.at)}),k(C,{$mono:!0,children:k(g,{style:{display:`block`,maxWidth:`20ch`},children:o.requestedModel||`—`})}),k(C,{children:o.resolvedProvider===null?k(p,{children:u(o)?`routing…`:`not routed`}):A(m,{$gap:1,children:[k(b,{provider:o.resolvedProvider}),k(h,{$dim:!0,children:o.resolvedModel??`—`})]})}),f===void 0?null:A(O,{children:[k(C,{children:k(g,{style:{display:`block`,maxWidth:`18ch`},children:o.credentialId==null?`—`:f.accounts.get(o.credentialId)??d(o.credentialId)})}),k(C,{children:k(g,{style:{display:`block`,maxWidth:`16ch`},title:o.apiKeyId??void 0,children:o.apiKeyId==null?`—`:f.keys.get(o.apiKeyId)??d(o.apiKeyId)})})]}),k(C,{$align:`right`,$mono:!0,children:u(o)?`—`:o.attempts}),k(C,{$align:`right`,$mono:!0,children:u(o)?`—`:i(o.ttftMs)}),k(C,{$align:`right`,$mono:!0,children:u(o)?r(Math.max(0,s-o.at)):i(o.durationMs)}),k(F,{log:o}),k(C,{$align:`right`,$mono:!0,children:u(o)?`—`:t(o.costUsd)}),k(C,{children:u(o)?k(x,{$tone:`accent`,children:`live`}):o.errorCode===null?k(x,{$tone:`ok`,children:o.status}):k(x,{$tone:`down`,children:o.errorCode})})]},o.id))})]})}var L=j.dl`
2
2
  display: grid;
3
3
  grid-template-columns: minmax(120px, auto) minmax(0, 1fr);
4
4
  gap: 6px ${({theme:e})=>e.space(3)};
@@ -1,4 +1,4 @@
1
- import{S as e,h as t,x as n}from"./shared-5YRtk6PC.js";import{F as r,L as i,P as a,j as o}from"./Lamp-CosPf-gw.js";import{D as s,a as c,b as l,i as u,r as d,t as f}from"./Panel-BlNr9j6-.js";import{f as p}from"./Rack-BGrdPQRN.js";import{t as m}from"./Readout-D8Ofl3Gz.js";import{jsx as h,jsxs as g}from"react/jsx-runtime";import _ from"styled-components";function v({legend:e,meta:t,actions:n,footer:r,query:i,failure:a,empty:o,isEmpty:s,children:l}){return h(f,{legend:e,...t===void 0?{}:{meta:t},...n===void 0?{}:{actions:n},...r===void 0?{}:{footer:r},children:i.isError?h(u,{...a===void 0?{}:{legend:a},error:i.error,onRetry:i.refetch}):i.isLoading?h(c,{rows:4}):s?h(d,{legend:o.legend,message:o.message}):l})}var y=_(s)`
1
+ import{S as e,h as t,x as n}from"./shared-CNTPQfFU.js";import{F as r,L as i,P as a,j as o}from"./Lamp-lkkWBrFM.js";import{D as s,a as c,b as l,i as u,r as d,t as f}from"./Panel-CWmOTDAP.js";import{f as p}from"./Rack-B4L2xB7-.js";import{t as m}from"./Readout-BTh732hP.js";import{jsx as h,jsxs as g}from"react/jsx-runtime";import _ from"styled-components";function v({legend:e,meta:t,actions:n,footer:r,query:i,failure:a,empty:o,isEmpty:s,children:l}){return h(f,{legend:e,...t===void 0?{}:{meta:t},...n===void 0?{}:{actions:n},...r===void 0?{}:{footer:r},children:i.isError?h(u,{...a===void 0?{}:{legend:a},error:i.error,onRetry:i.refetch}):i.isLoading?h(c,{rows:4}):s?h(d,{legend:o.legend,message:o.message}):l})}var y=_(s)`
2
2
  border-color: ${({theme:e,$on:t})=>t?e.color.accent:e.color.ruleStrong};
3
3
  color: ${({theme:e,$on:t})=>t?e.color.accent:e.color.inkDim};
4
4
  background: ${({theme:e,$on:t})=>t?e.color.accentWash:e.color.panelRaised};
@@ -1,4 +1,4 @@
1
- import{a as e,c as t,l as n,o as r,s as i,u as a}from"./Rack-BGrdPQRN.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=a(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:i(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=a(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:i(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)`
1
+ import{a as e,c as t,l as n,o as r,s as i,u as a}from"./Rack-B4L2xB7-.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=a(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:i(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=a(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:i(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{j as e}from"./Lamp-CosPf-gw.js";import{b as t,y as n}from"./Rack-BGrdPQRN.js";import{jsx as r,jsxs as i}from"react/jsx-runtime";import a,{keyframes as o}from"styled-components";var s=t(`arrow-down`,[[`path`,{d:`M12 5v14`,key:`s699le`}],[`path`,{d:`m19 12-7 7-7-7`,key:`1idqje`}]]),c=t(`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`
1
+ import{j as e}from"./Lamp-lkkWBrFM.js";import{b as t,y as n}from"./Rack-B4L2xB7-.js";import{jsx as r,jsxs as i}from"react/jsx-runtime";import a,{keyframes as o}from"styled-components";var s=t(`arrow-down`,[[`path`,{d:`M12 5v14`,key:`s699le`}],[`path`,{d:`m19 12-7 7-7-7`,key:`1idqje`}]]),c=t(`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;
@@ -9,12 +9,14 @@ import{j as e}from"./Lamp-CosPf-gw.js";import{b as t,y as n}from"./Rack-BGrdPQRN
9
9
  `,f=a.span`
10
10
  display: inline-flex;
11
11
  align-items: center;
12
+ line-height: 1;
12
13
  gap: 2px;
13
14
 
14
15
  svg {
15
16
  width: 12px;
16
17
  height: 12px;
17
18
  stroke-width: 1.75;
19
+ transform: translateY(-1px);
18
20
  }
19
21
  `,p=o`
20
22
  from { clip-path: inset(0 2ch 0 0); }
@@ -1,4 +1,4 @@
1
- import{A as e,C as t,E as n,J as r,T as i,Y as a,dt as o,o as s,t as c,w as l}from"./shared-5YRtk6PC.js";import{C as u,E as d,M as f,N as p,R as m,S as h,_ as g,a as _,k as v,m as y,n as b}from"./Lamp-CosPf-gw.js";import{C as x,_ as S,b as C,v as w}from"./Panel-BlNr9j6-.js";import*as T from"react";import{forwardRef as E}from"react";import{Fragment as D,jsx as O,jsxs as k}from"react/jsx-runtime";import A from"styled-components";var j=[`axis`],M=E((e,n)=>T.createElement(t,{chartName:`LineChart`,defaultTooltipEventType:`axis`,validateTooltipEventTypes:j,tooltipPayloadSearcher:a,categoricalChartProps:e,ref:n})),N=A(C)`
1
+ import{A as e,C as t,E as n,J as r,T as i,Y as a,dt as o,o as s,t as c,w as l}from"./shared-CNTPQfFU.js";import{C as u,E as d,M as f,N as p,R as m,S as h,_ as g,a as _,k as v,m as y,n as b}from"./Lamp-lkkWBrFM.js";import{C as x,_ as S,b as C,v as w}from"./Panel-CWmOTDAP.js";import*as T from"react";import{forwardRef as E}from"react";import{Fragment as D,jsx as O,jsxs as k}from"react/jsx-runtime";import A from"styled-components";var j=[`axis`],M=E((e,n)=>T.createElement(t,{chartName:`LineChart`,defaultTooltipEventType:`axis`,validateTooltipEventTypes:j,tooltipPayloadSearcher:a,categoricalChartProps:e,ref:n})),N=A(C)`
2
2
  gap: ${({theme:e})=>e.space(5)};
3
3
  flex-wrap: wrap;
4
4
  `,P=A.div`
@@ -1 +1 @@
1
- import{i as e,k as t,t as n}from"./Panel-BlNr9j6-.js";import{jsx as r}from"react/jsx-runtime";function i({error:i}){let a=t();return r(n,{legend:`Console unavailable`,children:r(e,{legend:`The gateway did not answer`,error:i,onRetry:()=>void a.invalidate()})})}export{i as errorComponent};
1
+ import{i as e,k as t,t as n}from"./Panel-CWmOTDAP.js";import{jsx as r}from"react/jsx-runtime";function i({error:i}){let a=t();return r(n,{legend:`Console unavailable`,children:r(e,{legend:`The gateway did not answer`,error:i,onRetry:()=>void a.invalidate()})})}export{i as errorComponent};
@@ -1,4 +1,4 @@
1
- import{F as e,I as t,Kt as n,Ot as r,T as i,Tt as a,U as o,Vt as s,W as c,at as l,b as u,c as d,ct as f,d as p,dt as ee,ft as m,h as te,ht as h,j as g,kt as _,n as v,o as y,ot as b,s as x,t as S,v as C,y as w}from"./Lamp-CosPf-gw.js";import{C as T,D as E,O as D,_ as O,a as k,b as A,i as j,o as M,r as ne,t as N,v as P,x as re}from"./Panel-BlNr9j6-.js";import{_ as F,b as I,i as ie,m as L,r as R,t as z}from"./Rack-BGrdPQRN.js";import{t as B}from"./CopyValue-DQMqneTT.js";import{n as V,t as H}from"./chevron-right-CL2vJUko.js";import{t as ae}from"./plus-C3pkG04C.js";import{t as oe}from"./trash-2-CLOg_lJ7.js";import{t as se}from"./Toggle-ZS3zIMNF.js";import{t as ce}from"./Chip-BBNaA-sL.js";import{i as U,n as W,r as le,t as G}from"./Field-DcNu4yw-.js";import{t as ue}from"./Meter-stpt3vQu.js";import{i as de,n as K,r as q,t as fe}from"./Table-CVDZ69Zx.js";import{n as pe,r as me,t as he}from"./WindowChart-eqPzFE06.js";import{Fragment as ge,useCallback as J,useEffect as _e,useState as Y}from"react";import{Fragment as X,jsx as Z,jsxs as Q}from"react/jsx-runtime";import $ from"styled-components";var ve=I(`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`}]]);function ye(e){return e?.authTypes??[]}function be(e){return ye(e).includes(`oauth`)?`oauth`:`apiKey`}function xe(e){return e[0]?.id??`anthropic`}var Se={oauth:`Authorize in the browser`,apiKey:`Paste an API key`};function Ce(e){let t=e?.callback;return t===void 0?`code#state`:`${t.uri}?code=…`}var we=$.ol`
1
+ import{F as e,I as t,Kt as n,Ot as r,T as i,Tt as a,U as o,Vt as s,W as c,at as l,b as u,c as d,ct as f,d as p,dt as ee,ft as m,h as te,ht as h,j as g,kt as _,n as v,o as y,ot as b,s as x,t as S,v as C,y as w}from"./Lamp-lkkWBrFM.js";import{C as T,D as E,O as D,_ as O,a as k,b as A,i as j,o as M,r as ne,t as N,v as P,x as re}from"./Panel-CWmOTDAP.js";import{_ as F,b as I,i as ie,m as L,r as R,t as z}from"./Rack-B4L2xB7-.js";import{t as B}from"./CopyValue-kMuDjb96.js";import{n as V,t as H}from"./chevron-right-f-3aPVhf.js";import{t as ae}from"./plus-DLJ5ZcBJ.js";import{t as oe}from"./trash-2-C937U0RF.js";import{t as se}from"./Toggle-DAjywMl5.js";import{t as ce}from"./Chip-iJNHhgJ6.js";import{i as U,n as W,r as le,t as G}from"./Field-BYBri2NV.js";import{t as ue}from"./Meter-stpt3vQu.js";import{i as de,n as K,r as q,t as fe}from"./Table-CVDZ69Zx.js";import{n as pe,r as me,t as he}from"./WindowChart-UHzWV_Tx.js";import{Fragment as ge,useCallback as J,useEffect as _e,useState as Y}from"react";import{Fragment as X,jsx as Z,jsxs as Q}from"react/jsx-runtime";import $ from"styled-components";var ve=I(`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`}]]);function ye(e){return e?.authTypes??[]}function be(e){return ye(e).includes(`oauth`)?`oauth`:`apiKey`}function xe(e){return e[0]?.id??`anthropic`}var Se={oauth:`Authorize in the browser`,apiKey:`Paste an API key`};function Ce(e){let t=e?.callback;return t===void 0?`code#state`:`${t.uri}?code=…`}var we=$.ol`
2
2
  display: flex;
3
3
  flex-direction: column;
4
4
  gap: ${({theme:e})=>e.space(3)};
@@ -1,4 +1,4 @@
1
- import{B as e,Et as t,j as n,st as r}from"./Lamp-CosPf-gw.js";import{a as i,b as a,i as o,r as s,t as c,y as ee}from"./Panel-BlNr9j6-.js";import{_ as l,t as u}from"./Rack-BGrdPQRN.js";import{a as d,c as f,o as p,s as m}from"./index-teScS3wF.js";import{i as h}from"./Field-DcNu4yw-.js";import{useQueryClient as g}from"@tanstack/react-query";import{useLayoutEffect as te,useMemo as _,useRef as v,useState as y}from"react";import{jsx as b,jsxs as x}from"react/jsx-runtime";import S from"styled-components";var C={debug:10,info:20,warn:30,error:40};function w(e){return typeof e==`string`&&e in C}function T(e,t){return!w(t)||e.level===null||C[e.level]>=C[t]}function E(e){if(typeof e!=`object`||!e)return null;let{raw:t,at:n,level:r,msg:i}=e;return typeof t!=`string`||n!==null&&typeof n!=`number`||r!==null&&!w(r)||i!==null&&typeof i!=`string`?null:{raw:t,at:n,level:r,msg:i}}function D(e){if(typeof e!=`object`||!e)return null;let{lines:t}=e;if(!Array.isArray(t))return null;let n=[];for(let e of t){let t=E(e);if(t===null)return null;n.push(t)}return n}var O=[100,200,500],ne=[{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`}],re=S(a)`
1
+ import{B as e,Et as t,j as n,st as r}from"./Lamp-lkkWBrFM.js";import{a as i,b as a,i as o,r as s,t as c,y as ee}from"./Panel-CWmOTDAP.js";import{_ as l,t as u}from"./Rack-B4L2xB7-.js";import{a as d,c as f,o as p,s as m}from"./index-B8HiPc8p.js";import{i as h}from"./Field-BYBri2NV.js";import{useQueryClient as g}from"@tanstack/react-query";import{useLayoutEffect as te,useMemo as _,useRef as v,useState as y}from"react";import{jsx as b,jsxs as x}from"react/jsx-runtime";import S from"styled-components";var C={debug:10,info:20,warn:30,error:40};function w(e){return typeof e==`string`&&e in C}function T(e,t){return!w(t)||e.level===null||C[e.level]>=C[t]}function E(e){if(typeof e!=`object`||!e)return null;let{raw:t,at:n,level:r,msg:i}=e;return typeof t!=`string`||n!==null&&typeof n!=`number`||r!==null&&!w(r)||i!==null&&typeof i!=`string`?null:{raw:t,at:n,level:r,msg:i}}function D(e){if(typeof e!=`object`||!e)return null;let{lines:t}=e;if(!Array.isArray(t))return null;let n=[];for(let e of t){let t=E(e);if(t===null)return null;n.push(t)}return n}var O=[100,200,500],ne=[{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`}],re=S(a)`
2
2
  gap: ${({theme:e})=>e.space(2)};
3
3
  flex-wrap: wrap;
4
4
  `,k=S(h)`
@@ -1,4 +1,4 @@
1
- import{F as e,Ft as t,Jt as n,K as r,M as i,Mt as a,O as o,P as s,Wt as c,Z as l,_t as u,j as d,pt as f,ut as p,yt as m}from"./Lamp-CosPf-gw.js";import{C as h,D as g,_,a as v,b as y,g as b,i as x,o as S,r as ee,t as C,w,x as T}from"./Panel-BlNr9j6-.js";import{b as E,r as D,t as O}from"./Rack-BGrdPQRN.js";import{t as k}from"./trash-2-CLOg_lJ7.js";import{r as A,t as j}from"./Field-DcNu4yw-.js";import{t as M}from"./Meter-stpt3vQu.js";import{i as N,n as P,r as F,t as I}from"./Table-CVDZ69Zx.js";import{t as L}from"./Readout-D8Ofl3Gz.js";import{n as R}from"./reasons-Du1OBWAM.js";import{useQueryClient as z}from"@tanstack/react-query";import{useCallback as B,useState as V}from"react";import{Fragment as H,jsx as U,jsxs as W}from"react/jsx-runtime";import G from"styled-components";var K=E(`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`}]]),q=E(`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`}]]),J=[{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}],Y=G.p`
1
+ import{F as e,Ft as t,Jt as n,K as r,M as i,Mt as a,O as o,P as s,Wt as c,Z as l,_t as u,j as d,pt as f,ut as p,yt as m}from"./Lamp-lkkWBrFM.js";import{C as h,D as g,_,a as v,b as y,g as b,i as x,o as S,r as ee,t as C,w,x as T}from"./Panel-CWmOTDAP.js";import{b as E,r as D,t as O}from"./Rack-B4L2xB7-.js";import{t as k}from"./trash-2-C937U0RF.js";import{r as A,t as j}from"./Field-BYBri2NV.js";import{t as M}from"./Meter-stpt3vQu.js";import{i as N,n as P,r as F,t as I}from"./Table-CVDZ69Zx.js";import{t as L}from"./Readout-BTh732hP.js";import{n as R}from"./reasons-Du1OBWAM.js";import{useQueryClient as z}from"@tanstack/react-query";import{useCallback as B,useState as V}from"react";import{Fragment as H,jsx as U,jsxs as W}from"react/jsx-runtime";import G from"styled-components";var K=E(`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`}]]),q=E(`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`}]]),J=[{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}],Y=G.p`
2
2
  font-size: 12px;
3
3
  color: ${({theme:e})=>e.color.down};
4
4
  `,X=G.p`
@@ -1,4 +1,4 @@
1
- import{A as e,F as t,I as n,L as r,P as i,Tt as a,Vt as o,Yt as s,bt as c,c as l,dt as u,f as d,ft as f,h as p,i as m,j as h,n as g,o as _,p as v,qt as y,s as b,t as x,u as S,v as C,wt as w,x as T,z as ee}from"./Lamp-CosPf-gw.js";import{C as E,D,S as O,_ as k,b as A,g as te,i as ne,r as j,t as M,v as N,w as P,x as F}from"./Panel-BlNr9j6-.js";import{_ as re,f as I,m as L,t as ie}from"./Rack-BGrdPQRN.js";import{n as R,t as ae}from"./TokenBreakdown-VV2U0Fgv.js";import{n as oe,t as z}from"./Chip-BBNaA-sL.js";import{t as B}from"./Meter-stpt3vQu.js";import{i as V,n as H,r as U,t as W}from"./Table-CVDZ69Zx.js";import{t as G}from"./Readout-D8Ofl3Gz.js";import{useMemo as K}from"react";import{Fragment as q,jsx as J,jsxs as Y}from"react/jsx-runtime";import X from"styled-components";var se=X(P)`
1
+ import{A as e,F as t,I as n,L as r,P as i,Tt as a,Vt as o,Yt as s,bt as c,c as l,dt as u,f as d,ft as f,h as p,i as m,j as h,n as g,o as _,p as v,qt as y,s as b,t as x,u as S,v as C,wt as w,x as T,z as ee}from"./Lamp-lkkWBrFM.js";import{C as E,D,S as O,_ as k,b as A,g as te,i as ne,r as j,t as M,v as N,w as P,x as F}from"./Panel-CWmOTDAP.js";import{_ as re,f as I,m as L,t as ie}from"./Rack-B4L2xB7-.js";import{n as R,t as ae}from"./TokenBreakdown-DQuX2IKR.js";import{n as oe,t as z}from"./Chip-iJNHhgJ6.js";import{t as B}from"./Meter-stpt3vQu.js";import{i as V,n as H,r as U,t as W}from"./Table-CVDZ69Zx.js";import{t as G}from"./Readout-BTh732hP.js";import{useMemo as K}from"react";import{Fragment as q,jsx as J,jsxs as Y}from"react/jsx-runtime";import X from"styled-components";var se=X(P)`
2
2
  font-weight: 500;
3
3
  display: block;
4
4
  max-width: 24ch;
@@ -1,4 +1,4 @@
1
- import{Lt as e,M as t,Nt as n,Rt as r,Tt as i,bt as a,lt as o,w as s,zt as c}from"./Lamp-CosPf-gw.js";import{C as l,D as u,O as d,_ as f,a as p,b as m,i as h,o as g,r as _,t as v,v as y,w as b,x}from"./Panel-BlNr9j6-.js";import{b as S,i as C,r as w,t as T,v as E}from"./Rack-BGrdPQRN.js";import{t as D}from"./CopyValue-DQMqneTT.js";import{n as O,t as k}from"./chevron-right-CL2vJUko.js";import{t as A}from"./plus-C3pkG04C.js";import{t as j}from"./Toggle-ZS3zIMNF.js";import{t as M}from"./Chip-BBNaA-sL.js";import{n as N,r as P,t as F}from"./Field-DcNu4yw-.js";import{t as I}from"./Meter-stpt3vQu.js";import{i as L,n as R,r as z,t as ee}from"./Table-CVDZ69Zx.js";import{Fragment as B,useState as V}from"react";import{Fragment as H,jsx as U,jsxs as W}from"react/jsx-runtime";import G from"styled-components";var te=S(`calendar-clock`,[[`path`,{d:`M16 14v2.2l1.6 1`,key:`fo4ql5`}],[`path`,{d:`M16 2v3`,key:`otl347`}],[`path`,{d:`M21 7.338V5a2 2 0 00-2-2H5a2 2 0 00-2 2v14a2 2 0 002 2h2.338`,key:`7hb8p4`}],[`path`,{d:`M3 9h5.859`,key:`numkqi`}],[`path`,{d:`M8 2v3`,key:`1ioesn`}],[`circle`,{cx:`16`,cy:`16`,r:`6`,key:`qoo3c4`}]]),ne=S(`list-checks`,[[`path`,{d:`M13 5h8`,key:`a7qcls`}],[`path`,{d:`M13 12h8`,key:`h98zly`}],[`path`,{d:`M13 19h8`,key:`c3s6r1`}],[`path`,{d:`m3 17 2 2 4-4`,key:`1jhpwq`}],[`path`,{d:`m3 7 2 2 4-4`,key:`1obspn`}]]);function K(e,t){return e.revokedAt===null?s(e,t)?`active`:`expired`:`revoked`}function re(e){if(e===null)return``;let t=new Date(e-new Date(e).getTimezoneOffset()*6e4);return Number.isNaN(t.getTime())?``:t.toISOString().slice(0,16)}function q(e){let t=e.trim();if(t.length===0)return{at:null};let n=new Date(t).getTime();return Number.isFinite(n)?{at:n}:{problem:`"${e}" is not a date`}}var ie=G.p`
1
+ import{Lt as e,M as t,Nt as n,Rt as r,Tt as i,bt as a,lt as o,w as s,zt as c}from"./Lamp-lkkWBrFM.js";import{C as l,D as u,O as d,_ as f,a as p,b as m,i as h,o as g,r as _,t as v,v as y,w as b,x}from"./Panel-CWmOTDAP.js";import{b as S,i as C,r as w,t as T,v as E}from"./Rack-B4L2xB7-.js";import{t as D}from"./CopyValue-kMuDjb96.js";import{n as O,t as k}from"./chevron-right-f-3aPVhf.js";import{t as A}from"./plus-DLJ5ZcBJ.js";import{t as j}from"./Toggle-DAjywMl5.js";import{t as M}from"./Chip-iJNHhgJ6.js";import{n as N,r as P,t as F}from"./Field-BYBri2NV.js";import{t as I}from"./Meter-stpt3vQu.js";import{i as L,n as R,r as z,t as ee}from"./Table-CVDZ69Zx.js";import{Fragment as B,useState as V}from"react";import{Fragment as H,jsx as U,jsxs as W}from"react/jsx-runtime";import G from"styled-components";var te=S(`calendar-clock`,[[`path`,{d:`M16 14v2.2l1.6 1`,key:`fo4ql5`}],[`path`,{d:`M16 2v3`,key:`otl347`}],[`path`,{d:`M21 7.338V5a2 2 0 00-2-2H5a2 2 0 00-2 2v14a2 2 0 002 2h2.338`,key:`7hb8p4`}],[`path`,{d:`M3 9h5.859`,key:`numkqi`}],[`path`,{d:`M8 2v3`,key:`1ioesn`}],[`circle`,{cx:`16`,cy:`16`,r:`6`,key:`qoo3c4`}]]),ne=S(`list-checks`,[[`path`,{d:`M13 5h8`,key:`a7qcls`}],[`path`,{d:`M13 12h8`,key:`h98zly`}],[`path`,{d:`M13 19h8`,key:`c3s6r1`}],[`path`,{d:`m3 17 2 2 4-4`,key:`1jhpwq`}],[`path`,{d:`m3 7 2 2 4-4`,key:`1obspn`}]]);function K(e,t){return e.revokedAt===null?s(e,t)?`active`:`expired`:`revoked`}function re(e){if(e===null)return``;let t=new Date(e-new Date(e).getTimezoneOffset()*6e4);return Number.isNaN(t.getTime())?``:t.toISOString().slice(0,16)}function q(e){let t=e.trim();if(t.length===0)return{at:null};let n=new Date(t).getTime();return Number.isFinite(n)?{at:n}:{problem:`"${e}" is not a date`}}var ie=G.p`
2
2
  font-size: 12px;
3
3
  color: ${({theme:e})=>e.color.down};
4
4
  `,ae=G.p`
@@ -1,4 +1,4 @@
1
- import{At as e,J as t,V as n,bt as r,ft as i,j as a,l as o,u as s,wt as c}from"./Lamp-CosPf-gw.js";import{C as l,D as u,_ as d,a as f,b as p,i as m,r as h,t as g,x as _}from"./Panel-BlNr9j6-.js";import{_ as v,i as y,t as b}from"./Rack-BGrdPQRN.js";import{t as x}from"./Chip-BBNaA-sL.js";import{i as S,n as C}from"./Field-DcNu4yw-.js";import{i as w,n as T,r as E,t as D}from"./RequestTable-B5pOnwDe.js";import{useMemo as O,useState as k}from"react";import{Fragment as A,jsx as j,jsxs as M}from"react/jsx-runtime";import N from"styled-components";var P={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.`}},F=new Intl.NumberFormat(`en-US`),I=N.p`
1
+ import{At as e,J as t,V as n,bt as r,ft as i,j as a,l as o,u as s,wt as c}from"./Lamp-lkkWBrFM.js";import{C as l,D as u,_ as d,a as f,b as p,i as m,r as h,t as g,x as _}from"./Panel-CWmOTDAP.js";import{_ as v,i as y,t as b}from"./Rack-B4L2xB7-.js";import{t as x}from"./Chip-iJNHhgJ6.js";import{i as S,n as C}from"./Field-BYBri2NV.js";import{i as w,n as T,r as E,t as D}from"./RequestTable-DSmx72OY.js";import{useMemo as O,useState as k}from"react";import{Fragment as A,jsx as j,jsxs as M}from"react/jsx-runtime";import N from"styled-components";var P={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.`}},F=new Intl.NumberFormat(`en-US`),I=N.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{D as e,Ot as t,Pt as n,Tt as r,U as i,Vt as a,ft as o,gt as s,vt as c}from"./Lamp-CosPf-gw.js";import{C as l,D as u,O as d,S as f,_ as p,a as m,b as h,i as g,o as _,r as v,t as y,v as b,w as x}from"./Panel-BlNr9j6-.js";import{b as S,m as C,r as w,t as T}from"./Rack-BGrdPQRN.js";import{t as E}from"./plus-C3pkG04C.js";import{t as D}from"./trash-2-CLOg_lJ7.js";import{t as O}from"./Toggle-ZS3zIMNF.js";import{n as ee,t as k}from"./Chip-BBNaA-sL.js";import{i as A,n as j,r as M,t as N}from"./Field-DcNu4yw-.js";import{t as P}from"./Meter-stpt3vQu.js";import{useEffect as te,useId as ne,useState as F}from"react";import{Fragment as I,jsx as L,jsxs as R}from"react/jsx-runtime";import z from"styled-components";var re=S(`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`}]]),ie=S(`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`}]]),B=[`tier`,`health`,`quota`,`cost`,`latency`,`load`],ae={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`},oe=z.li`
1
+ import{D as e,Ot as t,Pt as n,Tt as r,U as i,Vt as a,ft as o,gt as s,vt as c}from"./Lamp-lkkWBrFM.js";import{C as l,D as u,O as d,S as f,_ as p,a as m,b as h,i as g,o as _,r as v,t as y,v as b,w as x}from"./Panel-CWmOTDAP.js";import{b as S,m as C,r as w,t as T}from"./Rack-B4L2xB7-.js";import{t as E}from"./plus-DLJ5ZcBJ.js";import{t as D}from"./trash-2-C937U0RF.js";import{t as O}from"./Toggle-DAjywMl5.js";import{n as ee,t as k}from"./Chip-iJNHhgJ6.js";import{i as A,n as j,r as M,t as N}from"./Field-BYBri2NV.js";import{t as P}from"./Meter-stpt3vQu.js";import{useEffect as te,useId as ne,useState as F}from"react";import{Fragment as I,jsx as L,jsxs as R}from"react/jsx-runtime";import z from"styled-components";var re=S(`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`}]]),ie=S(`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`}]]),B=[`tier`,`health`,`quota`,`cost`,`latency`,`load`],ae={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`},oe=z.li`
2
2
  padding: ${({theme:e})=>e.space(2)} 0;
3
3
  border-bottom: 1px solid ${({theme:e})=>e.color.rule};
4
4
 
@@ -1,4 +1,4 @@
1
- import{Dt as e}from"./Lamp-CosPf-gw.js";import{t}from"./preload-helper-Dv9CFok1.js";import{C as n,a as r,c as i,d as a,f as o,i as s,l as c,r as l,t as u}from"./Panel-BlNr9j6-.js";import{t as d}from"./Rack-BGrdPQRN.js";import{t as f}from"./index-teScS3wF.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(e){let t=w.get(e);if(t!==void 0)return t;let n={get:(t,n)=>c(C(e,t),n),post:(t,n)=>a(C(e,t),n),put:(t,n)=>o(C(e,t),n),del:t=>i(C(e,t))};return w.set(e,n),n}var E=h(e=>t(()=>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`
1
+ import{Dt as e}from"./Lamp-lkkWBrFM.js";import{t}from"./preload-helper-KDDEULHo.js";import{C as n,a as r,c as i,d as a,f as o,i as s,l as c,r as l,t as u}from"./Panel-CWmOTDAP.js";import{t as d}from"./Rack-B4L2xB7-.js";import{t as f}from"./index-B8HiPc8p.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(e){let t=w.get(e);if(t!==void 0)return t;let n={get:(t,n)=>c(C(e,t),n),post:(t,n)=>a(C(e,t),n),put:(t,n)=>o(C(e,t),n),del:t=>i(C(e,t))};return w.set(e,n),n}var E=h(e=>t(()=>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`
@@ -1,4 +1,4 @@
1
- import{Bt as e,Gt as t,It as n,Tt as r,Vt as i,X as a,Y as o,q as s}from"./Lamp-CosPf-gw.js";import{C as c,D as l,S as u,_ as d,a as f,b as p,g as m,h,i as g,o as _,t as v,v as y}from"./Panel-BlNr9j6-.js";import{t as b}from"./Rack-BGrdPQRN.js";import{t as x}from"./Toggle-ZS3zIMNF.js";import{i as S,n as C,t as w}from"./Field-DcNu4yw-.js";import{t as T}from"./Meter-stpt3vQu.js";import{n as E}from"./reasons-Du1OBWAM.js";import{useEffect as ee,useId as D,useState as O}from"react";import{Fragment as te,jsx as k,jsxs as A}from"react/jsx-runtime";import j from"styled-components";var M=j.p`
1
+ import{Bt as e,Gt as t,It as n,Tt as r,Vt as i,X as a,Y as o,q as s}from"./Lamp-lkkWBrFM.js";import{C as c,D as l,S as u,_ as d,a as f,b as p,g as m,h,i as g,o as _,t as v,v as y}from"./Panel-CWmOTDAP.js";import{t as b}from"./Rack-B4L2xB7-.js";import{t as x}from"./Toggle-DAjywMl5.js";import{i as S,n as C,t as w}from"./Field-BYBri2NV.js";import{t as T}from"./Meter-stpt3vQu.js";import{n as E}from"./reasons-Du1OBWAM.js";import{useEffect as ee,useId as D,useState as O}from"react";import{Fragment as te,jsx as k,jsxs as A}from"react/jsx-runtime";import j from"styled-components";var M=j.p`
2
2
  font-size: 12px;
3
3
  color: ${({theme:e})=>e.color.inkDim};
4
4
  max-width: 62ch;