@serifpersia/dango 3.4.1 → 3.4.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (71) hide show
  1. package/README.md +1 -1
  2. package/client/dist/assets/{AnimeCard-B0oMgXBm.js → AnimeCard-CIwTZI3D.js} +1 -1
  3. package/client/dist/assets/{AnimeInfo-o0Udf0og.js → AnimeInfo-DlfvDaR8.js} +1 -1
  4. package/client/dist/assets/AnimeInfoPage-B3EPwtzx.js +2 -0
  5. package/client/dist/assets/{AnimeMetaDetails-BPvv5xIl.js → AnimeMetaDetails-BogOi_bM.js} +1 -1
  6. package/client/dist/assets/Asmr-DCirAWM6.js +2 -0
  7. package/client/dist/assets/{AsmrResetProgressModal-C9R7HlNa.js → AsmrResetProgressModal-BDpA07Fa.js} +1 -1
  8. package/client/dist/assets/{AvSyncCalibrator-Bo3820j3.js → AvSyncCalibrator-BroSW86T.js} +1 -1
  9. package/client/dist/assets/{ErrorMessage-z4f4WGgP.js → ErrorMessage-DAxegITP.js} +1 -1
  10. package/client/dist/assets/Home-B6bte0tw.css +1 -0
  11. package/client/dist/assets/Home-DEjYtHbs.js +1 -0
  12. package/client/dist/assets/{Insights-CRqBfZuK.js → Insights-B3b6u8RW.js} +1 -1
  13. package/client/dist/assets/{LibraryListPage-B_r51cRi.js → LibraryListPage-DWbcek1i.js} +1 -1
  14. package/client/dist/assets/{ListeningList-BWnwvJTt.js → ListeningList-CcuxBzy1.js} +1 -1
  15. package/client/dist/assets/{Manga-CI5cZg3h.js → Manga-DpLaW39C.js} +1 -1
  16. package/client/dist/assets/{MangaInfoPage-BtkOrO34.js → MangaInfoPage-B7FPC4a_.js} +1 -1
  17. package/client/dist/assets/{MangaReadPage-Uv72AYdY.js → MangaReadPage-Dx0qAAFe.js} +1 -1
  18. package/client/dist/assets/{MangaResetProgressModal-CPMEqZyi.js → MangaResetProgressModal-CYguBG2f.js} +1 -1
  19. package/client/dist/assets/{Map-Dj51g5zL.js → Map-BtXwpBOC.js} +1 -1
  20. package/client/dist/assets/{Mature-DXHWvoY5.js → Mature-AScDPmWW.js} +1 -1
  21. package/client/dist/assets/{MediaCard-DzA336CA.js → MediaCard-p29DqyKX.js} +1 -1
  22. package/client/dist/assets/Music-DFInMskb.js +1 -0
  23. package/client/dist/assets/{OptionListMenu-CpwxAC3J.js → OptionListMenu-C1pvpu8X.js} +1 -1
  24. package/client/dist/assets/{Player-CpMvWTkH.js → Player-D-8zY3cx.js} +3 -3
  25. package/client/dist/assets/{PlayerRedirect-D70t8VUW.js → PlayerRedirect-fv2tzEUu.js} +1 -1
  26. package/client/dist/assets/{PlayerSettings-pMU85k7p.js → PlayerSettings-CfJjs_0Q.js} +1 -1
  27. package/client/dist/assets/{QueueOptionsButton-1M7MdKzM.js → QueueOptionsButton-CWdoe1_I.js} +1 -1
  28. package/client/dist/assets/{QueueRail-Bpla2xD8.js → QueueRail-BBpn9CII.js} +1 -1
  29. package/client/dist/assets/{Radio-DlmTC-qG.js → Radio-DCgO5hAS.js} +1 -1
  30. package/client/dist/assets/{ReadingList-wJMDUybm.js → ReadingList-D4xQ9tlw.js} +1 -1
  31. package/client/dist/assets/{ResetProgressModal-CByRM1Fh.js → ResetProgressModal-JFlbXy7W.js} +1 -1
  32. package/client/dist/assets/{Search-B94D0tRM.js → Search-D-ocogP-.js} +1 -1
  33. package/client/dist/assets/{Settings-CcU3oNY8.js → Settings-BsFbgkdy.js} +1 -1
  34. package/client/dist/assets/{SkeletonGrid-BJyZkg_K.js → SkeletonGrid-N67HqYXx.js} +1 -1
  35. package/client/dist/assets/{SynopsisText-BcpwT5iw.js → SynopsisText-B3Sa5pRv.js} +1 -1
  36. package/client/dist/assets/{Trackers-vz-gqxtm.js → Trackers-C_SPMGKx.js} +1 -1
  37. package/client/dist/assets/{Tv-Rji_lvQo.js → Tv-D7s0Kqqx.js} +1 -1
  38. package/client/dist/assets/{TvInfo-Ciujd6os.js → TvInfo-CrmCSFDF.js} +1 -1
  39. package/client/dist/assets/{TvPopup-CqlVRF-Y.js → TvPopup-DEB6Ufq4.js} +1 -1
  40. package/client/dist/assets/{TvSearch-BcKXQue9.js → TvSearch-grOUL0Bc.js} +1 -1
  41. package/client/dist/assets/{TvWatchlist-sjsiup2h.js → TvWatchlist-CBI21Vge.js} +1 -1
  42. package/client/dist/assets/{VirtualKeyboard-6ZNTym4R.js → VirtualKeyboard-BmqZPZXR.js} +1 -1
  43. package/client/dist/assets/{Watchlist-DAMdvt7Z.js → Watchlist-5cDHUoC8.js} +1 -1
  44. package/client/dist/assets/{hls-Do_n10_Y.js → hls-DySVERd_.js} +1 -1
  45. package/client/dist/assets/index-Cc1Up_NI.css +1 -0
  46. package/client/dist/assets/index-HZNJp28e.js +178 -0
  47. package/client/dist/assets/{useAnimeInfoData-DU9X90no.js → useAnimeInfoData-BMwVSGhZ.js} +1 -1
  48. package/client/dist/assets/{useAsmr-D6cSjbvt.js → useAsmr-BLc7FwPm.js} +1 -1
  49. package/client/dist/assets/{useAsmrPopup-DK1Vx-HV.js → useAsmrPopup-CY-6b88q.js} +1 -1
  50. package/client/dist/assets/{useIsMobile-Dm_b6Ob3.js → useIsMobile-Dvx1uJ82.js} +1 -1
  51. package/client/dist/assets/{useMangaLibrary-DcxPn0RM.js → useMangaLibrary-XFRTq5Qg.js} +1 -1
  52. package/client/dist/assets/{useMangaPopup-BLwvRZn0.js → useMangaPopup-_pNXvRYJ.js} +1 -1
  53. package/client/dist/assets/{useMatureConsent-CT7-KfzG.js → useMatureConsent-Cra09TA0.js} +1 -1
  54. package/client/dist/assets/{useProviders-D3L1Chqc.js → useProviders-CKSedfqb.js} +1 -1
  55. package/client/dist/assets/{useTv-B546u-Rx.js → useTv-Dizj6G4R.js} +1 -1
  56. package/client/dist/assets/{useTvLibrary-C2rPeCVT.js → useTvLibrary-twjHQ89n.js} +1 -1
  57. package/client/dist/assets/{vendor-core-8R2fFbyN.js → vendor-core-DfaOB3Rn.js} +1 -1
  58. package/client/dist/assets/{vendor-icons-CDMuNDeL.js → vendor-icons-DrybRNxP.js} +1 -1
  59. package/client/dist/assets/{vendor-query-BUTye89G.js → vendor-query-BBT5_sHx.js} +1 -1
  60. package/client/dist/assets/{vendor-ui-CUDCvRS_.js → vendor-ui-3qrARCPr.js} +1 -1
  61. package/client/dist/index.html +5 -5
  62. package/orchestrator.js +0 -1
  63. package/package.json +2 -2
  64. package/server/package.json +1 -1
  65. package/client/dist/assets/AnimeInfoPage-CojMIEuf.js +0 -2
  66. package/client/dist/assets/Asmr-2V3yCCiK.js +0 -2
  67. package/client/dist/assets/Home-C8uXTzIM.js +0 -1
  68. package/client/dist/assets/Home-DtRtTuI9.css +0 -1
  69. package/client/dist/assets/Music-C4dM0BQx.js +0 -1
  70. package/client/dist/assets/index-B5SLDCAi.js +0 -178
  71. package/client/dist/assets/index-CUm1meqr.css +0 -1
@@ -1 +1 @@
1
- import{X as H,h as I,u as Tt,x as B,T as It,d as G,C as z,q as x}from"./vendor-core-8R2fFbyN.js";const ct=H(void 0),V=t=>{const e=B(ct);if(!e)throw new Error("No QueryClient set, use QueryClientProvider to set one");return e},ue=({client:t,children:e})=>(I(()=>(t.mount(),()=>{t.unmount()}),[t]),Tt(ct.Provider,{value:t,children:e})),Dt={setTimeout:(t,e)=>setTimeout(t,e),clearTimeout:t=>clearTimeout(t),setInterval:(t,e)=>setInterval(t,e),clearInterval:t=>clearInterval(t)};var xt=class{#e=Dt;#t=!1;setTimeoutProvider(t){this.#e=t}setTimeout(t,e){return this.#e.setTimeout(t,e)}clearTimeout(t){this.#e.clearTimeout(t)}setInterval(t,e){return this.#e.setInterval(t,e)}clearInterval(t){this.#e.clearInterval(t)}};const Q=new xt;function At(t){setTimeout(t,0)}const qt=typeof window>"u"||"Deno"in globalThis;function P(){}function Ut(t,e){return typeof t=="function"?t(e):t}function lt(t){return typeof t=="number"&&t>=0&&t!==1/0}function ft(t,e){return Math.max(t+(e||0)-Date.now(),0)}function m(t,e){return typeof t=="function"?t(e):t}function et(t,e){const{type:s="all",exact:i,fetchStatus:r,predicate:o,queryKey:n,stale:u}=t;if(n){if(i){if(e.queryHash!==W(n,e.options))return!1}else if(!M(e.queryKey,n))return!1}if(s!=="all"){const a=e.isActive();if(s==="active"&&!a||s==="inactive"&&a)return!1}return!(typeof u=="boolean"&&e.isStale()!==u||r&&r!==e.state.fetchStatus||o&&!o(e))}function st(t,e){const{exact:s,status:i,predicate:r,mutationKey:o}=t;if(o){if(!e.options.mutationKey)return!1;if(s){if(F(e.options.mutationKey)!==F(o))return!1}else if(!M(e.options.mutationKey,o))return!1}return!(i&&e.state.status!==i||r&&!r(e))}function W(t,e){return(e?.queryKeyHashFn||F)(t)}function F(t){return JSON.stringify(t,(e,s)=>k(s)?Object.keys(s).sort().reduce((i,r)=>(i[r]=s[r],i),{}):s)}function M(t,e){if(t===e)return!0;if(typeof t!=typeof e)return!1;if(t&&e&&typeof t=="object"&&typeof e=="object"){if(Array.isArray(t)&&Array.isArray(e)){for(let i=0;i<e.length;i++)if(!M(t[i],e[i]))return!1;return!0}const s=Object.keys(e);for(const i of s)if(!M(t[i],e[i]))return!1;return!0}return!1}const kt=Object.prototype.hasOwnProperty;function $(t,e,s=0){if(t===e)return t;if(s>500)return e;const i=it(t)&&it(e);if(!i&&!(k(t)&&k(e)))return e;const r=(i?t:Object.keys(t)).length,o=i?e:Object.keys(e),n=o.length,u=i?new Array(n):{};let a=0;for(let h=0;h<n;h++){const c=i?h:o[h],l=t[c],d=e[c];if(l===d){u[c]=l,(i?h<r:kt.call(t,c))&&a++;continue}if(l===null||d===null||typeof l!="object"||typeof d!="object"){u[c]=d;continue}const w=$(l,d,s+1);u[c]=w,w===l&&a++}return r===n&&a===r?t:u}function T(t,e){if(!e||Object.keys(t).length!==Object.keys(e).length)return!1;for(const s in t)if(t[s]!==e[s])return!1;return!0}function it(t){return Array.isArray(t)&&t.length===Object.keys(t).length}function k(t){if(!rt(t))return!1;const e=t.constructor;if(e===void 0)return!0;const s=e.prototype;return!(!rt(s)||!s.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(t)!==Object.prototype)}function rt(t){return Object.prototype.toString.call(t)==="[object Object]"}function jt(t){return new Promise(e=>{Q.setTimeout(e,t)})}function j(t,e,s){return typeof s.structuralSharing=="function"?s.structuralSharing(t,e):s.structuralSharing!==!1?$(t,e):e}function Kt(t,e,s=0){const i=[...t,e];return s&&i.length>s?i.slice(1):i}function Lt(t,e,s=0){const i=[e,...t];return s&&i.length>s?i.slice(0,-1):i}const J=Symbol();function dt(t,e){return!t.queryFn&&e?.initialPromise?()=>e.initialPromise:!t.queryFn||t.queryFn===J?()=>Promise.reject(new Error(`Missing queryFn: '${t.queryHash}'`)):t.queryFn}function X(t,e){return typeof t=="function"?t(...e):!!t}function Nt(t,e,s){let i=!1,r;return Object.defineProperty(t,"signal",{enumerable:!0,get:()=>(r??=e(),i||(i=!0,r.aborted?s():r.addEventListener("abort",s,{once:!0})),r)}),t}let _t=()=>qt;const Z=()=>_t();var E=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(t){return this.listeners.add(t),this.onSubscribe(),()=>{this.listeners.delete(t),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},Ht=class extends E{#e;#t;#s;constructor(){super(),this.#s=t=>{if(typeof window<"u"&&window.addEventListener){const e=()=>t();return window.addEventListener("visibilitychange",e,!1),()=>{window.removeEventListener("visibilitychange",e)}}}}onSubscribe(){this.#t||this.setEventListener(this.#s)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(t){this.#s=t,this.#t?.(),this.#t=t(e=>{typeof e=="boolean"?this.setFocused(e):this.onFocus()})}setFocused(t){this.#e!==t&&(this.#e=t,this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(e=>{e(t)})}isFocused(){return typeof this.#e=="boolean"?this.#e:globalThis.document?.visibilityState!=="hidden"}};const Y=new Ht,Bt=At;function Gt(){let t=[],e=0,s=u=>{u()},i=u=>{u()},r=Bt;const o=u=>{e?t.push(u):r(()=>{s(u)})},n=()=>{const u=t;t=[],u.length&&r(()=>{i(()=>{u.forEach(a=>{s(a)})})})};return{batch:u=>{let a;e++;try{a=u()}finally{e--,e||n()}return a},batchCalls:u=>(...a)=>{o(()=>{u(...a)})},schedule:o,setNotifyFunction:u=>{s=u},setBatchNotifyFunction:u=>{i=u},setScheduler:u=>{r=u}}}const v=Gt();var zt=class extends E{#e=!0;#t;#s;constructor(){super(),this.#s=t=>{if(typeof window<"u"&&window.addEventListener){const e=()=>t(!0),s=()=>t(!1);return window.addEventListener("online",e,!1),window.addEventListener("offline",s,!1),()=>{window.removeEventListener("online",e),window.removeEventListener("offline",s)}}}}onSubscribe(){this.#t||this.setEventListener(this.#s)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(t){this.#s=t,this.#t?.(),this.#t=t(this.setOnline.bind(this))}setOnline(t){this.#e!==t&&(this.#e=t,this.listeners.forEach(e=>{e(t)}))}isOnline(){return this.#e}};const A=new zt;function Vt(t){return Math.min(1e3*2**t,3e4)}function pt(t){return(t??"online")==="online"?A.isOnline():!0}var K=class extends Error{constructor(t){super("CancelledError"),this.revert=t?.revert,this.silent=t?.silent}};function yt(t){let e=!1,s=0,i,r="pending",o,n;const u=new Promise((g,R)=>{o=g,n=R});u.catch(P);const a=()=>r!=="pending",h=g=>{if(!a()){const R=new K(g);f(R),t.onCancel?.(R)}},c=()=>{e=!0},l=()=>{e=!1},d=()=>Y.isFocused()&&(t.networkMode==="always"||A.isOnline())&&t.canRun(),w=()=>pt(t.networkMode)&&t.canRun(),p=g=>{a()||(i?.(),r="resolved",o(g))},f=g=>{a()||(i?.(),r="rejected",n(g))},y=()=>new Promise(g=>{i=R=>{(a()||d())&&g(R)},t.onPause?.()}).then(()=>{i=void 0,a()||t.onContinue?.()}),b=()=>{if(a())return;let g;const R=s===0?t.initialPromise:void 0;try{g=R??t.fn()}catch(S){g=Promise.reject(S)}Promise.resolve(g).then(p).catch(S=>{if(a())return;const O=t.retry??(Z()?0:3),C=t.retryDelay??Vt,U=typeof C=="function"?C(s,S):C,Mt=O===!0||typeof O=="number"&&s<O||typeof O=="function"&&O(s,S);if(e||!Mt){f(S);return}s++,t.onFail?.(s,S),jt(U).then(()=>d()?void 0:y()).then(()=>{e?f(S):b()})})};return{promise:u,status:()=>r,cancel:h,continue:()=>(i?.(),u),cancelRetry:c,continueRetry:l,canStart:w,start:()=>(w()?b():y().then(b),u)}}var mt=class{#e;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),lt(this.gcTime)&&(this.#e=Q.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(t){this.gcTime=Math.max(this.gcTime||0,t??(Z()?1/0:3e5))}clearGcTimeout(){this.#e!==void 0&&(Q.clearTimeout(this.#e),this.#e=void 0)}};function Wt(t){return{onFetch:(e,s)=>{const i=e.options,r=e.fetchOptions?.meta?.fetchMore?.direction,o=e.state.data?.pages||[],n=e.state.data?.pageParams||[];let u={pages:[],pageParams:[]},a=0;const h=async()=>{let c=!1;const l=p=>{Nt(p,()=>e.signal,()=>c=!0)},d=dt(e.options,e.fetchOptions),w=async(p,f,y)=>{if(c)return Promise.reject(e.signal.reason);if(f==null&&p.pages.length)return Promise.resolve(p);const g=(()=>{const C={client:e.client,queryKey:e.queryKey,pageParam:f,direction:y?"backward":"forward",meta:e.options.meta};return l(C),C})(),R=await d(g),{maxPages:S}=e.options,O=y?Lt:Kt;return{pages:O(p.pages,R,S),pageParams:O(p.pageParams,f,S)}};if(r&&o.length){const p=r==="backward",f=p?vt:L,y={pages:o,pageParams:n};u=await w(y,f(i,y),p)}else{const p=t??o.length;do{const f=a===0?n[0]??i.initialPageParam:L(i,u);if(a>0&&f==null)break;u=await w(u,f),a++}while(a<p)}return u};e.options.persister?e.fetchFn=()=>e.options.persister?.(h,{client:e.client,queryKey:e.queryKey,meta:e.options.meta,signal:e.signal},s):e.fetchFn=h}}}function L(t,{pages:e,pageParams:s}){const i=e.length-1;return e.length>0?t.getNextPageParam(e[i],e,s[i],s):void 0}function vt(t,{pages:e,pageParams:s}){return e.length>0?t.getPreviousPageParam?.(e[0],e,s[0],s):void 0}function $t(t,e){return e?L(t,e)!=null:!1}function Jt(t,e){return!e||!t.getPreviousPageParam?!1:vt(t,e)!=null}var Xt=class extends mt{#e;#t;#s;#i;#r;#n;#a;#u;constructor(t){super(),this.#u=!1,this.#a=t.defaultOptions,this.setOptions(t.options),this.observers=[],this.#r=t.client,this.#i=this.#r.getQueryCache(),this.queryKey=t.queryKey,this.queryHash=t.queryHash,this.#t=at(this.options),this.state=t.state??this.#t,this.scheduleGc()}get meta(){return this.options.meta}get queryType(){return this.#e}get promise(){return this.#n?.promise}setOptions(t){if(this.options={...this.#a,...t},t?._type&&(this.#e=t._type),this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const e=at(this.options);e.data!==void 0&&(this.setState(nt(e.data,e.dataUpdatedAt)),this.#t=e)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&this.#i.remove(this)}setData(t,e){const s=j(this.state.data,t,this.options);return this.#o({data:s,type:"success",dataUpdatedAt:e?.updatedAt,manual:e?.manual}),s}setState(t){this.#o({type:"setState",state:t})}cancel(t){const e=this.#n?.promise;return this.#n?.cancel(t),e?e.then(P).catch(P):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return this.#t}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(t=>m(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===J||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>m(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:!ft(this.state.dataUpdatedAt,t)}onFocus(){this.observers.find(t=>t.shouldFetchOnWindowFocus())?.refetch({cancelRefetch:!1}),this.#n?.continue()}onOnline(){this.observers.find(t=>t.shouldFetchOnReconnect())?.refetch({cancelRefetch:!1}),this.#n?.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),this.#i.notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){const e=this.observers.indexOf(t);e!==-1&&(this.observers.splice(e,1),this.observers.length||(this.#n&&(this.#u||this.state.fetchStatus==="paused"&&this.state.status==="pending"?this.#n.cancel({revert:!0}):this.#n.cancelRetry()),this.scheduleGc()),this.#i.notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||this.#o({type:"invalidate"})}async fetch(t,e){if(this.state.fetchStatus!=="idle"&&this.#n?.status()!=="rejected"){if(this.state.data!==void 0&&e?.cancelRefetch)this.cancel({silent:!0});else if(this.#n)return this.#n.continueRetry(),this.#n.promise}if(t&&this.setOptions(t),!this.options.queryFn){const a=this.observers.find(h=>h.options.queryFn);a&&this.setOptions(a.options)}const s=new AbortController,i=a=>{Object.defineProperty(a,"signal",{enumerable:!0,get:()=>(this.#u=!0,s.signal)})},r=()=>{const a=dt(this.options,e),c=(()=>{const l={client:this.#r,queryKey:this.queryKey,meta:this.meta};return i(l),l})();return this.#u=!1,this.options.persister?this.options.persister(a,c,this):a(c)},n=(()=>{const a={fetchOptions:e,options:this.options,queryKey:this.queryKey,client:this.#r,state:this.state,fetchFn:r};return i(a),a})();(this.#e==="infinite"?Wt(this.options.pages):this.options.behavior)?.onFetch(n,this),this.#s=this.state,(this.state.fetchStatus==="idle"||this.state.fetchMeta!==n.fetchOptions?.meta)&&this.#o({type:"fetch",meta:n.fetchOptions?.meta});const u=this.#n=yt({initialPromise:e?.initialPromise,fn:n.fetchFn,onCancel:a=>{a instanceof K&&a.revert&&this.setState({...this.#s,fetchStatus:"idle"}),s.abort()},onFail:(a,h)=>{this.#o({type:"failed",failureCount:a,error:h})},onPause:()=>{this.#o({type:"pause"})},onContinue:()=>{this.#o({type:"continue"})},retry:n.options.retry,retryDelay:n.options.retryDelay,networkMode:n.options.networkMode,canRun:()=>!0});try{const a=await u.start();if(a===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(a),this.#i.config.onSuccess?.(a,this),this.#i.config.onSettled?.(a,this.state.error,this),a}catch(a){if(a instanceof K){if(a.silent)return this.#n.promise;if(a.revert){if(this.state.data===void 0)throw a;return this.state.data}}throw this.#o({type:"error",error:a}),this.#i.config.onError?.(a,this),this.#i.config.onSettled?.(this.state.data,a,this),a}finally{this.#n===u&&(this.#n=void 0),this.scheduleGc()}}#o(t){const e=s=>{switch(t.type){case"failed":return{...s,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...s,fetchStatus:"paused"};case"continue":return{...s,fetchStatus:"fetching"};case"fetch":return{...s,...gt(s.data,this.options),fetchMeta:t.meta??null};case"success":const i={...s,...nt(t.data,t.dataUpdatedAt),dataUpdateCount:s.dataUpdateCount+1,...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return this.#s=t.manual?i:void 0,i;case"error":const r=t.error;return{...s,error:r,errorUpdateCount:s.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:s.fetchFailureCount+1,fetchFailureReason:r,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...s,isInvalidated:!0};case"setState":return{...s,...t.state}}};this.state=e(this.state),v.batch(()=>{this.observers.slice().forEach(s=>{s.onQueryUpdate()}),this.#i.notify({query:this,type:"updated",action:t})})}};function gt(t,e){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:pt(e.networkMode)?"fetching":"paused",...t===void 0&&{error:null,status:"pending"}}}function nt(t,e){return{data:t,dataUpdatedAt:e??Date.now(),error:null,isInvalidated:!1,status:"success"}}function at(t){const e=typeof t.initialData=="function"?t.initialData():t.initialData,s=e!==void 0,i=s?typeof t.initialDataUpdatedAt=="function"?t.initialDataUpdatedAt():t.initialDataUpdatedAt:0;return{data:e,dataUpdateCount:0,dataUpdatedAt:s?i??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:s?"success":"pending",fetchStatus:"idle"}}var q=class extends E{#e;#t=void 0;#s=void 0;#i=void 0;#r;#n;#a;#u;#o;#d;#h;#c;#l;#p=new Set;constructor(t,e){super(),this.options=e,this.#e=t,this.#a=null,this.bindMethods(),this.setOptions(e)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.#t.addObserver(this),ot(this.#t,this.options)?this.#f():this.updateResult(),this.#b())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return N(this.#t,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return N(this.#t,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#O(),this.#w(),this.#t.removeObserver(this)}setOptions(t){const e=this.options,s=this.#t;if(this.options=this.#e.defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof m(this.options.enabled,this.#t)!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");this.#P(),this.#t.setOptions(this.options),e._defaulted&&!T(this.options,e)&&this.#e.getQueryCache().notify({type:"observerOptionsUpdated",query:this.#t,observer:this});const i=this.hasListeners();i&&ut(this.#t,s,this.options,e)&&this.#f(),this.updateResult(),i&&(this.#t!==s||m(this.options.enabled,this.#t)!==m(e.enabled,this.#t)||m(this.options.staleTime,this.#t)!==m(e.staleTime,this.#t))&&this.#m();const r=this.#v();i&&(this.#t!==s||m(this.options.enabled,this.#t)!==m(e.enabled,this.#t)||r!==this.#l)&&this.#g(r)}getOptimisticResult(t){const e=this.#e.getQueryCache().build(this.#e,t),s=this.createResult(e,t);return T(this.getCurrentResult(),s)||(this.#i=s,this.#n=this.options,this.#r=this.#t.state),s}getCurrentResult(){return this.#i}trackResult(t,e){return new Proxy(t,{get:(s,i)=>(this.trackProp(i),e?.(i),Reflect.get(s,i))})}trackProp(t){this.#p.add(t)}getCurrentQuery(){return this.#t}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const e=this.#e.defaultQueryOptions(t),s=this.#e.getQueryCache().build(this.#e,e);let i=()=>{},r;const o=new Promise(n=>{r=n,i=this.#e.getQueryCache().subscribe(u=>{u.type==="updated"&&u.query.queryHash===s.queryHash&&s.state.data!==void 0&&(i(),n(this.createResult(s,e)))})});return Promise.race([s.fetch().then(()=>{const n=this.createResult(s,e);return r?.(n),n}).finally(()=>{i()}),o])}fetch(t){return this.#f({...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#i))}#f(t){this.#P();let e=this.#t.fetch(this.options,t);return t?.throwOnError||(e=e.catch(P)),e}#y(t){return!Z()&&m(this.options.enabled,this.#t)!==!1&&lt(t)}#m(){this.#O();const t=m(this.options.staleTime,this.#t);if(this.#i.isStale||!this.#y(t))return;const e=ft(this.#i.dataUpdatedAt,t)+1;this.#h=Q.setTimeout(()=>{this.#i.isStale||this.updateResult()},e)}#v(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(this.#t):this.options.refetchInterval)??!1}#g(t){this.#w(),this.#l=t,!(this.#l===0||!this.#y(this.#l))&&(this.#c=Q.setInterval(()=>{(this.options.refetchIntervalInBackground||Y.isFocused())&&this.#f()},this.#l))}#b(){this.#m(),this.#g(this.#v())}#O(){this.#h!==void 0&&(Q.clearTimeout(this.#h),this.#h=void 0)}#w(){this.#c!==void 0&&(Q.clearInterval(this.#c),this.#c=void 0)}createResult(t,e){const s=this.#t,i=this.options,r=this.#i,o=this.#r,n=this.#n,u=t!==s?t.state:this.#s,{state:a}=t;let h={...a},c=!1,l;if(e._optimisticResults){const O=this.hasListeners(),C=!O&&ot(t,e),U=O&&ut(t,s,e,i);(C||U)&&(h={...h,...gt(a.data,t.options)}),e._optimisticResults==="isRestoring"&&(h.fetchStatus="idle")}let{error:d,errorUpdatedAt:w,status:p}=h;l=h.data;let f=!1;if(e.placeholderData!==void 0&&l===void 0&&p==="pending"){let O;r?.isPlaceholderData&&e.placeholderData===n?.placeholderData?(O=r.data,f=!0):O=typeof e.placeholderData=="function"?e.placeholderData(this.#d?.state.data,this.#d):e.placeholderData,O!==void 0&&(p="success",l=j(r?.data,O,e),c=!0)}if(e.select&&l!==void 0&&!f)if(r&&l===o?.data&&e.select===this.#u)l=this.#o;else try{this.#u=e.select,l=e.select(l),l=j(r?.data,l,e),this.#o=l,this.#a=null}catch(O){this.#a=O}else l===void 0&&(this.#a=null);this.#a&&(d=this.#a,l=this.#o,w=Date.now(),p="error",c=!1);const y=h.fetchStatus==="fetching",b=p==="pending",g=p==="error",R=b&&y,S=l!==void 0;return{status:p,fetchStatus:h.fetchStatus,isPending:b,isSuccess:p==="success",isError:g,isInitialLoading:R,isLoading:R,data:l,dataUpdatedAt:h.dataUpdatedAt,error:d,errorUpdatedAt:w,failureCount:h.fetchFailureCount,failureReason:h.fetchFailureReason,errorUpdateCount:h.errorUpdateCount,isFetched:t.isFetched(),isFetchedAfterMount:h.dataUpdateCount>u.dataUpdateCount||h.errorUpdateCount>u.errorUpdateCount,isFetching:y,isRefetching:y&&!b,isLoadingError:g&&!S,isPaused:h.fetchStatus==="paused",isPlaceholderData:c,isRefetchError:g&&S,isStale:tt(t,e),refetch:this.refetch,isEnabled:m(e.enabled,t)!==!1}}updateResult(){const t=this.#i,e=this.createResult(this.#t,this.options);if(this.#r=this.#t.state,this.#n=this.options,this.#r.data!==void 0&&(this.#d=this.#t),T(e,t))return;this.#i=e;const i=(()=>{if(!t)return!0;const{notifyOnChangeProps:r}=this.options,o=typeof r=="function"?r():r;if(o==="all"||!o&&!this.#p.size)return!0;const n=new Set(o??this.#p);return this.options.throwOnError&&n.add("error"),Object.keys(this.#i).some(u=>{const a=u;return this.#i[a]!==t[a]&&n.has(a)})})();v.batch(()=>{i&&this.listeners.forEach(r=>{r(this.#i)}),this.#e.getQueryCache().notify({query:this.#t,type:"observerResultsUpdated"})})}#P(){const t=this.#e.getQueryCache().build(this.#e,this.options);if(t===this.#t)return;const e=this.#t;this.#t=t,this.#s=t.state,this.hasListeners()&&(e?.removeObserver(this),t.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#b()}};function Zt(t,e){return m(e.enabled,t)!==!1&&t.state.data===void 0&&!(t.state.status==="error"&&m(e.retryOnMount,t)===!1)}function ot(t,e){return Zt(t,e)||t.state.data!==void 0&&N(t,e,e.refetchOnMount)}function N(t,e,s){if(m(e.enabled,t)!==!1&&m(e.staleTime,t)!=="static"){const i=typeof s=="function"?s(t):s;return i==="always"||i!==!1&&tt(t,e)}return!1}function ut(t,e,s,i){return(t!==e||m(i.enabled,t)===!1)&&(!s.suspense||t.state.status!=="error")&&tt(t,s)}function tt(t,e){return m(e.enabled,t)!==!1&&t.isStaleByTime(m(e.staleTime,t))}var Yt=class extends q{constructor(t,e){super(t,e)}bindMethods(){super.bindMethods(),this.fetchNextPage=this.fetchNextPage.bind(this),this.fetchPreviousPage=this.fetchPreviousPage.bind(this)}setOptions(t){t._type="infinite",super.setOptions(t)}getOptimisticResult(t){return t._type="infinite",super.getOptimisticResult(t)}fetchNextPage(t){return this.fetch({...t,meta:{fetchMore:{direction:"forward"}}})}fetchPreviousPage(t){return this.fetch({...t,meta:{fetchMore:{direction:"backward"}}})}createResult(t,e){const{state:s}=t,i=super.createResult(t,e),{isFetching:r,isRefetching:o,isError:n,isRefetchError:u}=i,a=s.fetchMeta?.fetchMore?.direction,h=n&&a==="forward",c=r&&a==="forward",l=n&&a==="backward",d=r&&a==="backward";return{...i,fetchNextPage:this.fetchNextPage,fetchPreviousPage:this.fetchPreviousPage,hasNextPage:$t(e,s.data),hasPreviousPage:Jt(e,s.data),isFetchNextPageError:h,isFetchingNextPage:c,isFetchPreviousPageError:l,isFetchingPreviousPage:d,isRefetchError:u&&!h&&!l,isRefetching:o&&!c&&!d}}},te=class extends mt{#e;#t;#s;#i;constructor(t){super(),this.#e=t.client,this.mutationId=t.mutationId,this.#s=t.mutationCache,this.#t=[],this.state=t.state||bt(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){this.#t.includes(t)||(this.#t.push(t),this.clearGcTimeout(),this.#s.notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){this.#t=this.#t.filter(e=>e!==t),this.scheduleGc(),this.#s.notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){this.#t.length||(this.state.status==="pending"?this.scheduleGc():this.#s.remove(this))}continue(){return this.#i?.continue()??(this.state.status==="pending"?this.execute(this.state.variables):Promise.resolve())}async execute(t){const e=()=>{this.#r({type:"continue"})},s={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey},i=this.#i=yt({fn:()=>this.options.mutationFn?this.options.mutationFn(t,s):Promise.reject(new Error("No mutationFn found")),onFail:(n,u)=>{this.#r({type:"failed",failureCount:n,error:u})},onPause:()=>{this.#r({type:"pause"})},onContinue:e,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#s.canRun(this)}),r=this.state.status==="pending",o=!i.canStart();try{if(r)e();else{this.#r({type:"pending",variables:t,isPaused:o}),this.#s.config.onMutate&&await this.#s.config.onMutate(t,this,s);const u=await this.options.onMutate?.(t,s);u!==this.state.context&&this.#r({type:"pending",context:u,variables:t,isPaused:o})}const n=await i.start();return await this.#s.config.onSuccess?.(n,t,this.state.context,this,s),await this.options.onSuccess?.(n,t,this.state.context,s),await this.#s.config.onSettled?.(n,null,this.state.variables,this.state.context,this,s),await this.options.onSettled?.(n,null,t,this.state.context,s),this.#r({type:"success",data:n}),n}catch(n){try{await this.#s.config.onError?.(n,t,this.state.context,this,s)}catch(u){Promise.reject(u)}try{await this.options.onError?.(n,t,this.state.context,s)}catch(u){Promise.reject(u)}try{await this.#s.config.onSettled?.(void 0,n,this.state.variables,this.state.context,this,s)}catch(u){Promise.reject(u)}try{await this.options.onSettled?.(void 0,n,t,this.state.context,s)}catch(u){Promise.reject(u)}throw this.#r({type:"error",error:n}),n}finally{this.#i===i&&(this.#i=void 0),this.#s.runNext(this)}}#r(t){const e=s=>{switch(t.type){case"failed":return{...s,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...s,isPaused:!0};case"continue":return{...s,isPaused:!1};case"pending":return{...s,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{...s,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...s,data:void 0,error:t.error,failureCount:s.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=e(this.state),v.batch(()=>{this.#t.forEach(s=>{s.onMutationUpdate(t)}),this.#s.notify({mutation:this,type:"updated",action:t})})}};function bt(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var ee=class extends E{#e;#t;#s;constructor(t={}){super(),this.config=t,this.#e=new Set,this.#t=new Map,this.#s=0}build(t,e,s){const i=new te({client:t,mutationCache:this,mutationId:++this.#s,options:t.defaultMutationOptions(e),state:s});return this.add(i),i}add(t){this.#e.add(t);const e=D(t);if(typeof e=="string"){const s=this.#t.get(e);s?s.push(t):this.#t.set(e,[t])}this.notify({type:"added",mutation:t})}remove(t){if(this.#e.delete(t)){const e=D(t);if(typeof e=="string"){const s=this.#t.get(e);if(s)if(s.length>1){const i=s.indexOf(t);i!==-1&&s.splice(i,1)}else s[0]===t&&this.#t.delete(e)}}this.notify({type:"removed",mutation:t})}canRun(t){const e=D(t);if(typeof e=="string"){const s=this.#t.get(e)?.find(i=>i.state.status==="pending");return!s||s===t}else return!0}runNext(t){const e=D(t);return typeof e=="string"?this.#t.get(e)?.find(s=>s!==t&&s.state.isPaused)?.continue()??Promise.resolve():Promise.resolve()}clear(){v.batch(()=>{this.#e.forEach(t=>{this.notify({type:"removed",mutation:t})}),this.#e.clear(),this.#t.clear()})}getAll(){return Array.from(this.#e)}find(t){const e={exact:!0,...t};return this.getAll().find(s=>st(e,s))}findAll(t={}){return this.getAll().filter(e=>st(t,e))}notify(t){v.batch(()=>{this.listeners.forEach(e=>{e(t)})})}resumePausedMutations(){const t=this.getAll().filter(e=>e.state.isPaused);return v.batch(()=>Promise.all(t.map(e=>e.continue().catch(P))))}};function D(t){return t.options.scope?.id}var se=class extends E{#e;#t=void 0;#s;#i;constructor(t,e){super(),this.#e=t,this.setOptions(e),this.bindMethods(),this.#r()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(t){const e=this.options;this.options=this.#e.defaultMutationOptions(t),T(this.options,e)||this.#e.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.#s,observer:this}),e?.mutationKey&&this.options.mutationKey&&F(e.mutationKey)!==F(this.options.mutationKey)?this.reset():this.#s?.state.status==="pending"&&this.#s.setOptions(this.options)}onSubscribe(){this.listeners.size===1&&this.#s&&(this.#s.addObserver(this),this.#r())}onUnsubscribe(){this.hasListeners()||this.#s?.removeObserver(this)}onMutationUpdate(t){this.#r(),this.#n(t)}getCurrentResult(){return this.#t}reset(){this.#s?.removeObserver(this),this.#s=void 0,this.#r(),this.#n()}mutate(t,e){return this.#i=e,this.#s?.removeObserver(this),this.#s=this.#e.getMutationCache().build(this.#e,this.options),this.#s.addObserver(this),this.#s.execute(t)}#r(){const t=this.#s?.state??bt();this.#t={...t,isPending:t.status==="pending",isSuccess:t.status==="success",isError:t.status==="error",isIdle:t.status==="idle",mutate:this.mutate,reset:this.reset}}#n(t){v.batch(()=>{if(this.#i&&this.hasListeners()){const e=this.#t.variables,s=this.#t.context,i={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};if(t?.type==="success"){try{this.#i.onSuccess?.(t.data,e,s,i)}catch(r){Promise.reject(r)}try{this.#i.onSettled?.(t.data,null,e,s,i)}catch(r){Promise.reject(r)}}else if(t?.type==="error"){try{this.#i.onError?.(t.error,e,s,i)}catch(r){Promise.reject(r)}try{this.#i.onSettled?.(void 0,t.error,e,s,i)}catch(r){Promise.reject(r)}}}this.listeners.forEach(e=>{e(this.#t)})})}};function ht(t,e){const s=new Set(e);return t.filter(i=>!s.has(i))}var ie=class extends E{#e;#t;#s;#i;#r;#n;#a;#u;#o;#d=[];constructor(t,e,s){super(),this.#e=t,this.#i=s,this.#s=[],this.#r=[],this.#t=[],this.setQueries(e)}onSubscribe(){this.listeners.size===1&&this.#r.forEach(t=>{t.subscribe(e=>{this.#f(t,e)})})}onUnsubscribe(){this.listeners.size||this.destroy()}destroy(){this.listeners=new Set,this.#r.forEach(t=>{t.destroy()})}setQueries(t,e){this.#s=t,this.#i=e,v.batch(()=>{const s=this.#r,i=this.#p(this.#s);i.forEach(c=>c.observer.setOptions(c.defaultedQueryOptions));const r=i.map(c=>c.observer),o=r.map(c=>c.getCurrentResult()),n=s.length!==r.length,u=r.some((c,l)=>c!==s[l]),a=n||u,h=a?!0:o.some((c,l)=>{const d=this.#t[l];return!d||!T(c,d)});!a&&!h||(a&&(this.#d=i,this.#r=r),this.#t=o,this.hasListeners()&&(a&&(ht(s,r).forEach(c=>{c.destroy()}),ht(r,s).forEach(c=>{c.subscribe(l=>{this.#f(c,l)})})),this.#y()))})}getCurrentResult(){return this.#t}getQueries(){return this.#r.map(t=>t.getCurrentQuery())}getObservers(){return this.#r}getOptimisticResult(t,e){const s=this.#p(t),i=s.map(o=>o.observer.getOptimisticResult(o.defaultedQueryOptions)),r=s.map(o=>o.defaultedQueryOptions.queryHash);return[i,o=>this.#c(o??i,e,r),()=>this.#h(i,s)]}#h(t,e){const s=new Set;return e.map((i,r)=>{const o=t[r];return i.defaultedQueryOptions.notifyOnChangeProps?o:i.observer.trackResult(o,n=>{s.has(n)||(s.add(n),e.forEach(u=>{u.observer.trackProp(n)}))})})}#c(t,e,s){if(e){const i=this.#o,r=s!==void 0&&i!==void 0&&(i.length!==s.length||s.some((o,n)=>o!==i[n]));return(this.#t!==this.#u||r||e!==this.#a)&&(this.#a=e,this.#u=this.#t,s!==void 0&&(this.#o=s),this.#n=$(this.#n,e(t))),this.#n}return t}#l(){return!this.#i?.combine||this.#r.some((t,e)=>t.options.suspense&&this.#t[e]?.data===void 0)}#p(t){const e=new Map;this.#r.forEach(i=>{const r=i.options.queryHash;if(!r)return;const o=e.get(r);o?o.push(i):e.set(r,[i])});const s=[];return t.forEach(i=>{const r=this.#e.defaultQueryOptions(i),o=e.get(r.queryHash)?.shift()??new q(this.#e,r);s.push({defaultedQueryOptions:r,observer:o})}),s}#f(t,e){const s=this.#r.indexOf(t);s!==-1&&(this.#t=this.#t.slice(),this.#t[s]=e,this.#y())}#y(){if(this.hasListeners()){const t=this.#l(),e=this.#n,s=t?e:this.#c(this.#h(this.#t,this.#d),this.#i?.combine);(t||e!==s)&&v.batch(()=>{this.listeners.forEach(i=>{i(this.#t)})})}}},re=class extends E{#e;constructor(t={}){super(),this.config=t,this.#e=new Map}build(t,e,s){const i=e.queryKey,r=e.queryHash??W(i,e);let o=this.get(r);return o||(o=new Xt({client:t,queryKey:i,queryHash:r,options:t.defaultQueryOptions(e),state:s,defaultOptions:t.getQueryDefaults(i)}),this.add(o)),o}add(t){this.#e.has(t.queryHash)||(this.#e.set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const e=this.#e.get(t.queryHash);e&&(t.destroy(),e===t&&this.#e.delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){v.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return this.#e.get(t)}getAll(){return[...this.#e.values()]}find(t){const e={exact:!0,...t};return this.getAll().find(s=>et(e,s))}findAll(t={}){const e=this.getAll();return Object.keys(t).length>0?e.filter(s=>et(t,s)):e}notify(t){v.batch(()=>{this.listeners.forEach(e=>{e(t)})})}onFocus(){v.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){v.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},he=class{#e;#t;#s;#i;#r;#n;#a;#u;constructor(t={}){this.#e=t.queryCache||new re,this.#t=t.mutationCache||new ee,this.#s=t.defaultOptions||{},this.#i=new Map,this.#r=new Map,this.#n=0}mount(){this.#n++,this.#n===1&&(this.#a=Y.subscribe(async t=>{t&&(await this.resumePausedMutations(),this.#e.onFocus())}),this.#u=A.subscribe(async t=>{t&&(await this.resumePausedMutations(),this.#e.onOnline())}))}unmount(){this.#n--,this.#n===0&&(this.#a?.(),this.#a=void 0,this.#u?.(),this.#u=void 0)}isFetching(t){return this.#e.findAll({...t,fetchStatus:"fetching"}).length}isMutating(t){return this.#t.findAll({...t,status:"pending"}).length}getQueryData(t){const e=this.defaultQueryOptions({queryKey:t});return this.#e.get(e.queryHash)?.state.data}ensureQueryData(t){const e=this.defaultQueryOptions(t),s=this.#e.build(this,e),i=s.state.data;return i===void 0?this.fetchQuery(t):(t.revalidateIfStale&&s.isStaleByTime(m(e.staleTime,s))&&this.prefetchQuery(e),Promise.resolve(i))}getQueriesData(t){return this.#e.findAll(t).map(({queryKey:e,state:s})=>[e,s.data])}setQueryData(t,e,s){const i=this.defaultQueryOptions({queryKey:t}),r=this.#e.get(i.queryHash)?.state.data,o=Ut(e,r);if(o!==void 0)return this.#e.build(this,i).setData(o,{...s,manual:!0})}setQueriesData(t,e,s){return v.batch(()=>this.#e.findAll(t).map(({queryKey:i})=>[i,this.setQueryData(i,e,s)]))}getQueryState(t){const e=this.defaultQueryOptions({queryKey:t});return this.#e.get(e.queryHash)?.state}removeQueries(t){const e=this.#e;v.batch(()=>{e.findAll(t).forEach(s=>{e.remove(s)})})}resetQueries(t,e){const s=this.#e;return v.batch(()=>{const i=s.findAll(t),r=new Set(i);return i.forEach(o=>{o.reset()}),this.refetchQueries({type:"active",predicate:o=>r.has(o)},e)})}cancelQueries(t,e={}){const s={revert:!0,...e},i=v.batch(()=>this.#e.findAll(t).map(r=>r.cancel(s)));return Promise.all(i).then(P).catch(P)}invalidateQueries(t,e={}){return v.batch(()=>(this.#e.findAll(t).forEach(s=>{s.invalidate()}),t?.refetchType==="none"?Promise.resolve():this.refetchQueries({...t,type:t?.refetchType??t?.type??"active"},e)))}refetchQueries(t,e={}){const s={...e,cancelRefetch:e.cancelRefetch??!0},i=v.batch(()=>this.#e.findAll(t).filter(r=>!r.isDisabled()&&!r.isStatic()).map(r=>{let o=r.fetch(void 0,s);return s.throwOnError||(o=o.catch(P)),r.state.fetchStatus==="paused"?Promise.resolve():o}));return Promise.all(i).then(P)}async query(t){const e=this.defaultQueryOptions(t);e.retry===void 0&&(e.retry=!1);const s=this.#e.build(this,e),i=s.isStaleByTime(m(e.staleTime,s))?await s.fetch(e):s.state.data,r=e.select;return r?r(i):i}fetchQuery(t){const e=this.defaultQueryOptions(t);e.retry===void 0&&(e.retry=!1);const s=this.#e.build(this,e);return s.isStaleByTime(m(e.staleTime,s))?s.fetch(e):Promise.resolve(s.state.data)}prefetchQuery(t){return this.fetchQuery(t).then(P).catch(P)}infiniteQuery(t){return t._type="infinite",this.query(t)}fetchInfiniteQuery(t){return t._type="infinite",this.fetchQuery(t)}prefetchInfiniteQuery(t){return this.fetchInfiniteQuery(t).then(P).catch(P)}ensureInfiniteQueryData(t){return t._type="infinite",this.ensureQueryData(t)}resumePausedMutations(){return A.isOnline()?this.#t.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#e}getMutationCache(){return this.#t}getDefaultOptions(){return this.#s}setDefaultOptions(t){this.#s=t}setQueryDefaults(t,e){this.#i.set(F(t),{queryKey:t,defaultOptions:e})}getQueryDefaults(t){const e=[...this.#i.values()],s={};return e.forEach(i=>{M(t,i.queryKey)&&Object.assign(s,i.defaultOptions)}),s}setMutationDefaults(t,e){this.#r.set(F(t),{mutationKey:t,defaultOptions:e})}getMutationDefaults(t){const e=[...this.#r.values()],s={};return e.forEach(i=>{M(t,i.mutationKey)&&Object.assign(s,i.defaultOptions)}),s}defaultQueryOptions(t){if(t._defaulted)return t;const e={...this.#s.queries,...this.getQueryDefaults(t.queryKey),...t,_defaulted:!0};return e.queryHash||(e.queryHash=W(e.queryKey,e)),e.refetchOnReconnect===void 0&&(e.refetchOnReconnect=e.networkMode!=="always"),e.throwOnError===void 0&&(e.throwOnError=!!e.suspense),!e.networkMode&&e.persister&&(e.networkMode="offlineFirst"),e.queryFn===J&&(e.enabled=!1),e}defaultMutationOptions(t){return t?._defaulted?t:{...this.#s.mutations,...t?.mutationKey&&this.getMutationDefaults(t.mutationKey),...t,_defaulted:!0}}clear(){this.#e.clear(),this.#t.clear()}};const Ot=H(!1),wt=()=>B(Ot);Ot.Provider;function ne(){let t=!1;return{clearReset:()=>{t=!1},reset:()=>{t=!0},isReset:()=>t}}const ae=H(ne()),Pt=()=>B(ae),Rt=(t,e,s)=>{const i=s?.state.error&&typeof t.throwOnError=="function"?X(t.throwOnError,[s.state.error,s]):t.throwOnError;(t.suspense||i)&&(e.isReset()||(t.retryOnMount=!1))},St=t=>{I(()=>{t.clearReset()},[t])},Ct=({result:t,errorResetBoundary:e,throwOnError:s,query:i,suspense:r})=>t.isError&&!e.isReset()&&!t.isFetching&&i&&(r&&t.data===void 0||X(s,[t.error,i])),Qt=t=>{if(t.suspense){const s=r=>r==="static"?r:Math.max(r??1e3,1e3),i=t.staleTime;t.staleTime=typeof i=="function"?(...r)=>s(i(...r)):s(i),typeof t.gcTime=="number"&&(t.gcTime=Math.max(t.gcTime,1e3))}},_=(t,e)=>t?.suspense&&e.isPending,Ft=(t,e,s)=>e.fetchOptimistic(t).catch(()=>{s.clearReset()});function ce({queries:t,...e},s){const i=V(),r=wt(),o=Pt(),n=e.subscribed!==!1,u=It(()=>t.map(f=>{const y=i.defaultQueryOptions(f);return y._optimisticResults=r?"isRestoring":n?"optimistic":void 0,y}),[t,i,r,n]);u.forEach(f=>{Qt(f);const y=i.getQueryCache().get(f.queryHash);Rt(f,o,y)}),St(o);const[a]=G(()=>new ie(i,u,e)),[h,c,l]=a.getOptimisticResult(u,e.combine),d=!r&&n;z(x(f=>d?a.subscribe(v.batchCalls(f)):P,[a,d]),()=>a.getCurrentResult()),I(()=>{a.setQueries(u,e)},[u,e,a]);const w=h.some((f,y)=>_(u[y],f))?h.flatMap((f,y)=>{const b=u[y];if(b&&_(b,f)){const g=new q(i,b);return Ft(b,g,o)}return[]}):[];if(w.length>0)throw Promise.all(w);const p=h.find((f,y)=>{const b=u[y];return b&&Ct({result:f,errorResetBoundary:o,throwOnError:b.throwOnError,query:i.getQueryCache().get(b.queryHash),suspense:b.suspense})});if(p)throw p.error;return c(l())}function Et(t,e,s){const i=wt(),r=Pt(),o=V(),n=o.defaultQueryOptions(t),u=o.getQueryCache().get(n.queryHash),a=t.subscribed!==!1;n._optimisticResults=i?"isRestoring":a?"optimistic":void 0,Qt(n),Rt(n,r,u),St(r);const[h]=G(()=>new e(o,n)),c=h.getOptimisticResult(n),l=!i&&a;if(z(x(d=>{const w=l?h.subscribe(v.batchCalls(d)):P;return h.updateResult(),w},[h,l]),()=>h.getCurrentResult()),I(()=>{h.setOptions(n)},[n,h]),_(n,c))throw Ft(n,h,r);if(Ct({result:c,errorResetBoundary:r,throwOnError:n.throwOnError,query:u,suspense:n.suspense}))throw c.error;return n.notifyOnChangeProps?c:h.trackResult(c)}function le(t,e){return Et(t,q)}function fe(t){return t}function de(t){return t}function pe(t,e){const s=V(),[i]=G(()=>new se(s,t));I(()=>{i.setOptions(t)},[i,t]);const r=z(x(n=>i.subscribe(v.batchCalls(n)),[i]),()=>i.getCurrentResult()),o=x((...n)=>{i.mutate(n[0],n[1]).catch(P)},[i]);if(r.error&&X(i.options.throwOnError,[r.error]))throw r.error;return{...r,mutate:o,mutateAsync:r.mutate}}function ye(t,e){return Et(t,Yt)}export{he as Q,pe as a,le as b,ye as c,ue as d,ce as e,de as i,fe as q,J as s,V as u};
1
+ import{X as H,h as I,u as Tt,x as B,T as It,d as G,C as z,q as x}from"./vendor-core-DfaOB3Rn.js";const ct=H(void 0),V=t=>{const e=B(ct);if(!e)throw new Error("No QueryClient set, use QueryClientProvider to set one");return e},ue=({client:t,children:e})=>(I(()=>(t.mount(),()=>{t.unmount()}),[t]),Tt(ct.Provider,{value:t,children:e})),Dt={setTimeout:(t,e)=>setTimeout(t,e),clearTimeout:t=>clearTimeout(t),setInterval:(t,e)=>setInterval(t,e),clearInterval:t=>clearInterval(t)};var xt=class{#e=Dt;#t=!1;setTimeoutProvider(t){this.#e=t}setTimeout(t,e){return this.#e.setTimeout(t,e)}clearTimeout(t){this.#e.clearTimeout(t)}setInterval(t,e){return this.#e.setInterval(t,e)}clearInterval(t){this.#e.clearInterval(t)}};const Q=new xt;function At(t){setTimeout(t,0)}const qt=typeof window>"u"||"Deno"in globalThis;function P(){}function Ut(t,e){return typeof t=="function"?t(e):t}function lt(t){return typeof t=="number"&&t>=0&&t!==1/0}function ft(t,e){return Math.max(t+(e||0)-Date.now(),0)}function m(t,e){return typeof t=="function"?t(e):t}function et(t,e){const{type:s="all",exact:i,fetchStatus:r,predicate:o,queryKey:n,stale:u}=t;if(n){if(i){if(e.queryHash!==W(n,e.options))return!1}else if(!M(e.queryKey,n))return!1}if(s!=="all"){const a=e.isActive();if(s==="active"&&!a||s==="inactive"&&a)return!1}return!(typeof u=="boolean"&&e.isStale()!==u||r&&r!==e.state.fetchStatus||o&&!o(e))}function st(t,e){const{exact:s,status:i,predicate:r,mutationKey:o}=t;if(o){if(!e.options.mutationKey)return!1;if(s){if(F(e.options.mutationKey)!==F(o))return!1}else if(!M(e.options.mutationKey,o))return!1}return!(i&&e.state.status!==i||r&&!r(e))}function W(t,e){return(e?.queryKeyHashFn||F)(t)}function F(t){return JSON.stringify(t,(e,s)=>k(s)?Object.keys(s).sort().reduce((i,r)=>(i[r]=s[r],i),{}):s)}function M(t,e){if(t===e)return!0;if(typeof t!=typeof e)return!1;if(t&&e&&typeof t=="object"&&typeof e=="object"){if(Array.isArray(t)&&Array.isArray(e)){for(let i=0;i<e.length;i++)if(!M(t[i],e[i]))return!1;return!0}const s=Object.keys(e);for(const i of s)if(!M(t[i],e[i]))return!1;return!0}return!1}const kt=Object.prototype.hasOwnProperty;function $(t,e,s=0){if(t===e)return t;if(s>500)return e;const i=it(t)&&it(e);if(!i&&!(k(t)&&k(e)))return e;const r=(i?t:Object.keys(t)).length,o=i?e:Object.keys(e),n=o.length,u=i?new Array(n):{};let a=0;for(let h=0;h<n;h++){const c=i?h:o[h],l=t[c],d=e[c];if(l===d){u[c]=l,(i?h<r:kt.call(t,c))&&a++;continue}if(l===null||d===null||typeof l!="object"||typeof d!="object"){u[c]=d;continue}const w=$(l,d,s+1);u[c]=w,w===l&&a++}return r===n&&a===r?t:u}function T(t,e){if(!e||Object.keys(t).length!==Object.keys(e).length)return!1;for(const s in t)if(t[s]!==e[s])return!1;return!0}function it(t){return Array.isArray(t)&&t.length===Object.keys(t).length}function k(t){if(!rt(t))return!1;const e=t.constructor;if(e===void 0)return!0;const s=e.prototype;return!(!rt(s)||!s.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(t)!==Object.prototype)}function rt(t){return Object.prototype.toString.call(t)==="[object Object]"}function jt(t){return new Promise(e=>{Q.setTimeout(e,t)})}function j(t,e,s){return typeof s.structuralSharing=="function"?s.structuralSharing(t,e):s.structuralSharing!==!1?$(t,e):e}function Kt(t,e,s=0){const i=[...t,e];return s&&i.length>s?i.slice(1):i}function Lt(t,e,s=0){const i=[e,...t];return s&&i.length>s?i.slice(0,-1):i}const J=Symbol();function dt(t,e){return!t.queryFn&&e?.initialPromise?()=>e.initialPromise:!t.queryFn||t.queryFn===J?()=>Promise.reject(new Error(`Missing queryFn: '${t.queryHash}'`)):t.queryFn}function X(t,e){return typeof t=="function"?t(...e):!!t}function Nt(t,e,s){let i=!1,r;return Object.defineProperty(t,"signal",{enumerable:!0,get:()=>(r??=e(),i||(i=!0,r.aborted?s():r.addEventListener("abort",s,{once:!0})),r)}),t}let _t=()=>qt;const Z=()=>_t();var E=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(t){return this.listeners.add(t),this.onSubscribe(),()=>{this.listeners.delete(t),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},Ht=class extends E{#e;#t;#s;constructor(){super(),this.#s=t=>{if(typeof window<"u"&&window.addEventListener){const e=()=>t();return window.addEventListener("visibilitychange",e,!1),()=>{window.removeEventListener("visibilitychange",e)}}}}onSubscribe(){this.#t||this.setEventListener(this.#s)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(t){this.#s=t,this.#t?.(),this.#t=t(e=>{typeof e=="boolean"?this.setFocused(e):this.onFocus()})}setFocused(t){this.#e!==t&&(this.#e=t,this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(e=>{e(t)})}isFocused(){return typeof this.#e=="boolean"?this.#e:globalThis.document?.visibilityState!=="hidden"}};const Y=new Ht,Bt=At;function Gt(){let t=[],e=0,s=u=>{u()},i=u=>{u()},r=Bt;const o=u=>{e?t.push(u):r(()=>{s(u)})},n=()=>{const u=t;t=[],u.length&&r(()=>{i(()=>{u.forEach(a=>{s(a)})})})};return{batch:u=>{let a;e++;try{a=u()}finally{e--,e||n()}return a},batchCalls:u=>(...a)=>{o(()=>{u(...a)})},schedule:o,setNotifyFunction:u=>{s=u},setBatchNotifyFunction:u=>{i=u},setScheduler:u=>{r=u}}}const v=Gt();var zt=class extends E{#e=!0;#t;#s;constructor(){super(),this.#s=t=>{if(typeof window<"u"&&window.addEventListener){const e=()=>t(!0),s=()=>t(!1);return window.addEventListener("online",e,!1),window.addEventListener("offline",s,!1),()=>{window.removeEventListener("online",e),window.removeEventListener("offline",s)}}}}onSubscribe(){this.#t||this.setEventListener(this.#s)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(t){this.#s=t,this.#t?.(),this.#t=t(this.setOnline.bind(this))}setOnline(t){this.#e!==t&&(this.#e=t,this.listeners.forEach(e=>{e(t)}))}isOnline(){return this.#e}};const A=new zt;function Vt(t){return Math.min(1e3*2**t,3e4)}function pt(t){return(t??"online")==="online"?A.isOnline():!0}var K=class extends Error{constructor(t){super("CancelledError"),this.revert=t?.revert,this.silent=t?.silent}};function yt(t){let e=!1,s=0,i,r="pending",o,n;const u=new Promise((g,R)=>{o=g,n=R});u.catch(P);const a=()=>r!=="pending",h=g=>{if(!a()){const R=new K(g);f(R),t.onCancel?.(R)}},c=()=>{e=!0},l=()=>{e=!1},d=()=>Y.isFocused()&&(t.networkMode==="always"||A.isOnline())&&t.canRun(),w=()=>pt(t.networkMode)&&t.canRun(),p=g=>{a()||(i?.(),r="resolved",o(g))},f=g=>{a()||(i?.(),r="rejected",n(g))},y=()=>new Promise(g=>{i=R=>{(a()||d())&&g(R)},t.onPause?.()}).then(()=>{i=void 0,a()||t.onContinue?.()}),b=()=>{if(a())return;let g;const R=s===0?t.initialPromise:void 0;try{g=R??t.fn()}catch(S){g=Promise.reject(S)}Promise.resolve(g).then(p).catch(S=>{if(a())return;const O=t.retry??(Z()?0:3),C=t.retryDelay??Vt,U=typeof C=="function"?C(s,S):C,Mt=O===!0||typeof O=="number"&&s<O||typeof O=="function"&&O(s,S);if(e||!Mt){f(S);return}s++,t.onFail?.(s,S),jt(U).then(()=>d()?void 0:y()).then(()=>{e?f(S):b()})})};return{promise:u,status:()=>r,cancel:h,continue:()=>(i?.(),u),cancelRetry:c,continueRetry:l,canStart:w,start:()=>(w()?b():y().then(b),u)}}var mt=class{#e;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),lt(this.gcTime)&&(this.#e=Q.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(t){this.gcTime=Math.max(this.gcTime||0,t??(Z()?1/0:3e5))}clearGcTimeout(){this.#e!==void 0&&(Q.clearTimeout(this.#e),this.#e=void 0)}};function Wt(t){return{onFetch:(e,s)=>{const i=e.options,r=e.fetchOptions?.meta?.fetchMore?.direction,o=e.state.data?.pages||[],n=e.state.data?.pageParams||[];let u={pages:[],pageParams:[]},a=0;const h=async()=>{let c=!1;const l=p=>{Nt(p,()=>e.signal,()=>c=!0)},d=dt(e.options,e.fetchOptions),w=async(p,f,y)=>{if(c)return Promise.reject(e.signal.reason);if(f==null&&p.pages.length)return Promise.resolve(p);const g=(()=>{const C={client:e.client,queryKey:e.queryKey,pageParam:f,direction:y?"backward":"forward",meta:e.options.meta};return l(C),C})(),R=await d(g),{maxPages:S}=e.options,O=y?Lt:Kt;return{pages:O(p.pages,R,S),pageParams:O(p.pageParams,f,S)}};if(r&&o.length){const p=r==="backward",f=p?vt:L,y={pages:o,pageParams:n};u=await w(y,f(i,y),p)}else{const p=t??o.length;do{const f=a===0?n[0]??i.initialPageParam:L(i,u);if(a>0&&f==null)break;u=await w(u,f),a++}while(a<p)}return u};e.options.persister?e.fetchFn=()=>e.options.persister?.(h,{client:e.client,queryKey:e.queryKey,meta:e.options.meta,signal:e.signal},s):e.fetchFn=h}}}function L(t,{pages:e,pageParams:s}){const i=e.length-1;return e.length>0?t.getNextPageParam(e[i],e,s[i],s):void 0}function vt(t,{pages:e,pageParams:s}){return e.length>0?t.getPreviousPageParam?.(e[0],e,s[0],s):void 0}function $t(t,e){return e?L(t,e)!=null:!1}function Jt(t,e){return!e||!t.getPreviousPageParam?!1:vt(t,e)!=null}var Xt=class extends mt{#e;#t;#s;#i;#r;#n;#a;#u;constructor(t){super(),this.#u=!1,this.#a=t.defaultOptions,this.setOptions(t.options),this.observers=[],this.#r=t.client,this.#i=this.#r.getQueryCache(),this.queryKey=t.queryKey,this.queryHash=t.queryHash,this.#t=at(this.options),this.state=t.state??this.#t,this.scheduleGc()}get meta(){return this.options.meta}get queryType(){return this.#e}get promise(){return this.#n?.promise}setOptions(t){if(this.options={...this.#a,...t},t?._type&&(this.#e=t._type),this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const e=at(this.options);e.data!==void 0&&(this.setState(nt(e.data,e.dataUpdatedAt)),this.#t=e)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&this.#i.remove(this)}setData(t,e){const s=j(this.state.data,t,this.options);return this.#o({data:s,type:"success",dataUpdatedAt:e?.updatedAt,manual:e?.manual}),s}setState(t){this.#o({type:"setState",state:t})}cancel(t){const e=this.#n?.promise;return this.#n?.cancel(t),e?e.then(P).catch(P):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return this.#t}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(t=>m(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===J||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>m(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:!ft(this.state.dataUpdatedAt,t)}onFocus(){this.observers.find(t=>t.shouldFetchOnWindowFocus())?.refetch({cancelRefetch:!1}),this.#n?.continue()}onOnline(){this.observers.find(t=>t.shouldFetchOnReconnect())?.refetch({cancelRefetch:!1}),this.#n?.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),this.#i.notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){const e=this.observers.indexOf(t);e!==-1&&(this.observers.splice(e,1),this.observers.length||(this.#n&&(this.#u||this.state.fetchStatus==="paused"&&this.state.status==="pending"?this.#n.cancel({revert:!0}):this.#n.cancelRetry()),this.scheduleGc()),this.#i.notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||this.#o({type:"invalidate"})}async fetch(t,e){if(this.state.fetchStatus!=="idle"&&this.#n?.status()!=="rejected"){if(this.state.data!==void 0&&e?.cancelRefetch)this.cancel({silent:!0});else if(this.#n)return this.#n.continueRetry(),this.#n.promise}if(t&&this.setOptions(t),!this.options.queryFn){const a=this.observers.find(h=>h.options.queryFn);a&&this.setOptions(a.options)}const s=new AbortController,i=a=>{Object.defineProperty(a,"signal",{enumerable:!0,get:()=>(this.#u=!0,s.signal)})},r=()=>{const a=dt(this.options,e),c=(()=>{const l={client:this.#r,queryKey:this.queryKey,meta:this.meta};return i(l),l})();return this.#u=!1,this.options.persister?this.options.persister(a,c,this):a(c)},n=(()=>{const a={fetchOptions:e,options:this.options,queryKey:this.queryKey,client:this.#r,state:this.state,fetchFn:r};return i(a),a})();(this.#e==="infinite"?Wt(this.options.pages):this.options.behavior)?.onFetch(n,this),this.#s=this.state,(this.state.fetchStatus==="idle"||this.state.fetchMeta!==n.fetchOptions?.meta)&&this.#o({type:"fetch",meta:n.fetchOptions?.meta});const u=this.#n=yt({initialPromise:e?.initialPromise,fn:n.fetchFn,onCancel:a=>{a instanceof K&&a.revert&&this.setState({...this.#s,fetchStatus:"idle"}),s.abort()},onFail:(a,h)=>{this.#o({type:"failed",failureCount:a,error:h})},onPause:()=>{this.#o({type:"pause"})},onContinue:()=>{this.#o({type:"continue"})},retry:n.options.retry,retryDelay:n.options.retryDelay,networkMode:n.options.networkMode,canRun:()=>!0});try{const a=await u.start();if(a===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(a),this.#i.config.onSuccess?.(a,this),this.#i.config.onSettled?.(a,this.state.error,this),a}catch(a){if(a instanceof K){if(a.silent)return this.#n.promise;if(a.revert){if(this.state.data===void 0)throw a;return this.state.data}}throw this.#o({type:"error",error:a}),this.#i.config.onError?.(a,this),this.#i.config.onSettled?.(this.state.data,a,this),a}finally{this.#n===u&&(this.#n=void 0),this.scheduleGc()}}#o(t){const e=s=>{switch(t.type){case"failed":return{...s,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...s,fetchStatus:"paused"};case"continue":return{...s,fetchStatus:"fetching"};case"fetch":return{...s,...gt(s.data,this.options),fetchMeta:t.meta??null};case"success":const i={...s,...nt(t.data,t.dataUpdatedAt),dataUpdateCount:s.dataUpdateCount+1,...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return this.#s=t.manual?i:void 0,i;case"error":const r=t.error;return{...s,error:r,errorUpdateCount:s.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:s.fetchFailureCount+1,fetchFailureReason:r,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...s,isInvalidated:!0};case"setState":return{...s,...t.state}}};this.state=e(this.state),v.batch(()=>{this.observers.slice().forEach(s=>{s.onQueryUpdate()}),this.#i.notify({query:this,type:"updated",action:t})})}};function gt(t,e){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:pt(e.networkMode)?"fetching":"paused",...t===void 0&&{error:null,status:"pending"}}}function nt(t,e){return{data:t,dataUpdatedAt:e??Date.now(),error:null,isInvalidated:!1,status:"success"}}function at(t){const e=typeof t.initialData=="function"?t.initialData():t.initialData,s=e!==void 0,i=s?typeof t.initialDataUpdatedAt=="function"?t.initialDataUpdatedAt():t.initialDataUpdatedAt:0;return{data:e,dataUpdateCount:0,dataUpdatedAt:s?i??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:s?"success":"pending",fetchStatus:"idle"}}var q=class extends E{#e;#t=void 0;#s=void 0;#i=void 0;#r;#n;#a;#u;#o;#d;#h;#c;#l;#p=new Set;constructor(t,e){super(),this.options=e,this.#e=t,this.#a=null,this.bindMethods(),this.setOptions(e)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.#t.addObserver(this),ot(this.#t,this.options)?this.#f():this.updateResult(),this.#b())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return N(this.#t,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return N(this.#t,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#O(),this.#w(),this.#t.removeObserver(this)}setOptions(t){const e=this.options,s=this.#t;if(this.options=this.#e.defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof m(this.options.enabled,this.#t)!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");this.#P(),this.#t.setOptions(this.options),e._defaulted&&!T(this.options,e)&&this.#e.getQueryCache().notify({type:"observerOptionsUpdated",query:this.#t,observer:this});const i=this.hasListeners();i&&ut(this.#t,s,this.options,e)&&this.#f(),this.updateResult(),i&&(this.#t!==s||m(this.options.enabled,this.#t)!==m(e.enabled,this.#t)||m(this.options.staleTime,this.#t)!==m(e.staleTime,this.#t))&&this.#m();const r=this.#v();i&&(this.#t!==s||m(this.options.enabled,this.#t)!==m(e.enabled,this.#t)||r!==this.#l)&&this.#g(r)}getOptimisticResult(t){const e=this.#e.getQueryCache().build(this.#e,t),s=this.createResult(e,t);return T(this.getCurrentResult(),s)||(this.#i=s,this.#n=this.options,this.#r=this.#t.state),s}getCurrentResult(){return this.#i}trackResult(t,e){return new Proxy(t,{get:(s,i)=>(this.trackProp(i),e?.(i),Reflect.get(s,i))})}trackProp(t){this.#p.add(t)}getCurrentQuery(){return this.#t}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const e=this.#e.defaultQueryOptions(t),s=this.#e.getQueryCache().build(this.#e,e);let i=()=>{},r;const o=new Promise(n=>{r=n,i=this.#e.getQueryCache().subscribe(u=>{u.type==="updated"&&u.query.queryHash===s.queryHash&&s.state.data!==void 0&&(i(),n(this.createResult(s,e)))})});return Promise.race([s.fetch().then(()=>{const n=this.createResult(s,e);return r?.(n),n}).finally(()=>{i()}),o])}fetch(t){return this.#f({...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#i))}#f(t){this.#P();let e=this.#t.fetch(this.options,t);return t?.throwOnError||(e=e.catch(P)),e}#y(t){return!Z()&&m(this.options.enabled,this.#t)!==!1&&lt(t)}#m(){this.#O();const t=m(this.options.staleTime,this.#t);if(this.#i.isStale||!this.#y(t))return;const e=ft(this.#i.dataUpdatedAt,t)+1;this.#h=Q.setTimeout(()=>{this.#i.isStale||this.updateResult()},e)}#v(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(this.#t):this.options.refetchInterval)??!1}#g(t){this.#w(),this.#l=t,!(this.#l===0||!this.#y(this.#l))&&(this.#c=Q.setInterval(()=>{(this.options.refetchIntervalInBackground||Y.isFocused())&&this.#f()},this.#l))}#b(){this.#m(),this.#g(this.#v())}#O(){this.#h!==void 0&&(Q.clearTimeout(this.#h),this.#h=void 0)}#w(){this.#c!==void 0&&(Q.clearInterval(this.#c),this.#c=void 0)}createResult(t,e){const s=this.#t,i=this.options,r=this.#i,o=this.#r,n=this.#n,u=t!==s?t.state:this.#s,{state:a}=t;let h={...a},c=!1,l;if(e._optimisticResults){const O=this.hasListeners(),C=!O&&ot(t,e),U=O&&ut(t,s,e,i);(C||U)&&(h={...h,...gt(a.data,t.options)}),e._optimisticResults==="isRestoring"&&(h.fetchStatus="idle")}let{error:d,errorUpdatedAt:w,status:p}=h;l=h.data;let f=!1;if(e.placeholderData!==void 0&&l===void 0&&p==="pending"){let O;r?.isPlaceholderData&&e.placeholderData===n?.placeholderData?(O=r.data,f=!0):O=typeof e.placeholderData=="function"?e.placeholderData(this.#d?.state.data,this.#d):e.placeholderData,O!==void 0&&(p="success",l=j(r?.data,O,e),c=!0)}if(e.select&&l!==void 0&&!f)if(r&&l===o?.data&&e.select===this.#u)l=this.#o;else try{this.#u=e.select,l=e.select(l),l=j(r?.data,l,e),this.#o=l,this.#a=null}catch(O){this.#a=O}else l===void 0&&(this.#a=null);this.#a&&(d=this.#a,l=this.#o,w=Date.now(),p="error",c=!1);const y=h.fetchStatus==="fetching",b=p==="pending",g=p==="error",R=b&&y,S=l!==void 0;return{status:p,fetchStatus:h.fetchStatus,isPending:b,isSuccess:p==="success",isError:g,isInitialLoading:R,isLoading:R,data:l,dataUpdatedAt:h.dataUpdatedAt,error:d,errorUpdatedAt:w,failureCount:h.fetchFailureCount,failureReason:h.fetchFailureReason,errorUpdateCount:h.errorUpdateCount,isFetched:t.isFetched(),isFetchedAfterMount:h.dataUpdateCount>u.dataUpdateCount||h.errorUpdateCount>u.errorUpdateCount,isFetching:y,isRefetching:y&&!b,isLoadingError:g&&!S,isPaused:h.fetchStatus==="paused",isPlaceholderData:c,isRefetchError:g&&S,isStale:tt(t,e),refetch:this.refetch,isEnabled:m(e.enabled,t)!==!1}}updateResult(){const t=this.#i,e=this.createResult(this.#t,this.options);if(this.#r=this.#t.state,this.#n=this.options,this.#r.data!==void 0&&(this.#d=this.#t),T(e,t))return;this.#i=e;const i=(()=>{if(!t)return!0;const{notifyOnChangeProps:r}=this.options,o=typeof r=="function"?r():r;if(o==="all"||!o&&!this.#p.size)return!0;const n=new Set(o??this.#p);return this.options.throwOnError&&n.add("error"),Object.keys(this.#i).some(u=>{const a=u;return this.#i[a]!==t[a]&&n.has(a)})})();v.batch(()=>{i&&this.listeners.forEach(r=>{r(this.#i)}),this.#e.getQueryCache().notify({query:this.#t,type:"observerResultsUpdated"})})}#P(){const t=this.#e.getQueryCache().build(this.#e,this.options);if(t===this.#t)return;const e=this.#t;this.#t=t,this.#s=t.state,this.hasListeners()&&(e?.removeObserver(this),t.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#b()}};function Zt(t,e){return m(e.enabled,t)!==!1&&t.state.data===void 0&&!(t.state.status==="error"&&m(e.retryOnMount,t)===!1)}function ot(t,e){return Zt(t,e)||t.state.data!==void 0&&N(t,e,e.refetchOnMount)}function N(t,e,s){if(m(e.enabled,t)!==!1&&m(e.staleTime,t)!=="static"){const i=typeof s=="function"?s(t):s;return i==="always"||i!==!1&&tt(t,e)}return!1}function ut(t,e,s,i){return(t!==e||m(i.enabled,t)===!1)&&(!s.suspense||t.state.status!=="error")&&tt(t,s)}function tt(t,e){return m(e.enabled,t)!==!1&&t.isStaleByTime(m(e.staleTime,t))}var Yt=class extends q{constructor(t,e){super(t,e)}bindMethods(){super.bindMethods(),this.fetchNextPage=this.fetchNextPage.bind(this),this.fetchPreviousPage=this.fetchPreviousPage.bind(this)}setOptions(t){t._type="infinite",super.setOptions(t)}getOptimisticResult(t){return t._type="infinite",super.getOptimisticResult(t)}fetchNextPage(t){return this.fetch({...t,meta:{fetchMore:{direction:"forward"}}})}fetchPreviousPage(t){return this.fetch({...t,meta:{fetchMore:{direction:"backward"}}})}createResult(t,e){const{state:s}=t,i=super.createResult(t,e),{isFetching:r,isRefetching:o,isError:n,isRefetchError:u}=i,a=s.fetchMeta?.fetchMore?.direction,h=n&&a==="forward",c=r&&a==="forward",l=n&&a==="backward",d=r&&a==="backward";return{...i,fetchNextPage:this.fetchNextPage,fetchPreviousPage:this.fetchPreviousPage,hasNextPage:$t(e,s.data),hasPreviousPage:Jt(e,s.data),isFetchNextPageError:h,isFetchingNextPage:c,isFetchPreviousPageError:l,isFetchingPreviousPage:d,isRefetchError:u&&!h&&!l,isRefetching:o&&!c&&!d}}},te=class extends mt{#e;#t;#s;#i;constructor(t){super(),this.#e=t.client,this.mutationId=t.mutationId,this.#s=t.mutationCache,this.#t=[],this.state=t.state||bt(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){this.#t.includes(t)||(this.#t.push(t),this.clearGcTimeout(),this.#s.notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){this.#t=this.#t.filter(e=>e!==t),this.scheduleGc(),this.#s.notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){this.#t.length||(this.state.status==="pending"?this.scheduleGc():this.#s.remove(this))}continue(){return this.#i?.continue()??(this.state.status==="pending"?this.execute(this.state.variables):Promise.resolve())}async execute(t){const e=()=>{this.#r({type:"continue"})},s={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey},i=this.#i=yt({fn:()=>this.options.mutationFn?this.options.mutationFn(t,s):Promise.reject(new Error("No mutationFn found")),onFail:(n,u)=>{this.#r({type:"failed",failureCount:n,error:u})},onPause:()=>{this.#r({type:"pause"})},onContinue:e,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#s.canRun(this)}),r=this.state.status==="pending",o=!i.canStart();try{if(r)e();else{this.#r({type:"pending",variables:t,isPaused:o}),this.#s.config.onMutate&&await this.#s.config.onMutate(t,this,s);const u=await this.options.onMutate?.(t,s);u!==this.state.context&&this.#r({type:"pending",context:u,variables:t,isPaused:o})}const n=await i.start();return await this.#s.config.onSuccess?.(n,t,this.state.context,this,s),await this.options.onSuccess?.(n,t,this.state.context,s),await this.#s.config.onSettled?.(n,null,this.state.variables,this.state.context,this,s),await this.options.onSettled?.(n,null,t,this.state.context,s),this.#r({type:"success",data:n}),n}catch(n){try{await this.#s.config.onError?.(n,t,this.state.context,this,s)}catch(u){Promise.reject(u)}try{await this.options.onError?.(n,t,this.state.context,s)}catch(u){Promise.reject(u)}try{await this.#s.config.onSettled?.(void 0,n,this.state.variables,this.state.context,this,s)}catch(u){Promise.reject(u)}try{await this.options.onSettled?.(void 0,n,t,this.state.context,s)}catch(u){Promise.reject(u)}throw this.#r({type:"error",error:n}),n}finally{this.#i===i&&(this.#i=void 0),this.#s.runNext(this)}}#r(t){const e=s=>{switch(t.type){case"failed":return{...s,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...s,isPaused:!0};case"continue":return{...s,isPaused:!1};case"pending":return{...s,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{...s,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...s,data:void 0,error:t.error,failureCount:s.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=e(this.state),v.batch(()=>{this.#t.forEach(s=>{s.onMutationUpdate(t)}),this.#s.notify({mutation:this,type:"updated",action:t})})}};function bt(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var ee=class extends E{#e;#t;#s;constructor(t={}){super(),this.config=t,this.#e=new Set,this.#t=new Map,this.#s=0}build(t,e,s){const i=new te({client:t,mutationCache:this,mutationId:++this.#s,options:t.defaultMutationOptions(e),state:s});return this.add(i),i}add(t){this.#e.add(t);const e=D(t);if(typeof e=="string"){const s=this.#t.get(e);s?s.push(t):this.#t.set(e,[t])}this.notify({type:"added",mutation:t})}remove(t){if(this.#e.delete(t)){const e=D(t);if(typeof e=="string"){const s=this.#t.get(e);if(s)if(s.length>1){const i=s.indexOf(t);i!==-1&&s.splice(i,1)}else s[0]===t&&this.#t.delete(e)}}this.notify({type:"removed",mutation:t})}canRun(t){const e=D(t);if(typeof e=="string"){const s=this.#t.get(e)?.find(i=>i.state.status==="pending");return!s||s===t}else return!0}runNext(t){const e=D(t);return typeof e=="string"?this.#t.get(e)?.find(s=>s!==t&&s.state.isPaused)?.continue()??Promise.resolve():Promise.resolve()}clear(){v.batch(()=>{this.#e.forEach(t=>{this.notify({type:"removed",mutation:t})}),this.#e.clear(),this.#t.clear()})}getAll(){return Array.from(this.#e)}find(t){const e={exact:!0,...t};return this.getAll().find(s=>st(e,s))}findAll(t={}){return this.getAll().filter(e=>st(t,e))}notify(t){v.batch(()=>{this.listeners.forEach(e=>{e(t)})})}resumePausedMutations(){const t=this.getAll().filter(e=>e.state.isPaused);return v.batch(()=>Promise.all(t.map(e=>e.continue().catch(P))))}};function D(t){return t.options.scope?.id}var se=class extends E{#e;#t=void 0;#s;#i;constructor(t,e){super(),this.#e=t,this.setOptions(e),this.bindMethods(),this.#r()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(t){const e=this.options;this.options=this.#e.defaultMutationOptions(t),T(this.options,e)||this.#e.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.#s,observer:this}),e?.mutationKey&&this.options.mutationKey&&F(e.mutationKey)!==F(this.options.mutationKey)?this.reset():this.#s?.state.status==="pending"&&this.#s.setOptions(this.options)}onSubscribe(){this.listeners.size===1&&this.#s&&(this.#s.addObserver(this),this.#r())}onUnsubscribe(){this.hasListeners()||this.#s?.removeObserver(this)}onMutationUpdate(t){this.#r(),this.#n(t)}getCurrentResult(){return this.#t}reset(){this.#s?.removeObserver(this),this.#s=void 0,this.#r(),this.#n()}mutate(t,e){return this.#i=e,this.#s?.removeObserver(this),this.#s=this.#e.getMutationCache().build(this.#e,this.options),this.#s.addObserver(this),this.#s.execute(t)}#r(){const t=this.#s?.state??bt();this.#t={...t,isPending:t.status==="pending",isSuccess:t.status==="success",isError:t.status==="error",isIdle:t.status==="idle",mutate:this.mutate,reset:this.reset}}#n(t){v.batch(()=>{if(this.#i&&this.hasListeners()){const e=this.#t.variables,s=this.#t.context,i={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};if(t?.type==="success"){try{this.#i.onSuccess?.(t.data,e,s,i)}catch(r){Promise.reject(r)}try{this.#i.onSettled?.(t.data,null,e,s,i)}catch(r){Promise.reject(r)}}else if(t?.type==="error"){try{this.#i.onError?.(t.error,e,s,i)}catch(r){Promise.reject(r)}try{this.#i.onSettled?.(void 0,t.error,e,s,i)}catch(r){Promise.reject(r)}}}this.listeners.forEach(e=>{e(this.#t)})})}};function ht(t,e){const s=new Set(e);return t.filter(i=>!s.has(i))}var ie=class extends E{#e;#t;#s;#i;#r;#n;#a;#u;#o;#d=[];constructor(t,e,s){super(),this.#e=t,this.#i=s,this.#s=[],this.#r=[],this.#t=[],this.setQueries(e)}onSubscribe(){this.listeners.size===1&&this.#r.forEach(t=>{t.subscribe(e=>{this.#f(t,e)})})}onUnsubscribe(){this.listeners.size||this.destroy()}destroy(){this.listeners=new Set,this.#r.forEach(t=>{t.destroy()})}setQueries(t,e){this.#s=t,this.#i=e,v.batch(()=>{const s=this.#r,i=this.#p(this.#s);i.forEach(c=>c.observer.setOptions(c.defaultedQueryOptions));const r=i.map(c=>c.observer),o=r.map(c=>c.getCurrentResult()),n=s.length!==r.length,u=r.some((c,l)=>c!==s[l]),a=n||u,h=a?!0:o.some((c,l)=>{const d=this.#t[l];return!d||!T(c,d)});!a&&!h||(a&&(this.#d=i,this.#r=r),this.#t=o,this.hasListeners()&&(a&&(ht(s,r).forEach(c=>{c.destroy()}),ht(r,s).forEach(c=>{c.subscribe(l=>{this.#f(c,l)})})),this.#y()))})}getCurrentResult(){return this.#t}getQueries(){return this.#r.map(t=>t.getCurrentQuery())}getObservers(){return this.#r}getOptimisticResult(t,e){const s=this.#p(t),i=s.map(o=>o.observer.getOptimisticResult(o.defaultedQueryOptions)),r=s.map(o=>o.defaultedQueryOptions.queryHash);return[i,o=>this.#c(o??i,e,r),()=>this.#h(i,s)]}#h(t,e){const s=new Set;return e.map((i,r)=>{const o=t[r];return i.defaultedQueryOptions.notifyOnChangeProps?o:i.observer.trackResult(o,n=>{s.has(n)||(s.add(n),e.forEach(u=>{u.observer.trackProp(n)}))})})}#c(t,e,s){if(e){const i=this.#o,r=s!==void 0&&i!==void 0&&(i.length!==s.length||s.some((o,n)=>o!==i[n]));return(this.#t!==this.#u||r||e!==this.#a)&&(this.#a=e,this.#u=this.#t,s!==void 0&&(this.#o=s),this.#n=$(this.#n,e(t))),this.#n}return t}#l(){return!this.#i?.combine||this.#r.some((t,e)=>t.options.suspense&&this.#t[e]?.data===void 0)}#p(t){const e=new Map;this.#r.forEach(i=>{const r=i.options.queryHash;if(!r)return;const o=e.get(r);o?o.push(i):e.set(r,[i])});const s=[];return t.forEach(i=>{const r=this.#e.defaultQueryOptions(i),o=e.get(r.queryHash)?.shift()??new q(this.#e,r);s.push({defaultedQueryOptions:r,observer:o})}),s}#f(t,e){const s=this.#r.indexOf(t);s!==-1&&(this.#t=this.#t.slice(),this.#t[s]=e,this.#y())}#y(){if(this.hasListeners()){const t=this.#l(),e=this.#n,s=t?e:this.#c(this.#h(this.#t,this.#d),this.#i?.combine);(t||e!==s)&&v.batch(()=>{this.listeners.forEach(i=>{i(this.#t)})})}}},re=class extends E{#e;constructor(t={}){super(),this.config=t,this.#e=new Map}build(t,e,s){const i=e.queryKey,r=e.queryHash??W(i,e);let o=this.get(r);return o||(o=new Xt({client:t,queryKey:i,queryHash:r,options:t.defaultQueryOptions(e),state:s,defaultOptions:t.getQueryDefaults(i)}),this.add(o)),o}add(t){this.#e.has(t.queryHash)||(this.#e.set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const e=this.#e.get(t.queryHash);e&&(t.destroy(),e===t&&this.#e.delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){v.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return this.#e.get(t)}getAll(){return[...this.#e.values()]}find(t){const e={exact:!0,...t};return this.getAll().find(s=>et(e,s))}findAll(t={}){const e=this.getAll();return Object.keys(t).length>0?e.filter(s=>et(t,s)):e}notify(t){v.batch(()=>{this.listeners.forEach(e=>{e(t)})})}onFocus(){v.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){v.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},he=class{#e;#t;#s;#i;#r;#n;#a;#u;constructor(t={}){this.#e=t.queryCache||new re,this.#t=t.mutationCache||new ee,this.#s=t.defaultOptions||{},this.#i=new Map,this.#r=new Map,this.#n=0}mount(){this.#n++,this.#n===1&&(this.#a=Y.subscribe(async t=>{t&&(await this.resumePausedMutations(),this.#e.onFocus())}),this.#u=A.subscribe(async t=>{t&&(await this.resumePausedMutations(),this.#e.onOnline())}))}unmount(){this.#n--,this.#n===0&&(this.#a?.(),this.#a=void 0,this.#u?.(),this.#u=void 0)}isFetching(t){return this.#e.findAll({...t,fetchStatus:"fetching"}).length}isMutating(t){return this.#t.findAll({...t,status:"pending"}).length}getQueryData(t){const e=this.defaultQueryOptions({queryKey:t});return this.#e.get(e.queryHash)?.state.data}ensureQueryData(t){const e=this.defaultQueryOptions(t),s=this.#e.build(this,e),i=s.state.data;return i===void 0?this.fetchQuery(t):(t.revalidateIfStale&&s.isStaleByTime(m(e.staleTime,s))&&this.prefetchQuery(e),Promise.resolve(i))}getQueriesData(t){return this.#e.findAll(t).map(({queryKey:e,state:s})=>[e,s.data])}setQueryData(t,e,s){const i=this.defaultQueryOptions({queryKey:t}),r=this.#e.get(i.queryHash)?.state.data,o=Ut(e,r);if(o!==void 0)return this.#e.build(this,i).setData(o,{...s,manual:!0})}setQueriesData(t,e,s){return v.batch(()=>this.#e.findAll(t).map(({queryKey:i})=>[i,this.setQueryData(i,e,s)]))}getQueryState(t){const e=this.defaultQueryOptions({queryKey:t});return this.#e.get(e.queryHash)?.state}removeQueries(t){const e=this.#e;v.batch(()=>{e.findAll(t).forEach(s=>{e.remove(s)})})}resetQueries(t,e){const s=this.#e;return v.batch(()=>{const i=s.findAll(t),r=new Set(i);return i.forEach(o=>{o.reset()}),this.refetchQueries({type:"active",predicate:o=>r.has(o)},e)})}cancelQueries(t,e={}){const s={revert:!0,...e},i=v.batch(()=>this.#e.findAll(t).map(r=>r.cancel(s)));return Promise.all(i).then(P).catch(P)}invalidateQueries(t,e={}){return v.batch(()=>(this.#e.findAll(t).forEach(s=>{s.invalidate()}),t?.refetchType==="none"?Promise.resolve():this.refetchQueries({...t,type:t?.refetchType??t?.type??"active"},e)))}refetchQueries(t,e={}){const s={...e,cancelRefetch:e.cancelRefetch??!0},i=v.batch(()=>this.#e.findAll(t).filter(r=>!r.isDisabled()&&!r.isStatic()).map(r=>{let o=r.fetch(void 0,s);return s.throwOnError||(o=o.catch(P)),r.state.fetchStatus==="paused"?Promise.resolve():o}));return Promise.all(i).then(P)}async query(t){const e=this.defaultQueryOptions(t);e.retry===void 0&&(e.retry=!1);const s=this.#e.build(this,e),i=s.isStaleByTime(m(e.staleTime,s))?await s.fetch(e):s.state.data,r=e.select;return r?r(i):i}fetchQuery(t){const e=this.defaultQueryOptions(t);e.retry===void 0&&(e.retry=!1);const s=this.#e.build(this,e);return s.isStaleByTime(m(e.staleTime,s))?s.fetch(e):Promise.resolve(s.state.data)}prefetchQuery(t){return this.fetchQuery(t).then(P).catch(P)}infiniteQuery(t){return t._type="infinite",this.query(t)}fetchInfiniteQuery(t){return t._type="infinite",this.fetchQuery(t)}prefetchInfiniteQuery(t){return this.fetchInfiniteQuery(t).then(P).catch(P)}ensureInfiniteQueryData(t){return t._type="infinite",this.ensureQueryData(t)}resumePausedMutations(){return A.isOnline()?this.#t.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#e}getMutationCache(){return this.#t}getDefaultOptions(){return this.#s}setDefaultOptions(t){this.#s=t}setQueryDefaults(t,e){this.#i.set(F(t),{queryKey:t,defaultOptions:e})}getQueryDefaults(t){const e=[...this.#i.values()],s={};return e.forEach(i=>{M(t,i.queryKey)&&Object.assign(s,i.defaultOptions)}),s}setMutationDefaults(t,e){this.#r.set(F(t),{mutationKey:t,defaultOptions:e})}getMutationDefaults(t){const e=[...this.#r.values()],s={};return e.forEach(i=>{M(t,i.mutationKey)&&Object.assign(s,i.defaultOptions)}),s}defaultQueryOptions(t){if(t._defaulted)return t;const e={...this.#s.queries,...this.getQueryDefaults(t.queryKey),...t,_defaulted:!0};return e.queryHash||(e.queryHash=W(e.queryKey,e)),e.refetchOnReconnect===void 0&&(e.refetchOnReconnect=e.networkMode!=="always"),e.throwOnError===void 0&&(e.throwOnError=!!e.suspense),!e.networkMode&&e.persister&&(e.networkMode="offlineFirst"),e.queryFn===J&&(e.enabled=!1),e}defaultMutationOptions(t){return t?._defaulted?t:{...this.#s.mutations,...t?.mutationKey&&this.getMutationDefaults(t.mutationKey),...t,_defaulted:!0}}clear(){this.#e.clear(),this.#t.clear()}};const Ot=H(!1),wt=()=>B(Ot);Ot.Provider;function ne(){let t=!1;return{clearReset:()=>{t=!1},reset:()=>{t=!0},isReset:()=>t}}const ae=H(ne()),Pt=()=>B(ae),Rt=(t,e,s)=>{const i=s?.state.error&&typeof t.throwOnError=="function"?X(t.throwOnError,[s.state.error,s]):t.throwOnError;(t.suspense||i)&&(e.isReset()||(t.retryOnMount=!1))},St=t=>{I(()=>{t.clearReset()},[t])},Ct=({result:t,errorResetBoundary:e,throwOnError:s,query:i,suspense:r})=>t.isError&&!e.isReset()&&!t.isFetching&&i&&(r&&t.data===void 0||X(s,[t.error,i])),Qt=t=>{if(t.suspense){const s=r=>r==="static"?r:Math.max(r??1e3,1e3),i=t.staleTime;t.staleTime=typeof i=="function"?(...r)=>s(i(...r)):s(i),typeof t.gcTime=="number"&&(t.gcTime=Math.max(t.gcTime,1e3))}},_=(t,e)=>t?.suspense&&e.isPending,Ft=(t,e,s)=>e.fetchOptimistic(t).catch(()=>{s.clearReset()});function ce({queries:t,...e},s){const i=V(),r=wt(),o=Pt(),n=e.subscribed!==!1,u=It(()=>t.map(f=>{const y=i.defaultQueryOptions(f);return y._optimisticResults=r?"isRestoring":n?"optimistic":void 0,y}),[t,i,r,n]);u.forEach(f=>{Qt(f);const y=i.getQueryCache().get(f.queryHash);Rt(f,o,y)}),St(o);const[a]=G(()=>new ie(i,u,e)),[h,c,l]=a.getOptimisticResult(u,e.combine),d=!r&&n;z(x(f=>d?a.subscribe(v.batchCalls(f)):P,[a,d]),()=>a.getCurrentResult()),I(()=>{a.setQueries(u,e)},[u,e,a]);const w=h.some((f,y)=>_(u[y],f))?h.flatMap((f,y)=>{const b=u[y];if(b&&_(b,f)){const g=new q(i,b);return Ft(b,g,o)}return[]}):[];if(w.length>0)throw Promise.all(w);const p=h.find((f,y)=>{const b=u[y];return b&&Ct({result:f,errorResetBoundary:o,throwOnError:b.throwOnError,query:i.getQueryCache().get(b.queryHash),suspense:b.suspense})});if(p)throw p.error;return c(l())}function Et(t,e,s){const i=wt(),r=Pt(),o=V(),n=o.defaultQueryOptions(t),u=o.getQueryCache().get(n.queryHash),a=t.subscribed!==!1;n._optimisticResults=i?"isRestoring":a?"optimistic":void 0,Qt(n),Rt(n,r,u),St(r);const[h]=G(()=>new e(o,n)),c=h.getOptimisticResult(n),l=!i&&a;if(z(x(d=>{const w=l?h.subscribe(v.batchCalls(d)):P;return h.updateResult(),w},[h,l]),()=>h.getCurrentResult()),I(()=>{h.setOptions(n)},[n,h]),_(n,c))throw Ft(n,h,r);if(Ct({result:c,errorResetBoundary:r,throwOnError:n.throwOnError,query:u,suspense:n.suspense}))throw c.error;return n.notifyOnChangeProps?c:h.trackResult(c)}function le(t,e){return Et(t,q)}function fe(t){return t}function de(t){return t}function pe(t,e){const s=V(),[i]=G(()=>new se(s,t));I(()=>{i.setOptions(t)},[i,t]);const r=z(x(n=>i.subscribe(v.batchCalls(n)),[i]),()=>i.getCurrentResult()),o=x((...n)=>{i.mutate(n[0],n[1]).catch(P)},[i]);if(r.error&&X(i.options.throwOnError,[r.error]))throw r.error;return{...r,mutate:o,mutateAsync:r.mutate}}function ye(t,e){return Et(t,Yt)}export{he as Q,pe as a,le as b,ye as c,ue as d,ce as e,de as i,fe as q,J as s,V as u};
@@ -1 +1 @@
1
- import{_ as Ye,A as Z,q as it,R as Qe,d as et,b as Tn,T as q,h as Ct,x as Je,X as Ze}from"./vendor-core-8R2fFbyN.js";function Gt(){return typeof window<"u"}function Lt(t){return tn(t)?(t.nodeName||"").toLowerCase():"#document"}function Q(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function ut(t){var e;return(e=(tn(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function tn(t){return Gt()?t instanceof Node||t instanceof Q(t).Node:!1}function z(t){return Gt()?t instanceof Element||t instanceof Q(t).Element:!1}function ft(t){return Gt()?t instanceof HTMLElement||t instanceof Q(t).HTMLElement:!1}function de(t){return!Gt()||typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof Q(t).ShadowRoot}function Ut(t){const{overflow:e,overflowX:n,overflowY:o,display:r}=ot(t);return/auto|scroll|overlay|hidden|clip/.test(e+o+n)&&r!=="inline"&&r!=="contents"}function Ln(t){return/^(table|td|th)$/.test(Lt(t))}function qt(t){try{if(t.matches(":popover-open"))return!0}catch{}try{return t.matches(":modal")}catch{return!1}}const An=/transform|translate|scale|rotate|perspective|filter/,Pn=/paint|layout|strict|content/,xt=t=>!!t&&t!=="none";let ce;function we(t){const e=z(t)?ot(t):t;return xt(e.transform)||xt(e.translate)||xt(e.scale)||xt(e.rotate)||xt(e.perspective)||!Yt()&&(xt(e.backdropFilter)||xt(e.filter))||An.test(e.willChange||"")||Pn.test(e.contain||"")}function Dn(t){let e=ht(t);for(;ft(e)&&!pt(e);){if(we(e))return e;if(qt(e))return null;e=ht(e)}return null}function Yt(){return ce==null&&(ce=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),ce}function pt(t){return/^(html|body|#document)$/.test(Lt(t))}function ot(t){return Q(t).getComputedStyle(t)}function Qt(t){return z(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function ht(t){if(Lt(t)==="html")return t;const e=t.assignedSlot||t.parentNode||de(t)&&t.host||ut(t);return de(e)?e.host:e}function en(t){const e=ht(t);return pt(e)?(t.ownerDocument||t).body:ft(e)&&Ut(e)?e:en(e)}function gt(t,e,n){var o;e===void 0&&(e=[]),n===void 0&&(n=!0);const r=en(t),i=r===((o=t.ownerDocument)==null?void 0:o.body),s=Q(r);if(i){const c=me(s);return e.concat(s,s.visualViewport||[],Ut(r)?r:[],c&&n?gt(c):[])}else return e.concat(r,gt(r,[],n))}function me(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}const Ht=Math.min,vt=Math.max,zt=Math.round,$t=Math.floor,lt=t=>({x:t,y:t}),In={left:"right",right:"left",bottom:"top",top:"bottom"};function Mn(t,e,n){return vt(t,Ht(e,n))}function Jt(t,e){return typeof t=="function"?t(e):t}function Tt(t){return t.split("-")[0]}function Zt(t){return t.split("-")[1]}function nn(t){return t==="x"?"y":"x"}function on(t){return t==="y"?"height":"width"}function mt(t){const e=t[0];return e==="t"||e==="b"?"y":"x"}function rn(t){return nn(mt(t))}function Fn(t,e,n){n===void 0&&(n=!1);const o=Zt(t),r=rn(t),i=on(r);let s=r==="x"?o===(n?"end":"start")?"right":"left":o==="start"?"bottom":"top";return e.reference[i]>e.floating[i]&&(s=jt(s)),[s,jt(s)]}function kn(t){const e=jt(t);return[pe(t),e,pe(e)]}function pe(t){return t.includes("start")?t.replace("start","end"):t.replace("end","start")}const Me=["left","right"],Fe=["right","left"],_n=["top","bottom"],Nn=["bottom","top"];function $n(t,e,n){switch(t){case"top":case"bottom":return n?e?Fe:Me:e?Me:Fe;case"left":case"right":return e?_n:Nn;default:return[]}}function Bn(t,e,n,o){const r=Zt(t);let i=$n(Tt(t),n==="start",o);return r&&(i=i.map(s=>s+"-"+r),e&&(i=i.concat(i.map(pe)))),i}function jt(t){const e=Tt(t);return In[e]+t.slice(e.length)}function Vn(t){var e,n,o,r;return{top:(e=t.top)!=null?e:0,right:(n=t.right)!=null?n:0,bottom:(o=t.bottom)!=null?o:0,left:(r=t.left)!=null?r:0}}function Hn(t){return typeof t!="number"?Vn(t):{top:t,right:t,bottom:t,left:t}}function Wt(t){const{x:e,y:n,width:o,height:r}=t;return{width:o,height:r,top:n,left:e,right:e+o,bottom:n+r,x:e,y:n}}function ke(t,e){if(!t||!e)return!1;const n=e.getRootNode==null?void 0:e.getRootNode();if(t.contains(e))return!0;if(n&&de(n)){let o=e;for(;o;){if(t===o)return!0;o=o.parentNode||o.host}}return!1}function Pt(t){return"composedPath"in t?t.composedPath()[0]:t.target}function le(t,e){if(e==null)return!1;if("composedPath"in t)return t.composedPath().includes(e);const n=t;return n.target!=null&&e.contains(n.target)}function zn(t){return t.matches("html,body")}function _e(t){return t?.ownerDocument||document}function Bt(t,e,n){return n===void 0&&(n=!0),t.filter(r=>{var i;return r.parentId===e&&(!n||((i=r.context)==null?void 0:i.open))}).flatMap(r=>[r,...Bt(t,r.id,n)])}function jn(t){return"nativeEvent"in t}var Wn=typeof document<"u",Kn=function(){},ge=Wn?Ye:Kn;const Xn={...Qe},Gn=Xn.useInsertionEffect,Un=Gn||(t=>t());function Rt(t){const e=Z(()=>{});return Un(()=>{e.current=t}),it(function(){for(var n=arguments.length,o=new Array(n),r=0;r<n;r++)o[r]=arguments[r];return e.current==null?void 0:e.current(...o)},[])}function Ne(t,e,n){let{reference:o,floating:r}=t;const i=mt(e),s=rn(e),c=on(s),l=Tt(e),u=i==="y",p=o.x+o.width/2-r.width/2,f=o.y+o.height/2-r.height/2,m=o[c]/2-r[c]/2;let h;switch(l){case"top":h={x:p,y:o.y-r.height};break;case"bottom":h={x:p,y:o.y+o.height};break;case"right":h={x:o.x+o.width,y:f};break;case"left":h={x:o.x-r.width,y:f};break;default:h={x:o.x,y:o.y}}const d=Zt(e);return d&&(h[s]+=m*(d==="end"?1:-1)*(n&&u?-1:1)),h}async function qn(t,e){var n;e===void 0&&(e={});const{x:o,y:r,platform:i,rects:s,elements:c,strategy:l}=t,{boundary:u="clippingAncestors",rootBoundary:p="viewport",elementContext:f="floating",altBoundary:m=!1,padding:h=0}=Jt(e,t),d=Hn(h),y=c[m?f==="floating"?"reference":"floating":f],a=Wt(await i.getClippingRect({element:(n=await(i.isElement==null?void 0:i.isElement(y)))==null||n?y:y.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(c.floating)),boundary:u,rootBoundary:p,strategy:l})),w=f==="floating"?{x:o,y:r,width:s.floating.width,height:s.floating.height}:s.reference,x=await(i.getOffsetParent==null?void 0:i.getOffsetParent(c.floating)),E=await(i.isElement==null?void 0:i.isElement(x))&&await(i.getScale==null?void 0:i.getScale(x))||{x:1,y:1},T=Wt(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:c,rect:w,offsetParent:x,strategy:l}):w);return{top:(a.top-T.top+d.top)/E.y,bottom:(T.bottom-a.bottom+d.bottom)/E.y,left:(a.left-T.left+d.left)/E.x,right:(T.right-a.right+d.right)/E.x}}const Yn=50,Qn=async(t,e,n)=>{const{placement:o="bottom",strategy:r="absolute",middleware:i=[],platform:s}=n,c=s.detectOverflow?s:{...s,detectOverflow:qn},l=await(s.isRTL==null?void 0:s.isRTL(e));let u=await s.getElementRects({reference:t,floating:e,strategy:r}),{x:p,y:f}=Ne(u,o,l),m=o,h=0;const d={};for(let g=0;g<i.length;g++){const y=i[g];if(!y)continue;const{name:a,fn:w}=y,{x,y:E,data:T,reset:S}=await w({x:p,y:f,initialPlacement:o,placement:m,strategy:r,middlewareData:d,rects:u,platform:c,elements:{reference:t,floating:e}});p=x??p,f=E??f,d[a]={...d[a],...T},S&&h<Yn&&(h++,typeof S=="object"&&(S.placement&&(m=S.placement),S.rects&&(u=S.rects===!0?await s.getElementRects({reference:t,floating:e,strategy:r}):S.rects),{x:p,y:f}=Ne(u,m,l)),g=-1)}return{x:p,y:f,placement:m,strategy:r,middlewareData:d}},Jn=function(t){return t===void 0&&(t={}),{name:"flip",options:t,async fn(e){var n,o;const{placement:r,middlewareData:i,rects:s,initialPlacement:c,platform:l,elements:u}=e,{mainAxis:p=!0,crossAxis:f=!0,fallbackPlacements:m,fallbackStrategy:h="bestFit",fallbackAxisSideDirection:d="none",flipAlignment:g=!0,...y}=Jt(t,e);if((n=i.arrow)!=null&&n.alignmentOffset)return{};const a=Tt(r),w=mt(c),x=Tt(c)===c,E=await(l.isRTL==null?void 0:l.isRTL(u.floating)),T=m||(x||!g?[jt(c)]:kn(c)),S=d!=="none";!m&&S&&T.push(...Bn(c,g,d,E));const v=[c,...T],R=await l.detectOverflow(e,y),L=[];let A=((o=i.flip)==null?void 0:o.overflows)||[];if(p&&L.push(R[a]),f){const O=Fn(r,s,E);L.push(R[O[0]],R[O[1]])}if(A=[...A,{placement:r,overflows:L}],!L.every(O=>O<=0)){var D,$;const O=(((D=i.flip)==null?void 0:D.index)||0)+1,I=v[O];if(I&&(!(f==="alignment"?w!==mt(I):!1)||A.every(b=>mt(b.placement)===w?b.overflows[0]>0:!0)))return{data:{index:O,overflows:A},reset:{placement:I}};let M=($=A.filter(F=>F.overflows[0]<=0).sort((F,b)=>F.overflows[1]-b.overflows[1])[0])==null?void 0:$.placement;if(!M)switch(h){case"bestFit":{var B;const F=(B=A.filter(b=>{if(S){const P=mt(b.placement);return P===w||P==="y"}return!0}).map(b=>[b.placement,b.overflows.filter(P=>P>0).reduce((P,k)=>P+k,0)]).sort((b,P)=>b[1]-P[1])[0])==null?void 0:B[0];F&&(M=F);break}case"initialPlacement":M=c;break}if(r!==M)return{reset:{placement:M}}}return{}}}},Zn=new Set(["left","top"]);async function to(t,e){const{placement:n,platform:o,elements:r}=t,i=await(o.isRTL==null?void 0:o.isRTL(r.floating)),s=Tt(n),c=Zt(n),l=mt(n)==="y",u=Zn.has(s)?-1:1,p=i&&l?-1:1,f=Jt(e,t);let{mainAxis:m,crossAxis:h,alignmentAxis:d}=typeof f=="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:f.mainAxis||0,crossAxis:f.crossAxis||0,alignmentAxis:f.alignmentAxis};return c&&typeof d=="number"&&(h=c==="end"?d*-1:d),l?{x:h*p,y:m*u}:{x:m*u,y:h*p}}const eo=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(e){var n,o;const{x:r,y:i,placement:s,middlewareData:c}=e,l=await to(e,t);return s===((n=c.offset)==null?void 0:n.placement)&&(o=c.arrow)!=null&&o.alignmentOffset?{}:{x:r+l.x,y:i+l.y,data:{...l,placement:s}}}}},no=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(e){const{x:n,y:o,placement:r,platform:i}=e,{mainAxis:s=!0,crossAxis:c=!1,limiter:l={fn:w=>{let{x,y:E}=w;return{x,y:E}}},...u}=Jt(t,e),p={x:n,y:o},f=await i.detectOverflow(e,u),m=mt(r),h=nn(m);let d=p[h],g=p[m];const y=(w,x)=>Mn(x+f[w==="y"?"top":"left"],x,x-f[w==="y"?"bottom":"right"]);s&&(d=y(h,d)),c&&(g=y(m,g));const a=l.fn({...e,[h]:d,[m]:g});return{...a,data:{x:a.x-n,y:a.y-o,enabled:{[h]:s,[m]:c}}}}}};function sn(t){const e=ot(t);let n=parseFloat(e.width)||0,o=parseFloat(e.height)||0;const r=ft(t),i=r?t.offsetWidth:n,s=r?t.offsetHeight:o,c=zt(n)!==i||zt(o)!==s;return c&&(n=i,o=s),{width:n,height:o,$:c}}function xe(t){return z(t)?t:t.contextElement}function Ot(t){const e=xe(t);if(!ft(e))return lt(1);const n=e.getBoundingClientRect(),{width:o,height:r,$:i}=sn(e);let s=(i?zt(n.width):n.width)/o,c=(i?zt(n.height):n.height)/r;return(!s||!Number.isFinite(s))&&(s=1),(!c||!Number.isFinite(c))&&(c=1),{x:s,y:c}}const oo=lt(0);function cn(t){const e=Q(t);return!Yt()||!e.visualViewport?oo:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function ro(t,e,n){return e===void 0&&(e=!1),!!n&&e&&n===Q(t)}function bt(t,e,n,o){e===void 0&&(e=!1),n===void 0&&(n=!1);const r=t.getBoundingClientRect(),i=xe(t);let s=lt(1);e&&(o?z(o)&&(s=Ot(o)):s=Ot(t));const c=ro(i,n,o)?cn(i):lt(0);let l=(r.left+c.x)/s.x,u=(r.top+c.y)/s.y,p=r.width/s.x,f=r.height/s.y;if(i&&o){const m=Q(i),h=z(o)?Q(o):o;let d=m,g=me(d);for(;g&&h!==d;){const y=Ot(g),a=g.getBoundingClientRect(),w=ot(g),x=a.left+(g.clientLeft+parseFloat(w.paddingLeft))*y.x,E=a.top+(g.clientTop+parseFloat(w.paddingTop))*y.y;l*=y.x,u*=y.y,p*=y.x,f*=y.y,l+=x,u+=E,d=Q(g),g=me(d)}}return Wt({width:p,height:f,x:l,y:u})}function te(t,e){const n=Qt(t).scrollLeft;return e?e.left+n:bt(ut(t)).left+n}function ln(t,e){const n=t.getBoundingClientRect(),o=n.left+e.scrollLeft-te(t,n),r=n.top+e.scrollTop;return{x:o,y:r}}function io(t){let{elements:e,rect:n,offsetParent:o,strategy:r}=t;const i=r==="fixed",s=ut(o),c=e?qt(e.floating):!1;if(o===s||c&&i)return n;let l={scrollLeft:0,scrollTop:0},u=lt(1);const p=lt(0),f=ft(o);if((f||!i)&&((Lt(o)!=="body"||Ut(s))&&(l=Qt(o)),f)){const h=bt(o);u=Ot(o),p.x=h.x+o.clientLeft,p.y=h.y+o.clientTop}const m=s&&!f&&!i?ln(s,l):lt(0);return{width:n.width*u.x,height:n.height*u.y,x:n.x*u.x-l.scrollLeft*u.x+p.x+m.x,y:n.y*u.y-l.scrollTop*u.y+p.y+m.y}}function so(t){return t.getClientRects?Array.from(t.getClientRects()):[]}function co(t){const e=Qt(t),n=t.ownerDocument.body,o=vt(t.scrollWidth,t.clientWidth,n.scrollWidth,n.clientWidth),r=vt(t.scrollHeight,t.clientHeight,n.scrollHeight,n.clientHeight);let i=-e.scrollLeft+te(t);const s=-e.scrollTop;return ot(n).direction==="rtl"&&(i+=vt(t.clientWidth,n.clientWidth)-o),{width:o,height:r,x:i,y:s}}const lo=25;function uo(t,e,n){n===void 0&&(n="viewport");const o=n==="layoutViewport",r=Q(t),i=ut(t),s=r.visualViewport;let c=i.clientWidth,l=i.clientHeight,u=0,p=0;if(s){const m=!Yt()||e==="fixed";o?m||(u=-s.offsetLeft,p=-s.offsetTop):(c=s.width,l=s.height,m&&(u=s.offsetLeft,p=s.offsetTop))}if(te(i)<=0){const m=i.ownerDocument,h=m.body,d=getComputedStyle(h),g=m.compatMode==="CSS1Compat"&&parseFloat(d.marginLeft)+parseFloat(d.marginRight)||0,y=Math.abs(i.clientWidth-h.clientWidth-g),a=getComputedStyle(i).scrollbarGutter==="stable both-edges"?y/2:y;a<=lo&&(c-=a)}return{width:c,height:l,x:u,y:p}}function fo(t,e){const n=bt(t,!0,e==="fixed"),o=n.top+t.clientTop,r=n.left+t.clientLeft,i=Ot(t),s=t.clientWidth*i.x,c=t.clientHeight*i.y,l=r*i.x,u=o*i.y;return{width:s,height:c,x:l,y:u}}function $e(t,e,n){let o;if(e==="viewport"||e==="layoutViewport")o=uo(t,n,e);else if(e==="document")o=co(ut(t));else if(z(e))o=fo(e,n);else{const r=cn(t);o={x:e.x-r.x,y:e.y-r.y,width:e.width,height:e.height}}return Wt(o)}function ao(t,e){const n=e.get(t);if(n)return n;let o=gt(t,[],!1).filter(c=>z(c)&&Lt(c)!=="body"),r=null;const i=ot(t).position==="fixed";let s=i?ht(t):t;for(;z(s)&&!pt(s);){const c=ot(s),l=we(s),u=r?r.position:i?"fixed":"";!l&&(u==="fixed"||u==="absolute"&&c.position==="static")?o=o.filter(f=>f!==s):r=c,s=ht(s)}return e.set(t,o),o}function mo(t){let{element:e,boundary:n,rootBoundary:o,strategy:r}=t;const s=[...n==="clippingAncestors"?qt(e)?[]:ao(e,this._c):[].concat(n),o],c=$e(e,s[0],r);let l=c.top,u=c.right,p=c.bottom,f=c.left;for(let m=1;m<s.length;m++){const h=$e(e,s[m],r);l=vt(h.top,l),u=Ht(h.right,u),p=Ht(h.bottom,p),f=vt(h.left,f)}return{width:u-f,height:p-l,x:f,y:l}}function po(t){const{width:e,height:n}=sn(t);return{width:e,height:n}}function go(t,e,n){const o=ft(e),r=ut(e),i=n==="fixed",s=bt(t,!0,i,e);let c={scrollLeft:0,scrollTop:0};const l=lt(0);if((o||!i)&&((Lt(e)!=="body"||Ut(r))&&(c=Qt(e)),o)){const m=bt(e,!0,i,e);l.x=m.x+e.clientLeft,l.y=m.y+e.clientTop}!o&&r&&(l.x=te(r));const u=r&&!o&&!i?ln(r,c):lt(0),p=s.left+c.scrollLeft-l.x-u.x,f=s.top+c.scrollTop-l.y-u.y;return{x:p,y:f,width:s.width,height:s.height}}function ue(t){return ot(t).position==="static"}function Be(t,e){if(!ft(t)||ot(t).position==="fixed")return null;if(e)return e(t);let n=t.offsetParent;return ut(t)===n&&(n=n.ownerDocument.body),n}function un(t,e){const n=Q(t);if(qt(t))return n;if(!ft(t)){let r=ht(t);for(;r&&!pt(r);){if(z(r)&&!ue(r))return r;r=ht(r)}return n}let o=Be(t,e);for(;o&&Ln(o)&&ue(o);)o=Be(o,e);return o&&pt(o)&&ue(o)&&!we(o)?n:o||Dn(t)||n}const ho=async function(t){const e=this.getOffsetParent||un,n=this.getDimensions,o=await n(t.floating);return{reference:go(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}};function yo(t){return ot(t).direction==="rtl"}const wo={convertOffsetParentRelativeRectToViewportRelativeRect:io,getDocumentElement:ut,getClippingRect:mo,getOffsetParent:un,getElementRects:ho,getClientRects:so,getDimensions:po,getScale:Ot,isElement:z,isRTL:yo};function fn(t,e){return t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height}function xo(t,e,n){let o=null,r;const i=ut(t);function s(){var p;clearTimeout(r),(p=o)==null||p.disconnect(),o=null}function c(p,f){p===void 0&&(p=!1),f===void 0&&(f=1),s();const m=t.getBoundingClientRect(),{left:h,top:d,width:g,height:y}=m;if(p||e(),!g||!y)return;const a=$t(d),w=$t(i.clientWidth-(h+g)),x=$t(i.clientHeight-(d+y)),E=$t(h),S={rootMargin:-a+"px "+-w+"px "+-x+"px "+-E+"px",threshold:vt(0,Ht(1,f))||1};let v=!0;function R(L){const A=L[0].intersectionRatio;if(!fn(m,t.getBoundingClientRect()))return c();if(A!==f){if(!v)return c();A?c(!1,A):r=setTimeout(()=>{c(!1,1e-7)},1e3)}v=!1}try{o=new IntersectionObserver(R,{...S,root:i.ownerDocument})}catch{o=new IntersectionObserver(R,S)}o.observe(t)}const l=Q(t),u=()=>c(n);return l.addEventListener("resize",u),c(!0),()=>{l.removeEventListener("resize",u),s()}}function Er(t,e,n,o){o===void 0&&(o={});const{ancestorScroll:r=!0,ancestorResize:i=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:c=typeof IntersectionObserver=="function",animationFrame:l=!1}=o,u=xe(t),p=r||i?[...u?gt(u):[],...e?gt(e):[]]:[];p.forEach(a=>{r&&a.addEventListener("scroll",n),i&&a.addEventListener("resize",n)});const f=u&&c?xo(u,n,i):null;let m=-1,h=null;s&&(h=new ResizeObserver(a=>{let[w]=a;w&&w.target===u&&h&&e&&(h.unobserve(e),cancelAnimationFrame(m),m=requestAnimationFrame(()=>{var x;(x=h)==null||x.observe(e)})),n()}),u&&!l&&h.observe(u),e&&h.observe(e));let d,g=l?bt(t):null;l&&y();function y(){const a=bt(t);g&&!fn(g,a)&&n(),g=a,d=requestAnimationFrame(y)}return n(),()=>{var a;p.forEach(w=>{r&&w.removeEventListener("scroll",n),i&&w.removeEventListener("resize",n)}),f?.(),(a=h)==null||a.disconnect(),h=null,l&&cancelAnimationFrame(d)}}const vo=eo,bo=no,Eo=Jn,So=(t,e,n)=>{const o=new Map,r=n??{},i={...wo,...r.platform,_c:o};return Qn(t,e,{...r,platform:i})};var Ro=typeof document<"u",Co=function(){},Vt=Ro?Ye:Co;function Kt(t,e){if(t===e)return!0;if(typeof t!=typeof e)return!1;if(typeof t=="function"&&t.toString()===e.toString())return!0;let n,o,r;if(t&&e&&typeof t=="object"){if(Array.isArray(t)){if(n=t.length,n!==e.length)return!1;for(o=n;o--!==0;)if(!Kt(t[o],e[o]))return!1;return!0}if(r=Object.keys(t),n=r.length,n!==Object.keys(e).length)return!1;for(o=n;o--!==0;)if(!{}.hasOwnProperty.call(e,r[o]))return!1;for(o=n;o--!==0;){const i=r[o];if(!(i==="_owner"&&t.$$typeof)&&!Kt(t[i],e[i]))return!1}return!0}return t!==t&&e!==e}function an(t){return typeof window>"u"?1:(t.ownerDocument.defaultView||window).devicePixelRatio||1}function Ve(t,e){const n=an(t);return Math.round(e*n)/n}function fe(t){const e=Z(t);return Vt(()=>{e.current=t}),e}function Oo(t){t===void 0&&(t={});const{placement:e="bottom",strategy:n="absolute",middleware:o=[],platform:r,elements:{reference:i,floating:s}={},transform:c=!0,whileElementsMounted:l,open:u}=t,[p,f]=et({x:0,y:0,strategy:n,placement:e,middlewareData:{},isPositioned:!1}),[m,h]=et(o);Kt(m,o)||h(o);const[d,g]=et(null),[y,a]=et(null),w=it(b=>{b!==S.current&&(S.current=b,g(b))},[]),x=it(b=>{b!==v.current&&(v.current=b,a(b))},[]),E=i||d,T=s||y,S=Z(null),v=Z(null),R=Z(p),L=l!=null,A=fe(l),D=fe(r),$=fe(u),B=it(()=>{if(!S.current||!v.current)return;const b={placement:e,strategy:n,middleware:m};D.current&&(b.platform=D.current),So(S.current,v.current,b).then(P=>{const k={...P,isPositioned:$.current!==!1};O.current&&!Kt(R.current,k)&&(R.current=k,Tn(()=>{f(k)}))})},[m,e,n,D,$]);Vt(()=>{u===!1&&R.current.isPositioned&&(R.current.isPositioned=!1,f(b=>({...b,isPositioned:!1})))},[u]);const O=Z(!1);Vt(()=>(O.current=!0,()=>{O.current=!1}),[]),Vt(()=>{if(E&&(S.current=E),T&&(v.current=T),E&&T){if(A.current)return A.current(E,T,B);B()}},[E,T,B,A,L]);const I=q(()=>({reference:S,floating:v,setReference:w,setFloating:x}),[w,x]),M=q(()=>({reference:E,floating:T}),[E,T]),F=q(()=>{const b={position:n,left:0,top:0};if(!M.floating)return b;const P=Ve(M.floating,p.x),k=Ve(M.floating,p.y);return c?{...b,transform:"translate("+P+"px, "+k+"px)",...an(M.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:P,top:k}},[n,c,M.floating,p.x,p.y]);return q(()=>({...p,update:B,refs:I,elements:M,floatingStyles:F}),[p,B,I,M,F])}const Sr=(t,e)=>{const n=vo(t);return{name:n.name,fn:n.fn,options:[t,e]}},Rr=(t,e)=>{const n=bo(t);return{name:n.name,fn:n.fn,options:[t,e]}},Cr=(t,e)=>{const n=Eo(t);return{name:n.name,fn:n.fn,options:[t,e]}},To="data-floating-ui-focusable",He="active",ze="selected",Lo={...Qe};let je=!1,Ao=0;const We=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+Ao++;function Po(){const[t,e]=et(()=>je?We():void 0);return ge(()=>{t==null&&e(We())},[]),Ct(()=>{je=!0},[]),t}const Do=Lo.useId,Io=Do||Po;function Mo(){const t=new Map;return{emit(e,n){var o;(o=t.get(e))==null||o.forEach(r=>r(n))},on(e,n){t.has(e)||t.set(e,new Set),t.get(e).add(n)},off(e,n){var o;(o=t.get(e))==null||o.delete(n)}}}const Fo=Ze(null),ko=Ze(null),_o=()=>{var t;return((t=Je(Fo))==null?void 0:t.id)||null},dn=()=>Je(ko);function No(t){return"data-floating-ui-"+t}const $o={pointerdown:"onPointerDown",mousedown:"onMouseDown",click:"onClick"},Bo={pointerdown:"onPointerDownCapture",mousedown:"onMouseDownCapture",click:"onClickCapture"},Ke=t=>{var e,n;return{escapeKey:typeof t=="boolean"?t:(e=t?.escapeKey)!=null?e:!1,outsidePress:typeof t=="boolean"?t:(n=t?.outsidePress)!=null?n:!0}};function Or(t,e){e===void 0&&(e={});const{open:n,onOpenChange:o,elements:r,dataRef:i}=t,{enabled:s=!0,escapeKey:c=!0,outsidePress:l=!0,outsidePressEvent:u="pointerdown",referencePress:p=!1,referencePressEvent:f="pointerdown",ancestorScroll:m=!1,bubbles:h,capture:d}=e,g=dn(),y=Rt(typeof l=="function"?l:()=>!1),a=typeof l=="function"?y:l,w=Z(!1),{escapeKey:x,outsidePress:E}=Ke(h),{escapeKey:T,outsidePress:S}=Ke(d),v=Z(!1),R=Rt(O=>{var I;if(!n||!s||!c||O.key!=="Escape"||v.current)return;const M=(I=i.current.floatingContext)==null?void 0:I.nodeId,F=g?Bt(g.nodesRef.current,M):[];if(!x&&(O.stopPropagation(),F.length>0)){let b=!0;if(F.forEach(P=>{var k;if((k=P.context)!=null&&k.open&&!P.context.dataRef.current.__escapeKeyBubbles){b=!1;return}}),!b)return}o(!1,jn(O)?O.nativeEvent:O,"escape-key")}),L=Rt(O=>{var I;const M=()=>{var F;R(O),(F=Pt(O))==null||F.removeEventListener("keydown",M)};(I=Pt(O))==null||I.addEventListener("keydown",M)}),A=Rt(O=>{var I;const M=i.current.insideReactTree;i.current.insideReactTree=!1;const F=w.current;if(w.current=!1,u==="click"&&F||M||typeof a=="function"&&!a(O))return;const b=Pt(O),P="["+No("inert")+"]",k=_e(r.floating).querySelectorAll(P);let j=z(b)?b:null;for(;j&&!pt(j);){const W=ht(j);if(pt(W)||!z(W))break;j=W}if(k.length&&z(b)&&!zn(b)&&!ke(b,r.floating)&&Array.from(k).every(W=>!ke(j,W)))return;if(ft(b)&&B){const W=pt(b),G=ot(b),K=/auto|scroll/,X=W||K.test(G.overflowX),tt=W||K.test(G.overflowY),Y=X&&b.clientWidth>0&&b.scrollWidth>b.clientWidth,N=tt&&b.clientHeight>0&&b.scrollHeight>b.clientHeight,C=G.direction==="rtl",_=N&&(C?O.offsetX<=b.offsetWidth-b.clientWidth:O.offsetX>b.clientWidth),H=Y&&O.offsetY>b.clientHeight;if(_||H)return}const st=(I=i.current.floatingContext)==null?void 0:I.nodeId,at=g&&Bt(g.nodesRef.current,st).some(W=>{var G;return le(O,(G=W.context)==null?void 0:G.elements.floating)});if(le(O,r.floating)||le(O,r.domReference)||at)return;const J=g?Bt(g.nodesRef.current,st):[];if(J.length>0){let W=!0;if(J.forEach(G=>{var K;if((K=G.context)!=null&&K.open&&!G.context.dataRef.current.__outsidePressBubbles){W=!1;return}}),!W)return}o(!1,O,"outside-press")}),D=Rt(O=>{var I;const M=()=>{var F;A(O),(F=Pt(O))==null||F.removeEventListener(u,M)};(I=Pt(O))==null||I.addEventListener(u,M)});Ct(()=>{if(!n||!s)return;i.current.__escapeKeyBubbles=x,i.current.__outsidePressBubbles=E;let O=-1;function I(k){o(!1,k,"ancestor-scroll")}function M(){window.clearTimeout(O),v.current=!0}function F(){O=window.setTimeout(()=>{v.current=!1},Yt()?5:0)}const b=_e(r.floating);c&&(b.addEventListener("keydown",T?L:R,T),b.addEventListener("compositionstart",M),b.addEventListener("compositionend",F)),a&&b.addEventListener(u,S?D:A,S);let P=[];return m&&(z(r.domReference)&&(P=gt(r.domReference)),z(r.floating)&&(P=P.concat(gt(r.floating))),!z(r.reference)&&r.reference&&r.reference.contextElement&&(P=P.concat(gt(r.reference.contextElement)))),P=P.filter(k=>{var j;return k!==((j=b.defaultView)==null?void 0:j.visualViewport)}),P.forEach(k=>{k.addEventListener("scroll",I)}),()=>{c&&(b.removeEventListener("keydown",T?L:R,T),b.removeEventListener("compositionstart",M),b.removeEventListener("compositionend",F)),a&&b.removeEventListener(u,S?D:A,S),P.forEach(k=>{k.removeEventListener("scroll",I)}),window.clearTimeout(O)}},[i,r,c,a,u,n,o,m,s,x,E,R,T,L,A,S,D]),Ct(()=>{i.current.insideReactTree=!1},[i,a,u]);const $=q(()=>({onKeyDown:R,...p&&{[$o[f]]:O=>{o(!1,O.nativeEvent,"reference-press")},...f!=="click"&&{onClick(O){o(!1,O.nativeEvent,"reference-press")}}}}),[R,o,p,f]),B=q(()=>{function O(I){I.button===0&&(w.current=!0)}return{onKeyDown:R,onMouseDown:O,onMouseUp:O,[Bo[u]]:()=>{i.current.insideReactTree=!0}}},[R,u,i]);return q(()=>s?{reference:$,floating:B}:{},[s,$,B])}function Vo(t){const{open:e=!1,onOpenChange:n,elements:o}=t,r=Io(),i=Z({}),[s]=et(()=>Mo()),c=_o()!=null,[l,u]=et(o.reference),p=Rt((h,d,g)=>{i.current.openEvent=h?d:void 0,s.emit("openchange",{open:h,event:d,reason:g,nested:c}),n?.(h,d,g)}),f=q(()=>({setPositionReference:u}),[]),m=q(()=>({reference:l||o.reference||null,floating:o.floating||null,domReference:o.reference}),[l,o.reference,o.floating]);return q(()=>({dataRef:i,open:e,onOpenChange:p,elements:m,events:s,floatingId:r,refs:f}),[e,p,m,s,r,f])}function Tr(t){var e,n;let{elements:o,...r}=t===void 0?{}:t;const{nodeId:i}=r,s=Vo({...r,elements:{reference:(e=o?.reference)!=null?e:null,floating:(n=o?.floating)!=null?n:null}}),c=r.rootContext||s,l=c.elements,[u,p]=et(null),[f,m]=et(null),d=l?.domReference||u,g=Z(null),y=dn();ge(()=>{d&&(g.current=d)},[d]);const a=Oo({...r,elements:{...l,...f&&{reference:f}}}),w=it(v=>{const R=z(v)?{getBoundingClientRect:()=>v.getBoundingClientRect(),getClientRects:()=>v.getClientRects(),contextElement:v}:v;m(R),a.refs.setReference(R)},[a.refs]),x=it(v=>{(z(v)||v===null)&&(g.current=v,p(v)),(z(a.refs.reference.current)||a.refs.reference.current===null||v!==null&&!z(v))&&a.refs.setReference(v)},[a.refs]),E=q(()=>({...a.refs,setReference:x,setPositionReference:w,domReference:g}),[a.refs,x,w]),T=q(()=>({...a.elements,domReference:d}),[a.elements,d]),S=q(()=>({...a,...c,refs:E,elements:T,nodeId:i}),[a,E,T,i,c]);return ge(()=>{c.dataRef.current.floatingContext=S;const v=y?.nodesRef.current.find(R=>R.id===i);v&&(v.context=S)}),q(()=>({...a,context:S,refs:E,elements:T}),[a,E,T,S])}function ae(t,e,n){const o=new Map,r=n==="item";let i=t;if(r&&t){const{[He]:s,[ze]:c,...l}=t;i=l}return{...n==="floating"&&{tabIndex:-1,[To]:""},...i,...e.map(s=>{const c=s?s[n]:null;return typeof c=="function"?t?c(t):null:c}).concat(t).reduce((s,c)=>(c&&Object.entries(c).forEach(l=>{let[u,p]=l;if(!(r&&[He,ze].includes(u)))if(u.indexOf("on")===0){if(o.has(u)||o.set(u,[]),typeof p=="function"){var f;(f=o.get(u))==null||f.push(p),s[u]=function(){for(var m,h=arguments.length,d=new Array(h),g=0;g<h;g++)d[g]=arguments[g];return(m=o.get(u))==null?void 0:m.map(y=>y(...d)).find(y=>y!==void 0)}}}else s[u]=p}),s),{})}}function Lr(t){t===void 0&&(t=[]);const e=t.map(c=>c?.reference),n=t.map(c=>c?.floating),o=t.map(c=>c?.item),r=it(c=>ae(c,t,"reference"),e),i=it(c=>ae(c,t,"floating"),n),s=it(c=>ae(c,t,"item"),o);return q(()=>({getReferenceProps:r,getFloatingProps:i,getItemProps:s}),[r,i,s])}function Ho(t){return Object.prototype.toString.call(t)==="[object Object]"}function Xe(t){return Ho(t)||Array.isArray(t)}function zo(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}function ve(t,e){const n=Object.keys(t),o=Object.keys(e);if(n.length!==o.length)return!1;const r=JSON.stringify(Object.keys(t.breakpoints||{})),i=JSON.stringify(Object.keys(e.breakpoints||{}));return r!==i?!1:n.every(s=>{const c=t[s],l=e[s];return typeof c=="function"?`${c}`==`${l}`:!Xe(c)||!Xe(l)?c===l:ve(c,l)})}function Ge(t){return t.concat().sort((e,n)=>e.name>n.name?1:-1).map(e=>e.options)}function jo(t,e){if(t.length!==e.length)return!1;const n=Ge(t),o=Ge(e);return n.every((r,i)=>{const s=o[i];return ve(r,s)})}function be(t){return typeof t=="number"}function he(t){return typeof t=="string"}function ee(t){return typeof t=="boolean"}function Ue(t){return Object.prototype.toString.call(t)==="[object Object]"}function V(t){return Math.abs(t)}function Ee(t){return Math.sign(t)}function It(t,e){return V(t-e)}function Wo(t,e){if(t===0||e===0||V(t)<=V(e))return 0;const n=It(V(t),V(e));return V(n/t)}function Ko(t){return Math.round(t*100)/100}function Mt(t){return Ft(t).map(Number)}function nt(t){return t[_t(t)]}function _t(t){return Math.max(0,t.length-1)}function Se(t,e){return e===_t(t)}function qe(t,e=0){return Array.from(Array(t),(n,o)=>e+o)}function Ft(t){return Object.keys(t)}function mn(t,e){return[t,e].reduce((n,o)=>(Ft(o).forEach(r=>{const i=n[r],s=o[r],c=Ue(i)&&Ue(s);n[r]=c?mn(i,s):s}),n),{})}function ye(t,e){return typeof e.MouseEvent<"u"&&t instanceof e.MouseEvent}function Xo(t,e){const n={start:o,center:r,end:i};function o(){return 0}function r(l){return i(l)/2}function i(l){return e-l}function s(l,u){return he(t)?n[t](l):t(e,l,u)}return{measure:s}}function kt(){let t=[];function e(r,i,s,c={passive:!0}){let l;if("addEventListener"in r)r.addEventListener(i,s,c),l=()=>r.removeEventListener(i,s,c);else{const u=r;u.addListener(s),l=()=>u.removeListener(s)}return t.push(l),o}function n(){t=t.filter(r=>r())}const o={add:e,clear:n};return o}function Go(t,e,n,o){const r=kt(),i=1e3/60;let s=null,c=0,l=0;function u(){r.add(t,"visibilitychange",()=>{t.hidden&&d()})}function p(){h(),r.clear()}function f(y){if(!l)return;s||(s=y,n(),n());const a=y-s;for(s=y,c+=a;c>=i;)n(),c-=i;const w=c/i;o(w),l&&(l=e.requestAnimationFrame(f))}function m(){l||(l=e.requestAnimationFrame(f))}function h(){e.cancelAnimationFrame(l),s=null,c=0,l=0}function d(){s=null,c=0}return{init:u,destroy:p,start:m,stop:h,update:n,render:o}}function Uo(t,e){const n=e==="rtl",o=t==="y",r=o?"y":"x",i=o?"x":"y",s=!o&&n?-1:1,c=p(),l=f();function u(d){const{height:g,width:y}=d;return o?g:y}function p(){return o?"top":n?"right":"left"}function f(){return o?"bottom":n?"left":"right"}function m(d){return d*s}return{scroll:r,cross:i,startEdge:c,endEdge:l,measureSize:u,direction:m}}function Et(t=0,e=0){const n=V(t-e);function o(u){return u<t}function r(u){return u>e}function i(u){return o(u)||r(u)}function s(u){return i(u)?o(u)?t:e:u}function c(u){return n?u-n*Math.ceil((u-e)/n):u}return{length:n,max:e,min:t,constrain:s,reachedAny:i,reachedMax:r,reachedMin:o,removeOffset:c}}function pn(t,e,n){const{constrain:o}=Et(0,t),r=t+1;let i=s(e);function s(m){return n?V((r+m)%r):o(m)}function c(){return i}function l(m){return i=s(m),f}function u(m){return p().set(c()+m)}function p(){return pn(t,c(),n)}const f={get:c,set:l,add:u,clone:p};return f}function qo(t,e,n,o,r,i,s,c,l,u,p,f,m,h,d,g,y,a,w){const{cross:x,direction:E}=t,T=["INPUT","SELECT","TEXTAREA"],S={passive:!1},v=kt(),R=kt(),L=Et(50,225).constrain(h.measure(20)),A={mouse:300,touch:400},D={mouse:500,touch:600},$=d?43:25;let B=!1,O=0,I=0,M=!1,F=!1,b=!1,P=!1;function k(C){if(!w)return;function _(U){(ee(w)||w(C,U))&&G(U)}const H=e;v.add(H,"dragstart",U=>U.preventDefault(),S).add(H,"touchmove",()=>{},S).add(H,"touchend",()=>{}).add(H,"touchstart",_).add(H,"mousedown",_).add(H,"touchcancel",X).add(H,"contextmenu",X).add(H,"click",tt,!0)}function j(){v.clear(),R.clear()}function st(){const C=P?n:e;R.add(C,"touchmove",K,S).add(C,"touchend",X).add(C,"mousemove",K,S).add(C,"mouseup",X)}function at(C){const _=C.nodeName||"";return T.includes(_)}function J(){return(d?D:A)[P?"mouse":"touch"]}function W(C,_){const H=f.add(Ee(C)*-1),U=p.byDistance(C,!d).distance;return d||V(C)<L?U:y&&_?U*.5:p.byIndex(H.get(),0).distance}function G(C){const _=ye(C,o);P=_,b=d&&_&&!C.buttons&&B,B=It(r.get(),s.get())>=2,!(_&&C.button!==0)&&(at(C.target)||(M=!0,i.pointerDown(C),u.useFriction(0).useDuration(0),r.set(s),st(),O=i.readPoint(C),I=i.readPoint(C,x),m.emit("pointerDown")))}function K(C){if(!ye(C,o)&&C.touches.length>=2)return X(C);const H=i.readPoint(C),U=i.readPoint(C,x),rt=It(H,O),ct=It(U,I);if(!F&&!P&&(!C.cancelable||(F=rt>ct,!F)))return X(C);const yt=i.pointerMove(C);rt>g&&(b=!0),u.useFriction(.3).useDuration(.75),c.start(),r.add(E(yt)),C.preventDefault()}function X(C){const H=p.byDistance(0,!1).index!==f.get(),U=i.pointerUp(C)*J(),rt=W(E(U),H),ct=Wo(U,rt),yt=$-10*ct,dt=a+ct/50;F=!1,M=!1,R.clear(),u.useDuration(yt).useFriction(dt),l.distance(rt,!d),P=!1,m.emit("pointerUp")}function tt(C){b&&(C.stopPropagation(),C.preventDefault(),b=!1)}function Y(){return M}return{init:k,destroy:j,pointerDown:Y}}function Yo(t,e){let o,r;function i(f){return f.timeStamp}function s(f,m){const d=`client${(m||t.scroll)==="x"?"X":"Y"}`;return(ye(f,e)?f:f.touches[0])[d]}function c(f){return o=f,r=f,s(f)}function l(f){const m=s(f)-s(r),h=i(f)-i(o)>170;return r=f,h&&(o=f),m}function u(f){if(!o||!r)return 0;const m=s(r)-s(o),h=i(f)-i(o),d=i(f)-i(r)>170,g=m/h;return h&&!d&&V(g)>.1?g:0}return{pointerDown:c,pointerMove:l,pointerUp:u,readPoint:s}}function Qo(){function t(n){const{offsetTop:o,offsetLeft:r,offsetWidth:i,offsetHeight:s}=n;return{top:o,right:r+i,bottom:o+s,left:r,width:i,height:s}}return{measure:t}}function Jo(t){function e(o){return t*(o/100)}return{measure:e}}function Zo(t,e,n,o,r,i,s){const c=[t].concat(o);let l,u,p=[],f=!1;function m(y){return r.measureSize(s.measure(y))}function h(y){if(!i)return;u=m(t),p=o.map(m);function a(w){for(const x of w){if(f)return;const E=x.target===t,T=o.indexOf(x.target),S=E?u:p[T],v=m(E?t:o[T]);if(V(v-S)>=.5){y.reInit(),e.emit("resize");break}}}l=new ResizeObserver(w=>{(ee(i)||i(y,w))&&a(w)}),n.requestAnimationFrame(()=>{c.forEach(w=>l.observe(w))})}function d(){f=!0,l&&l.disconnect()}return{init:h,destroy:d}}function tr(t,e,n,o,r,i){let s=0,c=0,l=r,u=i,p=t.get(),f=0;function m(){const S=o.get()-t.get(),v=!l;let R=0;return v?(s=0,n.set(o),t.set(o),R=S):(n.set(t),s+=S/l,s*=u,p+=s,t.add(s),R=p-f),c=Ee(R),f=p,T}function h(){const S=o.get()-e.get();return V(S)<.001}function d(){return l}function g(){return c}function y(){return s}function a(){return x(r)}function w(){return E(i)}function x(S){return l=S,T}function E(S){return u=S,T}const T={direction:g,duration:d,velocity:y,seek:m,settled:h,useBaseFriction:w,useBaseDuration:a,useFriction:E,useDuration:x};return T}function er(t,e,n,o,r){const i=r.measure(10),s=r.measure(50),c=Et(.1,.99);let l=!1;function u(){return!(l||!t.reachedAny(n.get())||!t.reachedAny(e.get()))}function p(h){if(!u())return;const d=t.reachedMin(e.get())?"min":"max",g=V(t[d]-e.get()),y=n.get()-e.get(),a=c.constrain(g/s);n.subtract(y*a),!h&&V(y)<i&&(n.set(t.constrain(n.get())),o.useDuration(25).useBaseFriction())}function f(h){l=!h}return{shouldConstrain:u,constrain:p,toggleActive:f}}function nr(t,e,n,o,r){const i=Et(-e+t,0),s=f(),c=p(),l=m();function u(d,g){return It(d,g)<=1}function p(){const d=s[0],g=nt(s),y=s.lastIndexOf(d),a=s.indexOf(g)+1;return Et(y,a)}function f(){return n.map((d,g)=>{const{min:y,max:a}=i,w=i.constrain(d),x=!g,E=Se(n,g);return x?a:E||u(y,w)?y:u(a,w)?a:w}).map(d=>parseFloat(d.toFixed(3)))}function m(){if(e<=t+r)return[i.max];if(o==="keepSnaps")return s;const{min:d,max:g}=c;return s.slice(d,g)}return{snapsContained:l,scrollContainLimit:c}}function or(t,e,n){const o=e[0],r=n?o-t:nt(e);return{limit:Et(r,o)}}function rr(t,e,n,o){const i=e.min+.1,s=e.max+.1,{reachedMin:c,reachedMax:l}=Et(i,s);function u(m){return m===1?l(n.get()):m===-1?c(n.get()):!1}function p(m){if(!u(m))return;const h=t*(m*-1);o.forEach(d=>d.add(h))}return{loop:p}}function ir(t){const{max:e,length:n}=t;function o(i){const s=i-e;return n?s/-n:0}return{get:o}}function sr(t,e,n,o,r){const{startEdge:i,endEdge:s}=t,{groupSlides:c}=r,l=f().map(e.measure),u=m(),p=h();function f(){return c(o).map(g=>nt(g)[s]-g[0][i]).map(V)}function m(){return o.map(g=>n[i]-g[i]).map(g=>-V(g))}function h(){return c(u).map(g=>g[0]).map((g,y)=>g+l[y])}return{snaps:u,snapsAligned:p}}function cr(t,e,n,o,r,i){const{groupSlides:s}=r,{min:c,max:l}=o,u=p();function p(){const m=s(i),h=!t||e==="keepSnaps";return n.length===1?[i]:h?m:m.slice(c,l).map((d,g,y)=>{const a=!g,w=Se(y,g);if(a){const x=nt(y[0])+1;return qe(x)}if(w){const x=_t(i)-nt(y)[0]+1;return qe(x,nt(y)[0])}return d})}return{slideRegistry:u}}function lr(t,e,n,o,r){const{reachedAny:i,removeOffset:s,constrain:c}=o;function l(d){return d.concat().sort((g,y)=>V(g)-V(y))[0]}function u(d){const g=t?s(d):c(d),y=e.map((w,x)=>({diff:p(w-g,0),index:x})).sort((w,x)=>V(w.diff)-V(x.diff)),{index:a}=y[0];return{index:a,distance:g}}function p(d,g){const y=[d,d+n,d-n];if(!t)return d;if(!g)return l(y);const a=y.filter(w=>Ee(w)===g);return a.length?l(a):nt(y)-n}function f(d,g){const y=e[d]-r.get(),a=p(y,g);return{index:d,distance:a}}function m(d,g){const y=r.get()+d,{index:a,distance:w}=u(y),x=!t&&i(y);if(!g||x)return{index:a,distance:d};const E=e[a]-w,T=d+p(E,0);return{index:a,distance:T}}return{byDistance:m,byIndex:f,shortcut:p}}function ur(t,e,n,o,r,i,s){function c(f){const m=f.distance,h=f.index!==e.get();i.add(m),m&&(o.duration()?t.start():(t.update(),t.render(1),t.update())),h&&(n.set(e.get()),e.set(f.index),s.emit("select"))}function l(f,m){const h=r.byDistance(f,m);c(h)}function u(f,m){const h=e.clone().set(f),d=r.byIndex(h.get(),m);c(d)}return{distance:l,index:u}}function fr(t,e,n,o,r,i,s,c){const l={passive:!0,capture:!0};let u=0;function p(h){if(!c)return;function d(g){if(new Date().getTime()-u>10)return;s.emit("slideFocusStart"),t.scrollLeft=0;const w=n.findIndex(x=>x.includes(g));be(w)&&(r.useDuration(0),o.index(w,0),s.emit("slideFocus"))}i.add(document,"keydown",f,!1),e.forEach((g,y)=>{i.add(g,"focus",a=>{(ee(c)||c(h,a))&&d(y)},l)})}function f(h){h.code==="Tab"&&(u=new Date().getTime())}return{init:p}}function Dt(t){let e=t;function n(){return e}function o(l){e=s(l)}function r(l){e+=s(l)}function i(l){e-=s(l)}function s(l){return be(l)?l:l.get()}return{get:n,set:o,add:r,subtract:i}}function gn(t,e){const n=t.scroll==="x"?s:c,o=e.style;let r=null,i=!1;function s(m){return`translate3d(${m}px,0px,0px)`}function c(m){return`translate3d(0px,${m}px,0px)`}function l(m){if(i)return;const h=Ko(t.direction(m));h!==r&&(o.transform=n(h),r=h)}function u(m){i=!m}function p(){i||(o.transform="",e.getAttribute("style")||e.removeAttribute("style"))}return{clear:p,to:l,toggleActive:u}}function ar(t,e,n,o,r,i,s,c,l){const p=Mt(r),f=Mt(r).reverse(),m=a().concat(w());function h(v,R){return v.reduce((L,A)=>L-r[A],R)}function d(v,R){return v.reduce((L,A)=>h(L,R)>0?L.concat([A]):L,[])}function g(v){return i.map((R,L)=>({start:R-o[L]+.5+v,end:R+e-.5+v}))}function y(v,R,L){const A=g(R);return v.map(D=>{const $=L?0:-n,B=L?n:0,O=L?"end":"start",I=A[D][O];return{index:D,loopPoint:I,slideLocation:Dt(-1),translate:gn(t,l[D]),target:()=>c.get()>I?$:B}})}function a(){const v=s[0],R=d(f,v);return y(R,n,!1)}function w(){const v=e-s[0]-1,R=d(p,v);return y(R,-n,!0)}function x(){return m.every(({index:v})=>{const R=p.filter(L=>L!==v);return h(R,e)<=.1})}function E(){m.forEach(v=>{const{target:R,translate:L,slideLocation:A}=v,D=R();D!==A.get()&&(L.to(D),A.set(D))})}function T(){m.forEach(v=>v.translate.clear())}return{canLoop:x,clear:T,loop:E,loopPoints:m}}function dr(t,e,n){let o,r=!1;function i(l){if(!n)return;function u(p){for(const f of p)if(f.type==="childList"){l.reInit(),e.emit("slidesChanged");break}}o=new MutationObserver(p=>{r||(ee(n)||n(l,p))&&u(p)}),o.observe(t,{childList:!0})}function s(){o&&o.disconnect(),r=!0}return{init:i,destroy:s}}function mr(t,e,n,o){const r={};let i=null,s=null,c,l=!1;function u(){c=new IntersectionObserver(d=>{l||(d.forEach(g=>{const y=e.indexOf(g.target);r[y]=g}),i=null,s=null,n.emit("slidesInView"))},{root:t.parentElement,threshold:o}),e.forEach(d=>c.observe(d))}function p(){c&&c.disconnect(),l=!0}function f(d){return Ft(r).reduce((g,y)=>{const a=parseInt(y),{isIntersecting:w}=r[a];return(d&&w||!d&&!w)&&g.push(a),g},[])}function m(d=!0){if(d&&i)return i;if(!d&&s)return s;const g=f(d);return d&&(i=g),d||(s=g),g}return{init:u,destroy:p,get:m}}function pr(t,e,n,o,r,i){const{measureSize:s,startEdge:c,endEdge:l}=t,u=n[0]&&r,p=d(),f=g(),m=n.map(s),h=y();function d(){if(!u)return 0;const w=n[0];return V(e[c]-w[c])}function g(){if(!u)return 0;const w=i.getComputedStyle(nt(o));return parseFloat(w.getPropertyValue(`margin-${l}`))}function y(){return n.map((w,x,E)=>{const T=!x,S=Se(E,x);return T?m[x]+p:S?m[x]+f:E[x+1][c]-w[c]}).map(V)}return{slideSizes:m,slideSizesWithGaps:h,startGap:p,endGap:f}}function gr(t,e,n,o,r,i,s,c,l){const{startEdge:u,endEdge:p,direction:f}=t,m=be(n);function h(a,w){return Mt(a).filter(x=>x%w===0).map(x=>a.slice(x,x+w))}function d(a){return a.length?Mt(a).reduce((w,x,E)=>{const T=nt(w)||0,S=T===0,v=x===_t(a),R=r[u]-i[T][u],L=r[u]-i[x][p],A=!o&&S?f(s):0,D=!o&&v?f(c):0,$=V(L-D-(R+A));return E&&$>e+l&&w.push(x),v&&w.push(a.length),w},[]).map((w,x,E)=>{const T=Math.max(E[x-1]||0);return a.slice(T,w)}):[]}function g(a){return m?h(a,n):d(a)}return{groupSlides:g}}function hr(t,e,n,o,r,i,s){const{align:c,axis:l,direction:u,startIndex:p,loop:f,duration:m,dragFree:h,dragThreshold:d,inViewThreshold:g,slidesToScroll:y,skipSnaps:a,containScroll:w,watchResize:x,watchSlides:E,watchDrag:T,watchFocus:S}=i,v=2,R=Qo(),L=R.measure(e),A=n.map(R.measure),D=Uo(l,u),$=D.measureSize(L),B=Jo($),O=Xo(c,$),I=!f&&!!w,M=f||!!w,{slideSizes:F,slideSizesWithGaps:b,startGap:P,endGap:k}=pr(D,L,A,n,M,r),j=gr(D,$,y,f,L,A,P,k,v),{snaps:st,snapsAligned:at}=sr(D,O,L,A,j),J=-nt(st)+nt(b),{snapsContained:W,scrollContainLimit:G}=nr($,J,at,w,v),K=I?W:at,{limit:X}=or(J,K,f),tt=pn(_t(K),p,f),Y=tt.clone(),N=Mt(n),C=({dragHandler:St,scrollBody:ie,scrollBounds:se,options:{loop:Nt}})=>{Nt||se.constrain(St.pointerDown()),ie.seek()},_=({scrollBody:St,translate:ie,location:se,offsetLocation:Nt,previousLocation:xn,scrollLooper:vn,slideLooper:bn,dragHandler:En,animation:Sn,eventHandler:Te,scrollBounds:Rn,options:{loop:Le}},Ae)=>{const Pe=St.settled(),Cn=!Rn.shouldConstrain(),De=Le?Pe:Pe&&Cn,Ie=De&&!En.pointerDown();Ie&&Sn.stop();const On=se.get()*Ae+xn.get()*(1-Ae);Nt.set(On),Le&&(vn.loop(St.direction()),bn.loop()),ie.to(Nt.get()),Ie&&Te.emit("settle"),De||Te.emit("scroll")},H=Go(o,r,()=>C(re),St=>_(re,St)),U=.68,rt=K[tt.get()],ct=Dt(rt),yt=Dt(rt),dt=Dt(rt),wt=Dt(rt),At=tr(ct,dt,yt,wt,m,U),ne=lr(f,K,J,X,wt),oe=ur(H,tt,Y,At,ne,wt,s),Re=ir(X),Ce=kt(),yn=mr(e,n,s,g),{slideRegistry:Oe}=cr(I,w,K,G,j,N),wn=fr(t,n,Oe,oe,At,Ce,s,S),re={ownerDocument:o,ownerWindow:r,eventHandler:s,containerRect:L,slideRects:A,animation:H,axis:D,dragHandler:qo(D,t,o,r,wt,Yo(D,r),ct,H,oe,At,ne,tt,s,B,h,d,a,U,T),eventStore:Ce,percentOfView:B,index:tt,indexPrevious:Y,limit:X,location:ct,offsetLocation:dt,previousLocation:yt,options:i,resizeHandler:Zo(e,s,r,n,D,x,R),scrollBody:At,scrollBounds:er(X,dt,wt,At,B),scrollLooper:rr(J,X,dt,[ct,dt,yt,wt]),scrollProgress:Re,scrollSnapList:K.map(Re.get),scrollSnaps:K,scrollTarget:ne,scrollTo:oe,slideLooper:ar(D,$,J,F,b,st,K,dt,n),slideFocus:wn,slidesHandler:dr(e,s,E),slidesInView:yn,slideIndexes:N,slideRegistry:Oe,slidesToScroll:j,target:wt,translate:gn(D,e)};return re}function yr(){let t={},e;function n(u){e=u}function o(u){return t[u]||[]}function r(u){return o(u).forEach(p=>p(e,u)),l}function i(u,p){return t[u]=o(u).concat([p]),l}function s(u,p){return t[u]=o(u).filter(f=>f!==p),l}function c(){t={}}const l={init:n,emit:r,off:s,on:i,clear:c};return l}const wr={align:"center",axis:"x",container:null,slides:null,containScroll:"trimSnaps",direction:"ltr",slidesToScroll:1,inViewThreshold:0,breakpoints:{},dragFree:!1,dragThreshold:10,loop:!1,skipSnaps:!1,duration:25,startIndex:0,active:!0,watchDrag:!0,watchResize:!0,watchSlides:!0,watchFocus:!0};function xr(t){function e(i,s){return mn(i,s||{})}function n(i){const s=i.breakpoints||{},c=Ft(s).filter(l=>t.matchMedia(l).matches).map(l=>s[l]).reduce((l,u)=>e(l,u),{});return e(i,c)}function o(i){return i.map(s=>Ft(s.breakpoints||{})).reduce((s,c)=>s.concat(c),[]).map(t.matchMedia)}return{mergeOptions:e,optionsAtMedia:n,optionsMediaQueries:o}}function vr(t){let e=[];function n(i,s){return e=s.filter(({options:c})=>t.optionsAtMedia(c).active!==!1),e.forEach(c=>c.init(i,t)),s.reduce((c,l)=>Object.assign(c,{[l.name]:l}),{})}function o(){e=e.filter(i=>i.destroy())}return{init:n,destroy:o}}function Xt(t,e,n){const o=t.ownerDocument,r=o.defaultView,i=xr(r),s=vr(i),c=kt(),l=yr(),{mergeOptions:u,optionsAtMedia:p,optionsMediaQueries:f}=i,{on:m,off:h,emit:d}=l,g=D;let y=!1,a,w=u(wr,Xt.globalOptions),x=u(w),E=[],T,S,v;function R(){const{container:N,slides:C}=x;S=(he(N)?t.querySelector(N):N)||t.children[0];const H=he(C)?S.querySelectorAll(C):C;v=[].slice.call(H||S.children)}function L(N){const C=hr(t,S,v,o,r,N,l);if(N.loop&&!C.slideLooper.canLoop()){const _=Object.assign({},N,{loop:!1});return L(_)}return C}function A(N,C){y||(w=u(w,N),x=p(w),E=C||E,R(),a=L(x),f([w,...E.map(({options:_})=>_)]).forEach(_=>c.add(_,"change",D)),x.active&&(a.translate.to(a.location.get()),a.animation.init(),a.slidesInView.init(),a.slideFocus.init(Y),a.eventHandler.init(Y),a.resizeHandler.init(Y),a.slidesHandler.init(Y),a.options.loop&&a.slideLooper.loop(),S.offsetParent&&v.length&&a.dragHandler.init(Y),T=s.init(Y,E)))}function D(N,C){const _=j();$(),A(u({startIndex:_},N),C),l.emit("reInit")}function $(){a.dragHandler.destroy(),a.eventStore.clear(),a.translate.clear(),a.slideLooper.clear(),a.resizeHandler.destroy(),a.slidesHandler.destroy(),a.slidesInView.destroy(),a.animation.destroy(),s.destroy(),c.clear()}function B(){y||(y=!0,c.clear(),$(),l.emit("destroy"),l.clear())}function O(N,C,_){!x.active||y||(a.scrollBody.useBaseFriction().useDuration(C===!0?0:x.duration),a.scrollTo.index(N,_||0))}function I(N){const C=a.index.add(1).get();O(C,N,-1)}function M(N){const C=a.index.add(-1).get();O(C,N,1)}function F(){return a.index.add(1).get()!==j()}function b(){return a.index.add(-1).get()!==j()}function P(){return a.scrollSnapList}function k(){return a.scrollProgress.get(a.offsetLocation.get())}function j(){return a.index.get()}function st(){return a.indexPrevious.get()}function at(){return a.slidesInView.get()}function J(){return a.slidesInView.get(!1)}function W(){return T}function G(){return a}function K(){return t}function X(){return S}function tt(){return v}const Y={canScrollNext:F,canScrollPrev:b,containerNode:X,internalEngine:G,destroy:B,off:h,on:m,emit:d,plugins:W,previousScrollSnap:st,reInit:g,rootNode:K,scrollNext:I,scrollPrev:M,scrollProgress:k,scrollSnapList:P,scrollTo:O,selectedScrollSnap:j,slideNodes:tt,slidesInView:at,slidesNotInView:J};return A(e,n),setTimeout(()=>l.emit("init"),0),Y}Xt.globalOptions=void 0;function hn(t={},e=[]){const n=Z(t),o=Z(e),[r,i]=et(),[s,c]=et(),l=it(()=>{r&&r.reInit(n.current,o.current)},[r]);return Ct(()=>{ve(n.current,t)||(n.current=t,l())},[t,l]),Ct(()=>{jo(o.current,e)||(o.current=e,l())},[e,l]),Ct(()=>{if(zo()&&s){Xt.globalOptions=hn.globalOptions;const u=Xt(s,n.current,o.current);return i(u),()=>u.destroy()}else i(void 0)},[s,i]),[c,r]}hn.globalOptions=void 0;export{Tr as a,Er as b,Or as c,Lr as d,Cr as f,Sr as o,Rr as s,hn as u};
1
+ import{_ as Ye,A as Z,q as it,R as Qe,d as et,b as Tn,T as q,h as Ct,x as Je,X as Ze}from"./vendor-core-DfaOB3Rn.js";function Gt(){return typeof window<"u"}function Lt(t){return tn(t)?(t.nodeName||"").toLowerCase():"#document"}function Q(t){var e;return(t==null||(e=t.ownerDocument)==null?void 0:e.defaultView)||window}function ut(t){var e;return(e=(tn(t)?t.ownerDocument:t.document)||window.document)==null?void 0:e.documentElement}function tn(t){return Gt()?t instanceof Node||t instanceof Q(t).Node:!1}function z(t){return Gt()?t instanceof Element||t instanceof Q(t).Element:!1}function ft(t){return Gt()?t instanceof HTMLElement||t instanceof Q(t).HTMLElement:!1}function de(t){return!Gt()||typeof ShadowRoot>"u"?!1:t instanceof ShadowRoot||t instanceof Q(t).ShadowRoot}function Ut(t){const{overflow:e,overflowX:n,overflowY:o,display:r}=ot(t);return/auto|scroll|overlay|hidden|clip/.test(e+o+n)&&r!=="inline"&&r!=="contents"}function Ln(t){return/^(table|td|th)$/.test(Lt(t))}function qt(t){try{if(t.matches(":popover-open"))return!0}catch{}try{return t.matches(":modal")}catch{return!1}}const An=/transform|translate|scale|rotate|perspective|filter/,Pn=/paint|layout|strict|content/,xt=t=>!!t&&t!=="none";let ce;function we(t){const e=z(t)?ot(t):t;return xt(e.transform)||xt(e.translate)||xt(e.scale)||xt(e.rotate)||xt(e.perspective)||!Yt()&&(xt(e.backdropFilter)||xt(e.filter))||An.test(e.willChange||"")||Pn.test(e.contain||"")}function Dn(t){let e=ht(t);for(;ft(e)&&!pt(e);){if(we(e))return e;if(qt(e))return null;e=ht(e)}return null}function Yt(){return ce==null&&(ce=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),ce}function pt(t){return/^(html|body|#document)$/.test(Lt(t))}function ot(t){return Q(t).getComputedStyle(t)}function Qt(t){return z(t)?{scrollLeft:t.scrollLeft,scrollTop:t.scrollTop}:{scrollLeft:t.scrollX,scrollTop:t.scrollY}}function ht(t){if(Lt(t)==="html")return t;const e=t.assignedSlot||t.parentNode||de(t)&&t.host||ut(t);return de(e)?e.host:e}function en(t){const e=ht(t);return pt(e)?(t.ownerDocument||t).body:ft(e)&&Ut(e)?e:en(e)}function gt(t,e,n){var o;e===void 0&&(e=[]),n===void 0&&(n=!0);const r=en(t),i=r===((o=t.ownerDocument)==null?void 0:o.body),s=Q(r);if(i){const c=me(s);return e.concat(s,s.visualViewport||[],Ut(r)?r:[],c&&n?gt(c):[])}else return e.concat(r,gt(r,[],n))}function me(t){return t.parent&&Object.getPrototypeOf(t.parent)?t.frameElement:null}const Ht=Math.min,vt=Math.max,zt=Math.round,$t=Math.floor,lt=t=>({x:t,y:t}),In={left:"right",right:"left",bottom:"top",top:"bottom"};function Mn(t,e,n){return vt(t,Ht(e,n))}function Jt(t,e){return typeof t=="function"?t(e):t}function Tt(t){return t.split("-")[0]}function Zt(t){return t.split("-")[1]}function nn(t){return t==="x"?"y":"x"}function on(t){return t==="y"?"height":"width"}function mt(t){const e=t[0];return e==="t"||e==="b"?"y":"x"}function rn(t){return nn(mt(t))}function Fn(t,e,n){n===void 0&&(n=!1);const o=Zt(t),r=rn(t),i=on(r);let s=r==="x"?o===(n?"end":"start")?"right":"left":o==="start"?"bottom":"top";return e.reference[i]>e.floating[i]&&(s=jt(s)),[s,jt(s)]}function kn(t){const e=jt(t);return[pe(t),e,pe(e)]}function pe(t){return t.includes("start")?t.replace("start","end"):t.replace("end","start")}const Me=["left","right"],Fe=["right","left"],_n=["top","bottom"],Nn=["bottom","top"];function $n(t,e,n){switch(t){case"top":case"bottom":return n?e?Fe:Me:e?Me:Fe;case"left":case"right":return e?_n:Nn;default:return[]}}function Bn(t,e,n,o){const r=Zt(t);let i=$n(Tt(t),n==="start",o);return r&&(i=i.map(s=>s+"-"+r),e&&(i=i.concat(i.map(pe)))),i}function jt(t){const e=Tt(t);return In[e]+t.slice(e.length)}function Vn(t){var e,n,o,r;return{top:(e=t.top)!=null?e:0,right:(n=t.right)!=null?n:0,bottom:(o=t.bottom)!=null?o:0,left:(r=t.left)!=null?r:0}}function Hn(t){return typeof t!="number"?Vn(t):{top:t,right:t,bottom:t,left:t}}function Wt(t){const{x:e,y:n,width:o,height:r}=t;return{width:o,height:r,top:n,left:e,right:e+o,bottom:n+r,x:e,y:n}}function ke(t,e){if(!t||!e)return!1;const n=e.getRootNode==null?void 0:e.getRootNode();if(t.contains(e))return!0;if(n&&de(n)){let o=e;for(;o;){if(t===o)return!0;o=o.parentNode||o.host}}return!1}function Pt(t){return"composedPath"in t?t.composedPath()[0]:t.target}function le(t,e){if(e==null)return!1;if("composedPath"in t)return t.composedPath().includes(e);const n=t;return n.target!=null&&e.contains(n.target)}function zn(t){return t.matches("html,body")}function _e(t){return t?.ownerDocument||document}function Bt(t,e,n){return n===void 0&&(n=!0),t.filter(r=>{var i;return r.parentId===e&&(!n||((i=r.context)==null?void 0:i.open))}).flatMap(r=>[r,...Bt(t,r.id,n)])}function jn(t){return"nativeEvent"in t}var Wn=typeof document<"u",Kn=function(){},ge=Wn?Ye:Kn;const Xn={...Qe},Gn=Xn.useInsertionEffect,Un=Gn||(t=>t());function Rt(t){const e=Z(()=>{});return Un(()=>{e.current=t}),it(function(){for(var n=arguments.length,o=new Array(n),r=0;r<n;r++)o[r]=arguments[r];return e.current==null?void 0:e.current(...o)},[])}function Ne(t,e,n){let{reference:o,floating:r}=t;const i=mt(e),s=rn(e),c=on(s),l=Tt(e),u=i==="y",p=o.x+o.width/2-r.width/2,f=o.y+o.height/2-r.height/2,m=o[c]/2-r[c]/2;let h;switch(l){case"top":h={x:p,y:o.y-r.height};break;case"bottom":h={x:p,y:o.y+o.height};break;case"right":h={x:o.x+o.width,y:f};break;case"left":h={x:o.x-r.width,y:f};break;default:h={x:o.x,y:o.y}}const d=Zt(e);return d&&(h[s]+=m*(d==="end"?1:-1)*(n&&u?-1:1)),h}async function qn(t,e){var n;e===void 0&&(e={});const{x:o,y:r,platform:i,rects:s,elements:c,strategy:l}=t,{boundary:u="clippingAncestors",rootBoundary:p="viewport",elementContext:f="floating",altBoundary:m=!1,padding:h=0}=Jt(e,t),d=Hn(h),y=c[m?f==="floating"?"reference":"floating":f],a=Wt(await i.getClippingRect({element:(n=await(i.isElement==null?void 0:i.isElement(y)))==null||n?y:y.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(c.floating)),boundary:u,rootBoundary:p,strategy:l})),w=f==="floating"?{x:o,y:r,width:s.floating.width,height:s.floating.height}:s.reference,x=await(i.getOffsetParent==null?void 0:i.getOffsetParent(c.floating)),E=await(i.isElement==null?void 0:i.isElement(x))&&await(i.getScale==null?void 0:i.getScale(x))||{x:1,y:1},T=Wt(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:c,rect:w,offsetParent:x,strategy:l}):w);return{top:(a.top-T.top+d.top)/E.y,bottom:(T.bottom-a.bottom+d.bottom)/E.y,left:(a.left-T.left+d.left)/E.x,right:(T.right-a.right+d.right)/E.x}}const Yn=50,Qn=async(t,e,n)=>{const{placement:o="bottom",strategy:r="absolute",middleware:i=[],platform:s}=n,c=s.detectOverflow?s:{...s,detectOverflow:qn},l=await(s.isRTL==null?void 0:s.isRTL(e));let u=await s.getElementRects({reference:t,floating:e,strategy:r}),{x:p,y:f}=Ne(u,o,l),m=o,h=0;const d={};for(let g=0;g<i.length;g++){const y=i[g];if(!y)continue;const{name:a,fn:w}=y,{x,y:E,data:T,reset:S}=await w({x:p,y:f,initialPlacement:o,placement:m,strategy:r,middlewareData:d,rects:u,platform:c,elements:{reference:t,floating:e}});p=x??p,f=E??f,d[a]={...d[a],...T},S&&h<Yn&&(h++,typeof S=="object"&&(S.placement&&(m=S.placement),S.rects&&(u=S.rects===!0?await s.getElementRects({reference:t,floating:e,strategy:r}):S.rects),{x:p,y:f}=Ne(u,m,l)),g=-1)}return{x:p,y:f,placement:m,strategy:r,middlewareData:d}},Jn=function(t){return t===void 0&&(t={}),{name:"flip",options:t,async fn(e){var n,o;const{placement:r,middlewareData:i,rects:s,initialPlacement:c,platform:l,elements:u}=e,{mainAxis:p=!0,crossAxis:f=!0,fallbackPlacements:m,fallbackStrategy:h="bestFit",fallbackAxisSideDirection:d="none",flipAlignment:g=!0,...y}=Jt(t,e);if((n=i.arrow)!=null&&n.alignmentOffset)return{};const a=Tt(r),w=mt(c),x=Tt(c)===c,E=await(l.isRTL==null?void 0:l.isRTL(u.floating)),T=m||(x||!g?[jt(c)]:kn(c)),S=d!=="none";!m&&S&&T.push(...Bn(c,g,d,E));const v=[c,...T],R=await l.detectOverflow(e,y),L=[];let A=((o=i.flip)==null?void 0:o.overflows)||[];if(p&&L.push(R[a]),f){const O=Fn(r,s,E);L.push(R[O[0]],R[O[1]])}if(A=[...A,{placement:r,overflows:L}],!L.every(O=>O<=0)){var D,$;const O=(((D=i.flip)==null?void 0:D.index)||0)+1,I=v[O];if(I&&(!(f==="alignment"?w!==mt(I):!1)||A.every(b=>mt(b.placement)===w?b.overflows[0]>0:!0)))return{data:{index:O,overflows:A},reset:{placement:I}};let M=($=A.filter(F=>F.overflows[0]<=0).sort((F,b)=>F.overflows[1]-b.overflows[1])[0])==null?void 0:$.placement;if(!M)switch(h){case"bestFit":{var B;const F=(B=A.filter(b=>{if(S){const P=mt(b.placement);return P===w||P==="y"}return!0}).map(b=>[b.placement,b.overflows.filter(P=>P>0).reduce((P,k)=>P+k,0)]).sort((b,P)=>b[1]-P[1])[0])==null?void 0:B[0];F&&(M=F);break}case"initialPlacement":M=c;break}if(r!==M)return{reset:{placement:M}}}return{}}}},Zn=new Set(["left","top"]);async function to(t,e){const{placement:n,platform:o,elements:r}=t,i=await(o.isRTL==null?void 0:o.isRTL(r.floating)),s=Tt(n),c=Zt(n),l=mt(n)==="y",u=Zn.has(s)?-1:1,p=i&&l?-1:1,f=Jt(e,t);let{mainAxis:m,crossAxis:h,alignmentAxis:d}=typeof f=="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:f.mainAxis||0,crossAxis:f.crossAxis||0,alignmentAxis:f.alignmentAxis};return c&&typeof d=="number"&&(h=c==="end"?d*-1:d),l?{x:h*p,y:m*u}:{x:m*u,y:h*p}}const eo=function(t){return t===void 0&&(t=0),{name:"offset",options:t,async fn(e){var n,o;const{x:r,y:i,placement:s,middlewareData:c}=e,l=await to(e,t);return s===((n=c.offset)==null?void 0:n.placement)&&(o=c.arrow)!=null&&o.alignmentOffset?{}:{x:r+l.x,y:i+l.y,data:{...l,placement:s}}}}},no=function(t){return t===void 0&&(t={}),{name:"shift",options:t,async fn(e){const{x:n,y:o,placement:r,platform:i}=e,{mainAxis:s=!0,crossAxis:c=!1,limiter:l={fn:w=>{let{x,y:E}=w;return{x,y:E}}},...u}=Jt(t,e),p={x:n,y:o},f=await i.detectOverflow(e,u),m=mt(r),h=nn(m);let d=p[h],g=p[m];const y=(w,x)=>Mn(x+f[w==="y"?"top":"left"],x,x-f[w==="y"?"bottom":"right"]);s&&(d=y(h,d)),c&&(g=y(m,g));const a=l.fn({...e,[h]:d,[m]:g});return{...a,data:{x:a.x-n,y:a.y-o,enabled:{[h]:s,[m]:c}}}}}};function sn(t){const e=ot(t);let n=parseFloat(e.width)||0,o=parseFloat(e.height)||0;const r=ft(t),i=r?t.offsetWidth:n,s=r?t.offsetHeight:o,c=zt(n)!==i||zt(o)!==s;return c&&(n=i,o=s),{width:n,height:o,$:c}}function xe(t){return z(t)?t:t.contextElement}function Ot(t){const e=xe(t);if(!ft(e))return lt(1);const n=e.getBoundingClientRect(),{width:o,height:r,$:i}=sn(e);let s=(i?zt(n.width):n.width)/o,c=(i?zt(n.height):n.height)/r;return(!s||!Number.isFinite(s))&&(s=1),(!c||!Number.isFinite(c))&&(c=1),{x:s,y:c}}const oo=lt(0);function cn(t){const e=Q(t);return!Yt()||!e.visualViewport?oo:{x:e.visualViewport.offsetLeft,y:e.visualViewport.offsetTop}}function ro(t,e,n){return e===void 0&&(e=!1),!!n&&e&&n===Q(t)}function bt(t,e,n,o){e===void 0&&(e=!1),n===void 0&&(n=!1);const r=t.getBoundingClientRect(),i=xe(t);let s=lt(1);e&&(o?z(o)&&(s=Ot(o)):s=Ot(t));const c=ro(i,n,o)?cn(i):lt(0);let l=(r.left+c.x)/s.x,u=(r.top+c.y)/s.y,p=r.width/s.x,f=r.height/s.y;if(i&&o){const m=Q(i),h=z(o)?Q(o):o;let d=m,g=me(d);for(;g&&h!==d;){const y=Ot(g),a=g.getBoundingClientRect(),w=ot(g),x=a.left+(g.clientLeft+parseFloat(w.paddingLeft))*y.x,E=a.top+(g.clientTop+parseFloat(w.paddingTop))*y.y;l*=y.x,u*=y.y,p*=y.x,f*=y.y,l+=x,u+=E,d=Q(g),g=me(d)}}return Wt({width:p,height:f,x:l,y:u})}function te(t,e){const n=Qt(t).scrollLeft;return e?e.left+n:bt(ut(t)).left+n}function ln(t,e){const n=t.getBoundingClientRect(),o=n.left+e.scrollLeft-te(t,n),r=n.top+e.scrollTop;return{x:o,y:r}}function io(t){let{elements:e,rect:n,offsetParent:o,strategy:r}=t;const i=r==="fixed",s=ut(o),c=e?qt(e.floating):!1;if(o===s||c&&i)return n;let l={scrollLeft:0,scrollTop:0},u=lt(1);const p=lt(0),f=ft(o);if((f||!i)&&((Lt(o)!=="body"||Ut(s))&&(l=Qt(o)),f)){const h=bt(o);u=Ot(o),p.x=h.x+o.clientLeft,p.y=h.y+o.clientTop}const m=s&&!f&&!i?ln(s,l):lt(0);return{width:n.width*u.x,height:n.height*u.y,x:n.x*u.x-l.scrollLeft*u.x+p.x+m.x,y:n.y*u.y-l.scrollTop*u.y+p.y+m.y}}function so(t){return t.getClientRects?Array.from(t.getClientRects()):[]}function co(t){const e=Qt(t),n=t.ownerDocument.body,o=vt(t.scrollWidth,t.clientWidth,n.scrollWidth,n.clientWidth),r=vt(t.scrollHeight,t.clientHeight,n.scrollHeight,n.clientHeight);let i=-e.scrollLeft+te(t);const s=-e.scrollTop;return ot(n).direction==="rtl"&&(i+=vt(t.clientWidth,n.clientWidth)-o),{width:o,height:r,x:i,y:s}}const lo=25;function uo(t,e,n){n===void 0&&(n="viewport");const o=n==="layoutViewport",r=Q(t),i=ut(t),s=r.visualViewport;let c=i.clientWidth,l=i.clientHeight,u=0,p=0;if(s){const m=!Yt()||e==="fixed";o?m||(u=-s.offsetLeft,p=-s.offsetTop):(c=s.width,l=s.height,m&&(u=s.offsetLeft,p=s.offsetTop))}if(te(i)<=0){const m=i.ownerDocument,h=m.body,d=getComputedStyle(h),g=m.compatMode==="CSS1Compat"&&parseFloat(d.marginLeft)+parseFloat(d.marginRight)||0,y=Math.abs(i.clientWidth-h.clientWidth-g),a=getComputedStyle(i).scrollbarGutter==="stable both-edges"?y/2:y;a<=lo&&(c-=a)}return{width:c,height:l,x:u,y:p}}function fo(t,e){const n=bt(t,!0,e==="fixed"),o=n.top+t.clientTop,r=n.left+t.clientLeft,i=Ot(t),s=t.clientWidth*i.x,c=t.clientHeight*i.y,l=r*i.x,u=o*i.y;return{width:s,height:c,x:l,y:u}}function $e(t,e,n){let o;if(e==="viewport"||e==="layoutViewport")o=uo(t,n,e);else if(e==="document")o=co(ut(t));else if(z(e))o=fo(e,n);else{const r=cn(t);o={x:e.x-r.x,y:e.y-r.y,width:e.width,height:e.height}}return Wt(o)}function ao(t,e){const n=e.get(t);if(n)return n;let o=gt(t,[],!1).filter(c=>z(c)&&Lt(c)!=="body"),r=null;const i=ot(t).position==="fixed";let s=i?ht(t):t;for(;z(s)&&!pt(s);){const c=ot(s),l=we(s),u=r?r.position:i?"fixed":"";!l&&(u==="fixed"||u==="absolute"&&c.position==="static")?o=o.filter(f=>f!==s):r=c,s=ht(s)}return e.set(t,o),o}function mo(t){let{element:e,boundary:n,rootBoundary:o,strategy:r}=t;const s=[...n==="clippingAncestors"?qt(e)?[]:ao(e,this._c):[].concat(n),o],c=$e(e,s[0],r);let l=c.top,u=c.right,p=c.bottom,f=c.left;for(let m=1;m<s.length;m++){const h=$e(e,s[m],r);l=vt(h.top,l),u=Ht(h.right,u),p=Ht(h.bottom,p),f=vt(h.left,f)}return{width:u-f,height:p-l,x:f,y:l}}function po(t){const{width:e,height:n}=sn(t);return{width:e,height:n}}function go(t,e,n){const o=ft(e),r=ut(e),i=n==="fixed",s=bt(t,!0,i,e);let c={scrollLeft:0,scrollTop:0};const l=lt(0);if((o||!i)&&((Lt(e)!=="body"||Ut(r))&&(c=Qt(e)),o)){const m=bt(e,!0,i,e);l.x=m.x+e.clientLeft,l.y=m.y+e.clientTop}!o&&r&&(l.x=te(r));const u=r&&!o&&!i?ln(r,c):lt(0),p=s.left+c.scrollLeft-l.x-u.x,f=s.top+c.scrollTop-l.y-u.y;return{x:p,y:f,width:s.width,height:s.height}}function ue(t){return ot(t).position==="static"}function Be(t,e){if(!ft(t)||ot(t).position==="fixed")return null;if(e)return e(t);let n=t.offsetParent;return ut(t)===n&&(n=n.ownerDocument.body),n}function un(t,e){const n=Q(t);if(qt(t))return n;if(!ft(t)){let r=ht(t);for(;r&&!pt(r);){if(z(r)&&!ue(r))return r;r=ht(r)}return n}let o=Be(t,e);for(;o&&Ln(o)&&ue(o);)o=Be(o,e);return o&&pt(o)&&ue(o)&&!we(o)?n:o||Dn(t)||n}const ho=async function(t){const e=this.getOffsetParent||un,n=this.getDimensions,o=await n(t.floating);return{reference:go(t.reference,await e(t.floating),t.strategy),floating:{x:0,y:0,width:o.width,height:o.height}}};function yo(t){return ot(t).direction==="rtl"}const wo={convertOffsetParentRelativeRectToViewportRelativeRect:io,getDocumentElement:ut,getClippingRect:mo,getOffsetParent:un,getElementRects:ho,getClientRects:so,getDimensions:po,getScale:Ot,isElement:z,isRTL:yo};function fn(t,e){return t.x===e.x&&t.y===e.y&&t.width===e.width&&t.height===e.height}function xo(t,e,n){let o=null,r;const i=ut(t);function s(){var p;clearTimeout(r),(p=o)==null||p.disconnect(),o=null}function c(p,f){p===void 0&&(p=!1),f===void 0&&(f=1),s();const m=t.getBoundingClientRect(),{left:h,top:d,width:g,height:y}=m;if(p||e(),!g||!y)return;const a=$t(d),w=$t(i.clientWidth-(h+g)),x=$t(i.clientHeight-(d+y)),E=$t(h),S={rootMargin:-a+"px "+-w+"px "+-x+"px "+-E+"px",threshold:vt(0,Ht(1,f))||1};let v=!0;function R(L){const A=L[0].intersectionRatio;if(!fn(m,t.getBoundingClientRect()))return c();if(A!==f){if(!v)return c();A?c(!1,A):r=setTimeout(()=>{c(!1,1e-7)},1e3)}v=!1}try{o=new IntersectionObserver(R,{...S,root:i.ownerDocument})}catch{o=new IntersectionObserver(R,S)}o.observe(t)}const l=Q(t),u=()=>c(n);return l.addEventListener("resize",u),c(!0),()=>{l.removeEventListener("resize",u),s()}}function Er(t,e,n,o){o===void 0&&(o={});const{ancestorScroll:r=!0,ancestorResize:i=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:c=typeof IntersectionObserver=="function",animationFrame:l=!1}=o,u=xe(t),p=r||i?[...u?gt(u):[],...e?gt(e):[]]:[];p.forEach(a=>{r&&a.addEventListener("scroll",n),i&&a.addEventListener("resize",n)});const f=u&&c?xo(u,n,i):null;let m=-1,h=null;s&&(h=new ResizeObserver(a=>{let[w]=a;w&&w.target===u&&h&&e&&(h.unobserve(e),cancelAnimationFrame(m),m=requestAnimationFrame(()=>{var x;(x=h)==null||x.observe(e)})),n()}),u&&!l&&h.observe(u),e&&h.observe(e));let d,g=l?bt(t):null;l&&y();function y(){const a=bt(t);g&&!fn(g,a)&&n(),g=a,d=requestAnimationFrame(y)}return n(),()=>{var a;p.forEach(w=>{r&&w.removeEventListener("scroll",n),i&&w.removeEventListener("resize",n)}),f?.(),(a=h)==null||a.disconnect(),h=null,l&&cancelAnimationFrame(d)}}const vo=eo,bo=no,Eo=Jn,So=(t,e,n)=>{const o=new Map,r=n??{},i={...wo,...r.platform,_c:o};return Qn(t,e,{...r,platform:i})};var Ro=typeof document<"u",Co=function(){},Vt=Ro?Ye:Co;function Kt(t,e){if(t===e)return!0;if(typeof t!=typeof e)return!1;if(typeof t=="function"&&t.toString()===e.toString())return!0;let n,o,r;if(t&&e&&typeof t=="object"){if(Array.isArray(t)){if(n=t.length,n!==e.length)return!1;for(o=n;o--!==0;)if(!Kt(t[o],e[o]))return!1;return!0}if(r=Object.keys(t),n=r.length,n!==Object.keys(e).length)return!1;for(o=n;o--!==0;)if(!{}.hasOwnProperty.call(e,r[o]))return!1;for(o=n;o--!==0;){const i=r[o];if(!(i==="_owner"&&t.$$typeof)&&!Kt(t[i],e[i]))return!1}return!0}return t!==t&&e!==e}function an(t){return typeof window>"u"?1:(t.ownerDocument.defaultView||window).devicePixelRatio||1}function Ve(t,e){const n=an(t);return Math.round(e*n)/n}function fe(t){const e=Z(t);return Vt(()=>{e.current=t}),e}function Oo(t){t===void 0&&(t={});const{placement:e="bottom",strategy:n="absolute",middleware:o=[],platform:r,elements:{reference:i,floating:s}={},transform:c=!0,whileElementsMounted:l,open:u}=t,[p,f]=et({x:0,y:0,strategy:n,placement:e,middlewareData:{},isPositioned:!1}),[m,h]=et(o);Kt(m,o)||h(o);const[d,g]=et(null),[y,a]=et(null),w=it(b=>{b!==S.current&&(S.current=b,g(b))},[]),x=it(b=>{b!==v.current&&(v.current=b,a(b))},[]),E=i||d,T=s||y,S=Z(null),v=Z(null),R=Z(p),L=l!=null,A=fe(l),D=fe(r),$=fe(u),B=it(()=>{if(!S.current||!v.current)return;const b={placement:e,strategy:n,middleware:m};D.current&&(b.platform=D.current),So(S.current,v.current,b).then(P=>{const k={...P,isPositioned:$.current!==!1};O.current&&!Kt(R.current,k)&&(R.current=k,Tn(()=>{f(k)}))})},[m,e,n,D,$]);Vt(()=>{u===!1&&R.current.isPositioned&&(R.current.isPositioned=!1,f(b=>({...b,isPositioned:!1})))},[u]);const O=Z(!1);Vt(()=>(O.current=!0,()=>{O.current=!1}),[]),Vt(()=>{if(E&&(S.current=E),T&&(v.current=T),E&&T){if(A.current)return A.current(E,T,B);B()}},[E,T,B,A,L]);const I=q(()=>({reference:S,floating:v,setReference:w,setFloating:x}),[w,x]),M=q(()=>({reference:E,floating:T}),[E,T]),F=q(()=>{const b={position:n,left:0,top:0};if(!M.floating)return b;const P=Ve(M.floating,p.x),k=Ve(M.floating,p.y);return c?{...b,transform:"translate("+P+"px, "+k+"px)",...an(M.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:P,top:k}},[n,c,M.floating,p.x,p.y]);return q(()=>({...p,update:B,refs:I,elements:M,floatingStyles:F}),[p,B,I,M,F])}const Sr=(t,e)=>{const n=vo(t);return{name:n.name,fn:n.fn,options:[t,e]}},Rr=(t,e)=>{const n=bo(t);return{name:n.name,fn:n.fn,options:[t,e]}},Cr=(t,e)=>{const n=Eo(t);return{name:n.name,fn:n.fn,options:[t,e]}},To="data-floating-ui-focusable",He="active",ze="selected",Lo={...Qe};let je=!1,Ao=0;const We=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+Ao++;function Po(){const[t,e]=et(()=>je?We():void 0);return ge(()=>{t==null&&e(We())},[]),Ct(()=>{je=!0},[]),t}const Do=Lo.useId,Io=Do||Po;function Mo(){const t=new Map;return{emit(e,n){var o;(o=t.get(e))==null||o.forEach(r=>r(n))},on(e,n){t.has(e)||t.set(e,new Set),t.get(e).add(n)},off(e,n){var o;(o=t.get(e))==null||o.delete(n)}}}const Fo=Ze(null),ko=Ze(null),_o=()=>{var t;return((t=Je(Fo))==null?void 0:t.id)||null},dn=()=>Je(ko);function No(t){return"data-floating-ui-"+t}const $o={pointerdown:"onPointerDown",mousedown:"onMouseDown",click:"onClick"},Bo={pointerdown:"onPointerDownCapture",mousedown:"onMouseDownCapture",click:"onClickCapture"},Ke=t=>{var e,n;return{escapeKey:typeof t=="boolean"?t:(e=t?.escapeKey)!=null?e:!1,outsidePress:typeof t=="boolean"?t:(n=t?.outsidePress)!=null?n:!0}};function Or(t,e){e===void 0&&(e={});const{open:n,onOpenChange:o,elements:r,dataRef:i}=t,{enabled:s=!0,escapeKey:c=!0,outsidePress:l=!0,outsidePressEvent:u="pointerdown",referencePress:p=!1,referencePressEvent:f="pointerdown",ancestorScroll:m=!1,bubbles:h,capture:d}=e,g=dn(),y=Rt(typeof l=="function"?l:()=>!1),a=typeof l=="function"?y:l,w=Z(!1),{escapeKey:x,outsidePress:E}=Ke(h),{escapeKey:T,outsidePress:S}=Ke(d),v=Z(!1),R=Rt(O=>{var I;if(!n||!s||!c||O.key!=="Escape"||v.current)return;const M=(I=i.current.floatingContext)==null?void 0:I.nodeId,F=g?Bt(g.nodesRef.current,M):[];if(!x&&(O.stopPropagation(),F.length>0)){let b=!0;if(F.forEach(P=>{var k;if((k=P.context)!=null&&k.open&&!P.context.dataRef.current.__escapeKeyBubbles){b=!1;return}}),!b)return}o(!1,jn(O)?O.nativeEvent:O,"escape-key")}),L=Rt(O=>{var I;const M=()=>{var F;R(O),(F=Pt(O))==null||F.removeEventListener("keydown",M)};(I=Pt(O))==null||I.addEventListener("keydown",M)}),A=Rt(O=>{var I;const M=i.current.insideReactTree;i.current.insideReactTree=!1;const F=w.current;if(w.current=!1,u==="click"&&F||M||typeof a=="function"&&!a(O))return;const b=Pt(O),P="["+No("inert")+"]",k=_e(r.floating).querySelectorAll(P);let j=z(b)?b:null;for(;j&&!pt(j);){const W=ht(j);if(pt(W)||!z(W))break;j=W}if(k.length&&z(b)&&!zn(b)&&!ke(b,r.floating)&&Array.from(k).every(W=>!ke(j,W)))return;if(ft(b)&&B){const W=pt(b),G=ot(b),K=/auto|scroll/,X=W||K.test(G.overflowX),tt=W||K.test(G.overflowY),Y=X&&b.clientWidth>0&&b.scrollWidth>b.clientWidth,N=tt&&b.clientHeight>0&&b.scrollHeight>b.clientHeight,C=G.direction==="rtl",_=N&&(C?O.offsetX<=b.offsetWidth-b.clientWidth:O.offsetX>b.clientWidth),H=Y&&O.offsetY>b.clientHeight;if(_||H)return}const st=(I=i.current.floatingContext)==null?void 0:I.nodeId,at=g&&Bt(g.nodesRef.current,st).some(W=>{var G;return le(O,(G=W.context)==null?void 0:G.elements.floating)});if(le(O,r.floating)||le(O,r.domReference)||at)return;const J=g?Bt(g.nodesRef.current,st):[];if(J.length>0){let W=!0;if(J.forEach(G=>{var K;if((K=G.context)!=null&&K.open&&!G.context.dataRef.current.__outsidePressBubbles){W=!1;return}}),!W)return}o(!1,O,"outside-press")}),D=Rt(O=>{var I;const M=()=>{var F;A(O),(F=Pt(O))==null||F.removeEventListener(u,M)};(I=Pt(O))==null||I.addEventListener(u,M)});Ct(()=>{if(!n||!s)return;i.current.__escapeKeyBubbles=x,i.current.__outsidePressBubbles=E;let O=-1;function I(k){o(!1,k,"ancestor-scroll")}function M(){window.clearTimeout(O),v.current=!0}function F(){O=window.setTimeout(()=>{v.current=!1},Yt()?5:0)}const b=_e(r.floating);c&&(b.addEventListener("keydown",T?L:R,T),b.addEventListener("compositionstart",M),b.addEventListener("compositionend",F)),a&&b.addEventListener(u,S?D:A,S);let P=[];return m&&(z(r.domReference)&&(P=gt(r.domReference)),z(r.floating)&&(P=P.concat(gt(r.floating))),!z(r.reference)&&r.reference&&r.reference.contextElement&&(P=P.concat(gt(r.reference.contextElement)))),P=P.filter(k=>{var j;return k!==((j=b.defaultView)==null?void 0:j.visualViewport)}),P.forEach(k=>{k.addEventListener("scroll",I)}),()=>{c&&(b.removeEventListener("keydown",T?L:R,T),b.removeEventListener("compositionstart",M),b.removeEventListener("compositionend",F)),a&&b.removeEventListener(u,S?D:A,S),P.forEach(k=>{k.removeEventListener("scroll",I)}),window.clearTimeout(O)}},[i,r,c,a,u,n,o,m,s,x,E,R,T,L,A,S,D]),Ct(()=>{i.current.insideReactTree=!1},[i,a,u]);const $=q(()=>({onKeyDown:R,...p&&{[$o[f]]:O=>{o(!1,O.nativeEvent,"reference-press")},...f!=="click"&&{onClick(O){o(!1,O.nativeEvent,"reference-press")}}}}),[R,o,p,f]),B=q(()=>{function O(I){I.button===0&&(w.current=!0)}return{onKeyDown:R,onMouseDown:O,onMouseUp:O,[Bo[u]]:()=>{i.current.insideReactTree=!0}}},[R,u,i]);return q(()=>s?{reference:$,floating:B}:{},[s,$,B])}function Vo(t){const{open:e=!1,onOpenChange:n,elements:o}=t,r=Io(),i=Z({}),[s]=et(()=>Mo()),c=_o()!=null,[l,u]=et(o.reference),p=Rt((h,d,g)=>{i.current.openEvent=h?d:void 0,s.emit("openchange",{open:h,event:d,reason:g,nested:c}),n?.(h,d,g)}),f=q(()=>({setPositionReference:u}),[]),m=q(()=>({reference:l||o.reference||null,floating:o.floating||null,domReference:o.reference}),[l,o.reference,o.floating]);return q(()=>({dataRef:i,open:e,onOpenChange:p,elements:m,events:s,floatingId:r,refs:f}),[e,p,m,s,r,f])}function Tr(t){var e,n;let{elements:o,...r}=t===void 0?{}:t;const{nodeId:i}=r,s=Vo({...r,elements:{reference:(e=o?.reference)!=null?e:null,floating:(n=o?.floating)!=null?n:null}}),c=r.rootContext||s,l=c.elements,[u,p]=et(null),[f,m]=et(null),d=l?.domReference||u,g=Z(null),y=dn();ge(()=>{d&&(g.current=d)},[d]);const a=Oo({...r,elements:{...l,...f&&{reference:f}}}),w=it(v=>{const R=z(v)?{getBoundingClientRect:()=>v.getBoundingClientRect(),getClientRects:()=>v.getClientRects(),contextElement:v}:v;m(R),a.refs.setReference(R)},[a.refs]),x=it(v=>{(z(v)||v===null)&&(g.current=v,p(v)),(z(a.refs.reference.current)||a.refs.reference.current===null||v!==null&&!z(v))&&a.refs.setReference(v)},[a.refs]),E=q(()=>({...a.refs,setReference:x,setPositionReference:w,domReference:g}),[a.refs,x,w]),T=q(()=>({...a.elements,domReference:d}),[a.elements,d]),S=q(()=>({...a,...c,refs:E,elements:T,nodeId:i}),[a,E,T,i,c]);return ge(()=>{c.dataRef.current.floatingContext=S;const v=y?.nodesRef.current.find(R=>R.id===i);v&&(v.context=S)}),q(()=>({...a,context:S,refs:E,elements:T}),[a,E,T,S])}function ae(t,e,n){const o=new Map,r=n==="item";let i=t;if(r&&t){const{[He]:s,[ze]:c,...l}=t;i=l}return{...n==="floating"&&{tabIndex:-1,[To]:""},...i,...e.map(s=>{const c=s?s[n]:null;return typeof c=="function"?t?c(t):null:c}).concat(t).reduce((s,c)=>(c&&Object.entries(c).forEach(l=>{let[u,p]=l;if(!(r&&[He,ze].includes(u)))if(u.indexOf("on")===0){if(o.has(u)||o.set(u,[]),typeof p=="function"){var f;(f=o.get(u))==null||f.push(p),s[u]=function(){for(var m,h=arguments.length,d=new Array(h),g=0;g<h;g++)d[g]=arguments[g];return(m=o.get(u))==null?void 0:m.map(y=>y(...d)).find(y=>y!==void 0)}}}else s[u]=p}),s),{})}}function Lr(t){t===void 0&&(t=[]);const e=t.map(c=>c?.reference),n=t.map(c=>c?.floating),o=t.map(c=>c?.item),r=it(c=>ae(c,t,"reference"),e),i=it(c=>ae(c,t,"floating"),n),s=it(c=>ae(c,t,"item"),o);return q(()=>({getReferenceProps:r,getFloatingProps:i,getItemProps:s}),[r,i,s])}function Ho(t){return Object.prototype.toString.call(t)==="[object Object]"}function Xe(t){return Ho(t)||Array.isArray(t)}function zo(){return!!(typeof window<"u"&&window.document&&window.document.createElement)}function ve(t,e){const n=Object.keys(t),o=Object.keys(e);if(n.length!==o.length)return!1;const r=JSON.stringify(Object.keys(t.breakpoints||{})),i=JSON.stringify(Object.keys(e.breakpoints||{}));return r!==i?!1:n.every(s=>{const c=t[s],l=e[s];return typeof c=="function"?`${c}`==`${l}`:!Xe(c)||!Xe(l)?c===l:ve(c,l)})}function Ge(t){return t.concat().sort((e,n)=>e.name>n.name?1:-1).map(e=>e.options)}function jo(t,e){if(t.length!==e.length)return!1;const n=Ge(t),o=Ge(e);return n.every((r,i)=>{const s=o[i];return ve(r,s)})}function be(t){return typeof t=="number"}function he(t){return typeof t=="string"}function ee(t){return typeof t=="boolean"}function Ue(t){return Object.prototype.toString.call(t)==="[object Object]"}function V(t){return Math.abs(t)}function Ee(t){return Math.sign(t)}function It(t,e){return V(t-e)}function Wo(t,e){if(t===0||e===0||V(t)<=V(e))return 0;const n=It(V(t),V(e));return V(n/t)}function Ko(t){return Math.round(t*100)/100}function Mt(t){return Ft(t).map(Number)}function nt(t){return t[_t(t)]}function _t(t){return Math.max(0,t.length-1)}function Se(t,e){return e===_t(t)}function qe(t,e=0){return Array.from(Array(t),(n,o)=>e+o)}function Ft(t){return Object.keys(t)}function mn(t,e){return[t,e].reduce((n,o)=>(Ft(o).forEach(r=>{const i=n[r],s=o[r],c=Ue(i)&&Ue(s);n[r]=c?mn(i,s):s}),n),{})}function ye(t,e){return typeof e.MouseEvent<"u"&&t instanceof e.MouseEvent}function Xo(t,e){const n={start:o,center:r,end:i};function o(){return 0}function r(l){return i(l)/2}function i(l){return e-l}function s(l,u){return he(t)?n[t](l):t(e,l,u)}return{measure:s}}function kt(){let t=[];function e(r,i,s,c={passive:!0}){let l;if("addEventListener"in r)r.addEventListener(i,s,c),l=()=>r.removeEventListener(i,s,c);else{const u=r;u.addListener(s),l=()=>u.removeListener(s)}return t.push(l),o}function n(){t=t.filter(r=>r())}const o={add:e,clear:n};return o}function Go(t,e,n,o){const r=kt(),i=1e3/60;let s=null,c=0,l=0;function u(){r.add(t,"visibilitychange",()=>{t.hidden&&d()})}function p(){h(),r.clear()}function f(y){if(!l)return;s||(s=y,n(),n());const a=y-s;for(s=y,c+=a;c>=i;)n(),c-=i;const w=c/i;o(w),l&&(l=e.requestAnimationFrame(f))}function m(){l||(l=e.requestAnimationFrame(f))}function h(){e.cancelAnimationFrame(l),s=null,c=0,l=0}function d(){s=null,c=0}return{init:u,destroy:p,start:m,stop:h,update:n,render:o}}function Uo(t,e){const n=e==="rtl",o=t==="y",r=o?"y":"x",i=o?"x":"y",s=!o&&n?-1:1,c=p(),l=f();function u(d){const{height:g,width:y}=d;return o?g:y}function p(){return o?"top":n?"right":"left"}function f(){return o?"bottom":n?"left":"right"}function m(d){return d*s}return{scroll:r,cross:i,startEdge:c,endEdge:l,measureSize:u,direction:m}}function Et(t=0,e=0){const n=V(t-e);function o(u){return u<t}function r(u){return u>e}function i(u){return o(u)||r(u)}function s(u){return i(u)?o(u)?t:e:u}function c(u){return n?u-n*Math.ceil((u-e)/n):u}return{length:n,max:e,min:t,constrain:s,reachedAny:i,reachedMax:r,reachedMin:o,removeOffset:c}}function pn(t,e,n){const{constrain:o}=Et(0,t),r=t+1;let i=s(e);function s(m){return n?V((r+m)%r):o(m)}function c(){return i}function l(m){return i=s(m),f}function u(m){return p().set(c()+m)}function p(){return pn(t,c(),n)}const f={get:c,set:l,add:u,clone:p};return f}function qo(t,e,n,o,r,i,s,c,l,u,p,f,m,h,d,g,y,a,w){const{cross:x,direction:E}=t,T=["INPUT","SELECT","TEXTAREA"],S={passive:!1},v=kt(),R=kt(),L=Et(50,225).constrain(h.measure(20)),A={mouse:300,touch:400},D={mouse:500,touch:600},$=d?43:25;let B=!1,O=0,I=0,M=!1,F=!1,b=!1,P=!1;function k(C){if(!w)return;function _(U){(ee(w)||w(C,U))&&G(U)}const H=e;v.add(H,"dragstart",U=>U.preventDefault(),S).add(H,"touchmove",()=>{},S).add(H,"touchend",()=>{}).add(H,"touchstart",_).add(H,"mousedown",_).add(H,"touchcancel",X).add(H,"contextmenu",X).add(H,"click",tt,!0)}function j(){v.clear(),R.clear()}function st(){const C=P?n:e;R.add(C,"touchmove",K,S).add(C,"touchend",X).add(C,"mousemove",K,S).add(C,"mouseup",X)}function at(C){const _=C.nodeName||"";return T.includes(_)}function J(){return(d?D:A)[P?"mouse":"touch"]}function W(C,_){const H=f.add(Ee(C)*-1),U=p.byDistance(C,!d).distance;return d||V(C)<L?U:y&&_?U*.5:p.byIndex(H.get(),0).distance}function G(C){const _=ye(C,o);P=_,b=d&&_&&!C.buttons&&B,B=It(r.get(),s.get())>=2,!(_&&C.button!==0)&&(at(C.target)||(M=!0,i.pointerDown(C),u.useFriction(0).useDuration(0),r.set(s),st(),O=i.readPoint(C),I=i.readPoint(C,x),m.emit("pointerDown")))}function K(C){if(!ye(C,o)&&C.touches.length>=2)return X(C);const H=i.readPoint(C),U=i.readPoint(C,x),rt=It(H,O),ct=It(U,I);if(!F&&!P&&(!C.cancelable||(F=rt>ct,!F)))return X(C);const yt=i.pointerMove(C);rt>g&&(b=!0),u.useFriction(.3).useDuration(.75),c.start(),r.add(E(yt)),C.preventDefault()}function X(C){const H=p.byDistance(0,!1).index!==f.get(),U=i.pointerUp(C)*J(),rt=W(E(U),H),ct=Wo(U,rt),yt=$-10*ct,dt=a+ct/50;F=!1,M=!1,R.clear(),u.useDuration(yt).useFriction(dt),l.distance(rt,!d),P=!1,m.emit("pointerUp")}function tt(C){b&&(C.stopPropagation(),C.preventDefault(),b=!1)}function Y(){return M}return{init:k,destroy:j,pointerDown:Y}}function Yo(t,e){let o,r;function i(f){return f.timeStamp}function s(f,m){const d=`client${(m||t.scroll)==="x"?"X":"Y"}`;return(ye(f,e)?f:f.touches[0])[d]}function c(f){return o=f,r=f,s(f)}function l(f){const m=s(f)-s(r),h=i(f)-i(o)>170;return r=f,h&&(o=f),m}function u(f){if(!o||!r)return 0;const m=s(r)-s(o),h=i(f)-i(o),d=i(f)-i(r)>170,g=m/h;return h&&!d&&V(g)>.1?g:0}return{pointerDown:c,pointerMove:l,pointerUp:u,readPoint:s}}function Qo(){function t(n){const{offsetTop:o,offsetLeft:r,offsetWidth:i,offsetHeight:s}=n;return{top:o,right:r+i,bottom:o+s,left:r,width:i,height:s}}return{measure:t}}function Jo(t){function e(o){return t*(o/100)}return{measure:e}}function Zo(t,e,n,o,r,i,s){const c=[t].concat(o);let l,u,p=[],f=!1;function m(y){return r.measureSize(s.measure(y))}function h(y){if(!i)return;u=m(t),p=o.map(m);function a(w){for(const x of w){if(f)return;const E=x.target===t,T=o.indexOf(x.target),S=E?u:p[T],v=m(E?t:o[T]);if(V(v-S)>=.5){y.reInit(),e.emit("resize");break}}}l=new ResizeObserver(w=>{(ee(i)||i(y,w))&&a(w)}),n.requestAnimationFrame(()=>{c.forEach(w=>l.observe(w))})}function d(){f=!0,l&&l.disconnect()}return{init:h,destroy:d}}function tr(t,e,n,o,r,i){let s=0,c=0,l=r,u=i,p=t.get(),f=0;function m(){const S=o.get()-t.get(),v=!l;let R=0;return v?(s=0,n.set(o),t.set(o),R=S):(n.set(t),s+=S/l,s*=u,p+=s,t.add(s),R=p-f),c=Ee(R),f=p,T}function h(){const S=o.get()-e.get();return V(S)<.001}function d(){return l}function g(){return c}function y(){return s}function a(){return x(r)}function w(){return E(i)}function x(S){return l=S,T}function E(S){return u=S,T}const T={direction:g,duration:d,velocity:y,seek:m,settled:h,useBaseFriction:w,useBaseDuration:a,useFriction:E,useDuration:x};return T}function er(t,e,n,o,r){const i=r.measure(10),s=r.measure(50),c=Et(.1,.99);let l=!1;function u(){return!(l||!t.reachedAny(n.get())||!t.reachedAny(e.get()))}function p(h){if(!u())return;const d=t.reachedMin(e.get())?"min":"max",g=V(t[d]-e.get()),y=n.get()-e.get(),a=c.constrain(g/s);n.subtract(y*a),!h&&V(y)<i&&(n.set(t.constrain(n.get())),o.useDuration(25).useBaseFriction())}function f(h){l=!h}return{shouldConstrain:u,constrain:p,toggleActive:f}}function nr(t,e,n,o,r){const i=Et(-e+t,0),s=f(),c=p(),l=m();function u(d,g){return It(d,g)<=1}function p(){const d=s[0],g=nt(s),y=s.lastIndexOf(d),a=s.indexOf(g)+1;return Et(y,a)}function f(){return n.map((d,g)=>{const{min:y,max:a}=i,w=i.constrain(d),x=!g,E=Se(n,g);return x?a:E||u(y,w)?y:u(a,w)?a:w}).map(d=>parseFloat(d.toFixed(3)))}function m(){if(e<=t+r)return[i.max];if(o==="keepSnaps")return s;const{min:d,max:g}=c;return s.slice(d,g)}return{snapsContained:l,scrollContainLimit:c}}function or(t,e,n){const o=e[0],r=n?o-t:nt(e);return{limit:Et(r,o)}}function rr(t,e,n,o){const i=e.min+.1,s=e.max+.1,{reachedMin:c,reachedMax:l}=Et(i,s);function u(m){return m===1?l(n.get()):m===-1?c(n.get()):!1}function p(m){if(!u(m))return;const h=t*(m*-1);o.forEach(d=>d.add(h))}return{loop:p}}function ir(t){const{max:e,length:n}=t;function o(i){const s=i-e;return n?s/-n:0}return{get:o}}function sr(t,e,n,o,r){const{startEdge:i,endEdge:s}=t,{groupSlides:c}=r,l=f().map(e.measure),u=m(),p=h();function f(){return c(o).map(g=>nt(g)[s]-g[0][i]).map(V)}function m(){return o.map(g=>n[i]-g[i]).map(g=>-V(g))}function h(){return c(u).map(g=>g[0]).map((g,y)=>g+l[y])}return{snaps:u,snapsAligned:p}}function cr(t,e,n,o,r,i){const{groupSlides:s}=r,{min:c,max:l}=o,u=p();function p(){const m=s(i),h=!t||e==="keepSnaps";return n.length===1?[i]:h?m:m.slice(c,l).map((d,g,y)=>{const a=!g,w=Se(y,g);if(a){const x=nt(y[0])+1;return qe(x)}if(w){const x=_t(i)-nt(y)[0]+1;return qe(x,nt(y)[0])}return d})}return{slideRegistry:u}}function lr(t,e,n,o,r){const{reachedAny:i,removeOffset:s,constrain:c}=o;function l(d){return d.concat().sort((g,y)=>V(g)-V(y))[0]}function u(d){const g=t?s(d):c(d),y=e.map((w,x)=>({diff:p(w-g,0),index:x})).sort((w,x)=>V(w.diff)-V(x.diff)),{index:a}=y[0];return{index:a,distance:g}}function p(d,g){const y=[d,d+n,d-n];if(!t)return d;if(!g)return l(y);const a=y.filter(w=>Ee(w)===g);return a.length?l(a):nt(y)-n}function f(d,g){const y=e[d]-r.get(),a=p(y,g);return{index:d,distance:a}}function m(d,g){const y=r.get()+d,{index:a,distance:w}=u(y),x=!t&&i(y);if(!g||x)return{index:a,distance:d};const E=e[a]-w,T=d+p(E,0);return{index:a,distance:T}}return{byDistance:m,byIndex:f,shortcut:p}}function ur(t,e,n,o,r,i,s){function c(f){const m=f.distance,h=f.index!==e.get();i.add(m),m&&(o.duration()?t.start():(t.update(),t.render(1),t.update())),h&&(n.set(e.get()),e.set(f.index),s.emit("select"))}function l(f,m){const h=r.byDistance(f,m);c(h)}function u(f,m){const h=e.clone().set(f),d=r.byIndex(h.get(),m);c(d)}return{distance:l,index:u}}function fr(t,e,n,o,r,i,s,c){const l={passive:!0,capture:!0};let u=0;function p(h){if(!c)return;function d(g){if(new Date().getTime()-u>10)return;s.emit("slideFocusStart"),t.scrollLeft=0;const w=n.findIndex(x=>x.includes(g));be(w)&&(r.useDuration(0),o.index(w,0),s.emit("slideFocus"))}i.add(document,"keydown",f,!1),e.forEach((g,y)=>{i.add(g,"focus",a=>{(ee(c)||c(h,a))&&d(y)},l)})}function f(h){h.code==="Tab"&&(u=new Date().getTime())}return{init:p}}function Dt(t){let e=t;function n(){return e}function o(l){e=s(l)}function r(l){e+=s(l)}function i(l){e-=s(l)}function s(l){return be(l)?l:l.get()}return{get:n,set:o,add:r,subtract:i}}function gn(t,e){const n=t.scroll==="x"?s:c,o=e.style;let r=null,i=!1;function s(m){return`translate3d(${m}px,0px,0px)`}function c(m){return`translate3d(0px,${m}px,0px)`}function l(m){if(i)return;const h=Ko(t.direction(m));h!==r&&(o.transform=n(h),r=h)}function u(m){i=!m}function p(){i||(o.transform="",e.getAttribute("style")||e.removeAttribute("style"))}return{clear:p,to:l,toggleActive:u}}function ar(t,e,n,o,r,i,s,c,l){const p=Mt(r),f=Mt(r).reverse(),m=a().concat(w());function h(v,R){return v.reduce((L,A)=>L-r[A],R)}function d(v,R){return v.reduce((L,A)=>h(L,R)>0?L.concat([A]):L,[])}function g(v){return i.map((R,L)=>({start:R-o[L]+.5+v,end:R+e-.5+v}))}function y(v,R,L){const A=g(R);return v.map(D=>{const $=L?0:-n,B=L?n:0,O=L?"end":"start",I=A[D][O];return{index:D,loopPoint:I,slideLocation:Dt(-1),translate:gn(t,l[D]),target:()=>c.get()>I?$:B}})}function a(){const v=s[0],R=d(f,v);return y(R,n,!1)}function w(){const v=e-s[0]-1,R=d(p,v);return y(R,-n,!0)}function x(){return m.every(({index:v})=>{const R=p.filter(L=>L!==v);return h(R,e)<=.1})}function E(){m.forEach(v=>{const{target:R,translate:L,slideLocation:A}=v,D=R();D!==A.get()&&(L.to(D),A.set(D))})}function T(){m.forEach(v=>v.translate.clear())}return{canLoop:x,clear:T,loop:E,loopPoints:m}}function dr(t,e,n){let o,r=!1;function i(l){if(!n)return;function u(p){for(const f of p)if(f.type==="childList"){l.reInit(),e.emit("slidesChanged");break}}o=new MutationObserver(p=>{r||(ee(n)||n(l,p))&&u(p)}),o.observe(t,{childList:!0})}function s(){o&&o.disconnect(),r=!0}return{init:i,destroy:s}}function mr(t,e,n,o){const r={};let i=null,s=null,c,l=!1;function u(){c=new IntersectionObserver(d=>{l||(d.forEach(g=>{const y=e.indexOf(g.target);r[y]=g}),i=null,s=null,n.emit("slidesInView"))},{root:t.parentElement,threshold:o}),e.forEach(d=>c.observe(d))}function p(){c&&c.disconnect(),l=!0}function f(d){return Ft(r).reduce((g,y)=>{const a=parseInt(y),{isIntersecting:w}=r[a];return(d&&w||!d&&!w)&&g.push(a),g},[])}function m(d=!0){if(d&&i)return i;if(!d&&s)return s;const g=f(d);return d&&(i=g),d||(s=g),g}return{init:u,destroy:p,get:m}}function pr(t,e,n,o,r,i){const{measureSize:s,startEdge:c,endEdge:l}=t,u=n[0]&&r,p=d(),f=g(),m=n.map(s),h=y();function d(){if(!u)return 0;const w=n[0];return V(e[c]-w[c])}function g(){if(!u)return 0;const w=i.getComputedStyle(nt(o));return parseFloat(w.getPropertyValue(`margin-${l}`))}function y(){return n.map((w,x,E)=>{const T=!x,S=Se(E,x);return T?m[x]+p:S?m[x]+f:E[x+1][c]-w[c]}).map(V)}return{slideSizes:m,slideSizesWithGaps:h,startGap:p,endGap:f}}function gr(t,e,n,o,r,i,s,c,l){const{startEdge:u,endEdge:p,direction:f}=t,m=be(n);function h(a,w){return Mt(a).filter(x=>x%w===0).map(x=>a.slice(x,x+w))}function d(a){return a.length?Mt(a).reduce((w,x,E)=>{const T=nt(w)||0,S=T===0,v=x===_t(a),R=r[u]-i[T][u],L=r[u]-i[x][p],A=!o&&S?f(s):0,D=!o&&v?f(c):0,$=V(L-D-(R+A));return E&&$>e+l&&w.push(x),v&&w.push(a.length),w},[]).map((w,x,E)=>{const T=Math.max(E[x-1]||0);return a.slice(T,w)}):[]}function g(a){return m?h(a,n):d(a)}return{groupSlides:g}}function hr(t,e,n,o,r,i,s){const{align:c,axis:l,direction:u,startIndex:p,loop:f,duration:m,dragFree:h,dragThreshold:d,inViewThreshold:g,slidesToScroll:y,skipSnaps:a,containScroll:w,watchResize:x,watchSlides:E,watchDrag:T,watchFocus:S}=i,v=2,R=Qo(),L=R.measure(e),A=n.map(R.measure),D=Uo(l,u),$=D.measureSize(L),B=Jo($),O=Xo(c,$),I=!f&&!!w,M=f||!!w,{slideSizes:F,slideSizesWithGaps:b,startGap:P,endGap:k}=pr(D,L,A,n,M,r),j=gr(D,$,y,f,L,A,P,k,v),{snaps:st,snapsAligned:at}=sr(D,O,L,A,j),J=-nt(st)+nt(b),{snapsContained:W,scrollContainLimit:G}=nr($,J,at,w,v),K=I?W:at,{limit:X}=or(J,K,f),tt=pn(_t(K),p,f),Y=tt.clone(),N=Mt(n),C=({dragHandler:St,scrollBody:ie,scrollBounds:se,options:{loop:Nt}})=>{Nt||se.constrain(St.pointerDown()),ie.seek()},_=({scrollBody:St,translate:ie,location:se,offsetLocation:Nt,previousLocation:xn,scrollLooper:vn,slideLooper:bn,dragHandler:En,animation:Sn,eventHandler:Te,scrollBounds:Rn,options:{loop:Le}},Ae)=>{const Pe=St.settled(),Cn=!Rn.shouldConstrain(),De=Le?Pe:Pe&&Cn,Ie=De&&!En.pointerDown();Ie&&Sn.stop();const On=se.get()*Ae+xn.get()*(1-Ae);Nt.set(On),Le&&(vn.loop(St.direction()),bn.loop()),ie.to(Nt.get()),Ie&&Te.emit("settle"),De||Te.emit("scroll")},H=Go(o,r,()=>C(re),St=>_(re,St)),U=.68,rt=K[tt.get()],ct=Dt(rt),yt=Dt(rt),dt=Dt(rt),wt=Dt(rt),At=tr(ct,dt,yt,wt,m,U),ne=lr(f,K,J,X,wt),oe=ur(H,tt,Y,At,ne,wt,s),Re=ir(X),Ce=kt(),yn=mr(e,n,s,g),{slideRegistry:Oe}=cr(I,w,K,G,j,N),wn=fr(t,n,Oe,oe,At,Ce,s,S),re={ownerDocument:o,ownerWindow:r,eventHandler:s,containerRect:L,slideRects:A,animation:H,axis:D,dragHandler:qo(D,t,o,r,wt,Yo(D,r),ct,H,oe,At,ne,tt,s,B,h,d,a,U,T),eventStore:Ce,percentOfView:B,index:tt,indexPrevious:Y,limit:X,location:ct,offsetLocation:dt,previousLocation:yt,options:i,resizeHandler:Zo(e,s,r,n,D,x,R),scrollBody:At,scrollBounds:er(X,dt,wt,At,B),scrollLooper:rr(J,X,dt,[ct,dt,yt,wt]),scrollProgress:Re,scrollSnapList:K.map(Re.get),scrollSnaps:K,scrollTarget:ne,scrollTo:oe,slideLooper:ar(D,$,J,F,b,st,K,dt,n),slideFocus:wn,slidesHandler:dr(e,s,E),slidesInView:yn,slideIndexes:N,slideRegistry:Oe,slidesToScroll:j,target:wt,translate:gn(D,e)};return re}function yr(){let t={},e;function n(u){e=u}function o(u){return t[u]||[]}function r(u){return o(u).forEach(p=>p(e,u)),l}function i(u,p){return t[u]=o(u).concat([p]),l}function s(u,p){return t[u]=o(u).filter(f=>f!==p),l}function c(){t={}}const l={init:n,emit:r,off:s,on:i,clear:c};return l}const wr={align:"center",axis:"x",container:null,slides:null,containScroll:"trimSnaps",direction:"ltr",slidesToScroll:1,inViewThreshold:0,breakpoints:{},dragFree:!1,dragThreshold:10,loop:!1,skipSnaps:!1,duration:25,startIndex:0,active:!0,watchDrag:!0,watchResize:!0,watchSlides:!0,watchFocus:!0};function xr(t){function e(i,s){return mn(i,s||{})}function n(i){const s=i.breakpoints||{},c=Ft(s).filter(l=>t.matchMedia(l).matches).map(l=>s[l]).reduce((l,u)=>e(l,u),{});return e(i,c)}function o(i){return i.map(s=>Ft(s.breakpoints||{})).reduce((s,c)=>s.concat(c),[]).map(t.matchMedia)}return{mergeOptions:e,optionsAtMedia:n,optionsMediaQueries:o}}function vr(t){let e=[];function n(i,s){return e=s.filter(({options:c})=>t.optionsAtMedia(c).active!==!1),e.forEach(c=>c.init(i,t)),s.reduce((c,l)=>Object.assign(c,{[l.name]:l}),{})}function o(){e=e.filter(i=>i.destroy())}return{init:n,destroy:o}}function Xt(t,e,n){const o=t.ownerDocument,r=o.defaultView,i=xr(r),s=vr(i),c=kt(),l=yr(),{mergeOptions:u,optionsAtMedia:p,optionsMediaQueries:f}=i,{on:m,off:h,emit:d}=l,g=D;let y=!1,a,w=u(wr,Xt.globalOptions),x=u(w),E=[],T,S,v;function R(){const{container:N,slides:C}=x;S=(he(N)?t.querySelector(N):N)||t.children[0];const H=he(C)?S.querySelectorAll(C):C;v=[].slice.call(H||S.children)}function L(N){const C=hr(t,S,v,o,r,N,l);if(N.loop&&!C.slideLooper.canLoop()){const _=Object.assign({},N,{loop:!1});return L(_)}return C}function A(N,C){y||(w=u(w,N),x=p(w),E=C||E,R(),a=L(x),f([w,...E.map(({options:_})=>_)]).forEach(_=>c.add(_,"change",D)),x.active&&(a.translate.to(a.location.get()),a.animation.init(),a.slidesInView.init(),a.slideFocus.init(Y),a.eventHandler.init(Y),a.resizeHandler.init(Y),a.slidesHandler.init(Y),a.options.loop&&a.slideLooper.loop(),S.offsetParent&&v.length&&a.dragHandler.init(Y),T=s.init(Y,E)))}function D(N,C){const _=j();$(),A(u({startIndex:_},N),C),l.emit("reInit")}function $(){a.dragHandler.destroy(),a.eventStore.clear(),a.translate.clear(),a.slideLooper.clear(),a.resizeHandler.destroy(),a.slidesHandler.destroy(),a.slidesInView.destroy(),a.animation.destroy(),s.destroy(),c.clear()}function B(){y||(y=!0,c.clear(),$(),l.emit("destroy"),l.clear())}function O(N,C,_){!x.active||y||(a.scrollBody.useBaseFriction().useDuration(C===!0?0:x.duration),a.scrollTo.index(N,_||0))}function I(N){const C=a.index.add(1).get();O(C,N,-1)}function M(N){const C=a.index.add(-1).get();O(C,N,1)}function F(){return a.index.add(1).get()!==j()}function b(){return a.index.add(-1).get()!==j()}function P(){return a.scrollSnapList}function k(){return a.scrollProgress.get(a.offsetLocation.get())}function j(){return a.index.get()}function st(){return a.indexPrevious.get()}function at(){return a.slidesInView.get()}function J(){return a.slidesInView.get(!1)}function W(){return T}function G(){return a}function K(){return t}function X(){return S}function tt(){return v}const Y={canScrollNext:F,canScrollPrev:b,containerNode:X,internalEngine:G,destroy:B,off:h,on:m,emit:d,plugins:W,previousScrollSnap:st,reInit:g,rootNode:K,scrollNext:I,scrollPrev:M,scrollProgress:k,scrollSnapList:P,scrollTo:O,selectedScrollSnap:j,slideNodes:tt,slidesInView:at,slidesNotInView:J};return A(e,n),setTimeout(()=>l.emit("init"),0),Y}Xt.globalOptions=void 0;function hn(t={},e=[]){const n=Z(t),o=Z(e),[r,i]=et(),[s,c]=et(),l=it(()=>{r&&r.reInit(n.current,o.current)},[r]);return Ct(()=>{ve(n.current,t)||(n.current=t,l())},[t,l]),Ct(()=>{jo(o.current,e)||(o.current=e,l())},[e,l]),Ct(()=>{if(zo()&&s){Xt.globalOptions=hn.globalOptions;const u=Xt(s,n.current,o.current);return i(u),()=>u.destroy()}else i(void 0)},[s,i]),[c,r]}hn.globalOptions=void 0;export{Tr as a,Er as b,Or as c,Lr as d,Cr as f,Sr as o,Rr as s,hn as u};
@@ -33,11 +33,11 @@
33
33
  background-color: #0c0d12;
34
34
  }
35
35
  </style>
36
- <script type="module" crossorigin src="/assets/index-B5SLDCAi.js"></script>
37
- <link rel="modulepreload" crossorigin href="/assets/vendor-core-8R2fFbyN.js">
38
- <link rel="modulepreload" crossorigin href="/assets/vendor-query-BUTye89G.js">
39
- <link rel="modulepreload" crossorigin href="/assets/vendor-icons-CDMuNDeL.js">
40
- <link rel="stylesheet" crossorigin href="/assets/index-CUm1meqr.css">
36
+ <script type="module" crossorigin src="/assets/index-HZNJp28e.js"></script>
37
+ <link rel="modulepreload" crossorigin href="/assets/vendor-core-DfaOB3Rn.js">
38
+ <link rel="modulepreload" crossorigin href="/assets/vendor-query-BBT5_sHx.js">
39
+ <link rel="modulepreload" crossorigin href="/assets/vendor-icons-DrybRNxP.js">
40
+ <link rel="stylesheet" crossorigin href="/assets/index-Cc1Up_NI.css">
41
41
  </head>
42
42
 
43
43
  <body>
package/orchestrator.js CHANGED
@@ -341,7 +341,6 @@ const log = (prefix, color, data) => {
341
341
  const spawnOpts = (cwd, extraEnv, withIpc = false) => ({
342
342
  // It only works for directly spawned node processes (prod); under a
343
343
  // package-manager runner (dev) there is no IPC forwarding, so stdout tags remain the fallback signal.
344
- stdio: withIpc ? ['pipe', 'pipe', 'pipe', 'ipc'] : 'pipe',
345
344
  stdio: withIpc ? ['ignore', 'pipe', 'pipe', 'ipc'] : ['ignore', 'pipe', 'pipe'],
346
345
  shell: false,
347
346
  cwd,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@serifpersia/dango",
3
- "version": "3.4.1",
3
+ "version": "3.4.2",
4
4
  "description": "A web application for watching anime.",
5
5
  "main": "orchestrator.js",
6
6
  "repository": {
@@ -81,5 +81,5 @@
81
81
  "allowScripts": {
82
82
  "esbuild@0.28.2": true
83
83
  },
84
- "versionDate": "2026-09-26T19:57:08.199Z"
84
+ "versionDate": "2026-09-27T10:08:52.238Z"
85
85
  }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "dango-server",
3
3
  "private": true,
4
- "version": "3.4.1",
4
+ "version": "3.4.2",
5
5
  "type": "module",
6
6
  "engines": {
7
7
  "node": ">=22.12.0"
@@ -1,2 +0,0 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/AnimeInfo-o0Udf0og.js","assets/vendor-core-8R2fFbyN.js","assets/vendor-icons-CDMuNDeL.js","assets/useAnimeInfoData-DU9X90no.js","assets/vendor-query-BUTye89G.js","assets/index-B5SLDCAi.js","assets/index-CUm1meqr.css","assets/QueueOptionsButton-1M7MdKzM.js","assets/vendor-ui-CUDCvRS_.js","assets/QueueOptionsButton-CM15uQn8.css","assets/useMatureConsent-CT7-KfzG.js","assets/AnimeMetaDetails-BPvv5xIl.js","assets/AnimeMetaDetails-BwNQnRCd.css","assets/SynopsisText-BcpwT5iw.js","assets/useIsMobile-Dm_b6Ob3.js","assets/SynopsisText-CYv2W3yR.css","assets/AnimeInfo-BFWtHlPC.css"])))=>i.map(i=>d[i]);
2
- import{$ as r,_ as t}from"./index-B5SLDCAi.js";import{u as o,P as e,z as i}from"./vendor-core-8R2fFbyN.js";import"./vendor-query-BUTye89G.js";import"./vendor-icons-CDMuNDeL.js";const a=i(()=>t(()=>import("./AnimeInfo-o0Udf0og.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16])));function p(){return o(e,{fallback:o(r,{}),children:o(a,{})})}export{p as default};