@chenpu17/cc-gw 0.7.19 → 0.7.21

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 (32) hide show
  1. package/package.json +1 -1
  2. package/src/server/dist/index.js +42 -27
  3. package/src/web/dist/assets/{About-BA_VxEEw.js → About-Bjq70P_K.js} +2 -2
  4. package/src/web/dist/assets/ApiKeys-BHwlIBRG.js +16 -0
  5. package/src/web/dist/assets/{Dashboard-BV9q_ZEH.js → Dashboard-Bv6E5M2u.js} +1 -1
  6. package/src/web/dist/assets/{Events-CVDX7Sdl.js → Events-DyqUKr1b.js} +1 -1
  7. package/src/web/dist/assets/{Help-Q8aahW1e.js → Help-BNn_Zuo4.js} +1 -1
  8. package/src/web/dist/assets/{Login-Cc9PcXNz.js → Login-BHXuuVq3.js} +1 -1
  9. package/src/web/dist/assets/Logs-CRnJOy2J.js +6 -0
  10. package/src/web/dist/assets/{ModelManagement-Bb8NWZJD.js → ModelManagement-DAE8AYAE.js} +1 -1
  11. package/src/web/dist/assets/{PageHeader-DE87PlB_.js → PageHeader-D2u2opjK.js} +1 -1
  12. package/src/web/dist/assets/{PageSection-BW4UtaTE.js → PageSection-jfq2rgUu.js} +1 -1
  13. package/src/web/dist/assets/Settings-CssUPWdg.js +6 -0
  14. package/src/web/dist/assets/{Skeleton-DKmc2Oau.js → Skeleton-BwMNCVcg.js} +1 -1
  15. package/src/web/dist/assets/{card-B5QaMdIj.js → card-C9wVDhpJ.js} +1 -1
  16. package/src/web/dist/assets/{dialog-Bl93c96O.js → dialog-DbEoPxgf.js} +1 -1
  17. package/src/web/dist/assets/index-B1EJcuR-.css +1 -0
  18. package/src/web/dist/assets/{index-Bkl9YQUf.js → index-BjqieXJo.js} +1 -1
  19. package/src/web/dist/assets/{index-iaYfODK6.js → index-Blclkvp7.js} +4 -4
  20. package/src/web/dist/assets/{info-Dtepvi_0.js → info-BmVX8zJd.js} +1 -1
  21. package/src/web/dist/assets/{input-CRfONI49.js → input-CGgq_gCJ.js} +1 -1
  22. package/src/web/dist/assets/{label-sf3QNge5.js → label-BGUvZ4t2.js} +1 -1
  23. package/src/web/dist/assets/{refresh-cw-ZDTq8wum.js → refresh-cw-D7rJxbFV.js} +1 -1
  24. package/src/web/dist/assets/{select-DfAJfUCL.js → select-Chuh7X1A.js} +1 -1
  25. package/src/web/dist/assets/{shield-wbL9EF4o.js → shield-Beuqdf31.js} +1 -1
  26. package/src/web/dist/assets/{switch-DTxmu4vA.js → switch-XbPwmM_b.js} +1 -1
  27. package/src/web/dist/assets/{useApiQuery-LZxVJXA3.js → useApiQuery-DiX6xcfY.js} +1 -1
  28. package/src/web/dist/index.html +2 -2
  29. package/src/web/dist/assets/ApiKeys-9iuHXiuE.js +0 -16
  30. package/src/web/dist/assets/Logs-EvCIbsmH.js +0 -6
  31. package/src/web/dist/assets/Settings-hk35KMN5.js +0 -6
  32. package/src/web/dist/assets/index-DDEa11GU.css +0 -1
@@ -1,4 +1,4 @@
1
- import{c}from"./index-iaYfODK6.js";/**
1
+ import{c}from"./index-Blclkvp7.js";/**
2
2
  * @license lucide-react v0.344.0 - ISC
3
3
  *
4
4
  * This source code is licensed under the ISC license.
@@ -1 +1 @@
1
- import{r as s,j as i,a as n}from"./index-iaYfODK6.js";const a=s.forwardRef(({className:e,type:r,...o},t)=>i.jsx("input",{type:r,className:n("flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-base ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",e),ref:t,...o}));a.displayName="Input";export{a as I};
1
+ import{r as s,j as i,a as n}from"./index-Blclkvp7.js";const a=s.forwardRef(({className:e,type:r,...o},t)=>i.jsx("input",{type:r,className:n("flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-base ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",e),ref:t,...o}));a.displayName="Input";export{a as I};
@@ -1 +1 @@
1
- import{r as o,j as r,a as t}from"./index-iaYfODK6.js";const l=o.forwardRef(({className:e,...a},s)=>r.jsx("label",{ref:s,className:t("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",e),...a}));l.displayName="Label";export{l as L};
1
+ import{r as o,j as r,a as t}from"./index-Blclkvp7.js";const l=o.forwardRef(({className:e,...a},s)=>r.jsx("label",{ref:s,className:t("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",e),...a}));l.displayName="Label";export{l as L};
@@ -1,4 +1,4 @@
1
- import{c as e}from"./index-iaYfODK6.js";/**
1
+ import{c as e}from"./index-Blclkvp7.js";/**
2
2
  * @license lucide-react v0.344.0 - ISC
3
3
  *
4
4
  * This source code is licensed under the ISC license.
@@ -1,4 +1,4 @@
1
- import{c as Pe,r as n,o as Re,a5 as mt,p as be,j as r,R as ht,q as vt,v as Ie,a6 as gt,w as k,a7 as $,P as j,a8 as St,A as xt,x as P,z as wt,f as Ee,a9 as yt,D as Ct,H as It,E as Tt,G as bt,I as Nt,J as Pt,K as Rt,M as Et,a as G,Z as _t}from"./index-iaYfODK6.js";/**
1
+ import{c as Pe,r as n,o as Re,a5 as mt,p as be,j as r,R as ht,q as vt,v as Ie,a6 as gt,w as k,a7 as $,P as j,a8 as St,A as xt,x as P,z as wt,f as Ee,a9 as yt,D as Ct,H as It,E as Tt,G as bt,I as Nt,J as Pt,K as Rt,M as Et,a as G,Z as _t}from"./index-Blclkvp7.js";/**
2
2
  * @license lucide-react v0.344.0 - ISC
3
3
  *
4
4
  * This source code is licensed under the ISC license.
@@ -1,4 +1,4 @@
1
- import{c as e}from"./index-iaYfODK6.js";/**
1
+ import{c as e}from"./index-Blclkvp7.js";/**
2
2
  * @license lucide-react v0.344.0 - ISC
3
3
  *
4
4
  * This source code is licensed under the ISC license.
@@ -1 +1 @@
1
- import{r as s,w as C,p as I,j as a,q as M,P as y,x as H,a4 as q,a as g}from"./index-iaYfODK6.js";import{u as A}from"./select-DfAJfUCL.js";var b="Switch",[U]=M(b),[z,L]=U(b),P=s.forwardRef((t,o)=>{const{__scopeSwitch:e,name:n,checked:r,defaultChecked:m,required:d,disabled:c,value:u="on",onCheckedChange:w,form:i,...v}=t,[l,p]=s.useState(null),S=C(o,h=>p(h)),k=s.useRef(!1),x=l?i||!!l.closest("form"):!0,[f,B]=I({prop:r,defaultProp:m??!1,onChange:w,caller:b});return a.jsxs(z,{scope:e,checked:f,disabled:c,children:[a.jsx(y.button,{type:"button",role:"switch","aria-checked":f,"aria-required":d,"data-state":j(f),"data-disabled":c?"":void 0,disabled:c,value:u,...v,ref:S,onClick:H(t.onClick,h=>{B(T=>!T),x&&(k.current=h.isPropagationStopped(),k.current||h.stopPropagation())})}),x&&a.jsx(N,{control:l,bubbles:!k.current,name:n,value:u,checked:f,required:d,disabled:c,form:i,style:{transform:"translateX(-100%)"}})]})});P.displayName=b;var E="SwitchThumb",R=s.forwardRef((t,o)=>{const{__scopeSwitch:e,...n}=t,r=L(E,e);return a.jsx(y.span,{"data-state":j(r.checked),"data-disabled":r.disabled?"":void 0,...n,ref:o})});R.displayName=E;var O="SwitchBubbleInput",N=s.forwardRef(({__scopeSwitch:t,control:o,checked:e,bubbles:n=!0,...r},m)=>{const d=s.useRef(null),c=C(d,m),u=A(e),w=q(o);return s.useEffect(()=>{const i=d.current;if(!i)return;const v=window.HTMLInputElement.prototype,p=Object.getOwnPropertyDescriptor(v,"checked").set;if(u!==e&&p){const S=new Event("click",{bubbles:n});p.call(i,e),i.dispatchEvent(S)}},[u,e,n]),a.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:e,...r,tabIndex:-1,ref:c,style:{...r.style,...w,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});N.displayName=O;function j(t){return t?"checked":"unchecked"}var _=P,D=R;const F=s.forwardRef(({className:t,...o},e)=>a.jsx(_,{className:g("peer inline-flex h-6 w-11 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input",t),...o,ref:e,children:a.jsx(D,{className:g("pointer-events-none block h-5 w-5 rounded-full bg-background shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-5 data-[state=unchecked]:translate-x-0")})}));F.displayName=_.displayName;export{F as S};
1
+ import{r as s,w as C,p as I,j as a,q as M,P as y,x as H,a4 as q,a as g}from"./index-Blclkvp7.js";import{u as A}from"./select-Chuh7X1A.js";var b="Switch",[U]=M(b),[z,L]=U(b),P=s.forwardRef((t,o)=>{const{__scopeSwitch:e,name:n,checked:r,defaultChecked:m,required:d,disabled:c,value:u="on",onCheckedChange:w,form:i,...v}=t,[l,p]=s.useState(null),S=C(o,h=>p(h)),k=s.useRef(!1),x=l?i||!!l.closest("form"):!0,[f,B]=I({prop:r,defaultProp:m??!1,onChange:w,caller:b});return a.jsxs(z,{scope:e,checked:f,disabled:c,children:[a.jsx(y.button,{type:"button",role:"switch","aria-checked":f,"aria-required":d,"data-state":j(f),"data-disabled":c?"":void 0,disabled:c,value:u,...v,ref:S,onClick:H(t.onClick,h=>{B(T=>!T),x&&(k.current=h.isPropagationStopped(),k.current||h.stopPropagation())})}),x&&a.jsx(N,{control:l,bubbles:!k.current,name:n,value:u,checked:f,required:d,disabled:c,form:i,style:{transform:"translateX(-100%)"}})]})});P.displayName=b;var E="SwitchThumb",R=s.forwardRef((t,o)=>{const{__scopeSwitch:e,...n}=t,r=L(E,e);return a.jsx(y.span,{"data-state":j(r.checked),"data-disabled":r.disabled?"":void 0,...n,ref:o})});R.displayName=E;var O="SwitchBubbleInput",N=s.forwardRef(({__scopeSwitch:t,control:o,checked:e,bubbles:n=!0,...r},m)=>{const d=s.useRef(null),c=C(d,m),u=A(e),w=q(o);return s.useEffect(()=>{const i=d.current;if(!i)return;const v=window.HTMLInputElement.prototype,p=Object.getOwnPropertyDescriptor(v,"checked").set;if(u!==e&&p){const S=new Event("click",{bubbles:n});p.call(i,e),i.dispatchEvent(S)}},[u,e,n]),a.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:e,...r,tabIndex:-1,ref:c,style:{...r.style,...w,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});N.displayName=O;function j(t){return t?"checked":"unchecked"}var _=P,D=R;const F=s.forwardRef(({className:t,...o},e)=>a.jsx(_,{className:g("peer inline-flex h-6 w-11 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input",t),...o,ref:e,children:a.jsx(D,{className:g("pointer-events-none block h-5 w-5 rounded-full bg-background shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-5 data-[state=unchecked]:translate-x-0")})}));F.displayName=_.displayName;export{F as S};
@@ -1 +1 @@
1
- var ft=e=>{throw TypeError(e)};var Y=(e,t,s)=>t.has(e)||ft("Cannot "+s);var i=(e,t,s)=>(Y(e,t,"read from private field"),s?s.call(e):t.get(e)),b=(e,t,s)=>t.has(e)?ft("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,s),u=(e,t,s,r)=>(Y(e,t,"write to private field"),r?r.call(e,s):t.set(e,s),s),d=(e,t,s)=>(Y(e,t,"access private method"),s);import{S as It,ab as pt,ac as S,s as Z,ad as j,l as $,ae as tt,af as bt,ag as Ot,ah as q,ai as Tt,aj as wt,ak as yt,n as St,r as I,m as Qt,k as Mt,al as xt,d as _t,t as Ut}from"./index-iaYfODK6.js";var g,a,H,y,Q,U,E,O,z,F,D,M,x,T,P,n,B,et,st,it,rt,at,nt,ht,Ct,vt,Ft=(vt=class extends It{constructor(t,s){super();b(this,n);b(this,g);b(this,a);b(this,H);b(this,y);b(this,Q);b(this,U);b(this,E);b(this,O);b(this,z);b(this,F);b(this,D);b(this,M);b(this,x);b(this,T);b(this,P,new Set);this.options=s,u(this,g,t),u(this,O,null),u(this,E,pt()),this.bindMethods(),this.setOptions(s)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(i(this,a).addObserver(this),gt(i(this,a),this.options)?d(this,n,B).call(this):this.updateResult(),d(this,n,rt).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return ot(i(this,a),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return ot(i(this,a),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,d(this,n,at).call(this),d(this,n,nt).call(this),i(this,a).removeObserver(this)}setOptions(t){const s=this.options,r=i(this,a);if(this.options=i(this,g).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof S(this.options.enabled,i(this,a))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");d(this,n,ht).call(this),i(this,a).setOptions(this.options),s._defaulted&&!Z(this.options,s)&&i(this,g).getQueryCache().notify({type:"observerOptionsUpdated",query:i(this,a),observer:this});const h=this.hasListeners();h&&mt(i(this,a),r,this.options,s)&&d(this,n,B).call(this),this.updateResult(),h&&(i(this,a)!==r||S(this.options.enabled,i(this,a))!==S(s.enabled,i(this,a))||j(this.options.staleTime,i(this,a))!==j(s.staleTime,i(this,a)))&&d(this,n,et).call(this);const o=d(this,n,st).call(this);h&&(i(this,a)!==r||S(this.options.enabled,i(this,a))!==S(s.enabled,i(this,a))||o!==i(this,T))&&d(this,n,it).call(this,o)}getOptimisticResult(t){const s=i(this,g).getQueryCache().build(i(this,g),t),r=this.createResult(s,t);return Pt(this,r)&&(u(this,y,r),u(this,U,this.options),u(this,Q,i(this,a).state)),r}getCurrentResult(){return i(this,y)}trackResult(t,s){return new Proxy(t,{get:(r,h)=>(this.trackProp(h),s==null||s(h),h==="promise"&&!this.options.experimental_prefetchInRender&&i(this,E).status==="pending"&&i(this,E).reject(new Error("experimental_prefetchInRender feature flag is not enabled")),Reflect.get(r,h))})}trackProp(t){i(this,P).add(t)}getCurrentQuery(){return i(this,a)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const s=i(this,g).defaultQueryOptions(t),r=i(this,g).getQueryCache().build(i(this,g),s);return r.fetch().then(()=>this.createResult(r,s))}fetch(t){return d(this,n,B).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),i(this,y)))}createResult(t,s){var dt;const r=i(this,a),h=this.options,o=i(this,y),c=i(this,Q),w=i(this,U),v=t!==r?t.state:i(this,H),{state:L}=t;let l={...L},N=!1,f;if(s._optimisticResults){const R=this.hasListeners(),W=!R&&gt(t,s),_=R&&mt(t,r,s,h);(W||_)&&(l={...l,...wt(L.data,t.options)}),s._optimisticResults==="isRestoring"&&(l.fetchStatus="idle")}let{error:k,errorUpdatedAt:A,status:m}=l;f=l.data;let V=!1;if(s.placeholderData!==void 0&&f===void 0&&m==="pending"){let R;o!=null&&o.isPlaceholderData&&s.placeholderData===(w==null?void 0:w.placeholderData)?(R=o.data,V=!0):R=typeof s.placeholderData=="function"?s.placeholderData((dt=i(this,D))==null?void 0:dt.state.data,i(this,D)):s.placeholderData,R!==void 0&&(m="success",f=yt(o==null?void 0:o.data,R,s),N=!0)}if(s.select&&f!==void 0&&!V)if(o&&f===(c==null?void 0:c.data)&&s.select===i(this,z))f=i(this,F);else try{u(this,z,s.select),f=s.select(f),f=yt(o==null?void 0:o.data,f,s),u(this,F,f),u(this,O,null)}catch(R){u(this,O,R)}i(this,O)&&(k=i(this,O),f=i(this,F),A=Date.now(),m="error");const G=l.fetchStatus==="fetching",J=m==="pending",X=m==="error",ut=J&&G,lt=f!==void 0,C={status:m,fetchStatus:l.fetchStatus,isPending:J,isSuccess:m==="success",isError:X,isInitialLoading:ut,isLoading:ut,data:f,dataUpdatedAt:l.dataUpdatedAt,error:k,errorUpdatedAt:A,failureCount:l.fetchFailureCount,failureReason:l.fetchFailureReason,errorUpdateCount:l.errorUpdateCount,isFetched:l.dataUpdateCount>0||l.errorUpdateCount>0,isFetchedAfterMount:l.dataUpdateCount>v.dataUpdateCount||l.errorUpdateCount>v.errorUpdateCount,isFetching:G,isRefetching:G&&!J,isLoadingError:X&&!lt,isPaused:l.fetchStatus==="paused",isPlaceholderData:N,isRefetchError:X&&lt,isStale:ct(t,s),refetch:this.refetch,promise:i(this,E),isEnabled:S(s.enabled,t)!==!1};if(this.options.experimental_prefetchInRender){const R=K=>{C.status==="error"?K.reject(C.error):C.data!==void 0&&K.resolve(C.data)},W=()=>{const K=u(this,E,C.promise=pt());R(K)},_=i(this,E);switch(_.status){case"pending":t.queryHash===r.queryHash&&R(_);break;case"fulfilled":(C.status==="error"||C.data!==_.value)&&W();break;case"rejected":(C.status!=="error"||C.error!==_.reason)&&W();break}}return C}updateResult(){const t=i(this,y),s=this.createResult(i(this,a),this.options);if(u(this,Q,i(this,a).state),u(this,U,this.options),i(this,Q).data!==void 0&&u(this,D,i(this,a)),Z(s,t))return;u(this,y,s);const r=()=>{if(!t)return!0;const{notifyOnChangeProps:h}=this.options,o=typeof h=="function"?h():h;if(o==="all"||!o&&!i(this,P).size)return!0;const c=new Set(o??i(this,P));return this.options.throwOnError&&c.add("error"),Object.keys(i(this,y)).some(w=>{const p=w;return i(this,y)[p]!==t[p]&&c.has(p)})};d(this,n,Ct).call(this,{listeners:r()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&d(this,n,rt).call(this)}},g=new WeakMap,a=new WeakMap,H=new WeakMap,y=new WeakMap,Q=new WeakMap,U=new WeakMap,E=new WeakMap,O=new WeakMap,z=new WeakMap,F=new WeakMap,D=new WeakMap,M=new WeakMap,x=new WeakMap,T=new WeakMap,P=new WeakMap,n=new WeakSet,B=function(t){d(this,n,ht).call(this);let s=i(this,a).fetch(this.options,t);return t!=null&&t.throwOnError||(s=s.catch($)),s},et=function(){d(this,n,at).call(this);const t=j(this.options.staleTime,i(this,a));if(tt||i(this,y).isStale||!bt(t))return;const r=Ot(i(this,y).dataUpdatedAt,t)+1;u(this,M,q.setTimeout(()=>{i(this,y).isStale||this.updateResult()},r))},st=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(i(this,a)):this.options.refetchInterval)??!1},it=function(t){d(this,n,nt).call(this),u(this,T,t),!(tt||S(this.options.enabled,i(this,a))===!1||!bt(i(this,T))||i(this,T)===0)&&u(this,x,q.setInterval(()=>{(this.options.refetchIntervalInBackground||Tt.isFocused())&&d(this,n,B).call(this)},i(this,T)))},rt=function(){d(this,n,et).call(this),d(this,n,it).call(this,d(this,n,st).call(this))},at=function(){i(this,M)&&(q.clearTimeout(i(this,M)),u(this,M,void 0))},nt=function(){i(this,x)&&(q.clearInterval(i(this,x)),u(this,x,void 0))},ht=function(){const t=i(this,g).getQueryCache().build(i(this,g),this.options);if(t===i(this,a))return;const s=i(this,a);u(this,a,t),u(this,H,t.state),this.hasListeners()&&(s==null||s.removeObserver(this),t.addObserver(this))},Ct=function(t){St.batch(()=>{t.listeners&&this.listeners.forEach(s=>{s(i(this,y))}),i(this,g).getQueryCache().notify({query:i(this,a),type:"observerResultsUpdated"})})},vt);function Dt(e,t){return S(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function gt(e,t){return Dt(e,t)||e.state.data!==void 0&&ot(e,t,t.refetchOnMount)}function ot(e,t,s){if(S(t.enabled,e)!==!1&&j(t.staleTime,e)!=="static"){const r=typeof s=="function"?s(e):s;return r==="always"||r!==!1&&ct(e,t)}return!1}function mt(e,t,s,r){return(e!==t||S(r.enabled,e)===!1)&&(!s.suspense||e.state.status!=="error")&&ct(e,s)}function ct(e,t){return S(t.enabled,e)!==!1&&e.isStaleByTime(j(t.staleTime,e))}function Pt(e,t){return!Z(e.getCurrentResult(),t)}var Et=I.createContext(!1),Lt=()=>I.useContext(Et);Et.Provider;function Nt(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var kt=I.createContext(Nt()),At=()=>I.useContext(kt),Bt=(e,t)=>{(e.suspense||e.throwOnError||e.experimental_prefetchInRender)&&(t.isReset()||(e.retryOnMount=!1))},jt=e=>{I.useEffect(()=>{e.clearReset()},[e])},Ht=({result:e,errorResetBoundary:t,throwOnError:s,query:r,suspense:h})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&(h&&e.data===void 0||Qt(s,[e.error,r])),zt=e=>{if(e.suspense){const s=h=>h==="static"?h:Math.max(h??1e3,1e3),r=e.staleTime;e.staleTime=typeof r=="function"?(...h)=>s(r(...h)):s(r),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3))}},Vt=(e,t)=>e.isLoading&&e.isFetching&&!t,Wt=(e,t)=>(e==null?void 0:e.suspense)&&t.isPending,Rt=(e,t,s)=>t.fetchOptimistic(e).catch(()=>{s.clearReset()});function Kt(e,t,s){var l,N,f,k,A;const r=Lt(),h=At(),o=Mt(),c=o.defaultQueryOptions(e);(N=(l=o.getDefaultOptions().queries)==null?void 0:l._experimental_beforeQuery)==null||N.call(l,c),c._optimisticResults=r?"isRestoring":"optimistic",zt(c),Bt(c,h),jt(h);const w=!o.getQueryCache().get(c.queryHash),[p]=I.useState(()=>new t(o,c)),v=p.getOptimisticResult(c),L=!r&&e.subscribed!==!1;if(I.useSyncExternalStore(I.useCallback(m=>{const V=L?p.subscribe(St.batchCalls(m)):$;return p.updateResult(),V},[p,L]),()=>p.getCurrentResult(),()=>p.getCurrentResult()),I.useEffect(()=>{p.setOptions(c)},[c,p]),Wt(c,v))throw Rt(c,p,h);if(Ht({result:v,errorResetBoundary:h,throwOnError:c.throwOnError,query:o.getQueryCache().get(c.queryHash),suspense:c.suspense}))throw v.error;if((k=(f=o.getDefaultOptions().queries)==null?void 0:f._experimental_afterQuery)==null||k.call(f,c,v),c.experimental_prefetchInRender&&!tt&&Vt(v,r)){const m=w?Rt(c,p,h):(A=o.getQueryCache().get(c.queryHash))==null?void 0:A.promise;m==null||m.catch($).finally(()=>{p.updateResult()})}return c.notifyOnChangeProps?v:p.trackResult(v)}function qt(e,t){return Kt(e,Ft)}function Yt(e,t,s){return qt({queryKey:e,placeholderData:xt,...s,queryFn:async()=>{try{return(await _t.request(t)).data}catch(r){throw Ut(r)}}})}export{qt as a,Yt as u};
1
+ var ft=e=>{throw TypeError(e)};var Y=(e,t,s)=>t.has(e)||ft("Cannot "+s);var i=(e,t,s)=>(Y(e,t,"read from private field"),s?s.call(e):t.get(e)),b=(e,t,s)=>t.has(e)?ft("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,s),u=(e,t,s,r)=>(Y(e,t,"write to private field"),r?r.call(e,s):t.set(e,s),s),d=(e,t,s)=>(Y(e,t,"access private method"),s);import{S as It,ab as pt,ac as S,s as Z,ad as j,l as $,ae as tt,af as bt,ag as Ot,ah as q,ai as Tt,aj as wt,ak as yt,n as St,r as I,m as Qt,k as Mt,al as xt,d as _t,t as Ut}from"./index-Blclkvp7.js";var g,a,H,y,Q,U,E,O,z,F,D,M,x,T,P,n,B,et,st,it,rt,at,nt,ht,Ct,vt,Ft=(vt=class extends It{constructor(t,s){super();b(this,n);b(this,g);b(this,a);b(this,H);b(this,y);b(this,Q);b(this,U);b(this,E);b(this,O);b(this,z);b(this,F);b(this,D);b(this,M);b(this,x);b(this,T);b(this,P,new Set);this.options=s,u(this,g,t),u(this,O,null),u(this,E,pt()),this.bindMethods(),this.setOptions(s)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(i(this,a).addObserver(this),gt(i(this,a),this.options)?d(this,n,B).call(this):this.updateResult(),d(this,n,rt).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return ot(i(this,a),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return ot(i(this,a),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,d(this,n,at).call(this),d(this,n,nt).call(this),i(this,a).removeObserver(this)}setOptions(t){const s=this.options,r=i(this,a);if(this.options=i(this,g).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof S(this.options.enabled,i(this,a))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");d(this,n,ht).call(this),i(this,a).setOptions(this.options),s._defaulted&&!Z(this.options,s)&&i(this,g).getQueryCache().notify({type:"observerOptionsUpdated",query:i(this,a),observer:this});const h=this.hasListeners();h&&mt(i(this,a),r,this.options,s)&&d(this,n,B).call(this),this.updateResult(),h&&(i(this,a)!==r||S(this.options.enabled,i(this,a))!==S(s.enabled,i(this,a))||j(this.options.staleTime,i(this,a))!==j(s.staleTime,i(this,a)))&&d(this,n,et).call(this);const o=d(this,n,st).call(this);h&&(i(this,a)!==r||S(this.options.enabled,i(this,a))!==S(s.enabled,i(this,a))||o!==i(this,T))&&d(this,n,it).call(this,o)}getOptimisticResult(t){const s=i(this,g).getQueryCache().build(i(this,g),t),r=this.createResult(s,t);return Pt(this,r)&&(u(this,y,r),u(this,U,this.options),u(this,Q,i(this,a).state)),r}getCurrentResult(){return i(this,y)}trackResult(t,s){return new Proxy(t,{get:(r,h)=>(this.trackProp(h),s==null||s(h),h==="promise"&&!this.options.experimental_prefetchInRender&&i(this,E).status==="pending"&&i(this,E).reject(new Error("experimental_prefetchInRender feature flag is not enabled")),Reflect.get(r,h))})}trackProp(t){i(this,P).add(t)}getCurrentQuery(){return i(this,a)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const s=i(this,g).defaultQueryOptions(t),r=i(this,g).getQueryCache().build(i(this,g),s);return r.fetch().then(()=>this.createResult(r,s))}fetch(t){return d(this,n,B).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),i(this,y)))}createResult(t,s){var dt;const r=i(this,a),h=this.options,o=i(this,y),c=i(this,Q),w=i(this,U),v=t!==r?t.state:i(this,H),{state:L}=t;let l={...L},N=!1,f;if(s._optimisticResults){const R=this.hasListeners(),W=!R&&gt(t,s),_=R&&mt(t,r,s,h);(W||_)&&(l={...l,...wt(L.data,t.options)}),s._optimisticResults==="isRestoring"&&(l.fetchStatus="idle")}let{error:k,errorUpdatedAt:A,status:m}=l;f=l.data;let V=!1;if(s.placeholderData!==void 0&&f===void 0&&m==="pending"){let R;o!=null&&o.isPlaceholderData&&s.placeholderData===(w==null?void 0:w.placeholderData)?(R=o.data,V=!0):R=typeof s.placeholderData=="function"?s.placeholderData((dt=i(this,D))==null?void 0:dt.state.data,i(this,D)):s.placeholderData,R!==void 0&&(m="success",f=yt(o==null?void 0:o.data,R,s),N=!0)}if(s.select&&f!==void 0&&!V)if(o&&f===(c==null?void 0:c.data)&&s.select===i(this,z))f=i(this,F);else try{u(this,z,s.select),f=s.select(f),f=yt(o==null?void 0:o.data,f,s),u(this,F,f),u(this,O,null)}catch(R){u(this,O,R)}i(this,O)&&(k=i(this,O),f=i(this,F),A=Date.now(),m="error");const G=l.fetchStatus==="fetching",J=m==="pending",X=m==="error",ut=J&&G,lt=f!==void 0,C={status:m,fetchStatus:l.fetchStatus,isPending:J,isSuccess:m==="success",isError:X,isInitialLoading:ut,isLoading:ut,data:f,dataUpdatedAt:l.dataUpdatedAt,error:k,errorUpdatedAt:A,failureCount:l.fetchFailureCount,failureReason:l.fetchFailureReason,errorUpdateCount:l.errorUpdateCount,isFetched:l.dataUpdateCount>0||l.errorUpdateCount>0,isFetchedAfterMount:l.dataUpdateCount>v.dataUpdateCount||l.errorUpdateCount>v.errorUpdateCount,isFetching:G,isRefetching:G&&!J,isLoadingError:X&&!lt,isPaused:l.fetchStatus==="paused",isPlaceholderData:N,isRefetchError:X&&lt,isStale:ct(t,s),refetch:this.refetch,promise:i(this,E),isEnabled:S(s.enabled,t)!==!1};if(this.options.experimental_prefetchInRender){const R=K=>{C.status==="error"?K.reject(C.error):C.data!==void 0&&K.resolve(C.data)},W=()=>{const K=u(this,E,C.promise=pt());R(K)},_=i(this,E);switch(_.status){case"pending":t.queryHash===r.queryHash&&R(_);break;case"fulfilled":(C.status==="error"||C.data!==_.value)&&W();break;case"rejected":(C.status!=="error"||C.error!==_.reason)&&W();break}}return C}updateResult(){const t=i(this,y),s=this.createResult(i(this,a),this.options);if(u(this,Q,i(this,a).state),u(this,U,this.options),i(this,Q).data!==void 0&&u(this,D,i(this,a)),Z(s,t))return;u(this,y,s);const r=()=>{if(!t)return!0;const{notifyOnChangeProps:h}=this.options,o=typeof h=="function"?h():h;if(o==="all"||!o&&!i(this,P).size)return!0;const c=new Set(o??i(this,P));return this.options.throwOnError&&c.add("error"),Object.keys(i(this,y)).some(w=>{const p=w;return i(this,y)[p]!==t[p]&&c.has(p)})};d(this,n,Ct).call(this,{listeners:r()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&d(this,n,rt).call(this)}},g=new WeakMap,a=new WeakMap,H=new WeakMap,y=new WeakMap,Q=new WeakMap,U=new WeakMap,E=new WeakMap,O=new WeakMap,z=new WeakMap,F=new WeakMap,D=new WeakMap,M=new WeakMap,x=new WeakMap,T=new WeakMap,P=new WeakMap,n=new WeakSet,B=function(t){d(this,n,ht).call(this);let s=i(this,a).fetch(this.options,t);return t!=null&&t.throwOnError||(s=s.catch($)),s},et=function(){d(this,n,at).call(this);const t=j(this.options.staleTime,i(this,a));if(tt||i(this,y).isStale||!bt(t))return;const r=Ot(i(this,y).dataUpdatedAt,t)+1;u(this,M,q.setTimeout(()=>{i(this,y).isStale||this.updateResult()},r))},st=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(i(this,a)):this.options.refetchInterval)??!1},it=function(t){d(this,n,nt).call(this),u(this,T,t),!(tt||S(this.options.enabled,i(this,a))===!1||!bt(i(this,T))||i(this,T)===0)&&u(this,x,q.setInterval(()=>{(this.options.refetchIntervalInBackground||Tt.isFocused())&&d(this,n,B).call(this)},i(this,T)))},rt=function(){d(this,n,et).call(this),d(this,n,it).call(this,d(this,n,st).call(this))},at=function(){i(this,M)&&(q.clearTimeout(i(this,M)),u(this,M,void 0))},nt=function(){i(this,x)&&(q.clearInterval(i(this,x)),u(this,x,void 0))},ht=function(){const t=i(this,g).getQueryCache().build(i(this,g),this.options);if(t===i(this,a))return;const s=i(this,a);u(this,a,t),u(this,H,t.state),this.hasListeners()&&(s==null||s.removeObserver(this),t.addObserver(this))},Ct=function(t){St.batch(()=>{t.listeners&&this.listeners.forEach(s=>{s(i(this,y))}),i(this,g).getQueryCache().notify({query:i(this,a),type:"observerResultsUpdated"})})},vt);function Dt(e,t){return S(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function gt(e,t){return Dt(e,t)||e.state.data!==void 0&&ot(e,t,t.refetchOnMount)}function ot(e,t,s){if(S(t.enabled,e)!==!1&&j(t.staleTime,e)!=="static"){const r=typeof s=="function"?s(e):s;return r==="always"||r!==!1&&ct(e,t)}return!1}function mt(e,t,s,r){return(e!==t||S(r.enabled,e)===!1)&&(!s.suspense||e.state.status!=="error")&&ct(e,s)}function ct(e,t){return S(t.enabled,e)!==!1&&e.isStaleByTime(j(t.staleTime,e))}function Pt(e,t){return!Z(e.getCurrentResult(),t)}var Et=I.createContext(!1),Lt=()=>I.useContext(Et);Et.Provider;function Nt(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var kt=I.createContext(Nt()),At=()=>I.useContext(kt),Bt=(e,t)=>{(e.suspense||e.throwOnError||e.experimental_prefetchInRender)&&(t.isReset()||(e.retryOnMount=!1))},jt=e=>{I.useEffect(()=>{e.clearReset()},[e])},Ht=({result:e,errorResetBoundary:t,throwOnError:s,query:r,suspense:h})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&(h&&e.data===void 0||Qt(s,[e.error,r])),zt=e=>{if(e.suspense){const s=h=>h==="static"?h:Math.max(h??1e3,1e3),r=e.staleTime;e.staleTime=typeof r=="function"?(...h)=>s(r(...h)):s(r),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3))}},Vt=(e,t)=>e.isLoading&&e.isFetching&&!t,Wt=(e,t)=>(e==null?void 0:e.suspense)&&t.isPending,Rt=(e,t,s)=>t.fetchOptimistic(e).catch(()=>{s.clearReset()});function Kt(e,t,s){var l,N,f,k,A;const r=Lt(),h=At(),o=Mt(),c=o.defaultQueryOptions(e);(N=(l=o.getDefaultOptions().queries)==null?void 0:l._experimental_beforeQuery)==null||N.call(l,c),c._optimisticResults=r?"isRestoring":"optimistic",zt(c),Bt(c,h),jt(h);const w=!o.getQueryCache().get(c.queryHash),[p]=I.useState(()=>new t(o,c)),v=p.getOptimisticResult(c),L=!r&&e.subscribed!==!1;if(I.useSyncExternalStore(I.useCallback(m=>{const V=L?p.subscribe(St.batchCalls(m)):$;return p.updateResult(),V},[p,L]),()=>p.getCurrentResult(),()=>p.getCurrentResult()),I.useEffect(()=>{p.setOptions(c)},[c,p]),Wt(c,v))throw Rt(c,p,h);if(Ht({result:v,errorResetBoundary:h,throwOnError:c.throwOnError,query:o.getQueryCache().get(c.queryHash),suspense:c.suspense}))throw v.error;if((k=(f=o.getDefaultOptions().queries)==null?void 0:f._experimental_afterQuery)==null||k.call(f,c,v),c.experimental_prefetchInRender&&!tt&&Vt(v,r)){const m=w?Rt(c,p,h):(A=o.getQueryCache().get(c.queryHash))==null?void 0:A.promise;m==null||m.catch($).finally(()=>{p.updateResult()})}return c.notifyOnChangeProps?v:p.trackResult(v)}function qt(e,t){return Kt(e,Ft)}function Yt(e,t,s){return qt({queryKey:e,placeholderData:xt,...s,queryFn:async()=>{try{return(await _t.request(t)).data}catch(r){throw Ut(r)}}})}export{qt as a,Yt as u};
@@ -5,8 +5,8 @@
5
5
  <meta name="viewport" content="width=device-width, initial-scale=1.0, shrink-to-fit=no" />
6
6
  <meta name="format-detection" content="telephone=no" />
7
7
  <title>cc-gw 控制台</title>
8
- <script type="module" crossorigin src="/assets/index-iaYfODK6.js"></script>
9
- <link rel="stylesheet" crossorigin href="/assets/index-DDEa11GU.css">
8
+ <script type="module" crossorigin src="/assets/index-Blclkvp7.js"></script>
9
+ <link rel="stylesheet" crossorigin href="/assets/index-B1EJcuR-.css">
10
10
  </head>
11
11
  <body class="bg-slate-50 text-slate-900 dark:bg-slate-900 dark:text-slate-50">
12
12
  <div id="root"></div>
@@ -1,16 +0,0 @@
1
- import{c as z,r as n,j as e,a as ne,u as q,b as Ne,W as be,e as c,Y as we,Z as ke,d as v,t as b}from"./index-iaYfODK6.js";import{E as Ee}from"./index-Bkl9YQUf.js";import{u as L}from"./useApiQuery-LZxVJXA3.js";import{P as Ce,B as C}from"./PageHeader-DE87PlB_.js";import{P as ee}from"./PageSection-BW4UtaTE.js";import{c as Se}from"./clipboard-CALi6bTW.js";import{I as De}from"./input-CRfONI49.js";import{L as M}from"./label-sf3QNge5.js";import{C as H,a as U}from"./card-B5QaMdIj.js";import{P as Te,D as O,a as W,b as P,c as R,d as se,e as F}from"./dialog-Bl93c96O.js";import{C as ae,S as Ae}from"./shield-wbL9EF4o.js";/**
2
- * @license lucide-react v0.344.0 - ISC
3
- *
4
- * This source code is licensed under the ISC license.
5
- * See the LICENSE file in the root directory of this source tree.
6
- */const Le=z("EyeOff",[["path",{d:"M9.88 9.88a3 3 0 1 0 4.24 4.24",key:"1jxqfv"}],["path",{d:"M10.73 5.08A10.43 10.43 0 0 1 12 5c7 0 10 7 10 7a13.16 13.16 0 0 1-1.67 2.68",key:"9wicm4"}],["path",{d:"M6.61 6.61A13.526 13.526 0 0 0 2 12s3 7 10 7a9.74 9.74 0 0 0 5.39-1.61",key:"1jreej"}],["line",{x1:"2",x2:"22",y1:"2",y2:"22",key:"a6p6uj"}]]);/**
7
- * @license lucide-react v0.344.0 - ISC
8
- *
9
- * This source code is licensed under the ISC license.
10
- * See the LICENSE file in the root directory of this source tree.
11
- */const Me=z("Eye",[["path",{d:"M2 12s3-7 10-7 10 7 10 7-3 7-10 7-10-7-10-7Z",key:"rwhkz3"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);/**
12
- * @license lucide-react v0.344.0 - ISC
13
- *
14
- * This source code is licensed under the ISC license.
15
- * See the LICENSE file in the root directory of this source tree.
16
- */const Oe=z("Trash2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]),re=n.forwardRef(({className:s,...i},o)=>e.jsx("textarea",{className:ne("flex min-h-[80px] w-full rounded-md border border-input bg-background px-3 py-2 text-base ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",s),ref:o,...i}));re.displayName="Textarea";function We(){const[s,i]=n.useState([]);return n.useEffect(()=>{const o=[{id:"anthropic",label:"Anthropic"},{id:"openai",label:"OpenAI"}];v.get("/api/custom-endpoints").then(m=>{const u=(m.data.endpoints??[]).map(d=>({id:d.id,label:d.label}));i([...o,...u])}).catch(()=>{i(o)})},[]),s}function te({available:s,selected:i,onChange:o,hint:m}){const{t:u}=q(),d=i.length===0,w=()=>{o([])},f=l=>{i.includes(l)?o(i.filter(K=>K!==l)):o([...i,l])};return e.jsxs("div",{className:"space-y-2",children:[e.jsx("p",{className:"text-xs text-muted-foreground",children:m}),e.jsxs("label",{className:"flex cursor-pointer items-center gap-2 rounded-md border px-3 py-2 transition-colors hover:bg-muted/50",children:[e.jsx("input",{type:"checkbox",checked:d,onChange:w,className:"h-4 w-4 rounded border-input accent-primary"}),e.jsx("span",{className:"text-sm font-medium",children:u("apiKeys.allEndpoints")})]}),e.jsx("div",{className:"grid gap-1",children:s.map(l=>e.jsxs("label",{className:"flex cursor-pointer items-center gap-2 rounded-md border px-3 py-2 transition-colors hover:bg-muted/50",children:[e.jsx("input",{type:"checkbox",checked:!d&&i.includes(l.id),onChange:()=>f(l.id),className:"h-4 w-4 rounded border-input accent-primary"}),e.jsx("span",{className:"text-sm",children:l.label}),e.jsxs("span",{className:"text-xs text-muted-foreground",children:["(",l.id,")"]})]},l.id))})]})}const Pe=[{value:1,labelKey:"apiKeys.analytics.range.today"},{value:7,labelKey:"apiKeys.analytics.range.week"},{value:30,labelKey:"apiKeys.analytics.range.month"}];function Be(){const{t:s}=q(),{pushToast:i}=Ne(),[o,m]=n.useState(!1),[u,d]=n.useState(""),[w,f]=n.useState(""),[l,K]=n.useState([]),[p,S]=n.useState(null),[le,V]=n.useState(null),[h,ce]=n.useState(7),[G,Q]=n.useState(new Map),[oe,$]=n.useState(null),[y,k]=n.useState(null),[D,B]=n.useState([]),Z=We(),g=L(["api-keys"],{url:"/api/keys",method:"GET"}),E=L(["api-keys","overview",h],{url:"/api/stats/api-keys/overview",method:"GET",params:{days:h}}),N=L(["api-keys","usage",h],{url:"/api/stats/api-keys/usage",method:"GET",params:{days:h,limit:10}}),T=g.data??[],j=E.data,x=N.data??[],de=T.some(a=>a.isWildcard),pe=j?j.totalKeys.toLocaleString():"-",me=j?j.enabledKeys.toLocaleString():"-",ue=j?j.activeKeys.toLocaleString():"-",Y=async()=>{if(!u.trim()){i({title:s("apiKeys.errors.nameRequired"),variant:"error"});return}try{const a=await v.post("/api/keys",{name:u.trim(),description:w.trim()||void 0,allowedEndpoints:l.length>0?l:void 0});S(a.data),m(!1),d(""),f(""),K([]),g.refetch(),E.refetch(),N.refetch(),i({title:s("apiKeys.toast.keyCreated"),variant:"success"})}catch(a){const t=b(a);i({title:s("apiKeys.toast.createFailure",{message:t.message}),variant:"error"})}},xe=async(a,t)=>{try{await v.patch(`/api/keys/${a}`,{enabled:!t}),g.refetch(),E.refetch(),i({title:s("apiKeys.toast.keyUpdated"),variant:"success"})}catch(r){const A=b(r);i({title:s("apiKeys.toast.updateFailure",{message:A.message}),variant:"error"})}},he=async a=>{if(confirm(s("apiKeys.confirmDelete"))){V(a);try{await v.delete(`/api/keys/${a}`),g.refetch(),E.refetch(),N.refetch(),i({title:s("apiKeys.toast.keyDeleted"),variant:"success"})}catch(t){const r=b(t);i({title:s("apiKeys.toast.deleteFailure",{message:r.message}),variant:"error"})}finally{V(null)}}},ye=async a=>{if(!G.has(a)){$(a);try{const t=await v.get(`/api/keys/${a}/reveal`);Q(r=>new Map(r).set(a,t.data.key))}catch(t){const r=b(t);i({title:s("apiKeys.toast.revealFailure"),description:r.message,variant:"error"})}finally{$(null)}}},ge=a=>{Q(t=>{const r=new Map(t);return r.delete(a),r})},_=async a=>{try{await Se(a),i({title:s("apiKeys.toast.keyCopied"),variant:"success"})}catch(t){i({title:s("apiKeys.toast.copyFailure"),description:t instanceof Error?t.message:s("common.unknownError"),variant:"error"})}},je=n.useCallback(a=>{k(a),B(a.allowedEndpoints??[])},[]),ve=async()=>{if(y)try{await v.patch(`/api/keys/${y.id}`,{allowedEndpoints:D.length>0?D:null}),k(null),g.refetch(),i({title:s("apiKeys.toast.keyUpdated"),variant:"success"})}catch(a){const t=b(a);i({title:s("apiKeys.toast.updateFailure",{message:t.message}),variant:"error"})}},J=a=>a?new Date(a).toLocaleString():s("common.noData"),fe=n.useMemo(()=>{const a=x.map(t=>t.apiKeyName??s("apiKeys.analytics.unknownKey"));return{tooltip:{trigger:"axis"},grid:{left:60,right:20,top:40,bottom:40},xAxis:{type:"category",data:a,axisLabel:{interval:0,rotate:20}},yAxis:{type:"value"},series:[{name:s("apiKeys.analytics.requestsSeries"),type:"bar",data:x.map(t=>t.requests),itemStyle:{color:"hsl(var(--primary))"}}]}},[x,s]),Ke=n.useMemo(()=>{const a=x.map(t=>t.apiKeyName??s("apiKeys.analytics.unknownKey"));return{tooltip:{trigger:"axis"},legend:{data:[s("apiKeys.analytics.tokens.input"),s("apiKeys.analytics.tokens.output")]},grid:{left:60,right:20,top:50,bottom:40},xAxis:{type:"category",data:a,axisLabel:{interval:0,rotate:20}},yAxis:{type:"value"},series:[{name:s("apiKeys.analytics.tokens.input"),type:"bar",stack:"tokens",itemStyle:{color:"#22c55e"},data:x.map(t=>t.inputTokens)},{name:s("apiKeys.analytics.tokens.output"),type:"bar",stack:"tokens",itemStyle:{color:"#0ea5e9"},data:x.map(t=>t.outputTokens)}]}},[x,s]);return g.isLoading?e.jsx(be,{}):e.jsxs("div",{className:"flex flex-col gap-6",children:[e.jsx(Ce,{icon:e.jsx(we,{className:"h-5 w-5","aria-hidden":"true"}),title:s("apiKeys.title"),description:s("apiKeys.description"),actions:e.jsxs(c,{onClick:()=>m(!0),children:[e.jsx(Te,{className:"mr-2 h-4 w-4","aria-hidden":"true"}),s("apiKeys.createNew")]})}),e.jsx(ee,{title:s("apiKeys.analytics.title"),description:s("apiKeys.analytics.description",{days:h}),actions:e.jsx("div",{className:"flex items-center gap-1 rounded-lg border p-1",children:Pe.map(a=>{const t=h===a.value;return e.jsx("button",{type:"button",onClick:()=>ce(a.value),className:ne("inline-flex h-7 items-center rounded-md px-3 text-xs font-medium transition-colors",t?"bg-primary text-primary-foreground":"text-muted-foreground hover:bg-muted"),children:s(a.labelKey)},a.value)})}),children:e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{className:"grid gap-4 sm:grid-cols-2 xl:grid-cols-3",children:[e.jsx(I,{label:s("apiKeys.analytics.cards.total"),value:pe}),e.jsx(I,{label:s("apiKeys.analytics.cards.enabled"),value:me}),e.jsx(I,{label:s("apiKeys.analytics.cards.active",{days:h}),value:ue})]}),e.jsxs("div",{className:"grid gap-6 lg:grid-cols-2",children:[e.jsx(ie,{title:s("apiKeys.analytics.charts.requests"),loading:N.isLoading,empty:x.length===0,emptyText:s("apiKeys.analytics.empty"),option:fe}),e.jsx(ie,{title:s("apiKeys.analytics.charts.tokens"),loading:N.isLoading,empty:x.length===0,emptyText:s("apiKeys.analytics.empty"),option:Ke})]})]})}),e.jsx(ee,{title:s("apiKeys.list.title"),description:de?s("apiKeys.wildcardHint"):void 0,children:T.length===0?e.jsx("div",{className:"flex h-32 items-center justify-center rounded-lg border border-dashed",children:e.jsx("p",{className:"text-sm text-muted-foreground",children:s("apiKeys.list.empty")})}):e.jsx("div",{className:"grid gap-4",children:T.map(a=>{const t=(a.totalInputTokens+a.totalOutputTokens).toLocaleString(),r=G.get(a.id),A=oe===a.id;return e.jsx(H,{children:e.jsx(U,{className:"space-y-4 pt-4",children:e.jsxs("div",{className:"flex flex-wrap items-start justify-between gap-4",children:[e.jsxs("div",{className:"space-y-3",children:[e.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[e.jsx("h3",{className:"text-base font-semibold",children:a.name}),a.isWildcard&&e.jsx(C,{variant:"secondary",children:s("apiKeys.wildcard")}),e.jsx(C,{variant:a.enabled?"default":"outline",children:a.enabled?s("apiKeys.status.enabled"):s("apiKeys.status.disabled")}),!a.isWildcard&&a.allowedEndpoints&&a.allowedEndpoints.length>0?a.allowedEndpoints.map(X=>e.jsx(C,{variant:"outline",className:"text-xs",children:X},X)):a.isWildcard?null:e.jsx(C,{variant:"secondary",className:"text-xs opacity-60",children:s("apiKeys.allEndpoints")})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("code",{className:"rounded-md bg-muted px-3 py-1.5 font-mono text-sm",children:a.isWildcard?s("apiKeys.wildcard"):r??a.maskedKey??"********"}),!a.isWildcard&&e.jsx("div",{className:"flex items-center gap-1",children:r?e.jsxs(e.Fragment,{children:[e.jsx(c,{variant:"ghost",size:"icon",className:"h-8 w-8",onClick:()=>void _(r),"aria-label":s("common.actions.copy"),title:s("common.actions.copy"),children:e.jsx(ae,{className:"h-4 w-4","aria-hidden":"true"})}),e.jsx(c,{variant:"ghost",size:"icon",className:"h-8 w-8",onClick:()=>ge(a.id),"aria-label":s("apiKeys.actions.hide"),title:s("apiKeys.actions.hide"),children:e.jsx(Le,{className:"h-4 w-4","aria-hidden":"true"})})]}):e.jsx(c,{variant:"ghost",size:"icon",className:"h-8 w-8",onClick:()=>void ye(a.id),disabled:A,"aria-label":s("apiKeys.actions.reveal"),title:s("apiKeys.actions.reveal"),children:e.jsx(Me,{className:"h-4 w-4","aria-hidden":"true"})})})]}),a.isWildcard?e.jsx("p",{className:"text-sm text-muted-foreground",children:s("apiKeys.wildcardHint")}):a.description?e.jsx("p",{className:"whitespace-pre-wrap text-sm text-muted-foreground",children:a.description}):null,e.jsxs("div",{className:"grid gap-3 text-sm sm:grid-cols-2",children:[e.jsxs("div",{className:"space-y-1",children:[e.jsx("span",{className:"text-xs font-medium uppercase tracking-wide text-muted-foreground",children:s("apiKeys.created")}),e.jsx("p",{className:"font-medium",children:J(a.createdAt)})]}),e.jsxs("div",{className:"space-y-1",children:[e.jsx("span",{className:"text-xs font-medium uppercase tracking-wide text-muted-foreground",children:s("apiKeys.lastUsed")}),e.jsx("p",{className:"font-medium",children:J(a.lastUsedAt)})]}),e.jsxs("div",{className:"space-y-1",children:[e.jsx("span",{className:"text-xs font-medium uppercase tracking-wide text-muted-foreground",children:s("apiKeys.requestCount")}),e.jsx("p",{className:"font-medium",children:a.requestCount.toLocaleString()})]}),e.jsxs("div",{className:"space-y-1",children:[e.jsx("span",{className:"text-xs font-medium uppercase tracking-wide text-muted-foreground",children:s("apiKeys.totalTokens")}),e.jsx("p",{className:"font-medium",children:t})]})]})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[!a.isWildcard&&e.jsxs(c,{variant:"outline",size:"sm",onClick:()=>je(a),children:[e.jsx(Ae,{className:"mr-1 h-3.5 w-3.5","aria-hidden":"true"}),s("apiKeys.editEndpoints")]}),e.jsx(c,{variant:a.enabled?"outline":"default",size:"sm",onClick:()=>xe(a.id,a.enabled),children:a.enabled?s("apiKeys.actions.disable"):s("apiKeys.actions.enable")}),!a.isWildcard&&e.jsx(c,{variant:"ghost",size:"icon",className:"h-8 w-8 text-destructive hover:bg-destructive/10 hover:text-destructive",onClick:()=>he(a.id),disabled:le===a.id,"aria-label":s("apiKeys.actions.delete"),children:e.jsx(Oe,{className:"h-4 w-4","aria-hidden":"true"})})]})]})})},a.id)})})}),e.jsx(O,{open:o,onOpenChange:m,children:e.jsxs(W,{children:[e.jsxs(P,{children:[e.jsx(R,{children:s("apiKeys.createNew")}),e.jsx(se,{children:s("apiKeys.createDescription")})]}),e.jsxs("div",{className:"min-h-0 space-y-4 overflow-y-auto",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsxs(M,{htmlFor:"keyName",children:[s("apiKeys.keyNamePlaceholder")," *"]}),e.jsx(De,{id:"keyName",value:u,onChange:a=>d(a.target.value),placeholder:s("apiKeys.keyNamePlaceholder"),onKeyDown:a=>{a.key==="Enter"&&(a.preventDefault(),Y())}})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(M,{htmlFor:"keyDescription",children:s("apiKeys.descriptionLabel")}),e.jsx(re,{id:"keyDescription",value:w,onChange:a=>f(a.target.value),placeholder:s("apiKeys.keyDescriptionPlaceholder"),rows:3})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(M,{children:s("apiKeys.allowedEndpoints")}),e.jsx(te,{available:Z,selected:l,onChange:K,hint:s("apiKeys.selectEndpoints")})]})]}),e.jsxs(F,{children:[e.jsx(c,{variant:"outline",onClick:()=>{m(!1),d(""),f(""),K([])},children:s("common.actions.cancel")}),e.jsx(c,{onClick:()=>void Y(),children:s("apiKeys.createAction")})]})]})}),e.jsx(O,{open:!!p,onOpenChange:()=>S(null),children:e.jsxs(W,{children:[e.jsx(P,{children:e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("div",{className:"flex h-10 w-10 items-center justify-center rounded-full bg-emerald-500/10 text-emerald-600",children:e.jsx(ke,{className:"h-5 w-5","aria-hidden":"true"})}),e.jsx(R,{children:s("apiKeys.keyCreated")})]})}),e.jsx("p",{className:"text-sm font-medium text-amber-600 dark:text-amber-400",children:s("apiKeys.saveKeyWarning")}),e.jsx("div",{className:"rounded-md bg-muted px-4 py-3 font-mono text-sm",children:p==null?void 0:p.key}),(p==null?void 0:p.description)&&e.jsx("p",{className:"whitespace-pre-wrap text-sm text-muted-foreground",children:p.description}),e.jsxs(F,{children:[e.jsxs(c,{onClick:()=>void _((p==null?void 0:p.key)??""),children:[e.jsx(ae,{className:"mr-2 h-4 w-4","aria-hidden":"true"}),s("common.actions.copy")]}),e.jsx(c,{variant:"outline",onClick:()=>S(null),children:s("common.actions.close")})]})]})}),e.jsx(O,{open:!!y,onOpenChange:a=>{a||k(null)},children:e.jsxs(W,{children:[e.jsxs(P,{children:[e.jsx(R,{children:s("apiKeys.editEndpoints")}),e.jsx(se,{children:y==null?void 0:y.name})]}),e.jsx("div",{className:"min-h-0 overflow-y-auto",children:e.jsx(te,{available:Z,selected:D,onChange:B,hint:s("apiKeys.selectEndpoints")})}),e.jsxs(F,{children:[e.jsx(c,{variant:"outline",onClick:()=>k(null),children:s("common.actions.cancel")}),e.jsx(c,{onClick:()=>void ve(),children:s("common.save")})]})]})})]})}function I({label:s,value:i}){return e.jsx(H,{children:e.jsxs(U,{className:"pt-4",children:[e.jsx("p",{className:"text-xs font-medium uppercase tracking-wide text-muted-foreground",children:s}),e.jsx("p",{className:"mt-2 text-2xl font-semibold",children:i})]})})}function ie({title:s,option:i,loading:o,empty:m,emptyText:u}){const{t:d}=q();return e.jsx(H,{children:e.jsxs(U,{className:"space-y-4 pt-4",children:[e.jsx("h3",{className:"text-base font-semibold",children:s}),o?e.jsx("div",{className:"flex h-[280px] items-center justify-center",children:e.jsx("span",{className:"text-sm text-muted-foreground",children:d("common.loadingShort")})}):m?e.jsx("div",{className:"flex h-[280px] items-center justify-center rounded-lg border border-dashed",children:e.jsx("span",{className:"text-sm text-muted-foreground",children:u})}):e.jsx(Ee,{option:i,style:{height:280},notMerge:!0,lazyUpdate:!0})]})})}export{Be as default};
@@ -1,6 +0,0 @@
1
- import{c as $e,u as H,b as ve,r,d as Fe,t as Ke,j as e,e as k,a as D,F as Me,X as Ne,f as Ae}from"./index-iaYfODK6.js";import{u as M}from"./useApiQuery-LZxVJXA3.js";import{T as Pe,a as K}from"./Skeleton-DKmc2Oau.js";import{P as ze,B as ee}from"./PageHeader-DE87PlB_.js";import{c as Oe}from"./clipboard-CALi6bTW.js";import{I as Z}from"./input-CRfONI49.js";import{L as C}from"./label-sf3QNge5.js";import{C as he,a as fe}from"./card-B5QaMdIj.js";import{C as Ie,e as qe,S as I,a as q,b as U,c as B,d as w}from"./select-DfAJfUCL.js";import{R as Ue}from"./refresh-cw-ZDTq8wum.js";/**
2
- * @license lucide-react v0.344.0 - ISC
3
- *
4
- * This source code is licensed under the ISC license.
5
- * See the LICENSE file in the root directory of this source tree.
6
- */const Be=$e("Download",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"7 10 12 15 17 10",key:"2ggqvy"}],["line",{x1:"12",x2:"12",y1:"15",y2:"3",key:"1vk2je"}]]),ge=[20,50,100];function je(s,n=!1){if(!s)return;const d=n?`${s}T23:59:59.999`:`${s}T00:00:00.000`,g=Date.parse(d);return Number.isFinite(g)?g:void 0}function be(s){const n=new Date(s);return`${n.getFullYear()}-${`${n.getMonth()+1}`.padStart(2,"0")}-${`${n.getDate()}`.padStart(2,"0")} ${`${n.getHours()}`.padStart(2,"0")}:${`${n.getMinutes()}`.padStart(2,"0")}:${`${n.getSeconds()}`.padStart(2,"0")}`}function S(s){return s==null?"-":s.toLocaleString()}function L(s,n){const d=S(s);return d==="-"?"-":`${d} ${n}`}function He(s){return s?"true":"false"}function ye(s,n){if(!s||s.trim().length===0)return n;try{const d=JSON.parse(s);return JSON.stringify(d,null,2)}catch{return s}}function is(){var de,ce,me,xe,ue;const{t:s}=H(),{pushToast:n}=ve(),[d,g]=r.useState("all"),[p,l]=r.useState("all"),[c,j]=r.useState(""),[m,v]=r.useState("all"),[a,h]=r.useState(""),[i,u]=r.useState(""),[x,f]=r.useState(1),[N,W]=r.useState(ge[0]),[A,se]=r.useState(null),[we,te]=r.useState(!1),[_,G]=r.useState([]),[P,le]=r.useState(!1),[ae,ke]=r.useState(!1),[Se,_e]=r.useState(!1),Q=r.useRef(null);r.useEffect(()=>{f(1)},[d,p,c,m,a,i,N,_]);const z=r.useMemo(()=>{const t={limit:N,offset:(x-1)*N};d!=="all"&&(t.provider=d),p!=="all"&&(t.endpoint=p),c.trim().length>0&&(t.model=c.trim()),m!=="all"&&(t.status=m);const o=je(a),E=je(i,!0);return o!==void 0&&(t.from=o),E!==void 0&&(t.to=E),_.length>0&&(t.apiKeys=_.join(",")),t},[d,p,c,m,a,i,x,N,_]),y=M(["logs",z],{url:"/api/logs",method:"GET",params:z}),T=M(["providers","all"],{url:"/api/providers",method:"GET"}),ie=M(["api-keys"],{url:"/api/keys",method:"GET"}),V=M(["custom-endpoints"],{url:"/api/custom-endpoints",method:"GET"});r.useEffect(()=>{y.isError&&y.error&&n({title:s("logs.toast.listError.title"),description:s("logs.toast.listError.desc",{message:y.error.message}),variant:"error"})},[y.isError,y.error,n,s]),r.useEffect(()=>{T.isError&&T.error&&n({title:s("logs.toast.providerError.title"),description:s("logs.toast.providerError.desc",{message:T.error.message}),variant:"error"})},[T.isError,T.error,n,s]);const R=((de=y.data)==null?void 0:de.total)??0,b=R>0?Math.ceil(R/N):0,ne=((ce=y.data)==null?void 0:ce.items)??[];r.useEffect(()=>{b>0&&x>b&&f(b)},[b,x]);const J=T.data??[],O=r.useMemo(()=>{const t=new Map;for(const o of J)o.id&&t.set(o.id,o.label??o.id);return t},[J]),re=r.useMemo(()=>{var o;const t=new Map;t.set("anthropic",s("logs.filters.endpointAnthropic")),t.set("openai",s("logs.filters.endpointOpenAI"));for(const E of((o=V.data)==null?void 0:o.endpoints)??[])t.set(E.id,E.label||E.id);return t},[(me=V.data)==null?void 0:me.endpoints,s]),X=r.useMemo(()=>{const t=[];if(d!=="all"){const o=O.get(d)??d;t.push({key:"provider",label:`${s("logs.filters.provider")}: ${o}`,onRemove:()=>g("all")})}if(p!=="all"){const o=re.get(p)??p;t.push({key:"endpoint",label:`${s("logs.filters.endpoint")}: ${o}`,onRemove:()=>l("all")})}if(c.trim()&&t.push({key:"model",label:`${s("logs.filters.modelId")}: ${c.trim()}`,onRemove:()=>j("")}),m!=="all"){const o=s(m==="success"?"logs.filters.statusSuccess":"logs.filters.statusError");t.push({key:"status",label:`${s("logs.filters.status")}: ${o}`,onRemove:()=>v("all")})}return a&&t.push({key:"from",label:`${s("logs.filters.startDate")}: ${a}`,onRemove:()=>h("")}),i&&t.push({key:"to",label:`${s("logs.filters.endDate")}: ${i}`,onRemove:()=>u("")}),_.length>0&&t.push({key:"apiKeys",label:s("logs.filters.apiKeySelected",{count:_.length}),onRemove:()=>G([])}),t},[d,O,p,re,c,m,a,i,_,s]),Y=ie.data??[],oe=r.useMemo(()=>{const t=new Map;for(const o of Y)t.set(o.id,o);return t},[Y]),Ee=()=>{g("all"),j(""),l("all"),v("all"),h(""),u(""),G([])},Ce=r.useCallback(async()=>{if(!P){le(!0);try{const t=R>0?Math.min(R,5e3):1e3,o={...z,limit:t,offset:0},E=await Fe.post("/api/logs/export",o,{responseType:"blob"}),Re=new Blob([E.data],{type:"application/zip"}),De=new Date().toISOString().replace(/[:.]/g,"-"),pe=URL.createObjectURL(Re),F=document.createElement("a");F.href=pe,F.download=`cc-gw-logs-${De}.zip`,document.body.appendChild(F),F.click(),F.remove(),URL.revokeObjectURL(pe),n({title:s("logs.toast.exportSuccess.title"),description:s("logs.toast.exportSuccess.desc"),variant:"success"})}catch(t){const o=Ke(t);n({title:s("logs.toast.exportError.title"),description:s("logs.toast.exportError.desc",{message:o.message}),variant:"error"})}finally{le(!1)}}},[P,n,z,s,R]),Le=r.useCallback(t=>{se(t),te(!0)},[]),Te=r.useCallback(()=>{te(!1),se(null)},[]),$=r.useCallback(()=>{const t=Q.current;if(!t)return;const o=t.scrollWidth-t.scrollLeft-t.clientWidth>1;_e(o)},[]);return r.useEffect(()=>{const t=Q.current;if(!t)return;$(),t.addEventListener("scroll",$,{passive:!0});const o=new ResizeObserver($);return o.observe(t),()=>{t.removeEventListener("scroll",$),o.disconnect()}},[$]),e.jsxs("div",{className:"flex flex-col gap-6",children:[e.jsx(ze,{icon:e.jsx(Me,{className:"h-5 w-5","aria-hidden":"true"}),title:s("logs.title"),description:s("logs.description"),actions:e.jsxs("div",{className:"flex flex-wrap items-center gap-3",children:[e.jsxs(k,{onClick:Ce,disabled:P,children:[e.jsx(Be,{className:"mr-2 h-4 w-4"}),s(P?"common.actions.loading":"logs.actions.export")]}),e.jsx("span",{className:"text-sm text-muted-foreground",children:s("logs.summary.total",{value:R.toLocaleString()})}),e.jsxs(k,{variant:"outline",size:"sm",onClick:()=>y.refetch(),disabled:y.isFetching,children:[e.jsx(Ue,{className:D("mr-2 h-4 w-4",y.isFetching&&"animate-spin")}),y.isFetching?s("common.actions.refreshing"):s("logs.actions.manualRefresh")]})]})}),e.jsx(he,{children:e.jsxs(fe,{className:"pt-4",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("div",{className:"flex flex-1 items-center gap-3 overflow-hidden",children:X.length>0?e.jsx("div",{className:"flex flex-wrap items-center gap-2",children:X.map(t=>e.jsxs(ee,{variant:"secondary",role:"button",tabIndex:0,className:"cursor-pointer gap-1 hover:bg-destructive/10 hover:text-destructive",onClick:t.onRemove,onKeyDown:o=>{(o.key==="Enter"||o.key===" ")&&(o.preventDefault(),t.onRemove())},children:[t.label,e.jsx(Ne,{className:"h-3 w-3","aria-hidden":"true"})]},t.key))}):e.jsx("span",{className:"text-sm text-muted-foreground",children:s("common.filters.allRequests")})}),e.jsxs("div",{className:"flex items-center gap-2 ml-3 flex-shrink-0",children:[X.length>0&&e.jsx(k,{variant:"ghost",size:"sm",onClick:Ee,children:s("common.actions.reset")}),e.jsx(k,{variant:"ghost",size:"sm",onClick:()=>ke(t=>!t),children:ae?e.jsxs(e.Fragment,{children:[s("common.filters.collapse"),e.jsx(Ie,{className:"ml-1 h-4 w-4"})]}):e.jsxs(e.Fragment,{children:[s("common.filters.expand"),e.jsx(qe,{className:"ml-1 h-4 w-4"})]})})]})]}),ae&&e.jsxs("div",{className:"mt-4 grid gap-4 md:grid-cols-2 xl:grid-cols-4 animate-in fade-in slide-in-from-top-2 duration-200",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx(C,{children:s("logs.filters.provider")}),e.jsxs(I,{value:d,onValueChange:g,children:[e.jsx(q,{children:e.jsx(U,{})}),e.jsxs(B,{children:[e.jsx(w,{value:"all",children:s("logs.filters.providerAll")}),J.map(t=>e.jsx(w,{value:t.id,children:t.label??t.id},t.id))]})]})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(C,{children:s("logs.filters.endpoint")}),e.jsxs(I,{value:p,onValueChange:l,children:[e.jsx(q,{children:e.jsx(U,{})}),e.jsxs(B,{children:[e.jsx(w,{value:"all",children:s("logs.filters.endpointAll")}),e.jsx(w,{value:"anthropic",children:s("logs.filters.endpointAnthropic")}),e.jsx(w,{value:"openai",children:s("logs.filters.endpointOpenAI")}),(ue=(xe=V.data)==null?void 0:xe.endpoints)==null?void 0:ue.map(t=>e.jsx(w,{value:t.id,children:t.label||t.id},t.id))]})]})]}),e.jsx(Qe,{className:"md:col-span-2",apiKeys:Y,selected:_,disabled:ie.isLoading,onChange:G}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(C,{children:s("logs.filters.modelId")}),e.jsx(Z,{value:c,onChange:t=>j(t.target.value),placeholder:s("logs.filters.modelPlaceholder")})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(C,{children:s("logs.filters.status")}),e.jsxs(I,{value:m,onValueChange:t=>v(t),children:[e.jsx(q,{children:e.jsx(U,{})}),e.jsxs(B,{children:[e.jsx(w,{value:"all",children:s("logs.filters.statusAll")}),e.jsx(w,{value:"success",children:s("logs.filters.statusSuccess")}),e.jsx(w,{value:"error",children:s("logs.filters.statusError")})]})]})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(C,{children:s("logs.filters.startDate")}),e.jsx(Z,{type:"date",value:a,onChange:t=>h(t.target.value)})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(C,{children:s("logs.filters.endDate")}),e.jsx(Z,{type:"date",value:i,onChange:t=>u(t.target.value)})]})]})]})}),e.jsx(he,{children:e.jsxs(fe,{className:"p-0",children:[e.jsxs("div",{className:"relative",children:[e.jsx("div",{ref:Q,className:"overflow-x-auto",children:e.jsxs("table",{className:"w-full min-w-[1200px] text-sm",children:[e.jsx("thead",{className:"border-b bg-muted/50",children:e.jsxs("tr",{children:[e.jsx("th",{className:"px-3 py-2 text-left text-xs font-medium",children:s("logs.table.columns.time")}),e.jsx("th",{className:"px-3 py-2 text-left text-xs font-medium",children:s("logs.table.columns.endpoint")}),e.jsx("th",{className:"px-3 py-2 text-left text-xs font-medium",children:s("logs.table.columns.provider")}),e.jsx("th",{className:"px-3 py-2 text-left text-xs font-medium",children:s("logs.table.columns.requestedModel")}),e.jsx("th",{className:"px-3 py-2 text-left text-xs font-medium",children:s("logs.table.columns.routedModel")}),e.jsx("th",{className:"px-3 py-2 text-left text-xs font-medium",children:s("logs.table.columns.apiKey")}),e.jsx("th",{className:"px-3 py-2 text-right text-xs font-medium",children:s("logs.table.columns.inputTokens")}),e.jsx("th",{className:"px-3 py-2 text-right text-xs font-medium",children:s("logs.table.columns.cacheReadTokens")}),e.jsx("th",{className:"px-3 py-2 text-right text-xs font-medium",children:s("logs.table.columns.cacheCreationTokens")}),e.jsx("th",{className:"px-3 py-2 text-right text-xs font-medium",children:s("logs.table.columns.outputTokens")}),e.jsx("th",{className:"px-3 py-2 text-right text-xs font-medium",children:s("logs.table.columns.latency")}),e.jsx("th",{className:"px-3 py-2 text-right text-xs font-medium",children:s("logs.table.columns.ttft")}),e.jsx("th",{className:"px-3 py-2 text-right text-xs font-medium",children:s("logs.table.columns.tpot")}),e.jsx("th",{className:"px-3 py-2 text-center text-xs font-medium",children:s("logs.table.columns.status")}),e.jsx("th",{className:"px-3 py-2 text-left text-xs font-medium",children:s("logs.table.columns.error")}),e.jsx("th",{className:"px-3 py-2 text-center text-xs font-medium",children:s("logs.table.columns.actions")})]})}),e.jsx("tbody",{className:"divide-y",children:y.isPending?Array.from({length:8}).map((t,o)=>e.jsx(Pe,{columns:16},o)):ne.length===0?e.jsx("tr",{children:e.jsx("td",{colSpan:16,className:"px-3 py-8 text-center text-sm text-muted-foreground",children:s("logs.table.empty")})}):ne.map((t,o)=>e.jsx(We,{record:t,providerLabelMap:O,apiKeyMap:oe,onSelect:Le,isEven:o%2===0},t.id))})]})}),Se&&e.jsx("div",{className:"table-scroll-hint"})]}),e.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-4 border-t p-4",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{className:"text-sm text-muted-foreground",children:s("logs.table.pagination.perPage")}),e.jsxs(I,{value:N.toString(),onValueChange:t=>W(Number(t)),children:[e.jsx(q,{className:"w-[80px]",children:e.jsx(U,{})}),e.jsx(B,{children:ge.map(t=>e.jsx(w,{value:t.toString(),children:t},t))})]})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(k,{variant:"outline",size:"sm",onClick:()=>f(t=>Math.max(t-1,1)),disabled:x<=1,children:s("logs.table.pagination.previous")}),e.jsx("span",{className:"text-sm text-muted-foreground",children:s("logs.table.pagination.pageLabel",{page:b===0?0:x,total:b})}),e.jsx(k,{variant:"outline",size:"sm",onClick:()=>f(t=>b===0?t:Math.min(t+1,b)),disabled:b===0||x>=b,children:s("logs.table.pagination.next")})]})]})]})}),e.jsx(Ge,{open:we,logId:A,onClose:Te,providerLabelMap:O,apiKeyMap:oe})]})}function We({record:s,providerLabelMap:n,apiKeyMap:d,onSelect:g,isEven:p}){const{t:l}=H(),c=n.get(s.provider)??s.provider,j=s.endpoint||"-",m=!!s.error,v=s.status_code,a=s.client_model??l("logs.table.requestedModelFallback"),h=s.api_key_id!=null?d.get(s.api_key_id):void 0,i=s.api_key_id==null?l("logs.table.apiKeyUnknown"):h!=null&&h.isWildcard?l("apiKeys.wildcard"):h!=null&&h.name?h.name:s.api_key_name?s.api_key_name:l("logs.table.apiKeyUnknown");return e.jsxs("tr",{className:D("transition-colors",p?"bg-muted/30":"","hover:bg-muted/50"),children:[e.jsx("td",{className:"px-3 py-2 text-xs",children:be(s.timestamp)}),e.jsx("td",{className:"px-3 py-2 text-xs",children:j}),e.jsx("td",{className:"px-3 py-2 text-xs",children:e.jsx("div",{className:"max-w-[100px] truncate",title:c,children:c})}),e.jsx("td",{className:"px-3 py-2 text-xs text-muted-foreground",children:e.jsx("div",{className:"max-w-[120px] truncate",title:a,children:a})}),e.jsx("td",{className:"px-3 py-2 text-xs",children:e.jsx("div",{className:"max-w-[120px] truncate",title:s.model,children:s.model})}),e.jsx("td",{className:"px-3 py-2 text-xs text-muted-foreground",children:e.jsx("div",{className:"max-w-[90px] truncate",title:i,children:i})}),e.jsx("td",{className:"px-3 py-2 text-right text-xs tabular-nums",children:S(s.input_tokens)}),e.jsx("td",{className:"px-3 py-2 text-right text-xs tabular-nums",children:S(s.cache_read_tokens)}),e.jsx("td",{className:"px-3 py-2 text-right text-xs tabular-nums",children:S(s.cache_creation_tokens)}),e.jsx("td",{className:"px-3 py-2 text-right text-xs tabular-nums",children:S(s.output_tokens)}),e.jsx("td",{className:"px-3 py-2 text-right text-xs tabular-nums",children:L(s.latency_ms,"ms")}),e.jsx("td",{className:"px-3 py-2 text-right text-xs tabular-nums",children:L(s.ttft_ms,"ms")}),e.jsx("td",{className:"px-3 py-2 text-right text-xs tabular-nums",children:L(s.tpot_ms,"ms/tk")}),e.jsx("td",{className:"px-3 py-2 text-center",children:e.jsx(ee,{variant:m?"destructive":"default",className:"text-xs",children:v??(m?500:200)})}),e.jsx("td",{className:"px-3 py-2 text-xs text-muted-foreground",children:e.jsx("div",{className:"max-w-[100px] truncate",title:s.error??"",children:s.error?s.error:"-"})}),e.jsx("td",{className:"px-3 py-2 text-center",children:e.jsx(k,{variant:"outline",size:"sm",onClick:()=>g(s.id),children:l("logs.actions.detail")})})]})}function Ge({open:s,logId:n,onClose:d,providerLabelMap:g,apiKeyMap:p}){var u,x;const{t:l}=H(),{pushToast:c}=ve(),j=r.useRef(null),m=M(["log-detail",n],{url:`/api/logs/${n}`,method:"GET"},{enabled:s&&n!==null,staleTime:3e4});r.useEffect(()=>{m.isError&&m.error&&c({title:l("logs.detail.loadError"),description:m.error.message,variant:"error"})},[m.isError,m.error,c,l]),r.useEffect(()=>{if(!s)return;const f=N=>{N.key==="Escape"&&d()};return window.addEventListener("keydown",f),()=>window.removeEventListener("keydown",f)},[s,d]),r.useEffect(()=>{s&&j.current&&j.current.focus()},[s,n]);const v=r.useCallback(async(f,N,W)=>{if(!N){c({title:l("logs.detail.copy.empty",{label:f}),variant:"info"});return}try{await Oe(N),c({title:l(W),variant:"success"})}catch(A){c({title:l("logs.detail.copy.failure"),description:A instanceof Error?A.message:l("logs.detail.copy.failureFallback"),variant:"error"})}},[c,l]);if(!s)return null;const a=m.data,h=a?g.get(a.provider)??a.provider:"",i=a&&a.api_key_id!=null?p.get(a.api_key_id):void 0;return typeof document>"u"?null:Ae.createPortal(e.jsxs("div",{className:"fixed inset-0 z-50 flex",children:[e.jsx("div",{className:"flex-1 bg-background/80 backdrop-blur-sm animate-in fade-in duration-200",onClick:d}),e.jsxs("aside",{role:"dialog","aria-modal":"true",className:"flex h-full w-full max-w-xl flex-col border-l bg-card shadow-xl animate-in slide-in-from-right duration-300",children:[e.jsxs("header",{className:"flex items-center justify-between border-b px-6 py-4",children:[e.jsxs("div",{children:[e.jsx("h2",{className:"text-lg font-semibold",children:l("logs.detail.title")}),a&&e.jsx("p",{className:"text-xs text-muted-foreground",children:l("logs.detail.id",{id:a.id})})]}),e.jsxs(k,{ref:j,variant:"outline",size:"sm",onClick:d,children:[e.jsx(Ne,{className:"mr-2 h-4 w-4"}),l("common.actions.close")]})]}),e.jsx("div",{className:"flex-1 overflow-y-auto",children:m.isPending?e.jsxs("div",{className:"flex flex-col gap-4 p-6",children:[e.jsx(K,{className:"h-5 w-40"}),e.jsx(K,{className:"h-4 w-full"}),e.jsx(K,{className:"h-4 w-3/4"}),e.jsx(K,{className:"h-32 w-full"}),e.jsx(K,{className:"h-4 w-1/2"})]}):a?e.jsxs("div",{className:"flex flex-col gap-6 px-6 py-5 text-sm",children:[e.jsxs("section",{className:"space-y-3",children:[e.jsx("h3",{className:"text-xs font-semibold uppercase tracking-wide text-muted-foreground",children:l("logs.detail.infoSection")}),e.jsxs("div",{className:"flex flex-wrap items-center gap-2 rounded-md bg-muted p-3 text-xs",children:[e.jsx("span",{className:"font-medium",children:l("logs.detail.summary.route",{from:a.client_model??l("logs.detail.info.noRequestedModel"),to:a.model})}),e.jsx("span",{className:"text-muted-foreground",children:l("logs.detail.summary.latency",{value:L(a.latency_ms,l("common.units.ms"))})}),a.ttft_ms!==null&&e.jsxs("span",{className:"text-muted-foreground",children:["TTFT: ",L(a.ttft_ms,l("common.units.ms"))]}),e.jsx(ee,{variant:a.error?"destructive":"default",children:(a.status_code??(a.error?500:200)).toString()})]}),e.jsxs("dl",{className:"grid grid-cols-2 gap-x-4 gap-y-3",children:[e.jsxs("div",{children:[e.jsx("dt",{className:"text-xs text-muted-foreground",children:l("logs.detail.info.time")}),e.jsx("dd",{className:"font-medium",children:be(a.timestamp)})]}),e.jsxs("div",{children:[e.jsx("dt",{className:"text-xs text-muted-foreground",children:l("logs.detail.info.sessionId")}),e.jsx("dd",{className:"font-medium",children:a.session_id??"-"})]}),e.jsxs("div",{children:[e.jsx("dt",{className:"text-xs text-muted-foreground",children:l("logs.detail.info.endpoint")}),e.jsx("dd",{className:"font-medium",children:a.endpoint||"-"})]}),e.jsxs("div",{children:[e.jsx("dt",{className:"text-xs text-muted-foreground",children:l("logs.detail.info.provider")}),e.jsx("dd",{className:"font-medium",children:h})]}),e.jsxs("div",{children:[e.jsx("dt",{className:"text-xs text-muted-foreground",children:l("logs.detail.info.requestedModel")}),e.jsx("dd",{className:"font-medium",children:a.client_model??l("logs.detail.info.noRequestedModel")})]}),e.jsxs("div",{children:[e.jsx("dt",{className:"text-xs text-muted-foreground",children:l("logs.detail.info.model")}),e.jsx("dd",{className:"font-medium",children:a.model})]}),e.jsxs("div",{children:[e.jsx("dt",{className:"text-xs text-muted-foreground",children:l("logs.detail.info.stream")}),e.jsx("dd",{className:"font-medium",children:He(a.stream)})]}),e.jsxs("div",{children:[e.jsx("dt",{className:"text-xs text-muted-foreground",children:l("logs.detail.info.inputTokens")}),e.jsx("dd",{className:"font-medium",children:S(a.input_tokens)})]}),e.jsxs("div",{children:[e.jsx("dt",{className:"text-xs text-muted-foreground",children:l("logs.detail.info.cacheReadTokens")}),e.jsx("dd",{className:"font-medium",children:S(a.cache_read_tokens)})]}),e.jsxs("div",{children:[e.jsx("dt",{className:"text-xs text-muted-foreground",children:l("logs.detail.info.cacheCreationTokens")}),e.jsx("dd",{className:"font-medium",children:S(a.cache_creation_tokens)})]}),e.jsxs("div",{children:[e.jsx("dt",{className:"text-xs text-muted-foreground",children:l("logs.detail.info.outputTokens")}),e.jsx("dd",{className:"font-medium",children:S(a.output_tokens)})]}),e.jsxs("div",{children:[e.jsx("dt",{className:"text-xs text-muted-foreground",children:l("logs.detail.info.ttft")}),e.jsx("dd",{className:"font-medium",children:L(a.ttft_ms,l("common.units.ms"))})]}),e.jsxs("div",{children:[e.jsx("dt",{className:"text-xs text-muted-foreground",children:l("logs.detail.info.tpot")}),e.jsx("dd",{className:"font-medium",children:L(a.tpot_ms,l("common.units.msPerToken"))})]})]}),a.error&&e.jsxs("div",{className:"space-y-1",children:[e.jsx("p",{className:"text-xs text-muted-foreground",children:l("logs.detail.info.error")}),e.jsx("p",{className:"rounded-md border border-destructive/50 bg-destructive/10 p-3 text-xs text-destructive",children:a.error})]})]}),e.jsxs("section",{className:"space-y-3",children:[e.jsx("h3",{className:"text-xs font-semibold uppercase tracking-wide text-muted-foreground",children:l("logs.detail.apiKey.title")}),e.jsxs("dl",{className:"grid gap-x-4 gap-y-3 text-sm sm:grid-cols-2",children:[e.jsxs("div",{children:[e.jsx("dt",{className:"text-xs text-muted-foreground",children:l("logs.detail.apiKey.name")}),e.jsx("dd",{className:"font-medium",children:a.api_key_id==null&&!a.api_key_name?l("logs.detail.apiKey.missing"):i!=null&&i.isWildcard?l("apiKeys.wildcard"):(i==null?void 0:i.name)??a.api_key_name??l("logs.detail.apiKey.missing")})]}),e.jsxs("div",{children:[e.jsx("dt",{className:"text-xs text-muted-foreground",children:l("logs.detail.apiKey.identifier")}),e.jsx("dd",{className:"font-medium",children:a.api_key_id??l("common.noData")})]}),e.jsxs("div",{children:[e.jsx("dt",{className:"text-xs text-muted-foreground",children:l("logs.detail.apiKey.masked")}),e.jsx("dd",{className:"font-medium",children:i!=null&&i.isWildcard?l("apiKeys.wildcard"):(i==null?void 0:i.maskedKey)??a.api_key_name??l("logs.detail.apiKey.maskedUnavailable")})]}),e.jsxs("div",{children:[e.jsx("dt",{className:"text-xs text-muted-foreground",children:l("logs.detail.apiKey.lastUsed")}),e.jsx("dd",{className:"font-medium",children:i!=null&&i.lastUsedAt?new Date(i.lastUsedAt).toLocaleString():l("common.noData")})]})]}),e.jsxs("div",{className:"rounded-md border bg-muted p-3 text-xs",children:[e.jsx("p",{className:"font-medium",children:l("logs.detail.apiKey.rawMasked")}),e.jsx("p",{className:"mt-1 break-all font-mono",children:a.api_key_value_available?a.api_key_value_masked??l("logs.detail.apiKey.rawUnavailable"):l("logs.detail.apiKey.rawUnavailable")}),e.jsx("p",{className:"mt-2 text-[11px] text-muted-foreground",children:l("logs.detail.apiKey.rawMaskedHint")})]})]}),e.jsxs("section",{className:"space-y-2",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("h3",{className:"text-xs font-semibold uppercase tracking-wide text-muted-foreground",children:l("logs.detail.payload.request")}),e.jsx(k,{variant:"outline",size:"sm",onClick:()=>{var f;return v(l("logs.detail.payload.request"),(f=a.payload)==null?void 0:f.prompt,"logs.detail.copy.requestSuccess")},children:l("common.actions.copy")})]}),e.jsx("pre",{className:"max-h-64 overflow-auto whitespace-pre-wrap rounded-md border bg-muted p-3 text-xs",children:ye((u=a.payload)==null?void 0:u.prompt,l("logs.detail.payload.emptyRequest"))})]}),e.jsxs("section",{className:"space-y-2",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("h3",{className:"text-xs font-semibold uppercase tracking-wide text-muted-foreground",children:l("logs.detail.payload.response")}),e.jsx(k,{variant:"outline",size:"sm",onClick:()=>{var f;return v(l("logs.detail.payload.response"),(f=a.payload)==null?void 0:f.response,"logs.detail.copy.responseSuccess")},children:l("common.actions.copy")})]}),e.jsx("pre",{className:"max-h-64 overflow-auto whitespace-pre-wrap rounded-md border bg-muted p-3 text-xs",children:ye((x=a.payload)==null?void 0:x.response,l("logs.detail.payload.emptyResponse"))})]})]}):e.jsx("div",{className:"flex h-full items-center justify-center p-8 text-sm text-muted-foreground",children:l("logs.detail.loadError")})})]})]}),document.body)}function Qe({apiKeys:s,selected:n,onChange:d,disabled:g,className:p}){const{t:l}=H(),[c,j]=r.useState(!1),m=r.useRef(null);r.useEffect(()=>{if(!c)return;const i=u=>{var x;(x=m.current)!=null&&x.contains(u.target)||j(!1)};return window.addEventListener("mousedown",i),()=>window.removeEventListener("mousedown",i)},[c]);const v=r.useMemo(()=>{if(n.length===0)return[];const i=new Map;for(const u of s)i.set(u.id,u);return n.map(u=>{const x=i.get(u);return x?x.isWildcard?l("apiKeys.wildcard"):x.name:null}).filter(u=>!!u)},[s,n,l]),a=n.length===0?l("logs.filters.apiKeyAll"):l("logs.filters.apiKeySelected",{count:n.length}),h=i=>{n.includes(i)?d(n.filter(u=>u!==i)):d([...n,i])};return e.jsxs("div",{className:D("relative space-y-2",p),ref:m,children:[e.jsx(C,{children:l("logs.filters.apiKey")}),e.jsxs("button",{type:"button",onClick:()=>j(i=>!i),disabled:g||s.length===0,title:l("logs.filters.apiKeyHint"),className:D("flex h-10 w-full items-center justify-between rounded-md border bg-background px-3 text-sm ring-offset-background focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",n.length>0&&"border-primary",c&&"ring-2 ring-ring ring-offset-2"),children:[e.jsxs("span",{className:"truncate",children:[a,v.length>0&&e.jsx("span",{className:"ml-1 text-xs text-muted-foreground",children:v.join(", ")})]}),e.jsx("svg",{className:D("h-4 w-4 opacity-50 transition-transform",c&&"rotate-180"),viewBox:"0 0 20 20",fill:"currentColor",children:e.jsx("path",{fillRule:"evenodd",d:"M5.23 7.21a.75.75 0 011.06.02L10 10.94l3.71-3.71a.75.75 0 111.06 1.06l-4.24 4.25a.75.75 0 01-1.06 0L5.21 8.29a.75.75 0 01.02-1.08z",clipRule:"evenodd"})})]}),c&&e.jsxs("div",{className:"absolute left-0 top-full z-30 mt-1 w-64 rounded-md border bg-popover p-2 shadow-lg",children:[e.jsxs("div",{className:"flex items-center justify-between rounded-md bg-muted px-3 py-2 text-xs",children:[e.jsx("span",{children:a}),e.jsx("button",{type:"button",onClick:()=>d([]),disabled:n.length===0,className:"text-primary hover:underline disabled:opacity-40",children:l("common.actions.reset")})]}),e.jsxs("div",{className:"max-h-56 overflow-y-auto py-2",children:[s.map(i=>{const u=i.isWildcard?l("apiKeys.wildcard"):i.name,x=n.includes(i.id);return e.jsxs("label",{className:D("flex cursor-pointer items-center gap-2 rounded-md px-3 py-2 text-sm transition hover:bg-muted",x&&"bg-primary/10 text-primary"),children:[e.jsx("input",{type:"checkbox",className:"h-4 w-4 rounded border",checked:x,onChange:()=>h(i.id)}),e.jsx("span",{className:"truncate",children:u})]},i.id)}),s.length===0&&e.jsx("p",{className:"px-2 py-2 text-xs text-muted-foreground",children:l("logs.filters.apiKeyAll")})]})]})]})}export{is as default};
@@ -1,6 +0,0 @@
1
- import{c as Oe,u as Be,b as _e,r as m,j as e,e as S,a3 as Ge,W as be,a as Qe,d as O}from"./index-iaYfODK6.js";import{u as fe}from"./useApiQuery-LZxVJXA3.js";import{P as We}from"./PageHeader-DE87PlB_.js";import{c as ze}from"./clipboard-CALi6bTW.js";import{I as j}from"./input-CRfONI49.js";import{L as c}from"./label-sf3QNge5.js";import{C as E,a as F}from"./card-B5QaMdIj.js";import{S as L}from"./switch-DTxmu4vA.js";import{S as $e,a as Je,b as Ue,c as Xe,d as Ye}from"./select-DfAJfUCL.js";import{S as Ze,C as et}from"./shield-wbL9EF4o.js";/**
2
- * @license lucide-react v0.344.0 - ISC
3
- *
4
- * This source code is licensed under the ISC license.
5
- * See the LICENSE file in the root directory of this source tree.
6
- */const z=Oe("AlertCircle",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]]),tt=[{value:"fatal",labelKey:"fatal"},{value:"error",labelKey:"error"},{value:"warn",labelKey:"warn"},{value:"info",labelKey:"info"},{value:"debug",labelKey:"debug"},{value:"trace",labelKey:"trace"}],je=[{id:"section-basics",labelKey:"settings.sections.basics"},{id:"section-protocol",labelKey:"settings.sections.protocol"},{id:"section-security",labelKey:"settings.sections.security"},{id:"section-config-file",labelKey:"settings.sections.configFile"},{id:"section-cleanup",labelKey:"settings.sections.cleanup"}];function mt(){const{t}=Be(),{pushToast:u}=_e(),[ye,ve]=m.useState(je[0].id),K=m.useRef(new Map),Ne=m.useCallback(s=>{const a=K.current.get(s);a&&a.scrollIntoView({behavior:"smooth",block:"start"})},[]),q=m.useCallback(s=>a=>{a?K.current.set(s,a):K.current.delete(s)},[]),f=fe(["config","info"],{url:"/api/config/info",method:"GET"}),y=fe(["auth","web"],{url:"/api/auth/web",method:"GET"}),[r,$]=m.useState(null),[B,Pe]=m.useState(""),[n,p]=m.useState({port:"",host:"",logRetentionDays:"",storeRequestPayloads:!0,storeResponsePayloads:!0,logLevel:"info",requestLogging:!0,responseLogging:!0,bodyLimitMb:"10",enableRoutingFallback:!1,httpEnabled:!0,httpPort:"4100",httpHost:"127.0.0.1",httpsEnabled:!1,httpsPort:"4443",httpsHost:"127.0.0.1",httpsKeyPath:"",httpsCertPath:"",httpsCaPath:""}),[g,J]=m.useState({}),[_,U]=m.useState(!1),[X,Y]=m.useState(!1),[Z,ee]=m.useState(!1),[d,te]=m.useState(null),[l,R]=m.useState({enabled:!1,username:"",password:"",confirmPassword:""}),[H,D]=m.useState({}),[G,se]=m.useState(!1),ke=m.useMemo(()=>{if(!r)return null;const s=r.defaults;if(!s)return null;const a=[];return s.completion&&a.push(t("settings.defaults.completion",{model:s.completion})),s.reasoning&&a.push(t("settings.defaults.reasoning",{model:s.reasoning})),s.background&&a.push(t("settings.defaults.background",{model:s.background})),a.length>0?a.join(" | "):t("settings.defaults.none")},[r,t]),ae=m.useMemo(()=>l.enabled?d!=null&&d.hasPassword?l.username.trim()!==((d==null?void 0:d.username)??""):!0:!1,[l.enabled,l.username,d]);m.useEffect(()=>{var s,a,i,h,b,P,k,w,C,v,A;if(f.data){$(f.data.config),Pe(f.data.path);const M=f.data.config.storePayloads,T=N=>typeof N=="boolean"?N:typeof M=="boolean"?M:!0,o=f.data.config;p({port:String(o.port??((s=o.http)==null?void 0:s.port)??""),host:o.host??((a=o.http)==null?void 0:a.host)??"127.0.0.1",logRetentionDays:String(o.logRetentionDays??30),storeRequestPayloads:T(o.storeRequestPayloads),storeResponsePayloads:T(o.storeResponsePayloads),logLevel:o.logLevel??"info",requestLogging:o.requestLogging!==!1,responseLogging:o.responseLogging??o.requestLogging!==!1,bodyLimitMb:(()=>{const N=o.bodyLimit;return typeof N=="number"&&Number.isFinite(N)&&N>0?String(Math.max(1,Math.round(N/(1024*1024)))):"10"})(),enableRoutingFallback:o.enableRoutingFallback===!0,httpEnabled:((i=o.http)==null?void 0:i.enabled)!==!1,httpPort:String(((h=o.http)==null?void 0:h.port)??o.port??4100),httpHost:((b=o.http)==null?void 0:b.host)??o.host??"127.0.0.1",httpsEnabled:((P=o.https)==null?void 0:P.enabled)===!0,httpsPort:String(((k=o.https)==null?void 0:k.port)??4443),httpsHost:((w=o.https)==null?void 0:w.host)??o.host??"127.0.0.1",httpsKeyPath:((C=o.https)==null?void 0:C.keyPath)??"",httpsCertPath:((v=o.https)==null?void 0:v.certPath)??"",httpsCaPath:((A=o.https)==null?void 0:A.caPath)??""})}},[f.data]),m.useEffect(()=>{y.data&&(te(y.data),R({enabled:y.data.enabled,username:y.data.username??"",password:"",confirmPassword:""}),D({}))},[y.data]),m.useEffect(()=>{f.isError&&f.error&&u({title:t("settings.toast.loadFailure",{message:f.error.message}),variant:"error"})},[f.isError,f.error,u,t]),m.useEffect(()=>{y.isError&&y.error&&u({title:t("settings.toast.authLoadFailure",{message:y.error.message}),variant:"error"})},[y.isError,y.error,u,t]);const V=s=>a=>{p(i=>({...i,[s]:a}))},we=()=>{const s={};if(!n.httpEnabled&&!n.httpsEnabled&&(s.protocol="至少需要启用 HTTP 或 HTTPS 协议"),n.httpEnabled){const b=Number(n.httpPort);(!Number.isFinite(b)||b<1||b>65535)&&(s.httpPort="HTTP 端口必须在 1-65535 之间")}if(n.httpsEnabled){const b=Number(n.httpsPort);(!Number.isFinite(b)||b<1||b>65535)&&(s.httpsPort="HTTPS 端口必须在 1-65535 之间"),(!n.httpsKeyPath||!n.httpsCertPath)&&(s.protocol="HTTPS 已启用但缺少证书路径,请手动配置受信任的证书")}const a=Number(n.port);(!Number.isFinite(a)||a<1||a>65535)&&(s.port=t("settings.validation.port"));const i=Number(n.logRetentionDays);(!Number.isFinite(i)||i<1||i>365)&&(s.logRetentionDays=t("settings.validation.retention"));const h=Number(n.bodyLimitMb);return(!Number.isFinite(h)||h<1||h>2048)&&(s.bodyLimitMb=t("settings.validation.bodyLimit")),J(s),Object.keys(s).length===0},Ce=()=>{const s={},a=l.username.trim(),i=d?a!==(d.username??""):!0,h=l.enabled&&(!(d!=null&&d.hasPassword)||i);return l.enabled&&!a&&(s.username=t("settings.auth.validation.username")),l.password&&l.password.length<6&&(s.password=t("settings.auth.validation.minLength")),h&&!l.password&&(s.password=t("settings.auth.validation.passwordRequired")),(l.password||l.confirmPassword)&&l.password!==l.confirmPassword&&(s.confirmPassword=t("settings.auth.validation.confirmMismatch")),D(s),Object.keys(s).length===0},Le=async()=>{var s,a,i,h,b,P,k,w,C,v,A,M,T,o,N,re,ne,oe,ie,le,ce,de,he,me,pe,ue;if(!r){u({title:t("settings.toast.loadFailure",{message:t("settings.toast.missingConfig")}),variant:"error"});return}if(we()){U(!0);try{const I=Number(n.port),Ae=Number(n.logRetentionDays),Me=Number(n.bodyLimitMb),x={...r,http:{enabled:n.httpEnabled,port:Number(n.httpPort),host:n.httpHost.trim()||"127.0.0.1"},https:{enabled:n.httpsEnabled,port:Number(n.httpsPort),host:n.httpsHost.trim()||"127.0.0.1",keyPath:n.httpsKeyPath.trim(),certPath:n.httpsCertPath.trim(),caPath:n.httpsCaPath.trim()||void 0},port:I,host:n.host.trim()||void 0,logRetentionDays:Ae,storeRequestPayloads:n.storeRequestPayloads,storeResponsePayloads:n.storeResponsePayloads,logLevel:n.logLevel,requestLogging:n.requestLogging,responseLogging:n.responseLogging,bodyLimit:Math.max(1,Math.floor(Me*1024*1024)),enableRoutingFallback:n.enableRoutingFallback},ge={...x};delete ge.webAuth,await O.put("/api/config",ge),$({...x,webAuth:r.webAuth});const xe=W=>(W==null?void 0:W.trim())||void 0,Te=r.port??((s=r.http)==null?void 0:s.port)??4100,Ke=x.port??((a=x.http)==null?void 0:a.port)??4100,De=((i=r.host)==null?void 0:i.trim())||((b=(h=r.http)==null?void 0:h.host)==null?void 0:b.trim())||"127.0.0.1",Ve=((P=x.host)==null?void 0:P.trim())||((w=(k=x.http)==null?void 0:k.host)==null?void 0:w.trim())||"127.0.0.1",Ie=Te!==Ke||De!==Ve||((C=r.http)==null?void 0:C.enabled)!==((v=x.http)==null?void 0:v.enabled)||((A=r.http)==null?void 0:A.port)!==((M=x.http)==null?void 0:M.port)||(((T=r.http)==null?void 0:T.host)??r.host??"127.0.0.1")!==(((o=x.http)==null?void 0:o.host)??x.host??"127.0.0.1")||((N=r.https)==null?void 0:N.enabled)!==((re=x.https)==null?void 0:re.enabled)||((ne=r.https)==null?void 0:ne.port)!==((oe=x.https)==null?void 0:oe.port)||(((ie=r.https)==null?void 0:ie.host)??r.host??"127.0.0.1")!==(((le=x.https)==null?void 0:le.host)??x.host??"127.0.0.1")||((ce=r.https)==null?void 0:ce.keyPath)!==((de=x.https)==null?void 0:de.keyPath)||((he=r.https)==null?void 0:he.certPath)!==((me=x.https)==null?void 0:me.certPath)||xe((pe=r.https)==null?void 0:pe.caPath)!==xe((ue=x.https)==null?void 0:ue.caPath);u(Ie?{title:t("settings.toast.protocolRestartRequired"),variant:"success"}:{title:t("settings.toast.saveSuccess"),variant:"success"}),f.refetch()}catch(I){u({title:t("settings.toast.saveFailure",{message:I instanceof Error?I.message:"unknown"}),variant:"error"})}finally{U(!1)}}},Re=()=>{var s,a,i,h,b,P,k,w,C;r&&(p({port:String(r.port??""),host:r.host??"",logRetentionDays:String(r.logRetentionDays??30),storeRequestPayloads:typeof r.storeRequestPayloads=="boolean"?r.storeRequestPayloads:typeof r.storePayloads=="boolean"?r.storePayloads:!0,storeResponsePayloads:typeof r.storeResponsePayloads=="boolean"?r.storeResponsePayloads:typeof r.storePayloads=="boolean"?r.storePayloads:!0,logLevel:r.logLevel??"info",requestLogging:r.requestLogging!==!1,responseLogging:r.responseLogging??r.requestLogging!==!1,bodyLimitMb:(()=>{const v=r.bodyLimit;return typeof v=="number"&&Number.isFinite(v)&&v>0?String(Math.max(1,Math.round(v/(1024*1024)))):"10"})(),enableRoutingFallback:r.enableRoutingFallback===!0,httpEnabled:((s=r.http)==null?void 0:s.enabled)!==!1,httpPort:String(((a=r.http)==null?void 0:a.port)??r.port??4100),httpHost:((i=r.http)==null?void 0:i.host)??r.host??"127.0.0.1",httpsEnabled:((h=r.https)==null?void 0:h.enabled)===!0,httpsPort:String(((b=r.https)==null?void 0:b.port)??4443),httpsHost:((P=r.https)==null?void 0:P.host)??r.host??"127.0.0.1",httpsKeyPath:((k=r.https)==null?void 0:k.keyPath)??"",httpsCertPath:((w=r.https)==null?void 0:w.certPath)??"",httpsCaPath:((C=r.https)==null?void 0:C.caPath)??""}),J({}))},Se=async()=>{var s;if(Ce()){se(!0);try{const a={enabled:l.enabled,username:l.username.trim()||void 0};l.password&&(a.password=l.password);const h=(s=(await O.post("/api/auth/web",a)).data)==null?void 0:s.auth;h&&(te(h),R({enabled:h.enabled,username:h.username??"",password:"",confirmPassword:""}),D({})),u({title:t("settings.auth.toast.success"),variant:"success"}),y.refetch()}catch(a){const i=a instanceof Error?a.message:"unknown";u({title:t("settings.auth.toast.failure",{message:i}),variant:"error"})}finally{se(!1)}}},Ee=()=>{d&&(R({enabled:d.enabled,username:d.username??"",password:"",confirmPassword:""}),D({}))},Fe=async()=>{if(!B){u({title:t("settings.toast.copyFailure",{message:t("settings.file.unknown")}),variant:"error"});return}try{await ze(B),u({title:t("settings.toast.copySuccess"),variant:"success"})}catch(s){u({title:t("settings.toast.copyFailure",{message:s instanceof Error?s.message:"unknown"}),variant:"error"})}},He=async()=>{Y(!0);try{const a=(await O.post("/api/logs/cleanup")).data.deleted??0;u({title:a>0?t("settings.toast.cleanupSuccess",{count:a}):t("settings.toast.cleanupNone"),variant:"success"})}catch(s){u({title:t("settings.toast.cleanupFailure",{message:s instanceof Error?s.message:"unknown"}),variant:"error"})}finally{Y(!1)}},qe=async()=>{ee(!0);try{const s=await O.post("/api/logs/clear"),{deleted:a,metricsCleared:i}=s.data;u({title:t("settings.toast.clearAllSuccess",{logs:a,metrics:i}),variant:"success"})}catch(s){u({title:t("settings.toast.clearAllFailure",{message:s instanceof Error?s.message:"unknown"}),variant:"error"})}finally{ee(!1)}},Q=f.isPending||!r&&f.isFetching;return m.useEffect(()=>{if(Q)return;const s=Array.from(K.current.values());if(s.length===0)return;const a=new IntersectionObserver(i=>{for(const h of i)if(h.isIntersecting){ve(h.target.id);break}},{rootMargin:"-80px 0px -60% 0px",threshold:0});for(const i of s)a.observe(i);return()=>a.disconnect()},[Q]),e.jsxs("div",{className:"flex flex-col gap-6",children:[e.jsx(We,{icon:e.jsx(Ge,{className:"h-5 w-5","aria-hidden":"true"}),title:t("settings.title"),description:t("settings.description"),actions:r?e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(S,{variant:"outline",onClick:Re,disabled:_,children:t("common.actions.reset")}),e.jsx(S,{onClick:()=>void Le(),disabled:_,children:t(_?"common.actions.saving":"common.actions.save")})]}):null}),Q?e.jsx(E,{children:e.jsx(F,{className:"flex min-h-[220px] items-center justify-center",children:e.jsx(be,{})})}):r?e.jsxs("div",{className:"grid grid-cols-1 xl:grid-cols-[200px_1fr] gap-6",children:[e.jsx("nav",{className:"hidden xl:block",children:e.jsxs("div",{className:"sticky top-20 space-y-1",children:[e.jsx("p",{className:"mb-3 text-xs font-medium uppercase tracking-wider text-muted-foreground",children:t("settings.sections.jump")}),je.map(s=>e.jsx("button",{type:"button",onClick:()=>Ne(s.id),className:Qe("block w-full rounded-md px-3 py-2 text-left text-sm transition-colors",ye===s.id?"bg-primary/10 font-medium text-primary":"text-muted-foreground hover:bg-muted hover:text-foreground"),children:t(s.labelKey)},s.id))]})}),e.jsxs("div",{className:"flex flex-col gap-6",children:[e.jsx(E,{id:"section-basics",ref:q("section-basics"),children:e.jsxs(F,{className:"pt-6",children:[e.jsx("h3",{className:"mb-4 text-sm font-semibold",children:t("settings.sections.basics")}),e.jsxs("div",{className:"grid gap-5 md:grid-cols-2",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx(c,{children:t("settings.fields.port")}),e.jsx(j,{type:"number",min:1,max:65535,value:n.port,onChange:s=>V("port")(s.target.value),"aria-invalid":!!g.port}),g.port&&e.jsx("p",{className:"text-xs text-destructive",children:g.port})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(c,{children:t("settings.fields.host")}),e.jsx(j,{value:n.host,onChange:s=>V("host")(s.target.value),placeholder:t("settings.fields.hostPlaceholder")})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(c,{children:t("settings.fields.retention")}),e.jsx(j,{type:"number",min:1,max:365,value:n.logRetentionDays,onChange:s=>V("logRetentionDays")(s.target.value),"aria-invalid":!!g.logRetentionDays}),g.logRetentionDays&&e.jsx("p",{className:"text-xs text-destructive",children:g.logRetentionDays})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(c,{children:t("settings.fields.bodyLimit")}),e.jsx(j,{type:"number",min:1,max:2048,value:n.bodyLimitMb,onChange:s=>V("bodyLimitMb")(s.target.value),"aria-invalid":!!g.bodyLimitMb}),e.jsx("p",{className:"text-xs text-muted-foreground",children:t("settings.fields.bodyLimitHint")}),g.bodyLimitMb&&e.jsx("p",{className:"text-xs text-destructive",children:g.bodyLimitMb})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(c,{children:t("settings.fields.logLevel")}),e.jsxs($e,{value:n.logLevel,onValueChange:s=>p(a=>({...a,logLevel:s})),children:[e.jsx(Je,{children:e.jsx(Ue,{})}),e.jsx(Xe,{children:tt.map(s=>e.jsx(Ye,{value:s.value,children:t(`settings.fields.logLevelOption.${s.labelKey}`)},s.value))})]})]}),e.jsxs("div",{className:"md:col-span-2 grid gap-4 sm:grid-cols-2",children:[e.jsxs("div",{className:"flex items-center justify-between rounded-lg border p-4",children:[e.jsxs("div",{className:"space-y-1",children:[e.jsx(c,{className:"text-sm font-medium",children:t("settings.fields.storeRequestPayloads")}),e.jsx("p",{className:"text-xs text-muted-foreground",children:t("settings.fields.storeRequestPayloadsHint")})]}),e.jsx(L,{checked:n.storeRequestPayloads,onCheckedChange:s=>p(a=>({...a,storeRequestPayloads:s}))})]}),e.jsxs("div",{className:"flex items-center justify-between rounded-lg border p-4",children:[e.jsxs("div",{className:"space-y-1",children:[e.jsx(c,{className:"text-sm font-medium",children:t("settings.fields.storeResponsePayloads")}),e.jsx("p",{className:"text-xs text-muted-foreground",children:t("settings.fields.storeResponsePayloadsHint")})]}),e.jsx(L,{checked:n.storeResponsePayloads,onCheckedChange:s=>p(a=>({...a,storeResponsePayloads:s}))})]}),e.jsxs("div",{className:"flex items-center justify-between rounded-lg border p-4",children:[e.jsxs("div",{className:"space-y-1",children:[e.jsx(c,{className:"text-sm font-medium",children:t("settings.fields.requestLogging")}),e.jsx("p",{className:"text-xs text-muted-foreground",children:t("settings.fields.requestLoggingHint")})]}),e.jsx(L,{checked:n.requestLogging,onCheckedChange:s=>p(a=>({...a,requestLogging:s}))})]}),e.jsxs("div",{className:"flex items-center justify-between rounded-lg border p-4",children:[e.jsxs("div",{className:"space-y-1",children:[e.jsx(c,{className:"text-sm font-medium",children:t("settings.fields.responseLogging")}),e.jsx("p",{className:"text-xs text-muted-foreground",children:t("settings.fields.responseLoggingHint")})]}),e.jsx(L,{checked:n.responseLogging,onCheckedChange:s=>p(a=>({...a,responseLogging:s}))})]}),e.jsxs("div",{className:"flex items-center justify-between rounded-lg border border-amber-200 bg-amber-50 p-4 dark:border-amber-800 dark:bg-amber-950",children:[e.jsxs("div",{className:"space-y-1",children:[e.jsx(c,{className:"text-sm font-medium text-amber-700 dark:text-amber-300",children:t("settings.fields.enableRoutingFallback")}),e.jsx("p",{className:"text-xs text-amber-600 dark:text-amber-400",children:t("settings.fields.enableRoutingFallbackHint")})]}),e.jsx(L,{checked:n.enableRoutingFallback,onCheckedChange:s=>p(a=>({...a,enableRoutingFallback:s}))})]})]}),e.jsxs("div",{className:"md:col-span-2 rounded-lg border bg-muted/50 p-4",children:[e.jsx(c,{className:"text-xs uppercase tracking-wide text-muted-foreground",children:t("settings.fields.defaults")}),e.jsx("p",{className:"mt-2 text-sm",children:ke??t("settings.defaults.none")})]})]})]})}),e.jsx(E,{id:"section-protocol",ref:q("section-protocol"),children:e.jsxs(F,{className:"pt-6 space-y-6",children:[e.jsxs("div",{children:[e.jsx("h3",{className:"text-sm font-semibold",children:t("settings.sections.protocol")}),e.jsx("p",{className:"mt-1 text-xs text-muted-foreground",children:t("settings.protocol.description")})]}),e.jsx("div",{className:"rounded-lg border border-amber-200 bg-amber-50 p-4 dark:border-amber-800 dark:bg-amber-950",children:e.jsxs("div",{className:"flex items-start gap-3",children:[e.jsx(z,{className:"h-5 w-5 text-amber-600 dark:text-amber-400 mt-0.5 flex-shrink-0"}),e.jsxs("div",{className:"space-y-2",children:[e.jsx("p",{className:"text-sm font-medium text-amber-800 dark:text-amber-200",children:t("settings.protocol.restartWarning")}),e.jsx("p",{className:"text-xs text-amber-700 dark:text-amber-300",children:t("settings.protocol.restartHint")}),e.jsx("code",{className:"block rounded-md bg-amber-100 px-3 py-2 text-xs font-mono text-amber-900 dark:bg-amber-900 dark:text-amber-100",children:"cc-gw restart --daemon"}),e.jsx("p",{className:"text-xs text-amber-600 dark:text-amber-400",children:t("settings.protocol.restartTip")})]})]})}),g.protocol&&e.jsxs("div",{className:"rounded-lg border border-destructive/50 bg-destructive/10 p-4 text-sm text-destructive",children:[e.jsx(z,{className:"inline h-4 w-4 mr-2"}),g.protocol]}),e.jsxs("div",{className:"rounded-lg border border-blue-200 bg-blue-50/50 p-5 dark:border-blue-800 dark:bg-blue-950/50",children:[e.jsxs("div",{className:"flex items-center justify-between mb-4",children:[e.jsxs("div",{className:"space-y-1",children:[e.jsx(c,{className:"text-sm font-medium text-blue-800 dark:text-blue-200",children:t("settings.protocol.http.enable")}),e.jsx("p",{className:"text-xs text-blue-600 dark:text-blue-400",children:t("settings.protocol.http.hint")})]}),e.jsx(L,{checked:n.httpEnabled,onCheckedChange:s=>p(a=>({...a,httpEnabled:s}))})]}),n.httpEnabled&&e.jsxs("div",{className:"grid gap-4 sm:grid-cols-2 mt-4 pt-4 border-t border-blue-200 dark:border-blue-800",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx(c,{children:t("settings.protocol.http.port")}),e.jsx(j,{type:"number",min:1,max:65535,value:n.httpPort,onChange:s=>p(a=>({...a,httpPort:s.target.value})),"aria-invalid":!!g.httpPort}),g.httpPort&&e.jsx("p",{className:"text-xs text-destructive",children:g.httpPort})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(c,{children:t("settings.protocol.http.host")}),e.jsx(j,{value:n.httpHost,onChange:s=>p(a=>({...a,httpHost:s.target.value})),placeholder:"127.0.0.1"})]})]})]}),e.jsxs("div",{className:"rounded-lg border border-green-200 bg-green-50/50 p-5 dark:border-green-800 dark:bg-green-950/50",children:[e.jsxs("div",{className:"flex items-center justify-between mb-4",children:[e.jsxs("div",{className:"space-y-1",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(c,{className:"text-sm font-medium text-green-800 dark:text-green-200",children:t("settings.protocol.https.enable")}),e.jsx(Ze,{className:"h-4 w-4 text-green-600 dark:text-green-400"})]}),e.jsx("p",{className:"text-xs text-green-600 dark:text-green-400",children:t("settings.protocol.https.hint")})]}),e.jsx(L,{checked:n.httpsEnabled,onCheckedChange:s=>p(a=>({...a,httpsEnabled:s}))})]}),n.httpsEnabled&&e.jsxs("div",{className:"space-y-4 mt-4 pt-4 border-t border-green-200 dark:border-green-800",children:[e.jsxs("div",{className:"grid gap-4 sm:grid-cols-2",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx(c,{children:t("settings.protocol.https.port")}),e.jsx(j,{type:"number",min:1,max:65535,value:n.httpsPort,onChange:s=>p(a=>({...a,httpsPort:s.target.value})),"aria-invalid":!!g.httpsPort}),g.httpsPort&&e.jsx("p",{className:"text-xs text-destructive",children:g.httpsPort})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(c,{children:t("settings.protocol.https.host")}),e.jsx(j,{value:n.httpsHost,onChange:s=>p(a=>({...a,httpsHost:s.target.value})),placeholder:"127.0.0.1"})]})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(c,{children:t("settings.protocol.https.keyPath")}),e.jsx(j,{value:n.httpsKeyPath,onChange:s=>p(a=>({...a,httpsKeyPath:s.target.value})),placeholder:"~/.cc-gw/certs/key.pem",className:"font-mono text-xs"})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(c,{children:t("settings.protocol.https.certPath")}),e.jsx(j,{value:n.httpsCertPath,onChange:s=>p(a=>({...a,httpsCertPath:s.target.value})),placeholder:"~/.cc-gw/certs/cert.pem",className:"font-mono text-xs"})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(c,{children:t("settings.protocol.https.caPath")}),e.jsx(j,{value:n.httpsCaPath,onChange:s=>p(a=>({...a,httpsCaPath:s.target.value})),placeholder:"留空则不使用",className:"font-mono text-xs"})]}),e.jsx("div",{className:"rounded-lg border border-amber-200 bg-amber-50 p-4 dark:border-amber-800 dark:bg-amber-950",children:e.jsxs("div",{className:"flex items-start gap-3",children:[e.jsx(z,{className:"h-5 w-5 text-amber-600 dark:text-amber-400 mt-0.5 flex-shrink-0"}),e.jsxs("div",{className:"space-y-2 flex-1",children:[e.jsx("p",{className:"text-sm font-medium text-amber-800 dark:text-amber-200",children:t("settings.protocol.https.warning")}),e.jsxs("p",{className:"text-xs text-amber-700 dark:text-amber-300 leading-relaxed",children:[e.jsx("strong",{children:t("settings.protocol.https.invalidCert")}),t("settings.protocol.https.invalidCertDetail")]}),e.jsxs("p",{className:"text-xs text-amber-700 dark:text-amber-300 leading-relaxed",children:[e.jsx("strong",{children:t("settings.protocol.https.recommended")}),t("settings.protocol.https.recommendedDetail")]}),e.jsx("p",{className:"text-xs text-amber-600 dark:text-amber-400 leading-relaxed",children:t("settings.protocol.https.tip")})]})]})})]})]})]})}),e.jsx(E,{id:"section-security",ref:q("section-security"),children:e.jsxs(F,{className:"pt-6 space-y-5",children:[e.jsxs("div",{children:[e.jsx("h3",{className:"text-sm font-semibold",children:t("settings.sections.security")}),e.jsx("p",{className:"mt-1 text-xs text-muted-foreground",children:t("settings.auth.description")})]}),y.isPending&&!d?e.jsx("div",{className:"flex min-h-[120px] items-center justify-center",children:e.jsx(be,{})}):e.jsxs("div",{className:"space-y-6",children:[e.jsxs("div",{className:"flex items-center justify-between rounded-lg border p-4",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx(c,{className:"text-sm font-medium",children:t("settings.auth.enable")}),e.jsx("p",{className:"text-xs text-muted-foreground",children:t("settings.auth.enableHint")}),e.jsxs("div",{className:"flex flex-wrap gap-2 text-xs font-medium text-muted-foreground",children:[e.jsx("span",{className:"rounded-full bg-muted px-3 py-1",children:"/ui"}),e.jsx("span",{className:"rounded-full bg-muted px-3 py-1",children:"/api/*"}),e.jsx("span",{className:"rounded-full bg-muted px-3 py-1",children:"Cookie Session"})]})]}),e.jsx(L,{checked:l.enabled,onCheckedChange:s=>R(a=>({...a,enabled:s}))})]}),e.jsxs("div",{className:"grid gap-6 lg:grid-cols-[minmax(0,1fr)_minmax(0,0.85fr)]",children:[e.jsxs("div",{className:"grid gap-4 sm:grid-cols-2",children:[e.jsxs("div",{className:"space-y-2 sm:col-span-2",children:[e.jsx(c,{children:t("settings.auth.username")}),e.jsx(j,{value:l.username,onChange:s=>R(a=>({...a,username:s.target.value})),placeholder:t("settings.auth.usernamePlaceholder")}),H.username&&e.jsx("p",{className:"text-xs text-destructive",children:H.username})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(c,{children:t("settings.auth.password")}),e.jsx(j,{type:"password",value:l.password,disabled:!l.enabled,onChange:s=>R(a=>({...a,password:s.target.value})),placeholder:t("settings.auth.passwordPlaceholder")}),H.password?e.jsx("p",{className:"text-xs text-destructive",children:H.password}):e.jsx("p",{className:"text-xs text-muted-foreground",children:t(ae?"settings.auth.passwordHintRequired":"settings.auth.passwordHintOptional")})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(c,{children:t("settings.auth.confirmPassword")}),e.jsx(j,{type:"password",value:l.confirmPassword,disabled:!l.enabled,onChange:s=>R(a=>({...a,confirmPassword:s.target.value})),placeholder:t("settings.auth.confirmPasswordPlaceholder")}),H.confirmPassword&&e.jsx("p",{className:"text-xs text-destructive",children:H.confirmPassword})]})]}),e.jsxs("div",{className:"flex flex-col gap-4",children:[e.jsxs("div",{className:"rounded-lg border bg-card p-4",children:[e.jsx("p",{className:"text-xs uppercase tracking-wide text-muted-foreground",children:t("settings.auth.status")}),e.jsx("p",{className:"mt-2 text-base font-semibold",children:d!=null&&d.enabled?t("settings.auth.statusEnabled"):t("settings.auth.statusDisabled")}),(d==null?void 0:d.username)&&e.jsxs("div",{className:"mt-3 rounded-md bg-primary/10 px-3 py-2 text-xs font-medium text-primary",children:[t("settings.auth.username"),": ",d.username]})]}),e.jsx("div",{className:"rounded-lg border bg-muted/50 p-4 text-xs text-muted-foreground",children:t(ae?"settings.auth.passwordHintRequired":"settings.auth.passwordHintOptional")})]})]}),e.jsxs("div",{className:"flex flex-wrap items-center justify-end gap-3",children:[e.jsx(S,{onClick:()=>void Se(),disabled:G,children:t(G?"common.actions.saving":"settings.auth.actions.save")}),e.jsx(S,{variant:"outline",onClick:Ee,disabled:G,children:t("common.actions.reset")})]})]})]})}),e.jsx(E,{id:"section-config-file",ref:q("section-config-file"),children:e.jsxs(F,{className:"pt-6 space-y-3",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{children:[e.jsx("h3",{className:"text-sm font-semibold",children:t("settings.sections.configFile")}),e.jsx("p",{className:"mt-1 text-xs text-muted-foreground",children:t("settings.file.description")})]}),e.jsxs(S,{variant:"outline",size:"sm",onClick:()=>void Fe(),children:[e.jsx(et,{className:"mr-2 h-4 w-4"}),t("common.actions.copy")]})]}),e.jsx("code",{className:"block break-all rounded-lg border bg-muted px-4 py-3 text-xs",children:B||t("settings.file.unknown")})]})}),e.jsx(E,{id:"section-cleanup",ref:q("section-cleanup"),children:e.jsxs(F,{className:"pt-6 space-y-4",children:[e.jsxs("div",{children:[e.jsx("h3",{className:"text-sm font-semibold",children:t("settings.sections.cleanup")}),e.jsx("p",{className:"mt-1 text-xs text-muted-foreground",children:t("settings.cleanup.description")})]}),e.jsxs("div",{className:"flex flex-wrap gap-3",children:[e.jsx(S,{variant:"outline",onClick:()=>void He(),disabled:X,className:"border-destructive/50 text-destructive hover:bg-destructive/10",children:t(X?"common.actions.cleaning":"common.actions.cleanup")}),e.jsx(S,{variant:"destructive",onClick:()=>void qe(),disabled:Z,children:t(Z?"settings.cleanup.clearingAll":"settings.cleanup.clearAll")})]}),e.jsx("p",{className:"text-xs text-destructive",children:t("settings.cleanup.clearAllWarning")})]})})]})]}):e.jsx(E,{children:e.jsx(F,{className:"pt-6",children:e.jsx("p",{className:"text-sm font-medium text-destructive",children:t("settings.toast.missingConfig")})})})]})}export{mt as default};
@@ -1 +0,0 @@
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:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont;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:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,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}:root{--background: 220 25% 97%;--foreground: 222 47% 11%;--card: 0 0% 100%;--card-foreground: 222 47% 11%;--popover: 0 0% 100%;--popover-foreground: 222 47% 11%;--primary: 239 84% 67%;--primary-foreground: 0 0% 100%;--secondary: 220 14% 96%;--secondary-foreground: 222 47% 11%;--muted: 220 14% 96%;--muted-foreground: 220 9% 46%;--accent: 239 84% 97%;--accent-foreground: 239 84% 50%;--destructive: 0 84% 60%;--destructive-foreground: 0 0% 100%;--border: 220 13% 91%;--input: 220 13% 91%;--ring: 239 84% 67%;--radius: .625rem;--chart-1: 239 84% 67%;--chart-2: 142 71% 45%;--chart-3: 38 92% 50%;--chart-4: 280 67% 55%;--chart-5: 340 75% 55%;--success: 142 71% 45%;--success-foreground: 0 0% 100%;--warning: 38 92% 50%;--warning-foreground: 0 0% 100%;--info: 199 89% 48%;--info-foreground: 0 0% 100%;--shadow-sm: 0 1px 2px 0 rgb(0 0 0 / .05);--shadow: 0 1px 3px 0 rgb(0 0 0 / .1), 0 1px 2px -1px rgb(0 0 0 / .1);--shadow-md: 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1);--shadow-lg: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1)}.dark,[data-theme=dark]{--background: 224 71% 4%;--foreground: 213 31% 91%;--card: 224 71% 7%;--card-foreground: 213 31% 91%;--popover: 224 71% 7%;--popover-foreground: 213 31% 91%;--primary: 239 84% 67%;--primary-foreground: 0 0% 100%;--secondary: 215 28% 17%;--secondary-foreground: 213 31% 91%;--muted: 215 28% 17%;--muted-foreground: 215 20% 65%;--accent: 239 40% 20%;--accent-foreground: 239 84% 75%;--destructive: 0 63% 31%;--destructive-foreground: 0 0% 100%;--border: 215 28% 17%;--input: 215 28% 17%;--ring: 239 84% 67%;--chart-1: 239 84% 67%;--chart-2: 142 71% 50%;--chart-3: 38 92% 55%;--chart-4: 280 67% 60%;--chart-5: 340 75% 60%;--success: 142 71% 50%;--success-foreground: 0 0% 100%;--warning: 38 92% 55%;--warning-foreground: 0 0% 100%;--info: 199 89% 55%;--info-foreground: 0 0% 100%;--shadow-sm: 0 1px 2px 0 rgb(0 0 0 / .3);--shadow: 0 1px 3px 0 rgb(0 0 0 / .4), 0 1px 2px -1px rgb(0 0 0 / .3);--shadow-md: 0 4px 6px -1px rgb(0 0 0 / .4), 0 2px 4px -2px rgb(0 0 0 / .3);--shadow-lg: 0 10px 15px -3px rgb(0 0 0 / .4), 0 4px 6px -4px rgb(0 0 0 / .3)}*{border-color:hsl(var(--border))}html,body,#root{height:100%;width:100%;overflow-x:hidden;max-width:100vw}body{background-color:hsl(var(--background));color:hsl(var(--foreground));font-feature-settings:"rlig" 1,"calt" 1;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.container{width:100%;margin-right:auto;margin-left:auto;padding-right:2rem;padding-left:2rem}@media (min-width: 1400px){.container{max-width:1400px}}.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border-width:0}.pointer-events-none{pointer-events:none}.pointer-events-auto{pointer-events:auto}.collapse{visibility:collapse}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.sticky{position:sticky}.inset-0{top:0;right:0;bottom:0;left:0}.inset-y-0{top:0;bottom:0}.-right-1{right:-.25rem}.-right-2{right:-.5rem}.-top-1{top:-.25rem}.-top-2{top:-.5rem}.left-0{left:0}.left-2{left:.5rem}.left-\[50\%\]{left:50%}.right-0{right:0}.right-2{right:.5rem}.right-4{right:1rem}.right-6{right:1.5rem}.top-0{top:0}.top-1\/2{top:50%}.top-2{top:.5rem}.top-20{top:5rem}.top-4{top:1rem}.top-6{top:1.5rem}.top-\[50\%\]{top:50%}.top-full{top:100%}.z-30{z-index:30}.z-40{z-index:40}.z-50{z-index:50}.z-\[100\]{z-index:100}.-mx-1{margin-left:-.25rem;margin-right:-.25rem}.mx-auto{margin-left:auto;margin-right:auto}.my-1{margin-top:.25rem;margin-bottom:.25rem}.mb-1\.5{margin-bottom:.375rem}.mb-2{margin-bottom:.5rem}.mb-3{margin-bottom:.75rem}.mb-4{margin-bottom:1rem}.mb-6{margin-bottom:1.5rem}.ml-1{margin-left:.25rem}.ml-1\.5{margin-left:.375rem}.ml-3{margin-left:.75rem}.ml-auto{margin-left:auto}.mr-1{margin-right:.25rem}.mr-2{margin-right:.5rem}.mt-0\.5{margin-top:.125rem}.mt-1{margin-top:.25rem}.mt-2{margin-top:.5rem}.mt-3{margin-top:.75rem}.mt-4{margin-top:1rem}.mt-6{margin-top:1.5rem}.mt-8{margin-top:2rem}.mt-auto{margin-top:auto}.block{display:block}.inline{display:inline}.flex{display:flex}.inline-flex{display:inline-flex}.table{display:table}.grid{display:grid}.hidden{display:none}.h-10{height:2.5rem}.h-11{height:2.75rem}.h-12{height:3rem}.h-14{height:3.5rem}.h-2{height:.5rem}.h-2\.5{height:.625rem}.h-3{height:.75rem}.h-3\.5{height:.875rem}.h-32{height:8rem}.h-4{height:1rem}.h-5{height:1.25rem}.h-6{height:1.5rem}.h-7{height:1.75rem}.h-8{height:2rem}.h-9{height:2.25rem}.h-\[1px\]{height:1px}.h-\[280px\]{height:280px}.h-\[320px\]{height:320px}.h-\[40vh\]{height:40vh}.h-\[var\(--radix-select-trigger-height\)\]{height:var(--radix-select-trigger-height)}.h-full{height:100%}.h-px{height:1px}.max-h-56{max-height:14rem}.max-h-60{max-height:15rem}.max-h-64{max-height:16rem}.max-h-72{max-height:18rem}.max-h-80{max-height:20rem}.max-h-96{max-height:24rem}.max-h-\[420px\]{max-height:420px}.max-h-\[85vh\]{max-height:85vh}.max-h-screen{max-height:100vh}.min-h-0{min-height:0px}.min-h-\[120px\]{min-height:120px}.min-h-\[200px\]{min-height:200px}.min-h-\[220px\]{min-height:220px}.min-h-\[280px\]{min-height:280px}.min-h-\[320px\]{min-height:320px}.min-h-\[80px\]{min-height:80px}.min-h-screen{min-height:100vh}.w-1{width:.25rem}.w-1\/2{width:50%}.w-10{width:2.5rem}.w-11{width:2.75rem}.w-12{width:3rem}.w-14{width:3.5rem}.w-16{width:4rem}.w-2{width:.5rem}.w-2\.5{width:.625rem}.w-20{width:5rem}.w-24{width:6rem}.w-28{width:7rem}.w-3{width:.75rem}.w-3\.5{width:.875rem}.w-3\/4{width:75%}.w-32{width:8rem}.w-4{width:1rem}.w-40{width:10rem}.w-48{width:12rem}.w-5{width:1.25rem}.w-56{width:14rem}.w-64{width:16rem}.w-7{width:1.75rem}.w-72{width:18rem}.w-8{width:2rem}.w-80{width:20rem}.w-9{width:2.25rem}.w-\[140px\]{width:140px}.w-\[180px\]{width:180px}.w-\[1px\]{width:1px}.w-\[80px\]{width:80px}.w-\[var\(--radix-popover-trigger-width\)\]{width:var(--radix-popover-trigger-width)}.w-full{width:100%}.min-w-0{min-width:0px}.min-w-\[1200px\]{min-width:1200px}.min-w-\[200px\]{min-width:200px}.min-w-\[8rem\]{min-width:8rem}.min-w-\[var\(--radix-select-trigger-width\)\]{min-width:var(--radix-select-trigger-width)}.max-w-2xl{max-width:42rem}.max-w-3xl{max-width:48rem}.max-w-7xl{max-width:80rem}.max-w-\[100px\]{max-width:100px}.max-w-\[120px\]{max-width:120px}.max-w-\[90px\]{max-width:90px}.max-w-lg{max-width:32rem}.max-w-md{max-width:28rem}.max-w-xl{max-width:36rem}.max-w-xs{max-width:20rem}.flex-1{flex:1 1 0%}.flex-shrink-0,.shrink-0{flex-shrink:0}.caption-bottom{caption-side:bottom}.border-collapse{border-collapse:collapse}.-translate-y-1\/2{--tw-translate-y: -50%;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))}.translate-x-\[-50\%\]{--tw-translate-x: -50%;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))}.translate-y-\[-50\%\]{--tw-translate-y: -50%;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))}.rotate-180{--tw-rotate: 180deg;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-default{cursor:default}.cursor-pointer{cursor:pointer}.touch-none{touch-action:none}.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))}.grid-cols-\[minmax\(0\,1fr\)_auto_minmax\(0\,1fr\)_auto\]{grid-template-columns:minmax(0,1fr) auto minmax(0,1fr) auto}.flex-row{flex-direction:row}.flex-col{flex-direction:column}.flex-col-reverse{flex-direction:column-reverse}.flex-wrap{flex-wrap:wrap}.items-start{align-items:flex-start}.items-center{align-items:center}.justify-end{justify-content:flex-end}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-1{gap:.25rem}.gap-2{gap:.5rem}.gap-3{gap:.75rem}.gap-4{gap:1rem}.gap-5{gap:1.25rem}.gap-6{gap:1.5rem}.gap-x-4{-moz-column-gap:1rem;column-gap:1rem}.gap-y-3{row-gap:.75rem}.space-x-4>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(1rem * var(--tw-space-x-reverse));margin-left:calc(1rem * calc(1 - var(--tw-space-x-reverse)))}.space-y-0>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(0px * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(0px * 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-3>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.75rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.75rem * var(--tw-space-y-reverse))}.space-y-4>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1rem * var(--tw-space-y-reverse))}.space-y-5>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1.25rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1.25rem * 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))}.divide-y>:not([hidden])~:not([hidden]){--tw-divide-y-reverse: 0;border-top-width:calc(1px * calc(1 - var(--tw-divide-y-reverse)));border-bottom-width:calc(1px * var(--tw-divide-y-reverse))}.self-start{align-self:flex-start}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.overflow-x-auto{overflow-x:auto}.overflow-y-auto{overflow-y:auto}.truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.whitespace-nowrap{white-space:nowrap}.whitespace-pre-line{white-space:pre-line}.whitespace-pre-wrap{white-space:pre-wrap}.break-all{word-break:break-all}.rounded{border-radius:.25rem}.rounded-\[inherit\]{border-radius:inherit}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:var(--radius)}.rounded-md{border-radius:calc(var(--radius) - 2px)}.rounded-sm{border-radius:calc(var(--radius) - 4px)}.rounded-xl{border-radius:.75rem}.rounded-r-full{border-top-right-radius:9999px;border-bottom-right-radius:9999px}.border{border-width:1px}.border-2{border-width:2px}.border-4{border-width:4px}.border-b{border-bottom-width:1px}.border-l{border-left-width:1px}.border-r{border-right-width:1px}.border-t{border-top-width:1px}.border-dashed{border-style:dashed}.border-amber-200{--tw-border-opacity: 1;border-color:rgb(253 230 138 / var(--tw-border-opacity, 1))}.border-amber-300{--tw-border-opacity: 1;border-color:rgb(252 211 77 / var(--tw-border-opacity, 1))}.border-blue-200{--tw-border-opacity: 1;border-color:rgb(191 219 254 / var(--tw-border-opacity, 1))}.border-border{border-color:hsl(var(--border))}.border-border\/50{border-color:hsl(var(--border) / .5)}.border-cyan-200{--tw-border-opacity: 1;border-color:rgb(165 243 252 / var(--tw-border-opacity, 1))}.border-destructive{border-color:hsl(var(--destructive))}.border-destructive\/50{border-color:hsl(var(--destructive) / .5)}.border-emerald-200{--tw-border-opacity: 1;border-color:rgb(167 243 208 / var(--tw-border-opacity, 1))}.border-emerald-300{--tw-border-opacity: 1;border-color:rgb(110 231 183 / var(--tw-border-opacity, 1))}.border-emerald-500\/50{border-color:#10b98180}.border-green-200{--tw-border-opacity: 1;border-color:rgb(187 247 208 / var(--tw-border-opacity, 1))}.border-input{border-color:hsl(var(--input))}.border-pink-200{--tw-border-opacity: 1;border-color:rgb(251 207 232 / var(--tw-border-opacity, 1))}.border-primary{border-color:hsl(var(--primary))}.border-primary\/20{border-color:hsl(var(--primary) / .2)}.border-red-200{--tw-border-opacity: 1;border-color:rgb(254 202 202 / var(--tw-border-opacity, 1))}.border-red-300{--tw-border-opacity: 1;border-color:rgb(252 165 165 / var(--tw-border-opacity, 1))}.border-slate-200{--tw-border-opacity: 1;border-color:rgb(226 232 240 / var(--tw-border-opacity, 1))}.border-slate-300{--tw-border-opacity: 1;border-color:rgb(203 213 225 / var(--tw-border-opacity, 1))}.border-transparent{border-color:transparent}.border-violet-200{--tw-border-opacity: 1;border-color:rgb(221 214 254 / var(--tw-border-opacity, 1))}.border-l-transparent{border-left-color:transparent}.border-t-transparent{border-top-color:transparent}.bg-accent{background-color:hsl(var(--accent))}.bg-amber-100{--tw-bg-opacity: 1;background-color:rgb(254 243 199 / var(--tw-bg-opacity, 1))}.bg-amber-100\/80{background-color:#fef3c7cc}.bg-amber-50{--tw-bg-opacity: 1;background-color:rgb(255 251 235 / var(--tw-bg-opacity, 1))}.bg-amber-500{--tw-bg-opacity: 1;background-color:rgb(245 158 11 / var(--tw-bg-opacity, 1))}.bg-amber-500\/15{background-color:#f59e0b26}.bg-background{background-color:hsl(var(--background))}.bg-background\/80{background-color:hsl(var(--background) / .8)}.bg-black\/80{background-color:#000c}.bg-blue-50{--tw-bg-opacity: 1;background-color:rgb(239 246 255 / var(--tw-bg-opacity, 1))}.bg-blue-50\/50{background-color:#eff6ff80}.bg-blue-500\/15{background-color:#3b82f626}.bg-blue-600{--tw-bg-opacity: 1;background-color:rgb(37 99 235 / var(--tw-bg-opacity, 1))}.bg-border{background-color:hsl(var(--border))}.bg-card{background-color:hsl(var(--card))}.bg-cyan-500\/15{background-color:#06b6d426}.bg-destructive{background-color:hsl(var(--destructive))}.bg-destructive\/10{background-color:hsl(var(--destructive) / .1)}.bg-emerald-50{--tw-bg-opacity: 1;background-color:rgb(236 253 245 / var(--tw-bg-opacity, 1))}.bg-emerald-500{--tw-bg-opacity: 1;background-color:rgb(16 185 129 / var(--tw-bg-opacity, 1))}.bg-emerald-500\/10{background-color:#10b9811a}.bg-emerald-500\/15{background-color:#10b98126}.bg-emerald-500\/5{background-color:#10b9810d}.bg-green-50\/50{background-color:#f0fdf480}.bg-muted{background-color:hsl(var(--muted))}.bg-muted\/30{background-color:hsl(var(--muted) / .3)}.bg-muted\/40{background-color:hsl(var(--muted) / .4)}.bg-muted\/50{background-color:hsl(var(--muted) / .5)}.bg-popover{background-color:hsl(var(--popover))}.bg-primary{background-color:hsl(var(--primary))}.bg-primary\/10{background-color:hsl(var(--primary) / .1)}.bg-primary\/5{background-color:hsl(var(--primary) / .05)}.bg-red-50{--tw-bg-opacity: 1;background-color:rgb(254 242 242 / var(--tw-bg-opacity, 1))}.bg-rose-500\/15{background-color:#f43f5e26}.bg-secondary{background-color:hsl(var(--secondary))}.bg-slate-100{--tw-bg-opacity: 1;background-color:rgb(241 245 249 / var(--tw-bg-opacity, 1))}.bg-slate-50{--tw-bg-opacity: 1;background-color:rgb(248 250 252 / var(--tw-bg-opacity, 1))}.bg-slate-900\/60{background-color:#0f172a99}.bg-transparent{background-color:transparent}.bg-violet-500\/15{background-color:#8b5cf626}.bg-white{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity, 1))}.bg-gradient-to-br{background-image:linear-gradient(to bottom right,var(--tw-gradient-stops))}.bg-gradient-to-r{background-image:linear-gradient(to right,var(--tw-gradient-stops))}.from-amber-50{--tw-gradient-from: #fffbeb var(--tw-gradient-from-position);--tw-gradient-to: rgb(255 251 235 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-amber-500\/10{--tw-gradient-from: rgb(245 158 11 / .1) var(--tw-gradient-from-position);--tw-gradient-to: rgb(245 158 11 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-blue-500\/10{--tw-gradient-from: rgb(59 130 246 / .1) var(--tw-gradient-from-position);--tw-gradient-to: rgb(59 130 246 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-cyan-50{--tw-gradient-from: #ecfeff var(--tw-gradient-from-position);--tw-gradient-to: rgb(236 254 255 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-cyan-500\/10{--tw-gradient-from: rgb(6 182 212 / .1) var(--tw-gradient-from-position);--tw-gradient-to: rgb(6 182 212 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-emerald-50{--tw-gradient-from: #ecfdf5 var(--tw-gradient-from-position);--tw-gradient-to: rgb(236 253 245 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-emerald-500\/10{--tw-gradient-from: rgb(16 185 129 / .1) var(--tw-gradient-from-position);--tw-gradient-to: rgb(16 185 129 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-pink-50{--tw-gradient-from: #fdf2f8 var(--tw-gradient-from-position);--tw-gradient-to: rgb(253 242 248 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-primary{--tw-gradient-from: hsl(var(--primary)) var(--tw-gradient-from-position);--tw-gradient-to: hsl(var(--primary) / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-red-50{--tw-gradient-from: #fef2f2 var(--tw-gradient-from-position);--tw-gradient-to: rgb(254 242 242 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-rose-500\/10{--tw-gradient-from: rgb(244 63 94 / .1) var(--tw-gradient-from-position);--tw-gradient-to: rgb(244 63 94 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-violet-50{--tw-gradient-from: #f5f3ff var(--tw-gradient-from-position);--tw-gradient-to: rgb(245 243 255 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-violet-500\/10{--tw-gradient-from: rgb(139 92 246 / .1) var(--tw-gradient-from-position);--tw-gradient-to: rgb(139 92 246 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.via-amber-500\/5{--tw-gradient-to: rgb(245 158 11 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), rgb(245 158 11 / .05) var(--tw-gradient-via-position), var(--tw-gradient-to)}.via-blue-500\/5{--tw-gradient-to: rgb(59 130 246 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), rgb(59 130 246 / .05) var(--tw-gradient-via-position), var(--tw-gradient-to)}.via-cyan-500\/5{--tw-gradient-to: rgb(6 182 212 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), rgb(6 182 212 / .05) var(--tw-gradient-via-position), var(--tw-gradient-to)}.via-emerald-500\/5{--tw-gradient-to: rgb(16 185 129 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), rgb(16 185 129 / .05) var(--tw-gradient-via-position), var(--tw-gradient-to)}.via-rose-500\/5{--tw-gradient-to: rgb(244 63 94 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), rgb(244 63 94 / .05) var(--tw-gradient-via-position), var(--tw-gradient-to)}.via-violet-500\/5{--tw-gradient-to: rgb(139 92 246 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), rgb(139 92 246 / .05) var(--tw-gradient-via-position), var(--tw-gradient-to)}.to-amber-100{--tw-gradient-to: #fef3c7 var(--tw-gradient-to-position)}.to-cyan-100{--tw-gradient-to: #cffafe var(--tw-gradient-to-position)}.to-emerald-100{--tw-gradient-to: #d1fae5 var(--tw-gradient-to-position)}.to-pink-100{--tw-gradient-to: #fce7f3 var(--tw-gradient-to-position)}.to-primary\/80{--tw-gradient-to: hsl(var(--primary) / .8) var(--tw-gradient-to-position)}.to-red-100{--tw-gradient-to: #fee2e2 var(--tw-gradient-to-position)}.to-transparent{--tw-gradient-to: transparent var(--tw-gradient-to-position)}.to-violet-100{--tw-gradient-to: #ede9fe var(--tw-gradient-to-position)}.to-yellow-50{--tw-gradient-to: #fefce8 var(--tw-gradient-to-position)}.fill-current{fill:currentColor}.p-0{padding:0}.p-1{padding:.25rem}.p-10{padding:2.5rem}.p-12{padding:3rem}.p-2{padding:.5rem}.p-2\.5{padding:.625rem}.p-3{padding:.75rem}.p-4{padding:1rem}.p-5{padding:1.25rem}.p-6{padding:1.5rem}.p-8{padding:2rem}.p-\[1px\]{padding:1px}.px-1{padding-left:.25rem;padding-right:.25rem}.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-4{padding-left:1rem;padding-right:1rem}.px-6{padding-left:1.5rem;padding-right:1.5rem}.px-8{padding-left:2rem;padding-right:2rem}.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-12{padding-top:3rem;padding-bottom:3rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-2\.5{padding-top:.625rem;padding-bottom:.625rem}.py-3{padding-top:.75rem;padding-bottom:.75rem}.py-4{padding-top:1rem;padding-bottom:1rem}.py-5{padding-top:1.25rem;padding-bottom:1.25rem}.py-6{padding-top:1.5rem;padding-bottom:1.5rem}.py-8{padding-top:2rem;padding-bottom:2rem}.pb-3{padding-bottom:.75rem}.pb-4{padding-bottom:1rem}.pl-8{padding-left:2rem}.pr-2{padding-right:.5rem}.pr-8{padding-right:2rem}.pt-0{padding-top:0}.pt-3{padding-top:.75rem}.pt-4{padding-top:1rem}.pt-5{padding-top:1.25rem}.pt-6{padding-top:1.5rem}.text-left{text-align:left}.text-center{text-align:center}.text-right{text-align:right}.align-middle{vertical-align:middle}.font-mono{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace}.text-2xl{font-size:1.5rem;line-height:2rem}.text-3xl{font-size:1.875rem;line-height:2.25rem}.text-\[11px\]{font-size:11px}.text-base{font-size:1rem;line-height:1.5rem}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xl{font-size:1.25rem;line-height:1.75rem}.text-xs{font-size:.75rem;line-height:1rem}.font-bold{font-weight:700}.font-medium{font-weight:500}.font-semibold{font-weight:600}.uppercase{text-transform:uppercase}.tabular-nums{--tw-numeric-spacing: tabular-nums;font-variant-numeric:var(--tw-ordinal) var(--tw-slashed-zero) var(--tw-numeric-figure) var(--tw-numeric-spacing) var(--tw-numeric-fraction)}.leading-none{line-height:1}.leading-relaxed{line-height:1.625}.tracking-tight{letter-spacing:-.025em}.tracking-wide{letter-spacing:.025em}.tracking-wider{letter-spacing:.05em}.tracking-widest{letter-spacing:.1em}.text-amber-600{--tw-text-opacity: 1;color:rgb(217 119 6 / var(--tw-text-opacity, 1))}.text-amber-700{--tw-text-opacity: 1;color:rgb(180 83 9 / var(--tw-text-opacity, 1))}.text-amber-800{--tw-text-opacity: 1;color:rgb(146 64 14 / var(--tw-text-opacity, 1))}.text-amber-900{--tw-text-opacity: 1;color:rgb(120 53 15 / var(--tw-text-opacity, 1))}.text-blue-600{--tw-text-opacity: 1;color:rgb(37 99 235 / var(--tw-text-opacity, 1))}.text-blue-700{--tw-text-opacity: 1;color:rgb(29 78 216 / var(--tw-text-opacity, 1))}.text-blue-800{--tw-text-opacity: 1;color:rgb(30 64 175 / var(--tw-text-opacity, 1))}.text-card-foreground{color:hsl(var(--card-foreground))}.text-cyan-600{--tw-text-opacity: 1;color:rgb(8 145 178 / var(--tw-text-opacity, 1))}.text-cyan-700{--tw-text-opacity: 1;color:rgb(14 116 144 / var(--tw-text-opacity, 1))}.text-destructive{color:hsl(var(--destructive))}.text-destructive-foreground{color:hsl(var(--destructive-foreground))}.text-emerald-600{--tw-text-opacity: 1;color:rgb(5 150 105 / var(--tw-text-opacity, 1))}.text-emerald-700{--tw-text-opacity: 1;color:rgb(4 120 87 / var(--tw-text-opacity, 1))}.text-emerald-800{--tw-text-opacity: 1;color:rgb(6 95 70 / var(--tw-text-opacity, 1))}.text-emerald-900{--tw-text-opacity: 1;color:rgb(6 78 59 / var(--tw-text-opacity, 1))}.text-foreground{color:hsl(var(--foreground))}.text-foreground\/50{color:hsl(var(--foreground) / .5)}.text-green-600{--tw-text-opacity: 1;color:rgb(22 163 74 / var(--tw-text-opacity, 1))}.text-green-800{--tw-text-opacity: 1;color:rgb(22 101 52 / var(--tw-text-opacity, 1))}.text-muted-foreground{color:hsl(var(--muted-foreground))}.text-muted-foreground\/50{color:hsl(var(--muted-foreground) / .5)}.text-muted-foreground\/80{color:hsl(var(--muted-foreground) / .8)}.text-pink-700{--tw-text-opacity: 1;color:rgb(190 24 93 / var(--tw-text-opacity, 1))}.text-popover-foreground{color:hsl(var(--popover-foreground))}.text-primary{color:hsl(var(--primary))}.text-primary-foreground{color:hsl(var(--primary-foreground))}.text-red-500{--tw-text-opacity: 1;color:rgb(239 68 68 / var(--tw-text-opacity, 1))}.text-red-700{--tw-text-opacity: 1;color:rgb(185 28 28 / var(--tw-text-opacity, 1))}.text-red-800{--tw-text-opacity: 1;color:rgb(153 27 27 / var(--tw-text-opacity, 1))}.text-red-900{--tw-text-opacity: 1;color:rgb(127 29 29 / var(--tw-text-opacity, 1))}.text-rose-600{--tw-text-opacity: 1;color:rgb(225 29 72 / var(--tw-text-opacity, 1))}.text-secondary-foreground{color:hsl(var(--secondary-foreground))}.text-slate-500{--tw-text-opacity: 1;color:rgb(100 116 139 / var(--tw-text-opacity, 1))}.text-slate-600{--tw-text-opacity: 1;color:rgb(71 85 105 / var(--tw-text-opacity, 1))}.text-slate-700{--tw-text-opacity: 1;color:rgb(51 65 85 / var(--tw-text-opacity, 1))}.text-slate-900{--tw-text-opacity: 1;color:rgb(15 23 42 / var(--tw-text-opacity, 1))}.text-violet-600{--tw-text-opacity: 1;color:rgb(124 58 237 / var(--tw-text-opacity, 1))}.text-violet-700{--tw-text-opacity: 1;color:rgb(109 40 217 / var(--tw-text-opacity, 1))}.text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity, 1))}.line-through{text-decoration-line:line-through}.underline-offset-4{text-underline-offset:4px}.accent-primary{accent-color:hsl(var(--primary))}.opacity-0{opacity:0}.opacity-50{opacity:.5}.opacity-60{opacity:.6}.opacity-70{opacity:.7}.opacity-75{opacity:.75}.opacity-90{opacity:.9}.shadow-lg{--tw-shadow: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);--tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-md{--tw-shadow: 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1);--tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-none{--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-sm{--tw-shadow: 0 1px 2px 0 rgb(0 0 0 / .05);--tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-xl{--tw-shadow: 0 20px 25px -5px rgb(0 0 0 / .1), 0 8px 10px -6px rgb(0 0 0 / .1);--tw-shadow-colored: 0 20px 25px -5px var(--tw-shadow-color), 0 8px 10px -6px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.outline-none{outline:2px solid transparent;outline-offset:2px}.outline{outline-style:solid}.ring-0{--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(0px + 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)}.ring-2{--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(2px + 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)}.ring-ring{--tw-ring-color: hsl(var(--ring))}.ring-offset-2{--tw-ring-offset-width: 2px}.ring-offset-background{--tw-ring-offset-color: hsl(var(--background))}.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)}.backdrop-blur-sm{--tw-backdrop-blur: blur(4px);-webkit-backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia);backdrop-filter:var(--tw-backdrop-blur) var(--tw-backdrop-brightness) var(--tw-backdrop-contrast) var(--tw-backdrop-grayscale) var(--tw-backdrop-hue-rotate) var(--tw-backdrop-invert) var(--tw-backdrop-opacity) var(--tw-backdrop-saturate) var(--tw-backdrop-sepia)}.transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-all{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.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}.transition-opacity{transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-transform{transition-property:transform;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.duration-150{transition-duration:.15s}.duration-200{transition-duration:.2s}.duration-300{transition-duration:.3s}@keyframes enter{0%{opacity:var(--tw-enter-opacity, 1);transform:translate3d(var(--tw-enter-translate-x, 0),var(--tw-enter-translate-y, 0),0) scale3d(var(--tw-enter-scale, 1),var(--tw-enter-scale, 1),var(--tw-enter-scale, 1)) rotate(var(--tw-enter-rotate, 0))}}@keyframes exit{to{opacity:var(--tw-exit-opacity, 1);transform:translate3d(var(--tw-exit-translate-x, 0),var(--tw-exit-translate-y, 0),0) scale3d(var(--tw-exit-scale, 1),var(--tw-exit-scale, 1),var(--tw-exit-scale, 1)) rotate(var(--tw-exit-rotate, 0))}}.animate-in{animation-name:enter;animation-duration:.15s;--tw-enter-opacity: initial;--tw-enter-scale: initial;--tw-enter-rotate: initial;--tw-enter-translate-x: initial;--tw-enter-translate-y: initial}.fade-in,.fade-in-0{--tw-enter-opacity: 0}.zoom-in-95{--tw-enter-scale: .95}.slide-in-from-bottom-4{--tw-enter-translate-y: 1rem}.slide-in-from-left{--tw-enter-translate-x: -100%}.slide-in-from-right{--tw-enter-translate-x: 100%}.slide-in-from-top-2{--tw-enter-translate-y: -.5rem}.duration-150{animation-duration:.15s}.duration-200{animation-duration:.2s}.duration-300{animation-duration:.3s}.running{animation-play-state:running}::-webkit-scrollbar{width:8px;height:8px}::-webkit-scrollbar-track{background-color:transparent}::-webkit-scrollbar-thumb{border-radius:9999px;background-color:hsl(var(--muted-foreground) / .2)}::-webkit-scrollbar-thumb:hover{background-color:hsl(var(--muted-foreground) / .4)}*:focus-visible{outline:2px solid transparent;outline-offset:2px;--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(2px + 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);--tw-ring-color: hsl(var(--ring));--tw-ring-offset-width: 2px;--tw-ring-offset-color: hsl(var(--background))}::-moz-selection{background-color:hsl(var(--primary) / .2);color:hsl(var(--foreground))}::selection{background-color:hsl(var(--primary) / .2);color:hsl(var(--foreground))}@keyframes spin{to{transform:rotate(360deg)}}.animate-spin{animation:spin 1s linear infinite}@keyframes slideIn{0%{opacity:0;transform:translateY(10px)}to{opacity:1;transform:translateY(0)}}.animate-slide-in{animation:slideIn .3s ease-out}@keyframes fadeIn{0%{opacity:0}to{opacity:1}}.animate-fade-in{animation:fadeIn .2s ease-out}@keyframes scaleIn{0%{opacity:0;transform:scale(.95)}to{opacity:1;transform:scale(1)}}.animate-scale-in{animation:scaleIn .2s ease-out}@keyframes pulse-subtle{0%,to{opacity:1}50%{opacity:.7}}.animate-pulse-subtle{animation:pulse-subtle 2s ease-in-out infinite}.table-container{width:100%;overflow-x:auto;-webkit-overflow-scrolling:touch}.table-container::-webkit-scrollbar{height:6px}.table-container::-webkit-scrollbar-track{background-color:transparent}.table-container::-webkit-scrollbar-thumb{border-radius:9999px;background-color:hsl(var(--muted-foreground) / .2)}.table-container::-webkit-scrollbar-thumb:hover{background-color:hsl(var(--muted-foreground) / .4)}@media (hover: none) and (pointer: coarse){button,a,[role=button]{min-height:44px}}@media (prefers-reduced-motion: reduce){*,*:before,*:after{animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important}}.card-hover{transition-property:all;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.2s;animation-duration:.2s}.card-hover:hover{--tw-translate-y: -.125rem;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));--tw-shadow: 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1);--tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.nav-active-indicator{position:absolute;left:0;top:50%;height:1.5rem;width:.25rem;--tw-translate-y: -50%;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));border-top-right-radius:9999px;border-bottom-right-radius:9999px;background-color:hsl(var(--primary))}html{transition:background-color .3s ease,color .3s ease}@keyframes toastIn{0%{opacity:0;transform:translate(100%)}to{opacity:1;transform:translate(0)}}@keyframes toastOut{0%{opacity:1;transform:translate(0)}to{opacity:0;transform:translate(100%)}}.animate-toast-in{animation:toastIn .3s ease-out}.animate-toast-out{animation:toastOut .2s ease-in forwards}.table-scroll-hint{pointer-events:none;position:absolute;right:0;top:0;bottom:0;width:2rem;background:linear-gradient(to left,hsl(var(--background)),transparent)}.file\:border-0::file-selector-button{border-width:0px}.file\:bg-transparent::file-selector-button{background-color:transparent}.file\:text-sm::file-selector-button{font-size:.875rem;line-height:1.25rem}.file\:font-medium::file-selector-button{font-weight:500}.file\:text-foreground::file-selector-button{color:hsl(var(--foreground))}.placeholder\:text-muted-foreground::-moz-placeholder{color:hsl(var(--muted-foreground))}.placeholder\:text-muted-foreground::placeholder{color:hsl(var(--muted-foreground))}.hover\:-translate-y-0\.5:hover{--tw-translate-y: -.125rem;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))}.hover\:bg-accent:hover{background-color:hsl(var(--accent))}.hover\:bg-blue-700:hover{--tw-bg-opacity: 1;background-color:rgb(29 78 216 / var(--tw-bg-opacity, 1))}.hover\:bg-destructive\/10:hover{background-color:hsl(var(--destructive) / .1)}.hover\:bg-destructive\/90:hover{background-color:hsl(var(--destructive) / .9)}.hover\:bg-muted:hover{background-color:hsl(var(--muted))}.hover\:bg-muted\/50:hover{background-color:hsl(var(--muted) / .5)}.hover\:bg-primary\/15:hover{background-color:hsl(var(--primary) / .15)}.hover\:bg-primary\/5:hover{background-color:hsl(var(--primary) / .05)}.hover\:bg-primary\/90:hover{background-color:hsl(var(--primary) / .9)}.hover\:bg-secondary:hover{background-color:hsl(var(--secondary))}.hover\:bg-secondary\/80:hover{background-color:hsl(var(--secondary) / .8)}.hover\:bg-slate-100:hover{--tw-bg-opacity: 1;background-color:rgb(241 245 249 / var(--tw-bg-opacity, 1))}.hover\:bg-slate-200:hover{--tw-bg-opacity: 1;background-color:rgb(226 232 240 / var(--tw-bg-opacity, 1))}.hover\:bg-slate-50:hover{--tw-bg-opacity: 1;background-color:rgb(248 250 252 / var(--tw-bg-opacity, 1))}.hover\:from-amber-100:hover{--tw-gradient-from: #fef3c7 var(--tw-gradient-from-position);--tw-gradient-to: rgb(254 243 199 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.hover\:from-cyan-100:hover{--tw-gradient-from: #cffafe var(--tw-gradient-from-position);--tw-gradient-to: rgb(207 250 254 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.hover\:from-emerald-100:hover{--tw-gradient-from: #d1fae5 var(--tw-gradient-from-position);--tw-gradient-to: rgb(209 250 229 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.hover\:from-pink-100:hover{--tw-gradient-from: #fce7f3 var(--tw-gradient-from-position);--tw-gradient-to: rgb(252 231 243 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.hover\:from-red-100:hover{--tw-gradient-from: #fee2e2 var(--tw-gradient-from-position);--tw-gradient-to: rgb(254 226 226 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.hover\:from-violet-100:hover{--tw-gradient-from: #ede9fe var(--tw-gradient-from-position);--tw-gradient-to: rgb(237 233 254 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.hover\:text-accent-foreground:hover{color:hsl(var(--accent-foreground))}.hover\:text-destructive:hover{color:hsl(var(--destructive))}.hover\:text-foreground:hover{color:hsl(var(--foreground))}.hover\:text-red-600:hover{--tw-text-opacity: 1;color:rgb(220 38 38 / var(--tw-text-opacity, 1))}.hover\:text-slate-900:hover{--tw-text-opacity: 1;color:rgb(15 23 42 / var(--tw-text-opacity, 1))}.hover\:underline:hover{text-decoration-line:underline}.hover\:opacity-100:hover{opacity:1}.hover\:shadow-lg:hover{--tw-shadow: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);--tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.hover\:shadow-md:hover{--tw-shadow: 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1);--tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.focus\:not-sr-only:focus{position:static;width:auto;height:auto;padding:0;margin:0;overflow:visible;clip:auto;white-space:normal}.focus\:absolute:focus{position:absolute}.focus\:z-50:focus{z-index:50}.focus\:m-4:focus{margin:1rem}.focus\:rounded-md:focus{border-radius:calc(var(--radius) - 2px)}.focus\:border-blue-500:focus{--tw-border-opacity: 1;border-color:rgb(59 130 246 / var(--tw-border-opacity, 1))}.focus\:bg-accent:focus{background-color:hsl(var(--accent))}.focus\:bg-primary:focus{background-color:hsl(var(--primary))}.focus\:px-4:focus{padding-left:1rem;padding-right:1rem}.focus\:py-2:focus{padding-top:.5rem;padding-bottom:.5rem}.focus\:text-accent-foreground:focus{color:hsl(var(--accent-foreground))}.focus\:text-primary-foreground:focus{color:hsl(var(--primary-foreground))}.focus\:opacity-100:focus{opacity:1}.focus\:outline-none:focus{outline:2px solid transparent;outline-offset:2px}.focus\:ring-2:focus{--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(2px + 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)}.focus\:ring-blue-200:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(191 219 254 / var(--tw-ring-opacity, 1))}.focus\:ring-ring:focus{--tw-ring-color: hsl(var(--ring))}.focus\:ring-offset-2:focus{--tw-ring-offset-width: 2px}.focus-visible\:outline-none:focus-visible{outline:2px solid transparent;outline-offset:2px}.focus-visible\:ring-2:focus-visible{--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(2px + 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)}.focus-visible\:ring-ring:focus-visible{--tw-ring-color: hsl(var(--ring))}.focus-visible\:ring-offset-2:focus-visible{--tw-ring-offset-width: 2px}.focus-visible\:ring-offset-background:focus-visible{--tw-ring-offset-color: hsl(var(--background))}.disabled\:pointer-events-none:disabled{pointer-events:none}.disabled\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\:bg-slate-100:disabled{--tw-bg-opacity: 1;background-color:rgb(241 245 249 / var(--tw-bg-opacity, 1))}.disabled\:text-slate-400:disabled{--tw-text-opacity: 1;color:rgb(148 163 184 / var(--tw-text-opacity, 1))}.disabled\:opacity-40:disabled{opacity:.4}.disabled\:opacity-50:disabled{opacity:.5}.disabled\:opacity-60:disabled{opacity:.6}.group:hover .group-hover\:text-foreground{color:hsl(var(--foreground))}.group:hover .group-hover\:opacity-100{opacity:1}.group.destructive .group-\[\.destructive\]\:border-muted\/40{border-color:hsl(var(--muted) / .4)}.group.destructive .group-\[\.destructive\]\:text-red-300{--tw-text-opacity: 1;color:rgb(252 165 165 / var(--tw-text-opacity, 1))}.group.destructive .group-\[\.destructive\]\:hover\:border-destructive\/30:hover{border-color:hsl(var(--destructive) / .3)}.group.destructive .group-\[\.destructive\]\:hover\:bg-destructive:hover{background-color:hsl(var(--destructive))}.group.destructive .group-\[\.destructive\]\:hover\:text-destructive-foreground:hover{color:hsl(var(--destructive-foreground))}.group.destructive .group-\[\.destructive\]\:hover\:text-red-50:hover{--tw-text-opacity: 1;color:rgb(254 242 242 / var(--tw-text-opacity, 1))}.group.destructive .group-\[\.destructive\]\:focus\:ring-destructive:focus{--tw-ring-color: hsl(var(--destructive))}.group.destructive .group-\[\.destructive\]\:focus\:ring-red-400:focus{--tw-ring-opacity: 1;--tw-ring-color: rgb(248 113 113 / var(--tw-ring-opacity, 1))}.group.destructive .group-\[\.destructive\]\:focus\:ring-offset-red-600:focus{--tw-ring-offset-color: #dc2626}.peer:disabled~.peer-disabled\:cursor-not-allowed{cursor:not-allowed}.peer:disabled~.peer-disabled\:opacity-70{opacity:.7}.data-\[disabled\]\:pointer-events-none[data-disabled]{pointer-events:none}.data-\[side\=bottom\]\:translate-y-1[data-side=bottom]{--tw-translate-y: .25rem;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))}.data-\[side\=left\]\:-translate-x-1[data-side=left]{--tw-translate-x: -.25rem;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))}.data-\[side\=right\]\:translate-x-1[data-side=right]{--tw-translate-x: .25rem;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))}.data-\[side\=top\]\:-translate-y-1[data-side=top]{--tw-translate-y: -.25rem;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))}.data-\[state\=checked\]\:translate-x-5[data-state=checked]{--tw-translate-x: 1.25rem;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))}.data-\[state\=unchecked\]\:translate-x-0[data-state=unchecked],.data-\[swipe\=cancel\]\:translate-x-0[data-swipe=cancel]{--tw-translate-x: 0px;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))}.data-\[swipe\=end\]\:translate-x-\[var\(--radix-toast-swipe-end-x\)\][data-swipe=end]{--tw-translate-x: var(--radix-toast-swipe-end-x);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))}.data-\[swipe\=move\]\:translate-x-\[var\(--radix-toast-swipe-move-x\)\][data-swipe=move]{--tw-translate-x: var(--radix-toast-swipe-move-x);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))}.data-\[state\=active\]\:bg-background[data-state=active]{background-color:hsl(var(--background))}.data-\[state\=checked\]\:bg-primary[data-state=checked]{background-color:hsl(var(--primary))}.data-\[state\=open\]\:bg-accent[data-state=open]{background-color:hsl(var(--accent))}.data-\[state\=selected\]\:bg-primary\/10[data-state=selected]{background-color:hsl(var(--primary) / .1)}.data-\[state\=unchecked\]\:bg-input[data-state=unchecked]{background-color:hsl(var(--input))}.data-\[state\=active\]\:text-foreground[data-state=active]{color:hsl(var(--foreground))}.data-\[state\=open\]\:text-muted-foreground[data-state=open]{color:hsl(var(--muted-foreground))}.data-\[disabled\]\:opacity-50[data-disabled]{opacity:.5}.data-\[state\=active\]\:shadow-sm[data-state=active]{--tw-shadow: 0 1px 2px 0 rgb(0 0 0 / .05);--tw-shadow-colored: 0 1px 2px 0 var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.data-\[swipe\=move\]\:transition-none[data-swipe=move]{transition-property:none}.data-\[state\=open\]\:animate-in[data-state=open]{animation-name:enter;animation-duration:.15s;--tw-enter-opacity: initial;--tw-enter-scale: initial;--tw-enter-rotate: initial;--tw-enter-translate-x: initial;--tw-enter-translate-y: initial}.data-\[state\=closed\]\:animate-out[data-state=closed],.data-\[swipe\=end\]\:animate-out[data-swipe=end]{animation-name:exit;animation-duration:.15s;--tw-exit-opacity: initial;--tw-exit-scale: initial;--tw-exit-rotate: initial;--tw-exit-translate-x: initial;--tw-exit-translate-y: initial}.data-\[state\=closed\]\:fade-out-0[data-state=closed]{--tw-exit-opacity: 0}.data-\[state\=closed\]\:fade-out-80[data-state=closed]{--tw-exit-opacity: .8}.data-\[state\=open\]\:fade-in-0[data-state=open]{--tw-enter-opacity: 0}.data-\[state\=closed\]\:zoom-out-95[data-state=closed]{--tw-exit-scale: .95}.data-\[state\=open\]\:zoom-in-95[data-state=open]{--tw-enter-scale: .95}.data-\[side\=bottom\]\:slide-in-from-top-2[data-side=bottom]{--tw-enter-translate-y: -.5rem}.data-\[side\=left\]\:slide-in-from-right-2[data-side=left]{--tw-enter-translate-x: .5rem}.data-\[side\=right\]\:slide-in-from-left-2[data-side=right]{--tw-enter-translate-x: -.5rem}.data-\[side\=top\]\:slide-in-from-bottom-2[data-side=top]{--tw-enter-translate-y: .5rem}.data-\[state\=closed\]\:slide-out-to-left-1\/2[data-state=closed]{--tw-exit-translate-x: -50%}.data-\[state\=closed\]\:slide-out-to-right-full[data-state=closed]{--tw-exit-translate-x: 100%}.data-\[state\=closed\]\:slide-out-to-top-\[48\%\][data-state=closed]{--tw-exit-translate-y: -48%}.data-\[state\=open\]\:slide-in-from-left-1\/2[data-state=open]{--tw-enter-translate-x: -50%}.data-\[state\=open\]\:slide-in-from-top-\[48\%\][data-state=open]{--tw-enter-translate-y: -48%}.data-\[state\=open\]\:slide-in-from-top-full[data-state=open]{--tw-enter-translate-y: -100%}.dark\:border-amber-600\/60:is([data-theme=dark] *){border-color:#d9770699}.dark\:border-amber-700:is([data-theme=dark] *){--tw-border-opacity: 1;border-color:rgb(180 83 9 / var(--tw-border-opacity, 1))}.dark\:border-amber-800:is([data-theme=dark] *){--tw-border-opacity: 1;border-color:rgb(146 64 14 / var(--tw-border-opacity, 1))}.dark\:border-blue-800:is([data-theme=dark] *){--tw-border-opacity: 1;border-color:rgb(30 64 175 / var(--tw-border-opacity, 1))}.dark\:border-cyan-800:is([data-theme=dark] *){--tw-border-opacity: 1;border-color:rgb(21 94 117 / var(--tw-border-opacity, 1))}.dark\:border-emerald-700:is([data-theme=dark] *){--tw-border-opacity: 1;border-color:rgb(4 120 87 / var(--tw-border-opacity, 1))}.dark\:border-emerald-800:is([data-theme=dark] *){--tw-border-opacity: 1;border-color:rgb(6 95 70 / var(--tw-border-opacity, 1))}.dark\:border-green-800:is([data-theme=dark] *){--tw-border-opacity: 1;border-color:rgb(22 101 52 / var(--tw-border-opacity, 1))}.dark\:border-pink-800:is([data-theme=dark] *){--tw-border-opacity: 1;border-color:rgb(157 23 77 / var(--tw-border-opacity, 1))}.dark\:border-primary\/30:is([data-theme=dark] *){border-color:hsl(var(--primary) / .3)}.dark\:border-red-700:is([data-theme=dark] *){--tw-border-opacity: 1;border-color:rgb(185 28 28 / var(--tw-border-opacity, 1))}.dark\:border-red-800:is([data-theme=dark] *){--tw-border-opacity: 1;border-color:rgb(153 27 27 / var(--tw-border-opacity, 1))}.dark\:border-slate-600:is([data-theme=dark] *){--tw-border-opacity: 1;border-color:rgb(71 85 105 / var(--tw-border-opacity, 1))}.dark\:border-slate-700:is([data-theme=dark] *){--tw-border-opacity: 1;border-color:rgb(51 65 85 / var(--tw-border-opacity, 1))}.dark\:border-slate-800:is([data-theme=dark] *){--tw-border-opacity: 1;border-color:rgb(30 41 59 / var(--tw-border-opacity, 1))}.dark\:border-violet-800:is([data-theme=dark] *){--tw-border-opacity: 1;border-color:rgb(91 33 182 / var(--tw-border-opacity, 1))}.dark\:bg-amber-800\/40:is([data-theme=dark] *){background-color:#92400e66}.dark\:bg-amber-900:is([data-theme=dark] *){--tw-bg-opacity: 1;background-color:rgb(120 53 15 / var(--tw-bg-opacity, 1))}.dark\:bg-amber-950:is([data-theme=dark] *){--tw-bg-opacity: 1;background-color:rgb(69 26 3 / var(--tw-bg-opacity, 1))}.dark\:bg-blue-950:is([data-theme=dark] *){--tw-bg-opacity: 1;background-color:rgb(23 37 84 / var(--tw-bg-opacity, 1))}.dark\:bg-blue-950\/50:is([data-theme=dark] *){background-color:#17255480}.dark\:bg-emerald-500\/10:is([data-theme=dark] *){background-color:#10b9811a}.dark\:bg-emerald-900\/40:is([data-theme=dark] *){background-color:#064e3b66}.dark\:bg-emerald-950:is([data-theme=dark] *){--tw-bg-opacity: 1;background-color:rgb(2 44 34 / var(--tw-bg-opacity, 1))}.dark\:bg-green-950\/50:is([data-theme=dark] *){background-color:#052e1680}.dark\:bg-primary\/20:is([data-theme=dark] *){background-color:hsl(var(--primary) / .2)}.dark\:bg-red-900\/40:is([data-theme=dark] *){background-color:#7f1d1d66}.dark\:bg-red-950:is([data-theme=dark] *){--tw-bg-opacity: 1;background-color:rgb(69 10 10 / var(--tw-bg-opacity, 1))}.dark\:bg-slate-800:is([data-theme=dark] *){--tw-bg-opacity: 1;background-color:rgb(30 41 59 / var(--tw-bg-opacity, 1))}.dark\:bg-slate-800\/40:is([data-theme=dark] *){background-color:#1e293b66}.dark\:bg-slate-900:is([data-theme=dark] *){--tw-bg-opacity: 1;background-color:rgb(15 23 42 / var(--tw-bg-opacity, 1))}.dark\:from-amber-900\/20:is([data-theme=dark] *){--tw-gradient-from: rgb(120 53 15 / .2) var(--tw-gradient-from-position);--tw-gradient-to: rgb(120 53 15 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.dark\:from-amber-950:is([data-theme=dark] *){--tw-gradient-from: #451a03 var(--tw-gradient-from-position);--tw-gradient-to: rgb(69 26 3 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.dark\:from-cyan-950:is([data-theme=dark] *){--tw-gradient-from: #083344 var(--tw-gradient-from-position);--tw-gradient-to: rgb(8 51 68 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.dark\:from-emerald-950:is([data-theme=dark] *){--tw-gradient-from: #022c22 var(--tw-gradient-from-position);--tw-gradient-to: rgb(2 44 34 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.dark\:from-pink-950:is([data-theme=dark] *){--tw-gradient-from: #500724 var(--tw-gradient-from-position);--tw-gradient-to: rgb(80 7 36 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.dark\:from-red-950:is([data-theme=dark] *){--tw-gradient-from: #450a0a var(--tw-gradient-from-position);--tw-gradient-to: rgb(69 10 10 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.dark\:from-violet-950:is([data-theme=dark] *){--tw-gradient-from: #2e1065 var(--tw-gradient-from-position);--tw-gradient-to: rgb(46 16 101 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.dark\:to-amber-900:is([data-theme=dark] *){--tw-gradient-to: #78350f var(--tw-gradient-to-position)}.dark\:to-cyan-900:is([data-theme=dark] *){--tw-gradient-to: #164e63 var(--tw-gradient-to-position)}.dark\:to-emerald-900:is([data-theme=dark] *){--tw-gradient-to: #064e3b var(--tw-gradient-to-position)}.dark\:to-pink-900:is([data-theme=dark] *){--tw-gradient-to: #831843 var(--tw-gradient-to-position)}.dark\:to-red-900:is([data-theme=dark] *){--tw-gradient-to: #7f1d1d var(--tw-gradient-to-position)}.dark\:to-violet-900:is([data-theme=dark] *){--tw-gradient-to: #4c1d95 var(--tw-gradient-to-position)}.dark\:to-yellow-900\/20:is([data-theme=dark] *){--tw-gradient-to: rgb(113 63 18 / .2) var(--tw-gradient-to-position)}.dark\:text-amber-100:is([data-theme=dark] *){--tw-text-opacity: 1;color:rgb(254 243 199 / var(--tw-text-opacity, 1))}.dark\:text-amber-200:is([data-theme=dark] *){--tw-text-opacity: 1;color:rgb(253 230 138 / var(--tw-text-opacity, 1))}.dark\:text-amber-300:is([data-theme=dark] *){--tw-text-opacity: 1;color:rgb(252 211 77 / var(--tw-text-opacity, 1))}.dark\:text-amber-400:is([data-theme=dark] *){--tw-text-opacity: 1;color:rgb(251 191 36 / var(--tw-text-opacity, 1))}.dark\:text-blue-200:is([data-theme=dark] *){--tw-text-opacity: 1;color:rgb(191 219 254 / var(--tw-text-opacity, 1))}.dark\:text-blue-300:is([data-theme=dark] *){--tw-text-opacity: 1;color:rgb(147 197 253 / var(--tw-text-opacity, 1))}.dark\:text-blue-400:is([data-theme=dark] *){--tw-text-opacity: 1;color:rgb(96 165 250 / var(--tw-text-opacity, 1))}.dark\:text-cyan-300:is([data-theme=dark] *){--tw-text-opacity: 1;color:rgb(103 232 249 / var(--tw-text-opacity, 1))}.dark\:text-cyan-400:is([data-theme=dark] *){--tw-text-opacity: 1;color:rgb(34 211 238 / var(--tw-text-opacity, 1))}.dark\:text-emerald-100:is([data-theme=dark] *){--tw-text-opacity: 1;color:rgb(209 250 229 / var(--tw-text-opacity, 1))}.dark\:text-emerald-200:is([data-theme=dark] *){--tw-text-opacity: 1;color:rgb(167 243 208 / var(--tw-text-opacity, 1))}.dark\:text-emerald-300:is([data-theme=dark] *){--tw-text-opacity: 1;color:rgb(110 231 183 / var(--tw-text-opacity, 1))}.dark\:text-emerald-400:is([data-theme=dark] *){--tw-text-opacity: 1;color:rgb(52 211 153 / var(--tw-text-opacity, 1))}.dark\:text-green-200:is([data-theme=dark] *){--tw-text-opacity: 1;color:rgb(187 247 208 / var(--tw-text-opacity, 1))}.dark\:text-green-400:is([data-theme=dark] *){--tw-text-opacity: 1;color:rgb(74 222 128 / var(--tw-text-opacity, 1))}.dark\:text-pink-300:is([data-theme=dark] *){--tw-text-opacity: 1;color:rgb(249 168 212 / var(--tw-text-opacity, 1))}.dark\:text-primary-foreground:is([data-theme=dark] *){color:hsl(var(--primary-foreground))}.dark\:text-red-200:is([data-theme=dark] *){--tw-text-opacity: 1;color:rgb(254 202 202 / var(--tw-text-opacity, 1))}.dark\:text-red-300:is([data-theme=dark] *){--tw-text-opacity: 1;color:rgb(252 165 165 / var(--tw-text-opacity, 1))}.dark\:text-rose-400:is([data-theme=dark] *){--tw-text-opacity: 1;color:rgb(251 113 133 / var(--tw-text-opacity, 1))}.dark\:text-slate-300:is([data-theme=dark] *){--tw-text-opacity: 1;color:rgb(203 213 225 / var(--tw-text-opacity, 1))}.dark\:text-slate-400:is([data-theme=dark] *){--tw-text-opacity: 1;color:rgb(148 163 184 / var(--tw-text-opacity, 1))}.dark\:text-slate-50:is([data-theme=dark] *){--tw-text-opacity: 1;color:rgb(248 250 252 / var(--tw-text-opacity, 1))}.dark\:text-violet-300:is([data-theme=dark] *){--tw-text-opacity: 1;color:rgb(196 181 253 / var(--tw-text-opacity, 1))}.dark\:text-violet-400:is([data-theme=dark] *){--tw-text-opacity: 1;color:rgb(167 139 250 / var(--tw-text-opacity, 1))}.dark\:hover\:bg-slate-800:hover:is([data-theme=dark] *){--tw-bg-opacity: 1;background-color:rgb(30 41 59 / var(--tw-bg-opacity, 1))}.dark\:hover\:text-slate-100:hover:is([data-theme=dark] *){--tw-text-opacity: 1;color:rgb(241 245 249 / var(--tw-text-opacity, 1))}.dark\:focus\:border-blue-400:focus:is([data-theme=dark] *){--tw-border-opacity: 1;border-color:rgb(96 165 250 / var(--tw-border-opacity, 1))}.dark\:focus\:ring-blue-400\/40:focus:is([data-theme=dark] *){--tw-ring-color: rgb(96 165 250 / .4)}.dark\:disabled\:bg-slate-800\/60:disabled:is([data-theme=dark] *){background-color:#1e293b99}@media (min-width: 640px){.sm\:bottom-0{bottom:0}.sm\:right-0{right:0}.sm\:top-auto{top:auto}.sm\:col-span-2{grid-column:span 2 / span 2}.sm\:inline{display:inline}.sm\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.sm\:flex-row{flex-direction:row}.sm\:flex-col{flex-direction:column}.sm\:items-start{align-items:flex-start}.sm\:items-center{align-items:center}.sm\:justify-end{justify-content:flex-end}.sm\:justify-between{justify-content:space-between}.sm\:space-x-2>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(.5rem * var(--tw-space-x-reverse));margin-left:calc(.5rem * calc(1 - var(--tw-space-x-reverse)))}.sm\:rounded-lg{border-radius:var(--radius)}.sm\:text-left{text-align:left}.data-\[state\=open\]\:sm\:slide-in-from-bottom-full[data-state=open]{--tw-enter-translate-y: 100%}}@media (min-width: 768px){.md\:col-span-2{grid-column:span 2 / span 2}.md\:w-48{width:12rem}.md\:max-w-\[420px\]{max-width:420px}.md\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.md\:flex-row{flex-direction:row}.md\:items-center{align-items:center}.md\:text-sm{font-size:.875rem;line-height:1.25rem}}@media (min-width: 1024px){.lg\:col-span-3{grid-column:span 3 / span 3}.lg\:block{display:block}.lg\:flex{display:flex}.lg\:hidden{display:none}.lg\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.lg\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.lg\:grid-cols-\[minmax\(0\,1fr\)_minmax\(0\,0\.85fr\)\]{grid-template-columns:minmax(0,1fr) minmax(0,.85fr)}.lg\:px-6{padding-left:1.5rem;padding-right:1.5rem}.lg\:px-8{padding-left:2rem;padding-right:2rem}.lg\:py-8{padding-top:2rem;padding-bottom:2rem}}@media (min-width: 1280px){.xl\:block{display:block}.xl\:flex{display:flex}.xl\:hidden{display:none}.xl\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.xl\:grid-cols-4{grid-template-columns:repeat(4,minmax(0,1fr))}.xl\:grid-cols-\[200px_1fr\]{grid-template-columns:200px 1fr}}.\[\&\:has\(\[role\=checkbox\]\)\]\:pr-0:has([role=checkbox]){padding-right:0}.\[\&\>span\]\:line-clamp-1>span{overflow:hidden;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:1}.\[\&\>svg\]\:size-4>svg{width:1rem;height:1rem}.\[\&\>svg\]\:shrink-0>svg{flex-shrink:0}.\[\&\>tr\]\:last\:border-b-0:last-child>tr{border-bottom-width:0px}.\[\&_svg\]\:pointer-events-none svg{pointer-events:none}.\[\&_svg\]\:size-4 svg{width:1rem;height:1rem}.\[\&_svg\]\:shrink-0 svg{flex-shrink:0}.\[\&_tr\:last-child\]\:border-0 tr:last-child{border-width:0px}.\[\&_tr\]\:border-b tr{border-bottom-width:1px}.\[\&_tr\]\:border-border\/60 tr{border-color:hsl(var(--border) / .6)}