@chenpu17/cc-gw 0.7.2 → 0.7.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/package.json +19 -6
- package/{server → src/server/dist}/index.js +51 -1
- package/{web/assets/About-BY3JDEBL.js → src/web/dist/assets/About-B-TlL_1U.js} +2 -2
- package/src/web/dist/assets/ApiKeys-vV04L6nB.js +26 -0
- package/{web/assets/Button-6f5FYqHp.js → src/web/dist/assets/Button-CK3N5RnJ.js} +1 -1
- package/{web/assets/Dashboard-xs4UfKRq.js → src/web/dist/assets/Dashboard-Ct0nz59m.js} +1 -1
- package/{web/assets/Events-D_RJKNNo.js → src/web/dist/assets/Events-D1dFnWUQ.js} +1 -1
- package/{web/assets/FormField-DKWx0tXD.js → src/web/dist/assets/FormField-D6CVd30C.js} +1 -1
- package/{web/assets/Help-CXLtGK8v.js → src/web/dist/assets/Help-BAX6PZdo.js} +1 -1
- package/{web/assets/Input-Iev5RCKK.js → src/web/dist/assets/Input-DwLjINOT.js} +1 -1
- package/{web/assets/Login-qc-n0iUi.js → src/web/dist/assets/Login-DmMmSsuJ.js} +1 -1
- package/{web/assets/Logs-DSGqxauM.js → src/web/dist/assets/Logs-BgPHhO9L.js} +1 -1
- package/{web/assets/ModelManagement-D11jx2bC.js → src/web/dist/assets/ModelManagement-ptCXiwmH.js} +1 -1
- package/{web/assets/PageSection-BJJ735Qk.js → src/web/dist/assets/PageSection-Ce8cXojT.js} +1 -1
- package/{web/assets/Settings-BT-6W3GT.js → src/web/dist/assets/Settings-N7huQDJE.js} +1 -1
- package/{web/assets/StatusBadge-9lxhNpvi.js → src/web/dist/assets/StatusBadge-DnIFGtUc.js} +1 -1
- package/{web/assets/copy-DMW-t8h3.js → src/web/dist/assets/copy-MV8oAPES.js} +1 -1
- package/{web/assets/index-CJMKkw2H.css → src/web/dist/assets/index-BhKQmj-I.css} +1 -1
- package/{web/assets/index-BM-Zc1f-.js → src/web/dist/assets/index-DUQNG-qd.js} +1 -1
- package/{web/assets/index-dFe_7qSp.js → src/web/dist/assets/index-Dz1s8uzG.js} +4 -4
- package/{web/assets/info-ByJJXVcp.js → src/web/dist/assets/info-B4aq_I9e.js} +1 -1
- package/{web/assets/refresh-cw-BF1LiBLP.js → src/web/dist/assets/refresh-cw-DDXCOeFJ.js} +1 -1
- package/{web/assets/useApiQuery-i7GI_aGQ.js → src/web/dist/assets/useApiQuery-BA98Vr2f.js} +1 -1
- package/{web → src/web/dist}/index.html +2 -2
- package/web/assets/ApiKeys-qhC2jZqJ.js +0 -16
- /package/{cli → src/cli/dist}/index.d.ts +0 -0
- /package/{cli → src/cli/dist}/index.js +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
var ft=e=>{throw TypeError(e)};var $=(e,t,s)=>t.has(e)||ft("Cannot "+s);var i=(e,t,s)=>($(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)=>($(e,t,"write to private field"),r?r.call(e,s):t.set(e,s),s),d=(e,t,s)=>($(e,t,"access private method"),s);import{S as It,X as pt,Y as S,x as G,Z as H,D as J,_ as tt,$ as bt,a0 as Ot,a1 as q,a2 as Tt,a3 as wt,a4 as yt,A as St,r as I,E as Qt,C as xt,a5 as Mt,b as _t,t as Ut}from"./index-dFe_7qSp.js";var g,a,j,y,Q,U,E,O,z,D,F,x,M,T,P,n,B,et,st,it,rt,at,nt,ht,Ct,vt,Dt=(vt=class extends It{constructor(t,s){super();b(this,n);b(this,g);b(this,a);b(this,j);b(this,y);b(this,Q);b(this,U);b(this,E);b(this,O);b(this,z);b(this,D);b(this,F);b(this,x);b(this,M);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&&!G(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))||H(this.options.staleTime,i(this,a))!==H(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,j),{state:L}=t;let l={...L},N=!1,f;if(s._optimisticResults){const R=this.hasListeners(),W=!R&>(t,s),_=R&&mt(t,r,s,h);(W||_)&&(l={...l,...wt(L.data,t.options)}),s._optimisticResults==="isRestoring"&&(l.fetchStatus="idle")}let{error:A,errorUpdatedAt:k,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,F))==null?void 0:dt.state.data,i(this,F)):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,D);else try{u(this,z,s.select),f=s.select(f),f=yt(o==null?void 0:o.data,f,s),u(this,D,f),u(this,O,null)}catch(R){u(this,O,R)}i(this,O)&&(A=i(this,O),f=i(this,D),k=Date.now(),m="error");const X=l.fetchStatus==="fetching",Y=m==="pending",Z=m==="error",ut=Y&&X,lt=f!==void 0,C={status:m,fetchStatus:l.fetchStatus,isPending:Y,isSuccess:m==="success",isError:Z,isInitialLoading:ut,isLoading:ut,data:f,dataUpdatedAt:l.dataUpdatedAt,error:A,errorUpdatedAt:k,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:X,isRefetching:X&&!Y,isLoadingError:Z&&!lt,isPaused:l.fetchStatus==="paused",isPlaceholderData:N,isRefetchError:Z&<,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,F,i(this,a)),G(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,j=new WeakMap,y=new WeakMap,Q=new WeakMap,U=new WeakMap,E=new WeakMap,O=new WeakMap,z=new WeakMap,D=new WeakMap,F=new WeakMap,x=new WeakMap,M=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(J)),s},et=function(){d(this,n,at).call(this);const t=H(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,x,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,M,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,x)&&(q.clearTimeout(i(this,x)),u(this,x,void 0))},nt=function(){i(this,M)&&(q.clearInterval(i(this,M)),u(this,M,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,j,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 Ft(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 Ft(e,t)||e.state.data!==void 0&&ot(e,t,t.refetchOnMount)}function ot(e,t,s){if(S(t.enabled,e)!==!1&&H(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(H(t.staleTime,e))}function Pt(e,t){return!G(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 At=I.createContext(Nt()),kt=()=>I.useContext(At),Bt=(e,t)=>{(e.suspense||e.throwOnError||e.experimental_prefetchInRender)&&(t.isReset()||(e.retryOnMount=!1))},Ht=e=>{I.useEffect(()=>{e.clearReset()},[e])},jt=({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,A,k;const r=Lt(),h=kt(),o=xt(),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),Ht(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)):J;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(jt({result:v,errorResetBoundary:h,throwOnError:c.throwOnError,query:o.getQueryCache().get(c.queryHash),suspense:c.suspense}))throw v.error;if((A=(f=o.getDefaultOptions().queries)==null?void 0:f._experimental_afterQuery)==null||A.call(f,c,v),c.experimental_prefetchInRender&&!tt&&Vt(v,r)){const m=w?Rt(c,p,h):(k=o.getQueryCache().get(c.queryHash))==null?void 0:k.promise;m==null||m.catch(J).finally(()=>{p.updateResult()})}return c.notifyOnChangeProps?v:p.trackResult(v)}function qt(e,t){return Kt(e,Dt)}function $t(e,t,s){return qt({queryKey:e,placeholderData:Mt,...s,queryFn:async()=>{try{return(await _t.request(t)).data}catch(r){throw Ut(r)}}})}export{qt as a,$t as u};
|
|
1
|
+
var ft=e=>{throw TypeError(e)};var $=(e,t,s)=>t.has(e)||ft("Cannot "+s);var i=(e,t,s)=>($(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)=>($(e,t,"write to private field"),r?r.call(e,s):t.set(e,s),s),d=(e,t,s)=>($(e,t,"access private method"),s);import{S as It,X as pt,Y as S,x as G,Z as H,D as J,_ as tt,$ as bt,a0 as Ot,a1 as q,a2 as Tt,a3 as wt,a4 as yt,A as St,r as I,E as Qt,C as xt,a5 as Mt,b as _t,t as Ut}from"./index-Dz1s8uzG.js";var g,a,j,y,Q,U,E,O,z,D,F,x,M,T,P,n,B,et,st,it,rt,at,nt,ht,Ct,vt,Dt=(vt=class extends It{constructor(t,s){super();b(this,n);b(this,g);b(this,a);b(this,j);b(this,y);b(this,Q);b(this,U);b(this,E);b(this,O);b(this,z);b(this,D);b(this,F);b(this,x);b(this,M);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&&!G(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))||H(this.options.staleTime,i(this,a))!==H(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,j),{state:L}=t;let l={...L},N=!1,f;if(s._optimisticResults){const R=this.hasListeners(),W=!R&>(t,s),_=R&&mt(t,r,s,h);(W||_)&&(l={...l,...wt(L.data,t.options)}),s._optimisticResults==="isRestoring"&&(l.fetchStatus="idle")}let{error:A,errorUpdatedAt:k,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,F))==null?void 0:dt.state.data,i(this,F)):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,D);else try{u(this,z,s.select),f=s.select(f),f=yt(o==null?void 0:o.data,f,s),u(this,D,f),u(this,O,null)}catch(R){u(this,O,R)}i(this,O)&&(A=i(this,O),f=i(this,D),k=Date.now(),m="error");const X=l.fetchStatus==="fetching",Y=m==="pending",Z=m==="error",ut=Y&&X,lt=f!==void 0,C={status:m,fetchStatus:l.fetchStatus,isPending:Y,isSuccess:m==="success",isError:Z,isInitialLoading:ut,isLoading:ut,data:f,dataUpdatedAt:l.dataUpdatedAt,error:A,errorUpdatedAt:k,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:X,isRefetching:X&&!Y,isLoadingError:Z&&!lt,isPaused:l.fetchStatus==="paused",isPlaceholderData:N,isRefetchError:Z&<,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,F,i(this,a)),G(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,j=new WeakMap,y=new WeakMap,Q=new WeakMap,U=new WeakMap,E=new WeakMap,O=new WeakMap,z=new WeakMap,D=new WeakMap,F=new WeakMap,x=new WeakMap,M=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(J)),s},et=function(){d(this,n,at).call(this);const t=H(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,x,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,M,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,x)&&(q.clearTimeout(i(this,x)),u(this,x,void 0))},nt=function(){i(this,M)&&(q.clearInterval(i(this,M)),u(this,M,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,j,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 Ft(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 Ft(e,t)||e.state.data!==void 0&&ot(e,t,t.refetchOnMount)}function ot(e,t,s){if(S(t.enabled,e)!==!1&&H(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(H(t.staleTime,e))}function Pt(e,t){return!G(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 At=I.createContext(Nt()),kt=()=>I.useContext(At),Bt=(e,t)=>{(e.suspense||e.throwOnError||e.experimental_prefetchInRender)&&(t.isReset()||(e.retryOnMount=!1))},Ht=e=>{I.useEffect(()=>{e.clearReset()},[e])},jt=({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,A,k;const r=Lt(),h=kt(),o=xt(),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),Ht(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)):J;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(jt({result:v,errorResetBoundary:h,throwOnError:c.throwOnError,query:o.getQueryCache().get(c.queryHash),suspense:c.suspense}))throw v.error;if((A=(f=o.getDefaultOptions().queries)==null?void 0:f._experimental_afterQuery)==null||A.call(f,c,v),c.experimental_prefetchInRender&&!tt&&Vt(v,r)){const m=w?Rt(c,p,h):(k=o.getQueryCache().get(c.queryHash))==null?void 0:k.promise;m==null||m.catch(J).finally(()=>{p.updateResult()})}return c.notifyOnChangeProps?v:p.trackResult(v)}function qt(e,t){return Kt(e,Dt)}function $t(e,t,s){return qt({queryKey:e,placeholderData:Mt,...s,queryFn:async()=>{try{return(await _t.request(t)).data}catch(r){throw Ut(r)}}})}export{qt as a,$t 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-
|
|
9
|
-
<link rel="stylesheet" crossorigin href="/assets/index-
|
|
8
|
+
<script type="module" crossorigin src="/assets/index-Dz1s8uzG.js"></script>
|
|
9
|
+
<link rel="stylesheet" crossorigin href="/assets/index-BhKQmj-I.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 T,u as W,a as _,r as d,j as e,L as X,P as Y,d as t,b as K,m as r,J as m,H as Z,k as ee,l as ae,f as se,h as te}from"./index-dFe_7qSp.js";import{E as le}from"./index-BM-Zc1f-.js";import{u as w}from"./useApiQuery-i7GI_aGQ.js";import{P as ie,a as q}from"./PageSection-BJJ735Qk.js";import{F as I}from"./FormField-DKWx0tXD.js";import{I as re}from"./Input-Iev5RCKK.js";import{B as C}from"./Button-6f5FYqHp.js";import{S as ne}from"./StatusBadge-9lxhNpvi.js";import{C as ce}from"./copy-DMW-t8h3.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 de=T("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/**
|
|
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 oe=T("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);/**
|
|
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 pe=T("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"}]]),me=[{value:1,labelKey:"apiKeys.analytics.range.today"},{value:7,labelKey:"apiKeys.analytics.range.week"},{value:30,labelKey:"apiKeys.analytics.range.month"}];function ve(){const{t:a}=W(),{pushToast:i}=_(),[k,x]=d.useState(!1),[u,y]=d.useState(""),[D,v]=d.useState(""),[h,L]=d.useState(null),[F,A]=d.useState(null),[o,z]=d.useState(7),g=w(["api-keys"],{url:"/api/keys",method:"GET"}),j=w(["api-keys","overview",o],{url:"/api/stats/api-keys/overview",method:"GET",params:{days:o}}),f=w(["api-keys","usage",o],{url:"/api/stats/api-keys/usage",method:"GET",params:{days:o,limit:10}}),N=g.data??[],p=j.data,c=f.data??[],B=N.some(s=>s.isWildcard),H=p?p.totalKeys.toLocaleString():"–",R=p?p.enabledKeys.toLocaleString():"–",V=p?p.activeKeys.toLocaleString():"–",P=async()=>{var s,l;if(!u.trim()){i({title:a("apiKeys.errors.nameRequired"),variant:"error"});return}try{const n=await K.post("/api/keys",{name:u.trim(),description:D.trim()||void 0});L(n.data),x(!1),y(""),v(""),g.refetch(),j.refetch(),f.refetch(),i({title:a("apiKeys.toast.keyCreated"),variant:"success"})}catch(n){i({title:a("apiKeys.toast.createFailure",{message:((l=(s=n.response)==null?void 0:s.data)==null?void 0:l.error)||n.message}),variant:"error"})}},G=async(s,l)=>{var n,b;try{await K.patch(`/api/keys/${s}`,{enabled:!l}),g.refetch(),j.refetch(),i({title:a("apiKeys.toast.keyUpdated"),variant:"success"})}catch(M){i({title:a("apiKeys.toast.updateFailure",{message:((b=(n=M.response)==null?void 0:n.data)==null?void 0:b.error)||M.message}),variant:"error"})}},Q=async s=>{var l,n;if(confirm(a("apiKeys.confirmDelete"))){A(s);try{await K.delete(`/api/keys/${s}`),g.refetch(),j.refetch(),f.refetch(),i({title:a("apiKeys.toast.keyDeleted"),variant:"success"})}catch(b){i({title:a("apiKeys.toast.deleteFailure",{message:((n=(l=b.response)==null?void 0:l.data)==null?void 0:n.error)||b.message}),variant:"error"})}finally{A(null)}}},U=s=>{navigator.clipboard.writeText(s),i({title:a("apiKeys.toast.keyCopied"),variant:"success"})},E=s=>s?new Date(s).toLocaleString():a("common.noData"),$=d.useMemo(()=>{const s=c.map(l=>l.apiKeyName??a("apiKeys.analytics.unknownKey"));return{tooltip:{trigger:"axis"},grid:{left:60,right:20,top:40,bottom:40},xAxis:{type:"category",data:s,axisLabel:{interval:0,rotate:20}},yAxis:{type:"value"},series:[{name:a("apiKeys.analytics.requestsSeries"),type:"bar",data:c.map(l=>l.requests),itemStyle:{color:"#2563eb"}}]}},[c,a]),J=d.useMemo(()=>{const s=c.map(l=>l.apiKeyName??a("apiKeys.analytics.unknownKey"));return{tooltip:{trigger:"axis"},legend:{data:[a("apiKeys.analytics.tokens.input"),a("apiKeys.analytics.tokens.output")]},grid:{left:60,right:20,top:50,bottom:40},xAxis:{type:"category",data:s,axisLabel:{interval:0,rotate:20}},yAxis:{type:"value"},series:[{name:a("apiKeys.analytics.tokens.input"),type:"bar",stack:"tokens",itemStyle:{color:"#22c55e"},data:c.map(l=>l.inputTokens)},{name:a("apiKeys.analytics.tokens.output"),type:"bar",stack:"tokens",itemStyle:{color:"#0ea5e9"},data:c.map(l=>l.outputTokens)}]}},[c,a]);return g.isLoading?e.jsx(X,{}):e.jsxs("div",{className:"flex flex-col gap-8",children:[e.jsx(ie,{icon:e.jsx(Y,{className:"h-6 w-6","aria-hidden":"true"}),title:a("apiKeys.title"),description:a("apiKeys.description"),actions:e.jsx(C,{onClick:()=>x(!0),variant:"primary",size:"lg",icon:e.jsx(oe,{className:"h-4 w-4","aria-hidden":"true"}),className:"rounded-full",children:a("apiKeys.createNew")})}),e.jsxs(q,{title:a("apiKeys.analytics.title"),description:a("apiKeys.analytics.description",{days:o}),actions:e.jsx("div",{className:"flex items-center gap-2 rounded-full bg-white/70 px-2 py-1 shadow-sm shadow-slate-200/60 ring-1 ring-slate-200/60 backdrop-blur dark:bg-slate-900/70 dark:ring-slate-700/60",children:me.map(s=>{const l=o===s.value;return e.jsx("button",{type:"button",onClick:()=>z(s.value),className:t("inline-flex h-8 items-center rounded-full px-3 text-xs font-semibold transition",l?"bg-blue-600 text-white shadow-sm shadow-blue-500/20":"text-slate-600 hover:bg-white/80 dark:text-slate-300 dark:hover:bg-slate-800/60"),children:a(s.labelKey)},s.value)})}),contentClassName:"gap-6",children:[e.jsxs("div",{className:"grid gap-4 sm:grid-cols-2 xl:grid-cols-3",children:[e.jsx(S,{label:a("apiKeys.analytics.cards.total"),value:H}),e.jsx(S,{label:a("apiKeys.analytics.cards.enabled"),value:R}),e.jsx(S,{label:a("apiKeys.analytics.cards.active",{days:o}),value:V})]}),e.jsxs("div",{className:"grid gap-6 lg:grid-cols-2",children:[e.jsx(O,{title:a("apiKeys.analytics.charts.requests"),loading:f.isLoading,empty:c.length===0,emptyText:a("apiKeys.analytics.empty"),option:$}),e.jsx(O,{title:a("apiKeys.analytics.charts.tokens"),loading:f.isLoading,empty:c.length===0,emptyText:a("apiKeys.analytics.empty"),option:J})]})]}),e.jsx(q,{title:a("apiKeys.list.title"),description:B?a("apiKeys.wildcardHint"):void 0,contentClassName:"gap-4",children:N.length===0?e.jsx("div",{className:t(m,"p-6 text-center"),children:e.jsx("p",{className:t(r,"text-sm"),children:a("apiKeys.list.empty")})}):e.jsx("div",{className:"grid gap-4",children:N.map(s=>{const l=(s.totalInputTokens+s.totalOutputTokens).toLocaleString();return e.jsx("div",{className:t(m,"space-y-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-lg font-semibold text-slate-900 dark:text-slate-50",children:s.name}),s.isWildcard?e.jsx("span",{className:"inline-flex items-center rounded-full bg-purple-500/10 px-3 py-1 text-xs font-semibold text-purple-600 dark:bg-purple-500/20 dark:text-purple-200",children:a("apiKeys.wildcard")}):null,e.jsx(ne,{variant:s.enabled?"success":"info",children:s.enabled?a("apiKeys.status.enabled"):a("apiKeys.status.disabled")})]}),e.jsx("code",{className:"inline-flex items-center rounded-2xl bg-slate-900/90 px-4 py-2 font-mono text-sm text-slate-50 shadow-inner shadow-slate-900/30 dark:bg-slate-800/80",children:s.isWildcard?a("apiKeys.wildcard"):s.maskedKey??"********"}),s.isWildcard?e.jsx("p",{className:t(r,"text-sm text-purple-600 dark:text-purple-200"),children:a("apiKeys.wildcardHint")}):s.description?e.jsx("p",{className:t(r,"whitespace-pre-wrap text-sm"),children:s.description}):null,e.jsxs("div",{className:"grid gap-3 text-sm sm:grid-cols-2",children:[e.jsxs("div",{className:t(r,"flex flex-col gap-1"),children:[e.jsx("span",{className:"text-xs font-semibold uppercase tracking-wide text-slate-500 dark:text-slate-400",children:a("apiKeys.created")}),e.jsx("span",{className:"font-medium text-slate-800 dark:text-slate-100",children:E(s.createdAt)})]}),e.jsxs("div",{className:t(r,"flex flex-col gap-1"),children:[e.jsx("span",{className:"text-xs font-semibold uppercase tracking-wide text-slate-500 dark:text-slate-400",children:a("apiKeys.lastUsed")}),e.jsx("span",{className:"font-medium text-slate-800 dark:text-slate-100",children:E(s.lastUsedAt)})]}),e.jsxs("div",{className:t(r,"flex flex-col gap-1"),children:[e.jsx("span",{className:"text-xs font-semibold uppercase tracking-wide text-slate-500 dark:text-slate-400",children:a("apiKeys.requestCount")}),e.jsx("span",{className:"font-medium text-slate-800 dark:text-slate-100",children:s.requestCount.toLocaleString()})]}),e.jsxs("div",{className:t(r,"flex flex-col gap-1"),children:[e.jsx("span",{className:"text-xs font-semibold uppercase tracking-wide text-slate-500 dark:text-slate-400",children:a("apiKeys.totalTokens")}),e.jsx("span",{className:"font-medium text-slate-800 dark:text-slate-100",children:l})]})]})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("button",{type:"button",onClick:()=>G(s.id,s.enabled),className:t("inline-flex h-9 items-center rounded-full px-4 text-sm font-semibold transition",s.enabled?"bg-slate-200/80 text-slate-700 hover:bg-slate-300 dark:bg-slate-800/80 dark:text-slate-200 dark:hover:bg-slate-700/70":"bg-emerald-500 text-white shadow-sm shadow-emerald-500/30 hover:bg-emerald-500/90"),children:s.enabled?a("apiKeys.actions.disable"):a("apiKeys.actions.enable")}),s.isWildcard?null:e.jsx("button",{type:"button",onClick:()=>Q(s.id),disabled:F===s.id,className:"inline-flex h-9 w-9 items-center justify-center rounded-full text-red-500 transition hover:bg-red-500/10 disabled:opacity-50","aria-label":a("apiKeys.actions.delete"),children:e.jsx(pe,{className:"h-4 w-4","aria-hidden":"true"})})]})]})},s.id)})})}),k&&e.jsx("div",{className:"fixed inset-0 z-40 flex items-center justify-center bg-slate-950/60 p-4 backdrop-blur-sm",children:e.jsxs("div",{className:t(m,"w-full max-w-md space-y-5 p-6 shadow-xl shadow-slate-900/30 dark:shadow-black/40"),children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx("h2",{className:"text-xl font-semibold text-slate-900 dark:text-slate-50",children:a("apiKeys.createNew")}),e.jsx("p",{className:t(r,"text-sm"),children:a("apiKeys.createDescription")})]}),e.jsxs("div",{className:"space-y-4",children:[e.jsx(I,{label:a("apiKeys.keyNamePlaceholder"),required:!0,children:e.jsx(re,{value:u,onChange:s=>y(s.target.value),placeholder:a("apiKeys.keyNamePlaceholder"),onKeyDown:s=>{s.key==="Enter"&&(s.preventDefault(),P())}})}),e.jsx(I,{label:a("apiKeys.descriptionLabel"),children:e.jsx("textarea",{value:D,onChange:s=>v(s.target.value),placeholder:a("apiKeys.keyDescriptionPlaceholder"),className:"w-full rounded-2xl border border-slate-200/50 bg-white/90 px-4 py-3 text-sm text-slate-800 shadow-sm shadow-slate-200/30 transition-all duration-200 focus:border-blue-400/70 focus:bg-white focus:outline-none focus:ring-2 focus:ring-blue-400/20 focus:shadow-md focus:shadow-blue-200/40 dark:border-slate-700/50 dark:bg-slate-900/90 dark:text-slate-200 dark:shadow-lg dark:shadow-slate-900/30 dark:focus:border-blue-400/70 dark:focus:ring-blue-400/20 min-h-[96px] resize-none"})})]}),e.jsxs("div",{className:"flex justify-end gap-2",children:[e.jsx(C,{onClick:()=>{x(!1),y(""),v("")},variant:"subtle",className:"rounded-full",children:a("common.actions.cancel")}),e.jsx(C,{onClick:()=>void P(),variant:"primary",className:"rounded-full",children:a("apiKeys.createAction")})]})]})}),h&&e.jsx("div",{className:"fixed inset-0 z-40 flex items-center justify-center bg-slate-950/60 p-4 backdrop-blur-sm",children:e.jsxs("div",{className:t(m,"w-full max-w-md space-y-5 p-6 shadow-xl shadow-slate-900/30 dark:shadow-black/40"),children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("div",{className:"grid h-10 w-10 place-items-center rounded-full bg-emerald-500/20 text-emerald-600 dark:bg-emerald-500/30 dark:text-emerald-200",children:e.jsx(de,{className:"h-5 w-5","aria-hidden":"true"})}),e.jsx("h2",{className:"text-xl font-semibold text-slate-900 dark:text-slate-50",children:a("apiKeys.keyCreated")})]}),e.jsx("p",{className:"text-sm font-medium text-amber-600 dark:text-amber-400",children:a("apiKeys.saveKeyWarning")}),e.jsx("div",{className:"rounded-2xl bg-slate-900/95 px-4 py-3 font-mono text-sm text-slate-50 shadow-inner shadow-slate-900/40 dark:bg-slate-800/90",children:h.key}),h.description?e.jsx("p",{className:t(r,"whitespace-pre-wrap text-sm"),children:h.description}):null,e.jsxs("div",{className:"flex justify-end gap-2",children:[e.jsxs("button",{type:"button",onClick:()=>U(h.key),className:t(Z,"h-10 rounded-full px-4"),children:[e.jsx(ce,{className:"h-4 w-4","aria-hidden":"true"}),a("common.actions.copy")]}),e.jsx("button",{type:"button",onClick:()=>L(null),className:t(ee,"h-10 rounded-full px-4"),children:a("common.actions.close")})]})]})})]})}function S({label:a,value:i}){return e.jsxs("div",{className:t(m,"p-6"),children:[e.jsx("p",{className:t(r,"text-xs font-semibold uppercase tracking-[0.18em]"),children:a}),e.jsx("p",{className:"mt-3 text-3xl font-semibold text-slate-900 dark:text-slate-50",children:i})]})}function O({title:a,option:i,loading:k,empty:x,emptyText:u}){const{t:y}=W();return e.jsxs("div",{className:t(m,"space-y-4 p-6"),children:[e.jsx("h3",{className:"text-lg font-semibold text-slate-900 dark:text-slate-50",children:a}),k?e.jsx("div",{className:ae,children:e.jsx("span",{className:t(r,"text-sm"),children:y("common.loadingShort")})}):x?e.jsx("div",{className:se,children:e.jsx("span",{className:t(r,"text-sm"),children:u})}):e.jsx(le,{option:i,style:{height:280},notMerge:!0,lazyUpdate:!0,className:te})]})}export{ve as default};
|
|
File without changes
|
|
File without changes
|