(function(){try{var g=typeof window!=="undefined"?window:typeof global!=="undefined"?global:typeof self!=="undefined"?self:{};g["__faroBundleId_hub-ui"]="1776093229687-6cfd5f17e7"}catch(l){}})();import"./gjupmyyj.js";import{r as s}from"./c2heove9.js";import{s as Xe}from"./b1b27nrl.js";import{S as Je}from"./limpb33f.js";class G{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){const t={listener:e};return this.listeners.add(t),this.onSubscribe(),()=>{this.listeners.delete(t),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}}const re=typeof window>"u"||"Deno"in window;function F(){}function Mt(r,e){return typeof r=="function"?r(e):r}function Ce(r){return typeof r=="number"&&r>=0&&r!==1/0}function Fe(r,e){return r.filter(t=>!e.includes(t))}function At(r,e,t){const n=r.slice(0);return n[e]=t,n}function $e(r,e){return Math.max(r+(e||0)-Date.now(),0)}function te(r,e,t){return se(r)?typeof e=="function"?{...t,queryKey:r,queryFn:e}:{...e,queryKey:r}:r}function kt(r,e,t){return se(r)?typeof e=="function"?{...t,mutationKey:r,mutationFn:e}:{...e,mutationKey:r}:typeof r=="function"?{...e,mutationFn:r}:{...r}}function _(r,e,t){return se(r)?[{...e,queryKey:r},t]:[r||{},e]}function Te(r,e){const{type:t="all",exact:n,fetchStatus:o,predicate:i,queryKey:a,stale:u}=r;if(se(a)){if(n){if(e.queryHash!==Ae(a,e.options))return!1}else if(!he(e.queryKey,a))return!1}if(t!=="all"){const c=e.isActive();if(t==="active"&&!c||t==="inactive"&&c)return!1}return!(typeof u=="boolean"&&e.isStale()!==u||typeof o<"u"&&o!==e.state.fetchStatus||i&&!i(e))}function qe(r,e){const{exact:t,fetching:n,predicate:o,mutationKey:i}=r;if(se(i)){if(!e.options.mutationKey)return!1;if(t){if(V(e.options.mutationKey)!==V(i))return!1}else if(!he(e.options.mutationKey,i))return!1}return!(typeof n=="boolean"&&e.state.status==="loading"!==n||o&&!o(e))}function Ae(r,e){return(e?.queryKeyHashFn||V)(r)}function V(r){return JSON.stringify(r,(e,t)=>Ee(t)?Object.keys(t).sort().reduce((n,o)=>(n[o]=t[o],n),{}):t)}function he(r,e){return et(r,e)}function et(r,e){return r===e?!0:typeof r!=typeof e?!1:r&&e&&typeof r=="object"&&typeof e=="object"?!Object.keys(e).some(t=>!et(r[t],e[t])):!1}function tt(r,e){if(r===e)return r;const t=Ue(r)&&Ue(e);if(t||Ee(r)&&Ee(e)){const n=t?r.length:Object.keys(r).length,o=t?e:Object.keys(e),i=o.length,a=t?[]:{};let u=0;for(let c=0;c"u")return!0;const t=e.prototype;return!(!He(t)||!t.hasOwnProperty("isPrototypeOf"))}function He(r){return Object.prototype.toString.call(r)==="[object Object]"}function se(r){return Array.isArray(r)}function rt(r){return new Promise(e=>{setTimeout(e,r)})}function Be(r){rt(0).then(r)}function It(){if(typeof AbortController=="function")return new AbortController}function Oe(r,e,t){return t.isDataEqual!=null&&t.isDataEqual(r,e)?r:typeof t.structuralSharing=="function"?t.structuralSharing(r,e):t.structuralSharing!==!1?tt(r,e):e}class Lt extends G{constructor(){super(),this.setup=e=>{if(!re&&window.addEventListener){const t=()=>e();return window.addEventListener("visibilitychange",t,!1),window.addEventListener("focus",t,!1),()=>{window.removeEventListener("visibilitychange",t),window.removeEventListener("focus",t)}}}}onSubscribe(){this.cleanup||this.setEventListener(this.setup)}onUnsubscribe(){if(!this.hasListeners()){var e;(e=this.cleanup)==null||e.call(this),this.cleanup=void 0}}setEventListener(e){var t;this.setup=e,(t=this.cleanup)==null||t.call(this),this.cleanup=e(n=>{typeof n=="boolean"?this.setFocused(n):this.onFocus()})}setFocused(e){this.focused!==e&&(this.focused=e,this.onFocus())}onFocus(){this.listeners.forEach(({listener:e})=>{e()})}isFocused(){return typeof this.focused=="boolean"?this.focused:typeof document>"u"?!0:[void 0,"visible","prerender"].includes(document.visibilityState)}}const fe=new Lt,je=["online","offline"];class Dt extends G{constructor(){super(),this.setup=e=>{if(!re&&window.addEventListener){const t=()=>e();return je.forEach(n=>{window.addEventListener(n,t,!1)}),()=>{je.forEach(n=>{window.removeEventListener(n,t)})}}}}onSubscribe(){this.cleanup||this.setEventListener(this.setup)}onUnsubscribe(){if(!this.hasListeners()){var e;(e=this.cleanup)==null||e.call(this),this.cleanup=void 0}}setEventListener(e){var t;this.setup=e,(t=this.cleanup)==null||t.call(this),this.cleanup=e(n=>{typeof n=="boolean"?this.setOnline(n):this.onOnline()})}setOnline(e){this.online!==e&&(this.online=e,this.onOnline())}onOnline(){this.listeners.forEach(({listener:e})=>{e()})}isOnline(){return typeof this.online=="boolean"?this.online:typeof navigator>"u"||typeof navigator.onLine>"u"?!0:navigator.onLine}}const J=new Dt;function Ft(r){return Math.min(1e3*2**r,3e4)}function ye(r){return(r??"online")==="online"?J.isOnline():!0}class nt{constructor(e){this.revert=e?.revert,this.silent=e?.silent}}function ce(r){return r instanceof nt}function st(r){let e=!1,t=0,n=!1,o,i,a;const u=new Promise((v,b)=>{i=v,a=b}),c=v=>{n||(l(new nt(v)),r.abort==null||r.abort())},h=()=>{e=!0},d=()=>{e=!1},p=()=>!fe.isFocused()||r.networkMode!=="always"&&!J.isOnline(),y=v=>{n||(n=!0,r.onSuccess==null||r.onSuccess(v),o?.(),i(v))},l=v=>{n||(n=!0,r.onError==null||r.onError(v),o?.(),a(v))},f=()=>new Promise(v=>{o=b=>{const R=n||!p();return R&&v(b),R},r.onPause==null||r.onPause()}).then(()=>{o=void 0,n||r.onContinue==null||r.onContinue()}),m=()=>{if(n)return;let v;try{v=r.fn()}catch(b){v=Promise.reject(b)}Promise.resolve(v).then(y).catch(b=>{var R,x;if(n)return;const E=(R=r.retry)!=null?R:3,A=(x=r.retryDelay)!=null?x:Ft,O=typeof A=="function"?A(t,b):A,C=E===!0||typeof E=="number"&&t{if(p())return f()}).then(()=>{e?l(b):m()})})};return ye(r.networkMode)?m():f().then(m),{promise:u,cancel:c,continue:()=>o?.()?u:Promise.resolve(),cancelRetry:h,continueRetry:d}}const ke=console;function Tt(){let r=[],e=0,t=d=>{d()},n=d=>{d()};const o=d=>{let p;e++;try{p=d()}finally{e--,e||u()}return p},i=d=>{e?r.push(d):Be(()=>{t(d)})},a=d=>(...p)=>{i(()=>{d(...p)})},u=()=>{const d=r;r=[],d.length&&Be(()=>{n(()=>{d.forEach(p=>{t(p)})})})};return{batch:o,batchCalls:a,schedule:i,setNotifyFunction:d=>{t=d},setBatchNotifyFunction:d=>{n=d}}}const w=Tt();class it{destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),Ce(this.cacheTime)&&(this.gcTimeout=setTimeout(()=>{this.optionalRemove()},this.cacheTime))}updateCacheTime(e){this.cacheTime=Math.max(this.cacheTime||0,e??(re?1/0:5*60*1e3))}clearGcTimeout(){this.gcTimeout&&(clearTimeout(this.gcTimeout),this.gcTimeout=void 0)}}class qt extends it{constructor(e){super(),this.abortSignalConsumed=!1,this.defaultOptions=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.cache=e.cache,this.logger=e.logger||ke,this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.initialState=e.state||Ut(this.options),this.state=this.initialState,this.scheduleGc()}get meta(){return this.options.meta}setOptions(e){this.options={...this.defaultOptions,...e},this.updateCacheTime(this.options.cacheTime)}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&this.cache.remove(this)}setData(e,t){const n=Oe(this.state.data,e,this.options);return this.dispatch({data:n,type:"success",dataUpdatedAt:t?.updatedAt,manual:t?.manual}),n}setState(e,t){this.dispatch({type:"setState",state:e,setStateOptions:t})}cancel(e){var t;const n=this.promise;return(t=this.retryer)==null||t.cancel(e),n?n.then(F).catch(F):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(this.initialState)}isActive(){return this.observers.some(e=>e.options.enabled!==!1)}isDisabled(){return this.getObserversCount()>0&&!this.isActive()}isStale(){return this.state.isInvalidated||!this.state.dataUpdatedAt||this.observers.some(e=>e.getCurrentResult().isStale)}isStaleByTime(e=0){return this.state.isInvalidated||!this.state.dataUpdatedAt||!$e(this.state.dataUpdatedAt,e)}onFocus(){var e;const t=this.observers.find(n=>n.shouldFetchOnWindowFocus());t&&t.refetch({cancelRefetch:!1}),(e=this.retryer)==null||e.continue()}onOnline(){var e;const t=this.observers.find(n=>n.shouldFetchOnReconnect());t&&t.refetch({cancelRefetch:!1}),(e=this.retryer)==null||e.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),this.cache.notify({type:"observerAdded",query:this,observer:e}))}removeObserver(e){this.observers.includes(e)&&(this.observers=this.observers.filter(t=>t!==e),this.observers.length||(this.retryer&&(this.abortSignalConsumed?this.retryer.cancel({revert:!0}):this.retryer.cancelRetry()),this.scheduleGc()),this.cache.notify({type:"observerRemoved",query:this,observer:e}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||this.dispatch({type:"invalidate"})}fetch(e,t){var n,o;if(this.state.fetchStatus!=="idle"){if(this.state.dataUpdatedAt&&t!=null&&t.cancelRefetch)this.cancel({silent:!0});else if(this.promise){var i;return(i=this.retryer)==null||i.continueRetry(),this.promise}}if(e&&this.setOptions(e),!this.options.queryFn){const l=this.observers.find(f=>f.options.queryFn);l&&this.setOptions(l.options)}const a=It(),u={queryKey:this.queryKey,pageParam:void 0,meta:this.meta},c=l=>{Object.defineProperty(l,"signal",{enumerable:!0,get:()=>{if(a)return this.abortSignalConsumed=!0,a.signal}})};c(u);const h=()=>this.options.queryFn?(this.abortSignalConsumed=!1,this.options.queryFn(u)):Promise.reject("Missing queryFn for queryKey '"+this.options.queryHash+"'"),d={fetchOptions:t,options:this.options,queryKey:this.queryKey,state:this.state,fetchFn:h};if(c(d),(n=this.options.behavior)==null||n.onFetch(d),this.revertState=this.state,this.state.fetchStatus==="idle"||this.state.fetchMeta!==((o=d.fetchOptions)==null?void 0:o.meta)){var p;this.dispatch({type:"fetch",meta:(p=d.fetchOptions)==null?void 0:p.meta})}const y=l=>{if(ce(l)&&l.silent||this.dispatch({type:"error",error:l}),!ce(l)){var f,m,v,b;(f=(m=this.cache.config).onError)==null||f.call(m,l,this),(v=(b=this.cache.config).onSettled)==null||v.call(b,this.state.data,l,this)}this.isFetchingOptimistic||this.scheduleGc(),this.isFetchingOptimistic=!1};return this.retryer=st({fn:d.fetchFn,abort:a?.abort.bind(a),onSuccess:l=>{var f,m,v,b;if(typeof l>"u"){y(new Error(this.queryHash+" data is undefined"));return}this.setData(l),(f=(m=this.cache.config).onSuccess)==null||f.call(m,l,this),(v=(b=this.cache.config).onSettled)==null||v.call(b,l,this.state.error,this),this.isFetchingOptimistic||this.scheduleGc(),this.isFetchingOptimistic=!1},onError:y,onFail:(l,f)=>{this.dispatch({type:"failed",failureCount:l,error:f})},onPause:()=>{this.dispatch({type:"pause"})},onContinue:()=>{this.dispatch({type:"continue"})},retry:d.options.retry,retryDelay:d.options.retryDelay,networkMode:d.options.networkMode}),this.promise=this.retryer.promise,this.promise}dispatch(e){const t=n=>{var o,i;switch(e.type){case"failed":return{...n,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case"pause":return{...n,fetchStatus:"paused"};case"continue":return{...n,fetchStatus:"fetching"};case"fetch":return{...n,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:(o=e.meta)!=null?o:null,fetchStatus:ye(this.options.networkMode)?"fetching":"paused",...!n.dataUpdatedAt&&{error:null,status:"loading"}};case"success":return{...n,data:e.data,dataUpdateCount:n.dataUpdateCount+1,dataUpdatedAt:(i=e.dataUpdatedAt)!=null?i:Date.now(),error:null,isInvalidated:!1,status:"success",...!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};case"error":const a=e.error;return ce(a)&&a.revert&&this.revertState?{...this.revertState,fetchStatus:"idle"}:{...n,error:a,errorUpdateCount:n.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:n.fetchFailureCount+1,fetchFailureReason:a,fetchStatus:"idle",status:"error"};case"invalidate":return{...n,isInvalidated:!0};case"setState":return{...n,...e.state}}};this.state=t(this.state),w.batch(()=>{this.observers.forEach(n=>{n.onQueryUpdate(e)}),this.cache.notify({query:this,type:"updated",action:e})})}}function Ut(r){const e=typeof r.initialData=="function"?r.initialData():r.initialData,t=typeof e<"u",n=t?typeof r.initialDataUpdatedAt=="function"?r.initialDataUpdatedAt():r.initialDataUpdatedAt:0;return{data:e,dataUpdateCount:0,dataUpdatedAt:t?n??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:t?"success":"loading",fetchStatus:"idle"}}class Ht extends G{constructor(e){super(),this.config=e||{},this.queries=[],this.queriesMap={}}build(e,t,n){var o;const i=t.queryKey,a=(o=t.queryHash)!=null?o:Ae(i,t);let u=this.get(a);return u||(u=new qt({cache:this,logger:e.getLogger(),queryKey:i,queryHash:a,options:e.defaultQueryOptions(t),state:n,defaultOptions:e.getQueryDefaults(i)}),this.add(u)),u}add(e){this.queriesMap[e.queryHash]||(this.queriesMap[e.queryHash]=e,this.queries.push(e),this.notify({type:"added",query:e}))}remove(e){const t=this.queriesMap[e.queryHash];t&&(e.destroy(),this.queries=this.queries.filter(n=>n!==e),t===e&&delete this.queriesMap[e.queryHash],this.notify({type:"removed",query:e}))}clear(){w.batch(()=>{this.queries.forEach(e=>{this.remove(e)})})}get(e){return this.queriesMap[e]}getAll(){return this.queries}find(e,t){const[n]=_(e,t);return typeof n.exact>"u"&&(n.exact=!0),this.queries.find(o=>Te(n,o))}findAll(e,t){const[n]=_(e,t);return Object.keys(n).length>0?this.queries.filter(o=>Te(n,o)):this.queries}notify(e){w.batch(()=>{this.listeners.forEach(({listener:t})=>{t(e)})})}onFocus(){w.batch(()=>{this.queries.forEach(e=>{e.onFocus()})})}onOnline(){w.batch(()=>{this.queries.forEach(e=>{e.onOnline()})})}}class Bt extends it{constructor(e){super(),this.defaultOptions=e.defaultOptions,this.mutationId=e.mutationId,this.mutationCache=e.mutationCache,this.logger=e.logger||ke,this.observers=[],this.state=e.state||at(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options={...this.defaultOptions,...e},this.updateCacheTime(this.options.cacheTime)}get meta(){return this.options.meta}setState(e){this.dispatch({type:"setState",state:e})}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),this.mutationCache.notify({type:"observerAdded",mutation:this,observer:e}))}removeObserver(e){this.observers=this.observers.filter(t=>t!==e),this.scheduleGc(),this.mutationCache.notify({type:"observerRemoved",mutation:this,observer:e})}optionalRemove(){this.observers.length||(this.state.status==="loading"?this.scheduleGc():this.mutationCache.remove(this))}continue(){var e,t;return(e=(t=this.retryer)==null?void 0:t.continue())!=null?e:this.execute()}async execute(){const e=()=>{var C;return this.retryer=st({fn:()=>this.options.mutationFn?this.options.mutationFn(this.state.variables):Promise.reject("No mutationFn found"),onFail:(g,M)=>{this.dispatch({type:"failed",failureCount:g,error:M})},onPause:()=>{this.dispatch({type:"pause"})},onContinue:()=>{this.dispatch({type:"continue"})},retry:(C=this.options.retry)!=null?C:0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode}),this.retryer.promise},t=this.state.status==="loading";try{var n,o,i,a,u,c,h,d;if(!t){var p,y,l,f;this.dispatch({type:"loading",variables:this.options.variables}),await((p=(y=this.mutationCache.config).onMutate)==null?void 0:p.call(y,this.state.variables,this));const g=await((l=(f=this.options).onMutate)==null?void 0:l.call(f,this.state.variables));g!==this.state.context&&this.dispatch({type:"loading",context:g,variables:this.state.variables})}const C=await e();return await((n=(o=this.mutationCache.config).onSuccess)==null?void 0:n.call(o,C,this.state.variables,this.state.context,this)),await((i=(a=this.options).onSuccess)==null?void 0:i.call(a,C,this.state.variables,this.state.context)),await((u=(c=this.mutationCache.config).onSettled)==null?void 0:u.call(c,C,null,this.state.variables,this.state.context,this)),await((h=(d=this.options).onSettled)==null?void 0:h.call(d,C,null,this.state.variables,this.state.context)),this.dispatch({type:"success",data:C}),C}catch(C){try{var m,v,b,R,x,E,A,O;throw await((m=(v=this.mutationCache.config).onError)==null?void 0:m.call(v,C,this.state.variables,this.state.context,this)),await((b=(R=this.options).onError)==null?void 0:b.call(R,C,this.state.variables,this.state.context)),await((x=(E=this.mutationCache.config).onSettled)==null?void 0:x.call(E,void 0,C,this.state.variables,this.state.context,this)),await((A=(O=this.options).onSettled)==null?void 0:A.call(O,void 0,C,this.state.variables,this.state.context)),C}finally{this.dispatch({type:"error",error:C})}}}dispatch(e){const t=n=>{switch(e.type){case"failed":return{...n,failureCount:e.failureCount,failureReason:e.error};case"pause":return{...n,isPaused:!0};case"continue":return{...n,isPaused:!1};case"loading":return{...n,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:!ye(this.options.networkMode),status:"loading",variables:e.variables};case"success":return{...n,data:e.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...n,data:void 0,error:e.error,failureCount:n.failureCount+1,failureReason:e.error,isPaused:!1,status:"error"};case"setState":return{...n,...e.state}}};this.state=t(this.state),w.batch(()=>{this.observers.forEach(n=>{n.onMutationUpdate(e)}),this.mutationCache.notify({mutation:this,type:"updated",action:e})})}}function at(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0}}class jt extends G{constructor(e){super(),this.config=e||{},this.mutations=[],this.mutationId=0}build(e,t,n){const o=new Bt({mutationCache:this,logger:e.getLogger(),mutationId:++this.mutationId,options:e.defaultMutationOptions(t),state:n,defaultOptions:t.mutationKey?e.getMutationDefaults(t.mutationKey):void 0});return this.add(o),o}add(e){this.mutations.push(e),this.notify({type:"added",mutation:e})}remove(e){this.mutations=this.mutations.filter(t=>t!==e),this.notify({type:"removed",mutation:e})}clear(){w.batch(()=>{this.mutations.forEach(e=>{this.remove(e)})})}getAll(){return this.mutations}find(e){return typeof e.exact>"u"&&(e.exact=!0),this.mutations.find(t=>qe(e,t))}findAll(e){return this.mutations.filter(t=>qe(e,t))}notify(e){w.batch(()=>{this.listeners.forEach(({listener:t})=>{t(e)})})}resumePausedMutations(){var e;return this.resuming=((e=this.resuming)!=null?e:Promise.resolve()).then(()=>{const t=this.mutations.filter(n=>n.state.isPaused);return w.batch(()=>t.reduce((n,o)=>n.then(()=>o.continue().catch(F)),Promise.resolve()))}).then(()=>{this.resuming=void 0}),this.resuming}}function Nt(){return{onFetch:r=>{r.fetchFn=()=>{var e,t,n,o,i,a;const u=(e=r.fetchOptions)==null||(t=e.meta)==null?void 0:t.refetchPage,c=(n=r.fetchOptions)==null||(o=n.meta)==null?void 0:o.fetchMore,h=c?.pageParam,d=c?.direction==="forward",p=c?.direction==="backward",y=((i=r.state.data)==null?void 0:i.pages)||[],l=((a=r.state.data)==null?void 0:a.pageParams)||[];let f=l,m=!1;const v=O=>{Object.defineProperty(O,"signal",{enumerable:!0,get:()=>{var C;if((C=r.signal)!=null&&C.aborted)m=!0;else{var g;(g=r.signal)==null||g.addEventListener("abort",()=>{m=!0})}return r.signal}})},b=r.options.queryFn||(()=>Promise.reject("Missing queryFn for queryKey '"+r.options.queryHash+"'")),R=(O,C,g,M)=>(f=M?[C,...f]:[...f,C],M?[g,...O]:[...O,g]),x=(O,C,g,M)=>{if(m)return Promise.reject("Cancelled");if(typeof g>"u"&&!C&&O.length)return Promise.resolve(O);const T={queryKey:r.queryKey,pageParam:g,meta:r.options.meta};v(T);const K=b(T);return Promise.resolve(K).then(q=>R(O,g,q,M))};let E;if(!y.length)E=x([]);else if(d){const O=typeof h<"u",C=O?h:Ne(r.options,y);E=x(y,O,C)}else if(p){const O=typeof h<"u",C=O?h:_t(r.options,y);E=x(y,O,C,!0)}else{f=[];const O=typeof r.options.getNextPageParam>"u";E=(u&&y[0]?u(y[0],0,y):!0)?x([],O,l[0]):Promise.resolve(R([],l[0],y[0]));for(let g=1;g{if(u&&y[g]?u(y[g],g,y):!0){const K=O?l[g]:Ne(r.options,M);return x(M,O,K)}return Promise.resolve(R(M,l[g],y[g]))})}return E.then(O=>({pages:O,pageParams:f}))}}}}function Ne(r,e){return r.getNextPageParam==null?void 0:r.getNextPageParam(e[e.length-1],e)}function _t(r,e){return r.getPreviousPageParam==null?void 0:r.getPreviousPageParam(e[0],e)}class Nr{constructor(e={}){this.queryCache=e.queryCache||new Ht,this.mutationCache=e.mutationCache||new jt,this.logger=e.logger||ke,this.defaultOptions=e.defaultOptions||{},this.queryDefaults=[],this.mutationDefaults=[],this.mountCount=0}mount(){this.mountCount++,this.mountCount===1&&(this.unsubscribeFocus=fe.subscribe(()=>{fe.isFocused()&&(this.resumePausedMutations(),this.queryCache.onFocus())}),this.unsubscribeOnline=J.subscribe(()=>{J.isOnline()&&(this.resumePausedMutations(),this.queryCache.onOnline())}))}unmount(){var e,t;this.mountCount--,this.mountCount===0&&((e=this.unsubscribeFocus)==null||e.call(this),this.unsubscribeFocus=void 0,(t=this.unsubscribeOnline)==null||t.call(this),this.unsubscribeOnline=void 0)}isFetching(e,t){const[n]=_(e,t);return n.fetchStatus="fetching",this.queryCache.findAll(n).length}isMutating(e){return this.mutationCache.findAll({...e,fetching:!0}).length}getQueryData(e,t){var n;return(n=this.queryCache.find(e,t))==null?void 0:n.state.data}ensureQueryData(e,t,n){const o=te(e,t,n),i=this.getQueryData(o.queryKey);return i?Promise.resolve(i):this.fetchQuery(o)}getQueriesData(e){return this.getQueryCache().findAll(e).map(({queryKey:t,state:n})=>{const o=n.data;return[t,o]})}setQueryData(e,t,n){const o=this.queryCache.find(e),i=o?.state.data,a=Mt(t,i);if(typeof a>"u")return;const u=te(e),c=this.defaultQueryOptions(u);return this.queryCache.build(this,c).setData(a,{...n,manual:!0})}setQueriesData(e,t,n){return w.batch(()=>this.getQueryCache().findAll(e).map(({queryKey:o})=>[o,this.setQueryData(o,t,n)]))}getQueryState(e,t){var n;return(n=this.queryCache.find(e,t))==null?void 0:n.state}removeQueries(e,t){const[n]=_(e,t),o=this.queryCache;w.batch(()=>{o.findAll(n).forEach(i=>{o.remove(i)})})}resetQueries(e,t,n){const[o,i]=_(e,t,n),a=this.queryCache,u={type:"active",...o};return w.batch(()=>(a.findAll(o).forEach(c=>{c.reset()}),this.refetchQueries(u,i)))}cancelQueries(e,t,n){const[o,i={}]=_(e,t,n);typeof i.revert>"u"&&(i.revert=!0);const a=w.batch(()=>this.queryCache.findAll(o).map(u=>u.cancel(i)));return Promise.all(a).then(F).catch(F)}invalidateQueries(e,t,n){const[o,i]=_(e,t,n);return w.batch(()=>{var a,u;if(this.queryCache.findAll(o).forEach(h=>{h.invalidate()}),o.refetchType==="none")return Promise.resolve();const c={...o,type:(a=(u=o.refetchType)!=null?u:o.type)!=null?a:"active"};return this.refetchQueries(c,i)})}refetchQueries(e,t,n){const[o,i]=_(e,t,n),a=w.batch(()=>this.queryCache.findAll(o).filter(c=>!c.isDisabled()).map(c=>{var h;return c.fetch(void 0,{...i,cancelRefetch:(h=i?.cancelRefetch)!=null?h:!0,meta:{refetchPage:o.refetchPage}})}));let u=Promise.all(a).then(F);return i!=null&&i.throwOnError||(u=u.catch(F)),u}fetchQuery(e,t,n){const o=te(e,t,n),i=this.defaultQueryOptions(o);typeof i.retry>"u"&&(i.retry=!1);const a=this.queryCache.build(this,i);return a.isStaleByTime(i.staleTime)?a.fetch(i):Promise.resolve(a.state.data)}prefetchQuery(e,t,n){return this.fetchQuery(e,t,n).then(F).catch(F)}fetchInfiniteQuery(e,t,n){const o=te(e,t,n);return o.behavior=Nt(),this.fetchQuery(o)}prefetchInfiniteQuery(e,t,n){return this.fetchInfiniteQuery(e,t,n).then(F).catch(F)}resumePausedMutations(){return this.mutationCache.resumePausedMutations()}getQueryCache(){return this.queryCache}getMutationCache(){return this.mutationCache}getLogger(){return this.logger}getDefaultOptions(){return this.defaultOptions}setDefaultOptions(e){this.defaultOptions=e}setQueryDefaults(e,t){const n=this.queryDefaults.find(o=>V(e)===V(o.queryKey));n?n.defaultOptions=t:this.queryDefaults.push({queryKey:e,defaultOptions:t})}getQueryDefaults(e){if(!e)return;const t=this.queryDefaults.find(n=>he(e,n.queryKey));return t?.defaultOptions}setMutationDefaults(e,t){const n=this.mutationDefaults.find(o=>V(e)===V(o.mutationKey));n?n.defaultOptions=t:this.mutationDefaults.push({mutationKey:e,defaultOptions:t})}getMutationDefaults(e){if(!e)return;const t=this.mutationDefaults.find(n=>he(e,n.mutationKey));return t?.defaultOptions}defaultQueryOptions(e){if(e!=null&&e._defaulted)return e;const t={...this.defaultOptions.queries,...this.getQueryDefaults(e?.queryKey),...e,_defaulted:!0};return!t.queryHash&&t.queryKey&&(t.queryHash=Ae(t.queryKey,t)),typeof t.refetchOnReconnect>"u"&&(t.refetchOnReconnect=t.networkMode!=="always"),typeof t.useErrorBoundary>"u"&&(t.useErrorBoundary=!!t.suspense),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...this.defaultOptions.mutations,...this.getMutationDefaults(e?.mutationKey),...e,_defaulted:!0}}clear(){this.queryCache.clear(),this.mutationCache.clear()}}class ot extends G{constructor(e,t){super(),this.client=e,this.options=t,this.trackedProps=new Set,this.selectError=null,this.bindMethods(),this.setOptions(t)}bindMethods(){this.remove=this.remove.bind(this),this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.currentQuery.addObserver(this),_e(this.currentQuery,this.options)&&this.executeFetch(),this.updateTimers())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Se(this.currentQuery,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Se(this.currentQuery,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.clearStaleTimeout(),this.clearRefetchInterval(),this.currentQuery.removeObserver(this)}setOptions(e,t){const n=this.options,o=this.currentQuery;if(this.options=this.client.defaultQueryOptions(e),de(n,this.options)||this.client.getQueryCache().notify({type:"observerOptionsUpdated",query:this.currentQuery,observer:this}),typeof this.options.enabled<"u"&&typeof this.options.enabled!="boolean")throw new Error("Expected enabled to be a boolean");this.options.queryKey||(this.options.queryKey=n.queryKey),this.updateQuery();const i=this.hasListeners();i&&ze(this.currentQuery,o,this.options,n)&&this.executeFetch(),this.updateResult(t),i&&(this.currentQuery!==o||this.options.enabled!==n.enabled||this.options.staleTime!==n.staleTime)&&this.updateStaleTimeout();const a=this.computeRefetchInterval();i&&(this.currentQuery!==o||this.options.enabled!==n.enabled||a!==this.currentRefetchInterval)&&this.updateRefetchInterval(a)}getOptimisticResult(e){const t=this.client.getQueryCache().build(this.client,e),n=this.createResult(t,e);return Kt(this,n,e)&&(this.currentResult=n,this.currentResultOptions=this.options,this.currentResultState=this.currentQuery.state),n}getCurrentResult(){return this.currentResult}trackResult(e){const t={};return Object.keys(e).forEach(n=>{Object.defineProperty(t,n,{configurable:!1,enumerable:!0,get:()=>(this.trackedProps.add(n),e[n])})}),t}getCurrentQuery(){return this.currentQuery}remove(){this.client.getQueryCache().remove(this.currentQuery)}refetch({refetchPage:e,...t}={}){return this.fetch({...t,meta:{refetchPage:e}})}fetchOptimistic(e){const t=this.client.defaultQueryOptions(e),n=this.client.getQueryCache().build(this.client,t);return n.isFetchingOptimistic=!0,n.fetch().then(()=>this.createResult(n,t))}fetch(e){var t;return this.executeFetch({...e,cancelRefetch:(t=e.cancelRefetch)!=null?t:!0}).then(()=>(this.updateResult(),this.currentResult))}executeFetch(e){this.updateQuery();let t=this.currentQuery.fetch(this.options,e);return e!=null&&e.throwOnError||(t=t.catch(F)),t}updateStaleTimeout(){if(this.clearStaleTimeout(),re||this.currentResult.isStale||!Ce(this.options.staleTime))return;const t=$e(this.currentResult.dataUpdatedAt,this.options.staleTime)+1;this.staleTimeoutId=setTimeout(()=>{this.currentResult.isStale||this.updateResult()},t)}computeRefetchInterval(){var e;return typeof this.options.refetchInterval=="function"?this.options.refetchInterval(this.currentResult.data,this.currentQuery):(e=this.options.refetchInterval)!=null?e:!1}updateRefetchInterval(e){this.clearRefetchInterval(),this.currentRefetchInterval=e,!(re||this.options.enabled===!1||!Ce(this.currentRefetchInterval)||this.currentRefetchInterval===0)&&(this.refetchIntervalId=setInterval(()=>{(this.options.refetchIntervalInBackground||fe.isFocused())&&this.executeFetch()},this.currentRefetchInterval))}updateTimers(){this.updateStaleTimeout(),this.updateRefetchInterval(this.computeRefetchInterval())}clearStaleTimeout(){this.staleTimeoutId&&(clearTimeout(this.staleTimeoutId),this.staleTimeoutId=void 0)}clearRefetchInterval(){this.refetchIntervalId&&(clearInterval(this.refetchIntervalId),this.refetchIntervalId=void 0)}createResult(e,t){const n=this.currentQuery,o=this.options,i=this.currentResult,a=this.currentResultState,u=this.currentResultOptions,c=e!==n,h=c?e.state:this.currentQueryInitialState,d=c?this.currentResult:this.previousQueryResult,{state:p}=e;let{dataUpdatedAt:y,error:l,errorUpdatedAt:f,fetchStatus:m,status:v}=p,b=!1,R=!1,x;if(t._optimisticResults){const g=this.hasListeners(),M=!g&&_e(e,t),T=g&&ze(e,n,t,o);(M||T)&&(m=ye(e.options.networkMode)?"fetching":"paused",y||(v="loading")),t._optimisticResults==="isRestoring"&&(m="idle")}if(t.keepPreviousData&&!p.dataUpdatedAt&&d!=null&&d.isSuccess&&v!=="error")x=d.data,y=d.dataUpdatedAt,v=d.status,b=!0;else if(t.select&&typeof p.data<"u")if(i&&p.data===a?.data&&t.select===this.selectFn)x=this.selectResult;else try{this.selectFn=t.select,x=t.select(p.data),x=Oe(i?.data,x,t),this.selectResult=x,this.selectError=null}catch(g){this.selectError=g}else x=p.data;if(typeof t.placeholderData<"u"&&typeof x>"u"&&v==="loading"){let g;if(i!=null&&i.isPlaceholderData&&t.placeholderData===u?.placeholderData)g=i.data;else if(g=typeof t.placeholderData=="function"?t.placeholderData():t.placeholderData,t.select&&typeof g<"u")try{g=t.select(g),this.selectError=null}catch(M){this.selectError=M}typeof g<"u"&&(v="success",x=Oe(i?.data,g,t),R=!0)}this.selectError&&(l=this.selectError,x=this.selectResult,f=Date.now(),v="error");const E=m==="fetching",A=v==="loading",O=v==="error";return{status:v,fetchStatus:m,isLoading:A,isSuccess:v==="success",isError:O,isInitialLoading:A&&E,data:x,dataUpdatedAt:y,error:l,errorUpdatedAt:f,failureCount:p.fetchFailureCount,failureReason:p.fetchFailureReason,errorUpdateCount:p.errorUpdateCount,isFetched:p.dataUpdateCount>0||p.errorUpdateCount>0,isFetchedAfterMount:p.dataUpdateCount>h.dataUpdateCount||p.errorUpdateCount>h.errorUpdateCount,isFetching:E,isRefetching:E&&!A,isLoadingError:O&&p.dataUpdatedAt===0,isPaused:m==="paused",isPlaceholderData:R,isPreviousData:b,isRefetchError:O&&p.dataUpdatedAt!==0,isStale:Ie(e,t),refetch:this.refetch,remove:this.remove}}updateResult(e){const t=this.currentResult,n=this.createResult(this.currentQuery,this.options);if(this.currentResultState=this.currentQuery.state,this.currentResultOptions=this.options,de(n,t))return;this.currentResult=n;const o={cache:!0},i=()=>{if(!t)return!0;const{notifyOnChangeProps:a}=this.options,u=typeof a=="function"?a():a;if(u==="all"||!u&&!this.trackedProps.size)return!0;const c=new Set(u??this.trackedProps);return this.options.useErrorBoundary&&c.add("error"),Object.keys(this.currentResult).some(h=>{const d=h;return this.currentResult[d]!==t[d]&&c.has(d)})};e?.listeners!==!1&&i()&&(o.listeners=!0),this.notify({...o,...e})}updateQuery(){const e=this.client.getQueryCache().build(this.client,this.options);if(e===this.currentQuery)return;const t=this.currentQuery;this.currentQuery=e,this.currentQueryInitialState=e.state,this.previousQueryResult=this.currentResult,this.hasListeners()&&(t?.removeObserver(this),e.addObserver(this))}onQueryUpdate(e){const t={};e.type==="success"?t.onSuccess=!e.manual:e.type==="error"&&!ce(e.error)&&(t.onError=!0),this.updateResult(t),this.hasListeners()&&this.updateTimers()}notify(e){w.batch(()=>{if(e.onSuccess){var t,n,o,i;(t=(n=this.options).onSuccess)==null||t.call(n,this.currentResult.data),(o=(i=this.options).onSettled)==null||o.call(i,this.currentResult.data,null)}else if(e.onError){var a,u,c,h;(a=(u=this.options).onError)==null||a.call(u,this.currentResult.error),(c=(h=this.options).onSettled)==null||c.call(h,void 0,this.currentResult.error)}e.listeners&&this.listeners.forEach(({listener:d})=>{d(this.currentResult)}),e.cache&&this.client.getQueryCache().notify({query:this.currentQuery,type:"observerResultsUpdated"})})}}function zt(r,e){return e.enabled!==!1&&!r.state.dataUpdatedAt&&!(r.state.status==="error"&&e.retryOnMount===!1)}function _e(r,e){return zt(r,e)||r.state.dataUpdatedAt>0&&Se(r,e,e.refetchOnMount)}function Se(r,e,t){if(e.enabled!==!1){const n=typeof t=="function"?t(r):t;return n==="always"||n!==!1&&Ie(r,e)}return!1}function ze(r,e,t,n){return t.enabled!==!1&&(r!==e||n.enabled===!1)&&(!t.suspense||r.state.status!=="error")&&Ie(r,t)}function Ie(r,e){return r.isStaleByTime(e.staleTime)}function Kt(r,e,t){return t.keepPreviousData?!1:t.placeholderData!==void 0?e.isPlaceholderData:!de(r.getCurrentResult(),e)}class Wt extends G{constructor(e,t){super(),this.client=e,this.queries=[],this.result=[],this.observers=[],this.observersMap={},t&&this.setQueries(t)}onSubscribe(){this.listeners.size===1&&this.observers.forEach(e=>{e.subscribe(t=>{this.onUpdate(e,t)})})}onUnsubscribe(){this.listeners.size||this.destroy()}destroy(){this.listeners=new Set,this.observers.forEach(e=>{e.destroy()})}setQueries(e,t){this.queries=e,w.batch(()=>{const n=this.observers,o=this.findMatchingObservers(this.queries);o.forEach(h=>h.observer.setOptions(h.defaultedQueryOptions,t));const i=o.map(h=>h.observer),a=Object.fromEntries(i.map(h=>[h.options.queryHash,h])),u=i.map(h=>h.getCurrentResult()),c=i.some((h,d)=>h!==n[d]);n.length===i.length&&!c||(this.observers=i,this.observersMap=a,this.result=u,this.hasListeners()&&(Fe(n,i).forEach(h=>{h.destroy()}),Fe(i,n).forEach(h=>{h.subscribe(d=>{this.onUpdate(h,d)})}),this.notify()))})}getCurrentResult(){return this.result}getQueries(){return this.observers.map(e=>e.getCurrentQuery())}getObservers(){return this.observers}getOptimisticResult(e){return this.findMatchingObservers(e).map(t=>t.observer.getOptimisticResult(t.defaultedQueryOptions))}findMatchingObservers(e){const t=this.observers,n=new Map(t.map(l=>[l.options.queryHash,l])),o=e.map(l=>this.client.defaultQueryOptions(l)),i=o.flatMap(l=>{const f=n.get(l.queryHash);return f!=null?[{defaultedQueryOptions:l,observer:f}]:[]}),a=new Set(i.map(l=>l.defaultedQueryOptions.queryHash)),u=o.filter(l=>!a.has(l.queryHash)),c=new Set(i.map(l=>l.observer)),h=t.filter(l=>!c.has(l)),d=l=>{const f=this.client.defaultQueryOptions(l),m=this.observersMap[f.queryHash];return m??new ot(this.client,f)},p=u.map((l,f)=>{if(l.keepPreviousData){const m=h[f];if(m!==void 0)return{defaultedQueryOptions:l,observer:m}}return{defaultedQueryOptions:l,observer:d(l)}}),y=(l,f)=>o.indexOf(l.defaultedQueryOptions)-o.indexOf(f.defaultedQueryOptions);return i.concat(p).sort(y)}onUpdate(e,t){const n=this.observers.indexOf(e);n!==-1&&(this.result=At(this.result,n,t),this.notify())}notify(){w.batch(()=>{this.listeners.forEach(({listener:e})=>{e(this.result)})})}}class Vt extends G{constructor(e,t){super(),this.client=e,this.setOptions(t),this.bindMethods(),this.updateResult()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(e){var t;const n=this.options;this.options=this.client.defaultMutationOptions(e),de(n,this.options)||this.client.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.currentMutation,observer:this}),(t=this.currentMutation)==null||t.setOptions(this.options)}onUnsubscribe(){if(!this.hasListeners()){var e;(e=this.currentMutation)==null||e.removeObserver(this)}}onMutationUpdate(e){this.updateResult();const t={listeners:!0};e.type==="success"?t.onSuccess=!0:e.type==="error"&&(t.onError=!0),this.notify(t)}getCurrentResult(){return this.currentResult}reset(){this.currentMutation=void 0,this.updateResult(),this.notify({listeners:!0})}mutate(e,t){return this.mutateOptions=t,this.currentMutation&&this.currentMutation.removeObserver(this),this.currentMutation=this.client.getMutationCache().build(this.client,{...this.options,variables:typeof e<"u"?e:this.options.variables}),this.currentMutation.addObserver(this),this.currentMutation.execute()}updateResult(){const e=this.currentMutation?this.currentMutation.state:at(),t={...e,isLoading:e.status==="loading",isSuccess:e.status==="success",isError:e.status==="error",isIdle:e.status==="idle",mutate:this.mutate,reset:this.reset};this.currentResult=t}notify(e){w.batch(()=>{if(this.mutateOptions&&this.hasListeners()){if(e.onSuccess){var t,n,o,i;(t=(n=this.mutateOptions).onSuccess)==null||t.call(n,this.currentResult.data,this.currentResult.variables,this.currentResult.context),(o=(i=this.mutateOptions).onSettled)==null||o.call(i,this.currentResult.data,null,this.currentResult.variables,this.currentResult.context)}else if(e.onError){var a,u,c,h;(a=(u=this.mutateOptions).onError)==null||a.call(u,this.currentResult.error,this.currentResult.variables,this.currentResult.context),(c=(h=this.mutateOptions).onSettled)==null||c.call(h,void 0,this.currentResult.error,this.currentResult.variables,this.currentResult.context)}}e.listeners&&this.listeners.forEach(({listener:d})=>{d(this.currentResult)})})}}const Le=Xe.useSyncExternalStore,Ke=s.createContext(void 0),lt=s.createContext(!1);function ut(r,e){return r||(e&&typeof window<"u"?(window.ReactQueryClientContext||(window.ReactQueryClientContext=Ke),window.ReactQueryClientContext):Ke)}const me=({context:r}={})=>{const e=s.useContext(ut(r,s.useContext(lt)));if(!e)throw new Error("No QueryClient set, use QueryClientProvider to set one");return e},_r=({client:r,children:e,context:t,contextSharing:n=!1})=>{s.useEffect(()=>(r.mount(),()=>{r.unmount()}),[r]);const o=ut(t,n);return s.createElement(lt.Provider,{value:!t&&n},s.createElement(o.Provider,{value:r},e))},ct=s.createContext(!1),ht=()=>s.useContext(ct);ct.Provider;function Gt(){let r=!1;return{clearReset:()=>{r=!1},reset:()=>{r=!0},isReset:()=>r}}const Yt=s.createContext(Gt()),dt=()=>s.useContext(Yt);function ft(r,e){return typeof r=="function"?r(...e):!!r}const pt=(r,e)=>{(r.suspense||r.useErrorBoundary)&&(e.isReset()||(r.retryOnMount=!1))},yt=r=>{s.useEffect(()=>{r.clearReset()},[r])},mt=({result:r,errorResetBoundary:e,useErrorBoundary:t,query:n})=>r.isError&&!e.isReset()&&!r.isFetching&&ft(t,[r.error,n]),vt=r=>{r.suspense&&typeof r.staleTime!="number"&&(r.staleTime=1e3)},gt=(r,e)=>r.isLoading&&r.isFetching&&!e,Re=(r,e,t)=>r?.suspense&>(e,t),xe=(r,e,t)=>e.fetchOptimistic(r).then(({data:n})=>{r.onSuccess==null||r.onSuccess(n),r.onSettled==null||r.onSettled(n,null)}).catch(n=>{t.clearReset(),r.onError==null||r.onError(n),r.onSettled==null||r.onSettled(void 0,n)});function zr({queries:r,context:e}){const t=me({context:e}),n=ht(),o=dt(),i=s.useMemo(()=>r.map(y=>{const l=t.defaultQueryOptions(y);return l._optimisticResults=n?"isRestoring":"optimistic",l}),[r,t,n]);i.forEach(y=>{vt(y),pt(y,o)}),yt(o);const[a]=s.useState(()=>new Wt(t,i)),u=a.getOptimisticResult(i);Le(s.useCallback(y=>n?()=>{}:a.subscribe(w.batchCalls(y)),[a,n]),()=>a.getCurrentResult(),()=>a.getCurrentResult()),s.useEffect(()=>{a.setQueries(i,{listeners:!1})},[i,a]);const h=u.some((y,l)=>Re(i[l],y,n))?u.flatMap((y,l)=>{const f=i[l],m=a.getObservers()[l];if(f&&m){if(Re(f,y,n))return xe(f,m,o);gt(y,n)&&xe(f,m,o)}return[]}):[];if(h.length>0)throw Promise.all(h);const d=a.getQueries(),p=u.find((y,l)=>{var f,m;return mt({result:y,errorResetBoundary:o,useErrorBoundary:(f=(m=i[l])==null?void 0:m.useErrorBoundary)!=null?f:!1,query:d[l]})});if(p!=null&&p.error)throw p.error;return u}function Zt(r,e){const t=me({context:r.context}),n=ht(),o=dt(),i=t.defaultQueryOptions(r);i._optimisticResults=n?"isRestoring":"optimistic",i.onError&&(i.onError=w.batchCalls(i.onError)),i.onSuccess&&(i.onSuccess=w.batchCalls(i.onSuccess)),i.onSettled&&(i.onSettled=w.batchCalls(i.onSettled)),vt(i),pt(i,o),yt(o);const[a]=s.useState(()=>new e(t,i)),u=a.getOptimisticResult(i);if(Le(s.useCallback(c=>{const h=n?()=>{}:a.subscribe(w.batchCalls(c));return a.updateResult(),h},[a,n]),()=>a.getCurrentResult(),()=>a.getCurrentResult()),s.useEffect(()=>{a.setOptions(i,{listeners:!1})},[i,a]),Re(i,u,n))throw xe(i,a,o);if(mt({result:u,errorResetBoundary:o,useErrorBoundary:i.useErrorBoundary,query:a.getCurrentQuery()}))throw u.error;return i.notifyOnChangeProps?u:a.trackResult(u)}function Kr(r,e,t){const n=te(r,e,t);return Zt(n,ot)}function Wr(r,e,t){const n=kt(r,e,t),o=me({context:n.context}),[i]=s.useState(()=>new Vt(o,n));s.useEffect(()=>{i.setOptions(n)},[i,n]);const a=Le(s.useCallback(c=>i.subscribe(w.batchCalls(c)),[i]),()=>i.getCurrentResult(),()=>i.getCurrentResult()),u=s.useCallback((c,h)=>{i.mutate(c,h).catch(Xt)},[i]);if(a.error&&ft(i.options.useErrorBoundary,[a.error]))throw a.error;return{...a,mutate:u,mutateAsync:a.mutate}}function Xt(){}/** * match-sorter-utils * * Copyright (c) TanStack * * This source code is licensed under the MIT license found in the * LICENSE.md file in the root directory of this source tree. * * @license MIT */const bt={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",Ấ:"A",Ắ:"A",Ẳ:"A",Ẵ:"A",Ặ:"A",Æ:"AE",Ầ:"A",Ằ:"A",Ȃ:"A",Ç:"C",Ḉ:"C",È:"E",É:"E",Ê:"E",Ë:"E",Ế:"E",Ḗ:"E",Ề:"E",Ḕ:"E",Ḝ:"E",Ȇ:"E",Ì:"I",Í:"I",Î:"I",Ï:"I",Ḯ:"I",Ȋ:"I",Ð:"D",Ñ:"N",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",Ố:"O",Ṍ:"O",Ṓ:"O",Ȏ:"O",Ù:"U",Ú:"U",Û:"U",Ü:"U",Ý:"Y",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",ấ:"a",ắ:"a",ẳ:"a",ẵ:"a",ặ:"a",æ:"ae",ầ:"a",ằ:"a",ȃ:"a",ç:"c",ḉ:"c",è:"e",é:"e",ê:"e",ë:"e",ế:"e",ḗ:"e",ề:"e",ḕ:"e",ḝ:"e",ȇ:"e",ì:"i",í:"i",î:"i",ï:"i",ḯ:"i",ȋ:"i",ð:"d",ñ:"n",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",ố:"o",ṍ:"o",ṓ:"o",ȏ:"o",ù:"u",ú:"u",û:"u",ü:"u",ý:"y",ÿ:"y",Ā:"A",ā:"a",Ă:"A",ă:"a",Ą:"A",ą:"a",Ć:"C",ć:"c",Ĉ:"C",ĉ:"c",Ċ:"C",ċ:"c",Č:"C",č:"c",C̆:"C",c̆:"c",Ď:"D",ď:"d",Đ:"D",đ:"d",Ē:"E",ē:"e",Ĕ:"E",ĕ:"e",Ė:"E",ė:"e",Ę:"E",ę:"e",Ě:"E",ě:"e",Ĝ:"G",Ǵ:"G",ĝ:"g",ǵ:"g",Ğ:"G",ğ:"g",Ġ:"G",ġ:"g",Ģ:"G",ģ:"g",Ĥ:"H",ĥ:"h",Ħ:"H",ħ:"h",Ḫ:"H",ḫ:"h",Ĩ:"I",ĩ:"i",Ī:"I",ī:"i",Ĭ:"I",ĭ:"i",Į:"I",į:"i",İ:"I",ı:"i",IJ:"IJ",ij:"ij",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",Ḱ:"K",ḱ:"k",K̆:"K",k̆:"k",Ĺ:"L",ĺ:"l",Ļ:"L",ļ:"l",Ľ:"L",ľ:"l",Ŀ:"L",ŀ:"l",Ł:"l",ł:"l",Ḿ:"M",ḿ:"m",M̆:"M",m̆:"m",Ń:"N",ń:"n",Ņ:"N",ņ:"n",Ň:"N",ň:"n",ʼn:"n",N̆:"N",n̆:"n",Ō:"O",ō:"o",Ŏ:"O",ŏ:"o",Ő:"O",ő:"o",Œ:"OE",œ:"oe",P̆:"P",p̆:"p",Ŕ:"R",ŕ:"r",Ŗ:"R",ŗ:"r",Ř:"R",ř:"r",R̆:"R",r̆:"r",Ȓ:"R",ȓ:"r",Ś:"S",ś:"s",Ŝ:"S",ŝ:"s",Ş:"S",Ș:"S",ș:"s",ş:"s",Š:"S",š:"s",Ţ:"T",ţ:"t",ț:"t",Ț:"T",Ť:"T",ť:"t",Ŧ:"T",ŧ:"t",T̆:"T",t̆:"t",Ũ:"U",ũ:"u",Ū:"U",ū:"u",Ŭ:"U",ŭ:"u",Ů:"U",ů:"u",Ű:"U",ű:"u",Ų:"U",ų:"u",Ȗ:"U",ȗ:"u",V̆:"V",v̆:"v",Ŵ:"W",ŵ:"w",Ẃ:"W",ẃ:"w",X̆:"X",x̆:"x",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Y̆:"Y",y̆:"y",Ź:"Z",ź:"z",Ż:"Z",ż:"z",Ž:"Z",ž:"z",ſ:"s",ƒ:"f",Ơ:"O",ơ:"o",Ư:"U",ư:"u",Ǎ:"A",ǎ:"a",Ǐ:"I",ǐ:"i",Ǒ:"O",ǒ:"o",Ǔ:"U",ǔ:"u",Ǖ:"U",ǖ:"u",Ǘ:"U",ǘ:"u",Ǚ:"U",ǚ:"u",Ǜ:"U",ǜ:"u",Ứ:"U",ứ:"u",Ṹ:"U",ṹ:"u",Ǻ:"A",ǻ:"a",Ǽ:"AE",ǽ:"ae",Ǿ:"O",ǿ:"o",Þ:"TH",þ:"th",Ṕ:"P",ṕ:"p",Ṥ:"S",ṥ:"s",X́:"X",x́:"x",Ѓ:"Г",ѓ:"г",Ќ:"К",ќ:"к",A̋:"A",a̋:"a",E̋:"E",e̋:"e",I̋:"I",i̋:"i",Ǹ:"N",ǹ:"n",Ồ:"O",ồ:"o",Ṑ:"O",ṑ:"o",Ừ:"U",ừ:"u",Ẁ:"W",ẁ:"w",Ỳ:"Y",ỳ:"y",Ȁ:"A",ȁ:"a",Ȅ:"E",ȅ:"e",Ȉ:"I",ȉ:"i",Ȍ:"O",ȍ:"o",Ȑ:"R",ȑ:"r",Ȕ:"U",ȕ:"u",B̌:"B",b̌:"b",Č̣:"C",č̣:"c",Ê̌:"E",ê̌:"e",F̌:"F",f̌:"f",Ǧ:"G",ǧ:"g",Ȟ:"H",ȟ:"h",J̌:"J",ǰ:"j",Ǩ:"K",ǩ:"k",M̌:"M",m̌:"m",P̌:"P",p̌:"p",Q̌:"Q",q̌:"q",Ř̩:"R",ř̩:"r",Ṧ:"S",ṧ:"s",V̌:"V",v̌:"v",W̌:"W",w̌:"w",X̌:"X",x̌:"x",Y̌:"Y",y̌:"y",A̧:"A",a̧:"a",B̧:"B",b̧:"b",Ḑ:"D",ḑ:"d",Ȩ:"E",ȩ:"e",Ɛ̧:"E",ɛ̧:"e",Ḩ:"H",ḩ:"h",I̧:"I",i̧:"i",Ɨ̧:"I",ɨ̧:"i",M̧:"M",m̧:"m",O̧:"O",o̧:"o",Q̧:"Q",q̧:"q",U̧:"U",u̧:"u",X̧:"X",x̧:"x",Z̧:"Z",z̧:"z"},Jt=Object.keys(bt).join("|"),$t=new RegExp(Jt,"g");function er(r){return r.replace($t,e=>bt[e])}/** * @name match-sorter * @license MIT license. * @copyright (c) 2099 Kent C. Dodds * @author Kent C. Dodds (https://kentcdodds.com) */const D={CASE_SENSITIVE_EQUAL:7,EQUAL:6,STARTS_WITH:5,WORD_STARTS_WITH:4,CONTAINS:3,ACRONYM:2,MATCHES:1,NO_MATCH:0};function tr(r,e,t){var n;if(t=t||{},t.threshold=(n=t.threshold)!=null?n:D.MATCHES,!t.accessors){const a=We(r,e,t);return{rankedValue:r,rank:a,accessorIndex:-1,accessorThreshold:t.threshold,passed:a>=t.threshold}}const o=ir(r,t.accessors),i={rankedValue:r,rank:D.NO_MATCH,accessorIndex:-1,accessorThreshold:t.threshold,passed:!1};for(let a=0;a=D.MATCHES?c=h:c>d&&(c=d),c=Math.min(c,d),c>=p&&c>i.rank&&(i.rank=c,i.passed=!0,i.accessorIndex=a,i.accessorThreshold=p,i.rankedValue=u.itemValue)}return i}function We(r,e,t){return r=Ve(r,t),e=Ve(e,t),e.length>r.length?D.NO_MATCH:r===e?D.CASE_SENSITIVE_EQUAL:(r=r.toLowerCase(),e=e.toLowerCase(),r===e?D.EQUAL:r.startsWith(e)?D.STARTS_WITH:r.includes(` ${e}`)?D.WORD_STARTS_WITH:r.includes(e)?D.CONTAINS:e.length===1?D.NO_MATCH:rr(r).includes(e)?D.ACRONYM:nr(r,e))}function rr(r){let e="";return r.split(" ").forEach(n=>{n.split("-").forEach(i=>{e+=i.substr(0,1)})}),e}function nr(r,e){let t=0,n=0;function o(c,h,d){for(let p=d,y=h.length;p-1))return D.NO_MATCH}const u=n-a;return i(u)}function Ve(r,e){let{keepDiacritics:t}=e;return r=`${r}`,t||(r=er(r)),r}function sr(r,e){let t=e;typeof e=="object"&&(t=e.accessor);const n=t(r);return n==null?[]:Array.isArray(n)?n:[String(n)]}function ir(r,e){const t=[];for(let n=0,o=e.length;n{try{const e=localStorage.getItem(r);return typeof e=="string"?JSON.parse(e):void 0}catch{return}};function z(r,e){const[t,n]=s.useState();s.useEffect(()=>{const i=or(r);n(typeof i>"u"||i===null?typeof e=="function"?e():e:i)},[e,r]);const o=s.useCallback(i=>{n(a=>{let u=i;typeof i=="function"&&(u=i(a));try{localStorage.setItem(r,JSON.stringify(u))}catch{}return u})},[r]);return[t,o]}const S={background:"#0b1521",backgroundAlt:"#132337",foreground:"white",gray:"#3f4e60",grayAlt:"#222e3e",inputBackgroundColor:"#fff",inputTextColor:"#000",success:"#00ab52",danger:"#ff0085",active:"#006bff",paused:"#8c49eb",warning:"#ffb200"},Ct=s.createContext(S);function Et({theme:r,...e}){return s.createElement(Ct.Provider,N({value:r},e))}function lr(){return s.useContext(Ct)}function ur(r){const[e,t]=s.useState(()=>{if(typeof window<"u")return window.matchMedia(r).matches});return s.useEffect(()=>{if(typeof window<"u"){const n=window.matchMedia(r),o=({matches:i})=>t(i);return n.addListener(o),()=>{n.removeListener(o)}}},[e,r,t]),e}function Ot({queryState:r,observerCount:e,isStale:t,theme:n}){return r.fetchStatus==="fetching"?n.active:e?r.fetchStatus==="paused"?n.paused:t?n.warning:n.success:n.gray}function X(r){return r.state.fetchStatus==="fetching"?"fetching":r.getObserversCount()?r.state.fetchStatus==="paused"?"paused":r.isStale()?"stale":"fresh":"inactive"}function L(r,e,t={}){return s.forwardRef(({style:n,...o},i)=>{const a=lr(),u=Object.entries(t).reduce((c,[h,d])=>ur(h)?{...c,...typeof d=="function"?d(o,a):d}:c,{});return s.createElement(r,{...o,style:{...typeof e=="function"?e(o,a):e,...n,...u},ref:i})})}function cr(){const r=s.useRef(!1),e=s.useCallback(()=>r.current,[]);return s.useEffect(()=>(r.current=!0,()=>{r.current=!1}),[]),e}const St=(r,e=!1)=>{const{json:t}=Je.serialize(r);return JSON.stringify(t,null,e?2:void 0)},ue=r=>r.state.fetchStatus!=="idle"?0:r.getObserversCount()?r.isStale()?2:1:3,hr=(r,e)=>r.queryHash.localeCompare(e.queryHash),Rt=(r,e)=>r.state.dataUpdatedAtue(r)===ue(e)?Rt(r,e):ue(r)>ue(e)?1:-1,ge={"Status > Last Updated":dr,"Query Hash":hr,"Last Updated":Rt},we=70,ne=500,fr={top:"bottom",bottom:"top",left:"right",right:"left"};function pe(r){return["left","right"].includes(r)}function xt(r){return fr[r]}function De(r,e){return""+r+(e.charAt(0).toUpperCase()+e.slice(1))}function pr({position:r="bottom",height:e,width:t,devtoolsTheme:n,isOpen:o,isResizing:i,panelStyle:a}){const u=xt(r),c=De("border",u),h=pe(r);return{...a,direction:"ltr",position:"fixed",[r]:0,[c]:"1px solid "+n.gray,transformOrigin:u,boxShadow:"0 0 20px rgba(0,0,0,.3)",zIndex:99999,visibility:o?"visible":"hidden",...i?{transition:"none"}:{transition:"all .2s ease"},...o?{opacity:1,pointerEvents:"all",transform:h?"translateX(0) scale(1)":"translateY(0) scale(1)"}:{opacity:0,pointerEvents:"none",transform:h?"translateX(15px) scale(1.02)":"translateY(15px) scale(1.02)"},...h?{top:0,height:"100vh",maxWidth:"90%",width:typeof t=="number"&&t>=we?t:ne}:{left:0,width:"100%",maxHeight:"90%",height:typeof e=="number"&&e>=we?e:ne}}}function yr(r="bottom"){const e=pe(r),t=xt(r),n=De("margin",t);return{position:"absolute",cursor:e?"col-resize":"row-resize",zIndex:1e5,[t]:0,[n]:"-4px",...e?{top:0,height:"100%",width:"4px"}:{width:"100%",height:"4px"}}}const mr=L("div",(r,e)=>({fontSize:"clamp(12px, 1.5vw, 14px)",fontFamily:"sans-serif",display:"flex",backgroundColor:e.background,color:e.foreground}),{"(max-width: 700px)":{flexDirection:"column"},"(max-width: 600px)":{fontSize:".9em"}}),vr=L("div",()=>({flex:"1 1 500px",display:"flex",flexDirection:"column",overflow:"auto",height:"100%"}),{"(max-width: 700px)":(r,e)=>({borderTop:"2px solid "+e.gray})}),H=L("button",(r,e)=>({appearance:"none",fontSize:".9em",fontWeight:"bold",background:e.gray,border:"0",borderRadius:".3em",color:"white",padding:".5em",opacity:r.disabled?".5":void 0,cursor:"pointer"})),gr=L("span",{display:"flex",flexWrap:"wrap",gap:"0.5em",fontSize:"0.9em"}),ee=L("span",{display:"inline-flex",alignItems:"center",padding:".2em .4em",fontWeight:"bold",textShadow:"0 0 10px black",borderRadius:".2em"}),j=L("code",{fontSize:".9em",color:"inherit",background:"inherit"}),br=L("input",(r,e)=>({backgroundColor:e.inputBackgroundColor,border:0,borderRadius:".2em",color:e.inputTextColor,fontSize:".9em",lineHeight:"1.3",padding:".3em .4em"})),Qe=L("select",(r,e)=>({display:"inline-block",fontSize:".9em",fontFamily:"sans-serif",fontWeight:"normal",lineHeight:"1.3",padding:".3em 1.5em .3em .5em",height:"auto",border:0,borderRadius:".2em",appearance:"none",WebkitAppearance:"none",backgroundColor:e.inputBackgroundColor,backgroundImage:`url("data:image/svg+xml;utf8,")`,backgroundRepeat:"no-repeat",backgroundPosition:"right .55em center",backgroundSize:".65em auto, 100%",color:e.inputTextColor}),{"(max-width: 500px)":{display:"none"}});function Pe({text:r}){return s.createElement("span",{style:{position:"absolute",width:"0.1px",height:"0.1px",overflow:"hidden"}},r)}const Ye=L("div",{fontFamily:"Menlo, monospace",fontSize:"1em",lineHeight:"1.7",outline:"none",wordBreak:"break-word"}),Cr=L("span",{color:"white"}),Er=L("button",{cursor:"pointer",color:"white"}),Or=L("button",{cursor:"pointer",color:"inherit",font:"inherit",outline:"inherit",background:"transparent",border:"none",padding:0}),Sr=({value:r})=>{const[e,t]=s.useState("NoCopy");return s.createElement("button",{onClick:e==="NoCopy"?()=>{navigator.clipboard.writeText(Je.stringify(r)).then(()=>{t("SuccessCopy"),setTimeout(()=>{t("NoCopy")},1500)},n=>{console.error("Failed to copy: ",n),t("ErrorCopy"),setTimeout(()=>{t("NoCopy")},1500)})}:void 0,style:{cursor:"pointer",color:"inherit",font:"inherit",outline:"inherit",background:"transparent",border:"none",padding:0}},e==="NoCopy"?s.createElement(wr,null):e==="SuccessCopy"?s.createElement(Pr,null):s.createElement(Qr,null))},Rr=L("span",(r,e)=>({color:e.danger})),be=L("div",{marginLeft:".1em",paddingLeft:"1em",borderLeft:"2px solid rgba(0,0,0,.15)"}),xr=L("span",{color:"grey",fontSize:".7em"}),Ze=({expanded:r,style:e={}})=>s.createElement("span",{style:{display:"inline-block",transition:"all .1s ease",transform:"rotate("+(r?90:0)+"deg) "+(e.transform||""),...e}},"▶"),wr=()=>s.createElement("span",{"aria-label":"Copy object to clipboard",title:"Copy object to clipboard",style:{paddingLeft:"1em"}},s.createElement("svg",{height:"12",viewBox:"0 0 16 12",width:"10"},s.createElement("path",{fill:"currentColor",d:"M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 010 1.5h-1.5a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-1.5a.75.75 0 011.5 0v1.5A1.75 1.75 0 019.25 16h-7.5A1.75 1.75 0 010 14.25v-7.5z"}),s.createElement("path",{fill:"currentColor",d:"M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0114.25 11h-7.5A1.75 1.75 0 015 9.25v-7.5zm1.75-.25a.25.25 0 00-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 00.25-.25v-7.5a.25.25 0 00-.25-.25h-7.5z"}))),Qr=()=>s.createElement("span",{"aria-label":"Failed copying to clipboard",title:"Failed copying to clipboard",style:{paddingLeft:"1em",display:"flex",alignItems:"center"}},s.createElement("svg",{height:"12",viewBox:"0 0 16 12",width:"10",display:"block"},s.createElement("path",{fill:"red",d:"M3.72 3.72a.75.75 0 011.06 0L8 6.94l3.22-3.22a.75.75 0 111.06 1.06L9.06 8l3.22 3.22a.75.75 0 11-1.06 1.06L8 9.06l-3.22 3.22a.75.75 0 01-1.06-1.06L6.94 8 3.72 4.78a.75.75 0 010-1.06z"})),s.createElement("span",{style:{color:"red",fontSize:"12px",paddingLeft:"4px",position:"relative",top:"2px"}},"See console")),Pr=()=>s.createElement("span",{"aria-label":"Object copied to clipboard",title:"Object copied to clipboard",style:{paddingLeft:"1em",display:"inline-block",verticalAlign:"middle"}},s.createElement("svg",{height:"16",viewBox:"0 0 16 16",width:"16",display:"block"},s.createElement("path",{fill:"green",d:"M13.78 4.22a.75.75 0 010 1.06l-7.25 7.25a.75.75 0 01-1.06 0L2.22 9.28a.75.75 0 011.06-1.06L6 10.94l6.72-6.72a.75.75 0 011.06 0z"})));function Mr(r,e){if(e<1)return[];let t=0;const n=[];for(;t{const[d,p]=s.useState([]);return s.createElement(Ye,{key:e},o.length?s.createElement(s.Fragment,null,s.createElement(Or,{onClick:()=>c()},s.createElement(Ze,{expanded:a})," ",e," ",s.createElement(xr,null,String(i).toLowerCase()==="iterable"?"(Iterable) ":"",n.length," ",n.length>1?"items":"item")),u?s.createElement(Sr,{value:t}):null,a?o.length===1?s.createElement(be,null,n.map(r)):s.createElement(be,null,o.map((y,l)=>s.createElement("div",{key:l},s.createElement(Ye,null,s.createElement(Er,{onClick:()=>p(f=>f.includes(l)?f.filter(m=>m!==l):[...f,l])},s.createElement(Ze,{expanded:a})," [",l*h," ..."," ",l*h+h-1,"]"),d.includes(l)?s.createElement(be,null,y.map(r)):null)))):null):s.createElement(s.Fragment,null,s.createElement(Cr,null,e,":")," ",s.createElement(Rr,null,St(t))))};function kr(r){return Symbol.iterator in r}function Me({value:r,defaultExpanded:e,renderer:t=Ar,pageSize:n=100,copyable:o=!1,...i}){const[a,u]=s.useState(!!e),c=s.useCallback(()=>u(l=>!l),[]);let h=typeof r,d=[];const p=l=>{const f=e===!0?{[l.label]:!0}:e?.[l.label];return{...l,defaultExpanded:f}};Array.isArray(r)?(h="array",d=r.map((l,f)=>p({label:f.toString(),value:l}))):r!==null&&typeof r=="object"&&kr(r)&&typeof r[Symbol.iterator]=="function"?(h="Iterable",d=Array.from(r,(l,f)=>p({label:f.toString(),value:l}))):typeof r=="object"&&r!==null&&(h="object",d=Object.entries(r).map(([l,f])=>p({label:l,value:f})));const y=Mr(d,n);return t({handleEntry:l=>s.createElement(Me,N({key:l.label,value:r,renderer:t,copyable:o},i,l)),type:h,subEntries:d,subEntryPages:y,value:r,expanded:a,copyable:o,toggleExpanded:c,pageSize:n,...i})}function wt(r){return s.createElement("svg",N({width:"40px",height:"40px",viewBox:"0 0 190 190",version:"1.1"},r),s.createElement("g",{stroke:"none",strokeWidth:"1",fill:"none",fillRule:"evenodd"},s.createElement("g",{transform:"translate(-33.000000, 0.000000)"},s.createElement("path",{d:"M72.7239712,61.3436237 C69.631224,46.362877 68.9675112,34.8727722 70.9666331,26.5293551 C72.1555965,21.5671678 74.3293088,17.5190846 77.6346064,14.5984631 C81.1241394,11.5150478 85.5360327,10.0020122 90.493257,10.0020122 C98.6712013,10.0020122 107.26826,13.7273214 116.455725,20.8044264 C120.20312,23.6910458 124.092437,27.170411 128.131651,31.2444746 C128.45314,30.8310265 128.816542,30.4410453 129.22143,30.0806152 C140.64098,19.9149716 150.255245,13.5989272 158.478408,11.1636507 C163.367899,9.715636 167.958526,9.57768202 172.138936,10.983031 C176.551631,12.4664684 180.06766,15.5329489 182.548314,19.8281091 C186.642288,26.9166735 187.721918,36.2310983 186.195595,47.7320243 C185.573451,52.4199112 184.50985,57.5263831 183.007094,63.0593153 C183.574045,63.1277086 184.142416,63.2532808 184.705041,63.4395297 C199.193932,68.2358678 209.453582,73.3937462 215.665021,79.2882839 C219.360669,82.7953831 221.773972,86.6998434 222.646365,91.0218204 C223.567176,95.5836746 222.669313,100.159332 220.191548,104.451297 C216.105211,111.529614 208.591643,117.11221 197.887587,121.534031 C193.589552,123.309539 188.726579,124.917559 183.293259,126.363748 C183.541176,126.92292 183.733521,127.516759 183.862138,128.139758 C186.954886,143.120505 187.618598,154.61061 185.619477,162.954027 C184.430513,167.916214 182.256801,171.964297 178.951503,174.884919 C175.46197,177.968334 171.050077,179.48137 166.092853,179.48137 C157.914908,179.48137 149.31785,175.756061 140.130385,168.678956 C136.343104,165.761613 132.410866,162.238839 128.325434,158.108619 C127.905075,158.765474 127.388968,159.376011 126.77857,159.919385 C115.35902,170.085028 105.744755,176.401073 97.5215915,178.836349 C92.6321009,180.284364 88.0414736,180.422318 83.8610636,179.016969 C79.4483686,177.533532 75.9323404,174.467051 73.4516862,170.171891 C69.3577116,163.083327 68.2780823,153.768902 69.8044053,142.267976 C70.449038,137.410634 71.56762,132.103898 73.1575891,126.339009 C72.5361041,126.276104 71.9120754,126.144816 71.2949591,125.940529 C56.8060684,121.144191 46.5464184,115.986312 40.3349789,110.091775 C36.6393312,106.584675 34.2260275,102.680215 33.3536352,98.3582381 C32.4328237,93.7963839 33.3306866,89.2207269 35.8084524,84.9287618 C39.8947886,77.8504443 47.4083565,72.2678481 58.1124133,67.8460273 C62.5385143,66.0176154 67.5637208,64.366822 73.1939394,62.8874674 C72.9933393,62.3969171 72.8349374,61.8811235 72.7239712,61.3436237 Z",fill:"#002C4B",fillRule:"nonzero",transform:"translate(128.000000, 95.000000) scale(-1, 1) translate(-128.000000, -95.000000) "}),s.createElement("path",{d:"M113.396882,64 L142.608177,64 C144.399254,64 146.053521,64.958025 146.944933,66.5115174 L161.577138,92.0115174 C162.461464,93.5526583 162.461464,95.4473417 161.577138,96.9884826 L146.944933,122.488483 C146.053521,124.041975 144.399254,125 142.608177,125 L113.396882,125 C111.605806,125 109.951539,124.041975 109.060126,122.488483 L94.4279211,96.9884826 C93.543596,95.4473417 93.543596,93.5526583 94.4279211,92.0115174 L109.060126,66.5115174 C109.951539,64.958025 111.605806,64 113.396882,64 Z M138.987827,70.2765273 C140.779849,70.2765273 142.434839,71.2355558 143.325899,72.7903404 L154.343038,92.0138131 C155.225607,93.5537825 155.225607,95.4462175 154.343038,96.9861869 L143.325899,116.20966 C142.434839,117.764444 140.779849,118.723473 138.987827,118.723473 L117.017233,118.723473 C115.225211,118.723473 113.570221,117.764444 112.67916,116.20966 L101.662022,96.9861869 C100.779452,95.4462175 100.779452,93.5537825 101.662022,92.0138131 L112.67916,72.7903404 C113.570221,71.2355558 115.225211,70.2765273 117.017233,70.2765273 L138.987827,70.2765273 Z M135.080648,77.1414791 L120.924411,77.1414791 C119.134228,77.1414791 117.480644,78.0985567 116.5889,79.6508285 L116.5889,79.6508285 L109.489217,92.0093494 C108.603232,93.5515958 108.603232,95.4484042 109.489217,96.9906506 L109.489217,96.9906506 L116.5889,109.349172 C117.480644,110.901443 119.134228,111.858521 120.924411,111.858521 L120.924411,111.858521 L135.080648,111.858521 C136.870831,111.858521 138.524416,110.901443 139.41616,109.349172 L139.41616,109.349172 L146.515843,96.9906506 C147.401828,95.4484042 147.401828,93.5515958 146.515843,92.0093494 L146.515843,92.0093494 L139.41616,79.6508285 C138.524416,78.0985567 136.870831,77.1414791 135.080648,77.1414791 L135.080648,77.1414791 Z M131.319186,83.7122186 C133.108028,83.7122186 134.760587,84.6678753 135.652827,86.2183156 L138.983552,92.0060969 C139.87203,93.5500005 139.87203,95.4499995 138.983552,96.9939031 L135.652827,102.781684 C134.760587,104.332125 133.108028,105.287781 131.319186,105.287781 L124.685874,105.287781 C122.897032,105.287781 121.244473,104.332125 120.352233,102.781684 L117.021508,96.9939031 C116.13303,95.4499995 116.13303,93.5500005 117.021508,92.0060969 L120.352233,86.2183156 C121.244473,84.6678753 122.897032,83.7122186 124.685874,83.7122186 L131.319186,83.7122186 Z M128.003794,90.1848875 C126.459294,90.1848875 125.034382,91.0072828 124.263005,92.3424437 C123.491732,93.6774232 123.491732,95.3225768 124.263005,96.6575563 C125.034382,97.9927172 126.459294,98.8151125 128.001266,98.8151125 L128.001266,98.8151125 C129.545766,98.8151125 130.970678,97.9927172 131.742055,96.6575563 C132.513327,95.3225768 132.513327,93.6774232 131.742055,92.3424437 C130.970678,91.0072828 129.545766,90.1848875 128.003794,90.1848875 L128.003794,90.1848875 Z M93,94.5009646 L100.767764,94.5009646",fill:"#FFD94C"}),s.createElement("path",{d:"M87.8601729,108.357758 C89.1715224,107.608286 90.8360246,108.074601 91.5779424,109.399303 L91.5779424,109.399303 L92.0525843,110.24352 C95.8563392,116.982993 99.8190116,123.380176 103.940602,129.435068 C108.807881,136.585427 114.28184,143.82411 120.362479,151.151115 C121.316878,152.30114 121.184944,154.011176 120.065686,154.997937 L120.065686,154.997937 L119.454208,155.534625 C99.3465389,173.103314 86.2778188,176.612552 80.2480482,166.062341 C74.3500652,155.742717 76.4844915,136.982888 86.6513274,109.782853 C86.876818,109.179582 87.3045861,108.675291 87.8601729,108.357758 Z M173.534177,129.041504 C174.986131,128.785177 176.375496,129.742138 176.65963,131.194242 L176.65963,131.194242 L176.812815,131.986376 C181.782365,157.995459 178.283348,171 166.315764,171 C154.609745,171 139.708724,159.909007 121.612702,137.727022 C121.211349,137.235047 120.994572,136.617371 121,135.981509 C121.013158,134.480686 122.235785,133.274651 123.730918,133.287756 L123.730918,133.287756 L124.684654,133.294531 C132.305698,133.335994 139.714387,133.071591 146.910723,132.501323 C155.409039,131.82788 164.283523,130.674607 173.534177,129.041504 Z M180.408726,73.8119663 C180.932139,72.4026903 182.508386,71.6634537 183.954581,72.149012 L183.954581,72.149012 L184.742552,72.4154854 C210.583763,81.217922 220.402356,90.8916805 214.198332,101.436761 C208.129904,111.751366 190.484347,119.260339 161.26166,123.963678 C160.613529,124.067994 159.948643,123.945969 159.382735,123.618843 C158.047025,122.846729 157.602046,121.158214 158.388848,119.847438 L158.388848,119.847438 L158.889328,119.0105 C162.877183,112.31633 166.481358,105.654262 169.701854,99.0242957 C173.50501,91.1948179 177.073967,82.7907081 180.408726,73.8119663 Z M94.7383398,66.0363218 C95.3864708,65.9320063 96.0513565,66.0540315 96.6172646,66.3811573 C97.9529754,67.153271 98.3979538,68.8417862 97.6111517,70.1525615 L97.6111517,70.1525615 L97.1106718,70.9895001 C93.1228168,77.6836699 89.5186416,84.3457379 86.2981462,90.9757043 C82.49499,98.8051821 78.9260328,107.209292 75.5912744,116.188034 C75.0678608,117.59731 73.4916142,118.336546 72.045419,117.850988 L72.045419,117.850988 L71.2574475,117.584515 C45.4162372,108.782078 35.597644,99.1083195 41.8016679,88.5632391 C47.8700957,78.2486335 65.515653,70.7396611 94.7383398,66.0363218 Z M136.545792,34.4653746 C156.653461,16.8966864 169.722181,13.3874478 175.751952,23.9376587 C181.649935,34.2572826 179.515508,53.0171122 169.348673,80.2171474 C169.123182,80.8204179 168.695414,81.324709 168.139827,81.6422422 C166.828478,82.3917144 165.163975,81.9253986 164.422058,80.6006966 L164.422058,80.6006966 L163.947416,79.7564798 C160.143661,73.0170065 156.180988,66.6198239 152.059398,60.564932 C147.192119,53.4145727 141.71816,46.1758903 135.637521,38.8488847 C134.683122,37.6988602 134.815056,35.9888243 135.934314,35.0020629 L135.934314,35.0020629 Z M90.6842361,18 C102.390255,18 117.291276,29.0909926 135.387298,51.2729777 C135.788651,51.7649527 136.005428,52.3826288 136,53.0184911 C135.986842,54.5193144 134.764215,55.7253489 133.269082,55.7122445 L133.269082,55.7122445 L132.315346,55.7054689 C124.694302,55.6640063 117.285613,55.9284091 110.089277,56.4986773 C101.590961,57.17212 92.7164767,58.325393 83.4658235,59.9584962 C82.0138691,60.2148231 80.6245044,59.2578618 80.3403697,57.805758 L80.3403697,57.805758 L80.1871846,57.0136235 C75.2176347,31.0045412 78.7166519,18 90.6842361,18 Z",fill:"#FF4154"}))))}function Ir({initialIsOpen:r,panelProps:e={},closeButtonProps:t={},toggleButtonProps:n={},position:o="bottom-left",containerElement:i="aside",context:a,styleNonce:u,panelPosition:c="bottom",errorTypes:h=[]}){const d=s.useRef(null),p=s.useRef(null),[y,l]=z("reactQueryDevtoolsOpen",r),[f,m]=z("reactQueryDevtoolsHeight",ne),[v,b]=z("reactQueryDevtoolsWidth",ne),[R="bottom",x]=z("reactQueryDevtoolsPanelPosition",c),[E,A]=s.useState(!1),[O,C]=s.useState(!1),g=cr(),M=(P,k)=>{if(!P||k.button!==0)return;const U=pe(R);C(!0);const{height:$,width:ve}=P.getBoundingClientRect(),Y=k.clientX,Z=k.clientY;let B=0;const oe=W=>{W.preventDefault(),U?(B=ve+(R==="right"?Y-W.clientX:W.clientX-Y),b(B)):(B=$+(R==="bottom"?Z-W.clientY:W.clientY-Z),m(B)),B{O&&C(!1),document.removeEventListener("mousemove",oe,!1),document.removeEventListener("mouseUp",le,!1)};document.addEventListener("mousemove",oe,!1),document.addEventListener("mouseup",le,!1)};s.useEffect(()=>{A(y??!1)},[y,E,A]),s.useEffect(()=>{const P=p.current;if(P){const k=()=>{E&&(P.style.visibility="visible")},U=()=>{E||(P.style.visibility="hidden")};return P.addEventListener("transitionstart",k),P.addEventListener("transitionend",U),()=>{P.removeEventListener("transitionstart",k),P.removeEventListener("transitionend",U)}}},[E]),s.useEffect(()=>{var P;if(E&&(P=d.current)!=null&&P.parentElement){const{parentElement:k}=d.current,U=De("padding",R),$=pe(R),ve=(({padding:Z,paddingTop:B,paddingBottom:oe,paddingLeft:le,paddingRight:W})=>({padding:Z,paddingTop:B,paddingBottom:oe,paddingLeft:le,paddingRight:W}))(k.style),Y=()=>{k.style.padding="0px",k.style.paddingTop="0px",k.style.paddingBottom="0px",k.style.paddingLeft="0px",k.style.paddingRight="0px",k.style[U]=($?v:f)+"px"};if(Y(),typeof window<"u")return window.addEventListener("resize",Y),()=>{window.removeEventListener("resize",Y),Object.entries(ve).forEach(([Z,B])=>{k.style[Z]=B})}}},[E,R,f,v]);const{style:T={},...K}=e,{style:ie={},onClick:q,...ae}=n,Q=pr({position:R,devtoolsTheme:S,isOpen:E,height:f,width:v,isResizing:O,panelStyle:T});return g()?s.createElement(i,{ref:d,className:"ReactQueryDevtools","aria-label":"React Query Devtools"},s.createElement(Et,{theme:S},s.createElement(Qt,N({ref:p,context:a,styleNonce:u,position:R,onPositionChange:x,showCloseButton:!0,closeButtonProps:t},K,{style:Q,isOpen:E,setIsOpen:l,onDragStart:P=>M(p.current,P),errorTypes:h}))),E?null:s.createElement("button",N({type:"button"},ae,{"aria-label":"Open React Query Devtools","aria-controls":"ReactQueryDevtoolsPanel","aria-haspopup":"true","aria-expanded":"false",onClick:P=>{l(!0),q?.(P)},style:{background:"none",border:0,padding:0,position:"fixed",zIndex:99999,display:"inline-flex",fontSize:"1.5em",margin:".5em",cursor:"pointer",width:"fit-content",...o==="top-right"?{top:"0",right:"0"}:o==="top-left"?{top:"0",left:"0"}:o==="bottom-right"?{bottom:"0",right:"0"}:{bottom:"0",left:"0"},...ie}}),s.createElement(wt,{"aria-hidden":!0}),s.createElement(Pe,{text:"Open React Query Devtools"}))):null}const I=(r,e,t=!1)=>Xe.useSyncExternalStore(s.useCallback(n=>t?()=>{}:r.subscribe(w.batchCalls(n)),[r,t]),e,e),Qt=s.forwardRef(function(e,t){const{isOpen:n=!0,styleNonce:o,setIsOpen:i,context:a,onDragStart:u,onPositionChange:c,showCloseButton:h,position:d,closeButtonProps:p={},errorTypes:y=[],...l}=e,{onClick:f,...m}=p,v=me({context:a}),b=v.getQueryCache(),[R,x]=z("reactQueryDevtoolsSortFn",Object.keys(ge)[0]),[E,A]=z("reactQueryDevtoolsFilter",""),[O,C]=z("reactQueryDevtoolsBaseSort",1),g=s.useMemo(()=>ge[R],[R]),M=I(b,()=>b.getAll().length,!n),[T,K]=z("reactQueryDevtoolsActiveQueryHash",""),ie=s.useMemo(()=>{const Q=b.getAll();if(M===0)return[];const P=E?Q.filter(U=>tr(U.queryHash,E).passed):[...Q];return g?P.sort((U,$)=>g(U,$)*O):P},[O,g,E,M,b]),[q,ae]=s.useState(!1);return s.createElement(Et,{theme:S},s.createElement(mr,N({ref:t,className:"ReactQueryDevtoolsPanel","aria-label":"React Query Devtools Panel",id:"ReactQueryDevtoolsPanel"},l,{style:{height:ne,position:"relative",...l.style}}),s.createElement("style",{nonce:o,dangerouslySetInnerHTML:{__html:` .ReactQueryDevtoolsPanel * { scrollbar-color: `+S.backgroundAlt+" "+S.gray+`; } .ReactQueryDevtoolsPanel *::-webkit-scrollbar, .ReactQueryDevtoolsPanel scrollbar { width: 1em; height: 1em; } .ReactQueryDevtoolsPanel *::-webkit-scrollbar-track, .ReactQueryDevtoolsPanel scrollbar-track { background: `+S.backgroundAlt+`; } .ReactQueryDevtoolsPanel *::-webkit-scrollbar-thumb, .ReactQueryDevtoolsPanel scrollbar-thumb { background: `+S.gray+`; border-radius: .5em; border: 3px solid `+S.backgroundAlt+`; } `}}),s.createElement("div",{style:yr(d),onMouseDown:u}),n&&s.createElement("div",{style:{flex:"1 1 500px",minHeight:"40%",maxHeight:"100%",overflow:"auto",borderRight:"1px solid "+S.grayAlt,display:"flex",flexDirection:"column"}},s.createElement("div",{style:{padding:".5em",background:S.backgroundAlt,display:"flex",justifyContent:"space-between",alignItems:"center"}},s.createElement("button",{type:"button","aria-label":"Close React Query Devtools","aria-controls":"ReactQueryDevtoolsPanel","aria-haspopup":"true","aria-expanded":"true",onClick:()=>i(!1),style:{display:"inline-flex",background:"none",border:0,padding:0,marginRight:".5em",cursor:"pointer"}},s.createElement(wt,{"aria-hidden":!0}),s.createElement(Pe,{text:"Close React Query Devtools"})),s.createElement("div",{style:{display:"flex",flexDirection:"column"}},s.createElement("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"center",marginBottom:".5em"}},s.createElement(Dr,{queryCache:b}),d&&c?s.createElement(Qe,{"aria-label":"Panel position",value:d,style:{marginInlineStart:".5em"},onChange:Q=>c(Q.target.value)},s.createElement("option",{value:"left"},"Left"),s.createElement("option",{value:"right"},"Right"),s.createElement("option",{value:"top"},"Top"),s.createElement("option",{value:"bottom"},"Bottom")):null),s.createElement("div",{style:{display:"flex",alignItems:"center",flexWrap:"wrap",gap:"0.5em"}},s.createElement(br,{placeholder:"Filter","aria-label":"Filter by queryhash",value:E??"",onChange:Q=>A(Q.target.value),onKeyDown:Q=>{Q.key==="Escape"&&A("")},style:{flex:"1",width:"100%"}}),s.createElement(Qe,{"aria-label":"Sort queries",value:R,onChange:Q=>x(Q.target.value),style:{flex:"1",minWidth:75,marginRight:".5em"}},Object.keys(ge).map(Q=>s.createElement("option",{key:Q,value:Q},"Sort by ",Q))),s.createElement(H,{type:"button",onClick:()=>C(Q=>Q*-1),style:{padding:".3em .4em",marginRight:".5em"}},O===1?"⬆ Asc":"⬇ Desc"),s.createElement(H,{title:"Clear cache","aria-label":"Clear cache",type:"button",onClick:()=>b.clear(),style:{padding:".3em .4em",marginRight:".5em"}},"Clear"),s.createElement(H,{type:"button",onClick:()=>{q?(J.setOnline(void 0),ae(!1),window.dispatchEvent(new Event("online"))):(J.setOnline(!1),ae(!0))},"aria-label":q?"Restore offline mock":"Mock offline behavior",title:q?"Restore offline mock":"Mock offline behavior",style:{padding:"0",height:"2em"}},s.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"2em",height:"2em",viewBox:"0 0 24 24",stroke:q?S.danger:"currentColor",fill:"none"},q?s.createElement(s.Fragment,null,s.createElement("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),s.createElement("line",{x1:"12",y1:"18",x2:"12.01",y2:"18"}),s.createElement("path",{d:"M9.172 15.172a4 4 0 0 1 5.656 0"}),s.createElement("path",{d:"M6.343 12.343a7.963 7.963 0 0 1 3.864 -2.14m4.163 .155a7.965 7.965 0 0 1 3.287 2"}),s.createElement("path",{d:"M3.515 9.515a12 12 0 0 1 3.544 -2.455m3.101 -.92a12 12 0 0 1 10.325 3.374"}),s.createElement("line",{x1:"3",y1:"3",x2:"21",y2:"21"})):s.createElement(s.Fragment,null,s.createElement("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),s.createElement("line",{x1:"12",y1:"18",x2:"12.01",y2:"18"}),s.createElement("path",{d:"M9.172 15.172a4 4 0 0 1 5.656 0"}),s.createElement("path",{d:"M6.343 12.343a8 8 0 0 1 11.314 0"}),s.createElement("path",{d:"M3.515 9.515c4.686 -4.687 12.284 -4.687 17 0"}))),s.createElement(Pe,{text:q?"Restore offline mock":"Mock offline behavior"}))))),s.createElement("div",{style:{overflowY:"auto",flex:"1"}},ie.map(Q=>s.createElement(Pt,{queryKey:Q.queryKey,activeQueryHash:T,setActiveQueryHash:K,key:Q.queryHash,queryCache:b})))),T&&n?s.createElement(Lr,{activeQueryHash:T,queryCache:b,queryClient:v,errorTypes:y}):null,h?s.createElement(H,N({type:"button","aria-controls":"ReactQueryDevtoolsPanel","aria-haspopup":"true","aria-expanded":"true"},m,{style:{position:"absolute",zIndex:99999,margin:".5em",bottom:0,left:0,...m.style},onClick:Q=>{i(!1),f?.(Q)}}),"Close"):null))}),Lr=({queryCache:r,activeQueryHash:e,queryClient:t,errorTypes:n})=>{var o,i;const a=I(r,()=>r.getAll().find(f=>f.queryHash===e)),u=I(r,()=>{var f;return(f=r.getAll().find(m=>m.queryHash===e))==null?void 0:f.state}),c=(o=I(r,()=>{var f;return(f=r.getAll().find(m=>m.queryHash===e))==null?void 0:f.isStale()}))!=null?o:!1,h=(i=I(r,()=>{var f;return(f=r.getAll().find(m=>m.queryHash===e))==null?void 0:f.getObserversCount()}))!=null?i:0,d=()=>{const f=a?.fetch();f?.catch(Fr)},p=s.useMemo(()=>{if(a&&u!=null&&u.error){const f=n.find(m=>{var v;return m.initializer(a).toString()===((v=u.error)==null?void 0:v.toString())});return f?.name}},[a,u?.error,n]);if(!a||!u)return null;const y=f=>{var m;const v=(m=f?.initializer(a))!=null?m:new Error("Unknown error from devtools"),b=a.options;a.setState({status:"error",error:v,fetchMeta:{...a.state.fetchMeta,__previousQueryOptions:b}})},l=()=>{a.fetch(a.state.fetchMeta.__previousQueryOptions,{cancelRefetch:!0})};return s.createElement(vr,null,s.createElement("div",{style:{padding:".5em",background:S.backgroundAlt,position:"sticky",top:0,zIndex:1}},"Query Details"),s.createElement("div",{style:{padding:".5em"}},s.createElement("div",{style:{marginBottom:".5em",display:"flex",alignItems:"flex-start",justifyContent:"space-between"}},s.createElement(j,{style:{lineHeight:"1.8em"}},s.createElement("pre",{style:{margin:0,padding:0,overflow:"auto"}},St(a.queryKey,!0))),s.createElement("span",{style:{padding:"0.3em .6em",borderRadius:"0.4em",fontWeight:"bold",textShadow:"0 2px 10px black",background:Ot({queryState:u,isStale:c,observerCount:h,theme:S}),flexShrink:0}},X(a))),s.createElement("div",{style:{marginBottom:".5em",display:"flex",alignItems:"center",justifyContent:"space-between"}},"Observers: ",s.createElement(j,null,h)),s.createElement("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between"}},"Last Updated:"," ",s.createElement(j,null,new Date(u.dataUpdatedAt).toLocaleTimeString()))),s.createElement("div",{style:{background:S.backgroundAlt,padding:".5em",position:"sticky",top:0,zIndex:1}},"Actions"),s.createElement("div",{style:{padding:"0.5em",display:"flex",flexWrap:"wrap",gap:"0.5em",alignItems:"flex-end"}},s.createElement(H,{type:"button",onClick:d,disabled:u.fetchStatus==="fetching",style:{background:S.active}},"Refetch")," ",s.createElement(H,{type:"button",onClick:()=>t.invalidateQueries(a),style:{background:S.warning,color:S.inputTextColor}},"Invalidate")," ",s.createElement(H,{type:"button",onClick:()=>t.resetQueries(a),style:{background:S.gray}},"Reset")," ",s.createElement(H,{type:"button",onClick:()=>t.removeQueries(a),style:{background:S.danger}},"Remove")," ",s.createElement(H,{type:"button",onClick:()=>{var f;if(!(a.state.fetchStatus==="fetching"&&typeof((f=a.state.fetchMeta)==null?void 0:f.__previousQueryOptions)>"u"))if(a.state.data===void 0)l();else{const m=a.options;a.fetch({...m,queryFn:()=>new Promise(()=>{}),cacheTime:-1}),a.setState({data:void 0,status:"loading",fetchMeta:{...a.state.fetchMeta,__previousQueryOptions:m}})}},style:{background:S.paused}},a.state.status==="loading"?"Restore":"Trigger"," ","loading")," ",n.length===0||a.state.status==="error"?s.createElement(H,{type:"button",onClick:()=>{a.state.error?t.resetQueries(a):y()},style:{background:S.danger}},a.state.status==="error"?"Restore":"Trigger"," error"):s.createElement("label",null,"Trigger error:",s.createElement(Qe,{value:p??"",style:{marginInlineStart:".5em"},onChange:f=>{const m=n.find(v=>v.name===f.target.value);y(m)}},s.createElement("option",{key:"",value:""}),n.map(f=>s.createElement("option",{key:f.name,value:f.name},f.name))))),s.createElement("div",{style:{background:S.backgroundAlt,padding:".5em",position:"sticky",top:0,zIndex:1}},"Data Explorer"),s.createElement("div",{style:{padding:".5em"}},s.createElement(Me,{label:"Data",value:u.data,defaultExpanded:{},copyable:!0})),s.createElement("div",{style:{background:S.backgroundAlt,padding:".5em",position:"sticky",top:0,zIndex:1}},"Query Explorer"),s.createElement("div",{style:{padding:".5em"}},s.createElement(Me,{label:"Query",value:a,defaultExpanded:{queryKey:!0}})))},Dr=({queryCache:r})=>{const e=I(r,()=>r.getAll().filter(a=>X(a)==="fresh").length),t=I(r,()=>r.getAll().filter(a=>X(a)==="fetching").length),n=I(r,()=>r.getAll().filter(a=>X(a)==="paused").length),o=I(r,()=>r.getAll().filter(a=>X(a)==="stale").length),i=I(r,()=>r.getAll().filter(a=>X(a)==="inactive").length);return s.createElement(gr,null,s.createElement(ee,{style:{background:S.success,opacity:e?1:.3}},"fresh ",s.createElement(j,null,"(",e,")"))," ",s.createElement(ee,{style:{background:S.active,opacity:t?1:.3}},"fetching ",s.createElement(j,null,"(",t,")"))," ",s.createElement(ee,{style:{background:S.paused,opacity:n?1:.3}},"paused ",s.createElement(j,null,"(",n,")"))," ",s.createElement(ee,{style:{background:S.warning,color:"black",textShadow:"0",opacity:o?1:.3}},"stale ",s.createElement(j,null,"(",o,")"))," ",s.createElement(ee,{style:{background:S.gray,opacity:i?1:.3}},"inactive ",s.createElement(j,null,"(",i,")")))},Pt=s.memo(({queryKey:r,setActiveQueryHash:e,activeQueryHash:t,queryCache:n})=>{var o,i,a,u;const c=(o=I(n,()=>{var l;return(l=n.find(r))==null?void 0:l.queryHash}))!=null?o:"",h=I(n,()=>{var l;return(l=n.find(r))==null?void 0:l.state}),d=(i=I(n,()=>{var l;return(l=n.find(r))==null?void 0:l.isStale()}))!=null?i:!1,p=(a=I(n,()=>{var l;return(l=n.find(r))==null?void 0:l.isDisabled()}))!=null?a:!1,y=(u=I(n,()=>{var l;return(l=n.find(r))==null?void 0:l.getObserversCount()}))!=null?u:0;return h?s.createElement("div",{role:"button","aria-label":"Open query details for "+c,onClick:()=>e(t===c?"":c),style:{display:"flex",borderBottom:"solid 1px "+S.grayAlt,cursor:"pointer",background:c===t?"rgba(255,255,255,.1)":void 0}},s.createElement("div",{style:{flex:"0 0 auto",width:"2em",height:"2em",background:Ot({queryState:h,isStale:d,observerCount:y,theme:S}),display:"flex",alignItems:"center",justifyContent:"center",fontWeight:"bold",textShadow:d?"0":"0 0 10px black",color:d?"black":"white"}},y),p?s.createElement("div",{style:{flex:"0 0 auto",height:"2em",background:S.gray,display:"flex",alignItems:"center",fontWeight:"bold",padding:"0 0.5em"}},"disabled"):null,s.createElement(j,{style:{padding:".5em"}},""+c)):null});Pt.displayName="QueryRow";function Fr(){}const Tr=Ir,qr=Qt,Vr=Object.freeze(Object.defineProperty({__proto__:null,ReactQueryDevtools:Tr,ReactQueryDevtoolsPanel:qr},Symbol.toStringTag,{value:"Module"}));export{Nr as Q,me as a,Wr as b,_r as c,zr as d,Vr as i,Kr as u};