@dudousxd/nestjs-agent-dashboard 0.7.0 → 0.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/client/agent-client.d.ts +48 -0
- package/dist/client/agent-client.d.ts.map +1 -1
- package/dist/client/agent-client.js +23 -0
- package/dist/client/agent-client.js.map +1 -1
- package/dist/server/index.cjs +282 -57
- package/dist/server/index.cjs.map +1 -1
- package/dist/server/index.d.cts +28 -1
- package/dist/server/index.d.ts +28 -1
- package/dist/server/index.js +227 -2
- package/dist/server/index.js.map +1 -1
- package/dist/spa/assets/index-C42SW8IV.js +1 -0
- package/dist/spa/assets/index-DMBWMAsE.css +1 -0
- package/dist/spa/assets/index-DZVPxvtJ.js +49 -0
- package/dist/spa/assets/{preview-A3jHlGra.js → preview-DhDnTjWH.js} +1 -1
- package/dist/spa/index.html +3 -3
- package/dist/spa/preview.html +3 -3
- package/package.json +3 -3
- package/dist/spa/assets/index-BjIcXlBO.js +0 -1
- package/dist/spa/assets/index-CES4RqI4.js +0 -49
- package/dist/spa/assets/index-CVcgbps5.css +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var Ee=e=>{throw TypeError(e)};var re=(e,t,s)=>t.has(e)||Ee("Cannot "+s);var n=(e,t,s)=>(re(e,t,"read from private field"),s?s.call(e):t.get(e)),d=(e,t,s)=>t.has(e)?Ee("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,s),u=(e,t,s,r)=>(re(e,t,"write to private field"),r?r.call(e,s):t.set(e,s),s),m=(e,t,s)=>(re(e,t,"access private method"),s);var zt=(e,t,s,r)=>({set _(i){u(e,t,i,s)},get _(){return n(e,t,r)}});import{r as C,j as p,p as Ps,L as xs,D as Rs,C as Os,U as Es,W as Te,S as Ts,I as Ds,T as Fs,A as As,a as js,P as Ms,b as Is,c as Qs,R as qs,d as Ns,e as Us,M as Ls,f as _s,g as ks}from"./index-DZVPxvtJ.js";var _t=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},Pt=typeof window>"u"||"Deno"in globalThis;function B(){}function Ks(e,t){return typeof e=="function"?e(t):e}function ae(e){return typeof e=="number"&&e>=0&&e!==1/0}function Xe(e,t){return Math.max(e+(t||0)-Date.now(),0)}function Rt(e,t){return typeof e=="function"?e(t):e}function W(e,t){return typeof e=="function"?e(t):e}function De(e,t){const{type:s="all",exact:r,fetchStatus:i,predicate:a,queryKey:o,stale:c}=e;if(o){if(r){if(t.queryHash!==Se(o,t.options))return!1}else if(!Kt(t.queryKey,o))return!1}if(s!=="all"){const l=t.isActive();if(s==="active"&&!l||s==="inactive"&&l)return!1}return!(typeof c=="boolean"&&t.isStale()!==c||i&&i!==t.state.fetchStatus||a&&!a(t))}function Fe(e,t){const{exact:s,status:r,predicate:i,mutationKey:a}=e;if(a){if(!t.options.mutationKey)return!1;if(s){if(xt(t.options.mutationKey)!==xt(a))return!1}else if(!Kt(t.options.mutationKey,a))return!1}return!(r&&t.state.status!==r||i&&!i(t))}function Se(e,t){return((t==null?void 0:t.queryKeyHashFn)||xt)(e)}function xt(e){return JSON.stringify(e,(t,s)=>oe(s)?Object.keys(s).sort().reduce((r,i)=>(r[i]=s[i],r),{}):s)}function Kt(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?!Object.keys(t).some(s=>!Kt(e[s],t[s])):!1}function ts(e,t){if(e===t)return e;const s=Ae(e)&&Ae(t);if(s||oe(e)&&oe(t)){const r=s?e:Object.keys(e),i=r.length,a=s?t:Object.keys(t),o=a.length,c=s?[]:{};let l=0;for(let b=0;b<o;b++){const f=s?b:a[b];(!s&&r.includes(f)||s)&&e[f]===void 0&&t[f]===void 0?(c[f]=void 0,l++):(c[f]=ts(e[f],t[f]),c[f]===e[f]&&e[f]!==void 0&&l++)}return i===o&&l===i?e:c}return t}function Xt(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(const s in e)if(e[s]!==t[s])return!1;return!0}function Ae(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function oe(e){if(!je(e))return!1;const t=e.constructor;if(t===void 0)return!0;const s=t.prototype;return!(!je(s)||!s.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function je(e){return Object.prototype.toString.call(e)==="[object Object]"}function $s(e){return new Promise(t=>{setTimeout(t,e)})}function ue(e,t,s){return typeof s.structuralSharing=="function"?s.structuralSharing(e,t):s.structuralSharing!==!1?ts(e,t):t}function we(e){return e}function Hs(e,t,s=0){const r=[...e,t];return s&&r.length>s?r.slice(1):r}function Gs(e,t,s=0){const r=[t,...e];return s&&r.length>s?r.slice(0,-1):r}var Ce=Symbol();function es(e,t){return!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===Ce?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}var mt,ot,Et,$e,Bs=($e=class extends _t{constructor(){super();d(this,mt);d(this,ot);d(this,Et);u(this,Et,t=>{if(!Pt&&window.addEventListener){const s=()=>t();return window.addEventListener("visibilitychange",s,!1),()=>{window.removeEventListener("visibilitychange",s)}}})}onSubscribe(){n(this,ot)||this.setEventListener(n(this,Et))}onUnsubscribe(){var t;this.hasListeners()||((t=n(this,ot))==null||t.call(this),u(this,ot,void 0))}setEventListener(t){var s;u(this,Et,t),(s=n(this,ot))==null||s.call(this),u(this,ot,t(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()}))}setFocused(t){n(this,mt)!==t&&(u(this,mt,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(s=>{s(t)})}isFocused(){var t;return typeof n(this,mt)=="boolean"?n(this,mt):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},mt=new WeakMap,ot=new WeakMap,Et=new WeakMap,$e),Pe=new Bs,Tt,ut,Dt,He,Ys=(He=class extends _t{constructor(){super();d(this,Tt,!0);d(this,ut);d(this,Dt);u(this,Dt,t=>{if(!Pt&&window.addEventListener){const s=()=>t(!0),r=()=>t(!1);return window.addEventListener("online",s,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",s),window.removeEventListener("offline",r)}}})}onSubscribe(){n(this,ut)||this.setEventListener(n(this,Dt))}onUnsubscribe(){var t;this.hasListeners()||((t=n(this,ut))==null||t.call(this),u(this,ut,void 0))}setEventListener(t){var s;u(this,Dt,t),(s=n(this,ut))==null||s.call(this),u(this,ut,t(this.setOnline.bind(this)))}setOnline(t){n(this,Tt)!==t&&(u(this,Tt,t),this.listeners.forEach(r=>{r(t)}))}isOnline(){return n(this,Tt)}},Tt=new WeakMap,ut=new WeakMap,Dt=new WeakMap,He),te=new Ys;function ce(){let e,t;const s=new Promise((i,a)=>{e=i,t=a});s.status="pending",s.catch(()=>{});function r(i){Object.assign(s,i),delete s.resolve,delete s.reject}return s.resolve=i=>{r({status:"fulfilled",value:i}),e(i)},s.reject=i=>{r({status:"rejected",reason:i}),t(i)},s}function Ws(e){return Math.min(1e3*2**e,3e4)}function ss(e){return(e??"online")==="online"?te.isOnline():!0}var rs=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function ne(e){return e instanceof rs}function ns(e){let t=!1,s=0,r=!1,i;const a=ce(),o=y=>{var g;r||(v(new rs(y)),(g=e.abort)==null||g.call(e))},c=()=>{t=!0},l=()=>{t=!1},b=()=>Pe.isFocused()&&(e.networkMode==="always"||te.isOnline())&&e.canRun(),f=()=>ss(e.networkMode)&&e.canRun(),h=y=>{var g;r||(r=!0,(g=e.onSuccess)==null||g.call(e,y),i==null||i(),a.resolve(y))},v=y=>{var g;r||(r=!0,(g=e.onError)==null||g.call(e,y),i==null||i(),a.reject(y))},w=()=>new Promise(y=>{var g;i=T=>{(r||b())&&y(T)},(g=e.onPause)==null||g.call(e)}).then(()=>{var y;i=void 0,r||(y=e.onContinue)==null||y.call(e)}),R=()=>{if(r)return;let y;const g=s===0?e.initialPromise:void 0;try{y=g??e.fn()}catch(T){y=Promise.reject(T)}Promise.resolve(y).then(h).catch(T=>{var q;if(r)return;const M=e.retry??(Pt?0:3),O=e.retryDelay??Ws,A=typeof O=="function"?O(s,T):O,Q=M===!0||typeof M=="number"&&s<M||typeof M=="function"&&M(s,T);if(t||!Q){v(T);return}s++,(q=e.onFail)==null||q.call(e,s,T),$s(A).then(()=>b()?void 0:w()).then(()=>{t?v(T):R()})})};return{promise:a,cancel:o,continue:()=>(i==null||i(),a),cancelRetry:c,continueRetry:l,canStart:f,start:()=>(f()?R():w().then(R),a)}}function zs(){let e=[],t=0,s=c=>{c()},r=c=>{c()},i=c=>setTimeout(c,0);const a=c=>{t?e.push(c):i(()=>{s(c)})},o=()=>{const c=e;e=[],c.length&&i(()=>{r(()=>{c.forEach(l=>{s(l)})})})};return{batch:c=>{let l;t++;try{l=c()}finally{t--,t||o()}return l},batchCalls:c=>(...l)=>{a(()=>{c(...l)})},schedule:a,setNotifyFunction:c=>{s=c},setBatchNotifyFunction:c=>{r=c},setScheduler:c=>{i=c}}}var I=zs(),vt,Ge,is=(Ge=class{constructor(){d(this,vt)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),ae(this.gcTime)&&u(this,vt,setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(Pt?1/0:5*60*1e3))}clearGcTimeout(){n(this,vt)&&(clearTimeout(n(this,vt)),u(this,vt,void 0))}},vt=new WeakMap,Ge),Ft,At,G,N,$t,gt,Y,rt,Be,Vs=(Be=class extends is{constructor(t){super();d(this,Y);d(this,Ft);d(this,At);d(this,G);d(this,N);d(this,$t);d(this,gt);u(this,gt,!1),u(this,$t,t.defaultOptions),this.setOptions(t.options),this.observers=[],u(this,G,t.cache),this.queryKey=t.queryKey,this.queryHash=t.queryHash,u(this,Ft,Js(this.options)),this.state=t.state??n(this,Ft),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var t;return(t=n(this,N))==null?void 0:t.promise}setOptions(t){this.options={...n(this,$t),...t},this.updateGcTime(this.options.gcTime)}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&n(this,G).remove(this)}setData(t,s){const r=ue(this.state.data,t,this.options);return m(this,Y,rt).call(this,{data:r,type:"success",dataUpdatedAt:s==null?void 0:s.updatedAt,manual:s==null?void 0:s.manual}),r}setState(t,s){m(this,Y,rt).call(this,{type:"setState",state:t,setStateOptions:s})}cancel(t){var r,i;const s=(r=n(this,N))==null?void 0:r.promise;return(i=n(this,N))==null||i.cancel(t),s?s.then(B).catch(B):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(n(this,Ft))}isActive(){return this.observers.some(t=>W(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Ce||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStale(){return this.state.isInvalidated?!0:this.getObserversCount()>0?this.observers.some(t=>t.getCurrentResult().isStale):this.state.data===void 0}isStaleByTime(t=0){return this.state.isInvalidated||this.state.data===void 0||!Xe(this.state.dataUpdatedAt,t)}onFocus(){var s;const t=this.observers.find(r=>r.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(s=n(this,N))==null||s.continue()}onOnline(){var s;const t=this.observers.find(r=>r.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(s=n(this,N))==null||s.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),n(this,G).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(s=>s!==t),this.observers.length||(n(this,N)&&(n(this,gt)?n(this,N).cancel({revert:!0}):n(this,N).cancelRetry()),this.scheduleGc()),n(this,G).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||m(this,Y,rt).call(this,{type:"invalidate"})}fetch(t,s){var l,b,f;if(this.state.fetchStatus!=="idle"){if(this.state.data!==void 0&&(s!=null&&s.cancelRefetch))this.cancel({silent:!0});else if(n(this,N))return n(this,N).continueRetry(),n(this,N).promise}if(t&&this.setOptions(t),!this.options.queryFn){const h=this.observers.find(v=>v.options.queryFn);h&&this.setOptions(h.options)}const r=new AbortController,i=h=>{Object.defineProperty(h,"signal",{enumerable:!0,get:()=>(u(this,gt,!0),r.signal)})},a=()=>{const h=es(this.options,s),v={queryKey:this.queryKey,meta:this.meta};return i(v),u(this,gt,!1),this.options.persister?this.options.persister(h,v,this):h(v)},o={fetchOptions:s,options:this.options,queryKey:this.queryKey,state:this.state,fetchFn:a};i(o),(l=this.options.behavior)==null||l.onFetch(o,this),u(this,At,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((b=o.fetchOptions)==null?void 0:b.meta))&&m(this,Y,rt).call(this,{type:"fetch",meta:(f=o.fetchOptions)==null?void 0:f.meta});const c=h=>{var v,w,R,y;ne(h)&&h.silent||m(this,Y,rt).call(this,{type:"error",error:h}),ne(h)||((w=(v=n(this,G).config).onError)==null||w.call(v,h,this),(y=(R=n(this,G).config).onSettled)==null||y.call(R,this.state.data,h,this)),this.scheduleGc()};return u(this,N,ns({initialPromise:s==null?void 0:s.initialPromise,fn:o.fetchFn,abort:r.abort.bind(r),onSuccess:h=>{var v,w,R,y;if(h===void 0){c(new Error(`${this.queryHash} data is undefined`));return}try{this.setData(h)}catch(g){c(g);return}(w=(v=n(this,G).config).onSuccess)==null||w.call(v,h,this),(y=(R=n(this,G).config).onSettled)==null||y.call(R,h,this.state.error,this),this.scheduleGc()},onError:c,onFail:(h,v)=>{m(this,Y,rt).call(this,{type:"failed",failureCount:h,error:v})},onPause:()=>{m(this,Y,rt).call(this,{type:"pause"})},onContinue:()=>{m(this,Y,rt).call(this,{type:"continue"})},retry:o.options.retry,retryDelay:o.options.retryDelay,networkMode:o.options.networkMode,canRun:()=>!0})),n(this,N).start()}},Ft=new WeakMap,At=new WeakMap,G=new WeakMap,N=new WeakMap,$t=new WeakMap,gt=new WeakMap,Y=new WeakSet,rt=function(t){const s=r=>{switch(t.type){case"failed":return{...r,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...r,fetchStatus:"paused"};case"continue":return{...r,fetchStatus:"fetching"};case"fetch":return{...r,...as(r.data,this.options),fetchMeta:t.meta??null};case"success":return{...r,data:t.data,dataUpdateCount:r.dataUpdateCount+1,dataUpdatedAt:t.dataUpdatedAt??Date.now(),error:null,isInvalidated:!1,status:"success",...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};case"error":const i=t.error;return ne(i)&&i.revert&&n(this,At)?{...n(this,At),fetchStatus:"idle"}:{...r,error:i,errorUpdateCount:r.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:r.fetchFailureCount+1,fetchFailureReason:i,fetchStatus:"idle",status:"error"};case"invalidate":return{...r,isInvalidated:!0};case"setState":return{...r,...t.state}}};this.state=s(this.state),I.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate()}),n(this,G).notify({query:this,type:"updated",action:t})})},Be);function as(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:ss(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function Js(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,s=t!==void 0,r=s?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:s?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:s?"success":"pending",fetchStatus:"idle"}}var Z,Ye,Zs=(Ye=class extends _t{constructor(t={}){super();d(this,Z);this.config=t,u(this,Z,new Map)}build(t,s,r){const i=s.queryKey,a=s.queryHash??Se(i,s);let o=this.get(a);return o||(o=new Vs({cache:this,queryKey:i,queryHash:a,options:t.defaultQueryOptions(s),state:r,defaultOptions:t.getQueryDefaults(i)}),this.add(o)),o}add(t){n(this,Z).has(t.queryHash)||(n(this,Z).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const s=n(this,Z).get(t.queryHash);s&&(t.destroy(),s===t&&n(this,Z).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){I.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return n(this,Z).get(t)}getAll(){return[...n(this,Z).values()]}find(t){const s={exact:!0,...t};return this.getAll().find(r=>De(s,r))}findAll(t={}){const s=this.getAll();return Object.keys(t).length>0?s.filter(r=>De(t,r)):s}notify(t){I.batch(()=>{this.listeners.forEach(s=>{s(t)})})}onFocus(){I.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){I.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},Z=new WeakMap,Ye),X,U,bt,tt,at,We,Xs=(We=class extends is{constructor(t){super();d(this,tt);d(this,X);d(this,U);d(this,bt);this.mutationId=t.mutationId,u(this,U,t.mutationCache),u(this,X,[]),this.state=t.state||os(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){n(this,X).includes(t)||(n(this,X).push(t),this.clearGcTimeout(),n(this,U).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){u(this,X,n(this,X).filter(s=>s!==t)),this.scheduleGc(),n(this,U).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){n(this,X).length||(this.state.status==="pending"?this.scheduleGc():n(this,U).remove(this))}continue(){var t;return((t=n(this,bt))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var i,a,o,c,l,b,f,h,v,w,R,y,g,T,M,O,A,Q,q,j;u(this,bt,ns({fn:()=>this.options.mutationFn?this.options.mutationFn(t):Promise.reject(new Error("No mutationFn found")),onFail:(E,x)=>{m(this,tt,at).call(this,{type:"failed",failureCount:E,error:x})},onPause:()=>{m(this,tt,at).call(this,{type:"pause"})},onContinue:()=>{m(this,tt,at).call(this,{type:"continue"})},retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>n(this,U).canRun(this)}));const s=this.state.status==="pending",r=!n(this,bt).canStart();try{if(!s){m(this,tt,at).call(this,{type:"pending",variables:t,isPaused:r}),await((a=(i=n(this,U).config).onMutate)==null?void 0:a.call(i,t,this));const x=await((c=(o=this.options).onMutate)==null?void 0:c.call(o,t));x!==this.state.context&&m(this,tt,at).call(this,{type:"pending",context:x,variables:t,isPaused:r})}const E=await n(this,bt).start();return await((b=(l=n(this,U).config).onSuccess)==null?void 0:b.call(l,E,t,this.state.context,this)),await((h=(f=this.options).onSuccess)==null?void 0:h.call(f,E,t,this.state.context)),await((w=(v=n(this,U).config).onSettled)==null?void 0:w.call(v,E,null,this.state.variables,this.state.context,this)),await((y=(R=this.options).onSettled)==null?void 0:y.call(R,E,null,t,this.state.context)),m(this,tt,at).call(this,{type:"success",data:E}),E}catch(E){try{throw await((T=(g=n(this,U).config).onError)==null?void 0:T.call(g,E,t,this.state.context,this)),await((O=(M=this.options).onError)==null?void 0:O.call(M,E,t,this.state.context)),await((Q=(A=n(this,U).config).onSettled)==null?void 0:Q.call(A,void 0,E,this.state.variables,this.state.context,this)),await((j=(q=this.options).onSettled)==null?void 0:j.call(q,void 0,E,t,this.state.context)),E}finally{m(this,tt,at).call(this,{type:"error",error:E})}}finally{n(this,U).runNext(this)}}},X=new WeakMap,U=new WeakMap,bt=new WeakMap,tt=new WeakSet,at=function(t){const s=r=>{switch(t.type){case"failed":return{...r,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...r,isPaused:!0};case"continue":return{...r,isPaused:!1};case"pending":return{...r,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...r,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...r,data:void 0,error:t.error,failureCount:r.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=s(this.state),I.batch(()=>{n(this,X).forEach(r=>{r.onMutationUpdate(t)}),n(this,U).notify({mutation:this,type:"updated",action:t})})},We);function os(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var K,Ht,ze,tr=(ze=class extends _t{constructor(t={}){super();d(this,K);d(this,Ht);this.config=t,u(this,K,new Map),u(this,Ht,Date.now())}build(t,s,r){const i=new Xs({mutationCache:this,mutationId:++zt(this,Ht)._,options:t.defaultMutationOptions(s),state:r});return this.add(i),i}add(t){const s=Vt(t),r=n(this,K).get(s)??[];r.push(t),n(this,K).set(s,r),this.notify({type:"added",mutation:t})}remove(t){var r;const s=Vt(t);if(n(this,K).has(s)){const i=(r=n(this,K).get(s))==null?void 0:r.filter(a=>a!==t);i&&(i.length===0?n(this,K).delete(s):n(this,K).set(s,i))}this.notify({type:"removed",mutation:t})}canRun(t){var r;const s=(r=n(this,K).get(Vt(t)))==null?void 0:r.find(i=>i.state.status==="pending");return!s||s===t}runNext(t){var r;const s=(r=n(this,K).get(Vt(t)))==null?void 0:r.find(i=>i!==t&&i.state.isPaused);return(s==null?void 0:s.continue())??Promise.resolve()}clear(){I.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}getAll(){return[...n(this,K).values()].flat()}find(t){const s={exact:!0,...t};return this.getAll().find(r=>Fe(s,r))}findAll(t={}){return this.getAll().filter(s=>Fe(t,s))}notify(t){I.batch(()=>{this.listeners.forEach(s=>{s(t)})})}resumePausedMutations(){const t=this.getAll().filter(s=>s.state.isPaused);return I.batch(()=>Promise.all(t.map(s=>s.continue().catch(B))))}},K=new WeakMap,Ht=new WeakMap,ze);function Vt(e){var t;return((t=e.options.scope)==null?void 0:t.id)??String(e.mutationId)}function Me(e){return{onFetch:(t,s)=>{var f,h,v,w,R;const r=t.options,i=(v=(h=(f=t.fetchOptions)==null?void 0:f.meta)==null?void 0:h.fetchMore)==null?void 0:v.direction,a=((w=t.state.data)==null?void 0:w.pages)||[],o=((R=t.state.data)==null?void 0:R.pageParams)||[];let c={pages:[],pageParams:[]},l=0;const b=async()=>{let y=!1;const g=O=>{Object.defineProperty(O,"signal",{enumerable:!0,get:()=>(t.signal.aborted?y=!0:t.signal.addEventListener("abort",()=>{y=!0}),t.signal)})},T=es(t.options,t.fetchOptions),M=async(O,A,Q)=>{if(y)return Promise.reject();if(A==null&&O.pages.length)return Promise.resolve(O);const q={queryKey:t.queryKey,pageParam:A,direction:Q?"backward":"forward",meta:t.options.meta};g(q);const j=await T(q),{maxPages:E}=t.options,x=Q?Gs:Hs;return{pages:x(O.pages,j,E),pageParams:x(O.pageParams,A,E)}};if(i&&a.length){const O=i==="backward",A=O?er:Ie,Q={pages:a,pageParams:o},q=A(r,Q);c=await M(Q,q,O)}else{const O=e??a.length;do{const A=l===0?o[0]??r.initialPageParam:Ie(r,c);if(l>0&&A==null)break;c=await M(c,A),l++}while(l<O)}return c};t.options.persister?t.fetchFn=()=>{var y,g;return(g=(y=t.options).persister)==null?void 0:g.call(y,b,{queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},s)}:t.fetchFn=b}}}function Ie(e,{pages:t,pageParams:s}){const r=t.length-1;return t.length>0?e.getNextPageParam(t[r],t,s[r],s):void 0}function er(e,{pages:t,pageParams:s}){var r;return t.length>0?(r=e.getPreviousPageParam)==null?void 0:r.call(e,t[0],t,s[0],s):void 0}var D,ct,ht,jt,Mt,lt,It,Qt,Ve,sr=(Ve=class{constructor(e={}){d(this,D);d(this,ct);d(this,ht);d(this,jt);d(this,Mt);d(this,lt);d(this,It);d(this,Qt);u(this,D,e.queryCache||new Zs),u(this,ct,e.mutationCache||new tr),u(this,ht,e.defaultOptions||{}),u(this,jt,new Map),u(this,Mt,new Map),u(this,lt,0)}mount(){zt(this,lt)._++,n(this,lt)===1&&(u(this,It,Pe.subscribe(async e=>{e&&(await this.resumePausedMutations(),n(this,D).onFocus())})),u(this,Qt,te.subscribe(async e=>{e&&(await this.resumePausedMutations(),n(this,D).onOnline())})))}unmount(){var e,t;zt(this,lt)._--,n(this,lt)===0&&((e=n(this,It))==null||e.call(this),u(this,It,void 0),(t=n(this,Qt))==null||t.call(this),u(this,Qt,void 0))}isFetching(e){return n(this,D).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return n(this,ct).findAll({...e,status:"pending"}).length}getQueryData(e){var s;const t=this.defaultQueryOptions({queryKey:e});return(s=n(this,D).get(t.queryHash))==null?void 0:s.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),s=n(this,D).build(this,t),r=s.state.data;return r===void 0?this.fetchQuery(e):(e.revalidateIfStale&&s.isStaleByTime(Rt(t.staleTime,s))&&this.prefetchQuery(t),Promise.resolve(r))}getQueriesData(e){return n(this,D).findAll(e).map(({queryKey:t,state:s})=>{const r=s.data;return[t,r]})}setQueryData(e,t,s){const r=this.defaultQueryOptions({queryKey:e}),i=n(this,D).get(r.queryHash),a=i==null?void 0:i.state.data,o=Ks(t,a);if(o!==void 0)return n(this,D).build(this,r).setData(o,{...s,manual:!0})}setQueriesData(e,t,s){return I.batch(()=>n(this,D).findAll(e).map(({queryKey:r})=>[r,this.setQueryData(r,t,s)]))}getQueryState(e){var s;const t=this.defaultQueryOptions({queryKey:e});return(s=n(this,D).get(t.queryHash))==null?void 0:s.state}removeQueries(e){const t=n(this,D);I.batch(()=>{t.findAll(e).forEach(s=>{t.remove(s)})})}resetQueries(e,t){const s=n(this,D),r={type:"active",...e};return I.batch(()=>(s.findAll(e).forEach(i=>{i.reset()}),this.refetchQueries(r,t)))}cancelQueries(e,t={}){const s={revert:!0,...t},r=I.batch(()=>n(this,D).findAll(e).map(i=>i.cancel(s)));return Promise.all(r).then(B).catch(B)}invalidateQueries(e,t={}){return I.batch(()=>{if(n(this,D).findAll(e).forEach(r=>{r.invalidate()}),(e==null?void 0:e.refetchType)==="none")return Promise.resolve();const s={...e,type:(e==null?void 0:e.refetchType)??(e==null?void 0:e.type)??"active"};return this.refetchQueries(s,t)})}refetchQueries(e,t={}){const s={...t,cancelRefetch:t.cancelRefetch??!0},r=I.batch(()=>n(this,D).findAll(e).filter(i=>!i.isDisabled()).map(i=>{let a=i.fetch(void 0,s);return s.throwOnError||(a=a.catch(B)),i.state.fetchStatus==="paused"?Promise.resolve():a}));return Promise.all(r).then(B)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const s=n(this,D).build(this,t);return s.isStaleByTime(Rt(t.staleTime,s))?s.fetch(t):Promise.resolve(s.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(B).catch(B)}fetchInfiniteQuery(e){return e.behavior=Me(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(B).catch(B)}ensureInfiniteQueryData(e){return e.behavior=Me(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return te.isOnline()?n(this,ct).resumePausedMutations():Promise.resolve()}getQueryCache(){return n(this,D)}getMutationCache(){return n(this,ct)}getDefaultOptions(){return n(this,ht)}setDefaultOptions(e){u(this,ht,e)}setQueryDefaults(e,t){n(this,jt).set(xt(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...n(this,jt).values()],s={};return t.forEach(r=>{Kt(e,r.queryKey)&&Object.assign(s,r.defaultOptions)}),s}setMutationDefaults(e,t){n(this,Mt).set(xt(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...n(this,Mt).values()];let s={};return t.forEach(r=>{Kt(e,r.mutationKey)&&(s={...s,...r.defaultOptions})}),s}defaultQueryOptions(e){if(e._defaulted)return e;const t={...n(this,ht).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=Se(t.queryKey,t)),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!=="always"),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===Ce&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...n(this,ht).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){n(this,D).clear(),n(this,ct).clear()}},D=new WeakMap,ct=new WeakMap,ht=new WeakMap,jt=new WeakMap,Mt=new WeakMap,lt=new WeakMap,It=new WeakMap,Qt=new WeakMap,Ve),_,S,Gt,L,St,qt,dt,et,Bt,Nt,Ut,wt,Ct,ft,Lt,P,kt,he,le,de,fe,pe,ye,me,us,Je,rr=(Je=class extends _t{constructor(t,s){super();d(this,P);d(this,_);d(this,S);d(this,Gt);d(this,L);d(this,St);d(this,qt);d(this,dt);d(this,et);d(this,Bt);d(this,Nt);d(this,Ut);d(this,wt);d(this,Ct);d(this,ft);d(this,Lt,new Set);this.options=s,u(this,_,t),u(this,et,null),u(this,dt,ce()),this.options.experimental_prefetchInRender||n(this,dt).reject(new Error("experimental_prefetchInRender feature flag is not enabled")),this.bindMethods(),this.setOptions(s)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(n(this,S).addObserver(this),Qe(n(this,S),this.options)?m(this,P,kt).call(this):this.updateResult(),m(this,P,fe).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return ve(n(this,S),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return ve(n(this,S),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,m(this,P,pe).call(this),m(this,P,ye).call(this),n(this,S).removeObserver(this)}setOptions(t,s){const r=this.options,i=n(this,S);if(this.options=n(this,_).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof W(this.options.enabled,n(this,S))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");m(this,P,me).call(this),n(this,S).setOptions(this.options),r._defaulted&&!Xt(this.options,r)&&n(this,_).getQueryCache().notify({type:"observerOptionsUpdated",query:n(this,S),observer:this});const a=this.hasListeners();a&&qe(n(this,S),i,this.options,r)&&m(this,P,kt).call(this),this.updateResult(s),a&&(n(this,S)!==i||W(this.options.enabled,n(this,S))!==W(r.enabled,n(this,S))||Rt(this.options.staleTime,n(this,S))!==Rt(r.staleTime,n(this,S)))&&m(this,P,he).call(this);const o=m(this,P,le).call(this);a&&(n(this,S)!==i||W(this.options.enabled,n(this,S))!==W(r.enabled,n(this,S))||o!==n(this,ft))&&m(this,P,de).call(this,o)}getOptimisticResult(t){const s=n(this,_).getQueryCache().build(n(this,_),t),r=this.createResult(s,t);return ir(this,r)&&(u(this,L,r),u(this,qt,this.options),u(this,St,n(this,S).state)),r}getCurrentResult(){return n(this,L)}trackResult(t,s){const r={};return Object.keys(t).forEach(i=>{Object.defineProperty(r,i,{configurable:!1,enumerable:!0,get:()=>(this.trackProp(i),s==null||s(i),t[i])})}),r}trackProp(t){n(this,Lt).add(t)}getCurrentQuery(){return n(this,S)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const s=n(this,_).defaultQueryOptions(t),r=n(this,_).getQueryCache().build(n(this,_),s);return r.fetch().then(()=>this.createResult(r,s))}fetch(t){return m(this,P,kt).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),n(this,L)))}createResult(t,s){var E;const r=n(this,S),i=this.options,a=n(this,L),o=n(this,St),c=n(this,qt),b=t!==r?t.state:n(this,Gt),{state:f}=t;let h={...f},v=!1,w;if(s._optimisticResults){const x=this.hasListeners(),z=!x&&Qe(t,s),V=x&&qe(t,r,s,i);(z||V)&&(h={...h,...as(f.data,t.options)}),s._optimisticResults==="isRestoring"&&(h.fetchStatus="idle")}let{error:R,errorUpdatedAt:y,status:g}=h;if(s.select&&h.data!==void 0)if(a&&h.data===(o==null?void 0:o.data)&&s.select===n(this,Bt))w=n(this,Nt);else try{u(this,Bt,s.select),w=s.select(h.data),w=ue(a==null?void 0:a.data,w,s),u(this,Nt,w),u(this,et,null)}catch(x){u(this,et,x)}else w=h.data;if(s.placeholderData!==void 0&&w===void 0&&g==="pending"){let x;if(a!=null&&a.isPlaceholderData&&s.placeholderData===(c==null?void 0:c.placeholderData))x=a.data;else if(x=typeof s.placeholderData=="function"?s.placeholderData((E=n(this,Ut))==null?void 0:E.state.data,n(this,Ut)):s.placeholderData,s.select&&x!==void 0)try{x=s.select(x),u(this,et,null)}catch(z){u(this,et,z)}x!==void 0&&(g="success",w=ue(a==null?void 0:a.data,x,s),v=!0)}n(this,et)&&(R=n(this,et),w=n(this,Nt),y=Date.now(),g="error");const T=h.fetchStatus==="fetching",M=g==="pending",O=g==="error",A=M&&T,Q=w!==void 0,j={status:g,fetchStatus:h.fetchStatus,isPending:M,isSuccess:g==="success",isError:O,isInitialLoading:A,isLoading:A,data:w,dataUpdatedAt:h.dataUpdatedAt,error:R,errorUpdatedAt:y,failureCount:h.fetchFailureCount,failureReason:h.fetchFailureReason,errorUpdateCount:h.errorUpdateCount,isFetched:h.dataUpdateCount>0||h.errorUpdateCount>0,isFetchedAfterMount:h.dataUpdateCount>b.dataUpdateCount||h.errorUpdateCount>b.errorUpdateCount,isFetching:T,isRefetching:T&&!M,isLoadingError:O&&!Q,isPaused:h.fetchStatus==="paused",isPlaceholderData:v,isRefetchError:O&&Q,isStale:xe(t,s),refetch:this.refetch,promise:n(this,dt)};if(this.options.experimental_prefetchInRender){const x=J=>{j.status==="error"?J.reject(j.error):j.data!==void 0&&J.resolve(j.data)},z=()=>{const J=u(this,dt,j.promise=ce());x(J)},V=n(this,dt);switch(V.status){case"pending":t.queryHash===r.queryHash&&x(V);break;case"fulfilled":(j.status==="error"||j.data!==V.value)&&z();break;case"rejected":(j.status!=="error"||j.error!==V.reason)&&z();break}}return j}updateResult(t){const s=n(this,L),r=this.createResult(n(this,S),this.options);if(u(this,St,n(this,S).state),u(this,qt,this.options),n(this,St).data!==void 0&&u(this,Ut,n(this,S)),Xt(r,s))return;u(this,L,r);const i={},a=()=>{if(!s)return!0;const{notifyOnChangeProps:o}=this.options,c=typeof o=="function"?o():o;if(c==="all"||!c&&!n(this,Lt).size)return!0;const l=new Set(c??n(this,Lt));return this.options.throwOnError&&l.add("error"),Object.keys(n(this,L)).some(b=>{const f=b;return n(this,L)[f]!==s[f]&&l.has(f)})};(t==null?void 0:t.listeners)!==!1&&a()&&(i.listeners=!0),m(this,P,us).call(this,{...i,...t})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&m(this,P,fe).call(this)}},_=new WeakMap,S=new WeakMap,Gt=new WeakMap,L=new WeakMap,St=new WeakMap,qt=new WeakMap,dt=new WeakMap,et=new WeakMap,Bt=new WeakMap,Nt=new WeakMap,Ut=new WeakMap,wt=new WeakMap,Ct=new WeakMap,ft=new WeakMap,Lt=new WeakMap,P=new WeakSet,kt=function(t){m(this,P,me).call(this);let s=n(this,S).fetch(this.options,t);return t!=null&&t.throwOnError||(s=s.catch(B)),s},he=function(){m(this,P,pe).call(this);const t=Rt(this.options.staleTime,n(this,S));if(Pt||n(this,L).isStale||!ae(t))return;const r=Xe(n(this,L).dataUpdatedAt,t)+1;u(this,wt,setTimeout(()=>{n(this,L).isStale||this.updateResult()},r))},le=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(n(this,S)):this.options.refetchInterval)??!1},de=function(t){m(this,P,ye).call(this),u(this,ft,t),!(Pt||W(this.options.enabled,n(this,S))===!1||!ae(n(this,ft))||n(this,ft)===0)&&u(this,Ct,setInterval(()=>{(this.options.refetchIntervalInBackground||Pe.isFocused())&&m(this,P,kt).call(this)},n(this,ft)))},fe=function(){m(this,P,he).call(this),m(this,P,de).call(this,m(this,P,le).call(this))},pe=function(){n(this,wt)&&(clearTimeout(n(this,wt)),u(this,wt,void 0))},ye=function(){n(this,Ct)&&(clearInterval(n(this,Ct)),u(this,Ct,void 0))},me=function(){const t=n(this,_).getQueryCache().build(n(this,_),this.options);if(t===n(this,S))return;const s=n(this,S);u(this,S,t),u(this,Gt,t.state),this.hasListeners()&&(s==null||s.removeObserver(this),t.addObserver(this))},us=function(t){I.batch(()=>{t.listeners&&this.listeners.forEach(s=>{s(n(this,L))}),n(this,_).getQueryCache().notify({query:n(this,S),type:"observerResultsUpdated"})})},Je);function nr(e,t){return W(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function Qe(e,t){return nr(e,t)||e.state.data!==void 0&&ve(e,t,t.refetchOnMount)}function ve(e,t,s){if(W(t.enabled,e)!==!1){const r=typeof s=="function"?s(e):s;return r==="always"||r!==!1&&xe(e,t)}return!1}function qe(e,t,s,r){return(e!==t||W(r.enabled,e)===!1)&&(!s.suspense||e.state.status!=="error")&&xe(e,s)}function xe(e,t){return W(t.enabled,e)!==!1&&e.isStaleByTime(Rt(t.staleTime,e))}function ir(e,t){return!Xt(e.getCurrentResult(),t)}var pt,yt,k,nt,it,Jt,ge,Ze,ar=(Ze=class extends _t{constructor(t,s){super();d(this,it);d(this,pt);d(this,yt);d(this,k);d(this,nt);u(this,pt,t),this.setOptions(s),this.bindMethods(),m(this,it,Jt).call(this)}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(t){var r;const s=this.options;this.options=n(this,pt).defaultMutationOptions(t),Xt(this.options,s)||n(this,pt).getMutationCache().notify({type:"observerOptionsUpdated",mutation:n(this,k),observer:this}),s!=null&&s.mutationKey&&this.options.mutationKey&&xt(s.mutationKey)!==xt(this.options.mutationKey)?this.reset():((r=n(this,k))==null?void 0:r.state.status)==="pending"&&n(this,k).setOptions(this.options)}onUnsubscribe(){var t;this.hasListeners()||(t=n(this,k))==null||t.removeObserver(this)}onMutationUpdate(t){m(this,it,Jt).call(this),m(this,it,ge).call(this,t)}getCurrentResult(){return n(this,yt)}reset(){var t;(t=n(this,k))==null||t.removeObserver(this),u(this,k,void 0),m(this,it,Jt).call(this),m(this,it,ge).call(this)}mutate(t,s){var r;return u(this,nt,s),(r=n(this,k))==null||r.removeObserver(this),u(this,k,n(this,pt).getMutationCache().build(n(this,pt),this.options)),n(this,k).addObserver(this),n(this,k).execute(t)}},pt=new WeakMap,yt=new WeakMap,k=new WeakMap,nt=new WeakMap,it=new WeakSet,Jt=function(){var s;const t=((s=n(this,k))==null?void 0:s.state)??os();u(this,yt,{...t,isPending:t.status==="pending",isSuccess:t.status==="success",isError:t.status==="error",isIdle:t.status==="idle",mutate:this.mutate,reset:this.reset})},ge=function(t){I.batch(()=>{var s,r,i,a,o,c,l,b;if(n(this,nt)&&this.hasListeners()){const f=n(this,yt).variables,h=n(this,yt).context;(t==null?void 0:t.type)==="success"?((r=(s=n(this,nt)).onSuccess)==null||r.call(s,t.data,f,h),(a=(i=n(this,nt)).onSettled)==null||a.call(i,t.data,null,f,h)):(t==null?void 0:t.type)==="error"&&((c=(o=n(this,nt)).onError)==null||c.call(o,t.error,f,h),(b=(l=n(this,nt)).onSettled)==null||b.call(l,void 0,t.error,f,h))}this.listeners.forEach(f=>{f(n(this,yt))})})},Ze),cs=C.createContext(void 0),ee=e=>{const t=C.useContext(cs);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},or=({client:e,children:t})=>(C.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),p.jsx(cs.Provider,{value:e,children:t})),hs=C.createContext(!1),ur=()=>C.useContext(hs);hs.Provider;function cr(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var hr=C.createContext(cr()),lr=()=>C.useContext(hr);function ls(e,t){return typeof e=="function"?e(...t):!!e}function be(){}var dr=(e,t)=>{(e.suspense||e.throwOnError||e.experimental_prefetchInRender)&&(t.isReset()||(e.retryOnMount=!1))},fr=e=>{C.useEffect(()=>{e.clearReset()},[e])},pr=({result:e,errorResetBoundary:t,throwOnError:s,query:r})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&ls(s,[e.error,r]),yr=e=>{e.suspense&&(e.staleTime===void 0&&(e.staleTime=1e3),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3)))},mr=(e,t)=>e.isLoading&&e.isFetching&&!t,vr=(e,t)=>(e==null?void 0:e.suspense)&&t.isPending,Ne=(e,t,s)=>t.fetchOptimistic(e).catch(()=>{s.clearReset()});function gr(e,t,s){var f,h,v,w,R;const r=ee(),i=ur(),a=lr(),o=r.defaultQueryOptions(e);(h=(f=r.getDefaultOptions().queries)==null?void 0:f._experimental_beforeQuery)==null||h.call(f,o),o._optimisticResults=i?"isRestoring":"optimistic",yr(o),dr(o,a),fr(a);const c=!r.getQueryCache().get(o.queryHash),[l]=C.useState(()=>new t(r,o)),b=l.getOptimisticResult(o);if(C.useSyncExternalStore(C.useCallback(y=>{const g=i?be:l.subscribe(I.batchCalls(y));return l.updateResult(),g},[l,i]),()=>l.getCurrentResult(),()=>l.getCurrentResult()),C.useEffect(()=>{l.setOptions(o,{listeners:!1})},[o,l]),vr(o,b))throw Ne(o,l,a);if(pr({result:b,errorResetBoundary:a,throwOnError:o.throwOnError,query:r.getQueryCache().get(o.queryHash)}))throw b.error;if((w=(v=r.getDefaultOptions().queries)==null?void 0:v._experimental_afterQuery)==null||w.call(v,o,b),o.experimental_prefetchInRender&&!Pt&&mr(b,i)){const y=c?Ne(o,l,a):(R=r.getQueryCache().get(o.queryHash))==null?void 0:R.promise;y==null||y.catch(be).finally(()=>{l.updateResult()})}return o.notifyOnChangeProps?b:l.trackResult(b)}function st(e,t){return gr(e,rr)}function ds(e,t){const s=ee(),[r]=C.useState(()=>new ar(s,e));C.useEffect(()=>{r.setOptions(e)},[r,e]);const i=C.useSyncExternalStore(C.useCallback(o=>r.subscribe(I.batchCalls(o)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),a=C.useCallback((o,c)=>{r.mutate(o,c).catch(be)},[r]);if(i.error&&ls(r.options.throwOnError,[i.error]))throw i.error;return{...i,mutate:a,mutateAsync:i.mutate}}const br=864e5,Sr=/^\d{4}-\d{2}-\d{2}$/;function Ue(e,t=Date.now()){return new Date(t-e*br).toISOString().slice(0,10)}function wr(e=30,t=Date.now()){return{fromDay:Ue(e-1,t),toDay:Ue(0,t)}}function Cr(e){return Sr.test(e)}const Pr=["spend","models","actors","runs","reliability","approvals","tools","pricing","live"],fs="spend";function xr(e){return Pr.some(t=>t===e)}function Le(e){const t=e.replace(/^#\/?/,"");return xr(t)?t:fs}function Rr(e){return`#/${e}`}function Zt(){return typeof window<"u"&&window.__AGENT_API__?window.__AGENT_API__:`${typeof window<"u"&&window.__AGENT_BASE__||"/ai-gateway"}/api`}async function H(e,t){const s=await fetch(Zt()+e,t);if(!s.ok)throw new Error(`${s.status} ${s.statusText}`);return await s.json()}function ie(e){const t=new URLSearchParams({page:`${e.page}`,limit:`${e.pageSize}`});if(e.where!==void 0)for(const[s,r]of Object.entries(e.where))typeof r=="string"&&r!==""&&t.set(`where[${s}]`,r);return t}const $={spend(e){const t=new URLSearchParams({from:e.fromDay,to:e.toDay});return H(`/spend?${t.toString()}`)},topThreads(e,t=10){const s=new URLSearchParams({from:e.fromDay,to:e.toDay,limit:`${t}`});return H(`/top-threads?${s.toString()}`)},reliability(e){const t=new URLSearchParams({from:e.fromDay,to:e.toDay});return H(`/reliability?${t.toString()}`)},runs(e=50){return H(`/runs?limit=${e}`)},toolCalls(e=50){return H(`/tool-calls?limit=${e}`)},toolCallsPage(e){return H(`/tool-calls-page?${ie(e)}`)},approvals(e=50){return H(`/approvals?limit=${e}`)},async decideApproval(e,t){const s=await fetch(`${Zt()}/approvals/${encodeURIComponent(e)}`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)});if(!s.ok)throw new Error(`${s.status} ${s.statusText}`)},toolStats(e){const t=new URLSearchParams({from:e.fromDay,to:e.toDay});return H(`/tools?${t.toString()}`)},threads(e=50){return H(`/threads?limit=${e}`)},threadsPage(e){return H(`/threads-page?${ie(e)}`)},runsPage(e){return H(`/runs-page?${ie(e)}`)},pricing(){return H("/pricing")},async upsertPrice(e){const t=await fetch(`${Zt()}/pricing`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)});if(!t.ok)throw new Error(`${t.status} ${t.statusText}`)},streamEvents(e){const t=new EventSource(`${Zt()}/stream`);return t.onmessage=s=>{try{e(JSON.parse(s.data))}catch{}},()=>t.close()}};function Or(e){return st({queryKey:["spend",e.fromDay,e.toDay],queryFn:()=>$.spend(e)})}function Er(e,t=10){return st({queryKey:["top-threads",e.fromDay,e.toDay,t],queryFn:()=>$.topThreads(e,t)})}function Tr(e){return st({queryKey:["reliability",e.fromDay,e.toDay],queryFn:()=>$.reliability(e)})}function Dr(e,t,s){return st({queryKey:["runs-page",e,t,s],queryFn:()=>$.runsPage({page:e,pageSize:t,where:s}),placeholderData:we})}function Fr(e=50){return st({queryKey:["tool-calls",e],queryFn:()=>$.toolCalls(e)})}function Ar(e,t,s){return st({queryKey:["tool-calls-page",e,t,s],queryFn:()=>$.toolCallsPage({page:e,pageSize:t,where:s}),placeholderData:we})}function jr(e,t,s){return st({queryKey:["threads-page",e,t,s],queryFn:()=>$.threadsPage({page:e,pageSize:t,where:s}),placeholderData:we})}function Mr(e=50){return st({queryKey:["approvals",e],queryFn:()=>$.approvals(e)})}function Ir(){const e=ee();return ds({mutationFn:({toolCallId:t,input:s})=>$.decideApproval(t,s),onSuccess:()=>{e.invalidateQueries({queryKey:["approvals"]})}})}function Qr(e){return st({queryKey:["tool-stats",e.fromDay,e.toDay],queryFn:()=>$.toolStats(e)})}function qr(){return st({queryKey:["pricing"],queryFn:()=>$.pricing()})}function Nr(){const e=ee();return ds({mutationFn:t=>$.upsertPrice(t),onSuccess:()=>{e.invalidateQueries({queryKey:["pricing"]})}})}function Ur(e=200){const[t,s]=C.useState([]),[r,i]=C.useState(!1),a=C.useRef(0);return C.useEffect(()=>{i(!0);const o=$.streamEvents(c=>{a.current+=1,s(l=>Ps(l,c,a.current,e))});return()=>{i(!1),o()}},[e]),{events:t,connected:r}}const Lr=[{key:"spend",label:"Spend & usage",icon:p.jsx(Rs,{})},{key:"models",label:"Models",icon:p.jsx(Os,{})},{key:"actors",label:"Actors & budgets",icon:p.jsx(Es,{})},{key:"runs",label:"Runs & tools",icon:p.jsx(Te,{})},{key:"reliability",label:"Reliability",icon:p.jsx(Ts,{})},{key:"approvals",label:"Approvals",icon:p.jsx(Ds,{})},{key:"tools",label:"Tools",icon:p.jsx(Te,{})},{key:"pricing",label:"Pricing",icon:p.jsx(Fs,{})},{key:"live",label:"Live",icon:p.jsx(As,{})}],Ot=25,_r={byModel:[],byActor:[],trend:[]},kr=[],Kr={rows:[],total:0,page:1,pageSize:Ot},$r={rows:[],total:0,page:1,pageSize:Ot},Hr={rows:[],total:0,page:1,pageSize:Ot},Gr=[],Br=[],_e=[],Yr=[],Wr={metrics:{runs:0,completed:0,failed:0,successRate:0,retries:0,durationP50Ms:null,durationP95Ms:null},byAgent:[],errors:[],trend:[]},zr="501";function Vr(){const[e,t]=C.useState(()=>typeof window>"u"?fs:Le(window.location.hash));return C.useEffect(()=>{function s(){t(Le(window.location.hash))}return window.addEventListener("hashchange",s),()=>window.removeEventListener("hashchange",s)},[]),e}function Jr(){const[e,t]=C.useState(wr()),s=Vr(),r=Or(e),i=Er(e),a=Fr(),o=Tr(e),c=Mr(),l=Ir(),b=Qr(e),f=qr(),h=Nr(),v=Ur(),[w,R]=C.useState(1),[y,g]=C.useState(""),[T,M]=C.useState(""),O={...y!==""?{toolName:y}:{},...T!==""?{status:T}:{}},A=Ar(w,Ot,O),[Q,q]=C.useState(1),[j,E]=C.useState(""),x={...j!==""?{title:j}:{}},z=jr(Q,Ot,x),[V,J]=C.useState(1),[Yt,se]=C.useState(""),[Re,ps]=C.useState(""),Oe={...Yt!==""?{status:Yt}:{},...Re!==""?{agentName:Re}:{}},ys=Dr(V,Ot,Oe);function ms(F){g(F),R(1)}function vs(F){M(F),R(1)}function gs(F){E(F),q(1)}function bs(F){se(F),J(1)}function Ss(F){ps(F),J(1)}const ws=r.data??_r,Cs=f.isError&&f.error instanceof Error?f.error.message.startsWith(zr):!1;return p.jsxs("div",{className:"relative min-h-full",children:[p.jsx("div",{className:"app-bg"}),p.jsxs("div",{className:"relative z-10 mx-auto max-w-[1180px] px-5 py-5",children:[p.jsx(Xr,{range:e,onRange:t,connected:v.connected,liveCount:v.events.length}),p.jsx("nav",{className:"mb-5 flex flex-wrap gap-1",children:Lr.map(F=>{const Wt=F.key==="live"?v.events.length:F.key==="approvals"?(c.data??_e).length:0;return p.jsxs("a",{href:Rr(F.key),className:`flex items-center gap-2 rounded-lg border px-3 py-1.5 text-xs transition-colors ${s===F.key?"border-[var(--accent)]/50 bg-[var(--accent)]/10 text-[var(--text)]":"border-transparent text-[var(--muted)] hover:text-[var(--text)]"}`,children:[F.icon,F.label,Wt>0&&p.jsx("span",{className:"mono tnum rounded bg-[var(--accent)]/20 px-1 text-[10px] text-[var(--accent)]",children:Wt})]},F.key)})}),p.jsx(Zr,{section:s,overview:ws,topThreads:i.data??Gr,loadingSpend:r.isLoading,errorSpend:r.isError,toolCalls:a.data??kr,toolCallsPage:A.data??Kr,toolCallsWhere:O,onToolCallsToolNameChange:ms,onToolCallsStatusChange:vs,onToolCallsPageChange:R,threadsPage:z.data??$r,threadsWhere:x,onThreadsTitleChange:gs,onThreadsPageChange:q,reliability:o.data??Wr,runsPage:ys.data??Hr,runsWhere:Oe,onRunsStatusChange:bs,onRunsAgentNameChange:Ss,onRunsPageChange:J,approvals:c.data??_e,onDecideApproval:(F,Wt)=>l.mutateAsync({toolCallId:F,input:Wt}),toolStats:b.data??Yr,liveEvents:v.events,connected:v.connected,prices:f.data??Br,loadingPrices:f.isLoading,pricingUnavailable:Cs,onUpsertPrice:F=>h.mutateAsync(F),savingPrice:h.isPending})]})]})}function Zr({section:e,overview:t,topThreads:s,loadingSpend:r,errorSpend:i,toolCalls:a,toolCallsPage:o,toolCallsWhere:c,onToolCallsToolNameChange:l,onToolCallsStatusChange:b,onToolCallsPageChange:f,threadsPage:h,threadsWhere:v,onThreadsTitleChange:w,onThreadsPageChange:R,reliability:y,runsPage:g,runsWhere:T,onRunsStatusChange:M,onRunsAgentNameChange:O,onRunsPageChange:A,approvals:Q,onDecideApproval:q,toolStats:j,liveEvents:E,connected:x,prices:z,loadingPrices:V,pricingUnavailable:J,onUpsertPrice:Yt,savingPrice:se}){if(i&&(e==="spend"||e==="models"||e==="actors"))return p.jsx("div",{className:"panel p-6 text-sm text-[var(--bad)]",children:"Failed to load the read-model. Is the governance read-model bound and the API reachable?"});if(r&&(e==="spend"||e==="models"||e==="actors"))return p.jsx("div",{className:"panel animate-pulse p-6 text-sm text-[var(--muted)]",children:"Loading…"});switch(e){case"spend":return p.jsx(_s,{overview:t,topThreads:s});case"models":return p.jsx(Ls,{rows:t.byModel});case"actors":return p.jsx(Us,{rows:t.byActor});case"runs":return p.jsx(Ns,{toolCalls:a,toolCallsPage:o,toolCallsWhere:c,onToolCallsToolNameChange:l,onToolCallsStatusChange:b,onToolCallsPageChange:f,threadsPage:h,threadsWhere:v,onThreadsTitleChange:w,onThreadsPageChange:R});case"reliability":return p.jsx(qs,{overview:y,runsPage:g,runsWhere:T,onRunsStatusChange:M,onRunsAgentNameChange:O,onRunsPageChange:A});case"approvals":return p.jsx(Qs,{approvals:Q,onDecide:q});case"tools":return p.jsx(Is,{rows:j});case"pricing":return p.jsx(Ms,{prices:z,loading:V,unavailable:J,onUpsert:Yt,saving:se});case"live":return p.jsx(js,{events:E,connected:x});default:return null}}function Xr({range:e,onRange:t,connected:s,liveCount:r}){return p.jsxs("header",{className:"mb-5 flex flex-wrap items-center gap-4",children:[p.jsxs("div",{className:"flex items-center gap-2.5",children:[p.jsx("div",{className:"grid h-8 w-8 place-items-center rounded-lg border border-[var(--accent)]/40 bg-[var(--accent)]/10",children:p.jsx(xs,{className:"h-4 w-4 text-[var(--accent)]"})}),p.jsxs("div",{className:"leading-none",children:[p.jsx("div",{className:"text-sm font-semibold tracking-tight",children:"AI gateway"}),p.jsx("div",{className:"mono text-[10px] uppercase tracking-[0.2em] text-[var(--muted)]",children:"governance console"})]})]}),p.jsxs("div",{className:"ml-auto flex flex-wrap items-center gap-2",children:[p.jsx(ke,{label:"From",value:e.fromDay,onChange:i=>t({...e,fromDay:i})}),p.jsx(ke,{label:"To",value:e.toDay,onChange:i=>t({...e,toDay:i})}),p.jsxs("span",{className:"flex items-center gap-1.5 rounded-lg border border-[var(--line)] px-2.5 py-1.5 text-[11px] text-[var(--muted)]",children:[p.jsx("span",{className:`dot ${s?"s-ok pulse":"s-failed"}`,"aria-hidden":!0}),"live ",r>0?`· ${r}`:""]})]})]})}function ke({label:e,value:t,onChange:s}){return p.jsxs("label",{className:"flex items-center gap-1.5 rounded-lg border border-[var(--line)] bg-[var(--panel)] px-2.5 py-1 text-[11px] text-[var(--muted)]",children:[p.jsx("span",{className:"uppercase tracking-wider",children:e}),p.jsx("input",{type:"date",value:t,onChange:r=>{const i=r.target.value;Cr(i)&&s(i)},className:"mono bg-transparent text-[var(--text)] outline-none"})]})}const tn=new sr({defaultOptions:{queries:{refetchInterval:5e3,refetchOnWindowFocus:!1,retry:1}}}),Ke=document.getElementById("root");Ke&&ks.createRoot(Ke).render(p.jsx(C.StrictMode,{children:p.jsx(or,{client:tn,children:p.jsx(Jr,{})})}));
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:before,:after{--tw-content: ""}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:JetBrains Mono,ui-monospace,SFMono-Regular,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]:where(:not([hidden=until-found])){display:none}.container{width:100%}@media (min-width: 640px){.container{max-width:640px}}@media (min-width: 768px){.container{max-width:768px}}@media (min-width: 1024px){.container{max-width:1024px}}@media (min-width: 1280px){.container{max-width:1280px}}@media (min-width: 1536px){.container{max-width:1536px}}.relative{position:relative}.z-10{z-index:10}.mx-auto{margin-left:auto;margin-right:auto}.mb-2{margin-bottom:.5rem}.mb-3{margin-bottom:.75rem}.mb-5{margin-bottom:1.25rem}.ml-auto{margin-left:auto}.mt-0\.5{margin-top:.125rem}.mt-1{margin-top:.25rem}.mt-2{margin-top:.5rem}.mt-3{margin-top:.75rem}.block{display:block}.flex{display:flex}.inline-flex{display:inline-flex}.table{display:table}.grid{display:grid}.h-2{height:.5rem}.h-2\.5{height:.625rem}.h-4{height:1rem}.h-8{height:2rem}.max-h-\[520px\]{max-height:520px}.min-h-full{min-height:100%}.w-2{width:.5rem}.w-2\.5{width:.625rem}.w-24{width:6rem}.w-28{width:7rem}.w-32{width:8rem}.w-4{width:1rem}.w-40{width:10rem}.w-8{width:2rem}.w-9{width:2.25rem}.w-fit{width:-moz-fit-content;width:fit-content}.w-full{width:100%}.min-w-0{min-width:0px}.min-w-\[520px\]{min-width:520px}.min-w-\[560px\]{min-width:560px}.min-w-\[640px\]{min-width:640px}.max-w-\[1180px\]{max-width:1180px}.max-w-\[220px\]{max-width:220px}.max-w-\[240px\]{max-width:240px}.max-w-\[420px\]{max-width:420px}.flex-1{flex:1 1 0%}.shrink-0{flex-shrink:0}.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}@keyframes pulse{50%{opacity:.5}}.animate-pulse{animation:pulse 2s cubic-bezier(.4,0,.6,1) infinite}.cursor-pointer{cursor:pointer}.select-none{-webkit-user-select:none;-moz-user-select:none;user-select:none}.grid-cols-1{grid-template-columns:repeat(1,minmax(0,1fr))}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.place-items-center{place-items:center}.items-start{align-items:flex-start}.items-end{align-items:flex-end}.items-center{align-items:center}.items-baseline{align-items:baseline}.justify-end{justify-content:flex-end}.justify-between{justify-content:space-between}.gap-1{gap:.25rem}.gap-1\.5{gap:.375rem}.gap-2{gap:.5rem}.gap-2\.5{gap:.625rem}.gap-3{gap:.75rem}.gap-4{gap:1rem}.space-y-0\.5>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.125rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.125rem * var(--tw-space-y-reverse))}.space-y-1>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.25rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.25rem * var(--tw-space-y-reverse))}.space-y-1\.5>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.375rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.375rem * var(--tw-space-y-reverse))}.space-y-2>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.5rem * var(--tw-space-y-reverse))}.space-y-2\.5>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.625rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.625rem * var(--tw-space-y-reverse))}.space-y-6>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1.5rem * var(--tw-space-y-reverse))}.overflow-x-auto{overflow-x:auto}.overflow-y-auto{overflow-y:auto}.truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.rounded{border-radius:.25rem}.rounded-lg{border-radius:.5rem}.rounded-md{border-radius:.375rem}.rounded-sm{border-radius:.125rem}.border{border-width:1px}.border-b{border-bottom-width:1px}.border-dashed{border-style:dashed}.border-\[var\(--accent\)\]{border-color:var(--accent)}.border-\[var\(--line\)\]{border-color:var(--line)}.border-\[var\(--line-soft\)\]{border-color:var(--line-soft)}.border-transparent{border-color:transparent}.bg-\[var\(--panel\)\]{background-color:var(--panel)}.bg-\[var\(--panel-2\)\]{background-color:var(--panel-2)}.bg-transparent{background-color:transparent}.p-2{padding:.5rem}.p-3{padding:.75rem}.p-4{padding:1rem}.p-6{padding:1.5rem}.px-1{padding-left:.25rem;padding-right:.25rem}.px-1\.5{padding-left:.375rem;padding-right:.375rem}.px-2{padding-left:.5rem;padding-right:.5rem}.px-2\.5{padding-left:.625rem;padding-right:.625rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-5{padding-left:1.25rem;padding-right:1.25rem}.py-0\.5{padding-top:.125rem;padding-bottom:.125rem}.py-1{padding-top:.25rem;padding-bottom:.25rem}.py-1\.5{padding-top:.375rem;padding-bottom:.375rem}.py-10{padding-top:2.5rem;padding-bottom:2.5rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-2\.5{padding-top:.625rem;padding-bottom:.625rem}.py-5{padding-top:1.25rem;padding-bottom:1.25rem}.py-6{padding-top:1.5rem;padding-bottom:1.5rem}.pl-4{padding-left:1rem}.pr-4{padding-right:1rem}.text-left{text-align:left}.text-right{text-align:right}.text-2xl{font-size:1.5rem;line-height:2rem}.text-\[10px\]{font-size:10px}.text-\[11px\]{font-size:11px}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xs{font-size:.75rem;line-height:1rem}.font-medium{font-weight:500}.font-semibold{font-weight:600}.uppercase{text-transform:uppercase}.leading-none{line-height:1}.tracking-\[0\.2em\]{letter-spacing:.2em}.tracking-tight{letter-spacing:-.025em}.tracking-wider{letter-spacing:.05em}.text-\[var\(--accent\)\]{color:var(--accent)}.text-\[var\(--bad\)\]{color:var(--bad)}.text-\[var\(--good\)\]{color:var(--good)}.text-\[var\(--muted\)\]{color:var(--muted)}.text-\[var\(--text\)\]{color:var(--text)}.text-\[var\(--warn\)\]{color:var(--warn)}.outline-none{outline:2px solid transparent;outline-offset:2px}.ring{--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(3px + var(--tw-ring-offset-width)) var(--tw-ring-color);box-shadow:var(--tw-ring-offset-shadow),var(--tw-ring-shadow),var(--tw-shadow, 0 0 #0000)}.filter{filter:var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow)}.transition-colors{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}:root{--bg: #08080b;--panel: #0d0d12;--panel-2: #101017;--line: #1d1d26;--line-soft: #16161d;--text: #e8e8ee;--muted: #7c7c88;--accent: #a78bfa;--accent-2: #22d3ee;--good: #34d399;--warn: #fbbf24;--bad: #f87171}*{box-sizing:border-box}html,body,#root{height:100%}body{margin:0;background:var(--bg);color:var(--text);font-family:Space Grotesk,ui-sans-serif,system-ui,sans-serif;-webkit-font-smoothing:antialiased}.app-bg{position:fixed;top:0;right:0;bottom:0;left:0;z-index:0;pointer-events:none;background-image:radial-gradient(900px 420px at 82% -10%,rgba(167,139,250,.1),transparent 70%),radial-gradient(700px 360px at 8% -12%,rgba(34,211,238,.06),transparent 70%),linear-gradient(to right,var(--line-soft) 1px,transparent 1px),linear-gradient(to bottom,var(--line-soft) 1px,transparent 1px);background-size:100% 100%,100% 100%,46px 46px,46px 46px;-webkit-mask-image:linear-gradient(to bottom,black,black 62%,transparent);mask-image:linear-gradient(to bottom,black,black 62%,transparent);opacity:.55}.mono{font-family:JetBrains Mono,ui-monospace,monospace}.tnum{font-variant-numeric:tabular-nums}.panel{background:linear-gradient(180deg,var(--panel-2),var(--panel));border:1px solid var(--line);border-radius:12px}.s-ok,.s-completed,.s-success{color:var(--good)}.s-running,.s-pending{color:var(--accent-2)}.s-forbidden,.s-denied,.s-failed,.s-error{color:var(--bad)}.s-warn{color:var(--warn)}.dot{width:7px;height:7px;border-radius:999px;background:currentColor;box-shadow:0 0 0 3px color-mix(in srgb,currentColor 18%,transparent);display:inline-block}.pulse{animation:pulse 1.6s ease-in-out infinite}@keyframes pulse{0%,to{opacity:1}50%{opacity:.35}}@keyframes rise{0%{opacity:0;transform:translateY(6px)}to{opacity:1;transform:none}}.rise{animation:rise .32s cubic-bezier(.2,.7,.2,1) both}.bar-track{background:var(--line);border-radius:999px;overflow:hidden}.bar-fill{height:100%;border-radius:999px;background:linear-gradient(90deg,var(--accent),var(--accent-2))}::-webkit-scrollbar{width:10px;height:10px}::-webkit-scrollbar-thumb{background:#26262c;border:3px solid var(--bg);border-radius:999px}.placeholder\:text-\[var\(--muted\)\]::-moz-placeholder{color:var(--muted)}.placeholder\:text-\[var\(--muted\)\]::placeholder{color:var(--muted)}.hover\:bg-\[var\(--panel-2\)\]:hover{background-color:var(--panel-2)}.hover\:text-\[var\(--text\)\]:hover{color:var(--text)}.disabled\:opacity-40:disabled{opacity:.4}.disabled\:opacity-50:disabled{opacity:.5}@media (min-width: 640px){.sm\:flex-row{flex-direction:row}.sm\:items-center{align-items:center}}@media (min-width: 768px){.md\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}}@media (min-width: 1024px){.lg\:col-span-2{grid-column:span 2 / span 2}.lg\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.lg\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}}
|