1var w=e=>{throw TypeError(e)};var C=(e,t,s)=>t.has(e)||w("Cannot "+s);var i=(e,t,s)=>(C(e,t,"read from private field"),s?s.call(e):t.get(e)),b=(e,t,s)=>t.has(e)?w("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,s),m=(e,t,s,r)=>(C(e,t,"write to private field"),r?r.call(e,s):t.set(e,s),s),f=(e,t,s)=>(C(e,t,"access private method"),s);import{S as F,s as R,h as M,n as x,u as K,k}from"./ofetch.03887fc3-CSvrjRaC.js";import{u as D,Q as P,d as L,n as T,s as j,a as I,b as z}from"./api-fetch-BMGylo_B.js";import{r as g}from"./chunk-AYJ5UCUI-C1HMqFsr.js";import{g as A}from"./mutation-CL9XvbcK.js";import{b as Q}from"./auth-client-Cn2gVhpv.js";var c,l,u,a,o,q,E,U,B=(U=class extends F{constructor(t,s){super();b(this,o);b(this,c);b(this,l);b(this,u);b(this,a);m(this,c,t),this.setOptions(s),this.bindMethods(),f(this,o,q).call(this)}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(t){var r;const s=this.options;this.options=i(this,c).defaultMutationOptions(t),R(this.options,s)||i(this,c).getMutationCache().notify({type:"observerOptionsUpdated",mutation:i(this,u),observer:this}),s!=null&&s.mutationKey&&this.options.mutationKey&&M(s.mutationKey)!==M(this.options.mutationKey)?this.reset():((r=i(this,u))==null?void 0:r.state.status)==="pending"&&i(this,u).setOptions(this.options)}onUnsubscribe(){var t;this.hasListeners()||(t=i(this,u))==null||t.removeObserver(this)}onMutationUpdate(t){f(this,o,q).call(this),f(this,o,E).call(this,t)}getCurrentResult(){return i(this,l)}reset(){var t;(t=i(this,u))==null||t.removeObserver(this),m(this,u,void 0),f(this,o,q).call(this),f(this,o,E).call(this)}mutate(t,s){var r;return m(this,a,s),(r=i(this,u))==null||r.removeObserver(this),m(this,u,i(this,c).getMutationCache().build(i(this,c),this.options)),i(this,u).addObserver(this),i(this,u).execute(t)}},c=new WeakMap,l=new WeakMap,u=new WeakMap,a=new WeakMap,o=new WeakSet,q=function(){var s;const t=((s=i(this,u))==null?void 0:s.state)??A();m(this,l,{...t,isPending:t.status==="pending",isSuccess:t.status==="success",isError:t.status==="error",isIdle:t.status==="idle",mutate:this.mutate,reset:this.reset})},E=function(t){x.batch(()=>{var s,r,n,p,h,y,v,O;if(i(this,a)&&this.hasListeners()){const d=i(this,l).variables,S=i(this,l).context;(t==null?void 0:t.type)==="success"?((r=(s=i(this,a)).onSuccess)==null||r.call(s,t.data,d,S),(p=(n=i(this,a)).onSettled)==null||p.call(n,t.data,null,d,S)):(t==null?void 0:t.type)==="error"&&((y=(h=i(this,a)).onError)==null||y.call(h,t.error,d,S),(O=(v=i(this,a)).onSettled)==null||O.call(v,void 0,t.error,d,S))}this.listeners.forEach(d=>{d(i(this,l))})})},U);function $(e,t){return D({...e,enabled:!0,suspense:!0,throwOnError:L,placeholderData:void 0},P)}function Z(e){return e}function G(e,t){const s=K(),[r]=g.useState(()=>new B(s,e));g.useEffect(()=>{r.setOptions(e)},[r,e]);const n=g.useSyncExternalStore(g.useCallback(h=>r.subscribe(x.batchCalls(h)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),p=g.useCallback((h,y)=>{r.mutate(h,y).catch(T)},[r]);if(n.error&&j(r.options.throwOnError,[n.error]))throw n.error;return{...n,mutate:p,mutateAsync:n.mutate}}const H=()=>({queryKey:["user-info"],queryFn:async()=>await Q.getSession()});function _(){return $(H())}function tt(e,t){var v,O;const{pageIndex:s=1,pageSize:r=10}=e||{},{data:n,isPending:p,isFetching:h,refetch:y}=I({queryKey:["users",s,r,...Object.entries(t||{})],queryFn:async()=>await Q.admin.listUsers({query:{limit:10}}),placeholderData:k});return{isPending:p,isLoading:h,refetch:y,data:{list:((v=n==null?void 0:n.data)==null?void 0:v.users)||[],total:((O=n==null?void 0:n.data)==null?void 0:O.total)||0}}}function st(){const e=K();return G({mutationFn:async t=>await z(`/api/${t.id}`,{method:"PUT",body:t}),onSuccess:()=>{e.invalidateQueries({queryKey:["users"]})}})}export{st as a,_ as b,$ as c,Z as q,tt as u};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.