1var Jt=e=>{throw TypeError(e)};var ft=(e,t,n)=>t.has(e)||Jt("Cannot "+n);var u=(e,t,n)=>(ft(e,t,"read from private field"),n?n.call(e):t.get(e)),R=(e,t,n)=>t.has(e)?Jt("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),v=(e,t,n,i)=>(ft(e,t,"write to private field"),i?i.call(e,n):t.set(e,n),n),M=(e,t,n)=>(ft(e,t,"access private method"),n);var st=(e,t,n,i)=>({set _(s){v(e,t,s,n)},get _(){return u(e,t,i)}});import{r as A,j as Bn}from"./ui-vendor-Nh77zFHh.js";var Ue=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},ye,ae,Oe,gn,kn=(gn=class extends Ue{constructor(){super();R(this,ye);R(this,ae);R(this,Oe);v(this,Oe,t=>{if(typeof window<"u"&&window.addEventListener){const n=()=>t();return window.addEventListener("visibilitychange",n,!1),()=>{window.removeEventListener("visibilitychange",n)}}})}onSubscribe(){u(this,ae)||this.setEventListener(u(this,Oe))}onUnsubscribe(){var t;this.hasListeners()||((t=u(this,ae))==null||t.call(this),v(this,ae,void 0))}setEventListener(t){var n;v(this,Oe,t),(n=u(this,ae))==null||n.call(this),v(this,ae,t(i=>{typeof i=="boolean"?this.setFocused(i):this.onFocus()}))}setFocused(t){u(this,ye)!==t&&(v(this,ye,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(n=>{n(t)})}isFocused(){var t;return typeof u(this,ye)=="boolean"?u(this,ye):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},ye=new WeakMap,ae=new WeakMap,Oe=new WeakMap,gn),Qt=new kn,Nn={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},ce,zt,fn,Kn=(fn=class{constructor(){R(this,ce,Nn);R(this,zt,!1)}setTimeoutProvider(e){v(this,ce,e)}setTimeout(e,t){return u(this,ce).setTimeout(e,t)}clearTimeout(e){u(this,ce).clearTimeout(e)}setInterval(e,t){return u(this,ce).setInterval(e,t)}clearInterval(e){u(this,ce).clearInterval(e)}},ce=new WeakMap,zt=new WeakMap,fn),Re=new Kn;function Xn(e){setTimeout(e,0)}var Wn=typeof window>"u"||"Deno"in globalThis;function Q(){}function Jn(e,t){return typeof e=="function"?e(t):e}function Rt(e){return typeof e=="number"&&e>=0&&e!==1/0}function Fn(e,t){return Math.max(e+(t||0)-Date.now(),0)}function Ce(e,t){return typeof e=="function"?e(t):e}function N(e,t){return typeof e=="function"?e(t):e}function Zt(e,t){const{type:n="all",exact:i,fetchStatus:s,predicate:r,queryKey:o,stale:l}=e;if(o){if(i){if(t.queryHash!==jt(o,t.options))return!1}else if(!Ke(t.queryKey,o))return!1}if(n!=="all"){const c=t.isActive();if(n==="active"&&!c||n==="inactive"&&c)return!1}return!(typeof l=="boolean"&&t.isStale()!==l||s&&s!==t.state.fetchStatus||r&&!r(t))}function Yt(e,t){const{exact:n,status:i,predicate:s,mutationKey:r}=e;if(r){if(!t.options.mutationKey)return!1;if(n){if(Ve(t.options.mutationKey)!==Ve(r))return!1}else if(!Ke(t.options.mutationKey,r))return!1}return!(i&&t.state.status!==i||s&&!s(t))}function jt(e,t){return((t==null?void 0:t.queryKeyHashFn)||Ve)(e)}function Ve(e){return JSON.stringify(e,(t,n)=>yt(n)?Object.keys(n).sort().reduce((i,s)=>(i[s]=n[s],i),{}):n)}function Ke(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(n=>Ke(e[n],t[n])):!1}var Zn=Object.prototype.hasOwnProperty;function _n(e,t,n=0){if(e===t)return e;if(n>500)return t;const i=en(e)&&en(t);if(!i&&!(yt(e)&&yt(t)))return t;const r=(i?e:Object.keys(e)).length,o=i?t:Object.keys(t),l=o.length,c=i?new Array(l):{};let d=0;for(let f=0;f<l;f++){const h=i?f:o[f],g=e[h],a=t[h];if(g===a){c[h]=g,(i?f<r:Zn.call(e,h))&&d++;continue}if(g===null||a===null||typeof g!="object"||typeof a!="object"){c[h]=a;continue}const p=_n(g,a,n+1);c[h]=p,p===g&&d++}return r===l&&d===r?e:c}function ct(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(e[n]!==t[n])return!1;return!0}function en(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function yt(e){if(!tn(e))return!1;const t=e.constructor;if(t===void 0)return!0;const n=t.prototype;return!(!tn(n)||!n.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function tn(e){return Object.prototype.toString.call(e)==="[object Object]"}function Yn(e){return new Promise(t=>{Re.setTimeout(t,e)})}function Ft(e,t,n){return typeof n.structuralSharing=="function"?n.structuralSharing(e,t):n.structuralSharing!==!1?_n(e,t):t}function ei(e,t,n=0){const i=[...e,t];return n&&i.length>n?i.slice(1):i}function ti(e,t,n=0){const i=[t,...e];return n&&i.length>n?i.slice(0,-1):i}var qt=Symbol();function Pn(e,t){return!e.queryFn&&(t!=null&&t.initialPromise)?()=>
1t.initialPromise:!e.queryFn||e.queryFn===qt?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function Ut(e,t){return typeof e=="function"?e(...t):!!e}function ni(e,t,n){let i=!1,s;return Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(s??(s=t()),i||(i=!0,s.aborted?n():s.addEventListener("abort",n,{once:!0})),s)}),e}var Xe=(()=>{let e=()=>Wn;return{isServer(){return e()},setIsServer(t){e=t}}})();function _t(){let e,t;const n=new Promise((s,r)=>{e=s,t=r});n.status="pending",n.catch(()=>{});function i(s){Object.assign(n,s),delete n.resolve,delete n.reject}return n.resolve=s=>{i({status:"fulfilled",value:s}),e(s)},n.reject=s=>{i({status:"rejected",reason:s}),t(s)},n}var ii=Xn;function si(){let e=[],t=0,n=l=>{l()},i=l=>{l()},s=ii;const r=l=>{t?e.push(l):s(()=>{n(l)})},o=()=>{const l=e;e=[],l.length&&s(()=>{i(()=>{l.forEach(c=>{n(c)})})})};return{batch:l=>{let c;t++;try{c=l()}finally{t--,t||o()}return c},batchCalls:l=>(...c)=>{r(()=>{l(...c)})},schedule:r,setNotifyFunction:l=>{n=l},setBatchNotifyFunction:l=>{i=l},setScheduler:l=>{s=l}}}var L=si(),De,de,Ae,hn,ri=(hn=class extends Ue{constructor(){super();R(this,De,!0);R(this,de);R(this,Ae);v(this,Ae,t=>{if(typeof window<"u"&&window.addEventListener){const n=()=>t(!0),i=()=>t(!1);return window.addEventListener("online",n,!1),window.addEventListener("offline",i,!1),()=>{window.removeEventListener("online",n),window.removeEventListener("offline",i)}}})}onSubscribe(){u(this,de)||this.setEventListener(u(this,Ae))}onUnsubscribe(){var t;this.hasListeners()||((t=u(this,de))==null||t.call(this),v(this,de,void 0))}setEventListener(t){var n;v(this,Ae,t),(n=u(this,de))==null||n.call(this),v(this,de,t(this.setOnline.bind(this)))}setOnline(t){u(this,De)!==t&&(v(this,De,t),this.listeners.forEach(i=>{i(t)}))}isOnline(){return u(this,De)}},De=new WeakMap,de=new WeakMap,Ae=new WeakMap,hn),dt=new ri;function oi(e){return Math.min(1e3*2**e,3e4)}function Mn(e){return(e??"online")==="online"?dt.isOnline():!0}var Pt=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function In(e){let t=!1,n=0,i;const s=_t(),r=()=>s.status!=="pending",o=m=>{var S;if(!r()){const C=new Pt(m);g(C),(S=e.onCancel)==null||S.call(e,C)}},l=()=>{t=!0},c=()=>{t=!1},d=()=>Qt.isFocused()&&(e.networkMode==="always"||dt.isOnline())&&e.canRun(),f=()=>Mn(e.networkMode)&&e.canRun(),h=m=>{r()||(i==null||i(),s.resolve(m))},g=m=>{r()||(i==null||i(),s.reject(m))},a=()=>new Promise(m=>{var S;i=C=>{(r()||d())&&m(C)},(S=e.onPause)==null||S.call(e)}).then(()=>{var m;i=void 0,r()||(m=e.onContinue)==null||m.call(e)}),p=()=>{if(r())return;let m;const S=n===0?e.initialPromise:void 0;try{m=S??e.fn()}catch(C){m=Promise.reject(C)}Promise.resolve(m).then(h).catch(C=>{var O;if(r())return;const P=e.retry??(Xe.isServer()?0:3),_=e.retryDelay??oi,w=typeof _=="function"?_(n,C):_,x=P===!0||typeof P=="number"&&n<P||typeof P=="function"&&P(n,C);if(t||!x){g(C);return}n++,(O=e.onFail)==null||O.call(e,n,C),Yn(w).then(()=>d()?void 0:a()).then(()=>{t?g(C):p()})})};return{promise:s,status:()=>s.status,cancel:o,continue:()=>(i==null||i(),s),cancelRetry:l,continueRetry:c,canStart:f,start:()=>(f()?p():a().then(p),s)}}var Fe,pn,xn=(pn=class{constructor(){R(this,Fe)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),Rt(this.gcTime)&&v(this,Fe,Re.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(Xe.isServer()?1/0:5*60*1e3))}clearGcTimeout(){u(this,Fe)&&(Re.clearTimeout(u(this,Fe)),v(this,Fe,void 0))}},Fe=new WeakMap,pn),_e,Le,k,Pe,H,We,Me,U,$n,te,mn,ui=(mn=class extends xn{constructor(t){super();R(this,U);R(this,_e);R(this,Le);R(this,k);R(this,Pe);R(this,H);R(this,We);R(this,Me);v(this,Me,!1),v(this,We,t.defaultOptions),this.setOptions(t.options),this.observers=[],v(this,Pe,t.client),v(this,k,u(this,Pe).getQueryCache()),this.queryKey=t.queryKey,this.queryHash=t.queryHash,v(this,_e,sn(this.options)),this.state=t.state??u(this,_e),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var t;return(t=u(this,H))==null?void 0:t.promise}setOptions(t){if(this.options={...u(this,We),...t},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const n=sn(this.options);n.data!==void 0&&(this.setState(nn(n.data,n.dataUpdatedAt)),v(this,_e,n))}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&u(this,k).remove(this)}setData(t,n){const i=Ft(this.state.data,t,this.options);return M(this,U,te).call(this,{data:i,type:"success",dataUpdatedAt:n==null?void 0:n.updatedAt,manual:n==null?void 0:n.manual}),i}setState(t,n){M(this,U,te).call(this,{type:"setState",state:t,setStateOptions:n})}cancel(t){var i,s;const n=(i=u(this,H))==null?void 0:i.promise;return(s=u(this,H))==null||s.cancel(t),n?n.then(Q).catch(Q):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return u(this,_e)}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(t=>N(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===qt||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdate
1Count>0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>Ce(t.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(t=>t.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(t=0){return this.state.data===void 0?!0:t==="static"?!1:this.state.isInvalidated?!0:!Fn(this.state.dataUpdatedAt,t)}onFocus(){var n;const t=this.observers.find(i=>i.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(n=u(this,H))==null||n.continue()}onOnline(){var n;const t=this.observers.find(i=>i.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(n=u(this,H))==null||n.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),u(this,k).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(n=>n!==t),this.observers.length||(u(this,H)&&(u(this,Me)||M(this,U,$n).call(this)?u(this,H).cancel({revert:!0}):u(this,H).cancelRetry()),this.scheduleGc()),u(this,k).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||M(this,U,te).call(this,{type:"invalidate"})}async fetch(t,n){var c,d,f,h,g,a,p,m,S,C,P,_;if(this.state.fetchStatus!=="idle"&&((c=u(this,H))==null?void 0:c.status())!=="rejected"){if(this.state.data!==void 0&&(n!=null&&n.cancelRefetch))this.cancel({silent:!0});else if(u(this,H))return u(this,H).continueRetry(),u(this,H).promise}if(t&&this.setOptions(t),!this.options.queryFn){const w=this.observers.find(x=>x.options.queryFn);w&&this.setOptions(w.options)}const i=new AbortController,s=w=>{Object.defineProperty(w,"signal",{enumerable:!0,get:()=>(v(this,Me,!0),i.signal)})},r=()=>{const w=Pn(this.options,n),O=(()=>{const K={client:u(this,Pe),queryKey:this.queryKey,meta:this.meta};return s(K),K})();return v(this,Me,!1),this.options.persister?this.options.persister(w,O,this):w(O)},l=(()=>{const w={fetchOptions:n,options:this.options,queryKey:this.queryKey,client:u(this,Pe),state:this.state,fetchFn:r};return s(w),w})();(d=this.options.behavior)==null||d.onFetch(l,this),v(this,Le,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((f=l.fetchOptions)==null?void 0:f.meta))&&M(this,U,te).call(this,{type:"fetch",meta:(h=l.fetchOptions)==null?void 0:h.meta}),v(this,H,In({initialPromise:n==null?void 0:n.initialPromise,fn:l.fetchFn,onCancel:w=>{w instanceof Pt&&w.revert&&this.setState({...u(this,Le),fetchStatus:"idle"}),i.abort()},onFail:(w,x)=>{M(this,U,te).call(this,{type:"failed",failureCount:w,error:x})},onPause:()=>{M(this,U,te).call(this,{type:"pause"})},onContinue:()=>{M(this,U,te).call(this,{type:"continue"})},retry:l.options.retry,retryDelay:l.options.retryDelay,networkMode:l.options.networkMode,canRun:()=>!0}));try{const w=await u(this,H).start();if(w===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(w),(a=(g=u(this,k).config).onSuccess)==null||a.call(g,w,this),(m=(p=u(this,k).config).onSettled)==null||m.call(p,w,this.state.error,this),w}catch(w){if(w instanceof Pt){if(w.silent)return u(this,H).promise;if(w.revert){if(this.state.data===void 0)throw w;return this.state.data}}throw M(this,U,te).call(this,{type:"error",error:w}),(C=(S=u(this,k).config).onError)==null||C.call(S,w,this),(_=(P=u(this,k).config).onSettled)==null||_.call(P,this.state.data,w,this),w}finally{this.scheduleGc()}}},_e=new WeakMap,Le=new WeakMap,k=new WeakMap,Pe=new WeakMap,H=new WeakMap,We=new WeakMap,Me=new WeakMap,U=new WeakSet,$n=function(){return this.state.fetchStatus==="paused"&&this.state.status==="pending"},te=function(t){const n=i=>{switch(t.type){case"failed":return{...i,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...i,fetchStatus:"paused"};case"continue":return{...i,fetchStatus:"fetching"};case"fetch":return{...i,...En(i.data,this.options),fetchMeta:t.meta??null};case"success":const s={...i,...nn(t.data,t.dataUpdatedAt),dataUpdateCount:i.dataUpdateCount+1,...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return v(this,Le,t.manual?s:void 0),s;case"error":const r=t.error;
1return{...i,error:r,errorUpdateCount:i.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:i.fetchFailureCount+1,fetchFailureReason:r,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...i,isInvalidated:!0};case"setState":return{...i,...t.state}}};this.state=n(this.state),L.batch(()=>{this.observers.forEach(i=>{i.onQueryUpdate()}),u(this,k).notify({query:this,type:"updated",action:t})})},mn);function En(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:Mn(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function nn(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:"success"}}function sn(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,n=t!==void 0,i=n?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?i??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"pending",fetchStatus:"idle"}}var j,I,Je,z,Ie,He,ie,ge,Ze,Ge,be,xe,$e,fe,Te,$,ke,Mt,It,xt,$t,Et,Vt,Ot,Vn,vn,li=(vn=class extends Ue{constructor(t,n){super();R(this,$);R(this,j);R(this,I);R(this,Je);R(this,z);R(this,Ie);R(this,He);R(this,ie);R(this,ge);R(this,Ze);R(this,Ge);R(this,be);R(this,xe);R(this,$e);R(this,fe);R(this,Te,new Set);this.options=n,v(this,j,t),v(this,ge,null),v(this,ie,_t()),this.bindMethods(),this.setOptions(n)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(u(this,I).addObserver(this),rn(u(this,I),this.options)?M(this,$,ke).call(this):this.updateResult(),M(this,$,$t).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Dt(u(this,I),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Dt(u(this,I),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,M(this,$,Et).call(this),M(this,$,Vt).call(this),u(this,I).removeObserver(this)}setOptions(t){const n=this.options,i=u(this,I);if(this.options=u(this,j).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof N(this.options.enabled,u(this,I))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");M(this,$,Ot).call(this),u(this,I).setOptions(this.options),n._defaulted&&!ct(this.options,n)&&u(this,j).getQueryCache().notify({type:"observerOptionsUpdated",query:u(this,I),observer:this});const s=this.hasListeners();s&&on(u(this,I),i,this.options,n)&&M(this,$,ke).call(this),this.updateResult(),s&&(u(this,I)!==i||N(this.options.enabled,u(this,I))!==N(n.enabled,u(this,I))||Ce(this.options.staleTime,u(this,I))!==Ce(n.staleTime,u(this,I)))&&M(this,$,Mt).call(this);const r=M(this,$,It).call(this);s&&(u(this,I)!==i||N(this.options.enabled,u(this,I))!==N(n.enabled,u(this,I))||r!==u(this,fe))&&M(this,$,xt).call(this,r)}getOptimisticResult(t){const n=u(this,j).getQueryCache().build(u(this,j),t),i=this.createResult(n,t);return ci(this,i)&&(v(this,z,i),v(this,He,this.options),v(this,Ie,u(this,I).state)),i}getCurrentResult(){return u(this,z)}trackResult(t,n){return new Proxy(t,{get:(i,s)=>(this.trackProp(s),n==null||n(s),s==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&u(this,ie).status==="pending"&&u(this,ie).reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(i,s))})}trackProp(t){u(this,Te).add(t)}getCurrentQuery(){return u(this,I)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const n=u(this,j).defaultQueryOptions(t),i=u(this,j).getQueryCache().build(u(this,j),n);return i.fetch().then(()=>this.createResult(i,n))}fetch(t){return M(this,$,ke).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),u(this,z)))}createResult(t,n){var D;const i=u(this,I),s=this.options,r=u(this,z),o=u(this,Ie),l=u(this,He),d=t!==i?t.state:u(this,Je),{state:f}=t;let h={...f},g=!1,a;if(n._optimisticResults){const G=this.hasListeners(),X=!G&&rn(t,n),tt=G&&on(t,i,n,s);(X||tt)&&(h={...h,...En(f.data,t.options)}),n._optimisticResults==="isRestoring"&&(h.fetchStatus="idle")}let{error:p,errorUpdatedAt:m,status:S}=h;a=h.data;let C=!1;if(n.placeholderData!==void 0&&a===void 0&&S==="pending"){let G;r!=null&&r.isPlaceholderData&&n.placeholderData===(l==null?void 0:l.placeholderData)?(G=r.data,C=!0):G=typeof n.placeholderData=="function"?n.placeholderData((D=u(this,be))==null?void 0:D.state.data,u(this,be)):n.placeholderData,G!==void 0&&(S="success",a=Ft(r==null?void 0:r.data,G,n),g=!0)}if(n.select&&a!==void 0&&!C)if(r&&a===(o==null?void 0:o.data)&&n.select===u(this,Ze))a=u(this,Ge);else try{v(this,Ze,n.select),a=n.select(a),a=Ft(r==null?void 0:r.data,a,n),v(this,Ge,a),v(this,ge,null)}catch(G){v(this,ge,G)}u(this,ge)&&(p=u(this,ge),a=u(this,Ge),m=Date.now(),S="error");const P=h.fetchStatus==="fetching",_=S==="pending",w=S==="error",x=_&&P,O=a!==void 0,E={status:S,fetchStatus:h.fetchStatus,isPending:_,isSuccess:S==="success",isError:w,isInitialLoading:x,isLoading:x,data:a,dataUpdatedAt:h.dataUpdatedAt,error:p,errorUpdatedAt:m,failureCount:h.fetchFailureCount,failureReason:h.fetchFailureReason,errorUpdate
1Count:h.errorUpdateCount,isFetched:t.isFetched(),isFetchedAfterMount:h.dataUpdateCount>d.dataUpdateCount||h.errorUpdateCount>d.errorUpdateCount,isFetching:P,isRefetching:P&&!_,isLoadingError:w&&!O,isPaused:h.fetchStatus==="paused",isPlaceholderData:g,isRefetchError:w&&O,isStale:Bt(t,n),refetch:this.refetch,promise:u(this,ie),isEnabled:N(n.enabled,t)!==!1};if(this.options.experimental_prefetchInRender){const G=E.data!==void 0,X=E.status==="error"&&!G,tt=it=>{X?it.reject(E.error):G&&it.resolve(E.data)},Wt=()=>{const it=v(this,ie,E.promise=_t());tt(it)},nt=u(this,ie);switch(nt.status){case"pending":t.queryHash===i.queryHash&&tt(nt);break;case"fulfilled":(X||E.data!==nt.value)&&Wt();break;case"rejected":(!X||E.error!==nt.reason)&&Wt();break}}return E}updateResult(){const t=u(this,z),n=this.createResult(u(this,I),this.options);if(v(this,Ie,u(this,I).state),v(this,He,this.options),u(this,Ie).data!==void 0&&v(this,be,u(this,I)),ct(n,t))return;v(this,z,n);const i=()=>{if(!t)return!0;const{notifyOnChangeProps:s}=this.options,r=typeof s=="function"?s():s;if(r==="all"||!r&&!u(this,Te).size)return!0;const o=new Set(r??u(this,Te));return this.options.throwOnError&&o.add("error"),Object.keys(u(this,z)).some(l=>{const c=l;return u(this,z)[c]!==t[c]&&o.has(c)})};M(this,$,Vn).call(this,{listeners:i()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&M(this,$,$t).call(this)}},j=new WeakMap,I=new WeakMap,Je=new WeakMap,z=new WeakMap,Ie=new WeakMap,He=new WeakMap,ie=new WeakMap,ge=new WeakMap,Ze=new WeakMap,Ge=new WeakMap,be=new WeakMap,xe=new WeakMap,$e=new WeakMap,fe=new WeakMap,Te=new WeakMap,$=new WeakSet,ke=function(t){M(this,$,Ot).call(this);let n=u(this,I).fetch(this.options,t);return t!=null&&t.throwOnError||(n=n.catch(Q)),n},Mt=function(){M(this,$,Et).call(this);const t=Ce(this.options.staleTime,u(this,I));if(Xe.isServer()||u(this,z).isStale||!Rt(t))return;const i=Fn(u(this,z).dataUpdatedAt,t)+1;v(this,xe,Re.setTimeout(()=>{u(this,z).isStale||this.updateResult()},i))},It=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(u(this,I)):this.options.refetchInterval)??!1},xt=function(t){M(this,$,Vt).call(this),v(this,fe,t),!(Xe.isServer()||N(this.options.enabled,u(this,I))===!1||!Rt(u(this,fe))||u(this,fe)===0)&&v(this,$e,Re.setInterval(()=>{(this.options.refetchIntervalInBackground||Qt.isFocused())&&M(this,$,ke).call(this)},u(this,fe)))},$t=function(){M(this,$,Mt).call(this),M(this,$,xt).call(this,M(this,$,It).call(this))},Et=function(){u(this,xe)&&(Re.clearTimeout(u(this,xe)),v(this,xe,void 0))},Vt=function(){u(this,$e)&&(Re.clearInterval(u(this,$e)),v(this,$e,void 0))},Ot=function(){const t=u(this,j).getQueryCache().build(u(this,j),this.options);if(t===u(this,I))return;const n=u(this,I);v(this,I,t),v(this,Je,t.state),this.hasListeners()&&(n==null||n.removeObserver(this),t.addObserver(this))},Vn=function(t){L.batch(()=>{t.listeners&&this.listeners.forEach(n=>{n(u(this,z))}),u(this,j).getQueryCache().notify({query:u(this,I),type:"observerResultsUpdated"})})},vn);function ai(e,t){return N(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function rn(e,t){return ai(e,t)||e.state.data!==void 0&&Dt(e,t,t.refetchOnMount)}function Dt(e,t,n){if(N(t.enabled,e)!==!1&&Ce(t.staleTime,e)!=="static"){const i=typeof n=="function"?n(e):n;return i==="always"||i!==!1&&Bt(e,t)}return!1}function on(e,t,n,i){return(e!==t||N(i.enabled,e)===!1)&&(!n.suspense||e.state.status!=="error")&&Bt(e,n)}function Bt(e,t){return N(t.enabled,e)!==!1&&e.isStaleByTime(Ce(t.staleTime,e))}function ci(e,t){return!ct(e.getCurrentResult(),t)}function un(e){return{onFetch:(t,n)=>{var f,h,g,a,p;const i=t.options,s=(g=(h=(f=t.fetchOptions)==null?void 0:f.meta)==null?void 0:h.fetchMore)==null?void 0:g.direction,r=((a=t.state.data)==null?void 0:a.pages)||[],o=((p=t.state.data)==null?void 0:p.pageParams)||[];let l={pages:[],pageParams:[]},c=0;const d=async()=>{let m=!1;const S=_=>{ni(_,()=>t.signal,()=>m=!0)},C=Pn(t.options,t.fetchOptions),P=async(_,w,x)=>{if(m)return Promise.reject();if(w==null&&_.pages.length)return Promise.resolve(_);const K=(()=>{const X={client:t.client,queryKey:t.queryKey,pageParam:w,direction:x?"backward":"forward",meta:t.options.meta};return S(X),X})(),E=await C(K),{maxPages:D}=t.options,G=x?ti:ei;return{pages:G(_.pages,E,D),pageParams:G(_.pageParams,w,D)}};if(s&&r.length){const _=s==="backward",w=_?di:ln,x={pages:r,pageParams:o},O=w(i,x);l=await P(x,O,_)}else{const _=e??r.length;do{const w=c===0?o[0]??i.initialPageParam:ln(i,l);if(c>0&&w==null)break;l=await P(l,w),c++}while(c<_)}return l};t.options.persister?t.fetchFn=()=>{var m,S;return(S=(m=t.options).persister)==null?void 0:S.call(m,d,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n)}:t.fetchFn=d}}}function ln(e,{pages:t,pageParams:n}){const i=t.length-1;return t.length>0?e.getNextPageParam(t[i],t,n[i],n):void 0}function di(e,{pages:t,pageParams:n}){var i;return t.length>0?(i=e.getPreviousPageParam)==null?void 0:i.call(e,t[0],t,n[0],n):void 0}var Ye,Z,T,Ee,Y,le,Sn,gi=(Sn=class extends xn{constructor(t){super();R(this,Y);R(this,Ye);R(this,Z);R(this,T);R(this,Ee);v(this,Ye,t.client),this.mutationId=t.mutationId,v(this,T,t.mutationCache),v(this,Z,[]),this.state=t.state||On(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){u(this,Z).includes(t)||(u(this,Z).push(t),this.clearGcTimeout(),u(this,T).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){v(this,Z,u(this,Z).filter(n=>n!==t)),this.scheduleGc(),u(this,T).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){u(this,Z).length||(this.state.status==="pending"?this.scheduleGc():u(this,T).remove(this))}continue(){var t;return((t=u(this,Ee))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var o,l,c,d,f,h,g,a,p,m,S,C,P,_,w,x,O,K;const n=()=>{M(this,Y,le).call(this,{type:"continue"})},i={client:u(this,Ye),meta:this.options.meta,mutationKey:this.options.mutationKey};v(this,Ee,In({fn:()=>this.options.mutationFn?this.options.mutationFn(t,i):Promise.reject(new Error("No mutationFn found")),onFail:(E,D)=>{M(this,Y,le).call(this,{type:"failed",failureCount:E,error:D})},onPause:()=>{M(this,Y,le).call(this,{type:"pause"})},onContinue:n,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>u(this,T).canRun(this)}));const s=this.state.status==="pending",r=!u(this,Ee).canStart();try{if(s)n();else{M(this,Y,le).call(this,{type:"pending",variables:t,isPaused:r}),u(this,T).config.onMutate&&await u(this,T).config.onMutate(t,this,i);
1const D=await((l=(o=this.options).onMutate)==null?void 0:l.call(o,t,i));D!==this.state.context&&M(this,Y,le).call(this,{type:"pending",context:D,variables:t,isPaused:r})}const E=await u(this,Ee).start();return await((d=(c=u(this,T).config).onSuccess)==null?void 0:d.call(c,E,t,this.state.context,this,i)),await((h=(f=this.options).onSuccess)==null?void 0:h.call(f,E,t,this.state.context,i)),await((a=(g=u(this,T).config).onSettled)==null?void 0:a.call(g,E,null,this.state.variables,this.state.context,this,i)),await((m=(p=this.options).onSettled)==null?void 0:m.call(p,E,null,t,this.state.context,i)),M(this,Y,le).call(this,{type:"success",data:E}),E}catch(E){try{await((C=(S=u(this,T).config).onError)==null?void 0:C.call(S,E,t,this.state.context,this,i))}catch(D){Promise.reject(D)}try{await((_=(P=this.options).onError)==null?void 0:_.call(P,E,t,this.state.context,i))}catch(D){Promise.reject(D)}try{await((x=(w=u(this,T).config).onSettled)==null?void 0:x.call(w,void 0,E,this.state.variables,this.state.context,this,i))}catch(D){Promise.reject(D)}try{await((K=(O=this.options).onSettled)==null?void 0:K.call(O,void 0,E,t,this.state.context,i))}catch(D){Promise.reject(D)}throw M(this,Y,le).call(this,{type:"error",error:E}),E}finally{u(this,T).runNext(this)}}},Ye=new WeakMap,Z=new WeakMap,T=new WeakMap,Ee=new WeakMap,Y=new WeakSet,le=function(t){const n=i=>{switch(t.type){case"failed":return{...i,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...i,isPaused:!0};case"continue":return{...i,isPaused:!1};case"pending":return{...i,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...i,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...i,data:void 0,error:t.error,failureCount:i.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=n(this.state),L.batch(()=>{u(this,Z).forEach(i=>{i.onMutationUpdate(t)}),u(this,T).notify({mutation:this,type:"updated",action:t})})},Sn);function On(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var se,W,et,Cn,fi=(Cn=class extends Ue{constructor(t={}){super();R(this,se);R(this,W);R(this,et);this.config=t,v(this,se,new Set),v(this,W,new Map),v(this,et,0)}build(t,n,i){const s=new gi({client:t,mutationCache:this,mutationId:++st(this,et)._,options:t.defaultMutationOptions(n),state:i});return this.add(s),s}add(t){u(this,se).add(t);const n=rt(t);if(typeof n=="string"){const i=u(this,W).get(n);i?i.push(t):u(this,W).set(n,[t])}this.notify({type:"added",mutation:t})}remove(t){if(u(this,se).delete(t)){const n=rt(t);if(typeof n=="string"){const i=u(this,W).get(n);if(i)if(i.length>1){const s=i.indexOf(t);s!==-1&&i.splice(s,1)}else i[0]===t&&u(this,W).delete(n)}}this.notify({type:"removed",mutation:t})}canRun(t){const n=rt(t);if(typeof n=="string"){const i=u(this,W).get(n),s=i==null?void 0:i.find(r=>r.state.status==="pending");return!s||s===t}else return!0}runNext(t){var i;const n=rt(t);if(typeof n=="string"){const s=(i=u(this,W).get(n))==null?void 0:i.find(r=>
1r!==t&&r.state.isPaused);return(s==null?void 0:s.continue())??Promise.resolve()}else return Promise.resolve()}clear(){L.batch(()=>{u(this,se).forEach(t=>{this.notify({type:"removed",mutation:t})}),u(this,se).clear(),u(this,W).clear()})}getAll(){return Array.from(u(this,se))}find(t){const n={exact:!0,...t};return this.getAll().find(i=>Yt(n,i))}findAll(t={}){return this.getAll().filter(n=>Yt(t,n))}notify(t){L.batch(()=>{this.listeners.forEach(n=>{n(t)})})}resumePausedMutations(){const t=this.getAll().filter(n=>n.state.isPaused);return L.batch(()=>Promise.all(t.map(n=>n.continue().catch(Q))))}},se=new WeakMap,W=new WeakMap,et=new WeakMap,Cn);function rt(e){var t;return(t=e.options.scope)==null?void 0:t.id}var re,he,q,oe,ue,at,At,wn,hi=(wn=class extends Ue{constructor(t,n){super();R(this,ue);R(this,re);R(this,he);R(this,q);R(this,oe);v(this,re,t),this.setOptions(n),this.bindMethods(),M(this,ue,at).call(this)}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(t){var i;const n=this.options;this.options=u(this,re).defaultMutationOptions(t),ct(this.options,n)||u(this,re).getMutationCache().notify({type:"observerOptionsUpdated",mutation:u(this,q),observer:this}),n!=null&&n.mutationKey&&this.options.mutationKey&&Ve(n.mutationKey)!==Ve(this.options.mutationKey)?this.reset():((i=u(this,q))==null?void 0:i.state.status)==="pending"&&u(this,q).setOptions(this.options)}onUnsubscribe(){var t;this.hasListeners()||(t=u(this,q))==null||t.removeObserver(this)}onMutationUpdate(t){M(this,ue,at).call(this),M(this,ue,At).call(this,t)}getCurrentResult(){return u(this,he)}reset(){var t;(t=u(this,q))==null||t.removeObserver(this),v(this,q,void 0),M(this,ue,at).call(this),M(this,ue,At).call(this)}mutate(t,n){var i;return v(this,oe,n),(i=u(this,q))==null||i.removeObserver(this),v(this,q,u(this,re).getMutationCache().build(u(this,re),this.options)),u(this,q).addObserver(this),u(this,q).execute(t)}},re=new WeakMap,he=new WeakMap,q=new WeakMap,oe=new WeakMap,ue=new WeakSet,at=function(){var n;const t=((n=u(this,q))==null?void 0:n.state)??On();v(this,he,{...t,isPending:t.status==="pending",isSuccess:t.status==="success",isError:t.status==="error",isIdle:t.status==="idle",mutate:this.mutate,reset:this.reset})},At=function(t){L.batch(()=>{var n,i,s,r,o,l,c,d;if(u(this,oe)&&this.hasListeners()){const f=u(this,he).variables,h=u(this,he).context,g={client:u(this,re),meta:this.options.meta,mutationKey:this.options.mutationKey};if((t==null?void 0:t.type)==="success"){try{(i=(n=u(this,oe)).onSuccess)==null||i.call(n,t.data,f,h,g)}catch(a){Promise.reject(a)}try{(r=(s=u(this,oe)).onSettled)==null||r.call(s,t.data,null,f,h,g)}catch(a){Promise.reject(a)}}else if((t==null?void 0:t.type)==="error"){try{(l=(o=u(this,oe)).onError)==null||l.call(o,t.error,f,h,g)}catch(a){Promise.reject(a)}try{(d=(c=u(this,oe)).onSettled)==null||d.call(c,void 0,t.error,f,h,g)}catch(a){Promise.reject(a)}}}this.listeners.forEach(f=>{f(u(this,he))})})},wn),ee,Rn,pi=(Rn=class extends Ue{constructor(t={}){super();R(this,ee);this.config=t,v(this,ee,new Map)}build(t,n,i){const s=n.queryKey,r=n.queryHash??jt(s,n);let o=this.get(r);return o||(o=new ui({client:t,queryKey:s,queryHash:r,options:t.defaultQueryOptions(n),state:i,defaultOptions:t.getQueryDefaults(s)}),this.add(o)),o}add(t){u(this,ee).has(t.queryHash)||(u(this,ee).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const n=u(this,ee).get(t.queryHash);n&&(t.destroy(),n===t&&u(this,ee).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){L.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return u(this,ee).get(t)}getAll(){return[...u(this,ee).values()]}find(t){const n={exact:!0,...t};return this.getAll().find(i=>Zt(n,i))}findAll(t={}){const n=this.getAll();return Object.keys(t).length>0?n.filter(i=>Zt(t,i)):n}notify(t){L.batch(()=>{this.listeners.forEach(n=>{n(t)})})}onFocus(){L.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){L.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},ee=new WeakMap,Rn),V,pe,me,ze,Qe,ve,je,qe,yn,Rs=(yn=class{constructor(e={}){R(this,V);R(this,pe);R(this,me);R(this,ze);R(this,Qe);R(this,ve);R(this,je);R(this,qe);v(this,V,e.queryCache||new pi),v(this,pe,e.mutationCache||new fi),v(this,me,e.defaultOptions||{}),v(this,ze,new Map),v(this,Qe,new Map),v(this,ve,0)}mount(){st(this,ve)._++,u(this,ve)===1&&(v(this,je,Qt.subscribe(async e=>{e&&(await this.resumePausedMutations(),u(this,V).onFocus())})),v(this,qe,dt.subscribe(async e=>{e&&(await this.resumePausedMutations(),u(this,V).onOnline())})))}unmount(){var e,t;st(this,ve)._--,u(this,ve)===0&&((e=u(this,je))==null||e.call(this),v(this,je,void 0),(t=u(this,qe))==null||t.call(this),v(this,qe,void 0))}isFetching(e){return u(this,V).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return u(this,pe).findAll({...e,status:"pending"}).length}getQueryData(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=u(this,V).get(t.queryHash))==null?void 0:n.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),n=u(this,V).build(this,t),i=n.state.data;return i===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(Ce(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(i))}getQueriesData(e){return u(this,V).findAll(e).map(({queryKey:t,state:n})=>{const i=n.data;return[t,i]})}setQueryData(e,t,n){const i=this.defaultQueryOptions({queryKey:e}),s=u(this,V).get(i.queryHash),r=s==null?void 0:s.state.data,o=Jn(t,r);if(o!==void 0)return u(this,V).build(this,i).setData(o,{...n,manual:!0})}
1setQueriesData(e,t,n){return L.batch(()=>u(this,V).findAll(e).map(({queryKey:i})=>[i,this.setQueryData(i,t,n)]))}getQueryState(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=u(this,V).get(t.queryHash))==null?void 0:n.state}removeQueries(e){const t=u(this,V);L.batch(()=>{t.findAll(e).forEach(n=>{t.remove(n)})})}resetQueries(e,t){const n=u(this,V);return L.batch(()=>(n.findAll(e).forEach(i=>{i.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const n={revert:!0,...t},i=L.batch(()=>u(this,V).findAll(e).map(s=>s.cancel(n)));return Promise.all(i).then(Q).catch(Q)}invalidateQueries(e,t={}){return L.batch(()=>(u(this,V).findAll(e).forEach(n=>{n.invalidate()}),(e==null?void 0:e.refetchType)==="none"?Promise.resolve():this.refetchQueries({...e,type:(e==null?void 0:e.refetchType)??(e==null?void 0:e.type)??"active"},t)))}refetchQueries(e,t={}){const n={...t,cancelRefetch:t.cancelRefetch??!0},i=L.batch(()=>u(this,V).findAll(e).filter(s=>!s.isDisabled()&&!s.isStatic()).map(s=>{let r=s.fetch(void 0,n);return n.throwOnError||(r=r.catch(Q)),s.state.fetchStatus==="paused"?Promise.resolve():r}));return Promise.all(i).then(Q)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=u(this,V).build(this,t);return n.isStaleByTime(Ce(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(Q).catch(Q)}fetchInfiniteQuery(e){return e.behavior=un(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(Q).catch(Q)}ensureInfiniteQueryData(e){return e.behavior=un(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return dt.isOnline()?u(this,pe).resumePausedMutations():Promise.resolve()}getQueryCache(){return u(this,V)}getMutationCache(){return u(this,pe)}getDefaultOptions(){return u(this,me)}setDefaultOptions(e){v(this,me,e)}setQueryDefaults(e,t){u(this,ze).set(Ve(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...u(this,ze).values()],n={};return t.forEach(i=>{Ke(e,i.queryKey)&&Object.assign(n,i.defaultOptions)}),n}setMutationDefaults(e,t){u(this,Qe).set(Ve(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...u(this,Qe).values()],n={};return t.forEach(i=>{Ke(e,i.mutationKey)&&Object.assign(n,i.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;const t={...u(this,me).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=jt(t.queryKey,t)),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!=="always"),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===qt&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...u(this,me).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){u(this,V).clear(),u(this,pe).clear()}},V=new WeakMap,pe=new WeakMap,me=new WeakMap,ze=new WeakMap,Qe=new WeakMap,ve=new WeakMap,je=new WeakMap,qe=new WeakMap,yn),Dn=A.createContext(void 0),An=e=>{const t=A.useContext(Dn);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},ys=({client:e,children:t})=>(A.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),Bn.jsx(Dn.Provider,{value:e,children:t})),Ln=A.createContext(!1),mi=()=>A.useContext(Ln);Ln.Provider;function vi(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var Si=A.createContext(vi()),Ci=()=>A.useContext(Si),wi=(e,t,n)=>{const i=n!=null&&n.state.error&&typeof e.throwOnError=="function"?Ut(e.throwOnError,[n.state.error,n]):e.throwOnError;(e.suspense||e.experimental_prefetchInRender||i)&&(t.isReset()||(e.retryOnMount=!1))},Ri=e=>{A.useEffect(()=>{e.clearReset()},[e])},yi=({result:e,errorResetBoundary:t,throwOnError:n,query:i,suspense:s})=>e.isError&&!t.isReset()&&!e.isFetching&&i&&(s&&e.data===void 0||Ut(n,[e.error,i])),Fi=e=>{if(e.suspense){const n=s=>s==="static"?s:Math.max(s??1e3,1e3),i=e.staleTime;e.staleTime=typeof i=="function"?(...s)=>n(i(...s)):n(i),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3))}},_i=(e,t)=>e.isLoading&&e.isFetching&&!t,Pi=(e,t)=>
1(e==null?void 0:e.suspense)&&t.isPending,an=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function Mi(e,t,n){var g,a,p,m;const i=mi(),s=Ci(),r=An(),o=r.defaultQueryOptions(e);(a=(g=r.getDefaultOptions().queries)==null?void 0:g._experimental_beforeQuery)==null||a.call(g,o);const l=r.getQueryCache().get(o.queryHash);o._optimisticResults=i?"isRestoring":"optimistic",Fi(o),wi(o,s,l),Ri(s);const c=!r.getQueryCache().get(o.queryHash),[d]=A.useState(()=>new t(r,o)),f=d.getOptimisticResult(o),h=!i&&e.subscribed!==!1;if(A.useSyncExternalStore(A.useCallback(S=>{const C=h?d.subscribe(L.batchCalls(S)):Q;return d.updateResult(),C},[d,h]),()=>d.getCurrentResult(),()=>d.getCurrentResult()),A.useEffect(()=>{d.setOptions(o)},[o,d]),Pi(o,f))throw an(o,d,s);if(yi({result:f,errorResetBoundary:s,throwOnError:o.throwOnError,query:l,suspense:o.suspense}))throw f.error;if((m=(p=r.getDefaultOptions().queries)==null?void 0:p._experimental_afterQuery)==null||m.call(p,o,f),o.experimental_prefetchInRender&&!Xe.isServer()&&_i(f,i)){const S=c?an(o,d,s):l==null?void 0:l.promise;S==null||S.catch(Q).finally(()=>{d.updateResult()})}return o.notifyOnChangeProps?f:d.trackResult(f)}function Fs(e,t){return Mi(e,li)}function _s(e,t){const n=An(),[i]=A.useState(()=>new hi(n,e));A.useEffect(()=>{i.setOptions(e)},[i,e]);const s=A.useSyncExternalStore(A.useCallback(o=>i.subscribe(L.batchCalls(o)),[i]),()=>i.getCurrentResult(),()=>i.getCurrentResult()),r=A.useCallback((o,l)=>{i.mutate(o,l).catch(Q)},[i]);if(s.error&&Ut(i.options.throwOnError,[s.error]))throw s.error;return{...s,mutate:r,mutateAsync:s.mutate}}/** 2 * table-core 3 * 4 * Copyright (c) TanStack 5 * 6 * This source code is licensed under the MIT license found in the 7 * LICENSE.md file in the root directory of this source tree. 8 * 9 * @license MIT 10 */function Ps(){return{accessor:(e,t)=>typeof e=="function"?{...t,accessorFn:e}:{...t,accessorKey:e},display:e=>e,group:e=>e}}function Se(e,t){return typeof e=="function"?e(t):e}function B(e,t){return n=>{t.setState(i=>({...i,[e]:Se(n,i[e])}))}}function gt(e){return e instanceof Function}function Ii(e){return Array.isArray(e)&&e.every(t=>typeof t=="number")}function xi(e,t){const n=[],i=s=>{s.forEach(r=>{n.push(r);const o=t(r);o!=null&&o.length&&i(o)})};return i(e),n}function y(e,t,n){let i=[],s;return r=>{let o;n.key&&n.debug&&(o=Date.now());const l=e(r);if(!(l.length!==i.length||l.some((f,h)=>i[h]!==f)))return s;i=l;let d;if(n.key&&n.debug&&(d=Date.now()),s=t(...l),n==null||n.onChange==null||n.onChange(s),n.key&&n.debug&&n!=null&&n.debug()){const f=Math.round((Date.now()-o)*100)/100,h=Math.round((Date.now()-d)*100)/100,g=h/16,a=(p,m)=>{for(p=String(p);p.length<m;)p=" "+p;return p};console.info(`%câ± ${a(h,5)} /${a(f,5)} ms`,` 11 font-size: .6rem; 12 font-weight: bold; 13 color: hsl(${Math.max(0,Math.min(120-120*g,120))}deg 100% 31%);`,n==null?void 0:n.key)}return s}}function F(e,t,n,i){return{debug:()=>{var s;return(s=e==null?void 0:e.debugAll)!=null?s:e[t]},key:!1,onChange:i}}function $i(e,t,n,i){const s=()=>{var o;return(o=r.getValue())!=null?o:e.options.renderFallbackValue},r={id:`${t.id}_${n.id}`,row:t,column:n,getValue:()=>t.getValue(i),renderValue:s,getContext:y(()=>[e,n,t,r],(o,l,c,d)=>({table:o,column:l,row:c,cell:d,getValue:d.getValue,renderValue:d.renderValue}),F(e.options,"debugCells"))};return e._features.forEach(o=>{o.createCell==null||o.createCell(r,n,t,e)},{}),r}function Ei(e,t,n,i){var s,r;const l={...e._getDefaultColumnDef(),...t}
13,c=l.accessorKey;let d=(s=(r=l.id)!=null?r:c?typeof String.prototype.replaceAll=="function"?c.replaceAll(".","_"):c.replace(/\./g,"_"):void 0)!=null?s:typeof l.header=="string"?l.header:void 0,f;if(l.accessorFn?f=l.accessorFn:c&&(c.includes(".")?f=g=>{let a=g;for(const m of c.split(".")){var p;a=(p=a)==null?void 0:p[m]}return a}:f=g=>g[l.accessorKey]),!d)throw new Error;let h={id:`${String(d)}`,accessorFn:f,parent:i,depth:n,columnDef:l,columns:[],getFlatColumns:y(()=>[!0],()=>{var g;return[h,...(g=h.columns)==null?void 0:g.flatMap(a=>a.getFlatColumns())]},F(e.options,"debugColumns")),getLeafColumns:y(()=>[e._getOrderColumnsFn()],g=>{var a;if((a=h.columns)!=null&&a.length){let p=h.columns.flatMap(m=>m.getLeafColumns());return g(p)}return[h]},F(e.options,"debugColumns"))};for(const g of e._features)g.createColumn==null||g.createColumn(h,e);return h}const b="debugHeaders";function cn(e,t,n){var i;let r={id:(i=n.id)!=null?i:t.id,column:t,index:n.index,isPlaceholder:!!n.isPlaceholder,placeholderId:n.placeholderId,depth:n.depth,subHeaders:[],colSpan:0,rowSpan:0,headerGroup:null,getLeafHeaders:()=>{const o=[],l=c=>{c.subHeaders&&c.subHeaders.length&&c.subHeaders.map(l),o.push(c)};return l(r),o},getContext:()=>({table:e,header:r,column:t})};return e._features.forEach(o=>{o.createHeader==null||o.createHeader(r,e)}),r}const Vi={createTable:e=>{e.getHeaderGroups=y(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(t,n,i,s)=>{var r,o;const l=(r=i==null?void 0:i.map(h=>n.find(g=>g.id===h)).filter(Boolean))!=null?r:[],c=(o=s==null?void 0:s.map(h=>n.find(g=>g.id===h)).filter(Boolean))!=null?o:[],d=n.filter(h=>!(i!=null&&i.includes(h.id))&&!(s!=null&&s.includes(h.id)));return ot(t,[...l,...d,...c],e)},F(e.options,b)),e.getCenterHeaderGroups=y(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(t,n,i,s)=>(n=n.filter(r=>!(i!=null&&i.includes(r.id))&&!(s!=null&&s.includes(r.id))),ot(t,n,e,"center")),F(e.options,b)),e.getLeftHeaderGroups=y(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.left],(t,n,i)=>{var s;const r=(s=i==null?void 0:i.map(o=>n.find(l=>l.id===o)).filter(Boolean))!=null?s:[];return ot(t,r,e,"left")},F(e.options,b)),e.getRightHeaderGroups=y(()=>[e.getAllColumns(),e.getVisibleLeafColumns(),e.getState().columnPinning.right],(t,n,i)=>{var s;const r=(s=i==null?void 0:i.map(o=>n.find(l=>l.id===o)).filter(Boolean))!=null?s:[];return ot(t,r,e,"right")},F(e.options,b)),e.getFooterGroups=y(()=>[e.getHeaderGroups()],t=>[...t].reverse(),F(e.options,b)),e.getLeftFooterGroups=y(()=>[e.getLeftHeaderGroups()],t=>[...t].reverse(),F(e.options,b)),e.getCenterFooterGroups=y(()=>[e.getCenterHeaderGroups()],t=>[...t].reverse(),F(e.options,b)),e.getRightFooterGroups=y(()=>[e.getRightHeaderGroups()],t=>[...t].reverse(),F(e.options,b)),e.getFlatHeaders=y(()=>[e.getHeaderGroups()],t=>t.map(n=>n.headers).flat(),F(e.options,b)),e.getLeftFlatHeaders=y(()=>[e.getLeftHeaderGroups()],t=>t.map(n=>n.headers).flat(),F(e.options,b)),e.getCenterFlatHeaders=y(()=>[e.getCenterHeaderGroups()],t=>t.map(n=>n.headers).flat(),F(e.options,b)),e.getRightFlatHeaders=y(()=>[e.getRightHeaderGroups()],t=>t.map(n=>n.headers).flat(),F(e.options,b)),e.getCenterLeafHeaders=y(()=>[e.getCenterFlatHeaders()],t=>t.filter(n=>{var i;return!((i=n.subHeaders)!=null&&i.length)}),F(e.options,b)),e.getLeftLeafHeaders=y(()=>[e.getLeftFlatHeaders()],t=>t.filter(n=>{var i;return!((i=n.subHeaders)!=null&&i.length)}),F(e.options,b)),e.getRightLeafHeaders=y(()=>[e.getRightFlatHeaders()],t=>t.filter(n=>{var i;return!((i=n.subHeaders)!=null&&i.length)}),F(e.options,b)),e.getLeafHeaders=y(()=>[e.getLeftHeaderGroups(),e.getCenterHeaderGroups(),e.getRightHeaderGroups()],(t,n,i)=>{var s,r,o,l,c,d;return[...(s=(r=t[0])==null?void 0:r.headers)!=null?s:[],...(o=(l=n[0])==null?void 0:l.headers)!=null?o:[],...(c=(d=i[0])==null?void 0:d.headers)!=null?c:[]].map(f=>f.getLeafHeaders()).flat()},F(e.options,b))}};function ot(e,t,n,i){var s,r;let o=0;const l=function(g,a){a===void 0&&(a=1),o=Math.max(o,a),g.filter(p=>
13p.getIsVisible()).forEach(p=>{var m;(m=p.columns)!=null&&m.length&&l(p.columns,a+1)},0)};l(e);let c=[];const d=(g,a)=>{const p={depth:a,id:[i,`${a}`].filter(Boolean).join("_"),headers:[]},m=[];g.forEach(S=>{const C=[...m].reverse()[0],P=S.column.depth===p.depth;let _,w=!1;if(P&&S.column.parent?_=S.column.parent:(_=S.column,w=!0),C&&(C==null?void 0:C.column)===_)C.subHeaders.push(S);else{const x=cn(n,_,{id:[i,a,_.id,S==null?void 0:S.id].filter(Boolean).join("_"),isPlaceholder:w,placeholderId:w?`${m.filter(O=>O.column===_).length}`:void 0,depth:a,index:m.length});x.subHeaders.push(S),m.push(x)}p.headers.push(S),S.headerGroup=p}),c.push(p),a>0&&d(m,a-1)},f=t.map((g,a)=>cn(n,g,{depth:o,index:a}));d(f,o-1),c.reverse();const h=g=>g.filter(p=>p.column.getIsVisible()).map(p=>{let m=0,S=0,C=[0];p.subHeaders&&p.subHeaders.length?(C=[],h(p.subHeaders).forEach(_=>{let{colSpan:w,rowSpan:x}=_;m+=w,C.push(x)})):m=1;const P=Math.min(...C);return S=S+P,p.colSpan=m,p.rowSpan=S,{colSpan:m,rowSpan:S}});return h((s=(r=c[0])==null?void 0:r.headers)!=null?s:[]),c}const kt=(e,t,n,i,s,r,o)=>{let l={id:t,index:i,original:n,depth:s,parentId:o,_valuesCache:{},_uniqueValuesCache:{},getValue:c=>{if(l._valuesCache.hasOwnProperty(c))return l._valuesCache[c];const d=e.getColumn(c);if(d!=null&&d.accessorFn)return l._valuesCache[c]=d.accessorFn(l.original,i),l._valuesCache[c]},getUniqueValues:c=>{if(l._uniqueValuesCache.hasOwnProperty(c))return l._uniqueValuesCache[c];const d=e.getColumn(c);if(d!=null&&d.accessorFn)return d.columnDef.getUniqueValues?(l._uniqueValuesCache[c]=d.columnDef.getUniqueValues(l.original,i),l._uniqueValuesCache[c]):(l._uniqueValuesCache[c]=[l.getValue(c)],l._uniqueValuesCache[c])},renderValue:c=>{var d;return(d=l.getValue(c))!=null?d:e.options.renderFallbackValue},subRows:[],getLeafRows:()=>xi(l.subRows,c=>c.subRows),getParentRow:()=>l.parentId?e.getRow(l.parentId,!0):void 0,getParentRows:()=>{let c=[],d=l;for(;;){const f=d.getParentRow();if(!f)break;c.push(f),d=f}return c.reverse()},getAllCells:y(()=>[e.getAllLeafColumns()],c=>c.map(d=>$i(e,l,d,d.id)),F(e.options,"debugRows")),_getAllCellsByColumnId:y(()=>[l.getAllCells()],c=>c.reduce((d,f)=>(d[f.column.id]=f,d),{}),F(e.options,"debugRows"))};for(let c=0;c<e._features.length;c++){const d=e._features[c];d==null||d.createRow==null||d.createRow(l,e)}return l},Oi={createColumn:(e,t)=>{e._getFacetedRowModel=t.options.getFacetedRowModel&&t.options.getFacetedRowModel(t,e.id),e.getFacetedRowModel=()=>e._getFacetedRowModel?e._getFacetedRowModel():t.getPreFilteredRowModel(),e._getFacetedUniqueValues=t.options.getFacetedUniqueValues&&t.options.getFacetedUniqueValues(t,e.i
13d),e.getFacetedUniqueValues=()=>e._getFacetedUniqueValues?e._getFacetedUniqueValues():new Map,e._getFacetedMinMaxValues=t.options.getFacetedMinMaxValues&&t.options.getFacetedMinMaxValues(t,e.id),e.getFacetedMinMaxValues=()=>{if(e._getFacetedMinMaxValues)return e._getFacetedMinMaxValues()}}},Hn=(e,t,n)=>{var i,s;const r=n==null||(i=n.toString())==null?void 0:i.toLowerCase();return!!(!((s=e.getValue(t))==null||(s=s.toString())==null||(s=s.toLowerCase())==null)&&s.includes(r))};Hn.autoRemove=e=>J(e);const Gn=(e,t,n)=>{var i;return!!(!((i=e.getValue(t))==null||(i=i.toString())==null)&&i.includes(n))};Gn.autoRemove=e=>J(e);const bn=(e,t,n)=>{var i;return((i=e.getValue(t))==null||(i=i.toString())==null?void 0:i.toLowerCase())===(n==null?void 0:n.toLowerCase())};bn.autoRemove=e=>J(e);const Tn=(e,t,n)=>{var i;return(i=e.getValue(t))==null?void 0:i.includes(n)};Tn.autoRemove=e=>J(e);const zn=(e,t,n)=>!n.some(i=>{var s;return!((s=e.getValue(t))!=null&&s.includes(i))});zn.autoRemove=e=>J(e)||!(e!=null&&e.length);const Qn=(e,t,n)=>n.some(i=>{var s;return(s=e.getValue(t))==null?void 0:s.includes(i)});Qn.autoRemove=e=>J(e)||!(e!=null&&e.length);const jn=(e,t,n)=>e.getValue(t)===n;jn.autoRemove=e=>J(e);const qn=(e,t,n)=>e.getValue(t)==n;qn.autoRemove=e=>J(e);const Nt=(e,t,n)=>{let[i,s]=n;const r=e.getValue(t);return r>=i&&r<=s};Nt.resolveFilterValue=e=>{let[t,n]=e,i=typeof t!="number"?parseFloat(t):t,s=typeof n!="number"?parseFloat(n):n,r=t===null||Number.isNaN(i)?-1/0:i,o=n===null||Number.isNaN(s)?1/0:s;if(r>o){const l=r;r=o,o=l}return[r,o]};Nt.autoRemove=e=>J(e)||J(e[0])&&J(e[1]);const ne={includesString:Hn,includesStringSensitive:Gn,equalsString:bn,arrIncludes:Tn,arrIncludesAll:zn,arrIncludesSome:Qn,equals:jn,weakEquals:qn,inNumberRange:Nt};function J(e){return e==null||e===""}const Di={getDefaultColumnDef:()=>({filterFn:"auto"}),getInitialState:e=>({columnFilters:[],...e}),getDefaultOptions:e=>({onColumnFiltersChange:B("columnFilters",e),filterFromLeafRows:!1,maxLeafRowFilterDepth:100}),createColumn:(e,t)=>{e.getAutoFilterFn=()=>{const n=t.getCoreRowModel().flatRows[0],i=n==null?void 0:n.getValue(e.id);return typeof i=="string"?ne.includesString:typeof i=="number"?ne.inNumberRange:typeof i=="boolean"||i!==null&&typeof i=="object"?ne.equals:Array.isArray(i)?ne.arrIncludes:ne.weakEquals},e.getFilterFn=()=>{var n,i;return gt(e.columnDef.filterFn)?e.columnDef.filterFn:e.columnDef.filterFn==="auto"?e.getAutoFilterFn():(n=(i=t.options.filterFns)==null?void 0:i[e.columnDef.filterFn])!=null?n:ne[e.columnDef.filterFn]},e.getCanFilter=()=>{var n,i,s;return((n=e.columnDef.enableColumnFilter)!=null?n:!0)&&((i=t.options.enableColumnFilters)!=null?i:!0)&&((s=t.options.enableFilters)!=null?s:!0)&&!!e.accessorFn},e.getIsFiltered=()=>e.getFilterIndex()>-1,e.getFilterValue=()=>{var n;return(n=t.getState().columnFilters)==null||(n=n.find(i=>i.id===e.id))==null?void 0:n.value},e.getFilterIndex=()=>{var n,i;return(n=(i=t.getState().columnFilters)==null?void 0:i.findIndex(s=>s.id===e.id))!=null?n:-1},e.setFilterValue=n=>{t.setColumnFilters(i=>{const s=e.getFilterFn(),r=i==null?void 0:i.find(f=>f.id===e.id),o=Se(n,r?r.value:void 0);if(dn(s,o,e)){var l;return(l=i==null?void 0:i.filter(f=>f.id!==e.id))!=null?l:[]}const c={id:e.id,value:o};if(r){var d;return(d=i==null?void 0:i.map(f=>f.id===e.id?c:f))!=null?d:[]}return i!=null&&i.length?[...i,c]:[c]})}},createRow:(e,t)=>{e.columnFilters={},e.columnFiltersMeta={}},createTable:e=>{e.setColumnFilters=t=>{const n=e.getAllLeafColumns(),i=s=>{var r;return(r=Se(t,s))==null?void 0:r.filter(o=>{const l=n.find(c=>c.id===o.id);if(l){const c=l.getFilterFn();if(dn(c,o.value,l))return!1}return!0})};e.options.onColumnFiltersChange==null||e.options.onColumnFiltersChange(i)},e.resetColumnFilters=t=>{var n,i;e.setColumnFilters(t?[]:(n=(i=e.initialState)==null?void 0:i.columnFilters)!=null?n:[])},e.getPreFilteredRowModel=()=>e.getCoreRowModel(),e.getFilteredRowModel=()=>(!e._getFilteredRowModel&&e.options.getFilteredRowModel&&(e._getFilteredRowModel=e.options.getFilteredRowModel(e)),e.options.manualFiltering||!e._getFilteredRowModel?e.getPreFilteredRowModel():e._getFilteredRowModel())}};function dn(e,t,n){return(e&&e.autoRemove?e.autoRemove(t,n):!1)||typeof t>"u"||typeof t=="string"&&!t}const Ai=(e,t,n)=>n.reduce((i,s)=>{const r=s.getValue(e);return i+(typeof r=="number"?r:0)},0),Li=(e,t,n)=>{let i;
13return n.forEach(s=>{const r=s.getValue(e);r!=null&&(i>r||i===void 0&&r>=r)&&(i=r)}),i},Hi=(e,t,n)=>{let i;return n.forEach(s=>{const r=s.getValue(e);r!=null&&(i<r||i===void 0&&r>=r)&&(i=r)}),i},Gi=(e,t,n)=>{let i,s;return n.forEach(r=>{const o=r.getValue(e);o!=null&&(i===void 0?o>=o&&(i=s=o):(i>o&&(i=o),s<o&&(s=o)))}),[i,s]},bi=(e,t)=>{let n=0,i=0;if(t.forEach(s=>{let r=s.getValue(e);r!=null&&(r=+r)>=r&&(++n,i+=r)}),n)return i/n},Ti=(e,t)=>{if(!t.length)return;const n=t.map(r=>r.getValue(e));if(!Ii(n))return;if(n.length===1)return n[0];const i=Math.floor(n.length/2),s=n.sort((r,o)=>r-o);return n.length%2!==0?s[i]:(s[i-1]+s[i])/2},zi=(e,t)=>Array.from(new Set(t.map(n=>n.getValue(e))).values()),Qi=(e,t)=>new Set(t.map(n=>n.getValue(e))).size,ji=(e,t)=>t.length,ht={sum:Ai,min:Li,max:Hi,extent:Gi,mean:bi,median:Ti,unique:zi,uniqueCount:Qi,count:ji},qi={getDefaultColumnDef:()=>({aggregatedCell:e=>{var t,n;return(t=(n=e.getValue())==null||n.toString==null?void 0:n.toString())!=null?t:null},aggregationFn:"auto"}),getInitialState:e=>({grouping:[],...e}),getDefaultOptions:e=>({onGroupingChange:B("grouping",e),groupedColumnMode:"reorder"}),createColumn:(e,t)=>{e.toggleGrouping=()=>{t.setGrouping(n=>n!=null&&n.includes(e.id)?n.filter(i=>i!==e.id):[...n??[],e.id])},e.getCanGroup=()=>{var n,i;return((n=e.columnDef.enableGrouping)!=null?n:!0)&&((i=t.options.enableGrouping)!=null?i:!0)&&(!!e.accessorFn||!!e.columnDef.getGroupingValue)},e.getIsGrouped=()=>{var n;return(n=t.getState().grouping)==null?void 0:n.includes(e.id)},e.getGroupedIndex=()=>{var n;return(n=t.getState().grouping)==null?void 0:n.indexOf(e.id)},e.getToggleGroupingHandler=()=>{const n=e.getCanGroup();return()=>{n&&e.toggleGrouping()}},e.getAutoAggregationFn=()=>{const n=t.getCoreRowModel().flatRows[0],i=n==null?void 0:n.getValue(e.id);if(typeof i=="number")return ht.sum;if(Object.prototype.toString.call(i)==="[object Date]")return ht.extent},e.getAggregationFn=()=>{var n,i;if(!e)throw new Error;return gt(e.columnDef.aggregationFn)?e.columnDef.aggregationFn:e.columnDef.aggregationFn==="auto"?e.getAutoAggregationFn():(n=(i=t.options.aggregationFns)==null?void 0:i[e.columnDef.aggregationFn])!=null?n:ht[e.columnDef.aggregationFn]}},createTable:e=>{e.setGrouping=t=>e.options.onGroupingChange==null?void 0:e.options.onGroupingChange(t),e.resetGrouping=t=>{var n,i;e.setGrouping(t?[]:(n=(i=e.initialState)==null?void 0:i.grouping)!=null?n:[])},e.getPreGroupedRowModel=()=>e.getFilteredRowModel(),e.getGroupedRowModel=()=>(!e._getGroupedRowModel&&e.options.getGroupedRowModel&&(e._getGroupedRowModel=e.options.getGroupedRowModel(e)),e.options.manualGrouping||!e._getGroupedRowModel?e.getPreGroupedRowModel():e._getGroupedRowModel())},createRow:(e,t)=>{e.getIsGrouped=()=>!!e.groupingColumnId,e.getGroupingValue=n=>{if(e._groupingValuesCache.hasOwnProperty(n))return e._groupingValuesCache[n];const i=t.getColumn(n);return i!=null&&i.columnDef.getGroupingValue?(e._groupingValuesCache[n]=i.columnDef.getGroupingValue(e.original),e._groupingValuesCache[n]):e.getValue(n)},e._groupingValuesCache={}},createCell:(e,t,n,i)=>{e.getIsGrouped=()=>t.getIsGrouped()&&t.id===n.groupingColumnId,e.getIsPlaceholder=()=>!e.getIsGrouped()&&t.getIsGrouped(),e.getIsAggregated=()=>{var s;return!e.getIsGrouped()&&!e.getIsPlaceholder()&&!!((s=n.subRows)!=null&&s.length)}}};function Ui(e,t,n){if(!(t!=null&&t.length)||!n)return e;const i=e.filter(r=>!t.includes(r.id));return n==="remove"?i:[...t.map(r=>e.find(o=>o.id===r)).filter(Boolean),...i]}const Bi={getInitialState:e=>({columnOrder:[],...e}),getDefaultOptions:e=>({onColumnOrderChange:B("columnOrder",e)}),createColumn:(e,t)=>{e.getIndex=y(n=>[Ne(t,n)],n=>n.findIndex(i=>i.id===e.id),F(t.options,"debugColumns")),e.getIsFirstColumn=n=>{var i;return((i=Ne(t,n)[0])==null?void 0:i.id)===e.id},e.getIsLastColumn=n=>{var i;const s=Ne(t,n);return((i=s[s.length-1])==null?void 0:i.id)===e.id}},createTable:e=>{e.setColumnOrder=t=>e.options.onColumnOrderChange==null?void 0:e.options.onColumnOrderChange(t),e.resetColumnOrder=t=>{var n;e.setColumnOrder(t?[]:(n=e.initialState.columnOrder)!=null?n:[])},e._getOrderColumnsFn=y(()=>[e.getState().columnOrder,e.getState().grouping,e.options.groupedColumnMode],(t,n,i)=>s=>{let r=[];if(!(t!=null&&t.length))r=s;else{const o=[...t],l=[...s];for(;l.length&&o.length;){const c=o.shift(),d=l.findIndex(f=>f.id===c);d>-1&&r.push(l.splice(d,1)[0])}r=[...r,...l]}return Ui(r,n,i)},F(e.options,"debugTable"))}},pt=()=>
13({left:[],right:[]}),ki={getInitialState:e=>({columnPinning:pt(),...e}),getDefaultOptions:e=>({onColumnPinningChange:B("columnPinning",e)}),createColumn:(e,t)=>{e.pin=n=>{const i=e.getLeafColumns().map(s=>s.id).filter(Boolean);t.setColumnPinning(s=>{var r,o;if(n==="right"){var l,c;return{left:((l=s==null?void 0:s.left)!=null?l:[]).filter(h=>!(i!=null&&i.includes(h))),right:[...((c=s==null?void 0:s.right)!=null?c:[]).filter(h=>!(i!=null&&i.includes(h))),...i]}}if(n==="left"){var d,f;return{left:[...((d=s==null?void 0:s.left)!=null?d:[]).filter(h=>!(i!=null&&i.includes(h))),...i],right:((f=s==null?void 0:s.right)!=null?f:[]).filter(h=>!(i!=null&&i.includes(h)))}}return{left:((r=s==null?void 0:s.left)!=null?r:[]).filter(h=>!(i!=null&&i.includes(h))),right:((o=s==null?void 0:s.right)!=null?o:[]).filter(h=>!(i!=null&&i.includes(h)))}})},e.getCanPin=()=>e.getLeafColumns().some(i=>{var s,r,o;return((s=i.columnDef.enablePinning)!=null?s:!0)&&((r=(o=t.options.enableColumnPinning)!=null?o:t.options.enablePinning)!=null?r:!0)}),e.getIsPinned=()=>{const n=e.getLeafColumns().map(l=>l.id),{left:i,right:s}=t.getState().columnPinning,r=n.some(l=>i==null?void 0:i.includes(l)),o=n.some(l=>s==null?void 0:s.includes(l));return r?"left":o?"right":!1},e.getPinnedIndex=()=>{var n,i;const s=e.getIsPinned();return s?(n=(i=t.getState().columnPinning)==null||(i=i[s])==null?void 0:i.indexOf(e.id))!=null?n:-1:0}},createRow:(e,t)=>{e.getCenterVisibleCells=y(()=>[e._getAllVisibleCells(),t.getState().columnPinning.left,t.getState().columnPinning.right],(n,i,s)=>{const r=[...i??[],...s??[]];return n.filter(o=>!r.includes(o.column.id))},F(t.options,"debugRows")),e.getLeftVisibleCells=y(()=>[e._getAllVisibleCells(),t.getState().columnPinning.left],(n,i)=>(i??[]).map(r=>n.find(o=>o.column.id===r)).filter(Boolean).map(r=>({...r,position:"left"})),F(t.options,"debugRows")),e.getRightVisibleCells=y(()=>[e._getAllVisibleCells(),t.getState().columnPinning.right],(n,i)=>(i??[]).map(r=>n.find(o=>o.column.id===r)).filter(Boolean).map(r=>({...r,position:"right"})),F(t.options,"debugRows"))},createTable:e=>{e.setColumnPinning=t=>e.options.onColumnPinningChange==null?void 0:e.options.onColumnPinningChange(t),e.resetColumnPinning=t=>{var n,i;return e.setColumnPinning(t?pt():(n=(i=e.initialState)==null?void 0:i.columnPinning)!=null?n:pt())},e.getIsSomeColumnsPinned=t=>{var n;const i=e.getState().columnPinning;if(!t){var s,r;return!!((s=i.left)!=null&&s.length||(r=i.right)!=null&&r.length)}return!!((n=i[t])!=null&&n.length)},e.getLeftLeafColumns=y(()=>[e.getAllLeafColumns(),e.getState().columnPinning.left],(t,n)=>(n??[]).map(i=>t.find(s=>s.id===i)).filter(Boolean),F(e.options,"debugColumns")),e.getRightLeafColumns=y(()=>[e.getAllLeafColumns(),e.getState().columnPinning.right],(t,n)=>(n??[]).map(i=>t.find(s=>s.id===i)).filter(Boolean),F(e.options,"debugColumns")),e.getCenterLeafColumns=y(()=>[e.getAllLeafColumns(),e.getState().columnPinning.left,e.getState().columnPinning.right],(t,n,i)=>{const s=[...n??[],...i??[]];return t.filter(r=>!s.includes(r.id))},F(e.options,"debugColumns"))}};function Ni(e){return e||(typeof document<"u"?document:null)}const ut={size:150,minSize:20,maxSize:Number.MAX_SAFE_INTEGER},mt=()=>({startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,isResizingColumn:!1,columnSizingStart:[]}),Ki={getDefaultColumnDef:()=>ut,getInitialState:e=>({columnSizing:{},columnSizingInfo:mt(),...e}),getDefaultOptions:e=>({columnResizeMode:"onEnd",columnResizeDirection:"ltr",onColumnSizingChange:B("columnSizing",e),onColumnSizingInfoChange:B("columnSizingInfo",e)}),createColumn:(e,t)=>{e.getSize=()=>{var n,i,s;const r=t.getState().columnSizing[e.id];return Math.min(Math.max((n=e.columnDef.minSize)!=null?n:ut.minSize,(i=r??e.columnDef.size)!=null?i:ut.size),(s=e.columnDef.maxSize)!=null?s:ut.maxSize)},e.getStart=y(n=>[n,Ne(t,n),t.getState().columnSizing],(n,i)=>i.slice(0,e.getIndex(n)).reduce((s,r)=>s+r.getSize(),0),F(t.options,"debugColumns")),e.getAfter=y(n=>[n,Ne(t,n),t.getState().columnSizing],(n,i)=>i.slice(e.getIndex(n)+1).reduce((s,r)=>s+r.getSize(),0),F(t.options,"debugColumns")),e.resetSize=()=>{t.setColumnSizing(n=>{let{[e.id]:i,...s}=n;return s})},e.getCanResize=()=>{var n,i;return((n=e.columnDef.enableResizing)!=null?n:!0)&&((i=t.options.enableColumnResizing)!=null?i:!0)},e.getIsResizing=()=>t.getState().columnSizingInfo.isResizingColumn===e.id},createHeader:(e,t)=>{e.getSize=()=>{let n=0;const i=s=>
13{if(s.subHeaders.length)s.subHeaders.forEach(i);else{var r;n+=(r=s.column.getSize())!=null?r:0}};return i(e),n},e.getStart=()=>{if(e.index>0){const n=e.headerGroup.headers[e.index-1];return n.getStart()+n.getSize()}return 0},e.getResizeHandler=n=>{const i=t.getColumn(e.column.id),s=i==null?void 0:i.getCanResize();return r=>{if(!i||!s||(r.persist==null||r.persist(),vt(r)&&r.touches&&r.touches.length>1))return;const o=e.getSize(),l=e?e.getLeafHeaders().map(C=>[C.column.id,C.column.getSize()]):[[i.id,i.getSize()]],c=vt(r)?Math.round(r.touches[0].clientX):r.clientX,d={},f=(C,P)=>{typeof P=="number"&&(t.setColumnSizingInfo(_=>{var w,x;const O=t.options.columnResizeDirection==="rtl"?-1:1,K=(P-((w=_==null?void 0:_.startOffset)!=null?w:0))*O,E=Math.max(K/((x=_==null?void 0:_.startSize)!=null?x:0),-.999999);return _.columnSizingStart.forEach(D=>{let[G,X]=D;d[G]=Math.round(Math.max(X+X*E,0)*100)/100}),{..._,deltaOffset:K,deltaPercentage:E}}),(t.options.columnResizeMode==="onChange"||C==="end")&&t.setColumnSizing(_=>({..._,...d})))},h=C=>f("move",C),g=C=>{f("end",C),t.setColumnSizingInfo(P=>({...P,isResizingColumn:!1,startOffset:null,startSize:null,deltaOffset:null,deltaPercentage:null,columnSizingStart:[]}))},a=Ni(n),p={moveHandler:C=>h(C.clientX),upHandler:C=>{a==null||a.removeEventListener("mousemove",p.moveHandler),a==null||a.removeEventListener("mouseup",p.upHandler),g(C.clientX)}},m={moveHandler:C=>(C.cancelable&&(C.preventDefault(),C.stopPropagation()),h(C.touches[0].clientX),!1),upHandler:C=>{var P;a==null||a.removeEventListener("touchmove",m.moveHandler),a==null||a.removeEventListener("touchend",m.upHandler),C.cancelable&&(C.preventDefault(),C.stopPropagation()),g((P=C.touches[0])==null?void 0:P.clientX)}},S=Xi()?{passive:!1}:!1;vt(r)?(a==null||a.addEventListener("touchmove",m.moveHandler,S),a==null||a.addEventListener("touchend",m.upHandler,S)):(a==null||a.addEventListener("mousemove",p.moveHandler,S),a==null||a.addEventListener("mouseup",p.upHandler,S)),t.setColumnSizingInfo(C=>({...C,startOffset:c,startSize:o,deltaOffset:0,deltaPercentage:0,columnSizingStart:l,isResizingColumn:i.id}))}}},createTable:e=>{e.setColumnSizing=t=>e.options.onColumnSizingChange==null?void 0:e.options.onColumnSizingChange(t),e.setColumnSizingInfo=t=>e.options.onColumnSizingInfoChange==null?void 0:e.options.onColumnSizingInfoChange(t),e.resetColumnSizing=t=>{var n;e.setColumnSizing(t?{}:(n=e.initialState.columnSizing)!=null?n:{})},e.resetHeaderSizeInfo=t=>{var n;e.setColumnSizingInfo(t?mt():(n=e.initialState.columnSizingInfo)!=null?n:mt())},e.getTotalSize=()=>{var t,n;return(t=(n=e.getHeaderGroups()[0])==null?void 0:n.headers.reduce((i,s)=>i+s.getSize(),0))!=null?t:0},e.getLeftTotalSize=()=>{var t,n;return(t=(n=e.getLeftHeaderGroups()[0])==null?void 0:n.headers.reduce((i,s)=>i+s.getSize(),0))!=null?t:0},e.getCenterTotalSize=()=>{var t,n;return(t=(n=e.getCenterHeaderGroups()[0])==null?void 0:n.headers.reduce((i,s)=>i+s.getSize(),0))!=null?t:0},e.getRightTotalSize=()=>{var t,n;return(t=(n=e.getRightHeaderGroups()[0])==null?void 0:n.headers.reduce((i,s)=>i+s.getSize(),0))!=null?t:0}}};let lt=null;function Xi(){if(typeof lt=="boolean")return lt;let e=!1;try{const t={get passive(){return e=!0,!1}},n=()=>{};window.addEventListener("test",n,t),window.removeEventListener("test",n)}catch{e=!1}return lt=e,lt}function vt(e){return e.type==="touchstart"}const Wi={getInitialState:e=>({columnVisibility:{},...e}),getDefaultOptions:e=>({onColumnVisibilityChange:B("columnVisibility",e)}),createColumn:(e,t)=>{e.toggleVisibility=n=>{e.getCanHide()&&t.setColumnVisibility(i=>({...i,[e.id]:n??!e.getIsVisible()}))},e.getIsVisible=()=>{var n,i;const s=e.columns;return(n=s.length?s.some(r=>r.getIsVisible()):(i=t.getState().columnVisibility)==null?void 0:i[e.id])!=null?n:!0},e.getCanHide=()=>{var n,i;return((n=e.columnDef.enableHiding)!=null?n:!0)&&((i=t.options.enableHiding)!=null?i:!0)},e.getToggleVisibilityHandler=()=>n=>{e.toggleVisibility==null||e.toggleVisibility(n.target.checked)}},createRow:(e,t)=>{e._getAllVisibleCells=y(()=>[e.getAllCells(),t.getState().columnVisibility],n=>n.filter(i=>i.column.getIsVisible()),F(t.options,"debugRows")),e.getVisibleCells=y(()=>[e.getLeftVisibleCells(),e.getCenterVisibleCells(),e.getRightVisibleCells()],(n,i,s)=>[...n,...i,...s],F(t.options,"debugRows"))},createTable:e=>{const t=(n,i)=>y(()=>[i(),i().filter(s=>s.getIsVisible()).map(s=>s.id).join("_")],s=>s.filter(r=>r.getIsVisible==null?void 0:r.getIsVisible()),F(e.options,"debugColumns"));e.getVisibleFlatColumns=t("getVisibleFlatColumns",()=>e.getAllFlatColumns()),e.getVisibleLeafColumns=t("getVisibleLeafColumns",()=>e.getAllLeafColumns()),e.getLeftVisibleLeafColumns=t("getLeftVisibleLeafColumns",()=>e.getLeftLeafColumns()),e.getRightVisibleLeafColumns=t("getRightVisibleLeafColumns",()=>e.getRightLeafColumns()),e.getCenterVisibleLeafColumns=t("getCenterVisibleLeafColumns",()=>e.getCenterLeafColumns()),e.setColumnVisibility=n=>e.options.onColumnVisibilityChange==null?void 0:e.options.onColumnVisibilityChange(n),e.resetColumnVisibility=n=>{var i;e.setColumnVisibility(n?{}:(i=e.initialState.columnVisibility)!=null?i:{})},e.toggleAllColumnsVisible=n=>{var i;n=(i=n)!=null?i:!e.getIsAllColumnsVisible(),e.setColumnVisibility(e.getAllLeafColumns().reduce((s,r)=>({...s,[r.id]:n||!(r.getCanHide!=null&&r.getCanHide())}),{}))},e.getIsAllColumnsVisible=()=>!e.getAllLeafColumns().some(n=>!(n.getIsVisible!=null&&n.getIsVisible())),e.getIsSomeColumnsVisible=()=>e.getAllLeafColumns().some(n=>n.getIsVisible==null?void 0:n.getIsVisible()),e.getToggleAllColumnsVisibilityHandler=()=>n=>{var i;e.toggleAllColumnsVisible((i=n.target)==null?void 0:i.checked)}}};function Ne(e,t){return t?t==="center"?e.getCenterVisibleLeafColumns():t==="left"?e.getLeftVisibleLeafColumns():e.getRightVisibleLeafColumns():e.getVisibleLeafColumns()}const Ji={createTable:e=>{e._getGlobalFacetedRowModel=e.options.getFacetedRowModel&&e.options.getFacetedRowModel(e,"__global__"),e.getGlobalFacetedRowModel=()=>e.options.manualFiltering||!e._getGlobalFacetedRowModel?e.getPreFilteredRowModel():e._getGlobalFacetedRowModel(),e._getGlobalFacetedUniqueValues=e.options.getFacetedUniqueValues&&e.options.getFacetedUniqueValues(e,"__global__"),e.getGlobalFacetedUniqueValues=()=>e._getGlobalFacetedUniqueValues?e._getGlobalFacetedUniqueValues():new Map,e._getGlobalFacetedMinMaxValues=e.options.getFacetedMinMaxValues&&e.options.getFacetedMinMaxValues(e,"__global__"),e.getGlobalFacetedMinMaxValues=()=>
13{if(e._getGlobalFacetedMinMaxValues)return e._getGlobalFacetedMinMaxValues()}}},Zi={getInitialState:e=>({globalFilter:void 0,...e}),getDefaultOptions:e=>({onGlobalFilterChange:B("globalFilter",e),globalFilterFn:"auto",getColumnCanGlobalFilter:t=>{var n;const i=(n=e.getCoreRowModel().flatRows[0])==null||(n=n._getAllCellsByColumnId()[t.id])==null?void 0:n.getValue();return typeof i=="string"||typeof i=="number"}}),createColumn:(e,t)=>{e.getCanGlobalFilter=()=>{var n,i,s,r;return((n=e.columnDef.enableGlobalFilter)!=null?n:!0)&&((i=t.options.enableGlobalFilter)!=null?i:!0)&&((s=t.options.enableFilters)!=null?s:!0)&&((r=t.options.getColumnCanGlobalFilter==null?void 0:t.options.getColumnCanGlobalFilter(e))!=null?r:!0)&&!!e.accessorFn}},createTable:e=>{e.getGlobalAutoFilterFn=()=>ne.includesString,e.getGlobalFilterFn=()=>{var t,n;const{globalFilterFn:i}=e.options;return gt(i)?i:i==="auto"?e.getGlobalAutoFilterFn():(t=(n=e.options.filterFns)==null?void 0:n[i])!=null?t:ne[i]},e.setGlobalFilter=t=>{e.options.onGlobalFilterChange==null||e.options.onGlobalFilterChange(t)},e.resetGlobalFilter=t=>{e.setGlobalFilter(t?void 0:e.initialState.globalFilter)}}},Yi={getInitialState:e=>({expanded:{},...e}),getDefaultOptions:e=>({onExpandedChange:B("expanded",e),paginateExpandedRows:!0}),createTable:e=>{let t=!1,n=!1;e._autoResetExpanded=()=>{var i,s;if(!t){e._queue(()=>{t=!0});return}if((i=(s=e.options.autoResetAll)!=null?s:e.options.autoResetExpanded)!=null?i:!e.options.manualExpanding){if(n)return;n=!0,e._queue(()=>{e.resetExpanded(),n=!1})}},e.setExpanded=i=>e.options.onExpandedChange==null?void 0:e.options.onExpandedChange(i),e.toggleAllRowsExpanded=i=>{i??!e.getIsAllRowsExpanded()?e.setExpanded(!0):e.setExpanded({})},e.resetExpanded=i=>{var s,r;e.setExpanded(i?{}:(s=(r=e.initialState)==null?void 0:r.expanded)!=null?s:{})},e.getCanSomeRowsExpand=()=>e.getPrePaginationRowModel().flatRows.some(i=>i.getCanExpand()),e.getToggleAllRowsExpandedHandler=()=>i=>{i.persist==null||i.persist(),e.toggleAllRowsExpanded()},e.getIsSomeRowsExpanded=()=>{const i=e.getState().expanded;return i===!0||Object.values(i).some(Boolean)},e.getIsAllRowsExpanded=()=>{const i=e.getState().expanded;return typeof i=="boolean"?i===!0:!(!Object.keys(i).length||e.getRowModel().flatRows.some(s=>!s.getIsExpanded()))},e.getExpandedDepth=()=>{let i=0;return(e.getState().expanded===!0?Object.keys(e.getRowModel().rowsById):Object.keys(e.getState().expanded)).forEach(r=>{const o=r.split(".");i=Math.max(i,o.length)}),i},e.getPreExpandedRowModel=()=>e.getSortedRowModel(),e.getExpandedRowModel=()=>(!e._getExpandedRowModel&&e.options.getExpandedRowModel&&(e._getExpandedRowModel=e.options.getExpandedRowModel(e)),e.options.manualExpanding||!e._getExpandedRowModel?e.getPreExpandedRowModel():e._getExpandedRowModel())},createRow:(e,t)=>{e.toggleExpanded=n=>{t.setExpanded(i=>{var s;const r=i===!0?!0:!!(i!=null&&i[e.id]);let o={};if(i===!0?Object.keys(t.getRowModel().rowsById).forEach(l=>{o[l]=!0}):o=i,n=(s=n)!=null?s:!r,!r&&n)return{...o,[e.id]:!0};if(r&&!n){const{[e.id]:l,...c}=o;return c}return i})},e.getIsExpanded=()=>{var n;const i=t.getState().expanded;return!!((n=t.options.getIsRowExpanded==null?void 0:t.options.getIsRowExpanded(e))!=null?n:i===!0||i!=null&&i[e.id])},e.getCanExpand=()=>{var n,i,s;return(n=t.options.getRowCanExpand==null?void 0:t.options.getRowCanExpand(e))!=null?n:((i=t.options.enableExpanding)!=null?i:!0)&&!!((s=e.subRows)!=null&&s.length)},e.getIsAllParentsExpanded=()=>{let n=!0,i=e;for(;n&&i.parentId;)i=t.getRow(i.parentId,!0),n=i.getIsExpanded();return n},e.getToggleExpandedHandler=()=>{const n=e.getCanExpand();return()=>{n&&e.toggleExpanded()}}}},Lt=0,Ht=10,St=()=>({pageIndex:Lt,pageSize:Ht}),es={getInitialState:e=>({...e,pagination:{...St(),...e==null?void 0:e.pagination}}),getDefaultOptions:e=>({onPaginationChange:B("pagination",e)}),createTable:e=>{let t=!1,n=!1;e._autoResetPageIndex=()=>{var i,s;if(!t){e._queue(()=>{t=!0});return}if((i=(s=e.options.autoResetAll)!=null?s:e.options.autoResetPageIndex)!=null?i:!e.options.manualPagination){if(n)return;n=!0,e._queue(()=>{e.resetPageIndex(),n=!1})}},e.setPagination=i=>{const s=r=>Se(i,r);return e.options.onPaginationChange==null?void 0:e.options.onPaginationChange(s)},e.resetPagination=i=>{var s;e.setPagination(i?St():(s=e.initialState.pagination)!=null?s:St())},e.setPageIndex=i=>
13{e.setPagination(s=>{let r=Se(i,s.pageIndex);const o=typeof e.options.pageCount>"u"||e.options.pageCount===-1?Number.MAX_SAFE_INTEGER:e.options.pageCount-1;return r=Math.max(0,Math.min(r,o)),{...s,pageIndex:r}})},e.resetPageIndex=i=>{var s,r;e.setPageIndex(i?Lt:(s=(r=e.initialState)==null||(r=r.pagination)==null?void 0:r.pageIndex)!=null?s:Lt)},e.resetPageSize=i=>{var s,r;e.setPageSize(i?Ht:(s=(r=e.initialState)==null||(r=r.pagination)==null?void 0:r.pageSize)!=null?s:Ht)},e.setPageSize=i=>{e.setPagination(s=>{const r=Math.max(1,Se(i,s.pageSize)),o=s.pageSize*s.pageIndex,l=Math.floor(o/r);return{...s,pageIndex:l,pageSize:r}})},e.setPageCount=i=>e.setPagination(s=>{var r;let o=Se(i,(r=e.options.pageCount)!=null?r:-1);return typeof o=="number"&&(o=Math.max(-1,o)),{...s,pageCount:o}}),e.getPageOptions=y(()=>[e.getPageCount()],i=>{let s=[];return i&&i>0&&(s=[...new Array(i)].fill(null).map((r,o)=>o)),s},F(e.options,"debugTable")),e.getCanPreviousPage=()=>e.getState().pagination.pageIndex>0,e.getCanNextPage=()=>{const{pageIndex:i}=e.getState().pagination,s=e.getPageCount();return s===-1?!0:s===0?!1:i<s-1},e.previousPage=()=>e.setPageIndex(i=>i-1),e.nextPage=()=>e.setPageIndex(i=>i+1),e.firstPage=()=>e.setPageIndex(0),e.lastPage=()=>e.setPageIndex(e.getPageCount()-1),e.getPrePaginationRowModel=()=>e.getExpandedRowModel(),e.getPaginationRowModel=()=>(!e._getPaginationRowModel&&e.options.getPaginationRowModel&&(e._getPaginationRowModel=e.options.getPaginationRowModel(e)),e.options.manualPagination||!e._getPaginationRowModel?e.getPrePaginationRowModel():e._getPaginationRowModel()),e.getPageCount=()=>{var i;return(i=e.options.pageCount)!=null?i:Math.ceil(e.getRowCount()/e.getState().pagination.pageSize)},e.getRowCount=()=>{var i;return(i=e.options.rowCount)!=null?i:e.getPrePaginationRowModel().rows.length}}},Ct=()=>({top:[],bottom:[]}),ts={getInitialState:e=>({rowPinning:Ct(),...e}),getDefaultOptions:e=>({onRowPinningChange:B("rowPinning",e)}),createRow:(e,t)=>{e.pin=(n,i,s)=>{const r=i?e.getLeafRows().map(c=>{let{id:d}=c;return d}):[],o=s?e.getParentRows().map(c=>{let{id:d}=c;return d}):[],l=new Set([...o,e.id,...r]);t.setRowPinning(c=>{var d,f;if(n==="bottom"){var h,g;return{top:((h=c==null?void 0:c.top)!=null?h:[]).filter(m=>!(l!=null&&l.has(m))),bottom:[...((g=c==null?void 0:c.bottom)!=null?g:[]).filter(m=>!(l!=null&&l.has(m))),...Array.from(l)]}}if(n==="top"){var a,p;return{top:[...((a=c==null?void 0:c.top)!=null?a:[]).filter(m=>!(l!=null&&l.has(m))),...Array.from(l)],bottom:((p=c==null?void 0:c.bottom)!=null?p:[]).filter(m=>!(l!=null&&l.has(m)))}}return{top:((d=c==null?void 0:c.top)!=null?d:[]).filter(m=>!(l!=null&&l.has(m))),bottom:((f=c==null?void 0:c.bottom)!=null?f:[]).filter(m=>!(l!=null&&l.has(m)))}})},e.getCanPin=()=>{var n;const{enableRowPinning:i,enablePinning:s}=t.options;return typeof i=="function"?i(e):(n=i??s)!=null?n:!0},e.getIsPinned=()=>{const n=[e.id],{top:i,bottom:s}=t.getState().rowPinning,r=n.some(l=>i==null?void 0:i.includes(l)),o=n.some(l=>s==null?void 0:s.includes(l));return r?"top":o?"bottom":!1},e.getPinnedIndex=()=>{var n,i;const s=e.getIsPinned();if(!s)return-1;const r=(n=s==="top"?t.getTopRows():t.getBottomRows())==null?void 0:n.map(o=>{let{id:l}=o;return l});return(i=r==null?void 0:r.indexOf(e.id))!=null?i:-1}},createTable:e=>{e.setRowPinning=t=>e.options.onRowPinningChange==null?void 0:e.options.onRowPinningChange(t),e.resetRowPinning=t=>{var n,i;return e.setRowPinning(t?Ct():(n=(i=e.initialState)==null?void 0:i.rowPinning)!=null?n:Ct())},e.getIsSomeRowsPinned=t=>{var n;const i=e.getState().rowPinning;if(!t){var s,r;return!!((s=i.top)!=null&&s.length||(r=i.bottom)!=null&&r.length)}return!!((n=i[t])!=null&&n.length)},e._getPinnedRows=(t,n,i)=>{var s;return((s=e.options.keepPinnedRows)==null||s?(n??[]).map(o=>{const l=e.getRow(o,!0);return l.getIsAllParentsExpanded()?l:null}):(n??[]).map(o=>t.find(l=>l.id===o))).filter(Boolean).map(o=>({...o,position:i}))},e.getTopRows=y(()=>[e.getRowModel().rows,e.getState().rowPinning.top],(t,n)=>e._getPinnedRows(t,n,"top"),F(e.options,"debugRows")),e.getBottomRows=y(()=>[e.getRowModel().rows,e.getState().rowPinning.bottom],(t,n)=>e._getPinnedRows(t,n,"bottom"),F(e.options,"debugRows")),e.getCenterRows=y(()=>[e.getRowModel().rows,e.getState().rowPinning.top,e.getState().rowPinning.bottom],(t,n,i)=>
13{const s=new Set([...n??[],...i??[]]);return t.filter(r=>!s.has(r.id))},F(e.options,"debugRows"))}},ns={getInitialState:e=>({rowSelection:{},...e}),getDefaultOptions:e=>({onRowSelectionChange:B("rowSelection",e),enableRowSelection:!0,enableMultiRowSelection:!0,enableSubRowSelection:!0}),createTable:e=>{e.setRowSelection=t=>e.options.onRowSelectionChange==null?void 0:e.options.onRowSelectionChange(t),e.resetRowSelection=t=>{var n;return e.setRowSelection(t?{}:(n=e.initialState.rowSelection)!=null?n:{})},e.toggleAllRowsSelected=t=>{e.setRowSelection(n=>{t=typeof t<"u"?t:!e.getIsAllRowsSelected();const i={...n},s=e.getPreGroupedRowModel().flatRows;return t?s.forEach(r=>{r.getCanSelect()&&(i[r.id]=!0)}):s.forEach(r=>{delete i[r.id]}),i})},e.toggleAllPageRowsSelected=t=>e.setRowSelection(n=>{const i=typeof t<"u"?t:!e.getIsAllPageRowsSelected(),s={...n};return e.getRowModel().rows.forEach(r=>{Gt(s,r.id,i,!0,e)}),s}),e.getPreSelectedRowModel=()=>e.getCoreRowModel(),e.getSelectedRowModel=y(()=>[e.getState().rowSelection,e.getCoreRowModel()],(t,n)=>Object.keys(t).length?wt(e,n):{rows:[],flatRows:[],rowsById:{}},F(e.options,"debugTable")),e.getFilteredSelectedRowModel=y(()=>[e.getState().rowSelection,e.getFilteredRowModel()],(t,n)=>Object.keys(t).length?wt(e,n):{rows:[],flatRows:[],rowsById:{}},F(e.options,"debugTable")),e.getGroupedSelectedRowModel=y(()=>[e.getState().rowSelection,e.getSortedRowModel()],(t,n)=>Object.keys(t).length?wt(e,n):{rows:[],flatRows:[],rowsById:{}},F(e.options,"debugTable")),e.getIsAllRowsSelected=()=>{const t=e.getFilteredRowModel().flatRows,{rowSelection:n}=e.getState();let i=!!(t.length&&Object.keys(n).length);return i&&t.some(s=>s.getCanSelect()&&!n[s.id])&&(i=!1),i},e.getIsAllPageRowsSelected=()=>{const t=e.getPaginationRowModel().flatRows.filter(s=>s.getCanSelect()),{rowSelection:n}=e.getState();let i=!!t.length;return i&&t.some(s=>!n[s.id])&&(i=!1),i},e.getIsSomeRowsSelected=()=>{var t;const n=Object.keys((t=e.getState().rowSelection)!=null?t:{}).length;return n>0&&n<e.getFilteredRowModel().flatRows.length},e.getIsSomePageRowsSelected=()=>{const t=e.getPaginationRowModel().flatRows;return e.getIsAllPageRowsSelected()?!1:t.filter(n=>n.getCanSelect()).some(n=>n.getIsSelected()||n.getIsSomeSelected())},e.getToggleAllRowsSelectedHandler=()=>t=>{e.toggleAllRowsSelected(t.target.checked)},e.getToggleAllPageRowsSelectedHandler=()=>t=>{e.toggleAllPageRowsSelected(t.target.checked)}},createRow:(e,t)=>{e.toggleSelected=(n,i)=>{const s=e.getIsSelected();t.setRowSelection(r=>{var o;if(n=typeof n<"u"?n:!s,e.getCanSelect()&&s===n)return r;const l={...r};return Gt(l,e.id,n,(o=i==null?void 0:i.selectChildren)!=null?o:!0,t),l})},e.getIsSelected=()=>{const{rowSelection:n}=t.getState();return Kt(e,n)},e.getIsSomeSelected=()=>{const{rowSelection:n}=t.getState();return bt(e,n)==="some"},e.getIsAllSubRowsSelected=()=>{const{rowSelection:n}=t.getState();return bt(e,n)==="all"},e.getCanSelect=()=>{var n;return typeof t.options.enableRowSelection=="function"?t.options.enableRowSelection(e):(n=t.options.enableRowSelection)!=null?n:!0},e.getCanSelectSubRows=()=>{var n;return typeof t.options.enableSubRowSelection=="function"?t.options.enableSubRowSelection(e):(n=t.options.enableSubRowSelection)!=null?n:!0},e.getCanMultiSelect=()=>{var n;return typeof t.options.enableMultiRowSelection=="function"?t.options.enableMultiRowSelection(e):(n=t.options.enableMultiRowSelection)!=null?n:!0},e.getToggleSelectedHandler=()=>{const n=e.getCanSelect();return i=>{var s;n&&e.toggleSelected((s=i.target)==null?void 0:s.checked)}}}},Gt=(e,t,n,i,s)=>{var r;const o=s.getRow(t,!0);n?(o.getCanMultiSelect()||Object.keys(e).forEach(l=>delete e[l]),o.getCanSelect()&&(e[t]=!0)):delete e[t],i&&(r=o.subRows)!=null&&r.length&&o.getCanSelectSubRows()&&o.subRows.forEach(l=>Gt(e,l.id,n,i,s))};function wt(e,t){const n=e.getState().rowSelection,i=[],s={},r=function(o,l){return o.map(c=>{var d;const f=Kt(c,n);if(f&&(i.push(c),s[c.id]=c),(d=c.subRows)!=null&&d.length&&(c={...c,subRows:r(c.subRows)}),f)return c}).filter(Boolean)};return{rows:r(t.rows),flatRows:i,rowsById:s}}function Kt(e,t){var n;return(n=t[e.id])!=null?n:!1}function bt(e,t,n){var i;if(!((i=e.subRows)!=null&&i.length))return!1;let s=!0,r=!1;return e.subRows.forEach(o=>{if(!(r&&!s)&&(o.getCanSelect()&&(Kt(o,t)?r=!0:s=!1),o.subRows&&o.subRows.length)){const l=bt(o,t);l==="all"?r=!0:(l==="some"&&(r=!0),s=!1)}}
13),s?"all":r?"some":!1}const Tt=/([0-9]+)/gm,is=(e,t,n)=>Un(we(e.getValue(n)).toLowerCase(),we(t.getValue(n)).toLowerCase()),ss=(e,t,n)=>Un(we(e.getValue(n)),we(t.getValue(n))),rs=(e,t,n)=>Xt(we(e.getValue(n)).toLowerCase(),we(t.getValue(n)).toLowerCase()),os=(e,t,n)=>Xt(we(e.getValue(n)),we(t.getValue(n))),us=(e,t,n)=>{const i=e.getValue(n),s=t.getValue(n);return i>s?1:i<s?-1:0},ls=(e,t,n)=>Xt(e.getValue(n),t.getValue(n));function Xt(e,t){return e===t?0:e>t?1:-1}function we(e){return typeof e=="number"?isNaN(e)||e===1/0||e===-1/0?"":String(e):typeof e=="string"?e:""}function Un(e,t){const n=e.split(Tt).filter(Boolean),i=t.split(Tt).filter(Boolean);for(;n.length&&i.length;){const s=n.shift(),r=i.shift(),o=parseInt(s,10),l=parseInt(r,10),c=[o,l].sort();if(isNaN(c[0])){if(s>r)return 1;if(r>s)return-1;continue}if(isNaN(c[1]))return isNaN(o)?-1:1;if(o>l)return 1;if(l>o)return-1}return n.length-i.length}const Be={alphanumeric:is,alphanumericCaseSensitive:ss,text:rs,textCaseSensitive:os,datetime:us,basic:ls},as={getInitialState:e=>({sorting:[],...e}),getDefaultColumnDef:()=>({sortingFn:"auto",sortUndefined:1}),getDefaultOptions:e=>({onSortingChange:B("sorting",e),isMultiSortEvent:t=>t.shiftKey}),createColumn:(e,t)=>{e.getAutoSortingFn=()=>{const n=t.getFilteredRowModel().flatRows.slice(10);let i=!1;for(const s of n){const r=s==null?void 0:s.getValue(e.id);if(Object.prototype.toString.call(r)==="[object Date]")return Be.datetime;if(typeof r=="string"&&(i=!0,r.split(Tt).length>1))return Be.alphanumeric}return i?Be.text:Be.basic},e.getAutoSortDir=()=>{const n=t.getFilteredRowModel().flatRows[0];return typeof(n==null?void 0:n.getValue(e.id))=="string"?"asc":"desc"},e.getSortingFn=()=>{var n,i;if(!e)throw new Error;return gt(e.columnDef.sortingFn)?e.columnDef.sortingFn:e.columnDef.sortingFn==="auto"?e.getAutoSortingFn():(n=(i=t.options.sortingFns)==null?void 0:i[e.columnDef.sortingFn])!=null?n:Be[e.columnDef.sortingFn]},e.toggleSorting=(n,i)=>{const s=e.getNextSortingOrder(),r=typeof n<"u"&&n!==null;t.setSorting(o=>{const l=o==null?void 0:o.find(a=>a.id===e.id),c=o==null?void 0:o.findIndex(a=>a.id===e.id);let d=[],f,h=r?n:s==="desc";if(o!=null&&o.length&&e.getCanMultiSort()&&i?l?f="toggle":f="add":o!=null&&o.length&&c!==o.length-1?f="replace":l?f="toggle":f="replace",f==="toggle"&&(r||s||(f="remove")),f==="add"){var g;d=[...o,{id:e.id,desc:h}],d.splice(0,d.length-((g=t.options.maxMultiSortColCount)!=null?g:Number.MAX_SAFE_INTEGER))}else f==="toggle"?d=o.map(a=>a.id===e.id?{...a,desc:h}:a):f==="remove"?d=o.filter(a=>a.id!==e.id):d=[{id:e.id,desc:h}];return d})},e.getFirstSortDir=()=>{var n,i;return((n=(i=e.columnDef.sortDescFirst)!=null?i:t.options.sortDescFirst)!=null?n:e.getAutoSortDir()==="desc")?"desc":"asc"},e.getNextSortingOrder=n=>{var i,s;const r=e.getFirstSortDir(),o=e.getIsSorted();return o?o!==r&&((i=t.options.enableSortingRemoval)==null||i)&&(!(n&&(s=t.options.enableMultiRemove)!=null)||s)?!1:o==="desc"?"asc":"desc":r},e.getCanSort=()=>{var n,i;return((n=e.columnDef.enableSorting)!=null?n:!0)&&((i=t.options.enableSorting)!=null?i:!0)&&!!e.accessorFn},e.getCanMultiSort=()=>{var n,i;return(n=(i=e.columnDef.enableMultiSort)!=null?i:t.options.enableMultiSort)!=null?n:!!e.accessorFn},e.getIsSorted=()=>{var n;const i=(n=t.getState().sorting)==null?void 0:n.find(s=>s.id===e.id);return i?i.desc?"desc":"asc":!1},e.getSortIndex=()=>{var n,i;return(n=(i=t.getState().sorting)==null?void 0:i.findIndex(s=>s.id===e.id))!=null?n:-1},e.clearSorting=()=>{t.setSorting(n=>n!=null&&n.length?n.filter(i=>i.id!==e.id):[])},e.getToggleSortingHandler=()=>{const n=e.getCanSort();return i=>{n&&(i.persist==null||i.persist(),e.toggleSorting==null||e.toggleSorting(void 0,e.getCanMultiSort()?t.options.isMultiSortEvent==null?void 0:t.options.isMultiSortEvent(i):!1))}}},createTable:e=>{e.setSorting=t=>e.options.onSortingChange==null?void 0:e.options.onSortingChange(t),e.resetSorting=t=>{var n,i;e.setSorting(t?[]:(n=(i=e.initialState)==null?void 0:i.sorting)!=null?n:[])},e.getPreSortedRowModel=()=>e.getGroupedRowModel(),e.getSortedRowModel=()=>(!e._getSortedRowModel&&e.options.getSortedRowModel&&(e._getSortedRowModel=e.options.getSortedRowModel(e)),e.options.manualSorting||!e._getSortedRowModel?e.getPreSortedRowModel():e._getSortedRowModel())}},cs=[Vi,Wi,Bi,ki,Oi,Di,Ji,Zi,as,qi,Yi,es,ts,ns,Ki];function ds(e){var t,n;const i=[...cs,...(t=e._features)!=null?t:[]];let s={_features:i};const r=s._features.reduce((g,a)=>Object.assign(g,a.getDefaultOptions==null?void 0:a.getDefaultOptions(s)),{}),o=g=>s.options.mergeOptions?s.options.mergeOptions(r,g):{...r,...g};let c={...{},...(n=e.initialState)!=null?n:{}};
13s._features.forEach(g=>{var a;c=(a=g.getInitialState==null?void 0:g.getInitialState(c))!=null?a:c});const d=[];let f=!1;const h={_features:i,options:{...r,...e},initialState:c,_queue:g=>{d.push(g),f||(f=!0,Promise.resolve().then(()=>{for(;d.length;)d.shift()();f=!1}).catch(a=>setTimeout(()=>{throw a})))},reset:()=>{s.setState(s.initialState)},setOptions:g=>{const a=Se(g,s.options);s.options=o(a)},getState:()=>s.options.state,setState:g=>{s.options.onStateChange==null||s.options.onStateChange(g)},_getRowId:(g,a,p)=>{var m;return(m=s.options.getRowId==null?void 0:s.options.getRowId(g,a,p))!=null?m:`${p?[p.id,a].join("."):a}`},getCoreRowModel:()=>(s._getCoreRowModel||(s._getCoreRowModel=s.options.getCoreRowModel(s)),s._getCoreRowModel()),getRowModel:()=>s.getPaginationRowModel(),getRow:(g,a)=>{let p=(a?s.getPrePaginationRowModel():s.getRowModel()).rowsById[g];if(!p&&(p=s.getCoreRowModel().rowsById[g],!p))throw new Error;return p},_getDefaultColumnDef:y(()=>[s.options.defaultColumn],g=>{var a;return g=(a=g)!=null?a:{},{header:p=>{const m=p.header.column.columnDef;return m.accessorKey?m.accessorKey:m.accessorFn?m.id:null},cell:p=>{var m,S;return(m=(S=p.renderValue())==null||S.toString==null?void 0:S.toString())!=null?m:null},...s._features.reduce((p,m)=>Object.assign(p,m.getDefaultColumnDef==null?void 0:m.getDefaultColumnDef()),{}),...g}},F(e,"debugColumns")),_getColumnDefs:()=>s.options.columns,getAllColumns:y(()=>[s._getColumnDefs()],g=>{const a=function(p,m,S){return S===void 0&&(S=0),p.map(C=>{const P=Ei(s,C,S,m),_=C;return P.columns=_.columns?a(_.columns,P,S+1):[],P})};return a(g)},F(e,"debugColumns")),getAllFlatColumns:y(()=>[s.getAllColumns()],g=>g.flatMap(a=>a.getFlatColumns()),F(e,"debugColumns")),_getAllFlatColumnsById:y(()=>[s.getAllFlatColumns()],g=>g.reduce((a,p)=>(a[p.id]=p,a),{}),F(e,"debugColumns")),getAllLeafColumns:y(()=>[s.getAllColumns(),s._getOrderColumnsFn()],(g,a)=>{let p=g.flatMap(m=>m.getLeafColumns());return a(p)},F(e,"debugColumns")),getColumn:g=>s._getAllFlatColumnsById()[g]};Object.assign(s,h);for(let g=0;g<s._features.length;g++){const a=s._features[g];a==null||a.createTable==null||a.createTable(s)}return s}function Ms(){return e=>y(()=>[e.options.data],t=>{const n={rows:[],flatRows:[],rowsById:{}},i=function(s,r,o){r===void 0&&(r=0);const l=[];for(let d=0;d<s.length;d++){const f=kt(e,e._getRowId(s[d],d,o),s[d],d,r,void 0,o==null?void 0:o.id);if(n.flatRows.push(f),n.rowsById[f.id]=f,l.push(f),e.options.getSubRows){var c;f.originalSubRows=e.options.getSubRows(s[d],d),(c=f.originalSubRows)!=null&&c.length&&(f.subRows=i(f.originalSubRows,r+1,f))}}return l};return n.rows=i(t),n},F(e.options,"debugTable","getRowModel",()=>e._autoResetPageIndex()))}function gs(e){const t=[],n=i=>{var s;t.push(i),(s=i.subRows)!=null&&s.length&&i.getIsExpanded()&&i.subRows.forEach(n)};return e.rows.forEach(n),{rows:t,flatRows:e.flatRows,rowsById:e.rowsById}}function fs(e,t,n){return n.options.filterFromLeafRows?hs(e,t,n):ps(e,t,n)}function hs(e,t,n){var i;const s=[],r={},o=(i=n.options.maxLeafRowFilterDepth)!=null?i:100,l=function(c,d){d===void 0&&(d=0);const f=[];for(let g=0;g<c.length;g++){var h;let a=c[g];const p=kt(n,a.id,a.original,a.index,a.depth,void 0,a.parentId);if(p.columnFilters=a.columnFilters,(h=a.subRows)!=null&&h.length&&d<o){if(p.subRows=l(a.subRows,d+1),a=p,t(a)&&!p.subRows.length){f.push(a),r[a.id]=a,s.push(a);continue}if(t(a)||p.subRows.length){f.push(a),r[a.id]=a,s.push(a);continue}}else a=p,t(a)&&(f.push(a),r[a.id]=a,s.push(a))}return f};return{rows:l(e),flatRows:s,rowsById:r}}function ps(e,t,n){var i;const s=[],r={},o=(i=n.options.maxLeafRowFilterDepth)!=null?i:100,l=function(c,d){d===void 0&&(d=0);const f=[];for(let g=0;g<c.length;g++){let a=c[g];if(t(a)){var h;if((h=a.subRows)!=null&&h.length&&d<o){const m=kt(n,a.id,a.original,a.index,a.depth,void 0,a.parentId);m.subRows=l(a.subRows,d+1),a=m}f.push(a),s.push(a),r[a.id]=a}}return f};return{rows:l(e),flatRows:s,rowsById:r}}function Is(){return e=>y(()=>[e.getPreFilteredRowModel(),e.getState().columnFilters,e.getState().globalFilter],(t,n,i)=>{if(!t.rows.length||!(n!=null&&n.length)&&!i){for(let g=0;g<t.flatRows.length;g++)t.flatRows[g].columnFilters={},t.flatRows[g].columnFiltersMeta={};return t}const s=[],r=[];
13(n??[]).forEach(g=>{var a;const p=e.getColumn(g.id);if(!p)return;const m=p.getFilterFn();m&&s.push({id:g.id,filterFn:m,resolvedValue:(a=m.resolveFilterValue==null?void 0:m.resolveFilterValue(g.value))!=null?a:g.value})});const o=(n??[]).map(g=>g.id),l=e.getGlobalFilterFn(),c=e.getAllLeafColumns().filter(g=>g.getCanGlobalFilter());i&&l&&c.length&&(o.push("__global__"),c.forEach(g=>{var a;r.push({id:g.id,filterFn:l,resolvedValue:(a=l.resolveFilterValue==null?void 0:l.resolveFilterValue(i))!=null?a:i})}));let d,f;for(let g=0;g<t.flatRows.length;g++){const a=t.flatRows[g];if(a.columnFilters={},s.length)for(let p=0;p<s.length;p++){d=s[p];const m=d.id;a.columnFilters[m]=d.filterFn(a,m,d.resolvedValue,S=>{a.columnFiltersMeta[m]=S})}if(r.length){for(let p=0;p<r.length;p++){f=r[p];const m=f.id;if(f.filterFn(a,m,f.resolvedValue,S=>{a.columnFiltersMeta[m]=S})){a.columnFilters.__global__=!0;break}}a.columnFilters.__global__!==!0&&(a.columnFilters.__global__=!1)}}const h=g=>{for(let a=0;a<o.length;a++)if(g.columnFilters[o[a]]===!1)return!1;return!0};return fs(t.rows,h,e)},F(e.options,"debugTable","getFilteredRowModel",()=>e._autoResetPageIndex()))}function xs(e){return t=>y(()=>[t.getState().pagination,t.getPrePaginationRowModel(),t.options.paginateExpandedRows?void 0:t.getState().expanded],(n,i)=>{if(!i.rows.length)return i;const{pageSize:s,pageIndex:r}=n;let{rows:o,flatRows:l,rowsById:c}=i;const d=s*r,f=d+s;o=o.slice(d,f);let h;t.options.paginateExpandedRows?h={rows:o,flatRows:l,rowsById:c}:h=gs({rows:o,flatRows:l,rowsById:c}),h.flatRows=[];const g=a=>{h.flatRows.push(a),a.subRows.length&&a.subRows.forEach(g)};return h.rows.forEach(g),h},F(t.options,"debugTable"))}function $s(){return e=>y(()=>[e.getState().sorting,e.getPreSortedRowModel()],(t,n)=>{if(!n.rows.length||!(t!=null&&t.length))return n;const i=e.getState().sorting,s=[],r=i.filter(c=>{var d;return(d=e.getColumn(c.id))==null?void 0:d.getCanSort()}),o={};r.forEach(c=>{const d=e.getColumn(c.id);d&&(o[c.id]={sortUndefined:d.columnDef.sortUndefined,invertSorting:d.columnDef.invertSorting,sortingFn:d.getSortingFn()})});const l=c=>{const d=c.map(f=>({...f}));return d.sort((f,h)=>{for(let a=0;a<r.length;a+=1){var g;const p=r[a],m=o[p.id],S=m.sortUndefined,C=(g=p==null?void 0:p.desc)!=null?g:!1;let P=0;if(S){const _=f.getValue(p.id),w=h.getValue(p.id),x=_===void 0,O=w===void 0;if(x||O){if(S==="first")return x?-1:1;if(S==="last")return x?1:-1;P=x&&O?0:x?S:-S}}if(P===0&&(P=m.sortingFn(f,h,p.id)),P!==0)return C&&(P*=-1),m.invertSorting&&(P*=-1),P}return f.index-h.index}),d.forEach(f=>{var h;s.push(f),(h=f.subRows)!=null&&h.length&&(f.subRows=l(f.subRows))}),d};return{rows:l(n.rows),flatRows:s,rowsById:n.rowsById}},F(e.options,"debugTable","getSortedRowModel",()=>e._autoResetPageIndex()))}/** 14 * react-table 15 * 16 * Copyright (c) TanStack 17 * 18 * This source code is licensed under the MIT license found in the 19 * LICENSE.md file in the root directory of this source tree. 20 * 21 * @license MIT 22 */function Es(e,t){return e?ms(e)?A.createElement(e,t):e:null}function ms(e){return vs(e)||typeof e=="function"||Ss(e)}function vs(e){return typeof e=="function"&&(()=>{const t=Object.getPrototypeOf(e);return t.prototype&&t.prototype.isReactComponent})()}function Ss(e){return typeof e=="object"&&typeof e.$$typeof=="symbol"&&["react.memo","react.forward_ref"].includes(e.$$typeof.description)}function Vs(e){const t={state:{},onStateChange:()=>{},renderFallbackValue:null,...e},[n]=A.useState(()=>({current:ds(t)})),[i,s]=A.useState(()=>n.current.initialState);return n.current.setOptions(r=>({...r,...e,state:{...i,...e.state},onStateChange:o=>{s(o),e.onStateChange==null||e.onStateChange(o)}})),n.current}export{Rs as Q,Fs as a,ys as b,_s as c,Vs as d,Ps as e,Es as f,$s as g,xs as h,Is as i,Ms as j,An 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.