xedoc-cli 0.1.11 → 0.1.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +11 -5
- package/build/client/assets/api.chats._chatId.server-requests._requestId.respond-BCMnFuvx.js +0 -0
- package/build/client/assets/api.workspaces.directories-Bz0K1WZo.js +0 -0
- package/build/client/assets/app-layout-CN81j437.js +1 -0
- package/build/client/assets/app-shell-bZjdLund.js +2 -0
- package/build/client/assets/chat-B7RLVuco.js +1 -0
- package/build/client/assets/{connect-C_Nz7Dlc.js → connect-CHSWDRRR.js} +1 -1
- package/build/client/assets/document-title-nRpNLh53.js +1 -0
- package/build/client/assets/{entry.client-BQZeV9JD.js → entry.client-CYz-BGHO.js} +1 -1
- package/build/client/assets/{ghostty-web-CgkkAFeT.js → ghostty-web-Bf0rFR1u.js} +1 -1
- package/build/client/assets/home-DtJ52lyi.js +1 -0
- package/build/client/assets/{jsx-runtime-Cal6WBdn.js → jsx-runtime-DhlB8LRe.js} +1 -1
- package/build/client/assets/{label-3ZcIm6vU.js → label-DBag4yRW.js} +1 -1
- package/build/client/assets/manifest-3f1dd8c7.js +1 -0
- package/build/client/assets/{react-dom-D4MOkHq2.js → react-dom-CRV9fQsS.js} +1 -1
- package/build/client/assets/root-BlJIezBz.js +1 -0
- package/build/client/assets/root-C6ZJNFQd.css +2 -0
- package/build/client/assets/{session-provider-LuURNNCq.js → session-provider-DZhkiIfn.js} +1 -1
- package/build/server/index.js +1 -1
- package/package.json +1 -1
- package/prisma/schema.prisma +22 -0
- package/server/sqlite-setup.mjs +63 -0
- package/build/client/assets/app-layout-VeZzc2bX.js +0 -1
- package/build/client/assets/app-shell-iKMZyGQn.js +0 -2
- package/build/client/assets/chat-lT5RuwNC.js +0 -1
- package/build/client/assets/document-title-C2ykzN2o.js +0 -1
- package/build/client/assets/home-BynJN9xe.js +0 -1
- package/build/client/assets/manifest-a5a0eaab.js +0 -1
- package/build/client/assets/root-B6ikjQMc.js +0 -1
- package/build/client/assets/root-KOlmIkbz.css +0 -2
- /package/build/client/assets/{__vite-browser-external-2447137e-Bb2UaVfr.js → __vite-browser-external-2447137e-BK6zEOTY.js} +0 -0
- /package/build/client/assets/{api.accounts._accountId-BksU0sQ7.js → api.accounts._accountId-BixDYyx8.js} +0 -0
- /package/build/client/assets/{api.accounts._accountId.authenticate-Bp51NHGy.js → api.accounts._accountId.authenticate-Cgza4mTm.js} +0 -0
- /package/build/client/assets/{api.accounts._accountId.authenticate.callback-DLgNMRyd.js → api.accounts._accountId.authenticate.callback-jKtCcEgm.js} +0 -0
- /package/build/client/assets/{api.accounts._accountId.models-DGbCmT_9.js → api.accounts._accountId.models-C3bayFCR.js} +0 -0
- /package/build/client/assets/{api.accounts._accountId.rate-limits-DZh4HPLO.js → api.accounts._accountId.personalization-Bd_x2nBr.js} +0 -0
- /package/build/client/assets/{api.accounts._accountId.runtime-settings-ChGZGvfx.js → api.accounts._accountId.rate-limits-BrKCZxhm.js} +0 -0
- /package/build/client/assets/{api.chats-DZ_6Q7rY.js → api.accounts._accountId.runtime-settings-6XNKTx--.js} +0 -0
- /package/build/client/assets/{api.chats._chatId-BEX87qHo.js → api.accounts.login-callback-port-TLptuOkA.js} +0 -0
- /package/build/client/assets/{api.chats._chatId.context-v4G0lNKq.js → api.chats-BUn9r-0x.js} +0 -0
- /package/build/client/assets/{api.chats._chatId.files-BrN7O-wM.js → api.chats._chatId-BTgyeBLZ.js} +0 -0
- /package/build/client/assets/{api.chats._chatId.git._operation-CiUW8Knm.js → api.chats._chatId.context-BgV2drn2.js} +0 -0
- /package/build/client/assets/{api.chats._chatId.interrupt-2DlVPDlX.js → api.chats._chatId.files-DGXv9z2x.js} +0 -0
- /package/build/client/assets/{api.chats._chatId.messages-cDawTuvN.js → api.chats._chatId.git._operation-DggKbqHL.js} +0 -0
- /package/build/client/assets/{api.chats._chatId.server-requests._requestId.respond-CTlCffOk.js → api.chats._chatId.interrupt-DkImed4M.js} +0 -0
- /package/build/client/assets/{api.workspaces.directories-nVoleT74.js → api.chats._chatId.messages-kk2to-gt.js} +0 -0
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as r,t as s}from"./jsx-runtime-Cal6WBdn.js";import{n as t}from"./app-shell-iKMZyGQn.js";var a=s(),o=r(function(){return(0,a.jsx)(t,{})});export{o as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{F as e,L as t,P as n,t as r}from"./jsx-runtime-Cal6WBdn.js";import{t as o}from"./react-dom-D4MOkHq2.js";import{$ as s,At as i,B as a,Et as l,F as c,G as u,H as d,I as f,J as p,Mt as h,N as m,Ot as g,Pt as y,Q as v,St as b,Tt as x,U as w,V as E,W as S,X as C,Y as R,Z as T,_t as P,at as k,ct as O,dt as M,et as I,ft as A,gt as D,ht as j,it as F,jt as L,kt as N,lt as B,nt as H,ot as z,q,rt as V,st as $,tt as U,ut as Y,vt as W,wt as K,xt as X,z as _}from"./session-provider-LuURNNCq.js";var G=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},Q=new class extends G{#e;#t;#n;constructor(){super(),this.#n=e=>{if("undefined"!=typeof window&&window.addEventListener){const t=()=>e();return window.addEventListener("visibilitychange",t,!1),()=>{window.removeEventListener("visibilitychange",t)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e(e=>{"boolean"==typeof e?this.setFocused(e):this.onFocus()})}setFocused(e){this.#e!==e&&(this.#e=e,this.onFocus())}onFocus(){const e=this.isFocused();this.listeners.forEach(t=>{t(e)})}isFocused(){return"boolean"==typeof this.#e?this.#e:"hidden"!==globalThis.document?.visibilityState}},J={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},Z=new class{#r=J;#o=!1;setTimeoutProvider(e){this.#r=e}setTimeout(e,t){return this.#r.setTimeout(e,t)}clearTimeout(e){this.#r.clearTimeout(e)}setInterval(e,t){return this.#r.setInterval(e,t)}clearInterval(e){this.#r.clearInterval(e)}};var ee="undefined"==typeof window||"Deno"in globalThis;function te(){}function ne(e,t){return"function"==typeof e?e(t):e}function re(e){return"number"==typeof e&&e>=0&&e!==1/0}function oe(e,t){return Math.max(e+(t||0)-Date.now(),0)}function se(e,t){return"function"==typeof e?e(t):e}function ie(e,t){return"function"==typeof e?e(t):e}function ae(e,t){const{type:n="all",exact:r,fetchStatus:o,predicate:s,queryKey:i,stale:a}=e;if(i)if(r){if(t.queryHash!==ce(i,t.options))return!1}else if(!de(t.queryKey,i))return!1;if("all"!==n){const e=t.isActive();if("active"===n&&!e)return!1;if("inactive"===n&&e)return!1}return("boolean"!=typeof a||t.isStale()===a)&&((!o||o===t.state.fetchStatus)&&!(s&&!s(t)))}function le(e,t){const{exact:n,status:r,predicate:o,mutationKey:s}=e;if(s){if(!t.options.mutationKey)return!1;if(n){if(ue(t.options.mutationKey)!==ue(s))return!1}else if(!de(t.options.mutationKey,s))return!1}return(!r||t.state.status===r)&&!(o&&!o(t))}function ce(e,t){return(t?.queryKeyHashFn||ue)(e)}function ue(e){return JSON.stringify(e,(e,t)=>ge(t)?Object.keys(t).sort().reduce((e,n)=>(e[n]=t[n],e),{}):t)}function de(e,t){return e===t||typeof e==typeof t&&(!(!e||!t||"object"!=typeof e||"object"!=typeof t)&&Object.keys(t).every(n=>de(e[n],t[n])))}var fe=Object.prototype.hasOwnProperty;function pe(e,t,n=0){if(e===t)return e;if(n>500)return t;const r=me(e)&&me(t);if(!(r||ge(e)&&ge(t)))return t;const o=(r?e:Object.keys(e)).length,s=r?t:Object.keys(t),i=s.length,a=r?new Array(i):{};let l=0;for(let c=0;c<i;c++){const i=r?c:s[c],u=e[i],d=t[i];if(u===d){a[i]=u,(r?c<o:fe.call(e,i))&&l++;continue}if(null===u||null===d||"object"!=typeof u||"object"!=typeof d){a[i]=d;continue}const f=pe(u,d,n+1);a[i]=f,f===u&&l++}return o===i&&l===o?e:a}function he(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(e[n]!==t[n])return!1;return!0}function me(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function ge(e){if(!ye(e))return!1;const t=e.constructor;if(void 0===t)return!0;const n=t.prototype;return!!ye(n)&&(!!n.hasOwnProperty("isPrototypeOf")&&Object.getPrototypeOf(e)===Object.prototype)}function ye(e){return"[object Object]"===Object.prototype.toString.call(e)}function ve(e,t,n){return"function"==typeof n.structuralSharing?n.structuralSharing(e,t):!1!==n.structuralSharing?pe(e,t):t}function be(e,t,n=0){const r=[...e,t];return n&&r.length>n?r.slice(1):r}function xe(e,t,n=0){const r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var we=Symbol();function Ee(e,t){return!e.queryFn&&t?.initialPromise?()=>t.initialPromise:e.queryFn&&e.queryFn!==we?e.queryFn:()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`))}function Se(e,t){return"function"==typeof e?e(...t):!!e}var Ce=(()=>{let e=()=>ee;return{isServer:()=>e(),setIsServer(t){e=t}}})();function Re(){let e,t;const n=new Promise((n,r)=>{e=n,t=r});function r(e){Object.assign(n,e),delete n.resolve,delete n.reject}return n.status="pending",n.catch(()=>{}),n.resolve=t=>{r({status:"fulfilled",value:t}),e(t)},n.reject=e=>{r({status:"rejected",reason:e}),t(e)},n}var Te=function(e){setTimeout(e,0)};var Pe=function(){let e=[],t=0,n=e=>{e()},r=e=>{e()},o=Te;const s=r=>{t?e.push(r):o(()=>{n(r)})};return{batch:s=>{let i;t++;try{i=s()}finally{t--,t||(()=>{const t=e;e=[],t.length&&o(()=>{r(()=>{t.forEach(e=>{n(e)})})})})()}return i},batchCalls:e=>(...t)=>{s(()=>{e(...t)})},schedule:s,setNotifyFunction:e=>{n=e},setBatchNotifyFunction:e=>{r=e},setScheduler:e=>{o=e}}}(),ke=new class extends G{#s=!0;#t;#n;constructor(){super(),this.#n=e=>{if("undefined"!=typeof window&&window.addEventListener){const t=()=>e(!0),n=()=>e(!1);return window.addEventListener("online",t,!1),window.addEventListener("offline",n,!1),()=>{window.removeEventListener("online",t),window.removeEventListener("offline",n)}}}}onSubscribe(){this.#t||this.setEventListener(this.#n)}onUnsubscribe(){this.hasListeners()||(this.#t?.(),this.#t=void 0)}setEventListener(e){this.#n=e,this.#t?.(),this.#t=e(this.setOnline.bind(this))}setOnline(e){this.#s!==e&&(this.#s=e,this.listeners.forEach(t=>{t(e)}))}isOnline(){return this.#s}};function Oe(e){return Math.min(1e3*2**e,3e4)}function Me(e){return"online"!==(e??"online")||ke.isOnline()}var Ie=class extends Error{constructor(e){super("CancelledError"),this.revert=e?.revert,this.silent=e?.silent}};function Ae(e){let t,n=!1,r=0;const o=Re(),s=()=>"pending"!==o.status,i=()=>Q.isFocused()&&("always"===e.networkMode||ke.isOnline())&&e.canRun(),a=()=>Me(e.networkMode)&&e.canRun(),l=e=>{s()||(t?.(),o.resolve(e))},c=e=>{s()||(t?.(),o.reject(e))},u=()=>new Promise(n=>{t=e=>{(s()||i())&&n(e)},e.onPause?.()}).then(()=>{t=void 0,s()||e.onContinue?.()}),d=()=>{if(s())return;let t;const o=0===r?e.initialPromise:void 0;try{t=o??e.fn()}catch(a){t=Promise.reject(a)}Promise.resolve(t).then(l).catch(t=>{if(s())return;const o=e.retry??(Ce.isServer()?0:3),a=e.retryDelay??Oe,l="function"==typeof a?a(r,t):a,f=!0===o||"number"==typeof o&&r<o||"function"==typeof o&&o(r,t);var p;!n&&f?(r++,e.onFail?.(r,t),(p=l,new Promise(e=>{Z.setTimeout(e,p)})).then(()=>i()?void 0:u()).then(()=>{n?c(t):d()})):c(t)})};return{promise:o,status:()=>o.status,cancel:t=>{if(!s()){const n=new Ie(t);c(n),e.onCancel?.(n)}},continue:()=>(t?.(),o),cancelRetry:()=>{n=!0},continueRetry:()=>{n=!1},canStart:a,start:()=>(a()?d():u().then(d),o)}}var De=class{#i;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),re(this.gcTime)&&(this.#i=Z.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(Ce.isServer()?1/0:3e5))}clearGcTimeout(){void 0!==this.#i&&(Z.clearTimeout(this.#i),this.#i=void 0)}};function je(e){return{onFetch:(t,n)=>{const r=t.options,o=t.fetchOptions?.meta?.fetchMore?.direction,s=t.state.data?.pages||[],i=t.state.data?.pageParams||[];let a={pages:[],pageParams:[]},l=0;const c=async()=>{let n=!1;const c=e=>{!function(e,t,n){let r,o=!1;Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(r??=t(),o||(o=!0,r.aborted?n():r.addEventListener("abort",n,{once:!0})),r)})}(e,()=>t.signal,()=>n=!0)},u=Ee(t.options,t.fetchOptions),d=async(e,r,o)=>{if(n)return Promise.reject(t.signal.reason);if(null==r&&e.pages.length)return Promise.resolve(e);const s=await u((()=>{const e={client:t.client,queryKey:t.queryKey,pageParam:r,direction:o?"backward":"forward",meta:t.options.meta};return c(e),e})()),{maxPages:i}=t.options,a=o?xe:be;return{pages:a(e.pages,s,i),pageParams:a(e.pageParams,r,i)}};if(o&&s.length){const e="backward"===o,t=e?Le:Fe,n={pages:s,pageParams:i};a=await d(n,t(r,n),e)}else{const t=e??s.length;do{const e=0===l?i[0]??r.initialPageParam:Fe(r,a);if(l>0&&null==e)break;a=await d(a,e),l++}while(l<t)}return a};t.options.persister?t.fetchFn=()=>t.options.persister?.(c,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n):t.fetchFn=c}}}function Fe(e,{pages:t,pageParams:n}){const r=t.length-1;return t.length>0?e.getNextPageParam(t[r],t,n[r],n):void 0}function Le(e,{pages:t,pageParams:n}){return t.length>0?e.getPreviousPageParam?.(t[0],t,n[0],n):void 0}var Ne=class extends De{#a;#l;#c;#u;#d;#f;#p;#h;constructor(e){super(),this.#h=!1,this.#p=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.#d=e.client,this.#u=this.#d.getQueryCache(),this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.#l=ze(this.options),this.state=e.state??this.#l,this.scheduleGc()}get meta(){return this.options.meta}get queryType(){return this.#a}get promise(){return this.#f?.promise}setOptions(e){if(this.options={...this.#p,...e},e?._type&&(this.#a=e._type),this.updateGcTime(this.options.gcTime),this.state&&void 0===this.state.data){const e=ze(this.options);void 0!==e.data&&(this.setState(He(e.data,e.dataUpdatedAt)),this.#l=e)}}optionalRemove(){this.observers.length||"idle"!==this.state.fetchStatus||this.#u.remove(this)}setData(e,t){const n=ve(this.state.data,e,this.options);return this.#m({data:n,type:"success",dataUpdatedAt:t?.updatedAt,manual:t?.manual}),n}setState(e){this.#m({type:"setState",state:e})}cancel(e){const t=this.#f?.promise;return this.#f?.cancel(e),t?t.then(te).catch(te):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return this.#l}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(e=>!1!==ie(e.options.enabled,this))}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===we||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0&&this.observers.some(e=>"static"===se(e.options.staleTime,this))}isStale(){return this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):void 0===this.state.data||this.state.isInvalidated}isStaleByTime(e=0){return void 0===this.state.data||"static"!==e&&(!!this.state.isInvalidated||!oe(this.state.dataUpdatedAt,e))}onFocus(){this.observers.find(e=>e.shouldFetchOnWindowFocus())?.refetch({cancelRefetch:!1}),this.#f?.continue()}onOnline(){this.observers.find(e=>e.shouldFetchOnReconnect())?.refetch({cancelRefetch:!1}),this.#f?.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),this.#u.notify({type:"observerAdded",query:this,observer:e}))}removeObserver(e){this.observers.includes(e)&&(this.observers=this.observers.filter(t=>t!==e),this.observers.length||(this.#f&&(this.#h||this.#g()?this.#f.cancel({revert:!0}):this.#f.cancelRetry()),this.scheduleGc()),this.#u.notify({type:"observerRemoved",query:this,observer:e}))}getObserversCount(){return this.observers.length}#g(){return"paused"===this.state.fetchStatus&&"pending"===this.state.status}invalidate(){this.state.isInvalidated||this.#m({type:"invalidate"})}async fetch(e,t){if("idle"!==this.state.fetchStatus&&"rejected"!==this.#f?.status())if(void 0!==this.state.data&&t?.cancelRefetch)this.cancel({silent:!0});else if(this.#f)return this.#f.continueRetry(),this.#f.promise;if(e&&this.setOptions(e),!this.options.queryFn){const e=this.observers.find(e=>e.options.queryFn);e&&this.setOptions(e.options)}const n=new AbortController,r=e=>{Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(this.#h=!0,n.signal)})},o=()=>{const e=Ee(this.options,t),n=(()=>{const e={client:this.#d,queryKey:this.queryKey,meta:this.meta};return r(e),e})();return this.#h=!1,this.options.persister?this.options.persister(e,n,this):e(n)},s=(()=>{const e={fetchOptions:t,options:this.options,queryKey:this.queryKey,client:this.#d,state:this.state,fetchFn:o};return r(e),e})();("infinite"===this.#a?je(this.options.pages):this.options.behavior)?.onFetch(s,this),this.#c=this.state,"idle"!==this.state.fetchStatus&&this.state.fetchMeta===s.fetchOptions?.meta||this.#m({type:"fetch",meta:s.fetchOptions?.meta}),this.#f=Ae({initialPromise:t?.initialPromise,fn:s.fetchFn,onCancel:e=>{e instanceof Ie&&e.revert&&this.setState({...this.#c,fetchStatus:"idle"}),n.abort()},onFail:(e,t)=>{this.#m({type:"failed",failureCount:e,error:t})},onPause:()=>{this.#m({type:"pause"})},onContinue:()=>{this.#m({type:"continue"})},retry:s.options.retry,retryDelay:s.options.retryDelay,networkMode:s.options.networkMode,canRun:()=>!0});try{const e=await this.#f.start();if(void 0===e)throw new Error(`${this.queryHash} data is undefined`);return this.setData(e),this.#u.config.onSuccess?.(e,this),this.#u.config.onSettled?.(e,this.state.error,this),e}catch(i){if(i instanceof Ie){if(i.silent)return this.#f.promise;if(i.revert){if(void 0===this.state.data)throw i;return this.state.data}}throw this.#m({type:"error",error:i}),this.#u.config.onError?.(i,this),this.#u.config.onSettled?.(this.state.data,i,this),i}finally{this.scheduleGc()}}#m(e){this.state=(t=>{switch(e.type){case"failed":return{...t,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case"pause":return{...t,fetchStatus:"paused"};case"continue":return{...t,fetchStatus:"fetching"};case"fetch":return{...t,...Be(t.data,this.options),fetchMeta:e.meta??null};case"success":const n={...t,...He(e.data,e.dataUpdatedAt),dataUpdateCount:t.dataUpdateCount+1,...!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return this.#c=e.manual?n:void 0,n;case"error":const r=e.error;return{...t,error:r,errorUpdateCount:t.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:t.fetchFailureCount+1,fetchFailureReason:r,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...t,isInvalidated:!0};case"setState":return{...t,...e.state}}})(this.state),Pe.batch(()=>{this.observers.forEach(e=>{e.onQueryUpdate()}),this.#u.notify({query:this,type:"updated",action:e})})}};function Be(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:Me(t.networkMode)?"fetching":"paused",...void 0===e&&{error:null,status:"pending"}}}function He(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:"success"}}function ze(e){const t="function"==typeof e.initialData?e.initialData():e.initialData,n=void 0!==t,r=n?"function"==typeof e.initialDataUpdatedAt?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"pending",fetchStatus:"idle"}}var qe=class extends De{#d;#y;#v;#f;constructor(e){super(),this.#d=e.client,this.mutationId=e.mutationId,this.#v=e.mutationCache,this.#y=[],this.state=e.state||{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0},this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){this.#y.includes(e)||(this.#y.push(e),this.clearGcTimeout(),this.#v.notify({type:"observerAdded",mutation:this,observer:e}))}removeObserver(e){this.#y=this.#y.filter(t=>t!==e),this.scheduleGc(),this.#v.notify({type:"observerRemoved",mutation:this,observer:e})}optionalRemove(){this.#y.length||("pending"===this.state.status?this.scheduleGc():this.#v.remove(this))}continue(){return this.#f?.continue()??this.execute(this.state.variables)}async execute(e){const t=()=>{this.#m({type:"continue"})},n={client:this.#d,meta:this.options.meta,mutationKey:this.options.mutationKey};this.#f=Ae({fn:()=>this.options.mutationFn?this.options.mutationFn(e,n):Promise.reject(new Error("No mutationFn found")),onFail:(e,t)=>{this.#m({type:"failed",failureCount:e,error:t})},onPause:()=>{this.#m({type:"pause"})},onContinue:t,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#v.canRun(this)});const r="pending"===this.state.status,o=!this.#f.canStart();try{if(r)t();else{this.#m({type:"pending",variables:e,isPaused:o}),this.#v.config.onMutate&&await this.#v.config.onMutate(e,this,n);const t=await(this.options.onMutate?.(e,n));t!==this.state.context&&this.#m({type:"pending",context:t,variables:e,isPaused:o})}const s=await this.#f.start();return await(this.#v.config.onSuccess?.(s,e,this.state.context,this,n)),await(this.options.onSuccess?.(s,e,this.state.context,n)),await(this.#v.config.onSettled?.(s,null,this.state.variables,this.state.context,this,n)),await(this.options.onSettled?.(s,null,e,this.state.context,n)),this.#m({type:"success",data:s}),s}catch(s){try{await(this.#v.config.onError?.(s,e,this.state.context,this,n))}catch(i){Promise.reject(i)}try{await(this.options.onError?.(s,e,this.state.context,n))}catch(i){Promise.reject(i)}try{await(this.#v.config.onSettled?.(void 0,s,this.state.variables,this.state.context,this,n))}catch(i){Promise.reject(i)}try{await(this.options.onSettled?.(void 0,s,e,this.state.context,n))}catch(i){Promise.reject(i)}throw this.#m({type:"error",error:s}),s}finally{this.#v.runNext(this)}}#m(e){this.state=(t=>{switch(e.type){case"failed":return{...t,failureCount:e.failureCount,failureReason:e.error};case"pause":return{...t,isPaused:!0};case"continue":return{...t,isPaused:!1};case"pending":return{...t,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:"pending",variables:e.variables,submittedAt:Date.now()};case"success":return{...t,data:e.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...t,data:void 0,error:e.error,failureCount:t.failureCount+1,failureReason:e.error,isPaused:!1,status:"error"}}})(this.state),Pe.batch(()=>{this.#y.forEach(t=>{t.onMutationUpdate(e)}),this.#v.notify({mutation:this,type:"updated",action:e})})}};function Ve(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var $e=t(n(),1),Ue=r(),Ye=$e.createContext(void 0),We=e=>{const t=$e.useContext(Ye);if(e)return e;if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},Ke=({client:e,children:t})=>($e.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),(0,Ue.jsx)(Ye.Provider,{value:e,children:t})),Xe=(e,t,n,r,o,s,i,a)=>{let l=document.documentElement,c=["light","dark"];function u(t){(Array.isArray(e)?e:[e]).forEach(e=>{let n="class"===e,r=n&&s?o.map(e=>s[e]||e):o;n?(l.classList.remove(...r),l.classList.add(s&&s[t]?s[t]:t)):l.setAttribute(e,t)}),function(e){a&&c.includes(e)&&(l.style.colorScheme=e)}(t)}if(r)u(r);else try{let e=localStorage.getItem(t)||n;u(i&&"system"===e?window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light":e)}catch(d){}},_e=["light","dark"],Ge="(prefers-color-scheme: dark)",Qe="undefined"==typeof window,Je=$e.createContext(void 0),Ze={setTheme:e=>{},themes:[]},et=()=>{var e;return null!=(e=$e.useContext(Je))?e:Ze},tt=e=>$e.useContext(Je)?$e.createElement($e.Fragment,null,e.children):$e.createElement(rt,{...e}),nt=["light","dark"],rt=({forcedTheme:e,disableTransitionOnChange:t=!1,enableSystem:n=!0,enableColorScheme:r=!0,storageKey:o="theme",themes:s=nt,defaultTheme:i=(n?"system":"light"),attribute:a="data-theme",value:l,children:c,nonce:u,scriptProps:d})=>{let[f,p]=$e.useState(()=>st(o,i)),[h,m]=$e.useState(()=>"system"===f?at():f),g=l?Object.values(l):s,y=$e.useCallback(e=>{let o=e;if(!o)return;"system"===e&&n&&(o=at());let s=l?l[o]:o,c=t?it(u):null,d=document.documentElement,f=e=>{"class"===e?(d.classList.remove(...g),s&&d.classList.add(s)):e.startsWith("data-")&&(s?d.setAttribute(e,s):d.removeAttribute(e))};if(Array.isArray(a)?a.forEach(f):f(a),r){let e=_e.includes(i)?i:null,t=_e.includes(o)?o:e;d.style.colorScheme=t}c?.()},[u]),v=$e.useCallback(e=>{let t="function"==typeof e?e(f):e;p(t);try{localStorage.setItem(o,t)}catch(n){}},[f]),b=$e.useCallback(t=>{m(at(t)),"system"===f&&n&&!e&&y("system")},[f,e]);$e.useEffect(()=>{let e=window.matchMedia(Ge);return e.addListener(b),b(e),()=>e.removeListener(b)},[b]),$e.useEffect(()=>{let e=e=>{e.key===o&&(e.newValue?p(e.newValue):v(i))};return window.addEventListener("storage",e),()=>window.removeEventListener("storage",e)},[v]),$e.useEffect(()=>{y(null!=e?e:f)},[e,f]);let x=$e.useMemo(()=>({theme:f,setTheme:v,forcedTheme:e,resolvedTheme:"system"===f?h:f,themes:n?[...s,"system"]:s,systemTheme:n?h:void 0}),[f,v,e,h,n,s]);return $e.createElement(Je.Provider,{value:x},$e.createElement(ot,{forcedTheme:e,storageKey:o,attribute:a,enableSystem:n,enableColorScheme:r,defaultTheme:i,value:l,themes:s,nonce:u,scriptProps:d}),c)},ot=$e.memo(({forcedTheme:e,storageKey:t,attribute:n,enableSystem:r,enableColorScheme:o,defaultTheme:s,value:i,themes:a,nonce:l,scriptProps:c})=>{let u=JSON.stringify([n,t,s,e,a,i,r,o]).slice(1,-1);return $e.createElement("script",{...c,suppressHydrationWarning:!0,nonce:"undefined"==typeof window?l:"",dangerouslySetInnerHTML:{__html:`(${Xe.toString()})(${u})`}})}),st=(e,t)=>{if(Qe)return;let n;try{n=localStorage.getItem(e)||void 0}catch(r){}return n||t},it=e=>{let t=document.createElement("style");return e&&t.setAttribute("nonce",e),t.appendChild(document.createTextNode("*,*::before,*::after{-webkit-transition:none!important;-moz-transition:none!important;-o-transition:none!important;-ms-transition:none!important;transition:none!important}")),document.head.appendChild(t),()=>{window.getComputedStyle(document.body),setTimeout(()=>{document.head.removeChild(t)},1)}},at=e=>(e||(e=window.matchMedia(Ge)),e.matches?"dark":"light"),lt=t(o(),1);var ct=Array(12).fill(0),ut=({visible:e,className:t})=>$e.createElement("div",{className:["sonner-loading-wrapper",t].filter(Boolean).join(" "),"data-visible":e},$e.createElement("div",{className:"sonner-spinner"},ct.map((e,t)=>$e.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${t}`})))),dt=$e.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},$e.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z",clipRule:"evenodd"})),ft=$e.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},$e.createElement("path",{fillRule:"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z",clipRule:"evenodd"})),pt=$e.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},$e.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z",clipRule:"evenodd"})),ht=$e.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},$e.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"})),mt=$e.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"},$e.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),$e.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),gt=1,yt=new class{constructor(){this.subscribe=e=>(this.subscribers.push(e),()=>{const t=this.subscribers.indexOf(e);this.subscribers.splice(t,1)}),this.publish=e=>{this.subscribers.forEach(t=>t(e))},this.addToast=e=>{this.publish(e),this.toasts=[...this.toasts,e]},this.create=e=>{var t;const{message:n,...r}=e,o="number"==typeof(null==e?void 0:e.id)||(null==(t=e.id)?void 0:t.length)>0?e.id:gt++,s=this.toasts.find(e=>e.id===o),i=void 0===e.dismissible||e.dismissible;return this.dismissedToasts.has(o)&&this.dismissedToasts.delete(o),s?this.toasts=this.toasts.map(t=>t.id===o?(this.publish({...t,...e,id:o,title:n}),{...t,...e,id:o,dismissible:i,title:n}):t):this.addToast({title:n,...r,dismissible:i,id:o}),o},this.dismiss=e=>(e?(this.dismissedToasts.add(e),requestAnimationFrame(()=>this.subscribers.forEach(t=>t({id:e,dismiss:!0})))):this.toasts.forEach(e=>{this.subscribers.forEach(t=>t({id:e.id,dismiss:!0}))}),e),this.message=(e,t)=>this.create({...t,message:e}),this.error=(e,t)=>this.create({...t,message:e,type:"error"}),this.success=(e,t)=>this.create({...t,type:"success",message:e}),this.info=(e,t)=>this.create({...t,type:"info",message:e}),this.warning=(e,t)=>this.create({...t,type:"warning",message:e}),this.loading=(e,t)=>this.create({...t,type:"loading",message:e}),this.promise=(e,t)=>{if(!t)return;let n;void 0!==t.loading&&(n=this.create({...t,promise:e,type:"loading",message:t.loading,description:"function"!=typeof t.description?t.description:void 0}));const r=Promise.resolve(e instanceof Function?e():e);let o,s=void 0!==n;const i=r.then(async e=>{if(o=["resolve",e],$e.isValidElement(e))s=!1,this.create({id:n,type:"default",message:e});else if(vt(e)&&!e.ok){s=!1;const r="function"==typeof t.error?await t.error(`HTTP error! status: ${e.status}`):t.error,o="function"==typeof t.description?await t.description(`HTTP error! status: ${e.status}`):t.description,i="object"!=typeof r||$e.isValidElement(r)?{message:r}:r;this.create({id:n,type:"error",description:o,...i})}else if(e instanceof Error){s=!1;const r="function"==typeof t.error?await t.error(e):t.error,o="function"==typeof t.description?await t.description(e):t.description,i="object"!=typeof r||$e.isValidElement(r)?{message:r}:r;this.create({id:n,type:"error",description:o,...i})}else if(void 0!==t.success){s=!1;const r="function"==typeof t.success?await t.success(e):t.success,o="function"==typeof t.description?await t.description(e):t.description,i="object"!=typeof r||$e.isValidElement(r)?{message:r}:r;this.create({id:n,type:"success",description:o,...i})}}).catch(async e=>{if(o=["reject",e],void 0!==t.error){s=!1;const r="function"==typeof t.error?await t.error(e):t.error,o="function"==typeof t.description?await t.description(e):t.description,i="object"!=typeof r||$e.isValidElement(r)?{message:r}:r;this.create({id:n,type:"error",description:o,...i})}}).finally(()=>{s&&(this.dismiss(n),n=void 0),null==t.finally||t.finally.call(t)}),a=()=>new Promise((e,t)=>i.then(()=>"reject"===o[0]?t(o[1]):e(o[1])).catch(t));return"string"!=typeof n&&"number"!=typeof n?{unwrap:a}:Object.assign(n,{unwrap:a})},this.custom=(e,t)=>{const n=(null==t?void 0:t.id)||gt++;return this.create({jsx:e(n),id:n,...t}),n},this.getActiveToasts=()=>this.toasts.filter(e=>!this.dismissedToasts.has(e.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}},vt=e=>e&&"object"==typeof e&&"ok"in e&&"boolean"==typeof e.ok&&"status"in e&&"number"==typeof e.status,bt=(e,t)=>{const n=(null==t?void 0:t.id)||gt++;return yt.addToast({title:e,...t,id:n}),n},xt=Object.assign(bt,{success:yt.success,info:yt.info,warning:yt.warning,error:yt.error,custom:yt.custom,message:yt.message,promise:yt.promise,dismiss:yt.dismiss,loading:yt.loading},{getHistory:()=>yt.toasts,getToasts:()=>yt.getActiveToasts()});function wt(e){return void 0!==e.label}!function(e){if(!e||"undefined"==typeof document)return;let t=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css",t.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}("[data-sonner-toaster][dir=ltr],html[dir=ltr]{--toast-icon-margin-start:-3px;--toast-icon-margin-end:4px;--toast-svg-margin-start:-1px;--toast-svg-margin-end:0px;--toast-button-margin-start:auto;--toast-button-margin-end:0;--toast-close-button-start:0;--toast-close-button-end:unset;--toast-close-button-transform:translate(-35%, -35%)}[data-sonner-toaster][dir=rtl],html[dir=rtl]{--toast-icon-margin-start:4px;--toast-icon-margin-end:-3px;--toast-svg-margin-start:0px;--toast-svg-margin-end:-1px;--toast-button-margin-start:0;--toast-button-margin-end:auto;--toast-close-button-start:unset;--toast-close-button-end:0;--toast-close-button-transform:translate(35%, -35%)}[data-sonner-toaster]{position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1:hsl(0, 0%, 99%);--gray2:hsl(0, 0%, 97.3%);--gray3:hsl(0, 0%, 95.1%);--gray4:hsl(0, 0%, 93%);--gray5:hsl(0, 0%, 90.9%);--gray6:hsl(0, 0%, 88.7%);--gray7:hsl(0, 0%, 85.8%);--gray8:hsl(0, 0%, 78%);--gray9:hsl(0, 0%, 56.1%);--gray10:hsl(0, 0%, 52.3%);--gray11:hsl(0, 0%, 43.5%);--gray12:hsl(0, 0%, 9%);--border-radius:8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:0;z-index:999999999;transition:transform .4s ease}@media (hover:none) and (pointer:coarse){[data-sonner-toaster][data-lifted=true]{transform:none}}[data-sonner-toaster][data-x-position=right]{right:var(--offset-right)}[data-sonner-toaster][data-x-position=left]{left:var(--offset-left)}[data-sonner-toaster][data-x-position=center]{left:50%;transform:translateX(-50%)}[data-sonner-toaster][data-y-position=top]{top:var(--offset-top)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--offset-bottom)}[data-sonner-toast]{--y:translateY(100%);--lift-amount:calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:0;overflow-wrap:anywhere}[data-sonner-toast][data-styled=true]{padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px rgba(0,0,0,.1);width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}[data-sonner-toast]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-y-position=top]{top:0;--y:translateY(-100%);--lift:1;--lift-amount:calc(1 * var(--gap))}[data-sonner-toast][data-y-position=bottom]{bottom:0;--y:translateY(100%);--lift:-1;--lift-amount:calc(var(--lift) * var(--gap))}[data-sonner-toast][data-styled=true] [data-description]{font-weight:400;line-height:1.4;color:#3f3f3f}[data-rich-colors=true][data-sonner-toast][data-styled=true] [data-description]{color:inherit}[data-sonner-toaster][data-sonner-theme=dark] [data-description]{color:#e8e8e8}[data-sonner-toast][data-styled=true] [data-title]{font-weight:500;line-height:1.5;color:inherit}[data-sonner-toast][data-styled=true] [data-icon]{display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}[data-sonner-toast][data-promise=true] [data-icon]>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}[data-sonner-toast][data-styled=true] [data-icon]>*{flex-shrink:0}[data-sonner-toast][data-styled=true] [data-icon] svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}[data-sonner-toast][data-styled=true] [data-content]{display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;font-weight:500;cursor:pointer;outline:0;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}[data-sonner-toast][data-styled=true] [data-button]:focus-visible{box-shadow:0 0 0 2px rgba(0,0,0,.4)}[data-sonner-toast][data-styled=true] [data-button]:first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}[data-sonner-toast][data-styled=true] [data-cancel]{color:var(--normal-text);background:rgba(0,0,0,.08)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-styled=true] [data-cancel]{background:rgba(255,255,255,.3)}[data-sonner-toast][data-styled=true] [data-close-button]{position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);background:var(--normal-bg);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast][data-styled=true] [data-close-button]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-styled=true] [data-disabled=true]{cursor:not-allowed}[data-sonner-toast][data-styled=true]:hover [data-close-button]:hover{background:var(--gray2);border-color:var(--gray5)}[data-sonner-toast][data-swiping=true]::before{content:'';position:absolute;left:-100%;right:-100%;height:100%;z-index:-1}[data-sonner-toast][data-y-position=top][data-swiping=true]::before{bottom:50%;transform:scaleY(3) translateY(50%)}[data-sonner-toast][data-y-position=bottom][data-swiping=true]::before{top:50%;transform:scaleY(3) translateY(-50%)}[data-sonner-toast][data-swiping=false][data-removed=true]::before{content:'';position:absolute;inset:0;transform:scaleY(2)}[data-sonner-toast][data-expanded=true]::after{content:'';position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}[data-sonner-toast][data-mounted=true]{--y:translateY(0);opacity:1}[data-sonner-toast][data-expanded=false][data-front=false]{--scale:var(--toasts-before) * 0.05 + 1;--y:translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}[data-sonner-toast]>*{transition:opacity .4s}[data-sonner-toast][data-x-position=right]{right:0}[data-sonner-toast][data-x-position=left]{left:0}[data-sonner-toast][data-expanded=false][data-front=false][data-styled=true]>*{opacity:0}[data-sonner-toast][data-visible=false]{opacity:0;pointer-events:none}[data-sonner-toast][data-mounted=true][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}[data-sonner-toast][data-removed=true][data-front=true][data-swipe-out=false]{--y:translateY(calc(var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=false]{--y:translateY(40%);opacity:0;transition:transform .5s,opacity .2s}[data-sonner-toast][data-removed=true][data-front=false]::before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y,0)) translateX(var(--swipe-amount-x,0));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width:600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-sonner-theme=light]{--normal-bg:#fff;--normal-border:var(--gray4);--normal-text:var(--gray12);--success-bg:hsl(143, 85%, 96%);--success-border:hsl(145, 92%, 87%);--success-text:hsl(140, 100%, 27%);--info-bg:hsl(208, 100%, 97%);--info-border:hsl(221, 91%, 93%);--info-text:hsl(210, 92%, 45%);--warning-bg:hsl(49, 100%, 97%);--warning-border:hsl(49, 91%, 84%);--warning-text:hsl(31, 92%, 45%);--error-bg:hsl(359, 100%, 97%);--error-border:hsl(359, 100%, 94%);--error-text:hsl(360, 100%, 45%)}[data-sonner-toaster][data-sonner-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg:#000;--normal-border:hsl(0, 0%, 20%);--normal-text:var(--gray1)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg:#fff;--normal-border:var(--gray3);--normal-text:var(--gray12)}[data-sonner-toaster][data-sonner-theme=dark]{--normal-bg:#000;--normal-bg-hover:hsl(0, 0%, 12%);--normal-border:hsl(0, 0%, 20%);--normal-border-hover:hsl(0, 0%, 25%);--normal-text:var(--gray1);--success-bg:hsl(150, 100%, 6%);--success-border:hsl(147, 100%, 12%);--success-text:hsl(150, 86%, 65%);--info-bg:hsl(215, 100%, 6%);--info-border:hsl(223, 43%, 17%);--info-text:hsl(216, 87%, 65%);--warning-bg:hsl(64, 100%, 6%);--warning-border:hsl(60, 100%, 9%);--warning-text:hsl(46, 87%, 65%);--error-bg:hsl(358, 76%, 10%);--error-border:hsl(357, 89%, 16%);--error-text:hsl(358, 100%, 81%)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size:16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:first-child{animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}100%{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}100%{opacity:.15}}@media (prefers-reduced-motion){.sonner-loading-bar,[data-sonner-toast],[data-sonner-toast]>*{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}");var Et=3,St=14;function Ct(...e){return e.filter(Boolean).join(" ")}var Rt=e=>{var t,n,r,o,s,i,a,l,c;const{invert:u,toast:d,unstyled:f,interacting:p,setHeights:h,visibleToasts:m,heights:g,index:y,toasts:v,expanded:b,removeToast:x,defaultRichColors:w,closeButton:E,style:S,cancelButtonStyle:C,actionButtonStyle:R,className:T="",descriptionClassName:P="",duration:k,position:O,gap:M,expandByDefault:I,classNames:A,icons:D,closeButtonAriaLabel:j="Close toast"}=e,[F,L]=$e.useState(null),[N,B]=$e.useState(null),[H,z]=$e.useState(!1),[q,V]=$e.useState(!1),[$,U]=$e.useState(!1),[Y,W]=$e.useState(!1),[K,X]=$e.useState(!1),[_,G]=$e.useState(0),[Q,J]=$e.useState(0),Z=$e.useRef(d.duration||k||4e3),ee=$e.useRef(null),te=$e.useRef(null),ne=0===y,re=y+1<=m,oe=d.type,se=!1!==d.dismissible,ie=d.className||"",ae=d.descriptionClassName||"",le=$e.useMemo(()=>g.findIndex(e=>e.toastId===d.id)||0,[g,d.id]),ce=$e.useMemo(()=>{var e;return null!=(e=d.closeButton)?e:E},[d.closeButton,E]),ue=$e.useMemo(()=>d.duration||k||4e3,[d.duration,k]),de=$e.useRef(0),fe=$e.useRef(0),pe=$e.useRef(0),he=$e.useRef(null),[me,ge]=O.split("-"),ye=$e.useMemo(()=>g.reduce((e,t,n)=>n>=le?e:e+t.height,0),[g,le]),ve=(()=>{const[e,t]=$e.useState(document.hidden);return $e.useEffect(()=>{const e=()=>{t(document.hidden)};return document.addEventListener("visibilitychange",e),()=>window.removeEventListener("visibilitychange",e)},[]),e})(),be=d.invert||u,xe="loading"===oe;fe.current=$e.useMemo(()=>le*M+ye,[le,ye]),$e.useEffect(()=>{Z.current=ue},[ue]),$e.useEffect(()=>{z(!0)},[]),$e.useEffect(()=>{const e=te.current;if(e){const t=e.getBoundingClientRect().height;return J(t),h(e=>[{toastId:d.id,height:t,position:d.position},...e]),()=>h(e=>e.filter(e=>e.toastId!==d.id))}},[h,d.id]),$e.useLayoutEffect(()=>{if(!H)return;const e=te.current,t=e.style.height;e.style.height="auto";const n=e.getBoundingClientRect().height;e.style.height=t,J(n),h(e=>e.find(e=>e.toastId===d.id)?e.map(e=>e.toastId===d.id?{...e,height:n}:e):[{toastId:d.id,height:n,position:d.position},...e])},[H,d.title,d.description,h,d.id,d.jsx,d.action,d.cancel]);const we=$e.useCallback(()=>{V(!0),G(fe.current),h(e=>e.filter(e=>e.toastId!==d.id)),setTimeout(()=>{x(d)},200)},[d,x,h,fe]);$e.useEffect(()=>{if(d.promise&&"loading"===oe||d.duration===1/0||"loading"===d.type)return;let e;return b||p||ve?(()=>{if(pe.current<de.current){const e=(new Date).getTime()-de.current;Z.current=Z.current-e}pe.current=(new Date).getTime()})():Z.current!==1/0&&(de.current=(new Date).getTime(),e=setTimeout(()=>{null==d.onAutoClose||d.onAutoClose.call(d,d),we()},Z.current)),()=>clearTimeout(e)},[b,p,d,oe,ve,we]),$e.useEffect(()=>{d.delete&&(we(),null==d.onDismiss||d.onDismiss.call(d,d))},[we,d.delete]);const Ee=d.icon||(null==D?void 0:D[oe])||(e=>{switch(e){case"success":return dt;case"info":return pt;case"warning":return ft;case"error":return ht;default:return null}})(oe);var Se,Ce;return $e.createElement("li",{tabIndex:0,ref:te,className:Ct(T,ie,null==A?void 0:A.toast,null==d||null==(t=d.classNames)?void 0:t.toast,null==A?void 0:A.default,null==A?void 0:A[oe],null==d||null==(n=d.classNames)?void 0:n[oe]),"data-sonner-toast":"","data-rich-colors":null!=(Se=d.richColors)?Se:w,"data-styled":!Boolean(d.jsx||d.unstyled||f),"data-mounted":H,"data-promise":Boolean(d.promise),"data-swiped":K,"data-removed":q,"data-visible":re,"data-y-position":me,"data-x-position":ge,"data-index":y,"data-front":ne,"data-swiping":$,"data-dismissible":se,"data-type":oe,"data-invert":be,"data-swipe-out":Y,"data-swipe-direction":N,"data-expanded":Boolean(b||I&&H),"data-testid":d.testId,style:{"--index":y,"--toasts-before":y,"--z-index":v.length-y,"--offset":`${q?_:fe.current}px`,"--initial-height":I?"auto":`${Q}px`,...S,...d.style},onDragEnd:()=>{U(!1),L(null),he.current=null},onPointerDown:e=>{2!==e.button&&!xe&&se&&(ee.current=new Date,G(fe.current),e.target.setPointerCapture(e.pointerId),"BUTTON"!==e.target.tagName&&(U(!0),he.current={x:e.clientX,y:e.clientY}))},onPointerUp:()=>{var e,t,n;if(Y||!se)return;he.current=null;const r=Number((null==(e=te.current)?void 0:e.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),o=Number((null==(t=te.current)?void 0:t.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),s=(new Date).getTime()-(null==(n=ee.current)?void 0:n.getTime()),i="x"===F?r:o,a=Math.abs(i)/s;if(Math.abs(i)>=45||a>.11)return G(fe.current),null==d.onDismiss||d.onDismiss.call(d,d),B("x"===F?r>0?"right":"left":o>0?"down":"up"),we(),void W(!0);var l,c;null==(l=te.current)||l.style.setProperty("--swipe-amount-x","0px"),null==(c=te.current)||c.style.setProperty("--swipe-amount-y","0px"),X(!1),U(!1),L(null)},onPointerMove:t=>{var n,r,o;if(!he.current||!se)return;if((null==(n=window.getSelection())?void 0:n.toString().length)>0)return;const s=t.clientY-he.current.y,i=t.clientX-he.current.x;var a;const l=null!=(a=e.swipeDirections)?a:function(e){const[t,n]=e.split("-"),r=[];return t&&r.push(t),n&&r.push(n),r}(O);!F&&(Math.abs(i)>1||Math.abs(s)>1)&&L(Math.abs(i)>Math.abs(s)?"x":"y");let c={x:0,y:0};const u=e=>1/(1.5+Math.abs(e)/20);if("y"===F){if(l.includes("top")||l.includes("bottom"))if(l.includes("top")&&s<0||l.includes("bottom")&&s>0)c.y=s;else{const e=s*u(s);c.y=Math.abs(e)<Math.abs(s)?e:s}}else if("x"===F&&(l.includes("left")||l.includes("right")))if(l.includes("left")&&i<0||l.includes("right")&&i>0)c.x=i;else{const e=i*u(i);c.x=Math.abs(e)<Math.abs(i)?e:i}(Math.abs(c.x)>0||Math.abs(c.y)>0)&&X(!0),null==(r=te.current)||r.style.setProperty("--swipe-amount-x",`${c.x}px`),null==(o=te.current)||o.style.setProperty("--swipe-amount-y",`${c.y}px`)}},ce&&!d.jsx&&"loading"!==oe?$e.createElement("button",{"aria-label":j,"data-disabled":xe,"data-close-button":!0,onClick:xe||!se?()=>{}:()=>{we(),null==d.onDismiss||d.onDismiss.call(d,d)},className:Ct(null==A?void 0:A.closeButton,null==d||null==(r=d.classNames)?void 0:r.closeButton)},null!=(Ce=null==D?void 0:D.close)?Ce:mt):null,(oe||d.icon||d.promise)&&null!==d.icon&&(null!==(null==D?void 0:D[oe])||d.icon)?$e.createElement("div",{"data-icon":"",className:Ct(null==A?void 0:A.icon,null==d||null==(o=d.classNames)?void 0:o.icon)},d.promise||"loading"===d.type&&!d.icon?d.icon||function(){var e,t;return(null==D?void 0:D.loading)?$e.createElement("div",{className:Ct(null==A?void 0:A.loader,null==d||null==(t=d.classNames)?void 0:t.loader,"sonner-loader"),"data-visible":"loading"===oe},D.loading):$e.createElement(ut,{className:Ct(null==A?void 0:A.loader,null==d||null==(e=d.classNames)?void 0:e.loader),visible:"loading"===oe})}():null,"loading"!==d.type?Ee:null):null,$e.createElement("div",{"data-content":"",className:Ct(null==A?void 0:A.content,null==d||null==(s=d.classNames)?void 0:s.content)},$e.createElement("div",{"data-title":"",className:Ct(null==A?void 0:A.title,null==d||null==(i=d.classNames)?void 0:i.title)},d.jsx?d.jsx:"function"==typeof d.title?d.title():d.title),d.description?$e.createElement("div",{"data-description":"",className:Ct(P,ae,null==A?void 0:A.description,null==d||null==(a=d.classNames)?void 0:a.description)},"function"==typeof d.description?d.description():d.description):null),$e.isValidElement(d.cancel)?d.cancel:d.cancel&&wt(d.cancel)?$e.createElement("button",{"data-button":!0,"data-cancel":!0,style:d.cancelButtonStyle||C,onClick:e=>{wt(d.cancel)&&se&&(null==d.cancel.onClick||d.cancel.onClick.call(d.cancel,e),we())},className:Ct(null==A?void 0:A.cancelButton,null==d||null==(l=d.classNames)?void 0:l.cancelButton)},d.cancel.label):null,$e.isValidElement(d.action)?d.action:d.action&&wt(d.action)?$e.createElement("button",{"data-button":!0,"data-action":!0,style:d.actionButtonStyle||R,onClick:e=>{wt(d.action)&&(null==d.action.onClick||d.action.onClick.call(d.action,e),e.defaultPrevented||we())},className:Ct(null==A?void 0:A.actionButton,null==d||null==(c=d.classNames)?void 0:c.actionButton)},d.action.label):null)};function Tt(){if("undefined"==typeof window)return"ltr";if("undefined"==typeof document)return"ltr";const e=document.documentElement.getAttribute("dir");return"auto"!==e&&e?e:window.getComputedStyle(document.documentElement).direction}function Pt(e,t){const n={};return[e,t].forEach((e,t)=>{const r=1===t,o=r?"--mobile-offset":"--offset",s=r?"16px":"24px";function i(e){["top","right","bottom","left"].forEach(t=>{n[`${o}-${t}`]="number"==typeof e?`${e}px`:e})}"number"==typeof e||"string"==typeof e?i(e):"object"==typeof e?["top","right","bottom","left"].forEach(t=>{void 0===e[t]?n[`${o}-${t}`]=s:n[`${o}-${t}`]="number"==typeof e[t]?`${e[t]}px`:e[t]}):i(s)}),n}var kt=$e.forwardRef(function(e,t){const{id:n,invert:r,position:o="bottom-right",hotkey:s=["altKey","KeyT"],expand:i,closeButton:a,className:l,offset:c,mobileOffset:u,theme:d="light",richColors:f,duration:p,style:h,visibleToasts:m=Et,toastOptions:g,dir:y=Tt(),gap:v=St,icons:b,containerAriaLabel:x="Notifications"}=e,[w,E]=$e.useState([]),S=$e.useMemo(()=>n?w.filter(e=>e.toasterId===n):w.filter(e=>!e.toasterId),[w,n]),C=$e.useMemo(()=>Array.from(new Set([o].concat(S.filter(e=>e.position).map(e=>e.position)))),[S,o]),[R,T]=$e.useState([]),[P,k]=$e.useState(!1),[O,M]=$e.useState(!1),[I,A]=$e.useState("system"!==d?d:"undefined"!=typeof window&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),D=$e.useRef(null),j=s.join("+").replace(/Key/g,"").replace(/Digit/g,""),F=$e.useRef(null),L=$e.useRef(!1),N=$e.useCallback(e=>{E(t=>{var n;return(null==(n=t.find(t=>t.id===e.id))?void 0:n.delete)||yt.dismiss(e.id),t.filter(({id:t})=>t!==e.id)})},[]);return $e.useEffect(()=>yt.subscribe(e=>{e.dismiss?requestAnimationFrame(()=>{E(t=>t.map(t=>t.id===e.id?{...t,delete:!0}:t))}):setTimeout(()=>{lt.flushSync(()=>{E(t=>{const n=t.findIndex(t=>t.id===e.id);return-1!==n?[...t.slice(0,n),{...t[n],...e},...t.slice(n+1)]:[e,...t]})})})}),[w]),$e.useEffect(()=>{if("system"!==d)return void A(d);if("system"===d&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?A("dark"):A("light")),"undefined"==typeof window)return;const e=window.matchMedia("(prefers-color-scheme: dark)");try{e.addEventListener("change",({matches:e})=>{A(e?"dark":"light")})}catch(t){e.addListener(({matches:e})=>{try{A(e?"dark":"light")}catch(t){console.error(t)}})}},[d]),$e.useEffect(()=>{w.length<=1&&k(!1)},[w]),$e.useEffect(()=>{const e=e=>{var t,n;s.every(t=>e[t]||e.code===t)&&(k(!0),null==(n=D.current)||n.focus());"Escape"!==e.code||document.activeElement!==D.current&&!(null==(t=D.current)?void 0:t.contains(document.activeElement))||k(!1)};return document.addEventListener("keydown",e),()=>document.removeEventListener("keydown",e)},[s]),$e.useEffect(()=>{if(D.current)return()=>{F.current&&(F.current.focus({preventScroll:!0}),F.current=null,L.current=!1)}},[D.current]),$e.createElement("section",{ref:t,"aria-label":`${x} ${j}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},C.map((t,n)=>{var o;const[s,d]=t.split("-");return S.length?$e.createElement("ol",{key:t,dir:"auto"===y?Tt():y,tabIndex:-1,ref:D,className:l,"data-sonner-toaster":!0,"data-sonner-theme":I,"data-y-position":s,"data-x-position":d,style:{"--front-toast-height":`${(null==(o=R[0])?void 0:o.height)||0}px`,"--width":"356px","--gap":`${v}px`,...h,...Pt(c,u)},onBlur:e=>{L.current&&!e.currentTarget.contains(e.relatedTarget)&&(L.current=!1,F.current&&(F.current.focus({preventScroll:!0}),F.current=null))},onFocus:e=>{e.target instanceof HTMLElement&&"false"===e.target.dataset.dismissible||L.current||(L.current=!0,F.current=e.relatedTarget)},onMouseEnter:()=>k(!0),onMouseMove:()=>k(!0),onMouseLeave:()=>{O||k(!1)},onDragEnd:()=>k(!1),onPointerDown:e=>{e.target instanceof HTMLElement&&"false"===e.target.dataset.dismissible||M(!0)},onPointerUp:()=>M(!1)},S.filter(e=>!e.position&&0===n||e.position===t).map((n,o)=>{var s,l;return $e.createElement(Rt,{key:n.id,icons:b,index:o,toast:n,defaultRichColors:f,duration:null!=(s=null==g?void 0:g.duration)?s:p,className:null==g?void 0:g.className,descriptionClassName:null==g?void 0:g.descriptionClassName,invert:r,visibleToasts:m,closeButton:null!=(l=null==g?void 0:g.closeButton)?l:a,interacting:O,position:t,style:null==g?void 0:g.style,unstyled:null==g?void 0:g.unstyled,classNames:null==g?void 0:g.classNames,cancelButtonStyle:null==g?void 0:g.cancelButtonStyle,actionButtonStyle:null==g?void 0:g.actionButtonStyle,closeButtonAriaLabel:null==g?void 0:g.closeButtonAriaLabel,removeToast:N,toasts:S.filter(e=>e.position==n.position),heights:R.filter(e=>e.position==n.position),setHeights:T,expandByDefault:i,gap:v,expanded:P,swipeDirections:e.swipeDirections})})):null}))}),Ot=y("circle-check",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]),Mt=y("info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]),It=y("triangle-alert",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]]),At=[],Dt=void 0;function jt(e){const t=(t,n)=>{const r=h(Lt).current;let o;try{Dt=r;for(const e of At)e.before(r);o=e(t,n);for(const e of At)e.after(r);r.didInitialize=!0}finally{Dt=void 0}return o};return t.displayName=e.displayName||e.name,t}function Ft(e){return $e.forwardRef(jt(e))}function Lt(){return{didInitialize:!1}}function Nt(e){const t=$e.useRef(!0);t.current&&(t.current=!1,e())}var Bt=$e.createContext(void 0);function Ht(e){const t=$e.useContext(Bt);if(void 0===t&&!e)throw new Error(i(72));return t}var zt=[];function qt(e){$e.useEffect(e,zt)}var Vt=class e{static create(){return new e}currentId=0;start(e,t){this.clear(),this.currentId=setTimeout(()=>{this.currentId=0,t()},e)}isStarted(){return 0!==this.currentId}clear=()=>{0!==this.currentId&&(clearTimeout(this.currentId),this.currentId=0)};disposeEffect=()=>this.clear};function $t(){const e=h(Vt.create).current;return qt(e.disposeEffect),e}var Ut="undefined"!=typeof navigator,Yt=function(){if(!Ut)return{platform:"",maxTouchPoints:-1};const e=navigator.userAgentData;return e?.platform?{platform:e.platform,maxTouchPoints:navigator.maxTouchPoints}:{platform:navigator.platform??"",maxTouchPoints:navigator.maxTouchPoints??-1}}(),Wt=function(){if(!Ut)return"";const e=navigator.userAgentData;return e?.platform?e.platform:navigator.platform??""}(),Kt=function(){if(!Ut)return"";const e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(({brand:e,version:t})=>`${e}/${t}`).join(" "):navigator.userAgent}(),Xt=!("undefined"==typeof CSS||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter:none"),_t="MacIntel"===Yt.platform&&Yt.maxTouchPoints>1||/iP(hone|ad|od)|iOS/.test(Yt.platform),Gt=(Ut&&/firefox/i.test(Kt),Ut&&/apple/i.test(navigator.vendor)),Qt=(Ut&&/Edg/i.test(Kt),Ut&&/android/i.test(Wt)||/android/i.test(Kt)),Jt=Ut&&Wt.toLowerCase().startsWith("mac")&&!navigator.maxTouchPoints,Zt=Kt.includes("jsdom/");function en(e){e.preventDefault(),e.stopPropagation()}function tn(e){return!(""!==e.pointerType||!e.isTrusted)||(Qt&&e.pointerType?"click"===e.type&&1===e.buttons:0===e.detail&&!e.pointerType)}function nn(e){return!Zt&&(!Qt&&0===e.width&&0===e.height||Qt&&1===e.width&&1===e.height&&0===e.pressure&&0===e.detail&&"mouse"===e.pointerType||e.width<1&&e.height<1&&0===e.pressure&&0===e.detail&&"touch"===e.pointerType)}function rn(e,t){const n=["mouse","pen"];return t||n.push("",void 0),n.includes(e)}function on(e){const t=e.type;return"click"===t||"mousedown"===t||"keydown"===t||"keyup"===t}function sn(e,t,n){const r=function(e,t){return null==t||rn(t)?"function"==typeof e?e():e:0}(e,n);return"number"==typeof r?r:r?.[t]}function an(e){return"function"==typeof e?e():e}function ln(e,t){return t||"click"===e||"mousedown"===e}var cn=$e.createContext({hasProvider:!1,timeoutMs:0,delayRef:{current:0},initialDelayRef:{current:0},timeout:new Vt,currentIdRef:{current:null},currentContextRef:{current:null}});function un(e){const{children:t,delay:n,timeoutMs:r=0}=e,o=$e.useRef(n),s=$e.useRef(n),i=$e.useRef(null),a=$e.useRef(null),l=$t();return(0,Ue.jsx)(cn.Provider,{value:$e.useMemo(()=>({hasProvider:!0,delayRef:o,initialDelayRef:s,currentIdRef:i,timeoutMs:r,currentContextRef:a,timeout:l}),[r,l]),children:t})}function dn(e,t,n,r){return e.addEventListener(t,n,r),()=>{e.removeEventListener(t,n,r)}}function fn(...e){return()=>{for(let t=0;t<e.length;t+=1){const n=e[t];n&&n()}}}function pn(e){const t=h(hn,e).current;return t.next=e,L(t.effect),t}function hn(e){const t={current:e,next:e,effect:()=>{t.current=t.next}};return t}var mn=null;globalThis.requestAnimationFrame;var gn=new class{callbacks=[];callbacksCount=0;nextId=1;startId=1;isScheduled=!1;tick=e=>{this.isScheduled=!1;const t=this.callbacks,n=this.callbacksCount;if(this.callbacks=[],this.callbacksCount=0,this.startId=this.nextId,n>0)for(let r=0;r<t.length;r+=1)t[r]?.(e)};request(e){const t=this.nextId;return this.nextId+=1,this.callbacks.push(e),this.callbacksCount+=1,this.isScheduled||(requestAnimationFrame(this.tick),this.isScheduled=!0),t}cancel(e){const t=e-this.startId;t<0||t>=this.callbacks.length||(this.callbacks[t]=null,this.callbacksCount-=1)}},yn=class e{static create(){return new e}static request(e){return gn.request(e)}static cancel(e){return gn.cancel(e)}currentId=mn;request(e){this.cancel(),this.currentId=gn.request(()=>{this.currentId=mn,e()})}cancel=()=>{this.currentId!==mn&&(gn.cancel(this.currentId),this.currentId=mn)};disposeEffect=()=>this.cancel};function vn(){const e=h(yn.create).current;return qt(e.disposeEffect),e}var bn={clipPath:"inset(50%)",overflow:"hidden",whiteSpace:"nowrap",border:0,padding:0,width:1,height:1,margin:-1},xn={...bn,position:"fixed",top:0,left:0},wn={...bn,position:"absolute"},En=$e.forwardRef(function(e,t){const[n,r]=$e.useState();L(()=>{Gt&&r("button")},[]);const o={tabIndex:0,role:n};return(0,Ue.jsx)("span",{...e,ref:t,style:xn,"aria-hidden":!n||void 0,...o,"data-base-ui-focus-guard":""})}),Sn="ArrowLeft",Cn="ArrowRight",Rn="ArrowUp",Tn="ArrowDown";function Pn(e,t){if(!V(e))return!1;const n=e;if(t.hasElement(n))return!n.hasAttribute("data-trigger-disabled");for(const[,r]of t.entries())if(d(r,n))return!r.hasAttribute("data-trigger-disabled");return!1}function kn(e,t){if(null==t)return!1;if("composedPath"in e)return e.composedPath().includes(t);const n=e;return null!=n.target&&t.contains(n.target)}function On(e){return F(e)&&e.matches("input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])")}function Mn(e){return!!e&&("combobox"===e.getAttribute("role")&&On(e))}function In(e){return e?e.hasAttribute("data-base-ui-focusable")?e:e.querySelector("[data-base-ui-focusable]")||e:null}var An=["top","right","bottom","left"],Dn=Math.min,jn=Math.max,Fn=Math.round,Ln=Math.floor,Nn=e=>({x:e,y:e}),Bn={left:"right",right:"left",bottom:"top",top:"bottom"};function Hn(e,t,n){return jn(e,Dn(t,n))}function zn(e,t){return"function"==typeof e?e(t):e}function qn(e){return e.split("-")[0]}function Vn(e){return e.split("-")[1]}function $n(e){return"x"===e?"y":"x"}function Un(e){return"y"===e?"height":"width"}function Yn(e){const t=e[0];return"t"===t||"b"===t?"y":"x"}function Wn(e){return $n(Yn(e))}function Kn(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}var Xn=["left","right"],_n=["right","left"],Gn=["top","bottom"],Qn=["bottom","top"];function Jn(e,t,n,r){const o=Vn(e);let s=function(e,t,n){switch(e){case"top":case"bottom":return n?t?_n:Xn:t?Xn:_n;case"left":case"right":return t?Gn:Qn;default:return[]}}(qn(e),"start"===n,r);return o&&(s=s.map(e=>e+"-"+o),t&&(s=s.concat(s.map(Kn)))),s}function Zn(e){const t=qn(e);return Bn[t]+e.slice(t.length)}function er(e){return"number"!=typeof e?function(e){return{top:0,right:0,bottom:0,left:0,...e}}(e):{top:e,right:e,bottom:e,left:e}}function tr(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}function nr(e,t,n){return Math.floor(e/t)!==n}function rr(e,t){return t<0||t>=e.length}function or(e,t){return ir(e.current,{disabledIndices:t})}function sr(e,t){return ir(e.current,{decrement:!0,startingIndex:e.current.length,disabledIndices:t})}function ir(e,{startingIndex:t=-1,decrement:n=!1,disabledIndices:r,amount:o=1}={}){let s=t;do{s+=n?-o:o}while(s>=0&&s<=e.length-1&&dr(e,s,r));return s}function ar(e,{event:t,orientation:n,loopFocus:r,onLoop:o,rtl:s,cols:i,disabledIndices:a,minIndex:l,maxIndex:c,prevIndex:u,stopEvent:d=!1}){let f,p=u;if("ArrowUp"===t.key?f="up":"ArrowDown"===t.key&&(f="down"),f){const n=[],s=[];let h=!1,m=0;{let t=null,r=-1;e.forEach((e,o)=>{if(null==e)return;m+=1;const i=e.closest('[role="row"]');i&&(h=!0),i===t&&-1!==r||(t=i,r+=1,n[r]=[]),n[r].push(o),s[o]=r})}let g=!1,y=0;if(h)for(const e of n){const t=e.length;t>y&&(y=t),t!==i&&(g=!0)}const v=g&&m<e.length,b=y||i,x=i=>{if(!g||-1===u)return;const l=s[u];if(null==l)return;const c=n[l].indexOf(u),d="up"===i?-1:1;for(let f=l+d,p=0;p<n.length;p+=1,f+=d){if(f<0||f>=n.length){if(!r||v)return;if(f=f<0?n.length-1:0,o){const e=Math.min(c,n[f].length-1);f=s[o(t,u,n[f][e]??n[f][0])]??f}}const i=n[f];for(let t=Math.min(c,i.length-1);t>=0;t-=1){const n=i[t];if(!dr(e,n,a))return n}}},w=t=>{if(!v||-1===u)return;const n=u%b,o="up"===t?-b:b,s=c-c%b,i=Ln(c/b)+1;for(let l=u-n+o,d=0;d<i;d+=1,l+=o){if(l<0||l>c){if(!r)return;l=l<0?s:0}const t=Math.min(l+b-1,c);for(let r=Math.min(l+n,t);r>=l;r-=1)if(!dr(e,r,a))return r}};d&&en(t);const E=x(f)??w(f);if(void 0!==E)p=E;else if(-1===u)p="up"===f?c:l;else if(p=ir(e,{startingIndex:u,amount:b,decrement:"up"===f,disabledIndices:a}),r){if("up"===f&&(u-b<l||p<0)){const e=u%b,n=c%b,r=c-(n-e);p=n===e?c:n>e?r:r-b,o&&(p=o(t,u,p))}"down"===f&&u+b>c&&(p=ir(e,{startingIndex:u%b-b,amount:b,disabledIndices:a}),o&&(p=o(t,u,p)))}rr(e,p)&&(p=u)}if("both"===n){const n=Ln(u/i);t.key===(s?"ArrowLeft":"ArrowRight")&&(d&&en(t),u%i!==i-1?(p=ir(e,{startingIndex:u,disabledIndices:a}),r&&nr(p,i,n)&&(p=ir(e,{startingIndex:u-u%i-1,disabledIndices:a}),o&&(p=o(t,u,p)))):r&&(p=ir(e,{startingIndex:u-u%i-1,disabledIndices:a}),o&&(p=o(t,u,p))),nr(p,i,n)&&(p=u)),t.key===(s?"ArrowRight":"ArrowLeft")&&(d&&en(t),u%i!==0?(p=ir(e,{startingIndex:u,decrement:!0,disabledIndices:a}),r&&nr(p,i,n)&&(p=ir(e,{startingIndex:u+(i-u%i),decrement:!0,disabledIndices:a}),o&&(p=o(t,u,p)))):r&&(p=ir(e,{startingIndex:u+(i-u%i),decrement:!0,disabledIndices:a}),o&&(p=o(t,u,p))),nr(p,i,n)&&(p=u));const l=Ln(c/i)===n;rr(e,p)&&(r&&l?(p=t.key===(s?"ArrowRight":"ArrowLeft")?c:ir(e,{startingIndex:u-u%i-1,disabledIndices:a}),o&&(p=o(t,u,p))):p=u)}return p}function lr(e,t,n){const r=[];let o=0;return e.forEach(({width:e,height:s},i)=>{let a=!1;for(n&&(o=0);!a;){const n=[];for(let r=0;r<e;r+=1)for(let e=0;e<s;e+=1)n.push(o+r+e*t);o%t+e<=t&&n.every(e=>null==r[e])?(n.forEach(e=>{r[e]=i}),a=!0):o+=1}}),[...r]}function cr(e,t,n,r,o){if(-1===e)return-1;const s=n.indexOf(e),i=t[e];switch(o){case"tl":return s;case"tr":return i?s+i.width-1:s;case"bl":return i?s+(i.height-1)*r:s;case"br":return n.lastIndexOf(e);default:return-1}}function ur(e,t){return t.flatMap((t,n)=>e.includes(t)?[n]:[])}function dr(e,t,n){if("function"==typeof n?n(t):n?.includes(t))return!0;const r=e[t];return!!r&&(!fr(r)||!n&&(r.hasAttribute("disabled")||"true"===r.getAttribute("aria-disabled")))}function fr(e,t=(e?q(e):null)){return!(!(e&&e.isConnected&&t)||function(e){return"hidden"===e.visibility||"collapse"===e.visibility}(t))&&("function"==typeof e.checkVisibility?e.checkVisibility():"none"!==t.display&&"contents"!==t.display)}function pr(e){const t=e.assignedSlot;if(t)return t;if(e.parentElement)return e.parentElement;const n=e.getRootNode();return O(n)?n.host:null}function hr(e){for(const t of Array.from(e.children))if("summary"===T(t))return t;return null}function mr(e,t){const n=hr(t);return!!n&&(e===n||d(n,e))}function gr(e){const t=e?T(e):"";return null!=e&&e.matches('a[href],button,input,select,textarea,summary,details,iframe,object,embed,[tabindex],[contenteditable]:not([contenteditable="false"]),audio[controls],video[controls]')&&("summary"!==t||null!=e.parentElement&&"details"===T(e.parentElement)&&hr(e.parentElement)===e)&&("details"!==t||null==hr(e))&&("input"!==t||"hidden"!==e.type)}function yr(e){if(!gr(e)||!e.isConnected||e.matches(":disabled"))return!1;for(let t=e;t;t=pr(t)){const n=t!==e,r="slot"===T(t);if(t.hasAttribute("inert"))return!1;if(n&&"details"===T(t)&&!t.open&&!mr(e,t)||t.hasAttribute("hidden")||!r&&!vr(t,n))return!1}return!0}function vr(e,t){const n=q(e);return t?"none"!==n.display:fr(e,n)}function br(e){const t=e.tabIndex;if(t<0){const t=T(e);if("details"===t||"audio"===t||"video"===t||F(e)&&e.isContentEditable)return 0}return t}function xr(e){if("input"!==T(e))return null;const t=e;return"radio"===t.type&&""!==t.name?t:null}function wr(e){if(F(e)&&"slot"===T(e)){const t=e.assignedElements({flatten:!0});if(t.length>0)return t}return F(e)&&e.shadowRoot?Array.from(e.shadowRoot.children):Array.from(e.children)}function Er(e,t){wr(e).forEach(e=>{gr(e)&&t.push(e),Er(e,t)})}function Sr(e,t,n){wr(e).forEach(e=>{F(e)&&e.matches(t)&&n.push(e),Sr(e,t,n)})}function Cr(e){return yr(e)&&br(e)>=0}function Rr(e){const t=[];return Er(e,t),t.filter(yr)}function Tr(e){const t=Rr(e);return t.filter(e=>br(e)>=0&&function(e,t){const n=xr(e);if(!n)return!0;const r=t.find(e=>{const t=xr(e);return t?.name===n.name&&t.form===n.form&&t.checked});return r?r===n:t.find(e=>{const t=xr(e);return t?.name===n.name&&t.form===n.form})===n}(e,t))}function Pr(e,t){const n=Tr(e),r=n.length;if(0===r)return;const o=E(S(e)),s=n.indexOf(o);return n[-1===s?1===t?0:r-1:s+t]}function kr(e){return Pr(S(e).body,1)||e}function Or(e){return Pr(S(e).body,-1)||e}function Mr(e,t){if(!e)return null;const n=Tr(S(e).body),r=n.length;if(0===r)return null;const o=n.indexOf(e);return-1===o?null:n[(o+t+r)%r]}function Ir(e){return Mr(e,1)}function Ar(e){return Mr(e,-1)}function Dr(e,t){const n=t||e.currentTarget,r=e.relatedTarget;return!r||!d(n,r)}function jr(e){const t=[];Sr(e,"[data-tabindex]",t),t.forEach(e=>{const t=e.dataset.tabindex;delete e.dataset.tabindex,t?e.setAttribute("tabindex",t):e.removeAttribute("tabindex")})}function Fr(e,t,n=!0){return e.filter(e=>e.parentId===t).flatMap(t=>[...!n||t.context?.open?[t]:[],...Fr(e,t.id,n)])}function Lr(e,t){let n=[],r=e.find(e=>e.id===t)?.parentId;for(;r;){const t=e.find(e=>e.id===r);r=t?.parentId,t&&(n=n.concat(t))}return n}function Nr(e){return`data-base-ui-${e}`}var Br={style:{transition:"none"}},Hr="data-base-ui-click-trigger",zr={fallbackAxisSide:"none"},qr={fallbackAxisSide:"end"},Vr={clipPath:"inset(50%)",position:"fixed",top:0,left:0},$r=$e.createContext(null),Ur=()=>$e.useContext($r),Yr=Nr("portal");function Wr(e={}){const{ref:t,container:n,componentProps:r=g,elementProps:o}=e,s=a(),i=Ur()?.portalNode,[l,c]=$e.useState(null),[d,p]=$e.useState(null),h=u(e=>{null!==e&&p(e)}),m=$e.useRef(null);L(()=>{if(null===n)return void(m.current&&(m.current=null,p(null),c(null)));if(null==s)return;const e=(n&&(z(n)?n:n.current))??i??document.body;null!=e?m.current!==e&&(m.current=e,p(null),c(e)):m.current&&(m.current=null,p(null),c(null))},[n,i,s]);const y=f("div",r,{ref:[t,h],props:[{id:s,[Yr]:""},o]});return{portalNode:d,portalSubtree:l&&y?lt.createPortal(y,l):null}}var Kr=$e.forwardRef(function(e,t){const{children:n,container:r,className:o,render:s,renderGuards:i,style:a,...l}=e,{portalNode:c,portalSubtree:u}=Wr({container:r,ref:t,componentProps:e,elementProps:l}),d=$e.useRef(null),f=$e.useRef(null),p=$e.useRef(null),h=$e.useRef(null),[m,g]=$e.useState(null),y=$e.useRef(!1),v=m?.modal,b=m?.open,x="boolean"==typeof i?i:!!m&&!m.modal&&m.open&&!!c;$e.useEffect(()=>{if(c&&!v)return fn(dn(c,"focusin",e,!0),dn(c,"focusout",e,!0));function e(e){c&&e.relatedTarget&&Dr(e)&&("focusin"===e.type?y.current&&(jr(c),y.current=!1):(!function(e){Tr(e).forEach(e=>{e.dataset.tabindex=e.getAttribute("tabindex")||"",e.setAttribute("tabindex","-1")})}(c),y.current=!0))}},[c,v]),$e.useEffect(()=>{c&&!1===b&&(jr(c),y.current=!1)},[b,c]);const w=$e.useMemo(()=>({beforeOutsideRef:d,afterOutsideRef:f,beforeInsideRef:p,afterInsideRef:h,portalNode:c,setFocusManagerState:g}),[c]);return(0,Ue.jsxs)($e.Fragment,{children:[u,(0,Ue.jsxs)($r.Provider,{value:w,children:[x&&c&&(0,Ue.jsx)(En,{"data-type":"outside",ref:d,onFocus:e=>{Dr(e,c)?p.current?.focus():Or(m?m.domReference:null)?.focus()}}),x&&c&&(0,Ue.jsx)("span",{"aria-owns":c.id,style:Vr}),c&<.createPortal(n,c),x&&c&&(0,Ue.jsx)(En,{"data-type":"outside",ref:f,onFocus:e=>{Dr(e,c)?h.current?.focus():(kr(m?m.domReference:null)?.focus(),m?.closeOnFocusOut&&m?.onOpenChange(!1,A("focus-out",e.nativeEvent)))}})]})]})});function Xr(){const e=new Map;return{emit(t,n){e.get(t)?.forEach(e=>e(n))},on(t,n){e.has(t)||e.set(t,new Set),e.get(t).add(n)},off(t,n){e.get(t)?.delete(n)}}}var _r=class{nodesRef={current:[]};events=Xr();addNode(e){this.nodesRef.current.push(e)}removeNode(e){const t=this.nodesRef.current.findIndex(t=>t===e);-1!==t&&this.nodesRef.current.splice(t,1)}},Gr=$e.createContext(null),Qr=$e.createContext(null),Jr=()=>$e.useContext(Gr)?.id||null,Zr=e=>{const t=$e.useContext(Qr);return e??t};function eo(e){const t=a(),n=Zr(e),r=Jr();return L(()=>{if(!t)return;const e={id:t,parentId:r};return n?.addNode(e),()=>{n?.removeNode(e)}},[n,t,r]),t}function to(e){const{children:t,id:n}=e,r=Jr();return(0,Ue.jsx)(Gr.Provider,{value:$e.useMemo(()=>({id:n,parentId:r}),[n,r]),children:t})}function no(e){const{children:t,externalTree:n}=e,r=h(()=>n??new _r).current;return(0,Ue.jsx)(Qr.Provider,{value:r,children:t})}function ro(e){return null==e?e:"current"in e?e.current:e}function oo(e){return null!=e&&null!=e.clientX}function so(e,t={}){const n="rootStore"in e?e.rootStore:e,r=n.useState("open"),o=n.useState("floatingElement"),s=n.useState("domReferenceElement"),i=n.context.dataRef,{enabled:a=!0,axis:l="both"}=t,c=$e.useRef(!1),f=$e.useRef(null),[p,h]=$e.useState(),[m,g]=$e.useState([]),y=u((e,t,r)=>{c.current||i.current.openEvent&&!oo(i.current.openEvent)||n.set("positionReference",function(e,t){let n=null,r=null,o=!1;return{contextElement:e||void 0,getBoundingClientRect(){const s=e?.getBoundingClientRect()||{width:0,height:0,x:0,y:0},i="x"===t.axis||"both"===t.axis,a="y"===t.axis||"both"===t.axis,l=["mouseenter","mousemove"].includes(t.dataRef.current.openEvent?.type||"")&&"touch"!==t.pointerType;let c=s.width,u=s.height,d=s.x,f=s.y;return null==n&&t.x&&i&&(n=s.x-t.x),null==r&&t.y&&a&&(r=s.y-t.y),d-=n||0,f-=r||0,c=0,u=0,!o||l?(c="y"===t.axis?s.width:0,u="x"===t.axis?s.height:0,d=i&&null!=t.x?t.x:d,f=a&&null!=t.y?t.y:f):o&&!l&&(u="x"===t.axis?s.height:u,c="y"===t.axis?s.width:c),o=!0,{width:c,height:u,x:d,y:f,top:f,right:d+c,bottom:f+u,left:d}}}}(r??s,{x:e,y:t,axis:l,dataRef:i,pointerType:p}))}),v=u(e=>{r?f.current||g([]):y(e.clientX,e.clientY,e.currentTarget)}),b=rn(p)?o:r,x=$e.useCallback(()=>{if(!b||!a)return;const e=U(o);if(!i.current.openEvent||oo(i.current.openEvent)){const t=()=>{f.current?.(),f.current=null};return f.current=dn(e,"mousemove",function(e){d(o,w(e))?(f.current?.(),f.current=null):y(e.clientX,e.clientY)}),t}n.set("positionReference",s)},[b,a,o,i,s,n,y]);$e.useEffect(()=>x(),[x,m]),$e.useEffect(()=>{a&&!o&&(c.current=!1)},[a,o]),$e.useEffect(()=>{!a&&r&&(c.current=!0)},[a,r]);const E=$e.useMemo(()=>{function e(e){h(e.pointerType)}return{onPointerDown:e,onPointerEnter:e,onMouseMove:v,onMouseEnter:v}},[v]);return $e.useMemo(()=>a?{reference:E,trigger:E}:{},[a,E])}var io={intentional:"onClick",sloppy:"onPointerDown"};function ao(){return!1}function lo(e,t={}){const n="rootStore"in e?e.rootStore:e,r=n.useState("open"),o=n.useState("floatingElement"),{dataRef:s}=n.context,{enabled:i=!0,escapeKey:a=!0,outsidePress:c=!0,outsidePressEvent:f="sloppy",referencePress:p=ao,referencePressEvent:h="sloppy",bubbles:m,externalTree:g}=t,y=Zr(g),v=u("function"==typeof c?c:()=>!1),x="function"==typeof c?v:c,E=!1!==x,C=u(()=>f),R=$e.useRef(!1),T=$e.useRef(!1),P=$e.useRef(!1),{escapeKey:j,outsidePress:L}={escapeKey:"boolean"==typeof(N=m)?N:N?.escapeKey??!1,outsidePress:"boolean"==typeof N?N:N?.outsidePress??!0};var N;const B=$e.useRef(null),H=$t(),z=$t(),$=u(()=>{z.clear(),s.current.insideReactTree=!1}),U=$e.useRef(!1),Y=$e.useRef(""),W=u(p),K=u(e=>{if(!r||!i||!a||"Escape"!==e.key)return;if(U.current)return;const t=s.current.floatingContext?.nodeId,o=y?Fr(y.nodesRef.current,t):[];if(!j&&o.length>0){let e=!0;if(o.forEach(t=>{t.context?.open&&!t.context.dataRef.current.__escapeKeyBubbles&&(e=!1)}),!e)return}const l=function(e){return"nativeEvent"in e}(e)?e.nativeEvent:e,c=A(D,l);n.setOpen(!1,c),j||c.isPropagationAllowed||e.stopPropagation()}),X=u(()=>{s.current.insideReactTree=!0,z.start(0,$)});$e.useEffect(()=>{if(!r||!i)return;s.current.__escapeKeyBubbles=j,s.current.__outsidePressBubbles=L;const e=new Vt,t=new Vt;function l(){P.current=!0,t.start(0,()=>{P.current=!1})}function c(){R.current=!1,T.current=!1}function u(){const e=Y.current,t="pen"!==e&&e?e:"mouse",n=C(),r="function"==typeof n?n():n;return"string"==typeof r?r:r[t]}function f(e){const t=s.current.floatingContext?.nodeId,r=y&&Fr(y.nodesRef.current,t).some(t=>kn(e,t.context?.elements.floating));return kn(e,n.select("floatingElement"))||kn(e,n.select("domReferenceElement"))||r}function p(e){if(function(e){const t=u();return"intentional"===t&&"click"!==e.type||"sloppy"===t&&"click"===e.type}(e))return void $();if(s.current.insideReactTree)return void $();const r=w(e),o=`[${Nr("inert")}]`,i=V(r)?r.getRootNode():null,a=Array.from((O(i)?i:S(n.select("floatingElement"))).querySelectorAll(o)),l=n.context.triggerElements;if(r&&(l.hasElement(r)||l.hasMatchingElement(e=>d(e,r))))return;let c=V(r)?r:null;for(;c&&!k(c);){const e=I(c);if(k(e)||!V(e))break;c=e}if(a.length&&V(r)&&!r.matches("html,body")&&!d(r,n.select("floatingElement"))&&a.every(e=>!d(c,e)))return;if(F(r)&&!("touches"in e)){const t=k(r),n=q(r),o=/auto|scroll/,s=t||o.test(n.overflowX),i=t||o.test(n.overflowY),a=s&&r.clientWidth>0&&r.scrollWidth>r.clientWidth,l=i&&r.clientHeight>0&&r.scrollHeight>r.clientHeight,c="rtl"===n.direction,u=l&&(c?e.offsetX<=r.offsetWidth-r.clientWidth:e.offsetX>r.clientWidth),d=a&&e.offsetY>r.clientHeight;if(u||d)return}if(f(e))return;if("intentional"===u()&&P.current)return t.clear(),void(P.current=!1);if("function"==typeof x&&!x(e))return;const p=s.current.floatingContext?.nodeId,h=y?Fr(y.nodesRef.current,p):[];if(h.length>0){let e=!0;if(h.forEach(t=>{t.context?.open&&!t.context.dataRef.current.__outsidePressBubbles&&(e=!1)}),!e)return}n.setOpen(!1,A(b,e)),$()}function h(e){if("sloppy"!==u()||!n.select("open")||!i||kn(e,n.select("floatingElement"))||kn(e,n.select("domReferenceElement")))return;const t=e.touches[0];t&&(B.current={startTime:Date.now(),startX:t.clientX,startY:t.clientY,dismissOnTouchEnd:!1,dismissOnMouseDown:!0},H.start(1e3,()=>{B.current&&(B.current.dismissOnTouchEnd=!1,B.current.dismissOnMouseDown=!1)}))}function m(e,t){const n=w(e);if(!n)return;const r=dn(n,e.type,()=>{t(e),r()})}function g(e){H.clear(),"pointerdown"===e.type&&(Y.current=e.pointerType),"mousedown"===e.type&&B.current&&!B.current.dismissOnMouseDown||m(e,e=>{"pointerdown"===e.type?function(e){"sloppy"===u()&&"touch"!==e.pointerType&&n.select("open")&&i&&!kn(e,n.select("floatingElement"))&&!kn(e,n.select("domReferenceElement"))&&p(e)}(e):p(e)})}function v(e){if(!R.current)return;const n=T.current;c(),"intentional"===u()&&("pointercancel"!==e.type?f(e)||(n?l():("function"!=typeof x||x(e))&&(t.clear(),P.current=!0,$())):n&&l())}function D(e){if("sloppy"!==u()||!B.current||kn(e,n.select("floatingElement"))||kn(e,n.select("domReferenceElement")))return;const t=e.touches[0];if(!t)return;const r=Math.abs(t.clientX-B.current.startX),o=Math.abs(t.clientY-B.current.startY),s=Math.sqrt(r*r+o*o);s>5&&(B.current.dismissOnTouchEnd=!0),s>10&&(p(e),H.clear(),B.current=null)}function N(e){"sloppy"!==u()||!B.current||kn(e,n.select("floatingElement"))||kn(e,n.select("domReferenceElement"))||(B.current.dismissOnTouchEnd&&p(e),H.clear(),B.current=null)}const z=S(o),W=fn(a&&fn(dn(z,"keydown",K),dn(z,"compositionstart",function(){e.clear(),U.current=!0}),dn(z,"compositionend",function(){e.start(M()?5:0,()=>{U.current=!1})})),E&&fn(dn(z,"click",g,!0),dn(z,"pointerdown",g,!0),dn(z,"pointerup",v,!0),dn(z,"pointercancel",v,!0),dn(z,"mousedown",g,!0),dn(z,"mouseup",v,!0),dn(z,"touchstart",function(e){Y.current="touch",m(e,h)},!0),dn(z,"touchmove",function(e){m(e,D)},!0),dn(z,"touchend",function(e){m(e,N)},!0)));return()=>{W(),e.clear(),t.clear(),c(),P.current=!1}},[s,o,a,E,x,r,i,j,L,K,$,C,y,n,H]),$e.useEffect($,[x,$]);const _=$e.useMemo(()=>({onKeyDown:K,[io[h]]:e=>{W()&&n.setOpen(!1,A(l,e.nativeEvent))},..."intentional"!==h&&{onClick(e){W()&&n.setOpen(!1,A("trigger-press",e.nativeEvent))}}}),[K,n,h,W]),G=u(e=>{if(!r||!i||0!==e.button)return;const t=w(e.nativeEvent);d(n.select("floatingElement"),t)&&(R.current||(R.current=!0,T.current=!1))}),Q=u(e=>{r&&i&&(e.defaultPrevented||e.nativeEvent.defaultPrevented)&&R.current&&(T.current=!0)}),J=$e.useMemo(()=>({onKeyDown:K,onPointerDown:Q,onMouseDown:Q,onClickCapture:X,onMouseDownCapture(e){X(),G(e)},onPointerDownCapture(e){X(),G(e)},onMouseUpCapture:X,onTouchEndCapture:X,onTouchMoveCapture:X}),[K,X,G,Q]);return $e.useMemo(()=>i?{reference:_,floating:J,trigger:_}:{},[i,_,J])}function co(e,t,n){let{reference:r,floating:o}=e;const s=Yn(t),i=Wn(t),a=Un(i),l=qn(t),c="y"===s,u=r.x+r.width/2-o.width/2,d=r.y+r.height/2-o.height/2,f=r[a]/2-o[a]/2;let p;switch(l){case"top":p={x:u,y:r.y-o.height};break;case"bottom":p={x:u,y:r.y+r.height};break;case"right":p={x:r.x+r.width,y:d};break;case"left":p={x:r.x-o.width,y:d};break;default:p={x:r.x,y:r.y}}switch(Vn(t)){case"start":p[i]-=f*(n&&c?-1:1);break;case"end":p[i]+=f*(n&&c?-1:1)}return p}async function uo(e,t){var n;void 0===t&&(t={});const{x:r,y:o,platform:s,rects:i,elements:a,strategy:l}=e,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:d="floating",altBoundary:f=!1,padding:p=0}=zn(t,e),h=er(p),m=a[f?"floating"===d?"reference":"floating":d],g=tr(await s.getClippingRect({element:null==(n=await(null==s.isElement?void 0:s.isElement(m)))||n?m:m.contextElement||await(null==s.getDocumentElement?void 0:s.getDocumentElement(a.floating)),boundary:c,rootBoundary:u,strategy:l})),y="floating"===d?{x:r,y:o,width:i.floating.width,height:i.floating.height}:i.reference,v=await(null==s.getOffsetParent?void 0:s.getOffsetParent(a.floating)),b=await(null==s.isElement?void 0:s.isElement(v))&&await(null==s.getScale?void 0:s.getScale(v))||{x:1,y:1},x=tr(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:y,offsetParent:v,strategy:l}):y);return{top:(g.top-x.top+h.top)/b.y,bottom:(x.bottom-g.bottom+h.bottom)/b.y,left:(g.left-x.left+h.left)/b.x,right:(x.right-g.right+h.right)/b.x}}function fo(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function po(e){return An.some(t=>e[t]>=0)}var ho=new Set(["left","top"]);function mo(e){const t=q(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=F(e),s=o?e.offsetWidth:n,i=o?e.offsetHeight:r,a=Fn(n)!==s||Fn(r)!==i;return a&&(n=s,r=i),{width:n,height:r,$:a}}function go(e){return V(e)?e:e.contextElement}function yo(e){const t=go(e);if(!F(t))return Nn(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:s}=mo(t);let i=(s?Fn(n.width):n.width)/r,a=(s?Fn(n.height):n.height)/o;return i&&Number.isFinite(i)||(i=1),a&&Number.isFinite(a)||(a=1),{x:i,y:a}}var vo=Nn(0);function bo(e){const t=U(e);return M()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:vo}function xo(e,t,n,r){void 0===t&&(t=!1),void 0===n&&(n=!1);const o=e.getBoundingClientRect(),s=go(e);let i=Nn(1);t&&(r?V(r)&&(i=yo(r)):i=yo(e));const a=function(e,t,n){return void 0===t&&(t=!1),!(!n||t&&n!==U(e))&&t}(s,n,r)?bo(s):Nn(0);let l=(o.left+a.x)/i.x,c=(o.top+a.y)/i.y,u=o.width/i.x,d=o.height/i.y;if(s){const e=U(s),t=r&&V(r)?U(r):r;let n=e,o=C(n);for(;o&&r&&t!==n;){const e=yo(o),t=o.getBoundingClientRect(),r=q(o),s=t.left+(o.clientLeft+parseFloat(r.paddingLeft))*e.x,i=t.top+(o.clientTop+parseFloat(r.paddingTop))*e.y;l*=e.x,c*=e.y,u*=e.x,d*=e.y,l+=s,c+=i,n=U(o),o=C(n)}}return tr({width:u,height:d,x:l,y:c})}function wo(e,t){const n=v(e).scrollLeft;return t?t.left+n:xo(R(e)).left+n}function Eo(e,t){const n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-wo(e,n),y:n.top+t.scrollTop}}function So(e,t,n){let r;if("viewport"===t)r=function(e,t){const n=U(e),r=R(e),o=n.visualViewport;let s=r.clientWidth,i=r.clientHeight,a=0,l=0;if(o){s=o.width,i=o.height;const e=M();(!e||e&&"fixed"===t)&&(a=o.offsetLeft,l=o.offsetTop)}const c=wo(r);if(c<=0){const e=r.ownerDocument,t=e.body,n=getComputedStyle(t),o="CSS1Compat"===e.compatMode&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,i=Math.abs(r.clientWidth-t.clientWidth-o);i<=25&&(s-=i)}else c<=25&&(s+=c);return{width:s,height:i,x:a,y:l}}(e,n);else if("document"===t)r=function(e){const t=R(e),n=v(e),r=e.ownerDocument.body,o=jn(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),s=jn(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let i=-n.scrollLeft+wo(e);const a=-n.scrollTop;return"rtl"===q(r).direction&&(i+=jn(t.clientWidth,r.clientWidth)-o),{width:o,height:s,x:i,y:a}}(R(e));else if(V(t))r=function(e,t){const n=xo(e,!0,"fixed"===t),r=n.top+e.clientTop,o=n.left+e.clientLeft,s=F(e)?yo(e):Nn(1);return{width:e.clientWidth*s.x,height:e.clientHeight*s.y,x:o*s.x,y:r*s.y}}(t,n);else{const n=bo(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return tr(r)}function Co(e,t){const n=I(e);return!(n===t||!V(n)||k(n))&&("fixed"===q(n).position||Co(n,t))}function Ro(e,t){const n=t.get(e);if(n)return n;let r=s(e,[],!1).filter(e=>V(e)&&"body"!==T(e)),o=null;const i="fixed"===q(e).position;let a=i?I(e):e;for(;V(a)&&!k(a);){const t=q(a),n=H(a);n||"fixed"!==t.position||(o=null),(i?!n&&!o:!n&&"static"===t.position&&o&&("absolute"===o.position||"fixed"===o.position)||$(a)&&!n&&Co(e,a))?r=r.filter(e=>e!==a):o=t,a=I(a)}return t.set(e,r),r}function To(e,t,n){const r=F(t),o=R(t),s="fixed"===n,i=xo(e,!0,s,t);let a={scrollLeft:0,scrollTop:0};const l=Nn(0);function c(){l.x=wo(o)}if(r||!r&&!s)if(("body"!==T(t)||$(o))&&(a=v(t)),r){const e=xo(t,!0,s,t);l.x=e.x+t.clientLeft,l.y=e.y+t.clientTop}else o&&c();s&&!r&&o&&c();const u=!o||r||s?Nn(0):Eo(o,a);return{x:i.left+a.scrollLeft-l.x-u.x,y:i.top+a.scrollTop-l.y-u.y,width:i.width,height:i.height}}function Po(e){return"static"===q(e).position}function ko(e,t){if(!F(e)||"fixed"===q(e).position)return null;if(t)return t(e);let n=e.offsetParent;return R(e)===n&&(n=n.ownerDocument.body),n}function Oo(e,t){const n=U(e);if(Y(e))return n;if(!F(e)){let t=I(e);for(;t&&!k(t);){if(V(t)&&!Po(t))return t;t=I(t)}return n}let r=ko(e,t);for(;r&&B(r)&&Po(r);)r=ko(r,t);return r&&k(r)&&Po(r)&&!H(r)?n:r||p(e)||n}var Mo={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const s="fixed"===o,i=R(r),a=!!t&&Y(t.floating);if(r===i||a&&s)return n;let l={scrollLeft:0,scrollTop:0},c=Nn(1);const u=Nn(0),d=F(r);if((d||!d&&!s)&&(("body"!==T(r)||$(i))&&(l=v(r)),d)){const e=xo(r);c=yo(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}const f=!i||d||s?Nn(0):Eo(i,l);return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-l.scrollLeft*c.x+u.x+f.x,y:n.y*c.y-l.scrollTop*c.y+u.y+f.y}},getDocumentElement:R,getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const s=[..."clippingAncestors"===n?Y(t)?[]:Ro(t,this._c):[].concat(n),r],i=So(t,s[0],o);let a=i.top,l=i.right,c=i.bottom,u=i.left;for(let d=1;d<s.length;d++){const e=So(t,s[d],o);a=jn(e.top,a),l=Dn(e.right,l),c=Dn(e.bottom,c),u=jn(e.left,u)}return{width:l-u,height:c-a,x:u,y:a}},getOffsetParent:Oo,getElementRects:async function(e){const t=this.getOffsetParent||Oo,n=this.getDimensions,r=await n(e.floating);return{reference:To(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}},getClientRects:function(e){return Array.from(e.getClientRects())},getDimensions:function(e){const{width:t,height:n}=mo(e);return{width:t,height:n}},getScale:yo,isElement:V,isRTL:function(e){return"rtl"===q(e).direction}};function Io(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Ao(e,t,n,r){void 0===r&&(r={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:a="function"==typeof ResizeObserver,layoutShift:l="function"==typeof IntersectionObserver,animationFrame:c=!1}=r,u=go(e),d=o||i?[...u?s(u):[],...t?s(t):[]]:[];d.forEach(e=>{o&&e.addEventListener("scroll",n,{passive:!0}),i&&e.addEventListener("resize",n)});const f=u&&l?function(e,t){let n,r=null;const o=R(e);function s(){var e;clearTimeout(n),null==(e=r)||e.disconnect(),r=null}return function i(a,l){void 0===a&&(a=!1),void 0===l&&(l=1),s();const c=e.getBoundingClientRect(),{left:u,top:d,width:f,height:p}=c;if(a||t(),!f||!p)return;const h={rootMargin:-Ln(d)+"px "+-Ln(o.clientWidth-(u+f))+"px "+-Ln(o.clientHeight-(d+p))+"px "+-Ln(u)+"px",threshold:jn(0,Dn(1,l))||1};let m=!0;function g(t){const r=t[0].intersectionRatio;if(r!==l){if(!m)return i();r?i(!1,r):n=setTimeout(()=>{i(!1,1e-7)},1e3)}1!==r||Io(c,e.getBoundingClientRect())||i(),m=!1}try{r=new IntersectionObserver(g,{...h,root:o.ownerDocument})}catch(y){r=new IntersectionObserver(g,h)}r.observe(e)}(!0),s}(u,n):null;let p,h=-1,m=null;a&&(m=new ResizeObserver(e=>{let[r]=e;r&&r.target===u&&m&&t&&(m.unobserve(t),cancelAnimationFrame(h),h=requestAnimationFrame(()=>{var e;null==(e=m)||e.observe(t)})),n()}),u&&!c&&m.observe(u),t&&m.observe(t));let g=c?xo(e):null;return c&&function t(){const r=xo(e);g&&!Io(g,r)&&n();g=r,p=requestAnimationFrame(t)}(),n(),()=>{var e;d.forEach(e=>{o&&e.removeEventListener("scroll",n),i&&e.removeEventListener("resize",n)}),f?.(),null==(e=m)||e.disconnect(),m=null,c&&cancelAnimationFrame(p)}}var Do=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:s,placement:i,middlewareData:a}=t,l=await async function(e,t){const{placement:n,platform:r,elements:o}=e,s=await(null==r.isRTL?void 0:r.isRTL(o.floating)),i=qn(n),a=Vn(n),l="y"===Yn(n),c=ho.has(i)?-1:1,u=s&&l?-1:1,d=zn(t,e);let{mainAxis:f,crossAxis:p,alignmentAxis:h}="number"==typeof d?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return a&&"number"==typeof h&&(p="end"===a?-1*h:h),l?{x:p*u,y:f*c}:{x:f*c,y:p*u}}(t,e);return i===(null==(n=a.offset)?void 0:n.placement)&&null!=(r=a.arrow)&&r.alignmentOffset?{}:{x:o+l.x,y:s+l.y,data:{...l,placement:i}}}}},jo=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o,platform:s}=t,{mainAxis:i=!0,crossAxis:a=!1,limiter:l={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...c}=zn(e,t),u={x:n,y:r},d=await s.detectOverflow(t,c),f=Yn(qn(o)),p=$n(f);let h=u[p],m=u[f];if(i){const e="y"===p?"bottom":"right";h=Hn(h+d["y"===p?"top":"left"],h,h-d[e])}if(a){const e="y"===f?"bottom":"right";m=Hn(m+d["y"===f?"top":"left"],m,m-d[e])}const g=l.fn({...t,[p]:h,[f]:m});return{...g,data:{x:g.x-n,y:g.y-r,enabled:{[p]:i,[f]:a}}}}}},Fo=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:s,rects:i,initialPlacement:a,platform:l,elements:c}=t,{mainAxis:u=!0,crossAxis:d=!0,fallbackPlacements:f,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:h="none",flipAlignment:m=!0,...g}=zn(e,t);if(null!=(n=s.arrow)&&n.alignmentOffset)return{};const y=qn(o),v=Yn(a),b=qn(a)===a,x=await(null==l.isRTL?void 0:l.isRTL(c.floating)),w=f||(b||!m?[Zn(a)]:function(e){const t=Zn(e);return[Kn(e),t,Kn(t)]}(a)),E="none"!==h;!f&&E&&w.push(...Jn(a,m,h,x));const S=[a,...w],C=await l.detectOverflow(t,g),R=[];let T=(null==(r=s.flip)?void 0:r.overflows)||[];if(u&&R.push(C[y]),d){const e=function(e,t,n){void 0===n&&(n=!1);const r=Vn(e),o=Wn(e),s=Un(o);let i="x"===o?r===(n?"end":"start")?"right":"left":"start"===r?"bottom":"top";return t.reference[s]>t.floating[s]&&(i=Zn(i)),[i,Zn(i)]}(o,i,x);R.push(C[e[0]],C[e[1]])}if(T=[...T,{placement:o,overflows:R}],!R.every(e=>e<=0)){var P,k;const e=((null==(P=s.flip)?void 0:P.index)||0)+1,t=S[e];if(t&&("alignment"!==d||v===Yn(t)||T.every(e=>Yn(e.placement)!==v||e.overflows[0]>0)))return{data:{index:e,overflows:T},reset:{placement:t}};let n=null==(k=T.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0])?void 0:k.placement;if(!n)switch(p){case"bestFit":{var O;const e=null==(O=T.filter(e=>{if(E){const t=Yn(e.placement);return t===v||"y"===t}return!0}).map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0])?void 0:O[0];e&&(n=e);break}case"initialPlacement":n=a}if(o!==n)return{reset:{placement:n}}}return{}}}},Lo=function(e){return void 0===e&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:o,rects:s,platform:i,elements:a}=t,{apply:l=()=>{},...c}=zn(e,t),u=await i.detectOverflow(t,c),d=qn(o),f=Vn(o),p="y"===Yn(o),{width:h,height:m}=s.floating;let g,y;"top"===d||"bottom"===d?(g=d,y=f===(await(null==i.isRTL?void 0:i.isRTL(a.floating))?"start":"end")?"left":"right"):(y=d,g="end"===f?"top":"bottom");const v=m-u.top-u.bottom,b=h-u.left-u.right,x=Dn(m-u[g],v),w=Dn(h-u[y],b),E=!t.middlewareData.shift;let S=x,C=w;if(null!=(n=t.middlewareData.shift)&&n.enabled.x&&(C=b),null!=(r=t.middlewareData.shift)&&r.enabled.y&&(S=v),E&&!f){const e=jn(u.left,0),t=jn(u.right,0),n=jn(u.top,0),r=jn(u.bottom,0);p?C=h-2*(0!==e||0!==t?e+t:jn(u.left,u.right)):S=m-2*(0!==n||0!==r?n+r:jn(u.top,u.bottom))}await l({...t,availableWidth:C,availableHeight:S});const R=await i.getDimensions(a.floating);return h!==R.width||m!==R.height?{reset:{rects:!0}}:{}}}},No=function(e){return void 0===e&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n,platform:r}=t,{strategy:o="referenceHidden",...s}=zn(e,t);switch(o){case"referenceHidden":{const e=fo(await r.detectOverflow(t,{...s,elementContext:"reference"}),n.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:po(e)}}}case"escaped":{const e=fo(await r.detectOverflow(t,{...s,altBoundary:!0}),n.floating);return{data:{escapedOffsets:e,escaped:po(e)}}}default:return{}}}}},Bo=function(e){return void 0===e&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:o,rects:s,middlewareData:i}=t,{offset:a=0,mainAxis:l=!0,crossAxis:c=!0}=zn(e,t),u={x:n,y:r},d=Yn(o),f=$n(d);let p=u[f],h=u[d];const m=zn(a,t),g="number"==typeof m?{mainAxis:m,crossAxis:0}:{mainAxis:0,crossAxis:0,...m};if(l){const e="y"===f?"height":"width",t=s.reference[f]-s.floating[e]+g.mainAxis,n=s.reference[f]+s.reference[e]-g.mainAxis;p<t?p=t:p>n&&(p=n)}if(c){var y,v;const e="y"===f?"width":"height",t=ho.has(qn(o)),n=s.reference[d]-s.floating[e]+(t&&(null==(y=i.offset)?void 0:y[d])||0)+(t?0:g.crossAxis),r=s.reference[d]+s.reference[e]+(t?0:(null==(v=i.offset)?void 0:v[d])||0)-(t?g.crossAxis:0);h<n?h=n:h>r&&(h=r)}return{[f]:p,[d]:h}}}},Ho=(e,t,n)=>{const r=new Map,o={platform:Mo,...n},s={...o.platform,_c:r};return(async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:s=[],platform:i}=n,a=i.detectOverflow?i:{...i,detectOverflow:uo},l=await(null==i.isRTL?void 0:i.isRTL(t));let c=await i.getElementRects({reference:e,floating:t,strategy:o}),{x:u,y:d}=co(c,r,l),f=r,p=0;const h={};for(let m=0;m<s.length;m++){const n=s[m];if(!n)continue;const{name:g,fn:y}=n,{x:v,y:b,data:x,reset:w}=await y({x:u,y:d,initialPlacement:r,placement:f,strategy:o,middlewareData:h,rects:c,platform:a,elements:{reference:e,floating:t}});u=null!=v?v:u,d=null!=b?b:d,h[g]={...h[g],...x},w&&p<50&&(p++,"object"==typeof w&&(w.placement&&(f=w.placement),w.rects&&(c=!0===w.rects?await i.getElementRects({reference:e,floating:t,strategy:o}):w.rects),({x:u,y:d}=co(c,f,l))),m=-1)}return{x:u,y:d,placement:f,strategy:o,middlewareData:h}})(e,t,{...o,platform:s})},zo="undefined"!=typeof document?$e.useLayoutEffect:function(){};function qo(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if("function"==typeof e&&e.toString()===t.toString())return!0;let n,r,o;if(e&&t&&"object"==typeof e){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;0!==r--;)if(!qo(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;0!==r--;)if(!{}.hasOwnProperty.call(t,o[r]))return!1;for(r=n;0!==r--;){const n=o[r];if(("_owner"!==n||!e.$$typeof)&&!qo(e[n],t[n]))return!1}return!0}return e!=e&&t!=t}function Vo(e){return"undefined"==typeof window?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function $o(e,t){const n=Vo(e);return Math.round(t*n)/n}function Uo(e){const t=$e.useRef(e);return zo(()=>{t.current=e}),t}var Yo,Wo=(e,t)=>{const n=Do(e);return{name:n.name,fn:n.fn,options:[e,t]}},Ko=(e,t)=>{const n=No(e);return{name:n.name,fn:n.fn,options:[e,t]}},Xo=(e,t,n,r,o,s,...a)=>{if(a.length>0)throw new Error(i(1));let l;if(e&&t&&n&&r&&o&&s)l=(i,a,l,c)=>s(e(i,a,l,c),t(i,a,l,c),n(i,a,l,c),r(i,a,l,c),o(i,a,l,c),a,l,c);else if(e&&t&&n&&r&&o)l=(s,i,a,l)=>o(e(s,i,a,l),t(s,i,a,l),n(s,i,a,l),r(s,i,a,l),i,a,l);else if(e&&t&&n&&r)l=(o,s,i,a)=>r(e(o,s,i,a),t(o,s,i,a),n(o,s,i,a),s,i,a);else if(e&&t&&n)l=(r,o,s,i)=>n(e(r,o,s,i),t(r,o,s,i),o,s,i);else if(e&&t)l=(n,r,o,s)=>t(e(n,r,o,s),r,o,s);else{if(!e)throw new Error("Missing arguments");l=e}return l},_o=e(e=>{var t=n();var r="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},o=t.useState,s=t.useEffect,i=t.useLayoutEffect,a=t.useDebugValue;function l(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!r(e,n)}catch(o){return!0}}var c="undefined"==typeof window||void 0===window.document||void 0===window.document.createElement?function(e,t){return t()}:function(e,t){var n=t(),r=o({inst:{value:n,getSnapshot:t}}),c=r[0].inst,u=r[1];return i(function(){c.value=n,c.getSnapshot=t,l(c)&&u({inst:c})},[e,n,t]),s(function(){return l(c)&&u({inst:c}),e(function(){l(c)&&u({inst:c})})},[e]),a(n),n};e.useSyncExternalStore=void 0!==t.useSyncExternalStore?t.useSyncExternalStore:c}),Go=e((e,t)=>{t.exports=_o()}),Qo=e(e=>{var t=n(),r=Go();var o="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},s=r.useSyncExternalStore,i=t.useRef,a=t.useEffect,l=t.useMemo,c=t.useDebugValue;e.useSyncExternalStoreWithSelector=function(e,t,n,r,u){var d=i(null);if(null===d.current){var f={hasValue:!1,value:null};d.current=f}else f=d.current;d=l(function(){function e(e){if(!a){if(a=!0,s=e,e=r(e),void 0!==u&&f.hasValue){var t=f.value;if(u(t,e))return i=t}return i=e}if(t=i,o(s,e))return t;var n=r(e);return void 0!==u&&u(t,n)?(s=e,t):(s=e,i=n)}var s,i,a=!1,l=void 0===n?null:n;return[function(){return e(t())},null===l?void 0:function(){return e(l())}]},[t,n,r,u]);var p=s(e,d[0],d[1]);return a(function(){f.hasValue=!0,f.value=p},[p]),c(p),p}}),Jo=e((e,t)=>{t.exports=Qo()}),Zo=Go(),es=Jo(),ts=_(19)?function(e,t,n,r,o){const s=Dt;if(!s)return function(e,t,n,r,o){const s=$e.useCallback(()=>t(e.getSnapshot(),n,r,o),[e,t,n,r,o]);return(0,Zo.useSyncExternalStore)(e.subscribe,s,s)}(e,t,n,r,o);const i=s.syncIndex;let a;s.syncIndex+=1,s.didInitialize?(a=s.syncHooks[i],a.store===e&&a.selector===t&&Object.is(a.a1,n)&&Object.is(a.a2,r)&&Object.is(a.a3,o)||(a.store!==e&&(s.didChangeStore=!0),a.store=e,a.selector=t,a.a1=n,a.a2=r,a.a3=o,a.didChange=!0)):(a={store:e,selector:t,a1:n,a2:r,a3:o,value:t(e.getSnapshot(),n,r,o),didChange:!1},s.syncHooks.push(a));return a.value}:function(e,t,n,r,o){return(0,es.useSyncExternalStoreWithSelector)(e.subscribe,e.getSnapshot,e.getSnapshot,e=>t(e,n,r,o))};function ns(e,t,n,r,o){return ts(e,t,n,r,o)}Yo={before(e){e.syncIndex=0,e.didInitialize||(e.syncTick=1,e.syncHooks=[],e.didChangeStore=!0,e.getSnapshot=()=>{let t=!1;for(let n=0;n<e.syncHooks.length;n+=1){const r=e.syncHooks[n],o=r.selector(r.store.state,r.a1,r.a2,r.a3);!r.didChange&&Object.is(r.value,o)||(t=!0,r.value=o,r.didChange=!1)}return t&&(e.syncTick+=1),e.syncTick})},after(e){e.syncHooks.length>0&&(e.didChangeStore&&(e.didChangeStore=!1,e.subscribe=t=>{const n=new Set;for(const o of e.syncHooks)n.add(o.store);const r=[];for(const e of n)r.push(e.subscribe(t));return()=>{for(const e of r)e()}}),(0,Zo.useSyncExternalStore)(e.subscribe,e.getSnapshot,e.getSnapshot))}},At.push(Yo);var rs=class{constructor(e){this.state=e,this.listeners=new Set,this.updateTick=0}subscribe=e=>(this.listeners.add(e),()=>{this.listeners.delete(e)});getSnapshot=()=>this.state;setState(e){if(this.state===e)return;this.state=e,this.updateTick+=1;const t=this.updateTick;for(const n of this.listeners){if(t!==this.updateTick)return;n(e)}}update(e){for(const t in e)if(!Object.is(this.state[t],e[t]))return void this.setState({...this.state,...e})}set(e,t){Object.is(this.state[e],t)||this.setState({...this.state,[e]:t})}notifyAll(){const e={...this.state};this.setState(e)}use(e,t,n,r){return ns(this,e,t,n,r)}},os=class extends rs{constructor(e,t={},n){super(e),this.context=t,this.selectors=n}useSyncedValue(e,t){$e.useDebugValue(e),L(()=>{this.state[e]!==t&&this.set(e,t)},[e,t])}useSyncedValueWithCleanup(e,t){const n=this;L(()=>(n.state[e]!==t&&n.set(e,t),()=>{n.set(e,void 0)}),[n,e,t])}useSyncedValues(e){const t=this;L(()=>{t.update(e)},[t,...Object.values(e)])}useControlledProp(e,t){$e.useDebugValue(e);const n=void 0!==t;L(()=>{n&&!Object.is(this.state[e],t)&&super.setState({...this.state,[e]:t})},[e,t,n])}select(e,t,n,r){return(0,this.selectors[e])(this.state,t,n,r)}useState(e,t,n,r){return $e.useDebugValue(e),ns(this,this.selectors[e],t,n,r)}useContextCallback(e,t){$e.useDebugValue(e);const n=u(t??N);this.context[e]=n}useStateSetter(e){const t=$e.useRef(void 0);return void 0===t.current&&(t.current=t=>{this.set(e,t)}),t.current}observe(e,t){let n;n="function"==typeof e?e:this.selectors[e];let r=n(this.state);return t(r,r,this),this.subscribe(e=>{const o=n(e);if(!Object.is(r,o)){const e=r;r=o,t(o,e,this)}})}},ss={open:Xo(e=>e.open),transitionStatus:Xo(e=>e.transitionStatus),domReferenceElement:Xo(e=>e.domReferenceElement),referenceElement:Xo(e=>e.positionReference??e.referenceElement),floatingElement:Xo(e=>e.floatingElement),floatingId:Xo(e=>e.floatingId)},is=class extends os{constructor(e){const{syncOnly:t,nested:n,onOpenChange:r,triggerElements:o,...s}=e;super({...s,positionReference:s.referenceElement,domReferenceElement:s.referenceElement},{onOpenChange:r,dataRef:{current:{}},events:Xr(),nested:n,triggerElements:o},ss),this.syncOnly=t}syncOpenEvent=(e,t)=>{(!e||!this.state.open||null!=t&&on(t))&&(this.context.dataRef.current.openEvent=e?t:void 0)};dispatchOpenChange=(e,t)=>{this.syncOpenEvent(e,t.event);const n={open:e,reason:t.reason,nativeEvent:t.event,nested:this.context.nested,triggerElement:t.trigger};this.context.events.emit("openchange",n)};setOpen=(e,t)=>{this.syncOnly||this.dispatchOpenChange(e,t),this.context.onOpenChange?.(e,t)}};function as(e,t=!1,n=!1){const[r,o]=$e.useState(e&&t?"idle":void 0),[s,i]=$e.useState(e);return e&&!s&&(i(!0),o("starting")),e||!s||"ending"===r||n||o("ending"),e||s||"ending"!==r||o(void 0),L(()=>{if(!e&&s&&"ending"!==r&&n){const e=yn.request(()=>{o("ending")});return()=>{yn.cancel(e)}}},[e,s,r,n]),L(()=>{if(!e||t)return;const n=yn.request(()=>{o(void 0)});return()=>{yn.cancel(n)}},[t,e]),L(()=>{if(!e||!t)return;e&&s&&"idle"!==r&&o("starting");const n=yn.request(()=>{o("idle")});return()=>{yn.cancel(n)}},[t,e,s,r]),{mounted:s,setMounted:i,transitionStatus:r}}var ls=function(e){return e.startingStyle="data-starting-style",e.endingStyle="data-ending-style",e}({}),cs={[ls.startingStyle]:""},us={[ls.endingStyle]:""},ds={transitionStatus:e=>"starting"===e?cs:"ending"===e?us:null};function fs(e,t=!1,n=!0){const r=vn();return u((o,s=null)=>{r.cancel();const i=ro(e);if(null==i)return;const a=i,l=()=>{lt.flushSync(o)};if("function"!=typeof a.getAnimations||globalThis.BASE_UI_ANIMATIONS_DISABLED)o();else{if(t){const e=ls.startingStyle;if(!a.hasAttribute(e))return void r.request(c);const t=new MutationObserver(()=>{a.hasAttribute(e)||(t.disconnect(),c())});return t.observe(a,{attributes:!0,attributeFilter:[e]}),void s?.addEventListener("abort",()=>t.disconnect(),{once:!0})}r.request(c)}function c(){Promise.all(a.getAnimations().map(e=>e.finished)).then(()=>{s?.aborted||l()}).catch(()=>{if(n)return void(s?.aborted||l());const e=a.getAnimations();!s?.aborted&&e.length>0&&e.some(e=>e.pending||"finished"!==e.playState)&&c()})}})}function ps(e){const{enabled:t=!0,open:n,ref:r,onComplete:o}=e,s=u(o),i=fs(r,n,!1);$e.useEffect(()=>{if(!t)return;const e=new AbortController;return i(s,e.signal),()=>{e.abort()}},[t,n,s,i])}function hs(e,t){const n=$e.useRef(null),r=$e.useRef(null);return $e.useCallback(o=>{if(void 0!==e){if(null!==n.current){const e=n.current,o=r.current,s=t.context.triggerElements.getById(e);o&&s===o&&t.context.triggerElements.delete(e),n.current=null,r.current=null}null!==o&&(n.current=e,r.current=o,t.context.triggerElements.add(e,o))}},[t,e])}function ms(e,t,n,r){const o=n.useState("isMountedByTrigger",e),s=hs(e,n),i=u(t=>{if(s(t),!t||!n.select("open"))return;const o=n.select("activeTriggerId");o!==e?null==o&&n.update({activeTriggerId:e,activeTriggerElement:t,...r}):n.update({activeTriggerElement:t,...r})});return L(()=>{o&&n.update({activeTriggerElement:t.current,...r})},[o,n,t,...Object.values(r)]),{registerTrigger:i,isMountedByThisTrigger:o}}function gs(e){const t=e.useState("open");L(()=>{if(t&&!e.select("activeTriggerId")&&1===e.context.triggerElements.size){const t=e.context.triggerElements.entries().next();if(!t.done){const[n,r]=t.value;e.update({activeTriggerId:n,activeTriggerElement:r})}}},[t,e])}function ys(e,t,n){const{mounted:r,setMounted:o,transitionStatus:s}=as(e);t.useSyncedValues({mounted:r,transitionStatus:s});const i=u(()=>{o(!1),t.update({activeTriggerId:null,activeTriggerElement:null,mounted:!1}),n?.(),t.context.onOpenChangeComplete?.(!1)});return ps({enabled:!t.useState("preventUnmountingOnClose"),open:e,ref:t.context.popupRef,onComplete(){e||i()}}),{forceUnmount:i,transitionStatus:s}}var vs=class{constructor(){this.elementsSet=new Set,this.idMap=new Map}add(e,t){const n=this.idMap.get(e);n!==t&&(void 0!==n&&this.elementsSet.delete(n),this.elementsSet.add(t),this.idMap.set(e,t))}delete(e){const t=this.idMap.get(e);t&&(this.elementsSet.delete(t),this.idMap.delete(e))}hasElement(e){return this.elementsSet.has(e)}hasMatchingElement(e){for(const t of this.elementsSet)if(e(t))return!0;return!1}getById(e){return this.idMap.get(e)}entries(){return this.idMap.entries()}elements(){return this.elementsSet.values()}get size(){return this.idMap.size}};function bs(){return{open:!1,openProp:void 0,mounted:!1,transitionStatus:void 0,floatingRootContext:new is({open:!1,transitionStatus:void 0,floatingElement:null,referenceElement:null,triggerElements:new vs,floatingId:"",syncOnly:!1,nested:!1,onOpenChange:void 0}),preventUnmountingOnClose:!1,payload:void 0,activeTriggerId:null,activeTriggerElement:null,triggerIdProp:void 0,popupElement:null,positionerElement:null,activeTriggerProps:g,inactiveTriggerProps:g,popupProps:g}}var xs=Xo(e=>e.triggerIdProp??e.activeTriggerId),ws={open:Xo(e=>e.openProp??e.open),mounted:Xo(e=>e.mounted),transitionStatus:Xo(e=>e.transitionStatus),floatingRootContext:Xo(e=>e.floatingRootContext),preventUnmountingOnClose:Xo(e=>e.preventUnmountingOnClose),payload:Xo(e=>e.payload),activeTriggerId:xs,activeTriggerElement:Xo(e=>e.mounted?e.activeTriggerElement:null),isTriggerActive:Xo((e,t)=>void 0!==t&&xs(e)===t),isOpenedByTrigger:Xo((e,t)=>void 0!==t&&xs(e)===t&&e.open),isMountedByTrigger:Xo((e,t)=>void 0!==t&&xs(e)===t&&e.mounted),triggerProps:Xo((e,t)=>t?e.activeTriggerProps:e.inactiveTriggerProps),popupProps:Xo(e=>e.popupProps),popupElement:Xo(e=>e.popupElement),positionerElement:Xo(e=>e.positionerElement)};function Es(e={}){const{nodeId:t,externalTree:n}=e,r=function(e){const{open:t=!1,onOpenChange:n,elements:r={}}=e,o=a(),s=null!=Jr(),i=h(()=>new is({open:t,transitionStatus:void 0,onOpenChange:n,referenceElement:r.reference??null,floatingElement:r.floating??null,triggerElements:new vs,floatingId:o,syncOnly:!1,nested:s})).current;return L(()=>{const e={open:t,floatingId:o};void 0!==r.reference&&(e.referenceElement=r.reference,e.domReferenceElement=V(r.reference)?r.reference:null),void 0!==r.floating&&(e.floatingElement=r.floating),i.update(e)},[t,o,r.reference,r.floating,i]),i.context.onOpenChange=n,i.context.nested=s,i}(e),o=e.rootContext||r,s={reference:o.useState("referenceElement"),floating:o.useState("floatingElement"),domReference:o.useState("domReferenceElement")},[i,l]=$e.useState(null),c=$e.useRef(null),u=Zr(n);L(()=>{s.domReference&&(c.current=s.domReference)},[s.domReference]);const d=function(e){void 0===e&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:s,floating:i}={},transform:a=!0,whileElementsMounted:l,open:c}=e,[u,d]=$e.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[f,p]=$e.useState(r);qo(f,r)||p(r);const[h,m]=$e.useState(null),[g,y]=$e.useState(null),v=$e.useCallback(e=>{e!==E.current&&(E.current=e,m(e))},[]),b=$e.useCallback(e=>{e!==S.current&&(S.current=e,y(e))},[]),x=s||h,w=i||g,E=$e.useRef(null),S=$e.useRef(null),C=$e.useRef(u),R=null!=l,T=Uo(l),P=Uo(o),k=Uo(c),O=$e.useCallback(()=>{if(!E.current||!S.current)return;const e={placement:t,strategy:n,middleware:f};P.current&&(e.platform=P.current),Ho(E.current,S.current,e).then(e=>{const t={...e,isPositioned:!1!==k.current};M.current&&!qo(C.current,t)&&(C.current=t,lt.flushSync(()=>{d(t)}))})},[f,t,n,P,k]);zo(()=>{!1===c&&C.current.isPositioned&&(C.current.isPositioned=!1,d(e=>({...e,isPositioned:!1})))},[c]);const M=$e.useRef(!1);zo(()=>(M.current=!0,()=>{M.current=!1}),[]),zo(()=>{if(x&&(E.current=x),w&&(S.current=w),x&&w){if(T.current)return T.current(x,w,O);O()}},[x,w,O,T,R]);const I=$e.useMemo(()=>({reference:E,floating:S,setReference:v,setFloating:b}),[v,b]),A=$e.useMemo(()=>({reference:x,floating:w}),[x,w]),D=$e.useMemo(()=>{const e={position:n,left:0,top:0};if(!A.floating)return e;const t=$o(A.floating,u.x),r=$o(A.floating,u.y);return a?{...e,transform:"translate("+t+"px, "+r+"px)",...Vo(A.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:t,top:r}},[n,a,A.floating,u.x,u.y]);return $e.useMemo(()=>({...u,update:O,refs:I,elements:A,floatingStyles:D}),[u,O,I,A,D])}({...e,elements:{...s,...i&&{reference:i}}}),f=$e.useCallback(e=>{const t=V(e)?{getBoundingClientRect:()=>e.getBoundingClientRect(),getClientRects:()=>e.getClientRects(),contextElement:e}:e;l(t),d.refs.setReference(t)},[d.refs]),[p,m]=$e.useState(void 0),[g,y]=$e.useState(null);o.useSyncedValue("referenceElement",p??null);const v=V(p)?p:null;o.useSyncedValue("domReferenceElement",void 0===p?s.domReference:v),o.useSyncedValue("floatingElement",g);const b=$e.useCallback(e=>{(V(e)||null===e)&&(c.current=e,m(e)),(V(d.refs.reference.current)||null===d.refs.reference.current||null!==e&&!V(e))&&d.refs.setReference(e)},[d.refs,m]),x=$e.useCallback(e=>{y(e),d.refs.setFloating(e)},[d.refs]),w=$e.useMemo(()=>({...d.refs,setReference:b,setFloating:x,setPositionReference:f,domReference:c}),[d.refs,b,x,f]),E=$e.useMemo(()=>({...d.elements,domReference:s.domReference}),[d.elements,s.domReference]),S=o.useState("open"),C=o.useState("floatingId"),R=$e.useMemo(()=>({...d,dataRef:o.context.dataRef,open:S,onOpenChange:o.setOpen,events:o.context.events,floatingId:C,refs:w,elements:E,nodeId:t,rootStore:o}),[d,w,E,t,o,S,C]);return L(()=>{o.context.dataRef.current.floatingContext=R;const e=u?.nodesRef.current.find(e=>e.id===t);e&&(e.context=R)}),$e.useMemo(()=>({...d,context:R,refs:w,elements:E,rootStore:o}),[d,w,E,R,o])}function Ss(e){const{popupStore:t,treatPopupAsFloatingElement:n=!1,onOpenChange:r}=e,o=a(),s=null!=Jr(),i=t.useState("open"),l=t.useState("activeTriggerElement"),c=t.useState(n?"popupElement":"positionerElement"),u=t.context.triggerElements,d=h(()=>new is({open:i,transitionStatus:void 0,referenceElement:l,floatingElement:c,triggerElements:u,onOpenChange:r,floatingId:o,syncOnly:!0,nested:s})).current;return L(()=>{const e={open:i,floatingId:o,referenceElement:l,floatingElement:c};V(l)&&(e.domReferenceElement=l),d.state.positionReference===d.state.referenceElement&&(e.positionReference=l),d.update(e)},[i,o,l,c,d]),d.context.onOpenChange=r,d.context.nested=s,d}var Cs=Jt&≫function Rs(e,t={}){const n="rootStore"in e?e.rootStore:e,{events:r,dataRef:o}=n.context,{enabled:s=!0,delay:i}=t,a=$e.useRef(!1),l=$e.useRef(null),c=$t(),u=$e.useRef(!0);$e.useEffect(()=>{const e=n.select("domReferenceElement");if(!s)return;const t=U(e);return fn(dn(t,"blur",function(){const e=n.select("domReferenceElement");!n.select("open")&&F(e)&&e===E(S(e))&&(a.current=!0)}),Cs&&dn(t,"keydown",function(){u.current=!0},!0),Cs&&dn(t,"pointerdown",function(){u.current=!1},!0))},[n,s]),$e.useEffect(()=>{if(s)return r.on("openchange",e),()=>{r.off("openchange",e)};function e(e){if("trigger-press"===e.reason||"escape-key"===e.reason){const e=n.select("domReferenceElement");V(e)&&(l.current=e,a.current=!0)}}},[r,s,n]);const f=$e.useMemo(()=>({onMouseLeave(){a.current=!1,l.current=null},onFocus(e){const t=e.currentTarget;if(a.current){if(l.current===t)return;a.current=!1,l.current=null}const r=w(e.nativeEvent);if(V(r))if(Cs&&!e.relatedTarget){if(!u.current&&!On(r))return}else if(!function(e){if(!e||Zt)return!0;try{return e.matches(":focus-visible")}catch(t){return!0}}(r))return;const o=Pn(e.relatedTarget,n.context.triggerElements),{nativeEvent:s,currentTarget:d}=e,f="function"==typeof i?i():i;n.select("open")&&o||0===f||void 0===f?n.setOpen(!0,A(K,s,d)):c.start(f,()=>{a.current||n.setOpen(!0,A(K,s,d))})},onBlur(e){a.current=!1,l.current=null;const t=e.relatedTarget,r=e.nativeEvent,s=V(t)&&t.hasAttribute(Nr("focus-guard"))&&"outside"===t.getAttribute("data-type");c.start(0,()=>{const e=n.select("domReferenceElement"),i=E(S(e));(t||i!==e)&&(d(o.current.floatingContext?.refs.floating.current,i)||d(e,i)||s||Pn(t??i,n.context.triggerElements)||n.setOpen(!1,A(K,r)))})}}),[o,n,c,i]);return $e.useMemo(()=>s?{reference:f,trigger:f}:{},[s,f])}var Ts=class e{constructor(){this.pointerType=void 0,this.interactedInside=!1,this.handler=void 0,this.blockMouseMove=!0,this.performedPointerEventsMutation=!1,this.pointerEventsScopeElement=null,this.pointerEventsReferenceElement=null,this.pointerEventsFloatingElement=null,this.restTimeoutPending=!1,this.openChangeTimeout=new Vt,this.restTimeout=new Vt,this.handleCloseOptions=void 0}static create(){return new e}dispose=()=>{this.openChangeTimeout.clear(),this.restTimeout.clear()};disposeEffect=()=>this.dispose},Ps=new WeakMap;function ks(e){if(!e.performedPointerEventsMutation)return;const t=e.pointerEventsScopeElement;t&&Ps.get(t)===e&&(e.pointerEventsScopeElement?.style.removeProperty("pointer-events"),e.pointerEventsReferenceElement?.style.removeProperty("pointer-events"),e.pointerEventsFloatingElement?.style.removeProperty("pointer-events"),Ps.delete(t)),e.performedPointerEventsMutation=!1,e.pointerEventsScopeElement=null,e.pointerEventsReferenceElement=null,e.pointerEventsFloatingElement=null}function Os(e,t){const{scopeElement:n,referenceElement:r,floatingElement:o}=t,s=Ps.get(n);s&&s!==e&&ks(s),ks(e),e.performedPointerEventsMutation=!0,e.pointerEventsScopeElement=n,e.pointerEventsReferenceElement=r,e.pointerEventsFloatingElement=o,Ps.set(n,e),n.style.pointerEvents="none",r.style.pointerEvents="auto",o.style.pointerEvents="auto"}function Ms(e){const t=h(Ts.create).current,n=e.context.dataRef.current;return n.hoverInteractionState||(n.hoverInteractionState=t),qt(n.hoverInteractionState.disposeEffect),n.hoverInteractionState}function Is(e,t={}){const n="rootStore"in e?e.rootStore:e,r=n.useState("open"),o=n.useState("floatingElement"),s=n.useState("domReferenceElement"),{dataRef:i}=n.context,{enabled:a=!0,closeDelay:l=0,nodeId:c}=t,f=Ms(n),p=Zr(),h=Jr(),m=u(()=>ln(i.current.openEvent?.type,f.interactedInside)),g=u(()=>{const e=i.current.openEvent?.type;return e?.includes("mouse")&&"mousedown"!==e}),y=u(e=>Pn(e,n.context.triggerElements)),v=$e.useCallback(e=>{const t=sn(l,"close",f.pointerType),r=()=>{n.setOpen(!1,A(x,e)),p?.events.emit("floating.closed",e)};t?f.openChangeTimeout.start(t,r):(f.openChangeTimeout.clear(),r())},[l,n,f,p]),b=u(()=>{ks(f)}),E=u(e=>{const t=w(e);var n;(n=t,null!=n?.closest("button,a[href],[role=\"button\"],select,[tabindex]:not([tabindex=\"-1\"]),input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])"))?f.interactedInside=null!=t?.closest("[aria-haspopup]"):f.interactedInside=!1});L(()=>{r||(f.pointerType=void 0,f.restTimeoutPending=!1,f.interactedInside=!1,b())},[r,f,b]),$e.useEffect(()=>b,[b]),L(()=>{if(a&&r&&f.handleCloseOptions?.blockPointerEvents&&g()&&V(s)&&o){const e=s,t=o,n=S(o),r=p?.nodesRef.current.find(e=>e.id===h)?.context?.elements.floating;return r&&(r.style.pointerEvents=""),Os(f,{scopeElement:f.handleCloseOptions?.getScope?.()??f.pointerEventsScopeElement??r??e.closest("[data-rootownerid]")??n.body,referenceElement:e,floatingElement:t}),()=>{b()}}},[a,r,s,o,f,g,p,h,b]);const C=$t();$e.useEffect(()=>{if(!a)return;function e(t){!p||!h||Fr(p.nodesRef.current,h).length>0||C.start(0,()=>{p.events.off("floating.closed",e),n.setOpen(!1,A(x,t)),p.events.emit("floating.closed",t)})}const t=o;return fn(t&&dn(t,"mouseenter",function(){f.openChangeTimeout.clear(),C.clear(),p?.events.off("floating.closed",e),b()}),t&&dn(t,"mouseleave",function(t){if(p&&h&&Fr(p.nodesRef.current,h).length>0)return void p.events.on("floating.closed",e);if(y(t.relatedTarget))return;const n=i.current.floatingContext?.nodeId??c,r=t.relatedTarget;p&&n&&V(r)&&Fr(p.nodesRef.current,n,!1).some(e=>d(e.context?.elements.floating,r))||(f.handler?f.handler(t):(b(),m()||v(t)))}),t&&dn(t,"pointerdown",E,!0),()=>{p?.events.off("floating.closed",e)})},[a,o,n,i,c,m,y,v,b,E,f,p,h,C])}var As={current:null};function Ds(e,t={}){const n="rootStore"in e?e.rootStore:e,{dataRef:r,events:o}=n.context,{enabled:s=!0,delay:i=0,handleClose:a=null,mouseOnly:l=!1,restMs:c=0,move:f=!0,triggerElementRef:p=As,externalTree:h,isActiveTrigger:m=!0,getHandleCloseContext:g,isClosing:y}=t,v=Zr(h),b=Ms(n),E=$e.useRef(!1),C=pn(a),R=pn(i),T=pn(c),P=pn(s),k=pn(y);m&&(b.handleCloseOptions=C.current?.__options);const O=u(()=>ln(r.current.openEvent?.type,b.interactedInside)),M=u(e=>Pn(e,n.context.triggerElements)),I=u((e,t,r)=>{const o=n.context.triggerElements;if(o.hasElement(t))return!e||!d(e,t);if(!V(r))return!1;const s=r;return o.hasMatchingElement(e=>d(e,s))&&(!e||!d(e,s))}),D=u((e,t=!0)=>{const r=sn(R.current,"close",b.pointerType);r?b.openChangeTimeout.start(r,()=>{n.setOpen(!1,A(x,e)),v?.events.emit("floating.closed",e)}):t&&(b.openChangeTimeout.clear(),n.setOpen(!1,A(x,e)),v?.events.emit("floating.closed",e))}),j=u(()=>{b.handler&&(S(n.select("domReferenceElement")).removeEventListener("mousemove",b.handler),b.handler=void 0)}),F=u(()=>{ks(b)});return $e.useEffect(()=>j,[j]),$e.useEffect(()=>{if(s)return o.on("openchange",e),()=>{o.off("openchange",e)};function e(e){e.open?E.current=!1:(E.current=e.reason===x,j(),b.openChangeTimeout.clear(),b.restTimeout.clear(),b.blockMouseMove=!0,b.restTimeoutPending=!1)}},[s,o,b,j]),$e.useEffect(()=>{if(!s)return;const e=p.current??(m?n.select("domReferenceElement"):null);if(V(e))return f?fn(dn(e,"mousemove",t,{once:!0}),dn(e,"mouseenter",t),dn(e,"mouseleave",o)):fn(dn(e,"mouseenter",t),dn(e,"mouseleave",o));function t(e){if(b.openChangeTimeout.clear(),b.blockMouseMove=!1,l&&!rn(b.pointerType))return;const t=an(T.current),r=sn(R.current,"open",b.pointerType),o=w(e),s=e.currentTarget??null,i=n.select("domReferenceElement");let a=s;if(V(o)&&!n.context.triggerElements.hasElement(o))for(const l of n.context.triggerElements.elements())if(d(l,o)){a=l;break}V(s)&&V(i)&&!n.context.triggerElements.hasElement(s)&&d(s,i)&&(a=i);const c=null!=a&&I(i,a,o),u=n.select("open"),f=k.current?.()??"ending"===n.select("transitionStatus"),p=!u&&f&&E.current,h=!c&&V(a)&&V(i)&&d(i,a)&&p,m=t>0&&!r,g=!u||c;c&&(u||p)||h?n.setOpen(!0,A(x,e,a)):m||(r?b.openChangeTimeout.start(r,()=>{g&&n.setOpen(!0,A(x,e,a))}):g&&n.setOpen(!0,A(x,e,a)))}function o(e){if(O())return void F();j();const t=S(n.select("domReferenceElement"));b.restTimeout.clear(),b.restTimeoutPending=!1;const o=r.current.floatingContext??g?.();if(!M(e.relatedTarget)){if(C.current&&o){n.select("open")||b.openChangeTimeout.clear();const r=p.current;return b.handler=C.current({...o,tree:v,x:e.clientX,y:e.clientY,onClose(){F(),j(),P.current&&!O()&&r===n.select("domReferenceElement")&&D(e,!0)}}),t.addEventListener("mousemove",b.handler),void b.handler(e)}"touch"===b.pointerType&&d(n.select("floatingElement"),e.relatedTarget)||D(e)}}},[j,F,r,R,D,n,s,C,b,m,I,O,M,l,f,T,p,v,P,g,k]),$e.useMemo(()=>{if(s)return{onPointerDown:e,onPointerEnter:e,onMouseMove(e){const{nativeEvent:t}=e,r=e.currentTarget,o=n.select("domReferenceElement"),s=n.select("open"),i=I(o,r,e.target);if(l&&!rn(b.pointerType))return;if(s&&i&&b.handleCloseOptions?.blockPointerEvents){const e=n.select("floatingElement");e&&Os(b,{scopeElement:b.handleCloseOptions?.getScope?.()??r.ownerDocument.body,referenceElement:r,floatingElement:e})}const a=an(T.current);function c(){if(b.restTimeoutPending=!1,O())return;const e=n.select("open");b.blockMouseMove||e&&!i||n.setOpen(!0,A(x,t,r))}s&&!i||0===a||!i&&b.restTimeoutPending&&e.movementX**2+e.movementY**2<2||(b.restTimeout.clear(),"touch"===b.pointerType?lt.flushSync(()=>{c()}):i&&s?c():(b.restTimeoutPending=!0,b.restTimeout.start(a,c)))}};function e(e){b.pointerType=e.pointerType}},[s,b,O,I,l,n,T])}function js(e=[]){const t=e.map(e=>e?.reference),n=e.map(e=>e?.floating),r=e.map(e=>e?.item),o=e.map(e=>e?.trigger),s=$e.useCallback(t=>Fs(t,e,"reference"),t),i=$e.useCallback(t=>Fs(t,e,"floating"),n),a=$e.useCallback(t=>Fs(t,e,"item"),r),l=$e.useCallback(t=>Fs(t,e,"trigger"),o);return $e.useMemo(()=>({getReferenceProps:s,getFloatingProps:i,getItemProps:a,getTriggerProps:l}),[s,i,a,l])}function Fs(e,t,n){const r=new Map,o="item"===n,s={};"floating"===n&&(s.tabIndex=-1,s["data-base-ui-focusable"]="");for(const i in e)o&&e&&("active"===i||"selected"===i)||(s[i]=e[i]);for(let i=0;i<t.length;i+=1){let a;const l=t[i]?.[n];a="function"==typeof l?e?l(e):null:l,a&&Ls(s,a,o,r)}return Ls(s,e,o,r),s}function Ls(e,t,n,r){for(const o in t){const s=t[o];(!n||"active"!==o&&"selected"!==o)&&(o.startsWith("on")?(r.has(o)||r.set(o,[]),"function"==typeof s&&(r.get(o)?.push(s),e[o]=(...e)=>r.get(o)?.map(t=>t(...e)).find(e=>void 0!==e))):e[o]=s)}}var Ns=.1*.1,Bs=.5;function Hs(e,t,n,r,o,s){return r>=t!=s>=t&&e<=(o-n)*(t-r)/(s-r)+n}function zs(e,t,n,r,o,s,i,a,l,c){let u=!1;return Hs(e,t,n,r,o,s)&&(u=!u),Hs(e,t,o,s,i,a)&&(u=!u),Hs(e,t,i,a,l,c)&&(u=!u),Hs(e,t,l,c,n,r)&&(u=!u),u}function qs(e,t,n,r,o,s){return e>=Math.min(n,o)&&e<=Math.max(n,o)&&t>=Math.min(r,s)&&t<=Math.max(r,s)}function Vs(e={}){const{blockPointerEvents:t=!1}=e,n=new Vt,r=({x:e,y:t,placement:r,elements:o,onClose:s,nodeId:i,tree:a})=>{const l=r?.split("-")[0];let c=!1,u=null,f=null,p="undefined"!=typeof performance?performance.now():0;return function(r){n.clear();const h=o.domReference,m=o.floating;if(!h||!m||null==l||null==e||null==t)return;const{clientX:g,clientY:y}=r,v=w(r),b="mouseleave"===r.type,x=d(m,v),E=d(h,v);if(x&&(c=!0,!b))return;if(E&&(c=!1,!b))return void(c=!0);if(b&&V(r.relatedTarget)&&d(m,r.relatedTarget))return;function S(){return Boolean(a&&Fr(a.nodesRef.current,i).length>0)}function C(){S()||(n.clear(),s())}if(S())return;const R=h.getBoundingClientRect(),T=m.getBoundingClientRect(),P=e>T.right-T.width/2,k=t>T.bottom-T.height/2,O=T.width>R.width,M=T.height>R.height,I=(O?R:T).left,A=(O?R:T).right,D=(M?R:T).top,j=(M?R:T).bottom;if("top"===l&&t>=R.bottom-1||"bottom"===l&&t<=R.top+1||"left"===l&&e>=R.right-1||"right"===l&&e<=R.left+1)return void C();let F=!1;switch(l){case"top":F=qs(g,y,I,R.top+1,A,T.bottom-1);break;case"bottom":F=qs(g,y,I,T.top+1,A,R.bottom-1);break;case"left":F=qs(g,y,T.right-1,j,R.left+1,D);break;case"right":F=qs(g,y,R.right-1,j,T.left+1,D)}if(F)return;if(c&&!function(e,t,n){return e>=n.x&&e<=n.x+n.width&&t>=n.y&&t<=n.y+n.height}(g,y,R))return void C();if(!b&&function(e,t){const n=performance.now(),r=n-p;if(null===u||null===f||0===r)return u=e,f=t,p=n,!1;const o=e-u,s=t-f;return u=e,f=t,p=n,o*o+s*s<r*r*Ns}(g,y))return void C();let L=!1;switch(l){case"top":{const n=O?.25:2,r=O||P?e+n:e-n,o=O?e-n:P?e+n:e-n,s=t+Bs+1,i=P||O?T.bottom-Bs:T.top,a=P?O?T.bottom-Bs:T.top:T.bottom-Bs;L=zs(g,y,r,s,o,s,T.left,i,T.right,a);break}case"bottom":{const n=O?.25:2,r=O||P?e+n:e-n,o=O?e-n:P?e+n:e-n,s=t-Bs,i=P||O?T.top+Bs:T.bottom,a=P?O?T.top+Bs:T.bottom:T.top+Bs;L=zs(g,y,r,s,o,s,T.left,i,T.right,a);break}case"left":{const n=M?.25:2,r=M||k?t+n:t-n,o=M?t-n:k?t+n:t-n,s=e+Bs+1,i=k||M?T.right-Bs:T.left,a=k?M?T.right-Bs:T.left:T.right-Bs;L=zs(g,y,i,T.top,a,T.bottom,s,r,s,o);break}case"right":{const n=M?.25:2,r=M||k?t+n:t-n,o=M?t-n:k?t+n:t-n,s=e-Bs,i=k||M?T.left+Bs:T.right,a=k?M?T.left+Bs:T.right:T.left+Bs;L=zs(g,y,s,r,s,o,i,T.top,a,T.bottom);break}}L?c||n.start(40,C):C()}};return r.__options={...e,blockPointerEvents:t},r}var $s={...ws,disabled:Xo(e=>e.disabled),instantType:Xo(e=>e.instantType),isInstantPhase:Xo(e=>e.isInstantPhase),trackCursorAxis:Xo(e=>e.trackCursorAxis),disableHoverablePopup:Xo(e=>e.disableHoverablePopup),lastOpenChangeReason:Xo(e=>e.openChangeReason),closeOnClick:Xo(e=>e.closeOnClick),closeDelay:Xo(e=>e.closeDelay),hasViewport:Xo(e=>e.hasViewport)},Us=class e extends os{constructor(e){super({...{...bs(),disabled:!1,instantType:void 0,isInstantPhase:!1,trackCursorAxis:"none",disableHoverablePopup:!1,openChangeReason:null,closeOnClick:!0,closeDelay:0,hasViewport:!1},...e},{popupRef:$e.createRef(),onOpenChange:void 0,onOpenChangeComplete:void 0,triggerElements:new vs},$s)}setOpen=(e,t)=>{const n=t.reason,r=n===x,o=e&&"trigger-focus"===n,s=!e&&("trigger-press"===n||"escape-key"===n);if(t.preventUnmountOnClose=()=>{this.set("preventUnmountingOnClose",!0)},this.context.onOpenChange?.(e,t),t.isCanceled)return;this.state.floatingRootContext.dispatchOpenChange(e,t);const i=()=>{const r={open:e,openChangeReason:n};o?r.instantType="focus":s?r.instantType="dismiss":"trigger-hover"===n&&(r.instantType=void 0);const i=t.trigger?.id??null;(i||e)&&(r.activeTriggerId=i,r.activeTriggerElement=t.trigger??null),this.update(r)};r?lt.flushSync(i):i()};static useStore(t,n){const r=h(()=>new e(n)).current,o=t??r,s=Ss({popupStore:o,onOpenChange:o.setOpen});return o.state.floatingRootContext=s,o}};var Ys=jt(function(e){const{disabled:t=!1,defaultOpen:n=!1,open:r,disableHoverablePopup:o=!1,trackCursorAxis:s="none",actionsRef:i,onOpenChange:a,onOpenChangeComplete:l,handle:c,triggerId:u,defaultTriggerId:d=null,children:f}=e,p=Us.useStore(c?.store,{open:n,openProp:r,activeTriggerId:d,triggerIdProp:u});Nt(()=>{void 0===r&&!1===p.state.open&&!0===n&&p.update({open:!0,activeTriggerId:d})}),p.useControlledProp("openProp",r),p.useControlledProp("triggerIdProp",u),p.useContextCallback("onOpenChange",a),p.useContextCallback("onOpenChangeComplete",l);const h=p.useState("open"),m=!t&&h,g=p.useState("activeTriggerId"),y=p.useState("payload");p.useSyncedValues({trackCursorAxis:s,disableHoverablePopup:o}),L(()=>{h&&t&&p.setOpen(!1,A(j))},[h,t,p]),p.useSyncedValue("disabled",t),gs(p);const{forceUnmount:v,transitionStatus:b}=ys(m,p),x=p.select("floatingRootContext"),w=p.useState("isInstantPhase"),E=p.useState("instantType"),S=p.useState("lastOpenChangeReason"),C=$e.useRef(null);L(()=>{"ending"===b&&"none"===S||"ending"!==b&&w?("delay"!==E&&(C.current=E),p.set("instantType","delay")):null!==C.current&&(p.set("instantType",C.current),C.current=null)},[b,w,S,E,p]),L(()=>{m&&null==g&&p.set("payload",void 0)},[p,g,m]);const R=$e.useCallback(()=>{p.setOpen(!1,A(W))},[p]);$e.useImperativeHandle(i,()=>({unmount:v,close:R}),[v,R]);const{getReferenceProps:T,getFloatingProps:P,getTriggerProps:k}=js([lo(x,{enabled:!t,referencePress:()=>p.select("closeOnClick")}),so(x,{enabled:!t&&"none"!==s,axis:"none"===s?void 0:s})]),O=$e.useMemo(()=>T(),[T]),M=$e.useMemo(()=>k(),[k]),I=$e.useMemo(()=>P(),[P]);return p.useSyncedValues({activeTriggerProps:O,inactiveTriggerProps:M,popupProps:I}),(0,Ue.jsx)(Bt.Provider,{value:p,children:"function"==typeof f?f({payload:y}):f})}),Ws=function(e){return e.open="data-open",e.closed="data-closed",e[e.startingStyle=ls.startingStyle]="startingStyle",e[e.endingStyle=ls.endingStyle]="endingStyle",e.anchorHidden="data-anchor-hidden",e.side="data-side",e.align="data-align",e}({}),Ks=function(e){return e.popupOpen="data-popup-open",e.pressed="data-pressed",e}({}),Xs={[Ks.popupOpen]:""},_s={[Ks.popupOpen]:"",[Ks.pressed]:""},Gs={[Ws.open]:""},Qs={[Ws.closed]:""},Js={[Ws.anchorHidden]:""},Zs={open:e=>e?Xs:null},ei={open:e=>e?_s:null},ti={open:e=>e?Gs:Qs,anchorHidden:e=>e?Js:null},ni=$e.createContext(void 0);var ri=function(e){return e[e.popupOpen=Ks.popupOpen]="popupOpen",e.triggerDisabled="data-trigger-disabled",e}({}),oi=Ft(function(e,t){const{className:n,render:r,handle:o,payload:s,disabled:a,delay:l,closeOnClick:u=!0,closeDelay:d,id:p,style:h,...m}=e,g=Ht(!0),y=o?.store??g;if(!y)throw new Error(i(82));const v=c(p),b=y.useState("isTriggerActive",v),x=y.useState("isOpenedByTrigger",v),w=y.useState("floatingRootContext"),E=$e.useRef(null),S=l??600,C=d??0,{registerTrigger:R,isMountedByThisTrigger:T}=ms(v,E,y,{payload:s,closeOnClick:u,closeDelay:C}),P=$e.useContext(ni),{delayRef:k,isInstantPhase:O,hasProvider:M}=function(e,t={open:!1}){const n="rootStore"in e?e.rootStore:e,r=n.useState("floatingId"),{open:o}=t,{currentIdRef:s,delayRef:i,timeoutMs:a,initialDelayRef:l,currentContextRef:c,hasProvider:u,timeout:d}=$e.useContext(cn),[f,p]=$e.useState(!1);return L(()=>{function e(){p(!1),c.current?.setIsInstantPhase(!1),s.current=null,c.current=null,i.current=l.current}if(s.current&&!o&&s.current===r){if(p(!1),a){const t=r;return d.start(a,()=>{n.select("open")||s.current&&s.current!==t||e()}),()=>{d.clear()}}e()}},[o,r,s,i,a,l,c,d,n]),L(()=>{if(!o)return;const e=c.current,t=s.current;d.clear(),c.current={onOpenChange:n.setOpen,setIsInstantPhase:p},s.current=r,i.current={open:0,close:sn(l.current,"close")},null!==t&&t!==r?(p(!0),e?.setIsInstantPhase(!0),e?.onOpenChange(!1,A(X))):(p(!1),e?.setIsInstantPhase(!1))},[o,r,n,s,i,a,l,c,d]),L(()=>()=>{c.current=null},[c]),$e.useMemo(()=>({hasProvider:u,delayRef:i,isInstantPhase:f}),[u,i,f])}(w,{open:x});y.useSyncedValue("isInstantPhase",O);const I=y.useState("disabled"),D=a??I,j=y.useState("trackCursorAxis"),F=Ds(w,{enabled:!D,mouseOnly:!0,move:!1,handleClose:y.useState("disableHoverablePopup")||"both"===j?null:Vs(),restMs(){const e=P?.delay,t="object"==typeof k.current?k.current.open:void 0;let n=S;return M&&(n=0!==t?l??e??S:0),n},delay(){const e="object"==typeof k.current?k.current.close:void 0;let t=C;return null==d&&M&&(t=e),{close:t}},triggerElementRef:E,isActiveTrigger:b,isClosing:()=>"ending"===y.select("transitionStatus")}),N=Rs(w,{enabled:!D}).reference,B={open:x},H=y.useState("triggerProps",T);return f("button",e,{state:B,ref:[t,R,E],props:[F,N,H,{onPointerDown(){y.set("closeOnClick",u)},id:v,[ri.triggerDisabled]:D?"":void 0},m],stateAttributesMapping:Zs})}),si=$e.createContext(void 0);var ii=$e.forwardRef(function(e,t){const{children:n,container:r,className:o,render:s,style:i,...a}=e,{portalNode:l,portalSubtree:c}=Wr({container:r,ref:t,componentProps:e,elementProps:a});return c||l?(0,Ue.jsxs)($e.Fragment,{children:[c,l&<.createPortal(n,l)]}):null}),ai=$e.forwardRef(function(e,t){const{keepMounted:n=!1,...r}=e;return Ht().useState("mounted")||n?(0,Ue.jsx)(si.Provider,{value:n,children:(0,Ue.jsx)(ii,{ref:t,...r})}):null}),li=$e.createContext(void 0);function ci(){const e=$e.useContext(li);if(void 0===e)throw new Error(i(71));return e}var ui=$e.createContext(void 0);function di(){return $e.useContext(ui)?.direction??"ltr"}var fi=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:s,platform:i,elements:a,middlewareData:l}=t,{element:c,padding:u=0,offsetParent:d="real"}=zn(e,t)||{};if(null==c)return{};const f=er(u),p={x:n,y:r},h=Wn(o),m=Un(h),g=await i.getDimensions(c),y="y"===h,v=y?"top":"left",b=y?"bottom":"right",x=y?"clientHeight":"clientWidth",w=s.reference[m]+s.reference[h]-p[h]-s.floating[m],E=p[h]-s.reference[h],S="real"===d?await(i.getOffsetParent?.(c)):a.floating;let C=a.floating[x]||s.floating[m];C&&await(i.isElement?.(S))||(C=a.floating[x]||s.floating[m]);const R=w/2-E/2,T=C/2-g[m]/2-1,P=Math.min(f[v],T),k=Math.min(f[b],T),O=P,M=C-g[m]-k,I=C/2-g[m]/2+R,A=Hn(O,I,M),D=!l.arrow&&null!=Vn(o)&&I!==A&&s.reference[m]/2-(I<O?P:k)-g[m]/2<0,j=D?I<O?I-O:I-M:0;return{[h]:p[h]+j,data:{[h]:A,centerOffset:I-A-j,...D&&{alignmentOffset:j}},reset:D}}}),pi={name:"hide",async fn(e){const{width:t,height:n,x:r,y:o}=e.rects.reference,s=0===t&&0===n&&0===r&&0===o;return{data:{referenceHidden:(await Ko().fn(e)).data?.referenceHidden||s}}}},hi={sideX:"left",sideY:"top"},mi={name:"adaptiveOrigin",async fn(e){const{x:t,y:n,rects:{floating:r},elements:{floating:o},platform:s,strategy:i,placement:a}=e,l=U(o),c=l.getComputedStyle(o);if("0s"===c.transitionDuration||""===c.transitionDuration)return{x:t,y:n,data:hi};const u=await(s.getOffsetParent?.(o));let d={width:0,height:0};if("fixed"===i&&l?.visualViewport)d={width:l.visualViewport.width,height:l.visualViewport.height};else if(u===l){const e=S(o);d={width:e.documentElement.clientWidth,height:e.documentElement.clientHeight}}else await(s.isElement?.(u))&&(d=await s.getDimensions(u));const f=qn(a);let p=t,h=n;"left"===f&&(p=d.width-(t+r.width)),"top"===f&&(h=d.height-(n+r.height));return{x:p,y:h,data:{sideX:"left"===f?"right":hi.sideX,sideY:"top"===f?"bottom":hi.sideY}}}};function gi(e,t,n){const r="inline-start"===e||"inline-end"===e;return{top:"top",right:r?n?"inline-start":"inline-end":"right",bottom:"bottom",left:r?n?"inline-end":"inline-start":"left"}[t]}function yi(e,t,n){const{rects:r,placement:o}=e;return{side:gi(t,qn(o),n),align:Vn(o)||"center",anchor:{width:r.reference.width,height:r.reference.height},positioner:{width:r.floating.width,height:r.floating.height}}}function vi(e){const{anchor:t,positionMethod:n="absolute",side:r="bottom",sideOffset:o=0,align:s="center",alignOffset:i=0,collisionBoundary:a,collisionPadding:l=5,sticky:c=!1,arrowPadding:d=5,disableAnchorTracking:f=!1,keepMounted:p=!1,floatingRootContext:h,mounted:m,collisionAvoidance:g,shiftCrossAxis:y=!1,nodeId:v,adaptiveOrigin:b,lazyFlip:x=!1,externalTree:w}=e,[E,C]=$e.useState(null);m||null===E||C(null);const R=g.side||"flip",T=g.align||"flip",P=g.fallbackAxisSide||"end",k="function"==typeof t?t:void 0,O=u(k),M=k?O:t,I=pn(t),A=pn(m),D="rtl"===di(),j=E||{top:"top",right:"right",bottom:"bottom",left:"left","inline-end":D?"left":"right","inline-start":D?"right":"left"}[r],F="center"===s?j:`${j}-${s}`;let N=l;const B="bottom"===r?1:0,H="top"===r?1:0,z="right"===r?1:0,q="left"===r?1:0;"number"==typeof N?N={top:N+B,right:N+q,bottom:N+H,left:N+z}:N&&(N={top:(N.top||0)+B,right:(N.right||0)+q,bottom:(N.bottom||0)+H,left:(N.left||0)+z});const V={boundary:"clipping-ancestors"===a?"clippingAncestors":a,padding:N},$=$e.useRef(null),Y=pn(o),W=pn(i),K=[Wo(e=>{const t=yi(e,r,D),n="function"==typeof Y.current?Y.current(t):Y.current,o="function"==typeof W.current?W.current(t):W.current;return{mainAxis:n,crossAxis:o,alignmentAxis:o}},["function"!=typeof o?o:0,"function"!=typeof i?i:0,D,r])],X="none"===T&&"shift"!==R,_=!X&&(c||y||"shift"===R),G="none"===R?null:((e,t)=>{const n=Fo(e);return{name:n.name,fn:n.fn,options:[e,t]}})({...V,padding:{top:N.top+1,right:N.right+1,bottom:N.bottom+1,left:N.left+1},mainAxis:!y&&"flip"===R,crossAxis:"flip"===T&&"alignment",fallbackAxisSideDirection:P}),Q=X?null:((e,t)=>{const n=jo(e);return{name:n.name,fn:n.fn,options:[e,t]}})(e=>{const t=S(e.elements.floating).documentElement;return{...V,rootBoundary:y?{x:0,y:0,width:t.clientWidth,height:t.clientHeight}:void 0,mainAxis:"none"!==T,crossAxis:_,limiter:c||y?void 0:(n=e=>{if(!$.current)return{};const{width:t,height:n}=$.current.getBoundingClientRect(),r=Yn(qn(e.placement));return{offset:("y"===r?t:n)/2+("y"===r?N.left+N.right:N.top+N.bottom)/2}},{fn:Bo(n).fn,options:[n,r]})};var n,r},[V,c,y,N,T]);var J,Z;"shift"===R||"shift"===T||"center"===s?K.push(Q,G):K.push(G,Q),K.push(((e,t)=>{const n=Lo(e);return{name:n.name,fn:n.fn,options:[e,t]}})({...V,apply({elements:{floating:e},availableWidth:t,availableHeight:n,rects:r}){if(!A.current)return;const o=e.style;o.setProperty("--available-width",`${t}px`),o.setProperty("--available-height",`${n}px`);const s=U(e).devicePixelRatio||1,{x:i,y:a,width:l,height:c}=r.reference,u=(Math.round((i+l)*s)-Math.round(i*s))/s,d=(Math.round((a+c)*s)-Math.round(a*s))/s;o.setProperty("--anchor-width",`${u}px`),o.setProperty("--anchor-height",`${d}px`)}}),(Z=[d],{...fi(J=()=>({element:$.current||S($.current).createElement("div"),padding:d,offsetParent:"floating"})),options:[J,Z]}),{name:"transformOrigin",fn(e){const{elements:t,middlewareData:n,placement:s,rects:i,y:a}=e,l=qn(s),c=Yn(l),u=$.current,d=n.arrow?.x||0,f=n.arrow?.y||0,p=d+(u?.clientWidth||0)/2,h=f+(u?.clientHeight||0)/2,m=Math.abs(n.shift?.y||0),g=i.reference.height/2,y="function"==typeof o?o(yi(e,r,D)):o,v=m>y,b={top:`${p}px calc(100% + ${y}px)`,bottom:`${p}px ${-y}px`,left:`calc(100% + ${y}px) ${h}px`,right:`${-y}px ${h}px`}[l],x=`${p}px ${i.reference.y+g-a}px`;return t.floating.style.setProperty("--transform-origin",_&&"y"===c&&v?x:b),{}}},pi,b),L(()=>{!m&&h&&h.update({referenceElement:null,floatingElement:null,domReferenceElement:null,positionReference:null})},[m,h]);const ee=$e.useMemo(()=>({elementResize:!f&&"undefined"!=typeof ResizeObserver,layoutShift:!f&&"undefined"!=typeof IntersectionObserver}),[f]),{refs:te,elements:ne,x:re,y:oe,middlewareData:se,update:ie,placement:ae,context:le,isPositioned:ce,floatingStyles:ue}=Es({rootContext:h,open:p?m:void 0,placement:F,middleware:K,strategy:n,whileElementsMounted:p?void 0:(...e)=>Ao(...e,ee),nodeId:v,externalTree:w}),{sideX:de,sideY:fe}=se.adaptiveOrigin||hi,pe=ce?n:"fixed",he=$e.useMemo(()=>{const e=b?{position:pe,[de]:re,[fe]:oe}:{position:pe,...ue};return ce||(e.opacity=0),e},[b,pe,de,re,fe,oe,ue,ce]),me=$e.useRef(null);L(()=>{if(!m)return;const e=I.current,t="function"==typeof e?e():e,n=(bi(t)?t.current:t)||null;n!==me.current&&(te.setPositionReference(n),me.current=n)},[m,te,M,I]),$e.useEffect(()=>{if(!m)return;const e=I.current;"function"!=typeof e&&bi(e)&&e.current!==me.current&&(te.setPositionReference(e.current),me.current=e.current)},[m,te,M,I]),$e.useEffect(()=>{if(p&&m&&ne.domReference&&ne.floating)return Ao(ne.domReference,ne.floating,ie,ee)},[p,m,ne,ie,ee]);const ge=qn(ae),ye=gi(r,ge,D),ve=Vn(ae)||"center",be=Boolean(se.hide?.referenceHidden);L(()=>{x&&m&&ce&&C(ge)},[x,m,ce,ge]);const xe=$e.useMemo(()=>({position:"absolute",top:se.arrow?.y,left:se.arrow?.x}),[se.arrow]),we=0!==se.arrow?.centerOffset;return $e.useMemo(()=>({positionerStyles:he,arrowStyles:xe,arrowRef:$,arrowUncentered:we,side:ye,align:ve,physicalSide:ge,anchorHidden:be,refs:te,context:le,isPositioned:ce,update:ie}),[he,xe,$,we,ye,ve,ge,be,te,le,ce,ie])}function bi(e){return null!=e&&"current"in e}function xi(e){return"starting"===e?Br:g}function wi(e,t,{styles:n,transitionStatus:r,props:o,refs:s,hidden:i,inert:a=!1}){const l={...n};return a&&(l.pointerEvents="none"),f("div",e,{state:t,ref:s,props:[{role:"presentation",hidden:i,style:l},xi(r),o],stateAttributesMapping:ti})}var Ei=$e.forwardRef(function(e,t){const{render:n,className:r,anchor:o,positionMethod:s="absolute",side:a="top",align:l="center",sideOffset:c=0,alignOffset:u=0,collisionBoundary:d="clipping-ancestors",collisionPadding:f=5,arrowPadding:p=5,sticky:h=!1,disableAnchorTracking:m=!1,collisionAvoidance:g=qr,style:y,...v}=e,b=Ht(),x=function(){const e=$e.useContext(si);if(void 0===e)throw new Error(i(70));return e}(),w=b.useState("open"),E=b.useState("mounted"),S=b.useState("trackCursorAxis"),C=b.useState("disableHoverablePopup"),R=b.useState("floatingRootContext"),T=b.useState("instantType"),P=b.useState("transitionStatus"),k=vi({anchor:o,positionMethod:s,floatingRootContext:R,mounted:E,side:a,sideOffset:c,align:l,alignOffset:u,collisionBoundary:d,collisionPadding:f,sticky:h,arrowPadding:p,disableAnchorTracking:m,keepMounted:x,collisionAvoidance:g,adaptiveOrigin:b.useState("hasViewport")?mi:void 0}),O=wi(e,$e.useMemo(()=>({open:w,side:k.side,align:k.align,anchorHidden:k.anchorHidden,instant:"none"!==S?"tracking-cursor":T}),[w,k.side,k.align,k.anchorHidden,S,T]),{styles:k.positionerStyles,transitionStatus:P,props:v,refs:[t,b.useStateSetter("positionerElement")],hidden:!E,inert:!w||"both"===S||C});return(0,Ue.jsx)(li.Provider,{value:k,children:O})}),Si={...ti,...ds},Ci=$e.forwardRef(function(e,t){const{className:n,render:r,style:o,...s}=e,i=Ht(),{side:a,align:l}=ci(),c=i.useState("open"),u=i.useState("instantType"),d=i.useState("transitionStatus"),p=i.useState("popupProps"),h=i.useState("floatingRootContext");ps({open:c,ref:i.context.popupRef,onComplete(){c&&i.context.onOpenChangeComplete?.(!0)}});return Is(h,{enabled:!i.useState("disabled"),closeDelay:i.useState("closeDelay")}),f("div",e,{state:{open:c,side:a,align:l,instant:u,transitionStatus:d},ref:[t,i.context.popupRef,i.useStateSetter("popupElement")],props:[p,xi(d),s],stateAttributesMapping:Si})}),Ri=$e.forwardRef(function(e,t){const{className:n,render:r,style:o,...s}=e,i=Ht(),a=i.useState("open"),l=i.useState("instantType"),{arrowRef:c,side:u,align:d,arrowUncentered:p,arrowStyles:h}=ci();return f("div",e,{state:{open:a,side:u,align:d,uncentered:p,instant:l},ref:[t,c],props:[{style:h,"aria-hidden":!0},s],stateAttributesMapping:ti})}),Ti=function(e){const{delay:t,closeDelay:n,timeout:r=400}=e,o=$e.useMemo(()=>({delay:t,closeDelay:n}),[t,n]),s=$e.useMemo(()=>({open:t,close:n}),[t,n]);return(0,Ue.jsx)(ni.Provider,{value:o,children:(0,Ue.jsx)(un,{delay:s,timeoutMs:r,children:e.children})})};function Pi({delay:e=0,...t}){return(0,Ue.jsx)(Ti,{"data-slot":"tooltip-provider",delay:e,...t})}function ki({...e}){return(0,Ue.jsx)(Ys,{"data-slot":"tooltip",...e})}function Oi({...e}){return(0,Ue.jsx)(oi,{"data-slot":"tooltip-trigger",...e})}function Mi({className:e,side:t="top",sideOffset:n=4,align:r="center",alignOffset:o=0,children:s,...i}){return(0,Ue.jsx)(ai,{children:(0,Ue.jsx)(Ei,{align:r,alignOffset:o,side:t,sideOffset:n,className:"isolate z-50",children:(0,Ue.jsxs)(Ci,{"data-slot":"tooltip-content",className:m("z-50 inline-flex w-fit max-w-xs origin-(--transform-origin) items-center gap-1.5 rounded-md bg-foreground px-3 py-1.5 text-xs text-background has-data-[slot=kbd]:pr-1.5 data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 **:data-[slot=kbd]:relative **:data-[slot=kbd]:isolate **:data-[slot=kbd]:z-50 **:data-[slot=kbd]:rounded-sm data-[state=delayed-open]:animate-in data-[state=delayed-open]:fade-in-0 data-[state=delayed-open]:zoom-in-95 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",e),...i,children:[s,(0,Ue.jsx)(Ri,{className:"z-50 size-2.5 translate-y-[calc(-50%-2px)] rotate-45 rounded-[2px] bg-foreground fill-foreground data-[side=bottom]:top-1 data-[side=inline-end]:top-1/2! data-[side=inline-end]:-left-1 data-[side=inline-end]:-translate-y-1/2 data-[side=inline-start]:top-1/2! data-[side=inline-start]:-right-1 data-[side=inline-start]:-translate-y-1/2 data-[side=left]:top-1/2! data-[side=left]:-right-1 data-[side=left]:-translate-y-1/2 data-[side=right]:top-1/2! data-[side=right]:-left-1 data-[side=right]:-translate-y-1/2 data-[side=top]:-bottom-2.5"})]})})})}var Ii="xedoc";function Ai(e){const t=function(e){const t=e?.replace(/\s+/g," ").trim();return t?`${t} - ${Ii}`:Ii}(e);(0,$e.useEffect)(()=>{if("undefined"!=typeof document)return document.title=t,()=>{document.title=Ii}},[t])}export{Or as $,qe as $t,fs as A,on as At,Jr as B,qt as Bt,ws as C,Z as Cn,xn as Ct,ms as D,pn as Dt,ys as E,vn as Et,lo as F,_t as Ft,Hr as G,Mt as Gt,_r as H,jt as Ht,ro as I,Jt as It,Nr as J,xt as Jt,zr as K,Ot as Kt,to as L,Xt as Lt,as as M,tn as Mt,os as N,nn as Nt,hs as O,fn as Ot,Xo as P,en as Pt,kr as Q,We as Qt,no as R,Vt as Rt,bs as S,oe as Sn,En as St,gs as T,G as Tn,yn as Tt,Kr as U,Ft as Ut,Zr as V,Nt as Vt,Ur as W,It as Wt,Fr as X,et as Xt,Lr as Y,tt as Yt,Rr as Z,Ke as Zt,js as _,ie as _n,On as _t,Pi as a,Re as an,lr as at,Rs as b,Se as bn,Cn as bt,xi as c,ue as cn,ur as ct,di as d,le as dn,or as dt,Ve as en,Ir as et,Ws as f,ae as fn,fr as ft,Vs as g,pe as gn,Mn as gt,Zs as h,ve as hn,In as ht,Mi as i,Pe as in,Tr as it,ds as j,rn as jt,ps as k,dn as kt,vi as l,ce as ln,ar as lt,ei as m,de as mn,dr as mt,Ai as n,Be as nn,Dr as nt,Oi as o,Ce as on,ir as ot,ti as p,te as pn,rr as pt,qr as q,kt as qt,ki as r,ke as rn,Cr as rt,wi as s,ne as sn,cr as st,Ii as t,Ne as tn,Ar as tt,mi as u,re as un,sr as ut,Ds as v,se as vn,Tn as vt,vs as w,Q as wn,wn as wt,Ss as x,we as xn,Rn as xt,Is as y,he as yn,Sn as yt,eo as z,$t as zt};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as r,t as s}from"./jsx-runtime-Cal6WBdn.js";import{r as t}from"./app-shell-iKMZyGQn.js";var a=s(),o=r(function(){return(0,a.jsx)(t,{})});export{o as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
window.__reactRouterManifest={"entry":{"module":"/assets/entry.client-BQZeV9JD.js","imports":["/assets/jsx-runtime-Cal6WBdn.js","/assets/react-dom-D4MOkHq2.js"],"css":[]},"routes":{"root":{"id":"root","path":"","hasAction":false,"hasLoader":false,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasDefaultExport":true,"hasErrorBoundary":true,"module":"/assets/root-B6ikjQMc.js","imports":["/assets/jsx-runtime-Cal6WBdn.js","/assets/react-dom-D4MOkHq2.js","/assets/document-title-C2ykzN2o.js","/assets/session-provider-LuURNNCq.js"],"css":["/assets/root-KOlmIkbz.css"]},"routes/connect":{"id":"routes/connect","parentId":"root","path":"connect","hasAction":false,"hasLoader":false,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasDefaultExport":true,"hasErrorBoundary":false,"module":"/assets/connect-C_Nz7Dlc.js","imports":["/assets/jsx-runtime-Cal6WBdn.js","/assets/label-3ZcIm6vU.js","/assets/session-provider-LuURNNCq.js"],"css":[]},"routes/favicon.ico":{"id":"routes/favicon.ico","parentId":"root","path":"favicon.ico","hasAction":false,"hasLoader":true,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasDefaultExport":false,"hasErrorBoundary":false,"module":"/assets/favicon.ico-BGeA4faG.js","imports":[],"css":[]},"routes/app-layout":{"id":"routes/app-layout","parentId":"root","hasAction":false,"hasLoader":false,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasDefaultExport":true,"hasErrorBoundary":false,"module":"/assets/app-layout-VeZzc2bX.js","imports":["/assets/jsx-runtime-Cal6WBdn.js","/assets/app-shell-iKMZyGQn.js","/assets/label-3ZcIm6vU.js","/assets/document-title-C2ykzN2o.js","/assets/session-provider-LuURNNCq.js","/assets/react-dom-D4MOkHq2.js"],"css":["/assets/app-shell-DdKuH37F.css"]},"routes/home":{"id":"routes/home","parentId":"routes/app-layout","index":true,"hasAction":false,"hasLoader":false,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasDefaultExport":true,"hasErrorBoundary":false,"module":"/assets/home-BynJN9xe.js","imports":["/assets/jsx-runtime-Cal6WBdn.js","/assets/app-shell-iKMZyGQn.js","/assets/label-3ZcIm6vU.js","/assets/document-title-C2ykzN2o.js","/assets/session-provider-LuURNNCq.js","/assets/react-dom-D4MOkHq2.js"],"css":["/assets/app-shell-DdKuH37F.css"]},"routes/chat":{"id":"routes/chat","parentId":"routes/app-layout","path":"chat/:chatId","hasAction":false,"hasLoader":false,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasDefaultExport":true,"hasErrorBoundary":false,"module":"/assets/chat-lT5RuwNC.js","imports":["/assets/jsx-runtime-Cal6WBdn.js","/assets/app-shell-iKMZyGQn.js","/assets/label-3ZcIm6vU.js","/assets/document-title-C2ykzN2o.js","/assets/session-provider-LuURNNCq.js","/assets/react-dom-D4MOkHq2.js"],"css":["/assets/app-shell-DdKuH37F.css"]},"routes/health":{"id":"routes/health","parentId":"root","path":"health","hasAction":false,"hasLoader":true,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasDefaultExport":false,"hasErrorBoundary":false,"module":"/assets/health-OjIoaxn7.js","imports":[],"css":[]},"routes/api.auth.status":{"id":"routes/api.auth.status","parentId":"root","path":"api/auth/status","hasAction":false,"hasLoader":true,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasDefaultExport":false,"hasErrorBoundary":false,"module":"/assets/api.auth.status-FGYJfLVM.js","imports":[],"css":[]},"routes/api.auth.exchange":{"id":"routes/api.auth.exchange","parentId":"root","path":"api/auth/exchange","hasAction":true,"hasLoader":false,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasDefaultExport":false,"hasErrorBoundary":false,"module":"/assets/api.auth.exchange-CkPWDiGV.js","imports":[],"css":[]},"routes/api.auth.session":{"id":"routes/api.auth.session","parentId":"root","path":"api/auth/session","hasAction":false,"hasLoader":true,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasDefaultExport":false,"hasErrorBoundary":false,"module":"/assets/api.auth.session-DOeXMy_2.js","imports":[],"css":[]},"routes/api.accounts":{"id":"routes/api.accounts","parentId":"root","path":"api/accounts","hasAction":true,"hasLoader":true,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasDefaultExport":false,"hasErrorBoundary":false,"module":"/assets/api.accounts-x_2c5-qG.js","imports":[],"css":[]},"routes/api.accounts.export":{"id":"routes/api.accounts.export","parentId":"root","path":"api/accounts/export","hasAction":false,"hasLoader":true,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasDefaultExport":false,"hasErrorBoundary":false,"module":"/assets/api.accounts.export-CwjXUcyG.js","imports":[],"css":[]},"routes/api.accounts.import":{"id":"routes/api.accounts.import","parentId":"root","path":"api/accounts/import","hasAction":true,"hasLoader":false,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasDefaultExport":false,"hasErrorBoundary":false,"module":"/assets/api.accounts.import-Km-76sRE.js","imports":[],"css":[]},"routes/api.accounts.$accountId":{"id":"routes/api.accounts.$accountId","parentId":"root","path":"api/accounts/:accountId","hasAction":true,"hasLoader":true,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasDefaultExport":false,"hasErrorBoundary":false,"module":"/assets/api.accounts._accountId-BksU0sQ7.js","imports":[],"css":[]},"routes/api.accounts.$accountId.runtime-settings":{"id":"routes/api.accounts.$accountId.runtime-settings","parentId":"root","path":"api/accounts/:accountId/runtime-settings","hasAction":true,"hasLoader":false,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasDefaultExport":false,"hasErrorBoundary":false,"module":"/assets/api.accounts._accountId.runtime-settings-ChGZGvfx.js","imports":[],"css":[]},"routes/api.accounts.$accountId.models":{"id":"routes/api.accounts.$accountId.models","parentId":"root","path":"api/accounts/:accountId/models","hasAction":false,"hasLoader":true,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasDefaultExport":false,"hasErrorBoundary":false,"module":"/assets/api.accounts._accountId.models-DGbCmT_9.js","imports":[],"css":[]},"routes/api.accounts.$accountId.rate-limits":{"id":"routes/api.accounts.$accountId.rate-limits","parentId":"root","path":"api/accounts/:accountId/rate-limits","hasAction":false,"hasLoader":true,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasDefaultExport":false,"hasErrorBoundary":false,"module":"/assets/api.accounts._accountId.rate-limits-DZh4HPLO.js","imports":[],"css":[]},"routes/api.accounts.$accountId.authenticate":{"id":"routes/api.accounts.$accountId.authenticate","parentId":"root","path":"api/accounts/:accountId/authenticate","hasAction":true,"hasLoader":false,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasDefaultExport":false,"hasErrorBoundary":false,"module":"/assets/api.accounts._accountId.authenticate-Bp51NHGy.js","imports":[],"css":[]},"routes/api.accounts.$accountId.authenticate.callback":{"id":"routes/api.accounts.$accountId.authenticate.callback","parentId":"root","path":"api/accounts/:accountId/authenticate/callback","hasAction":true,"hasLoader":false,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasDefaultExport":false,"hasErrorBoundary":false,"module":"/assets/api.accounts._accountId.authenticate.callback-DLgNMRyd.js","imports":[],"css":[]},"routes/api.chats":{"id":"routes/api.chats","parentId":"root","path":"api/chats","hasAction":true,"hasLoader":true,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasDefaultExport":false,"hasErrorBoundary":false,"module":"/assets/api.chats-DZ_6Q7rY.js","imports":[],"css":[]},"routes/api.chats.$chatId":{"id":"routes/api.chats.$chatId","parentId":"root","path":"api/chats/:chatId","hasAction":true,"hasLoader":true,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasDefaultExport":false,"hasErrorBoundary":false,"module":"/assets/api.chats._chatId-BEX87qHo.js","imports":[],"css":[]},"routes/api.chats.$chatId.context":{"id":"routes/api.chats.$chatId.context","parentId":"root","path":"api/chats/:chatId/context","hasAction":false,"hasLoader":true,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasDefaultExport":false,"hasErrorBoundary":false,"module":"/assets/api.chats._chatId.context-v4G0lNKq.js","imports":[],"css":[]},"routes/api.chats.$chatId.files":{"id":"routes/api.chats.$chatId.files","parentId":"root","path":"api/chats/:chatId/files","hasAction":false,"hasLoader":true,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasDefaultExport":false,"hasErrorBoundary":false,"module":"/assets/api.chats._chatId.files-BrN7O-wM.js","imports":[],"css":[]},"routes/api.chats.$chatId.git.$operation":{"id":"routes/api.chats.$chatId.git.$operation","parentId":"root","path":"api/chats/:chatId/git/:operation","hasAction":true,"hasLoader":true,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasDefaultExport":false,"hasErrorBoundary":false,"module":"/assets/api.chats._chatId.git._operation-CiUW8Knm.js","imports":[],"css":[]},"routes/api.chats.$chatId.messages":{"id":"routes/api.chats.$chatId.messages","parentId":"root","path":"api/chats/:chatId/messages","hasAction":true,"hasLoader":true,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasDefaultExport":false,"hasErrorBoundary":false,"module":"/assets/api.chats._chatId.messages-cDawTuvN.js","imports":[],"css":[]},"routes/api.chats.$chatId.interrupt":{"id":"routes/api.chats.$chatId.interrupt","parentId":"root","path":"api/chats/:chatId/interrupt","hasAction":true,"hasLoader":false,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasDefaultExport":false,"hasErrorBoundary":false,"module":"/assets/api.chats._chatId.interrupt-2DlVPDlX.js","imports":[],"css":[]},"routes/api.chats.$chatId.server-requests.$requestId.respond":{"id":"routes/api.chats.$chatId.server-requests.$requestId.respond","parentId":"root","path":"api/chats/:chatId/server-requests/:requestId/respond","hasAction":true,"hasLoader":false,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasDefaultExport":false,"hasErrorBoundary":false,"module":"/assets/api.chats._chatId.server-requests._requestId.respond-CTlCffOk.js","imports":[],"css":[]},"routes/api.workspaces.directories":{"id":"routes/api.workspaces.directories","parentId":"root","path":"api/workspaces/directories","hasAction":true,"hasLoader":true,"hasClientAction":false,"hasClientLoader":false,"hasClientMiddleware":false,"hasDefaultExport":false,"hasErrorBoundary":false,"module":"/assets/api.workspaces.directories-nVoleT74.js","imports":[],"css":[]}},"url":"/assets/manifest-a5a0eaab.js","version":"a5a0eaab"};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{C as e,L as t,M as s,P as i,a,c as r,d as n,f as u,i as o,j as h,t as c}from"./jsx-runtime-Cal6WBdn.js";import{$t as l,Gt as d,Kt as f,Tn as y,Wt as m,Xt as p,Yt as g,Zt as q,a as b,cn as v,dn as x,fn as O,in as C,ln as Q,mn as j,pn as w,qt as D,rn as A,sn as M,t as P,tn as K,vn as E,wn as H,xn as N}from"./document-title-C2ykzN2o.js";import{Nt as F,Pt as S,t as k}from"./session-provider-LuURNNCq.js";var I=class extends y{constructor(e={}){super(),this.config=e,this.#e=new Set,this.#t=new Map,this.#s=0}#e;#t;#s;build(e,t,s){const i=new l({client:e,mutationCache:this,mutationId:++this.#s,options:e.defaultMutationOptions(t),state:s});return this.add(i),i}add(e){this.#e.add(e);const t=T(e);if("string"==typeof t){const s=this.#t.get(t);s?s.push(e):this.#t.set(t,[e])}this.notify({type:"added",mutation:e})}remove(e){if(this.#e.delete(e)){const t=T(e);if("string"==typeof t){const s=this.#t.get(t);if(s)if(s.length>1){const t=s.indexOf(e);-1!==t&&s.splice(t,1)}else s[0]===e&&this.#t.delete(t)}}this.notify({type:"removed",mutation:e})}canRun(e){const t=T(e);if("string"==typeof t){const s=this.#t.get(t)?.find(e=>"pending"===e.state.status);return!s||s===e}return!0}runNext(e){const t=T(e);return"string"==typeof t?(this.#t.get(t)?.find(t=>t!==e&&t.state.isPaused))?.continue()??Promise.resolve():Promise.resolve()}clear(){C.batch(()=>{this.#e.forEach(e=>{this.notify({type:"removed",mutation:e})}),this.#e.clear(),this.#t.clear()})}getAll(){return Array.from(this.#e)}find(e){const t={exact:!0,...e};return this.getAll().find(e=>x(t,e))}findAll(e={}){return this.getAll().filter(t=>x(e,t))}notify(e){C.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){const e=this.getAll().filter(e=>e.state.isPaused);return C.batch(()=>Promise.all(e.map(e=>e.continue().catch(w))))}};function T(e){return e.options.scope?.id}var z=class extends y{constructor(e={}){super(),this.config=e,this.#i=new Map}#i;build(e,t,s){const i=t.queryKey,a=t.queryHash??Q(i,t);let r=this.get(a);return r||(r=new K({client:e,queryKey:i,queryHash:a,options:e.defaultQueryOptions(t),state:s,defaultOptions:e.getQueryDefaults(i)}),this.add(r)),r}add(e){this.#i.has(e.queryHash)||(this.#i.set(e.queryHash,e),this.notify({type:"added",query:e}))}remove(e){const t=this.#i.get(e.queryHash);t&&(e.destroy(),t===e&&this.#i.delete(e.queryHash),this.notify({type:"removed",query:e}))}clear(){C.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return this.#i.get(e)}getAll(){return[...this.#i.values()]}find(e){const t={exact:!0,...e};return this.getAll().find(e=>O(t,e))}findAll(e={}){const t=this.getAll();return Object.keys(e).length>0?t.filter(t=>O(e,t)):t}notify(e){C.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){C.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){C.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},_=class{#a;#r;#n;#u;#o;#h;#c;#l;constructor(e={}){this.#a=e.queryCache||new z,this.#r=e.mutationCache||new I,this.#n=e.defaultOptions||{},this.#u=new Map,this.#o=new Map,this.#h=0}mount(){this.#h++,1===this.#h&&(this.#c=H.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#a.onFocus())}),this.#l=A.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#a.onOnline())}))}unmount(){this.#h--,0===this.#h&&(this.#c?.(),this.#c=void 0,this.#l?.(),this.#l=void 0)}isFetching(e){return this.#a.findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return this.#r.findAll({...e,status:"pending"}).length}getQueryData(e){const t=this.defaultQueryOptions({queryKey:e});return this.#a.get(t.queryHash)?.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),s=this.#a.build(this,t),i=s.state.data;return void 0===i?this.fetchQuery(e):(e.revalidateIfStale&&s.isStaleByTime(E(t.staleTime,s))&&this.prefetchQuery(t),Promise.resolve(i))}getQueriesData(e){return this.#a.findAll(e).map(({queryKey:e,state:t})=>[e,t.data])}setQueryData(e,t,s){const i=this.defaultQueryOptions({queryKey:e}),a=this.#a.get(i.queryHash)?.state.data,r=M(t,a);if(void 0!==r)return this.#a.build(this,i).setData(r,{...s,manual:!0})}setQueriesData(e,t,s){return C.batch(()=>this.#a.findAll(e).map(({queryKey:e})=>[e,this.setQueryData(e,t,s)]))}getQueryState(e){const t=this.defaultQueryOptions({queryKey:e});return this.#a.get(t.queryHash)?.state}removeQueries(e){const t=this.#a;C.batch(()=>{t.findAll(e).forEach(e=>{t.remove(e)})})}resetQueries(e,t){const s=this.#a;return C.batch(()=>(s.findAll(e).forEach(e=>{e.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const s={revert:!0,...t},i=C.batch(()=>this.#a.findAll(e).map(e=>e.cancel(s)));return Promise.all(i).then(w).catch(w)}invalidateQueries(e,t={}){return C.batch(()=>(this.#a.findAll(e).forEach(e=>{e.invalidate()}),"none"===e?.refetchType?Promise.resolve():this.refetchQueries({...e,type:e?.refetchType??e?.type??"active"},t)))}refetchQueries(e,t={}){const s={...t,cancelRefetch:t.cancelRefetch??!0},i=C.batch(()=>this.#a.findAll(e).filter(e=>!e.isDisabled()&&!e.isStatic()).map(e=>{let t=e.fetch(void 0,s);return s.throwOnError||(t=t.catch(w)),"paused"===e.state.fetchStatus?Promise.resolve():t}));return Promise.all(i).then(w)}fetchQuery(e){const t=this.defaultQueryOptions(e);void 0===t.retry&&(t.retry=!1);const s=this.#a.build(this,t);return s.isStaleByTime(E(t.staleTime,s))?s.fetch(t):Promise.resolve(s.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(w).catch(w)}fetchInfiniteQuery(e){return e._type="infinite",this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(w).catch(w)}ensureInfiniteQueryData(e){return e._type="infinite",this.ensureQueryData(e)}resumePausedMutations(){return A.isOnline()?this.#r.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#a}getMutationCache(){return this.#r}getDefaultOptions(){return this.#n}setDefaultOptions(e){this.#n=e}setQueryDefaults(e,t){this.#u.set(v(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...this.#u.values()],s={};return t.forEach(t=>{j(e,t.queryKey)&&Object.assign(s,t.defaultOptions)}),s}setMutationDefaults(e,t){this.#o.set(v(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...this.#o.values()],s={};return t.forEach(t=>{j(e,t.mutationKey)&&Object.assign(s,t.defaultOptions)}),s}defaultQueryOptions(e){if(e._defaulted)return e;const t={...this.#n.queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=Q(t.queryKey,t)),void 0===t.refetchOnReconnect&&(t.refetchOnReconnect="always"!==t.networkMode),void 0===t.throwOnError&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===N&&(t.enabled=!1),t}defaultMutationOptions(e){return e?._defaulted?e:{...this.#n.mutations,...e?.mutationKey&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){this.#a.clear(),this.#r.clear()}},R=S("octagon-x",[["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"M2.586 16.726A2 2 0 0 1 2 15.312V8.688a2 2 0 0 1 .586-1.414l4.688-4.688A2 2 0 0 1 8.688 2h6.624a2 2 0 0 1 1.414.586l4.688 4.688A2 2 0 0 1 22 8.688v6.624a2 2 0 0 1-.586 1.414l-4.688 4.688a2 2 0 0 1-1.414.586H8.688a2 2 0 0 1-1.414-.586z",key:"2d38gg"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]]),W=t(i(),1),$=c(),B=({...e})=>{const{theme:t="system"}=p();return(0,$.jsx)(D,{theme:t,className:"toaster group",icons:{success:(0,$.jsx)(f,{className:"size-4"}),info:(0,$.jsx)(d,{className:"size-4"}),warning:(0,$.jsx)(m,{className:"size-4"}),error:(0,$.jsx)(R,{className:"size-4"}),loading:(0,$.jsx)(F,{className:"size-4 animate-spin"})},style:{"--normal-bg":"var(--popover)","--normal-text":"var(--popover-foreground)","--normal-border":"var(--border)","--border-radius":"var(--radius)"},toastOptions:{classNames:{toast:"cn-toast"}},...e})};function G(){return[{title:P}]}function L(){return[{rel:"icon",href:"/favicon.svg",type:"image/svg+xml"}]}function U({children:e}){return(0,$.jsxs)("html",{lang:"en",suppressHydrationWarning:!0,children:[(0,$.jsxs)("head",{children:[(0,$.jsx)("meta",{charSet:"utf-8"}),(0,$.jsx)("meta",{name:"viewport",content:"width=device-width, initial-scale=1"}),(0,$.jsx)(a,{}),(0,$.jsx)(o,{})]}),(0,$.jsxs)("body",{children:[e,(0,$.jsx)(u,{}),(0,$.jsx)(n,{})]})]})}var V=h(function(){const[e]=(0,W.useState)(()=>new _({defaultOptions:{queries:{refetchOnWindowFocus:!1,retry:1}}}));return(0,$.jsx)(g,{attribute:"class",defaultTheme:"system",enableSystem:!0,children:(0,$.jsx)(q,{client:e,children:(0,$.jsxs)(b,{children:[(0,$.jsx)(k,{children:(0,$.jsx)(r,{})}),(0,$.jsx)(B,{richColors:!0})]})})})}),X=s(function({error:t}){const s=e(t)?`${t.status} ${t.statusText}`:t instanceof Error?t.message:"Unexpected application error.";return(0,$.jsx)("main",{className:"flex min-h-svh items-center justify-center bg-background p-6",children:(0,$.jsxs)("section",{className:"max-w-md rounded-xl border bg-background p-5 shadow-sm",children:[(0,$.jsx)("h1",{className:"text-lg font-semibold",children:"xedoc"}),(0,$.jsx)("p",{className:"mt-2 whitespace-pre-wrap text-sm text-muted-foreground",children:s})]})})});export{X as ErrorBoundary,U as Layout,V as default,L as links,G as meta};
|