@maudecode/kanvil 0.7.0 → 0.8.0
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/apps/server/dist/{auth-D43XyHdK.mjs → auth-CVnX2XIg.mjs} +3759 -3550
- package/apps/server/dist/client.mjs +1 -1
- package/apps/server/dist/{config-CQVdVhXv.mjs → config-DUIdB3c2.mjs} +1 -1
- package/apps/server/dist/index.mjs +12 -7
- package/apps/server/dist/migrate.mjs +1 -1
- package/apps/server/dist/recover.mjs +3 -3
- package/apps/server/dist/{src-D70GmZ5R.mjs → src-CC6lPIU_.mjs} +107 -9
- package/apps/server/drizzle/0042_public_boards.sql +37 -0
- package/apps/server/drizzle/0043_epics.sql +18 -0
- package/apps/server/drizzle/meta/0042_snapshot.json +7315 -0
- package/apps/server/drizzle/meta/0043_snapshot.json +7466 -0
- package/apps/server/drizzle/meta/_journal.json +14 -0
- package/apps/web/dist/assets/{CompositeItem-DLTRsada.js → CompositeItem-GgAhkI4m.js} +1 -1
- package/apps/web/dist/assets/{Trans-DqX-qhvQ.js → Trans-CT9xiBED.js} +1 -1
- package/apps/web/dist/assets/admin-settings-C7yxWm-w.js +1 -0
- package/apps/web/dist/assets/{archive-restore-BO1qng5Y.js → archive-restore-UgUTJyLs.js} +1 -1
- package/apps/web/dist/assets/az-AZ-IkRP1MKo.js +1 -0
- package/apps/web/dist/assets/{az-CEW7-a7J.js → az-CZ46yOUl.js} +1 -1
- package/apps/web/dist/assets/{configuration-D0zvwrXt.js → configuration-CU0QOaRw.js} +1 -1
- package/apps/web/dist/assets/{corner-left-up-Be7Z9Uhf.js → corner-left-up-BFY7AqdS.js} +1 -1
- package/apps/web/dist/assets/{de-B-oGVMYL.js → de-CseN-3gF.js} +1 -1
- package/apps/web/dist/assets/de-DE-DCGKtpLI.js +1 -0
- package/apps/web/dist/assets/default-CN9zcRIy.js +56 -0
- package/apps/web/dist/assets/{delivery-settings-BrwSrFIN.js → delivery-settings-xx9Bb6Ux.js} +1 -1
- package/apps/web/dist/assets/el-GR-C5w6p2-z.js +1 -0
- package/apps/web/dist/assets/{el-Cp69kezM.js → el-psH0HOR3.js} +1 -1
- package/apps/web/dist/assets/{ellipsis-B0AE8ax3.js → ellipsis-CcIJddV1.js} +1 -1
- package/apps/web/dist/assets/{es-CwOMVSTx.js → es-BVvGrD23.js} +1 -1
- package/apps/web/dist/assets/es-ES-PjJlJCgT.js +1 -0
- package/apps/web/dist/assets/{forms-CkVpTx29.js → forms-BUNl5uNV.js} +1 -1
- package/apps/web/dist/assets/{fr-Cy4co9ic.js → fr-C43nghuI.js} +1 -1
- package/apps/web/dist/assets/fr-FR-CGWH-Juq.js +1 -0
- package/apps/web/dist/assets/{hi-DbO9TKwg.js → hi-Ds3DGtT-.js} +1 -1
- package/apps/web/dist/assets/hi-IN-B3bq8hDJ.js +1 -0
- package/apps/web/dist/assets/{highlight-zMg1BK-r.js → highlight-BPZqoBaO.js} +1 -1
- package/apps/web/dist/assets/id-ID-98H240ET.js +1 -0
- package/apps/web/dist/assets/{id-B6NKsmCm.js → id-tg9awgd8.js} +1 -1
- package/apps/web/dist/assets/index-CvFGdLre.js +17 -0
- package/apps/web/dist/assets/{invitations-Dp40BfHj.js → invitations-fH1M9hYm.js} +1 -1
- package/apps/web/dist/assets/{it-ilGYCq2T.js → it-DRwaWQyE.js} +1 -1
- package/apps/web/dist/assets/it-IT-CNS9cL7I.js +1 -0
- package/apps/web/dist/assets/{item-DQR89bKm.js → item-BbaYy50i.js} +1 -1
- package/apps/web/dist/assets/ja-JP-BFTqtCdV.js +1 -0
- package/apps/web/dist/assets/{ja-D-hJRTgP.js → ja-jj4Ubayf.js} +1 -1
- package/apps/web/dist/assets/{ko-ajkkoJ_d.js → ko-Dn2pRrar.js} +1 -1
- package/apps/web/dist/assets/ko-KR-C58VNccr.js +1 -0
- package/apps/web/dist/assets/{label-settings-ChnKkA97.js → label-settings-CbBHSL0c.js} +1 -1
- package/apps/web/dist/assets/{markdown-blocks-CpzrwyQG.js → markdown-blocks-B6mE_S6n.js} +1 -1
- package/apps/web/dist/assets/{member-directory-XK0ZEGUq.js → member-directory-CoGg7WkW.js} +1 -1
- package/apps/web/dist/assets/{mk-C_sMyEHX.js → mk-DQUnXaPE.js} +1 -1
- package/apps/web/dist/assets/mk-MK-Bf5RDo6j.js +1 -0
- package/apps/web/dist/assets/{nl-D9-P4UPR.js → nl-C_Ijir3O.js} +1 -1
- package/apps/web/dist/assets/nl-NL-D1WFJyOY.js +1 -0
- package/apps/web/dist/assets/{pl-CiQM7fSB.js → pl-DgWXgYL-.js} +1 -1
- package/apps/web/dist/assets/pl-PL--jAcwyAK.js +1 -0
- package/apps/web/dist/assets/project-lifecycle-BHWCMq7o.js +1 -0
- package/apps/web/dist/assets/project-settings-CBG5CZX1.js +1 -0
- package/apps/web/dist/assets/pt-BR-CJQfuq9b.js +1 -0
- package/apps/web/dist/assets/{pt-BR-CP7dhuqF.js → pt-BR-N-Xvp9fC.js} +1 -1
- package/apps/web/dist/assets/public-project-DmTr9q4c.js +1 -0
- package/apps/web/dist/assets/{rotate-ccw-Cxh9ec2s.js → rotate-ccw-BFYpBtuj.js} +1 -1
- package/apps/web/dist/assets/{ru-DxJ6vF4E.js → ru-Ctq-5FYl.js} +1 -1
- package/apps/web/dist/assets/ru-RU-BtvJ8Glt.js +1 -0
- package/apps/web/dist/assets/{search-DfbsqO7M.js → search-C2QaoLwI.js} +3 -3
- package/apps/web/dist/assets/{send-DrJl0BKm.js → send-qRPqbT2m.js} +1 -1
- package/apps/web/dist/assets/{settings-BN8uIiBG.js → settings-BNPajW83.js} +1 -1
- package/apps/web/dist/assets/{sliders-horizontal-DM47MLe7.js → sliders-horizontal-S16oyCiS.js} +1 -1
- package/apps/web/dist/assets/{switch-CJTVGtE9.js → switch-C44Ouoqh.js} +1 -1
- package/apps/web/dist/assets/{table-BLLjFPWD.js → table-esnQpDtb.js} +1 -1
- package/apps/web/dist/assets/ticket-detail-BVyScTlg.js +2 -0
- package/apps/web/dist/assets/ticket-editor-BjuSeeiA.js +2 -0
- package/apps/web/dist/assets/ticket-list-BCvUvYju.js +6 -0
- package/apps/web/dist/assets/ticket-list-controls-BiC5CIwM.js +1 -0
- package/apps/web/dist/assets/{tr-9IkdRLIk.js → tr-CYT8BT69.js} +1 -1
- package/apps/web/dist/assets/tr-TR-Bahy-EKO.js +1 -0
- package/apps/web/dist/assets/uk-UA-DDVgxWqX.js +1 -0
- package/apps/web/dist/assets/{uk-Btampsdw.js → uk-y7QuyfrN.js} +1 -1
- package/apps/web/dist/assets/{upload-HARy4VC_.js → upload-e7CmLHhp.js} +1 -1
- package/apps/web/dist/assets/{useQueries-CTeEF--U.js → useQueries-U3MOyy3t.js} +1 -1
- package/apps/web/dist/assets/{vi-BVZzOn_n.js → vi-Bz2g5X1k.js} +1 -1
- package/apps/web/dist/assets/vi-VN-CuHCYxNQ.js +1 -0
- package/apps/web/dist/assets/{visual-editor-DKBPjqV-.js → visual-editor-UmVaDXWu.js} +1 -1
- package/apps/web/dist/assets/workspace-settings-BiWJqW0m.js +1 -0
- package/apps/web/dist/assets/zh-CN-C94sYOI_.js +1 -0
- package/apps/web/dist/assets/{zh-CN-BoUvF2do.js → zh-CN-y_sluDUm.js} +1 -1
- package/apps/web/dist/assets/zh-TW-BoRQfGQL.js +1 -0
- package/apps/web/dist/assets/{zh-TW-CEIDGTWe.js → zh-TW-DIEfy239.js} +1 -1
- package/apps/web/dist/index.html +7 -7
- package/docs/api.md +31 -3
- package/docs/mobile.md +1 -1
- package/docs/plan.md +1 -0
- package/docs/releasing.md +1 -1
- package/package.json +1 -1
- package/apps/web/dist/assets/admin-settings-BQzdZII5.js +0 -1
- package/apps/web/dist/assets/az-AZ-SXqDBPA2.js +0 -1
- package/apps/web/dist/assets/de-DE-CB7aQ6b-.js +0 -1
- package/apps/web/dist/assets/default-CCI1vZxa.js +0 -56
- package/apps/web/dist/assets/el-GR-D1ntYXIt.js +0 -1
- package/apps/web/dist/assets/es-ES-CllsaxcB.js +0 -1
- package/apps/web/dist/assets/fr-FR-DxTw6LgI.js +0 -1
- package/apps/web/dist/assets/hi-IN-CaQga-0l.js +0 -1
- package/apps/web/dist/assets/id-ID-DBfwAAqU.js +0 -1
- package/apps/web/dist/assets/index-CZuFd4LM.js +0 -17
- package/apps/web/dist/assets/it-IT-BckuH9Nl.js +0 -1
- package/apps/web/dist/assets/ja-JP-BAGgJKZ4.js +0 -1
- package/apps/web/dist/assets/ko-KR-srIEsTP5.js +0 -1
- package/apps/web/dist/assets/mk-MK-BTa1NMAF.js +0 -1
- package/apps/web/dist/assets/nl-NL-CQduhDqs.js +0 -1
- package/apps/web/dist/assets/pl-PL-BdZMf7Ni.js +0 -1
- package/apps/web/dist/assets/project-lifecycle-VYecJuiP.js +0 -1
- package/apps/web/dist/assets/project-settings-Bs6YEpo9.js +0 -1
- package/apps/web/dist/assets/pt-BR-DZEXJNHg.js +0 -1
- package/apps/web/dist/assets/public-project-DUfWDao9.js +0 -1
- package/apps/web/dist/assets/ru-RU-CZKEe7P8.js +0 -1
- package/apps/web/dist/assets/ticket-detail-BTy_3JeU.js +0 -2
- package/apps/web/dist/assets/ticket-editor-Bb_lyxnJ.js +0 -2
- package/apps/web/dist/assets/ticket-list-Botp5qf5.js +0 -6
- package/apps/web/dist/assets/ticket-list-controls-Dmkno4pm.js +0 -1
- package/apps/web/dist/assets/tr-TR-Y8wBLO8I.js +0 -1
- package/apps/web/dist/assets/uk-UA-CVpasGUS.js +0 -1
- package/apps/web/dist/assets/vi-VN-BMy-iJD-.js +0 -1
- package/apps/web/dist/assets/workspace-settings-DqzBNw60.js +0 -1
- package/apps/web/dist/assets/zh-CN-Cds_v0R8.js +0 -1
- package/apps/web/dist/assets/zh-TW-DCCYakXz.js +0 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/markdown-blocks-
|
|
2
|
-
import{i as e,n as t,t as n}from"./rolldown-runtime-COiEfhsA.js";import{Dn as r,En as i,Et as a,F as o,Fn as s,H as c,Ht as l,I as u,In as d,K as f,Mn as p,Nn as m,On as h,P as g,Pn as _,Q as v,St as y,Tn as b,U as x,Un as S,Wn as C,Wt as w,Yt as T,Zt as E,_n as D,_t as O,at as k,dt as A,en as j,et as M,fn as N,ft as P,gt as F,ht as I,i as L,jn as R,kt as z,ln as B,mt as ee,nn as V,ot as te,p as ne,pt as H,qt as re,r as ie,u as ae,un as oe,vt as se,wn as ce,yt as le}from"./default-CCI1vZxa.js";import{t as ue}from"./preload-helper-BLdHbfdN.js";import{t as de}from"./toDate-B3HYxwtT.js";var fe=n((e=>{var t=C();function n(e){var t=`https://react.dev/errors/`+e;if(1<arguments.length){t+=`?args[]=`+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+=`&args[]=`+encodeURIComponent(arguments[n])}return`Minified React error #`+e+`; visit `+t+` for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`}function r(){}var i={d:{f:r,r:function(){throw Error(n(522))},D:r,C:r,L:r,m:r,X:r,S:r,M:r},p:0,findDOMNode:null},a=Symbol.for(`react.portal`),o=Symbol.for(`react.recoverable`),s=Symbol.for(`react.optimistic_key`);function c(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:a,key:r==null?null:r===s?s:``+r,children:e,containerInfo:t,implementation:n}}var l=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function u(e,t){if(e===`font`)return``;if(typeof t==`string`)return t===`use-credentials`?t:``}e.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=i,e.browser=function(e){return{$$typeof:o,_reason:e}},e.createPortal=function(e,t){var r=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)throw Error(n(299));return c(e,t,null,r)},e.flushSync=function(e){var t=l.T,n=i.p;try{if(l.T=null,i.p=2,e)return e()}finally{l.T=t,i.p=n,i.d.f()}},e.preconnect=function(e,t){typeof e==`string`&&(t?(t=t.crossOrigin,t=typeof t==`string`?t===`use-credentials`?t:``:void 0):t=null,i.d.C(e,t))},e.prefetchDNS=function(e){typeof e==`string`&&i.d.D(e)},e.preinit=function(e,t){if(typeof e==`string`&&t&&typeof t.as==`string`){var n=t.as,r=u(n,t.crossOrigin),a=typeof t.integrity==`string`?t.integrity:void 0,o=typeof t.fetchPriority==`string`?t.fetchPriority:void 0;n===`style`?i.d.S(e,typeof t.precedence==`string`?t.precedence:void 0,{crossOrigin:r,integrity:a,fetchPriority:o}):n===`script`&&i.d.X(e,{crossOrigin:r,integrity:a,fetchPriority:o,nonce:typeof t.nonce==`string`?t.nonce:void 0})}},e.preinitModule=function(e,t){if(typeof e==`string`){if(typeof t==`object`&&t){if(t.as==null||t.as===`script`){var n=u(t.as,t.crossOrigin);i.d.M(e,{crossOrigin:n,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0,fetchPriority:typeof t.fetchPriority==`string`?t.fetchPriority:void 0})}}else t??i.d.M(e)}},e.preload=function(e,t){if(typeof e==`string`&&typeof t==`object`&&t&&typeof t.as==`string`){var n=t.as,r=u(n,t.crossOrigin);i.d.L(e,n,{crossOrigin:r,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0,type:typeof t.type==`string`?t.type:void 0,fetchPriority:typeof t.fetchPriority==`string`?t.fetchPriority:void 0,referrerPolicy:typeof t.referrerPolicy==`string`?t.referrerPolicy:void 0,imageSrcSet:typeof t.imageSrcSet==`string`?t.imageSrcSet:void 0,imageSizes:typeof t.imageSizes==`string`?t.imageSizes:void 0,media:typeof t.media==`string`?t.media:void 0})}},e.preloadModule=function(e,t){if(typeof e==`string`){if(t){var n=u(t.as,t.crossOrigin);i.d.m(e,{as:typeof t.as==`string`&&t.as!==`script`?t.as:void 0,crossOrigin:n,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0,fetchPriority:typeof t.fetchPriority==`string`?t.fetchPriority:void 0})}else i.d.m(e)}},e.requestFormReset=function(e){i.d.r(e)},e.unstable_batchedUpdates=function(e,t){return e(t)},e.useFormState=function(e,t,n){return l.H.useFormState(e,t,n)},e.useFormStatus=function(){return l.H.useHostTransitionStatus()},e.version=`19.3.1`})),pe=n(((e,t)=>{function n(){if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE==`function`)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=fe()})),U=e(C(),1),W=e(pe(),1),me=Object.fromEntries(Object.entries({default:{className:`text-primary`,light:null,dark:null},red:{className:`text-red-500`,light:`#ef4444`,dark:`#ef4444`},orange:{className:`text-orange-500`,light:`#f97316`,dark:`#f97316`},amber:{className:`text-amber-500`,light:`#f59e0b`,dark:`#f59e0b`},yellow:{className:`text-yellow-600 dark:text-yellow-400`,light:`#ca8a04`,dark:`#facc15`},lime:{className:`text-lime-600 dark:text-lime-400`,light:`#65a30d`,dark:`#a3e635`},green:{className:`text-green-600 dark:text-green-400`,light:`#16a34a`,dark:`#4ade80`},emerald:{className:`text-emerald-600 dark:text-emerald-400`,light:`#059669`,dark:`#34d399`},teal:{className:`text-teal-600 dark:text-teal-400`,light:`#0d9488`,dark:`#2dd4bf`},cyan:{className:`text-cyan-600 dark:text-cyan-400`,light:`#0891b2`,dark:`#22d3ee`},sky:{className:`text-sky-500`,light:`#0ea5e9`,dark:`#0ea5e9`},blue:{className:`text-blue-500`,light:`#3b82f6`,dark:`#3b82f6`},indigo:{className:`text-indigo-500`,light:`#6366f1`,dark:`#6366f1`},violet:{className:`text-violet-500`,light:`#8b5cf6`,dark:`#8b5cf6`},purple:{className:`text-purple-500`,light:`#a855f7`,dark:`#a855f7`},fuchsia:{className:`text-fuchsia-500`,light:`#d946ef`,dark:`#d946ef`},pink:{className:`text-pink-500`,light:`#ec4899`,dark:`#ec4899`},rose:{className:`text-rose-500`,light:`#f43f5e`,dark:`#f43f5e`},gray:{className:`text-muted-foreground`,light:null,dark:null}}).map(([e,t])=>[e,t.className])),he=e=>M(e)?D(`settings.color.${e}`):e;function ge(e){return M(e)?{className:me[e]??`text-primary`}:{style:{color:e}}}var G=ie(),_e=U.createContext(void 0),ve=e=>{let t=U.useContext(_e);if(e)return e;if(!t)throw Error(`No QueryClient set, use QueryClientProvider to set one`);return t},ye=({client:e,children:t})=>(U.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),(0,G.jsx)(_e.Provider,{value:e,children:t})),be={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},xe=new class{#e=be;setTimeoutProvider(e){this.#e=e}setTimeout(e,t){return this.#e.setTimeout(e,t)}clearTimeout(e){this.#e.clearTimeout(e)}setInterval(e,t){return this.#e.setInterval(e,t)}clearInterval(e){this.#e.clearInterval(e)}};function Se(e){setTimeout(e,0)}var Ce=typeof window>`u`||`Deno`in globalThis;function we(){}function Te(e,t){return typeof e==`function`?e(t):e}function Ee(e){return typeof e==`number`&&e>=0&&e!==1/0}function De(e,t){return Math.max(e+(t||0)-Date.now(),0)}function Oe(e,t){return typeof e==`function`?e(t):e}function ke(e,t){let{type:n=`all`,exact:r,fetchStatus:i,predicate:a,queryKey:o,stale:s}=e;if(o){if(r){if(t.queryHash!==je(o,t.options))return!1}else if(!Ne(t.queryKey,o))return!1}if(n!==`all`){let e=t.isActive();if(n===`active`&&!e||n===`inactive`&&e)return!1}return!(typeof s==`boolean`&&t.isStale()!==s||i&&i!==t.state.fetchStatus||a&&!a(t))}function Ae(e,t){let{exact:n,status:r,predicate:i,mutationKey:a}=e;if(a){if(!t.options.mutationKey)return!1;if(n){if(Me(t.options.mutationKey)!==Me(a))return!1}else if(!Ne(t.options.mutationKey,a))return!1}return!(r&&t.state.status!==r||i&&!i(t))}function je(e,t){return(t?.queryKeyHashFn||Me)(e)}function Me(e){return JSON.stringify(e,(e,t)=>Re(t)?Object.keys(t).sort().reduce((e,n)=>(e[n]=t[n],e),{}):t)}function Ne(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(e&&t&&typeof e==`object`&&typeof t==`object`){if(Array.isArray(e)&&Array.isArray(t)){if(t.length>e.length)return!1;for(let n=0;n<t.length;n++)if(!Ne(e[n],t[n]))return!1;return!0}let n=Object.keys(t);for(let r of n)if(!Ne(e[r],t[r]))return!1;return!0}return!1}var Pe=Object.prototype.hasOwnProperty;function Fe(e,t,n=0){if(e===t)return e;if(n>500)return t;let r=Le(e)&&Le(t);if(!r&&!(Re(e)&&Re(t)))return t;let i=(r?e:Object.keys(e)).length,a=r?t:Object.keys(t),o=a.length,s=r?Array(o):{},c=0;for(let l=0;l<o;l++){let o=r?l:a[l],u=e[o],d=t[o];if(u===d){s[o]=u,(r?l<i:Pe.call(e,o))&&c++;continue}if(u===null||d===null||typeof u!=`object`||typeof d!=`object`){s[o]=d;continue}let f=Fe(u,d,n+1);s[o]=f,f===u&&c++}return i===o&&c===i?e:s}function Ie(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(let n in e)if(e[n]!==t[n])return!1;return!0}function Le(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function Re(e){if(!ze(e))return!1;let t=Object.getPrototypeOf(e),n=t?.constructor;if(n===void 0)return!0;if(typeof n!=`function`)return!1;let r=n.prototype;return!(!ze(r)||!r.hasOwnProperty(`isPrototypeOf`)||t!==Object.prototype)}function ze(e){return Object.prototype.toString.call(e)===`[object Object]`}function Be(e){return new Promise(t=>{xe.setTimeout(t,e)})}function Ve(e,t,n){return typeof n.structuralSharing==`function`?n.structuralSharing(e,t):n.structuralSharing===!1?t:Fe(e,t)}function He(e){return e}function Ue(e,t,n=0){let r=[...e,t];return n&&r.length>n?r.slice(1):r}function We(e,t,n=0){let r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var Ge=Symbol();function Ke(e,t){return!e.queryFn&&t?.initialPromise?()=>t.initialPromise:!e.queryFn||e.queryFn===Ge?()=>Promise.reject(Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function qe(e,t){return typeof e==`function`?e(...t):!!e}function Je(e,t,n){let r=!1,i;return Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(i??=t(),r||(r=!0,i.aborted?n():i.addEventListener(`abort`,n,{once:!0})),i)}),e}var Ye=()=>Ce,Xe=()=>Ye(),Ze=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(){}},Qe=new class extends Ze{#e;#t;#n;constructor(){super(),this.#n=e=>{if(typeof window<`u`&&window.addEventListener){let 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=>{typeof e==`boolean`?this.setFocused(e):this.onFocus()})}setFocused(e){this.#e!==e&&(this.#e=e,this.onFocus())}onFocus(){let e=this.isFocused();this.listeners.forEach(t=>{t(e)})}isFocused(){return typeof this.#e==`boolean`?this.#e:globalThis.document?.visibilityState!==`hidden`}},$e=Se;function et(){let e=[],t=0,n=e=>{e()},r=e=>{e()},i=$e,a=r=>{t?e.push(r):i(()=>{n(r)})},o=()=>{let t=e;e=[],t.length&&i(()=>{r(()=>{t.forEach(e=>{n(e)})})})};return{batch:e=>{let n;t++;try{n=e()}finally{t--,t||o()}return n},batchCalls:e=>(...t)=>{a(()=>{e(...t)})},schedule:a,setNotifyFunction:e=>{n=e},setBatchNotifyFunction:e=>{r=e},setScheduler:e=>{i=e}}}var tt=et(),nt=new class extends Ze{#e=!0;#t;#n;constructor(){super(),this.#n=e=>{if(typeof window<`u`&&window.addEventListener){let 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.#e!==e&&(this.#e=e,this.listeners.forEach(t=>{t(e)}))}isOnline(){return this.#e}};function rt(e){return Math.min(1e3*2**e,3e4)}function it(e){return(e??`online`)!==`online`||nt.isOnline()}var at=class extends Error{constructor(e){super(`CancelledError`),this.revert=e?.revert,this.silent=e?.silent}};function ot(e){let t=!1,n=0,r,i=`pending`,a,o,s=new Promise((e,t)=>{a=e,o=t});s.catch(we);let c=()=>i!==`pending`,l=t=>{if(!c()){let n=new at(t);h(n),e.onCancel?.(n)}},u=()=>{t=!0},d=()=>{t=!1},f=()=>Qe.isFocused()&&(e.networkMode===`always`||nt.isOnline())&&e.canRun(),p=()=>it(e.networkMode)&&e.canRun(),m=e=>{c()||(r?.(),i=`resolved`,a(e))},h=e=>{c()||(r?.(),i=`rejected`,o(e))},g=t=>new Promise(n=>{r=e=>{(c()||t())&&n(e)},e.onPause?.()}).then(()=>{r=void 0,c()||e.onContinue?.()}),_=()=>{if(c())return;let r,i=n===0?e.initialPromise:void 0;try{r=i??e.fn()}catch(e){r=Promise.reject(e)}Promise.resolve(r).then(m).catch(r=>{if(c())return;let i=e.retry??(Xe()?0:3),a=e.retryDelay??rt,o=typeof a==`function`?a(n,r):a,s=i===!0||typeof i==`number`&&n<i||typeof i==`function`&&i(n,r);t||!s?h(r):(n++,e.onFail?.(n,r),Be(o).then(()=>f()?void 0:g(f)).then(()=>{t?h(r):_()}))})};return{promise:s,status:()=>i,cancel:l,continue:()=>(r?.(),s),cancelRetry:u,continueRetry:d,canStart:p,start:()=>(p()?_():g(p).then(_),s)}}var st=class{#e;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),Ee(this.gcTime)&&(this.#e=xe.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(Xe()?1/0:3e5))}clearGcTimeout(){this.#e!==void 0&&(xe.clearTimeout(this.#e),this.#e=void 0)}};function ct(e){return{onFetch:(t,n)=>{let r=t.options,i=t.fetchOptions?.meta?.fetchMore?.direction,a=t.state.data?.pages||[],o=t.state.data?.pageParams||[],s={pages:[],pageParams:[]},c=0,l=async()=>{let n=!1,l=e=>{Je(e,()=>t.signal,()=>n=!0)},u=Ke(t.options,t.fetchOptions),d=async(e,r,i)=>{if(n)return Promise.reject(t.signal.reason);if(r==null&&e.pages.length)return Promise.resolve(e);let a=(()=>{let e={client:t.client,queryKey:t.queryKey,pageParam:r,direction:i?`backward`:`forward`,meta:t.options.meta};return l(e),e})(),o=await u(a),{maxPages:s}=t.options,c=i?We:Ue;return{pages:c(e.pages,o,s),pageParams:c(e.pageParams,r,s)}};if(i&&a.length){let e=i===`backward`,t=e?ut:lt,n={pages:a,pageParams:o};s=await d(n,t(r,n),e)}else{let t=e??a.length;do{let e=c===0?o[0]??r.initialPageParam:lt(r,s);if(c>0&&e==null)break;s=await d(s,e),c++}while(c<t)}return s};t.fetchFn=t.options.persister?()=>t.options.persister?.(l,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n):l}}}function lt(e,{pages:t,pageParams:n}){let r=t.length-1;return t.length>0?e.getNextPageParam(t[r],t,n[r],n):void 0}function ut(e,{pages:t,pageParams:n}){return t.length>0?e.getPreviousPageParam?.(t[0],t,n[0],n):void 0}var dt=class extends st{#e;#t;#n;#r;#i;#a;#o;#s;constructor(e){super(),this.#s=!1,this.#o=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.#i=e.client,this.#r=this.#i.getQueryCache(),this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.#t=mt(this.options),this.state=e.state??this.#t,this.scheduleGc()}get meta(){return this.options.meta}get queryType(){return this.#e}get promise(){return this.#a?.promise}setOptions(e){if(this.options={...this.#o,...e},e?._type&&(this.#e=e._type),this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){let e=mt(this.options);e.data!==void 0&&(this.setState(pt(e.data,e.dataUpdatedAt)),this.#t=e)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus===`idle`&&this.#r.remove(this)}setData(e,t){let n=Ve(this.state.data,e,this.options);return this.#c({data:n,type:`success`,dataUpdatedAt:t?.updatedAt,manual:t?.manual}),n}setState(e){this.#c({type:`setState`,state:e})}cancel(e){let t=this.#a?.promise;return this.#a?.cancel(e),t?t.then(we).catch(we):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return this.#t}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(e=>Oe(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Ge||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0&&this.observers.some(e=>Oe(e.options.staleTime,this)===`static`)}isStale(){return this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(e=0){return this.state.data===void 0?!0:e===`static`?!1:this.state.isInvalidated?!0:!De(this.state.dataUpdatedAt,e)}onFocus(){this.observers.find(e=>e.shouldFetchOnWindowFocus())?.refetch({cancelRefetch:!1}),this.#a?.continue()}onOnline(){this.observers.find(e=>e.shouldFetchOnReconnect())?.refetch({cancelRefetch:!1}),this.#a?.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),this.#r.notify({type:`observerAdded`,query:this,observer:e}))}removeObserver(e){let t=this.observers.indexOf(e);t!==-1&&(this.observers.splice(t,1),this.observers.length||(this.#a&&(this.#s||this.state.fetchStatus===`paused`&&this.state.status===`pending`?this.#a.cancel({revert:!0}):this.#a.cancelRetry()),this.scheduleGc()),this.#r.notify({type:`observerRemoved`,query:this,observer:e}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||this.#c({type:`invalidate`})}async fetch(e,t){if(this.state.fetchStatus!==`idle`&&this.#a?.status()!==`rejected`){if(this.state.data!==void 0&&t?.cancelRefetch)this.cancel({silent:!0});else if(this.#a)return this.#a.continueRetry(),this.#a.promise}if(e&&this.setOptions(e),!this.options.queryFn){let e=this.observers.find(e=>e.options.queryFn);e&&this.setOptions(e.options)}let n=new AbortController,r=e=>{Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(this.#s=!0,n.signal)})},i=()=>{let e=Ke(this.options,t),n=(()=>{let e={client:this.#i,queryKey:this.queryKey,meta:this.meta};return r(e),e})();return this.#s=!1,this.options.persister?this.options.persister(e,n,this):e(n)},a=(()=>{let e={fetchOptions:t,options:this.options,queryKey:this.queryKey,client:this.#i,state:this.state,fetchFn:i};return r(e),e})();(this.#e===`infinite`?ct(this.options.pages):this.options.behavior)?.onFetch(a,this),this.#n=this.state,(this.state.fetchStatus===`idle`||this.state.fetchMeta!==a.fetchOptions?.meta)&&this.#c({type:`fetch`,meta:a.fetchOptions?.meta});let o=this.#a=ot({initialPromise:t?.initialPromise,fn:a.fetchFn,onCancel:e=>{e instanceof at&&e.revert&&this.setState({...this.#n,fetchStatus:`idle`}),n.abort()},onFail:(e,t)=>{this.#c({type:`failed`,failureCount:e,error:t})},onPause:()=>{this.#c({type:`pause`})},onContinue:()=>{this.#c({type:`continue`})},retry:a.options.retry,retryDelay:a.options.retryDelay,networkMode:a.options.networkMode,canRun:()=>!0});try{let e=await o.start();if(e===void 0)throw Error(`${this.queryHash} data is undefined`);return this.setData(e),this.#r.config.onSuccess?.(e,this),this.#r.config.onSettled?.(e,this.state.error,this),e}catch(e){if(e instanceof at){if(e.silent)return this.#a.promise;if(e.revert){if(this.state.data===void 0)throw e;return this.state.data}}throw this.#c({type:`error`,error:e}),this.#r.config.onError?.(e,this),this.#r.config.onSettled?.(this.state.data,e,this),e}finally{this.#a===o&&(this.#a=void 0),this.scheduleGc()}}#c(e){let t=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,...ft(t.data,this.options),fetchMeta:e.meta??null};case`success`:let n={...t,...pt(e.data,e.dataUpdatedAt),dataUpdateCount:t.dataUpdateCount+1,...!e.manual&&{fetchStatus:`idle`,fetchFailureCount:0,fetchFailureReason:null}};return this.#n=e.manual?n:void 0,n;case`error`:let 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=t(this.state),tt.batch(()=>{this.observers.slice().forEach(e=>{e.onQueryUpdate()}),this.#r.notify({query:this,type:`updated`,action:e})})}};function ft(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:it(t.networkMode)?`fetching`:`paused`,...e===void 0&&{error:null,status:`pending`}}}function pt(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:`success`}}function mt(e){let t=typeof e.initialData==`function`?e.initialData():e.initialData,n=t!==void 0,r=n?typeof e.initialDataUpdatedAt==`function`?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 ht=class extends Ze{#e;#t=void 0;#n=void 0;#r=void 0;#i;#a;#o;#s;#c;#l;#u;#d;#f;#p=new Set;constructor(e,t){super(),this.options=t,this.#e=e,this.#o=null,this.bindMethods(),this.setOptions(t)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.#t.addObserver(this),_t(this.#t,this.options)?this.#m():this.updateResult(),this.#y())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return vt(this.#t,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return vt(this.#t,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#b(),this.#x(),this.#t.removeObserver(this)}setOptions(e){let t=this.options,n=this.#t;if(this.options=this.#e.defaultQueryOptions(e),this.options.enabled!==void 0&&typeof this.options.enabled!=`boolean`&&typeof this.options.enabled!=`function`&&typeof Oe(this.options.enabled,this.#t)!=`boolean`)throw Error(`Expected enabled to be a boolean or a callback that returns a boolean`);this.#S(),this.#t.setOptions(this.options),t._defaulted&&!Ie(this.options,t)&&this.#e.getQueryCache().notify({type:`observerOptionsUpdated`,query:this.#t,observer:this});let r=this.hasListeners();r&&yt(this.#t,n,this.options,t)&&this.#m(),this.updateResult(),r&&(this.#t!==n||Oe(this.options.enabled,this.#t)!==Oe(t.enabled,this.#t)||Oe(this.options.staleTime,this.#t)!==Oe(t.staleTime,this.#t))&&this.#g();let i=this.#_();r&&(this.#t!==n||Oe(this.options.enabled,this.#t)!==Oe(t.enabled,this.#t)||i!==this.#f)&&this.#v(i)}getOptimisticResult(e){let t=this.#e.getQueryCache().build(this.#e,e),n=this.createResult(t,e);return Ie(this.getCurrentResult(),n)||(this.#r=n,this.#a=this.options,this.#i=this.#t.state),n}getCurrentResult(){return this.#r}trackResult(e,t){return new Proxy(e,{get:(e,n)=>(this.trackProp(n),t?.(n),Reflect.get(e,n))})}trackProp(e){this.#p.add(e)}getCurrentQuery(){return this.#t}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){let t=this.#e.defaultQueryOptions(e),n=this.#e.getQueryCache().build(this.#e,t),r=()=>{},i,a=new Promise(e=>{i=e,r=this.#e.getQueryCache().subscribe(i=>{i.type===`updated`&&i.query.queryHash===n.queryHash&&n.state.data!==void 0&&(r(),e(this.createResult(n,t)))})});return Promise.race([n.fetch().then(()=>{let e=this.createResult(n,t);return i?.(e),e}).finally(()=>{r()}),a])}fetch(e){return this.#m({...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#r))}#m(e){this.#S();let t=this.#t.fetch(this.options,e);return e?.throwOnError||(t=t.catch(we)),t}#h(e){return!Xe()&&Oe(this.options.enabled,this.#t)!==!1&&Ee(e)}#g(){this.#b();let e=Oe(this.options.staleTime,this.#t);if(this.#r.isStale||!this.#h(e))return;let t=De(this.#r.dataUpdatedAt,e)+1;this.#u=xe.setTimeout(()=>{this.#r.isStale||this.updateResult()},t)}#_(){return Oe(this.options.refetchInterval,this.#t)??!1}#v(e){this.#x(),this.#f=e,this.#f!==0&&this.#h(this.#f)&&(this.#d=xe.setInterval(()=>{(this.options.refetchIntervalInBackground||Qe.isFocused())&&this.#m()},this.#f))}#y(){this.#g(),this.#v(this.#_())}#b(){this.#u!==void 0&&(xe.clearTimeout(this.#u),this.#u=void 0)}#x(){this.#d!==void 0&&(xe.clearInterval(this.#d),this.#d=void 0)}createResult(e,t){let n=this.#t,r=this.options,i=this.#r,a=this.#i,o=this.#a,s=e===n?this.#n:e.state,{state:c}=e,l={...c},u=!1,d;if(t._optimisticResults){let i=this.hasListeners(),a=!i&&_t(e,t),o=i&&yt(e,n,t,r);(a||o)&&(l={...l,...ft(c.data,e.options)}),t._optimisticResults===`isRestoring`&&(l.fetchStatus=`idle`)}let{error:f,errorUpdatedAt:p,status:m}=l;d=l.data;let h=!1;if(t.placeholderData!==void 0&&d===void 0&&m===`pending`){let e;i?.isPlaceholderData&&t.placeholderData===o?.placeholderData?(e=i.data,h=!0):e=typeof t.placeholderData==`function`?t.placeholderData(this.#l?.state.data,this.#l):t.placeholderData,e!==void 0&&(m=`success`,d=Ve(i?.data,e,t),u=!0)}if(t.select&&d!==void 0&&!h){if(i&&d===a?.data&&t.select===this.#s)d=this.#c;else try{this.#s=t.select,d=t.select(d),d=Ve(i?.data,d,t),this.#c=d,this.#o=null}catch(e){this.#o=e}}else d===void 0&&(this.#o=null);this.#o&&(f=this.#o,d=this.#c,p=Date.now(),m=`error`,u=!1);let g=l.fetchStatus===`fetching`,_=m===`pending`,v=m===`error`,y=_&&g,b=d!==void 0;return{status:m,fetchStatus:l.fetchStatus,isPending:_,isSuccess:m===`success`,isError:v,isInitialLoading:y,isLoading:y,data:d,dataUpdatedAt:l.dataUpdatedAt,error:f,errorUpdatedAt:p,failureCount:l.fetchFailureCount,failureReason:l.fetchFailureReason,errorUpdateCount:l.errorUpdateCount,isFetched:e.isFetched(),isFetchedAfterMount:l.dataUpdateCount>s.dataUpdateCount||l.errorUpdateCount>s.errorUpdateCount,isFetching:g,isRefetching:g&&!_,isLoadingError:v&&!b,isPaused:l.fetchStatus===`paused`,isPlaceholderData:u,isRefetchError:v&&b,isStale:bt(e,t),refetch:this.refetch,isEnabled:Oe(t.enabled,e)!==!1}}updateResult(){let e=this.#r,t=this.createResult(this.#t,this.options);if(this.#i=this.#t.state,this.#a=this.options,this.#i.data!==void 0&&(this.#l=this.#t),Ie(t,e))return;this.#r=t;let n=(()=>{if(!e)return!0;let{notifyOnChangeProps:t}=this.options,n=typeof t==`function`?t():t;if(n===`all`||!n&&!this.#p.size)return!0;let r=new Set(n??this.#p);return this.options.throwOnError&&r.add(`error`),Object.keys(this.#r).some(t=>{let n=t;return this.#r[n]!==e[n]&&r.has(n)})})();tt.batch(()=>{n&&this.listeners.forEach(e=>{e(this.#r)}),this.#e.getQueryCache().notify({query:this.#t,type:`observerResultsUpdated`})})}#S(){let e=this.#e.getQueryCache().build(this.#e,this.options);if(e===this.#t)return;let t=this.#t;this.#t=e,this.#n=e.state,this.hasListeners()&&(t?.removeObserver(this),e.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#y()}};function gt(e,t){return Oe(t.enabled,e)!==!1&&e.state.data===void 0&&(e.state.status!==`error`||Oe(t.retryOnMount,e)!==!1)}function _t(e,t){return gt(e,t)||e.state.data!==void 0&&vt(e,t,t.refetchOnMount)}function vt(e,t,n){if(Oe(t.enabled,e)!==!1&&Oe(t.staleTime,e)!==`static`){let r=Oe(n,e);return r===`always`||r!==!1&&bt(e,t)}return!1}function yt(e,t,n,r){return(e!==t||Oe(r.enabled,e)===!1)&&(!n.suspense||e.state.status!==`error`)&&bt(e,n)}function bt(e,t){return Oe(t.enabled,e)!==!1&&e.isStaleByTime(Oe(t.staleTime,e))}var xt=class extends st{#e;#t;#n;#r;constructor(e){super(),this.#e=e.client,this.mutationId=e.mutationId,this.#n=e.mutationCache,this.#t=[],this.state=e.state||St(),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.#t.includes(e)||(this.#t.push(e),this.clearGcTimeout(),this.#n.notify({type:`observerAdded`,mutation:this,observer:e}))}removeObserver(e){this.#t=this.#t.filter(t=>t!==e),this.scheduleGc(),this.#n.notify({type:`observerRemoved`,mutation:this,observer:e})}optionalRemove(){this.#t.length||(this.state.status===`pending`?this.scheduleGc():this.#n.remove(this))}continue(){return this.#r?.continue()??(this.state.status===`pending`?this.execute(this.state.variables):Promise.resolve())}async execute(e){let t=()=>{this.#i({type:`continue`})},n={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey},r=this.#r=ot({fn:()=>this.options.mutationFn?this.options.mutationFn(e,n):Promise.reject(Error(`No mutationFn found`)),onFail:(e,t)=>{this.#i({type:`failed`,failureCount:e,error:t})},onPause:()=>{this.#i({type:`pause`})},onContinue:t,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#n.canRun(this)}),i=this.state.status===`pending`,a=!r.canStart();try{if(i)t();else{this.#i({type:`pending`,variables:e,isPaused:a}),this.#n.config.onMutate&&await this.#n.config.onMutate(e,this,n);let t=await this.options.onMutate?.(e,n);t!==this.state.context&&this.#i({type:`pending`,context:t,variables:e,isPaused:a})}let o=await r.start();return await this.#n.config.onSuccess?.(o,e,this.state.context,this,n),await this.options.onSuccess?.(o,e,this.state.context,n),await this.#n.config.onSettled?.(o,null,this.state.variables,this.state.context,this,n),await this.options.onSettled?.(o,null,e,this.state.context,n),this.#i({type:`success`,data:o}),o}catch(t){try{await this.#n.config.onError?.(t,e,this.state.context,this,n)}catch(e){Promise.reject(e)}try{await this.options.onError?.(t,e,this.state.context,n)}catch(e){Promise.reject(e)}try{await this.#n.config.onSettled?.(void 0,t,this.state.variables,this.state.context,this,n)}catch(e){Promise.reject(e)}try{await this.options.onSettled?.(void 0,t,e,this.state.context,n)}catch(e){Promise.reject(e)}throw this.#i({type:`error`,error:t}),t}finally{this.#r===r&&(this.#r=void 0),this.#n.runNext(this)}}#i(e){let t=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=t(this.state),tt.batch(()=>{this.#t.forEach(t=>{t.onMutationUpdate(e)}),this.#n.notify({mutation:this,type:`updated`,action:e})})}};function St(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:`idle`,variables:void 0,submittedAt:0}}var Ct=class extends Ze{#e;#t=void 0;#n;#r;constructor(e,t){super(),this.#e=e,this.setOptions(t),this.bindMethods(),this.#i()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(e){let t=this.options;this.options=this.#e.defaultMutationOptions(e),Ie(this.options,t)||this.#e.getMutationCache().notify({type:`observerOptionsUpdated`,mutation:this.#n,observer:this}),t?.mutationKey&&this.options.mutationKey&&Me(t.mutationKey)!==Me(this.options.mutationKey)?this.reset():this.#n?.state.status===`pending`&&this.#n.setOptions(this.options)}onSubscribe(){this.listeners.size===1&&this.#n&&(this.#n.addObserver(this),this.#i())}onUnsubscribe(){this.hasListeners()||this.#n?.removeObserver(this)}onMutationUpdate(e){this.#i(),this.#a(e)}getCurrentResult(){return this.#t}reset(){this.#n?.removeObserver(this),this.#n=void 0,this.#i(),this.#a()}mutate(e,t){return this.#r=t,this.#n?.removeObserver(this),this.#n=this.#e.getMutationCache().build(this.#e,this.options),this.#n.addObserver(this),this.#n.execute(e)}#i(){let e=this.#n?.state??St();this.#t={...e,isPending:e.status===`pending`,isSuccess:e.status===`success`,isError:e.status===`error`,isIdle:e.status===`idle`,mutate:this.mutate,reset:this.reset}}#a(e){tt.batch(()=>{let t=this.#r;if(t&&this.hasListeners()){let n=this.#t.variables,r=this.#t.context,i={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};if(e?.type===`success`){try{t.onSuccess?.(e.data,n,r,i)}catch(e){Promise.reject(e)}try{t.onSettled?.(e.data,null,n,r,i)}catch(e){Promise.reject(e)}}else if(e?.type===`error`){try{t.onError?.(e.error,n,r,i)}catch(e){Promise.reject(e)}try{t.onSettled?.(void 0,e.error,n,r,i)}catch(e){Promise.reject(e)}}}this.listeners.forEach(e=>{e(this.#t)})})}},wt=U.createContext(!1),Tt=()=>U.useContext(wt),Et=wt.Provider;function Dt(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var Ot=U.createContext(Dt()),kt=()=>U.useContext(Ot),At=(e,t,n)=>{let r=n?.state.error&&typeof e.throwOnError==`function`?qe(e.throwOnError,[n.state.error,n]):e.throwOnError;(e.suspense||r)&&(t.isReset()||(e.retryOnMount=!1))},jt=e=>{U.useEffect(()=>{e.clearReset()},[e])},Mt=({result:e,errorResetBoundary:t,throwOnError:n,query:r,suspense:i})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&(i&&e.data===void 0||qe(n,[e.error,r])),Nt=e=>{if(e.suspense){let t=1e3,n=e=>e===`static`?e:Math.max(e??t,t),r=e.staleTime;e.staleTime=typeof r==`function`?(...e)=>n(r(...e)):n(r),typeof e.gcTime==`number`&&(e.gcTime=Math.max(e.gcTime,t))}},Pt=(e,t)=>e?.suspense&&t.isPending,Ft=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function It(e,t,n){let r=Tt(),i=kt(),a=ve(n),o=a.defaultQueryOptions(e),s=a.getQueryCache().get(o.queryHash),c=e.subscribed!==!1;o._optimisticResults=r?`isRestoring`:c?`optimistic`:void 0,Nt(o),At(o,i,s),jt(i);let[l]=U.useState(()=>new t(a,o)),u=l.getOptimisticResult(o),d=!r&&c;if(U.useSyncExternalStore(U.useCallback(e=>{let t=d?l.subscribe(tt.batchCalls(e)):we;return l.updateResult(),t},[l,d]),()=>l.getCurrentResult(),()=>l.getCurrentResult()),U.useEffect(()=>{l.setOptions(o)},[o,l]),Pt(o,u))throw Ft(o,l,i);if(Mt({result:u,errorResetBoundary:i,throwOnError:o.throwOnError,query:s,suspense:o.suspense}))throw u.error;return o.notifyOnChangeProps?u:l.trackResult(u)}function Lt(e,t){return It(e,ht,t)}function Rt(e,t){let n=ve(t),[r]=U.useState(()=>new Ct(n,e));U.useEffect(()=>{r.setOptions(e)},[r,e]);let i=U.useSyncExternalStore(U.useCallback(e=>r.subscribe(tt.batchCalls(e)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),a=U.useCallback((...e)=>{r.mutate(e[0],e[1]).catch(we)},[r]);if(i.error&&qe(r.options.throwOnError,[i.error]))throw i.error;return{...i,mutate:a,mutateAsync:i.mutate}}var zt=e=>e?.replace(/([a-z0-9])([A-Z])/g,`$1-$2`).toLowerCase();function Bt(e,t,n=[]){if(t==null)throw Error(`[lucide]: iconNode is required when icon name is used`);return{name:zt(e),size:24,node:t,...n.length>0?{aliases:n}:{}}}var Vt=e=>{let t=``,n=!1;for(let r of e)r===`-`||r===`_`||r<=` `?n=t.length>0:(t.length===0?t+=r.toLowerCase():t+=n?r.toUpperCase():r,n=!1);return t},Ht=e=>{let t=Vt(e);return t.charAt(0).toUpperCase()+t.slice(1)},Ut=(...e)=>e.filter((e,t,n)=>!!e&&e.trim()!==``&&n.indexOf(e)===t).join(` `).trim(),Wt={xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":2,"stroke-linecap":`round`,"stroke-linejoin":`round`};function Gt(e){return e!=null}function Kt(e,t={}){let n=t.attributeNames??{},r=e=>n[e]??e,i=e.size??e.width??Wt.width,a=e.size??e.height??Wt.height,o=e.aliases?.filter(e=>typeof e==`string`&&e.trim()!==``).map(e=>`lucide-${e}`)??[],s=[...e.name?[`lucide-${e.name}`]:[],...o],c=t.className?.split(` `).filter(Boolean)??[],l=t.includeDefaultClasses===!1?Ut(...c):Ut(`lucide`,...s,...c),u=t.absoluteStrokeWidth?Number(t.strokeWidth??Wt[`stroke-width`])*Number(e.size??e.width??Wt.width)/Number(t.size??t.width??Wt.width):t.strokeWidth??Wt[`stroke-width`];return[`svg`,{...Object.entries(Wt).reduce((e,[t,n])=>(e[r(t)]=n,e),{}),...`color`in t&&t.color&&{[r(`stroke`)]:t.color},...`size`in t&&Gt(t.size)&&{[r(`width`)]:t.size,[r(`height`)]:t.size},...`width`in t&&Gt(t.width)&&{[r(`width`)]:t.width},...`height`in t&&Gt(t.height)&&{[r(`height`)]:t.height},[r(`stroke-width`)]:u,...l&&{[r(`class`)]:l},[r(`viewBox`)]:`0 0 ${i} ${a}`,...t.hasA11yProp===!1?{[r(`aria-hidden`)]:`true`}:{},...`attributes`in t&&t.attributes},e.node.map(e=>{let[n,i,a]=e,o=t.nonScalingStroke?{[r(`vector-effect`)]:`non-scaling-stroke`,...i}:i;return a?[n,o,a]:[n,o]})]}function qt(e,t={}){return Kt(e,{...t,attributeNames:{...t.attributeNames,class:`className`,"stroke-width":`strokeWidth`,"stroke-linecap":`strokeLinecap`,"stroke-linejoin":`strokeLinejoin`,"vector-effect":`vectorEffect`}})}var Jt=e=>{for(let t in e)if(t.startsWith(`aria-`)||t===`role`||t===`title`)return!0;return!1},Yt=(0,U.createContext)({}),Xt=()=>(0,U.useContext)(Yt),Zt=(0,U.forwardRef)(({color:e,size:t,width:n,height:r,strokeWidth:i,absoluteStrokeWidth:a,nonScalingStroke:o,className:s=``,children:c,iconNode:l=[],icon:u={node:l,aliases:[],size:24},...d},f)=>{let{size:p=24,strokeWidth:m=2,absoluteStrokeWidth:h=!1,nonScalingStroke:g=!1,color:_=`currentColor`,className:v=``}=Xt()??{},y=!!c||Jt(d),[b,x,S=[]]=qt(u,{color:e??_,width:n??t??p,height:r??t??p,strokeWidth:i??m,absoluteStrokeWidth:a??h,nonScalingStroke:o??g,className:Ut(v,s),hasA11yProp:y,attributes:d});return(0,U.createElement)(b,{ref:f,...x},[...S.map(([e,t])=>(0,U.createElement)(e,t)),...Array.isArray(c)?c:[c]])});function Qt(e,t=[],n=[]){let r=typeof e==`string`?Bt(e,t,n):e,i=(0,U.forwardRef)(({className:e,...t},n)=>(0,U.createElement)(Zt,{ref:n,icon:r,className:e,...t}));return r.name&&(i.displayName=Ht(r.name)),i}var $t={name:`arrow-down`,size:24,node:[[`path`,{d:`M12 5v14`,key:`s699le`}],[`path`,{d:`m19 12-7 7-7-7`,key:`1idqje`}]]};$t.node;var en=Qt($t),tn={name:`arrow-up`,size:24,node:[[`path`,{d:`m5 12 7-7 7 7`,key:`hav0vg`}],[`path`,{d:`M12 19V5`,key:`x0mq9r`}]]};tn.node;var nn=Qt(tn),rn={name:`book-open`,size:24,node:[[`path`,{d:`M12 5v16`,key:`1f6ucr`}],[`path`,{d:`M20.001 19A2 2 0 0022 17V5a2 2 0 00-1.999-2L16 3.002A5 5 0 0012 5a5 5 0 00-4-2H4a2 2 0 00-2 2v12a2 2 0 001.999 2H8a5 5 0 014 2 5 5 0 014-2z`,key:`1fyvmf`}]]};rn.node;var an=Qt(rn),on={name:`bug`,size:24,node:[[`path`,{d:`M12 20v-9`,key:`1qisl0`}],[`path`,{d:`M14 7a4 4 0 0 1 4 4v3a6 6 0 0 1-12 0v-3a4 4 0 0 1 4-4z`,key:`uouzyp`}],[`path`,{d:`M14.12 3.88 16 2`,key:`qol33r`}],[`path`,{d:`M21 21a4 4 0 0 0-3.81-4`,key:`1b0z45`}],[`path`,{d:`M21 5a4 4 0 0 1-3.55 3.97`,key:`5cxbf6`}],[`path`,{d:`M22 13h-4`,key:`1jl80f`}],[`path`,{d:`M3 21a4 4 0 0 1 3.81-4`,key:`1fjd4g`}],[`path`,{d:`M3 5a4 4 0 0 0 3.55 3.97`,key:`1d7oge`}],[`path`,{d:`M6 13H2`,key:`82j7cp`}],[`path`,{d:`m8 2 1.88 1.88`,key:`fmnt4t`}],[`path`,{d:`M9 7.13V6a3 3 0 1 1 6 0v1.13`,key:`1vgav8`}]]};on.node;var sn=Qt(on),cn={name:`calendar-clock`,size:24,node:[[`path`,{d:`M16 14v2.2l1.6 1`,key:`fo4ql5`}],[`path`,{d:`M16 2v3`,key:`otl347`}],[`path`,{d:`M21 7.338V5a2 2 0 00-2-2H5a2 2 0 00-2 2v14a2 2 0 002 2h2.338`,key:`7hb8p4`}],[`path`,{d:`M3 9h5.859`,key:`numkqi`}],[`path`,{d:`M8 2v3`,key:`1ioesn`}],[`circle`,{cx:`16`,cy:`16`,r:`6`,key:`qoo3c4`}]]};cn.node;var ln=Qt(cn),un={name:`check`,size:24,node:[[`path`,{d:`M20 6 9 17l-5-5`,key:`1gmf2c`}]]};un.node;var dn=Qt(un),fn={name:`chevron-down`,size:24,node:[[`path`,{d:`m6 9 6 6 6-6`,key:`qrunsl`}]]};fn.node;var pn=Qt(fn),mn={name:`chevron-up`,size:24,node:[[`path`,{d:`m18 15-6-6-6 6`,key:`153udz`}]]};mn.node;var hn=Qt(mn),gn={name:`circle-alert`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`line`,{x1:`12`,x2:`12`,y1:`8`,y2:`12`,key:`1pkeuh`}],[`line`,{x1:`12`,x2:`12.01`,y1:`16`,y2:`16`,key:`4dfq90`}]],aliases:[`alert-circle`]};gn.node;var _n=Qt(gn),vn={name:`circle-check`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`m16 9-5.5 5.5L8 12`,key:`xofnsj`}]],aliases:[`check-circle-2`]};vn.node;var yn=Qt(vn),bn={name:`circle-dashed`,size:24,node:[[`path`,{d:`M10.1 2.182a10 10 0 0 1 3.8 0`,key:`5ilxe3`}],[`path`,{d:`M13.9 21.818a10 10 0 0 1-3.8 0`,key:`11zvb9`}],[`path`,{d:`M17.609 3.721a10 10 0 0 1 2.69 2.7`,key:`1iw5b2`}],[`path`,{d:`M2.182 13.9a10 10 0 0 1 0-3.8`,key:`c0bmvh`}],[`path`,{d:`M20.279 17.609a10 10 0 0 1-2.7 2.69`,key:`1ruxm7`}],[`path`,{d:`M21.818 10.1a10 10 0 0 1 0 3.8`,key:`qkgqxc`}],[`path`,{d:`M3.721 6.391a10 10 0 0 1 2.7-2.69`,key:`1mcia2`}],[`path`,{d:`M6.391 20.279a10 10 0 0 1-2.69-2.7`,key:`1fvljs`}]]};bn.node;var xn=Qt(bn),Sn={name:`circle-dot`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`1`,key:`41hilf`}],[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}]]};Sn.node;var Cn=Qt(Sn),wn={name:`circle-x`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`m15 9-6 6`,key:`1uzhvr`}],[`path`,{d:`m9 9 6 6`,key:`z0biqf`}]],aliases:[`x-circle`]};wn.node;var Tn=Qt(wn),En={name:`circle`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}]]};En.node;var Dn=Qt(En),On={name:`clock`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M12 6v6l4 2`,key:`mmk7yg`}]]};On.node;var kn=Qt(On),An={name:`copy`,size:24,node:[[`rect`,{width:`14`,height:`14`,x:`8`,y:`8`,rx:`2`,ry:`2`,key:`17jyea`}],[`path`,{d:`M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2`,key:`zix9uf`}]]};An.node;var jn=Qt(An),Mn={name:`equal`,size:24,node:[[`line`,{x1:`5`,x2:`19`,y1:`9`,y2:`9`,key:`1nwqeh`}],[`line`,{x1:`5`,x2:`19`,y1:`15`,y2:`15`,key:`g8yjpy`}]]};Mn.node;var Nn=Qt(Mn),Pn={name:`eye-off`,size:24,node:[[`path`,{d:`M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49`,key:`ct8e1f`}],[`path`,{d:`M14.084 14.158a3 3 0 0 1-4.242-4.242`,key:`151rxh`}],[`path`,{d:`M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143`,key:`13bj9a`}],[`path`,{d:`m2 2 20 20`,key:`1ooewy`}]]};Pn.node;var Fn=Qt(Pn),In={name:`eye`,size:24,node:[[`path`,{d:`M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0`,key:`1nclc0`}],[`circle`,{cx:`12`,cy:`12`,r:`3`,key:`1v7zrd`}]]};In.node;var Ln=Qt(In),Rn={name:`flask-conical`,size:24,node:[[`path`,{d:`M14 2v6a2 2 0 0 0 .245.96l5.51 10.08A2 2 0 0 1 18 22H6a2 2 0 0 1-1.755-2.96l5.51-10.08A2 2 0 0 0 10 8V2`,key:`18mbvz`}],[`path`,{d:`M6.453 15h11.094`,key:`3shlmq`}],[`path`,{d:`M8.5 2h7`,key:`csnxdl`}]]};Rn.node;var zn=Qt(Rn),Bn={name:`loader-circle`,size:24,node:[[`path`,{d:`M21 12a9 9 0 1 1-6.219-8.56`,key:`13zald`}]],aliases:[`loader-2`]};Bn.node;var Vn=Qt(Bn),Hn={name:`minus`,size:24,node:[[`path`,{d:`M5 12h14`,key:`1ays0h`}]]};Hn.node;var Un=Qt(Hn),Wn={name:`octagon-alert`,size:24,node:[[`path`,{d:`M12 16h.01`,key:`1drbdi`}],[`path`,{d:`M12 8v4`,key:`1got3b`}],[`path`,{d:`M15.312 2a2 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-.586l-4.688-4.688A2 2 0 0 1 2 15.312V8.688a2 2 0 0 1 .586-1.414l4.688-4.688A2 2 0 0 1 8.688 2z`,key:`1fd625`}]],aliases:[`alert-octagon`]};Wn.node;var Gn=Qt(Wn),Kn={name:`search`,size:24,node:[[`path`,{d:`m21 21-4.34-4.34`,key:`14j7rj`}],[`circle`,{cx:`11`,cy:`11`,r:`8`,key:`4ej97u`}]]};Kn.node;var qn=Qt(Kn),Jn={name:`sparkles`,size:24,node:[[`path`,{d:`M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z`,key:`1s2grr`}],[`path`,{d:`M20 2v4`,key:`1rf3ol`}],[`path`,{d:`M22 4h-4`,key:`gwowj6`}],[`circle`,{cx:`4`,cy:`20`,r:`2`,key:`6kqj1y`}]],aliases:[`stars`]};Jn.node;var Yn=Qt(Jn),Xn={name:`wrench`,size:24,node:[[`path`,{d:`M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.106-3.105c.32-.322.863-.22.983.218a6 6 0 0 1-8.259 7.057l-7.91 7.91a1 1 0 0 1-2.999-3l7.91-7.91a6 6 0 0 1 7.057-8.259c.438.12.54.662.219.984z`,key:`1ngwbx`}]]};Xn.node;var Zn=Qt(Xn),Qn={name:`x`,size:24,node:[[`path`,{d:`M18 6 6 18`,key:`1bl5f8`}],[`path`,{d:`m6 6 12 12`,key:`d8bk6v`}]]};Qn.node;var $n=Qt(Qn),er=48,tr=(e,t=0)=>{let n=new Int32Array(e.length);for(let r=0;r<e.length;r++)n[r]=e.charCodeAt(r)-er-t;return n},nr=e=>{let t=new Int32Array(e.length+1);for(let n=0;n<e.length;n++)t[n+1]=t[n]+e[n];return t},rr=e=>{let t=new Int32Array(e.length),n=0;for(let r=0;r<e.length;r++){let i=e.charCodeAt(r)-er;n+=i>>>1^-(i&1),t[r]=n}return t},ir=384,ar=[],or=nr(tr(`E0500002005282000000002000150000020021820000011200000003022202000300004200120000200420001200021200301200010400162000010000220021010:2192001200220012000220012000200200200400010200040000000000400200108200110100000022010313000162002000020020012020080213000228200000000082000000000120002000120020020040101020300130001001010`)),sr=nr(tr(`:11111111211111119311546544411119731869:671397415686432441111111111161114151214313433415:78311132233313187211117221449443411141111151152226611131111112212518142224214215421421542142424242516171151615616347111111111197911327451111111111111111111113134714133513411111311111111111111111111112444411111342312715245411117:3`)),cr=`@containerabcdefghinlmoprstunderlineviawzccentlignnimatespectuto-colsrowsaglorightnessckdrop-sisbcontrastfiltergrayscalehue-rotateinvertopacityslurrightnessaturateepia-coniclinearpositionradialsizeockurrderttom-belrstxyespacing-xyaretoursorlnt-umnsendspantartainentrasteividerop-shadowurationcorationlay-xyasendillexontromlter-featuresstretchapr-xyayscaleidow-colsrowsue-rotatedentlinesetvert-beringsxyeshadoweiadingftnest-clamp-imageabein-lrstxyskx--b-coniclpositionrsizet-x-y-fromto-fromto-inearfromto-fromto-adialfromto-fromtofromtofromtofromtoblockhinlinew-screenesblockhinlinewbjectpacityrutlinederigin-offsetbelrstxyesrspective-originaceholderioghtng-offsettateundedw-xyz-belrstlreseslr-endspantartaturatecepiahizekewpace-taleroll-xyz-barmpbelrstxyesbelrstxyes-thumbrackadowrink-xyxyartrokeabextora-shadowpckingnsformitionlate-xyz-offsetill-changeoom`,lr=(()=>{let e=or.length-1,t=new Int32Array(e);for(let n=e-1;n>=0;n--){let e=1,r=n+1;for(let i=or[n];i<or[n+1];i++)e+=t[r],r+=t[r];t[n]=e}let n=new Int32Array(or[e]),r=0;for(let i=0;i<e;i++){let e=i+1;for(let a=or[i];a<or[i+1];a++)n[r++]=e,e+=t[e]}return n})(),ur=tr(`02000000000000900<=0?000B000F00F00ŏI0J0LNPRTVX0000]_a00000000000000000000000rst0000000zŏ00000000000
ŏ0000000ŏ00000000000000000000000000000000000000000000000000000000000000Ë000000000000000000000Þ000000000000000000ð0000000ø0ùúûüýþÿĀāĂ㥹Ć000000000000000000000000000000000000000000ħ0ĨĪ00000000000000000000ļĽ00000Ŭ000000`,1),dr=nr(tr(`123333359346463635126536711576`)),fr=tr(`93203242332583253248325D>E?F@03263243255B:032523853:0325B:8GA032542H<C=12727B:0328432553;D>E?3257D>032585:0325B:;0328B:032`),pr=tr(`012113445661666666789111:5;;;;;;;;444;;;:62999<1161=62>>?61:21@ABCD4446996:64E:::;:?::64:F114GHHIHHHHIHH1HH1HH1HHHHHH::EEJ4444::EE4444441691;644444114244444:;K6666555555555555555999666664444444444444444444444226?6:66644L9M?D:111::::6DE199`),mr=rr(`020200202020020020020020020020200200200200200200200002020202001003040106000200200200200200200200200200200200200200200200200200200200200200200200200200200200020020020020020020002020200202002002002002002002002002002020002002020020200220200200200200200200200200200200020020020000200020002000200200200020020020002000200200200020020202002020202000200200020022000200200020020002002000200220002002000200W0Z00020020002002020002002000200g0j0002002000200200020020002002000200200020020002000200002000002002002002002000200020000200002002002002002002002020020020200200200200200200200200202020020020020020020020020002002002020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020002002002002002002000200200200200200200200200200020202020002000200020002002002002000020200200`),hr=(()=>{let e=new Int32Array(319).fill(-1),t=rr(`02422242:222222242224222242442222222422222244442242226224222426222422442462222422622222222626222462242622422622422424242422222222422222222242422222222222222222622442224222222222222224424442262222222222222222222226224222424242422224422422422222`),n=rr(`02222222222222222222202222222222222222222222221422222222222222222222222222222222222Y\\222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222221422222222222222222222222222222222222222Ŀł222222222222222222`);for(let r=0;r<t.length;r++)e[t[r]]=n[r];return e})(),gr=`container |break-after- all auto avoid avoid-page column left page right|break-before- all auto avoid avoid-page column left page right|break-inside-a uto void void-column void-page|box-decoration- clone slice|box- border content| contents flow-root hidden table table-caption table-cell table-column table-column-group table-footer-group table-header-group table-row table-row-group| not-sr-only sr-only|float- end left none right start|clear- both end left none right start|isolat e ion-auto|overflow- auto clip hidden scroll visible|overflow-x- auto clip hidden scroll visible|overflow-y- auto clip hidden scroll visible|overscroll- auto contain none|overscroll-x- auto contain none|overscroll-y- auto contain none| absolute fixed relative static sticky| collapse invisible visible|justify- around baseline between center center-safe end end-safe evenly normal start stretch|justify-items- center center-safe end end-safe normal start stretch|justify-self- auto center center-safe end end-safe start stretch|items- baseline baseline-last center center-safe end end-safe start stretch|self- auto baseline baseline-last center center-safe end end-safe start stretch|place-content- around baseline between center center-safe end end-safe evenly start stretch|place-items- baseline center center-safe end end-safe start stretch|place-self- auto center center-safe end end-safe start stretch| antialiased subpixel-antialiased| italic not-italic|normal-nums |ordinal |slashed-zero | lining-nums oldstyle-nums| proportional-nums tabular-nums| diagonal-fractions stacked-fractions| no-underline overline| capitalize lowercase normal-case uppercase|truncate |whitespace- break-spaces normal nowrap pre pre-line pre-wrap|break- all keep normal words|wrap- anywhere break-word normal|hyphens- auto manual none|mix-blend- color color-burn color-dodge darken difference exclusion hard-light hue lighten luminosity multiply normal overlay plus-darker plus-lighter saturation screen soft-light|table- auto fixed|caption- bottom top|backface- hidden visible|appearance- auto none|scheme- dark light light-dark normal only-dark only-light|field-sizing- content fixed|pointer-events- auto none|resize -none -x -y|snap- align-none center end start|snap- always normal|snap- both none x y|snap- mandatory proximity|touch- auto manipulation none|touch-pan- left right x|touch-pan- down up y|touch-pinch-zoom |select- all auto none text|forced-color-adjust- auto none| normal size| baseline bottom middle sub super text-bottom text-top top| bounce none ping pulse spin| auto square video| auto fr max min px|none | auto full px| fixed local scroll|clip- border content padding text|origin- border content padding| bottom bottom-left bottom-right center left left-bottom left-top right right-bottom right-top top top-left top-right| no-repeat repeat repeat-round repeat-space repeat-x repeat-y| auto contain cover| gradient-to-b gradient-to-bl gradient-to-br gradient-to-l gradient-to-r gradient-to-t gradient-to-tl gradient-to-tr none|blend- color color-burn color-dodge darken difference exclusion hard-light hue lighten luminosity multiply normal overlay saturation screen soft-light|to- b bl br l r t tl tr| auto dvh fit full lh lvh max min px screen svh| dashed dotted double hidden none solid| collapse separate|px |auto |full | content none strict| inline-size size|layout |paint |style | around baseline between center center-safe end end-safe evenly normal start stretch| alias all-scroll auto cell col-resize context-menu copy crosshair default e-resize ew-resize grab grabbing help move n-resize ne-resize nesw-resize no-drop none not-allowed ns-resize nw-resize nwse-resize pointer progress row-resize s-resize se-resize sw-resize text vertical-text w-resize wait zoom-in zoom-out| dashed dotted double solid wavy| auto from-font|reverse |initial | in in-out initial linear out| col col-reverse row row-reverse| nowrap wrap wrap-reverse| auto initial none| black bold extrabold extralight light medium normal semibold thin| condensed expanded extra-condensed extra-expanded normal semi-condensed semi-expanded ultra-condensed ultra-expanded|flow- col col-dense dense row row-dense| none subgrid| auto dvh dvw fit full lh lvh lvw max min px screen svh svw| block flex grid table| auto dvw fit full lvw max min px screen svw| loose none normal px relaxed snug tight|through |item | inside outside| decimal disc none| auto px| clip-border clip-content clip-fill clip-padding clip-stroke clip-view no-clip| add exclude intersect subtract| alpha luminance match|origin- border content fill padding stroke view|type- alpha luminance| circle ellipse| closest-corner closest-side farthest-corner farthest-side|at- bottom bottom-left bottom-right center left left-bottom left-top right right-bottom right-top top top-left top-right| dvh fit full lh lvh max min none px screen svh| auto dvh dvw fit full lh lvh lvw max min none px screen svh svw| dvw fit full lvw max min none px screen svw| auto dvh dvw fit full lvh lvw max min none prose px svh svw| auto dvh dvw fit full lvh lvw max min none px screen svh svw| contain cover fill none scale-down| first last none| distant dramatic midrange near none normal|inset | full none|3d | auto smooth|gutter- auto both stable| auto none thin| inner none| auto dvh dvw fit full lvh lvw max min px svh svw|base | center end justify left right start| clip ellipsis| balance nowrap pretty wrap| normal tight tighter wide wider widest| cpu gpu none| 3d flat| all colors none opacity shadow transform| discrete normal| full px| auto dvh dvw fit full lvh lvw max min px screen svh svw| auto contents scroll transform`.split(`|`).map(e=>{let t=e.split(` `),n=t.shift();for(let e=0;e<t.length;e++)t[e]=n+t[e];return t}),_r=rr(`0000000000000000000000000000000000000000000000000000000000000262242:6@200000006:240B428:4422400002046044222426220026642642462026224222824220022400000000\\00N222422242222222224062242222222422226264222422222222222222442804222422222222222222222222220<4<0204260002444020204224422`),vr=rr(`ɠ222222222222222222222222222222222222222222222222222222222222˕4222226>ʶ22ʷʺʷ2ʸʷ42ʴ2ʓ22>621422ɶ222ɹɼɷɺɷɺ22ɱ42222ɨ2ɧ26622ɘɓ244ƸƵ222]d24242ǖǓƚÄȫ2263ȨȥȨ2222222ǣ222222222222222222ǂƽ2ƾƵ2222222422222ƜƑ22222222222222222222144Ŧţ22Ţş222222222222222222222ĸ2ı68ĦģĦɡŰ4Ġ«®ĝ822ĔđĔ2ē2222622`),yr=rr(`02222222222222222222222222222222222222222222222222222222222222222202022222222222EH2200IL021042222Y\\222IL0cf2e10j2222U00X202[^2y0000120|{~22
:22|22222222222G000qOVI00000}2>40000B00000I¨©000¬00000000000000021M®00°000000000000000000000222HGHa1º222¿2À2222ÉÌ000°2±`),br=new Int32Array(995),xr=new Int32Array(995),Sr=new Int32Array(995),Cr=``,wr=new Int32Array(1038);{let e=new Map,t=0,n=0;for(let r=0;r<_r.length;r++)for(let i of gr[yr[r]]){let a=e.get(i);a===void 0&&(a=t++,e.set(i,a),wr[a*2]=Cr.length,wr[a*2+1]=i.length,Cr+=i),br[n]=_r[r],xr[n]=vr[r],Sr[n]=a,n++}}var Tr=rr(`0b2N:222@R>F@286¦2@H2D266226FB22B2>BD\\6N22222Z222D222p`),Er=nr(tr(`1::24444432:442:44:44>222222:44:4421322511111311111114`)),Dr=rr(`24A;33N=C@H4A;33N=C@<27;83:;8393NQ:3NQʰ222ˉºŴŽ2R2=18cƴÅŇ=cĞÛC1ƈǝȈ:ħ25=11D3A@4=<1;1DEr25;11B3?<6;:371BCn9@7=<8192>2E121@9@EHE@9>2T25511<398454131<=V25511<398454131<=ƧNž2Đå242L222290000f22500ɛ000ǘ222`),Or=tr(`ij`),kr=tr(``),Ar=tr(`1`),jr={GROUP_COUNT:ir,customValidatorNames:ar,edgeStart:or,labelStart:sr,labelText:cr,edgeTarget:lr,nodeGroup:ur,nodeVlist:hr,vlistPat:dr,vlistOps:fr,vlistRef:pr,vlistGroup:mr,litAnchor:br,litGroup:xr,litPool:Sr,poolOffsets:wr,poolText:Cr,adjGid:Tr,adjStart:Er,adjTgt:Dr,patGid:Or,patTgt:kr,postfixLookupGroups:Ar,orderSensitiveModifiers:`* ** after backdrop before details-content file first-letter first-line marker placeholder selection`},Mr=`line`in Error(),Nr=-1,Pr=-1,Fr=(e,t,n)=>{let r=2166136261;for(let i=t;i<n;i++)r=Math.imul(r^e.charCodeAt(i),16777619);return r},Ir=(e,t,n)=>{let r=n-t,i=Math.imul(r,2654435761)^e.charCodeAt(t);if(r>3){let a=r>>2,o=r>>1;i=Math.imul(i^e.charCodeAt(t+1)<<8^e.charCodeAt(t+2)<<16^e.charCodeAt(t+a),2246822507),i=Math.imul(i^e.charCodeAt(t+o)<<8^e.charCodeAt(t+o+a)<<16^e.charCodeAt(n-3),3266489909),i^=e.charCodeAt(n-2)<<8^e.charCodeAt(n-1)<<16;for(let r=t+3,a=n-4;r<t+8&&r<a;r++,a--)i=Math.imul(i^e.charCodeAt(r)^e.charCodeAt(a)<<8,16777619)}return i^i>>>15},Lr=(e,t,n={})=>{let{GROUP_COUNT:r,edgeStart:i,labelStart:a,labelText:o,edgeTarget:s,nodeGroup:c,nodeVlist:l,vlistPat:u,vlistOps:d,vlistRef:f,vlistGroup:p,litAnchor:m,litGroup:h,litPool:g,poolOffsets:_,poolText:v,adjGid:y,adjStart:b,adjTgt:x,patGid:S,patTgt:C,postfixLookupGroups:w,customValidatorNames:T,orderSensitiveModifiers:E}=e,D=new Int32Array(r).fill(-1);for(let e=0;e<y.length;e++)D[y[e]]=e;let O=0;for(let e=0;e+1<b.length;e++){let t=b[e+1]-b[e];t>O&&(O=t)}let k=32;for(;k<2*(1+O+S.length);)k<<=1;let A=new Int32Array(f.length+1);for(let e=0;e<f.length;e++)A[e+1]=A[e]+u[f[e]+1]-u[f[e]];let j=new Uint8Array(r);for(let e=0;e<w.length;e++)j[w[e]]=1;let M=i.length-1,N=new Uint8Array(M),P=0,F=!0;for(let e=0;e<m.length;e++){N[m[e]]=1;let t=_[g[e]*2+1];t>P&&(P=t);let n=v.charCodeAt(_[g[e]*2]);(n===91||n===40)&&(F=!1)}let I=1;for(;I<m.length*2;)I<<=1;let L=new Int32Array(I).fill(-1);for(let e=0;e<m.length;e++){let t=_[g[e]*2],n=(Fr(v,t,t+_[g[e]*2+1])^Math.imul(m[e],2654435761)|0)&I-1;for(;L[n]!==-1;)n=n+1&I-1;L[n]=e}let R=(e,t,n,r)=>{let i=(Fr(t,n,r)^Math.imul(e,2654435761)|0)&I-1,a=r-n;for(;;){let r=L[i];if(r===-1)return-1;if(m[r]===e&&_[g[r]*2+1]===a){let e=_[g[r]*2],i=!0;for(let r=0;r<a;r++)if(v.charCodeAt(e+r)!==t.charCodeAt(n+r)){i=!1;break}if(i)return h[r]}i=i+1&I-1}},z=n.cacheSize??8192,B=n.prefix??e.prefix??``,ee=B===``?``:B+`:`,V=ee.length,te=(T??[]).map(e=>{let n=t&&t[e];if(!n)throw Error(`cn: missing validator `+e);return n}),ne=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,H=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,re=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,ie=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,ae=0,oe=-1,se=-1,ce=-1,le=-1,ue=e=>e>=97&&e<=122||e>=65&&e<=90||e>=48&&e<=57||e===95,de=e=>/\s/.test(String.fromCharCode(e)),fe=(e,t,n)=>{if(ae=0,oe=-1,n-t<3)return;let r=e.charCodeAt(t),i=e.charCodeAt(n-1);if(r===91&&i===93)ae=1;else if(r===40&&i===41)ae=2;else return;ce=t+1,le=n-1;let a=t+1;if(ue(e.charCodeAt(a))){for(a++;a<n-1;){let t=e.charCodeAt(a);if(!ue(t)&&t!==45)break;a++}a<n-2&&e.charCodeAt(a)===58&&(oe=t+1,se=a,ce=a+1)}},pe=(e,t,n,r)=>{if(n-t!==r.length)return!1;for(let n=0;n<r.length;n++)if(e.charCodeAt(t+n)!==r.charCodeAt(n))return!1;return!0},U=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,W=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,me=e=>!!e&&!Number.isNaN(Number(e)),he=(e,t,n)=>{if(n-t<11||!pe(e,t,t+10,`@container`))return!1;if(e.charCodeAt(t+10)===47)return n-t>=12;let r=e.charCodeAt(t+11);return r===115&&n-t>=17&&pe(e,t+10,t+16,`-size/`)||r===110&&n-t>=19&&pe(e,t+10,t+18,`-normal/`)},ge=[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2],G=`length|number|number weight|family-name|position percentage|length size bg-size|image url|shadow|length|family-name|position percentage|length size bg-size|image url|shadow|number weight`.split(`|`).map(e=>e.split(` `)),_e=[2,3,1,0,0,0,4,5,0,0,0,0,0,1,1],ve=(e,t,n,r)=>{if(e>=10){if(e>=25)return te[e-25](t.slice(n,r));let i=e-10;if(ae!==ge[i])return!1;if(oe>=0){for(let e of G[i])if(pe(t,oe,se,e))return!0;return!1}switch(_e[i]){case 0:return!1;case 1:return!0;case 2:{let e=t.slice(ce,le);return ne.test(e)&&!H.test(e)}case 3:return me(t.slice(ce,le));case 4:return ie.test(t.slice(ce,le));default:return re.test(t.slice(ce,le))}}switch(e){case 0:return!0;case 1:return ae===0;case 2:return ae===1;case 3:return ae===2;case 4:return U.test(t.slice(n,r));case 5:return me(t.slice(n,r));case 6:{let e=t.slice(n,r);return!!e&&Number.isInteger(Number(e))}case 7:return r>n&&t.charCodeAt(r-1)===37&&me(t.slice(n,r-1));case 8:return W.test(t.slice(n,r));default:return he(t,n,r)}},ye=new Set(typeof E==`string`?E.split(` `):E),be=(e,t,n,r,i,a)=>{let o=Fr(t,n,r)^(i?2654435769:0),s=e.get(o);if(s!==void 0)outer:for(let e=0;e<s.length;e++){let a=s[e];if(a.imp===i&&a.k.length===r-n){for(let e=0;e<a.k.length;e++)if(a.k.charCodeAt(e)!==t.charCodeAt(n+e))continue outer;return a.id}}else e.set(o,s=[]);let c=t.slice(n,r),l=a(c);return s.push({k:c,imp:i,id:l}),l},xe=new Map,Se=new Map,Ce=2,we=4096,Te=(e,t)=>{let n=[],r=0,i=0,a=0;for(let t=0;t<e.length;t++){let o=e.charCodeAt(t);r===0&&i===0&&o===58?(n.push(e.slice(a,t)),a=t+1):o===91?r++:o===93?r--:o===40?i++:o===41&&i--}n.push(e.slice(a));let o=n[0];if(n.length>1){let e=[],t=[];for(let r of n)r.charCodeAt(0)===91||ye.has(r)?(t.length&&(e.push(...t.sort()),t=[]),e.push(r)):t.push(r);t.length&&e.push(...t.sort()),o=e.join(`:`)}let s=t?o+` !`:o,c=Se.get(s);return c===void 0&&Se.set(s,c=Ce++),c},Ee=new Map,De=r,Oe=r+4096,ke=()=>De++,Ae=2097152,je=8192,Me=new Int32Array(je),Ne=Array(je).fill(null),Pe=new Int32Array(je),Fe=new Int32Array(je),Ie=new Uint8Array(je),Le=0,Re=(e,t,n,r,i,a,o,s)=>{let c=e;if(Ne[e]!==null){if(Ne[e|1]===null)c=e|1;else if(!(Le++&3))c=e|Le>>2&1;else return}Ne[c]=t.slice(n,r),Me[c]=i,Pe[c]=a,Fe[c]=o,Ie[c]=s},ze=()=>Ne.fill(null),Be=256,Ve=[new Int32Array(Be),new Int32Array(Be),new Int32Array(Be),new Int32Array(Be)],[He,Ue,We,Ge]=Ve,Ke=new Uint8Array(Be),qe=new Uint8Array(Be),Je=()=>{Be*=2,Ve=Ve.map(e=>{let t=new Int32Array(Be);return t.set(e),t}),[He,Ue,We,Ge]=Ve;let e=new Uint8Array(Be);e.set(Ke),Ke=e,qe=new Uint8Array(Be)},Ye=64,Xe=new Int32Array(Ye),Ze=new Int32Array(Ye),Qe=new Int32Array(r),$e=2048,et=21,tt=new Float64Array($e),nt=new Int32Array($e),rt=0,it=(e,t)=>{if(e===0&&t<r)return Qe[t]===rt?1:(Qe[t]=rt,0);let n=e*2097152+t+1,i=Math.imul(n,2654435761)>>>et;for(;nt[i]===rt;){if(tt[i]===n)return 1;i=i+1&$e-1}return tt[i]=n,nt[i]=rt,0},at=(e,t,n,r,i)=>{if(n-t>=2&&e.charCodeAt(t)===91&&e.charCodeAt(n-1)===93){let r=-1;for(let i=t+1;i<n-1;i++)if(e.charCodeAt(i)===58){r=i;break}return r===-1||r===t+1?Nr:be(Ee,e,t+1,r,0,ke)}if(r>=0&&c[r]>=0)return c[r];for(let t=i-1;t>=0;t--){let r=Ze[t];if(r>n)continue;let i=Xe[t],a=n-r;if(N[i]===1&&a>0&&a<=P){let t=e.charCodeAt(r);if(F===!1||t!==91&&t!==40){let t=R(i,e,r,n);if(t>=0)return t}}let o=l[i];if(o<0)continue;let s=f[o],c=u[s],m=u[s+1];if(c===m)continue;fe(e,r,n);let h=A[o]-c;for(let t=c;t<m;t++)if(ve(d[t],e,r,n))return p[h+t]}return Nr},ot=e=>{let t=e.length,n=0,c=0,u=!1;(Ce>we||xe.size>we)&&(xe=new Map,Se=new Map,Ce=2,ze()),De>Oe&&(Ee=new Map,De=r,ze());let d=0;for(;d<t;){let f=e.charCodeAt(d);if(f===32||f>=9&&f<=13||f>=160&&de(f)){f!==32&&(u=!0),d++;continue}let p=d,m=0;for(;d<t;){if(f=e.charCodeAt(d),f<=32){if(f===32)break;if(f>=9&&f<=13){u=!0;break}}else if(f>=160&&de(f)){u=!0;break}m=Math.imul(m^f,16777619),d++}let h=d,g=h-p;n===Be&&Je();let _=n++;He[_]=p,Ue[_]=h,c+=g,m^=Math.imul(g,2654435761);let v=m^m>>>15,y=v&8190;{let t=-1;if(Me[y]===v&&Ne[y]!==null&&Ne[y].length===g?t=y:Me[y|1]===v&&Ne[y|1]!==null&&Ne[y|1].length===g&&(t=y|1),t>=0){let n=Ne[t],r=!0;for(let t=0;t<g;t++)if(n.charCodeAt(t)!==e.charCodeAt(p+t)){r=!1;break}if(r){We[_]=Pe[t],Ge[_]=Fe[t],Ke[_]=Ie[t];continue}}}let b=p;if(V!==0){if(h-p<=V||!e.startsWith(ee,p)){We[_]=Nr,Re(y,e,p,h,v,Nr,0,0);continue}b=p+V}let x=0,S=0,C=-1,w=-1;for(let t=b;t<h;t++){let n=e.charCodeAt(t);if(x===0&&S===0){if(n===58){C=t;continue}if(n===47){w=t;continue}}n===91?x++:n===93?x--:n===40?S++:n===41&&S--}let T=C>=b?C+1:b,E=T,D=h,O=!1,k=0;D>E&&e.charCodeAt(D-1)===33?(O=!0,D--):D>E&&e.charCodeAt(E)===33&&(O=!0,E++,k=1);let A=-1;w>T&&(A=w+k,A>=D&&(A=-1));let M=E;D-E>1&&e.charCodeAt(E)===45&&(M=E+1);let P=0,F=0,I=0,L=-1,R=0;(l[0]>=0||N[0]===1)&&(Xe[0]=0,Ze[0]=M,R=1);let z=Pr,B=0;for(let t=M;t<D;t++)if(t===A&&(z=F<I?Pr:P,B=R),P!==Pr){let n=e.charCodeAt(t),r=-1;if(F<I)o.charCodeAt(F)===n?(F++,F===I&&(r=P=L)):P=Pr;else{let e=i[P],t=i[P+1],c=Pr;for(let i=e;i<t;i++){let e=a[i];if(o.charCodeAt(e)===n){a[i+1]-e===1?r=c=s[i]:(F=e+1,I=a[i+1],L=s[i],c=P);break}}P=c}if(r>=0&&(l[r]>=0||N[r]===1)&&t+1<D&&e.charCodeAt(t+1)===45){if(R===Ye){Ye*=2;let e=new Int32Array(Ye);e.set(Xe),Xe=e;let t=new Int32Array(Ye);t.set(Ze),Ze=t}Xe[R]=r,Ze[R]=t+2,R++}}A===D&&(z=F<I?Pr:P,B=R);let te=F<I?Pr:P,ne,H=!1;if(A>=0){if(H=!0,ne=at(e,E,A,z,B),ne!==Nr&&ne<r&&j[ne]){let t=at(e,E,D,te,R);t!==Nr&&t!==ne&&(ne=t,H=!1)}else ne===Nr&&(ne=at(e,E,D,te,R),H=!1)}else ne=at(e,E,D,te,R);let re=0,ie=0;ne===Nr?We[_]=Nr:(ie=+!!H,re=b>=C?+!!O:be(xe,e,b,C,+!!O,e=>Te(e,O)),We[_]=ne,Ke[_]=ie,Ge[_]=re),Re(y,e,p,h,v,ne,re,ie)}if(n===0)return``;if(n===1)return He[0]===0&&Ue[0]===t?e:e.slice(He[0],Ue[0]);if(n*k>$e){for(;n*k>$e;)$e<<=1,et--;tt=new Float64Array($e),nt=new Int32Array($e)}if(Ce>=Ae||De>=Ae)throw Error(`cn: too many distinct classes in one merge`);rt=rt+1|0,rt===0&&(Qe.fill(0),nt.fill(0),rt=1);let f=!1;for(let e=n-1;e>=0;e--){let t=We[e];if(t===Nr){qe[e]=1;continue}let n=Ge[e];if(it(n,t)===1)qe[e]=0,f=!0;else if(qe[e]=1,t<r){let r=D[t];if(r>=0)for(let e=b[r];e<b[r+1];e++)it(n,x[e]);if(Ke[e]&1)for(let e=0;e<S.length;e++)S[e]===t&&it(n,C[e])}}if(!f&&!u&&t===c+n-1)return e;let p=``,m=0;for(;m<n;){if(!qe[m]){m++;continue}let t=He[m],r=Ue[m],i=m+1;for(;i<n&&qe[i]&&He[i]===r+1&&e.charCodeAt(r)===32;)r=Ue[i],i++;p.length>0&&(p+=` `),p+=e.slice(t,r),m=i}return p},st=16384,ct=new Int32Array(st*2),lt=0,ut=1,dt=Object.create(null),ft=Object.create(null),pt=new Map,mt=new Map,ht=0,gt=0,_t=()=>{lt^=st,ut=ut+1|0,gt=0},vt=e=>{let t=dt[e];if(t!==void 0)return t;let n=Ir(e,0,e.length),r=(n&16383)+lt,i=ct[r]===(n^ut)||ct[r^st]===(n^ut-1);return i&&(t=ft[e],t!==void 0)?(dt[e]=t,t):(t=ot(e),i?(dt[e]=t,++ht>z&&(ht=0,ft=dt,dt=Object.create(null),_t())):(ct[r]=n^ut,++gt>st&&_t()),t)},yt=e=>{let t=pt.get(e);if(t!==void 0)return t;let n=Ir(e,0,e.length),r=(n&16383)+lt,i=ct[r]===(n^ut)||ct[r^st]===(n^ut-1);return i&&(t=mt.get(e),t!==void 0)?(pt.set(e,t),t):(t=ot(e),i?(pt.set(e,t),++ht>z&&(ht=0,mt=pt,pt=new Map,_t())):(ct[r]=n^ut,++gt>st&&_t()),t)},bt=e=>{let t=Ir(e,0,e.length),n=(t&16383)+lt;return ct[n]===(t^ut)||ct[n^st]===(t^ut-1)||(ct[n]=t^ut,++gt>st&&_t(),!1)},xt=z===0?ot:Mr?e=>{let t=pt.get(e);return t===void 0?yt(e):t}:vt;return{merge:function(){return arguments.length===1&&typeof arguments[0]==`string`?xt(arguments[0]):xt(Br.apply(null,arguments))},mergeString:xt,seenBefore:z===0?()=>!1:bt,mergeUncached:ot}},Rr=(e,t)=>{if(!e)return``;if(typeof e==`string`)return e;let n=``;if(typeof e.length==`number`&&(!t||Array.isArray(e))){let r=e;for(let e=0;e<r.length;e++){let i=r[e];if(!i)continue;let a=typeof i==`string`?i:Rr(i,t);a&&(n&&(n+=` `),n+=a)}return n}if(t){if(typeof e==`number`)return``+e;if(typeof e==`object`)for(let t in e)e[t]&&(n&&(n+=` `),n+=t)}return n},zr=(e,t)=>{let n=``;for(let r=0;r<e.length;r++){let i=e[r];if(!i)continue;let a=typeof i==`string`?i:Rr(i,t);a&&(n&&(n+=` `),n+=a)}return n},Br=function(){return zr(arguments,!1)},Vr=256,Hr=16,Ur=1024,Wr=4096,Gr=(e,t)=>{let n=t===void 0?()=>!0:t.seenBefore,r=t===void 0?e:t.mergeUncached,i=new Map,a=new Map,o=0,s=null,c=null,l=[],u=[],d=0,f=(t,n,r)=>{c===null&&(c=Array(Wr).fill(``),l=Array(Wr).fill(``),u=Array(Wr).fill(``));let i=Ir(t,0,t.length)&4094;if(c[i]===t&&l[i]===n)return u[i];if(c[i|1]===t&&l[i|1]===n)return u[i|1];let a=e(r?n+` `+t:t),o=c[i]===``?i:i|(c[i|1]===``?1:d++&1);return c[o]=t,l[o]=n,u[o]=a,a},p=(e,t,n,r)=>{let i=0;if(t){if(t!==e.a0)return!1;i=1}if(n){if(n!==(i===0?e.a0:e.a1))return!1;i++}if(r){if(r!==(i===0?e.a0:i===1?e.a1:e.a2))return!1;i++}return i===e.t},m=(e,t)=>{let n=e.a,r=0;for(let e=0;e<t.length;e++){let i=t[e];if(i){if(i!==n[r])return!1;r++}}return r===e.t},h=(t,c)=>{let l=t.length,u=s===null?null:s.n;if(!c){if(u!==null&&m(u,t))return s=u,u.r;if(s!==null&&s!==u&&m(s,t))return s.r}let d=``,p=-1,h=0,g=!1;for(let e=0;e<l;e++){let n=t[e];if(n){if(typeof n!=`string`){if(n=t[e]=Rr(n,!0),!n)continue;g=!0}p<0&&(d=n,p=e),h++}}if(h===0)return``;if(h===1)return e(d);if(g){if(u!==null&&m(u,t))return s=u,u.r;if(s!==null&&s!==u&&m(s,t))return s.r}let _=i.get(d);_===void 0&&(_=a.get(d),_!==void 0&&i.set(d,_));let v=null;if(_!==void 0){if(_.skip>0){_.skip--,s=null;let e=d;for(let n=p+1;n<l;n++){let r=t[n];r&&(e+=` `+r)}return f(e,``,!1)}let e=_.e;outer:for(let n=0;n<e.length;n++){let r=e[n];if(r.t!==h)continue;let i=r.a,a=1;for(let e=p+1;e<l;e++){let n=t[e];if(n&&n!==i[a++])continue outer}v=r;break}v!==null&&(_.miss=0)}if(v===null){let s=d,c=[d];for(let e=p+1;e<l;e++){let n=t[e];n&&(s+=` `+n,c.push(n))}if(!n(s))return r(s);v={r:e(s),t:c.length,a0:c[0],a1:c[1],a2:c[2]??``,a:c,n:null},_===void 0?i.set(d,_={e:[],miss:0,skip:0,at:0}):++_.miss>Hr&&(_.miss=Hr,_.skip=Ur,_.e.length=0,_.at=0);let u=_.e;u.length<Vr?u.push(v):(u[_.at]=v,_.at=_.at+1&255),++o>1e3&&(o=0,a=i,i=new Map)}return s!==null&&s!==v&&(s.n=v),s=v,v.r},g=t=>Array.isArray(t)?h(t.slice(),!1):e(Rr(t,!0));return function(t,n,r){let a=arguments.length;if((a|1)==3){let e=s;if(e!==null){let i=e.n;if(i!==null&&p(i,t,n,r))return s=i,i.r;if(e!==i&&p(e,t,n,r))return e.r}if(a===2&&typeof n==`string`&&n!==``){let e=i.get(t);if(e!==void 0&&e.skip>0)return e.skip--,s=null,f(n,t,!0)}return h([t,n,r],!0)}if(a===1)return typeof t==`string`?e(t):g(t);let o=s;if(o!==null){let e=o.n;if(e!==null){let t=e.a,n=0,r=!0;for(let e=0;e<a;e++){let i=arguments[e];if(i){if(i!==t[n]){r=!1;break}n++}}if(r&&n===e.t)return s=e,e.r}if(o!==e){let e=o.a,t=0,n=!0;for(let r=0;r<a;r++){let i=arguments[r];if(i){if(i!==e[t]){n=!1;break}t++}}if(n&&t===o.t)return o.r}}let c=[];for(let e=0;e<a;e++)c.push(arguments[e]);return h(c,!0)}},Kr=Lr(jr),K=Gr(Kr.mergeString,Kr);Kr.merge;function qr(e){if(!e||typeof document>`u`)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))}var Jr=e=>{switch(e){case`success`:return Zr;case`info`:return $r;case`warning`:return Qr;case`error`:return ei;default:return null}},Yr=Array(12).fill(0),Xr=({visible:e,className:t})=>U.createElement(`div`,{className:[`sonner-loading-wrapper`,t].filter(Boolean).join(` `),"data-visible":e},U.createElement(`div`,{className:`sonner-spinner`},Yr.map((e,t)=>U.createElement(`div`,{className:`sonner-loading-bar`,key:`spinner-bar-${t}`})))),Zr=U.createElement(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 20 20`,fill:`currentColor`,height:`20`,width:`20`,"aria-hidden":`true`},U.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`})),Qr=U.createElement(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 24 24`,fill:`currentColor`,height:`20`,width:`20`,"aria-hidden":`true`},U.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`})),$r=U.createElement(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 20 20`,fill:`currentColor`,height:`20`,width:`20`,"aria-hidden":`true`},U.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`})),ei=U.createElement(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 20 20`,fill:`currentColor`,height:`20`,width:`20`,"aria-hidden":`true`},U.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`})),ti=U.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`,"aria-hidden":`true`},U.createElement(`line`,{x1:`18`,y1:`6`,x2:`6`,y2:`18`}),U.createElement(`line`,{x1:`6`,y1:`6`,x2:`18`,y2:`18`})),ni=()=>{let[e,t]=U.useState(document.hidden);return U.useEffect(()=>{let e=()=>{t(document.hidden)};return document.addEventListener(`visibilitychange`,e),()=>document.removeEventListener(`visibilitychange`,e)},[]),e},ri=1,ii=100,ai=e=>typeof e?.id==`number`||e?.id?.length>0?e.id:ri++,oi=new class{constructor(){this.subscribe=e=>(this.subscribers.push(e),this.getActiveToasts().forEach(t=>e(t)),()=>{let 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.trimHistory()},this.trimHistory=()=>{let e=this.toasts.length-ii;e<=0||(this.toasts=this.toasts.filter(t=>e>0&&this.dismissedToasts.has(t.id)?(this.dismissedToasts.delete(t.id),e--,!1):!0))},this.create=e=>{let{message:t,...n}=e,r=ai(e),i=this.pendingDismissals.get(r);i!==void 0&&(cancelAnimationFrame(i),this.pendingDismissals.delete(r),this.dismissedToasts.delete(r));let a=this.dismissedToasts.has(r),o=e.dismissible===void 0||e.dismissible;return a&&(this.dismissedToasts.delete(r),this.toasts=this.toasts.filter(e=>e.id!==r)),!a&&this.toasts.find(e=>e.id===r)?this.toasts=this.toasts.map(n=>n.id===r?(this.publish({...n,...e,id:r,title:t}),{...n,...e,id:r,dismissible:o,title:t}):n):this.addToast({title:t,...n,dismissible:o,id:r}),r},this.dismiss=e=>{if(e==null)return this.getActiveToasts().forEach(e=>{this.dismissedToasts.add(e.id),this.subscribers.forEach(t=>t({id:e.id,dismiss:!0}))}),e;this.dismissedToasts.add(e);let t=this.pendingDismissals.get(e);return t!==void 0&&cancelAnimationFrame(t),this.pendingDismissals.set(e,requestAnimationFrame(()=>{this.pendingDismissals.delete(e),this.subscribers.forEach(t=>t({id:e,dismiss:!0}))})),e},this.message=(e,t)=>this.create({...t,message:e,type:void 0}),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;t.loading!==void 0&&(n=this.create({...t,promise:e,type:`loading`,message:t.loading,description:typeof t.description==`function`?void 0:t.description}));let r=Promise.resolve(e instanceof Function?e():e),i=n!==void 0,a,o=r.then(async e=>{if(a=[`resolve`,e],U.isValidElement(e))i=!1,this.create({id:n,type:`default`,message:e});else if(ci(e)&&!e.ok){i=!1;let r=typeof t.error==`function`?await t.error(`HTTP error! status: ${e.status}`):t.error,a=typeof t.description==`function`?await t.description(`HTTP error! status: ${e.status}`):t.description,o=typeof r==`object`&&!U.isValidElement(r)?r:{message:r};this.create({id:n,type:`error`,description:a,...o})}else if(e instanceof Error){i=!1;let r=typeof t.error==`function`?await t.error(e):t.error,a=typeof t.description==`function`?await t.description(e):t.description,o=typeof r==`object`&&!U.isValidElement(r)?r:{message:r};this.create({id:n,type:`error`,description:a,...o})}else if(t.success!==void 0){i=!1;let r=typeof t.success==`function`?await t.success(e):t.success,a=typeof t.description==`function`?await t.description(e):t.description,o=typeof r==`object`&&!U.isValidElement(r)?r:{message:r};this.create({id:n,type:`success`,description:a,...o})}}).catch(async e=>{if(a=[`reject`,e],t.error!==void 0){i=!1;let r=typeof t.error==`function`?await t.error(e):t.error,a=typeof t.description==`function`?await t.description(e):t.description,o=typeof r==`object`&&!U.isValidElement(r)?r:{message:r};this.create({id:n,type:`error`,description:a,...o})}}).finally(()=>{i&&(this.dismiss(n),n=void 0),t.finally==null||t.finally.call(t)}),s=()=>new Promise((e,t)=>o.then(()=>a[0]===`reject`?t(a[1]):e(a[1])).catch(t));return typeof n!=`string`&&typeof n!=`number`?{unwrap:s}:Object.assign(n,{unwrap:s})},this.custom=(e,t)=>{let n=ai(t);return this.create({...t,jsx:e(n),id:n,type:void 0}),n},this.getActiveToasts=()=>this.toasts.filter(e=>!this.dismissedToasts.has(e.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set,this.pendingDismissals=new Map}},si=(e,t)=>oi.message(e,t),ci=e=>e&&typeof e==`object`&&`ok`in e&&typeof e.ok==`boolean`&&`status`in e&&typeof e.status==`number`,li=Object.assign(si,{success:oi.success,info:oi.info,warning:oi.warning,error:oi.error,custom:oi.custom,message:oi.message,promise:oi.promise,dismiss:oi.dismiss,loading:oi.loading},{getHistory:()=>oi.toasts,getToasts:()=>oi.getActiveToasts()});qr(`[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;flex:1;min-width:0}[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(--normal-text);background:var(--normal-bg);border:1px solid var(--normal-border);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]{-webkit-user-select:none;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%)}`);function ui(e){return e.label!==void 0}var di=3,fi=`24px`,pi=`16px`,mi=4e3,hi=356,gi=14,_i=45,vi=200;function yi(...e){return e.filter(Boolean).join(` `)}function bi(e){let[t,n]=e.split(`-`),r=[];return t&&r.push(t),n&&r.push(n),r}var xi=e=>{let{invert:t,toast:n,unstyled:r,interacting:i,setHeights:a,visibleToasts:o,heights:s,index:c,toasts:l,expanded:u,removeToast:d,defaultRichColors:f,closeButton:p,style:m,cancelButtonStyle:h,actionButtonStyle:g,className:_=``,descriptionClassName:v=``,duration:y,position:b,gap:x,expandByDefault:S,classNames:C,icons:w,closeButtonAriaLabel:T=`Close toast`}=e,[E,D]=U.useState(null),[O,k]=U.useState(null),[A,j]=U.useState(!1),[M,N]=U.useState(!1),[P,F]=U.useState(!1),[I,L]=U.useState(!1),[R,z]=U.useState(!1),[B,ee]=U.useState(0),[V,te]=U.useState(0),ne=U.useRef(n.duration||y||mi),H=U.useRef(null),re=U.useRef(null),ie=c===0,ae=c+1<=o,oe=n.type,se=oe??`default`,ce=n.dismissible!==!1,le=n.className||``,ue=n.descriptionClassName||``,de=U.useMemo(()=>s.findIndex(e=>e.toastId===n.id)||0,[s,n.id]),fe=U.useMemo(()=>n.closeButton??p,[n.closeButton,p]),pe=U.useMemo(()=>n.duration||y||mi,[n.duration,y]),W=U.useRef(0),me=U.useRef(0),he=U.useRef(0),ge=U.useRef(null),[G,_e]=b.split(`-`),ve=U.useMemo(()=>s.reduce((e,t,n)=>n>=de?e:e+t.height,0),[s,de]),ye=ni(),be=U.useMemo(()=>e.swipeDirections??bi(b),[e.swipeDirections,b]),xe=n.invert||t,Se=oe===`loading`;me.current=U.useMemo(()=>de*x+ve,[de,ve]),U.useEffect(()=>{ne.current=pe},[pe]),U.useEffect(()=>{j(!0)},[]),U.useEffect(()=>{let e=re.current;if(e){let t=e.getBoundingClientRect().height;return te(t),a(e=>[{toastId:n.id,height:t,position:n.position},...e]),()=>a(e=>e.filter(e=>e.toastId!==n.id))}},[a,n.id]),U.useLayoutEffect(()=>{if(!A)return;let e=re.current,t=e.style.height;e.style.height=`auto`;let r=e.getBoundingClientRect().height;e.style.height=t,te(r),a(e=>e.find(e=>e.toastId===n.id)?e.map(e=>e.toastId===n.id?{...e,height:r}:e):[{toastId:n.id,height:r,position:n.position},...e])},[A,n.title,n.description,a,n.id,n.jsx,n.action,n.cancel]);let Ce=U.useCallback(()=>{N(!0),ee(me.current),a(e=>e.filter(e=>e.toastId!==n.id)),setTimeout(()=>{d(n)},vi)},[n,d,a,me]);U.useEffect(()=>{if(n.promise&&oe===`loading`||n.duration===1/0||n.type===`loading`)return;let e;return u||i||ye?(()=>{if(he.current<W.current){let e=new Date().getTime()-W.current;ne.current-=e}he.current=new Date().getTime()})():ne.current!==1/0&&(W.current=new Date().getTime(),e=setTimeout(()=>{n.onAutoClose==null||n.onAutoClose.call(n,n),Ce()},ne.current)),()=>clearTimeout(e)},[u,i,n,oe,ye,Ce]),U.useEffect(()=>{n.delete&&(Ce(),n.onDismiss==null||n.onDismiss.call(n,n))},[Ce,n.delete]);function we(){return w?.loading?U.createElement(`div`,{className:yi(C?.loader,n?.classNames?.loader,`sonner-loader`),"data-visible":oe===`loading`},w.loading):U.createElement(Xr,{className:yi(C?.loader,n?.classNames?.loader),visible:oe===`loading`})}let Te=n.icon||w?.[oe]||Jr(oe);return U.createElement(`li`,{tabIndex:0,ref:re,className:yi(_,le,C?.toast,n?.classNames?.toast,C?.[se],n?.classNames?.[se]),"data-sonner-toast":``,"data-rich-colors":n.richColors??f,"data-styled":!(n.jsx||n.unstyled||r),"data-mounted":A,"data-promise":!!n.promise,"data-swiped":R,"data-removed":M,"data-visible":ae,"data-y-position":G,"data-x-position":_e,"data-index":c,"data-front":ie,"data-swiping":P,"data-dismissible":ce,"data-type":oe,"data-invert":xe,"data-swipe-out":I,"data-swipe-direction":O,"data-expanded":!!(u||S&&A),"data-testid":n.testId,style:{"--index":c,"--toasts-before":c,"--z-index":l.length-c,"--offset":`${M?B:me.current}px`,"--initial-height":S?`auto`:`${V}px`,...m,...n.style},onDragEnd:()=>{F(!1),D(null),ge.current=null},onPointerDown:e=>{e.button!==2&&!Se&&ce&&(H.current=new Date,ee(me.current),e.target.setPointerCapture(e.pointerId),e.target.tagName!==`BUTTON`&&(F(!0),ge.current={x:e.clientX,y:e.clientY}))},onPointerUp:()=>{if(I||!ce)return;ge.current=null;let e=Number(re.current?.style.getPropertyValue(`--swipe-amount-x`).replace(`px`,``)||0),t=Number(re.current?.style.getPropertyValue(`--swipe-amount-y`).replace(`px`,``)||0),r=new Date().getTime()-H.current?.getTime(),i=E===`x`?e:t,a=Math.abs(i)/r;if((E===`x`?be.includes(e>0?`right`:`left`):be.includes(t>0?`bottom`:`top`))&&(Math.abs(i)>=_i||a>.11))ee(me.current),n.onDismiss==null||n.onDismiss.call(n,n),k(E===`x`?e>0?`right`:`left`:t>0?`down`:`up`),Ce(),L(!0);else{var o,s;(o=re.current)==null||o.style.setProperty(`--swipe-amount-x`,`0px`),(s=re.current)==null||s.style.setProperty(`--swipe-amount-y`,`0px`),z(!1),F(!1),D(null)}},onPointerMove:e=>{var t,n;if(!ge.current||!ce||window.getSelection()?.toString().length>0)return;let r=e.clientY-ge.current.y,i=e.clientX-ge.current.x;!E&&(Math.abs(i)>1||Math.abs(r)>1)&&D(Math.abs(i)>Math.abs(r)?`x`:`y`);let a={x:0,y:0},o=e=>1/(1.5+Math.abs(e)/20);if(E===`y`){if(be.includes(`top`)||be.includes(`bottom`)){if(be.includes(`top`)&&r<0||be.includes(`bottom`)&&r>0)a.y=r;else{let e=r*o(r);a.y=Math.abs(e)<Math.abs(r)?e:r}}}else if(E===`x`&&(be.includes(`left`)||be.includes(`right`))){if(be.includes(`left`)&&i<0||be.includes(`right`)&&i>0)a.x=i;else{let e=i*o(i);a.x=Math.abs(e)<Math.abs(i)?e:i}}(Math.abs(a.x)>0||Math.abs(a.y)>0)&&z(!0),(t=re.current)==null||t.style.setProperty(`--swipe-amount-x`,`${a.x}px`),(n=re.current)==null||n.style.setProperty(`--swipe-amount-y`,`${a.y}px`)}},fe&&!n.jsx&&oe!==`loading`?U.createElement(`button`,{"aria-label":T,"data-disabled":Se,"data-close-button":!0,onClick:Se||!ce?()=>{}:()=>{Ce(),n.onDismiss==null||n.onDismiss.call(n,n)},className:yi(C?.closeButton,n?.classNames?.closeButton)},w?.close??ti):null,(oe||n.icon||n.promise)&&n.icon!==null&&(w?.[oe]!==null||n.icon)?U.createElement(`div`,{"data-icon":``,className:yi(C?.icon,n?.classNames?.icon)},oe===`loading`?n.icon||we():n.promise?we():null,oe===`loading`?null:Te):null,U.createElement(`div`,{"data-content":``,className:yi(C?.content,n?.classNames?.content)},U.createElement(`div`,{"data-title":``,className:yi(C?.title,n?.classNames?.title)},n.jsx?n.jsx:typeof n.title==`function`?n.title():n.title),n.description?U.createElement(`div`,{"data-description":``,className:yi(v,ue,C?.description,n?.classNames?.description)},typeof n.description==`function`?n.description():n.description):null),U.isValidElement(n.cancel)?n.cancel:n.cancel&&ui(n.cancel)?U.createElement(`button`,{"data-button":!0,"data-cancel":!0,style:n.cancelButtonStyle||h,onClick:e=>{ui(n.cancel)&&ce&&(n.cancel.onClick==null||n.cancel.onClick.call(n.cancel,e),Ce())},className:yi(C?.cancelButton,n?.classNames?.cancelButton)},n.cancel.label):null,U.isValidElement(n.action)?n.action:n.action&&ui(n.action)?U.createElement(`button`,{"data-button":!0,"data-action":!0,style:n.actionButtonStyle||g,onClick:e=>{ui(n.action)&&(n.action.onClick==null||n.action.onClick.call(n.action,e),!e.defaultPrevented&&Ce())},className:yi(C?.actionButton,n?.classNames?.actionButton)},n.action.label):null)};function Si(){if(typeof window>`u`||typeof document>`u`)return`ltr`;let e=document.documentElement.getAttribute(`dir`);return e===`auto`||!e?window.getComputedStyle(document.documentElement).direction:e}function Ci(e,t){let n={};return[e,t].forEach((e,t)=>{let r=t===1,i=r?`--mobile-offset`:`--offset`,a=r?pi:fi;function o(e){[`top`,`right`,`bottom`,`left`].forEach(t=>{n[`${i}-${t}`]=typeof e==`number`?`${e}px`:e})}typeof e==`number`||typeof e==`string`?o(e):typeof e==`object`?[`top`,`right`,`bottom`,`left`].forEach(t=>{e[t]===void 0?n[`${i}-${t}`]=a:n[`${i}-${t}`]=typeof e[t]==`number`?`${e[t]}px`:e[t]}):o(a)}),n}var wi=U.forwardRef(function(e,t){let{id:n,invert:r,position:i=`bottom-right`,hotkey:a=[`altKey`,`KeyT`],expand:o,closeButton:s,className:c,offset:l,mobileOffset:u,theme:d=`light`,richColors:f,duration:p,style:m,visibleToasts:h=di,toastOptions:g,dir:_=Si(),gap:v=gi,icons:y,customAriaLabel:b,containerAriaLabel:x=`Notifications`}=e,[S,C]=U.useState([]),w=U.useMemo(()=>n?S.filter(e=>e.toasterId===n):S.filter(e=>!e.toasterId),[S,n]),T=U.useMemo(()=>Array.from(new Set([i].concat(w.filter(e=>e.position).map(e=>e.position)))),[w,i]),[E,D]=U.useState([]),[O,k]=U.useState(!1),[A,j]=U.useState(!1),[M,N]=U.useState(d===`system`?typeof window<`u`&&window.matchMedia&&window.matchMedia(`(prefers-color-scheme: dark)`).matches?`dark`:`light`:d),P=U.useRef(null),F=a.join(`+`).replace(/Key/g,``).replace(/Digit/g,``),I=U.useRef(null),L=U.useRef(!1),R=U.useCallback(e=>{C(t=>(t.find(t=>t.id===e.id)?.delete||oi.dismiss(e.id),t.filter(({id:t})=>t!==e.id)))},[]);return U.useEffect(()=>oi.subscribe(e=>{e.dismiss?requestAnimationFrame(()=>{C(t=>t.map(t=>t.id===e.id?{...t,delete:!0}:t))}):setTimeout(()=>{W.flushSync(()=>{C(t=>{let n=t.findIndex(t=>t.id===e.id);return n===-1?[e,...t]:[...t.slice(0,n),{...t[n],...e},...t.slice(n+1)]})})})}),[]),U.useEffect(()=>{if(d!==`system`){N(d);return}if(d===`system`&&(window.matchMedia&&window.matchMedia(`(prefers-color-scheme: dark)`).matches?N(`dark`):N(`light`)),typeof window>`u`)return;let e=window.matchMedia(`(prefers-color-scheme: dark)`);try{e.addEventListener(`change`,({matches:e})=>{N(e?`dark`:`light`)})}catch{e.addListener(({matches:e})=>{try{N(e?`dark`:`light`)}catch(e){console.error(e)}})}},[d]),U.useEffect(()=>{S.length<=1&&k(!1)},[S]),U.useEffect(()=>{let e=e=>{if(a.length>0&&a.every(t=>e[t]||e.code===t)){var t;k(!0),(t=P.current)==null||t.focus()}e.code===`Escape`&&(document.activeElement===P.current||P.current?.contains(document.activeElement))&&k(!1)};return document.addEventListener(`keydown`,e),()=>document.removeEventListener(`keydown`,e)},[a]),U.useEffect(()=>{if(P.current)return()=>{I.current&&(I.current.focus({preventScroll:!0}),I.current=null,L.current=!1)}},[P.current]),U.createElement(`section`,{ref:t,"aria-label":b??`${x} ${F}`,tabIndex:-1,"aria-live":`polite`,"aria-relevant":`additions text`,"aria-atomic":`false`,suppressHydrationWarning:!0,"data-react-aria-top-layer":!0},T.map((t,n)=>{let[i,a]=t.split(`-`);return w.length?U.createElement(`ol`,{key:t,dir:_===`auto`?Si():_,tabIndex:-1,ref:P,className:c,"data-sonner-toaster":!0,"data-sonner-theme":M,"data-y-position":i,"data-x-position":a,style:{"--front-toast-height":`${E[0]?.height||0}px`,"--width":`${hi}px`,"--gap":`${v}px`,...m,...Ci(l,u)},onBlur:e=>{L.current&&!e.currentTarget.contains(e.relatedTarget)&&(L.current=!1,I.current&&=(I.current.focus({preventScroll:!0}),null))},onFocus:e=>{e.target instanceof HTMLElement&&e.target.dataset.dismissible===`false`||L.current||(L.current=!0,I.current=e.relatedTarget)},onMouseEnter:()=>k(!0),onMouseMove:()=>k(!0),onMouseLeave:()=>{A||k(!1)},onDragEnd:()=>k(!1),onPointerDown:e=>{e.target instanceof HTMLElement&&e.target.dataset.dismissible===`false`||j(!0)},onPointerUp:()=>j(!1)},w.filter(e=>!e.position&&n===0||e.position===t).map((n,i)=>U.createElement(xi,{key:n.id,icons:y,index:i,toast:n,defaultRichColors:f,duration:g?.duration??p,className:g?.className,descriptionClassName:g?.descriptionClassName,invert:r,visibleToasts:h,closeButton:g?.closeButton??s,interacting:A,position:t,style:g?.style,unstyled:g?.unstyled,classNames:g?.classNames,cancelButtonStyle:g?.cancelButtonStyle,actionButtonStyle:g?.actionButtonStyle,closeButtonAriaLabel:g?.closeButtonAriaLabel,removeToast:R,toasts:w.filter(e=>e.position==n.position),heights:E.filter(e=>e.position==n.position),setHeights:D,expandByDefault:o,gap:v,expanded:O,swipeDirections:e.swipeDirections}))):null}))}),Ti=n((e=>{var t=C();function n(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var r=typeof Object.is==`function`?Object.is:n,i=t.useState,a=t.useEffect,o=t.useLayoutEffect,s=t.useDebugValue;function c(e,t){var n=t(),r=i({inst:{value:n,getSnapshot:t}}),c=r[0].inst,u=r[1];return o(function(){c.value=n,c.getSnapshot=t,l(c)&&u({inst:c})},[e,n,t]),a(function(){return l(c)&&u({inst:c}),e(function(){l(c)&&u({inst:c})})},[e]),s(n),n}function l(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!r(e,n)}catch{return!0}}function u(e,t){return t()}var d=typeof window>`u`||window.document===void 0||window.document.createElement===void 0?u:c;e.useSyncExternalStore=t.useSyncExternalStore===void 0?d:t.useSyncExternalStore})),Ei=n(((e,t)=>{t.exports=Ti()})),Di=n((e=>{var t=C(),n=Ei();function r(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var i=typeof Object.is==`function`?Object.is:r,a=n.useSyncExternalStore,o=t.useRef,s=t.useEffect,c=t.useMemo,l=t.useDebugValue;e.useSyncExternalStoreWithSelector=function(e,t,n,r,u){var d=o(null);if(d.current===null){var f={hasValue:!1,value:null};d.current=f}else f=d.current;d=c(function(){function e(e){if(!a){if(a=!0,o=e,e=r(e),u!==void 0&&f.hasValue){var t=f.value;if(u(t,e))return s=t}return s=e}if(t=s,i(o,e))return t;var n=r(e);return u!==void 0&&u(t,n)?(o=e,t):(o=e,s=n)}var a=!1,o,s,c=n===void 0?null:n;return[function(){return e(t())},c===null?void 0:function(){return e(c())}]},[t,n,r,u]);var p=a(e,d[0],d[1]);return s(function(){f.hasValue=!0,f.value=p},[p]),l(p),p}})),Oi=n(((e,t)=>{t.exports=Di()})),ki={};function Ai(e,t){let n=U.useRef(ki);return n.current===ki&&(n.current=e(t)),n}function ji(e,t,n,r){let i=Ai(Ni).current;return Pi(i,e,t,n,r)&&Ii(i,[e,t,n,r]),i.callback}function Mi(e){let t=Ai(Ni).current;return Fi(t,e)&&Ii(t,e),t.callback}function Ni(){return{callback:null,cleanup:null,refs:[]}}function Pi(e,t,n,r,i){return e.refs[0]!==t||e.refs[1]!==n||e.refs[2]!==r||e.refs[3]!==i}function Fi(e,t){return e.refs.length!==t.length||e.refs.some((e,n)=>e!==t[n])}function Ii(e,t){e.refs=t,e.callback=t.every(e=>e==null)?null:n=>{if(e.cleanup&&=(e.cleanup(),null),n!=null){let r=Array(t.length).fill(null);for(let e=0;e<t.length;e+=1){let i=t[e];if(i!=null)switch(typeof i){case`function`:{let t=i(n);typeof t==`function`&&(r[e]=t);break}case`object`:i.current=n}}e.cleanup=()=>{for(let e=0;e<t.length;e+=1){let n=t[e];if(n!=null)switch(typeof n){case`function`:{let t=r[e];typeof t==`function`?t():n(null);break}case`object`:n.current=null}}}}}}var Li=19;function Ri(e){return Li>=e}function zi(e){if(!U.isValidElement(e))return null;let t=e,n=t.props;return(Ri(19)?n?.ref:t.ref)??null}function Bi(e,t){if(e&&!t)return e;if(!e&&t)return t;if(e||t)return{...e,...t}}function Vi(){}var Hi=Object.freeze([]),Ui=Object.freeze({});function Wi(e,t){let n={};for(let r in e){let i=e[r];if(t?.hasOwnProperty(r)){let e=t[r](i);e!=null&&Object.assign(n,e)}else i===!0?n[`data-${r.toLowerCase()}`]=``:i&&(n[`data-${r.toLowerCase()}`]=i.toString())}return n}function Gi(e,t){return typeof e==`function`?e(t):e}function Ki(e,t){return typeof e==`function`?e(t):e}var qi={};function Ji(e,t,n,r,i){if(!n&&!r&&!i&&!e)return Xi(t);let a=Xi(e);return t&&(a=Zi(a,t)),n&&(a=Zi(a,n)),r&&(a=Zi(a,r)),i&&(a=Zi(a,i)),a}function Yi(e){if(e.length===0)return qi;if(e.length===1)return Xi(e[0]);let t=Xi(e[0]);for(let n=1;n<e.length;n+=1)t=Zi(t,e[n]);return t}function Xi(e){return ta(e)?{...e(qi)}:Qi(e)}function Zi(e,t){return ta(t)?t(e):$i(e,t)}function Qi(e){let t={...e};for(let e in t){let n=t[e];ea(e,n)&&(t[e]=ra(n))}return t}function $i(e,t){if(!t)return e;for(let n in t){let r=t[n];switch(n){case`style`:e[n]=Bi(e.style,r);break;case`className`:e[n]=aa(e.className,r);break;default:e[n]=ea(n,r)?na(e[n],r):r}}return e}function ea(e,t){let n=e.charCodeAt(0),r=e.charCodeAt(1),i=e.charCodeAt(2);return n===111&&r===110&&i>=65&&i<=90&&(typeof t==`function`||t===void 0)}function ta(e){return typeof e==`function`}function na(e,t){return t?e?(...n)=>{let r=n[0];if(oa(r)){let i=r;ia(i);let a=t(...n);return i.baseUIHandlerPrevented||e?.(...n),a}let i=t(...n);return e?.(...n),i}:ra(t):e}function ra(e){return e&&((...t)=>{let n=t[0];return oa(n)&&ia(n),e(...t)})}function ia(e){return e.preventBaseUIHandler=()=>{e.baseUIHandlerPrevented=!0},e}function aa(e,t){return t?e?t+` `+e:t:e}function oa(e){return typeof e==`object`&&!!e&&`nativeEvent`in e}function sa(e,t,n={}){let r=t.render;n.enabled!==!1&&(r=da(r));let i=ca(t,n,r);if(n.enabled===!1)return null;let a=n.state??Ui;return fa(e,r,i,a)}function ca(e,t,n){let{className:r,style:i}=e,{state:a=Ui,ref:o,props:s,stateAttributesMapping:c,enabled:l=!0}=t,u=l?Gi(r,a):void 0,d=l?Ki(i,a):void 0,f=l?Wi(a,c):Ui,p=l&&s?la(s):void 0,m=l?Bi(f,p)??{}:Ui;return typeof document<`u`&&(l?m.ref=Array.isArray(o)?Mi([m.ref,zi(n),...o]):ji(m.ref,zi(n),o):ji(null,null)),l?(u!==void 0&&(m.className=aa(m.className,u)),d!==void 0&&(m.style=Bi(m.style,d)),m):Ui}function la(e){return Array.isArray(e)?Yi(e):Ji(void 0,e)}var ua=Symbol.for(`react.lazy`);function da(e){if(e?.$$typeof!==ua)return e;let t=U.Children.toArray(e)[0];return U.isValidElement(t)?t:e}function fa(e,t,n,r){if(t){if(typeof t==`function`)return t(n,r);let e=Ji(n,t.props);return e.ref=n.ref,U.cloneElement(t,e)}return pa(e,n)}function pa(e,t){return e===`button`?(0,U.createElement)(`button`,{type:`button`,...t,key:t.key}):e===`img`?(0,U.createElement)(`img`,{alt:``,...t,key:t.key}):U.createElement(e,t)}function ma(e,t){return function(n,...r){let i=new URL(e);return i.searchParams.set(`code`,n.toString()),r.forEach(e=>i.searchParams.append(`args[]`,e)),`${t} error #${n}; visit ${i} for the full message.`}}var ha=ma(`https://base-ui.com/production-error`,`Base UI`),ga=U.createContext(void 0);function _a(){let e=U.useContext(ga);if(e===void 0)throw Error(ha(13));return e}var va={imageLoadingStatus:()=>null},ya=U.forwardRef(function(e,t){let{className:n,render:r,style:i,...a}=e,[o,s]=U.useState(`idle`),c={imageLoadingStatus:o},l=U.useMemo(()=>({imageLoadingStatus:o,setImageLoadingStatus:s}),[o,s]),u=sa(`span`,e,{state:c,ref:t,props:a,stateAttributesMapping:va});return(0,G.jsx)(ga.Provider,{value:l,children:u})}),ba={...U},xa=ba.useInsertionEffect,Sa=xa&&xa!==ba.useLayoutEffect?xa:e=>e();function q(e){let t=Ai(Ca).current;return t.next=e,Sa(t.effect),t.trampoline}function Ca(){let e={next:void 0,callback:wa,trampoline:(...t)=>e.callback?.(...t),effect:()=>{e.callback=e.next}};return e}function wa(){}var J=typeof document<`u`?U.useLayoutEffect:()=>{};function Ta(e){U.useEffect(e,Hi)}var Ea=null;globalThis.requestAnimationFrame;var Da=new class{callbacks=[];callbacksCount=0;nextId=1;startId=1;isScheduled=!1;tick=e=>{this.isScheduled=!1;let t=this.callbacks,n=this.callbacksCount;if(this.callbacks=[],this.callbacksCount=0,this.startId=this.nextId,n>0)for(let n=0;n<t.length;n+=1)t[n]?.(e)};request(e){let t=this.nextId;return this.nextId+=1,this.callbacks.push(e),this.callbacksCount+=1,this.isScheduled||=(requestAnimationFrame(this.tick),!0),t}cancel(e){let t=e-this.startId;t<0||t>=this.callbacks.length||this.callbacks[t]!==null&&(this.callbacks[t]=null,--this.callbacksCount)}},Oa=class e{static create(){return new e}static request(e){return Da.request(e)}static cancel(e){return Da.cancel(e)}currentId=Ea;request(e){this.cancel(),this.currentId=Da.request(()=>{this.currentId=Ea,e()})}cancel=()=>{this.currentId!==Ea&&(Da.cancel(this.currentId),this.currentId=Ea)};disposeEffect=()=>this.cancel};function ka(){let e=Ai(Oa.create).current;return Ta(e.disposeEffect),e}function Aa(e){return e==null?e:`current`in e?e.current:e}function ja(e,t){return e.getAnimations(t).filter(e=>{let t=e.effect?.getTiming();return t?.duration!==1/0&&t?.iterations!==1/0})}var Ma=`data-starting-style`,Na=`data-ending-style`,Pa=null;function Fa(e){if(!Pa){let e=[];Pa=e,queueMicrotask(()=>{Pa=null,W.flushSync(()=>{for(let t of e)t()})})}Pa.push(e)}function Ia(e,t=!1,n=!1){let r=ka();return q((i,a=null)=>{r.cancel();let o=Aa(e);if(o==null)return;let s=o,c=()=>{n?Fa(()=>{a?.aborted||i()}):W.flushSync(i)};if(typeof s.getAnimations!=`function`||globalThis.BASE_UI_ANIMATIONS_DISABLED){i();return}function l(){Promise.all(ja(s).map(e=>e.finished.then(Vi))).then(()=>{a?.aborted||c()},()=>{a?.aborted||(ja(s).some(e=>e.pending||e.playState!==`finished`)?l():c())})}if(t){let e=Ma;if(!s.hasAttribute(e)){r.request(l);return}let t=new MutationObserver(()=>{s.hasAttribute(e)||(t.disconnect(),l())});t.observe(s,{attributes:!0,attributeFilter:[e]}),a?.addEventListener(`abort`,()=>t.disconnect(),{once:!0})}else r.request(l)})}function La(e){let{enabled:t=!0,open:n,ref:r,batch:i=!1,onComplete:a}=e,o=q(a),s=Ia(r,n,i);U.useEffect(()=>{if(!t)return;let e=new AbortController;return s(o,e.signal),()=>{e.abort()}},[t,n,o,s])}var Ra={[Ma]:``},za={[Na]:``},Ba={transitionStatus(e){return e===`starting`?Ra:e===`ending`?za:null}};function Va(e,t=!1,n=!1,r=!1){let[i,a]=U.useState(e&&t?`idle`:void 0),[o,s]=U.useState(e&&!r);return e&&!o&&(s(!0),a(`starting`)),!e&&o&&i!==`ending`&&!n&&a(`ending`),!e&&!o&&i===`ending`&&a(void 0),J(()=>{if(!e&&o&&i!==`ending`&&n){let e=Oa.request(()=>{a(`ending`)});return()=>{Oa.cancel(e)}}},[e,o,i,n]),J(()=>{if(!e||t||i===void 0)return;let n=Oa.request(()=>{a(void 0)});return()=>{Oa.cancel(n)}},[t,e,i]),J(()=>{if(!e||!t)return;e&&o&&i!==`idle`&&a(`starting`);let n=Oa.request(()=>{a(`idle`)});return()=>{Oa.cancel(n)}},[t,e,o,i]),{mounted:o,setMounted:s,transitionStatus:i}}function Ha(e,{referrerPolicy:t,crossOrigin:n,sizes:r,srcSet:i},a){let o=U.useState(`idle`),s=o[1];return J(()=>{if(!a)return Vi;if(!e&&!i)return s(`error`),Vi;let o=!0,c=new window.Image,l=e=>()=>{o&&s(e)};return s(`loading`),c.onload=l(`loaded`),c.onerror=l(`error`),t&&(c.referrerPolicy=t),c.crossOrigin=n??null,r&&(c.sizes=r),i&&(c.srcset=i),e&&(c.src=e),c.complete&&s(c.naturalWidth>0?`loaded`:`error`),()=>{o=!1}},[a,e,i,r,n,t,s]),o}var Ua={...va,...Ba},Wa=U.forwardRef(function(e,t){let{className:n,render:r,onLoadingStatusChange:i,keepMounted:a=!1,style:o,sizes:s,srcSet:c,src:l,...u}=e,{setImageLoadingStatus:d}=_a(),[f,p]=Ha(l,e,!a),m=f===`loaded`,{mounted:h,transitionStatus:g,setMounted:_}=Va(m),v=U.useRef(null),y=U.useRef(!0);J(()=>{if(!a)return;let e=y.current;y.current=!1;let t=v.current;if(!t)return;if(!t.complete){p(`loading`);return}let n=t.naturalWidth>0?`loaded`:`error`;p(n),n===`loaded`&&e&&_(!0)},[a,l,c,s,u.crossOrigin,u.referrerPolicy,r,p,_]);let b=a?{"data-loading":f===`loading`?``:void 0,"data-error":f===`error`?``:void 0,"aria-hidden":f!==`loaded`||void 0,onLoad(){p(`loaded`)},onError(){p(`error`)}}:void 0,x=q(e=>{i?.(e),d(e)});J(()=>{f!==`idle`&&x(f)},[f,x]),J(()=>()=>d(`idle`),[d]),La({enabled:!m,open:m,ref:v,onComplete(){m||_(!1)}});let S={imageLoadingStatus:f,transitionStatus:a&&g===`ending`?void 0:g},C=a||h,w={};s!==void 0&&(w.sizes=s),c!==void 0&&(w.srcSet=c),l!==void 0&&(w.src=l);let T=sa(`img`,e,{state:S,ref:[t,v],props:[b,u,w],stateAttributesMapping:Ua,enabled:C});return C?T:null}),Ga=0,Ka=class e{static create(){return new e}currentId=Ga;start(e,t){this.clear(),this.currentId=setTimeout(()=>{this.currentId=Ga,t()},e)}isStarted(){return this.currentId!==Ga}clear=()=>{this.currentId!==Ga&&(clearTimeout(this.currentId),this.currentId=Ga)};disposeEffect=()=>this.clear};function qa(){let e=Ai(Ka.create).current;return Ta(e.disposeEffect),e}var Ja=U.forwardRef(function(e,t){let{className:n,render:r,delay:i=0,style:a,...o}=e,{imageLoadingStatus:s}=_a(),[c,l]=U.useState(i===0),u=qa();return U.useEffect(()=>(i>0?u.start(i,()=>l(!0)):l(!0),u.clear),[u,i]),sa(`span`,e,{state:{imageLoadingStatus:s},ref:t,props:o,stateAttributesMapping:va,enabled:s!==`loaded`&&(i===0||c)})});function Ya({className:e,size:t=`default`,...n}){return(0,G.jsx)(ya,{"data-slot":`avatar`,"data-size":t,className:K(`group/avatar relative flex size-8 shrink-0 rounded-full select-none after:absolute after:inset-0 after:rounded-full after:border after:border-border after:mix-blend-darken data-[size=lg]:size-10 data-[size=sm]:size-6 dark:after:mix-blend-lighten`,e),...n})}function Xa({className:e,...t}){return(0,G.jsx)(Wa,{"data-slot":`avatar-image`,className:K(`aspect-square size-full rounded-full object-cover`,e),...t})}function Za({className:e,...t}){return(0,G.jsx)(Ja,{"data-slot":`avatar-fallback`,className:K(`flex size-full items-center justify-center rounded-full bg-muted text-sm text-muted-foreground group-data-[size=sm]/avatar:text-xs`,e),...t})}var Qa=te.pick({name:!0,email:!0,image:!0}).extend({id:_(),role:_().nullable(),banned:h(),createdAt:b()}),$a=p({q:_().trim().max(200).default(``),role:i([`all`,`user`,`admin`]).default(`all`),status:i([`all`,`active`,`disabled`]).default(`all`),limit:ce().int().min(1).max(100).default(25),offset:ce().int().min(0).default(0)}),eo=p({users:r(Qa),total:R().int().nonnegative()}),to=Qa.extend({workspaces:r(p({id:d(),name:_(),role:i(l)})),projects:r(p({id:d(),name:_(),role:i(l)})),providers:r(_()),sessionCount:R().int().nonnegative()});p({password:_().min(12).max(128)}).strict(),$a.pick({q:!0,limit:!0,offset:!0});var no=p({workspaces:r(p({id:d(),name:_(),slug:_(),ownerId:_().nullable().default(null),createdAt:b(),memberCount:R().int().nonnegative(),projectCount:R().int().nonnegative(),administrators:r(Qa.pick({id:!0,name:!0,email:!0,image:!0}))})),total:R().int().nonnegative()}),ro=e=>e.trim().split(/\s+/).slice(0,2).map(e=>e.slice(0,1)).join(``).toUpperCase()||`?`;function io({name:e,image:t,className:n}){return(0,G.jsxs)(Ya,{"aria-hidden":`true`,className:K(`size-8 overflow-hidden rounded-full text-xs`,n),children:[t&&(0,G.jsx)(Xa,{src:t,alt:``}),(0,G.jsx)(Za,{className:`rounded-full bg-primary/10 font-medium text-primary text-[length:inherit]`,children:ro(e)})]})}function ao({name:e,email:t,image:n}){return(0,G.jsxs)(`span`,{className:`flex min-w-0 items-center gap-3`,children:[(0,G.jsx)(io,{name:e,image:n}),(0,G.jsxs)(`span`,{className:`min-w-0`,children:[(0,G.jsx)(`span`,{dir:`auto`,className:`block wrap-anywhere whitespace-normal font-medium`,children:e}),(0,G.jsx)(`span`,{className:`block break-all whitespace-normal text-xs text-muted-foreground`,children:t})]})]})}var oo={list_members:[`membership.`,`role.`,`project.`],list_workspace_members:[`membership.`,`role.`,`project.`],list_workspace_roles:[`role.`,`membership.`,`project.`],list_project_roles:[`role.`,`membership.`,`project.`],list_invitations:[`invitation.`,`membership.`],list_project_labels:[`label.`,`project.`],list_workflow_states:[`workflow.`,`project.`,`ticket.`],list_workspace_labels:[`label.`,`project.`],list_custom_fields:[`custom_field.`,`project.`,`ticket.`],list_calendar_feeds:[`calendar_feed.`,`label.`,`membership.`,`project.`],list_label_colors:[`label.`],list_views:[`label.`,`custom_field.`,`project.`],get_project:[`project.`,`label.`],list_project_destinations:[`destination.`,`project.`],list_notification_channels:[],list_imports:[],get_import:[],list_deleted_accounts:[`membership.`]};function so(e){return t=>{let[n,,r,i]=t.queryKey;if(n!==`kanvil`)return!1;if(typeof r!=`string`||!i||typeof i!=`object`)return!0;let a=oo[r];if(a&&!a.some(t=>e.type.startsWith(t)))return!1;let o=Reflect.get(i,`projectId`),s=Reflect.get(i,`ticketId`);return typeof o==`string`?o===e.projectId?!e.ticketId||typeof s!=`string`||s===e.ticketId||s===e.data.key:!1:!0}}function co(e,t){let n=[],r=!1,i,a=()=>i||(i=Promise.resolve().then(async()=>{for(;!t.aborted&&(r||n.length);){let t=r?void 0:n;n=[],r=!1,await e(t)}}).finally(()=>{if(i=void 0,!t.aborted&&(r||n.length))return a()}),i);return{push:e=>{t.aborted||(n.push(e),a().catch(()=>{}))},flush:()=>t.aborted?Promise.resolve():(r=!0,a())}}var lo=Object.create(null),uo=e=>({}),fo=new Proxy(lo,{get(e,t){return uo()[t]??lo[t]},has(e,t){return t in uo()||t in lo},set(e,t,n){let r=uo(!0);return r[t]=n,!0},deleteProperty(e,t){if(!t)return!1;let n=uo(!0);return delete n[t],!0},ownKeys(){let e=uo(!0);return Object.keys(e)}});fo.NODE_ENV;function po(e,t){return typeof process<`u`?{}[e]??t:typeof Deno<`u`?Deno.env.get(e)??t:typeof Bun<`u`?Bun.env[e]??t:t}Object.freeze({get BETTER_AUTH_SECRET(){return po(`BETTER_AUTH_SECRET`)},get AUTH_SECRET(){return po(`AUTH_SECRET`)},get BETTER_AUTH_TELEMETRY(){return po(`BETTER_AUTH_TELEMETRY`)},get BETTER_AUTH_TELEMETRY_ID(){return po(`BETTER_AUTH_TELEMETRY_ID`)},get NODE_ENV(){return po(`NODE_ENV`,`development`)},get PACKAGE_VERSION(){return po(`PACKAGE_VERSION`,`0.0.0`)},get BETTER_AUTH_TELEMETRY_ENDPOINT(){return po(`BETTER_AUTH_TELEMETRY_ENDPOINT`,``)}});var mo=1,ho=4,go=8,_o=24,vo={eterm:ho,cons25:ho,console:ho,cygwin:ho,dtterm:ho,gnome:ho,hurd:ho,jfbterm:ho,konsole:ho,kterm:ho,mlterm:ho,mosh:_o,putty:ho,st:ho,"rxvt-unicode-24bit":_o,terminator:_o,"xterm-kitty":_o},yo=new Map(Object.entries({APPVEYOR:go,BUILDKITE:go,CIRCLECI:_o,DRONE:go,GITEA_ACTIONS:_o,GITHUB_ACTIONS:_o,GITLAB_CI:go,TRAVIS:go})),bo=[/ansi/,/color/,/linux/,/direct/,/^con[0-9]*x[0-9]/,/^rxvt/,/^screen/,/^xterm/,/^vt100/,/^vt220/];function xo(){if(po(`FORCE_COLOR`)!==void 0)switch(po(`FORCE_COLOR`)){case``:case`1`:case`true`:return ho;case`2`:return go;case`3`:return _o;default:return mo}if(po(`NODE_DISABLE_COLORS`)!==void 0&&po(`NODE_DISABLE_COLORS`)!==``||po(`NO_COLOR`)!==void 0&&po(`NO_COLOR`)!==``||po(`TERM`)===`dumb`)return mo;if(po(`TMUX`))return _o;if(`TF_BUILD`in fo&&`AGENT_NAME`in fo)return ho;if(`CI`in fo){for(let{0:e,1:t}of yo)if(e in fo)return t;return po(`CI_NAME`)===`codeship`?go:mo}if(`TEAMCITY_VERSION`in fo)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.exec(po(`TEAMCITY_VERSION`))===null?mo:ho;switch(po(`TERM_PROGRAM`)){case`iTerm.app`:return!po(`TERM_PROGRAM_VERSION`)||/^[0-2]\./.exec(po(`TERM_PROGRAM_VERSION`))!==null?go:_o;case`HyperTerm`:case`MacTerm`:return _o;case`Apple_Terminal`:return go}if(po(`COLORTERM`)===`truecolor`||po(`COLORTERM`)===`24bit`)return _o;if(po(`TERM`)){if(/truecolor/.exec(po(`TERM`))!==null)return _o;if(/^xterm-256/.exec(po(`TERM`))!==null)return go;let e=po(`TERM`).toLowerCase();if(vo[e])return vo[e];if(bo.some(t=>t.exec(e)!==null))return ho}return po(`COLORTERM`)?ho:mo}var So=Symbol.for(`better-auth:global`),Co=null,wo={},To=`1.7.10`;function Eo(){return globalThis[So]||(globalThis[So]={version:To,epoch:1,context:wo},Co=globalThis[So]),Co=globalThis[So],Co.version!==To&&(Co.version=To,Co.epoch++),globalThis[So]}function Do(){return Eo().context.endpointContextAsyncStorage?.getStore()}var Oo={reset:`\x1B[0m`,bright:`\x1B[1m`,dim:`\x1B[2m`,undim:`\x1B[22m`,underscore:`\x1B[4m`,blink:`\x1B[5m`,reverse:`\x1B[7m`,hidden:`\x1B[8m`,fg:{black:`\x1B[30m`,red:`\x1B[31m`,green:`\x1B[32m`,yellow:`\x1B[33m`,blue:`\x1B[34m`,magenta:`\x1B[35m`,cyan:`\x1B[36m`,white:`\x1B[37m`},bg:{black:`\x1B[40m`,red:`\x1B[41m`,green:`\x1B[42m`,yellow:`\x1B[43m`,blue:`\x1B[44m`,magenta:`\x1B[45m`,cyan:`\x1B[46m`,white:`\x1B[47m`}},ko=[`debug`,`info`,`success`,`warn`,`error`];function Ao(e,t){return ko.indexOf(t)>=ko.indexOf(e)}var jo={info:Oo.fg.blue,success:Oo.fg.green,warn:Oo.fg.yellow,error:Oo.fg.red,debug:Oo.fg.magenta},Mo=(e,t,n)=>{let r=new Date().toISOString();return n?`${Oo.dim}${r}${Oo.reset} ${jo[e]}${e.toUpperCase()}${Oo.reset} ${Oo.bright}[Better Auth]:${Oo.reset} ${t}`:`${r} ${e.toUpperCase()} [Better Auth]: ${t}`},No=(e=>{let t=e?.disabled!==!0,n=e?.level??`warn`,r=e?.disableColors===void 0?xo()!==1:!e.disableColors,i=(i,a,o=[])=>{if(!t||!Ao(n,i))return;let s=Mo(i,a,r);!e||typeof e.log!=`function`?i===`error`?console.error(s,...o):i===`warn`?console.warn(s,...o):console.log(s,...o):e.log(i===`success`?`info`:i,a,...o)};return{...Object.fromEntries(ko.map(e=>[e,(...[t,...n])=>i(e,t,n)])),get level(){return n}}})(),Po=()=>{let e=Do()?.context.logger;return e&&e!==Fo?e:No},Fo={debug:(...e)=>Po().debug(...e),info:(...e)=>Po().info(...e),success:(...e)=>Po().success(...e),warn:(...e)=>Po().warn(...e),error:(...e)=>Po().error(...e),get level(){return Po().level}};function Io(e){return Object.fromEntries(Object.entries(e).map(([e,t])=>[e,{code:e,message:t,toString:()=>e}]))}function Lo(){let e=Object.getOwnPropertyDescriptor(Error,`stackTraceLimit`);return e===void 0?Object.isExtensible(Error):Object.prototype.hasOwnProperty.call(e,`writable`)?e.writable:e.set!==void 0}function Ro(e){let t=e.split(`
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/markdown-blocks-B6mE_S6n.js","assets/rolldown-runtime-COiEfhsA.js","assets/default-CN9zcRIy.js","assets/preload-helper-BLdHbfdN.js","assets/core-jXc03Sty.js","assets/en-EnSRisMz.js","assets/highlight-BPZqoBaO.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{i as e,n as t,t as n}from"./rolldown-runtime-COiEfhsA.js";import{Dn as r,En as i,Et as a,F as o,Fn as s,H as c,Ht as l,I as u,In as d,K as f,Mn as p,Nn as m,On as h,P as g,Pn as _,Q as v,St as y,Tn as b,U as x,Un as S,Wn as C,Wt as w,Yt as T,Zt as E,_n as D,_t as O,at as k,dt as A,en as j,et as M,fn as N,ft as P,gt as F,ht as I,i as L,jn as R,kt as z,ln as B,mt as ee,nn as V,ot as te,p as ne,pt as H,qt as re,r as ie,u as ae,un as oe,vt as se,wn as ce,yt as le}from"./default-CN9zcRIy.js";import{t as ue}from"./preload-helper-BLdHbfdN.js";import{t as de}from"./toDate-B3HYxwtT.js";var fe=n((e=>{var t=C();function n(e){var t=`https://react.dev/errors/`+e;if(1<arguments.length){t+=`?args[]=`+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+=`&args[]=`+encodeURIComponent(arguments[n])}return`Minified React error #`+e+`; visit `+t+` for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`}function r(){}var i={d:{f:r,r:function(){throw Error(n(522))},D:r,C:r,L:r,m:r,X:r,S:r,M:r},p:0,findDOMNode:null},a=Symbol.for(`react.portal`),o=Symbol.for(`react.recoverable`),s=Symbol.for(`react.optimistic_key`);function c(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:a,key:r==null?null:r===s?s:``+r,children:e,containerInfo:t,implementation:n}}var l=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function u(e,t){if(e===`font`)return``;if(typeof t==`string`)return t===`use-credentials`?t:``}e.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=i,e.browser=function(e){return{$$typeof:o,_reason:e}},e.createPortal=function(e,t){var r=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)throw Error(n(299));return c(e,t,null,r)},e.flushSync=function(e){var t=l.T,n=i.p;try{if(l.T=null,i.p=2,e)return e()}finally{l.T=t,i.p=n,i.d.f()}},e.preconnect=function(e,t){typeof e==`string`&&(t?(t=t.crossOrigin,t=typeof t==`string`?t===`use-credentials`?t:``:void 0):t=null,i.d.C(e,t))},e.prefetchDNS=function(e){typeof e==`string`&&i.d.D(e)},e.preinit=function(e,t){if(typeof e==`string`&&t&&typeof t.as==`string`){var n=t.as,r=u(n,t.crossOrigin),a=typeof t.integrity==`string`?t.integrity:void 0,o=typeof t.fetchPriority==`string`?t.fetchPriority:void 0;n===`style`?i.d.S(e,typeof t.precedence==`string`?t.precedence:void 0,{crossOrigin:r,integrity:a,fetchPriority:o}):n===`script`&&i.d.X(e,{crossOrigin:r,integrity:a,fetchPriority:o,nonce:typeof t.nonce==`string`?t.nonce:void 0})}},e.preinitModule=function(e,t){if(typeof e==`string`){if(typeof t==`object`&&t){if(t.as==null||t.as===`script`){var n=u(t.as,t.crossOrigin);i.d.M(e,{crossOrigin:n,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0,fetchPriority:typeof t.fetchPriority==`string`?t.fetchPriority:void 0})}}else t??i.d.M(e)}},e.preload=function(e,t){if(typeof e==`string`&&typeof t==`object`&&t&&typeof t.as==`string`){var n=t.as,r=u(n,t.crossOrigin);i.d.L(e,n,{crossOrigin:r,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0,type:typeof t.type==`string`?t.type:void 0,fetchPriority:typeof t.fetchPriority==`string`?t.fetchPriority:void 0,referrerPolicy:typeof t.referrerPolicy==`string`?t.referrerPolicy:void 0,imageSrcSet:typeof t.imageSrcSet==`string`?t.imageSrcSet:void 0,imageSizes:typeof t.imageSizes==`string`?t.imageSizes:void 0,media:typeof t.media==`string`?t.media:void 0})}},e.preloadModule=function(e,t){if(typeof e==`string`){if(t){var n=u(t.as,t.crossOrigin);i.d.m(e,{as:typeof t.as==`string`&&t.as!==`script`?t.as:void 0,crossOrigin:n,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0,fetchPriority:typeof t.fetchPriority==`string`?t.fetchPriority:void 0})}else i.d.m(e)}},e.requestFormReset=function(e){i.d.r(e)},e.unstable_batchedUpdates=function(e,t){return e(t)},e.useFormState=function(e,t,n){return l.H.useFormState(e,t,n)},e.useFormStatus=function(){return l.H.useHostTransitionStatus()},e.version=`19.3.1`})),pe=n(((e,t)=>{function n(){if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE==`function`)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(e){console.error(e)}}n(),t.exports=fe()})),U=e(C(),1),W=e(pe(),1),me=Object.fromEntries(Object.entries({default:{className:`text-primary`,light:null,dark:null},red:{className:`text-red-500`,light:`#ef4444`,dark:`#ef4444`},orange:{className:`text-orange-500`,light:`#f97316`,dark:`#f97316`},amber:{className:`text-amber-500`,light:`#f59e0b`,dark:`#f59e0b`},yellow:{className:`text-yellow-600 dark:text-yellow-400`,light:`#ca8a04`,dark:`#facc15`},lime:{className:`text-lime-600 dark:text-lime-400`,light:`#65a30d`,dark:`#a3e635`},green:{className:`text-green-600 dark:text-green-400`,light:`#16a34a`,dark:`#4ade80`},emerald:{className:`text-emerald-600 dark:text-emerald-400`,light:`#059669`,dark:`#34d399`},teal:{className:`text-teal-600 dark:text-teal-400`,light:`#0d9488`,dark:`#2dd4bf`},cyan:{className:`text-cyan-600 dark:text-cyan-400`,light:`#0891b2`,dark:`#22d3ee`},sky:{className:`text-sky-500`,light:`#0ea5e9`,dark:`#0ea5e9`},blue:{className:`text-blue-500`,light:`#3b82f6`,dark:`#3b82f6`},indigo:{className:`text-indigo-500`,light:`#6366f1`,dark:`#6366f1`},violet:{className:`text-violet-500`,light:`#8b5cf6`,dark:`#8b5cf6`},purple:{className:`text-purple-500`,light:`#a855f7`,dark:`#a855f7`},fuchsia:{className:`text-fuchsia-500`,light:`#d946ef`,dark:`#d946ef`},pink:{className:`text-pink-500`,light:`#ec4899`,dark:`#ec4899`},rose:{className:`text-rose-500`,light:`#f43f5e`,dark:`#f43f5e`},gray:{className:`text-muted-foreground`,light:null,dark:null}}).map(([e,t])=>[e,t.className])),he=e=>M(e)?D(`settings.color.${e}`):e;function ge(e){return M(e)?{className:me[e]??`text-primary`}:{style:{color:e}}}var G=ie(),_e=U.createContext(void 0),ve=e=>{let t=U.useContext(_e);if(e)return e;if(!t)throw Error(`No QueryClient set, use QueryClientProvider to set one`);return t},ye=({client:e,children:t})=>(U.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),(0,G.jsx)(_e.Provider,{value:e,children:t})),be={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},xe=new class{#e=be;setTimeoutProvider(e){this.#e=e}setTimeout(e,t){return this.#e.setTimeout(e,t)}clearTimeout(e){this.#e.clearTimeout(e)}setInterval(e,t){return this.#e.setInterval(e,t)}clearInterval(e){this.#e.clearInterval(e)}};function Se(e){setTimeout(e,0)}var Ce=typeof window>`u`||`Deno`in globalThis;function we(){}function Te(e,t){return typeof e==`function`?e(t):e}function Ee(e){return typeof e==`number`&&e>=0&&e!==1/0}function De(e,t){return Math.max(e+(t||0)-Date.now(),0)}function Oe(e,t){return typeof e==`function`?e(t):e}function ke(e,t){let{type:n=`all`,exact:r,fetchStatus:i,predicate:a,queryKey:o,stale:s}=e;if(o){if(r){if(t.queryHash!==je(o,t.options))return!1}else if(!Ne(t.queryKey,o))return!1}if(n!==`all`){let e=t.isActive();if(n===`active`&&!e||n===`inactive`&&e)return!1}return!(typeof s==`boolean`&&t.isStale()!==s||i&&i!==t.state.fetchStatus||a&&!a(t))}function Ae(e,t){let{exact:n,status:r,predicate:i,mutationKey:a}=e;if(a){if(!t.options.mutationKey)return!1;if(n){if(Me(t.options.mutationKey)!==Me(a))return!1}else if(!Ne(t.options.mutationKey,a))return!1}return!(r&&t.state.status!==r||i&&!i(t))}function je(e,t){return(t?.queryKeyHashFn||Me)(e)}function Me(e){return JSON.stringify(e,(e,t)=>Re(t)?Object.keys(t).sort().reduce((e,n)=>(e[n]=t[n],e),{}):t)}function Ne(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(e&&t&&typeof e==`object`&&typeof t==`object`){if(Array.isArray(e)&&Array.isArray(t)){if(t.length>e.length)return!1;for(let n=0;n<t.length;n++)if(!Ne(e[n],t[n]))return!1;return!0}let n=Object.keys(t);for(let r of n)if(!Ne(e[r],t[r]))return!1;return!0}return!1}var Pe=Object.prototype.hasOwnProperty;function Fe(e,t,n=0){if(e===t)return e;if(n>500)return t;let r=Le(e)&&Le(t);if(!r&&!(Re(e)&&Re(t)))return t;let i=(r?e:Object.keys(e)).length,a=r?t:Object.keys(t),o=a.length,s=r?Array(o):{},c=0;for(let l=0;l<o;l++){let o=r?l:a[l],u=e[o],d=t[o];if(u===d){s[o]=u,(r?l<i:Pe.call(e,o))&&c++;continue}if(u===null||d===null||typeof u!=`object`||typeof d!=`object`){s[o]=d;continue}let f=Fe(u,d,n+1);s[o]=f,f===u&&c++}return i===o&&c===i?e:s}function Ie(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(let n in e)if(e[n]!==t[n])return!1;return!0}function Le(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function Re(e){if(!ze(e))return!1;let t=Object.getPrototypeOf(e),n=t?.constructor;if(n===void 0)return!0;if(typeof n!=`function`)return!1;let r=n.prototype;return!(!ze(r)||!r.hasOwnProperty(`isPrototypeOf`)||t!==Object.prototype)}function ze(e){return Object.prototype.toString.call(e)===`[object Object]`}function Be(e){return new Promise(t=>{xe.setTimeout(t,e)})}function Ve(e,t,n){return typeof n.structuralSharing==`function`?n.structuralSharing(e,t):n.structuralSharing===!1?t:Fe(e,t)}function He(e){return e}function Ue(e,t,n=0){let r=[...e,t];return n&&r.length>n?r.slice(1):r}function We(e,t,n=0){let r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var Ge=Symbol();function Ke(e,t){return!e.queryFn&&t?.initialPromise?()=>t.initialPromise:!e.queryFn||e.queryFn===Ge?()=>Promise.reject(Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function qe(e,t){return typeof e==`function`?e(...t):!!e}function Je(e,t,n){let r=!1,i;return Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(i??=t(),r||(r=!0,i.aborted?n():i.addEventListener(`abort`,n,{once:!0})),i)}),e}var Ye=()=>Ce,Xe=()=>Ye(),Ze=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(){}},Qe=new class extends Ze{#e;#t;#n;constructor(){super(),this.#n=e=>{if(typeof window<`u`&&window.addEventListener){let 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=>{typeof e==`boolean`?this.setFocused(e):this.onFocus()})}setFocused(e){this.#e!==e&&(this.#e=e,this.onFocus())}onFocus(){let e=this.isFocused();this.listeners.forEach(t=>{t(e)})}isFocused(){return typeof this.#e==`boolean`?this.#e:globalThis.document?.visibilityState!==`hidden`}},$e=Se;function et(){let e=[],t=0,n=e=>{e()},r=e=>{e()},i=$e,a=r=>{t?e.push(r):i(()=>{n(r)})},o=()=>{let t=e;e=[],t.length&&i(()=>{r(()=>{t.forEach(e=>{n(e)})})})};return{batch:e=>{let n;t++;try{n=e()}finally{t--,t||o()}return n},batchCalls:e=>(...t)=>{a(()=>{e(...t)})},schedule:a,setNotifyFunction:e=>{n=e},setBatchNotifyFunction:e=>{r=e},setScheduler:e=>{i=e}}}var tt=et(),nt=new class extends Ze{#e=!0;#t;#n;constructor(){super(),this.#n=e=>{if(typeof window<`u`&&window.addEventListener){let 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.#e!==e&&(this.#e=e,this.listeners.forEach(t=>{t(e)}))}isOnline(){return this.#e}};function rt(e){return Math.min(1e3*2**e,3e4)}function it(e){return(e??`online`)!==`online`||nt.isOnline()}var at=class extends Error{constructor(e){super(`CancelledError`),this.revert=e?.revert,this.silent=e?.silent}};function ot(e){let t=!1,n=0,r,i=`pending`,a,o,s=new Promise((e,t)=>{a=e,o=t});s.catch(we);let c=()=>i!==`pending`,l=t=>{if(!c()){let n=new at(t);h(n),e.onCancel?.(n)}},u=()=>{t=!0},d=()=>{t=!1},f=()=>Qe.isFocused()&&(e.networkMode===`always`||nt.isOnline())&&e.canRun(),p=()=>it(e.networkMode)&&e.canRun(),m=e=>{c()||(r?.(),i=`resolved`,a(e))},h=e=>{c()||(r?.(),i=`rejected`,o(e))},g=t=>new Promise(n=>{r=e=>{(c()||t())&&n(e)},e.onPause?.()}).then(()=>{r=void 0,c()||e.onContinue?.()}),_=()=>{if(c())return;let r,i=n===0?e.initialPromise:void 0;try{r=i??e.fn()}catch(e){r=Promise.reject(e)}Promise.resolve(r).then(m).catch(r=>{if(c())return;let i=e.retry??(Xe()?0:3),a=e.retryDelay??rt,o=typeof a==`function`?a(n,r):a,s=i===!0||typeof i==`number`&&n<i||typeof i==`function`&&i(n,r);t||!s?h(r):(n++,e.onFail?.(n,r),Be(o).then(()=>f()?void 0:g(f)).then(()=>{t?h(r):_()}))})};return{promise:s,status:()=>i,cancel:l,continue:()=>(r?.(),s),cancelRetry:u,continueRetry:d,canStart:p,start:()=>(p()?_():g(p).then(_),s)}}var st=class{#e;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),Ee(this.gcTime)&&(this.#e=xe.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(Xe()?1/0:3e5))}clearGcTimeout(){this.#e!==void 0&&(xe.clearTimeout(this.#e),this.#e=void 0)}};function ct(e){return{onFetch:(t,n)=>{let r=t.options,i=t.fetchOptions?.meta?.fetchMore?.direction,a=t.state.data?.pages||[],o=t.state.data?.pageParams||[],s={pages:[],pageParams:[]},c=0,l=async()=>{let n=!1,l=e=>{Je(e,()=>t.signal,()=>n=!0)},u=Ke(t.options,t.fetchOptions),d=async(e,r,i)=>{if(n)return Promise.reject(t.signal.reason);if(r==null&&e.pages.length)return Promise.resolve(e);let a=(()=>{let e={client:t.client,queryKey:t.queryKey,pageParam:r,direction:i?`backward`:`forward`,meta:t.options.meta};return l(e),e})(),o=await u(a),{maxPages:s}=t.options,c=i?We:Ue;return{pages:c(e.pages,o,s),pageParams:c(e.pageParams,r,s)}};if(i&&a.length){let e=i===`backward`,t=e?ut:lt,n={pages:a,pageParams:o};s=await d(n,t(r,n),e)}else{let t=e??a.length;do{let e=c===0?o[0]??r.initialPageParam:lt(r,s);if(c>0&&e==null)break;s=await d(s,e),c++}while(c<t)}return s};t.fetchFn=t.options.persister?()=>t.options.persister?.(l,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n):l}}}function lt(e,{pages:t,pageParams:n}){let r=t.length-1;return t.length>0?e.getNextPageParam(t[r],t,n[r],n):void 0}function ut(e,{pages:t,pageParams:n}){return t.length>0?e.getPreviousPageParam?.(t[0],t,n[0],n):void 0}var dt=class extends st{#e;#t;#n;#r;#i;#a;#o;#s;constructor(e){super(),this.#s=!1,this.#o=e.defaultOptions,this.setOptions(e.options),this.observers=[],this.#i=e.client,this.#r=this.#i.getQueryCache(),this.queryKey=e.queryKey,this.queryHash=e.queryHash,this.#t=mt(this.options),this.state=e.state??this.#t,this.scheduleGc()}get meta(){return this.options.meta}get queryType(){return this.#e}get promise(){return this.#a?.promise}setOptions(e){if(this.options={...this.#o,...e},e?._type&&(this.#e=e._type),this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){let e=mt(this.options);e.data!==void 0&&(this.setState(pt(e.data,e.dataUpdatedAt)),this.#t=e)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus===`idle`&&this.#r.remove(this)}setData(e,t){let n=Ve(this.state.data,e,this.options);return this.#c({data:n,type:`success`,dataUpdatedAt:t?.updatedAt,manual:t?.manual}),n}setState(e){this.#c({type:`setState`,state:e})}cancel(e){let t=this.#a?.promise;return this.#a?.cancel(e),t?t.then(we).catch(we):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return this.#t}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(e=>Oe(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Ge||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0&&this.observers.some(e=>Oe(e.options.staleTime,this)===`static`)}isStale(){return this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(e=0){return this.state.data===void 0?!0:e===`static`?!1:this.state.isInvalidated?!0:!De(this.state.dataUpdatedAt,e)}onFocus(){this.observers.find(e=>e.shouldFetchOnWindowFocus())?.refetch({cancelRefetch:!1}),this.#a?.continue()}onOnline(){this.observers.find(e=>e.shouldFetchOnReconnect())?.refetch({cancelRefetch:!1}),this.#a?.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),this.#r.notify({type:`observerAdded`,query:this,observer:e}))}removeObserver(e){let t=this.observers.indexOf(e);t!==-1&&(this.observers.splice(t,1),this.observers.length||(this.#a&&(this.#s||this.state.fetchStatus===`paused`&&this.state.status===`pending`?this.#a.cancel({revert:!0}):this.#a.cancelRetry()),this.scheduleGc()),this.#r.notify({type:`observerRemoved`,query:this,observer:e}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||this.#c({type:`invalidate`})}async fetch(e,t){if(this.state.fetchStatus!==`idle`&&this.#a?.status()!==`rejected`){if(this.state.data!==void 0&&t?.cancelRefetch)this.cancel({silent:!0});else if(this.#a)return this.#a.continueRetry(),this.#a.promise}if(e&&this.setOptions(e),!this.options.queryFn){let e=this.observers.find(e=>e.options.queryFn);e&&this.setOptions(e.options)}let n=new AbortController,r=e=>{Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(this.#s=!0,n.signal)})},i=()=>{let e=Ke(this.options,t),n=(()=>{let e={client:this.#i,queryKey:this.queryKey,meta:this.meta};return r(e),e})();return this.#s=!1,this.options.persister?this.options.persister(e,n,this):e(n)},a=(()=>{let e={fetchOptions:t,options:this.options,queryKey:this.queryKey,client:this.#i,state:this.state,fetchFn:i};return r(e),e})();(this.#e===`infinite`?ct(this.options.pages):this.options.behavior)?.onFetch(a,this),this.#n=this.state,(this.state.fetchStatus===`idle`||this.state.fetchMeta!==a.fetchOptions?.meta)&&this.#c({type:`fetch`,meta:a.fetchOptions?.meta});let o=this.#a=ot({initialPromise:t?.initialPromise,fn:a.fetchFn,onCancel:e=>{e instanceof at&&e.revert&&this.setState({...this.#n,fetchStatus:`idle`}),n.abort()},onFail:(e,t)=>{this.#c({type:`failed`,failureCount:e,error:t})},onPause:()=>{this.#c({type:`pause`})},onContinue:()=>{this.#c({type:`continue`})},retry:a.options.retry,retryDelay:a.options.retryDelay,networkMode:a.options.networkMode,canRun:()=>!0});try{let e=await o.start();if(e===void 0)throw Error(`${this.queryHash} data is undefined`);return this.setData(e),this.#r.config.onSuccess?.(e,this),this.#r.config.onSettled?.(e,this.state.error,this),e}catch(e){if(e instanceof at){if(e.silent)return this.#a.promise;if(e.revert){if(this.state.data===void 0)throw e;return this.state.data}}throw this.#c({type:`error`,error:e}),this.#r.config.onError?.(e,this),this.#r.config.onSettled?.(this.state.data,e,this),e}finally{this.#a===o&&(this.#a=void 0),this.scheduleGc()}}#c(e){let t=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,...ft(t.data,this.options),fetchMeta:e.meta??null};case`success`:let n={...t,...pt(e.data,e.dataUpdatedAt),dataUpdateCount:t.dataUpdateCount+1,...!e.manual&&{fetchStatus:`idle`,fetchFailureCount:0,fetchFailureReason:null}};return this.#n=e.manual?n:void 0,n;case`error`:let 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=t(this.state),tt.batch(()=>{this.observers.slice().forEach(e=>{e.onQueryUpdate()}),this.#r.notify({query:this,type:`updated`,action:e})})}};function ft(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:it(t.networkMode)?`fetching`:`paused`,...e===void 0&&{error:null,status:`pending`}}}function pt(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:`success`}}function mt(e){let t=typeof e.initialData==`function`?e.initialData():e.initialData,n=t!==void 0,r=n?typeof e.initialDataUpdatedAt==`function`?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 ht=class extends Ze{#e;#t=void 0;#n=void 0;#r=void 0;#i;#a;#o;#s;#c;#l;#u;#d;#f;#p=new Set;constructor(e,t){super(),this.options=t,this.#e=e,this.#o=null,this.bindMethods(),this.setOptions(t)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.#t.addObserver(this),_t(this.#t,this.options)?this.#m():this.updateResult(),this.#y())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return vt(this.#t,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return vt(this.#t,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#b(),this.#x(),this.#t.removeObserver(this)}setOptions(e){let t=this.options,n=this.#t;if(this.options=this.#e.defaultQueryOptions(e),this.options.enabled!==void 0&&typeof this.options.enabled!=`boolean`&&typeof this.options.enabled!=`function`&&typeof Oe(this.options.enabled,this.#t)!=`boolean`)throw Error(`Expected enabled to be a boolean or a callback that returns a boolean`);this.#S(),this.#t.setOptions(this.options),t._defaulted&&!Ie(this.options,t)&&this.#e.getQueryCache().notify({type:`observerOptionsUpdated`,query:this.#t,observer:this});let r=this.hasListeners();r&&yt(this.#t,n,this.options,t)&&this.#m(),this.updateResult(),r&&(this.#t!==n||Oe(this.options.enabled,this.#t)!==Oe(t.enabled,this.#t)||Oe(this.options.staleTime,this.#t)!==Oe(t.staleTime,this.#t))&&this.#g();let i=this.#_();r&&(this.#t!==n||Oe(this.options.enabled,this.#t)!==Oe(t.enabled,this.#t)||i!==this.#f)&&this.#v(i)}getOptimisticResult(e){let t=this.#e.getQueryCache().build(this.#e,e),n=this.createResult(t,e);return Ie(this.getCurrentResult(),n)||(this.#r=n,this.#a=this.options,this.#i=this.#t.state),n}getCurrentResult(){return this.#r}trackResult(e,t){return new Proxy(e,{get:(e,n)=>(this.trackProp(n),t?.(n),Reflect.get(e,n))})}trackProp(e){this.#p.add(e)}getCurrentQuery(){return this.#t}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){let t=this.#e.defaultQueryOptions(e),n=this.#e.getQueryCache().build(this.#e,t),r=()=>{},i,a=new Promise(e=>{i=e,r=this.#e.getQueryCache().subscribe(i=>{i.type===`updated`&&i.query.queryHash===n.queryHash&&n.state.data!==void 0&&(r(),e(this.createResult(n,t)))})});return Promise.race([n.fetch().then(()=>{let e=this.createResult(n,t);return i?.(e),e}).finally(()=>{r()}),a])}fetch(e){return this.#m({...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#r))}#m(e){this.#S();let t=this.#t.fetch(this.options,e);return e?.throwOnError||(t=t.catch(we)),t}#h(e){return!Xe()&&Oe(this.options.enabled,this.#t)!==!1&&Ee(e)}#g(){this.#b();let e=Oe(this.options.staleTime,this.#t);if(this.#r.isStale||!this.#h(e))return;let t=De(this.#r.dataUpdatedAt,e)+1;this.#u=xe.setTimeout(()=>{this.#r.isStale||this.updateResult()},t)}#_(){return Oe(this.options.refetchInterval,this.#t)??!1}#v(e){this.#x(),this.#f=e,this.#f!==0&&this.#h(this.#f)&&(this.#d=xe.setInterval(()=>{(this.options.refetchIntervalInBackground||Qe.isFocused())&&this.#m()},this.#f))}#y(){this.#g(),this.#v(this.#_())}#b(){this.#u!==void 0&&(xe.clearTimeout(this.#u),this.#u=void 0)}#x(){this.#d!==void 0&&(xe.clearInterval(this.#d),this.#d=void 0)}createResult(e,t){let n=this.#t,r=this.options,i=this.#r,a=this.#i,o=this.#a,s=e===n?this.#n:e.state,{state:c}=e,l={...c},u=!1,d;if(t._optimisticResults){let i=this.hasListeners(),a=!i&&_t(e,t),o=i&&yt(e,n,t,r);(a||o)&&(l={...l,...ft(c.data,e.options)}),t._optimisticResults===`isRestoring`&&(l.fetchStatus=`idle`)}let{error:f,errorUpdatedAt:p,status:m}=l;d=l.data;let h=!1;if(t.placeholderData!==void 0&&d===void 0&&m===`pending`){let e;i?.isPlaceholderData&&t.placeholderData===o?.placeholderData?(e=i.data,h=!0):e=typeof t.placeholderData==`function`?t.placeholderData(this.#l?.state.data,this.#l):t.placeholderData,e!==void 0&&(m=`success`,d=Ve(i?.data,e,t),u=!0)}if(t.select&&d!==void 0&&!h){if(i&&d===a?.data&&t.select===this.#s)d=this.#c;else try{this.#s=t.select,d=t.select(d),d=Ve(i?.data,d,t),this.#c=d,this.#o=null}catch(e){this.#o=e}}else d===void 0&&(this.#o=null);this.#o&&(f=this.#o,d=this.#c,p=Date.now(),m=`error`,u=!1);let g=l.fetchStatus===`fetching`,_=m===`pending`,v=m===`error`,y=_&&g,b=d!==void 0;return{status:m,fetchStatus:l.fetchStatus,isPending:_,isSuccess:m===`success`,isError:v,isInitialLoading:y,isLoading:y,data:d,dataUpdatedAt:l.dataUpdatedAt,error:f,errorUpdatedAt:p,failureCount:l.fetchFailureCount,failureReason:l.fetchFailureReason,errorUpdateCount:l.errorUpdateCount,isFetched:e.isFetched(),isFetchedAfterMount:l.dataUpdateCount>s.dataUpdateCount||l.errorUpdateCount>s.errorUpdateCount,isFetching:g,isRefetching:g&&!_,isLoadingError:v&&!b,isPaused:l.fetchStatus===`paused`,isPlaceholderData:u,isRefetchError:v&&b,isStale:bt(e,t),refetch:this.refetch,isEnabled:Oe(t.enabled,e)!==!1}}updateResult(){let e=this.#r,t=this.createResult(this.#t,this.options);if(this.#i=this.#t.state,this.#a=this.options,this.#i.data!==void 0&&(this.#l=this.#t),Ie(t,e))return;this.#r=t;let n=(()=>{if(!e)return!0;let{notifyOnChangeProps:t}=this.options,n=typeof t==`function`?t():t;if(n===`all`||!n&&!this.#p.size)return!0;let r=new Set(n??this.#p);return this.options.throwOnError&&r.add(`error`),Object.keys(this.#r).some(t=>{let n=t;return this.#r[n]!==e[n]&&r.has(n)})})();tt.batch(()=>{n&&this.listeners.forEach(e=>{e(this.#r)}),this.#e.getQueryCache().notify({query:this.#t,type:`observerResultsUpdated`})})}#S(){let e=this.#e.getQueryCache().build(this.#e,this.options);if(e===this.#t)return;let t=this.#t;this.#t=e,this.#n=e.state,this.hasListeners()&&(t?.removeObserver(this),e.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#y()}};function gt(e,t){return Oe(t.enabled,e)!==!1&&e.state.data===void 0&&(e.state.status!==`error`||Oe(t.retryOnMount,e)!==!1)}function _t(e,t){return gt(e,t)||e.state.data!==void 0&&vt(e,t,t.refetchOnMount)}function vt(e,t,n){if(Oe(t.enabled,e)!==!1&&Oe(t.staleTime,e)!==`static`){let r=Oe(n,e);return r===`always`||r!==!1&&bt(e,t)}return!1}function yt(e,t,n,r){return(e!==t||Oe(r.enabled,e)===!1)&&(!n.suspense||e.state.status!==`error`)&&bt(e,n)}function bt(e,t){return Oe(t.enabled,e)!==!1&&e.isStaleByTime(Oe(t.staleTime,e))}var xt=class extends st{#e;#t;#n;#r;constructor(e){super(),this.#e=e.client,this.mutationId=e.mutationId,this.#n=e.mutationCache,this.#t=[],this.state=e.state||St(),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.#t.includes(e)||(this.#t.push(e),this.clearGcTimeout(),this.#n.notify({type:`observerAdded`,mutation:this,observer:e}))}removeObserver(e){this.#t=this.#t.filter(t=>t!==e),this.scheduleGc(),this.#n.notify({type:`observerRemoved`,mutation:this,observer:e})}optionalRemove(){this.#t.length||(this.state.status===`pending`?this.scheduleGc():this.#n.remove(this))}continue(){return this.#r?.continue()??(this.state.status===`pending`?this.execute(this.state.variables):Promise.resolve())}async execute(e){let t=()=>{this.#i({type:`continue`})},n={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey},r=this.#r=ot({fn:()=>this.options.mutationFn?this.options.mutationFn(e,n):Promise.reject(Error(`No mutationFn found`)),onFail:(e,t)=>{this.#i({type:`failed`,failureCount:e,error:t})},onPause:()=>{this.#i({type:`pause`})},onContinue:t,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>this.#n.canRun(this)}),i=this.state.status===`pending`,a=!r.canStart();try{if(i)t();else{this.#i({type:`pending`,variables:e,isPaused:a}),this.#n.config.onMutate&&await this.#n.config.onMutate(e,this,n);let t=await this.options.onMutate?.(e,n);t!==this.state.context&&this.#i({type:`pending`,context:t,variables:e,isPaused:a})}let o=await r.start();return await this.#n.config.onSuccess?.(o,e,this.state.context,this,n),await this.options.onSuccess?.(o,e,this.state.context,n),await this.#n.config.onSettled?.(o,null,this.state.variables,this.state.context,this,n),await this.options.onSettled?.(o,null,e,this.state.context,n),this.#i({type:`success`,data:o}),o}catch(t){try{await this.#n.config.onError?.(t,e,this.state.context,this,n)}catch(e){Promise.reject(e)}try{await this.options.onError?.(t,e,this.state.context,n)}catch(e){Promise.reject(e)}try{await this.#n.config.onSettled?.(void 0,t,this.state.variables,this.state.context,this,n)}catch(e){Promise.reject(e)}try{await this.options.onSettled?.(void 0,t,e,this.state.context,n)}catch(e){Promise.reject(e)}throw this.#i({type:`error`,error:t}),t}finally{this.#r===r&&(this.#r=void 0),this.#n.runNext(this)}}#i(e){let t=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=t(this.state),tt.batch(()=>{this.#t.forEach(t=>{t.onMutationUpdate(e)}),this.#n.notify({mutation:this,type:`updated`,action:e})})}};function St(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:`idle`,variables:void 0,submittedAt:0}}var Ct=class extends Ze{#e;#t=void 0;#n;#r;constructor(e,t){super(),this.#e=e,this.setOptions(t),this.bindMethods(),this.#i()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(e){let t=this.options;this.options=this.#e.defaultMutationOptions(e),Ie(this.options,t)||this.#e.getMutationCache().notify({type:`observerOptionsUpdated`,mutation:this.#n,observer:this}),t?.mutationKey&&this.options.mutationKey&&Me(t.mutationKey)!==Me(this.options.mutationKey)?this.reset():this.#n?.state.status===`pending`&&this.#n.setOptions(this.options)}onSubscribe(){this.listeners.size===1&&this.#n&&(this.#n.addObserver(this),this.#i())}onUnsubscribe(){this.hasListeners()||this.#n?.removeObserver(this)}onMutationUpdate(e){this.#i(),this.#a(e)}getCurrentResult(){return this.#t}reset(){this.#n?.removeObserver(this),this.#n=void 0,this.#i(),this.#a()}mutate(e,t){return this.#r=t,this.#n?.removeObserver(this),this.#n=this.#e.getMutationCache().build(this.#e,this.options),this.#n.addObserver(this),this.#n.execute(e)}#i(){let e=this.#n?.state??St();this.#t={...e,isPending:e.status===`pending`,isSuccess:e.status===`success`,isError:e.status===`error`,isIdle:e.status===`idle`,mutate:this.mutate,reset:this.reset}}#a(e){tt.batch(()=>{let t=this.#r;if(t&&this.hasListeners()){let n=this.#t.variables,r=this.#t.context,i={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};if(e?.type===`success`){try{t.onSuccess?.(e.data,n,r,i)}catch(e){Promise.reject(e)}try{t.onSettled?.(e.data,null,n,r,i)}catch(e){Promise.reject(e)}}else if(e?.type===`error`){try{t.onError?.(e.error,n,r,i)}catch(e){Promise.reject(e)}try{t.onSettled?.(void 0,e.error,n,r,i)}catch(e){Promise.reject(e)}}}this.listeners.forEach(e=>{e(this.#t)})})}},wt=U.createContext(!1),Tt=()=>U.useContext(wt),Et=wt.Provider;function Dt(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var Ot=U.createContext(Dt()),kt=()=>U.useContext(Ot),At=(e,t,n)=>{let r=n?.state.error&&typeof e.throwOnError==`function`?qe(e.throwOnError,[n.state.error,n]):e.throwOnError;(e.suspense||r)&&(t.isReset()||(e.retryOnMount=!1))},jt=e=>{U.useEffect(()=>{e.clearReset()},[e])},Mt=({result:e,errorResetBoundary:t,throwOnError:n,query:r,suspense:i})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&(i&&e.data===void 0||qe(n,[e.error,r])),Nt=e=>{if(e.suspense){let t=1e3,n=e=>e===`static`?e:Math.max(e??t,t),r=e.staleTime;e.staleTime=typeof r==`function`?(...e)=>n(r(...e)):n(r),typeof e.gcTime==`number`&&(e.gcTime=Math.max(e.gcTime,t))}},Pt=(e,t)=>e?.suspense&&t.isPending,Ft=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function It(e,t,n){let r=Tt(),i=kt(),a=ve(n),o=a.defaultQueryOptions(e),s=a.getQueryCache().get(o.queryHash),c=e.subscribed!==!1;o._optimisticResults=r?`isRestoring`:c?`optimistic`:void 0,Nt(o),At(o,i,s),jt(i);let[l]=U.useState(()=>new t(a,o)),u=l.getOptimisticResult(o),d=!r&&c;if(U.useSyncExternalStore(U.useCallback(e=>{let t=d?l.subscribe(tt.batchCalls(e)):we;return l.updateResult(),t},[l,d]),()=>l.getCurrentResult(),()=>l.getCurrentResult()),U.useEffect(()=>{l.setOptions(o)},[o,l]),Pt(o,u))throw Ft(o,l,i);if(Mt({result:u,errorResetBoundary:i,throwOnError:o.throwOnError,query:s,suspense:o.suspense}))throw u.error;return o.notifyOnChangeProps?u:l.trackResult(u)}function Lt(e,t){return It(e,ht,t)}function Rt(e,t){let n=ve(t),[r]=U.useState(()=>new Ct(n,e));U.useEffect(()=>{r.setOptions(e)},[r,e]);let i=U.useSyncExternalStore(U.useCallback(e=>r.subscribe(tt.batchCalls(e)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),a=U.useCallback((...e)=>{r.mutate(e[0],e[1]).catch(we)},[r]);if(i.error&&qe(r.options.throwOnError,[i.error]))throw i.error;return{...i,mutate:a,mutateAsync:i.mutate}}var zt=e=>e?.replace(/([a-z0-9])([A-Z])/g,`$1-$2`).toLowerCase();function Bt(e,t,n=[]){if(t==null)throw Error(`[lucide]: iconNode is required when icon name is used`);return{name:zt(e),size:24,node:t,...n.length>0?{aliases:n}:{}}}var Vt=e=>{let t=``,n=!1;for(let r of e)r===`-`||r===`_`||r<=` `?n=t.length>0:(t.length===0?t+=r.toLowerCase():t+=n?r.toUpperCase():r,n=!1);return t},Ht=e=>{let t=Vt(e);return t.charAt(0).toUpperCase()+t.slice(1)},Ut=(...e)=>e.filter((e,t,n)=>!!e&&e.trim()!==``&&n.indexOf(e)===t).join(` `).trim(),Wt={xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":2,"stroke-linecap":`round`,"stroke-linejoin":`round`};function Gt(e){return e!=null}function Kt(e,t={}){let n=t.attributeNames??{},r=e=>n[e]??e,i=e.size??e.width??Wt.width,a=e.size??e.height??Wt.height,o=e.aliases?.filter(e=>typeof e==`string`&&e.trim()!==``).map(e=>`lucide-${e}`)??[],s=[...e.name?[`lucide-${e.name}`]:[],...o],c=t.className?.split(` `).filter(Boolean)??[],l=t.includeDefaultClasses===!1?Ut(...c):Ut(`lucide`,...s,...c),u=t.absoluteStrokeWidth?Number(t.strokeWidth??Wt[`stroke-width`])*Number(e.size??e.width??Wt.width)/Number(t.size??t.width??Wt.width):t.strokeWidth??Wt[`stroke-width`];return[`svg`,{...Object.entries(Wt).reduce((e,[t,n])=>(e[r(t)]=n,e),{}),...`color`in t&&t.color&&{[r(`stroke`)]:t.color},...`size`in t&&Gt(t.size)&&{[r(`width`)]:t.size,[r(`height`)]:t.size},...`width`in t&&Gt(t.width)&&{[r(`width`)]:t.width},...`height`in t&&Gt(t.height)&&{[r(`height`)]:t.height},[r(`stroke-width`)]:u,...l&&{[r(`class`)]:l},[r(`viewBox`)]:`0 0 ${i} ${a}`,...t.hasA11yProp===!1?{[r(`aria-hidden`)]:`true`}:{},...`attributes`in t&&t.attributes},e.node.map(e=>{let[n,i,a]=e,o=t.nonScalingStroke?{[r(`vector-effect`)]:`non-scaling-stroke`,...i}:i;return a?[n,o,a]:[n,o]})]}function qt(e,t={}){return Kt(e,{...t,attributeNames:{...t.attributeNames,class:`className`,"stroke-width":`strokeWidth`,"stroke-linecap":`strokeLinecap`,"stroke-linejoin":`strokeLinejoin`,"vector-effect":`vectorEffect`}})}var Jt=e=>{for(let t in e)if(t.startsWith(`aria-`)||t===`role`||t===`title`)return!0;return!1},Yt=(0,U.createContext)({}),Xt=()=>(0,U.useContext)(Yt),Zt=(0,U.forwardRef)(({color:e,size:t,width:n,height:r,strokeWidth:i,absoluteStrokeWidth:a,nonScalingStroke:o,className:s=``,children:c,iconNode:l=[],icon:u={node:l,aliases:[],size:24},...d},f)=>{let{size:p=24,strokeWidth:m=2,absoluteStrokeWidth:h=!1,nonScalingStroke:g=!1,color:_=`currentColor`,className:v=``}=Xt()??{},y=!!c||Jt(d),[b,x,S=[]]=qt(u,{color:e??_,width:n??t??p,height:r??t??p,strokeWidth:i??m,absoluteStrokeWidth:a??h,nonScalingStroke:o??g,className:Ut(v,s),hasA11yProp:y,attributes:d});return(0,U.createElement)(b,{ref:f,...x},[...S.map(([e,t])=>(0,U.createElement)(e,t)),...Array.isArray(c)?c:[c]])});function Qt(e,t=[],n=[]){let r=typeof e==`string`?Bt(e,t,n):e,i=(0,U.forwardRef)(({className:e,...t},n)=>(0,U.createElement)(Zt,{ref:n,icon:r,className:e,...t}));return r.name&&(i.displayName=Ht(r.name)),i}var $t={name:`arrow-down`,size:24,node:[[`path`,{d:`M12 5v14`,key:`s699le`}],[`path`,{d:`m19 12-7 7-7-7`,key:`1idqje`}]]};$t.node;var en=Qt($t),tn={name:`arrow-up`,size:24,node:[[`path`,{d:`m5 12 7-7 7 7`,key:`hav0vg`}],[`path`,{d:`M12 19V5`,key:`x0mq9r`}]]};tn.node;var nn=Qt(tn),rn={name:`book-open`,size:24,node:[[`path`,{d:`M12 5v16`,key:`1f6ucr`}],[`path`,{d:`M20.001 19A2 2 0 0022 17V5a2 2 0 00-1.999-2L16 3.002A5 5 0 0012 5a5 5 0 00-4-2H4a2 2 0 00-2 2v12a2 2 0 001.999 2H8a5 5 0 014 2 5 5 0 014-2z`,key:`1fyvmf`}]]};rn.node;var an=Qt(rn),on={name:`bug`,size:24,node:[[`path`,{d:`M12 20v-9`,key:`1qisl0`}],[`path`,{d:`M14 7a4 4 0 0 1 4 4v3a6 6 0 0 1-12 0v-3a4 4 0 0 1 4-4z`,key:`uouzyp`}],[`path`,{d:`M14.12 3.88 16 2`,key:`qol33r`}],[`path`,{d:`M21 21a4 4 0 0 0-3.81-4`,key:`1b0z45`}],[`path`,{d:`M21 5a4 4 0 0 1-3.55 3.97`,key:`5cxbf6`}],[`path`,{d:`M22 13h-4`,key:`1jl80f`}],[`path`,{d:`M3 21a4 4 0 0 1 3.81-4`,key:`1fjd4g`}],[`path`,{d:`M3 5a4 4 0 0 0 3.55 3.97`,key:`1d7oge`}],[`path`,{d:`M6 13H2`,key:`82j7cp`}],[`path`,{d:`m8 2 1.88 1.88`,key:`fmnt4t`}],[`path`,{d:`M9 7.13V6a3 3 0 1 1 6 0v1.13`,key:`1vgav8`}]]};on.node;var sn=Qt(on),cn={name:`calendar-clock`,size:24,node:[[`path`,{d:`M16 14v2.2l1.6 1`,key:`fo4ql5`}],[`path`,{d:`M16 2v3`,key:`otl347`}],[`path`,{d:`M21 7.338V5a2 2 0 00-2-2H5a2 2 0 00-2 2v14a2 2 0 002 2h2.338`,key:`7hb8p4`}],[`path`,{d:`M3 9h5.859`,key:`numkqi`}],[`path`,{d:`M8 2v3`,key:`1ioesn`}],[`circle`,{cx:`16`,cy:`16`,r:`6`,key:`qoo3c4`}]]};cn.node;var ln=Qt(cn),un={name:`check`,size:24,node:[[`path`,{d:`M20 6 9 17l-5-5`,key:`1gmf2c`}]]};un.node;var dn=Qt(un),fn={name:`chevron-down`,size:24,node:[[`path`,{d:`m6 9 6 6 6-6`,key:`qrunsl`}]]};fn.node;var pn=Qt(fn),mn={name:`chevron-up`,size:24,node:[[`path`,{d:`m18 15-6-6-6 6`,key:`153udz`}]]};mn.node;var hn=Qt(mn),gn={name:`circle-alert`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`line`,{x1:`12`,x2:`12`,y1:`8`,y2:`12`,key:`1pkeuh`}],[`line`,{x1:`12`,x2:`12.01`,y1:`16`,y2:`16`,key:`4dfq90`}]],aliases:[`alert-circle`]};gn.node;var _n=Qt(gn),vn={name:`circle-check`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`m16 9-5.5 5.5L8 12`,key:`xofnsj`}]],aliases:[`check-circle-2`]};vn.node;var yn=Qt(vn),bn={name:`circle-dashed`,size:24,node:[[`path`,{d:`M10.1 2.182a10 10 0 0 1 3.8 0`,key:`5ilxe3`}],[`path`,{d:`M13.9 21.818a10 10 0 0 1-3.8 0`,key:`11zvb9`}],[`path`,{d:`M17.609 3.721a10 10 0 0 1 2.69 2.7`,key:`1iw5b2`}],[`path`,{d:`M2.182 13.9a10 10 0 0 1 0-3.8`,key:`c0bmvh`}],[`path`,{d:`M20.279 17.609a10 10 0 0 1-2.7 2.69`,key:`1ruxm7`}],[`path`,{d:`M21.818 10.1a10 10 0 0 1 0 3.8`,key:`qkgqxc`}],[`path`,{d:`M3.721 6.391a10 10 0 0 1 2.7-2.69`,key:`1mcia2`}],[`path`,{d:`M6.391 20.279a10 10 0 0 1-2.69-2.7`,key:`1fvljs`}]]};bn.node;var xn=Qt(bn),Sn={name:`circle-dot`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`1`,key:`41hilf`}],[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}]]};Sn.node;var Cn=Qt(Sn),wn={name:`circle-x`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`m15 9-6 6`,key:`1uzhvr`}],[`path`,{d:`m9 9 6 6`,key:`z0biqf`}]],aliases:[`x-circle`]};wn.node;var Tn=Qt(wn),En={name:`circle`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}]]};En.node;var Dn=Qt(En),On={name:`clock`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M12 6v6l4 2`,key:`mmk7yg`}]]};On.node;var kn=Qt(On),An={name:`copy`,size:24,node:[[`rect`,{width:`14`,height:`14`,x:`8`,y:`8`,rx:`2`,ry:`2`,key:`17jyea`}],[`path`,{d:`M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2`,key:`zix9uf`}]]};An.node;var jn=Qt(An),Mn={name:`equal`,size:24,node:[[`line`,{x1:`5`,x2:`19`,y1:`9`,y2:`9`,key:`1nwqeh`}],[`line`,{x1:`5`,x2:`19`,y1:`15`,y2:`15`,key:`g8yjpy`}]]};Mn.node;var Nn=Qt(Mn),Pn={name:`eye-off`,size:24,node:[[`path`,{d:`M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49`,key:`ct8e1f`}],[`path`,{d:`M14.084 14.158a3 3 0 0 1-4.242-4.242`,key:`151rxh`}],[`path`,{d:`M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143`,key:`13bj9a`}],[`path`,{d:`m2 2 20 20`,key:`1ooewy`}]]};Pn.node;var Fn=Qt(Pn),In={name:`eye`,size:24,node:[[`path`,{d:`M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0`,key:`1nclc0`}],[`circle`,{cx:`12`,cy:`12`,r:`3`,key:`1v7zrd`}]]};In.node;var Ln=Qt(In),Rn={name:`flask-conical`,size:24,node:[[`path`,{d:`M14 2v6a2 2 0 0 0 .245.96l5.51 10.08A2 2 0 0 1 18 22H6a2 2 0 0 1-1.755-2.96l5.51-10.08A2 2 0 0 0 10 8V2`,key:`18mbvz`}],[`path`,{d:`M6.453 15h11.094`,key:`3shlmq`}],[`path`,{d:`M8.5 2h7`,key:`csnxdl`}]]};Rn.node;var zn=Qt(Rn),Bn={name:`loader-circle`,size:24,node:[[`path`,{d:`M21 12a9 9 0 1 1-6.219-8.56`,key:`13zald`}]],aliases:[`loader-2`]};Bn.node;var Vn=Qt(Bn),Hn={name:`minus`,size:24,node:[[`path`,{d:`M5 12h14`,key:`1ays0h`}]]};Hn.node;var Un=Qt(Hn),Wn={name:`octagon-alert`,size:24,node:[[`path`,{d:`M12 16h.01`,key:`1drbdi`}],[`path`,{d:`M12 8v4`,key:`1got3b`}],[`path`,{d:`M15.312 2a2 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-.586l-4.688-4.688A2 2 0 0 1 2 15.312V8.688a2 2 0 0 1 .586-1.414l4.688-4.688A2 2 0 0 1 8.688 2z`,key:`1fd625`}]],aliases:[`alert-octagon`]};Wn.node;var Gn=Qt(Wn),Kn={name:`search`,size:24,node:[[`path`,{d:`m21 21-4.34-4.34`,key:`14j7rj`}],[`circle`,{cx:`11`,cy:`11`,r:`8`,key:`4ej97u`}]]};Kn.node;var qn=Qt(Kn),Jn={name:`sparkles`,size:24,node:[[`path`,{d:`M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z`,key:`1s2grr`}],[`path`,{d:`M20 2v4`,key:`1rf3ol`}],[`path`,{d:`M22 4h-4`,key:`gwowj6`}],[`circle`,{cx:`4`,cy:`20`,r:`2`,key:`6kqj1y`}]],aliases:[`stars`]};Jn.node;var Yn=Qt(Jn),Xn={name:`wrench`,size:24,node:[[`path`,{d:`M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.106-3.105c.32-.322.863-.22.983.218a6 6 0 0 1-8.259 7.057l-7.91 7.91a1 1 0 0 1-2.999-3l7.91-7.91a6 6 0 0 1 7.057-8.259c.438.12.54.662.219.984z`,key:`1ngwbx`}]]};Xn.node;var Zn=Qt(Xn),Qn={name:`x`,size:24,node:[[`path`,{d:`M18 6 6 18`,key:`1bl5f8`}],[`path`,{d:`m6 6 12 12`,key:`d8bk6v`}]]};Qn.node;var $n=Qt(Qn),er=48,tr=(e,t=0)=>{let n=new Int32Array(e.length);for(let r=0;r<e.length;r++)n[r]=e.charCodeAt(r)-er-t;return n},nr=e=>{let t=new Int32Array(e.length+1);for(let n=0;n<e.length;n++)t[n+1]=t[n]+e[n];return t},rr=e=>{let t=new Int32Array(e.length),n=0;for(let r=0;r<e.length;r++){let i=e.charCodeAt(r)-er;n+=i>>>1^-(i&1),t[r]=n}return t},ir=384,ar=[],or=nr(tr(`E0500002005282000000002000150000020021820000011200000003022202000300004200120000200420001200021200301200010400162000010000220021010:2192001200220012000220012000200200200400010200040000000000400200108200110100000022010313000162002000020020012020080213000228200000000082000000000120002000120020020040101020300130001001010`)),sr=nr(tr(`:11111111211111119311546544411119731869:671397415686432441111111111161114151214313433415:78311132233313187211117221449443411141111151152226611131111112212518142224214215421421542142424242516171151615616347111111111197911327451111111111111111111113134714133513411111311111111111111111111112444411111342312715245411117:3`)),cr=`@containerabcdefghinlmoprstunderlineviawzccentlignnimatespectuto-colsrowsaglorightnessckdrop-sisbcontrastfiltergrayscalehue-rotateinvertopacityslurrightnessaturateepia-coniclinearpositionradialsizeockurrderttom-belrstxyespacing-xyaretoursorlnt-umnsendspantartainentrasteividerop-shadowurationcorationlay-xyasendillexontromlter-featuresstretchapr-xyayscaleidow-colsrowsue-rotatedentlinesetvert-beringsxyeshadoweiadingftnest-clamp-imageabein-lrstxyskx--b-coniclpositionrsizet-x-y-fromto-fromto-inearfromto-fromto-adialfromto-fromtofromtofromtofromtoblockhinlinew-screenesblockhinlinewbjectpacityrutlinederigin-offsetbelrstxyesrspective-originaceholderioghtng-offsettateundedw-xyz-belrstlreseslr-endspantartaturatecepiahizekewpace-taleroll-xyz-barmpbelrstxyesbelrstxyes-thumbrackadowrink-xyxyartrokeabextora-shadowpckingnsformitionlate-xyz-offsetill-changeoom`,lr=(()=>{let e=or.length-1,t=new Int32Array(e);for(let n=e-1;n>=0;n--){let e=1,r=n+1;for(let i=or[n];i<or[n+1];i++)e+=t[r],r+=t[r];t[n]=e}let n=new Int32Array(or[e]),r=0;for(let i=0;i<e;i++){let e=i+1;for(let a=or[i];a<or[i+1];a++)n[r++]=e,e+=t[e]}return n})(),ur=tr(`02000000000000900<=0?000B000F00F00ŏI0J0LNPRTVX0000]_a00000000000000000000000rst0000000zŏ00000000000
ŏ0000000ŏ00000000000000000000000000000000000000000000000000000000000000Ë000000000000000000000Þ000000000000000000ð0000000ø0ùúûüýþÿĀāĂ㥹Ć000000000000000000000000000000000000000000ħ0ĨĪ00000000000000000000ļĽ00000Ŭ000000`,1),dr=nr(tr(`123333359346463635126536711576`)),fr=tr(`93203242332583253248325D>E?F@03263243255B:032523853:0325B:8GA032542H<C=12727B:0328432553;D>E?3257D>032585:0325B:;0328B:032`),pr=tr(`012113445661666666789111:5;;;;;;;;444;;;:62999<1161=62>>?61:21@ABCD4446996:64E:::;:?::64:F114GHHIHHHHIHH1HH1HH1HHHHHH::EEJ4444::EE4444441691;644444114244444:;K6666555555555555555999666664444444444444444444444226?6:66644L9M?D:111::::6DE199`),mr=rr(`020200202020020020020020020020200200200200200200200002020202001003040106000200200200200200200200200200200200200200200200200200200200200200200200200200200200020020020020020020002020200202002002002002002002002002002020002002020020200220200200200200200200200200200200020020020000200020002000200200200020020020002000200200200020020202002020202000200200020022000200200020020002002000200220002002000200W0Z00020020002002020002002000200g0j0002002000200200020020002002000200200020020002000200002000002002002002002000200020000200002002002002002002002020020020200200200200200200200200202020020020020020020020020002002002020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020020002002002002002002000200200200200200200200200200020202020002000200020002002002002000020200200`),hr=(()=>{let e=new Int32Array(319).fill(-1),t=rr(`02422242:222222242224222242442222222422222244442242226224222426222422442462222422622222222626222462242622422622422424242422222222422222222242422222222222222222622442224222222222222224424442262222222222222222222226224222424242422224422422422222`),n=rr(`02222222222222222222202222222222222222222222221422222222222222222222222222222222222Y\\222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222221422222222222222222222222222222222222222Ŀł222222222222222222`);for(let r=0;r<t.length;r++)e[t[r]]=n[r];return e})(),gr=`container |break-after- all auto avoid avoid-page column left page right|break-before- all auto avoid avoid-page column left page right|break-inside-a uto void void-column void-page|box-decoration- clone slice|box- border content| contents flow-root hidden table table-caption table-cell table-column table-column-group table-footer-group table-header-group table-row table-row-group| not-sr-only sr-only|float- end left none right start|clear- both end left none right start|isolat e ion-auto|overflow- auto clip hidden scroll visible|overflow-x- auto clip hidden scroll visible|overflow-y- auto clip hidden scroll visible|overscroll- auto contain none|overscroll-x- auto contain none|overscroll-y- auto contain none| absolute fixed relative static sticky| collapse invisible visible|justify- around baseline between center center-safe end end-safe evenly normal start stretch|justify-items- center center-safe end end-safe normal start stretch|justify-self- auto center center-safe end end-safe start stretch|items- baseline baseline-last center center-safe end end-safe start stretch|self- auto baseline baseline-last center center-safe end end-safe start stretch|place-content- around baseline between center center-safe end end-safe evenly start stretch|place-items- baseline center center-safe end end-safe start stretch|place-self- auto center center-safe end end-safe start stretch| antialiased subpixel-antialiased| italic not-italic|normal-nums |ordinal |slashed-zero | lining-nums oldstyle-nums| proportional-nums tabular-nums| diagonal-fractions stacked-fractions| no-underline overline| capitalize lowercase normal-case uppercase|truncate |whitespace- break-spaces normal nowrap pre pre-line pre-wrap|break- all keep normal words|wrap- anywhere break-word normal|hyphens- auto manual none|mix-blend- color color-burn color-dodge darken difference exclusion hard-light hue lighten luminosity multiply normal overlay plus-darker plus-lighter saturation screen soft-light|table- auto fixed|caption- bottom top|backface- hidden visible|appearance- auto none|scheme- dark light light-dark normal only-dark only-light|field-sizing- content fixed|pointer-events- auto none|resize -none -x -y|snap- align-none center end start|snap- always normal|snap- both none x y|snap- mandatory proximity|touch- auto manipulation none|touch-pan- left right x|touch-pan- down up y|touch-pinch-zoom |select- all auto none text|forced-color-adjust- auto none| normal size| baseline bottom middle sub super text-bottom text-top top| bounce none ping pulse spin| auto square video| auto fr max min px|none | auto full px| fixed local scroll|clip- border content padding text|origin- border content padding| bottom bottom-left bottom-right center left left-bottom left-top right right-bottom right-top top top-left top-right| no-repeat repeat repeat-round repeat-space repeat-x repeat-y| auto contain cover| gradient-to-b gradient-to-bl gradient-to-br gradient-to-l gradient-to-r gradient-to-t gradient-to-tl gradient-to-tr none|blend- color color-burn color-dodge darken difference exclusion hard-light hue lighten luminosity multiply normal overlay saturation screen soft-light|to- b bl br l r t tl tr| auto dvh fit full lh lvh max min px screen svh| dashed dotted double hidden none solid| collapse separate|px |auto |full | content none strict| inline-size size|layout |paint |style | around baseline between center center-safe end end-safe evenly normal start stretch| alias all-scroll auto cell col-resize context-menu copy crosshair default e-resize ew-resize grab grabbing help move n-resize ne-resize nesw-resize no-drop none not-allowed ns-resize nw-resize nwse-resize pointer progress row-resize s-resize se-resize sw-resize text vertical-text w-resize wait zoom-in zoom-out| dashed dotted double solid wavy| auto from-font|reverse |initial | in in-out initial linear out| col col-reverse row row-reverse| nowrap wrap wrap-reverse| auto initial none| black bold extrabold extralight light medium normal semibold thin| condensed expanded extra-condensed extra-expanded normal semi-condensed semi-expanded ultra-condensed ultra-expanded|flow- col col-dense dense row row-dense| none subgrid| auto dvh dvw fit full lh lvh lvw max min px screen svh svw| block flex grid table| auto dvw fit full lvw max min px screen svw| loose none normal px relaxed snug tight|through |item | inside outside| decimal disc none| auto px| clip-border clip-content clip-fill clip-padding clip-stroke clip-view no-clip| add exclude intersect subtract| alpha luminance match|origin- border content fill padding stroke view|type- alpha luminance| circle ellipse| closest-corner closest-side farthest-corner farthest-side|at- bottom bottom-left bottom-right center left left-bottom left-top right right-bottom right-top top top-left top-right| dvh fit full lh lvh max min none px screen svh| auto dvh dvw fit full lh lvh lvw max min none px screen svh svw| dvw fit full lvw max min none px screen svw| auto dvh dvw fit full lvh lvw max min none prose px svh svw| auto dvh dvw fit full lvh lvw max min none px screen svh svw| contain cover fill none scale-down| first last none| distant dramatic midrange near none normal|inset | full none|3d | auto smooth|gutter- auto both stable| auto none thin| inner none| auto dvh dvw fit full lvh lvw max min px svh svw|base | center end justify left right start| clip ellipsis| balance nowrap pretty wrap| normal tight tighter wide wider widest| cpu gpu none| 3d flat| all colors none opacity shadow transform| discrete normal| full px| auto dvh dvw fit full lvh lvw max min px screen svh svw| auto contents scroll transform`.split(`|`).map(e=>{let t=e.split(` `),n=t.shift();for(let e=0;e<t.length;e++)t[e]=n+t[e];return t}),_r=rr(`0000000000000000000000000000000000000000000000000000000000000262242:6@200000006:240B428:4422400002046044222426220026642642462026224222824220022400000000\\00N222422242222222224062242222222422226264222422222222222222442804222422222222222222222222220<4<0204260002444020204224422`),vr=rr(`ɠ222222222222222222222222222222222222222222222222222222222222˕4222226>ʶ22ʷʺʷ2ʸʷ42ʴ2ʓ22>621422ɶ222ɹɼɷɺɷɺ22ɱ42222ɨ2ɧ26622ɘɓ244ƸƵ222]d24242ǖǓƚÄȫ2263ȨȥȨ2222222ǣ222222222222222222ǂƽ2ƾƵ2222222422222ƜƑ22222222222222222222144Ŧţ22Ţş222222222222222222222ĸ2ı68ĦģĦɡŰ4Ġ«®ĝ822ĔđĔ2ē2222622`),yr=rr(`02222222222222222222222222222222222222222222222222222222222222222202022222222222EH2200IL021042222Y\\222IL0cf2e10j2222U00X202[^2y0000120|{~22
:22|22222222222G000qOVI00000}2>40000B00000I¨©000¬00000000000000021M®00°000000000000000000000222HGHa1º222¿2À2222ÉÌ000°2±`),br=new Int32Array(995),xr=new Int32Array(995),Sr=new Int32Array(995),Cr=``,wr=new Int32Array(1038);{let e=new Map,t=0,n=0;for(let r=0;r<_r.length;r++)for(let i of gr[yr[r]]){let a=e.get(i);a===void 0&&(a=t++,e.set(i,a),wr[a*2]=Cr.length,wr[a*2+1]=i.length,Cr+=i),br[n]=_r[r],xr[n]=vr[r],Sr[n]=a,n++}}var Tr=rr(`0b2N:222@R>F@286¦2@H2D266226FB22B2>BD\\6N22222Z222D222p`),Er=nr(tr(`1::24444432:442:44:44>222222:44:4421322511111311111114`)),Dr=rr(`24A;33N=C@H4A;33N=C@<27;83:;8393NQ:3NQʰ222ˉºŴŽ2R2=18cƴÅŇ=cĞÛC1ƈǝȈ:ħ25=11D3A@4=<1;1DEr25;11B3?<6;:371BCn9@7=<8192>2E121@9@EHE@9>2T25511<398454131<=V25511<398454131<=ƧNž2Đå242L222290000f22500ɛ000ǘ222`),Or=tr(`ij`),kr=tr(``),Ar=tr(`1`),jr={GROUP_COUNT:ir,customValidatorNames:ar,edgeStart:or,labelStart:sr,labelText:cr,edgeTarget:lr,nodeGroup:ur,nodeVlist:hr,vlistPat:dr,vlistOps:fr,vlistRef:pr,vlistGroup:mr,litAnchor:br,litGroup:xr,litPool:Sr,poolOffsets:wr,poolText:Cr,adjGid:Tr,adjStart:Er,adjTgt:Dr,patGid:Or,patTgt:kr,postfixLookupGroups:Ar,orderSensitiveModifiers:`* ** after backdrop before details-content file first-letter first-line marker placeholder selection`},Mr=`line`in Error(),Nr=-1,Pr=-1,Fr=(e,t,n)=>{let r=2166136261;for(let i=t;i<n;i++)r=Math.imul(r^e.charCodeAt(i),16777619);return r},Ir=(e,t,n)=>{let r=n-t,i=Math.imul(r,2654435761)^e.charCodeAt(t);if(r>3){let a=r>>2,o=r>>1;i=Math.imul(i^e.charCodeAt(t+1)<<8^e.charCodeAt(t+2)<<16^e.charCodeAt(t+a),2246822507),i=Math.imul(i^e.charCodeAt(t+o)<<8^e.charCodeAt(t+o+a)<<16^e.charCodeAt(n-3),3266489909),i^=e.charCodeAt(n-2)<<8^e.charCodeAt(n-1)<<16;for(let r=t+3,a=n-4;r<t+8&&r<a;r++,a--)i=Math.imul(i^e.charCodeAt(r)^e.charCodeAt(a)<<8,16777619)}return i^i>>>15},Lr=(e,t,n={})=>{let{GROUP_COUNT:r,edgeStart:i,labelStart:a,labelText:o,edgeTarget:s,nodeGroup:c,nodeVlist:l,vlistPat:u,vlistOps:d,vlistRef:f,vlistGroup:p,litAnchor:m,litGroup:h,litPool:g,poolOffsets:_,poolText:v,adjGid:y,adjStart:b,adjTgt:x,patGid:S,patTgt:C,postfixLookupGroups:w,customValidatorNames:T,orderSensitiveModifiers:E}=e,D=new Int32Array(r).fill(-1);for(let e=0;e<y.length;e++)D[y[e]]=e;let O=0;for(let e=0;e+1<b.length;e++){let t=b[e+1]-b[e];t>O&&(O=t)}let k=32;for(;k<2*(1+O+S.length);)k<<=1;let A=new Int32Array(f.length+1);for(let e=0;e<f.length;e++)A[e+1]=A[e]+u[f[e]+1]-u[f[e]];let j=new Uint8Array(r);for(let e=0;e<w.length;e++)j[w[e]]=1;let M=i.length-1,N=new Uint8Array(M),P=0,F=!0;for(let e=0;e<m.length;e++){N[m[e]]=1;let t=_[g[e]*2+1];t>P&&(P=t);let n=v.charCodeAt(_[g[e]*2]);(n===91||n===40)&&(F=!1)}let I=1;for(;I<m.length*2;)I<<=1;let L=new Int32Array(I).fill(-1);for(let e=0;e<m.length;e++){let t=_[g[e]*2],n=(Fr(v,t,t+_[g[e]*2+1])^Math.imul(m[e],2654435761)|0)&I-1;for(;L[n]!==-1;)n=n+1&I-1;L[n]=e}let R=(e,t,n,r)=>{let i=(Fr(t,n,r)^Math.imul(e,2654435761)|0)&I-1,a=r-n;for(;;){let r=L[i];if(r===-1)return-1;if(m[r]===e&&_[g[r]*2+1]===a){let e=_[g[r]*2],i=!0;for(let r=0;r<a;r++)if(v.charCodeAt(e+r)!==t.charCodeAt(n+r)){i=!1;break}if(i)return h[r]}i=i+1&I-1}},z=n.cacheSize??8192,B=n.prefix??e.prefix??``,ee=B===``?``:B+`:`,V=ee.length,te=(T??[]).map(e=>{let n=t&&t[e];if(!n)throw Error(`cn: missing validator `+e);return n}),ne=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,H=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,re=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,ie=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,ae=0,oe=-1,se=-1,ce=-1,le=-1,ue=e=>e>=97&&e<=122||e>=65&&e<=90||e>=48&&e<=57||e===95,de=e=>/\s/.test(String.fromCharCode(e)),fe=(e,t,n)=>{if(ae=0,oe=-1,n-t<3)return;let r=e.charCodeAt(t),i=e.charCodeAt(n-1);if(r===91&&i===93)ae=1;else if(r===40&&i===41)ae=2;else return;ce=t+1,le=n-1;let a=t+1;if(ue(e.charCodeAt(a))){for(a++;a<n-1;){let t=e.charCodeAt(a);if(!ue(t)&&t!==45)break;a++}a<n-2&&e.charCodeAt(a)===58&&(oe=t+1,se=a,ce=a+1)}},pe=(e,t,n,r)=>{if(n-t!==r.length)return!1;for(let n=0;n<r.length;n++)if(e.charCodeAt(t+n)!==r.charCodeAt(n))return!1;return!0},U=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,W=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,me=e=>!!e&&!Number.isNaN(Number(e)),he=(e,t,n)=>{if(n-t<11||!pe(e,t,t+10,`@container`))return!1;if(e.charCodeAt(t+10)===47)return n-t>=12;let r=e.charCodeAt(t+11);return r===115&&n-t>=17&&pe(e,t+10,t+16,`-size/`)||r===110&&n-t>=19&&pe(e,t+10,t+18,`-normal/`)},ge=[1,1,1,1,1,1,1,1,2,2,2,2,2,2,2],G=`length|number|number weight|family-name|position percentage|length size bg-size|image url|shadow|length|family-name|position percentage|length size bg-size|image url|shadow|number weight`.split(`|`).map(e=>e.split(` `)),_e=[2,3,1,0,0,0,4,5,0,0,0,0,0,1,1],ve=(e,t,n,r)=>{if(e>=10){if(e>=25)return te[e-25](t.slice(n,r));let i=e-10;if(ae!==ge[i])return!1;if(oe>=0){for(let e of G[i])if(pe(t,oe,se,e))return!0;return!1}switch(_e[i]){case 0:return!1;case 1:return!0;case 2:{let e=t.slice(ce,le);return ne.test(e)&&!H.test(e)}case 3:return me(t.slice(ce,le));case 4:return ie.test(t.slice(ce,le));default:return re.test(t.slice(ce,le))}}switch(e){case 0:return!0;case 1:return ae===0;case 2:return ae===1;case 3:return ae===2;case 4:return U.test(t.slice(n,r));case 5:return me(t.slice(n,r));case 6:{let e=t.slice(n,r);return!!e&&Number.isInteger(Number(e))}case 7:return r>n&&t.charCodeAt(r-1)===37&&me(t.slice(n,r-1));case 8:return W.test(t.slice(n,r));default:return he(t,n,r)}},ye=new Set(typeof E==`string`?E.split(` `):E),be=(e,t,n,r,i,a)=>{let o=Fr(t,n,r)^(i?2654435769:0),s=e.get(o);if(s!==void 0)outer:for(let e=0;e<s.length;e++){let a=s[e];if(a.imp===i&&a.k.length===r-n){for(let e=0;e<a.k.length;e++)if(a.k.charCodeAt(e)!==t.charCodeAt(n+e))continue outer;return a.id}}else e.set(o,s=[]);let c=t.slice(n,r),l=a(c);return s.push({k:c,imp:i,id:l}),l},xe=new Map,Se=new Map,Ce=2,we=4096,Te=(e,t)=>{let n=[],r=0,i=0,a=0;for(let t=0;t<e.length;t++){let o=e.charCodeAt(t);r===0&&i===0&&o===58?(n.push(e.slice(a,t)),a=t+1):o===91?r++:o===93?r--:o===40?i++:o===41&&i--}n.push(e.slice(a));let o=n[0];if(n.length>1){let e=[],t=[];for(let r of n)r.charCodeAt(0)===91||ye.has(r)?(t.length&&(e.push(...t.sort()),t=[]),e.push(r)):t.push(r);t.length&&e.push(...t.sort()),o=e.join(`:`)}let s=t?o+` !`:o,c=Se.get(s);return c===void 0&&Se.set(s,c=Ce++),c},Ee=new Map,De=r,Oe=r+4096,ke=()=>De++,Ae=2097152,je=8192,Me=new Int32Array(je),Ne=Array(je).fill(null),Pe=new Int32Array(je),Fe=new Int32Array(je),Ie=new Uint8Array(je),Le=0,Re=(e,t,n,r,i,a,o,s)=>{let c=e;if(Ne[e]!==null){if(Ne[e|1]===null)c=e|1;else if(!(Le++&3))c=e|Le>>2&1;else return}Ne[c]=t.slice(n,r),Me[c]=i,Pe[c]=a,Fe[c]=o,Ie[c]=s},ze=()=>Ne.fill(null),Be=256,Ve=[new Int32Array(Be),new Int32Array(Be),new Int32Array(Be),new Int32Array(Be)],[He,Ue,We,Ge]=Ve,Ke=new Uint8Array(Be),qe=new Uint8Array(Be),Je=()=>{Be*=2,Ve=Ve.map(e=>{let t=new Int32Array(Be);return t.set(e),t}),[He,Ue,We,Ge]=Ve;let e=new Uint8Array(Be);e.set(Ke),Ke=e,qe=new Uint8Array(Be)},Ye=64,Xe=new Int32Array(Ye),Ze=new Int32Array(Ye),Qe=new Int32Array(r),$e=2048,et=21,tt=new Float64Array($e),nt=new Int32Array($e),rt=0,it=(e,t)=>{if(e===0&&t<r)return Qe[t]===rt?1:(Qe[t]=rt,0);let n=e*2097152+t+1,i=Math.imul(n,2654435761)>>>et;for(;nt[i]===rt;){if(tt[i]===n)return 1;i=i+1&$e-1}return tt[i]=n,nt[i]=rt,0},at=(e,t,n,r,i)=>{if(n-t>=2&&e.charCodeAt(t)===91&&e.charCodeAt(n-1)===93){let r=-1;for(let i=t+1;i<n-1;i++)if(e.charCodeAt(i)===58){r=i;break}return r===-1||r===t+1?Nr:be(Ee,e,t+1,r,0,ke)}if(r>=0&&c[r]>=0)return c[r];for(let t=i-1;t>=0;t--){let r=Ze[t];if(r>n)continue;let i=Xe[t],a=n-r;if(N[i]===1&&a>0&&a<=P){let t=e.charCodeAt(r);if(F===!1||t!==91&&t!==40){let t=R(i,e,r,n);if(t>=0)return t}}let o=l[i];if(o<0)continue;let s=f[o],c=u[s],m=u[s+1];if(c===m)continue;fe(e,r,n);let h=A[o]-c;for(let t=c;t<m;t++)if(ve(d[t],e,r,n))return p[h+t]}return Nr},ot=e=>{let t=e.length,n=0,c=0,u=!1;(Ce>we||xe.size>we)&&(xe=new Map,Se=new Map,Ce=2,ze()),De>Oe&&(Ee=new Map,De=r,ze());let d=0;for(;d<t;){let f=e.charCodeAt(d);if(f===32||f>=9&&f<=13||f>=160&&de(f)){f!==32&&(u=!0),d++;continue}let p=d,m=0;for(;d<t;){if(f=e.charCodeAt(d),f<=32){if(f===32)break;if(f>=9&&f<=13){u=!0;break}}else if(f>=160&&de(f)){u=!0;break}m=Math.imul(m^f,16777619),d++}let h=d,g=h-p;n===Be&&Je();let _=n++;He[_]=p,Ue[_]=h,c+=g,m^=Math.imul(g,2654435761);let v=m^m>>>15,y=v&8190;{let t=-1;if(Me[y]===v&&Ne[y]!==null&&Ne[y].length===g?t=y:Me[y|1]===v&&Ne[y|1]!==null&&Ne[y|1].length===g&&(t=y|1),t>=0){let n=Ne[t],r=!0;for(let t=0;t<g;t++)if(n.charCodeAt(t)!==e.charCodeAt(p+t)){r=!1;break}if(r){We[_]=Pe[t],Ge[_]=Fe[t],Ke[_]=Ie[t];continue}}}let b=p;if(V!==0){if(h-p<=V||!e.startsWith(ee,p)){We[_]=Nr,Re(y,e,p,h,v,Nr,0,0);continue}b=p+V}let x=0,S=0,C=-1,w=-1;for(let t=b;t<h;t++){let n=e.charCodeAt(t);if(x===0&&S===0){if(n===58){C=t;continue}if(n===47){w=t;continue}}n===91?x++:n===93?x--:n===40?S++:n===41&&S--}let T=C>=b?C+1:b,E=T,D=h,O=!1,k=0;D>E&&e.charCodeAt(D-1)===33?(O=!0,D--):D>E&&e.charCodeAt(E)===33&&(O=!0,E++,k=1);let A=-1;w>T&&(A=w+k,A>=D&&(A=-1));let M=E;D-E>1&&e.charCodeAt(E)===45&&(M=E+1);let P=0,F=0,I=0,L=-1,R=0;(l[0]>=0||N[0]===1)&&(Xe[0]=0,Ze[0]=M,R=1);let z=Pr,B=0;for(let t=M;t<D;t++)if(t===A&&(z=F<I?Pr:P,B=R),P!==Pr){let n=e.charCodeAt(t),r=-1;if(F<I)o.charCodeAt(F)===n?(F++,F===I&&(r=P=L)):P=Pr;else{let e=i[P],t=i[P+1],c=Pr;for(let i=e;i<t;i++){let e=a[i];if(o.charCodeAt(e)===n){a[i+1]-e===1?r=c=s[i]:(F=e+1,I=a[i+1],L=s[i],c=P);break}}P=c}if(r>=0&&(l[r]>=0||N[r]===1)&&t+1<D&&e.charCodeAt(t+1)===45){if(R===Ye){Ye*=2;let e=new Int32Array(Ye);e.set(Xe),Xe=e;let t=new Int32Array(Ye);t.set(Ze),Ze=t}Xe[R]=r,Ze[R]=t+2,R++}}A===D&&(z=F<I?Pr:P,B=R);let te=F<I?Pr:P,ne,H=!1;if(A>=0){if(H=!0,ne=at(e,E,A,z,B),ne!==Nr&&ne<r&&j[ne]){let t=at(e,E,D,te,R);t!==Nr&&t!==ne&&(ne=t,H=!1)}else ne===Nr&&(ne=at(e,E,D,te,R),H=!1)}else ne=at(e,E,D,te,R);let re=0,ie=0;ne===Nr?We[_]=Nr:(ie=+!!H,re=b>=C?+!!O:be(xe,e,b,C,+!!O,e=>Te(e,O)),We[_]=ne,Ke[_]=ie,Ge[_]=re),Re(y,e,p,h,v,ne,re,ie)}if(n===0)return``;if(n===1)return He[0]===0&&Ue[0]===t?e:e.slice(He[0],Ue[0]);if(n*k>$e){for(;n*k>$e;)$e<<=1,et--;tt=new Float64Array($e),nt=new Int32Array($e)}if(Ce>=Ae||De>=Ae)throw Error(`cn: too many distinct classes in one merge`);rt=rt+1|0,rt===0&&(Qe.fill(0),nt.fill(0),rt=1);let f=!1;for(let e=n-1;e>=0;e--){let t=We[e];if(t===Nr){qe[e]=1;continue}let n=Ge[e];if(it(n,t)===1)qe[e]=0,f=!0;else if(qe[e]=1,t<r){let r=D[t];if(r>=0)for(let e=b[r];e<b[r+1];e++)it(n,x[e]);if(Ke[e]&1)for(let e=0;e<S.length;e++)S[e]===t&&it(n,C[e])}}if(!f&&!u&&t===c+n-1)return e;let p=``,m=0;for(;m<n;){if(!qe[m]){m++;continue}let t=He[m],r=Ue[m],i=m+1;for(;i<n&&qe[i]&&He[i]===r+1&&e.charCodeAt(r)===32;)r=Ue[i],i++;p.length>0&&(p+=` `),p+=e.slice(t,r),m=i}return p},st=16384,ct=new Int32Array(st*2),lt=0,ut=1,dt=Object.create(null),ft=Object.create(null),pt=new Map,mt=new Map,ht=0,gt=0,_t=()=>{lt^=st,ut=ut+1|0,gt=0},vt=e=>{let t=dt[e];if(t!==void 0)return t;let n=Ir(e,0,e.length),r=(n&16383)+lt,i=ct[r]===(n^ut)||ct[r^st]===(n^ut-1);return i&&(t=ft[e],t!==void 0)?(dt[e]=t,t):(t=ot(e),i?(dt[e]=t,++ht>z&&(ht=0,ft=dt,dt=Object.create(null),_t())):(ct[r]=n^ut,++gt>st&&_t()),t)},yt=e=>{let t=pt.get(e);if(t!==void 0)return t;let n=Ir(e,0,e.length),r=(n&16383)+lt,i=ct[r]===(n^ut)||ct[r^st]===(n^ut-1);return i&&(t=mt.get(e),t!==void 0)?(pt.set(e,t),t):(t=ot(e),i?(pt.set(e,t),++ht>z&&(ht=0,mt=pt,pt=new Map,_t())):(ct[r]=n^ut,++gt>st&&_t()),t)},bt=e=>{let t=Ir(e,0,e.length),n=(t&16383)+lt;return ct[n]===(t^ut)||ct[n^st]===(t^ut-1)||(ct[n]=t^ut,++gt>st&&_t(),!1)},xt=z===0?ot:Mr?e=>{let t=pt.get(e);return t===void 0?yt(e):t}:vt;return{merge:function(){return arguments.length===1&&typeof arguments[0]==`string`?xt(arguments[0]):xt(Br.apply(null,arguments))},mergeString:xt,seenBefore:z===0?()=>!1:bt,mergeUncached:ot}},Rr=(e,t)=>{if(!e)return``;if(typeof e==`string`)return e;let n=``;if(typeof e.length==`number`&&(!t||Array.isArray(e))){let r=e;for(let e=0;e<r.length;e++){let i=r[e];if(!i)continue;let a=typeof i==`string`?i:Rr(i,t);a&&(n&&(n+=` `),n+=a)}return n}if(t){if(typeof e==`number`)return``+e;if(typeof e==`object`)for(let t in e)e[t]&&(n&&(n+=` `),n+=t)}return n},zr=(e,t)=>{let n=``;for(let r=0;r<e.length;r++){let i=e[r];if(!i)continue;let a=typeof i==`string`?i:Rr(i,t);a&&(n&&(n+=` `),n+=a)}return n},Br=function(){return zr(arguments,!1)},Vr=256,Hr=16,Ur=1024,Wr=4096,Gr=(e,t)=>{let n=t===void 0?()=>!0:t.seenBefore,r=t===void 0?e:t.mergeUncached,i=new Map,a=new Map,o=0,s=null,c=null,l=[],u=[],d=0,f=(t,n,r)=>{c===null&&(c=Array(Wr).fill(``),l=Array(Wr).fill(``),u=Array(Wr).fill(``));let i=Ir(t,0,t.length)&4094;if(c[i]===t&&l[i]===n)return u[i];if(c[i|1]===t&&l[i|1]===n)return u[i|1];let a=e(r?n+` `+t:t),o=c[i]===``?i:i|(c[i|1]===``?1:d++&1);return c[o]=t,l[o]=n,u[o]=a,a},p=(e,t,n,r)=>{let i=0;if(t){if(t!==e.a0)return!1;i=1}if(n){if(n!==(i===0?e.a0:e.a1))return!1;i++}if(r){if(r!==(i===0?e.a0:i===1?e.a1:e.a2))return!1;i++}return i===e.t},m=(e,t)=>{let n=e.a,r=0;for(let e=0;e<t.length;e++){let i=t[e];if(i){if(i!==n[r])return!1;r++}}return r===e.t},h=(t,c)=>{let l=t.length,u=s===null?null:s.n;if(!c){if(u!==null&&m(u,t))return s=u,u.r;if(s!==null&&s!==u&&m(s,t))return s.r}let d=``,p=-1,h=0,g=!1;for(let e=0;e<l;e++){let n=t[e];if(n){if(typeof n!=`string`){if(n=t[e]=Rr(n,!0),!n)continue;g=!0}p<0&&(d=n,p=e),h++}}if(h===0)return``;if(h===1)return e(d);if(g){if(u!==null&&m(u,t))return s=u,u.r;if(s!==null&&s!==u&&m(s,t))return s.r}let _=i.get(d);_===void 0&&(_=a.get(d),_!==void 0&&i.set(d,_));let v=null;if(_!==void 0){if(_.skip>0){_.skip--,s=null;let e=d;for(let n=p+1;n<l;n++){let r=t[n];r&&(e+=` `+r)}return f(e,``,!1)}let e=_.e;outer:for(let n=0;n<e.length;n++){let r=e[n];if(r.t!==h)continue;let i=r.a,a=1;for(let e=p+1;e<l;e++){let n=t[e];if(n&&n!==i[a++])continue outer}v=r;break}v!==null&&(_.miss=0)}if(v===null){let s=d,c=[d];for(let e=p+1;e<l;e++){let n=t[e];n&&(s+=` `+n,c.push(n))}if(!n(s))return r(s);v={r:e(s),t:c.length,a0:c[0],a1:c[1],a2:c[2]??``,a:c,n:null},_===void 0?i.set(d,_={e:[],miss:0,skip:0,at:0}):++_.miss>Hr&&(_.miss=Hr,_.skip=Ur,_.e.length=0,_.at=0);let u=_.e;u.length<Vr?u.push(v):(u[_.at]=v,_.at=_.at+1&255),++o>1e3&&(o=0,a=i,i=new Map)}return s!==null&&s!==v&&(s.n=v),s=v,v.r},g=t=>Array.isArray(t)?h(t.slice(),!1):e(Rr(t,!0));return function(t,n,r){let a=arguments.length;if((a|1)==3){let e=s;if(e!==null){let i=e.n;if(i!==null&&p(i,t,n,r))return s=i,i.r;if(e!==i&&p(e,t,n,r))return e.r}if(a===2&&typeof n==`string`&&n!==``){let e=i.get(t);if(e!==void 0&&e.skip>0)return e.skip--,s=null,f(n,t,!0)}return h([t,n,r],!0)}if(a===1)return typeof t==`string`?e(t):g(t);let o=s;if(o!==null){let e=o.n;if(e!==null){let t=e.a,n=0,r=!0;for(let e=0;e<a;e++){let i=arguments[e];if(i){if(i!==t[n]){r=!1;break}n++}}if(r&&n===e.t)return s=e,e.r}if(o!==e){let e=o.a,t=0,n=!0;for(let r=0;r<a;r++){let i=arguments[r];if(i){if(i!==e[t]){n=!1;break}t++}}if(n&&t===o.t)return o.r}}let c=[];for(let e=0;e<a;e++)c.push(arguments[e]);return h(c,!0)}},Kr=Lr(jr),K=Gr(Kr.mergeString,Kr);Kr.merge;function qr(e){if(!e||typeof document>`u`)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))}var Jr=e=>{switch(e){case`success`:return Zr;case`info`:return $r;case`warning`:return Qr;case`error`:return ei;default:return null}},Yr=Array(12).fill(0),Xr=({visible:e,className:t})=>U.createElement(`div`,{className:[`sonner-loading-wrapper`,t].filter(Boolean).join(` `),"data-visible":e},U.createElement(`div`,{className:`sonner-spinner`},Yr.map((e,t)=>U.createElement(`div`,{className:`sonner-loading-bar`,key:`spinner-bar-${t}`})))),Zr=U.createElement(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 20 20`,fill:`currentColor`,height:`20`,width:`20`,"aria-hidden":`true`},U.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`})),Qr=U.createElement(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 24 24`,fill:`currentColor`,height:`20`,width:`20`,"aria-hidden":`true`},U.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`})),$r=U.createElement(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 20 20`,fill:`currentColor`,height:`20`,width:`20`,"aria-hidden":`true`},U.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`})),ei=U.createElement(`svg`,{xmlns:`http://www.w3.org/2000/svg`,viewBox:`0 0 20 20`,fill:`currentColor`,height:`20`,width:`20`,"aria-hidden":`true`},U.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`})),ti=U.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`,"aria-hidden":`true`},U.createElement(`line`,{x1:`18`,y1:`6`,x2:`6`,y2:`18`}),U.createElement(`line`,{x1:`6`,y1:`6`,x2:`18`,y2:`18`})),ni=()=>{let[e,t]=U.useState(document.hidden);return U.useEffect(()=>{let e=()=>{t(document.hidden)};return document.addEventListener(`visibilitychange`,e),()=>document.removeEventListener(`visibilitychange`,e)},[]),e},ri=1,ii=100,ai=e=>typeof e?.id==`number`||e?.id?.length>0?e.id:ri++,oi=new class{constructor(){this.subscribe=e=>(this.subscribers.push(e),this.getActiveToasts().forEach(t=>e(t)),()=>{let 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.trimHistory()},this.trimHistory=()=>{let e=this.toasts.length-ii;e<=0||(this.toasts=this.toasts.filter(t=>e>0&&this.dismissedToasts.has(t.id)?(this.dismissedToasts.delete(t.id),e--,!1):!0))},this.create=e=>{let{message:t,...n}=e,r=ai(e),i=this.pendingDismissals.get(r);i!==void 0&&(cancelAnimationFrame(i),this.pendingDismissals.delete(r),this.dismissedToasts.delete(r));let a=this.dismissedToasts.has(r),o=e.dismissible===void 0||e.dismissible;return a&&(this.dismissedToasts.delete(r),this.toasts=this.toasts.filter(e=>e.id!==r)),!a&&this.toasts.find(e=>e.id===r)?this.toasts=this.toasts.map(n=>n.id===r?(this.publish({...n,...e,id:r,title:t}),{...n,...e,id:r,dismissible:o,title:t}):n):this.addToast({title:t,...n,dismissible:o,id:r}),r},this.dismiss=e=>{if(e==null)return this.getActiveToasts().forEach(e=>{this.dismissedToasts.add(e.id),this.subscribers.forEach(t=>t({id:e.id,dismiss:!0}))}),e;this.dismissedToasts.add(e);let t=this.pendingDismissals.get(e);return t!==void 0&&cancelAnimationFrame(t),this.pendingDismissals.set(e,requestAnimationFrame(()=>{this.pendingDismissals.delete(e),this.subscribers.forEach(t=>t({id:e,dismiss:!0}))})),e},this.message=(e,t)=>this.create({...t,message:e,type:void 0}),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;t.loading!==void 0&&(n=this.create({...t,promise:e,type:`loading`,message:t.loading,description:typeof t.description==`function`?void 0:t.description}));let r=Promise.resolve(e instanceof Function?e():e),i=n!==void 0,a,o=r.then(async e=>{if(a=[`resolve`,e],U.isValidElement(e))i=!1,this.create({id:n,type:`default`,message:e});else if(ci(e)&&!e.ok){i=!1;let r=typeof t.error==`function`?await t.error(`HTTP error! status: ${e.status}`):t.error,a=typeof t.description==`function`?await t.description(`HTTP error! status: ${e.status}`):t.description,o=typeof r==`object`&&!U.isValidElement(r)?r:{message:r};this.create({id:n,type:`error`,description:a,...o})}else if(e instanceof Error){i=!1;let r=typeof t.error==`function`?await t.error(e):t.error,a=typeof t.description==`function`?await t.description(e):t.description,o=typeof r==`object`&&!U.isValidElement(r)?r:{message:r};this.create({id:n,type:`error`,description:a,...o})}else if(t.success!==void 0){i=!1;let r=typeof t.success==`function`?await t.success(e):t.success,a=typeof t.description==`function`?await t.description(e):t.description,o=typeof r==`object`&&!U.isValidElement(r)?r:{message:r};this.create({id:n,type:`success`,description:a,...o})}}).catch(async e=>{if(a=[`reject`,e],t.error!==void 0){i=!1;let r=typeof t.error==`function`?await t.error(e):t.error,a=typeof t.description==`function`?await t.description(e):t.description,o=typeof r==`object`&&!U.isValidElement(r)?r:{message:r};this.create({id:n,type:`error`,description:a,...o})}}).finally(()=>{i&&(this.dismiss(n),n=void 0),t.finally==null||t.finally.call(t)}),s=()=>new Promise((e,t)=>o.then(()=>a[0]===`reject`?t(a[1]):e(a[1])).catch(t));return typeof n!=`string`&&typeof n!=`number`?{unwrap:s}:Object.assign(n,{unwrap:s})},this.custom=(e,t)=>{let n=ai(t);return this.create({...t,jsx:e(n),id:n,type:void 0}),n},this.getActiveToasts=()=>this.toasts.filter(e=>!this.dismissedToasts.has(e.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set,this.pendingDismissals=new Map}},si=(e,t)=>oi.message(e,t),ci=e=>e&&typeof e==`object`&&`ok`in e&&typeof e.ok==`boolean`&&`status`in e&&typeof e.status==`number`,li=Object.assign(si,{success:oi.success,info:oi.info,warning:oi.warning,error:oi.error,custom:oi.custom,message:oi.message,promise:oi.promise,dismiss:oi.dismiss,loading:oi.loading},{getHistory:()=>oi.toasts,getToasts:()=>oi.getActiveToasts()});qr(`[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;flex:1;min-width:0}[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(--normal-text);background:var(--normal-bg);border:1px solid var(--normal-border);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]{-webkit-user-select:none;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%)}`);function ui(e){return e.label!==void 0}var di=3,fi=`24px`,pi=`16px`,mi=4e3,hi=356,gi=14,_i=45,vi=200;function yi(...e){return e.filter(Boolean).join(` `)}function bi(e){let[t,n]=e.split(`-`),r=[];return t&&r.push(t),n&&r.push(n),r}var xi=e=>{let{invert:t,toast:n,unstyled:r,interacting:i,setHeights:a,visibleToasts:o,heights:s,index:c,toasts:l,expanded:u,removeToast:d,defaultRichColors:f,closeButton:p,style:m,cancelButtonStyle:h,actionButtonStyle:g,className:_=``,descriptionClassName:v=``,duration:y,position:b,gap:x,expandByDefault:S,classNames:C,icons:w,closeButtonAriaLabel:T=`Close toast`}=e,[E,D]=U.useState(null),[O,k]=U.useState(null),[A,j]=U.useState(!1),[M,N]=U.useState(!1),[P,F]=U.useState(!1),[I,L]=U.useState(!1),[R,z]=U.useState(!1),[B,ee]=U.useState(0),[V,te]=U.useState(0),ne=U.useRef(n.duration||y||mi),H=U.useRef(null),re=U.useRef(null),ie=c===0,ae=c+1<=o,oe=n.type,se=oe??`default`,ce=n.dismissible!==!1,le=n.className||``,ue=n.descriptionClassName||``,de=U.useMemo(()=>s.findIndex(e=>e.toastId===n.id)||0,[s,n.id]),fe=U.useMemo(()=>n.closeButton??p,[n.closeButton,p]),pe=U.useMemo(()=>n.duration||y||mi,[n.duration,y]),W=U.useRef(0),me=U.useRef(0),he=U.useRef(0),ge=U.useRef(null),[G,_e]=b.split(`-`),ve=U.useMemo(()=>s.reduce((e,t,n)=>n>=de?e:e+t.height,0),[s,de]),ye=ni(),be=U.useMemo(()=>e.swipeDirections??bi(b),[e.swipeDirections,b]),xe=n.invert||t,Se=oe===`loading`;me.current=U.useMemo(()=>de*x+ve,[de,ve]),U.useEffect(()=>{ne.current=pe},[pe]),U.useEffect(()=>{j(!0)},[]),U.useEffect(()=>{let e=re.current;if(e){let t=e.getBoundingClientRect().height;return te(t),a(e=>[{toastId:n.id,height:t,position:n.position},...e]),()=>a(e=>e.filter(e=>e.toastId!==n.id))}},[a,n.id]),U.useLayoutEffect(()=>{if(!A)return;let e=re.current,t=e.style.height;e.style.height=`auto`;let r=e.getBoundingClientRect().height;e.style.height=t,te(r),a(e=>e.find(e=>e.toastId===n.id)?e.map(e=>e.toastId===n.id?{...e,height:r}:e):[{toastId:n.id,height:r,position:n.position},...e])},[A,n.title,n.description,a,n.id,n.jsx,n.action,n.cancel]);let Ce=U.useCallback(()=>{N(!0),ee(me.current),a(e=>e.filter(e=>e.toastId!==n.id)),setTimeout(()=>{d(n)},vi)},[n,d,a,me]);U.useEffect(()=>{if(n.promise&&oe===`loading`||n.duration===1/0||n.type===`loading`)return;let e;return u||i||ye?(()=>{if(he.current<W.current){let e=new Date().getTime()-W.current;ne.current-=e}he.current=new Date().getTime()})():ne.current!==1/0&&(W.current=new Date().getTime(),e=setTimeout(()=>{n.onAutoClose==null||n.onAutoClose.call(n,n),Ce()},ne.current)),()=>clearTimeout(e)},[u,i,n,oe,ye,Ce]),U.useEffect(()=>{n.delete&&(Ce(),n.onDismiss==null||n.onDismiss.call(n,n))},[Ce,n.delete]);function we(){return w?.loading?U.createElement(`div`,{className:yi(C?.loader,n?.classNames?.loader,`sonner-loader`),"data-visible":oe===`loading`},w.loading):U.createElement(Xr,{className:yi(C?.loader,n?.classNames?.loader),visible:oe===`loading`})}let Te=n.icon||w?.[oe]||Jr(oe);return U.createElement(`li`,{tabIndex:0,ref:re,className:yi(_,le,C?.toast,n?.classNames?.toast,C?.[se],n?.classNames?.[se]),"data-sonner-toast":``,"data-rich-colors":n.richColors??f,"data-styled":!(n.jsx||n.unstyled||r),"data-mounted":A,"data-promise":!!n.promise,"data-swiped":R,"data-removed":M,"data-visible":ae,"data-y-position":G,"data-x-position":_e,"data-index":c,"data-front":ie,"data-swiping":P,"data-dismissible":ce,"data-type":oe,"data-invert":xe,"data-swipe-out":I,"data-swipe-direction":O,"data-expanded":!!(u||S&&A),"data-testid":n.testId,style:{"--index":c,"--toasts-before":c,"--z-index":l.length-c,"--offset":`${M?B:me.current}px`,"--initial-height":S?`auto`:`${V}px`,...m,...n.style},onDragEnd:()=>{F(!1),D(null),ge.current=null},onPointerDown:e=>{e.button!==2&&!Se&&ce&&(H.current=new Date,ee(me.current),e.target.setPointerCapture(e.pointerId),e.target.tagName!==`BUTTON`&&(F(!0),ge.current={x:e.clientX,y:e.clientY}))},onPointerUp:()=>{if(I||!ce)return;ge.current=null;let e=Number(re.current?.style.getPropertyValue(`--swipe-amount-x`).replace(`px`,``)||0),t=Number(re.current?.style.getPropertyValue(`--swipe-amount-y`).replace(`px`,``)||0),r=new Date().getTime()-H.current?.getTime(),i=E===`x`?e:t,a=Math.abs(i)/r;if((E===`x`?be.includes(e>0?`right`:`left`):be.includes(t>0?`bottom`:`top`))&&(Math.abs(i)>=_i||a>.11))ee(me.current),n.onDismiss==null||n.onDismiss.call(n,n),k(E===`x`?e>0?`right`:`left`:t>0?`down`:`up`),Ce(),L(!0);else{var o,s;(o=re.current)==null||o.style.setProperty(`--swipe-amount-x`,`0px`),(s=re.current)==null||s.style.setProperty(`--swipe-amount-y`,`0px`),z(!1),F(!1),D(null)}},onPointerMove:e=>{var t,n;if(!ge.current||!ce||window.getSelection()?.toString().length>0)return;let r=e.clientY-ge.current.y,i=e.clientX-ge.current.x;!E&&(Math.abs(i)>1||Math.abs(r)>1)&&D(Math.abs(i)>Math.abs(r)?`x`:`y`);let a={x:0,y:0},o=e=>1/(1.5+Math.abs(e)/20);if(E===`y`){if(be.includes(`top`)||be.includes(`bottom`)){if(be.includes(`top`)&&r<0||be.includes(`bottom`)&&r>0)a.y=r;else{let e=r*o(r);a.y=Math.abs(e)<Math.abs(r)?e:r}}}else if(E===`x`&&(be.includes(`left`)||be.includes(`right`))){if(be.includes(`left`)&&i<0||be.includes(`right`)&&i>0)a.x=i;else{let e=i*o(i);a.x=Math.abs(e)<Math.abs(i)?e:i}}(Math.abs(a.x)>0||Math.abs(a.y)>0)&&z(!0),(t=re.current)==null||t.style.setProperty(`--swipe-amount-x`,`${a.x}px`),(n=re.current)==null||n.style.setProperty(`--swipe-amount-y`,`${a.y}px`)}},fe&&!n.jsx&&oe!==`loading`?U.createElement(`button`,{"aria-label":T,"data-disabled":Se,"data-close-button":!0,onClick:Se||!ce?()=>{}:()=>{Ce(),n.onDismiss==null||n.onDismiss.call(n,n)},className:yi(C?.closeButton,n?.classNames?.closeButton)},w?.close??ti):null,(oe||n.icon||n.promise)&&n.icon!==null&&(w?.[oe]!==null||n.icon)?U.createElement(`div`,{"data-icon":``,className:yi(C?.icon,n?.classNames?.icon)},oe===`loading`?n.icon||we():n.promise?we():null,oe===`loading`?null:Te):null,U.createElement(`div`,{"data-content":``,className:yi(C?.content,n?.classNames?.content)},U.createElement(`div`,{"data-title":``,className:yi(C?.title,n?.classNames?.title)},n.jsx?n.jsx:typeof n.title==`function`?n.title():n.title),n.description?U.createElement(`div`,{"data-description":``,className:yi(v,ue,C?.description,n?.classNames?.description)},typeof n.description==`function`?n.description():n.description):null),U.isValidElement(n.cancel)?n.cancel:n.cancel&&ui(n.cancel)?U.createElement(`button`,{"data-button":!0,"data-cancel":!0,style:n.cancelButtonStyle||h,onClick:e=>{ui(n.cancel)&&ce&&(n.cancel.onClick==null||n.cancel.onClick.call(n.cancel,e),Ce())},className:yi(C?.cancelButton,n?.classNames?.cancelButton)},n.cancel.label):null,U.isValidElement(n.action)?n.action:n.action&&ui(n.action)?U.createElement(`button`,{"data-button":!0,"data-action":!0,style:n.actionButtonStyle||g,onClick:e=>{ui(n.action)&&(n.action.onClick==null||n.action.onClick.call(n.action,e),!e.defaultPrevented&&Ce())},className:yi(C?.actionButton,n?.classNames?.actionButton)},n.action.label):null)};function Si(){if(typeof window>`u`||typeof document>`u`)return`ltr`;let e=document.documentElement.getAttribute(`dir`);return e===`auto`||!e?window.getComputedStyle(document.documentElement).direction:e}function Ci(e,t){let n={};return[e,t].forEach((e,t)=>{let r=t===1,i=r?`--mobile-offset`:`--offset`,a=r?pi:fi;function o(e){[`top`,`right`,`bottom`,`left`].forEach(t=>{n[`${i}-${t}`]=typeof e==`number`?`${e}px`:e})}typeof e==`number`||typeof e==`string`?o(e):typeof e==`object`?[`top`,`right`,`bottom`,`left`].forEach(t=>{e[t]===void 0?n[`${i}-${t}`]=a:n[`${i}-${t}`]=typeof e[t]==`number`?`${e[t]}px`:e[t]}):o(a)}),n}var wi=U.forwardRef(function(e,t){let{id:n,invert:r,position:i=`bottom-right`,hotkey:a=[`altKey`,`KeyT`],expand:o,closeButton:s,className:c,offset:l,mobileOffset:u,theme:d=`light`,richColors:f,duration:p,style:m,visibleToasts:h=di,toastOptions:g,dir:_=Si(),gap:v=gi,icons:y,customAriaLabel:b,containerAriaLabel:x=`Notifications`}=e,[S,C]=U.useState([]),w=U.useMemo(()=>n?S.filter(e=>e.toasterId===n):S.filter(e=>!e.toasterId),[S,n]),T=U.useMemo(()=>Array.from(new Set([i].concat(w.filter(e=>e.position).map(e=>e.position)))),[w,i]),[E,D]=U.useState([]),[O,k]=U.useState(!1),[A,j]=U.useState(!1),[M,N]=U.useState(d===`system`?typeof window<`u`&&window.matchMedia&&window.matchMedia(`(prefers-color-scheme: dark)`).matches?`dark`:`light`:d),P=U.useRef(null),F=a.join(`+`).replace(/Key/g,``).replace(/Digit/g,``),I=U.useRef(null),L=U.useRef(!1),R=U.useCallback(e=>{C(t=>(t.find(t=>t.id===e.id)?.delete||oi.dismiss(e.id),t.filter(({id:t})=>t!==e.id)))},[]);return U.useEffect(()=>oi.subscribe(e=>{e.dismiss?requestAnimationFrame(()=>{C(t=>t.map(t=>t.id===e.id?{...t,delete:!0}:t))}):setTimeout(()=>{W.flushSync(()=>{C(t=>{let n=t.findIndex(t=>t.id===e.id);return n===-1?[e,...t]:[...t.slice(0,n),{...t[n],...e},...t.slice(n+1)]})})})}),[]),U.useEffect(()=>{if(d!==`system`){N(d);return}if(d===`system`&&(window.matchMedia&&window.matchMedia(`(prefers-color-scheme: dark)`).matches?N(`dark`):N(`light`)),typeof window>`u`)return;let e=window.matchMedia(`(prefers-color-scheme: dark)`);try{e.addEventListener(`change`,({matches:e})=>{N(e?`dark`:`light`)})}catch{e.addListener(({matches:e})=>{try{N(e?`dark`:`light`)}catch(e){console.error(e)}})}},[d]),U.useEffect(()=>{S.length<=1&&k(!1)},[S]),U.useEffect(()=>{let e=e=>{if(a.length>0&&a.every(t=>e[t]||e.code===t)){var t;k(!0),(t=P.current)==null||t.focus()}e.code===`Escape`&&(document.activeElement===P.current||P.current?.contains(document.activeElement))&&k(!1)};return document.addEventListener(`keydown`,e),()=>document.removeEventListener(`keydown`,e)},[a]),U.useEffect(()=>{if(P.current)return()=>{I.current&&(I.current.focus({preventScroll:!0}),I.current=null,L.current=!1)}},[P.current]),U.createElement(`section`,{ref:t,"aria-label":b??`${x} ${F}`,tabIndex:-1,"aria-live":`polite`,"aria-relevant":`additions text`,"aria-atomic":`false`,suppressHydrationWarning:!0,"data-react-aria-top-layer":!0},T.map((t,n)=>{let[i,a]=t.split(`-`);return w.length?U.createElement(`ol`,{key:t,dir:_===`auto`?Si():_,tabIndex:-1,ref:P,className:c,"data-sonner-toaster":!0,"data-sonner-theme":M,"data-y-position":i,"data-x-position":a,style:{"--front-toast-height":`${E[0]?.height||0}px`,"--width":`${hi}px`,"--gap":`${v}px`,...m,...Ci(l,u)},onBlur:e=>{L.current&&!e.currentTarget.contains(e.relatedTarget)&&(L.current=!1,I.current&&=(I.current.focus({preventScroll:!0}),null))},onFocus:e=>{e.target instanceof HTMLElement&&e.target.dataset.dismissible===`false`||L.current||(L.current=!0,I.current=e.relatedTarget)},onMouseEnter:()=>k(!0),onMouseMove:()=>k(!0),onMouseLeave:()=>{A||k(!1)},onDragEnd:()=>k(!1),onPointerDown:e=>{e.target instanceof HTMLElement&&e.target.dataset.dismissible===`false`||j(!0)},onPointerUp:()=>j(!1)},w.filter(e=>!e.position&&n===0||e.position===t).map((n,i)=>U.createElement(xi,{key:n.id,icons:y,index:i,toast:n,defaultRichColors:f,duration:g?.duration??p,className:g?.className,descriptionClassName:g?.descriptionClassName,invert:r,visibleToasts:h,closeButton:g?.closeButton??s,interacting:A,position:t,style:g?.style,unstyled:g?.unstyled,classNames:g?.classNames,cancelButtonStyle:g?.cancelButtonStyle,actionButtonStyle:g?.actionButtonStyle,closeButtonAriaLabel:g?.closeButtonAriaLabel,removeToast:R,toasts:w.filter(e=>e.position==n.position),heights:E.filter(e=>e.position==n.position),setHeights:D,expandByDefault:o,gap:v,expanded:O,swipeDirections:e.swipeDirections}))):null}))}),Ti=n((e=>{var t=C();function n(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var r=typeof Object.is==`function`?Object.is:n,i=t.useState,a=t.useEffect,o=t.useLayoutEffect,s=t.useDebugValue;function c(e,t){var n=t(),r=i({inst:{value:n,getSnapshot:t}}),c=r[0].inst,u=r[1];return o(function(){c.value=n,c.getSnapshot=t,l(c)&&u({inst:c})},[e,n,t]),a(function(){return l(c)&&u({inst:c}),e(function(){l(c)&&u({inst:c})})},[e]),s(n),n}function l(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!r(e,n)}catch{return!0}}function u(e,t){return t()}var d=typeof window>`u`||window.document===void 0||window.document.createElement===void 0?u:c;e.useSyncExternalStore=t.useSyncExternalStore===void 0?d:t.useSyncExternalStore})),Ei=n(((e,t)=>{t.exports=Ti()})),Di=n((e=>{var t=C(),n=Ei();function r(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}var i=typeof Object.is==`function`?Object.is:r,a=n.useSyncExternalStore,o=t.useRef,s=t.useEffect,c=t.useMemo,l=t.useDebugValue;e.useSyncExternalStoreWithSelector=function(e,t,n,r,u){var d=o(null);if(d.current===null){var f={hasValue:!1,value:null};d.current=f}else f=d.current;d=c(function(){function e(e){if(!a){if(a=!0,o=e,e=r(e),u!==void 0&&f.hasValue){var t=f.value;if(u(t,e))return s=t}return s=e}if(t=s,i(o,e))return t;var n=r(e);return u!==void 0&&u(t,n)?(o=e,t):(o=e,s=n)}var a=!1,o,s,c=n===void 0?null:n;return[function(){return e(t())},c===null?void 0:function(){return e(c())}]},[t,n,r,u]);var p=a(e,d[0],d[1]);return s(function(){f.hasValue=!0,f.value=p},[p]),l(p),p}})),Oi=n(((e,t)=>{t.exports=Di()})),ki={};function Ai(e,t){let n=U.useRef(ki);return n.current===ki&&(n.current=e(t)),n}function ji(e,t,n,r){let i=Ai(Ni).current;return Pi(i,e,t,n,r)&&Ii(i,[e,t,n,r]),i.callback}function Mi(e){let t=Ai(Ni).current;return Fi(t,e)&&Ii(t,e),t.callback}function Ni(){return{callback:null,cleanup:null,refs:[]}}function Pi(e,t,n,r,i){return e.refs[0]!==t||e.refs[1]!==n||e.refs[2]!==r||e.refs[3]!==i}function Fi(e,t){return e.refs.length!==t.length||e.refs.some((e,n)=>e!==t[n])}function Ii(e,t){e.refs=t,e.callback=t.every(e=>e==null)?null:n=>{if(e.cleanup&&=(e.cleanup(),null),n!=null){let r=Array(t.length).fill(null);for(let e=0;e<t.length;e+=1){let i=t[e];if(i!=null)switch(typeof i){case`function`:{let t=i(n);typeof t==`function`&&(r[e]=t);break}case`object`:i.current=n}}e.cleanup=()=>{for(let e=0;e<t.length;e+=1){let n=t[e];if(n!=null)switch(typeof n){case`function`:{let t=r[e];typeof t==`function`?t():n(null);break}case`object`:n.current=null}}}}}}var Li=19;function Ri(e){return Li>=e}function zi(e){if(!U.isValidElement(e))return null;let t=e,n=t.props;return(Ri(19)?n?.ref:t.ref)??null}function Bi(e,t){if(e&&!t)return e;if(!e&&t)return t;if(e||t)return{...e,...t}}function Vi(){}var Hi=Object.freeze([]),Ui=Object.freeze({});function Wi(e,t){let n={};for(let r in e){let i=e[r];if(t?.hasOwnProperty(r)){let e=t[r](i);e!=null&&Object.assign(n,e)}else i===!0?n[`data-${r.toLowerCase()}`]=``:i&&(n[`data-${r.toLowerCase()}`]=i.toString())}return n}function Gi(e,t){return typeof e==`function`?e(t):e}function Ki(e,t){return typeof e==`function`?e(t):e}var qi={};function Ji(e,t,n,r,i){if(!n&&!r&&!i&&!e)return Xi(t);let a=Xi(e);return t&&(a=Zi(a,t)),n&&(a=Zi(a,n)),r&&(a=Zi(a,r)),i&&(a=Zi(a,i)),a}function Yi(e){if(e.length===0)return qi;if(e.length===1)return Xi(e[0]);let t=Xi(e[0]);for(let n=1;n<e.length;n+=1)t=Zi(t,e[n]);return t}function Xi(e){return ta(e)?{...e(qi)}:Qi(e)}function Zi(e,t){return ta(t)?t(e):$i(e,t)}function Qi(e){let t={...e};for(let e in t){let n=t[e];ea(e,n)&&(t[e]=ra(n))}return t}function $i(e,t){if(!t)return e;for(let n in t){let r=t[n];switch(n){case`style`:e[n]=Bi(e.style,r);break;case`className`:e[n]=aa(e.className,r);break;default:e[n]=ea(n,r)?na(e[n],r):r}}return e}function ea(e,t){let n=e.charCodeAt(0),r=e.charCodeAt(1),i=e.charCodeAt(2);return n===111&&r===110&&i>=65&&i<=90&&(typeof t==`function`||t===void 0)}function ta(e){return typeof e==`function`}function na(e,t){return t?e?(...n)=>{let r=n[0];if(oa(r)){let i=r;ia(i);let a=t(...n);return i.baseUIHandlerPrevented||e?.(...n),a}let i=t(...n);return e?.(...n),i}:ra(t):e}function ra(e){return e&&((...t)=>{let n=t[0];return oa(n)&&ia(n),e(...t)})}function ia(e){return e.preventBaseUIHandler=()=>{e.baseUIHandlerPrevented=!0},e}function aa(e,t){return t?e?t+` `+e:t:e}function oa(e){return typeof e==`object`&&!!e&&`nativeEvent`in e}function sa(e,t,n={}){let r=t.render;n.enabled!==!1&&(r=da(r));let i=ca(t,n,r);if(n.enabled===!1)return null;let a=n.state??Ui;return fa(e,r,i,a)}function ca(e,t,n){let{className:r,style:i}=e,{state:a=Ui,ref:o,props:s,stateAttributesMapping:c,enabled:l=!0}=t,u=l?Gi(r,a):void 0,d=l?Ki(i,a):void 0,f=l?Wi(a,c):Ui,p=l&&s?la(s):void 0,m=l?Bi(f,p)??{}:Ui;return typeof document<`u`&&(l?m.ref=Array.isArray(o)?Mi([m.ref,zi(n),...o]):ji(m.ref,zi(n),o):ji(null,null)),l?(u!==void 0&&(m.className=aa(m.className,u)),d!==void 0&&(m.style=Bi(m.style,d)),m):Ui}function la(e){return Array.isArray(e)?Yi(e):Ji(void 0,e)}var ua=Symbol.for(`react.lazy`);function da(e){if(e?.$$typeof!==ua)return e;let t=U.Children.toArray(e)[0];return U.isValidElement(t)?t:e}function fa(e,t,n,r){if(t){if(typeof t==`function`)return t(n,r);let e=Ji(n,t.props);return e.ref=n.ref,U.cloneElement(t,e)}return pa(e,n)}function pa(e,t){return e===`button`?(0,U.createElement)(`button`,{type:`button`,...t,key:t.key}):e===`img`?(0,U.createElement)(`img`,{alt:``,...t,key:t.key}):U.createElement(e,t)}function ma(e,t){return function(n,...r){let i=new URL(e);return i.searchParams.set(`code`,n.toString()),r.forEach(e=>i.searchParams.append(`args[]`,e)),`${t} error #${n}; visit ${i} for the full message.`}}var ha=ma(`https://base-ui.com/production-error`,`Base UI`),ga=U.createContext(void 0);function _a(){let e=U.useContext(ga);if(e===void 0)throw Error(ha(13));return e}var va={imageLoadingStatus:()=>null},ya=U.forwardRef(function(e,t){let{className:n,render:r,style:i,...a}=e,[o,s]=U.useState(`idle`),c={imageLoadingStatus:o},l=U.useMemo(()=>({imageLoadingStatus:o,setImageLoadingStatus:s}),[o,s]),u=sa(`span`,e,{state:c,ref:t,props:a,stateAttributesMapping:va});return(0,G.jsx)(ga.Provider,{value:l,children:u})}),ba={...U},xa=ba.useInsertionEffect,Sa=xa&&xa!==ba.useLayoutEffect?xa:e=>e();function q(e){let t=Ai(Ca).current;return t.next=e,Sa(t.effect),t.trampoline}function Ca(){let e={next:void 0,callback:wa,trampoline:(...t)=>e.callback?.(...t),effect:()=>{e.callback=e.next}};return e}function wa(){}var J=typeof document<`u`?U.useLayoutEffect:()=>{};function Ta(e){U.useEffect(e,Hi)}var Ea=null;globalThis.requestAnimationFrame;var Da=new class{callbacks=[];callbacksCount=0;nextId=1;startId=1;isScheduled=!1;tick=e=>{this.isScheduled=!1;let t=this.callbacks,n=this.callbacksCount;if(this.callbacks=[],this.callbacksCount=0,this.startId=this.nextId,n>0)for(let n=0;n<t.length;n+=1)t[n]?.(e)};request(e){let t=this.nextId;return this.nextId+=1,this.callbacks.push(e),this.callbacksCount+=1,this.isScheduled||=(requestAnimationFrame(this.tick),!0),t}cancel(e){let t=e-this.startId;t<0||t>=this.callbacks.length||this.callbacks[t]!==null&&(this.callbacks[t]=null,--this.callbacksCount)}},Oa=class e{static create(){return new e}static request(e){return Da.request(e)}static cancel(e){return Da.cancel(e)}currentId=Ea;request(e){this.cancel(),this.currentId=Da.request(()=>{this.currentId=Ea,e()})}cancel=()=>{this.currentId!==Ea&&(Da.cancel(this.currentId),this.currentId=Ea)};disposeEffect=()=>this.cancel};function ka(){let e=Ai(Oa.create).current;return Ta(e.disposeEffect),e}function Aa(e){return e==null?e:`current`in e?e.current:e}function ja(e,t){return e.getAnimations(t).filter(e=>{let t=e.effect?.getTiming();return t?.duration!==1/0&&t?.iterations!==1/0})}var Ma=`data-starting-style`,Na=`data-ending-style`,Pa=null;function Fa(e){if(!Pa){let e=[];Pa=e,queueMicrotask(()=>{Pa=null,W.flushSync(()=>{for(let t of e)t()})})}Pa.push(e)}function Ia(e,t=!1,n=!1){let r=ka();return q((i,a=null)=>{r.cancel();let o=Aa(e);if(o==null)return;let s=o,c=()=>{n?Fa(()=>{a?.aborted||i()}):W.flushSync(i)};if(typeof s.getAnimations!=`function`||globalThis.BASE_UI_ANIMATIONS_DISABLED){i();return}function l(){Promise.all(ja(s).map(e=>e.finished.then(Vi))).then(()=>{a?.aborted||c()},()=>{a?.aborted||(ja(s).some(e=>e.pending||e.playState!==`finished`)?l():c())})}if(t){let e=Ma;if(!s.hasAttribute(e)){r.request(l);return}let t=new MutationObserver(()=>{s.hasAttribute(e)||(t.disconnect(),l())});t.observe(s,{attributes:!0,attributeFilter:[e]}),a?.addEventListener(`abort`,()=>t.disconnect(),{once:!0})}else r.request(l)})}function La(e){let{enabled:t=!0,open:n,ref:r,batch:i=!1,onComplete:a}=e,o=q(a),s=Ia(r,n,i);U.useEffect(()=>{if(!t)return;let e=new AbortController;return s(o,e.signal),()=>{e.abort()}},[t,n,o,s])}var Ra={[Ma]:``},za={[Na]:``},Ba={transitionStatus(e){return e===`starting`?Ra:e===`ending`?za:null}};function Va(e,t=!1,n=!1,r=!1){let[i,a]=U.useState(e&&t?`idle`:void 0),[o,s]=U.useState(e&&!r);return e&&!o&&(s(!0),a(`starting`)),!e&&o&&i!==`ending`&&!n&&a(`ending`),!e&&!o&&i===`ending`&&a(void 0),J(()=>{if(!e&&o&&i!==`ending`&&n){let e=Oa.request(()=>{a(`ending`)});return()=>{Oa.cancel(e)}}},[e,o,i,n]),J(()=>{if(!e||t||i===void 0)return;let n=Oa.request(()=>{a(void 0)});return()=>{Oa.cancel(n)}},[t,e,i]),J(()=>{if(!e||!t)return;e&&o&&i!==`idle`&&a(`starting`);let n=Oa.request(()=>{a(`idle`)});return()=>{Oa.cancel(n)}},[t,e,o,i]),{mounted:o,setMounted:s,transitionStatus:i}}function Ha(e,{referrerPolicy:t,crossOrigin:n,sizes:r,srcSet:i},a){let o=U.useState(`idle`),s=o[1];return J(()=>{if(!a)return Vi;if(!e&&!i)return s(`error`),Vi;let o=!0,c=new window.Image,l=e=>()=>{o&&s(e)};return s(`loading`),c.onload=l(`loaded`),c.onerror=l(`error`),t&&(c.referrerPolicy=t),c.crossOrigin=n??null,r&&(c.sizes=r),i&&(c.srcset=i),e&&(c.src=e),c.complete&&s(c.naturalWidth>0?`loaded`:`error`),()=>{o=!1}},[a,e,i,r,n,t,s]),o}var Ua={...va,...Ba},Wa=U.forwardRef(function(e,t){let{className:n,render:r,onLoadingStatusChange:i,keepMounted:a=!1,style:o,sizes:s,srcSet:c,src:l,...u}=e,{setImageLoadingStatus:d}=_a(),[f,p]=Ha(l,e,!a),m=f===`loaded`,{mounted:h,transitionStatus:g,setMounted:_}=Va(m),v=U.useRef(null),y=U.useRef(!0);J(()=>{if(!a)return;let e=y.current;y.current=!1;let t=v.current;if(!t)return;if(!t.complete){p(`loading`);return}let n=t.naturalWidth>0?`loaded`:`error`;p(n),n===`loaded`&&e&&_(!0)},[a,l,c,s,u.crossOrigin,u.referrerPolicy,r,p,_]);let b=a?{"data-loading":f===`loading`?``:void 0,"data-error":f===`error`?``:void 0,"aria-hidden":f!==`loaded`||void 0,onLoad(){p(`loaded`)},onError(){p(`error`)}}:void 0,x=q(e=>{i?.(e),d(e)});J(()=>{f!==`idle`&&x(f)},[f,x]),J(()=>()=>d(`idle`),[d]),La({enabled:!m,open:m,ref:v,onComplete(){m||_(!1)}});let S={imageLoadingStatus:f,transitionStatus:a&&g===`ending`?void 0:g},C=a||h,w={};s!==void 0&&(w.sizes=s),c!==void 0&&(w.srcSet=c),l!==void 0&&(w.src=l);let T=sa(`img`,e,{state:S,ref:[t,v],props:[b,u,w],stateAttributesMapping:Ua,enabled:C});return C?T:null}),Ga=0,Ka=class e{static create(){return new e}currentId=Ga;start(e,t){this.clear(),this.currentId=setTimeout(()=>{this.currentId=Ga,t()},e)}isStarted(){return this.currentId!==Ga}clear=()=>{this.currentId!==Ga&&(clearTimeout(this.currentId),this.currentId=Ga)};disposeEffect=()=>this.clear};function qa(){let e=Ai(Ka.create).current;return Ta(e.disposeEffect),e}var Ja=U.forwardRef(function(e,t){let{className:n,render:r,delay:i=0,style:a,...o}=e,{imageLoadingStatus:s}=_a(),[c,l]=U.useState(i===0),u=qa();return U.useEffect(()=>(i>0?u.start(i,()=>l(!0)):l(!0),u.clear),[u,i]),sa(`span`,e,{state:{imageLoadingStatus:s},ref:t,props:o,stateAttributesMapping:va,enabled:s!==`loaded`&&(i===0||c)})});function Ya({className:e,size:t=`default`,...n}){return(0,G.jsx)(ya,{"data-slot":`avatar`,"data-size":t,className:K(`group/avatar relative flex size-8 shrink-0 rounded-full select-none after:absolute after:inset-0 after:rounded-full after:border after:border-border after:mix-blend-darken data-[size=lg]:size-10 data-[size=sm]:size-6 dark:after:mix-blend-lighten`,e),...n})}function Xa({className:e,...t}){return(0,G.jsx)(Wa,{"data-slot":`avatar-image`,className:K(`aspect-square size-full rounded-full object-cover`,e),...t})}function Za({className:e,...t}){return(0,G.jsx)(Ja,{"data-slot":`avatar-fallback`,className:K(`flex size-full items-center justify-center rounded-full bg-muted text-sm text-muted-foreground group-data-[size=sm]/avatar:text-xs`,e),...t})}var Qa=te.pick({name:!0,email:!0,image:!0}).extend({id:_(),role:_().nullable(),banned:h(),createdAt:b()}),$a=p({q:_().trim().max(200).default(``),role:i([`all`,`user`,`admin`]).default(`all`),status:i([`all`,`active`,`disabled`]).default(`all`),limit:ce().int().min(1).max(100).default(25),offset:ce().int().min(0).default(0)}),eo=p({users:r(Qa),total:R().int().nonnegative()}),to=Qa.extend({workspaces:r(p({id:d(),name:_(),role:i(l)})),projects:r(p({id:d(),name:_(),role:i(l)})),providers:r(_()),sessionCount:R().int().nonnegative()});p({password:_().min(12).max(128)}).strict(),$a.pick({q:!0,limit:!0,offset:!0});var no=p({workspaces:r(p({id:d(),name:_(),slug:_(),ownerId:_().nullable().default(null),createdAt:b(),memberCount:R().int().nonnegative(),projectCount:R().int().nonnegative(),administrators:r(Qa.pick({id:!0,name:!0,email:!0,image:!0}))})),total:R().int().nonnegative()}),ro=e=>e.trim().split(/\s+/).slice(0,2).map(e=>e.slice(0,1)).join(``).toUpperCase()||`?`;function io({name:e,image:t,className:n}){return(0,G.jsxs)(Ya,{"aria-hidden":`true`,className:K(`size-8 overflow-hidden rounded-full text-xs`,n),children:[t&&(0,G.jsx)(Xa,{src:t,alt:``}),(0,G.jsx)(Za,{className:`rounded-full bg-primary/10 font-medium text-primary text-[length:inherit]`,children:ro(e)})]})}function ao({name:e,email:t,image:n}){return(0,G.jsxs)(`span`,{className:`flex min-w-0 items-center gap-3`,children:[(0,G.jsx)(io,{name:e,image:n}),(0,G.jsxs)(`span`,{className:`min-w-0`,children:[(0,G.jsx)(`span`,{dir:`auto`,className:`block wrap-anywhere whitespace-normal font-medium`,children:e}),(0,G.jsx)(`span`,{className:`block break-all whitespace-normal text-xs text-muted-foreground`,children:t})]})]})}var oo={list_members:[`membership.`,`role.`,`project.`],list_workspace_members:[`membership.`,`role.`,`project.`],list_workspace_roles:[`role.`,`membership.`,`project.`],list_project_roles:[`role.`,`membership.`,`project.`],list_invitations:[`invitation.`,`membership.`],list_project_labels:[`label.`,`project.`],list_workflow_states:[`workflow.`,`project.`,`ticket.`],list_workspace_labels:[`label.`,`project.`],list_epics:[`epic.`,`project.`,`ticket.`],list_custom_fields:[`custom_field.`,`project.`,`ticket.`],list_calendar_feeds:[`calendar_feed.`,`label.`,`membership.`,`project.`],list_label_colors:[`label.`],list_views:[`label.`,`custom_field.`,`project.`],get_project:[`project.`,`label.`],list_project_destinations:[`destination.`,`project.`],list_notification_channels:[],list_imports:[],get_import:[],list_deleted_accounts:[`membership.`]};function so(e){return t=>{let[n,,r,i]=t.queryKey;if(n!==`kanvil`)return!1;if(typeof r!=`string`||!i||typeof i!=`object`)return!0;let a=oo[r];if(a&&!a.some(t=>e.type.startsWith(t)))return!1;let o=Reflect.get(i,`projectId`),s=Reflect.get(i,`ticketId`);return typeof o==`string`?o===e.projectId?!e.ticketId||typeof s!=`string`||s===e.ticketId||s===e.data.key:!1:!0}}function co(e,t){let n=[],r=!1,i,a=()=>i||(i=Promise.resolve().then(async()=>{for(;!t.aborted&&(r||n.length);){let t=r?void 0:n;n=[],r=!1,await e(t)}}).finally(()=>{if(i=void 0,!t.aborted&&(r||n.length))return a()}),i);return{push:e=>{t.aborted||(n.push(e),a().catch(()=>{}))},flush:()=>t.aborted?Promise.resolve():(r=!0,a())}}var lo=Object.create(null),uo=e=>({}),fo=new Proxy(lo,{get(e,t){return uo()[t]??lo[t]},has(e,t){return t in uo()||t in lo},set(e,t,n){let r=uo(!0);return r[t]=n,!0},deleteProperty(e,t){if(!t)return!1;let n=uo(!0);return delete n[t],!0},ownKeys(){let e=uo(!0);return Object.keys(e)}});fo.NODE_ENV;function po(e,t){return typeof process<`u`?{}[e]??t:typeof Deno<`u`?Deno.env.get(e)??t:typeof Bun<`u`?Bun.env[e]??t:t}Object.freeze({get BETTER_AUTH_SECRET(){return po(`BETTER_AUTH_SECRET`)},get AUTH_SECRET(){return po(`AUTH_SECRET`)},get BETTER_AUTH_TELEMETRY(){return po(`BETTER_AUTH_TELEMETRY`)},get BETTER_AUTH_TELEMETRY_ID(){return po(`BETTER_AUTH_TELEMETRY_ID`)},get NODE_ENV(){return po(`NODE_ENV`,`development`)},get PACKAGE_VERSION(){return po(`PACKAGE_VERSION`,`0.0.0`)},get BETTER_AUTH_TELEMETRY_ENDPOINT(){return po(`BETTER_AUTH_TELEMETRY_ENDPOINT`,``)}});var mo=1,ho=4,go=8,_o=24,vo={eterm:ho,cons25:ho,console:ho,cygwin:ho,dtterm:ho,gnome:ho,hurd:ho,jfbterm:ho,konsole:ho,kterm:ho,mlterm:ho,mosh:_o,putty:ho,st:ho,"rxvt-unicode-24bit":_o,terminator:_o,"xterm-kitty":_o},yo=new Map(Object.entries({APPVEYOR:go,BUILDKITE:go,CIRCLECI:_o,DRONE:go,GITEA_ACTIONS:_o,GITHUB_ACTIONS:_o,GITLAB_CI:go,TRAVIS:go})),bo=[/ansi/,/color/,/linux/,/direct/,/^con[0-9]*x[0-9]/,/^rxvt/,/^screen/,/^xterm/,/^vt100/,/^vt220/];function xo(){if(po(`FORCE_COLOR`)!==void 0)switch(po(`FORCE_COLOR`)){case``:case`1`:case`true`:return ho;case`2`:return go;case`3`:return _o;default:return mo}if(po(`NODE_DISABLE_COLORS`)!==void 0&&po(`NODE_DISABLE_COLORS`)!==``||po(`NO_COLOR`)!==void 0&&po(`NO_COLOR`)!==``||po(`TERM`)===`dumb`)return mo;if(po(`TMUX`))return _o;if(`TF_BUILD`in fo&&`AGENT_NAME`in fo)return ho;if(`CI`in fo){for(let{0:e,1:t}of yo)if(e in fo)return t;return po(`CI_NAME`)===`codeship`?go:mo}if(`TEAMCITY_VERSION`in fo)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.exec(po(`TEAMCITY_VERSION`))===null?mo:ho;switch(po(`TERM_PROGRAM`)){case`iTerm.app`:return!po(`TERM_PROGRAM_VERSION`)||/^[0-2]\./.exec(po(`TERM_PROGRAM_VERSION`))!==null?go:_o;case`HyperTerm`:case`MacTerm`:return _o;case`Apple_Terminal`:return go}if(po(`COLORTERM`)===`truecolor`||po(`COLORTERM`)===`24bit`)return _o;if(po(`TERM`)){if(/truecolor/.exec(po(`TERM`))!==null)return _o;if(/^xterm-256/.exec(po(`TERM`))!==null)return go;let e=po(`TERM`).toLowerCase();if(vo[e])return vo[e];if(bo.some(t=>t.exec(e)!==null))return ho}return po(`COLORTERM`)?ho:mo}var So=Symbol.for(`better-auth:global`),Co=null,wo={},To=`1.7.10`;function Eo(){return globalThis[So]||(globalThis[So]={version:To,epoch:1,context:wo},Co=globalThis[So]),Co=globalThis[So],Co.version!==To&&(Co.version=To,Co.epoch++),globalThis[So]}function Do(){return Eo().context.endpointContextAsyncStorage?.getStore()}var Oo={reset:`\x1B[0m`,bright:`\x1B[1m`,dim:`\x1B[2m`,undim:`\x1B[22m`,underscore:`\x1B[4m`,blink:`\x1B[5m`,reverse:`\x1B[7m`,hidden:`\x1B[8m`,fg:{black:`\x1B[30m`,red:`\x1B[31m`,green:`\x1B[32m`,yellow:`\x1B[33m`,blue:`\x1B[34m`,magenta:`\x1B[35m`,cyan:`\x1B[36m`,white:`\x1B[37m`},bg:{black:`\x1B[40m`,red:`\x1B[41m`,green:`\x1B[42m`,yellow:`\x1B[43m`,blue:`\x1B[44m`,magenta:`\x1B[45m`,cyan:`\x1B[46m`,white:`\x1B[47m`}},ko=[`debug`,`info`,`success`,`warn`,`error`];function Ao(e,t){return ko.indexOf(t)>=ko.indexOf(e)}var jo={info:Oo.fg.blue,success:Oo.fg.green,warn:Oo.fg.yellow,error:Oo.fg.red,debug:Oo.fg.magenta},Mo=(e,t,n)=>{let r=new Date().toISOString();return n?`${Oo.dim}${r}${Oo.reset} ${jo[e]}${e.toUpperCase()}${Oo.reset} ${Oo.bright}[Better Auth]:${Oo.reset} ${t}`:`${r} ${e.toUpperCase()} [Better Auth]: ${t}`},No=(e=>{let t=e?.disabled!==!0,n=e?.level??`warn`,r=e?.disableColors===void 0?xo()!==1:!e.disableColors,i=(i,a,o=[])=>{if(!t||!Ao(n,i))return;let s=Mo(i,a,r);!e||typeof e.log!=`function`?i===`error`?console.error(s,...o):i===`warn`?console.warn(s,...o):console.log(s,...o):e.log(i===`success`?`info`:i,a,...o)};return{...Object.fromEntries(ko.map(e=>[e,(...[t,...n])=>i(e,t,n)])),get level(){return n}}})(),Po=()=>{let e=Do()?.context.logger;return e&&e!==Fo?e:No},Fo={debug:(...e)=>Po().debug(...e),info:(...e)=>Po().info(...e),success:(...e)=>Po().success(...e),warn:(...e)=>Po().warn(...e),error:(...e)=>Po().error(...e),get level(){return Po().level}};function Io(e){return Object.fromEntries(Object.entries(e).map(([e,t])=>[e,{code:e,message:t,toString:()=>e}]))}function Lo(){let e=Object.getOwnPropertyDescriptor(Error,`stackTraceLimit`);return e===void 0?Object.isExtensible(Error):Object.prototype.hasOwnProperty.call(e,`writable`)?e.writable:e.set!==void 0}function Ro(e){let t=e.split(`
|
|
3
3
|
at `);return t.length<=1?e:(t.splice(1,1),t.join(`
|
|
4
4
|
at `))}function zo(e,t){class n extends e{#e;constructor(...e){if(Lo()){let t=Error.stackTraceLimit;Error.stackTraceLimit=0,super(...e),Error.stackTraceLimit=t}else super(...e);let t=Error().stack;t&&(this.#e=Ro(t.replace(/^Error/,this.name)))}get errorStack(){return this.#e}}return Object.defineProperty(n.prototype,"constructor",{get(){return t},enumerable:!1,configurable:!0}),n}var Bo={OK:200,CREATED:201,ACCEPTED:202,NO_CONTENT:204,MULTIPLE_CHOICES:300,MOVED_PERMANENTLY:301,FOUND:302,SEE_OTHER:303,NOT_MODIFIED:304,TEMPORARY_REDIRECT:307,BAD_REQUEST:400,UNAUTHORIZED:401,PAYMENT_REQUIRED:402,FORBIDDEN:403,NOT_FOUND:404,METHOD_NOT_ALLOWED:405,NOT_ACCEPTABLE:406,PROXY_AUTHENTICATION_REQUIRED:407,REQUEST_TIMEOUT:408,CONFLICT:409,GONE:410,LENGTH_REQUIRED:411,PRECONDITION_FAILED:412,PAYLOAD_TOO_LARGE:413,URI_TOO_LONG:414,UNSUPPORTED_MEDIA_TYPE:415,RANGE_NOT_SATISFIABLE:416,EXPECTATION_FAILED:417,"I'M_A_TEAPOT":418,MISDIRECTED_REQUEST:421,UNPROCESSABLE_ENTITY:422,LOCKED:423,FAILED_DEPENDENCY:424,TOO_EARLY:425,UPGRADE_REQUIRED:426,PRECONDITION_REQUIRED:428,TOO_MANY_REQUESTS:429,REQUEST_HEADER_FIELDS_TOO_LARGE:431,UNAVAILABLE_FOR_LEGAL_REASONS:451,INTERNAL_SERVER_ERROR:500,NOT_IMPLEMENTED:501,BAD_GATEWAY:502,SERVICE_UNAVAILABLE:503,GATEWAY_TIMEOUT:504,HTTP_VERSION_NOT_SUPPORTED:505,VARIANT_ALSO_NEGOTIATES:506,INSUFFICIENT_STORAGE:507,LOOP_DETECTED:508,NOT_EXTENDED:510,NETWORK_AUTHENTICATION_REQUIRED:511};zo(class extends Error{status;body;headers;statusCode;constructor(e=`INTERNAL_SERVER_ERROR`,t=void 0,n={},r=typeof e==`number`?e:Bo[e]){super(t?.message,t?.cause?{cause:t.cause}:void 0),this.status=e,this.body=t,this.headers=n,this.statusCode=r,this.name=`APIError`,this.status=e,this.headers=n,this.statusCode=r,this.body=t}},Error);var Vo=class extends Error{constructor(e,t){super(e,t),this.name=`BetterAuthError`,this.message=e,this.stack=``}},Ho=47;function Uo(e){let t=e.length;for(;t>0&&e.charCodeAt(t-1)===Ho;)t--;return t===e.length?e:e.slice(0,t)}function Wo(e){try{return(Uo(new URL(e).pathname)||`/`)!==`/`}catch{throw new Vo(`Invalid base URL: ${e}. Please provide a valid base URL.`)}}function Go(e){try{let t=new URL(e);if(t.protocol!==`http:`&&t.protocol!==`https:`)throw new Vo(`Invalid base URL: ${e}. URL must include 'http://' or 'https://'`)}catch(t){throw t instanceof Vo?t:new Vo(`Invalid base URL: ${e}. Please provide a valid base URL.`,{cause:t})}}function Ko(e,t=`/api/auth`){if(Go(e),Wo(e))return e;let n=Uo(e);return!t||t===`/`?n:(t=t.startsWith(`/`)?t:`/${t}`,`${n}${t}`)}function qo(e,t){return!e||e.trim()===``?!1:t===`proto`?e===`http`||e===`https`:t===`host`?[/\.\./,/\0/,/[\s]/,/^[.]/,/[<>'"]/,/javascript:/i,/file:/i,/data:/i].some(t=>t.test(e))?!1:/^[a-zA-Z0-9]([a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(\.[a-zA-Z0-9]([a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*(:[0-9]{1,5})?$/.test(e)||/^(\d{1,3}\.){3}\d{1,3}(:[0-9]{1,5})?$/.test(e)||/^\[[0-9a-fA-F:]+\](:[0-9]{1,5})?$/.test(e)||/^localhost(:[0-9]{1,5})?$/i.test(e):!1}function Jo(e,t,n,r,i){if(e)return Ko(e,t);if(r!==!1){let e=fo.BETTER_AUTH_URL||fo.NEXT_PUBLIC_BETTER_AUTH_URL||fo.PUBLIC_BETTER_AUTH_URL||fo.NUXT_PUBLIC_BETTER_AUTH_URL||fo.NUXT_PUBLIC_AUTH_URL||(fo.BASE_URL===`/`?void 0:fo.BASE_URL);if(e)return Ko(e,t)}let a=n?.headers.get(`x-forwarded-host`),o=n?.headers.get(`x-forwarded-proto`);if(a&&o&&i&&qo(o,`proto`)&&qo(a,`host`))try{return Ko(`${o}://${a}`,t)}catch{}if(n){let e=Yo(n.url);if(!e)throw new Vo(`Could not get origin from request. Please provide a valid base URL.`);return Ko(e,t)}if(typeof window<`u`&&window.location)return Ko(window.location.origin,t)}function Yo(e){try{let t=new URL(e);return t.origin===`null`?null:t.origin}catch{return null}}var Xo={proto:/"(?:_|\\u0{2}5[Ff]){2}(?:p|\\u0{2}70)(?:r|\\u0{2}72)(?:o|\\u0{2}6[Ff])(?:t|\\u0{2}74)(?:o|\\u0{2}6[Ff])(?:_|\\u0{2}5[Ff]){2}"\s*:/,constructor:/"(?:c|\\u0063)(?:o|\\u006[Ff])(?:n|\\u006[Ee])(?:s|\\u0073)(?:t|\\u0074)(?:r|\\u0072)(?:u|\\u0075)(?:c|\\u0063)(?:t|\\u0074)(?:o|\\u006[Ff])(?:r|\\u0072)"\s*:/,protoShort:/"__proto__"\s*:/,constructorShort:/"constructor"\s*:/},Zo=/^\s*["[{]|^\s*-?\d{1,16}(\.\d{1,17})?([Ee][+-]?\d+)?\s*$/,Qo={true:!0,false:!1,null:null,undefined:void 0,nan:NaN,infinity:1/0,"-infinity":-1/0},$o=/^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2})(?:\.(\d{1,7}))?(?:Z|([+-])(\d{2}):(\d{2}))$/;function es(e){return e instanceof Date&&!isNaN(e.getTime())}function ts(e){let t=$o.exec(e);if(!t)return null;let[,n,r,i,a,o,s,c,l,u,d]=t,f=new Date(Date.UTC(parseInt(n,10),parseInt(r,10)-1,parseInt(i,10),parseInt(a,10),parseInt(o,10),parseInt(s,10),c?parseInt(c.padEnd(3,`0`),10):0));if(l){let e=(parseInt(u,10)*60+parseInt(d,10))*(l===`+`?-1:1);f.setUTCMinutes(f.getUTCMinutes()+e)}return es(f)?f:null}function ns(e,t={}){let{strict:n=!1,warnings:r=!1,reviver:i,parseDates:a=!0}=t;if(typeof e!=`string`)return e;let o=e.trim(),s=o.toLowerCase();if(s.length<=9&&s in Qo)return Qo[s];if(!Zo.test(o)){if(n)throw SyntaxError(`[better-json] Invalid JSON`);return e}if(Object.entries(Xo).some(([e,t])=>{let n=t.test(o);return n&&r&&console.warn(`[better-json] Detected potential prototype pollution attempt using ${e} pattern`),n})&&n)throw Error(`[better-json] Potential prototype pollution attempt detected`);try{return JSON.parse(o,(e,t)=>{if(e===`__proto__`||e===`constructor`&&t&&typeof t==`object`&&`prototype`in t)r&&console.warn(`[better-json] Dropping "${e}" key to prevent prototype pollution`);else{if(a&&typeof t==`string`){let e=ts(t);if(e)return e}return i?i(e,t):t}})}catch(t){if(n)throw t;return e}}function rs(e,t={strict:!0}){return ns(e,t)}var is=[`javascript:`,`data:`,`vbscript:`];function as(e){let t;try{t=new URL(e)}catch{return!0}return!is.includes(t.protocol)}var os={id:`redirect`,name:`Redirect`,hooks:{onSuccess(e){if(e.data?.url&&e.data?.redirect&&as(e.data.url)&&typeof window<`u`&&window.location&&window.location)try{window.location.href=e.data.url}catch{}}}},ss=[],cs=0,ls=null,us=4,ds=globalThis.nanostoresGlobal||={epoch:0},fs=()=>{let e,t;for(;cs<ss.length;){t=cs,cs+=us;let n=ls?.get(ss[t]);if(n){if(!n.has(ss[t+1]))continue;n.clear()}try{ss[t](ss[t+1].value,ss[t+2],ss[t+3])}catch(t){e=t}}if(ss.length=cs=0,e)throw e},ps=e=>{let t=[],n={eq:Object.is,get(){return n.lc||n.listen(()=>{})(),n.value},init:e,lc:0,listen(e){return n.lc=t.push(e),()=>{ls?.get(e)?.delete(n);for(let t=cs;t<ss.length;)ss[t]===e&&ss[t+1]===n?ss.splice(t,us):t+=us;let r=t.indexOf(e);~r&&(t.splice(r,1),--n.lc||n.off())}},notify(e,r){ds.epoch++;let i=!ss.length&&!0;for(let i of t)ss.push(i,n,e,r);i&&fs()},off(){},set(e){let t=n.value;n.eq(t,e)||(n.value=e,n.notify(t))},subscribe(e){let t=n.listen(e);return e(n.value),t},value:e};return n},ms=2,hs=5,gs=6,_s=10,vs=(e,t,n,r)=>(e.events=e.events||{},e.events[n+_s]||(e.events[n+_s]=r(t=>{e.events[n].reduceRight((e,t)=>(t(e),e),{shared:{},...t})})),e.events[n]=e.events[n]||[],e.events[n].push(t),()=>{let r=e.events[n],i=r.indexOf(t);~i&&(r.splice(i,1),r.length||(e.events[n+_s](),delete e.events[n+_s]))}),ys=(e,t)=>vs(e,t,ms,t=>{let n=e.set,r=e.setKey;return e.setKey&&=(n,i)=>{let a;if(t({abort:()=>{a=!0},changed:n,newValue:{...e.value,[n]:i}}),!a)return r(n,i)},e.set=e=>{let r;if(t({abort:()=>{r=!0},newValue:e}),!r)return n(e)},()=>{e.set=n,e.setKey=r}}),bs=1e3,xs=(e,t)=>vs(e,n=>{let r=t(n);r&&e.events[gs].push(r)},hs,t=>{let n=e.listen;e.listen=(...r)=>(!e.lc&&!e.active&&(e.active=!0,t()),n(...r));let r=e.off;return e.events[gs]=[],e.off=()=>{r(),setTimeout(()=>{if(e.active&&!e.lc){e.active=!1;for(let t of e.events[gs])t();e.events[gs]=[]}},bs)},()=>{e.listen=n,e.off=r}});function Ss(e,t){let n=ws(t),r=e;for(let e of n){if(r==null)return;r=r[e]}return r}var Cs=/(.*)\[(\d+)\]/;function ws(e){return e.split(`.`).flatMap(e=>Ts(e))}function Ts(e){if(Cs.test(e)){let[,t,n]=e.match(Cs);return[...Ts(t),n]}return[e]}function Es(e,t,n){let r=new Set(t);return e.listen((i,a,o)=>{let s=e=>!Object.is(Ss(i,e),Ss(a,e));(o===void 0?t.some(t=>a===void 0||(e.eqKey?!e.eqKey(a[t],i[t],t):s(t))):r.has(o)||typeof o==`string`&&(r.has(o.split(/\.|\[/)[0])||!e.eqKey&&a!==void 0&&t.some(s)))&&n(i,a,o)})}function Ds(e){if(typeof e!=`object`||!e)return!1;let t=Object.getPrototypeOf(e);return t===Object.prototype||t===null}function Os(e,t){if(e===t)return!0;if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(!Os(e[n],t[n]))return!1;return!0}if(Ds(e)&&Ds(t)){let n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(let r of n)if(!(r in t)||!Os(e[r],t[r]))return!1;return!0}return!1}function ks(e,t){return ys(e,({newValue:n,abort:r})=>{t(e.value,n)&&r()})}var As=Symbol.for(`better-auth:auth-query`);function js(e){return As in e&&e[As]===!0}function Ms(e){let t=ps(e);return Object.defineProperty(t,As,{value:!0}),t}var Ns=Symbol.for(`better-auth:broadcast-channel`),Ps=()=>Math.floor(Date.now()/1e3),Fs=class{listeners=new Set;name;constructor(e=`better-auth.message`){this.name=e}subscribe(e){return this.listeners.add(e),()=>{this.listeners.delete(e)}}post(e){if(typeof window<`u`)try{localStorage.setItem(this.name,JSON.stringify({...e,timestamp:Ps()}))}catch{}}setup(){if(typeof window>`u`||window.addEventListener===void 0)return()=>{};let e=e=>{if(e.key!==this.name)return;let t=JSON.parse(e.newValue??`{}`);t?.event===`session`&&t?.data&&this.listeners.forEach(e=>e(t))};return window.addEventListener(`storage`,e),()=>{window.removeEventListener(`storage`,e)}}};function Is(e=`better-auth.message`){return globalThis[Ns]||(globalThis[Ns]=new Fs(e)),globalThis[Ns]}var Ls=Symbol.for(`better-auth:focus-manager`),Rs=class{listeners=new Set;subscribe(e){return this.listeners.add(e),()=>{this.listeners.delete(e)}}setFocused(e){this.listeners.forEach(t=>t(e))}setup(){if(typeof window>`u`||typeof document>`u`||window.addEventListener===void 0)return()=>{};let e=()=>{document.visibilityState===`visible`&&this.setFocused(!0)};return document.addEventListener(`visibilitychange`,e,!1),()=>{document.removeEventListener(`visibilitychange`,e,!1)}}};function zs(){return globalThis[Ls]||(globalThis[Ls]=new Rs),globalThis[Ls]}var Bs=Symbol.for(`better-auth:online-manager`),Vs=class{listeners=new Set;isOnline=typeof navigator<`u`?navigator.onLine:!0;subscribe(e){return this.listeners.add(e),()=>{this.listeners.delete(e)}}setOnline(e){this.isOnline=e,this.listeners.forEach(t=>t(e))}setup(){if(typeof window>`u`||window.addEventListener===void 0)return()=>{};let e=()=>this.setOnline(!0),t=()=>this.setOnline(!1);return window.addEventListener(`online`,e,!1),window.addEventListener(`offline`,t,!1),()=>{window.removeEventListener(`online`,e,!1),window.removeEventListener(`offline`,t,!1)}}};function Hs(){return globalThis[Bs]||(globalThis[Bs]=new Vs),globalThis[Bs]}var Us=()=>Math.floor(Date.now()/1e3),Ws=5;function Gs(e){let{fetchSession:t,shouldPollSession:n=()=>!0,sessionSignal:r,options:i={}}=e,a=i.sessionOptions?.refetchInterval??0,o=i.sessionOptions?.refetchOnWindowFocus??!0,s=i.sessionOptions?.refetchWhenOffline??!1,c={isInitialized:!1,lastSessionRequest:0},l=()=>s||Hs().isOnline,u=e=>{if(l()){if(e?.event===`storage`)t();else if(e?.event===`poll`)c.lastSessionRequest=Us(),t();else if(e?.event===`visibilitychange`){if(Us()-c.lastSessionRequest<Ws)return;c.lastSessionRequest=Us(),t()}else t()}},d=e=>{Is().post({event:`session`,data:{trigger:e},clientId:Math.random().toString(36).substring(7)})},f=()=>{a&&a>0&&(c.pollInterval=setInterval(()=>{n()&&u({event:`poll`})},a*1e3))},p=()=>{c.unsubscribeBroadcast=Is().subscribe(()=>{u({event:`storage`})})},m=()=>{o&&(c.unsubscribeFocus=zs().subscribe(()=>{u({event:`visibilitychange`})}))},h=()=>{c.unsubscribeOnline=Hs().subscribe(e=>{e&&u({event:`visibilitychange`})})},g=()=>{c.unsubscribeSignal=r.listen(()=>{t()})};return{init:()=>{c.isInitialized||(c.isInitialized=!0,f(),p(),m(),h(),g(),c.cleanupBroadcastSetup=Is().setup(),c.cleanupFocusSetup=zs().setup(),c.cleanupOnlineSetup=Hs().setup())},cleanup:()=>{c.isInitialized&&(c.pollInterval&&=(clearInterval(c.pollInterval),void 0),c.unsubscribeBroadcast&&=(c.unsubscribeBroadcast(),void 0),c.unsubscribeFocus&&=(c.unsubscribeFocus(),void 0),c.unsubscribeOnline&&=(c.unsubscribeOnline(),void 0),c.unsubscribeSignal&&=(c.unsubscribeSignal(),void 0),c.cleanupBroadcastSetup&&=(c.cleanupBroadcastSetup(),void 0),c.cleanupFocusSetup&&=(c.cleanupFocusSetup(),void 0),c.cleanupOnlineSetup&&=(c.cleanupOnlineSetup(),void 0),c.isInitialized=!1,c.lastSessionRequest=0)},triggerRefetch:u,broadcastSessionUpdate:d}}var Ks=()=>typeof window>`u`,qs=bs;function Js(e,t){if(typeof window>`u`)return;let n=e.get();n.data===null&&t!==null&&e.set({...n,data:t,error:null,isPending:!1})}function Ys(e){return typeof e==`object`&&e&&`data`in e&&`error`in e?e:{data:e,error:null}}function Xs(e){return!e||e.session===null&&e.user===null?null:e}function Zs(e,t){return Os(e.data,t.data)&&e.error===t.error&&e.isPending===t.isPending&&e.isRefetching===t.isRefetching&&e.refetch===t.refetch}function Qs(e,t){let n=ps(!1),r,i=0,a=0;n.listen(()=>{a++,i=0});let o=e=>u(e),s=Ms({data:null,error:null,isPending:!0,isRefetching:!1,refetch:o});ks(s,Zs);let c=async(t,n)=>{let r=s.value;if(s.set({...r,isPending:r.data===null,isRefetching:!0,error:null,refetch:o}),t.aborted)return`aborted`;try{let r=await e(`/get-session`,{method:`GET`,query:n?.query,signal:t});if(t.aborted)return`aborted`;let{data:i,error:a}=Ys(r),c=`fresh`;if(i?.needsRefresh)try{let n=await e(`/get-session`,{method:`POST`,signal:t});if(t.aborted)return`aborted`;({data:i,error:a}=Ys(n))}catch{if(t.aborted)return`aborted`;c=`stale`}if(a){let e=s.value,t=a?.status===401;return s.set({data:t?null:e.data,error:a,isPending:!1,isRefetching:!1,refetch:o}),`failed`}let l=Xs(i),u=s.value,d=u.data!=null&&l!=null&&Os(u.data,l)?u.data:l;return s.set({data:d,error:null,isPending:!1,isRefetching:!1,refetch:o}),c}catch(e){if(t.aborted)return`aborted`;let n=s.value;return s.set({data:n.data,error:e,isPending:!1,isRefetching:!1,refetch:o}),`failed`}},l=()=>{let e=s.value.data?.session?.expiresAt,t=e instanceof Date?e.getTime():1/0;return Math.min(Date.now()+qs,t)},u=e=>{i=0,r?.cancel();let t=new AbortController,n={cancel:()=>t.abort(),promise:Promise.resolve().then(()=>t.signal.aborted?`aborted`:c(t.signal,e)),revision:a};r=n;let o=e=>{r===n&&(r=void 0,e===`fresh`&&n.revision===a&&(i=l()))};return n.promise.then(o,()=>o(`failed`)),n.promise.then(()=>void 0)},d=()=>r?.revision===a?r.promise.then(()=>void 0):Date.now()<i?Promise.resolve():u(),f=()=>{};return xs(s,()=>{let e;Ks()||(e=setTimeout(()=>{d()},0));let r=Gs({fetchSession:u,shouldPollSession:()=>s.value.data!=null,sessionSignal:n,options:t});return r.init(),f=r.broadcastSessionUpdate,()=>{e&&clearTimeout(e),r.cleanup()}}),{session:s,$sessionSignal:n,broadcastSessionUpdate:e=>f(e)}}function $s(e){if(typeof e!=`object`||!e)return!1;let t=Object.getPrototypeOf(e);return t!==null&&t!==Object.prototype&&Object.getPrototypeOf(t)!==null||Symbol.iterator in e?!1:Symbol.toStringTag in e?Object.prototype.toString.call(e)===`[object Module]`:!0}function ec(e,t,n=`.`,r){if(!$s(t))return ec(e,{},n,r);let i={...t};for(let t of Object.keys(e)){if(t===`__proto__`||t===`constructor`)continue;let a=e[t];a!=null&&(r&&r(i,t,a,n)||(i[t]=Array.isArray(a)&&Array.isArray(i[t])?[...a,...i[t]]:$s(a)&&$s(i[t])?ec(a,i[t],(n?`${n}.`:``)+t.toString(),r):a))}return i}function tc(e){return(...t)=>t.reduce((t,n)=>ec(t,n,``,e),{})}var nc=tc(),rc=class extends Error{constructor(e,t,n){super(t||e.toString(),{cause:n}),this.status=e,this.statusText=t,this.error=n,Error.captureStackTrace(this,this.constructor)}},ic=async(e,t)=>{let n=t||{},r={onRequest:[t?.onRequest],onResponse:[t?.onResponse],onSuccess:[t?.onSuccess],onError:[t?.onError],onRetry:[t?.onRetry]};if(!t||!t?.plugins)return{url:e,options:n,hooks:r};for(let i of t?.plugins||[]){if(i.init){let t=await i.init?.call(i,e.toString(),n);n=t.options||n,e=t.url}r.onRequest.push(i.hooks?.onRequest),r.onResponse.push(i.hooks?.onResponse),r.onSuccess.push(i.hooks?.onSuccess),r.onError.push(i.hooks?.onError),r.onRetry.push(i.hooks?.onRetry)}return{url:e,options:n,hooks:r}},ac=class{constructor(e){this.options=e}shouldAttemptRetry(e,t){return this.options.shouldRetry?Promise.resolve(e<this.options.attempts&&this.options.shouldRetry(t)):Promise.resolve(e<this.options.attempts)}getDelay(){return this.options.delay}},oc=class{constructor(e){this.options=e}shouldAttemptRetry(e,t){return this.options.shouldRetry?Promise.resolve(e<this.options.attempts&&this.options.shouldRetry(t)):Promise.resolve(e<this.options.attempts)}getDelay(e){return Math.min(this.options.maxDelay,this.options.baseDelay*2**e)}};function sc(e){if(typeof e==`number`)return new ac({type:`linear`,attempts:e,delay:1e3});switch(e.type){case`linear`:return new ac(e);case`exponential`:return new oc(e);default:throw Error(`Invalid retry strategy`)}}var cc=[`get`,`post`,`put`,`patch`,`delete`];function lc(e){if(!e.startsWith(`@`))return{method:void 0,path:e};let t=e.indexOf(`/`),n=e.slice(1,t===-1?void 0:t);return cc.includes(n)?{method:n,path:t===-1?e:e.slice(t+1)}:{method:void 0,path:e}}var uc=e=>e===`.`||e===`..`,dc=e=>e.split(`:`).map(e=>encodeURIComponent(e)).join(`:`);function fc(e,t){let n=t.get(e);if(n===void 0)return dc(e);if(uc(n))throw TypeError(`Path parameters cannot be reserved path segments`);return encodeURIComponent(n)}function pc(e,t){let{baseURL:n,params:r,query:i}=t||{query:{},params:{},baseURL:``},a=e.startsWith(`http`)?e.split(`/`).slice(0,3).join(`/`):n||``,{path:o}=lc(e);o!==e&&(e=`/${o}`),a.endsWith(`/`)||(a+=`/`);let[s,c]=e.replace(a,``).split(`?`),l=new URLSearchParams(c);for(let[e,t]of Object.entries(i||{})){if(t==null)continue;let n;if(typeof t==`string`)n=t;else if(Array.isArray(t)){for(let n of t)l.append(e,n);continue}else n=JSON.stringify(t);l.set(e,n)}let u=new Map;if(r){if(Array.isArray(r)){let e=s.split(`/`).filter(e=>e.startsWith(`:`));for(let[t,n]of e.entries()){let e=r[t];u.set(n,String(e))}}else for(let[e,t]of Object.entries(r))u.set(`:${e}`,String(t))}s=s.split(`/`).map(e=>fc(e,u)).join(`/`),s=s.replace(/^\/+/,``);let d=l.toString();return d=d.length>0?`?${d}`.replace(/\+/g,`%20`):``,a.startsWith(`http`)?new URL(`${s}${d}`,a):`${a}${s}${d}`}var mc=async e=>{let t={},n=async e=>typeof e==`function`?await e():e;if(e?.auth){if(e.auth.type===`Bearer`){let r=await n(e.auth.token);if(!r)return t;t.authorization=`Bearer ${r}`}else if(e.auth.type===`Basic`){let[r,i]=await Promise.all([n(e.auth.username),n(e.auth.password)]);if(!r||!i)return t;t.authorization=`Basic ${btoa(`${r}:${i}`)}`}else if(e.auth.type===`Custom`){let[r,i]=await Promise.all([n(e.auth.prefix),n(e.auth.value)]);if(!i)return t;t.authorization=`${r??``} ${i}`}}return t},hc=/^application\/(?:[\w!#$%&*.^`~-]*\+)?json(;.+)?$/i;function gc(e){let t=e.headers.get(`content-type`),n=new Set([`image/svg`,`application/xml`,`application/xhtml`,`application/html`]);if(!t)return`json`;let r=t.split(`;`).shift()||``;return hc.test(r)?`json`:n.has(r)||r.startsWith(`text/`)?`text`:`blob`}function _c(e){try{return JSON.parse(e),!0}catch{return!1}}function vc(e){if(e===void 0)return!1;let t=typeof e;return t===`string`||t===`number`||t===`boolean`||t===null?!0:t===`object`?Array.isArray(e)?!0:e.buffer?!1:e.constructor&&e.constructor.name===`Object`||typeof e.toJSON==`function`:!1}function yc(e){try{return JSON.parse(e)}catch{return e}}function bc(e){return typeof e==`function`}function xc(e){if(e?.customFetchImpl)return e.customFetchImpl;if(typeof globalThis<`u`&&bc(globalThis.fetch))return globalThis.fetch;if(typeof window<`u`&&bc(window.fetch))return window.fetch;throw Error(`No fetch implementation found`)}function Sc(...e){let t={};for(let n of e)if(n){if(n instanceof Headers)n.forEach((e,n)=>{t[n]=e});else{let e=Array.isArray(n)?n:Object.entries(n);for(let[n,r]of e)r!=null&&(t[n]=r)}}return t}async function Cc(e){let t=new Headers(Sc(e?.headers,await mc(e)));if(!t.has(`content-type`)){let n=wc(e?.body);n&&t.set(`content-type`,n)}return t}function wc(e){return vc(e)?`application/json`:null}function Tc(e){let t=e.get(`content-type`);return t?t.split(`;`)[0].trim().toLowerCase():null}function Ec(e,t){let{body:n}=e;return n?!vc(n)||typeof n==`string`?n:Tc(t)===`application/x-www-form-urlencoded`?new URLSearchParams(n).toString():JSON.stringify(n):null}function Dc(e,t){if(t?.method)return t.method.toUpperCase();let{method:n}=lc(e);return n?n.toUpperCase():t?.body?`POST`:`GET`}function Oc(e,t){let n;return!e?.signal&&e?.timeout&&(n=setTimeout(()=>t?.abort(),e?.timeout)),{abortTimeout:n,clearTimeout:()=>{n&&clearTimeout(n)}}}var kc=class e extends Error{constructor(t,n){super(n||JSON.stringify(t,null,2)),this.issues=t,Object.setPrototypeOf(this,e.prototype)}};async function Ac(e,t){let n=await e[`~standard`].validate(t);if(n.issues)throw new kc(n.issues);return n.value}function jc(e){"@babel/helpers - typeof";return jc=typeof Symbol==`function`&&typeof Symbol.iterator==`symbol`?function(e){return typeof e}:function(e){return e&&typeof Symbol==`function`&&e.constructor===Symbol&&e!==Symbol.prototype?`symbol`:typeof e},jc(e)}function Mc(e,t){if(jc(e)!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(jc(r)!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function Nc(e){var t=Mc(e,`string`);return jc(t)==`symbol`?t:t+``}function Pc(e,t,n){return(t=Nc(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Fc(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function Ic(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?Fc(Object(n),!0).forEach(function(t){Pc(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Fc(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var Lc=async(e,t)=>{var n;let{hooks:r,url:i,options:a}=await ic(e,t),o=xc(a),s=new AbortController,c=a.signal??s.signal,l=pc(i,a),u=await Cc(a),d=Ec(a,u),f=Dc(i,a),p=Ic(Ic({},a),{},{url:l,headers:u,body:d,method:f,signal:c});for(let e of r.onRequest)if(e){let t=await e(p);typeof t==`object`&&t&&Object.assign(p,t)}(`pipeTo`in p&&typeof p.pipeTo==`function`||typeof(t==null||(n=t.body)==null?void 0:n.pipe)==`function`)&&(`duplex`in p||(p.duplex=`half`));let{clearTimeout:m}=Oc(a,s),h=await o(p.url,p);m();let g={response:h,request:p};for(let e of r.onResponse)if(e){var _;let n=await e(Ic(Ic({},g),{},{response:t!=null&&(_=t.hookOptions)!=null&&_.cloneResponse?h.clone():h}));n instanceof Response?h=n:typeof n==`object`&&n&&(h=n.response)}if(h.ok){if(p.method===`HEAD`)return{data:``,error:null};let e=gc(h),n={data:null,response:h,request:p};if(e===`json`||e===`text`){let e=await h.text();n.data=await(p.jsonParser??yc)(e)}else n.data=await h[e]();p?.output&&p.output&&!p.disableValidation&&(n.data=await Ac(p.output,n.data));for(let e of r.onSuccess)if(e){var v;await e(Ic(Ic({},n),{},{response:t!=null&&(v=t.hookOptions)!=null&&v.cloneResponse?h.clone():h}))}return t?.throw?n.data:{data:n.data,error:null}}let y=t?.jsonParser??yc,b=await h.text(),x=_c(b),S=x?await y(b):null,C={response:h,responseText:b,request:p,error:Ic(Ic({},S),{},{status:h.status,statusText:h.statusText})};for(let e of r.onError)if(e){var w;await e(Ic(Ic({},C),{},{response:t!=null&&(w=t.hookOptions)!=null&&w.cloneResponse?h.clone():h}))}if(t?.retry){let n=sc(t.retry),i=t.retryAttempt??0;if(await n.shouldAttemptRetry(i,h)){for(let e of r.onRetry)e&&await e(g);let a=n.getDelay(i);return await new Promise(e=>setTimeout(e,a)),await Lc(e,Ic(Ic({},t),{},{retryAttempt:i+1}))}}if(t?.throw)throw new rc(h.status,h.statusText,x?S:b);return{data:null,error:Ic(Ic({},S),{},{status:h.status,statusText:h.statusText})}},Rc=e=>({id:`apply-schema`,name:`Apply Schema`,version:`1.0.0`,async init(t,n){var r;let i=Ic(Ic({},n),e.query!==void 0&&{query:Ic(Ic({},e.query),n?.query)}),a=((r=e.plugins)==null||(r=r.find(e=>e.schema?.config?t.startsWith(e.schema.config.baseURL||``)||t.startsWith(e.schema.config.prefix||``):!1))==null?void 0:r.schema)||e.schema;if(a){let r=t;a.config?.prefix&&r.startsWith(a.config.prefix)&&(r=r.replace(a.config.prefix,``),a.config.baseURL&&(t=t.replace(a.config.prefix,a.config.baseURL))),a.config?.baseURL&&r.startsWith(a.config.baseURL)&&(r=r.replace(a.config.baseURL,``)),r.startsWith(`/`)&&r.charAt(1)===`@`&&(r=r.substring(1));let o=a.schema[r];if(o){let{method:a,path:s}=lc(r);a&&(t=t.slice(0,t.length-r.length)+s);let c=n?.headers;if(o.headers&&!n?.disableValidation){let e={};if(n?.headers){if(n.headers instanceof Headers)n.headers.forEach((t,n)=>{e[n.toLowerCase()]=t});else if(typeof n.headers==`object`)for(let[t,r]of Object.entries(n.headers))r!=null&&(e[t.toLowerCase()]=r)}let t=await Ac(o.headers,e),r={};for(let[e,n]of Object.entries(t))r[e.toLowerCase()]=n;c=r}let l=o.method??a;if(i=Ic(Ic(Ic(Ic({},i),l!==void 0&&{method:l}),o.output!==void 0&&{output:o.output}),c!==void 0&&{headers:c}),!n?.disableValidation){if(o.query&&(i.query=await Ac(o.query,n?.query),i.query!==null&&typeof i.query==`object`)){let t=Ic({},e.query);for(let e of Object.keys(t))n?.query&&Object.prototype.hasOwnProperty.call(n.query,e)&&(t[e]=n.query[e]);i.query=Ic(Ic({},t),i.query)}i=Ic(Ic({},i),{},{body:o.input?await Ac(o.input,n?.body):n?.body,params:o.params?await Ac(o.params,n?.params):n?.params})}return{url:t,options:i}}}return Ic({url:t},(n!==void 0||e.query!==void 0)&&{options:i})}}),zc=e=>{async function t(t,n){let r=Ic(Ic(Ic({},e),n),{},{headers:Sc(e?.headers,n?.headers),plugins:[...e?.plugins||[],Rc(e||{}),...n?.plugins||[]]});if(e?.catchAllError)try{return await Lc(t,r)}catch(e){return{data:null,error:{status:500,statusText:`Fetch Error`,message:`Fetch related error. Captured by catchAllError option. See error property for more details.`,error:e}}}return await Lc(t,r)}return t},Bc=e=>{if(typeof process>`u`)return;let t=e??`/api/auth`;if({}.NEXT_PUBLIC_AUTH_URL)return{}.NEXT_PUBLIC_AUTH_URL;if(typeof window>`u`){if({}.NEXTAUTH_URL)try{return{}.NEXTAUTH_URL}catch{}if({}.VERCEL_URL)try{let e={}.VERCEL_URL.startsWith(`http`)?``:`https://`;return`${new URL(`${e}${{}.VERCEL_URL}`).origin}${t}`}catch{}}},Vc=e=>e===`/sign-out`||e===`/update-user`||e===`/update-session`||e===`/sign-up/email`||e===`/sign-in/email`||e===`/delete-user`||e===`/verify-email`||e===`/revoke-sessions`||e===`/revoke-session`||e===`/revoke-other-sessions`||e===`/change-email`||e===`/change-password`,Hc=(e,t)=>{let n=`credentials`in Request.prototype,r=Jo(e?.baseURL,e?.basePath,void 0,t)??Bc(e?.basePath)??`/api/auth`,i=e?.plugins?.flatMap(e=>e.fetchPlugins).filter(e=>e!==void 0)||[],a={id:`lifecycle-hooks`,name:`lifecycle-hooks`,hooks:{onSuccess:e?.fetchOptions?.onSuccess,onError:e?.fetchOptions?.onError,onRequest:e?.fetchOptions?.onRequest,onResponse:e?.fetchOptions?.onResponse}},{onSuccess:o,onError:s,onRequest:c,onResponse:l,...u}=e?.fetchOptions||{},d=zc({baseURL:r,...n?{credentials:`include`}:{},method:`GET`,jsonParser(e){return e?rs(e,{strict:!1}):null},customFetchImpl:fetch,...u,plugins:[a,...u.plugins||[],...e?.disableDefaultFetchPlugins?[]:[os],...i]}),{$sessionSignal:f,session:p,broadcastSessionUpdate:m}=Qs(d,e),h=!1,g=e=>{h||e===null||(h=!0,Js(p,e))},_=e?.plugins||[],v={},y={$sessionSignal:f,session:p},b={"/sign-out":`POST`,"/revoke-sessions":`POST`,"/revoke-other-sessions":`POST`,"/delete-user":`POST`},x=[{signal:`$sessionSignal`,matcher:Vc,callback(e){e===`/sign-out`?m(`signout`):(e===`/update-user`||e===`/update-session`)&&m(`updateUser`)}}];for(let e of _)e.getAtoms&&Object.assign(y,e.getAtoms?.(d)),e.pathMethods&&Object.assign(b,e.pathMethods),e.atomListeners&&x.push(...e.atomListeners);let S={notify:e=>{y[e].set(!y[e].get())},listen:(e,t)=>{y[e].subscribe(t)},atoms:y};for(let t of _)t.getActions&&(v=nc(t.getActions?.(d,S,e)??{},v));return{get baseURL(){return r},pluginsActions:v,pluginsAtoms:y,pluginPathMethods:b,atomListeners:x,hydrateSession:g,$sessionSignal:f,$fetch:d,$store:S}};function Uc(e){return typeof e==`object`&&!!e&&`get`in e&&typeof e.get==`function`&&`lc`in e&&typeof e.lc==`number`}function Wc(e){return e.charAt(0).toUpperCase()+e.slice(1)}var Gc=/[\p{Ll}\d]+|\p{Lu}+(?!\p{Ll})|\p{Lu}[\p{Ll}\d]+|\p{Lo}+/gu,Kc=/['\u2019]/g;function qc(e){return e.replace(Kc,``).match(Gc)??[]}function Jc(e){return qc(e).map(e=>e.toLowerCase()).join(`-`)}function Yc(e,t,n){let r=t[e],{fetchOptions:i,query:a,...o}=n||{};return r||(i?.method?i.method:o&&Object.keys(o).length>0?`POST`:`GET`)}function Xc(e,t,n,r,i){function a(o=[]){return new Proxy(function(){},{get(t,n){if(typeof n!=`string`||n===`then`||n===`catch`||n===`finally`)return;let r=[...o,n],i=e;for(let e of r)if(i&&typeof i==`object`&&e in i)i=i[e];else{i=void 0;break}return typeof i==`function`||Uc(i)?i:a(r)},apply:async(e,a,s)=>{let c=`/`+o.map(Jc).join(`/`),l=s[0]||{},u=s[1]||{},{query:d,fetchOptions:f,...p}=l,m={...u,...f},h=Yc(c,n,l);return await t(c,{...m,body:h===`GET`?void 0:{...p,...m?.body||{}},query:d||m?.query,method:h,async onSuccess(e){if(await m?.onSuccess?.(e),!i||m.disableSignal)return;let t=i.filter(e=>e.matcher(c));if(!t.length)return;let n=new Set;for(let e of t){let t=r[e.signal];if(!t)return;if(n.has(e.signal))continue;n.add(e.signal);let i=t.get();setTimeout(()=>{t.set(!i)},10),e.callback?.(c)}}})}})}return a()}function Zc(e,t={}){let n=(0,U.useRef)(e.get()),{keys:r,deps:i=[e,r]}=t,a=(0,U.useCallback)(t=>{let i=e=>{n.current!==e&&(n.current=e,t())};return i(e.value),r?.length?Es(e,r,i):e.listen(i)},i),o=()=>n.current;return(0,U.useSyncExternalStore)(a,o,js(e)?()=>e.init:o)}function Qc(e){return`use${Wc(e)}`}function $c(e){let{pluginPathMethods:t,pluginsActions:n,pluginsAtoms:r,hydrateSession:i,$fetch:a,$store:o,atomListeners:s}=Hc(e),c={};for(let[e,t]of Object.entries(r))c[Qc(e)]=()=>Zc(t);return Xc({...n,...c,hydrateSession:i,$fetch:a,$store:o},a,t,r,s)}var el=`1.7.10`,tl=Io({FAILED_TO_CREATE_USER:`Failed to create user`,USER_ALREADY_EXISTS:`User already exists.`,USER_ALREADY_EXISTS_USE_ANOTHER_EMAIL:`User already exists. Use another email.`,YOU_CANNOT_BAN_YOURSELF:`You cannot ban yourself`,YOU_ARE_NOT_ALLOWED_TO_CHANGE_USERS_ROLE:`You are not allowed to change users role`,YOU_ARE_NOT_ALLOWED_TO_CREATE_USERS:`You are not allowed to create users`,YOU_ARE_NOT_ALLOWED_TO_LIST_USERS:`You are not allowed to list users`,YOU_ARE_NOT_ALLOWED_TO_LIST_USERS_SESSIONS:`You are not allowed to list users sessions`,YOU_ARE_NOT_ALLOWED_TO_BAN_USERS:`You are not allowed to ban users`,YOU_ARE_NOT_ALLOWED_TO_IMPERSONATE_USERS:`You are not allowed to impersonate users`,YOU_ARE_NOT_ALLOWED_TO_REVOKE_USERS_SESSIONS:`You are not allowed to revoke users sessions`,YOU_ARE_NOT_ALLOWED_TO_DELETE_USERS:`You are not allowed to delete users`,YOU_ARE_NOT_ALLOWED_TO_SET_USERS_PASSWORD:`You are not allowed to set users password`,BANNED_USER:`You have been banned from this application`,YOU_ARE_NOT_ALLOWED_TO_GET_USER:`You are not allowed to get user`,NO_DATA_TO_UPDATE:`No data to update`,YOU_ARE_NOT_ALLOWED_TO_UPDATE_USERS:`You are not allowed to update users`,YOU_CANNOT_REMOVE_YOURSELF:`You cannot remove yourself`,YOU_ARE_NOT_ALLOWED_TO_SET_NON_EXISTENT_VALUE:`You are not allowed to set a non-existent role value`,YOU_CANNOT_IMPERSONATE_ADMINS:`You cannot impersonate admins`,INVALID_ROLE_TYPE:`Invalid role type`,YOU_ARE_NOT_ALLOWED_TO_SET_USERS_EMAIL:`You are not allowed to update users email`,PASSWORD_CANNOT_BE_UPDATED_VIA_UPDATE_USER:`Password cannot be updated through update-user. Use the set-user-password endpoint instead`});function nl(e){return{success:!1,error:`You are not allowed to access resource: ${e}`}}function rl(e){return{success:!1,error:`unauthorized to access resource "${e}"`}}function il(e){return e===`OR`?`OR`:`AND`}function al(e){return Array.isArray(e)}function ol(e){if(al(e))return{actions:e,connector:`AND`};if(!e||typeof e!=`object`)throw new Vo(`Invalid access control request`);let{actions:t,connector:n}=e;return al(t)?{actions:t,connector:il(n)}:{actions:[],connector:il(n)}}function sl(e,t){return typeof t==`string`&&e.includes(t)}function cl(e,{actions:t,connector:n}){return t.length===0?!1:n===`OR`?t.some(t=>sl(e,t)):t.every(t=>sl(e,t))}function ll(e){return{authorize(t,n=`AND`){let r=!1;for(let[i,a]of Object.entries(t)){let t=e[i];if(!t){if(n===`AND`)return nl(i);continue}let o=cl(t,ol(a));if(o&&(r=!0),o&&n===`OR`)return{success:!0};if(!o&&n===`AND`)return rl(i)}return r?{success:!0}:{success:!1,error:`Not authorized`}},statements:e}}function ul(e){return{newRole(e){return ll(e)},statements:e}}var dl=ul({user:[`create`,`list`,`set-role`,`ban`,`impersonate`,`impersonate-admins`,`delete`,`set-password`,`set-email`,`get`,`update`],session:[`list`,`revoke`,`delete`]}),fl=dl.newRole({user:[`create`,`list`,`set-role`,`ban`,`impersonate`,`delete`,`set-password`,`set-email`,`get`,`update`],session:[`list`,`revoke`,`delete`]}),pl=dl.newRole({user:[],session:[]}),ml={admin:fl,user:pl},hl=e=>{if(e.userId&&e.options?.adminUserIds?.includes(e.userId))return!0;if(!e.permissions)return!1;let t=(e.role||e.options?.defaultRole||`user`).split(`,`),n=e.options?.roles||ml;for(let r of t)if(n[r]?.authorize(e.permissions)?.success)return!0;return!1},gl=e=>{let t={admin:fl,user:pl,...e?.roles};return{id:`admin-client`,version:el,$InferServerPlugin:{},getActions:()=>({admin:{checkRolePermission:n=>hl({role:n.role,options:{ac:e?.ac,roles:t},permissions:n.permissions})}}),pathMethods:{"/admin/list-users":`GET`,"/admin/impersonate-user":`POST`,"/admin/stop-impersonating":`POST`},atomListeners:[{matcher:e=>e===`/admin/impersonate-user`||e===`/admin/stop-impersonating`,signal:`$sessionSignal`}],$ERROR_CODES:tl}},_l=Io({OTP_EXPIRED:`OTP expired`,INVALID_OTP:`Invalid OTP`,TOO_MANY_ATTEMPTS:`Too many attempts`}),vl=()=>({id:`email-otp`,version:el,$InferServerPlugin:{},atomListeners:[{matcher:e=>e===`/email-otp/verify-email`||e===`/sign-in/email-otp`||e===`/email-otp/request-email-change`,signal:`$sessionSignal`}],$ERROR_CODES:_l}),yl=`ba_param`;function bl(e){let t=e.getAll(yl);if(t.length)return new Set(t)}function xl(e){let t=new URLSearchParams(e);if(!t.has(`sig`))return;let n=bl(t);if(!n)return;let r=new URLSearchParams;for(let[e,i]of t.entries())(e===`sig`||e===yl||n.has(e))&&r.append(e,i);return r.toString()}var Sl=`1.7.10`,Cl=/^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(?:\.\d+)?Z$/;function wl(e){if(typeof e==`string`&&Cl.test(e)){let t=new Date(e);if(!isNaN(t.getTime()))return t}return e}function Tl(e){if(e==null)return e;if(typeof e==`string`)return wl(e);if(e instanceof Date)return e;if(Array.isArray(e))return e.map(Tl);if(typeof e==`object`){let t={};for(let n of Object.keys(e))t[n]=Tl(e[n]);return t}return e}function El(e){try{return typeof e==`string`?JSON.parse(e,(e,t)=>wl(t)):e==null?null:Tl(e)}catch(e){return Fo.error(`Error parsing JSON`,{error:e}),null}}var Dl=()=>({id:`oauth-provider-client`,version:Sl,fetchPlugins:[{id:`oauth-provider-signin`,name:`oauth-provider-signin`,description:`Adds the current page query to oauth requests`,hooks:{async onRequest(e){let t=e.headers,n=typeof e.body==`string`?t.get(`content-type`)===`application/x-www-form-urlencoded`?Object.fromEntries(new URLSearchParams(e.body)):El(e.body??`{}`):e.body;n?.oauth_query||typeof window<`u`&&window?.location?.search&&e.method!==`GET`&&e.method!==`DELETE`&&(e.body=JSON.stringify({...n,oauth_query:xl(window.location.search)}))}}}],$InferServerPlugin:{}}),Ol=class extends Error{constructor(e,t){super(e),this.name=`ParseError`,this.type=t.type,this.field=t.field,this.value=t.value,this.line=t.line}},kl=10,Al=13,jl=32,Ml=6;function Nl(e){if(typeof e==`function`)throw TypeError("`config` must be an object, got a function instead. Did you mean `createParser({onEvent: fn})`?");let{maxBufferSize:t,onComment:n,onError:r,onEvent:i,onId:a,onRetry:o}=e,s=[],c=0,l=``,u,d=``,f=0,p,m=!1,h=!1,g=!1;function _(e){if(m)throw Error("Cannot feed parser: it was terminated after exceeding the configured max buffer size. Call `reset()` to resume parsing.");if(l!==void 0){if(e=l+e,e===``||e===`ï`||e===`ï»`){l=e;return}l=void 0,e=e.replace(/^(?:\uFEFF|\xEF\xBB\xBF)/,``)}if((h||g)&&(e=v(e),!e))return;if(!s.length){let t=S(e);t!==``&&y(t),x();return}if(e.indexOf(`
|
|
5
5
|
`)===-1&&e.indexOf(`\r`)===-1){if(c<Ml&&!b(s.join(``)+e.slice(0,Ml-c))){s.length=0,c=0,h=!0;return}s.push(e),c+=e.length,x();return}s.push(e);let t=s.join(``);s.length=0,c=0,y(S(t)),x()}function v(e){if(e.length===0)return e;if(g)return g=!1,e.charCodeAt(0)===kl?e.slice(1):e;let t=e.indexOf(`\r`),n=e.indexOf(`
|
|
@@ -42,7 +42,7 @@ import{i as e,n as t,t as n}from"./rolldown-runtime-COiEfhsA.js";import{Dn as r,
|
|
|
42
42
|
`))+1))}let o=`#`.repeat(i),s=n.enter(`headingAtx`),c=n.enter(`phrasing`);a.move(o+` `);let l=n.containerPhrasing(e,{before:`# `,after:`
|
|
43
43
|
`,...a.current()}),u=l.charCodeAt(0);return(u===9||u===32)&&(l=bv(u)+l.slice(1)),l=l?o+` `+l:o,n.options.closeAtx&&(l+=` `+o),c(),s(),l}Cv.peek=wv;function Cv(e){return e.value||``}function wv(){return`<`}Tv.peek=Ev;function Tv(e,t,n,r){let i=mv(n),a=i===`"`?`Quote`:`Apostrophe`,o=n.enter(`image`),s=n.enter(`label`),c=n.createTracker(r),l=c.move(`![`);return l+=c.move(n.safe(e.alt,{before:l,after:`]`,...c.current()})),l+=c.move(`](`),s(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(s=n.enter(`destinationLiteral`),l+=c.move(`<`),l+=c.move(n.safe(e.url,{before:l,after:`>`,...c.current()})),l+=c.move(`>`)):(s=n.enter(`destinationRaw`),l+=c.move(n.safe(e.url,{before:l,after:e.title?` `:`)`,...c.current()}))),s(),e.title&&(s=n.enter(`title${a}`),l+=c.move(` `+i),l+=c.move(n.safe(e.title,{before:l,after:i,...c.current()})),l+=c.move(i),s()),l+=c.move(`)`),o(),l}function Ev(){return`!`}Dv.peek=Ov;function Dv(e,t,n,r){let i=e.referenceType,a=n.enter(`imageReference`),o=n.enter(`label`),s=n.createTracker(r),c=s.move(`![`),l=n.safe(e.alt,{before:c,after:`]`,...s.current()});c+=s.move(l+`][`),o();let u=n.stack;n.stack=u.filter(function(e){return e!==`phrasing`}),o=n.enter(`reference`);let d=n.safe(n.associationId(e),{before:c,after:`]`,...s.current()});return o(),n.stack=u,a(),i===`full`||!l||l!==d?c+=s.move(d+`]`):i===`shortcut`?c=c.slice(0,-1):c+=s.move(`]`),c}function Ov(){return`!`}kv.peek=Av;function kv(e,t,n){let r=e.value||``,i="`",a=-1;for(;RegExp("(^|[^`])"+i+"([^`]|$)").test(r);)i+="`";for(/[^\n\r ]/.test(r)&&(/^[\n\r ]/.test(r)&&/[\n\r ]$/.test(r)||/^`|`$/.test(r))&&(r=` `+r+` `);++a<n.unsafe.length;){let e=n.unsafe[a],t=n.compilePattern(e);if(!e.atBreak)continue;let i;for(;i=t.exec(r);){let e=i.index;r.charCodeAt(e)===10&&r.charCodeAt(e-1)===13&&e--,r=r.slice(0,e)+` `+r.slice(i.index+1)}}return i+r+i}function Av(){return"`"}function jv(e,t){let n=$d(e);return!(t.options.resourceLink||!e.url||e.title||!e.children||e.children.length!==1||e.children[0].type!==`text`||n!==e.url&&`mailto:`+n!==e.url||!/^[a-z][+\-.a-z]+:/i.test(e.url)||/[\0- <>\u007F]/.test(e.url))}Mv.peek=Nv;function Mv(e,t,n,r){let i=mv(n),a=i===`"`?`Quote`:`Apostrophe`,o=n.createTracker(r);if(jv(e,n)){let t=n.stack;n.stack=t.filter(function(e){return e!==`phrasing`});let r=n.enter(`autolink`),i=o.move(`<`);return i+=o.move(n.containerPhrasing(e,{before:i,after:`>`,...o.current()})),i+=o.move(`>`),r(),n.stack=t,i}let s=n.enter(`link`),c=n.enter(`label`),l=o.move(`[`);return l+=o.move(n.containerPhrasing(e,{before:l,after:`](`,...o.current()})),l+=o.move(`](`),c(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(c=n.enter(`destinationLiteral`),l+=o.move(`<`),l+=o.move(n.safe(e.url,{before:l,after:`>`,...o.current()})),l+=o.move(`>`)):(c=n.enter(`destinationRaw`),l+=o.move(n.safe(e.url,{before:l,after:e.title?` `:`)`,...o.current()}))),c(),e.title&&(c=n.enter(`title${a}`),l+=o.move(` `+i),l+=o.move(n.safe(e.title,{before:l,after:i,...o.current()})),l+=o.move(i),c()),l+=o.move(`)`),s(),l}function Nv(e,t,n){return jv(e,n)?`<`:`[`}Pv.peek=Fv;function Pv(e,t,n,r){let i=e.referenceType,a=n.enter(`linkReference`),o=n.enter(`label`),s=n.createTracker(r),c=s.move(`[`),l=n.containerPhrasing(e,{before:c,after:`]`,...s.current()});c+=s.move(l+`][`),o();let u=n.stack;n.stack=u.filter(function(e){return e!==`phrasing`}),o=n.enter(`reference`);let d=n.safe(n.associationId(e),{before:c,after:`]`,...s.current()});return o(),n.stack=u,a(),i===`full`||!l||l!==d?c+=s.move(d+`]`):i===`shortcut`?c=c.slice(0,-1):c+=s.move(`]`),c}function Fv(){return`[`}function Iv(e){let t=e.options.bullet||`*`;if(t!==`*`&&t!==`+`&&t!==`-`)throw Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}function Lv(e){let t=Iv(e),n=e.options.bulletOther;if(!n)return t===`*`?`-`:`*`;if(n!==`*`&&n!==`+`&&n!==`-`)throw Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(n===t)throw Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+n+"`) to be different");return n}function Rv(e){let t=e.options.bulletOrdered||`.`;if(t!==`.`&&t!==`)`)throw Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}function zv(e){let t=e.options.rule||`*`;if(t!==`*`&&t!==`-`&&t!==`_`)throw Error("Cannot serialize rules with `"+t+"` for `options.rule`, expected `*`, `-`, or `_`");return t}function Bv(e,t,n,r){let i=n.enter(`list`),a=n.bulletCurrent,o=e.ordered?Rv(n):Iv(n),s=e.ordered?o===`.`?`)`:`.`:Lv(n),c=t&&n.bulletLastUsed?o===n.bulletLastUsed:!1;if(!e.ordered){let t=e.children?e.children[0]:void 0;if((o===`*`||o===`-`)&&t&&(!t.children||!t.children[0])&&n.stack[n.stack.length-1]===`list`&&n.stack[n.stack.length-2]===`listItem`&&n.stack[n.stack.length-3]===`list`&&n.stack[n.stack.length-4]===`listItem`&&n.indexStack[n.indexStack.length-1]===0&&n.indexStack[n.indexStack.length-2]===0&&n.indexStack[n.indexStack.length-3]===0&&(c=!0),zv(n)===o&&t){let t=-1;for(;++t<e.children.length;){let n=e.children[t];if(n&&n.type===`listItem`&&n.children&&n.children[0]&&n.children[0].type===`thematicBreak`){c=!0;break}}}}c&&(o=s),n.bulletCurrent=o;let l=n.containerFlow(e,r);return n.bulletLastUsed=o,n.bulletCurrent=a,i(),l}function Vv(e){let t=e.options.listItemIndent||`one`;if(t!==`tab`&&t!==`one`&&t!==`mixed`)throw Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t}function Hv(e,t,n,r){let i=Vv(n),a=n.bulletCurrent||Iv(n);t&&t.type===`list`&&t.ordered&&(a=(typeof t.start==`number`&&t.start>-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+a);let o=a.length+1;(i===`tab`||i===`mixed`&&(t&&t.type===`list`&&t.spread||e.spread))&&(o=Math.ceil(o/4)*4);let s=n.createTracker(r);s.move(a+` `.repeat(o-a.length)),s.shift(o);let c=n.enter(`listItem`),l=n.indentLines(n.containerFlow(e,s.current()),u);return c(),l;function u(e,t,n){return t?(n?``:` `.repeat(o))+e:(n?a:a+` `.repeat(o-a.length))+e}}function Uv(e,t,n,r){let i=n.enter(`paragraph`),a=n.enter(`phrasing`),o=n.containerPhrasing(e,r);return a(),i(),o}function Wv(e,t,n,r){if(!e.children.some(function(e){return rv(e)}))return n.containerFlow(e,r);let i=n.enter(`phrasing`),a=n.containerPhrasing(e,r);return i(),a}function Gv(e){let t=e.options.strong||`*`;if(t!==`*`&&t!==`_`)throw Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}Kv.attention=qv,Kv.peek=Jv;function Kv(e,t,n,r){let i=n.enter(`phrasing`),a=n.containerPhrasing({type:`root`,children:[e]},r);return i(),a}function qv(e,t){return{construct:`strong`,markers:Gv(t)===`*`?[`*`,`_`]:[`_`,`*`],sizes:[2]}}function Jv(e,t,n){return n.options.strong||`*`}function Yv(e,t,n,r){let i=t?t.children:[],a=i.indexOf(e);return n.safe(e.value,{...r,afterNode:i[a+1],beforeNode:i[a-1]})}function Xv(e){let t=e.options.ruleRepetition||3;if(t<3)throw Error("Cannot serialize rules with repetition `"+t+"` for `options.ruleRepetition`, expected `3` or more");return t}function Zv(e,t,n){let r=(zv(n)+(n.options.ruleSpaces?` `:``)).repeat(Xv(n));return n.options.ruleSpaces?r.slice(0,-1):r}var Qv={blockquote:iv,break:cv,code:fv,definition:hv,emphasis:_v,hardBreak:cv,heading:Sv,html:Cv,image:Tv,imageReference:Dv,inlineCode:kv,link:Mv,linkReference:Pv,list:Bv,listItem:Hv,paragraph:Uv,root:Wv,strong:Kv,text:Yv,thematicBreak:Zv};function $v(){return{enter:{table:ey,tableData:iy,tableHeader:iy,tableRow:ny},exit:{codeText:ay,table:ty,tableData:ry,tableHeader:ry,tableRow:ry}}}function ey(e){let t=e._align;this.enter({type:`table`,align:t.map(function(e){return e===`none`?null:e}),children:[]},e),this.data.inTable=!0}function ty(e){this.exit(e),this.data.inTable=void 0}function ny(e){this.enter({type:`tableRow`,children:[]},e)}function ry(e){this.exit(e)}function iy(e){this.enter({type:`tableCell`,children:[]},e)}function ay(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,oy));let n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function oy(e,t){return t===`|`?t:e}function sy(e){let t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,i=t.stringLength,a=n?` `:`|`;return{unsafe:[{character:`\r`,inConstruct:`tableCell`},{character:`
|
|
44
44
|
`,inConstruct:`tableCell`},{atBreak:!0,character:`|`,after:`[ :-]`},{character:`|`,inConstruct:`tableCell`},{atBreak:!0,character:`:`,after:`-`},{atBreak:!0,character:`-`,after:`[:|-]`}],handlers:{inlineCode:f,table:o,tableCell:c,tableRow:s}};function o(e,t,n,r){return l(u(e,n,r),e.align)}function s(e,t,n,r){let i=l([d(e,n,r)]);return i.slice(0,i.indexOf(`
|
|
45
|
-
`))}function c(e,t,n,r){let i=n.enter(`tableCell`),o=n.enter(`phrasing`),s=n.containerPhrasing(e,{...r,before:a,after:a});return o(),i(),s}function l(e,t){return ev(e,{align:t,alignDelimiters:r,padding:n,stringLength:i})}function u(e,t,n){let r=e.children,i=-1,a=[],o=t.enter(`table`);for(;++i<r.length;)a[i]=d(r[i],t,n);return o(),a}function d(e,t,n){let r=e.children,i=-1,a=[],o=t.enter(`tableRow`);for(;++i<r.length;)a[i]=c(r[i],e,t,n);return o(),a}function f(e,t,n){let r=Qv.inlineCode(e,t,n);return n.stack.includes(`tableCell`)&&(r=r.replace(/\|/g,`\\$&`)),r}}function cy(){return{exit:{taskListCheckValueChecked:uy,taskListCheckValueUnchecked:uy,paragraph:dy}}}function ly(){return{unsafe:[{atBreak:!0,character:`-`,after:`[:|-]`}],handlers:{listItem:fy}}}function uy(e){let t=this.stack[this.stack.length-2];t.type,t.checked=e.type===`taskListCheckValueChecked`}function dy(e){let t=this.stack[this.stack.length-2];if(t&&t.type===`listItem`&&typeof t.checked==`boolean`){let e=this.stack[this.stack.length-1];e.type;let n=e.children[0];if(n&&n.type===`text`){let r=t.children,i=-1,a;for(;++i<r.length;){let e=r[i];if(e.type===`paragraph`){a=e;break}}a===e&&(n.value=n.value.slice(1),n.value.length===0?e.children.shift():e.position&&n.position&&typeof n.position.start.offset==`number`&&(n.position.start.column++,n.position.start.offset++,e.position.start=Object.assign({},n.position.start)))}}this.exit(e)}function fy(e,t,n,r){let i=e.children[0],a=typeof e.checked==`boolean`&&i&&i.type===`paragraph`,o=`[`+(e.checked?`x`:` `)+`] `,s=n.createTracker(r);a&&s.move(o);let c=Qv.listItem(e,t,n,{...r,...s.current()});return a&&(c=c.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,l)),c;function l(e){return e+o}}function py(){return[__(),V_(),K_(),$v(),cy()]}function my(e){return{extensions:[v_(),H_(e),q_(),sy(e),ly()]}}var hy={tokenize:ky,partial:!0},gy={tokenize:Ay,partial:!0},_y={tokenize:jy,partial:!0},vy={tokenize:My,partial:!0},yy={tokenize:Ny,partial:!0},by={name:`wwwAutolink`,tokenize:Dy,previous:Py},xy={name:`protocolAutolink`,tokenize:Oy,previous:Fy},Sy={name:`emailAutolink`,tokenize:Ey,previous:Iy},Cy={};function wy(){return{text:Cy}}for(var Ty=48;Ty<123;)Cy[Ty]=Sy,Ty++,Ty===58?Ty=65:Ty===91&&(Ty=97);Cy[43]=Sy,Cy[45]=Sy,Cy[46]=Sy,Cy[95]=Sy,Cy[72]=[Sy,xy],Cy[104]=[Sy,xy],Cy[87]=[Sy,by],Cy[119]=[Sy,by];function Ey(e,t,n){let r=this,i,a;return o;function o(t){return!Ly(t)||!Iy.call(r,r.previous)||Ry(r.events)?n(t):(e.enter(`literalAutolink`),e.enter(`literalAutolinkEmail`),s(t))}function s(t){return Ly(t)?(e.consume(t),s):t===64?(e.consume(t),c):n(t)}function c(t){return t===46?e.check(yy,u,l)(t):t===45||t===95||hf(t)?(a=!0,e.consume(t),c):u(t)}function l(t){return e.consume(t),i=!0,c}function u(o){return a&&i&&mf(r.previous)?(e.exit(`literalAutolinkEmail`),e.exit(`literalAutolink`),t(o)):n(o)}}function Dy(e,t,n){let r=this;return i;function i(t){return t!==87&&t!==119||!Py.call(r,r.previous)||Ry(r.events)?n(t):(e.enter(`literalAutolink`),e.enter(`literalAutolinkWww`),e.check(hy,e.attempt(gy,e.attempt(_y,a),n),n)(t))}function a(n){return e.exit(`literalAutolinkWww`),e.exit(`literalAutolink`),t(n)}}function Oy(e,t,n){let r=this,i=``,a=!1;return o;function o(t){return(t===72||t===104)&&Fy.call(r,r.previous)&&!Ry(r.events)?(e.enter(`literalAutolink`),e.enter(`literalAutolinkHttp`),i+=String.fromCodePoint(t),e.consume(t),s):n(t)}function s(t){if(mf(t)&&i.length<5)return i+=String.fromCodePoint(t),e.consume(t),s;if(t===58){let n=i.toLowerCase();if(n===`http`||n===`https`)return e.consume(t),c}return n(t)}function c(t){return t===47?(e.consume(t),a?l:(a=!0,c)):n(t)}function l(t){return t===null||_f(t)||xf(t)||wf(t)||Cf(t)?n(t):e.attempt(gy,e.attempt(_y,u),n)(t)}function u(n){return e.exit(`literalAutolinkHttp`),e.exit(`literalAutolink`),t(n)}}function ky(e,t,n){let r=0;return i;function i(t){return(t===87||t===119)&&r<3?(r++,e.consume(t),i):t===46&&r===3?(e.consume(t),a):n(t)}function a(e){return e===null?n(e):t(e)}}function Ay(e,t,n){let r,i,a;return o;function o(t){return t===46||t===95?e.check(vy,c,s)(t):t===null||xf(t)||wf(t)||t!==45&&Cf(t)?c(t):(a=!0,e.consume(t),o)}function s(t){return t===95?r=!0:(i=r,r=void 0),e.consume(t),o}function c(e){return i||r||!a?n(e):t(e)}}function jy(e,t){let n=0,r=0;return i;function i(o){return o===40?(n++,e.consume(o),i):o===41&&r<n?a(o):o===33||o===34||o===38||o===39||o===41||o===42||o===44||o===46||o===58||o===59||o===60||o===63||o===93||o===95||o===126?e.check(vy,t,a)(o):o===null||xf(o)||wf(o)?t(o):(e.consume(o),i)}function a(t){return t===41&&r++,e.consume(t),i}}function My(e,t,n){return r;function r(o){return o===33||o===34||o===39||o===41||o===42||o===44||o===46||o===58||o===59||o===63||o===95||o===126?(e.consume(o),r):o===38?(e.consume(o),a):o===93?(e.consume(o),i):o===60||o===null||xf(o)||wf(o)?t(o):n(o)}function i(e){return e===null||e===40||e===91||xf(e)||wf(e)?t(e):r(e)}function a(e){return mf(e)?o(e):n(e)}function o(t){return t===59?(e.consume(t),r):mf(t)?(e.consume(t),o):n(t)}}function Ny(e,t,n){return r;function r(t){return e.consume(t),i}function i(e){return hf(e)?n(e):t(e)}}function Py(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||xf(e)}function Fy(e){return!mf(e)}function Iy(e){return!(e===47||Ly(e))}function Ly(e){return e===43||e===45||e===46||e===95||hf(e)}function Ry(e){let t=e.length,n=!1;for(;t--;){let r=e[t][1];if((r.type===`labelLink`||r.type===`labelImage`)&&!r._balanced){n=!0;break}if(r._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}var zy={tokenize:qy,partial:!0};function By(){return{document:{91:{name:`gfmFootnoteDefinition`,tokenize:Wy,continuation:{tokenize:Gy},exit:Ky}},text:{91:{name:`gfmFootnoteCall`,tokenize:Uy},93:{name:`gfmPotentialFootnoteCall`,add:`after`,tokenize:Vy,resolveTo:Hy}}}}function Vy(e,t,n){let r=this,i=r.events.length,a=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),o;for(;i--;){let e=r.events[i][1];if(e.type===`labelImage`){o=e;break}if(e.type===`gfmFootnoteCall`||e.type===`labelLink`||e.type===`label`||e.type===`image`||e.type===`link`)break}return s;function s(i){if(!o||!o._balanced)return n(i);let s=pf(r.sliceSerialize({start:o.end,end:r.now()}));return s.codePointAt(0)!==94||!a.includes(s.slice(1))?n(i):(e.enter(`gfmFootnoteCallLabelMarker`),e.consume(i),e.exit(`gfmFootnoteCallLabelMarker`),t(i))}}function Hy(e,t){let n=e.length;for(;n--;)if(e[n][1].type===`labelImage`&&e[n][0]===`enter`){e[n][1];break}e[n+1][1].type=`data`,e[n+3][1].type=`gfmFootnoteCallLabelMarker`;let r={type:`gfmFootnoteCall`,start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},i={type:`gfmFootnoteCallMarker`,start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};i.end.column++,i.end.offset++,i.end._bufferIndex++;let a={type:`gfmFootnoteCallString`,start:Object.assign({},i.end),end:Object.assign({},e[e.length-1][1].start)},o={type:`chunkString`,contentType:`string`,start:Object.assign({},a.start),end:Object.assign({},a.end)},s=[e[n+1],e[n+2],[`enter`,r,t],e[n+3],e[n+4],[`enter`,i,t],[`exit`,i,t],[`enter`,a,t],[`enter`,o,t],[`exit`,o,t],[`exit`,a,t],e[e.length-2],e[e.length-1],[`exit`,r,t]];return e.splice(n,e.length-n+1,...s),e}function Uy(e,t,n){let r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),a=0,o;return s;function s(t){return e.enter(`gfmFootnoteCall`),e.enter(`gfmFootnoteCallLabelMarker`),e.consume(t),e.exit(`gfmFootnoteCallLabelMarker`),c}function c(t){return t===94?(e.enter(`gfmFootnoteCallMarker`),e.consume(t),e.exit(`gfmFootnoteCallMarker`),e.enter(`gfmFootnoteCallString`),e.enter(`chunkString`).contentType=`string`,l):n(t)}function l(s){if(a>999||s===93&&!o||s===null||s===91||xf(s))return n(s);if(s===93){e.exit(`chunkString`);let a=e.exit(`gfmFootnoteCallString`);return i.includes(pf(r.sliceSerialize(a)))?(e.enter(`gfmFootnoteCallLabelMarker`),e.consume(s),e.exit(`gfmFootnoteCallLabelMarker`),e.exit(`gfmFootnoteCall`),t):n(s)}return xf(s)||(o=!0),a++,e.consume(s),s===92?u:l}function u(t){return t===91||t===92||t===93?(e.consume(t),a++,l):l(t)}}function Wy(e,t,n){let r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),a,o=0,s;return c;function c(t){return e.enter(`gfmFootnoteDefinition`)._container=!0,e.enter(`gfmFootnoteDefinitionLabel`),e.enter(`gfmFootnoteDefinitionLabelMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionLabelMarker`),l}function l(t){return t===94?(e.enter(`gfmFootnoteDefinitionMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionMarker`),e.enter(`gfmFootnoteDefinitionLabelString`),e.enter(`chunkString`).contentType=`string`,u):n(t)}function u(t){if(o>999||t===93&&!s||t===null||t===91||xf(t))return n(t);if(t===93){e.exit(`chunkString`);let n=e.exit(`gfmFootnoteDefinitionLabelString`);return a=pf(r.sliceSerialize(n)),e.enter(`gfmFootnoteDefinitionLabelMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionLabelMarker`),e.exit(`gfmFootnoteDefinitionLabel`),f}return xf(t)||(s=!0),o++,e.consume(t),t===92?d:u}function d(t){return t===91||t===92||t===93?(e.consume(t),o++,u):u(t)}function f(t){return t===58?(e.enter(`definitionMarker`),e.consume(t),e.exit(`definitionMarker`),i.includes(a)||i.push(a),Df(e,p,`gfmFootnoteDefinitionWhitespace`)):n(t)}function p(e){return t(e)}}function Gy(e,t,n){return e.check(Gf,t,e.attempt(zy,t,n))}function Ky(e){e.exit(`gfmFootnoteDefinition`)}function qy(e,t,n){let r=this;return Df(e,i,`gfmFootnoteDefinitionIndent`,5);function i(e){let i=r.events[r.events.length-1];return i&&i[1].type===`gfmFootnoteDefinitionIndent`&&i[2].sliceSerialize(i[1],!0).length===4?t(e):n(e)}}function Jy(e){let t=(e||{}).singleTilde,n={name:`strikethrough`,tokenize:i,resolveAll:r};return t??=!0,{text:{126:n},insideSpan:{null:[n]},attentionMarkers:{null:[126]}};function r(e,t){let n=-1;for(;++n<e.length;)if(e[n][0]===`enter`&&e[n][1].type===`strikethroughSequenceTemporary`&&e[n][1]._close){let r=n;for(;r--;)if(e[r][0]===`exit`&&e[r][1].type===`strikethroughSequenceTemporary`&&e[r][1]._open&&e[n][1].end.offset-e[n][1].start.offset===e[r][1].end.offset-e[r][1].start.offset){e[n][1].type=`strikethroughSequence`,e[r][1].type=`strikethroughSequence`;let i={type:`strikethrough`,start:Object.assign({},e[r][1].start),end:Object.assign({},e[n][1].end)},a={type:`strikethroughText`,start:Object.assign({},e[r][1].end),end:Object.assign({},e[n][1].start)},o=[[`enter`,i,t],[`enter`,e[r][1],t],[`exit`,e[r][1],t],[`enter`,a,t]],s=t.parser.constructs.insideSpan.null;s&&of(o,o.length,0,Rf(s,e.slice(r+1,n),t)),of(o,o.length,0,[[`exit`,a,t],[`enter`,e[n][1],t],[`exit`,e[n][1],t],[`exit`,i,t]]),of(e,r-1,n-r+3,o),n=r+o.length-2;break}}for(n=-1;++n<e.length;)e[n][1].type===`strikethroughSequenceTemporary`&&(e[n][1].type=`data`);return e}function i(e,n,r){let i=this.previous,a=this.events,o=0;return s;function s(t){return i===126&&a[a.length-1][1].type!==`characterEscape`?r(t):(e.enter(`strikethroughSequenceTemporary`),c(t))}function c(a){let s=Lf(i);if(a===126)return o>1?r(a):(e.consume(a),o++,c);if(o<2&&!t)return r(a);let l=e.exit(`strikethroughSequenceTemporary`),u=Lf(a);return l._open=!u||u===2&&!!s,l._close=!s||s===2&&!!u,n(a)}}}var Yy=class{constructor(){this.map=[],this.index=new Map}add(e,t,n){Xy(this,e,t,n)}consume(e){if(this.map.sort(function(e,t){return e[0]-t[0]}),this.map.length===0)return;let t=this.map.length,n=[];for(;t>0;)--t,n.push(e.slice(this.map[t][0]+this.map[t][1]),this.map[t][2]),e.length=this.map[t][0];n.push(e.slice()),e.length=0;let r=n.pop();for(;r;){for(let t of r)e.push(t);r=n.pop()}this.map.length=0,this.index.clear()}};function Xy(e,t,n,r){if(n===0&&r.length===0)return;let i=e.index.get(t);if(i){i[1]+=n,i[2].push(...r);return}let a=[t,n,r];e.map.push(a),e.index.set(t,a)}function Zy(e,t){let n=!1,r=[];for(;t<e.length;){let i=e[t];if(n){if(i[0]===`enter`)i[1].type===`tableContent`&&r.push(e[t+1][1].type===`tableDelimiterMarker`?`left`:`none`);else if(i[1].type===`tableContent`){if(e[t-1][1].type===`tableDelimiterMarker`){let e=r.length-1;r[e]=r[e]===`left`?`center`:`right`}}else if(i[1].type===`tableDelimiterRow`)break}else i[0]===`enter`&&i[1].type===`tableDelimiterRow`&&(n=!0);t+=1}return r}function Qy(){return{flow:{null:{name:`table`,tokenize:$y,resolveAll:eb}}}}function $y(e,t,n){let r=this,i=0,a=0,o;return s;function s(e){let t=r.events.length-1;for(;t>-1;){let{type:e}=r.events[t][1];if(e===`lineEnding`||e===`linePrefix`)t--;else break}let i=t>-1?r.events[t][1].type:null,a=i===`tableHead`||i===`tableRow`?S:c;return a===S&&r.parser.lazy[r.now().line]?n(e):a(e)}function c(t){return e.enter(`tableHead`),e.enter(`tableRow`),l(t)}function l(e){return e===124||(o=!0,a+=1),u(e)}function u(t){return t===null?n(t):Z(t)?a>1?(a=0,r.interrupt=!0,e.exit(`tableRow`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),p):n(t):Sf(t)?Df(e,u,`whitespace`)(t):(a+=1,o&&(o=!1,i+=1),t===124?(e.enter(`tableCellDivider`),e.consume(t),e.exit(`tableCellDivider`),o=!0,u):(e.enter(`data`),d(t)))}function d(t){return t===null||t===124||xf(t)?(e.exit(`data`),u(t)):(e.consume(t),t===92?f:d)}function f(t){return t===92||t===124?(e.consume(t),d):d(t)}function p(t){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(t):(e.enter(`tableDelimiterRow`),o=!1,Sf(t)?Df(e,m,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):m(t))}function m(t){return t===45||t===58?g(t):t===124?(o=!0,e.enter(`tableCellDivider`),e.consume(t),e.exit(`tableCellDivider`),h):x(t)}function h(t){return Sf(t)?Df(e,g,`whitespace`)(t):g(t)}function g(t){return t===58?(a+=1,o=!0,e.enter(`tableDelimiterMarker`),e.consume(t),e.exit(`tableDelimiterMarker`),_):t===45?(a+=1,_(t)):t===null||Z(t)?b(t):x(t)}function _(t){return t===45?(e.enter(`tableDelimiterFiller`),v(t)):x(t)}function v(t){return t===45?(e.consume(t),v):t===58?(o=!0,e.exit(`tableDelimiterFiller`),e.enter(`tableDelimiterMarker`),e.consume(t),e.exit(`tableDelimiterMarker`),y):(e.exit(`tableDelimiterFiller`),y(t))}function y(t){return Sf(t)?Df(e,b,`whitespace`)(t):b(t)}function b(n){return n===124?m(n):n===null||Z(n)?!o||i!==a?x(n):(e.exit(`tableDelimiterRow`),e.exit(`tableHead`),t(n)):x(n)}function x(e){return n(e)}function S(t){return e.enter(`tableRow`),C(t)}function C(n){return n===124?(e.enter(`tableCellDivider`),e.consume(n),e.exit(`tableCellDivider`),C):n===null||Z(n)?(e.exit(`tableRow`),t(n)):Sf(n)?Df(e,C,`whitespace`)(n):(e.enter(`data`),w(n))}function w(t){return t===null||t===124||xf(t)?(e.exit(`data`),C(t)):(e.consume(t),t===92?T:w)}function T(t){return t===92||t===124?(e.consume(t),w):w(t)}}function eb(e,t){let n=-1,r=!0,i=0,a=[0,0,0,0],o=[0,0,0,0],s=!1,c=0,l,u,d,f=new Yy;for(;++n<e.length;){let p=e[n],m=p[1];p[0]===`enter`?m.type===`tableHead`?(s=!1,c!==0&&(nb(f,t,c,l,u),u=void 0,c=0),l={type:`table`,start:Object.assign({},m.start),end:Object.assign({},m.end)},f.add(n,0,[[`enter`,l,t]])):m.type===`tableRow`||m.type===`tableDelimiterRow`?(r=!0,d=void 0,a=[0,0,0,0],o=[0,n+1,0,0],s&&(s=!1,u={type:`tableBody`,start:Object.assign({},m.start),end:Object.assign({},m.end)},f.add(n,0,[[`enter`,u,t]])),i=m.type===`tableDelimiterRow`?2:u?3:1):i&&(m.type===`data`||m.type===`tableDelimiterMarker`||m.type===`tableDelimiterFiller`)?(r=!1,o[2]===0&&(a[1]!==0&&(o[0]=o[1],d=tb(f,t,a,i,void 0,d),a=[0,0,0,0]),o[2]=n)):m.type===`tableCellDivider`&&(r?r=!1:(a[1]!==0&&(o[0]=o[1],d=tb(f,t,a,i,void 0,d)),a=o,o=[a[1],n,0,0])):m.type===`tableHead`?(s=!0,c=n):m.type===`tableRow`||m.type===`tableDelimiterRow`?(c=n,a[1]===0?o[1]!==0&&(d=tb(f,t,o,i,n,d)):(o[0]=o[1],d=tb(f,t,a,i,n,d)),i=0):i&&(m.type===`data`||m.type===`tableDelimiterMarker`||m.type===`tableDelimiterFiller`)&&(o[3]=n)}for(c!==0&&nb(f,t,c,l,u),f.consume(t.events),n=-1;++n<t.events.length;){let e=t.events[n];e[0]===`enter`&&e[1].type===`table`&&(e[1]._align=Zy(t.events,n))}return e}function tb(e,t,n,r,i,a){let o=r===1?`tableHeader`:r===2?`tableDelimiter`:`tableData`;n[0]!==0&&(a.end=Object.assign({},rb(t.events,n[0])),e.add(n[0],0,[[`exit`,a,t]]));let s=rb(t.events,n[1]);if(a={type:o,start:Object.assign({},s),end:Object.assign({},s)},e.add(n[1],0,[[`enter`,a,t]]),n[2]!==0){let i=rb(t.events,n[2]),a=rb(t.events,n[3]),o={type:`tableContent`,start:Object.assign({},i),end:Object.assign({},a)};if(e.add(n[2],0,[[`enter`,o,t]]),r!==2){let r=t.events[n[2]],i=t.events[n[3]];if(r[1].end=Object.assign({},i[1].end),r[1].type=`chunkText`,r[1].contentType=`text`,n[3]>n[2]+1){let t=n[2]+1,r=n[3]-n[2]-1;e.add(t,r,[])}}e.add(n[3]+1,0,[[`exit`,o,t]])}return i!==void 0&&(a.end=Object.assign({},rb(t.events,i)),e.add(i,0,[[`exit`,a,t]]),a=void 0),a}function nb(e,t,n,r,i){let a=[],o=rb(t.events,n);i&&(i.end=Object.assign({},o),a.push([`exit`,i,t])),r.end=Object.assign({},o),a.push([`exit`,r,t]),e.add(n+1,0,a)}function rb(e,t){let n=e[t],r=n[0]===`enter`?`start`:`end`;return n[1][r]}var ib={name:`tasklistCheck`,tokenize:ob};function ab(){return{text:{91:ib}}}function ob(e,t,n){let r=this;return i;function i(t){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(t):(e.enter(`taskListCheck`),e.enter(`taskListCheckMarker`),e.consume(t),e.exit(`taskListCheckMarker`),a)}function a(t){return xf(t)?(e.enter(`taskListCheckValueUnchecked`),e.consume(t),e.exit(`taskListCheckValueUnchecked`),o):t===88||t===120?(e.enter(`taskListCheckValueChecked`),e.consume(t),e.exit(`taskListCheckValueChecked`),o):n(t)}function o(t){return t===93?(e.enter(`taskListCheckMarker`),e.consume(t),e.exit(`taskListCheckMarker`),e.exit(`taskListCheck`),s):n(t)}function s(r){return Z(r)?t(r):Sf(r)?e.check({tokenize:sb},t,n)(r):n(r)}}function sb(e,t,n){return Df(e,r,`whitespace`);function r(e){return e===null?n(e):t(e)}}function cb(e){return lf([wy(),By(),Jy(e),Qy(),ab()])}var lb={};function ub(e){let t=this,n=e||lb,r=t.data(),i=r.micromarkExtensions||=[],a=r.fromMarkdownExtensions||=[],o=r.toMarkdownExtensions||=[];i.push(cb(n)),a.push(py()),o.push(my(n))}var db={path:`M82 352.8h521.8l181.3.2 8.4.3h2.4A14 14 0 0 1 807 358c2.2 3.9 2.3 7.5 2.4 11.9.4 6 .7 9.6 4.6 14.1 7 3.4 13.2 3.4 20.8 3.3h22.8l28.4-.3h3.8l51.2-1h3.4q112.6-2.8 224.8-15.1l3.4-.4 6.4-.7c14.4-1.6 14.4-1.6 19 .7 2.1 2.7 3 4.6 3.3 8.1-1 9.3-7 17.9-12.3 25.4l-2 2.8a224 224 0 0 1-21 24.2l-2.3 2.4a174 174 0 0 1-20 17.4C1071 510.9 971 540.2 855.3 566.6c-70.4 16-70.4 16-97.3 36.4l-2.5 1.8A100 100 0 0 0 715 677l-.2 3c-.8 32.3 13 61.3 34.2 85l1.9 2.1c31.3 33.5 80.1 49.2 122.7 61.7l6.7 2 3.5 1A31 31 0 0 1 899 844l1.9 4.8 1 3 1.1 3.2 1.3 3.6 6.7 19.6 1.1 3.5a17 17 0 0 1-.2 12c-3 3.7-6.7 5-11.4 5.6h-514l-28.5-.1H227.8c-18-.1-18-.1-23-3.1-2.9-3.3-3-5.5-3-9.8a49 49 0 0 1 3.5-13.8l4.3-13.1c3.6-11.1 7.5-20.8 18.2-26.8 5-2.2 10.4-3.5 15.7-4.8 44-12 87.7-29.3 121.5-60.8l2.5-2.2c21.2-20 33.5-49.3 34.8-78.3.6-27.7-8.4-53.3-26.3-74.5l-2.5-3c-10.3-12-23-20.9-36.5-29l-1.8-1.1c-29.6-18.1-64.5-26.8-97.5-36.6l-3-.9-14-4.1-5.2-1.5-2.2-.6A34 34 0 0 1 193 521a267 267 0 0 1-9.8-23.3l-1.4-3.6c-2.2-3.7-4-5.1-7.8-7.1-5.2-1.2-10.3-1.2-15.6-1.2l-46.8-.7-32.7-.5h-2.7a24 24 0 0 1-17.6-7c-3.8-6.2-3.9-12.3-3.9-19.4v-33l-.1-49.8c0-6.9.9-13.7 5.7-18.8 7-4 13.7-3.9 21.6-3.8`,viewBox:`31 329 1194 594`,bounds:{x:55,y:353,width:1146,height:546}};function fb(){return typeof window<`u`}function pb(e){return gb(e)?(e.nodeName||``).toLowerCase():`#document`}function mb(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function hb(e){return((gb(e)?e.ownerDocument:e.document)||window.document)?.documentElement}function gb(e){return fb()?e instanceof Node||e instanceof mb(e).Node:!1}function _b(e){return fb()?e instanceof Element||e instanceof mb(e).Element:!1}function vb(e){return fb()?e instanceof HTMLElement||e instanceof mb(e).HTMLElement:!1}function yb(e){return!fb()||typeof ShadowRoot>`u`?!1:e instanceof ShadowRoot||e instanceof mb(e).ShadowRoot}function bb(e){let{overflow:t,overflowX:n,overflowY:r,display:i}=jb(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&i!==`inline`&&i!==`contents`}function xb(e){return/^(table|td|th)$/.test(pb(e))}function Sb(e){try{if(e.matches(`:popover-open`))return!0}catch{}try{return e.matches(`:modal`)}catch{return!1}}var Cb=/transform|translate|scale|rotate|perspective|filter/,wb=/paint|layout|strict|content/,Tb=e=>!!e&&e!==`none`,Eb;function Db(e){let t=_b(e)?jb(e):e;return Tb(t.transform)||Tb(t.translate)||Tb(t.scale)||Tb(t.rotate)||Tb(t.perspective)||!kb()&&(Tb(t.backdropFilter)||Tb(t.filter))||Cb.test(t.willChange||``)||wb.test(t.contain||``)}function Ob(e){let t=Nb(e);for(;vb(t)&&!Ab(t);){if(Db(t))return t;if(Sb(t))return null;t=Nb(t)}return null}function kb(){return Eb??=typeof CSS<`u`&&CSS.supports&&CSS.supports(`-webkit-backdrop-filter`,`none`),Eb}function Ab(e){return/^(html|body|#document)$/.test(pb(e))}function jb(e){return mb(e).getComputedStyle(e)}function Mb(e){return _b(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Nb(e){if(pb(e)===`html`)return e;let t=e.assignedSlot||e.parentNode||yb(e)&&e.host||hb(e);return yb(t)?t.host:t}function Pb(e){let t=Nb(e);return Ab(t)?(e.ownerDocument||e).body:vb(t)&&bb(t)?t:Pb(t)}function Fb(e,t,n){t===void 0&&(t=[]),n===void 0&&(n=!0);let r=Pb(e),i=r===e.ownerDocument?.body,a=mb(r);if(i){let e=Ib(a);return t.concat(a,a.visualViewport||[],bb(r)?r:[],e&&n?Fb(e):[])}return t.concat(r,Fb(r,[],n))}function Ib(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}var Lb=U.createContext(void 0);function Rb(e=!1){let t=U.useContext(Lb);if(t===void 0&&!e)throw Error(ha(16));return t}function zb(e){let{focusableWhenDisabled:t,disabled:n,composite:r=!1,tabIndex:i=0,isNativeButton:a}=e,o=r&&t!==!1,s=r&&t===!1;return{props:U.useMemo(()=>{let e={onKeyDown(e){n&&t&&e.key!==`Tab`&&e.preventDefault()}};return r||(e.tabIndex=i,!a&&n&&(e.tabIndex=t?i:-1)),(a&&(t||o)||!a&&n)&&(e[`aria-disabled`]=n),a&&(!t||s)&&(e.disabled=n),e},[r,n,t,o,s,a,i])}}function Bb(e){return e?.ownerDocument||document}function Vb(e,t,{detail:n=0,pointerType:r=``}={}){e.dispatchEvent(new(mb(e)).PointerEvent(`click`,{bubbles:!0,cancelable:!0,composed:!0,detail:n,pointerType:r,shiftKey:t.shiftKey,ctrlKey:t.ctrlKey,altKey:t.altKey,metaKey:t.metaKey}))}function Hb(e={}){let{disabled:t=!1,focusableWhenDisabled:n,tabIndex:r=0,native:i=!0,composite:a}=e,o=U.useRef(null),s=Rb(!0),c=a??s!==void 0,{props:l}=zb({focusableWhenDisabled:n,disabled:t,composite:c,tabIndex:r,isNativeButton:i}),u=U.useCallback(()=>{let e=o.current;Ub(e)&&c&&t&&l.disabled===void 0&&e.disabled&&(e.disabled=!1)},[t,l.disabled,c]);return J(u,[u]),{getButtonProps:U.useCallback((e={})=>{let{onClick:n,onMouseDown:r,onKeyUp:a,onKeyDown:o,onPointerDown:s,...u}=e;return Ji({onClick(e){t?e.preventDefault():n?.(e)},onMouseDown(e){t||r?.(e)},onKeyDown(e){if(t||(ia(e),o?.(e),e.baseUIHandlerPrevented))return;let n=e.target===e.currentTarget,r=e.currentTarget,a=Ub(r),s=!i&&Wb(r),l=n&&(i?a:!s),u=e.key===`Enter`,d=e.key===` `,f=r.getAttribute(`role`),p=f?.startsWith(`menuitem`)||f===`option`||f===`gridcell`;if(n&&c&&d){if(e.defaultPrevented&&p)return;e.preventDefault(),(!i||a)&&(e.preventBaseUIHandler(),Vb(r,e))}else!l||i||!d&&!u?n&&s&&d&&e.preventDefault():e.defaultPrevented||(e.preventDefault(),u&&(e.preventBaseUIHandler(),Vb(r,e)))},onKeyUp(e){t||(ia(e),a?.(e),e.target===e.currentTarget&&i&&c&&Ub(e.currentTarget)&&e.key===` `?e.preventDefault():e.baseUIHandlerPrevented||e.target===e.currentTarget&&!i&&!c&&!e.defaultPrevented&&e.key===` `&&(e.preventBaseUIHandler(),Vb(e.currentTarget,e)))},onPointerDown(e){t?e.preventDefault():s?.(e)}},i?{type:`button`}:{role:`button`},l,u)},[t,l,c,i]),buttonRef:q(e=>{o.current=e,u()})}}function Ub(e){return vb(e)&&e.tagName===`BUTTON`}function Wb(e){return vb(e)&&e.tagName===`A`&&!!e.href}var Gb=U.forwardRef(function(e,t){let{render:n,className:r,disabled:i=!1,focusableWhenDisabled:a=!1,nativeButton:o=!0,style:s,...c}=e,{getButtonProps:l,buttonRef:u}=Hb({disabled:i,focusableWhenDisabled:a,native:o});return sa(`button`,e,{state:{disabled:i},ref:[t,u],props:[c,l]})});function Kb(e){var t,n,r=``;if(typeof e==`string`||typeof e==`number`)r+=e;else if(typeof e==`object`){if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=Kb(e[t]))&&(r&&(r+=` `),r+=n)}else for(n in e)e[n]&&(r&&(r+=` `),r+=n)}return r}function qb(){for(var e,t,n=0,r=``,i=arguments.length;n<i;n++)(e=arguments[n])&&(t=Kb(e))&&(r&&(r+=` `),r+=t);return r}var Jb=e=>typeof e==`boolean`?`${e}`:e===0?`0`:e,Yb=qb,Xb=(e,t)=>n=>{if(t?.variants==null)return Yb(e,n?.class,n?.className);let{variants:r,defaultVariants:i}=t,a=Object.keys(r).map(e=>{let t=n?.[e],a=i?.[e];if(t===null)return null;let o=Jb(t)||Jb(a);return r[e][o]}),o=n&&Object.entries(n).reduce((e,t)=>{let[n,r]=t;return r===void 0||(e[n]=r),e},{});return Yb(e,a,t?.compoundVariants?.reduce((e,t)=>{let{class:n,className:r,...a}=t;return Object.entries(a).every(e=>{let[t,n]=e;return Array.isArray(n)?n.includes({...i,...o}[t]):{...i,...o}[t]===n})?[...e,n,r]:e},[]),n?.class,n?.className)},Zb=Xb(`group/button inline-flex shrink-0 items-center justify-center rounded-md border border-transparent bg-clip-padding text-[13px] font-medium whitespace-nowrap transition-all outline-none select-none focus-visible:border-transparent focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background active:not-aria-[haspopup]:translate-y-px disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4`,{variants:{variant:{default:`bg-primary text-primary-foreground hover:bg-primary/80`,outline:`border-border bg-background hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:border-input dark:bg-input/30 dark:hover:bg-input/50`,secondary:`bg-secondary text-secondary-foreground hover:bg-[color-mix(in_oklch,var(--secondary),var(--foreground)_5%)] aria-expanded:bg-secondary aria-expanded:text-secondary-foreground`,ghost:`hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:hover:bg-muted/50`,destructive:`bg-destructive/10 text-destructive hover:bg-destructive/20 focus-visible:border-destructive/40 focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:hover:bg-destructive/30 dark:focus-visible:ring-destructive/40`,link:`text-primary underline-offset-4 hover:underline`},size:{default:`h-7 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2`,xs:`h-6 gap-1 rounded-[min(var(--radius-md),10px)] px-2 text-xs in-data-[slot=button-group]:rounded-lg has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3`,sm:`h-7 gap-1 rounded-[min(var(--radius-md),12px)] px-2.5 text-[0.8rem] in-data-[slot=button-group]:rounded-lg has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3.5`,lg:`h-9 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2`,icon:`size-8`,"icon-xs":`size-6 rounded-[min(var(--radius-md),10px)] in-data-[slot=button-group]:rounded-lg [&_svg:not([class*='size-'])]:size-3`,"icon-sm":`size-7 rounded-[min(var(--radius-md),12px)] in-data-[slot=button-group]:rounded-lg`,"icon-lg":`size-9`}},defaultVariants:{variant:`outline`,size:`default`}});function Qb(e){return U.isValidElement(e)}function $b({className:e,variant:t=`outline`,size:n=`default`,render:r,...i}){if(Qb(r)&&r.type!==`button`){let{nativeButton:a,focusableWhenDisabled:o,children:s,...c}=i;return U.cloneElement(r,{...c,"data-slot":`button`,className:K(Zb({variant:t,size:n,className:e}),typeof r.props.className==`string`?r.props.className:void 0)},...s===void 0?[]:[s])}return(0,G.jsx)(Gb,{"data-slot":`button`,className:K(Zb({variant:t,size:n,className:e})),render:r,...i})}var ex=`data-valid`,tx=`data-invalid`,nx={badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valid:null,valueMissing:!1},rx={disabled:!1,valid:null,touched:!1,dirty:!1,filled:!1,focused:!1},ix={valid(e){return e===null?null:e?{[ex]:``}:{[tx]:``}}},ax={invalid:void 0,name:void 0,validityData:{state:nx,errors:[],error:``,value:``,initialValue:null},setValidityData:Vi,disabled:void 0,setTouched:Vi,setDirty:Vi,setFilled:Vi,setFocused:Vi,focusOwnerRef:{current:void 0},validationMode:`onSubmit`,shouldValidateOnChange:()=>!1,state:rx,registerFieldControl:Vi,validation:{getValidationProps:(e,t=Ui)=>t,inputRef:{current:null},registeredInputs:new Map,registerInput:Vi,getInputControl:()=>null,commit:async()=>{},change:Vi}},ox=U.createContext(ax);function sx(e=!0){let t=U.useContext(ox);if(t.setValidityData===Vi&&!e)throw Error(ha(28));return t}var cx=U.createContext({elementRef:{current:null},formRef:{current:{fields:new Map}},errors:{},clearErrors:Vi,validationMode:`onSubmit`,submitCountRef:{current:0}});function lx(){return U.useContext(cx)}function ux(){let[,e]=U.useState({});return U.useCallback(()=>{e({})},[])}var dx=0;function fx(e,t=`mui`){let n=U.useRef(void 0),r=ux(),i=e??n.current;return U.useEffect(()=>{n.current??(dx+=1,n.current=`${t}-${dx}`,e??r())},[e,t,r]),i}var px=ba.useId;function mx(e,t){if(px!==void 0){let n=px();return e??(t?`${t}-${n}`:n)}return fx(e,t)}function hx(e){return mx(e,`base-ui`)}var gx=U.createContext({controlId:void 0,registerControlId:Vi,resetControlId:Vi,labelId:void 0,setLabelId:Vi,messageIds:[],setMessageIds:Vi,getDescriptionProps:e=>e});function _x(){return U.useContext(gx)}function vx(e,t,n,r=!0,i,a){let[o,s]=U.useState(),c=hx(i?`${i}-label`:void 0),l=!!a?.trim(),u=e??(l?void 0:t)??o;return J(()=>{let i=e||t||l||!r?void 0:yx(n.current,c);o!==i&&s(i)}),u}function yx(e,t){let n=bx(e);if(n)return!n.id&&t&&(n.id=t),n.id||void 0}function bx(e){if(!e)return;let t=e.parentElement;if(t&&t.tagName===`LABEL`)return t;let n=e.id;if(n){let t=e.nextElementSibling;if(t&&t.htmlFor===n)return t}let r=e.labels;return r&&r[0]}function xx(e={}){let{id:t,enabled:n=!0}=e,{controlId:r,registerControlId:i,resetControlId:a}=_x(),o=hx(),s=Ai(()=>Symbol()),c=U.useRef(!1),l=U.useRef(!1),u=q(()=>{c.current&&i!==Vi&&(c.current=!1,i(s.current,void 0))});return J(()=>{if(!n||i===Vi){u();return}let e;if(t!==void 0)l.current=!0,e=t;else if(l.current)e=o;else{a();return}e===void 0?u():(c.current=!0,i(s.current,e))},[t,n,i,a,o,s,u]),J(()=>u,[u]),(n?r:void 0)??t??o}function Sx(){return typeof navigator>`u`?{userAgent:``,platform:``,maxTouchPoints:0}:{userAgent:navigator.userAgent,platform:navigator.platform??``,maxTouchPoints:navigator.maxTouchPoints??0}}var{userAgent:Cx,platform:wx,maxTouchPoints:Tx}=Sx(),Ex=Cx.toLowerCase(),Dx=wx.toLowerCase(),Ox=/^i(os$|p)/.test(Dx)||Dx===`macintel`&&Tx>1,kx=`android`,Ax=Dx===kx||Ex.includes(kx),jx=!Ox&&Dx.startsWith(`mac`);Dx.startsWith(`win`),!Ax&&/^(linux|chrome os)/.test(Dx);var Mx=jx||Ox,Nx=typeof CSS<`u`&&!!CSS.supports?.(`-webkit-backdrop-filter:none`);!Nx&&Ex.includes(`firefox`),!Nx&&Ex.includes(`chrom`);var Px=Mx,Fx=/jsdom|happydom/.test(Ex);function Ix(e){let t=e.activeElement;for(;t?.shadowRoot?.activeElement!=null;)t=t.shadowRoot.activeElement;return t}function Q(e,t){if(!e||!t)return!1;let n=t.getRootNode?.();if(e.contains(t))return!0;if(n&&yb(n)){let n=t;for(;n;){if(e===n)return!0;n=n.parentNode||n.host}}return!1}function Lx(e,t){let n=e;for(;n;){if(_b(n)&&n.matches(t))return n;n=n.assignedSlot??n.parentNode??(yb(n)?n.host:null)}return null}function Rx(e){return`composedPath`in e?e.composedPath()[0]??e.target:e.target}var zx=`data-base-ui-focusable`,Bx=`input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])`,Vx=`ArrowLeft`,Hx=`ArrowRight`,Ux=`ArrowUp`,Wx=`ArrowDown`,Gx=`data-open`,Kx=`data-closed`,qx=`data-anchor-hidden`,Jx=`data-popup-open`,Yx=`data-pressed`,Xx={[Jx]:``},Zx={[Jx]:``,[Yx]:``},Qx={[Gx]:``},$x={[Kx]:``},eS={[qx]:``},tS={open(e){return e?Xx:null}},nS={open(e){return e?Zx:null}},rS={open(e){return e?Qx:$x},anchorHidden(e){return e?eS:null}},iS={...rS,...Ba},aS=`data-trigger-disabled`;function oS(e,t){if(!_b(e))return!1;let n=e;if(t.hasElement(n))return!n.hasAttribute(aS);for(let[,e]of t.entries())if(Q(e,n))return!e.hasAttribute(aS);return!1}function sS(e,t){if(t==null)return!1;if(`composedPath`in e)return e.composedPath().includes(t);let n=e;return n.target!=null&&t.contains(n.target)}function cS(e){return e.matches(`html,body`)}function lS(e){return vb(e)&&e.matches(`input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])`)}function uS(e){return Lx(e,`button,a[href],[role="button"],select,[tabindex]:not([tabindex="-1"]),${Bx}`)!=null}function dS(e){return e?e.getAttribute(`role`)===`combobox`&&lS(e):!1}function fS(e){if(!e||Fx)return!0;try{return e.matches(`:focus-visible`)}catch{return!0}}function pS(e){return e?e.hasAttribute(`data-base-ui-focusable`)?e:e.querySelector(`[data-base-ui-focusable]`)||e:null}function mS(e,t,n=!0){return e.filter(e=>e.parentId===t).flatMap(t=>[...!n||t.context?.open?[t]:[],...mS(e,t.id,n)])}function hS(e,t){let n=[],r=e.find(e=>e.id===t)?.parentId;for(;r;){let t=e.find(e=>e.id===r);r=t?.parentId,t&&(n=n.concat(t))}return n}function gS(e){e.preventDefault(),e.stopPropagation()}function _S(e){return`nativeEvent`in e}function vS(e){return e.pointerType===``&&e.isTrusted?!0:Ax&&e.pointerType?e.type===`click`&&e.buttons===1:e.detail===0&&!e.pointerType}function yS(e){return Fx?!1:!Ax&&e.width===0&&e.height===0||e.type===`pointerdown`&&e.width===1&&e.height===1&&e.pressure===0&&e.detail===0&&e.pointerType===`mouse`&&(Ax||e.buttons===0)||e.width<1&&e.height<1&&e.pressure===0&&e.detail===0&&e.pointerType===`touch`}function bS(e,t){let n=[`mouse`,`pen`];return t||n.push(``,void 0),n.includes(e)}function xS(e){let t=e.type;return t===`click`||t===`mousedown`||t===`keydown`||t===`keyup`}var SS=Math.min,CS=Math.max,wS=Math.round,TS=Math.floor,ES=e=>({x:e,y:e}),DS={left:`right`,right:`left`,bottom:`top`,top:`bottom`};function OS(e,t,n){return CS(e,SS(t,n))}function kS(e,t){return typeof e==`function`?e(t):e}function AS(e){return e.split(`-`)[0]}function jS(e){return e.split(`-`)[1]}function MS(e){return e===`x`?`y`:`x`}function NS(e){return e===`y`?`height`:`width`}function PS(e){let t=e[0];return t===`t`||t===`b`?`y`:`x`}function FS(e){return MS(PS(e))}function IS(e,t,n){n===void 0&&(n=!1);let r=jS(e),i=FS(e),a=NS(i),o=i===`x`?r===(n?`end`:`start`)?`right`:`left`:r===`start`?`bottom`:`top`;return t.reference[a]>t.floating[a]&&(o=GS(o)),[o,GS(o)]}function LS(e){let t=GS(e);return[RS(e),t,RS(t)]}function RS(e){return e.includes(`start`)?e.replace(`start`,`end`):e.replace(`end`,`start`)}var zS=[`left`,`right`],BS=[`right`,`left`],VS=[`top`,`bottom`],HS=[`bottom`,`top`];function US(e,t,n){switch(e){case`top`:case`bottom`:return n?t?BS:zS:t?zS:BS;case`left`:case`right`:return t?VS:HS;default:return[]}}function WS(e,t,n,r){let i=jS(e),a=US(AS(e),n===`start`,r);return i&&(a=a.map(e=>e+`-`+i),t&&(a=a.concat(a.map(RS)))),a}function GS(e){let t=AS(e);return DS[t]+e.slice(t.length)}function KS(e){return{top:e.top??0,right:e.right??0,bottom:e.bottom??0,left:e.left??0}}function qS(e){return typeof e==`number`?{top:e,right:e,bottom:e,left:e}:KS(e)}function JS(e){let{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}function YS(e,t){return t<0||t>=e.length}function XS(e,t){return $S(e.current,{disabledIndices:t})}function ZS(e,t){return $S(e.current,{decrement:!0,startingIndex:e.current.length,disabledIndices:t})}function QS(e,t,n){let{decrement:r,loopFocus:i,allowEscape:a,disabledIndices:o,minIndex:s,maxIndex:c}=n,l=()=>$S(e,{startingIndex:t,decrement:r,disabledIndices:o}),u,d=!1;if(!i)u=r?Math.max(s,l()):Math.min(c,l());else if(r?t<=s:t>=c){let n=r?-1:e.length;a&&t!==n?u=-1:(u=r?c:s,d=!0)}else u=l();return{index:YS(e,u)?-1:u,wrapped:d}}function $S(e,{startingIndex:t=-1,decrement:n=!1,disabledIndices:r,amount:i=1}={}){let a=t;do a+=n?-i:i;while(a>=0&&a<=e.length-1&&eC(e,a,r));return a}function eC(e,t,n){if(typeof n==`function`?n(t):n?.includes(t)??!1)return!0;let r=e[t];return r?!nC(r)||r.matches(`:disabled`)?!0:!n&&(r.hasAttribute(`disabled`)||r.getAttribute(`aria-disabled`)===`true`):!1}function tC(e){return e.visibility===`hidden`||e.visibility===`collapse`}function nC(e,t=e?jb(e):null){return!e||!e.isConnected||!t||tC(t)?!1:typeof e.checkVisibility==`function`?e.checkVisibility():t.display!==`none`&&t.display!==`contents`}var rC=`a[href],button,input,select,textarea,summary,details,iframe,object,embed,[tabindex],[contenteditable]:not([contenteditable="false"]),audio[controls],video[controls]`;function iC(e){let t=e.assignedSlot;if(t)return t;if(e.parentElement)return e.parentElement;let n=e.getRootNode();return yb(n)?n.host:null}function aC(e){for(let t of Array.from(e.children))if(pb(t)===`summary`)return t;return null}function oC(e,t){let n=aC(t);return!!n&&(e===n||Q(n,e))}function sC(e){let t=e?pb(e):``;return e!=null&&e.matches(rC)&&(t!==`summary`||e.parentElement!=null&&pb(e.parentElement)===`details`&&aC(e.parentElement)===e)&&(t!==`details`||aC(e)==null)&&(t!==`input`||e.type!==`hidden`)}function cC(e){if(!sC(e)||!e.isConnected||e.matches(`:disabled`))return!1;for(let t=e;t;t=iC(t)){let n=t!==e,r=pb(t)===`slot`;if(t.hasAttribute(`inert`)||n&&pb(t)===`details`&&!t.open&&!oC(e,t)||t.hasAttribute(`hidden`)||!r&&!lC(t,n))return!1}return!0}function lC(e,t){let n=jb(e);return t?n.display!==`none`:nC(e,n)}function uC(e){let t=e.tabIndex;if(t<0){let t=pb(e);if(t===`details`||t===`audio`||t===`video`||vb(e)&&e.isContentEditable)return 0}return t}function dC(e){if(pb(e)!==`input`)return null;let t=e;return t.type===`radio`&&t.name!==``?t:null}function fC(e,t){let n=dC(e);if(!n)return!0;let r=t.find(e=>{let t=dC(e);return t?.name===n.name&&t.form===n.form&&t.checked});return r?r===n:t.find(e=>{let t=dC(e);return t?.name===n.name&&t.form===n.form})===n}function pC(e){if(vb(e)&&pb(e)===`slot`){let t=e.assignedElements({flatten:!0});if(t.length>0)return t}return vb(e)&&e.shadowRoot?Array.from(e.shadowRoot.children):Array.from(e.children)}function mC(e,t){pC(e).forEach(e=>{sC(e)&&t.push(e),mC(e,t)})}function hC(e,t,n){pC(e).forEach(e=>{vb(e)&&e.matches(t)&&n.push(e),hC(e,t,n)})}function gC(e){return cC(e)&&uC(e)>=0}function _C(e){let t=[];return mC(e,t),t.filter(cC)}function vC(e){let t=_C(e);return t.filter(e=>uC(e)>=0&&fC(e,t))}function yC(e,t){let n=vC(e),r=n.length;if(r===0)return;let i=Ix(Bb(e)),a=n.indexOf(i);return n[a===-1?t===1?0:r-1:a+t]}function bC(e){return yC(Bb(e).body,1)||e}function xC(e){return yC(Bb(e).body,-1)||e}function SC(e,t,n){if(!e)return null;let r=[];mC(Bb(e).body,r);let i=r.indexOf(e);if(i===-1)return null;let a=r.filter(cC);for(let e=1;e<r.length;e+=1){let o=r[(i+t*e+r.length)%r.length];if(!Q(n,o)&&gC(o)&&fC(o,a))return o}return r[i]}function CC(e,t){let n=t||e.currentTarget,r=e.relatedTarget;return!r||!Q(n,r)}function wC(e){vC(e).forEach(e=>{e.dataset.tabindex=e.getAttribute(`tabindex`)||``,e.setAttribute(`tabindex`,`-1`)})}function TC(e){let t=[];hC(e,`[data-tabindex]`,t),t.forEach(e=>{let t=e.dataset.tabindex;delete e.dataset.tabindex,t?e.setAttribute(`tabindex`,t):e.removeAttribute(`tabindex`)})}var EC=U.createContext({disabled:!1});function DC(){return U.useContext(EC)}function OC(e,t,n){let{setFocused:r,focusOwnerRef:i}=sx(),a=q(t=>{(t?!e:i.current===a)&&(i.current=t&&a,n?.(t),r(t))});return J(()=>{let e=t.current;return e?.getRootNode()?.activeElement===e&&a(!0),()=>a(!1)},[e,t,a]),a}function kC(e,t,n,r,i=!0,a){let{registerFieldControl:o}=sx(),s=Ai(()=>Symbol());J(()=>{let c=s.current;i?o(c,{controlRef:e,getValue:r,id:t,name:a,value:n}):o(c,void 0)},[e,i,r,t,a,o,s,n]),J(()=>{let e=s.current;return()=>{o(e,void 0)}},[o,s])}function AC(e,t){let n=U.useRef(e),r=q(t);J(()=>{n.current!==e&&r(n.current),n.current=e},[e,r])}function $(e,t,n,r){let i=!1,a=!1,o=r??Ui;return{reason:e,event:t??new Event(`base-ui`),cancel(){i=!0},allowPropagation(){a=!0},get isCanceled(){return i},get isPropagationAllowed(){return a},trigger:n,...o}}function jC(e,t,n){let r=n??Ui;return{reason:e,event:t??new Event(`base-ui`),...r}}var MC=`none`,NC=`trigger-press`,PC=`trigger-hover`,FC=`trigger-focus`,IC=`outside-press`,LC=`item-press`,RC=`close-press`,zC=`focus-out`,BC=`escape-key`,VC=`list-navigation`,HC=`keyboard`,UC=`pointer`,WC=`cancel-open`,GC=`sibling-open`,KC=`disabled`,qC=`missing`,JC=`initial`,YC=`imperative-action`,XC=`window-resize`,ZC=U.forwardRef(function(e,t){let{render:n,className:r,id:i,name:a,value:o,disabled:s=!1,onValueChange:c,defaultValue:l,autoFocus:u=!1,style:d,...f}=e,{state:p,name:m,disabled:h,setTouched:g,setDirty:_,validityData:v,setFilled:y,validationMode:b,validation:x}=sx(),{clearErrors:S,elementRef:C,submitCountRef:w}=lx(),T=h||s,E=m??a,D={...p,disabled:T},{labelId:O}=_x(),k=xx({id:i}),A=o!==void 0,j=o==null?void 0:String(o),M=q(()=>x.inputRef.current?.value);kC(x.inputRef,k,j,M,!T,a),J(()=>{let e=j??x.inputRef.current?.value;e!==void 0&&y(e!==``)},[j,l,x.inputRef,y]),AC(j,()=>{j!==void 0&&(S(E),_(j!==(v.initialValue??``)),x.change(j))});let N=U.useRef(null),P=OC(T,N),F=qa();return sa(`input`,e,{ref:[t,N],state:D,props:[{id:k,disabled:T,name:E,ref:x.inputRef,"aria-labelledby":O,autoFocus:u,...A?{value:o}:{defaultValue:l},onChange(e){let t=e.currentTarget.value,n=$(MC,e.nativeEvent);c?.(t,n),!A&&(_(t!==(v.initialValue??``)),y(t!==``),!e.nativeEvent.defaultPrevented&&!n.isCanceled&&(S(E),x.change(t)))},onFocus(){P(!0)},onBlur(e){if(g(!0),P(!1),b===`onBlur`){let t=e.currentTarget.value;x.commit(t),A&&queueMicrotask(()=>{let e=x.inputRef.current?.value;e!==void 0&&e!==t&&e!==(v.initialValue??``)&&x.commit(e)})}},onKeyDown(e){if(e.currentTarget.tagName===`INPUT`&&e.key===`Enter`){g(!0);let t=e.currentTarget.value,n=e.currentTarget.form;if(n&&n===C.current&&!e.defaultPrevented){let t=e.currentTarget,n=w.current;F.start(0,()=>{w.current===n&&x.commit(t.value)})}else x.commit(t)}}},f,e=>x.getValidationProps(T,e)],stateAttributesMapping:ix})}),QC=U.forwardRef(function(e,t){return(0,G.jsx)(ZC,{ref:t,...e})});function $C({className:e,type:t,...n}){return(0,G.jsx)(QC,{type:t,"data-slot":`input`,className:K(`h-8 w-full min-w-0 rounded-md border border-input bg-transparent px-2.5 py-1 text-base transition-colors outline-none file:inline-flex file:h-6 file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:border-primary focus-visible:ring-2 focus-visible:ring-primary/20 disabled:pointer-events-none disabled:cursor-not-allowed disabled:bg-input/50 disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 md:text-[13px] dark:bg-input/30 dark:disabled:bg-input/80 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40`,e),...n})}function ew({className:e,...t}){return(0,G.jsx)(`textarea`,{"data-slot":`textarea`,className:K(`flex field-sizing-content min-h-16 w-full rounded-lg border border-input bg-transparent px-2.5 py-2 text-base transition-colors outline-none placeholder:text-muted-foreground focus-visible:border-primary focus-visible:ring-2 focus-visible:ring-primary/20 disabled:cursor-not-allowed disabled:bg-input/50 disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 md:text-sm dark:bg-input/30 dark:disabled:bg-input/80 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40`,e),...t})}function tw({className:e,...t}){return(0,G.jsx)(`div`,{"data-slot":`input-group`,role:`group`,className:K(`group/input-group relative flex h-8 w-full min-w-0 items-center rounded-lg border border-input transition-colors outline-none in-data-[slot=combobox-content]:focus-within:border-inherit in-data-[slot=combobox-content]:focus-within:ring-0 has-disabled:bg-input/50 has-disabled:opacity-50 has-[[data-slot=input-group-control]:focus-visible]:border-ring has-[[data-slot=input-group-control]:focus-visible]:ring-3 has-[[data-slot=input-group-control]:focus-visible]:ring-ring/50 has-[[data-slot][aria-invalid=true]]:border-destructive has-[[data-slot][aria-invalid=true]]:ring-3 has-[[data-slot][aria-invalid=true]]:ring-destructive/20 has-[>[data-align=block-end]]:h-auto has-[>[data-align=block-end]]:flex-col has-[>[data-align=block-start]]:h-auto has-[>[data-align=block-start]]:flex-col has-[>textarea]:h-auto dark:bg-input/30 dark:has-disabled:bg-input/80 dark:has-[[data-slot][aria-invalid=true]]:ring-destructive/40 has-[>[data-align=block-end]]:[&>input]:pt-3 has-[>[data-align=block-start]]:[&>input]:pb-3 has-[>[data-align=inline-end]]:[&>input]:pr-1.5 has-[>[data-align=inline-start]]:[&>input]:pl-1.5`,e),...t})}var nw=Xb(`flex h-auto cursor-text items-center justify-center gap-2 py-1.5 text-sm font-medium text-muted-foreground select-none group-data-[disabled=true]/input-group:opacity-50 [&>kbd]:rounded-[calc(var(--radius)-5px)] [&>svg:not([class*='size-'])]:size-4`,{variants:{align:{"inline-start":`order-first pl-2 has-[>button]:ml-[-0.3rem] has-[>kbd]:ml-[-0.15rem]`,"inline-end":`order-last pr-2 has-[>button]:mr-[-0.3rem] has-[>kbd]:mr-[-0.15rem]`,"block-start":`order-first w-full justify-start px-2.5 pt-2 group-has-[>input]/input-group:pt-2 [.border-b]:pb-2`,"block-end":`order-last w-full justify-start px-2.5 pb-2 group-has-[>input]/input-group:pb-2 [.border-t]:pt-2`}},defaultVariants:{align:`inline-start`}});function rw({className:e,align:t=`inline-start`,...n}){return(0,G.jsx)(`div`,{role:`group`,"data-slot":`input-group-addon`,"data-align":t,className:K(nw({align:t}),e),onClick:e=>{e.target instanceof Element&&e.target.closest(`button`)||e.currentTarget.parentElement?.querySelector(`input`)?.focus()},...n})}var iw=Xb(`flex items-center gap-2 text-sm shadow-none`,{variants:{size:{xs:`h-6 gap-1 rounded-[calc(var(--radius)-3px)] px-1.5 [&>svg:not([class*='size-'])]:size-3.5`,sm:``,"icon-xs":`size-6 rounded-[calc(var(--radius)-3px)] p-0 has-[>svg]:p-0`,"icon-sm":`size-8 p-0 has-[>svg]:p-0`}},defaultVariants:{size:`xs`}});function aw({className:e,type:t=`button`,variant:n=`ghost`,size:r=`xs`,...i}){return(0,G.jsx)($b,{type:t,"data-size":r,variant:n,className:K(iw({size:r}),e),...i})}function ow({className:e,...t}){return(0,G.jsx)($C,{"data-slot":`input-group-control`,className:K(`flex-1 rounded-none border-0 bg-transparent shadow-none ring-0 focus-visible:ring-0 disabled:bg-transparent aria-invalid:ring-0 dark:bg-transparent dark:disabled:bg-transparent`,e),...t})}function sw({className:e,...t}){return(0,G.jsx)(ew,{"data-slot":`input-group-control`,className:K(`flex-1 resize-none rounded-none border-0 bg-transparent py-2 shadow-none ring-0 focus-visible:ring-0 disabled:bg-transparent aria-invalid:ring-0 dark:bg-transparent dark:disabled:bg-transparent`,e),...t})}function cw({className:e,...t}){return(0,G.jsx)(`label`,{"data-slot":`label`,className:K(`flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50`,e),...t})}var lw=U.forwardRef(function(e,t){let{className:n,render:r,orientation:i=`horizontal`,style:a,...o}=e;return sa(`div`,e,{state:{orientation:i},ref:t,props:[{role:`separator`,"aria-orientation":i},o]})});function uw({className:e,orientation:t=`horizontal`,...n}){return(0,G.jsx)(lw,{"data-slot":`separator`,orientation:t,className:K(`shrink-0 bg-border data-horizontal:h-px data-horizontal:w-full data-vertical:w-px data-vertical:self-stretch`,e),...n})}function dw({className:e,...t}){return(0,G.jsx)(`fieldset`,{"data-slot":`field-set`,className:K(`flex flex-col gap-4 has-[>[data-slot=checkbox-group]]:gap-3 has-[>[data-slot=radio-group]]:gap-3`,e),...t})}function fw({className:e,variant:t=`legend`,...n}){return(0,G.jsx)(`legend`,{"data-slot":`field-legend`,"data-variant":t,className:K(`mb-1.5 font-medium data-[variant=label]:text-sm data-[variant=legend]:text-base`,e),...n})}var pw=Xb(`group/field flex w-full gap-2 data-[invalid=true]:text-destructive`,{variants:{orientation:{vertical:`flex-col *:w-full [&>.sr-only]:w-auto`,horizontal:`flex-row items-center has-[>[data-slot=field-content]]:items-start *:data-[slot=field-label]:flex-auto has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px`,responsive:`flex-col *:w-full @md/field-group:flex-row @md/field-group:items-center @md/field-group:*:w-auto @md/field-group:has-[>[data-slot=field-content]]:items-start @md/field-group:*:data-[slot=field-label]:flex-auto [&>.sr-only]:w-auto @md/field-group:has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px`}},defaultVariants:{orientation:`vertical`}});function mw({className:e,orientation:t=`vertical`,...n}){return(0,G.jsx)(`div`,{role:`group`,"data-slot":`field`,"data-orientation":t,className:K(pw({orientation:t}),e),...n})}function hw({className:e,...t}){return(0,G.jsx)(`div`,{"data-slot":`field-content`,className:K(`group/field-content flex flex-1 flex-col gap-0.5 leading-snug`,e),...t})}function gw({className:e,...t}){return(0,G.jsx)(cw,{"data-slot":`field-label`,className:K(`group/field-label peer/field-label flex w-fit gap-2 leading-snug group-data-[disabled=true]/field:opacity-50 has-data-checked:border-primary/30 has-data-checked:bg-primary/5 has-[>[data-slot=field]]:rounded-lg has-[>[data-slot=field]]:border has-[>[data-slot=field]]:not-has-[:disabled,[data-disabled]]:hover:bg-muted/50 has-[>[data-slot=field]]:has-[:focus-visible]:border-ring has-[>[data-slot=field]]:has-[:focus-visible]:ring-3 has-[>[data-slot=field]]:has-[:focus-visible]:ring-ring/50 *:data-[slot=field]:p-2.5 dark:has-data-checked:border-primary/20 dark:has-data-checked:bg-primary/10`,`has-[>[data-slot=field]]:w-full has-[>[data-slot=field]]:flex-col`,e),...t})}function _w({className:e,...t}){return(0,G.jsx)(`p`,{"data-slot":`field-description`,className:K(`text-left text-sm leading-normal font-normal text-muted-foreground group-has-data-horizontal/field:text-balance [[data-variant=legend]+&]:-mt-1.5`,`last:mt-0 nth-last-2:-mt-1`,`[&>a]:underline [&>a]:underline-offset-4 [&>a:hover]:text-primary`,e),...t})}function vw({className:e,children:t,errors:n,...r}){let i=(0,U.useMemo)(()=>{if(t)return t;if(!n?.length)return null;let e=[...new Map(n.map(e=>[e?.message,e])).values()];return e?.length==1?e[0]?.message:(0,G.jsx)(`ul`,{className:`ml-4 flex list-disc flex-col gap-1`,children:e.map((e,t)=>e?.message&&(0,G.jsx)(`li`,{children:e.message},t))})},[t,n]);return i?(0,G.jsx)(`div`,{role:`alert`,"data-slot":`field-error`,className:K(`text-sm font-normal text-destructive`,e),...r,children:i}):null}function yw({controlled:e,default:t,name:n,state:r=`value`}){let{current:i}=U.useRef(e!==void 0),[a,o]=U.useState(()=>t);return[i&&e!==void 0?e:a,U.useCallback(e=>{i||o(e)},[])]}var bw={clipPath:`inset(50%)`,overflow:`hidden`,whiteSpace:`nowrap`,border:0,padding:0,width:1,height:1,margin:-1},xw={...bw,position:`fixed`,margin:0,top:0,left:0},Sw={...bw,position:`absolute`};function Cw(e){if(!e)return null;for(let t of e.elements){let e=t.tagName;if(e===`BUTTON`||e===`INPUT`){let e=t;if(e.type===`submit`)return e}}return null}var ww=`data-checked`,Tw=`data-unchecked`;function Ew(e){return{checked(t){return e.indeterminate?{}:t?{[ww]:``}:{[Tw]:``}},...ix}}var Dw=U.createContext(void 0);function Ow(){return U.useContext(Dw)}var kw=U.createContext(void 0);function Aw(){let e=U.useContext(kw);if(e===void 0)throw Error(ha(14));return e}var jw=`data-parent`,Mw=U.forwardRef(function(e,t){let{checked:n,className:r,defaultChecked:i=!1,"aria-labelledby":a,disabled:o=!1,form:s,id:c,indeterminate:l=!1,inputRef:u,name:d,onCheckedChange:f,parent:p=!1,readOnly:m=!1,render:h,required:g=!1,uncheckedValue:_,value:v,nativeButton:y=!1,style:b,...x}=e,{clearErrors:S}=lx(),{disabled:C,name:w,setDirty:T,setFilled:E,setTouched:D,state:O,validationMode:k,validityData:A,validation:j}=sx(),M=DC(),{labelId:N,registerControlId:P,getDescriptionProps:F}=_x(),I=Ow(),L=I?.allValues===void 0?void 0:I.parent,R=L!==void 0,z=C||M.disabled||I?.disabled||o,B=w??d,ee=v??B,V=hx(),te=I?.registerControlId!==P,ne=xx({id:c||void 0,enabled:te}),H=y?ne:V,re={};R&&(p?re=L.getParentProps():ee!==void 0&&(re=L.getChildProps(ee)));let{checked:ie=n,indeterminate:ae=l,onCheckedChange:oe,...se}=re,ce=I?.value,le=U.useRef(null),ue=OC(z,le),{getButtonProps:de,buttonRef:fe}=Hb({disabled:z,native:y}),pe=I?.validation??j,[W,me]=yw({controlled:ee!==void 0&&ce!==void 0&&!p?ce.includes(ee):ie,default:i,name:`Checkbox`,state:`checked`}),he=R?!!ie:W,ge=R&&ae||l;kC(le,V,W,void 0,!I&&!z,d);let _e=L?.registerChildId,ve=U.useRef(null),ye=pe.registerInput,be=I?ee:void 0,xe=U.useCallback(e=>ye(e,{controlRef:le,value:be}),[ye,be]),Se=ji(u,ve,p?void 0:xe),Ce=vx(a,N,ve,!y,ne,x[`aria-label`]);J(()=>{ve.current&&(ve.current.indeterminate=ge),I||E(W)},[W,ge,I,E]),AC(W,()=>{I||(S(B),T(W!==A.initialValue),pe.change(W))});let we=Ji({checked:W,disabled:z,form:s,name:p?void 0:B,id:y?void 0:ne,required:g,ref:Se,style:B?Sw:xw,tabIndex:-1,type:`checkbox`,"aria-hidden":!0,onChange(e){if(e.nativeEvent.defaultPrevented)return;if(m){e.preventDefault();return}let t=e.currentTarget.checked,n=$(MC,e.nativeEvent);if(f?.(t,n),!n.isCanceled&&(oe?.(t,n),!n.isCanceled&&(me(t),ee!==void 0&&I!==void 0&&!p&&!R))){let e=t?[...I.value,ee]:I.value.filter(e=>e!==ee);I.setValue(e,n)}},onClick(e){e.stopPropagation()},onFocus(){le.current?.focus()}},v===void 0?Ui:{value:(I?W&&v:v)||``},F,e=>pe.getValidationProps(z,e));U.useEffect(()=>{if(!L||ee===void 0)return;let e=L.disabledStatesRef.current;return e.set(ee,z),()=>{e.delete(ee)}},[L,z,ee]);let Te=U.useMemo(()=>({...O,checked:he,disabled:z,readOnly:m,required:g,indeterminate:ge}),[O,he,z,m,g,ge]),Ee=Ew(Te),De=sa(`span`,e,{state:Te,ref:[fe,le,t],props:[{id:H,role:`checkbox`,"aria-checked":ge?`mixed`:he,"aria-readonly":m||void 0,"aria-required":g||void 0,"aria-labelledby":Ce,[jw]:p?``:void 0,onFocus(){ue(!0)},onBlur(){let e=ve.current;e&&(D(!0),ue(!1),k===`onBlur`&&pe.commit(I?ce:e.checked))},onKeyDown(e){if(e.key!==`Enter`||(e.preventBaseUIHandler(),e.defaultPrevented))return;let t=ve.current?.form??null,n=e.currentTarget,r=e.nativeEvent,i=e.preventDefault,a=r.preventDefault,o=!1;e.preventDefault=()=>{o=!0,i.call(e)},r.preventDefault=()=>{o=!0,a.call(r)},a.call(r),mb(n).queueMicrotask(()=>{e.preventDefault=i,r.preventDefault=a,o||Cw(t)?.click()})},onClick(e){if(m||z)return;e.preventDefault();let t=ve.current;t&&Vb(t,e)}},x,se,de,F,e=>pe.getValidationProps(z,e)],stateAttributesMapping:Ee}),Oe=De.props.id;return J(()=>{if(_e&&!p&&ee!==void 0&&Oe!==void 0)return _e(ee,Oe)},[_e,p,ee,Oe]),(0,G.jsxs)(kw.Provider,{value:Te,children:[De,!W&&!I&&B&&!p&&_!==void 0&&(0,G.jsx)(`input`,{type:`hidden`,form:s,name:B,value:_,disabled:z}),(0,G.jsx)(`input`,{...we,suppressHydrationWarning:!0})]})}),Nw=U.forwardRef(function(e,t){let{render:n,className:r,style:i,keepMounted:a=!1,...o}=e,s=Aw(),c=s.checked||s.indeterminate,{mounted:l,transitionStatus:u,setMounted:d}=Va(c),f=U.useRef(null),p={...s,transitionStatus:u};La({batch:!0,enabled:!c,open:c,ref:f,onComplete(){c||d(!1)}});let m={...Ew(s),...Ba},h=a||l,g=sa(`span`,e,{ref:[t,f],state:p,stateAttributesMapping:m,props:o});return h?g:null});function Pw({className:e,...t}){return(0,G.jsx)(Mw,{"data-slot":`checkbox`,className:K(`peer relative flex size-4 shrink-0 items-center justify-center rounded-[4px] border border-input transition-colors outline-none group-has-disabled/field:opacity-50 group-has-[:focus-visible]/field-label:ring-0 group-has-[:focus-visible]/field-label:not-data-checked:border-input after:absolute after:-inset-x-3 after:-inset-y-2 focus-visible:border-transparent focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 aria-invalid:aria-checked:border-primary dark:bg-input/30 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 data-checked:border-primary data-checked:bg-primary data-checked:text-primary-foreground group-has-[:focus-visible]/field-label:data-checked:border-primary dark:data-checked:bg-primary`,e),...t,children:(0,G.jsx)(Nw,{"data-slot":`checkbox-indicator`,className:`grid place-content-center text-current transition-none data-checked:animate-in data-checked:zoom-in-50 data-checked:duration-150 motion-reduce:animate-none [&>svg]:size-3.5`,children:t.indeterminate?(0,G.jsx)(Un,{}):(0,G.jsx)(dn,{})})})}function Fw({className:e,...t}){return(0,G.jsx)(`kbd`,{"data-slot":`kbd`,className:K(`pointer-events-none inline-flex h-5 w-fit min-w-5 items-center justify-center gap-1 rounded-[5px] border border-border bg-background px-1.5 font-sans text-[11px] font-medium text-muted-foreground shadow-[inset_0_-1.5px_0_var(--border)] select-none dark:bg-muted/40 [&_svg:not([class*='size-'])]:size-3`,e),...t})}function Iw({className:e,...t}){return(0,G.jsx)(`kbd`,{"data-slot":`kbd-group`,className:K(`inline-flex items-center gap-1`,e),...t})}function Lw(e){let t=U.useRef(!0);t.current&&(t.current=!1,e())}function Rw(e){let[t,n]=U.useState({current:e,previous:null});return Object.is(e,t.current)||n({current:e,previous:t.current}),t.previous}function zw(e){return e==null||e.hasAttribute(`disabled`)||e.getAttribute(`aria-disabled`)===`true`}function Bw(e){let t=Ai(Vw,e).current;return t.next=e,J(t.effect),t}function Vw(e){let t={current:e,next:e,effect:()=>{t.current=t.next}};return t}var Hw=[],Uw=void 0;function Ww(){return Uw}function Gw(e){Hw.push(e)}function Kw(e){let t=(t,n)=>{let r=Ai(Jw).current,i;try{Uw=r;for(let e of Hw)e.before(r);i=e(t,n);for(let e of Hw)e.after(r);r.didInitialize=!0}finally{Uw=void 0}return i};return t.displayName=e.displayName||e.name,t}function qw(e){return U.forwardRef(Kw(e))}function Jw(){return{didInitialize:!1}}var Yw=Ri(19)?Qw:$w;function Xw(e,t,n,r,i){return Yw(e,t,n,r,i)}function Zw(e,t,n,r,i){let a=U.useCallback(()=>t(e.getSnapshot(),n,r,i),[e,t,n,r,i]);return(0,ou.useSyncExternalStore)(e.subscribe,a,a)}Gw({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){let r=e.syncHooks[n],i=r.selector(r.store.state,r.a1,r.a2,r.a3);Object.is(r.value,i)||(t=!0,r.value=i)}return t&&(e.syncTick+=1),e.syncTick})},after(e){e.syncHooks.length>0&&(e.didChangeStore&&(e.didChangeStore=!1,e.subscribe=t=>{let n=new Set;for(let t of e.syncHooks)n.add(t.store);let r=[];for(let e of n)r.push(e.subscribe(t));return()=>{for(let e of r)e()}}),(0,ou.useSyncExternalStore)(e.subscribe,e.getSnapshot,e.getSnapshot))}});function Qw(e,t,n,r,i){let a=Ww();if(!a)return Zw(e,t,n,r,i);let o=a.syncIndex;a.syncIndex+=1;let s;return a.didInitialize?(s=a.syncHooks[o],(s.store!==e||s.selector!==t||!Object.is(s.a1,n)||!Object.is(s.a2,r)||!Object.is(s.a3,i))&&(s.store!==e&&(a.didChangeStore=!0),s.store=e,s.selector=t,s.a1=n,s.a2=r,s.a3=i,s.value=t(e.getSnapshot(),n,r,i))):(s={store:e,selector:t,a1:n,a2:r,a3:i,value:t(e.getSnapshot(),n,r,i)},a.syncHooks.push(s)),s.value}function $w(e,t,n,r,i){return(0,su.useSyncExternalStoreWithSelector)(e.subscribe,e.getSnapshot,e.getSnapshot,e=>t(e,n,r,i))}var eT=class{static create(e){return new this(e)}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;let t=this.updateTick;for(let n of this.listeners){if(t!==this.updateTick)return;n(e)}}update(e){for(let t in e)if(!Object.is(this.state[t],e[t])){this.setState({...this.state,...e});return}}set(e,t){Object.is(this.state[e],t)||this.setState({...this.state,[e]:t})}notifyAll(){let e={...this.state};this.setState(e)}use(e,t,n,r){return Xw(this,e,t,n,r)}},tT=class extends eT{constructor(e,t={},n){super(e),this.context=t,this.selectors=n}useSyncedValue(e,t){U.useDebugValue(e);let n=this;J(()=>{n.state[e]!==t&&n.set(e,t)},[n,e,t])}useSyncedValueWithCleanup(e,t){let n=this;J(()=>(n.state[e]!==t&&n.set(e,t),()=>{n.set(e,void 0)}),[n,e,t])}useSyncedValues(e){let t=this;J(()=>{t.update(e)},[t,...Object.values(e)])}useControlledProp(e,t){U.useDebugValue(e);let n=this,r=t!==void 0;J(()=>{r&&!Object.is(n.state[e],t)&&n.setState({...n.state,[e]:t})},[n,e,t,r])}select(e,t,n,r){let i=this.selectors[e];return i(this.state,t,n,r)}useState(e,t,n,r){return U.useDebugValue(e),Xw(this,this.selectors[e],t,n,r)}useContextCallback(e,t){U.useDebugValue(e);let n=q(t??Vi);this.context[e]=n}useStateSetter(e){let t=U.useRef(void 0);return t.current===void 0&&(t.current=t=>{this.set(e,t)}),t.current}observe(e,t){let n;n=typeof e==`function`?e:this.selectors[e];let r=n(this.state);return t(r,r,this),this.subscribe(e=>{let i=n(e);if(!Object.is(r,i)){let e=r;r=i,t(i,e,this)}})}};function nT(...e){return()=>{for(let t=0;t<e.length;t+=1){let n=e[t];n&&n()}}}function rT(e,t,n,r){return e.addEventListener(t,n,r),()=>{e.removeEventListener(t,n,r)}}function iT(e,t){return t!=null&&!bS(t)?0:typeof e==`function`?e():e}function aT(e,t,n){let r=iT(e,n);return typeof r==`number`?r:r?.[t]}function oT(e){return typeof e==`function`?e():e}function sT(e,t){return t||e===`click`||e===`mousedown`}function cT(e){return e?.includes(`mouse`)&&e!==`mousedown`}var lT=U.createContext({hasProvider:!1,timeoutMs:0,delayRef:{current:0},initialDelayRef:{current:0},timeout:new Ka,currentIdRef:{current:null},currentContextRef:{current:null}});function uT(e,t){e.current=t.current}function dT(e){let{children:t,delay:n,timeoutMs:r=0}=e,i=U.useRef(n),a=U.useRef(n),o=U.useRef(null),s=U.useRef(null),c=qa();return J(()=>{a.current=n,o.current?i.current={open:aT(i.current,`open`),close:aT(n,`close`)}:i.current=n},[n,o,i,a]),(0,G.jsx)(lT.Provider,{value:U.useMemo(()=>({hasProvider:!0,delayRef:i,initialDelayRef:a,currentIdRef:o,timeoutMs:r,currentContextRef:s,timeout:c}),[r,c]),children:t})}function fT(e,t={open:!1}){let{open:n}=t,r=e.useState(`floatingId`),{currentIdRef:i,delayRef:a,timeoutMs:o,initialDelayRef:s,currentContextRef:c,hasProvider:l,timeout:u}=U.useContext(lT),[d,f]=U.useState(!1),p=U.useRef(n);return J(()=>{p.current=n},[n]),J(()=>{function t(){c.current?.setIsInstantPhase(!1),i.current=null,c.current=null,a.current=s.current,u.clear()}if(i.current&&!n&&i.current===r){if(f(!1),o){let n=r;return u.start(o,()=>{e.select(`open`)||i.current&&i.current!==n||t()}),()=>{(p.current||i.current!==n)&&u.clear()}}t()}},[n,r,i,a,o,s,c,u,e]),J(()=>{if(!n)return;let t=c.current,o=i.current;u.clear(),c.current={onOpenChange:e.setOpen,setIsInstantPhase:f},i.current=r,a.current={open:0,close:aT(s.current,`close`)},o!==null&&o!==r?(f(!0),t?.setIsInstantPhase(!0),t?.onOpenChange(!1,$(MC))):(f(!1),t?.setIsInstantPhase(!1))},[n,r,e,i,a,s,c,u]),J(()=>()=>{if(i.current===r){if(c.current=null,!p.current)return;i.current=null,uT(a,s),u.clear()}},[c,i,a,r,s,u]),U.useMemo(()=>({activeIdRef:i,hasProvider:l,delayRef:a,isInstantPhase:d}),[i,l,a,d])}var pT=U.forwardRef(function(e,t){let[n,r]=U.useState();J(()=>{Px&&Nx&&r(`button`)},[]);let i={tabIndex:0,role:n};return(0,G.jsx)(`span`,{...e,ref:t,style:xw,"aria-hidden":!n||void 0,...i,"data-base-ui-focus-guard":``})});function mT(e){return`data-base-ui-${e}`}var hT=0;function gT(e,t={}){let{preventScroll:n=!1,sync:r=!1,shouldFocus:i}=t;cancelAnimationFrame(hT);function a(){(!i||i())&&e?.focus({preventScroll:n})}if(r)return a(),Vi;let o=requestAnimationFrame(a);return hT=o,()=>{hT===o&&(cancelAnimationFrame(o),hT=0)}}var _T=`data-base-ui-inert`,vT=new WeakMap,yT=new WeakSet,bT=new WeakMap,xT=0;function ST(e){return e?yb(e)?e.host:ST(e.parentNode):null}var CT=(e,t)=>t.map(t=>{if(e.contains(t))return t;let n=ST(t);return e.contains(n)?n:null}).filter(e=>e!=null),wT=e=>{let t=new Set;return e.forEach(e=>{let n=e;for(;n&&!t.has(n);)t.add(n),n=n.parentNode}),t},TT=(e,t,n)=>{let r=[],i=e=>{e&&!n.has(e)&&Array.from(e.children).forEach(e=>{pb(e)!==`script`&&(t.has(e)?i(e):r.push(e))})};return i(e),r};function ET(e,t,n,{mark:r=!0}){let i=CT(t,e),a=r?TT(t,wT(i),new Set(i)):[],o=[],s=[];if(n){let e=CT(t,Array.from(t.querySelectorAll(`[aria-live]`))),n=i.concat(e);TT(t,wT(n),new Set(n)).forEach(e=>{let t=e.getAttribute(`aria-hidden`),n=t!==null&&t!==`false`,r=(vT.get(e)||0)+1;vT.set(e,r),o.push(e),r===1&&n&&yT.add(e),n||e.setAttribute(`aria-hidden`,`true`)})}return r&&a.forEach(e=>{let t=(bT.get(e)||0)+1;bT.set(e,t),s.push(e),t===1&&e.setAttribute(_T,``)}),xT+=1,()=>{o.forEach(e=>{let t=(vT.get(e)||0)-1;vT.set(e,t),t||(yT.has(e)||e.removeAttribute(`aria-hidden`),yT.delete(e))}),r&&s.forEach(e=>{let t=(bT.get(e)||0)-1;bT.set(e,t),t||e.removeAttribute(_T)}),--xT,xT||(vT=new WeakMap,yT=new WeakSet,bT=new WeakMap)}}function DT(e,t={}){let{ariaHidden:n=!1,mark:r=!0}=t,i=Bb(e[0]).body;return ET(e,i,n,{mark:r})}var OT={style:{transition:`none`}},kT=`data-base-ui-click-trigger`,AT={fallbackAxisSide:`none`},jT={fallbackAxisSide:`end`},MT={clipPath:`inset(50%)`,position:`fixed`,top:0,left:0},NT=U.createContext(null),PT=()=>U.useContext(NT),FT=mT(`portal`);function IT(e={}){let{ref:t,container:n,componentProps:r=Ui,elementProps:i}=e,a=mx(),o=PT()?.portalNode,[s,c]=U.useState(null),[l,u]=U.useState(null),d=q(e=>{e!==null&&u(e)}),f=U.useRef(null);J(()=>{if(n===null){f.current&&(f.current=null,u(null),c(null));return}let e=(n&&(gb(n)?n:n.current))??o??document.body;e==null?f.current&&(f.current=null,u(null),c(null)):f.current!==e&&(f.current=e,u(null),c(e))},[n,o]);let p=sa(`div`,r,{ref:[t,d],props:[{id:a,[FT]:``},i]}),m=s&&p?W.createPortal(p,s):null;return{node:l,nodeId:U.isValidElement(p)?p.props.id:void 0,subtree:m}}var LT=U.forwardRef(function(e,t){let{render:n,className:r,style:i,children:a,container:o,portalOwnerRole:s,...c}=e,{node:l,nodeId:u,subtree:d}=IT({container:o,ref:t,componentProps:e,elementProps:c}),f=U.useRef(null),p=U.useRef(null),m=U.useRef(null),h=U.useRef(null),[g,_]=U.useState(null),v=U.useRef(!1),y=g?.modal,b=g?.open,x=!!g&&!g.modal&&g.open&&!!l;U.useEffect(()=>{if(!l||y)return;function e(e){l&&e.relatedTarget&&CC(e)&&(e.type===`focusin`?v.current&&=(TC(l),!1):(wC(l),v.current=!0))}return nT(rT(l,`focusin`,e,!0),rT(l,`focusout`,e,!0))},[l,y]),J(()=>{l&&b===!0&&v.current&&(TC(l),v.current=!1)},[b,l]);let S=U.useMemo(()=>({beforeOutsideRef:f,afterOutsideRef:p,beforeInsideRef:m,afterInsideRef:h,portalNode:l,setFocusManagerState:_}),[l]);return(0,G.jsxs)(U.Fragment,{children:[d,(0,G.jsxs)(NT.Provider,{value:S,children:[x&&l&&(0,G.jsx)(pT,{"data-type":`outside`,ref:f,onFocus:e=>{CC(e,l)?m.current?.focus():xC(g?g.domReference:null)?.focus()}}),x&&l&&(0,G.jsx)(`span`,{role:s,"aria-owns":u,style:MT}),l&&W.createPortal(a,l),x&&l&&(0,G.jsx)(pT,{"data-type":`outside`,ref:p,onFocus:e=>{CC(e,l)?h.current?.focus():(bC(g?g.domReference:null)?.focus(),g?.closeOnFocusOut&&g?.onOpenChange(!1,$(`focus-out`,e.nativeEvent)))}})]})]})});function RT(){let 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 zT=class{nodesRef={current:[]};events=RT();addNode(e){this.nodesRef.current.push(e)}removeNode(e){let t=this.nodesRef.current.findIndex(t=>t===e);t!==-1&&this.nodesRef.current.splice(t,1)}},BT=U.createContext(null),VT=U.createContext(null),HT=()=>U.useContext(BT)?.id||null,UT=e=>{let t=U.useContext(VT);return e??t};function WT(e){let t=mx(),n=UT(e),r=HT();return J(()=>{if(!t)return;let e={id:t,parentId:r};return n?.addNode(e),()=>{n?.removeNode(e)}},[n,t,r]),t}function GT(e){let{children:t,id:n}=e,r=HT();return(0,G.jsx)(BT.Provider,{value:U.useMemo(()=>({id:n,parentId:r}),[n,r]),children:t})}function KT(e){let{children:t,externalTree:n}=e,r=Ai(()=>n??new zT).current;return(0,G.jsx)(VT.Provider,{value:r,children:t})}function qT(e,t){let n=mb(Rx(e));return e instanceof n.KeyboardEvent?`keyboard`:e instanceof n.FocusEvent?t||`keyboard`:`pointerType`in e?e.pointerType||(vS(e)?`keyboard`:t||`mouse`):`touches`in e?`touch`:e instanceof n.MouseEvent?t||(e.detail===0?`keyboard`:`mouse`):``}var JT=20,YT=[];function XT(){YT=YT.filter(e=>e.deref()?.isConnected)}function ZT(e){XT(),e&&pb(e)!==`body`&&(YT.push(new WeakRef(e)),YT.length>JT&&(YT=YT.slice(-20)))}function QT(){return XT(),YT[YT.length-1]?.deref()}function $T(e){return e?gC(e)?e:vC(e)[0]||e:null}function eE(e){if(e.hasAttribute(`tabindex`)&&!e.hasAttribute(`data-tabindex`)||!e.getAttribute(`role`)?.includes(`dialog`))return;let t=_C(e).filter(e=>{let t=e.getAttribute(`data-tabindex`)||``;return gC(e)||e.hasAttribute(`data-tabindex`)&&!t.startsWith(`-`)}),n=e.getAttribute(`tabindex`);t.length===0?n!==`0`&&(e.setAttribute(`tabindex`,`0`),e.setAttribute(`data-tabindex`,`0`)):(n!==`-1`||e.hasAttribute(`data-tabindex`)&&e.getAttribute(`data-tabindex`)!==`-1`)&&(e.setAttribute(`tabindex`,`-1`),e.setAttribute(`data-tabindex`,`-1`))}function tE(e){let{context:t,children:n,disabled:r=!1,initialFocus:i=!0,returnFocus:a=!0,explicitReturnFocus:o,restoreFocus:s=!1,modal:c=!0,closeOnFocusOut:l=!0,openInteractionType:u=``,nextFocusableElement:d,previousFocusableElement:f,beforeContentFocusGuardRef:p,externalTree:m,getInsideElements:h}=e,g=t.useState(`open`),_=t.useState(`domReferenceElement`),v=t.useState(`floatingElement`),{events:y,dataRef:b}=t.context,x=q(()=>b.current.floatingContext?.nodeId),S=i===!1,C=dS(_)&&S,w=Bw(i),T=Bw(a),E=Bw(o),D=Bw(u),O=Bw(g),k=UT(m),A=PT(),j=U.useRef(!1),M=U.useRef(!1),N=U.useRef(!1),P=U.useRef(null),F=U.useRef(``),I=U.useRef(``),L=U.useRef(null),R=U.useRef(null),z=ji(L,p,A?.beforeInsideRef),B=ji(R,A?.afterInsideRef),ee=qa(),V=qa(),te=ka(),ne=A!=null,H=pS(v),re=q((e=H)=>e?vC(e):[]),ie=q(()=>h?.().filter(e=>e!=null)??[]);U.useEffect(()=>{if(r||!c)return;function e(e){e.key===`Tab`&&Q(H,Ix(Bb(H)))&&re().length===0&&!C&&gS(e)}return rT(Bb(H),`keydown`,e)},[r,H,c,C,re]),U.useEffect(()=>{if(r||!g)return;let e=Bb(H);function t(){N.current=!1}function n(e){let t=Rx(e),n=ie(),r=Q(v,t)||Q(_,t)||Q(A?.portalNode,t)||n.some(e=>e===t||Q(e,t));N.current=!r,I.current=e.pointerType||`keyboard`,Lx(t,`[data-base-ui-click-trigger]`)&&(M.current=!0,V.start(0,()=>{M.current=!1}))}function i(){I.current=`keyboard`}return nT(rT(e,`pointerdown`,n,!0),rT(e,`pointerup`,t,!0),rT(e,`pointercancel`,t,!0),rT(e,`keydown`,i,!0),t)},[r,v,_,H,g,A,V,ie]),U.useEffect(()=>{if(r||!l)return;let e=Bb(H);function n(){M.current=!0,V.start(0,()=>{M.current=!1})}function i(e){let t=Rx(e);gC(t)&&(P.current=t)}function a(n){let r=n.relatedTarget,i=n.currentTarget,a=Rx(n);c&&r==null&&a!=null&&Q(v,a)&&ZT(a),queueMicrotask(()=>{let o=x(),l=t.context.triggerElements,u=ie(),p=r?.hasAttribute(mT(`focus-guard`))&&[L.current,R.current,A?.beforeInsideRef.current,A?.afterInsideRef.current,A?.beforeOutsideRef.current,A?.afterOutsideRef.current,Aa(f),Aa(d)].includes(r),m=!(Q(_,r)||Q(v,r)||Q(r,v)||Q(A?.portalNode,r)||u.some(e=>e===r||Q(e,r))||l.hasMatchingElement(e=>Q(e,r))||p||k&&(mS(k.nodesRef.current,o).find(e=>Q(e.context?.elements.floating,r)||Q(e.context?.elements.domReference,r))||hS(k.nodesRef.current,o).find(e=>[e.context?.elements.floating,pS(e.context?.elements.floating)].includes(r)||e.context?.elements.domReference===r)));if(i===_&&H&&eE(H),s&&i!==_&&!nC(a)&&Ix(e)===e.body){if(vb(H)&&(H.focus(),s===`popup`)){te.request(()=>{H.focus()});return}let e=re(),t=P.current,n=(t&&e.includes(t)?t:null)||e[e.length-1]||H;vb(n)&&n.focus()}b.current.insideReactTree?b.current.insideReactTree=!1:(C||!c)&&r&&m&&!M.current&&(C||r!==QT())&&(j.current=!0,t.setOpen(!1,$(zC,n)))})}function o(){N.current||(b.current.insideReactTree=!0,ee.start(0,()=>{b.current.insideReactTree=!1}))}let u=vb(_)?_:null;if(v||u)return nT(u&&rT(u,`focusout`,a),u&&rT(u,`pointerdown`,n),v&&rT(v,`focusin`,i),v&&rT(v,`focusout`,a),v&&A&&rT(v,`focusout`,o,!0))},[r,_,v,H,c,k,A,t,l,s,re,C,x,b,ee,V,te,d,f,ie]),U.useEffect(()=>{if(r||!v||!g)return;let e=Array.from(A?.portalNode?.querySelectorAll(`[${mT(`portal`)}]`)||[]),t=(k?hS(k.nodesRef.current,x()):[]).find(e=>dS(e.context?.elements.domReference||null))?.context?.elements.domReference,n=DT([v,...e,L.current,R.current,A?.beforeOutsideRef.current,A?.afterOutsideRef.current,...ie(),t,Aa(f),Aa(d),C?_:null].filter(e=>e!=null),{ariaHidden:c||C,mark:!1}),i=DT([v,...e].filter(e=>e!=null));return()=>{i(),n()}},[g,r,_,v,c,A,C,k,x,d,f,ie]),J(()=>{if(!g||r||!vb(H))return;F.current=``,I.current=``;let e=Bb(H),t=Ix(e);queueMicrotask(()=>{let n=w.current,r=typeof n==`function`?n(D.current||``):n;if(r===void 0||r===!1||Q(H,t))return;let i=null,a=()=>(i??=re(H),i[0]||H),o;o=r===!0||r===null?a():Aa(r),o||=a();let s=Q(H,Ix(e)),c=b.current.openEvent,l=c?.type===`mousedown`&&vS(c);gT(o,{sync:l,preventScroll:o===H,shouldFocus(){if(!O.current)return!1;if(s)return!0;let t=Ix(e);return!(t!==o&&Q(H,t))}})})},[r,g,H,re,w,D,O,b]);let ae=U.useRef(null);J(()=>{if(r||!H){ae.current=null;return}ae.current&&=(ae.current.cancelled=!0,null);let e=Bb(H),t=Ix(e),n=D.current==null;ZT(t);function i(e){if(e.open||(F.current=qT(e.nativeEvent,I.current)),(e.reason===`focus-out`&&e.triggerElement?.hasAttribute(mT(`focus-guard`))||e.reason===`trigger-hover`&&e.nativeEvent.type===`mouseleave`)&&(j.current=!0),e.reason===`outside-press`){if(e.nested)j.current=!1;else if(vS(e.nativeEvent)||yS(e.nativeEvent))j.current=!1;else{let e=!1;Bb(H).createElement(`div`).focus({get preventScroll(){return e=!0,!1}}),e?j.current=!1:j.current=!0}}}y.on(`openchange`,i);function a(e){let r=T.current,i=typeof r==`function`?r(e):r;if(i===void 0||i===!1)return null;i===null&&(i=!0);let a=_?.isConnected?_:null,o=t?.isConnected&&pb(t)!==`body`?t:null,s=n?o||a:a||o;return s||=QT()||null,typeof i==`boolean`?s:Aa(i)||s||null}return()=>{y.off(`openchange`,i);let t=Ix(e),n=ie(),r=Q(v,t)||n.some(e=>e===t||Q(e,t))||k&&mS(k.nodesRef.current,x(),!1).some(e=>Q(e.context?.elements.floating,t)),o=T.current,s=F.current,c=a(s),l={cancelled:!1};ae.current=l,queueMicrotask(()=>{ae.current===l&&(ae.current=null);let n=$T(c),i=E.current??typeof o!=`boolean`;if(!l.cancelled&&o&&!j.current&&vb(n)&&(i||n===t||t===e.body||r)){let e={preventScroll:!0};s===`keyboard`&&(e.focusVisible=!0),n.focus(e)}j.current=!1})}},[r,v,H,T,E,D,y,k,_,x,ie]),J(()=>{if(!Nx||g||!v)return;let e=Ix(Bb(v));vb(e)&&lS(e)&&Q(v,e)&&e.blur()},[g,v]),J(()=>{if(!r&&A)return A.setFocusManagerState({modal:c,closeOnFocusOut:l,open:g,onOpenChange:t.setOpen,domReference:_}),()=>{A.setFocusManagerState(null)}},[r,A,c,g,t,l,_]),J(()=>{if(!r&&H)return eE(H),()=>{queueMicrotask(XT)}},[r,H]);let oe=!r&&(!c||!C)&&(ne||c);return(0,G.jsxs)(U.Fragment,{children:[oe&&(0,G.jsx)(pT,{"data-type":`inside`,ref:z,onFocus:e=>{if(c){let e=re();gT(e[e.length-1])}else A?.portalNode&&(j.current=!1,CC(e,A.portalNode)?bC(_)?.focus():Aa(f??A.beforeOutsideRef)?.focus())}}),n,oe&&(0,G.jsx)(pT,{"data-type":`inside`,ref:B,onFocus:e=>{c?gT(re()[0]):A?.portalNode&&(l&&(j.current=!0),CC(e,A.portalNode)?xC(_)?.focus():Aa(d??A.afterOutsideRef)?.focus())}})]})}function nE(e,t={}){let{enabled:n=!0,event:r=`click`,toggle:i=!0,ignoreMouse:a=!1,stickIfOpen:o=!0,touchOpenDelay:s=0,reason:c=NC}=t,l=e.context.dataRef,u=U.useRef(void 0),d=ka(),f=qa(),p=U.useMemo(()=>{function t(t,n,r,i){let a=$(c,n,r);t&&i===`touch`&&s>0?f.start(s,()=>{e.setOpen(!0,a)}):e.setOpen(t,a)}function n(t,n,r){let a=l.current.openEvent,s=e.select(`domReferenceElement`)!==n;return t&&s||!t||!i?!0:a&&(typeof o==`function`?o():o)?!r(a.type):!1}return{onPointerDown(e){u.current=bS(e.pointerType,!0)&&yS(e.nativeEvent)?`virtual`:e.pointerType},onMouseDown(i){let o=u.current,s=i.nativeEvent,c=e.select(`open`);if(i.button!==0||r===`click`||bS(o,!0)&&a)return;let l=n(c,i.currentTarget,e=>e===`click`||e===`mousedown`),f=Rx(s),p=lS(f);if(p||o===`virtual`){t(l,s,p?f:i.currentTarget,o);return}let m=i.currentTarget;d.request(()=>{t(l,s,m,o)})},onClick(i){if(r===`mousedown-only`)return;let o=u.current;r===`mousedown`&&o?u.current=void 0:bS(o,!0)&&a||t(n(e.select(`open`),i.currentTarget,e=>e===`click`||e===`mousedown`||e===`keydown`||e===`keyup`),i.nativeEvent,i.currentTarget,o)},onKeyDown(){u.current=void 0}}},[l,r,a,c,e,o,i,d,f,s]);return U.useMemo(()=>n?{reference:p}:Ui,[n,p])}function rE(e,t){let n=null,r=null,i=!1;return{contextElement:e||void 0,getBoundingClientRect(){let a=e?.getBoundingClientRect()||{width:0,height:0,x:0,y:0},o=t.axis===`x`||t.axis===`both`,s=t.axis===`y`||t.axis===`both`,c=[`mouseenter`,`mousemove`].includes(t.dataRef.current.openEvent?.type||``)&&t.pointerType!==`touch`,l=t.axis===`y`?a.width:0,u=t.axis===`x`?a.height:0,d=a.x,f=a.y;return n==null&&t.x&&o&&(n=a.x-t.x),r==null&&t.y&&s&&(r=a.y-t.y),d-=n||0,f-=r||0,(!i||c)&&(d=o&&t.x!=null?t.x:d,f=s&&t.y!=null?t.y:f),i=!0,{width:l,height:u,x:d,y:f,top:f,right:d+l,bottom:f+u,left:d}}}}function iE(e){return e!=null&&e.clientX!=null}function aE(e,t={}){let{enabled:n=!0,axis:r=`both`}=t,i=e.useState(`open`),a=e.useState(`floatingElement`),o=e.useState(`domReferenceElement`),s=e.context.dataRef,c=U.useRef(!1),l=U.useRef(null),[u,d]=U.useState(),[f,p]=U.useState([]),m=q(t=>{e.set(`positionReference`,t)}),h=q((t,n,i)=>{c.current||(!s.current.openEvent||iE(s.current.openEvent))&&e.set(`positionReference`,rE(i??o,{x:t,y:n,axis:r,dataRef:s,pointerType:u}))}),g=q(e=>{i?l.current||(h(e.clientX,e.clientY,e.currentTarget),p([])):h(e.clientX,e.clientY,e.currentTarget)}),_=bS(u)?a:i;U.useEffect(()=>{if(!n){m(o);return}if(!_)return;function e(){l.current?.(),l.current=null}let t=mb(a);function r(t){let n=Rx(t);Q(a,n)?e():h(t.clientX,t.clientY)}return!s.current.openEvent||iE(s.current.openEvent)?l.current=rT(t,`mousemove`,r):m(o),e},[_,n,a,s,o,e,h,m,f]),U.useEffect(()=>()=>{e.set(`positionReference`,null)},[e]),U.useEffect(()=>{n&&!a&&(c.current=!1)},[n,a]),U.useEffect(()=>{!n&&i&&(c.current=!0)},[n,i]);let v=U.useMemo(()=>{function e(e){d(e.pointerType)}return{onPointerDown:e,onPointerEnter:e,onMouseMove:g,onMouseEnter:g}},[g]);return U.useMemo(()=>n?{reference:v,trigger:v}:{},[n,v])}function oE(){return!1}function sE(e){return{escapeKey:typeof e==`boolean`?e:e?.escapeKey??!1,outsidePress:typeof e==`boolean`?e:e?.outsidePress??!0}}function cE(e,t={}){let{enabled:n=!0,escapeKey:r=!0,outsidePress:i=!0,outsidePressEvent:a=`sloppy`,referencePress:o=oE,bubbles:s,externalTree:c}=t,l=e.useState(`open`),u=e.useState(`floatingElement`),{dataRef:d,events:f}=e.context,p=UT(c),m=q(typeof i==`function`?i:()=>!1),h=typeof i==`function`?m:i,g=h!==!1,_=q(()=>a),{escapeKey:v,outsidePress:y}=sE(s),b=U.useRef(!1),x=U.useRef(!1),S=U.useRef(!1),C=U.useRef(!1),w=U.useRef(!1),T=U.useRef(``),E=U.useRef(null),D=qa(),O=qa(),k=qa(),A=q(()=>{O.clear(),d.current.insideReactTree=!1}),j=q(e=>{let t=d.current.floatingContext?.nodeId;return(p?mS(p.nodesRef.current,t):[]).some(t=>t.context?.open&&!t.context.dataRef.current[e])}),M=q(t=>sS(t,e.select(`floatingElement`))||sS(t,e.select(`domReferenceElement`))),N=q(t=>{o()&&e.setOpen(!1,$(NC,t.nativeEvent))}),P=q(t=>{if(!l||!n||!r||t.key!==`Escape`)return;let i=_S(t)?t.nativeEvent:t;if(w.current||i.isComposing||!v&&j(`__escapeKeyBubbles`))return;let a=$(BC,i);e.setOpen(!1,a),a.isCanceled||t.preventDefault(),!v&&!a.isPropagationAllowed&&t.stopPropagation()}),F=q(()=>{d.current.insideReactTree=!0,O.start(0,A)}),I=q(t=>{if(!l||!n||t.button!==0)return;let r=Rx(t.nativeEvent);Q(e.select(`floatingElement`),r)&&(b.current||(b.current=!0,x.current=!1))}),L=q(e=>{l&&n&&(e.defaultPrevented||e.nativeEvent.defaultPrevented)&&b.current&&(x.current=!0)});U.useEffect(()=>{function e(e){e.open||(C.current=!1)}return f.on(`openchange`,e),()=>{f.off(`openchange`,e)}},[f]),U.useEffect(()=>A,[A]),U.useEffect(()=>{if(!l||!n)return l||(C.current=!1,w.current=!1,T.current=``,E.current=null),A;d.current.__escapeKeyBubbles=v,d.current.__outsidePressBubbles=y;let t=new Ka,i=Bb(u);function a(){k.clear(),w.current=!0}function o(){w.current=!0,k.start(Nx?5:0,()=>{w.current=!1})}function s(){S.current=!0,t.start(0,()=>{S.current=!1})}function c(){b.current=!1,x.current=!1}function f(){let e=T.current,t=e===`pen`||!e?`mouse`:e,n=_(),r=typeof n==`function`?n():n;return typeof r==`string`?r:r[t]}function m(e){let t=f();return t===`intentional`&&e.type!==`click`||t===`sloppy`&&e.type===`click`}function O(e){let t=d.current.floatingContext?.nodeId,n=p&&mS(p.nodesRef.current,t).some(t=>sS(e,t.context?.elements.floating));return M(e)||n}function N(n){if(m(n)){n.type!==`click`&&!M(n)&&(t.clear(),S.current=!1),A();return}if(d.current.insideReactTree){A();return}let r=Rx(n),i=`[${mT(`inert`)}]`,a=_b(r)?r.getRootNode():null,o=Array.from((yb(a)?a:Bb(e.select(`floatingElement`))).querySelectorAll(i)),s=e.context.triggerElements;if(r&&(s.hasElement(r)||s.hasMatchingElement(e=>Q(e,r))))return;let c=_b(r)?r:null;for(;c&&!Ab(c);){let e=Nb(c);if(Ab(e)||!_b(e))break;c=e}if(!(o.length&&_b(r)&&!cS(r)&&!Q(r,e.select(`floatingElement`))&&o.every(e=>!Q(c,e)))){if(vb(r)&&!(`touches`in n)){let e=Ab(r),t=jb(r),i=/auto|scroll/,a=e||i.test(t.overflowX),o=e||i.test(t.overflowY),s=a&&r.clientWidth>0&&r.scrollWidth>r.clientWidth,c=o&&r.clientHeight>0&&r.scrollHeight>r.clientHeight,l=t.direction===`rtl`,u=c&&(l?n.offsetX<=r.offsetWidth-r.clientWidth:n.offsetX>r.clientWidth),d=s&&n.offsetY>r.clientHeight;if(u||d)return}if(!O(n)){if(f()===`intentional`){if(n.detail!==0&&!vS(n)&&!C.current)return;if(S.current){t.clear(),S.current=!1;return}}(typeof h!=`function`||h(n))&&(j(`__outsidePressBubbles`)||(e.setOpen(!1,$(IC,n)),A()))}}}function F(t){f()===`sloppy`&&t.pointerType!==`touch`&&e.select(`open`)&&n&&!M(t)&&N(t)}function I(t){if(f()!==`sloppy`||!e.select(`open`)||!n||M(t))return;let r=t.touches[0];r&&(E.current={startTime:Date.now(),startX:r.clientX,startY:r.clientY,dismissOnTouchEnd:!1,dismissOnMouseDown:!0},D.start(1e3,()=>{E.current&&(E.current.dismissOnTouchEnd=!1,E.current.dismissOnMouseDown=!1)}))}function L(e,t){let n=Rx(e);if(!n)return;let r=rT(n,e.type,()=>{t(e),r()})}function R(e){T.current=`touch`,L(e,I)}function z(e){D.clear(),e.type===`pointerdown`&&(e.button===0&&(C.current=!0),T.current=e.pointerType),(e.type!==`mousedown`||!E.current||E.current.dismissOnMouseDown)&&L(e,e=>{e.type===`pointerdown`?F(e):N(e)})}function B(e){if(e.type===`pointercancel`&&(C.current=!1),!b.current)return;let n=x.current;c(),f()===`intentional`&&(e.type===`pointercancel`?n&&s():O(e)||(n?s():(typeof h!=`function`||h(e))&&(t.clear(),S.current=!0,A())))}function ee(e){if(f()!==`sloppy`||!E.current||M(e))return;let t=e.touches[0];if(!t)return;let n=Math.abs(t.clientX-E.current.startX),r=Math.abs(t.clientY-E.current.startY),i=Math.sqrt(n*n+r*r);i>5&&(E.current.dismissOnTouchEnd=!0),i>10&&(N(e),D.clear(),E.current=null)}function V(e){L(e,ee)}function te(e){f()===`sloppy`&&E.current&&!M(e)&&(E.current.dismissOnTouchEnd&&N(e),D.clear(),E.current=null)}function ne(e){L(e,te)}let H=nT(r&&nT(rT(i,`keydown`,P),rT(i,`compositionstart`,a),rT(i,`compositionend`,o)),g&&nT(rT(i,`click`,z,!0),rT(i,`pointerdown`,z,!0),rT(i,`pointerup`,B,!0),rT(i,`pointercancel`,B,!0),rT(i,`mousedown`,z,!0),rT(i,`mouseup`,B,!0),rT(i,`touchstart`,R,{capture:!0,passive:!0}),rT(i,`touchmove`,V,{capture:!0,passive:!0}),rT(i,`touchend`,ne,{capture:!0,passive:!0})));return()=>{H(),t.clear(),c(),S.current=!1}},[d,u,r,g,h,l,n,v,y,P,A,_,j,M,p,e,D,k]);let R=U.useMemo(()=>({onKeyDown:P,onPointerDown:N,onClick:N}),[P,N]),z=U.useMemo(()=>({onKeyDown:P,onPointerDown:L,onMouseDown:L,onClickCapture:F,onMouseDownCapture(e){F(),I(e)},onPointerDownCapture(e){F(),I(e)},onMouseUpCapture:F,onTouchEndCapture:F,onTouchMoveCapture:F}),[P,F,I,L]);return U.useMemo(()=>n?{reference:R,floating:z,trigger:R}:{},[n,R,z])}function lE(e){let{popupStore:t,treatPopupAsFloatingElement:n=!1,floatingRootContext:r,floatingId:i,nested:a,onOpenChange:o}=e,s=t.useState(`open`),c=t.useState(`activeTriggerElement`),l=t.useState(n?`popupElement`:`positionerElement`),u=o;return t.useSyncedValue(`floatingId`,i),J(()=>{let e={open:s,floatingId:i,referenceElement:c,floatingElement:l};_b(c)&&(e.domReferenceElement=c),r.state.positionReference===r.state.referenceElement&&(e.positionReference=c),r.update(e)},[s,i,c,l,r]),r.context.onOpenChange=u,r.context.nested=a,r}function uE(e){let{open:t,ref:n,preventUnmountOnClose:r,setPreventUnmountOnClose:i,onUnmount:a,animateInitialOpen:o}=e,s=q(i),{mounted:c,setMounted:l,transitionStatus:u}=Va(t,!1,!1,o),d=!t&&r;J(()=>{t&&s(!1)},[t,s]);let f=U.useRef(c),p=U.useRef(!1),m=ux(),h=()=>{f.current=!1,l(!1),a()};J(()=>{f.current=c,p.current&&(p.current=!1,!t&&c&&h())});let g=q(()=>{f.current&&(t?(p.current=!0,m()):h())});return La({enabled:c&&!t&&!d,open:t,ref:n,onComplete(){t||g()}}),{mounted:c,transitionStatus:u,preventUnmountingOnClose:d,forceUnmount:g}}var dE={tabIndex:-1,[zx]:``};function fE(e){return t=>t!==`touch`||e.current}function pE(e,t=!1){let n=mx(),r=HT()!=null,i=Ai(()=>e(n,r)).current;return lE({popupStore:i,treatPopupAsFloatingElement:t,floatingRootContext:i.state.floatingRootContext,floatingId:n,nested:r,onOpenChange:i.setOpen}),i}function mE({handle:e,store:t}){return J(()=>e.attachStore(t),[e,t]),null}function hE(e){let t=e.context.triggerElements.size;e.select(`open`)&&e.state.triggerCount!==t&&e.set(`triggerCount`,t)}function gE(e,t){let n=U.useRef(null);return q(r=>{let i=n.current;if(i!==null){if(i.element===r&&i.store===t&&i.id===e)return;n.current=null;let a=i.store;a.context.triggerElements.getById(i.id)===i.element&&(a.context.triggerElements.delete(i.id),hE(a))}r!==null&&e!==void 0&&(n.current={store:t,id:e,element:r},t.context.triggerElements.add(e,r),hE(t))})}function _E(e,t,n,r=!1){let i=e.preventUnmountingOnClose;t?i=!1:r&&(i=!0);let a=n?.id??null,o=e.activeTriggerId,s=e.activeTriggerElement;return(a||t)&&(o=a,s=n??null),{open:t,preventUnmountingOnClose:i,activeTriggerId:o,activeTriggerElement:s,openedWithoutTrigger:t?n==null:e.openedWithoutTrigger}}function vE(e){let t=!1;return e.preventUnmountOnClose=()=>{t=!0},()=>t}function yE(e,t,n,r={}){let i=n.reason,a=i===PC,o=t&&i===`trigger-focus`,s=!t&&(i===`trigger-press`||i===`escape-key`),c=vE(n);if(e.context.onOpenChange?.(t,n),n.isCanceled)return;r.onBeforeDispatch?.(),e.state.floatingRootContext.dispatchOpenChange(t,n);let l=()=>{let i=_E(e.state,t,n.trigger,c()),l={...r.extraState,...i};o?l.instantType=`focus`:s?l.instantType=`dismiss`:a&&(l.instantType=void 0),e.update(l)};a?W.flushSync(l):l()}function bE(e,t,n,r){let i=n.useState(`isMountedByTrigger`,e),a=gE(e,n),o=q(t=>{let i=n.select(`open`),a=n.select(`activeTriggerId`);if(a===e){let e={activeTriggerElement:t,...i?r:null};n.update(e)}else if(a==null&&i&&!n.state.openedWithoutTrigger){let i={activeTriggerId:e??null,activeTriggerElement:t,...r};n.update(i)}}),s=q(e=>{a(e),e&&o(e)});return J(()=>(s(t.current),()=>s(null)),[s,t,n,e]),J(()=>{if(i){let e={activeTriggerElement:t.current,...r};n.update(e)}},[i,n,t,...Object.values(r)]),{registerTrigger:s,isMountedByThisTrigger:i}}function xE(e,t={}){let{closeOnActiveTriggerUnmount:n=!1}=t,r=U.useRef(null),i=e.useState(`open`);J(()=>{if(!i){r.current=null,e.state.triggerCount!==0&&e.set(`triggerCount`,0),e.state.openedWithoutTrigger&&e.set(`openedWithoutTrigger`,!1);return}let t=e.context.triggerElements.size,a={};e.state.triggerCount!==t&&(a.triggerCount=t);let o=e.select(`activeTriggerId`),s=null;if(o){let t=e.context.triggerElements.getById(o);if(t)r.current=o,t!==e.state.activeTriggerElement&&(a.activeTriggerElement=t);else{for(let[t,n]of e.context.triggerElements.entries())if(n===e.state.activeTriggerElement){a.activeTriggerId=t,a.activeTriggerElement=n,r.current=t;break}a.activeTriggerId===void 0&&(r.current===o?s=o:r.current=null)}}else r.current=null;if(!s&&!o&&!e.state.openedWithoutTrigger&&t===1){let t=e.context.triggerElements.entries().next();if(!t.done){let[e,n]=t.value;a.activeTriggerId=e,a.activeTriggerElement=n,r.current=e}}(a.triggerCount!==void 0||a.activeTriggerId!==void 0||a.activeTriggerElement!==void 0)&&e.update(a),s&&n&&queueMicrotask(()=>{if(e.select(`open`)&&e.select(`activeTriggerId`)===s&&!e.context.triggerElements.getById(s)){let t=$(MC);e.setOpen(!1,t),t.isCanceled||e.update({activeTriggerId:null,activeTriggerElement:null})}})},[i,e,e.useState(`triggerCount`),e.useState(`activeTriggerId`),e.useState(`activeTriggerElement`),n])}function SE(e,t,n,r){let{mounted:i,transitionStatus:a,forceUnmount:o}=uE({open:e,ref:t.context.popupRef,preventUnmountOnClose:t.useState(`preventUnmountingOnClose`),setPreventUnmountOnClose:e=>t.set(`preventUnmountingOnClose`,e),animateInitialOpen:r,onUnmount(){t.update({activeTriggerId:null,activeTriggerElement:null,mounted:!1,preventUnmountingOnClose:!1}),n?.(),t.context.onOpenChangeComplete?.(!1)}});return Ai(()=>(t.set(`mounted`,i),null)),t.useSyncedValues({mounted:i,transitionStatus:a}),{forceUnmount:o,transitionStatus:a}}function CE(e,t){e.useSyncedValues(t),J(()=>()=>{e.update({activeTriggerProps:Ui,inactiveTriggerProps:Ui,popupProps:Ui})},[e])}function wE(e,t){J(()=>{!t&&e.state.openMethod!==null&&e.set(`openMethod`,null)},[t,e]),J(()=>()=>{e.state.openMethod!==null&&e.set(`openMethod`,null)},[e])}var TE=class{idMap=new Map;add(e,t){this.idMap.set(e,t)}delete(e){this.idMap.delete(e)}hasElement(e){for(let t of this.idMap.values())if(t===e)return!0;return!1}hasMatchingElement(e){for(let t of this.idMap.values())if(e(t))return!0;return!1}getById(e){return this.idMap.get(e)}entries(){return this.idMap.entries()}elements(){return this.idMap.values()}get size(){return this.idMap.size}},EE={open:e=>e.open,transitionStatus:e=>e.transitionStatus,domReferenceElement:e=>e.domReferenceElement,referenceElement:e=>e.positionReference??e.referenceElement,floatingElement:e=>e.floatingElement,floatingId:e=>e.floatingId},DE=class extends tT{constructor(e){let{syncOnly:t,nested:n,onOpenChange:r,triggerElements:i,...a}=e;super({...a,positionReference:a.referenceElement,domReferenceElement:a.referenceElement},{onOpenChange:r,dataRef:{current:{}},events:RT(),nested:n,triggerElements:i},EE),this.syncOnly=t}syncOpenEvent=(e,t)=>{(!e||!this.state.open||t!=null&&xS(t))&&(this.context.dataRef.current.openEvent=e?t:void 0)};dispatchOpenChange=(e,t)=>{this.syncOpenEvent(e,t.event);let 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 OE(e,t,n=!1){return{open:!1,openProp:void 0,mounted:!1,transitionStatus:void 0,floatingRootContext:new DE({open:!1,transitionStatus:void 0,floatingElement:null,referenceElement:null,triggerElements:e,floatingId:t,syncOnly:!0,nested:n,onOpenChange:void 0}),floatingId:t,triggerCount:0,preventUnmountingOnClose:!1,payload:void 0,activeTriggerId:null,activeTriggerElement:null,openedWithoutTrigger:!1,triggerIdProp:void 0,popupElement:null,positionerElement:null,activeTriggerProps:Ui,inactiveTriggerProps:Ui,popupProps:Ui}}var kE=e=>e.triggerIdProp??e.activeTriggerId,AE=e=>e.openProp??e.open,jE=e=>(e.popupElement?.id??e.floatingId)||void 0;function ME(e,t){return t!==void 0&&AE(e)&&kE(e)===t}function NE(e,t){return ME(e,t)?!0:t!==void 0&&AE(e)&&kE(e)==null&&!e.openedWithoutTrigger&&e.triggerCount===1}var PE={open:AE,mounted:e=>e.mounted,transitionStatus:e=>AE(e)&&!e.mounted?`starting`:e.transitionStatus,floatingRootContext:e=>e.floatingRootContext,triggerCount:e=>e.triggerCount,preventUnmountingOnClose:e=>e.preventUnmountingOnClose,payload:e=>e.payload,activeTriggerId:kE,activeTriggerElement:e=>e.mounted?e.activeTriggerElement:null,popupId:jE,isTriggerActive:(e,t)=>t!==void 0&&kE(e)===t,isOpenedByTrigger:(e,t)=>ME(e,t),isMountedByTrigger:(e,t)=>t!==void 0&&kE(e)===t&&e.mounted,triggerProps:(e,t)=>t?e.activeTriggerProps:e.inactiveTriggerProps,triggerPopupId:(e,t)=>NE(e,t)?jE(e):void 0,popupProps:e=>e.popupProps,popupElement:e=>e.popupElement,positionerElement:e=>e.positionerElement};function FE(e){let t=U.useCallback(t=>e===void 0?Vi:e.subscribeStore(t),[e]),n=U.useCallback(()=>e===void 0?void 0:e.store,[e]);return(0,ou.useSyncExternalStore)(t,n,()=>e?.serverStore)}function IE(e){let{open:t=!1,onOpenChange:n,elements:r={}}=e,i=mx(),a=HT()!=null,o=Ai(()=>new DE({open:t,transitionStatus:void 0,onOpenChange:n,referenceElement:r.reference??null,floatingElement:r.floating??null,triggerElements:new TE,floatingId:i,syncOnly:!1,nested:a})).current;return J(()=>{let e={open:t,floatingId:i};r.reference!==void 0&&(e.referenceElement=r.reference,e.domReferenceElement=_b(r.reference)?r.reference:null),r.floating!==void 0&&(e.floatingElement=r.floating),o.update(e)},[t,i,r.reference,r.floating,o]),o.context.onOpenChange=n,o.context.nested=a,o}var LE=jx&&Nx;function RE(e,t={}){let{enabled:n=!0,delay:r}=t,{events:i,dataRef:a}=e.context,o=U.useRef(!1),s=U.useRef(null),c=U.useRef(!0),l=qa();U.useEffect(()=>{let t=e.select(`domReferenceElement`);if(!n)return;let r=mb(t);function i(){let t=e.select(`domReferenceElement`);!e.select(`open`)&&vb(t)&&t===Ix(Bb(t))&&(o.current=!0,s.current=t)}function a(){c.current=!0}function l(){c.current=!1}return nT(rT(r,`blur`,i),LE&&rT(r,`keydown`,a,!0),LE&&rT(r,`pointerdown`,l,!0))},[e,n]),U.useEffect(()=>{if(!n)return;function t(t){if(t.reason===`trigger-press`||t.reason===`escape-key`){let t=e.select(`domReferenceElement`);_b(t)&&(s.current=t,o.current=!0)}}return i.on(`openchange`,t),()=>{i.off(`openchange`,t)}},[i,n,e]);let u=U.useMemo(()=>{function t(){o.current=!1,s.current=null}return{onMouseLeave(){t()},onFocus(n){let i=n.currentTarget;if(o.current){if(s.current===i)return;t()}let a=Rx(n.nativeEvent);if(_b(a)){if(LE&&!n.relatedTarget){if(!c.current&&!lS(a))return}else if(!fS(a))return}let u=oS(n.relatedTarget,e.context.triggerElements),{nativeEvent:d,currentTarget:f}=n;e.select(`open`)&&u||!r?e.setOpen(!0,$(FC,d,f)):l.start(r,()=>{o.current||e.setOpen(!0,$(FC,d,f))})},onBlur(n){t();let r=n.relatedTarget,i=n.nativeEvent,o=_b(r)&&r.hasAttribute(mT(`focus-guard`))&&r.getAttribute(`data-type`)===`outside`;l.start(0,()=>{let t=e.select(`domReferenceElement`),n=Ix(Bb(t));(r||n!==t)&&(Q(a.current.floatingContext?.refs.floating.current,n)||Q(t,n)||o||oS(r??n,e.context.triggerElements)||e.setOpen(!1,$(FC,i)))})}}},[a,r,e,l]);return U.useMemo(()=>n?{reference:u,trigger:u}:{},[n,u])}var zE=class e{pointerType=void 0;interactedInside=!1;handler=void 0;blockMouseMove=!0;performedPointerEventsMutation=!1;pointerEventsScopeElement=null;pointerEventsReferenceElement=null;pointerEventsFloatingElement=null;restTimeoutPending=!1;openChangeTimeout=new Ka;restTimeout=new Ka;handleCloseOptions=void 0;static create(){return new e}dispose=()=>{this.openChangeTimeout.clear(),this.restTimeout.clear()};disposeEffect=()=>this.dispose},BE=new WeakMap;function VE(e){if(!e.performedPointerEventsMutation)return;let t=e.pointerEventsScopeElement;t&&BE.get(t)===e&&(e.pointerEventsScopeElement?.style.removeProperty(`pointer-events`),e.pointerEventsReferenceElement?.style.removeProperty(`pointer-events`),e.pointerEventsFloatingElement?.style.removeProperty(`pointer-events`),BE.delete(t)),e.performedPointerEventsMutation=!1,e.pointerEventsScopeElement=null,e.pointerEventsReferenceElement=null,e.pointerEventsFloatingElement=null}function HE(e,t){let{scopeElement:n,referenceElement:r,floatingElement:i}=t,a=BE.get(n);a&&a!==e&&VE(a),VE(e),e.performedPointerEventsMutation=!0,e.pointerEventsScopeElement=n,e.pointerEventsReferenceElement=r,e.pointerEventsFloatingElement=i,BE.set(n,e),n.style.pointerEvents=`none`,r.style.pointerEvents=`auto`,i.style.pointerEvents=`auto`}function UE(e){let t=e.context.dataRef.current,n=Ai(()=>t.hoverInteractionState??zE.create()).current;return t.hoverInteractionState||=n,Ta(t.hoverInteractionState.disposeEffect),t.hoverInteractionState}function WE(e,t={}){let{enabled:n=!0,closeDelay:r=0,nodeId:i}=t,a=e.useState(`open`),o=e.useState(`floatingElement`),s=e.useState(`domReferenceElement`),{dataRef:c}=e.context,l=UT(),u=HT(),d=UE(e),f=qa(),p=q(()=>sT(c.current.openEvent?.type,d.interactedInside)),m=q(()=>cT(c.current.openEvent?.type)),h=q(()=>{VE(d)});J(()=>{a||(d.pointerType=void 0,d.restTimeoutPending=!1,d.interactedInside=!1,h())},[a,d,h]),U.useEffect(()=>h,[h]),J(()=>{if(n&&a&&d.handleCloseOptions?.blockPointerEvents&&m()&&_b(s)&&o){let e=s,t=o,n=Bb(o),r=l?.nodesRef.current.find(e=>e.id===u)?.context?.elements.floating;r&&(r.style.pointerEvents=``);let i=d.pointerEventsScopeElement===t?null:d.pointerEventsScopeElement,a=r===t?null:r,c=d.handleCloseOptions?.getScope?.()??i??a??Lx(e,`[data-rootownerid]`)??n.body;return HE(d,{scopeElement:c,referenceElement:e,floatingElement:t}),()=>{h()}}},[n,a,s,o,d,m,l,u,h]),U.useEffect(()=>{if(!n)return;function t(){return!!(l&&u&&mS(l.nodesRef.current,u).length>0)}function a(t){let n=aT(r,`close`,d.pointerType),i=()=>{e.setOpen(!1,$(PC,t)),l?.events.emit(`floating.closed`,t)};n?d.openChangeTimeout.start(n,i):(d.openChangeTimeout.clear(),i())}function s(e){let t=Rx(e);uS(t)?d.interactedInside=Lx(t,`[aria-haspopup]`)!=null:d.interactedInside=!1}function g(){d.openChangeTimeout.clear(),f.clear(),l?.events.off(`floating.closed`,v),h()}function _(n){if(t()&&l){l.events.on(`floating.closed`,v);return}if(oS(n.relatedTarget,e.context.triggerElements))return;let r=c.current.floatingContext?.nodeId??i,o=n.relatedTarget;l&&r&&_b(o)&&mS(l.nodesRef.current,r,!1).some(e=>Q(e.context?.elements.floating,o))||(d.handler?d.handler(n):(h(),m()&&!p()&&a(n)))}function v(n){l&&u&&!t()&&f.start(0,()=>{l.events.off(`floating.closed`,v),e.setOpen(!1,$(PC,n)),l.events.emit(`floating.closed`,n)})}let y=o;return nT(y&&rT(y,`mouseenter`,g),y&&rT(y,`mouseleave`,_),y&&rT(y,`pointerdown`,s,!0),()=>{l?.events.off(`floating.closed`,v)})},[n,o,e,c,r,i,m,p,h,d,l,u,f])}var GE={current:null};function KE(e,t={}){let{enabled:n=!0,delay:r=0,handleClose:i=null,mouseOnly:a=!1,restMs:o=0,move:s=!0,triggerElementRef:c=GE,externalTree:l,isActiveTrigger:u=!0,getHandleCloseContext:d,isClosing:f,shouldOpen:p,guardStaleOpen:m=!1}=t,{dataRef:h,events:g}=e.context,_=UT(l),v=UE(e),y=U.useRef(!1),b=Bw(i),x=Bw(r),S=Bw(o),C=Bw(n),w=Bw(p),T=Bw(f),E=q(()=>sT(h.current.openEvent?.type,v.interactedInside)),D=q(()=>w.current?.()!==!1),O=q((t,n,r)=>{let i=e.context.triggerElements;if(i.hasElement(n))return!t||!Q(t,n);if(!_b(r))return!1;let a=r;return i.hasMatchingElement(e=>Q(e,a))&&(!t||!Q(t,a))}),k=q(()=>{v.handler&&=(Bb(e.select(`domReferenceElement`)).removeEventListener(`mousemove`,v.handler),void 0)}),A=q(()=>{VE(v)});return u&&(v.handleCloseOptions=i?.__options),U.useEffect(()=>k,[k]),U.useEffect(()=>{if(!n)return;function e(e){e.open?y.current=!1:(y.current=e.reason===PC,k(),v.openChangeTimeout.clear(),v.restTimeout.clear(),v.blockMouseMove=!0,v.restTimeoutPending=!1)}return g.on(`openchange`,e),()=>{g.off(`openchange`,e)}},[n,g,v,k]),U.useEffect(()=>{if(!n)return;function t(t,n=!0){let r=aT(x.current,`close`,v.pointerType);r?v.openChangeTimeout.start(r,()=>{e.setOpen(!1,$(PC,t)),_?.events.emit(`floating.closed`,t)}):n&&(v.openChangeTimeout.clear(),e.setOpen(!1,$(PC,t)),_?.events.emit(`floating.closed`,t))}let r=c.current??(u?e.select(`domReferenceElement`):null);if(!_b(r))return;function i(t){if(v.openChangeTimeout.clear(),v.blockMouseMove=!1,a&&!bS(v.pointerType))return;let n=oT(S.current),r=aT(x.current,`open`,v.pointerType),i=Rx(t),o=t.currentTarget??null,s=e.select(`domReferenceElement`),c=o;if(_b(i)&&!e.context.triggerElements.hasElement(i)){for(let t of e.context.triggerElements.elements())if(Q(t,i)){c=t;break}}_b(o)&&_b(s)&&!e.context.triggerElements.hasElement(o)&&Q(o,s)&&(c=s);let l=c!=null&&O(s,c,i),u=e.select(`open`),d=T.current?.()??e.select(`transitionStatus`)===`ending`,f=!u&&d&&y.current,p=!l&&_b(c)&&_b(s)&&Q(s,c)&&f,m=n>0&&!r,h=l&&(u||f)||p,g=!u||l;h?D()&&e.setOpen(!0,$(PC,t,c)):m||(r?v.openChangeTimeout.start(r,()=>{g&&D()&&e.setOpen(!0,$(PC,t,c))}):g&&D()&&e.setOpen(!0,$(PC,t,c)))}function o(n){if(E()){A();return}k();let r=Bb(e.select(`domReferenceElement`));v.restTimeout.clear(),v.restTimeoutPending=!1;let i=h.current.floatingContext??d?.();if(!oS(n.relatedTarget,e.context.triggerElements)){if(b.current&&i){e.select(`open`)||v.openChangeTimeout.clear();let a=c.current;v.handler=b.current({...i,tree:_,x:n.clientX,y:n.clientY,onClose(){A(),k(),C.current&&!E()&&a===e.select(`domReferenceElement`)&&t(n,!0)}}),r.addEventListener(`mousemove`,v.handler),v.handler(n)}else(v.pointerType!==`touch`||!Q(e.select(`floatingElement`),n.relatedTarget))&&t(n)}}function l(e){Q(r,e.relatedTarget)||(v.openChangeTimeout.clear(),v.restTimeout.clear(),v.restTimeoutPending=!1)}let f=m?rT(r,`mouseout`,l):void 0;return s?nT(rT(r,`mousemove`,i,{once:!0}),rT(r,`mouseenter`,i),rT(r,`mouseleave`,o),f):nT(rT(r,`mouseenter`,i),rT(r,`mouseleave`,o),f)},[k,A,h,x,e,n,b,v,u,O,E,a,s,S,c,_,C,d,T,D,m]),U.useMemo(()=>{if(!n)return;function t(e){v.pointerType=e.pointerType}return{onPointerDown:t,onPointerEnter:t,onMouseMove(t){let{nativeEvent:n}=t,r=t.currentTarget,i=e.select(`domReferenceElement`),o=e.select(`open`),s=O(i,r,t.target);if(a&&!bS(v.pointerType))return;if(o&&s&&v.handleCloseOptions?.blockPointerEvents){let t=e.select(`floatingElement`);if(t){let e=v.handleCloseOptions?.getScope?.()??r.ownerDocument.body;HE(v,{scopeElement:e,referenceElement:r,floatingElement:t})}}let c=oT(S.current);if(o&&!s||c===0||!s&&v.restTimeoutPending&&t.movementX**2+t.movementY**2<2)return;v.restTimeout.clear();function l(){if(v.restTimeoutPending=!1,E())return;let t=e.select(`open`);!v.blockMouseMove&&(!t||s)&&D()&&e.setOpen(!0,$(PC,n,r))}v.pointerType===`touch`?W.flushSync(()=>{l()}):s&&o?l():(v.restTimeoutPending=!0,v.restTimeout.start(c,l))}}},[n,v,E,O,a,e,S,D])}function qE(e){return Nx&&e.movementX===0&&e.movementY===0}function JE(e,t,n){switch(e){case`vertical`:return t;case`horizontal`:return n;default:return t||n}}function YE(e,t){return JE(t,e===`ArrowUp`||e===`ArrowDown`,e===`ArrowLeft`||e===`ArrowRight`)}function XE(e,t,n){return JE(t,e===`ArrowDown`,n?e===`ArrowLeft`:e===`ArrowRight`)||e===`Enter`||e===` `||e===``}function ZE(e,t,n){return JE(t,n?e===Vx:e===Hx,e===Wx)}function QE(e,t,n,r){return t===`both`||t===`horizontal`&&r?e===`Escape`:JE(t,n?e===Hx:e===Vx,e===Ux)}function $E(e,t){let{listRef:n,activeIndex:r,onNavigate:i=()=>{},enabled:a=!0,selectedIndex:o=null,allowEscape:s=!1,loopFocus:c=!1,nested:l=!1,rtl:u=!1,virtual:d=!1,focusItemOnOpen:f=`auto`,focusItemOnHover:p=!0,openOnArrowKeyDown:m=!0,disabledIndices:h=void 0,orientation:g=`vertical`,triggerOrientation:_=g,parentOrientation:v,id:y,resetOnPointerLeave:b=!0,externalTree:x,nestedReturnFocusRef:S,grid:C}=t,w=C!=null,T=e.useState(`open`),E=e.useState(`floatingElement`),D=e.useState(`domReferenceElement`),O=e.context.dataRef,k=pS(E),A=dS(D),j=Bw(k),M=HT(),N=UT(x),P=U.useRef(f),F=U.useRef(o??-1),I=U.useRef(null),L=U.useRef(!0),R=q(e=>{i(F.current===-1?null:F.current,e)}),z=U.useRef(!!E),B=U.useRef(T),ee=U.useRef(!1),V=U.useRef(!1),te=U.useRef(null),ne=Bw(h),H=Bw(T),re=Bw(o),ie=Bw(b),ae=ka(),oe=ka(),se=q(()=>{ae.cancel();function e(e){d||(te.current=gT(e,{sync:ee.current,preventScroll:!0}))}let t=n.current[F.current],r=V.current;t&&e(t),(ee.current?e=>e():e=>ae.request(e))(()=>{let i=n.current[F.current]||t;i&&(t||e(i),pe&&(r||!L.current)&&i.scrollIntoView?.({block:`nearest`,inline:`nearest`}))})});J(()=>{O.current.orientation=g},[O,g]),J(()=>{T||(I.current=null),(!T||f!==`auto`)&&(P.current=f)},[T,f]),J(()=>{a&&(T&&E?(F.current=o??-1,P.current&&o!=null&&(V.current=!0,R())):z.current&&(F.current=-1,R()))},[a,T,E,o,R]),J(()=>{if(a){if(!T)ee.current=!1;else if(E){if(r==null){if(ee.current=!1,re.current!=null)return;if(z.current&&(F.current=-1,se()),(!B.current||!z.current)&&P.current&&(I.current!=null||P.current===!0&&I.current==null)){let e=0,t=()=>{n.current[0]==null?(e<2&&(e?e=>oe.request(e):queueMicrotask)(t),e+=1):(F.current=I.current==null||XE(I.current,_,u)||l?XS(n):ZS(n),I.current=null,R())};t()}}else YS(n.current,r)||(F.current=r,se(),V.current=!1)}}},[a,T,E,r,re,l,n,_,u,R,se,oe]),J(()=>{if(!a||E||!N||d||!z.current)return;let e=N.nodesRef.current,t=e.find(e=>e.id===M)?.context?.elements.floating,n=Ix(Bb(D??t??null)),r=e.some(e=>e.context&&Q(e.context.elements.floating,n));t&&!r&&L.current&&t.focus({preventScroll:!0})},[a,E,D,N,M,d]),J(()=>{B.current=T,z.current=!!E});let ce=r!=null,le=q(e=>{if(!H.current)return;let t=n.current.indexOf(e.currentTarget);t!==-1&&(F.current!==t||r!==t)&&(F.current=t,R(e))}),ue=q(()=>v??N?.nodesRef.current.find(e=>e.id===M)?.context?.dataRef?.current.orientation),de=q(()=>XS(n,ne.current)),fe=q(t=>{if(L.current=!1,ee.current=!0,t.which===229||!H.current&&t.currentTarget===j.current)return;if(l&&QE(t.key,g,u,w)){YE(t.key,ue())||gS(t),e.setOpen(!1,$(VC,t.nativeEvent));let n=S?.current??D;vb(n)&&n.focus();return}r!=null&&r!==F.current&&!YS(n.current,r)&&(F.current=r);let i=F.current,a=XS(n,h),o=ZS(n,h);if(A||(t.key===`Home`&&(gS(t),F.current=a,R(t)),t.key===`End`&&(gS(t),F.current=o,R(t))),C!=null){let e=C(t,F.current,n,g,c,u,h,a,o);if(e!=null&&e!==F.current&&(F.current=e,R(t)),g===`both`)return}if(YE(t.key,g)){gS(t);let e=Ix(t.currentTarget.ownerDocument);if(T&&!d&&Q(t.currentTarget,e)&&!n.current.some(t=>t!=null&&Q(t,e))){F.current=XE(t.key,g,u)?a:o,R(t),r===F.current&&se();return}let{index:l,wrapped:f}=QS(n.current,i,{decrement:!XE(t.key,g,u),loopFocus:c,allowEscape:s,disabledIndices:h,minIndex:a,maxIndex:o});f&&(ee.current=!1),F.current=l,R(t)}}),pe=U.useMemo(()=>({onFocus(e){ee.current=!0,le(e)},onClick({currentTarget:e}){d||e.focus({preventScroll:!0})},onMouseMove(e){qE(e)||(ee.current=!0,V.current=!1,p&&le(e))},onPointerLeave(e){if(!H.current||!L.current||e.pointerType===`touch`)return;ee.current=!0;let t=e.relatedTarget;if(p&&!n.current.includes(t)&&ie.current&&(te.current?.(),te.current=null,F.current=-1,R(e),!d)){let e=j.current,t=Ix(Bb(e));e&&Q(e,t)&&e.focus({preventScroll:!0})}}}),[le,H,j,p,n,R,ie,d]),W=U.useMemo(()=>d&&T&&ce&&{"aria-activedescendant":`${y}-${r}`},[d,T,ce,y,r]),me=U.useMemo(()=>({...A?{}:W,onKeyDown(t){if(t.key===`Tab`&&t.shiftKey&&T&&!d){let n=Rx(t.nativeEvent);if(n&&!Q(j.current,n))return;gS(t);let r=$(zC,t.nativeEvent);e.setOpen(!1,r);let i=S?.current??D;!r.isCanceled&&vb(i)&&i.focus()}else fe(t)},onPointerMove(e){qE(e)||(L.current=!0)}}),[W,fe,j,A,e,T,d,D,S]),he=U.useMemo(()=>{function t(t){e.setOpen(!0,$(VC,t.nativeEvent,t.currentTarget))}function n(e){f===`auto`&&vS(e.nativeEvent)&&(P.current=!d)}function r(e){P.current=f,f===`auto`&&yS(e.nativeEvent)&&(P.current=!0)}return{onKeyDown(n){let r=e.select(`open`);L.current=!1;let i=n.key.startsWith(`Arrow`),a=ZE(n.key,ue(),u),o=YE(n.key,r?g:_),s=(l?a:o)||n.key===`Enter`||n.key.trim()===``;if(d&&r&&(!l||lS(n.currentTarget)))return fe(n);if(r||m||!i){if(s){let e=YE(n.key,ue());I.current=l&&e?null:n.key}l?a&&(gS(n),r?(F.current=de(),R(n),d&&j.current?.focus()):t(n)):o&&(re.current!=null&&(F.current=re.current),gS(n),!r&&m?t(n):fe(n),r&&R(n))}},onFocus(t){t.target===t.currentTarget&&e.select(`open`)&&!d&&(F.current=-1,R(t))},onPointerDown:r,onPointerEnter:r,onMouseDown:n,onClick:n}},[fe,f,de,l,R,e,m,g,_,ue,u,re,d,j]),ge=U.useMemo(()=>({...W,...he}),[W,he]);return U.useMemo(()=>a?{reference:ge,floating:me,item:pe,trigger:he}:{},[a,ge,me,he,pe])}function eD(e,t){let{listRef:n,elementsRef:r,activeIndex:i,onMatch:a,disabledIndices:o,onTyping:s,enabled:c=!0,resetMs:l=750,selectedIndex:u=null}=t,d=q(s),f=e.useState(`open`),p=qa(),m=U.useRef(``),h=U.useRef(u??i??-1),g=U.useRef(null),_=q(e=>{function t(e){return r?.current[e]}function s(e){let n=t(e);return n&&!nC(n)||n?.matches(`:disabled`)?!1:o==null||!eC(Hi,e,o)}function c(e,t,n=0){if(e.length===0)return-1;let r=(n%e.length+e.length)%e.length,i=t.toLowerCase();for(let t=0;t<e.length;t+=1){let n=(r+t)%e.length;if(e[n]?.toLowerCase().startsWith(i)&&s(n))return n}return-1}let _=n.current;if(m.current.length>0&&e.key===` `&&(gS(e),d?.(!0)),m.current.length>0&&m.current[0]!==` `&&c(_,m.current)===-1&&e.key!==` `&&d?.(!1),_==null||e.key.length!==1||e.ctrlKey||e.metaKey||e.altKey)return;f&&e.key!==` `&&(gS(e),d?.(!0));let v=m.current===``;v&&(h.current=u??i??-1),_.every((e,t)=>e&&s(t)?e[0]?.toLowerCase()!==e[1]?.toLowerCase():!0)&&m.current===e.key&&(m.current=``,h.current=g.current),m.current+=e.key,p.start(l,()=>{m.current=``,h.current=g.current,d?.(!1)});let y=((v?u??i??-1:h.current)??0)+1,b=c(_,m.current,y);b===-1?e.key!==` `&&(m.current=``,d?.(!1)):(a?.(b,e),g.current=b)}),v=q(t=>{let n=t.relatedTarget,r=e.select(`domReferenceElement`),i=e.select(`floatingElement`);Q(r,n)||Q(i,n)||(p.clear(),m.current=``,h.current=g.current,d?.(!1))});J(()=>{(f||u===null)&&(p.clear(),g.current=null,m.current!==``&&(m.current=``,d?.(!1)))},[f,u,p,d]);let y=U.useMemo(()=>({onKeyDown:_,onBlur:v}),[_,v]);return U.useMemo(()=>c?{reference:y,floating:y}:{},[c,y])}var tD=.1,nD=tD*tD,rD=.5;function iD(e,t,n,r,i,a){return r>=t!=a>=t&&e<=(i-n)*(t-r)/(a-r)+n}function aD(e,t,n,r,i,a,o,s,c,l){let u=!1;return iD(e,t,n,r,i,a)&&(u=!u),iD(e,t,i,a,o,s)&&(u=!u),iD(e,t,o,s,c,l)&&(u=!u),iD(e,t,c,l,n,r)&&(u=!u),u}function oD(e,t,n){return e>=n.x&&e<=n.x+n.width&&t>=n.y&&t<=n.y+n.height}function sD(e,t,n,r,i,a){return e>=Math.min(n,i)&&e<=Math.max(n,i)&&t>=Math.min(r,a)&&t<=Math.max(r,a)}function cD(e={}){let{blockPointerEvents:t=!1}=e,n=new Ka,r=({x:e,y:t,placement:r,elements:i,onClose:a,nodeId:o,tree:s})=>{let c=r?.split(`-`)[0],l=!1,u=null,d=null,f=typeof performance<`u`?performance.now():0;function p(e,t){let n=performance.now(),r=n-f;if(u===null||d===null||r===0)return u=e,d=t,f=n,!1;let i=e-u,a=t-d,o=i*i+a*a,s=r*r*nD;return u=e,d=t,f=n,o<s}function m(){n.clear(),a()}return function(r){n.clear();let a=i.domReference,u=i.floating;if(!a||!u||c==null||e==null||t==null)return;let{clientX:d,clientY:f}=r,h=Rx(r),g=r.type===`mouseleave`,_=Q(u,h),v=Q(a,h);if(_&&(l=!0,!g))return;if(v&&(l=!1,!g)){l=!0;return}if(g&&_b(r.relatedTarget)&&Q(u,r.relatedTarget))return;function y(){return!!(s&&mS(s.nodesRef.current,o).length>0)}function b(){y()||m()}if(y())return;let x=a.getBoundingClientRect(),S=u.getBoundingClientRect(),C=e>S.right-S.width/2,w=t>S.bottom-S.height/2,T=S.width>x.width,E=S.height>x.height,D=(T?x:S).left,O=(T?x:S).right,k=(E?x:S).top,A=(E?x:S).bottom;if(c===`top`&&t>=x.bottom-1||c===`bottom`&&t<=x.top+1||c===`left`&&e>=x.right-1||c===`right`&&e<=x.left+1){b();return}let j=!1;switch(c){case`top`:j=sD(d,f,D,x.top+1,O,S.bottom-1);break;case`bottom`:j=sD(d,f,D,S.top+1,O,x.bottom-1);break;case`left`:j=sD(d,f,S.right-1,A,x.left+1,k);break;case`right`:j=sD(d,f,x.right-1,A,S.left+1,k)}if(j)return;if(l&&!oD(d,f,x)||!g&&p(d,f)){b();return}let M=!1;switch(c){case`top`:{let n=T?rD/2:rD*4,r=T||C?e+n:e-n,i=T?e-n:C?e+n:e-n,a=t+rD+1,o=C||T?S.bottom-rD:S.top,s=C?T?S.bottom-rD:S.top:S.bottom-rD;M=aD(d,f,r,a,i,a,S.left,o,S.right,s);break}case`bottom`:{let n=T?rD/2:rD*4,r=T||C?e+n:e-n,i=T?e-n:C?e+n:e-n,a=t-rD,o=C||T?S.top+rD:S.bottom,s=C?T?S.top+rD:S.bottom:S.top+rD;M=aD(d,f,r,a,i,a,S.left,o,S.right,s);break}case`left`:{let n=E?rD/2:rD*4,r=E||w?t+n:t-n,i=E?t-n:w?t+n:t-n,a=e+rD+1,o=w||E?S.right-rD:S.left,s=w?E?S.right-rD:S.left:S.right-rD;M=aD(d,f,o,S.top,s,S.bottom,a,r,a,i);break}case`right`:{let n=E?rD/2:rD*4,r=E||w?t+n:t-n,i=E?t-n:w?t+n:t-n,a=e-rD,o=w||E?S.left+rD:S.right,s=w?E?S.left+rD:S.right:S.left+rD;M=aD(d,f,a,r,a,i,o,S.top,s,S.bottom);break}}M?l||n.start(40,b):b()}};return r.__options={...e,blockPointerEvents:t},r}function lD(e,t,n){let{reference:r,floating:i}=e,a=PS(t),o=FS(t),s=NS(o),c=AS(t),l=a===`y`,u=r.x+r.width/2-i.width/2,d=r.y+r.height/2-i.height/2,f=r[s]/2-i[s]/2,p;switch(c){case`top`:p={x:u,y:r.y-i.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-i.width,y:d};break;default:p={x:r.x,y:r.y}}let m=jS(t);return m&&(p[o]+=f*(m===`end`?1:-1)*(n&&l?-1:1)),p}async function uD(e,t){t===void 0&&(t={});let{x:n,y:r,platform:i,rects:a,elements:o,strategy:s}=e,{boundary:c=`clippingAncestors`,rootBoundary:l=`viewport`,elementContext:u=`floating`,altBoundary:d=!1,padding:f=0}=kS(t,e),p=qS(f),m=o[d?u===`floating`?`reference`:`floating`:u],h=JS(await i.getClippingRect({element:await(i.isElement==null?void 0:i.isElement(m))??!0?m:m.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(o.floating)),boundary:c,rootBoundary:l,strategy:s})),g=u===`floating`?{x:n,y:r,width:a.floating.width,height:a.floating.height}:a.reference,_=await(i.getOffsetParent==null?void 0:i.getOffsetParent(o.floating)),v=await(i.isElement==null?void 0:i.isElement(_))&&await(i.getScale==null?void 0:i.getScale(_))||{x:1,y:1},y=JS(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:o,rect:g,offsetParent:_,strategy:s}):g);return{top:(h.top-y.top+p.top)/v.y,bottom:(y.bottom-h.bottom+p.bottom)/v.y,left:(h.left-y.left+p.left)/v.x,right:(y.right-h.right+p.right)/v.x}}var dD=50,fD=async(e,t,n)=>{let{placement:r=`bottom`,strategy:i=`absolute`,middleware:a=[],platform:o}=n,s=o.detectOverflow?o:{...o,detectOverflow:uD},c=await(o.isRTL==null?void 0:o.isRTL(t)),l=await o.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:d}=lD(l,r,c),f=r,p=0,m={};for(let n=0;n<a.length;n++){let h=a[n];if(!h)continue;let{name:g,fn:_}=h,{x:v,y,data:b,reset:x}=await _({x:u,y:d,initialPlacement:r,placement:f,strategy:i,middlewareData:m,rects:l,platform:s,elements:{reference:e,floating:t}});u=v??u,d=y??d,m[g]={...m[g],...b},x&&p<dD&&(p++,typeof x==`object`&&(x.placement&&(f=x.placement),x.rects&&(l=x.rects===!0?await o.getElementRects({reference:e,floating:t,strategy:i}):x.rects),{x:u,y:d}=lD(l,f,c)),n=-1)}return{x:u,y:d,placement:f,strategy:i,middlewareData:m}},pD=function(e){return e===void 0&&(e={}),{name:`flip`,options:e,async fn(t){var n;let{placement:r,middlewareData:i,rects:a,initialPlacement:o,platform:s,elements:c}=t,{mainAxis:l=!0,crossAxis:u=!0,fallbackPlacements:d,fallbackStrategy:f=`bestFit`,fallbackAxisSideDirection:p=`none`,flipAlignment:m=!0,...h}=kS(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};let g=AS(r),_=PS(o),v=AS(o)===o,y=await(s.isRTL==null?void 0:s.isRTL(c.floating)),b=d||(v||!m?[GS(o)]:LS(o)),x=p!==`none`;!d&&x&&b.push(...WS(o,m,p,y));let S=[o,...b],C=await s.detectOverflow(t,h),w=[],T=i.flip?.overflows||[];if(l&&w.push(C[g]),u){let e=IS(r,a,y);w.push(C[e[0]],C[e[1]])}if(T=[...T,{placement:r,overflows:w}],!w.every(e=>e<=0)){let e=(i.flip?.index||0)+1,t=S[e];if(t&&(u!==`alignment`||_===PS(t)||T.every(e=>PS(e.placement)!==_||e.overflows[0]>0)))return{data:{index:e,overflows:T},reset:{placement:t}};let n=T.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0]?.placement;if(!n)switch(f){case`bestFit`:{let e=T.filter(e=>{if(x){let t=PS(e.placement);return t===_||t===`y`}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]?.[0];e&&(n=e);break}case`initialPlacement`:n=o}if(r!==n)return{reset:{placement:n}}}return{}}}},mD=new Set([`left`,`top`]);async function hD(e,t){let{placement:n,platform:r,elements:i}=e,a=await(r.isRTL==null?void 0:r.isRTL(i.floating)),o=AS(n),s=jS(n),c=PS(n)===`y`,l=mD.has(o)?-1:1,u=a&&c?-1:1,d=kS(t,e),{mainAxis:f,crossAxis:p,alignmentAxis:m}=typeof d==`number`?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return s&&typeof m==`number`&&(p=s===`end`?m*-1:m),c?{x:p*u,y:f*l}:{x:f*l,y:p*u}}var gD=function(e){return e===void 0&&(e=0),{name:`offset`,options:e,async fn(t){var n;let{x:r,y:i,placement:a,middlewareData:o}=t,s=await hD(t,e);return a===o.offset?.placement&&(n=o.arrow)!=null&&n.alignmentOffset?{}:{x:r+s.x,y:i+s.y,data:{...s,placement:a}}}}},_D=function(e){return e===void 0&&(e={}),{name:`shift`,options:e,async fn(t){let{x:n,y:r,placement:i,platform:a}=t,{mainAxis:o=!0,crossAxis:s=!1,limiter:c={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...l}=kS(e,t),u={x:n,y:r},d=await a.detectOverflow(t,l),f=PS(i),p=MS(f),m=u[p],h=u[f],g=(e,t)=>OS(t+d[e===`y`?`top`:`left`],t,t-d[e===`y`?`bottom`:`right`]);o&&(m=g(p,m)),s&&(h=g(f,h));let _=c.fn({...t,[p]:m,[f]:h});return{..._,data:{x:_.x-n,y:_.y-r,enabled:{[p]:o,[f]:s}}}}}},vD=function(e){return e===void 0&&(e={}),{options:e,fn(t){let{x:n,y:r,placement:i,rects:a,middlewareData:o}=t,{offset:s=0,mainAxis:c=!0,crossAxis:l=!0}=kS(e,t),u={x:n,y:r},d=PS(i),f=MS(d),p=u[f],m=u[d],h=kS(s,t),g=typeof h==`number`?{mainAxis:h,crossAxis:0}:{mainAxis:h.mainAxis??0,crossAxis:h.crossAxis??0};if(c){let e=f===`y`?`height`:`width`,t=a.reference[f]-a.floating[e]+g.mainAxis,n=a.reference[f]+a.reference[e]-g.mainAxis;p<t?p=t:p>n&&(p=n)}if(l){let e=f===`y`?`width`:`height`,t=mD.has(AS(i)),n=a.reference[d]-a.floating[e]+(t&&o.offset?.[d]||0)+(t?0:g.crossAxis),r=a.reference[d]+a.reference[e]+(t?0:o.offset?.[d]||0)-(t?g.crossAxis:0);m<n?m=n:m>r&&(m=r)}return{[f]:p,[d]:m}}}},yD=function(e){return e===void 0&&(e={}),{name:`size`,options:e,async fn(t){let{placement:n,rects:r,platform:i,elements:a}=t,{apply:o=()=>{},...s}=kS(e,t),c=await i.detectOverflow(t,s),l=AS(n),u=jS(n),d=PS(n)===`y`,{width:f,height:p}=r.floating,m,h;l===`top`||l===`bottom`?(m=l,h=u===(await(i.isRTL==null?void 0:i.isRTL(a.floating))?`start`:`end`)?`left`:`right`):(h=l,m=u===`end`?`top`:`bottom`);let g=p-c.top-c.bottom,_=f-c.left-c.right,v=SS(p-c[m],g),y=SS(f-c[h],_),b=t.middlewareData.shift,x=!b,S=v,C=y;b!=null&&b.enabled.x&&(C=_),b!=null&&b.enabled.y&&(S=g),x&&!u&&(d?C=f-2*CS(c.left,c.right):S=p-2*CS(c.top,c.bottom)),await o({...t,availableWidth:C,availableHeight:S});let w=await i.getDimensions(a.floating);return f!==w.width||p!==w.height?{reset:{rects:!0}}:{}}}};function bD(e){let t=jb(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,i=vb(e),a=i?e.offsetWidth:n,o=i?e.offsetHeight:r,s=wS(n)!==a||wS(r)!==o;return s&&(n=a,r=o),{width:n,height:r,$:s}}function xD(e){return _b(e)?e:e.contextElement}function SD(e){let t=xD(e);if(!vb(t))return ES(1);let n=t.getBoundingClientRect(),{width:r,height:i,$:a}=bD(t),o=(a?wS(n.width):n.width)/r,s=(a?wS(n.height):n.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!s||!Number.isFinite(s))&&(s=1),{x:o,y:s}}var CD=ES(0);function wD(e){let t=mb(e);return!kb()||!t.visualViewport?CD:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function TD(e,t,n){return t===void 0&&(t=!1),!!n&&t&&n===mb(e)}function ED(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);let i=e.getBoundingClientRect(),a=xD(e),o=ES(1);t&&(r?_b(r)&&(o=SD(r)):o=SD(e));let s=TD(a,n,r)?wD(a):ES(0),c=(i.left+s.x)/o.x,l=(i.top+s.y)/o.y,u=i.width/o.x,d=i.height/o.y;if(a&&r){let e=mb(a),t=_b(r)?mb(r):r,n=e,i=Ib(n);for(;i&&t!==n;){let e=SD(i),t=i.getBoundingClientRect(),r=jb(i),a=t.left+(i.clientLeft+parseFloat(r.paddingLeft))*e.x,o=t.top+(i.clientTop+parseFloat(r.paddingTop))*e.y;c*=e.x,l*=e.y,u*=e.x,d*=e.y,c+=a,l+=o,n=mb(i),i=Ib(n)}}return JS({width:u,height:d,x:c,y:l})}function DD(e,t){let n=Mb(e).scrollLeft;return t?t.left+n:ED(hb(e)).left+n}function OD(e,t){let n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-DD(e,n),y:n.top+t.scrollTop}}function kD(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e,a=i===`fixed`,o=hb(r),s=t?Sb(t.floating):!1;if(r===o||s&&a)return n;let c={scrollLeft:0,scrollTop:0},l=ES(1),u=ES(0),d=vb(r);if((d||!a)&&((pb(r)!==`body`||bb(o))&&(c=Mb(r)),d)){let e=ED(r);l=SD(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}let f=o&&!d&&!a?OD(o,c):ES(0);return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-c.scrollLeft*l.x+u.x+f.x,y:n.y*l.y-c.scrollTop*l.y+u.y+f.y}}function AD(e){return e.getClientRects?Array.from(e.getClientRects()):[]}function jD(e){let t=Mb(e),n=e.ownerDocument.body,r=CS(e.scrollWidth,e.clientWidth,n.scrollWidth,n.clientWidth),i=CS(e.scrollHeight,e.clientHeight,n.scrollHeight,n.clientHeight),a=-t.scrollLeft+DD(e),o=-t.scrollTop;return jb(n).direction===`rtl`&&(a+=CS(e.clientWidth,n.clientWidth)-r),{width:r,height:i,x:a,y:o}}var MD=25;function ND(e,t,n){n===void 0&&(n=`viewport`);let r=n===`layoutViewport`,i=mb(e),a=hb(e),o=i.visualViewport,s=a.clientWidth,c=a.clientHeight,l=0,u=0;if(o){let e=!kb()||t===`fixed`;r?e||(l=-o.offsetLeft,u=-o.offsetTop):(s=o.width,c=o.height,e&&(l=o.offsetLeft,u=o.offsetTop))}if(DD(a)<=0){let e=a.ownerDocument,t=e.body,n=getComputedStyle(t),r=e.compatMode===`CSS1Compat`&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,i=Math.abs(a.clientWidth-t.clientWidth-r),o=getComputedStyle(a).scrollbarGutter===`stable both-edges`?i/2:i;o<=MD&&(s-=o)}return{width:s,height:c,x:l,y:u}}function PD(e,t){let n=ED(e,!0,t===`fixed`),r=n.top+e.clientTop,i=n.left+e.clientLeft,a=SD(e);return{width:e.clientWidth*a.x,height:e.clientHeight*a.y,x:i*a.x,y:r*a.y}}function FD(e,t,n){let r;if(t===`viewport`||t===`layoutViewport`)r=ND(e,n,t);else if(t===`document`)r=jD(hb(e));else if(_b(t))r=PD(t,n);else{let n=wD(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return JS(r)}function ID(e,t){let n=t.get(e);if(n)return n;let r=Fb(e,[],!1).filter(e=>_b(e)&&pb(e)!==`body`),i=null,a=jb(e).position===`fixed`,o=a?Nb(e):e;for(;_b(o)&&!Ab(o);){let e=jb(o),t=Db(o),n=i?i.position:a?`fixed`:``;!t&&(n===`fixed`||n===`absolute`&&e.position===`static`)?r=r.filter(e=>e!==o):i=e,o=Nb(o)}return t.set(e,r),r}function LD(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e,a=[...n===`clippingAncestors`?Sb(t)?[]:ID(t,this._c):[].concat(n),r],o=FD(t,a[0],i),s=o.top,c=o.right,l=o.bottom,u=o.left;for(let e=1;e<a.length;e++){let n=FD(t,a[e],i);s=CS(n.top,s),c=SS(n.right,c),l=SS(n.bottom,l),u=CS(n.left,u)}return{width:c-u,height:l-s,x:u,y:s}}function RD(e){let{width:t,height:n}=bD(e);return{width:t,height:n}}function zD(e,t,n){let r=vb(t),i=hb(t),a=n===`fixed`,o=ED(e,!0,a,t),s={scrollLeft:0,scrollTop:0},c=ES(0);if((r||!a)&&((pb(t)!==`body`||bb(i))&&(s=Mb(t)),r)){let e=ED(t,!0,a,t);c.x=e.x+t.clientLeft,c.y=e.y+t.clientTop}!r&&i&&(c.x=DD(i));let l=i&&!r&&!a?OD(i,s):ES(0);return{x:o.left+s.scrollLeft-c.x-l.x,y:o.top+s.scrollTop-c.y-l.y,width:o.width,height:o.height}}function BD(e){return jb(e).position===`static`}function VD(e,t){if(!vb(e)||jb(e).position===`fixed`)return null;if(t)return t(e);let n=e.offsetParent;return hb(e)===n&&(n=n.ownerDocument.body),n}function HD(e,t){let n=mb(e);if(Sb(e))return n;if(!vb(e)){let t=Nb(e);for(;t&&!Ab(t);){if(_b(t)&&!BD(t))return t;t=Nb(t)}return n}let r=VD(e,t);for(;r&&xb(r)&&BD(r);)r=VD(r,t);return r&&Ab(r)&&BD(r)&&!Db(r)?n:r||Ob(e)||n}var UD=async function(e){let t=this.getOffsetParent||HD,n=this.getDimensions,r=await n(e.floating);return{reference:zD(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function WD(e){return jb(e).direction===`rtl`}var GD={convertOffsetParentRelativeRectToViewportRelativeRect:kD,getDocumentElement:hb,getClippingRect:LD,getOffsetParent:HD,getElementRects:UD,getClientRects:AD,getDimensions:RD,getScale:SD,isElement:_b,isRTL:WD};function KD(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function qD(e,t,n){let r=null,i,a=hb(e);function o(){var e;clearTimeout(i),(e=r)==null||e.disconnect(),r=null}function s(n,c){n===void 0&&(n=!1),c===void 0&&(c=1),o();let l=e.getBoundingClientRect(),{left:u,top:d,width:f,height:p}=l;if(n||t(),!f||!p)return;let m=TS(d),h=TS(a.clientWidth-(u+f)),g=TS(a.clientHeight-(d+p)),_=TS(u),v={rootMargin:-m+`px `+-h+`px `+-g+`px `+-_+`px`,threshold:CS(0,SS(1,c))||1},y=!0;function b(t){let n=t[0].intersectionRatio;if(!KD(l,e.getBoundingClientRect()))return s();if(n!==c){if(!y)return s();n?s(!1,n):i=setTimeout(()=>{s(!1,1e-7)},1e3)}y=!1}try{r=new IntersectionObserver(b,{...v,root:a.ownerDocument})}catch{r=new IntersectionObserver(b,v)}r.observe(e)}let c=mb(e),l=()=>s(n);return c.addEventListener(`resize`,l),s(!0),()=>{c.removeEventListener(`resize`,l),o()}}function JD(e,t,n,r){r===void 0&&(r={});let{ancestorScroll:i=!0,ancestorResize:a=!0,elementResize:o=typeof ResizeObserver==`function`,layoutShift:s=typeof IntersectionObserver==`function`,animationFrame:c=!1}=r,l=xD(e),u=i||a?[...l?Fb(l):[],...t?Fb(t):[]]:[];u.forEach(e=>{i&&e.addEventListener(`scroll`,n),a&&e.addEventListener(`resize`,n)});let d=l&&s?qD(l,n,a):null,f=-1,p=null;o&&(p=new ResizeObserver(e=>{let[r]=e;r&&r.target===l&&p&&t&&(p.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var e;(e=p)==null||e.observe(t)})),n()}),l&&!c&&p.observe(l),t&&p.observe(t));let m,h=c?ED(e):null;c&&g();function g(){let t=ED(e);h&&!KD(h,t)&&n(),h=t,m=requestAnimationFrame(g)}return n(),()=>{var e;u.forEach(e=>{i&&e.removeEventListener(`scroll`,n),a&&e.removeEventListener(`resize`,n)}),d?.(),(e=p)==null||e.disconnect(),p=null,c&&cancelAnimationFrame(m)}}var YD=gD,XD=_D,ZD=pD,QD=yD,$D=vD,eO=(e,t,n)=>{let r=new Map,i=n??{},a={...GD,...i.platform,_c:r};return fD(e,t,{...i,platform:a})},tO=typeof document<`u`?U.useLayoutEffect:function(){};function nO(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e==`function`&&e.toString()===t.toString())return!0;let n,r,i;if(e&&t&&typeof e==`object`){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!nO(e[r],t[r]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,i[r]))return!1;for(r=n;r--!==0;){let n=i[r];if(!(n===`_owner`&&e.$$typeof)&&!nO(e[n],t[n]))return!1}return!0}return e!==e&&t!==t}function rO(e){return typeof window>`u`?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function iO(e,t){let n=rO(e);return Math.round(t*n)/n}function aO(e){let t=U.useRef(e);return tO(()=>{t.current=e}),t}function oO(e){e===void 0&&(e={});let{placement:t=`bottom`,strategy:n=`absolute`,middleware:r=[],platform:i,elements:{reference:a,floating:o}={},transform:s=!0,whileElementsMounted:c,open:l}=e,[u,d]=U.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[f,p]=U.useState(r);nO(f,r)||p(r);let[m,h]=U.useState(null),[g,_]=U.useState(null),v=U.useCallback(e=>{e!==S.current&&(S.current=e,h(e))},[]),y=U.useCallback(e=>{e!==C.current&&(C.current=e,_(e))},[]),b=a||m,x=o||g,S=U.useRef(null),C=U.useRef(null),w=U.useRef(u),T=c!=null,E=aO(c),D=aO(i),O=aO(l),k=U.useCallback(()=>{if(!S.current||!C.current)return;let e={placement:t,strategy:n,middleware:f};D.current&&(e.platform=D.current),eO(S.current,C.current,e).then(e=>{let t={...e,isPositioned:O.current!==!1};A.current&&!nO(w.current,t)&&(w.current=t,W.flushSync(()=>{d(t)}))})},[f,t,n,D,O]);tO(()=>{l===!1&&w.current.isPositioned&&(w.current.isPositioned=!1,d(e=>({...e,isPositioned:!1})))},[l]);let A=U.useRef(!1);tO(()=>(A.current=!0,()=>{A.current=!1}),[]),tO(()=>{if(b&&(S.current=b),x&&(C.current=x),b&&x){if(E.current)return E.current(b,x,k);k()}},[b,x,k,E,T]);let j=U.useMemo(()=>({reference:S,floating:C,setReference:v,setFloating:y}),[v,y]),M=U.useMemo(()=>({reference:b,floating:x}),[b,x]),N=U.useMemo(()=>{let e={position:n,left:0,top:0};if(!M.floating)return e;let t=iO(M.floating,u.x),r=iO(M.floating,u.y);return s?{...e,transform:`translate(`+t+`px, `+r+`px)`,...rO(M.floating)>=1.5&&{willChange:`transform`}}:{position:n,left:t,top:r}},[n,s,M.floating,u.x,u.y]);return U.useMemo(()=>({...u,update:k,refs:j,elements:M,floatingStyles:N}),[u,k,j,M,N])}var sO=(e,t)=>{let n=YD(e);return{name:n.name,fn:n.fn,options:[e,t]}},cO=(e,t)=>{let n=XD(e);return{name:n.name,fn:n.fn,options:[e,t]}},lO=(e,t)=>({fn:$D(e).fn,options:[e,t]}),uO=(e,t)=>{let n=ZD(e);return{name:n.name,fn:n.fn,options:[e,t]}},dO=(e,t)=>{let n=QD(e);return{name:n.name,fn:n.fn,options:[e,t]}},fO=U.createContext(void 0),pO=U.createContext(void 0);function mO(){let e=U.useContext(fO);if(e===void 0)throw Error(ha(60));return e}function hO(){let e=U.useContext(pO);if(e===void 0)throw Error(ha(61));return e}function gO(e,t,n=Object.is){let{length:r}=e;if(r!==t.length)return!1;for(let i=0;i<r;i+=1)if(!n(e[i],t[i]))return!1;return!0}var _O=(e,t)=>Object.is(e,t);function vO(e,t,n){return e==null||t==null?Object.is(e,t):n(e,t)}function yO(e,t,n){return Array.isArray(e)&&Array.isArray(t)?!gO(e,t,(e,t)=>vO(e,t,n)):e!==t}function bO(e,t,n){return e?e.some(e=>e!==void 0&&vO(t,e,n)):!1}function xO(e,t,n){return e?e.findIndex(e=>e!==void 0&&vO(e,t,n)):-1}function SO(e,t){if(t!==_O)return n=>bO(e,n,t);let n=new Set(e);return n.delete(void 0),t=>n.has(t)&&(t!==0||e.some(e=>Object.is(t,e)))}function CO(e,t,n,r){let i=r&&Array.isArray(t)?e.findIndex(SO(t,n)):xO(e,t,n);return i===-1?null:i}function wO(e,t,n,r,i,a){return bO(r,t,i)?a!=null&&e>a&&bO(r,n[a],i)?a:e:e===a?CO(n,r,i,!0):a}function TO(e,t,n){return e.filter(e=>!vO(t,e,n))}function EO(e){if(e==null)return``;if(typeof e==`string`)return e;try{return JSON.stringify(e)}catch{return String(e)}}function DO(e){return typeof e==`object`&&!!e&&Array.isArray(e.items)}function OO(e){return DO(e?.[0])}function kO(e){return OO(e)?e.flatMap(e=>e.items):e}function AO(e){if(!Array.isArray(e))return e!=null&&`null`in e;let t=e;if(OO(t)){for(let e of t)for(let t of e.items)if(t&&t.value==null&&t.label!=null)return!0;return!1}for(let e of t)if(e&&e.value==null&&e.label!=null)return!0;return!1}function jO(e,t){if(t&&e!=null)return t(e)??``;if(e&&typeof e==`object`){if(`label`in e&&e.label!=null)return String(e.label);if(`value`in e)return String(e.value)}return EO(e)}function MO(e,t){return t&&e!=null?t(e)??``:e&&typeof e==`object`&&`value`in e&&`label`in e?EO(e.value):EO(e)}function NO(e,t,n){function r(){return jO(e,n)}if(n&&e!=null)return n(e);if(e&&typeof e==`object`&&`label`in e&&e.label!=null)return e.label;if(t&&!Array.isArray(t))return(Object.hasOwn(t,e)?t[e]:void 0)??r();if(Array.isArray(t)){let n=kO(t);if(typeof e!=`object`||!e){let t=n.find(t=>t.value===e);return t&&t.label!=null?t.label:r()}if(`value`in e){let t=n.find(t=>t&&t.value===e.value);if(t&&t.label!=null)return t.label}}return r()}function PO(e,t,n){return e.reduce((e,r,i)=>(i>0&&e.push(`, `),e.push((0,G.jsx)(U.Fragment,{children:NO(r,t,n)},i)),e),[])}var FO={id:e=>e.id,labelId:e=>e.labelId,modal:e=>e.modal,multiple:e=>e.multiple,disabled:e=>e.disabled,readOnly:e=>e.readOnly,required:e=>e.required,highlightItemOnHover:e=>e.highlightItemOnHover,items:e=>e.items,itemToStringLabel:e=>e.itemToStringLabel,isItemEqualToValue:e=>e.isItemEqualToValue,value:e=>e.value,hasSelectedValue:e=>{let{value:t,multiple:n,itemToStringValue:r}=e;return t==null?!1:n&&Array.isArray(t)?t.length>0:MO(t,r)!==``},hasNullItemLabel:(e,t)=>t?AO(e.items):!1,open:e=>e.open,mounted:e=>e.mounted,forceMount:e=>e.forceMount,transitionStatus:e=>e.transitionStatus,openMethod:e=>e.openMethod,activeIndex:e=>e.activeIndex,selectedIndex:e=>e.selectedIndex,isActive:(e,t)=>e.activeIndex===t,isSelected:(e,t)=>{let n=e.isItemEqualToValue,r=e.value;return e.multiple?Array.isArray(r)&&r.some(e=>vO(t,e,n)):vO(t,r,n)},isSelectedByFocus:(e,t)=>e.selectedIndex===t,popupProps:e=>e.popupProps,triggerProps:e=>e.triggerProps,itemRoot:e=>e.itemRoot,triggerElement:e=>e.triggerElement,positionerElement:e=>e.positionerElement,listElement:e=>e.listElement,popupSide:e=>e.popupSide,scrollUpArrowVisible:e=>e.scrollUpArrowVisible,scrollDownArrowVisible:e=>e.scrollDownArrowVisible,hasScrollArrows:e=>e.hasScrollArrows};function IO(e){let t=U.useRef(``),n=U.useCallback(n=>{n.defaultPrevented||(t.current=n.pointerType,e(n,n.pointerType))},[e]);return{onClick:U.useCallback(n=>{n.detail===0?e(n,`keyboard`):(`pointerType`in n?e(n,n.pointerType):e(n,t.current),t.current=``)},[e]),onPointerDown:n}}function LO(e,t){let{onClick:n,onPointerDown:r}=IO(q((n,r)=>{(typeof e==`function`?e():e)||t(r||(Ox?`touch`:``))}));return U.useMemo(()=>({onClick:n,onPointerDown:r}),[n,r])}function RO(e){let[t,n]=U.useState(null),r=LO(e,n);return AC(e,t=>{t&&!e&&n(null)}),U.useMemo(()=>({openMethod:t,triggerProps:r}),[t,r])}function zO(e,t=-(2**53-1),n=2**53-1){return Math.max(t,Math.min(e,n))}function BO(e,t){return Math.max(0,e-t)}function VO(e,t){if(t<=0)return 0;let n=zO(e,0,t),r=n,i=t-n,a=r<=1,o=i<=1;return a&&o?r<=i?0:t:a?0:o?t:n}function HO(e){let{id:t,value:n,defaultValue:r=null,onValueChange:i,open:a,defaultOpen:o=!1,onOpenChange:s,name:c,form:l,autoComplete:u,disabled:d=!1,readOnly:f=!1,required:p=!1,modal:m=!0,actionsRef:h,inputRef:g,onOpenChangeComplete:_,items:v,multiple:y=!1,itemToStringLabel:b,itemToStringValue:x,isItemEqualToValue:S=_O,highlightItemOnHover:C=!0,children:w}=e,{clearErrors:T}=lx(),{setDirty:E,setTouched:D,setFocused:O,validityData:k,setFilled:A,name:j,disabled:M,validation:N,validationMode:P}=sx(),F=xx({id:t}),I=M||d,L=j??c,[R,z]=yw({controlled:n,default:y?r??Hi:r,name:`Select`,state:`value`}),[B,ee]=yw({controlled:a,default:o,name:`Select`,state:`open`}),V=U.useRef([]),te=U.useRef([]),ne=U.useRef(null),H=U.useRef(null),re=U.useRef(0),ie=U.useRef(null),ae=U.useRef([]),oe=U.useRef(!1),se=U.useRef(null),ce=U.useRef(null),le=U.useRef({allowSelectedMouseUp:!1,allowUnselectedMouseUp:!1,dragY:0}),ue=U.useRef(!1),de=U.useRef(R),{openMethod:fe,triggerProps:pe}=RO(B),W=Ai(()=>new tT({id:F,labelId:void 0,modal:m,multiple:y,disabled:I,readOnly:f,required:p,highlightItemOnHover:C,itemToStringLabel:b,itemToStringValue:x,isItemEqualToValue:S,value:R,open:B,mounted:B,transitionStatus:void 0,items:v,forceMount:!1,openMethod:null,activeIndex:null,selectedIndex:null,popupProps:Ui,triggerProps:Ui,itemRoot:{props:Ui,multiple:y,disabled:I,readOnly:f,isItemEqualToValue:S},triggerElement:null,positionerElement:null,listElement:null,popupSide:null,scrollUpArrowVisible:!1,scrollDownArrowVisible:!1,hasScrollArrows:!1},{setValue:Vi,setOpen:Vi,handleScrollArrowVisibility:Vi,onOpenChangeComplete:Vi,listRef:V,popupRef:ne,scrollHandlerRef:H,scrollArrowsMountedCountRef:re,valueRef:ie,valuesRef:ae,labelsRef:te,typingRef:oe,selectionRef:le,firstItemTextRef:se,selectedItemTextRef:ce,alignItemWithTriggerActiveRef:ue,initialValueRef:de},FO)).current,[me,he]=U.useState(!1),{mounted:ge,transitionStatus:_e,forceUnmount:ve}=uE({open:B,ref:ne,preventUnmountOnClose:me,setPreventUnmountOnClose:he,onUnmount(){W.update({activeIndex:null,openMethod:null,scrollUpArrowVisible:!1,scrollDownArrowVisible:!1}),_?.(!1)}}),ye=W.useState(`activeIndex`),be=W.useState(`selectedIndex`),xe=W.useState(`triggerElement`),Se=W.useState(`positionerElement`),Ce=Rw(fe),we=fe??Ce,Te=U.useMemo(()=>y?``:MO(R,x),[y,R,x]),Ee=U.useMemo(()=>y&&Array.isArray(R)?R.map(e=>MO(e,x)):MO(R,x),[y,R,x]);kC(Bw(xe),F,R,q(()=>Ee),!I,c);let De=y?Array.isArray(R)&&R.length>0:R!=null&&Te!==``;J(()=>{A(De)},[De,A]),J(function(){let e=CO(ae.current,R,S,y);e===null&&(ce.current=null),!B&&W.set(`selectedIndex`,e)},[y,B,R,S,W]),AC(R,()=>{T(L),E(yO(R,k.initialValue,S)),N.change(R)});let Oe=q((e,t)=>{let n=t,r=vE(n);s?.(e,n),!t.isCanceled&&(e||he(r()),ee(e),!e&&(t.reason===`focus-out`||t.reason===`outside-press`)&&(D(!0),O(!1),P===`onBlur`&&N.commit(R)))});U.useImperativeHandle(h,()=>({unmount:ve,close:()=>{W.state.open&&Oe(!1,$(YC))}}),[ve,Oe,W]);let ke=q((e,t)=>{i?.(e,t),!t.isCanceled&&z(e)}),Ae=q(e=>{let t=BO(e.scrollHeight,e.clientHeight),n=VO(e.scrollTop,t),r=n>0,i=n<t;W.set(`scrollUpArrowVisible`,r),W.set(`scrollDownArrowVisible`,i)}),je=IE({open:B,onOpenChange:Oe,elements:{reference:xe,floating:Se}}),Me=nE(je,{enabled:!I,event:`mousedown`}),Ne=cE(je),Pe=$E(je,{enabled:!I,listRef:V,activeIndex:ye,selectedIndex:be,disabledIndices:Hi,onNavigate(e){(e!==null||B)&&W.set(`activeIndex`,e)},focusItemOnHover:C}),Fe=eD(je,{enabled:!I&&(B||!f&&!y),listRef:te,activeIndex:ye,selectedIndex:be,disabledIndices:e=>zw(V.current[e]),onMatch(e){B?W.set(`activeIndex`,e):ke(ae.current[e],$(MC))},onTyping(e){oe.current=e}}),Ie=U.useMemo(()=>Ji(Fe.reference,Pe.reference,Ne.reference,Me.reference,pe),[Me.reference,Fe.reference,Pe.reference,Ne.reference,pe]),Le=U.useMemo(()=>Ji(dE,Fe.floating,Pe.floating,Ne.floating),[Fe.floating,Pe.floating,Ne.floating]),Re=Pe.item??Ui,ze=U.useMemo(()=>({props:Re,multiple:y,disabled:I,readOnly:f,isItemEqualToValue:S}),[Re,y,I,f,S]);W.useContextCallback(`setValue`,ke),W.useContextCallback(`setOpen`,Oe),W.useContextCallback(`handleScrollArrowVisibility`,Ae),W.useContextCallback(`onOpenChangeComplete`,_),Lw(()=>{W.update({popupProps:Le,triggerProps:Ie,itemRoot:ze})}),W.useSyncedValues({id:F,modal:m,multiple:y,disabled:I,readOnly:f,required:p,highlightItemOnHover:C,value:R,open:B,mounted:ge,transitionStatus:_e,popupProps:Le,triggerProps:Ie,itemRoot:ze,items:v,itemToStringLabel:b,itemToStringValue:x,isItemEqualToValue:S,openMethod:we});let Be=ji(g,N.inputRef),Ve=y?void 0:L,He=U.useMemo(()=>!y||!Array.isArray(R)||!L?null:R.map(e=>{let t=MO(e,x);return(0,G.jsx)(`input`,{type:`hidden`,form:l,name:L,value:t,disabled:I},t)}),[y,R,l,L,x,I]);return(0,G.jsxs)(fO.Provider,{value:W,children:[(0,G.jsx)(pO.Provider,{value:je,children:w}),(0,G.jsx)(`input`,{...N.getValidationProps(I,{onFocus(){W.state.triggerElement?.focus({focusVisible:!0})},onChange(e){if(e.nativeEvent.defaultPrevented||I||f)return;let t=e.currentTarget.value,n=$(MC,e.nativeEvent);function r(){if(y)return;let e=t.toLowerCase(),r=ae.current.findIndex(t=>MO(t,x).toLowerCase()===e||jO(t,b).toLowerCase()===e);r===-1&&(r=ae.current.findIndex((t,n)=>{let r=te.current[n];return r!=null&&r.toLowerCase()===e}));let i=ae.current[r];i!=null&&ke(i,n)}W.set(`forceMount`,!0),queueMicrotask(r)}}),id:F&&Ve==null?`${F}-hidden-input`:void 0,form:l,name:Ve,autoComplete:u,value:Te,disabled:I,required:p&&!(y&&De),readOnly:f,ref:Be,style:L?Sw:xw,tabIndex:-1,"aria-hidden":!0,suppressHydrationWarning:!0}),He]})}function UO(e,t){return e??t}var WO=5;function GO(e,t){let n=KO(t);return e.clientX>=n.left-WO&&e.clientX<=n.right+WO&&e.clientY>=n.top-WO&&e.clientY<=n.bottom+WO}function KO(e){let t=e.getBoundingClientRect(),n=mb(e);if(Fx)return t;let r=n.getComputedStyle(e,`::before`),i=n.getComputedStyle(e,`::after`);if(r.content===`none`&&i.content===`none`)return t;let a=parseFloat(r.width)||0,o=parseFloat(r.height)||0,s=parseFloat(i.width)||0,c=parseFloat(i.height)||0,l=Math.max(t.width,a,s),u=Math.max(t.height,o,c),d=l-t.width,f=u-t.height;return{left:t.left-d/2,right:t.right+d/2,top:t.top-f/2,bottom:t.bottom+f/2}}var qO=`data-popup-side`,JO=400,YO={...nS,...ix,popupSide:e=>e?{[qO]:e}:null,value:()=>null},XO=U.forwardRef(function(e,t){let{render:n,className:r,id:i,disabled:a=!1,nativeButton:o=!0,style:s,...c}=e,{setTouched:l,validationMode:u,validation:d,state:f,disabled:p}=sx(),{labelId:m}=_x(),h=mO(),g=h.useState(`readOnly`),_=h.useState(`required`),v=h.useState(`disabled`),y=p||v||a,b=h.useState(`open`),x=h.useState(`mounted`),S=h.useState(`value`),C=h.useState(`triggerProps`),w=h.useState(`positionerElement`),T=h.useState(`listElement`),E=h.useState(`popupSide`),D=h.useState(`id`),O=h.useState(`labelId`),k=h.useState(`hasSelectedValue`),A=x&&w?E:null,j=i??D,M=UO(m,O);xx({id:i});let N=Bw(w),P=U.useRef(null),F=OC(y,P),{getButtonProps:I,buttonRef:L}=Hb({disabled:y,native:o}),R=h.useStateSetter(`triggerElement`),z=qa(),B=qa(),ee=qa();U.useEffect(()=>{if(b)return ee.start(JO,()=>{h.context.selectionRef.current.allowUnselectedMouseUp=!0,h.context.selectionRef.current.allowSelectedMouseUp=!0}),()=>{ee.clear()};h.context.selectionRef.current={allowSelectedMouseUp:!1,allowUnselectedMouseUp:!1,dragY:0},B.clear()},[b,h,B,ee]);let V=Ji(C,{id:j,role:`combobox`,"aria-expanded":b,"aria-haspopup":`listbox`,"aria-controls":b?T?.id??pS(w)?.id:void 0,"aria-labelledby":M,"aria-readonly":g||void 0,"aria-required":_||void 0,tabIndex:y?-1:0,onFocus(e){F(!0),b&&h.context.alignItemWithTriggerActiveRef.current&&h.context.setOpen(!1,$(MC,e.nativeEvent)),z.start(0,()=>{h.set(`forceMount`,!0)})},onBlur(e){Q(w,e.relatedTarget)||(l(!0),F(!1),u===`onBlur`&&d.commit(S))},onMouseDown(e){if(b)return;let t=Bb(e.currentTarget);function n(e){if(!P.current)return;let t=e.target;Q(P.current,t)||Q(N.current,t)||GO(e,P.current)||h.context.setOpen(!1,$(WC,e))}B.start(0,()=>{t.addEventListener(`mouseup`,n,{once:!0})})}},c,I),te=d.getValidationProps(y,V);te.role=`combobox`;let ne={...f,open:b,disabled:y,value:S,readOnly:g,popupSide:A,placeholder:!k};return sa(`button`,e,{ref:[t,P,L,R],state:ne,stateAttributesMapping:YO,props:te})}),ZO={value:()=>null},QO=U.forwardRef(function(e,t){let{className:n,render:r,children:i,placeholder:a,style:o,...s}=e,c=mO(),l=c.useState(`value`),u=c.useState(`items`),d=c.useState(`itemToStringLabel`),f=c.useState(`hasSelectedValue`),p=!f&&a!=null&&i==null,m=c.useState(`hasNullItemLabel`,p),h={value:l,placeholder:!f},g=null;return g=typeof i==`function`?i(l):i??(p&&!m?a:Array.isArray(l)?PO(l,u,d):NO(l,u,d)),sa(`span`,e,{state:h,ref:[t,c.context.valueRef],props:[{children:g},s],stateAttributesMapping:ZO})}),$O=U.forwardRef(function(e,t){let{render:n,className:r,style:i,...a}=e;return sa(`span`,e,{state:{open:mO().useState(`open`)},ref:t,props:[{"aria-hidden":!0,children:`▼`},a],stateAttributesMapping:tS})}),ek=U.forwardRef(function(e,t){let n=mO(),r=n.useState(`mounted`),i=n.useState(`forceMount`);return r||i?(0,G.jsx)(LT,{ref:t,...e}):null});function tk(e){return Ri(19)?e:e?`true`:void 0}var nk=U.createContext({register:()=>{},unregister:()=>{},subscribeMapChange:()=>()=>{},nextIndexRef:{current:0}});function rk(){return U.useContext(nk)}function ik(e){let{children:t,elementsRef:n,labelsRef:r,onMapChange:i}=e,a=q(i),[,o]=U.useState(0),s=Ai(ok).current,c=Ai(ak).current,l=U.useRef(0),u=U.useRef(!0),d=U.useRef(null),f=U.useRef(null),p=q(()=>{u.current||(u.current=!0,o(e=>e+1))}),m=q((e,t)=>{c.set(e,t),p()}),h=q(e=>{c.delete(e),p()}),g=q(e=>{let t=new Map;return n.current.length=0,r&&(r.current.length=0),e.forEach(e=>{t.set(e.element,{...e.registration.metadata??{},index:e.index}),n.current[e.index]=e.element,r&&(r.current[e.index]=e.registration.label===void 0?e.registration.textRef?.current?.textContent??e.element.textContent:e.registration.label)}),l.current=n.current.length,t});function _(e){if(f.current?.disconnect(),f.current=null,typeof MutationObserver!=`function`||e.length<2)return;let t=new MutationObserver(n=>{if(!lk(n))return;let r=null;for(let n of e)if(n.isConnected){if(r&&uk(r,n)>0){t.disconnect(),p();return}r=n}});f.current=t;let n=new Set;for(let t=1;t<e.length;t+=1){let r=ck(e[t-1],e[t]);r&&n.add(r)}n.forEach(e=>t.observe(e,{childList:!0}))}let v=q(()=>{let[e,t]=sk(c),n=g(e),r=d.current,i=!r||r.length!==e.length||e.some((e,t)=>{let n=r[t];return e.index!==n.index||e.element!==n.element||e.registration.index!==n.registration.index||e.registration.metadata!==n.registration.metadata});_(t),d.current=e,u.current=!1,i&&(s.forEach(e=>e(n)),a(n))});J(()=>(!u.current&&d.current&&g(d.current),()=>{n.current=[],r&&(r.current=[])}),[n,r,g]),J(()=>{u.current&&v()}),J(()=>()=>{f.current?.disconnect(),u.current=!0},[]);let y=q(e=>(s.add(e),()=>{s.delete(e)})),b=U.useMemo(()=>({register:m,unregister:h,subscribeMapChange:y,nextIndexRef:l}),[m,h,y,l]);return(0,G.jsx)(nk.Provider,{value:b,children:t})}function ak(){return new Map}function ok(){return new Set}function sk(e){let t=new Set,n=[],r=[];e.forEach((e,i)=>{if(!i.isConnected)return;let a=e.index,o={index:a??-1,element:i,registration:e};a===null?r.push(o):a>=0&&(t.add(a),n.push(o))});let i=0;return r.sort((e,t)=>uk(e.element,t.element)),r.forEach(e=>{for(;t.has(i);)i+=1;e.index=i,n.push(e),i+=1}),t.size>0&&n.sort((e,t)=>e.index-t.index),[n,r.map(e=>e.element)]}function ck(e,t){let n=e.parentElement;for(;n&&!n.contains(t);)n=n.parentElement;return n}function lk(e){for(let t of e)for(let e=0;e<t.removedNodes.length;e+=1)if(t.removedNodes[e].isConnected)return!0;return!1}function uk(e,t){return e.nextElementSibling===t?-1:t.nextElementSibling===e?1:e.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_FOLLOWING?-1:1}function dk(e){let{nodeId:t,externalTree:n,rootContext:r}=e,i=r.useState(`referenceElement`),a=r.useState(`floatingElement`),o=r.useState(`domReferenceElement`),s=r.useState(`open`),c=r.useState(`floatingId`),[l,u]=U.useState(null),d=U.useRef(null),f=UT(n),p=U.useMemo(()=>({reference:i,floating:a,domReference:o}),[i,a,o]),m=oO({...e,elements:{...p,...l&&{reference:l}}}),h=U.useCallback(e=>{let t=_b(e)?{getBoundingClientRect:()=>e.getBoundingClientRect(),getClientRects:()=>e.getClientRects(),contextElement:e}:e;u(t),m.refs.setReference(t)},[m.refs]),g=U.useMemo(()=>({...m.refs,setPositionReference:h,domReference:d}),[m.refs,h]),_=U.useMemo(()=>({...m.elements,domReference:o}),[m.elements,o]),v=U.useMemo(()=>({...m,dataRef:r.context.dataRef,open:s,onOpenChange:r.setOpen,events:r.context.events,floatingId:c,refs:g,elements:_,nodeId:t,rootStore:r}),[m,g,_,t,r,s,c]);return J(()=>{o&&(d.current=o)},[o]),J(()=>{r.context.dataRef.current.floatingContext=v;let e=f?.nodesRef.current.find(e=>e.id===t);e&&(e.context=v)}),U.useMemo(()=>({...m,context:v,refs:g,elements:_,rootStore:r}),[m,g,_,v,r])}var fk=U.createContext(void 0);function pk(){return U.useContext(fk)?.direction??`ltr`}var mk=e=>({name:`arrow`,options:e,async fn(t){let{x:n,y:r,placement:i,rects:a,platform:o,elements:s,middlewareData:c}=t,{element:l,padding:u=0}=kS(e,t)||{};if(l==null)return{};let d=qS(u),f={x:n,y:r},p=FS(i),m=NS(p),h=await o.getDimensions(l),g=p===`y`,_=g?`top`:`left`,v=g?`bottom`:`right`,y=g?`clientHeight`:`clientWidth`,b=a.reference[m]+a.reference[p]-f[p]-a.floating[m],x=f[p]-a.reference[p],S=s.floating[y]||a.floating[m],C=b/2-x/2,w=S/2-h[m]/2-1,T=Math.min(d[_],w),E=Math.min(d[v],w),D=T,O=S-h[m]-E,k=S/2-h[m]/2+C,A=OS(D,k,O),j=!c.arrow&&jS(i)!=null&&k!==A&&a.reference[m]/2-(k<D?T:E)-h[m]/2<0,M=j?k<D?k-D:k-O:0;return{[p]:f[p]+M,data:{[p]:A,centerOffset:k-A-M,...j&&{alignmentOffset:M}},reset:j}}}),hk=(e,t)=>{let{name:n,fn:r}=mk(e);return{name:n,fn:r,options:[e,t]}},gk={name:`hide`,async fn(e){let{width:t,height:n,x:r,y:i}=e.rects.reference,a=t===0&&n===0&&r===0&&i===0,o=await e.platform.detectOverflow(e,{elementContext:`reference`});return{data:{referenceHidden:o.top-n>=0||o.right-t>=0||o.bottom-n>=0||o.left-t>=0||a}}}},_k={sideX:`left`,sideY:`top`},vk=`--available-width`,yk=`--available-height`,bk=`--anchor-width`,xk=`--anchor-height`,Sk=`--transform-origin`,Ck=vk,wk=yk;function Tk(e,t,n){let r=e===`inline-start`||e===`inline-end`;return{top:`top`,right:r?n?`inline-start`:`inline-end`:`right`,bottom:`bottom`,left:r?n?`inline-end`:`inline-start`:`left`}[t]}function Ek(e,t,n){let{rects:r,placement:i}=e;return{side:Tk(t,AS(i),n),align:jS(i)||`center`,anchor:{width:r.reference.width,height:r.reference.height},positioner:{width:r.floating.width,height:r.floating.height}}}function Dk(e){return Ok(e,dk)}function Ok(e,t){let{anchor:n,positionMethod:r=`absolute`,side:i=`bottom`,sideOffset:a=0,align:o=`center`,alignOffset:s=0,collisionBoundary:c,collisionPadding:l=5,sticky:u=!1,arrowPadding:d=5,disableAnchorTracking:f=!1,inline:p,keepMounted:m=!1,floatingRootContext:h,mounted:g,collisionAvoidance:_,shift:v,nodeId:y,adaptiveOrigin:b,lazyFlip:x=!1,externalTree:S}=e,C=_.side||`flip`,w=_.align||`flip`,T=_.fallbackAxisSide||`end`,E=v?.crossAxis??!1,D=v?.rootBoundary,O=typeof n==`function`?n:void 0,k=q(O),A=O?k:n,j=Bw(n),M=Bw(g),N=pk()===`rtl`,[P,F]=U.useState(null);!g&&P!==null&&F(null);let I=x===`placement`,L=P?AS(P):null,R=P&&I?jS(P)||`center`:null,z=L||{top:`top`,right:`right`,bottom:`bottom`,left:`left`,"inline-end":N?`left`:`right`,"inline-start":N?`right`:`left`}[i],B=R||o,ee=B===`center`?z:`${z}-${B}`,V=l;typeof V==`number`?V={top:V,right:V,bottom:V,left:V}:V&&={top:V.top||0,right:V.right||0,bottom:V.bottom||0,left:V.left||0};let te=+(i===`bottom`),ne=+(i===`top`),H=+(i===`right`),re=+(i===`left`),ie={boundary:c===`clipping-ancestors`?`clippingAncestors`:c,padding:V},ae=U.useRef(null),oe=Bw(a),se=Bw(s),ce=typeof a==`function`?0:a,le=typeof s==`function`?0:s,ue=[];p&&ue.push(p),ue.push(sO(e=>{let t=Ek(e,i,N),n=typeof oe.current==`function`?oe.current(t):oe.current,r=typeof se.current==`function`?se.current(t):se.current;return{mainAxis:n,crossAxis:r,alignmentAxis:r}},[ce,le,N,i]));let de=w===`none`&&C!==`shift`,fe=!de&&(u||E||C===`shift`),pe=C===`none`?null:uO({...ie,padding:{top:V.top+1+te,right:V.right+1+re,bottom:V.bottom+1+ne,left:V.left+1+H},mainAxis:!E&&C===`flip`,crossAxis:w===`flip`&&`alignment`,fallbackAxisSideDirection:T}),W=de?null:cO({...ie,rootBoundary:D,mainAxis:w!==`none`,crossAxis:fe,limiter:u||E?void 0:lO(e=>{if(!ae.current)return{};let{width:t,height:n}=ae.current.getBoundingClientRect(),r=PS(AS(e.placement)),i=r===`y`?t:n,a=r===`y`?V.left+V.right:V.top+V.bottom;return{offset:i/2+a/2}})},[ie,u,E,D,V,w]);C===`shift`||w===`shift`||B===`center`?ue.push(W,pe):ue.push(pe,W),ue.push(dO({...ie,apply({elements:{floating:e},availableWidth:t,availableHeight:n,rects:r}){if(!M.current)return;let i=e.style;i.setProperty(Ck,`${t}px`),i.setProperty(wk,`${n}px`);let a=mb(e).devicePixelRatio||1,{x:o,y:s,width:c,height:l}=r.reference,u=(Math.round((o+c)*a)-Math.round(o*a))/a,d=(Math.round((s+l)*a)-Math.round(s*a))/a;i.setProperty(bk,`${u}px`),i.setProperty(xk,`${d}px`)}}),hk(e=>({element:ae.current||Bb(e.elements.floating).createElement(`div`),padding:ae.current?d:0}),[d]),{name:`transformOrigin`,fn(e){let{elements:{floating:t},middlewareData:n,placement:r,platform:o,rects:s,y:c}=e,l=AS(r),u=jS(r),d=PS(l)===`y`,f=ae.current,p=typeof a==`function`?a(Ek(e,i,N)):a,m;m=!f&&u&&Math.abs(d?n.shift?.x||0:n.shift?.y||0)<=1?u===`start`===(d&&o.isRTL?.(t)===!0)?`100%`:`0%`:`${(d?n.arrow?.x||0:n.arrow?.y||0)+(d?f?.clientWidth||0:f?.clientHeight||0)/2}px`;let h=l===`top`||l===`left`?`calc(100% + ${p}px)`:`${-p}px`;return fe&&d&&Math.abs(n.shift?.y||0)>p&&(h=`${s.reference.y+s.reference.height/2-c}px`),t.style.setProperty(Sk,d?`${m} ${h}`:`${h} ${m}`),{}}},gk,b),J(()=>{!g&&h&&h.update({referenceElement:null,floatingElement:null,domReferenceElement:null,positionReference:null})},[g,h]);let me=U.useMemo(()=>({ancestorScroll:!f,elementResize:!f&&typeof ResizeObserver<`u`,layoutShift:!f&&typeof IntersectionObserver<`u`}),[f]),{refs:he,elements:ge,x:G,y:_e,middlewareData:ve,update:ye,placement:be,context:xe,isPositioned:Se,floatingStyles:Ce}=t({rootContext:h,open:m?g:void 0,placement:ee,middleware:ue,strategy:r,whileElementsMounted:m?void 0:(...e)=>JD(...e,me),nodeId:y,externalTree:S}),{sideX:we,sideY:Te}=ve.adaptiveOrigin||_k,Ee=Se?r:`fixed`,De=U.useMemo(()=>{let e;return e=Se?b?{position:Ee,[we]:G,[Te]:_e}:{...Ce,position:Ee}:{position:Ee,top:0,left:0},e[Ck]=`100vw`,e[wk]=`100vh`,Se||(e.opacity=0),e},[b,Ee,we,G,Te,_e,Ce,Se]),Oe=U.useRef(null);J(()=>{if(!g)return;let e=j.current,t=typeof e==`function`?e():e,n=(kk(t)?t.current:t)||null;n!==Oe.current&&(he.setPositionReference(n),Oe.current=n)},[g,he,A,j]),U.useEffect(()=>{if(!g)return;let e=j.current;typeof e!=`function`&&kk(e)&&e.current!==Oe.current&&(he.setPositionReference(e.current),Oe.current=e.current)},[g,he,A,j]),U.useEffect(()=>{if(m&&g&&ge.reference&&ge.floating)return JD(ge.reference,ge.floating,ye,me)},[m,g,ge,ye,me]);let ke=AS(be),Ae=Tk(i,ke,N),je=jS(be)||`center`,Me=!!ve.hide?.referenceHidden;J(()=>{x&&g&&Se&&(ke!==z||I&&je!==B)&&F(be)},[x,I,g,Se,be,ke,je,z,B]);let Ne=U.useMemo(()=>({position:`absolute`,top:ve.arrow?.y,left:ve.arrow?.x}),[ve.arrow]),Pe=ve.arrow?.centerOffset!==0;return U.useMemo(()=>({positionerStyles:De,arrowStyles:Ne,arrowRef:ae,arrowUncentered:Pe,side:Ae,align:je,physicalSide:ke,anchorHidden:Me,refs:he,context:xe,isPositioned:Se,update:ye}),[De,Ne,ae,Pe,Ae,je,ke,Me,he,xe,Se,ye])}function kk(e){return e!=null&&`current`in e}var Ak=U.createContext(void 0);function jk(){let e=U.useContext(Ak);if(!e)throw Error(ha(59));return e}var Mk=U.forwardRef(function(e,t){let{cutout:n,...r}=e,i;if(n){let e=n.getBoundingClientRect();i=`polygon(0% 0%,100% 0%,100% 100%,0% 100%,0% 0%,${e.left}px ${e.top}px,${e.left}px ${e.bottom}px,${e.right}px ${e.bottom}px,${e.right}px ${e.top}px,${e.left}px ${e.top}px)`}return(0,G.jsx)(`div`,{ref:t,role:`presentation`,"data-base-ui-inert":``,...r,style:{position:`fixed`,inset:0,userSelect:`none`,WebkitUserSelect:`none`,clipPath:i}})});function Nk(e,t){e&&Object.assign(e.style,t)}var Pk={position:`relative`,maxHeight:`100%`,overflowX:`hidden`,overflowY:`auto`};function Fk(e){return e===`starting`?OT:Ui}function Ik(e,t,{styles:n,transitionStatus:r,props:i,refs:a,hidden:o,inert:s=!1}){let c={...n};return s&&(c.pointerEvents=`none`),sa(`div`,e,{state:t,ref:a,props:[{role:`presentation`,hidden:o,style:c},Fk(r),i],stateAttributesMapping:rS})}var Lk={},Rk={},zk=``;function Bk(e,t){return bb(e)?e:t}function Vk(e,t,n){return/hidden|clip/.test(e.getComputedStyle(Bk(t,n)).overflowY)}function Hk(e){if(typeof document>`u`)return!1;let t=Bb(e);return mb(t).innerWidth-t.documentElement.clientWidth>0}function Uk(e){if(!(typeof CSS<`u`&&CSS.supports&&CSS.supports(`scrollbar-gutter`,`stable`))||typeof document>`u`)return!1;let t=Bb(e),n=t.documentElement,r=t.body,i=Bk(n,r),a=i.style.overflowY,o=n.style.scrollbarGutter;n.style.scrollbarGutter=`stable`,i.style.overflowY=`scroll`;let s=i.offsetWidth;i.style.overflowY=`hidden`;let c=i.offsetWidth;return i.style.overflowY=a,n.style.scrollbarGutter=o,s===c}function Wk(e){let t=Bb(e),n=t.documentElement,r=t.body,i=Bk(n,r),a={overflowY:i.style.overflowY,overflowX:i.style.overflowX};return Object.assign(i.style,{overflowY:`hidden`,overflowX:`hidden`}),()=>{Object.assign(i.style,a)}}function Gk(e){let t=Bb(e),n=t.documentElement,r=t.body,i=mb(n),a=0,o=0,s=!1,c=Oa.create();if(Nx&&(i.visualViewport?.scale??1)!==1)return()=>{};function l(){let t=i.getComputedStyle(n),c=i.getComputedStyle(r),l=(t.scrollbarGutter||``).includes(`both-edges`)?`stable both-edges`:`stable`;a=n.scrollTop,o=n.scrollLeft,Lk={scrollbarGutter:n.style.scrollbarGutter,overflowY:n.style.overflowY,overflowX:n.style.overflowX},zk=n.style.scrollBehavior,Rk={position:r.style.position,height:r.style.height,width:r.style.width,boxSizing:r.style.boxSizing,overflowY:r.style.overflowY,overflowX:r.style.overflowX,scrollBehavior:r.style.scrollBehavior};let u=n.scrollHeight>n.clientHeight,d=n.scrollWidth>n.clientWidth,f=t.overflowY===`scroll`||c.overflowY===`scroll`,p=t.overflowX===`scroll`||c.overflowX===`scroll`,m=Math.max(0,i.innerWidth-r.clientWidth),h=Math.max(0,i.innerHeight-r.clientHeight),g=parseFloat(c.marginTop)+parseFloat(c.marginBottom),_=parseFloat(c.marginLeft)+parseFloat(c.marginRight),v=Bk(n,r);s=Uk(e),s?(n.style.scrollbarGutter=l,v.style.overflowY=`hidden`,v.style.overflowX=`hidden`):(Object.assign(n.style,{scrollbarGutter:l,overflowY:`hidden`,overflowX:`hidden`}),(u||f)&&(n.style.overflowY=`scroll`),(d||p)&&(n.style.overflowX=`scroll`),Object.assign(r.style,{position:`relative`,height:g||h?`calc(100dvh - ${g+h}px)`:`100dvh`,width:_||m?`calc(100vw - ${_+m}px)`:`100vw`,boxSizing:`border-box`,overflowY:`hidden`,overflowX:`hidden`,scrollBehavior:`unset`}),r.scrollTop=a,r.scrollLeft=o,n.setAttribute(`data-base-ui-scroll-locked`,``),n.style.scrollBehavior=`unset`)}function u(){Object.assign(n.style,Lk),Object.assign(r.style,Rk),s||(n.scrollTop=a,n.scrollLeft=o,n.removeAttribute(`data-base-ui-scroll-locked`),n.style.scrollBehavior=zk)}function d(){u(),c.request(l)}l();let f=rT(i,`resize`,d);return()=>{c.cancel(),u(),typeof i.removeEventListener==`function`&&f()}}var Kk=new class{lockCount=0;restore=null;timeoutLock=Ka.create();timeoutUnlock=Ka.create();acquire(e){return this.lockCount+=1,this.lockCount===1&&this.restore===null&&this.timeoutLock.start(0,()=>this.lock(e)),this.release}release=()=>{--this.lockCount,this.lockCount===0&&this.restore&&this.timeoutUnlock.start(0,this.unlock)};unlock=()=>{this.lockCount===0&&this.restore&&(this.restore?.(),this.restore=null)};lock(e){if(this.lockCount===0||this.restore!==null)return;let t=Bb(e),n=t.documentElement,r=t.body,i=mb(n);if(Vk(i,n,r)){let t=new i.MutationObserver(()=>{Vk(i,n,r)||(t.disconnect(),this.restore=null,this.lock(e))}),a={attributes:!0};t.observe(n,a),t.observe(r,a),this.restore=()=>t.disconnect();return}let a=Ox||!Hk(e);this.restore=a?Wk(e):Gk(e)}};function qk(e=!0,t=null){J(()=>{if(e)return Kk.acquire(t)},[e,t])}var Jk=20;function Yk(e,t,n,r){let[i,a]=U.useState(!1);J(()=>{if(!e||!t||n==null){a(!1);return}let r=Bb(n).documentElement.clientWidth,i=n.offsetWidth;a(r>0&&i>0&&i>=r-Jk)},[e,t,n]),qk(e&&(!t||i),r)}var Xk={position:`fixed`},Zk=U.forwardRef(function(e,t){let{anchor:n,className:r,render:i,positionMethod:a,side:o,align:s,sideOffset:c,alignOffset:l,collisionBoundary:u=`clipping-ancestors`,collisionPadding:d,arrowPadding:f,sticky:p,disableAnchorTracking:m,alignItemWithTrigger:h=!0,collisionAvoidance:g=AT,style:_,...v}=e,y=mO(),b=hO(),x=y.useState(`open`),S=y.useState(`mounted`),C=y.useState(`modal`),w=y.useState(`value`),T=y.useState(`openMethod`),E=y.useState(`positionerElement`),D=y.useState(`triggerElement`),O=y.useState(`isItemEqualToValue`),k=y.useState(`transitionStatus`),A=U.useRef(null),j=U.useRef(null),[M,N]=U.useState(h),P=S&&M&&T!==`touch`;!S&&M!==h&&N(h),U.useImperativeHandle(y.context.alignItemWithTriggerActiveRef,()=>P),Yk((P||C)&&x,T===`touch`,E,D);let F=Dk({anchor:n,floatingRootContext:b,positionMethod:a,mounted:S,side:o,sideOffset:c,align:s,alignOffset:l,arrowPadding:f,collisionBoundary:u,collisionPadding:d,sticky:p,disableAnchorTracking:m??P,collisionAvoidance:g,keepMounted:!0}),I=P?`none`:F.side,L=P?Xk:F.positionerStyles,R={open:x,side:I,align:F.align,anchorHidden:F.anchorHidden};J(()=>{y.set(`popupSide`,F.side)},[y,F.side]);let z=Ik(e,R,{styles:L,transitionStatus:k,props:v,refs:[t,y.useStateSetter(`positionerElement`)],hidden:!S,inert:!x}),B=U.useRef(0),ee=q(e=>{if(y.context.valuesRef.current.length===0)return;let t=B.current;B.current=e.size;let n=$(MC);if(t!==0&&!y.state.multiple&&w!==null&&xO(y.context.valuesRef.current,w,O)===-1){let e=y.context.initialValueRef.current,t=e!=null&&xO(y.context.valuesRef.current,e,O)!==-1?e:null;y.context.setValue(t,n),t===null&&(y.set(`selectedIndex`,null),y.context.selectedItemTextRef.current=null)}if(t!==0&&y.state.multiple&&Array.isArray(w)){let e=w.filter(e=>xO(y.context.valuesRef.current,e,O)!==-1);e.length!==w.length&&(y.context.setValue(e,n),e.length===0&&(y.set(`selectedIndex`,null),y.context.selectedItemTextRef.current=null))}if(x&&P){y.update({scrollUpArrowVisible:!1,scrollDownArrowVisible:!1});let e={height:``};Nk(E,e),Nk(y.context.popupRef.current,e)}}),V=U.useMemo(()=>({...F,side:I,alignItemWithTriggerActive:P,setControlledAlignItemWithTrigger:N,scrollUpArrowRef:A,scrollDownArrowRef:j}),[F,I,P,N]);return(0,G.jsx)(ik,{elementsRef:y.context.listRef,labelsRef:y.context.labelsRef,onMapChange:ee,children:(0,G.jsxs)(Ak.Provider,{value:V,children:[S&&C&&(0,G.jsx)(Mk,{inert:tk(!x),cutout:D}),z]})})}),Qk=`base-ui-disable-scrollbar`,$k={className:Qk,getElement(e){return(0,G.jsx)(`style`,{nonce:e,href:Qk,precedence:`base-ui:low`,children:`.${Qk}{scrollbar-width:none}.${Qk}::-webkit-scrollbar{display:none}`})}},eA=U.createContext(void 0);function tA(e){let t=U.useContext(eA);if(t===void 0&&!e)throw Error(ha(69));return t}var nA=`ArrowUp`,rA=`ArrowDown`,iA=`ArrowLeft`,aA=`ArrowRight`,oA=`Home`,sA=new Set([nA,rA,iA,aA,oA,`End`]),cA=`Shift`,lA=[cA,`Control`,`Alt`,`Meta`];function uA(e){return vb(e)&&e.tagName===`INPUT`}function dA(e){return!!(uA(e)&&e.selectionStart!=null||vb(e)&&e.tagName===`TEXTAREA`)}function fA(e,t,n,r){if(!e||!t||!t.scrollTo)return;let i=e.scrollLeft,a=e.scrollTop,o=e.clientWidth<e.scrollWidth,s=e.clientHeight<e.scrollHeight;if(o&&r!==`vertical`){let r=pA(e,t,`left`),a=mA(e),o=mA(t);n===`ltr`&&(r+t.offsetWidth+o.scrollMarginRight>e.scrollLeft+e.clientWidth-a.scrollPaddingRight?i=r+t.offsetWidth+o.scrollMarginRight-e.clientWidth+a.scrollPaddingRight:r-o.scrollMarginLeft<e.scrollLeft+a.scrollPaddingLeft&&(i=r-o.scrollMarginLeft-a.scrollPaddingLeft)),n===`rtl`&&(r-o.scrollMarginLeft<e.scrollLeft+a.scrollPaddingLeft?i=r-o.scrollMarginLeft-a.scrollPaddingLeft:r+t.offsetWidth+o.scrollMarginRight>e.scrollLeft+e.clientWidth-a.scrollPaddingRight&&(i=r+t.offsetWidth+o.scrollMarginRight-e.clientWidth+a.scrollPaddingRight))}if(s&&r!==`horizontal`){let n=pA(e,t,`top`),r=mA(e),i=mA(t);n-i.scrollMarginTop<e.scrollTop+r.scrollPaddingTop?a=n-i.scrollMarginTop-r.scrollPaddingTop:n+t.offsetHeight+i.scrollMarginBottom>e.scrollTop+e.clientHeight-r.scrollPaddingBottom&&(a=n+t.offsetHeight+i.scrollMarginBottom-e.clientHeight+r.scrollPaddingBottom)}e.scrollTo({left:i,top:a,behavior:`auto`})}function pA(e,t,n){let r=n===`left`?`offsetLeft`:`offsetTop`,i=0;for(;t.offsetParent&&(i+=t[r],t.offsetParent!==e);)t=t.offsetParent;return i}function mA(e){let t=getComputedStyle(e);return{scrollMarginTop:parseFloat(t.scrollMarginTop)||0,scrollMarginRight:parseFloat(t.scrollMarginRight)||0,scrollMarginBottom:parseFloat(t.scrollMarginBottom)||0,scrollMarginLeft:parseFloat(t.scrollMarginLeft)||0,scrollPaddingTop:parseFloat(t.scrollPaddingTop)||0,scrollPaddingRight:parseFloat(t.scrollPaddingRight)||0,scrollPaddingBottom:parseFloat(t.scrollPaddingBottom)||0,scrollPaddingLeft:parseFloat(t.scrollPaddingLeft)||0}}var hA=U.createContext(void 0),gA={disableStyleElements:!1};function _A(){return U.useContext(hA)??gA}var vA=`--transform-origin`,yA={...rS,...Ba},bA=U.forwardRef(function(e,t){let{render:n,className:r,style:i,finalFocus:a,...o}=e,s=mO(),c=s.useState(`multiple`),l=s.useState(`readOnly`),u=s.useState(`highlightItemOnHover`),d=hO(),{side:f,align:p,alignItemWithTriggerActive:m,isPositioned:h,setControlledAlignItemWithTrigger:g}=jk(),_=tA(!0)!=null,v=pk(),{nonce:y,disableStyleElements:b}=_A(),x=s.useState(`id`),S=s.useState(`open`),C=s.useState(`openMethod`),w=s.useState(`mounted`),T=s.useState(`popupProps`),E=s.useState(`transitionStatus`),D=s.useState(`triggerElement`),O=s.useState(`positionerElement`),k=s.useState(`listElement`),A=U.useRef(!1),j=U.useRef(!1),M=U.useRef({}),N=ka(),P=q(e=>{if(!O||!s.context.popupRef.current||!j.current)return;let t=O.style.top===`0px`,n=O.style.bottom===`0px`;if(A.current||!m||!t&&!n){s.context.handleScrollArrowVisibility(e);return}let r=CA(O),i=wA(O.getBoundingClientRect().height,`y`,r),a=Bb(O),o=mb(O),c=o.getComputedStyle(O),l=parseFloat(c.marginTop),u=parseFloat(c.marginBottom),d=xA(o.getComputedStyle(s.context.popupRef.current)),f=Math.min(a.documentElement.clientHeight-l-u,d),p=e.scrollTop,h=SA(e),g=null,_=e=>{O.style.height=`${e}px`},v=t?h-p:p,y=Math.min(i+v,f);if(v<=1){let n=zO(v,0,f-i);n>0&&_(i+n),e.scrollTop=t?h:0,f-(i+n)<=1&&(A.current=!0),s.context.handleScrollArrowVisibility(e);return}f-y>1?g=t?1/0:0:n&&p<h&&(g=p-(v-(i+v-f)));let b=Math.ceil(y);if(b!==0&&_(b),g!=null){let t=zO(g,0,SA(e));Math.abs(e.scrollTop-t)>1&&(e.scrollTop=t)}b>=f-1&&(A.current=!0),s.context.handleScrollArrowVisibility(e)});U.useImperativeHandle(s.context.scrollHandlerRef,()=>P,[P]),La({open:S,ref:s.context.popupRef,onComplete(){S&&s.context.onOpenChangeComplete(!0)}});let F={open:S,transitionStatus:E,side:f,align:p};J(()=>{O&&s.context.popupRef.current&&!Object.keys(M.current).length&&(M.current={top:O.style.top||`0`,left:O.style.left||`0`,right:O.style.right,height:O.style.height,bottom:O.style.bottom,minHeight:O.style.minHeight,maxHeight:O.style.maxHeight,marginTop:O.style.marginTop,marginBottom:O.style.marginBottom})},[s,O]),J(()=>{S||m||(j.current=!1,A.current=!1,Nk(O,M.current))},[S,m,O]),J(()=>{let e=s.context.popupRef.current;if(!S||!D||!O||!e||m&&!h||s.state.transitionStatus===`ending`)return;if(j.current=!0,e.style.removeProperty(vA),!m){N.request(()=>s.context.handleScrollArrowVisibility(k||e));return}let t=DA(e);try{let t=s.context.selectedItemTextRef.current;t?.isConnected||(t=!s.select(`hasSelectedValue`)&&s.context.firstItemTextRef.current?.isConnected?s.context.firstItemTextRef.current:null);let n=s.context.valueRef.current,r=mb(O),i=r.getComputedStyle(O),a=r.getComputedStyle(e),o=Bb(D),c=CA(D),l=TA(D.getBoundingClientRect(),c),d=TA(O.getBoundingClientRect(),c),f=l.height,p=k||e,m=p.scrollHeight,h=parseFloat(a.borderBottomWidth),_=parseFloat(i.marginTop)||10,y=parseFloat(i.marginBottom)||10,b=parseFloat(i.minHeight)||100,x=xA(a),S=o.documentElement.clientHeight-_-y,C=o.documentElement.clientWidth,w=S-l.bottom+f,T,E=v===`rtl`?l.right-d.width:l.left,j=0;if(t&&n){let e=TA(n.getBoundingClientRect(),c);T=TA(t.getBoundingClientRect(),c),E=d.left+(v===`rtl`?e.right-T.right:e.left-T.left);let r=e.top-l.top+e.height/2;j=T.top-d.top+T.height/2-r}let N=w+j+y+h,P=Math.min(S,N),F=S-_-y,I=N-P,L=C-5;O.style.left=`${zO(E,5,L-d.width)}px`,O.style.height=`${P}px`,O.style.maxHeight=`none`,O.style.marginTop=`${_}px`,O.style.marginBottom=`${y}px`,e.style.height=`100%`;let R=SA(p),z=I>=R-1;z&&(P=Math.min(S,d.height)-(I-R));let B=l.top<20||l.bottom>S-20||Math.ceil(P)+1<Math.min(m,b),ee=(r.visualViewport?.scale??1)!==1&&Nx;if(B||ee){Nk(O,M.current),g(!1);return}let V=Math.max(b,P);if(z){let e=Math.max(0,S-N);O.style.top=d.height>=F?`0`:`${e}px`,O.style.height=`${P}px`,p.scrollTop=SA(p)}else O.style.bottom=`0`,p.scrollTop=I;if(T){let t=d.top,n=d.height,r=T.top+T.height/2,i=zO(n>0?(r-t)/n*100:50,0,100);e.style.setProperty(vA,`50% ${i}%`)}(V===S||P>=x)&&(A.current=!0),s.context.handleScrollArrowVisibility(p),u&&s.state.selectedIndex===null&&s.state.activeIndex===null&&s.context.listRef.current[0]!=null&&s.set(`activeIndex`,0)}finally{t()}},[s,S,O,D,m,g,N,k,u,v,h]),U.useEffect(()=>{if(!m||!O||!S)return;let e=mb(O);function t(e){s.context.setOpen(!1,$(XC,e))}return rT(e,`resize`,t)},[s,m,O,S]);let I={...k?{role:`presentation`}:{role:`listbox`,"aria-multiselectable":c||void 0,"aria-readonly":l||void 0,id:`${x}-list`},onKeyDown(e){_&&sA.has(e.key)&&e.stopPropagation()},onScroll(e){k||P(e.currentTarget)},...m&&{style:k?{height:`100%`}:Pk},className:!k&&m?$k.className:void 0},L=sa(`div`,e,{ref:[t,s.context.popupRef],state:F,stateAttributesMapping:yA,props:[T,I,Fk(E),o]});return(0,G.jsxs)(U.Fragment,{children:[!b&&$k.getElement(y),(0,G.jsx)(tE,{context:d,modal:!1,disabled:!w,openInteractionType:C,returnFocus:a,restoreFocus:!0,children:L})]})});function xA(e){let t=e.maxHeight;return t.endsWith(`px`)&&parseFloat(t)||1/0}function SA(e){return BO(e.scrollHeight,e.clientHeight)}function CA(e){return GD.getScale(e)}function wA(e,t,n){return e/n[t]}function TA(e,t){return JS({x:wA(e.x,`x`,t),y:wA(e.y,`y`,t),width:wA(e.width,`x`,t),height:wA(e.height,`y`,t)})}var EA=[[`transform`,`none`],[`scale`,`1`],[`translate`,`0 0`]];function DA(e){let{style:t}=e,n={};for(let[e,r]of EA)n[e]=t.getPropertyValue(e),t.setProperty(e,r,`important`);return()=>{for(let[e]of EA){let r=n[e];r?t.setProperty(e,r):t.removeProperty(e)}}}var OA=U.forwardRef(function(e,t){let{render:n,className:r,style:i,...a}=e,o=mO(),s=o.useState(`multiple`),c=o.useState(`readOnly`),{alignItemWithTriggerActive:l}=jk(),u=o.useState(`hasScrollArrows`),d=o.useState(`openMethod`),f={id:`${o.useState(`id`)}-list`,role:`listbox`,"aria-multiselectable":s||void 0,"aria-readonly":c||void 0,onScroll(e){o.context.scrollHandlerRef.current?.(e.currentTarget)},...l&&{style:Pk},className:u&&d!==`touch`?$k.className:void 0};return sa(`div`,e,{ref:[t,o.useStateSetter(`listElement`)],props:[f,a]})});function kA(e={}){let{guess:t,label:n,metadata:r,textRef:i,index:a}=e,{register:o,unregister:s,subscribeMapChange:c,nextIndexRef:l}=rk(),u=U.useRef(-1),[d,f]=U.useState(a==null&&t?()=>{if(u.current===-1){let e=l.current;l.current+=1,u.current=e}return u.current}:-1),p=a??d,m=U.useRef(null),h=U.useCallback(e=>{let t=m.current;t&&s(t),m.current=e,e&&o(e,{metadata:r??null,index:a??null,label:n,textRef:i})},[a,o,s,r,n,i]);return J(()=>{if(a==null)return c(e=>{let t=m.current?e.get(m.current)?.index:null;t!=null&&f(t)})},[a,c]),{ref:h,index:p}}var AA=U.createContext(void 0);function jA(){let e=U.useContext(AA);if(!e)throw Error(ha(57));return e}var MA=U.memo(U.forwardRef(function(e,t){let{render:n,className:r,style:i,value:a=null,label:o,disabled:s=!1,nativeButton:c=!1,...l}=e,u=U.useRef(null),d=kA({guess:!0,label:o,textRef:u}),f=mO(),{props:p,multiple:m,disabled:h,readOnly:g,isItemEqualToValue:_}=f.useState(`itemRoot`),v=h||s,y=f.useState(`isActive`,d.index),b=f.useState(`open`),x=f.useState(`isSelected`,a),S=f.useState(`isSelectedByFocus`,d.index),C=d.index,w=U.useRef(null);J(()=>{let e=f.context.valuesRef.current;return e[C]=a,()=>{delete e[C]}},[C,a,f]),J(()=>{let e=f.state.value,t=f.state.selectedIndex,n=t,r;m&&Array.isArray(e)?(n=wO(C,a,f.context.valuesRef.current,e,_,t),r=n===C,C===t&&!r&&(f.context.selectedItemTextRef.current=null)):(r=e!==void 0&&vO(a,e,_),r&&(n=C)),f.set(`selectedIndex`,n),r&&u.current&&(f.context.selectedItemTextRef.current=u.current)},[C,m,_,f,a]);let T=U.useRef(`mouse`),E=U.useRef(!1),{getButtonProps:D,buttonRef:O}=Hb({disabled:v,focusableWhenDisabled:!0,native:c,composite:!0}),k={disabled:v,selected:x,highlighted:y};function A(e){if(h||g)return;let t=f.state.value;if(m){let n=Array.isArray(t)?t:[],r=x?TO(n,a,_):[...n,a];f.context.setValue(r,$(LC,e))}else f.context.setValue(a,$(LC,e)),f.context.setOpen(!1,$(LC,e))}function j(){f.context.selectionRef.current.dragY=0}let M={role:`option`,"aria-selected":x,tabIndex:b&&y?0:-1,onKeyDown(e){f.set(`activeIndex`,C),e.key===` `&&f.context.typingRef.current&&e.preventDefault()},onClick(e){let t=T.current!==`touch`,n=e.nativeEvent.pointerType,r=t&&vS(e.nativeEvent)&&(n!==void 0||y),i=t&&!r&&!E.current;E.current=!1,!(v||i)&&A(e.nativeEvent)},onPointerEnter(e){T.current=e.pointerType},onPointerMove(e){if(e.pointerType===`mouse`&&e.buttons===1){let t=f.context.selectionRef.current;t.dragY+=e.movementY,t.dragY**2>=64&&(t.allowUnselectedMouseUp=!0)}},onPointerDown(e){T.current=e.pointerType,E.current=!0,j()},onMouseUp(){if(j(),v||T.current===`touch`||E.current)return;let e=!f.context.selectionRef.current.allowSelectedMouseUp&&x,t=!f.context.selectionRef.current.allowUnselectedMouseUp&&!x;e||t||(E.current=!0,w.current?.click(),E.current=!1)}},N=sa(`div`,e,{ref:[O,t,d.ref,w],state:k,props:[p,M,l,D]}),P=U.useMemo(()=>({selected:x,index:C,textRef:u,selectedByFocus:S}),[x,C,u,S]);return(0,G.jsx)(AA.Provider,{value:P,children:N})})),NA=U.memo(U.forwardRef(function(e,t){let{render:n,className:r,style:i,keepMounted:a,selected:o,...s}=e,c=U.useRef(null),{transitionStatus:l,setMounted:u}=Va(o),d=sa(`span`,e,{ref:[t,c],state:{selected:o,transitionStatus:l},props:[{"aria-hidden":!0,children:`✔️`},s],stateAttributesMapping:Ba});return La({batch:!0,enabled:!o,open:o,ref:c,onComplete(){o||u(!1)}}),d})),PA=U.forwardRef(function(e,t){let{selected:n}=jA();return e.keepMounted||n?(0,G.jsx)(NA,{...e,selected:n,ref:t}):null}),FA=U.memo(U.forwardRef(function(e,t){let{index:n,textRef:r,selectedByFocus:i}=jA(),a=mO(),{render:o,className:s,style:c,...l}=e;return sa(`div`,e,{ref:[U.useCallback(e=>{e&&(n===0&&(a.context.firstItemTextRef.current=e),i&&(a.context.selectedItemTextRef.current=e))},[a,n,i]),t,r],props:l})})),IA=U.forwardRef(function(e,t){let{render:n,className:r,style:i,direction:a,keepMounted:o,...s}=e,c=a===`up`,l=mO(),{side:u,scrollDownArrowRef:d,scrollUpArrowRef:f}=jk(),p=c?`scrollUpArrowVisible`:`scrollDownArrowVisible`,m=l.useState(p),h=l.useState(`openMethod`),g=m&&h!==`touch`,_=qa(),v=c?f:d,{mounted:y,transitionStatus:b,setMounted:x}=Va(g);J(()=>(l.context.scrollArrowsMountedCountRef.current+=1,l.set(`hasScrollArrows`,!0),()=>{l.context.scrollArrowsMountedCountRef.current=Math.max(0,l.context.scrollArrowsMountedCountRef.current-1),l.context.scrollArrowsMountedCountRef.current===0&&l.set(`hasScrollArrows`,!1)}),[l]),La({open:g,ref:v,onComplete(){g||x(!1)}});let S=sa(`div`,e,{ref:[t,v],state:{direction:a,visible:g,side:u,transitionStatus:b},props:[{"aria-hidden":!0,children:c?`▲`:`▼`,style:{position:`absolute`},onMouseMove(e){if(e.movementX===0&&e.movementY===0||_.isStarted())return;l.set(`activeIndex`,null);function t(){let e=l.state.listElement??l.context.popupRef.current;if(!e)return;l.set(`activeIndex`,null),l.context.handleScrollArrowVisibility(e);let n=BO(e.scrollHeight,e.clientHeight),r=VO(e.scrollTop,n),i=r===(c?0:n),a=l.context.listRef.current;if(r!==e.scrollTop&&(e.scrollTop=r),i)_.clear();else{if(a.length>0){let t=v.current?.offsetHeight||0;e.scrollTop=LA(a,c,r,e.clientHeight,t,n)}_.start(40,t)}}_.start(40,t)},onMouseLeave(){_.clear()}},s],stateAttributesMapping:Ba});return y||o?S:null});function LA(e,t,n,r,i,a){if(t){let t=0,r=n+i-1;for(let n=0;n<e.length;n+=1){let i=e[n];if(i&&i.offsetTop>=r){t=n;break}}let o=Math.max(0,t-1),s=e[o];return o<t&&s?VO(s.offsetTop-i,a):0}let o=e.length-1,s=n+r-i+1;for(let t=0;t<e.length;t+=1){let n=e[t];if(n&&n.offsetTop+n.offsetHeight>s){o=Math.max(0,t-1);break}}let c=Math.min(e.length-1,o+1),l=e[c];return c>o&&l?VO(l.offsetTop+l.offsetHeight-r+i,a):a}var RA=U.forwardRef(function(e,t){return(0,G.jsx)(IA,{...e,ref:t,direction:`down`})}),zA=U.forwardRef(function(e,t){return(0,G.jsx)(IA,{...e,ref:t,direction:`up`})}),BA=U.createContext(void 0);function VA(){let e=U.useContext(BA);if(e===void 0)throw Error(ha(56));return e}var HA=U.forwardRef(function(e,t){let{render:n,className:r,style:i,...a}=e,[o,s]=U.useState(),c=U.useMemo(()=>({labelId:o,setLabelId:s}),[o,s]),l=sa(`div`,e,{ref:t,props:[{role:`group`,"aria-labelledby":o},a]});return(0,G.jsx)(BA.Provider,{value:c,children:l})}),UA=U.forwardRef(function(e,t){let{render:n,className:r,style:i,id:a,...o}=e,{setLabelId:s}=VA(),c=hx(a);return J(()=>(s(c),()=>{s(e=>e===c?void 0:e)}),[c,s]),sa(`div`,e,{ref:t,props:[{id:c,"aria-hidden":!0},o]})}),WA=HO;function GA({className:e,...t}){return(0,G.jsx)(HA,{"data-slot":`select-group`,className:K(`scroll-my-1 p-1`,e),...t})}function KA({className:e,...t}){return(0,G.jsx)(QO,{"data-slot":`select-value`,className:K(`flex flex-1 text-left`,e),...t})}function qA({className:e,size:t=`default`,children:n,...r}){return(0,G.jsxs)(XO,{"data-slot":`select-trigger`,"data-size":t,className:K(`flex w-fit items-center justify-between gap-1.5 rounded-md border border-input bg-transparent py-2 pr-2 pl-2.5 text-[13px] whitespace-nowrap transition-colors outline-none select-none focus-visible:border-primary focus-visible:ring-2 focus-visible:ring-primary/20 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 data-placeholder:text-muted-foreground data-[size=default]:h-8 data-[size=sm]:h-7 data-[size=sm]:rounded-[min(var(--radius-md),10px)] *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-1.5 dark:bg-input/30 dark:hover:bg-input/50 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4`,e),...r,children:[n,(0,G.jsx)($O,{render:(0,G.jsx)(pn,{className:`pointer-events-none size-4 text-muted-foreground`})})]})}function JA({className:e,children:t,side:n=`bottom`,sideOffset:r=4,align:i=`center`,alignOffset:a=0,alignItemWithTrigger:o=!0,...s}){return(0,G.jsx)(ek,{children:(0,G.jsx)(Zk,{side:n,sideOffset:r,align:i,alignOffset:a,alignItemWithTrigger:o,className:`isolate z-50`,children:(0,G.jsxs)(bA,{"data-slot":`select-content`,"data-align-trigger":o,className:K(`relative isolate z-50 max-h-(--available-height) w-(--anchor-width) min-w-36 origin-(--transform-origin) overflow-x-hidden overflow-y-auto rounded-lg bg-popover text-popover-foreground border border-border/70 shadow-float duration-100 data-[align-trigger=true]:animate-none 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-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),...s,children:[(0,G.jsx)(ZA,{}),(0,G.jsx)(OA,{children:t}),(0,G.jsx)(QA,{})]})})})}function YA({className:e,...t}){return(0,G.jsx)(UA,{"data-slot":`select-label`,className:K(`px-1.5 py-1 text-xs text-muted-foreground`,e),...t})}function XA({className:e,children:t,...n}){return(0,G.jsxs)(MA,{"data-slot":`select-item`,className:K(`relative flex w-full cursor-default items-center gap-1.5 rounded-md py-1 pr-8 pl-1.5 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2`,e),...n,children:[(0,G.jsx)(FA,{className:`flex flex-1 shrink-0 gap-2 whitespace-nowrap`,children:t}),(0,G.jsx)(PA,{render:(0,G.jsx)(`span`,{className:`pointer-events-none absolute right-2 flex size-4 items-center justify-center`}),children:(0,G.jsx)(dn,{className:`pointer-events-none`})})]})}function ZA({className:e,...t}){return(0,G.jsx)(zA,{"data-slot":`select-scroll-up-button`,className:K(`top-0 z-10 flex w-full cursor-default items-center justify-center bg-popover py-1 [&_svg:not([class*='size-'])]:size-4`,e),...t,children:(0,G.jsx)(hn,{})})}function QA({className:e,...t}){return(0,G.jsx)(RA,{"data-slot":`select-scroll-down-button`,className:K(`bottom-0 z-10 flex w-full cursor-default items-center justify-center bg-popover py-1 [&_svg:not([class*='size-'])]:size-4`,e),...t,children:(0,G.jsx)(pn,{})})}var $A=U.createContext(void 0);function ej(e){let t=U.useContext($A);if(!e&&t===void 0)throw Error(ha(27));return t}var tj=U.forwardRef(function(e,t){let{render:n,className:r,style:i,forceRender:a=!1,...o}=e,s=ej(),c=s.useState(`open`),l=s.useState(`nested`),u=s.useState(`mounted`);return sa(`div`,e,{state:{open:c,transitionStatus:s.useState(`transitionStatus`)},ref:[s.context.backdropRef,t],stateAttributesMapping:iS,props:[{role:`presentation`,hidden:!u,style:{userSelect:`none`,WebkitUserSelect:`none`}},o],enabled:a||!l})}),nj=U.forwardRef(function(e,t){let{render:n,className:r,style:i,disabled:a=!1,nativeButton:o=!0,...s}=e,c=ej(),l=c.useState(`open`),{getButtonProps:u,buttonRef:d}=Hb({disabled:a,native:o}),f={disabled:a};function p(e){l&&c.setOpen(!1,$(RC,e.nativeEvent))}return sa(`button`,e,{state:f,ref:[t,d],props:[{onClick:p},s,u]})}),rj=U.forwardRef(function(e,t){let{render:n,className:r,style:i,id:a,...o}=e,s=ej(),c=hx(a);return s.useSyncedValueWithCleanup(`descriptionElementId`,c),sa(`p`,e,{ref:t,props:[{id:c},o]})}),ij=U.createContext(void 0);function aj(){let e=U.useContext(ij);if(e===void 0)throw Error(ha(26));return e}var oj=`--nested-dialogs`,sj=`data-nested-dialog-open`,cj={...rS,...Ba,nestedDialogOpen(e){return e?{[sj]:``}:null}},lj=U.forwardRef(function(e,t){let{render:n,className:r,style:i,finalFocus:a,initialFocus:o,...s}=e,c=ej(),l=c.useState(`descriptionElementId`),u=c.useState(`disablePointerDismissal`),d=c.useState(`floatingRootContext`),f=c.useState(`popupProps`),p=c.useState(`modal`),m=c.useState(`mounted`),h=c.useState(`nested`),g=c.useState(`nestedOpenDialogCount`),_=c.useState(`open`),v=c.useState(`openMethod`),y=c.useState(`titleElementId`),b=c.useState(`transitionStatus`),x=c.useState(`role`),S=d.useState(`floatingId`);aj(),La({open:_,ref:c.context.popupRef,onComplete(){_&&c.context.onOpenChangeComplete?.(!0)}});let C=o===void 0?fE(c.context.popupRef):o,w=g>0,T=c.useStateSetter(`popupElement`),E=sa(`div`,e,{state:{open:_,nested:h,transitionStatus:b,nestedDialogOpen:w},props:[f,{id:S,"aria-labelledby":y,"aria-describedby":l,role:x,...dE,hidden:!m,onKeyDown(e){sA.has(e.key)&&e.stopPropagation()},style:{[oj]:g}},s],ref:[t,c.context.popupRef,T],stateAttributesMapping:cj});return(0,G.jsx)(tE,{context:d,openInteractionType:v,disabled:!m,closeOnFocusOut:!u,initialFocus:C,returnFocus:a,modal:p!==!1,restoreFocus:`popup`,children:E})}),uj=U.forwardRef(function(e,t){let{keepMounted:n=!1,...r}=e,i=ej(),a=i.useState(`mounted`),o=i.useState(`modal`),s=i.useState(`open`);return a||n?(0,G.jsx)(ij.Provider,{value:n,children:(0,G.jsxs)(LT,{ref:t,...r,children:[a&&o===!0&&(0,G.jsx)(Mk,{ref:i.context.internalBackdropRef,inert:tk(!s)}),e.children]})}):null});function dj({store:e,parentContext:t,isDrawer:n}){let r=e.useState(`open`),i=e.useState(`mounted`),a=e.useState(`disablePointerDismissal`),o=e.useState(`modal`),s=e.useState(`popupElement`),c=e.useState(`floatingRootContext`),[l,u]=U.useState(0),[d,f]=U.useState(0),p=l===0,m=cE(c,{outsidePressEvent(){return e.context.internalBackdropRef.current||e.context.backdropRef.current?`intentional`:{mouse:o===`trap-focus`?`sloppy`:`intentional`,touch:`sloppy`}},outsidePress(t){if(!e.context.outsidePressEnabledRef.current||`button`in t&&t.button!==0)return!1;if(`touches`in t){if(t.type===`touchend`){if(t.changedTouches.length!==1||t.touches.length!==0)return!1}else if(t.touches.length!==1)return!1}let n=Rx(t);if(p&&!a){if(o){let t=e.context.internalBackdropRef.current,r=e.context.backdropRef.current;return t||r?t===n||r===n||Q(n,s)&&!n?.hasAttribute(`data-base-ui-portal`):!0}return!0}return!1},escapeKey:p});return qk(r&&o===!0,s),e.useContextCallback(`onNestedDialogOpen`,(t,n)=>{(e.select(`open`)||e.select(`mounted`))&&(u(t),f(n))}),J(()=>{!r&&!i&&(u(0),f(0))},[r,i]),J(()=>(t?.onNestedDialogOpen&&r&&t.onNestedDialogOpen(l+1,d+ +!!n),()=>{t?.onNestedDialogOpen&&r&&t.onNestedDialogOpen(0,0)}),[n,r,l,d,t]),CE(e,{activeTriggerProps:m.reference,inactiveTriggerProps:m.trigger,popupProps:m.floating,nestedOpenDialogCount:l,nestedOpenDrawerCount:d}),null}var fj={...PE,modal:e=>e.modal,nested:e=>e.nested,nestedOpenDialogCount:e=>e.nestedOpenDialogCount,nestedOpenDrawerCount:e=>e.nestedOpenDrawerCount,disablePointerDismissal:e=>e.disablePointerDismissal,openMethod:e=>e.openMethod,descriptionElementId:e=>e.descriptionElementId,titleElementId:e=>e.titleElementId,viewportElement:e=>e.viewportElement,role:e=>e.role},pj=class extends tT{constructor(e,t,n){let r=new TE,i=mj(e,r,t,n);super(i,hj(r),fj)}setOpen=(e,t)=>{t.preventUnmountOnClose=()=>{this.set(`preventUnmountingOnClose`,!0)},!e&&t.trigger==null&&this.state.activeTriggerId!=null&&(t.trigger=this.state.activeTriggerElement??void 0),this.context.onOpenChange?.(e,t),!t.isCanceled&&(this.state.floatingRootContext.dispatchOpenChange(e,t),this.update(_E(this.state,e,t.trigger)))}};function mj(e,t,n,r=!1){return{...OE(t,n,r),modal:!0,disablePointerDismissal:!1,viewportElement:null,descriptionElementId:void 0,titleElementId:void 0,openMethod:null,nested:!1,nestedOpenDialogCount:0,nestedOpenDrawerCount:0,role:`dialog`,...e}}function hj(e){return{popupRef:U.createRef(),backdropRef:U.createRef(),internalBackdropRef:U.createRef(),outsidePressEnabledRef:{current:!0},triggerElements:e,onOpenChange:void 0,onOpenChangeComplete:void 0}}function gj(e,t){let{children:n,open:r,defaultOpen:i=!1,onOpenChange:a,onOpenChangeComplete:o,disablePointerDismissal:s=!1,modal:c=!0,actionsRef:l,handle:u,triggerId:d,defaultTriggerId:f=null}=t,p=e===`drawer`,m=e===`alert-dialog`,h=m?!0:c,g=m||s,_=m?`alertdialog`:`dialog`,v=ej(!0),y={modal:h,disablePointerDismissal:g,nested:v!=null,role:_},b=pE((e,t)=>new pj({open:i,openProp:r,activeTriggerId:f,triggerIdProp:d,...y},e,t),!0);b.useControlledProp(`openProp`,r),b.useControlledProp(`triggerIdProp`,d),b.useSyncedValues(y),b.useContextCallback(`onOpenChange`,a),b.useContextCallback(`onOpenChangeComplete`,o);let x=b.useState(`open`),S=b.useState(`mounted`),C=b.useState(`payload`);wE(b,x),xE(b);let{forceUnmount:w}=SE(x,b);U.useImperativeHandle(l,()=>({unmount:w,close:()=>b.setOpen(!1,$(YC))}),[w,b]);let T=x||S||u!=null;return(0,G.jsxs)($A.Provider,{value:b,children:[u&&(0,G.jsx)(mE,{handle:u,store:b}),T&&(0,G.jsx)(dj,{store:b,parentContext:v?.context,isDrawer:p}),typeof n==`function`?n({payload:C}):n]})}var _j=Kw(function(e){return gj(`dialog`,e)}),vj=U.forwardRef(function(e,t){let{render:n,className:r,style:i,id:a,...o}=e,s=ej(),c=hx(a);return s.useSyncedValueWithCleanup(`titleElementId`,c),sa(`h2`,e,{ref:t,props:[{id:c},o]})}),yj=qw(function(e,t){let{render:n,className:r,style:i,disabled:a=!1,nativeButton:o=!0,id:s,payload:c,handle:l,...u}=e,d=ej(!0),f=FE(l)??d;if(!f)throw Error(ha(79));let p=hx(s),m=f.useState(`floatingRootContext`),h=f.useState(`isOpenedByTrigger`,p),g=f.useState(`triggerPopupId`,p),_=U.useRef(null),{registerTrigger:v,isMountedByThisTrigger:y}=bE(p,_,f,{payload:c}),{getButtonProps:b,buttonRef:x}=Hb({disabled:a,native:o}),S=nE(m),C=LO(()=>f.select(`open`),e=>{f.set(`openMethod`,e)}),w={disabled:a,open:h},T=f.useState(`triggerProps`,y);return sa(`button`,e,{state:w,ref:[x,t,v,_],props:[S.reference,T,C,{[kT]:``,id:p,"aria-haspopup":`dialog`,"aria-expanded":h,"aria-controls":g},u,b],stateAttributesMapping:tS})});function bj({...e}){return(0,G.jsx)(_j,{"data-slot":`dialog`,...e})}function xj({...e}){return(0,G.jsx)(yj,{"data-slot":`dialog-trigger`,...e})}function Sj({...e}){return(0,G.jsx)(uj,{"data-slot":`dialog-portal`,...e})}function Cj({...e}){return(0,G.jsx)(nj,{"data-slot":`dialog-close`,...e})}function wj({className:e,...t}){return(0,G.jsx)(tj,{"data-slot":`dialog-overlay`,className:K(`fixed inset-0 isolate z-50 bg-black/10 duration-100 supports-backdrop-filter:backdrop-blur-xs data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0`,e),...t})}function Tj({className:e,children:t,showCloseButton:n=!0,...r}){let i=U.useRef(null);return(0,G.jsxs)(Sj,{children:[(0,G.jsx)(wj,{}),(0,G.jsxs)(lj,{ref:i,"data-slot":`dialog-content`,initialFocus:()=>i.current?.querySelector(`input:not([type=hidden]):not([disabled]), textarea:not([disabled]), select:not([disabled]), [role=combobox]:not([disabled])`)??i.current,className:K(`fixed top-1/2 left-1/2 z-50 grid w-full max-w-[calc(100%-2rem)] -translate-x-1/2 -translate-y-1/2 gap-4 rounded-xl bg-popover p-4 text-sm text-popover-foreground border border-border/70 shadow-overlay duration-100 outline-none sm:max-w-sm 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),...r,children:[t,n&&(0,G.jsxs)(nj,{"data-slot":`dialog-close`,render:(0,G.jsx)($b,{variant:`ghost`,className:`absolute top-2 right-2`,size:`icon-sm`}),children:[(0,G.jsx)($n,{}),(0,G.jsx)(`span`,{className:`sr-only`,children:D(`shell.primitive.close`)})]})]})]})}function Ej({className:e,...t}){return(0,G.jsx)(`div`,{"data-slot":`dialog-header`,className:K(`flex flex-col gap-2`,e),...t})}function Dj({className:e,showCloseButton:t=!1,children:n,...r}){return(0,G.jsxs)(`div`,{"data-slot":`dialog-footer`,className:K(`-mx-4 -mb-4 flex flex-col-reverse gap-2 rounded-b-xl border-t bg-muted/50 p-4 sm:flex-row sm:justify-end`,e),...r,children:[n,t&&(0,G.jsx)(nj,{render:(0,G.jsx)($b,{variant:`outline`}),children:D(`shell.primitive.close`)})]})}function Oj({className:e,...t}){return(0,G.jsx)(vj,{"data-slot":`dialog-title`,className:K(`font-heading text-base leading-none font-medium`,e),...t})}function kj({className:e,...t}){return(0,G.jsx)(rj,{"data-slot":`dialog-description`,className:K(`text-sm text-muted-foreground *:[a]:underline *:[a]:underline-offset-3 *:[a]:hover:text-foreground`,e),...t})}function Aj(e){return gj(`alert-dialog`,e)}var jj=yj;function Mj({...e}){return(0,G.jsx)(Aj,{"data-slot":`alert-dialog`,...e})}function Nj({...e}){return(0,G.jsx)(jj,{"data-slot":`alert-dialog-trigger`,...e})}function Pj({...e}){return(0,G.jsx)(uj,{"data-slot":`alert-dialog-portal`,...e})}function Fj({className:e,...t}){return(0,G.jsx)(tj,{"data-slot":`alert-dialog-overlay`,className:K(`fixed inset-0 isolate z-50 bg-black/10 duration-100 supports-backdrop-filter:backdrop-blur-xs data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0`,e),...t})}function Ij({className:e,size:t=`default`,...n}){return(0,G.jsxs)(Pj,{children:[(0,G.jsx)(Fj,{}),(0,G.jsx)(lj,{"data-slot":`alert-dialog-content`,"data-size":t,className:K(`group/alert-dialog-content fixed top-1/2 left-1/2 z-50 grid w-full -translate-x-1/2 -translate-y-1/2 gap-4 rounded-xl bg-popover p-4 text-popover-foreground border border-border/70 shadow-overlay duration-100 outline-none data-[size=default]:max-w-xs data-[size=sm]:max-w-xs data-[size=default]:sm:max-w-sm 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),...n})]})}function Lj({className:e,...t}){return(0,G.jsx)(`div`,{"data-slot":`alert-dialog-header`,className:K(`grid grid-rows-[auto_1fr] place-items-center gap-1.5 text-center has-data-[slot=alert-dialog-media]:grid-rows-[auto_auto_1fr] has-data-[slot=alert-dialog-media]:gap-x-4 sm:group-data-[size=default]/alert-dialog-content:place-items-start sm:group-data-[size=default]/alert-dialog-content:text-left sm:group-data-[size=default]/alert-dialog-content:has-data-[slot=alert-dialog-media]:grid-rows-[auto_1fr]`,e),...t})}function Rj({className:e,...t}){return(0,G.jsx)(`div`,{"data-slot":`alert-dialog-footer`,className:K(`-mx-4 -mb-4 flex flex-col-reverse gap-2 rounded-b-xl border-t bg-muted/50 p-4 group-data-[size=sm]/alert-dialog-content:grid group-data-[size=sm]/alert-dialog-content:grid-cols-2 sm:flex-row sm:justify-end`,e),...t})}function zj({className:e,...t}){return(0,G.jsx)(vj,{"data-slot":`alert-dialog-title`,className:K(`font-heading text-base font-medium sm:group-data-[size=default]/alert-dialog-content:group-has-data-[slot=alert-dialog-media]/alert-dialog-content:col-start-2`,e),...t})}function Bj({className:e,...t}){return(0,G.jsx)(rj,{"data-slot":`alert-dialog-description`,className:K(`text-sm text-balance text-muted-foreground md:text-pretty *:[a]:underline *:[a]:underline-offset-3 *:[a]:hover:text-foreground`,e),...t})}function Vj({className:e,...t}){return(0,G.jsx)($b,{"data-slot":`alert-dialog-action`,className:K(e),...t})}function Hj({className:e,variant:t=`outline`,size:n=`default`,...r}){return(0,G.jsx)(nj,{"data-slot":`alert-dialog-cancel`,className:K(e),render:(0,G.jsx)($b,{variant:t,size:n}),...r})}var Uj=U.createContext(void 0);function Wj(e){let t=U.useContext(Uj);if(t===void 0&&!e)throw Error(ha(72));return t}var Gj={...PE,disabled:e=>e.disabled,instantType:e=>e.instantType,isInstantPhase:e=>e.isInstantPhase,trackCursorAxis:e=>e.trackCursorAxis,disableHoverablePopup:e=>e.disableHoverablePopup,lastOpenChangeReason:e=>e.openChangeReason,closeOnClick:e=>e.closeOnClick,appliedTriggerProps:(e,t)=>t?e.activeTriggerProps:void 0,closeDelay:e=>e.closeDelay,adaptiveOrigin:e=>e.adaptiveOrigin},Kj=class extends tT{constructor(e,t,n){let r=new TE;super(qj(e,r,t,n),Jj(r),Gj)}setOpen=(e,t)=>{yE(this,e,t,{extraState:{openChangeReason:t.reason}})};cancelPendingOpen(e){this.state.floatingRootContext.dispatchOpenChange(!1,$(NC,e))}};function qj(e,t,n,r=!1){return{...OE(t,n,r),disabled:!1,instantType:void 0,isInstantPhase:!1,trackCursorAxis:`none`,disableHoverablePopup:!1,openChangeReason:null,closeOnClick:!0,closeDelay:0,adaptiveOrigin:void 0,...e}}function Jj(e){return{popupRef:U.createRef(),onOpenChange:void 0,onOpenChangeComplete:void 0,triggerElements:e}}var Yj=Kw(function(e){let{disabled:t=!1,defaultOpen:n=!1,open:r,disableHoverablePopup:i=!1,trackCursorAxis:a=`none`,actionsRef:o,onOpenChange:s,onOpenChangeComplete:c,handle:l,triggerId:u,defaultTriggerId:d=null,children:f}=e,p=pE((e,t)=>new Kj({open:n,openProp:r,activeTriggerId:d,triggerIdProp:u},e,t));p.useControlledProp(`openProp`,r),p.useControlledProp(`triggerIdProp`,u),p.useContextCallback(`onOpenChange`,s),p.useContextCallback(`onOpenChangeComplete`,c);let m=p.useState(`open`),h=!t&&m,g=p.useState(`activeTriggerId`),_=p.useState(`mounted`),v=p.useState(`payload`);p.useSyncedValues({trackCursorAxis:a,disableHoverablePopup:i,disabled:t}),xE(p,{closeOnActiveTriggerUnmount:!0});let{forceUnmount:y,transitionStatus:b}=SE(h,p),x=p.useState(`isInstantPhase`),S=p.useState(`instantType`),C=p.useState(`lastOpenChangeReason`),w=U.useRef(null);J(()=>{m&&t&&p.setOpen(!1,$(KC))},[m,t,p]),J(()=>{b===`ending`&&C===`none`||b!==`ending`&&x?(S!==`delay`&&(w.current=S),p.set(`instantType`,`delay`)):w.current!==null&&(p.set(`instantType`,w.current),w.current=null)},[b,x,C,S,p]),J(()=>{h&&(g??p.set(`payload`,void 0))},[p,g,h]),U.useImperativeHandle(o,()=>({unmount:y,close:()=>p.setOpen(!1,$(YC))}),[y,p]);let T=h||_||!t&&a!==`none`;return(0,G.jsxs)(Uj.Provider,{value:p,children:[l&&(0,G.jsx)(mE,{handle:l,store:p}),T&&(0,G.jsx)(Xj,{store:p,disabled:t,trackCursorAxis:a}),typeof f==`function`?f({payload:v}):f]})});function Xj({store:e,disabled:t,trackCursorAxis:n}){let r=e.useState(`floatingRootContext`),i=cE(r,{enabled:!t,referencePress:()=>e.select(`closeOnClick`)}),a=aE(r,{enabled:!t&&n!==`none`,axis:n===`none`?void 0:n}),o=U.useMemo(()=>Ji(a.reference,i.reference),[a.reference,i.reference]);return CE(e,{activeTriggerProps:o,inactiveTriggerProps:o,popupProps:i.floating??Ui}),null}var Zj=U.createContext(void 0);function Qj(){return U.useContext(Zj)}var $j=`data-base-ui-tooltip-trigger`;function eM(e){let t=Rx(e);return _b(t)?t:null}var tM=qw(function(e,t){let{render:n,className:r,style:i,handle:a,payload:o,disabled:s,delay:c,closeOnClick:l=!0,closeDelay:u,id:d,...f}=e,p=Wj(!0),m=FE(a)??p;if(!m)throw Error(ha(82));let h=hx(d),g=m.useState(`isTriggerActive`,h),_=m.useState(`isOpenedByTrigger`,h),v=m.useState(`floatingRootContext`),y=U.useRef(null),b=u??0,{registerTrigger:x,isMountedByThisTrigger:S}=bE(h,y,m,{payload:o,closeOnClick:l,closeDelay:b}),C=Qj(),{activeIdRef:w,delayRef:T,isInstantPhase:E,hasProvider:D}=fT(v,{open:_}),O=UE(v);m.useSyncedValue(`isInstantPhase`,E);let k=m.useState(`disabled`),A=s??k,j=Bw(A),M=m.useState(`trackCursorAxis`),N=m.useState(`disableHoverablePopup`),P=U.useRef(!1),F=qa(),I=U.useRef(void 0);function L(){return D&&w.current!=null?0:c??C??600}function R(e){let t=y.current;if(!t||!e)return!1;let n=Lx(e,`[${$j}]`);return n!==null&&n!==t&&Q(t,n)}function z(e){let t=R(e);return P.current=t,t&&(O.openChangeTimeout.clear(),O.restTimeout.clear(),O.restTimeoutPending=!1,F.clear()),t}let B=KE(v,{enabled:!A,mouseOnly:!0,move:!1,handleClose:!N&&M!==`both`?cD():null,restMs:L,delay(){return u==null&&D?{close:aT(T.current,`close`)}:{close:b}},triggerElementRef:y,isActiveTrigger:g,isClosing:()=>m.select(`transitionStatus`)===`ending`,shouldOpen(){return!P.current}}),ee=RE(v,{enabled:!A}).reference,V=e=>{let t=P.current,n=eM(e),r=z(n),i=y.current,a=i&&n&&Q(i,n);if(r&&m.select(`open`)&&m.select(`lastOpenChangeReason`)===`trigger-hover`)m.setOpen(!1,$(PC,e));else if(t&&!r&&a&&!j.current&&!m.select(`open`)&&i&&bS(I.current)){let t=()=>{!P.current&&!j.current&&!m.select(`open`)&&m.setOpen(!0,$(PC,e,i))},n=L();n===0?(F.clear(),t()):F.start(n,t)}},te=m.useState(`appliedTriggerProps`,S||M!==`none`);return sa(`button`,e,{state:{open:_},ref:[t,x,y],props:[B,ee,te,{onMouseOver(e){V(e.nativeEvent)},onFocus(e){R(eM(e.nativeEvent))&&e.preventBaseUIHandler()},onMouseLeave(){P.current=!1,F.clear(),I.current=void 0},onPointerEnter(e){I.current=e.pointerType},onPointerDown(e){I.current=e.pointerType,m.set(`closeOnClick`,l),l&&!m.select(`open`)&&m.cancelPendingOpen(e.nativeEvent)},onClick(e){l&&!m.select(`open`)&&m.cancelPendingOpen(e.nativeEvent)},id:h,[aS]:A?``:void 0,[$j]:A?void 0:``},f],stateAttributesMapping:tS})}),nM=U.createContext(void 0);function rM(){let e=U.useContext(nM);if(e===void 0)throw Error(ha(70));return e}var iM=U.forwardRef(function(e,t){let{children:n,container:r,className:i,render:a,style:o,...s}=e,{node:c,subtree:l}=IT({container:r,ref:t,componentProps:e,elementProps:s});return!l&&!c?null:(0,G.jsxs)(U.Fragment,{children:[l,c&&W.createPortal(n,c)]})}),aM=U.forwardRef(function(e,t){let{keepMounted:n=!1,...r}=e;return Wj().useState(`mounted`)||n?(0,G.jsx)(nM.Provider,{value:n,children:(0,G.jsx)(iM,{ref:t,...r})}):null}),oM=U.createContext(void 0);function sM(){let e=U.useContext(oM);if(e===void 0)throw Error(ha(71));return e}var cM=U.forwardRef(function(e,t){let{render:n,className:r,anchor:i,positionMethod:a=`absolute`,side:o=`top`,align:s=`center`,sideOffset:c=0,alignOffset:l=0,collisionBoundary:u=`clipping-ancestors`,collisionPadding:d=5,arrowPadding:f=5,sticky:p=!1,disableAnchorTracking:m=!1,collisionAvoidance:h=jT,style:g,..._}=e,v=Wj(),y=rM(),b=v.useState(`open`),x=v.useState(`mounted`),S=v.useState(`trackCursorAxis`),C=v.useState(`disableHoverablePopup`),w=v.useState(`floatingRootContext`),T=v.useState(`instantType`),E=v.useState(`transitionStatus`),D=Dk({anchor:i,positionMethod:a,floatingRootContext:w,mounted:x,side:o,sideOffset:c,align:s,alignOffset:l,collisionBoundary:u,collisionPadding:d,sticky:p,arrowPadding:f,disableAnchorTracking:m,keepMounted:y,collisionAvoidance:h,adaptiveOrigin:v.useState(`adaptiveOrigin`)}),O=Ik(e,U.useMemo(()=>({open:b,side:D.side,align:D.align,anchorHidden:D.anchorHidden,instant:S===`none`?T:`tracking-cursor`}),[b,D.side,D.align,D.anchorHidden,S,T]),{styles:D.positionerStyles,transitionStatus:E,props:_,refs:[t,v.useStateSetter(`positionerElement`)],hidden:!x,inert:!b||S===`both`||C});return(0,G.jsx)(oM.Provider,{value:D,children:O})}),lM=U.forwardRef(function(e,t){let{render:n,className:r,style:i,...a}=e,o=Wj(),{side:s,align:c}=sM(),l=o.useState(`open`),u=o.useState(`instantType`),d=o.useState(`transitionStatus`),f=o.useState(`popupProps`),p=o.useState(`floatingRootContext`),m=o.useState(`disabled`),h=o.useState(`closeDelay`);La({open:l,ref:o.context.popupRef,onComplete(){l&&o.context.onOpenChangeComplete?.(!0)}}),WE(p,{enabled:!m,closeDelay:h});let g=o.useStateSetter(`popupElement`);return sa(`div`,e,{state:{open:l,side:s,align:c,instant:u,transitionStatus:d},ref:[t,o.context.popupRef,g],props:[dE,f,Fk(d),a],stateAttributesMapping:iS})}),uM=function(e){let{delay:t,closeDelay:n,timeout:r=400}=e,i=U.useMemo(()=>({open:t,close:n}),[t,n]);return(0,G.jsx)(Zj.Provider,{value:t,children:(0,G.jsx)(dT,{delay:i,timeoutMs:r,children:e.children})})};function dM({delay:e=0,...t}){return(0,G.jsx)(uM,{"data-slot":`tooltip-provider`,delay:e,...t})}function fM({...e}){return(0,G.jsx)(Yj,{"data-slot":`tooltip`,...e})}function pM({...e}){return(0,G.jsx)(tM,{"data-slot":`tooltip-trigger`,...e})}function mM({className:e,side:t=`top`,sideOffset:n=4,align:r=`center`,alignOffset:i=0,children:a,...o}){return(0,G.jsx)(aM,{children:(0,G.jsx)(cM,{align:r,alignOffset:i,side:t,sideOffset:n,className:`isolate z-50`,children:(0,G.jsx)(lM,{"data-slot":`tooltip-content`,className:K(`z-50 inline-flex w-fit max-w-xs origin-(--transform-origin) items-center gap-1.5 rounded-md border border-border/70 bg-popover px-2.5 py-1.5 text-xs text-popover-foreground shadow-float 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),...o,children:a})})})}function hM(e){return sa(e.defaultTagName??`div`,e,e)}var gM=Xb(`group/badge inline-flex h-5 w-fit shrink-0 items-center justify-center gap-1 overflow-hidden rounded-md border border-transparent px-1.5 py-0.5 text-[10px] font-medium whitespace-nowrap transition-all focus-visible:border-transparent focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&>svg]:pointer-events-none [&>svg]:size-3!`,{variants:{variant:{default:`bg-primary text-primary-foreground [a]:hover:bg-primary/80`,secondary:`bg-secondary text-secondary-foreground [a]:hover:bg-secondary/80`,destructive:`bg-destructive/10 text-destructive focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:focus-visible:ring-destructive/40 [a]:hover:bg-destructive/20`,outline:`border-border text-foreground [a]:hover:bg-muted [a]:hover:text-muted-foreground`,ghost:`hover:bg-muted hover:text-muted-foreground dark:hover:bg-muted/50`,link:`text-primary underline-offset-4 hover:underline`}},defaultVariants:{variant:`default`}});function _M({className:e,variant:t=`default`,render:n,...r}){return hM({defaultTagName:`span`,props:Ji({className:K(gM({variant:t}),e)},r),render:n,state:{slot:`badge`,variant:t}})}function vM({className:e,...t}){return(0,G.jsx)(`div`,{"data-slot":`skeleton`,className:K(`animate-pulse rounded-md bg-muted`,e),...t})}function yM({className:e,...t}){return(0,G.jsx)(Vn,{"data-slot":`spinner`,"aria-hidden":`true`,className:K(`size-4 animate-spin`,e),...t})}var bM=Xb(`group/alert relative grid w-full gap-0.5 rounded-lg border px-2.5 py-2 text-left text-sm has-data-[slot=alert-action]:relative has-data-[slot=alert-action]:pr-18 has-[>svg]:grid-cols-[auto_1fr] has-[>svg]:gap-x-2 *:[svg]:row-span-2 *:[svg]:translate-y-0.5 *:[svg]:text-current *:[svg:not([class*='size-'])]:size-4`,{variants:{variant:{default:`bg-card text-card-foreground`,destructive:`bg-card text-destructive *:data-[slot=alert-description]:text-destructive/90 *:[svg]:text-current`}},defaultVariants:{variant:`default`}});function xM({className:e,variant:t,...n}){return(0,G.jsx)(`div`,{"data-slot":`alert`,role:`alert`,className:K(bM({variant:t}),e),...n})}function SM({className:e,...t}){return(0,G.jsx)(`div`,{"data-slot":`alert-title`,className:K(`font-medium group-has-[>svg]/alert:col-start-2 [&_a]:underline [&_a]:underline-offset-3 [&_a]:hover:text-foreground`,e),...t})}function CM({className:e,...t}){return(0,G.jsx)(`div`,{"data-slot":`alert-description`,className:K(`text-sm text-balance text-muted-foreground md:text-pretty [&_a]:underline [&_a]:underline-offset-3 [&_a]:hover:text-foreground [&_p:not(:last-child)]:mb-4`,e),...t})}function wM({className:e,...t}){return(0,G.jsx)(`div`,{"data-slot":`empty`,className:K(`flex w-full min-w-0 flex-1 flex-col items-center justify-center gap-4 rounded-xl border-dashed p-6 text-center text-balance`,e),...t})}function TM({className:e,...t}){return(0,G.jsx)(`div`,{"data-slot":`empty-header`,className:K(`flex max-w-sm flex-col items-center gap-2`,e),...t})}var EM=Xb(`mb-2 flex shrink-0 items-center justify-center [&_svg]:pointer-events-none [&_svg]:shrink-0`,{variants:{variant:{default:`bg-transparent`,icon:`flex size-8 shrink-0 items-center justify-center rounded-lg bg-muted text-foreground [&_svg:not([class*='size-'])]:size-4`}},defaultVariants:{variant:`default`}});function DM({className:e,variant:t=`default`,...n}){return(0,G.jsx)(`div`,{"data-slot":`empty-icon`,"data-variant":t,className:K(EM({variant:t,className:e})),...n})}function OM({className:e,...t}){return(0,G.jsx)(`div`,{"data-slot":`empty-title`,className:K(`font-heading text-sm font-medium tracking-tight`,e),...t})}function kM(){return(0,G.jsxs)(G.Fragment,{children:[(0,G.jsx)(`svg`,{className:`brand-mark h-5 w-7 shrink-0 text-primary`,viewBox:db.viewBox,"aria-hidden":`true`,children:(0,G.jsx)(`path`,{d:db.path,fill:`currentColor`})}),(0,G.jsx)(`span`,{className:`brand-word text-sm font-semibold tracking-tight group-data-[collapsible=icon]:hidden`,children:`Kanvil`})]})}var AM=`relative mb-4 min-w-0 [&>[data-slot=field-label]]:text-xs [&>[data-slot=field-label]]:font-medium [&>[data-slot=field-label]]:text-muted-foreground`,jM=e=>li.error(g(e));function MM({label:e,shortcut:t,children:n,...r}){return(0,G.jsxs)(fM,{children:[(0,G.jsx)(pM,{render:(0,G.jsx)($b,{variant:`ghost`,size:`icon`,"aria-label":e,...r}),children:n}),(0,G.jsxs)(mM,{children:[e,t&&(0,G.jsx)(Iw,{children:t.split(` `).map(e=>(0,G.jsx)(Fw,{children:e},e))})]})]})}function NM({label:e,labelHidden:t=!1,...n}){let r=(0,U.useId)(),[i,a]=(0,U.useState)(!1);return(0,G.jsxs)(mw,{className:K(AM,t&&`mb-0`),children:[(0,G.jsx)(gw,{htmlFor:r,className:K(t&&`sr-only`),children:e}),n.type===`password`?(0,G.jsxs)(tw,{children:[(0,G.jsx)(ow,{...n,id:r,type:i?`text`:`password`}),(0,G.jsx)(rw,{align:`inline-end`,children:(0,G.jsx)(aw,{size:`icon-sm`,"aria-label":D(i?`shell.ui.hideValue`:`shell.ui.showValue`,{label:e}),title:D(i?`shell.ui.hideValue`:`shell.ui.showValue`,{label:e}),disabled:n.disabled,onClick:()=>a(e=>!e),children:i?(0,G.jsx)(Fn,{}):(0,G.jsx)(Ln,{})})})]}):(0,G.jsx)($C,{...n,id:r})]})}function PM({label:e,...t}){let n=(0,U.useId)();return(0,G.jsxs)(mw,{className:AM,children:[(0,G.jsx)(gw,{htmlFor:n,children:e}),(0,G.jsx)(ew,{...t,id:n})]})}function FM(e){return U.Children.toArray(e).flatMap(e=>(0,U.isValidElement)(e)?e.props.value===void 0?FM(e.props.children):[{value:e.props.value,label:e.props.children}]:[])}function IM({label:e,children:t,className:n,layout:r=`field`,labelHidden:i=!1,...a}){let o=(0,U.useId)(),s=FM(t);return(0,G.jsxs)(mw,{className:K(AM,r===`property`&&`mb-0 grid grid-cols-[72px_minmax(0,1fr)] items-center gap-2`,n),children:[(0,G.jsx)(gw,{htmlFor:o,className:K(r===`property`&&`text-xs font-normal text-muted-foreground`,i&&`sr-only`),children:e}),(0,G.jsxs)(WA,{items:s,defaultValue:s[0]?.value??``,...a,children:[(0,G.jsx)(qA,{id:o,className:K(`w-full`,r===`property`&&`h-auto min-h-8 border-transparent bg-transparent shadow-none hover:bg-muted dark:bg-transparent`),children:(0,G.jsx)(KA,{})}),(0,G.jsx)(JA,{alignItemWithTrigger:!1,children:t})]})]})}function LM({label:e,description:t,className:n,...r}){let i=(0,U.useId)(),a=n===`sr-checkbox`;return(0,G.jsxs)(mw,{orientation:`horizontal`,className:K(`my-2 min-h-7 w-auto`,a&&`my-0 min-h-4 justify-center`),children:[(0,G.jsx)(Pw,{...r,id:i,"aria-describedby":t?[r[`aria-describedby`],`${i}-description`].filter(Boolean).join(` `):r[`aria-describedby`]}),t?(0,G.jsxs)(hw,{children:[(0,G.jsx)(gw,{htmlFor:i,className:K(`font-normal`,a&&`sr-only`),children:e}),(0,G.jsx)(_w,{id:`${i}-description`,className:`text-xs`,children:t})]}):(0,G.jsx)(gw,{htmlFor:i,className:K(`font-normal`,a&&`sr-only`),children:e})]})}function RM({error:e}){return e?(0,G.jsxs)(xM,{variant:`destructive`,className:`my-3`,children:[(0,G.jsx)(_n,{}),(0,G.jsx)(CM,{children:g(e)})]}):null}function zM({noun:e,offset:t,total:n,size:r,onChange:i}){return n<=r&&!t?null:(0,G.jsxs)(`footer`,{className:`mt-5 flex flex-wrap items-center justify-end gap-2 text-xs text-muted-foreground [&>span]:mr-auto`,children:[(0,G.jsx)($b,{disabled:!t,onClick:()=>i(Math.max(0,t-r)),children:D(`shell.ui.previousPage`,{noun:e})}),(0,G.jsx)(`span`,{children:D(`shell.ui.pageRange`,{from:B(t+1),to:B(Math.min(t+r,n)),total:B(n)})}),(0,G.jsx)($b,{disabled:t+r>=n,onClick:()=>i(t+r),children:D(`shell.ui.nextPage`,{noun:e})})]})}function BM(){return(0,G.jsxs)(`div`,{role:`status`,className:`space-y-4 py-5`,children:[(0,G.jsx)(`span`,{className:`sr-only`,children:D(`common.state.loading`)}),(0,G.jsx)(vM,{className:`h-6 w-40`}),(0,G.jsx)(vM,{className:`h-12 w-full`}),(0,G.jsx)(vM,{className:`h-12 w-full`}),(0,G.jsx)(vM,{className:`h-12 w-3/4`})]})}function VM({title:e,icon:t=xn,children:n,className:r}){return(0,G.jsxs)(wM,{className:K(`relative isolate overflow-hidden py-20`,r),children:[(0,G.jsxs)(TM,{className:`w-full`,children:[(0,G.jsx)(DM,{variant:`icon`,children:(0,G.jsx)(t,{})}),(0,G.jsxs)(OM,{className:`relative w-full`,children:[(0,G.jsx)(`svg`,{"aria-hidden":`true`,viewBox:db.viewBox,className:`pointer-events-none absolute top-1/2 left-1/2 -z-10 h-auto w-full -translate-x-[44.2%] -translate-y-[59.2%] text-foreground/[0.07] dark:text-foreground/[0.09]`,children:(0,G.jsx)(`path`,{d:db.path,fill:`none`,stroke:`currentColor`,strokeWidth:5})}),e]})]}),n]})}var HM={"circle-dashed":xn,circle:Dn,"circle-dot":Cn,clock:kn,"circle-check":yn,"circle-x":Tn,"octagon-alert":Gn,"arrow-up":nn,equal:Nn,"arrow-down":en,minus:Un,sparkles:Yn,bug:sn,wrench:Zn,"flask-conical":zn,"book-open":an},UM={muted:`text-muted-foreground`,foreground:`text-foreground`,accent:`text-primary`,warning:`text-[var(--warning)]`,success:`text-[var(--success)]`,danger:`text-destructive`},WM=e=>UM[S.status[e].tone];function GM({property:e,value:t,iconOnly:n=!1,label:r,color:i}){let o=e===`status`&&i&&i!=="default"?ge(i):void 0,s=e===`status`?S.status[t]:S.priority[t],c=HM[s.icon],l=o?.className??UM[s.tone],u=e===`status`?r??T[t]:a[t],d=e===`priority`&&t!==`none`?D(`shell.ui.priority`,{label:u}):u;return(0,G.jsxs)(_M,{variant:`outline`,className:K(e===`status`?`status rounded-full bg-current/8 px-2 text-xs whitespace-nowrap`:`h-6 border-transparent bg-transparent px-0 text-xs`,`gap-1.5 border-transparent font-normal`,l),style:o?.style,"data-priority":e===`priority`?t:void 0,role:n?`img`:void 0,"aria-label":n?d:void 0,title:n?d:void 0,children:[(0,G.jsx)(c,{className:e===`status`?`size-3.5`:`size-4.5`,strokeWidth:e===`status`?2:2.5,"aria-hidden":`true`}),!n&&u]})}var KM=e=>e.type===`text`?e.value:e.type===`element`&&![`ul`,`ol`].includes(e.tagName)?e.children.map(KM).join(``):``,qM=(0,U.lazy)(()=>ue(()=>import(`./markdown-blocks-CpzrwyQG.js`),__vite__mapDeps([0,1,2,3,4,5,6])));function JM(e){let t=e?.children[0];if(t?.type!==`element`||t.tagName!==`code`)return;let n=t.properties.className;return(Array.isArray(n)?n:[]).map(String).find(e=>e.startsWith(`language-`))?.slice(9)}var YM=(0,U.createContext)({source:``}),XM=(0,U.createContext)(null);function ZM({checked:e}){let{source:t,onChange:n}=(0,U.useContext)(YM),r=(0,U.useContext)(XM),i=r?.offset;return(0,G.jsx)(Pw,{checked:e,"aria-label":r?.label,disabled:!n||i===void 0,onCheckedChange:e=>{n&&i!==void 0&&n(yu(t,i,e))},className:`relative top-0.5 -ml-6 mr-2 inline-flex`})}var QM={pre:({children:e,node:t,...n})=>{let r=JM(t),i=(0,G.jsx)(`pre`,{...n,children:e});return r&&t?(0,G.jsx)(U.Suspense,{fallback:i,children:(0,G.jsx)(qM,{language:r,code:KM(t).replace(/\n$/,``)})}):i},img:({node:e,...t})=>(0,G.jsx)(`img`,{...t,loading:`lazy`,className:`my-2 rounded-md border`}),a:({children:e,node:t,...n})=>n.href?.startsWith(`mention:`)?(0,G.jsx)(`span`,{className:`rounded-sm bg-primary/10 px-0.5 font-medium text-primary`,children:e}):(0,G.jsx)(`a`,{...n,target:`_blank`,rel:`noreferrer`,children:e}),li:({children:e,node:t,className:n,...r})=>n?.includes(`task-list-item`)&&t?(0,G.jsx)(`li`,{...r,className:K(n,`list-none`),children:(0,G.jsx)(XM,{value:{offset:t.position?.start.offset,label:KM(t).trim()},children:e})}):(0,G.jsx)(`li`,{...r,className:n,children:e}),input:({node:e,...t})=>t.type===`checkbox`?(0,G.jsx)(ZM,{checked:!!t.checked}):(0,G.jsx)(`input`,{...t})};function $M({children:e,onChange:t}){return(0,G.jsx)(`div`,{className:`markdown`,children:(0,G.jsx)(YM,{value:{source:e,...t?{onChange:t}:{}},children:(0,G.jsx)(i_,{remarkPlugins:[ub],components:QM,urlTransform:e=>e.startsWith(`mention:`)?e:c_(e),children:e})})})}var eN=(0,U.createContext)(null),tN=()=>(0,U.useContext)(eN),nN={default:`max-h-[90dvh] overflow-y-auto p-6 sm:max-w-2xl`,composer:`flex max-h-[calc(100dvh-2rem)] w-[calc(100%-1rem)] flex-col gap-0 overflow-hidden p-0 sm:max-w-3xl has-[[data-expanded=true]]:h-[calc(100dvh-1rem)] has-[[data-expanded=true]]:w-[calc(100%-1rem)] has-[[data-expanded=true]]:sm:max-w-[calc(100%-1rem)] max-sm:h-dvh max-sm:w-full max-sm:max-w-none max-sm:rounded-none`};function rN({title:e,description:t,trigger:n,children:r,open:i,onOpenChange:a,busy:o=!1,size:s=`default`}){let[c,l]=(0,U.useState)(!1),u=o||c;return(0,G.jsx)(eN,{value:l,children:(0,G.jsxs)(bj,{...i===void 0?{}:{open:i},onOpenChange:(e,t)=>{!e&&u?t.cancel():a?.(e)},children:[n&&(0,G.jsx)(xj,{render:(0,G.jsx)($b,{variant:`outline`}),children:n}),(0,G.jsxs)(Tj,{showCloseButton:!u,className:nN[s],"aria-describedby":void 0,children:[(0,G.jsxs)(Ej,{className:K(`mb-2`,s===`composer`&&`m-0 shrink-0 border-b px-5 py-3 pr-24`),children:[(0,G.jsx)(Oj,{className:K(`mb-0`,s===`composer`?`text-sm`:`text-lg`),children:e}),t&&(0,G.jsx)(kj,{children:t})]}),r]})]})})}function iN({error:e,layout:t=`dialog`,pending:n=!1,submitLabel:r,pendingLabel:i,onCancel:a,cancelLabel:o=D(`common.action.cancel`),submitDisabled:s=!1,danger:c=!1,children:l}){return(0,G.jsxs)(G.Fragment,{children:[(0,G.jsx)(RM,{error:e}),(0,G.jsxs)(aN,{className:t===`inline`?`mx-0 mb-0 rounded-none border-0 bg-transparent px-0`:``,children:[l,a&&(0,G.jsx)($b,{disabled:n,onClick:a,children:o}),(0,G.jsxs)($b,{type:`submit`,variant:c?`destructive`:`default`,disabled:n||s,children:[n&&(0,G.jsx)(yM,{}),n&&i?i:r]})]})]})}function aN({children:e,className:t}){return(0,G.jsx)(Dj,{className:K(`mt-4`,t),children:e})}function oN({label:e,description:t,onConfirm:n,danger:r=!1,icon:i,disabled:a=!1,open:o,onOpenChange:s,trigger:c=!0}){let[l,u]=(0,U.useState)(!1),d=o??l,f=s??u,[p,m]=(0,U.useState)(!1),[h,g]=(0,U.useState)();return(0,G.jsxs)(Mj,{open:d,onOpenChange:f,children:[c&&(0,G.jsx)(Nj,{render:i?(0,G.jsx)(MM,{label:e,disabled:a}):(0,G.jsx)($b,{variant:r?`destructive`:`outline`,disabled:a}),children:i??e}),(0,G.jsxs)(Ij,{children:[(0,G.jsxs)(Lj,{children:[(0,G.jsx)(zj,{children:e}),(0,G.jsx)(Bj,{children:t})]}),(0,G.jsx)(RM,{error:h}),(0,G.jsxs)(Rj,{children:[(0,G.jsx)(Hj,{disabled:p,children:D(`common.action.cancel`)}),(0,G.jsx)(Vj,{variant:r?`destructive`:`default`,disabled:p,onClick:()=>{m(!0),g(void 0),n().then(()=>f(!1)).catch(g).finally(()=>m(!1))},children:p?D(`shell.ui.working`):e})]})]})]})}var sN=e=>B(e/1e3,{style:`unit`,unit:`kilobyte`,maximumFractionDigits:1});function cN({value:e,className:t}){let n=new Date(e);return(0,G.jsx)(`time`,{dateTime:e,title:f(e),className:t,children:oe(n)})}function lN({value:e,open:t=!0,className:n}){if(!e)return null;let r=t&&au(new Date(e));return(0,G.jsxs)(`span`,{className:K(`inline-flex items-center gap-1.5`,r?`text-destructive`:`text-muted-foreground`,n),children:[(0,G.jsx)(ln,{className:`size-3.5 shrink-0`,"aria-hidden":`true`}),(0,G.jsx)(cN,{value:e})]})}var uN=`mt-4 mb-6 max-w-4xl text-2xl leading-snug font-semibold tracking-tight [unicode-bidi:plaintext]`;function dN({title:e,children:t}){return(0,G.jsxs)(`header`,{className:`mb-4 flex min-h-8 flex-wrap items-center justify-between gap-3`,children:[typeof e==`string`?(0,G.jsx)(`h1`,{className:`m-0 text-base`,children:e}):e,t]})}function fN({title:e,description:t,action:n,compact:r=!1}){return(0,G.jsxs)(`header`,{className:K(`mb-4 flex flex-wrap items-start justify-between gap-3`,r&&`mb-3 items-center gap-2 [&_[data-slot=button]]:h-7 [&_[data-slot=button]]:text-xs`),children:[(0,G.jsxs)(`div`,{children:[(0,G.jsx)(`h2`,{className:K(`mb-0 text-sm`,r&&`text-[11px] font-medium tracking-[0.08em] text-muted-foreground uppercase`),children:e}),t&&(0,G.jsx)(`p`,{className:`mt-1.5 mb-0 max-w-xl text-sm text-muted-foreground`,children:t})]}),n]})}function pN({label:e,value:t,onChange:n,placeholder:r=D(`shell.ui.searchPlaceholder`),shortcut:i,defaultOpen:a=!1,wide:o=!1,className:s}){let[c,l]=(0,U.useState)(()=>a||t.length>0),u=(0,U.useRef)(null),d=c||t.length>0;return pu(i??``,()=>{l(!0),u.current?.focus()},{enabled:!!i}),(0,G.jsxs)(`div`,{role:`search`,"data-expanded":d,className:K(`group/search flex min-w-0 items-center`,d&&`flex-1`,s),children:[(0,G.jsx)(MM,{label:e,size:`icon-sm`,"aria-expanded":d,title:i?`${e} (${i})`:void 0,className:K(`transition-colors`,d&&`text-foreground`),onClick:()=>{l(!0),u.current?.focus()},children:(0,G.jsx)(qn,{})}),(0,G.jsxs)(`div`,{className:K(`flex items-center overflow-hidden transition-[width,opacity] duration-200 ease-out motion-reduce:transition-none`,d?K(`w-full opacity-100`,!o&&`max-w-56`):`w-0 opacity-0`),children:[(0,G.jsx)(`input`,{ref:u,type:`search`,"aria-label":e,placeholder:r,value:t,tabIndex:d?0:-1,onChange:e=>n(e.target.value),onBlur:()=>{t||l(a)},onKeyDown:e=>{(e.key===`Escape`||e.key===`Enter`)&&(e.preventDefault(),e.currentTarget.blur())},className:`h-8 min-w-0 flex-1 border-0 border-b border-border bg-transparent px-1 text-sm transition-colors outline-none placeholder:text-muted-foreground focus:border-foreground [&::-webkit-search-cancel-button]:hidden`}),t&&(0,G.jsx)(MM,{label:D(`shell.ui.clearValue`,{label:e}),size:`icon-xs`,onClick:()=>{n(``),l(a)},children:(0,G.jsx)($n,{})})]})]})}function mN({label:e,value:t,size:n=`icon`,className:r}){let[i,a]=(0,U.useState)(!1);return(0,G.jsx)(MM,{label:e,size:n,className:K(`text-muted-foreground hover:text-foreground`,r),onClick:()=>{cu(t).then(()=>{a(!0),setTimeout(()=>a(!1),1500),li.success(D(`shell.ui.copied`,{value:t}))}).catch(jM)},children:i?(0,G.jsx)(dn,{className:`text-(--success)`}):(0,G.jsx)(jn,{})})}function hN({label:e,value:t,inline:n=!1}){let r=(0,U.useId)(),i=(0,G.jsxs)(`div`,{role:`group`,"aria-label":n?e:void 0,"aria-labelledby":n?void 0:r,className:K(`flex min-w-0 items-center gap-3`,!n&&`justify-between`),children:[(0,G.jsx)(`code`,{className:`min-w-0 text-xs break-all`,children:t}),(0,G.jsx)(mN,{label:D(`shell.ui.copyValue`,{label:e}),value:t,size:n?`icon-sm`:`icon`})]});return n?i:(0,G.jsxs)(`div`,{className:`mb-4 min-w-0`,children:[(0,G.jsx)(`span`,{id:r,className:`mb-1 block text-xs text-muted-foreground`,children:e}),i]})}var gN=U.createContext(void 0);function _N(e){let t=U.useContext(gN);if(t===void 0&&!e)throw Error(ha(47));return t}var vN={...PE,disabled:e=>e.disabled,instantType:e=>e.instantType===`trigger-change`&&!PE.open(e)?void 0:e.instantType,openMethod:e=>e.openMethod,openChangeReason:e=>e.openChangeReason,isPressOpenedByTrigger:(e,t)=>e.openChangeReason===`trigger-press`&&PE.isOpenedByTrigger(e,t),isTouchPressOpen:(e,t)=>t&&e.openMethod===`touch`&&e.openChangeReason===`trigger-press`,hasTriggerFocusGuards:(e,t)=>PE.isOpenedByTrigger(e,t)&&!e.focusManagerModal,modal:e=>e.modal,titleElementId:e=>e.titleElementId,descriptionElementId:e=>e.descriptionElementId,openOnHover:e=>e.openOnHover,closeDelay:e=>e.closeDelay,adaptiveOrigin:e=>e.adaptiveOrigin},yN=class extends tT{constructor(e,t,n){let r=new TE;super(bN(e,r,t,n),xN(r),vN)}setOpen=(e,t)=>{let n=t.reason===PC,r=t.reason===`trigger-press`&&t.event.detail===0,i=!e&&(t.reason===`escape-key`||t.reason==null),a=vE(t),o=this.select(`activeTriggerId`);if(!e&&t.reason===`close-press`&&t.trigger==null&&o!=null&&(t.trigger=this.context.triggerElements.getById(o)??this.select(`activeTriggerElement`)??void 0),this.context.onOpenChange?.(e,t),t.isCanceled)return;this.state.floatingRootContext.dispatchOpenChange(e,t);let s=()=>{let n=_E(this.state,e,t.trigger,a());n.openChangeReason=t.reason,this.update(n)};n?(this.context.stickIfOpen=!0,this.context.stickIfOpenTimeout.start(500,()=>{this.context.stickIfOpen=!1}),W.flushSync(s)):s();let c;r?c=`click`:i?c=`dismiss`:t.reason===`focus-out`&&(c=`focus`),this.set(`instantType`,c)}};function bN(e,t,n,r=!1){let i={...OE(t,n,r),disabled:!1,modal:!1,focusManagerModal:!1,instantType:void 0,openMethod:null,openChangeReason:null,titleElementId:void 0,descriptionElementId:void 0,openOnHover:!1,closeDelay:0,adaptiveOrigin:void 0,...e};return i.open&&e?.mounted===void 0&&(i.mounted=!0),i}function xN(e){return{popupRef:U.createRef(),onOpenChange:void 0,onOpenChangeComplete:void 0,triggerFocusTargetRef:U.createRef(),beforeTriggerFocusGuardRef:U.createRef(),beforeContentFocusGuardRef:U.createRef(),stickIfOpenTimeout:new Ka,stickIfOpen:!0,triggerElements:e}}var SN=Kw(function({props:e}){let{children:t,open:n,defaultOpen:r=!1,onOpenChange:i,onOpenChangeComplete:a,modal:o=!1,handle:s,triggerId:c,defaultTriggerId:l=null}=e,u=wN(s,{modal:o,open:r,openProp:n,activeTriggerId:l,triggerIdProp:c});u.useControlledProp(`openProp`,n),u.useControlledProp(`triggerIdProp`,c);let d=u.useState(`open`),f=u.useState(`mounted`),p=u.useState(`payload`);u.useContextCallback(`onOpenChange`,i),u.useContextCallback(`onOpenChangeComplete`,a),wE(u,d),xE(u);let{forceUnmount:m}=SE(d,u,()=>{u.context.stickIfOpen=!0,u.set(`openChangeReason`,null)});u.useSyncedValues({modal:o}),U.useEffect(()=>{d||u.context.stickIfOpenTimeout.clear()},[u,d]),U.useImperativeHandle(e.actionsRef,()=>({unmount:m,close:()=>u.setOpen(!1,$(YC))}),[m,u]);let h=d||f||s!=null;return(0,G.jsxs)(gN.Provider,{value:u,children:[s&&(0,G.jsx)(mE,{handle:s,store:u}),h&&(0,G.jsx)(TN,{store:u,modal:o}),typeof t==`function`?t({payload:p}):t]})});function CN(e){return _N(!0)?(0,G.jsx)(SN,{props:e}):(0,G.jsx)(KT,{children:(0,G.jsx)(SN,{props:e})})}function wN(e,t){let n=pE((e,n)=>new yN(t,e,n));return U.useEffect(()=>n.context.stickIfOpenTimeout.disposeEffect(),[n]),n}function TN({store:e,modal:t}){let n=cE(e.useState(`floatingRootContext`),{outsidePressEvent:{mouse:t===`trap-focus`?`sloppy`:`intentional`,touch:`sloppy`}}),r=n.reference,i=n.floating;return CE(e,{activeTriggerProps:r,inactiveTriggerProps:r,popupProps:i}),null}function EN(e,t){function n(n,r,i){let a=n.currentTarget;W.flushSync(()=>{e.setOpen(!1,$(zC,n.nativeEvent,a))}),SC(a.isConnected?a:t.current,r,i)?.focus()}function r(t){n(t,-1,e.select(`positionerElement`))}function i(t){let r=e.select(`positionerElement`);r&&CC(t,r)?e.context.beforeContentFocusGuardRef.current?.focus():n(t,1,r)}return{handlePreFocusGuardFocus:r,handleFocusTargetFocus:i}}var DN=qw(function(e,t){let{render:n,className:r,style:i,disabled:a=!1,nativeButton:o=!0,handle:s,payload:c,openOnHover:l=!1,delay:u=300,closeDelay:d=0,id:f,...p}=e,m=_N(!0),h=FE(s)??m;if(!h)throw Error(ha(74));let g=hx(f),_=h.useState(`isTriggerActive`,g),v=h.useState(`floatingRootContext`),y=h.useState(`isOpenedByTrigger`,g),b=h.useState(`triggerPopupId`,g),x=U.useRef(null),{registerTrigger:S,isMountedByThisTrigger:C}=bE(g,x,h,{payload:c,disabled:a,openOnHover:l,closeDelay:d}),w=h.useState(`isPressOpenedByTrigger`,g),T=h.useState(`isTouchPressOpen`,l),E=h.useState(`hasTriggerFocusGuards`,g),D=KE(v,{enabled:!a&&l&&!T,mouseOnly:!0,move:!1,handleClose:cD(),restMs:u,delay:{close:d},triggerElementRef:x,isActiveTrigger:_,isClosing:()=>h.select(`transitionStatus`)===`ending`}),O=nE(v,{stickIfOpen:q(()=>h.context.stickIfOpen)}),k=LO(()=>h.select(`open`),e=>{h.set(`openMethod`,e)}),A=h.useState(`triggerProps`,C),{getButtonProps:j,buttonRef:M}=Hb({disabled:a,native:o}),N={open(e){return w?nS.open(e):tS.open(e)}},{handlePreFocusGuardFocus:P,handleFocusTargetFocus:F}=EN(h,x),I=sa(`button`,e,{state:{disabled:a,open:y},ref:[M,t,S,x],props:[O.reference,D,A,k,{[kT]:``,id:g,"aria-haspopup":`dialog`,"aria-expanded":y,"aria-controls":b},p,j],stateAttributesMapping:N}),L=(0,G.jsx)(U.Fragment,{children:I},g);return E?(0,G.jsxs)(U.Fragment,{children:[(0,G.jsx)(pT,{ref:h.context.beforeTriggerFocusGuardRef,onFocus:P}),L,(0,G.jsx)(pT,{ref:h.context.triggerFocusTargetRef,onFocus:F})]}):L}),ON=U.createContext(void 0);function kN(){let e=U.useContext(ON);if(e===void 0)throw Error(ha(45));return e}var AN=U.forwardRef(function(e,t){let{keepMounted:n=!1,...r}=e;return _N().useState(`mounted`)||n?(0,G.jsx)(ON.Provider,{value:n,children:(0,G.jsx)(LT,{ref:t,...r})}):null}),jN=U.createContext(void 0);function MN(){let e=U.useContext(jN);if(!e)throw Error(ha(46));return e}function NN(e){let{store:t,domReference:n,positionerElement:r,open:i}=e,a=U.useRef(null),o=U.useRef(null),s=Ia(r);J(()=>{i||(o.current?.abort(),o.current=null,t.state.instantType===`trigger-change`&&t.set(`instantType`,void 0))},[i,t]),J(()=>{let e=n,r=a.current;if(e&&(a.current=e),!r||!e||e===r||!t.select(`open`))return;t.set(`instantType`,void 0);let i=new AbortController;return o.current=i,s(()=>{t.select(`open`)&&t.set(`instantType`,`trigger-change`)},i.signal),()=>{i.abort()}},[n,s,t])}var PN=U.forwardRef(function(e,t){let{render:n,className:r,style:i,anchor:a,positionMethod:o,side:s,align:c,sideOffset:l,alignOffset:u,collisionBoundary:d=`clipping-ancestors`,collisionPadding:f,arrowPadding:p,sticky:m,disableAnchorTracking:h=!1,collisionAvoidance:g=jT,..._}=e,v=_N(),y=kN(),b=WT(),x=v.useState(`floatingRootContext`),S=v.useState(`mounted`),C=v.useState(`open`),w=v.useState(`openChangeReason`),T=v.useState(`activeTriggerElement`),E=v.useState(`modal`),D=v.useState(`openMethod`),O=v.useState(`positionerElement`),k=v.useState(`instantType`),A=v.useState(`transitionStatus`),j=Dk({anchor:a,floatingRootContext:x,positionMethod:o,mounted:S,side:s,sideOffset:l,align:c,alignOffset:u,arrowPadding:p,collisionBoundary:d,collisionPadding:f,sticky:m,disableAnchorTracking:h,keepMounted:y,nodeId:b,collisionAvoidance:g,adaptiveOrigin:v.useState(`adaptiveOrigin`)});NN({store:v,domReference:x.useState(`domReferenceElement`),positionerElement:O,open:C});let M=E===!0&&w!==`trigger-hover`;Yk(C&&M,D===`touch`,O,T);let N=v.useStateSetter(`positionerElement`),P=Ik(e,{open:C,side:j.side,align:j.align,anchorHidden:j.anchorHidden,instant:k},{styles:j.positionerStyles,transitionStatus:A,props:_,refs:[t,N],hidden:!S,inert:!C});return(0,G.jsxs)(jN.Provider,{value:j,children:[S&&M&&(0,G.jsx)(Mk,{inert:tk(!C),cutout:T}),(0,G.jsx)(GT,{id:b,children:P})]})}),FN=U.createContext(void 0);function IN(){let[e,t]=U.useState(0),n=q(()=>(t(e=>e+1),()=>{t(e=>Math.max(0,e-1))}));return{context:U.useMemo(()=>({register:n}),[n]),hasClosePart:e>0}}var LN=U.forwardRef(function(e,t){let{render:n,className:r,style:i,initialFocus:a,finalFocus:o,...s}=e,c=_N(),l=MN(),u=tA(!0)!=null,{context:d,hasClosePart:f}=IN(),p=c.useState(`open`),m=c.useState(`openMethod`),h=c.useState(`instantType`),g=c.useState(`transitionStatus`),_=c.useState(`popupProps`),v=c.useState(`titleElementId`),y=c.useState(`descriptionElementId`),b=c.useState(`modal`),x=c.useState(`mounted`),S=c.useState(`openChangeReason`),C=c.useState(`activeTriggerElement`),w=c.useState(`floatingRootContext`),T=w.useState(`floatingId`),E=c.useState(`disabled`),D=c.useState(`openOnHover`),O=c.useState(`closeDelay`);La({open:p,ref:c.context.popupRef,onComplete(){p&&c.context.onOpenChangeComplete?.(!0)}}),WE(w,{enabled:D&&!E,closeDelay:O});let k=a===void 0?fE(c.context.popupRef):a,A=b!==!1&&f;c.useSyncedValue(`focusManagerModal`,A);let j=c.useStateSetter(`popupElement`),M=sa(`div`,e,{state:{open:p,side:l.side,align:l.align,instant:h,transitionStatus:g},ref:[t,c.context.popupRef,j],props:[_,{id:T,role:`dialog`,...dE,"aria-labelledby":v,"aria-describedby":y,onKeyDown(e){u&&sA.has(e.key)&&e.stopPropagation()}},Fk(g),s],stateAttributesMapping:iS});return(0,G.jsx)(tE,{context:w,openInteractionType:m,modal:A,disabled:!x||S===`trigger-hover`,initialFocus:k,returnFocus:o,restoreFocus:`popup`,getInsideElements:()=>[c.context.beforeTriggerFocusGuardRef.current],previousFocusableElement:vb(C)?C:void 0,nextFocusableElement:c.context.triggerFocusTargetRef,beforeContentFocusGuardRef:c.context.beforeContentFocusGuardRef,children:(0,G.jsx)(FN.Provider,{value:d,children:M})})}),RN=U.forwardRef(function(e,t){let{render:n,className:r,style:i,...a}=e,o=_N(),s=hx(a.id);return o.useSyncedValueWithCleanup(`titleElementId`,s),sa(`h2`,e,{ref:t,props:[{id:s},a]})});function zN({...e}){return(0,G.jsx)(CN,{"data-slot":`popover`,...e})}function BN({...e}){return(0,G.jsx)(DN,{"data-slot":`popover-trigger`,...e})}function VN({className:e,align:t=`center`,alignOffset:n=0,side:r=`bottom`,sideOffset:i=4,anchor:a,...o}){return(0,G.jsx)(AN,{children:(0,G.jsx)(PN,{anchor:a,align:t,alignOffset:n,side:r,sideOffset:i,className:`isolate z-50`,children:(0,G.jsx)(LN,{"data-slot":`popover-content`,className:K(`z-50 flex max-h-(--available-height) w-72 origin-(--transform-origin) flex-col overflow-y-auto gap-2.5 rounded-lg bg-popover p-2.5 text-sm text-popover-foreground border border-border/70 shadow-float outline-hidden duration-100 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-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),...o})})})}function HN({className:e,...t}){return(0,G.jsx)(RN,{"data-slot":`popover-title`,className:K(`font-medium`,e),...t})}var UN=1,WN=.9,GN=.8,KN=.17,qN=.1,JN=.999,YN=.9999,XN=.99,ZN=/[\\\/_+.#"@\[\(\{&]/,QN=/[\\\/_+.#"@\[\(\{&]/g,$N=/[\s-]/,eP=/[\s-]/g;function tP(e,t,n,r,i,a,o){if(a===t.length)return i===e.length?UN:XN;var s=`${i},${a}`;if(o[s]!==void 0)return o[s];for(var c=r.charAt(a),l=n.indexOf(c,i),u=0,d,f,p,m;l>=0;)d=tP(e,t,n,r,l+1,a+1,o),d>u&&(l===i?d*=UN:ZN.test(e.charAt(l-1))?(d*=GN,p=e.slice(i,l-1).match(QN),p&&i>0&&(d*=JN**+p.length)):$N.test(e.charAt(l-1))?(d*=WN,m=e.slice(i,l-1).match(eP),m&&i>0&&(d*=JN**+m.length)):(d*=KN,i>0&&(d*=JN**+(l-i))),e.charAt(l)!==t.charAt(a)&&(d*=YN)),(d<qN&&n.charAt(l-1)===r.charAt(a+1)||r.charAt(a+1)===r.charAt(a)&&n.charAt(l-1)!==r.charAt(a))&&(f=tP(e,t,n,r,l+1,a+2,o),f*qN>d&&(d=f*qN)),d>u&&(u=d),l=n.indexOf(c,l+1);return o[s]=u,u}function nP(e){return e.toLowerCase().replace(eP,` `)}function rP(e,t,n){return e=n&&n.length>0?`${e+` `+n.join(` `)}`:e,tP(e,t,nP(e),nP(t),0,0,{})}var iP=Object.defineProperty,aP=(e,t)=>iP(e,`name`,{value:t,configurable:!0}),oP=!!(typeof window<`u`&&window.document&&window.document.createElement);function sP(e,t,{checkForDefaultPrevented:n=!0}={}){return aP(function(r){if(e?.(r),n===!1||!r||!r.defaultPrevented)return t?.(r)},`handleEvent`)}aP(sP,`composeEventHandlers`);function cP(e){if(!oP)throw Error(`Cannot access window outside of the DOM`);return e?.ownerDocument?.defaultView??window}aP(cP,`getOwnerWindow`);function lP(e){if(!oP)throw Error(`Cannot access document outside of the DOM`);return e?.ownerDocument??document}aP(lP,`getOwnerDocument`);function uP(e,t=!1){let{activeElement:n}=lP(e);if(!n?.nodeName)return null;if(dP(n)&&n.contentDocument)return uP(n.contentDocument.body,t);if(t){let e=n.getAttribute(`aria-activedescendant`);if(e){let t=lP(n).getElementById(e);if(t)return t}}return n}aP(uP,`getActiveElement`);function dP(e){return e.tagName===`IFRAME`}aP(dP,`isFrame`);var fP=Object.defineProperty,pP=(e,t)=>fP(e,`name`,{value:t,configurable:!0});function mP(e,t){if(typeof e==`function`)return e(t);e!=null&&(e.current=t)}pP(mP,`setRef`);function hP(...e){return t=>{let n=!1,r=e.map(e=>{let r=mP(e,t);return!n&&typeof r==`function`&&(n=!0),r});if(n)return()=>{for(let t=0;t<r.length;t++){let n=r[t];typeof n==`function`?n():mP(e[t],null)}}}}pP(hP,`composeRefs`);function gP(...e){return U.useCallback(hP(...e),e)}pP(gP,`useComposedRefs`);var _P=Object.defineProperty,vP=(e,t)=>_P(e,`name`,{value:t,configurable:!0});function yP(e,t){let n=U.createContext(t);n.displayName=e+`Context`;let r=vP(e=>{let{children:t,...r}=e,i=U.useMemo(()=>r,Object.values(r));return(0,G.jsx)(n.Provider,{value:i,children:t})},`Provider`);r.displayName=e+`Provider`;function i(r,i={}){let{optional:a=!1}=i,o=U.useContext(n);if(o)return o;if(t!==void 0)return t;if(!a)throw Error(`\`${r}\` must be used within \`${e}\``)}return vP(i,`useContext`),[r,i]}vP(yP,`createContext`);function bP(e,t=[]){let n=[];function r(t,r){let i=U.createContext(r);i.displayName=t+`Context`;let a=n.length;n=[...n,r];let o=vP(t=>{let{scope:n,children:r,...o}=t,s=n?.[e]?.[a]||i,c=U.useMemo(()=>o,Object.values(o));return(0,G.jsx)(s.Provider,{value:c,children:r})},`Provider`);o.displayName=t+`Provider`;function s(n,o,s={}){let{optional:c=!1}=s,l=o?.[e]?.[a]||i,u=U.useContext(l);if(u)return u;if(r!==void 0)return r;if(!c)throw Error(`\`${n}\` must be used within \`${t}\``)}return vP(s,`useContext`),[o,s]}vP(r,`createContext`);let i=vP(()=>{let t=n.map(e=>U.createContext(e));return vP(function(n){let r=n?.[e]||t;return U.useMemo(()=>({[`__scope${e}`]:{...n,[e]:r}}),[n,r])},`useScope`)},`createScope`);return i.scopeName=e,[r,xP(i,...t)]}vP(bP,`createContextScope`);function xP(...e){let t=e[0];if(e.length===1)return t;let n=vP(()=>{let n=e.map(e=>({useScope:e(),scopeName:e.scopeName}));return vP(function(e){let r=n.reduce((t,{useScope:n,scopeName:r})=>{let i=n(e)[`__scope${r}`];return{...t,...i}},{});return U.useMemo(()=>({[`__scope${t.scopeName}`]:r}),[r])},`useComposedScopes`)},`createScope`);return n.scopeName=t.scopeName,n}vP(xP,`composeContextScopes`);var SP=globalThis?.document?U.useLayoutEffect:()=>{},CP=Object.defineProperty,wP=(e,t)=>CP(e,`name`,{value:t,configurable:!0}),TP=U.useId||(()=>void 0),EP=0;function DP(e){let[t,n]=U.useState(TP());return SP(()=>{e||n(e=>e??String(EP++))},[e]),e||(t?`radix-${t}`:``)}wP(DP,`useId`);var OP=Object.defineProperty,kP=(e,t)=>OP(e,`name`,{value:t,configurable:!0}),AP=U.useEffectEvent,jP=U.useInsertionEffect;function MP(e){if(typeof AP==`function`)return AP(e);let t=U.useRef(()=>{throw Error(`Cannot call an event handler while rendering.`)});return typeof jP==`function`?jP(()=>{t.current=e}):SP(()=>{t.current=e}),U.useMemo(()=>((...e)=>t.current?.(...e)),[])}kP(MP,`useEffectEvent`);var NP=Object.defineProperty,PP=(e,t)=>NP(e,`name`,{value:t,configurable:!0}),FP=U.useInsertionEffect||SP;function IP({prop:e,defaultProp:t,onChange:n=PP(()=>{},`onChange`),caller:r}){let[i,a,o]=LP({defaultProp:t,onChange:n}),s=e!==void 0;return[s?e:i,U.useCallback(t=>{if(s){let n=RP(t)?t(e):t;n!==e&&o.current?.(n)}else a(t)},[s,e,a,o])]}PP(IP,`useControllableState`);function LP({defaultProp:e,onChange:t}){let[n,r]=U.useState(e),i=U.useRef(n),a=U.useRef(t);return FP(()=>{a.current=t},[t]),U.useEffect(()=>{i.current!==n&&(a.current?.(n),i.current=n)},[n,i]),[n,r,a]}PP(LP,`useUncontrolledState`);function RP(e){return typeof e==`function`}PP(RP,`isFunction`);var zP=Symbol(`RADIX:SYNC_STATE`);function BP(e,t,n,r){let{prop:i,defaultProp:a,onChange:o,caller:s}=t,c=i!==void 0,l=MP(o),u=[{...n,state:a}];r&&u.push(r);let[d,f]=U.useReducer((t,n)=>{if(n.type===zP)return{...t,state:n.state};let r=e(t,n);return c&&!Object.is(r.state,t.state)&&l(r.state),r},...u),p=d.state,m=U.useRef(p);U.useEffect(()=>{m.current!==p&&(m.current=p,c||l(p))},[p,m,c]);let h=U.useMemo(()=>i===void 0?d:{...d,state:i},[d,i]);return U.useEffect(()=>{c&&!Object.is(i,d.state)&&f({type:zP,state:i})},[i,d.state,c]),[h,f]}PP(BP,`useControllableStateReducer`);var VP=Object.defineProperty,HP=(e,t)=>VP(e,`name`,{value:t,configurable:!0});function UP(e){let t=U.forwardRef((t,n)=>{let{children:r,...i}=t,a=null,o=!1,s=[];r=$P(r),U.Children.forEach(r,e=>{if(YP(e)){o=!0;let t=e,n=`child`in t.props?t.props.child:t.props.children;for(;ZP(n)&&typeof rF==`function`;)n=rF(n._payload);a=KP(t,n),s.push(a?.props?.children)}else s.push(e)}),a?a=U.cloneElement(a,void 0,s):!o&&U.Children.count(r)===1&&U.isValidElement(r)&&(a=r);let c=a?JP(a):void 0,l=gP(n,c);if(!a){if(r||r===0)throw Error(o?nF(e):tF(e));return r}let u=qP(i,a.props??{});return a.type!==U.Fragment&&(u.ref=n?l:c),U.cloneElement(a,u)});return t.displayName=`${e}.Slot`,t}HP(UP,`createSlot`);var WP=Symbol.for(`radix.slottable`);function GP(e){let t=HP(e=>`child`in e?e.children(e.child):e.children,`Slottable`);return t.displayName=`${e}.Slottable`,t.__radixId=WP,t}HP(GP,`createSlottable`);var KP=HP((e,t)=>`child`in e.props?U.isValidElement(t)?U.cloneElement(t,void 0,e.props.children(t.props.children)):null:U.isValidElement(t)?t:null,`getSlottableElementFromSlottable`);function qP(e,t){let n={...t};for(let r in t){let i=e[r],a=t[r];/^on[A-Z]/.test(r)?i&&a?n[r]=(...e)=>{let t=a(...e);return i(...e),t}:i&&(n[r]=i):r===`style`?n[r]={...i,...a}:r===`className`?n[r]=[i,a].filter(Boolean).join(` `):r===`aria-describedby`&&(n[r]=eF(a,i))}return{...e,...n}}HP(qP,`mergeProps`);function JP(e){let t=Object.getOwnPropertyDescriptor(e.props,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}HP(JP,`getElementRef`);function YP(e){return U.isValidElement(e)&&typeof e.type==`function`&&`__radixId`in e.type&&e.type.__radixId===WP}HP(YP,`isSlottable`);var XP=Symbol.for(`react.lazy`);function ZP(e){return typeof e==`object`&&!!e&&`$$typeof`in e&&e.$$typeof===XP&&`_payload`in e&&QP(e._payload)}HP(ZP,`isLazyComponent`);function QP(e){return typeof e==`object`&&!!e&&`then`in e}HP(QP,`isPromiseLike`);function $P(e){let t=e;for(;ZP(t)&&typeof rF==`function`;)t=rF(t._payload);return t}HP($P,`useUnwrappedLazy`);function eF(...e){let t=new Set;for(let n of e)if(typeof n==`string`)for(let e of String(n).trim().split(/\s+/))e&&t.add(e);return t.size>0?Array.from(t).join(` `):void 0}HP(eF,`concatAriaDescribedby`);var tF=HP(e=>`${e} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`,`createSlotError`),nF=HP(e=>`${e} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`,`createSlottableError`),rF=U.use,iF=Object.defineProperty,aF=(e,t)=>iF(e,`name`,{value:t,configurable:!0}),oF=[`a`,`button`,`div`,`form`,`h2`,`h3`,`img`,`input`,`label`,`li`,`nav`,`ol`,`p`,`select`,`span`,`svg`,`ul`].reduce((e,t)=>{let n=UP(`Primitive.${t}`),r=U.forwardRef((e,r)=>{let{asChild:i,...a}=e,o=i?n:t;return typeof window<`u`&&(window[Symbol.for(`radix-ui`)]=!0),(0,G.jsx)(o,{...a,ref:r})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function sF(e,t){e&&W.flushSync(()=>e.dispatchEvent(t))}aF(sF,`dispatchDiscreteCustomEvent`);var cF=Object.defineProperty,lF=(e,t)=>cF(e,`name`,{value:t,configurable:!0}),uF=U.useInsertionEffect;function dF(e){let t=U.useRef(e);return typeof uF==`function`?uF(()=>{t.current=e}):SP(()=>{t.current=e}),U.useMemo(()=>((...e)=>t.current?.(...e)),[])}lF(dF,`useCallbackRef`);var fF=Object.defineProperty,pF=(e,t)=>fF(e,`name`,{value:t,configurable:!0}),mF=`dismissableLayer.update`,hF=`dismissableLayer.pointerDownOutside`,gF=`dismissableLayer.focusOutside`,_F,vF=U.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set,dismissableSurfaces:new Set}),yF=U.forwardRef(pF(function(e,t){let{disableOutsidePointerEvents:n=!1,deferPointerDownOutside:r=!1,onEscapeKeyDown:i,onPointerDownOutside:a,onFocusOutside:o,onInteractOutside:s,onDismiss:c,...l}=e,u=U.useContext(vF),[d,f]=U.useState(null),p=d?.ownerDocument??globalThis?.document,[,m]=U.useState({}),h=gP(t,f),g=Array.from(u.layers),[_]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),v=_?g.indexOf(_):-1,y=d?g.indexOf(d):-1,b=u.layersWithOutsidePointerEventsDisabled.size>0,x=y>=v,S=U.useRef(!1),C=SF(e=>{a?.(e),s?.(e),e.defaultPrevented||c?.()},{ownerDocument:p,deferPointerDownOutside:r,isDeferredPointerDownOutsideRef:S,dismissableSurfaces:u.dismissableSurfaces,shouldHandlePointerDownOutside:U.useCallback(e=>{if(!(e instanceof Node))return!1;let t=[...u.branches].some(t=>t.contains(e));return x&&!t},[u.branches,x])}),w=CF(e=>{if(r&&S.current)return;let t=e.target;[...u.branches].some(e=>e.contains(t))||(o?.(e),s?.(e),e.defaultPrevented||c?.())},p),T=d?y===g.length-1:!1,E=dF(e=>{e.key===`Escape`&&(i?.(e),!e.defaultPrevented&&c&&(e.preventDefault(),c()))});return U.useEffect(()=>{if(T)return p.addEventListener(`keydown`,E,{capture:!0}),()=>p.removeEventListener(`keydown`,E,{capture:!0})},[p,T,E]),U.useEffect(()=>{if(d)return n&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(_F=p.body.style.pointerEvents,p.body.style.pointerEvents=`none`),u.layersWithOutsidePointerEventsDisabled.add(d)),u.layers.add(d),wF(),()=>{n&&(u.layersWithOutsidePointerEventsDisabled.delete(d),u.layersWithOutsidePointerEventsDisabled.size===0&&(p.body.style.pointerEvents=_F))}},[d,p,n,u]),U.useEffect(()=>()=>{d&&(u.layers.delete(d),u.layersWithOutsidePointerEventsDisabled.delete(d),wF())},[d,u]),U.useEffect(()=>{let e=pF(()=>m({}),`handleUpdate`);return document.addEventListener(mF,e),()=>document.removeEventListener(mF,e)},[]),(0,G.jsx)(oF.div,{...l,ref:h,style:{pointerEvents:b?x?`auto`:`none`:void 0,...e.style},onFocusCapture:sP(e.onFocusCapture,w.onFocusCapture),onBlurCapture:sP(e.onBlurCapture,w.onBlurCapture),onPointerDownCapture:sP(e.onPointerDownCapture,C.onPointerDownCapture)})},`DismissableLayer`));function bF(){let e=U.useContext(vF),[t,n]=U.useState(null);return U.useEffect(()=>{if(t)return e.dismissableSurfaces.add(t),()=>{e.dismissableSurfaces.delete(t)}},[t,e.dismissableSurfaces]),n}pF(bF,`useDismissableLayerSurface`);var xF=pF(()=>!0,`IS_TRUE`);function SF(e,t){let{ownerDocument:n=globalThis?.document,deferPointerDownOutside:r=!1,isDeferredPointerDownOutsideRef:i,dismissableSurfaces:a,shouldHandlePointerDownOutside:o=xF}=t,s=dF(e),c=U.useRef(!1),l=U.useRef(!1),u=U.useRef(new Map),d=U.useRef(()=>{});return U.useEffect(()=>{function e(){l.current=!1,i.current=!1,u.current.clear()}pF(e,`resetOutsideInteraction`);function t(){return Array.from(u.current.values()).some(Boolean)}pF(t,`isOutsideInteractionIntercepted`);function f(e){if(!l.current)return;let t=e.target;t instanceof Node&&[...a].some(e=>e.contains(t))||u.current.set(e.type,!0),e.type===`click`&&window.setTimeout(()=>{l.current&&d.current()},0)}pF(f,`handleInteractionCapture`);function p(e){l.current&&u.current.set(e.type,!1)}pF(p,`handleInteractionBubble`);let m=pF(a=>{if(a.target&&!c.current){let f=function(){n.removeEventListener(`click`,d.current);let r=t();e(),r||TF(hF,s,p,{discrete:!0})};if(pF(f,`handleAndDispatchPointerDownOutsideEvent`),!o(a.target)){n.removeEventListener(`click`,d.current),e(),c.current=!1;return}let p={originalEvent:a};l.current=!0,i.current=r&&a.button===0,u.current.clear(),!r||a.button!==0?f():(n.removeEventListener(`click`,d.current),d.current=f,n.addEventListener(`click`,d.current,{once:!0}))}else n.removeEventListener(`click`,d.current),e();c.current=!1},`handlePointerDown`),h=[`pointerup`,`mousedown`,`mouseup`,`touchstart`,`touchend`,`click`];for(let e of h)n.addEventListener(e,f,!0),n.addEventListener(e,p);let g=window.setTimeout(()=>{n.addEventListener(`pointerdown`,m)},0);return()=>{window.clearTimeout(g),n.removeEventListener(`pointerdown`,m),n.removeEventListener(`click`,d.current);for(let e of h)n.removeEventListener(e,f,!0),n.removeEventListener(e,p)}},[n,s,r,i,a,o]),{onPointerDownCapture:pF(()=>c.current=!0,`onPointerDownCapture`)}}pF(SF,`usePointerDownOutside`);function CF(e,t=globalThis?.document){let n=dF(e),r=U.useRef(!1);return U.useEffect(()=>{let e=pF(e=>{e.target&&!r.current&&TF(gF,n,{originalEvent:e},{discrete:!1})},`handleFocus`);return t.addEventListener(`focusin`,e),()=>t.removeEventListener(`focusin`,e)},[t,n]),{onFocusCapture:pF(()=>r.current=!0,`onFocusCapture`),onBlurCapture:pF(()=>r.current=!1,`onBlurCapture`)}}pF(CF,`useFocusOutside`);function wF(){let e=new CustomEvent(mF);document.dispatchEvent(e)}pF(wF,`dispatchUpdate`);function TF(e,t,n,{discrete:r}){let i=n.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),r?sF(i,a):i.dispatchEvent(a)}pF(TF,`handleAndDispatchCustomEvent`);var EF=Object.defineProperty,DF=(e,t)=>EF(e,`name`,{value:t,configurable:!0}),OF=`focusScope.autoFocusOnMount`,kF=`focusScope.autoFocusOnUnmount`,AF={bubbles:!1,cancelable:!0},jF=U.forwardRef(DF(function(e,t){let{loop:n=!1,trapped:r=!1,branches:i,onMountAutoFocus:a,onUnmountAutoFocus:o,...s}=e,[c,l]=U.useState(null),u=dF(a),d=dF(o),f=U.useRef(null),p=gP(t,l),m=U.useRef(i);U.useEffect(()=>{m.current=i});let h=U.useCallback(e=>e?c?.contains(e)?!0:!!m.current?.some(t=>t.contains(e)):!1,[c]),g=U.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;U.useEffect(()=>{if(r){let e=function(e){if(g.paused||!c)return;let t=e.target;h(t)?f.current=t:HF(f.current,{select:!0})},t=function(e){if(g.paused||!c)return;let t=e.relatedTarget;t!==null&&(h(t)||HF(f.current,{select:!0}))},n=function(e){if(document.activeElement===document.body)for(let t of e)t.removedNodes.length>0&&HF(c)};DF(e,`handleFocusIn`),DF(t,`handleFocusOut`),DF(n,`handleMutations`),document.addEventListener(`focusin`,e),document.addEventListener(`focusout`,t);let r=new MutationObserver(n);return c&&r.observe(c,{childList:!0,subtree:!0}),()=>{document.removeEventListener(`focusin`,e),document.removeEventListener(`focusout`,t),r.disconnect()}}},[r,c,g.paused,h]),U.useEffect(()=>{if(c){UF.add(g);let e=document.activeElement;if(!c.contains(e)){let t=new CustomEvent(OF,AF);c.addEventListener(OF,u),c.dispatchEvent(t),t.defaultPrevented||(IF(KF(RF(c)),{select:!0}),document.activeElement===e&&HF(c))}return()=>{c.removeEventListener(OF,u);let t=c.ownerDocument,n=CustomEvent;setTimeout(()=>{let r=new n(kF,AF);c.addEventListener(kF,d),c.dispatchEvent(r),r.defaultPrevented||HF(e??t.body,{select:!0}),c.removeEventListener(kF,d),UF.remove(g)},0)}}},[c,u,d,g]);let _=U.useCallback(e=>{if(!n&&!r||g.paused)return;let t=e.key===`Tab`&&!e.altKey&&!e.ctrlKey&&!e.metaKey,i=document.activeElement;if(t&&i){let t=e.currentTarget,[r,a]=LF(t);r&&a?!e.shiftKey&&i===a?(e.preventDefault(),n&&HF(r,{select:!0})):e.shiftKey&&i===r&&(e.preventDefault(),n&&HF(a,{select:!0})):i===t&&e.preventDefault()}},[n,r,g.paused]);return(0,G.jsx)(oF.div,{tabIndex:-1,...s,ref:p,onKeyDown:_})},`FocusScope`)),MF=U.createContext(null);function NF({registry:e,children:t}){return e?(0,G.jsx)(MF.Provider,{value:e,children:t}):t}DF(NF,`FocusScopeBranchProvider`);function PF(){let[e,t]=U.useState([]);return{nodes:e,registry:U.useMemo(()=>({add:DF(e=>t(t=>t.includes(e)?t:[...t,e]),`add`),remove:DF(e=>t(t=>t.filter(t=>t!==e)),`remove`)}),[])}}DF(PF,`useFocusScopeBranchRegistry`);function FF(e){let t=U.useContext(MF);U.useEffect(()=>{if(e&&t)return t.add(e),()=>t.remove(e)},[e,t])}DF(FF,`useFocusScopeBranch`);function IF(e,{select:t=!1}={}){let n=document.activeElement;for(let r of e)if(HF(r,{select:t}),document.activeElement!==n)return}DF(IF,`focusFirst`);function LF(e){let t=RF(e);return[zF(t,e),zF(t.reverse(),e)]}DF(LF,`getTabbableEdges`);function RF(e){let t=[],n=e.ownerDocument.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:DF(e=>{let t=e.tagName===`INPUT`&&e.type===`hidden`;return e.disabled||e.hidden||t?NodeFilter.FILTER_SKIP:e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP},`acceptNode`)});for(;n.nextNode();)t.push(n.currentNode);return t}DF(RF,`getTabbableCandidates`);function zF(e,t){let n=typeof t.checkVisibility==`function`&&t.checkVisibility({checkVisibilityCSS:!0});for(let r of e)if(!(n?!r.checkVisibility({checkVisibilityCSS:!0}):BF(r,{upTo:t})))return r}DF(zF,`findVisible`);function BF(e,{upTo:t}){if(getComputedStyle(e).visibility===`hidden`)return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display===`none`)return!0;e=e.parentElement}return!1}DF(BF,`isHidden`);function VF(e){return e.tagName===`INPUT`&&typeof e.select==`function`}DF(VF,`isSelectableInput`);function HF(e,{select:t=!1}={}){if(e&&e.focus){let n=(e.ownerDocument??document).activeElement;e.focus({preventScroll:!0}),e!==n&&VF(e)&&t&&e.select()}}DF(HF,`focus`);var UF=WF();function WF(){let e=[];return{add(t){let n=e[0];t!==n&&n?.pause(),e=GF(e,t),e.unshift(t)},remove(t){e=GF(e,t),e[0]?.resume()}}}DF(WF,`createFocusScopesStack`);function GF(e,t){let n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}DF(GF,`arrayRemove`);function KF(e){return e.filter(e=>e.tagName!==`A`)}DF(KF,`removeLinks`);var qF=Object.defineProperty,JF=U.forwardRef(((e,t)=>qF(e,`name`,{value:t,configurable:!0}))(function(e,t){let{container:n,...r}=e,[i,a]=U.useState(!1);SP(()=>a(!0),[]);let o=n||i&&globalThis?.document?.body;return o?W.createPortal((0,G.jsx)(oF.div,{...r,ref:t}),o):null},`Portal`)),YF=Object.defineProperty,XF=(e,t)=>YF(e,`name`,{value:t,configurable:!0});function ZF(e,t){return U.useReducer((e,n)=>t[e][n]??e,e)}XF(ZF,`useStateMachine`);var QF=XF(e=>{let{present:t,children:n}=e,r=$F(t),i=typeof n==`function`?n({present:r.isPresent}):U.Children.only(n),a=tI(r.ref,rI(i));return typeof n==`function`||r.isPresent?U.cloneElement(i,{ref:a}):null},`Presence`);function $F(e){let[t,n]=U.useState(),r=U.useRef(null),i=U.useRef(e),a=U.useRef(`none`),o=U.useRef(void 0),[s,c]=ZF(e?`mounted`:`unmounted`,{mounted:{UNMOUNT:`unmounted`,ANIMATION_OUT:`unmountSuspended`},unmountSuspended:{MOUNT:`mounted`,ANIMATION_END:`unmounted`},unmounted:{MOUNT:`mounted`}});return U.useEffect(()=>{s===`mounted`?(a.current=o.current??nI(r.current),o.current=void 0):a.current=`none`},[s]),SP(()=>{let t=r.current,n=i.current;if(n!==e){let r=a.current,s=nI(t);e?(o.current=s,c(`MOUNT`)):s===`none`||t?.display===`none`?c(`UNMOUNT`):c(n&&r!==s?`ANIMATION_OUT`:`UNMOUNT`),i.current=e}},[e,c]),SP(()=>{if(t){let e,n=t.ownerDocument.defaultView??window,o=XF(a=>{let o=nI(r.current).includes(CSS.escape(a.animationName));if(a.target===t&&o&&(c(`ANIMATION_END`),!i.current)){let r=t.style.animationFillMode;t.style.animationFillMode=`forwards`,e=n.setTimeout(()=>{t.style.animationFillMode===`forwards`&&(t.style.animationFillMode=r)})}},`handleAnimationEnd`),s=XF(e=>{e.target===t&&(a.current=nI(r.current))},`handleAnimationStart`);return t.addEventListener(`animationstart`,s),t.addEventListener(`animationcancel`,o),t.addEventListener(`animationend`,o),()=>{n.clearTimeout(e),t.removeEventListener(`animationstart`,s),t.removeEventListener(`animationcancel`,o),t.removeEventListener(`animationend`,o)}}c(`ANIMATION_END`)},[t,c]),{isPresent:[`mounted`,`unmountSuspended`].includes(s),ref:U.useCallback(e=>{if(e){let t=getComputedStyle(e);r.current=t,o.current=nI(t)}else r.current=null;n(e)},[])}}XF($F,`usePresence`);function eI(e,t){if(typeof e==`function`)return e(t);e!=null&&(e.current=t)}XF(eI,`setRef`);function tI(...e){let t=U.useRef(e);return t.current=e,U.useCallback(e=>{let n=t.current,r=!1,i=n.map(t=>{let n=eI(t,e);return!r&&typeof n==`function`&&(r=!0),n});if(r)return()=>{for(let e=0;e<i.length;e++){let t=i[e];typeof t==`function`?t():eI(n[e],null)}}},[])}XF(tI,`useStableComposedRefs`);function nI(e){return e?.animationName||`none`}XF(nI,`getAnimationName`);function rI(e){let t=Object.getOwnPropertyDescriptor(e.props,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}XF(rI,`getElementRef`);var iI=Object.defineProperty,aI=(e,t)=>iI(e,`name`,{value:t,configurable:!0}),oI=0,sI=null;function cI(e){return lI(),e.children}aI(cI,`FocusGuards`);function lI(){U.useEffect(()=>{sI||={start:uI(),end:uI()};let{start:e,end:t}=sI;return document.body.firstElementChild!==e&&document.body.insertAdjacentElement(`afterbegin`,e),document.body.lastElementChild!==t&&document.body.insertAdjacentElement(`beforeend`,t),oI++,()=>{oI===1&&(sI?.start.remove(),sI?.end.remove(),sI=null),oI=Math.max(0,oI-1)}},[])}aI(lI,`useFocusGuards`);function uI(){let e=document.createElement(`span`);return e.setAttribute(`data-radix-focus-guard`,``),e.tabIndex=0,e.style.outline=`none`,e.style.opacity=`0`,e.style.position=`fixed`,e.style.pointerEvents=`none`,e}aI(uI,`createFocusGuard`);var dI=function(){return dI=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n],t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},dI.apply(this,arguments)};function fI(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols==`function`)for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n}function pI(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,a;r<i;r++)(a||!(r in t))&&(a||=Array.prototype.slice.call(t,0,r),a[r]=t[r]);return e.concat(a||Array.prototype.slice.call(t))}var mI=`right-scroll-bar-position`,hI=`width-before-scroll-bar`,gI=`with-scroll-bars-hidden`,_I=`--removed-body-scroll-bar-size`;function vI(e,t){return typeof e==`function`?e(t):e&&(e.current=t),e}function yI(e,t){var n=(0,U.useState)(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(e){var t=n.value;t!==e&&(n.value=e,n.callback(e,t))}}}})[0];return n.callback=t,n.facade}var bI=typeof window<`u`?U.useLayoutEffect:U.useEffect,xI=new WeakMap;function SI(e,t){var n=yI(t||null,function(t){return e.forEach(function(e){return vI(e,t)})});return bI(function(){var t=xI.get(n);if(t){var r=new Set(t),i=new Set(e),a=n.current;r.forEach(function(e){i.has(e)||vI(e,null)}),i.forEach(function(e){r.has(e)||vI(e,a)})}xI.set(n,e)},[e]),n}function CI(e){return e}function wI(e,t){t===void 0&&(t=CI);var n=[],r=!1;return{read:function(){if(r)throw Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(e){var i=t(e,r);return n.push(i),function(){n=n.filter(function(e){return e!==i})}},assignSyncMedium:function(e){for(r=!0;n.length;){var t=n;n=[],t.forEach(e)}n={push:function(t){return e(t)},filter:function(){return n}}},assignMedium:function(e){r=!0;var t=[];if(n.length){var i=n;n=[],i.forEach(e),t=n}var a=function(){var n=t;t=[],n.forEach(e)},o=function(){return Promise.resolve().then(a)};o(),n={push:function(e){t.push(e),o()},filter:function(e){return t=t.filter(e),n}}}}}function TI(e){e===void 0&&(e={});var t=wI(null);return t.options=dI({async:!0,ssr:!1},e),t}var EI=function(e){var t=e.sideCar,n=fI(e,[`sideCar`]);if(!t)throw Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw Error(`Sidecar medium not found`);return U.createElement(r,dI({},n))};EI.isSideCarExport=!0;function DI(e,t){return e.useMedium(t),EI}var OI=TI(),kI=function(){},AI=U.forwardRef(function(e,t){var n=U.useRef(null),r=U.useState({onScrollCapture:kI,onWheelCapture:kI,onTouchMoveCapture:kI}),i=r[0],a=r[1],o=e.forwardProps,s=e.children,c=e.className,l=e.removeScrollBar,u=e.enabled,d=e.shards,f=e.sideCar,p=e.noRelative,m=e.noIsolation,h=e.inert,g=e.allowPinchZoom,_=e.as,v=_===void 0?`div`:_,y=e.gapMode,b=fI(e,[`forwardProps`,`children`,`className`,`removeScrollBar`,`enabled`,`shards`,`sideCar`,`noRelative`,`noIsolation`,`inert`,`allowPinchZoom`,`as`,`gapMode`]),x=f,S=SI([n,t]),C=dI(dI({},b),i);return U.createElement(U.Fragment,null,u&&U.createElement(x,{sideCar:OI,removeScrollBar:l,shards:d,noRelative:p,noIsolation:m,inert:h,setCallbacks:a,allowPinchZoom:!!g,lockRef:n,gapMode:y}),o?U.cloneElement(U.Children.only(s),dI(dI({},C),{ref:S})):U.createElement(v,dI({},C,{className:c,ref:S}),s))});AI.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},AI.classNames={fullWidth:hI,zeroRight:mI};var jI=function(){if(typeof __webpack_nonce__<`u`)return __webpack_nonce__};function MI(){if(!document)return null;var e=document.createElement(`style`);e.type=`text/css`;var t=jI();return t&&e.setAttribute(`nonce`,t),e}function NI(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function PI(e){(document.head||document.getElementsByTagName(`head`)[0]).appendChild(e)}var FI=function(){var e=0,t=null;return{add:function(n){e==0&&(t=MI())&&(NI(t,n),PI(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},II=function(){var e=FI();return function(t,n){U.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},LI=function(){var e=II();return function(t){var n=t.styles,r=t.dynamic;return e(n,r),null}},RI={left:0,top:0,right:0,gap:0},zI=function(e){return parseInt(e||``,10)||0},BI=function(e){var t=window.getComputedStyle(document.body),n=t[e===`padding`?`paddingLeft`:`marginLeft`],r=t[e===`padding`?`paddingTop`:`marginTop`],i=t[e===`padding`?`paddingRight`:`marginRight`];return[zI(n),zI(r),zI(i)]},VI=function(e){if(e===void 0&&(e=`margin`),typeof window>`u`)return RI;var t=BI(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},HI=LI(),UI=`data-scroll-locked`,WI=function(e,t,n,r){var i=e.left,a=e.top,o=e.right,s=e.gap;return n===void 0&&(n=`margin`),`
|
|
45
|
+
`))}function c(e,t,n,r){let i=n.enter(`tableCell`),o=n.enter(`phrasing`),s=n.containerPhrasing(e,{...r,before:a,after:a});return o(),i(),s}function l(e,t){return ev(e,{align:t,alignDelimiters:r,padding:n,stringLength:i})}function u(e,t,n){let r=e.children,i=-1,a=[],o=t.enter(`table`);for(;++i<r.length;)a[i]=d(r[i],t,n);return o(),a}function d(e,t,n){let r=e.children,i=-1,a=[],o=t.enter(`tableRow`);for(;++i<r.length;)a[i]=c(r[i],e,t,n);return o(),a}function f(e,t,n){let r=Qv.inlineCode(e,t,n);return n.stack.includes(`tableCell`)&&(r=r.replace(/\|/g,`\\$&`)),r}}function cy(){return{exit:{taskListCheckValueChecked:uy,taskListCheckValueUnchecked:uy,paragraph:dy}}}function ly(){return{unsafe:[{atBreak:!0,character:`-`,after:`[:|-]`}],handlers:{listItem:fy}}}function uy(e){let t=this.stack[this.stack.length-2];t.type,t.checked=e.type===`taskListCheckValueChecked`}function dy(e){let t=this.stack[this.stack.length-2];if(t&&t.type===`listItem`&&typeof t.checked==`boolean`){let e=this.stack[this.stack.length-1];e.type;let n=e.children[0];if(n&&n.type===`text`){let r=t.children,i=-1,a;for(;++i<r.length;){let e=r[i];if(e.type===`paragraph`){a=e;break}}a===e&&(n.value=n.value.slice(1),n.value.length===0?e.children.shift():e.position&&n.position&&typeof n.position.start.offset==`number`&&(n.position.start.column++,n.position.start.offset++,e.position.start=Object.assign({},n.position.start)))}}this.exit(e)}function fy(e,t,n,r){let i=e.children[0],a=typeof e.checked==`boolean`&&i&&i.type===`paragraph`,o=`[`+(e.checked?`x`:` `)+`] `,s=n.createTracker(r);a&&s.move(o);let c=Qv.listItem(e,t,n,{...r,...s.current()});return a&&(c=c.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,l)),c;function l(e){return e+o}}function py(){return[__(),V_(),K_(),$v(),cy()]}function my(e){return{extensions:[v_(),H_(e),q_(),sy(e),ly()]}}var hy={tokenize:ky,partial:!0},gy={tokenize:Ay,partial:!0},_y={tokenize:jy,partial:!0},vy={tokenize:My,partial:!0},yy={tokenize:Ny,partial:!0},by={name:`wwwAutolink`,tokenize:Dy,previous:Py},xy={name:`protocolAutolink`,tokenize:Oy,previous:Fy},Sy={name:`emailAutolink`,tokenize:Ey,previous:Iy},Cy={};function wy(){return{text:Cy}}for(var Ty=48;Ty<123;)Cy[Ty]=Sy,Ty++,Ty===58?Ty=65:Ty===91&&(Ty=97);Cy[43]=Sy,Cy[45]=Sy,Cy[46]=Sy,Cy[95]=Sy,Cy[72]=[Sy,xy],Cy[104]=[Sy,xy],Cy[87]=[Sy,by],Cy[119]=[Sy,by];function Ey(e,t,n){let r=this,i,a;return o;function o(t){return!Ly(t)||!Iy.call(r,r.previous)||Ry(r.events)?n(t):(e.enter(`literalAutolink`),e.enter(`literalAutolinkEmail`),s(t))}function s(t){return Ly(t)?(e.consume(t),s):t===64?(e.consume(t),c):n(t)}function c(t){return t===46?e.check(yy,u,l)(t):t===45||t===95||hf(t)?(a=!0,e.consume(t),c):u(t)}function l(t){return e.consume(t),i=!0,c}function u(o){return a&&i&&mf(r.previous)?(e.exit(`literalAutolinkEmail`),e.exit(`literalAutolink`),t(o)):n(o)}}function Dy(e,t,n){let r=this;return i;function i(t){return t!==87&&t!==119||!Py.call(r,r.previous)||Ry(r.events)?n(t):(e.enter(`literalAutolink`),e.enter(`literalAutolinkWww`),e.check(hy,e.attempt(gy,e.attempt(_y,a),n),n)(t))}function a(n){return e.exit(`literalAutolinkWww`),e.exit(`literalAutolink`),t(n)}}function Oy(e,t,n){let r=this,i=``,a=!1;return o;function o(t){return(t===72||t===104)&&Fy.call(r,r.previous)&&!Ry(r.events)?(e.enter(`literalAutolink`),e.enter(`literalAutolinkHttp`),i+=String.fromCodePoint(t),e.consume(t),s):n(t)}function s(t){if(mf(t)&&i.length<5)return i+=String.fromCodePoint(t),e.consume(t),s;if(t===58){let n=i.toLowerCase();if(n===`http`||n===`https`)return e.consume(t),c}return n(t)}function c(t){return t===47?(e.consume(t),a?l:(a=!0,c)):n(t)}function l(t){return t===null||_f(t)||xf(t)||wf(t)||Cf(t)?n(t):e.attempt(gy,e.attempt(_y,u),n)(t)}function u(n){return e.exit(`literalAutolinkHttp`),e.exit(`literalAutolink`),t(n)}}function ky(e,t,n){let r=0;return i;function i(t){return(t===87||t===119)&&r<3?(r++,e.consume(t),i):t===46&&r===3?(e.consume(t),a):n(t)}function a(e){return e===null?n(e):t(e)}}function Ay(e,t,n){let r,i,a;return o;function o(t){return t===46||t===95?e.check(vy,c,s)(t):t===null||xf(t)||wf(t)||t!==45&&Cf(t)?c(t):(a=!0,e.consume(t),o)}function s(t){return t===95?r=!0:(i=r,r=void 0),e.consume(t),o}function c(e){return i||r||!a?n(e):t(e)}}function jy(e,t){let n=0,r=0;return i;function i(o){return o===40?(n++,e.consume(o),i):o===41&&r<n?a(o):o===33||o===34||o===38||o===39||o===41||o===42||o===44||o===46||o===58||o===59||o===60||o===63||o===93||o===95||o===126?e.check(vy,t,a)(o):o===null||xf(o)||wf(o)?t(o):(e.consume(o),i)}function a(t){return t===41&&r++,e.consume(t),i}}function My(e,t,n){return r;function r(o){return o===33||o===34||o===39||o===41||o===42||o===44||o===46||o===58||o===59||o===63||o===95||o===126?(e.consume(o),r):o===38?(e.consume(o),a):o===93?(e.consume(o),i):o===60||o===null||xf(o)||wf(o)?t(o):n(o)}function i(e){return e===null||e===40||e===91||xf(e)||wf(e)?t(e):r(e)}function a(e){return mf(e)?o(e):n(e)}function o(t){return t===59?(e.consume(t),r):mf(t)?(e.consume(t),o):n(t)}}function Ny(e,t,n){return r;function r(t){return e.consume(t),i}function i(e){return hf(e)?n(e):t(e)}}function Py(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||xf(e)}function Fy(e){return!mf(e)}function Iy(e){return!(e===47||Ly(e))}function Ly(e){return e===43||e===45||e===46||e===95||hf(e)}function Ry(e){let t=e.length,n=!1;for(;t--;){let r=e[t][1];if((r.type===`labelLink`||r.type===`labelImage`)&&!r._balanced){n=!0;break}if(r._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}var zy={tokenize:qy,partial:!0};function By(){return{document:{91:{name:`gfmFootnoteDefinition`,tokenize:Wy,continuation:{tokenize:Gy},exit:Ky}},text:{91:{name:`gfmFootnoteCall`,tokenize:Uy},93:{name:`gfmPotentialFootnoteCall`,add:`after`,tokenize:Vy,resolveTo:Hy}}}}function Vy(e,t,n){let r=this,i=r.events.length,a=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),o;for(;i--;){let e=r.events[i][1];if(e.type===`labelImage`){o=e;break}if(e.type===`gfmFootnoteCall`||e.type===`labelLink`||e.type===`label`||e.type===`image`||e.type===`link`)break}return s;function s(i){if(!o||!o._balanced)return n(i);let s=pf(r.sliceSerialize({start:o.end,end:r.now()}));return s.codePointAt(0)!==94||!a.includes(s.slice(1))?n(i):(e.enter(`gfmFootnoteCallLabelMarker`),e.consume(i),e.exit(`gfmFootnoteCallLabelMarker`),t(i))}}function Hy(e,t){let n=e.length;for(;n--;)if(e[n][1].type===`labelImage`&&e[n][0]===`enter`){e[n][1];break}e[n+1][1].type=`data`,e[n+3][1].type=`gfmFootnoteCallLabelMarker`;let r={type:`gfmFootnoteCall`,start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},i={type:`gfmFootnoteCallMarker`,start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};i.end.column++,i.end.offset++,i.end._bufferIndex++;let a={type:`gfmFootnoteCallString`,start:Object.assign({},i.end),end:Object.assign({},e[e.length-1][1].start)},o={type:`chunkString`,contentType:`string`,start:Object.assign({},a.start),end:Object.assign({},a.end)},s=[e[n+1],e[n+2],[`enter`,r,t],e[n+3],e[n+4],[`enter`,i,t],[`exit`,i,t],[`enter`,a,t],[`enter`,o,t],[`exit`,o,t],[`exit`,a,t],e[e.length-2],e[e.length-1],[`exit`,r,t]];return e.splice(n,e.length-n+1,...s),e}function Uy(e,t,n){let r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),a=0,o;return s;function s(t){return e.enter(`gfmFootnoteCall`),e.enter(`gfmFootnoteCallLabelMarker`),e.consume(t),e.exit(`gfmFootnoteCallLabelMarker`),c}function c(t){return t===94?(e.enter(`gfmFootnoteCallMarker`),e.consume(t),e.exit(`gfmFootnoteCallMarker`),e.enter(`gfmFootnoteCallString`),e.enter(`chunkString`).contentType=`string`,l):n(t)}function l(s){if(a>999||s===93&&!o||s===null||s===91||xf(s))return n(s);if(s===93){e.exit(`chunkString`);let a=e.exit(`gfmFootnoteCallString`);return i.includes(pf(r.sliceSerialize(a)))?(e.enter(`gfmFootnoteCallLabelMarker`),e.consume(s),e.exit(`gfmFootnoteCallLabelMarker`),e.exit(`gfmFootnoteCall`),t):n(s)}return xf(s)||(o=!0),a++,e.consume(s),s===92?u:l}function u(t){return t===91||t===92||t===93?(e.consume(t),a++,l):l(t)}}function Wy(e,t,n){let r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]),a,o=0,s;return c;function c(t){return e.enter(`gfmFootnoteDefinition`)._container=!0,e.enter(`gfmFootnoteDefinitionLabel`),e.enter(`gfmFootnoteDefinitionLabelMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionLabelMarker`),l}function l(t){return t===94?(e.enter(`gfmFootnoteDefinitionMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionMarker`),e.enter(`gfmFootnoteDefinitionLabelString`),e.enter(`chunkString`).contentType=`string`,u):n(t)}function u(t){if(o>999||t===93&&!s||t===null||t===91||xf(t))return n(t);if(t===93){e.exit(`chunkString`);let n=e.exit(`gfmFootnoteDefinitionLabelString`);return a=pf(r.sliceSerialize(n)),e.enter(`gfmFootnoteDefinitionLabelMarker`),e.consume(t),e.exit(`gfmFootnoteDefinitionLabelMarker`),e.exit(`gfmFootnoteDefinitionLabel`),f}return xf(t)||(s=!0),o++,e.consume(t),t===92?d:u}function d(t){return t===91||t===92||t===93?(e.consume(t),o++,u):u(t)}function f(t){return t===58?(e.enter(`definitionMarker`),e.consume(t),e.exit(`definitionMarker`),i.includes(a)||i.push(a),Df(e,p,`gfmFootnoteDefinitionWhitespace`)):n(t)}function p(e){return t(e)}}function Gy(e,t,n){return e.check(Gf,t,e.attempt(zy,t,n))}function Ky(e){e.exit(`gfmFootnoteDefinition`)}function qy(e,t,n){let r=this;return Df(e,i,`gfmFootnoteDefinitionIndent`,5);function i(e){let i=r.events[r.events.length-1];return i&&i[1].type===`gfmFootnoteDefinitionIndent`&&i[2].sliceSerialize(i[1],!0).length===4?t(e):n(e)}}function Jy(e){let t=(e||{}).singleTilde,n={name:`strikethrough`,tokenize:i,resolveAll:r};return t??=!0,{text:{126:n},insideSpan:{null:[n]},attentionMarkers:{null:[126]}};function r(e,t){let n=-1;for(;++n<e.length;)if(e[n][0]===`enter`&&e[n][1].type===`strikethroughSequenceTemporary`&&e[n][1]._close){let r=n;for(;r--;)if(e[r][0]===`exit`&&e[r][1].type===`strikethroughSequenceTemporary`&&e[r][1]._open&&e[n][1].end.offset-e[n][1].start.offset===e[r][1].end.offset-e[r][1].start.offset){e[n][1].type=`strikethroughSequence`,e[r][1].type=`strikethroughSequence`;let i={type:`strikethrough`,start:Object.assign({},e[r][1].start),end:Object.assign({},e[n][1].end)},a={type:`strikethroughText`,start:Object.assign({},e[r][1].end),end:Object.assign({},e[n][1].start)},o=[[`enter`,i,t],[`enter`,e[r][1],t],[`exit`,e[r][1],t],[`enter`,a,t]],s=t.parser.constructs.insideSpan.null;s&&of(o,o.length,0,Rf(s,e.slice(r+1,n),t)),of(o,o.length,0,[[`exit`,a,t],[`enter`,e[n][1],t],[`exit`,e[n][1],t],[`exit`,i,t]]),of(e,r-1,n-r+3,o),n=r+o.length-2;break}}for(n=-1;++n<e.length;)e[n][1].type===`strikethroughSequenceTemporary`&&(e[n][1].type=`data`);return e}function i(e,n,r){let i=this.previous,a=this.events,o=0;return s;function s(t){return i===126&&a[a.length-1][1].type!==`characterEscape`?r(t):(e.enter(`strikethroughSequenceTemporary`),c(t))}function c(a){let s=Lf(i);if(a===126)return o>1?r(a):(e.consume(a),o++,c);if(o<2&&!t)return r(a);let l=e.exit(`strikethroughSequenceTemporary`),u=Lf(a);return l._open=!u||u===2&&!!s,l._close=!s||s===2&&!!u,n(a)}}}var Yy=class{constructor(){this.map=[],this.index=new Map}add(e,t,n){Xy(this,e,t,n)}consume(e){if(this.map.sort(function(e,t){return e[0]-t[0]}),this.map.length===0)return;let t=this.map.length,n=[];for(;t>0;)--t,n.push(e.slice(this.map[t][0]+this.map[t][1]),this.map[t][2]),e.length=this.map[t][0];n.push(e.slice()),e.length=0;let r=n.pop();for(;r;){for(let t of r)e.push(t);r=n.pop()}this.map.length=0,this.index.clear()}};function Xy(e,t,n,r){if(n===0&&r.length===0)return;let i=e.index.get(t);if(i){i[1]+=n,i[2].push(...r);return}let a=[t,n,r];e.map.push(a),e.index.set(t,a)}function Zy(e,t){let n=!1,r=[];for(;t<e.length;){let i=e[t];if(n){if(i[0]===`enter`)i[1].type===`tableContent`&&r.push(e[t+1][1].type===`tableDelimiterMarker`?`left`:`none`);else if(i[1].type===`tableContent`){if(e[t-1][1].type===`tableDelimiterMarker`){let e=r.length-1;r[e]=r[e]===`left`?`center`:`right`}}else if(i[1].type===`tableDelimiterRow`)break}else i[0]===`enter`&&i[1].type===`tableDelimiterRow`&&(n=!0);t+=1}return r}function Qy(){return{flow:{null:{name:`table`,tokenize:$y,resolveAll:eb}}}}function $y(e,t,n){let r=this,i=0,a=0,o;return s;function s(e){let t=r.events.length-1;for(;t>-1;){let{type:e}=r.events[t][1];if(e===`lineEnding`||e===`linePrefix`)t--;else break}let i=t>-1?r.events[t][1].type:null,a=i===`tableHead`||i===`tableRow`?S:c;return a===S&&r.parser.lazy[r.now().line]?n(e):a(e)}function c(t){return e.enter(`tableHead`),e.enter(`tableRow`),l(t)}function l(e){return e===124||(o=!0,a+=1),u(e)}function u(t){return t===null?n(t):Z(t)?a>1?(a=0,r.interrupt=!0,e.exit(`tableRow`),e.enter(`lineEnding`),e.consume(t),e.exit(`lineEnding`),p):n(t):Sf(t)?Df(e,u,`whitespace`)(t):(a+=1,o&&(o=!1,i+=1),t===124?(e.enter(`tableCellDivider`),e.consume(t),e.exit(`tableCellDivider`),o=!0,u):(e.enter(`data`),d(t)))}function d(t){return t===null||t===124||xf(t)?(e.exit(`data`),u(t)):(e.consume(t),t===92?f:d)}function f(t){return t===92||t===124?(e.consume(t),d):d(t)}function p(t){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(t):(e.enter(`tableDelimiterRow`),o=!1,Sf(t)?Df(e,m,`linePrefix`,r.parser.constructs.disable.null.includes(`codeIndented`)?void 0:4)(t):m(t))}function m(t){return t===45||t===58?g(t):t===124?(o=!0,e.enter(`tableCellDivider`),e.consume(t),e.exit(`tableCellDivider`),h):x(t)}function h(t){return Sf(t)?Df(e,g,`whitespace`)(t):g(t)}function g(t){return t===58?(a+=1,o=!0,e.enter(`tableDelimiterMarker`),e.consume(t),e.exit(`tableDelimiterMarker`),_):t===45?(a+=1,_(t)):t===null||Z(t)?b(t):x(t)}function _(t){return t===45?(e.enter(`tableDelimiterFiller`),v(t)):x(t)}function v(t){return t===45?(e.consume(t),v):t===58?(o=!0,e.exit(`tableDelimiterFiller`),e.enter(`tableDelimiterMarker`),e.consume(t),e.exit(`tableDelimiterMarker`),y):(e.exit(`tableDelimiterFiller`),y(t))}function y(t){return Sf(t)?Df(e,b,`whitespace`)(t):b(t)}function b(n){return n===124?m(n):n===null||Z(n)?!o||i!==a?x(n):(e.exit(`tableDelimiterRow`),e.exit(`tableHead`),t(n)):x(n)}function x(e){return n(e)}function S(t){return e.enter(`tableRow`),C(t)}function C(n){return n===124?(e.enter(`tableCellDivider`),e.consume(n),e.exit(`tableCellDivider`),C):n===null||Z(n)?(e.exit(`tableRow`),t(n)):Sf(n)?Df(e,C,`whitespace`)(n):(e.enter(`data`),w(n))}function w(t){return t===null||t===124||xf(t)?(e.exit(`data`),C(t)):(e.consume(t),t===92?T:w)}function T(t){return t===92||t===124?(e.consume(t),w):w(t)}}function eb(e,t){let n=-1,r=!0,i=0,a=[0,0,0,0],o=[0,0,0,0],s=!1,c=0,l,u,d,f=new Yy;for(;++n<e.length;){let p=e[n],m=p[1];p[0]===`enter`?m.type===`tableHead`?(s=!1,c!==0&&(nb(f,t,c,l,u),u=void 0,c=0),l={type:`table`,start:Object.assign({},m.start),end:Object.assign({},m.end)},f.add(n,0,[[`enter`,l,t]])):m.type===`tableRow`||m.type===`tableDelimiterRow`?(r=!0,d=void 0,a=[0,0,0,0],o=[0,n+1,0,0],s&&(s=!1,u={type:`tableBody`,start:Object.assign({},m.start),end:Object.assign({},m.end)},f.add(n,0,[[`enter`,u,t]])),i=m.type===`tableDelimiterRow`?2:u?3:1):i&&(m.type===`data`||m.type===`tableDelimiterMarker`||m.type===`tableDelimiterFiller`)?(r=!1,o[2]===0&&(a[1]!==0&&(o[0]=o[1],d=tb(f,t,a,i,void 0,d),a=[0,0,0,0]),o[2]=n)):m.type===`tableCellDivider`&&(r?r=!1:(a[1]!==0&&(o[0]=o[1],d=tb(f,t,a,i,void 0,d)),a=o,o=[a[1],n,0,0])):m.type===`tableHead`?(s=!0,c=n):m.type===`tableRow`||m.type===`tableDelimiterRow`?(c=n,a[1]===0?o[1]!==0&&(d=tb(f,t,o,i,n,d)):(o[0]=o[1],d=tb(f,t,a,i,n,d)),i=0):i&&(m.type===`data`||m.type===`tableDelimiterMarker`||m.type===`tableDelimiterFiller`)&&(o[3]=n)}for(c!==0&&nb(f,t,c,l,u),f.consume(t.events),n=-1;++n<t.events.length;){let e=t.events[n];e[0]===`enter`&&e[1].type===`table`&&(e[1]._align=Zy(t.events,n))}return e}function tb(e,t,n,r,i,a){let o=r===1?`tableHeader`:r===2?`tableDelimiter`:`tableData`;n[0]!==0&&(a.end=Object.assign({},rb(t.events,n[0])),e.add(n[0],0,[[`exit`,a,t]]));let s=rb(t.events,n[1]);if(a={type:o,start:Object.assign({},s),end:Object.assign({},s)},e.add(n[1],0,[[`enter`,a,t]]),n[2]!==0){let i=rb(t.events,n[2]),a=rb(t.events,n[3]),o={type:`tableContent`,start:Object.assign({},i),end:Object.assign({},a)};if(e.add(n[2],0,[[`enter`,o,t]]),r!==2){let r=t.events[n[2]],i=t.events[n[3]];if(r[1].end=Object.assign({},i[1].end),r[1].type=`chunkText`,r[1].contentType=`text`,n[3]>n[2]+1){let t=n[2]+1,r=n[3]-n[2]-1;e.add(t,r,[])}}e.add(n[3]+1,0,[[`exit`,o,t]])}return i!==void 0&&(a.end=Object.assign({},rb(t.events,i)),e.add(i,0,[[`exit`,a,t]]),a=void 0),a}function nb(e,t,n,r,i){let a=[],o=rb(t.events,n);i&&(i.end=Object.assign({},o),a.push([`exit`,i,t])),r.end=Object.assign({},o),a.push([`exit`,r,t]),e.add(n+1,0,a)}function rb(e,t){let n=e[t],r=n[0]===`enter`?`start`:`end`;return n[1][r]}var ib={name:`tasklistCheck`,tokenize:ob};function ab(){return{text:{91:ib}}}function ob(e,t,n){let r=this;return i;function i(t){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(t):(e.enter(`taskListCheck`),e.enter(`taskListCheckMarker`),e.consume(t),e.exit(`taskListCheckMarker`),a)}function a(t){return xf(t)?(e.enter(`taskListCheckValueUnchecked`),e.consume(t),e.exit(`taskListCheckValueUnchecked`),o):t===88||t===120?(e.enter(`taskListCheckValueChecked`),e.consume(t),e.exit(`taskListCheckValueChecked`),o):n(t)}function o(t){return t===93?(e.enter(`taskListCheckMarker`),e.consume(t),e.exit(`taskListCheckMarker`),e.exit(`taskListCheck`),s):n(t)}function s(r){return Z(r)?t(r):Sf(r)?e.check({tokenize:sb},t,n)(r):n(r)}}function sb(e,t,n){return Df(e,r,`whitespace`);function r(e){return e===null?n(e):t(e)}}function cb(e){return lf([wy(),By(),Jy(e),Qy(),ab()])}var lb={};function ub(e){let t=this,n=e||lb,r=t.data(),i=r.micromarkExtensions||=[],a=r.fromMarkdownExtensions||=[],o=r.toMarkdownExtensions||=[];i.push(cb(n)),a.push(py()),o.push(my(n))}var db={path:`M82 352.8h521.8l181.3.2 8.4.3h2.4A14 14 0 0 1 807 358c2.2 3.9 2.3 7.5 2.4 11.9.4 6 .7 9.6 4.6 14.1 7 3.4 13.2 3.4 20.8 3.3h22.8l28.4-.3h3.8l51.2-1h3.4q112.6-2.8 224.8-15.1l3.4-.4 6.4-.7c14.4-1.6 14.4-1.6 19 .7 2.1 2.7 3 4.6 3.3 8.1-1 9.3-7 17.9-12.3 25.4l-2 2.8a224 224 0 0 1-21 24.2l-2.3 2.4a174 174 0 0 1-20 17.4C1071 510.9 971 540.2 855.3 566.6c-70.4 16-70.4 16-97.3 36.4l-2.5 1.8A100 100 0 0 0 715 677l-.2 3c-.8 32.3 13 61.3 34.2 85l1.9 2.1c31.3 33.5 80.1 49.2 122.7 61.7l6.7 2 3.5 1A31 31 0 0 1 899 844l1.9 4.8 1 3 1.1 3.2 1.3 3.6 6.7 19.6 1.1 3.5a17 17 0 0 1-.2 12c-3 3.7-6.7 5-11.4 5.6h-514l-28.5-.1H227.8c-18-.1-18-.1-23-3.1-2.9-3.3-3-5.5-3-9.8a49 49 0 0 1 3.5-13.8l4.3-13.1c3.6-11.1 7.5-20.8 18.2-26.8 5-2.2 10.4-3.5 15.7-4.8 44-12 87.7-29.3 121.5-60.8l2.5-2.2c21.2-20 33.5-49.3 34.8-78.3.6-27.7-8.4-53.3-26.3-74.5l-2.5-3c-10.3-12-23-20.9-36.5-29l-1.8-1.1c-29.6-18.1-64.5-26.8-97.5-36.6l-3-.9-14-4.1-5.2-1.5-2.2-.6A34 34 0 0 1 193 521a267 267 0 0 1-9.8-23.3l-1.4-3.6c-2.2-3.7-4-5.1-7.8-7.1-5.2-1.2-10.3-1.2-15.6-1.2l-46.8-.7-32.7-.5h-2.7a24 24 0 0 1-17.6-7c-3.8-6.2-3.9-12.3-3.9-19.4v-33l-.1-49.8c0-6.9.9-13.7 5.7-18.8 7-4 13.7-3.9 21.6-3.8`,viewBox:`31 329 1194 594`,bounds:{x:55,y:353,width:1146,height:546}};function fb(){return typeof window<`u`}function pb(e){return gb(e)?(e.nodeName||``).toLowerCase():`#document`}function mb(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function hb(e){return((gb(e)?e.ownerDocument:e.document)||window.document)?.documentElement}function gb(e){return fb()?e instanceof Node||e instanceof mb(e).Node:!1}function _b(e){return fb()?e instanceof Element||e instanceof mb(e).Element:!1}function vb(e){return fb()?e instanceof HTMLElement||e instanceof mb(e).HTMLElement:!1}function yb(e){return!fb()||typeof ShadowRoot>`u`?!1:e instanceof ShadowRoot||e instanceof mb(e).ShadowRoot}function bb(e){let{overflow:t,overflowX:n,overflowY:r,display:i}=jb(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&i!==`inline`&&i!==`contents`}function xb(e){return/^(table|td|th)$/.test(pb(e))}function Sb(e){try{if(e.matches(`:popover-open`))return!0}catch{}try{return e.matches(`:modal`)}catch{return!1}}var Cb=/transform|translate|scale|rotate|perspective|filter/,wb=/paint|layout|strict|content/,Tb=e=>!!e&&e!==`none`,Eb;function Db(e){let t=_b(e)?jb(e):e;return Tb(t.transform)||Tb(t.translate)||Tb(t.scale)||Tb(t.rotate)||Tb(t.perspective)||!kb()&&(Tb(t.backdropFilter)||Tb(t.filter))||Cb.test(t.willChange||``)||wb.test(t.contain||``)}function Ob(e){let t=Nb(e);for(;vb(t)&&!Ab(t);){if(Db(t))return t;if(Sb(t))return null;t=Nb(t)}return null}function kb(){return Eb??=typeof CSS<`u`&&CSS.supports&&CSS.supports(`-webkit-backdrop-filter`,`none`),Eb}function Ab(e){return/^(html|body|#document)$/.test(pb(e))}function jb(e){return mb(e).getComputedStyle(e)}function Mb(e){return _b(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Nb(e){if(pb(e)===`html`)return e;let t=e.assignedSlot||e.parentNode||yb(e)&&e.host||hb(e);return yb(t)?t.host:t}function Pb(e){let t=Nb(e);return Ab(t)?(e.ownerDocument||e).body:vb(t)&&bb(t)?t:Pb(t)}function Fb(e,t,n){t===void 0&&(t=[]),n===void 0&&(n=!0);let r=Pb(e),i=r===e.ownerDocument?.body,a=mb(r);if(i){let e=Ib(a);return t.concat(a,a.visualViewport||[],bb(r)?r:[],e&&n?Fb(e):[])}return t.concat(r,Fb(r,[],n))}function Ib(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}var Lb=U.createContext(void 0);function Rb(e=!1){let t=U.useContext(Lb);if(t===void 0&&!e)throw Error(ha(16));return t}function zb(e){let{focusableWhenDisabled:t,disabled:n,composite:r=!1,tabIndex:i=0,isNativeButton:a}=e,o=r&&t!==!1,s=r&&t===!1;return{props:U.useMemo(()=>{let e={onKeyDown(e){n&&t&&e.key!==`Tab`&&e.preventDefault()}};return r||(e.tabIndex=i,!a&&n&&(e.tabIndex=t?i:-1)),(a&&(t||o)||!a&&n)&&(e[`aria-disabled`]=n),a&&(!t||s)&&(e.disabled=n),e},[r,n,t,o,s,a,i])}}function Bb(e){return e?.ownerDocument||document}function Vb(e,t,{detail:n=0,pointerType:r=``}={}){e.dispatchEvent(new(mb(e)).PointerEvent(`click`,{bubbles:!0,cancelable:!0,composed:!0,detail:n,pointerType:r,shiftKey:t.shiftKey,ctrlKey:t.ctrlKey,altKey:t.altKey,metaKey:t.metaKey}))}function Hb(e={}){let{disabled:t=!1,focusableWhenDisabled:n,tabIndex:r=0,native:i=!0,composite:a}=e,o=U.useRef(null),s=Rb(!0),c=a??s!==void 0,{props:l}=zb({focusableWhenDisabled:n,disabled:t,composite:c,tabIndex:r,isNativeButton:i}),u=U.useCallback(()=>{let e=o.current;Ub(e)&&c&&t&&l.disabled===void 0&&e.disabled&&(e.disabled=!1)},[t,l.disabled,c]);return J(u,[u]),{getButtonProps:U.useCallback((e={})=>{let{onClick:n,onMouseDown:r,onKeyUp:a,onKeyDown:o,onPointerDown:s,...u}=e;return Ji({onClick(e){t?e.preventDefault():n?.(e)},onMouseDown(e){t||r?.(e)},onKeyDown(e){if(t||(ia(e),o?.(e),e.baseUIHandlerPrevented))return;let n=e.target===e.currentTarget,r=e.currentTarget,a=Ub(r),s=!i&&Wb(r),l=n&&(i?a:!s),u=e.key===`Enter`,d=e.key===` `,f=r.getAttribute(`role`),p=f?.startsWith(`menuitem`)||f===`option`||f===`gridcell`;if(n&&c&&d){if(e.defaultPrevented&&p)return;e.preventDefault(),(!i||a)&&(e.preventBaseUIHandler(),Vb(r,e))}else!l||i||!d&&!u?n&&s&&d&&e.preventDefault():e.defaultPrevented||(e.preventDefault(),u&&(e.preventBaseUIHandler(),Vb(r,e)))},onKeyUp(e){t||(ia(e),a?.(e),e.target===e.currentTarget&&i&&c&&Ub(e.currentTarget)&&e.key===` `?e.preventDefault():e.baseUIHandlerPrevented||e.target===e.currentTarget&&!i&&!c&&!e.defaultPrevented&&e.key===` `&&(e.preventBaseUIHandler(),Vb(e.currentTarget,e)))},onPointerDown(e){t?e.preventDefault():s?.(e)}},i?{type:`button`}:{role:`button`},l,u)},[t,l,c,i]),buttonRef:q(e=>{o.current=e,u()})}}function Ub(e){return vb(e)&&e.tagName===`BUTTON`}function Wb(e){return vb(e)&&e.tagName===`A`&&!!e.href}var Gb=U.forwardRef(function(e,t){let{render:n,className:r,disabled:i=!1,focusableWhenDisabled:a=!1,nativeButton:o=!0,style:s,...c}=e,{getButtonProps:l,buttonRef:u}=Hb({disabled:i,focusableWhenDisabled:a,native:o});return sa(`button`,e,{state:{disabled:i},ref:[t,u],props:[c,l]})});function Kb(e){var t,n,r=``;if(typeof e==`string`||typeof e==`number`)r+=e;else if(typeof e==`object`){if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=Kb(e[t]))&&(r&&(r+=` `),r+=n)}else for(n in e)e[n]&&(r&&(r+=` `),r+=n)}return r}function qb(){for(var e,t,n=0,r=``,i=arguments.length;n<i;n++)(e=arguments[n])&&(t=Kb(e))&&(r&&(r+=` `),r+=t);return r}var Jb=e=>typeof e==`boolean`?`${e}`:e===0?`0`:e,Yb=qb,Xb=(e,t)=>n=>{if(t?.variants==null)return Yb(e,n?.class,n?.className);let{variants:r,defaultVariants:i}=t,a=Object.keys(r).map(e=>{let t=n?.[e],a=i?.[e];if(t===null)return null;let o=Jb(t)||Jb(a);return r[e][o]}),o=n&&Object.entries(n).reduce((e,t)=>{let[n,r]=t;return r===void 0||(e[n]=r),e},{});return Yb(e,a,t?.compoundVariants?.reduce((e,t)=>{let{class:n,className:r,...a}=t;return Object.entries(a).every(e=>{let[t,n]=e;return Array.isArray(n)?n.includes({...i,...o}[t]):{...i,...o}[t]===n})?[...e,n,r]:e},[]),n?.class,n?.className)},Zb=Xb(`group/button inline-flex shrink-0 items-center justify-center rounded-md border border-transparent bg-clip-padding text-[13px] font-medium whitespace-nowrap transition-all outline-none select-none focus-visible:border-transparent focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background active:not-aria-[haspopup]:translate-y-px disabled:pointer-events-none disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4`,{variants:{variant:{default:`bg-primary text-primary-foreground hover:bg-primary/80`,outline:`border-border bg-background hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:border-input dark:bg-input/30 dark:hover:bg-input/50`,secondary:`bg-secondary text-secondary-foreground hover:bg-[color-mix(in_oklch,var(--secondary),var(--foreground)_5%)] aria-expanded:bg-secondary aria-expanded:text-secondary-foreground`,ghost:`hover:bg-muted hover:text-foreground aria-expanded:bg-muted aria-expanded:text-foreground dark:hover:bg-muted/50`,destructive:`bg-destructive/10 text-destructive hover:bg-destructive/20 focus-visible:border-destructive/40 focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:hover:bg-destructive/30 dark:focus-visible:ring-destructive/40`,link:`text-primary underline-offset-4 hover:underline`},size:{default:`h-7 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2`,xs:`h-6 gap-1 rounded-[min(var(--radius-md),10px)] px-2 text-xs in-data-[slot=button-group]:rounded-lg has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3`,sm:`h-7 gap-1 rounded-[min(var(--radius-md),12px)] px-2.5 text-[0.8rem] in-data-[slot=button-group]:rounded-lg has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 [&_svg:not([class*='size-'])]:size-3.5`,lg:`h-9 gap-1.5 px-2.5 has-data-[icon=inline-end]:pr-2 has-data-[icon=inline-start]:pl-2`,icon:`size-8`,"icon-xs":`size-6 rounded-[min(var(--radius-md),10px)] in-data-[slot=button-group]:rounded-lg [&_svg:not([class*='size-'])]:size-3`,"icon-sm":`size-7 rounded-[min(var(--radius-md),12px)] in-data-[slot=button-group]:rounded-lg`,"icon-lg":`size-9`}},defaultVariants:{variant:`outline`,size:`default`}});function Qb(e){return U.isValidElement(e)}function $b({className:e,variant:t=`outline`,size:n=`default`,render:r,...i}){if(Qb(r)&&r.type!==`button`){let{nativeButton:a,focusableWhenDisabled:o,children:s,...c}=i;return U.cloneElement(r,{...c,"data-slot":`button`,className:K(Zb({variant:t,size:n,className:e}),typeof r.props.className==`string`?r.props.className:void 0)},...s===void 0?[]:[s])}return(0,G.jsx)(Gb,{"data-slot":`button`,className:K(Zb({variant:t,size:n,className:e})),render:r,...i})}var ex=`data-valid`,tx=`data-invalid`,nx={badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valid:null,valueMissing:!1},rx={disabled:!1,valid:null,touched:!1,dirty:!1,filled:!1,focused:!1},ix={valid(e){return e===null?null:e?{[ex]:``}:{[tx]:``}}},ax={invalid:void 0,name:void 0,validityData:{state:nx,errors:[],error:``,value:``,initialValue:null},setValidityData:Vi,disabled:void 0,setTouched:Vi,setDirty:Vi,setFilled:Vi,setFocused:Vi,focusOwnerRef:{current:void 0},validationMode:`onSubmit`,shouldValidateOnChange:()=>!1,state:rx,registerFieldControl:Vi,validation:{getValidationProps:(e,t=Ui)=>t,inputRef:{current:null},registeredInputs:new Map,registerInput:Vi,getInputControl:()=>null,commit:async()=>{},change:Vi}},ox=U.createContext(ax);function sx(e=!0){let t=U.useContext(ox);if(t.setValidityData===Vi&&!e)throw Error(ha(28));return t}var cx=U.createContext({elementRef:{current:null},formRef:{current:{fields:new Map}},errors:{},clearErrors:Vi,validationMode:`onSubmit`,submitCountRef:{current:0}});function lx(){return U.useContext(cx)}function ux(){let[,e]=U.useState({});return U.useCallback(()=>{e({})},[])}var dx=0;function fx(e,t=`mui`){let n=U.useRef(void 0),r=ux(),i=e??n.current;return U.useEffect(()=>{n.current??(dx+=1,n.current=`${t}-${dx}`,e??r())},[e,t,r]),i}var px=ba.useId;function mx(e,t){if(px!==void 0){let n=px();return e??(t?`${t}-${n}`:n)}return fx(e,t)}function hx(e){return mx(e,`base-ui`)}var gx=U.createContext({controlId:void 0,registerControlId:Vi,resetControlId:Vi,labelId:void 0,setLabelId:Vi,messageIds:[],setMessageIds:Vi,getDescriptionProps:e=>e});function _x(){return U.useContext(gx)}function vx(e,t,n,r=!0,i,a){let[o,s]=U.useState(),c=hx(i?`${i}-label`:void 0),l=!!a?.trim(),u=e??(l?void 0:t)??o;return J(()=>{let i=e||t||l||!r?void 0:yx(n.current,c);o!==i&&s(i)}),u}function yx(e,t){let n=bx(e);if(n)return!n.id&&t&&(n.id=t),n.id||void 0}function bx(e){if(!e)return;let t=e.parentElement;if(t&&t.tagName===`LABEL`)return t;let n=e.id;if(n){let t=e.nextElementSibling;if(t&&t.htmlFor===n)return t}let r=e.labels;return r&&r[0]}function xx(e={}){let{id:t,enabled:n=!0}=e,{controlId:r,registerControlId:i,resetControlId:a}=_x(),o=hx(),s=Ai(()=>Symbol()),c=U.useRef(!1),l=U.useRef(!1),u=q(()=>{c.current&&i!==Vi&&(c.current=!1,i(s.current,void 0))});return J(()=>{if(!n||i===Vi){u();return}let e;if(t!==void 0)l.current=!0,e=t;else if(l.current)e=o;else{a();return}e===void 0?u():(c.current=!0,i(s.current,e))},[t,n,i,a,o,s,u]),J(()=>u,[u]),(n?r:void 0)??t??o}function Sx(){return typeof navigator>`u`?{userAgent:``,platform:``,maxTouchPoints:0}:{userAgent:navigator.userAgent,platform:navigator.platform??``,maxTouchPoints:navigator.maxTouchPoints??0}}var{userAgent:Cx,platform:wx,maxTouchPoints:Tx}=Sx(),Ex=Cx.toLowerCase(),Dx=wx.toLowerCase(),Ox=/^i(os$|p)/.test(Dx)||Dx===`macintel`&&Tx>1,kx=`android`,Ax=Dx===kx||Ex.includes(kx),jx=!Ox&&Dx.startsWith(`mac`);Dx.startsWith(`win`),!Ax&&/^(linux|chrome os)/.test(Dx);var Mx=jx||Ox,Nx=typeof CSS<`u`&&!!CSS.supports?.(`-webkit-backdrop-filter:none`);!Nx&&Ex.includes(`firefox`),!Nx&&Ex.includes(`chrom`);var Px=Mx,Fx=/jsdom|happydom/.test(Ex);function Ix(e){let t=e.activeElement;for(;t?.shadowRoot?.activeElement!=null;)t=t.shadowRoot.activeElement;return t}function Q(e,t){if(!e||!t)return!1;let n=t.getRootNode?.();if(e.contains(t))return!0;if(n&&yb(n)){let n=t;for(;n;){if(e===n)return!0;n=n.parentNode||n.host}}return!1}function Lx(e,t){let n=e;for(;n;){if(_b(n)&&n.matches(t))return n;n=n.assignedSlot??n.parentNode??(yb(n)?n.host:null)}return null}function Rx(e){return`composedPath`in e?e.composedPath()[0]??e.target:e.target}var zx=`data-base-ui-focusable`,Bx=`input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])`,Vx=`ArrowLeft`,Hx=`ArrowRight`,Ux=`ArrowUp`,Wx=`ArrowDown`,Gx=`data-open`,Kx=`data-closed`,qx=`data-anchor-hidden`,Jx=`data-popup-open`,Yx=`data-pressed`,Xx={[Jx]:``},Zx={[Jx]:``,[Yx]:``},Qx={[Gx]:``},$x={[Kx]:``},eS={[qx]:``},tS={open(e){return e?Xx:null}},nS={open(e){return e?Zx:null}},rS={open(e){return e?Qx:$x},anchorHidden(e){return e?eS:null}},iS={...rS,...Ba},aS=`data-trigger-disabled`;function oS(e,t){if(!_b(e))return!1;let n=e;if(t.hasElement(n))return!n.hasAttribute(aS);for(let[,e]of t.entries())if(Q(e,n))return!e.hasAttribute(aS);return!1}function sS(e,t){if(t==null)return!1;if(`composedPath`in e)return e.composedPath().includes(t);let n=e;return n.target!=null&&t.contains(n.target)}function cS(e){return e.matches(`html,body`)}function lS(e){return vb(e)&&e.matches(`input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])`)}function uS(e){return Lx(e,`button,a[href],[role="button"],select,[tabindex]:not([tabindex="-1"]),${Bx}`)!=null}function dS(e){return e?e.getAttribute(`role`)===`combobox`&&lS(e):!1}function fS(e){if(!e||Fx)return!0;try{return e.matches(`:focus-visible`)}catch{return!0}}function pS(e){return e?e.hasAttribute(`data-base-ui-focusable`)?e:e.querySelector(`[data-base-ui-focusable]`)||e:null}function mS(e,t,n=!0){return e.filter(e=>e.parentId===t).flatMap(t=>[...!n||t.context?.open?[t]:[],...mS(e,t.id,n)])}function hS(e,t){let n=[],r=e.find(e=>e.id===t)?.parentId;for(;r;){let t=e.find(e=>e.id===r);r=t?.parentId,t&&(n=n.concat(t))}return n}function gS(e){e.preventDefault(),e.stopPropagation()}function _S(e){return`nativeEvent`in e}function vS(e){return e.pointerType===``&&e.isTrusted?!0:Ax&&e.pointerType?e.type===`click`&&e.buttons===1:e.detail===0&&!e.pointerType}function yS(e){return Fx?!1:!Ax&&e.width===0&&e.height===0||e.type===`pointerdown`&&e.width===1&&e.height===1&&e.pressure===0&&e.detail===0&&e.pointerType===`mouse`&&(Ax||e.buttons===0)||e.width<1&&e.height<1&&e.pressure===0&&e.detail===0&&e.pointerType===`touch`}function bS(e,t){let n=[`mouse`,`pen`];return t||n.push(``,void 0),n.includes(e)}function xS(e){let t=e.type;return t===`click`||t===`mousedown`||t===`keydown`||t===`keyup`}var SS=Math.min,CS=Math.max,wS=Math.round,TS=Math.floor,ES=e=>({x:e,y:e}),DS={left:`right`,right:`left`,bottom:`top`,top:`bottom`};function OS(e,t,n){return CS(e,SS(t,n))}function kS(e,t){return typeof e==`function`?e(t):e}function AS(e){return e.split(`-`)[0]}function jS(e){return e.split(`-`)[1]}function MS(e){return e===`x`?`y`:`x`}function NS(e){return e===`y`?`height`:`width`}function PS(e){let t=e[0];return t===`t`||t===`b`?`y`:`x`}function FS(e){return MS(PS(e))}function IS(e,t,n){n===void 0&&(n=!1);let r=jS(e),i=FS(e),a=NS(i),o=i===`x`?r===(n?`end`:`start`)?`right`:`left`:r===`start`?`bottom`:`top`;return t.reference[a]>t.floating[a]&&(o=GS(o)),[o,GS(o)]}function LS(e){let t=GS(e);return[RS(e),t,RS(t)]}function RS(e){return e.includes(`start`)?e.replace(`start`,`end`):e.replace(`end`,`start`)}var zS=[`left`,`right`],BS=[`right`,`left`],VS=[`top`,`bottom`],HS=[`bottom`,`top`];function US(e,t,n){switch(e){case`top`:case`bottom`:return n?t?BS:zS:t?zS:BS;case`left`:case`right`:return t?VS:HS;default:return[]}}function WS(e,t,n,r){let i=jS(e),a=US(AS(e),n===`start`,r);return i&&(a=a.map(e=>e+`-`+i),t&&(a=a.concat(a.map(RS)))),a}function GS(e){let t=AS(e);return DS[t]+e.slice(t.length)}function KS(e){return{top:e.top??0,right:e.right??0,bottom:e.bottom??0,left:e.left??0}}function qS(e){return typeof e==`number`?{top:e,right:e,bottom:e,left:e}:KS(e)}function JS(e){let{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}function YS(e,t){return t<0||t>=e.length}function XS(e,t){return $S(e.current,{disabledIndices:t})}function ZS(e,t){return $S(e.current,{decrement:!0,startingIndex:e.current.length,disabledIndices:t})}function QS(e,t,n){let{decrement:r,loopFocus:i,allowEscape:a,disabledIndices:o,minIndex:s,maxIndex:c}=n,l=()=>$S(e,{startingIndex:t,decrement:r,disabledIndices:o}),u,d=!1;if(!i)u=r?Math.max(s,l()):Math.min(c,l());else if(r?t<=s:t>=c){let n=r?-1:e.length;a&&t!==n?u=-1:(u=r?c:s,d=!0)}else u=l();return{index:YS(e,u)?-1:u,wrapped:d}}function $S(e,{startingIndex:t=-1,decrement:n=!1,disabledIndices:r,amount:i=1}={}){let a=t;do a+=n?-i:i;while(a>=0&&a<=e.length-1&&eC(e,a,r));return a}function eC(e,t,n){if(typeof n==`function`?n(t):n?.includes(t)??!1)return!0;let r=e[t];return r?!nC(r)||r.matches(`:disabled`)?!0:!n&&(r.hasAttribute(`disabled`)||r.getAttribute(`aria-disabled`)===`true`):!1}function tC(e){return e.visibility===`hidden`||e.visibility===`collapse`}function nC(e,t=e?jb(e):null){return!e||!e.isConnected||!t||tC(t)?!1:typeof e.checkVisibility==`function`?e.checkVisibility():t.display!==`none`&&t.display!==`contents`}var rC=`a[href],button,input,select,textarea,summary,details,iframe,object,embed,[tabindex],[contenteditable]:not([contenteditable="false"]),audio[controls],video[controls]`;function iC(e){let t=e.assignedSlot;if(t)return t;if(e.parentElement)return e.parentElement;let n=e.getRootNode();return yb(n)?n.host:null}function aC(e){for(let t of Array.from(e.children))if(pb(t)===`summary`)return t;return null}function oC(e,t){let n=aC(t);return!!n&&(e===n||Q(n,e))}function sC(e){let t=e?pb(e):``;return e!=null&&e.matches(rC)&&(t!==`summary`||e.parentElement!=null&&pb(e.parentElement)===`details`&&aC(e.parentElement)===e)&&(t!==`details`||aC(e)==null)&&(t!==`input`||e.type!==`hidden`)}function cC(e){if(!sC(e)||!e.isConnected||e.matches(`:disabled`))return!1;for(let t=e;t;t=iC(t)){let n=t!==e,r=pb(t)===`slot`;if(t.hasAttribute(`inert`)||n&&pb(t)===`details`&&!t.open&&!oC(e,t)||t.hasAttribute(`hidden`)||!r&&!lC(t,n))return!1}return!0}function lC(e,t){let n=jb(e);return t?n.display!==`none`:nC(e,n)}function uC(e){let t=e.tabIndex;if(t<0){let t=pb(e);if(t===`details`||t===`audio`||t===`video`||vb(e)&&e.isContentEditable)return 0}return t}function dC(e){if(pb(e)!==`input`)return null;let t=e;return t.type===`radio`&&t.name!==``?t:null}function fC(e,t){let n=dC(e);if(!n)return!0;let r=t.find(e=>{let t=dC(e);return t?.name===n.name&&t.form===n.form&&t.checked});return r?r===n:t.find(e=>{let t=dC(e);return t?.name===n.name&&t.form===n.form})===n}function pC(e){if(vb(e)&&pb(e)===`slot`){let t=e.assignedElements({flatten:!0});if(t.length>0)return t}return vb(e)&&e.shadowRoot?Array.from(e.shadowRoot.children):Array.from(e.children)}function mC(e,t){pC(e).forEach(e=>{sC(e)&&t.push(e),mC(e,t)})}function hC(e,t,n){pC(e).forEach(e=>{vb(e)&&e.matches(t)&&n.push(e),hC(e,t,n)})}function gC(e){return cC(e)&&uC(e)>=0}function _C(e){let t=[];return mC(e,t),t.filter(cC)}function vC(e){let t=_C(e);return t.filter(e=>uC(e)>=0&&fC(e,t))}function yC(e,t){let n=vC(e),r=n.length;if(r===0)return;let i=Ix(Bb(e)),a=n.indexOf(i);return n[a===-1?t===1?0:r-1:a+t]}function bC(e){return yC(Bb(e).body,1)||e}function xC(e){return yC(Bb(e).body,-1)||e}function SC(e,t,n){if(!e)return null;let r=[];mC(Bb(e).body,r);let i=r.indexOf(e);if(i===-1)return null;let a=r.filter(cC);for(let e=1;e<r.length;e+=1){let o=r[(i+t*e+r.length)%r.length];if(!Q(n,o)&&gC(o)&&fC(o,a))return o}return r[i]}function CC(e,t){let n=t||e.currentTarget,r=e.relatedTarget;return!r||!Q(n,r)}function wC(e){vC(e).forEach(e=>{e.dataset.tabindex=e.getAttribute(`tabindex`)||``,e.setAttribute(`tabindex`,`-1`)})}function TC(e){let t=[];hC(e,`[data-tabindex]`,t),t.forEach(e=>{let t=e.dataset.tabindex;delete e.dataset.tabindex,t?e.setAttribute(`tabindex`,t):e.removeAttribute(`tabindex`)})}var EC=U.createContext({disabled:!1});function DC(){return U.useContext(EC)}function OC(e,t,n){let{setFocused:r,focusOwnerRef:i}=sx(),a=q(t=>{(t?!e:i.current===a)&&(i.current=t&&a,n?.(t),r(t))});return J(()=>{let e=t.current;return e?.getRootNode()?.activeElement===e&&a(!0),()=>a(!1)},[e,t,a]),a}function kC(e,t,n,r,i=!0,a){let{registerFieldControl:o}=sx(),s=Ai(()=>Symbol());J(()=>{let c=s.current;i?o(c,{controlRef:e,getValue:r,id:t,name:a,value:n}):o(c,void 0)},[e,i,r,t,a,o,s,n]),J(()=>{let e=s.current;return()=>{o(e,void 0)}},[o,s])}function AC(e,t){let n=U.useRef(e),r=q(t);J(()=>{n.current!==e&&r(n.current),n.current=e},[e,r])}function $(e,t,n,r){let i=!1,a=!1,o=r??Ui;return{reason:e,event:t??new Event(`base-ui`),cancel(){i=!0},allowPropagation(){a=!0},get isCanceled(){return i},get isPropagationAllowed(){return a},trigger:n,...o}}function jC(e,t,n){let r=n??Ui;return{reason:e,event:t??new Event(`base-ui`),...r}}var MC=`none`,NC=`trigger-press`,PC=`trigger-hover`,FC=`trigger-focus`,IC=`outside-press`,LC=`item-press`,RC=`close-press`,zC=`focus-out`,BC=`escape-key`,VC=`list-navigation`,HC=`keyboard`,UC=`pointer`,WC=`cancel-open`,GC=`sibling-open`,KC=`disabled`,qC=`missing`,JC=`initial`,YC=`imperative-action`,XC=`window-resize`,ZC=U.forwardRef(function(e,t){let{render:n,className:r,id:i,name:a,value:o,disabled:s=!1,onValueChange:c,defaultValue:l,autoFocus:u=!1,style:d,...f}=e,{state:p,name:m,disabled:h,setTouched:g,setDirty:_,validityData:v,setFilled:y,validationMode:b,validation:x}=sx(),{clearErrors:S,elementRef:C,submitCountRef:w}=lx(),T=h||s,E=m??a,D={...p,disabled:T},{labelId:O}=_x(),k=xx({id:i}),A=o!==void 0,j=o==null?void 0:String(o),M=q(()=>x.inputRef.current?.value);kC(x.inputRef,k,j,M,!T,a),J(()=>{let e=j??x.inputRef.current?.value;e!==void 0&&y(e!==``)},[j,l,x.inputRef,y]),AC(j,()=>{j!==void 0&&(S(E),_(j!==(v.initialValue??``)),x.change(j))});let N=U.useRef(null),P=OC(T,N),F=qa();return sa(`input`,e,{ref:[t,N],state:D,props:[{id:k,disabled:T,name:E,ref:x.inputRef,"aria-labelledby":O,autoFocus:u,...A?{value:o}:{defaultValue:l},onChange(e){let t=e.currentTarget.value,n=$(MC,e.nativeEvent);c?.(t,n),!A&&(_(t!==(v.initialValue??``)),y(t!==``),!e.nativeEvent.defaultPrevented&&!n.isCanceled&&(S(E),x.change(t)))},onFocus(){P(!0)},onBlur(e){if(g(!0),P(!1),b===`onBlur`){let t=e.currentTarget.value;x.commit(t),A&&queueMicrotask(()=>{let e=x.inputRef.current?.value;e!==void 0&&e!==t&&e!==(v.initialValue??``)&&x.commit(e)})}},onKeyDown(e){if(e.currentTarget.tagName===`INPUT`&&e.key===`Enter`){g(!0);let t=e.currentTarget.value,n=e.currentTarget.form;if(n&&n===C.current&&!e.defaultPrevented){let t=e.currentTarget,n=w.current;F.start(0,()=>{w.current===n&&x.commit(t.value)})}else x.commit(t)}}},f,e=>x.getValidationProps(T,e)],stateAttributesMapping:ix})}),QC=U.forwardRef(function(e,t){return(0,G.jsx)(ZC,{ref:t,...e})});function $C({className:e,type:t,...n}){return(0,G.jsx)(QC,{type:t,"data-slot":`input`,className:K(`h-8 w-full min-w-0 rounded-md border border-input bg-transparent px-2.5 py-1 text-base transition-colors outline-none file:inline-flex file:h-6 file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:border-primary focus-visible:ring-2 focus-visible:ring-primary/20 disabled:pointer-events-none disabled:cursor-not-allowed disabled:bg-input/50 disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 md:text-[13px] dark:bg-input/30 dark:disabled:bg-input/80 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40`,e),...n})}function ew({className:e,...t}){return(0,G.jsx)(`textarea`,{"data-slot":`textarea`,className:K(`flex field-sizing-content min-h-16 w-full rounded-lg border border-input bg-transparent px-2.5 py-2 text-base transition-colors outline-none placeholder:text-muted-foreground focus-visible:border-primary focus-visible:ring-2 focus-visible:ring-primary/20 disabled:cursor-not-allowed disabled:bg-input/50 disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 md:text-sm dark:bg-input/30 dark:disabled:bg-input/80 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40`,e),...t})}function tw({className:e,...t}){return(0,G.jsx)(`div`,{"data-slot":`input-group`,role:`group`,className:K(`group/input-group relative flex h-8 w-full min-w-0 items-center rounded-lg border border-input transition-colors outline-none in-data-[slot=combobox-content]:focus-within:border-inherit in-data-[slot=combobox-content]:focus-within:ring-0 has-disabled:bg-input/50 has-disabled:opacity-50 has-[[data-slot=input-group-control]:focus-visible]:border-ring has-[[data-slot=input-group-control]:focus-visible]:ring-3 has-[[data-slot=input-group-control]:focus-visible]:ring-ring/50 has-[[data-slot][aria-invalid=true]]:border-destructive has-[[data-slot][aria-invalid=true]]:ring-3 has-[[data-slot][aria-invalid=true]]:ring-destructive/20 has-[>[data-align=block-end]]:h-auto has-[>[data-align=block-end]]:flex-col has-[>[data-align=block-start]]:h-auto has-[>[data-align=block-start]]:flex-col has-[>textarea]:h-auto dark:bg-input/30 dark:has-disabled:bg-input/80 dark:has-[[data-slot][aria-invalid=true]]:ring-destructive/40 has-[>[data-align=block-end]]:[&>input]:pt-3 has-[>[data-align=block-start]]:[&>input]:pb-3 has-[>[data-align=inline-end]]:[&>input]:pr-1.5 has-[>[data-align=inline-start]]:[&>input]:pl-1.5`,e),...t})}var nw=Xb(`flex h-auto cursor-text items-center justify-center gap-2 py-1.5 text-sm font-medium text-muted-foreground select-none group-data-[disabled=true]/input-group:opacity-50 [&>kbd]:rounded-[calc(var(--radius)-5px)] [&>svg:not([class*='size-'])]:size-4`,{variants:{align:{"inline-start":`order-first pl-2 has-[>button]:ml-[-0.3rem] has-[>kbd]:ml-[-0.15rem]`,"inline-end":`order-last pr-2 has-[>button]:mr-[-0.3rem] has-[>kbd]:mr-[-0.15rem]`,"block-start":`order-first w-full justify-start px-2.5 pt-2 group-has-[>input]/input-group:pt-2 [.border-b]:pb-2`,"block-end":`order-last w-full justify-start px-2.5 pb-2 group-has-[>input]/input-group:pb-2 [.border-t]:pt-2`}},defaultVariants:{align:`inline-start`}});function rw({className:e,align:t=`inline-start`,...n}){return(0,G.jsx)(`div`,{role:`group`,"data-slot":`input-group-addon`,"data-align":t,className:K(nw({align:t}),e),onClick:e=>{e.target instanceof Element&&e.target.closest(`button`)||e.currentTarget.parentElement?.querySelector(`input`)?.focus()},...n})}var iw=Xb(`flex items-center gap-2 text-sm shadow-none`,{variants:{size:{xs:`h-6 gap-1 rounded-[calc(var(--radius)-3px)] px-1.5 [&>svg:not([class*='size-'])]:size-3.5`,sm:``,"icon-xs":`size-6 rounded-[calc(var(--radius)-3px)] p-0 has-[>svg]:p-0`,"icon-sm":`size-8 p-0 has-[>svg]:p-0`}},defaultVariants:{size:`xs`}});function aw({className:e,type:t=`button`,variant:n=`ghost`,size:r=`xs`,...i}){return(0,G.jsx)($b,{type:t,"data-size":r,variant:n,className:K(iw({size:r}),e),...i})}function ow({className:e,...t}){return(0,G.jsx)($C,{"data-slot":`input-group-control`,className:K(`flex-1 rounded-none border-0 bg-transparent shadow-none ring-0 focus-visible:ring-0 disabled:bg-transparent aria-invalid:ring-0 dark:bg-transparent dark:disabled:bg-transparent`,e),...t})}function sw({className:e,...t}){return(0,G.jsx)(ew,{"data-slot":`input-group-control`,className:K(`flex-1 resize-none rounded-none border-0 bg-transparent py-2 shadow-none ring-0 focus-visible:ring-0 disabled:bg-transparent aria-invalid:ring-0 dark:bg-transparent dark:disabled:bg-transparent`,e),...t})}function cw({className:e,...t}){return(0,G.jsx)(`label`,{"data-slot":`label`,className:K(`flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50`,e),...t})}var lw=U.forwardRef(function(e,t){let{className:n,render:r,orientation:i=`horizontal`,style:a,...o}=e;return sa(`div`,e,{state:{orientation:i},ref:t,props:[{role:`separator`,"aria-orientation":i},o]})});function uw({className:e,orientation:t=`horizontal`,...n}){return(0,G.jsx)(lw,{"data-slot":`separator`,orientation:t,className:K(`shrink-0 bg-border data-horizontal:h-px data-horizontal:w-full data-vertical:w-px data-vertical:self-stretch`,e),...n})}function dw({className:e,...t}){return(0,G.jsx)(`fieldset`,{"data-slot":`field-set`,className:K(`flex flex-col gap-4 has-[>[data-slot=checkbox-group]]:gap-3 has-[>[data-slot=radio-group]]:gap-3`,e),...t})}function fw({className:e,variant:t=`legend`,...n}){return(0,G.jsx)(`legend`,{"data-slot":`field-legend`,"data-variant":t,className:K(`mb-1.5 font-medium data-[variant=label]:text-sm data-[variant=legend]:text-base`,e),...n})}var pw=Xb(`group/field flex w-full gap-2 data-[invalid=true]:text-destructive`,{variants:{orientation:{vertical:`flex-col *:w-full [&>.sr-only]:w-auto`,horizontal:`flex-row items-center has-[>[data-slot=field-content]]:items-start *:data-[slot=field-label]:flex-auto has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px`,responsive:`flex-col *:w-full @md/field-group:flex-row @md/field-group:items-center @md/field-group:*:w-auto @md/field-group:has-[>[data-slot=field-content]]:items-start @md/field-group:*:data-[slot=field-label]:flex-auto [&>.sr-only]:w-auto @md/field-group:has-[>[data-slot=field-content]]:[&>[role=checkbox],[role=radio]]:mt-px`}},defaultVariants:{orientation:`vertical`}});function mw({className:e,orientation:t=`vertical`,...n}){return(0,G.jsx)(`div`,{role:`group`,"data-slot":`field`,"data-orientation":t,className:K(pw({orientation:t}),e),...n})}function hw({className:e,...t}){return(0,G.jsx)(`div`,{"data-slot":`field-content`,className:K(`group/field-content flex flex-1 flex-col gap-0.5 leading-snug`,e),...t})}function gw({className:e,...t}){return(0,G.jsx)(cw,{"data-slot":`field-label`,className:K(`group/field-label peer/field-label flex w-fit gap-2 leading-snug group-data-[disabled=true]/field:opacity-50 has-data-checked:border-primary/30 has-data-checked:bg-primary/5 has-[>[data-slot=field]]:rounded-lg has-[>[data-slot=field]]:border has-[>[data-slot=field]]:not-has-[:disabled,[data-disabled]]:hover:bg-muted/50 has-[>[data-slot=field]]:has-[:focus-visible]:border-ring has-[>[data-slot=field]]:has-[:focus-visible]:ring-3 has-[>[data-slot=field]]:has-[:focus-visible]:ring-ring/50 *:data-[slot=field]:p-2.5 dark:has-data-checked:border-primary/20 dark:has-data-checked:bg-primary/10`,`has-[>[data-slot=field]]:w-full has-[>[data-slot=field]]:flex-col`,e),...t})}function _w({className:e,...t}){return(0,G.jsx)(`p`,{"data-slot":`field-description`,className:K(`text-left text-sm leading-normal font-normal text-muted-foreground group-has-data-horizontal/field:text-balance [[data-variant=legend]+&]:-mt-1.5`,`last:mt-0 nth-last-2:-mt-1`,`[&>a]:underline [&>a]:underline-offset-4 [&>a:hover]:text-primary`,e),...t})}function vw({className:e,children:t,errors:n,...r}){let i=(0,U.useMemo)(()=>{if(t)return t;if(!n?.length)return null;let e=[...new Map(n.map(e=>[e?.message,e])).values()];return e?.length==1?e[0]?.message:(0,G.jsx)(`ul`,{className:`ml-4 flex list-disc flex-col gap-1`,children:e.map((e,t)=>e?.message&&(0,G.jsx)(`li`,{children:e.message},t))})},[t,n]);return i?(0,G.jsx)(`div`,{role:`alert`,"data-slot":`field-error`,className:K(`text-sm font-normal text-destructive`,e),...r,children:i}):null}function yw({controlled:e,default:t,name:n,state:r=`value`}){let{current:i}=U.useRef(e!==void 0),[a,o]=U.useState(()=>t);return[i&&e!==void 0?e:a,U.useCallback(e=>{i||o(e)},[])]}var bw={clipPath:`inset(50%)`,overflow:`hidden`,whiteSpace:`nowrap`,border:0,padding:0,width:1,height:1,margin:-1},xw={...bw,position:`fixed`,margin:0,top:0,left:0},Sw={...bw,position:`absolute`};function Cw(e){if(!e)return null;for(let t of e.elements){let e=t.tagName;if(e===`BUTTON`||e===`INPUT`){let e=t;if(e.type===`submit`)return e}}return null}var ww=`data-checked`,Tw=`data-unchecked`;function Ew(e){return{checked(t){return e.indeterminate?{}:t?{[ww]:``}:{[Tw]:``}},...ix}}var Dw=U.createContext(void 0);function Ow(){return U.useContext(Dw)}var kw=U.createContext(void 0);function Aw(){let e=U.useContext(kw);if(e===void 0)throw Error(ha(14));return e}var jw=`data-parent`,Mw=U.forwardRef(function(e,t){let{checked:n,className:r,defaultChecked:i=!1,"aria-labelledby":a,disabled:o=!1,form:s,id:c,indeterminate:l=!1,inputRef:u,name:d,onCheckedChange:f,parent:p=!1,readOnly:m=!1,render:h,required:g=!1,uncheckedValue:_,value:v,nativeButton:y=!1,style:b,...x}=e,{clearErrors:S}=lx(),{disabled:C,name:w,setDirty:T,setFilled:E,setTouched:D,state:O,validationMode:k,validityData:A,validation:j}=sx(),M=DC(),{labelId:N,registerControlId:P,getDescriptionProps:F}=_x(),I=Ow(),L=I?.allValues===void 0?void 0:I.parent,R=L!==void 0,z=C||M.disabled||I?.disabled||o,B=w??d,ee=v??B,V=hx(),te=I?.registerControlId!==P,ne=xx({id:c||void 0,enabled:te}),H=y?ne:V,re={};R&&(p?re=L.getParentProps():ee!==void 0&&(re=L.getChildProps(ee)));let{checked:ie=n,indeterminate:ae=l,onCheckedChange:oe,...se}=re,ce=I?.value,le=U.useRef(null),ue=OC(z,le),{getButtonProps:de,buttonRef:fe}=Hb({disabled:z,native:y}),pe=I?.validation??j,[W,me]=yw({controlled:ee!==void 0&&ce!==void 0&&!p?ce.includes(ee):ie,default:i,name:`Checkbox`,state:`checked`}),he=R?!!ie:W,ge=R&&ae||l;kC(le,V,W,void 0,!I&&!z,d);let _e=L?.registerChildId,ve=U.useRef(null),ye=pe.registerInput,be=I?ee:void 0,xe=U.useCallback(e=>ye(e,{controlRef:le,value:be}),[ye,be]),Se=ji(u,ve,p?void 0:xe),Ce=vx(a,N,ve,!y,ne,x[`aria-label`]);J(()=>{ve.current&&(ve.current.indeterminate=ge),I||E(W)},[W,ge,I,E]),AC(W,()=>{I||(S(B),T(W!==A.initialValue),pe.change(W))});let we=Ji({checked:W,disabled:z,form:s,name:p?void 0:B,id:y?void 0:ne,required:g,ref:Se,style:B?Sw:xw,tabIndex:-1,type:`checkbox`,"aria-hidden":!0,onChange(e){if(e.nativeEvent.defaultPrevented)return;if(m){e.preventDefault();return}let t=e.currentTarget.checked,n=$(MC,e.nativeEvent);if(f?.(t,n),!n.isCanceled&&(oe?.(t,n),!n.isCanceled&&(me(t),ee!==void 0&&I!==void 0&&!p&&!R))){let e=t?[...I.value,ee]:I.value.filter(e=>e!==ee);I.setValue(e,n)}},onClick(e){e.stopPropagation()},onFocus(){le.current?.focus()}},v===void 0?Ui:{value:(I?W&&v:v)||``},F,e=>pe.getValidationProps(z,e));U.useEffect(()=>{if(!L||ee===void 0)return;let e=L.disabledStatesRef.current;return e.set(ee,z),()=>{e.delete(ee)}},[L,z,ee]);let Te=U.useMemo(()=>({...O,checked:he,disabled:z,readOnly:m,required:g,indeterminate:ge}),[O,he,z,m,g,ge]),Ee=Ew(Te),De=sa(`span`,e,{state:Te,ref:[fe,le,t],props:[{id:H,role:`checkbox`,"aria-checked":ge?`mixed`:he,"aria-readonly":m||void 0,"aria-required":g||void 0,"aria-labelledby":Ce,[jw]:p?``:void 0,onFocus(){ue(!0)},onBlur(){let e=ve.current;e&&(D(!0),ue(!1),k===`onBlur`&&pe.commit(I?ce:e.checked))},onKeyDown(e){if(e.key!==`Enter`||(e.preventBaseUIHandler(),e.defaultPrevented))return;let t=ve.current?.form??null,n=e.currentTarget,r=e.nativeEvent,i=e.preventDefault,a=r.preventDefault,o=!1;e.preventDefault=()=>{o=!0,i.call(e)},r.preventDefault=()=>{o=!0,a.call(r)},a.call(r),mb(n).queueMicrotask(()=>{e.preventDefault=i,r.preventDefault=a,o||Cw(t)?.click()})},onClick(e){if(m||z)return;e.preventDefault();let t=ve.current;t&&Vb(t,e)}},x,se,de,F,e=>pe.getValidationProps(z,e)],stateAttributesMapping:Ee}),Oe=De.props.id;return J(()=>{if(_e&&!p&&ee!==void 0&&Oe!==void 0)return _e(ee,Oe)},[_e,p,ee,Oe]),(0,G.jsxs)(kw.Provider,{value:Te,children:[De,!W&&!I&&B&&!p&&_!==void 0&&(0,G.jsx)(`input`,{type:`hidden`,form:s,name:B,value:_,disabled:z}),(0,G.jsx)(`input`,{...we,suppressHydrationWarning:!0})]})}),Nw=U.forwardRef(function(e,t){let{render:n,className:r,style:i,keepMounted:a=!1,...o}=e,s=Aw(),c=s.checked||s.indeterminate,{mounted:l,transitionStatus:u,setMounted:d}=Va(c),f=U.useRef(null),p={...s,transitionStatus:u};La({batch:!0,enabled:!c,open:c,ref:f,onComplete(){c||d(!1)}});let m={...Ew(s),...Ba},h=a||l,g=sa(`span`,e,{ref:[t,f],state:p,stateAttributesMapping:m,props:o});return h?g:null});function Pw({className:e,...t}){return(0,G.jsx)(Mw,{"data-slot":`checkbox`,className:K(`peer relative flex size-4 shrink-0 items-center justify-center rounded-[4px] border border-input transition-colors outline-none group-has-disabled/field:opacity-50 group-has-[:focus-visible]/field-label:ring-0 group-has-[:focus-visible]/field-label:not-data-checked:border-input after:absolute after:-inset-x-3 after:-inset-y-2 focus-visible:border-transparent focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 aria-invalid:aria-checked:border-primary dark:bg-input/30 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 data-checked:border-primary data-checked:bg-primary data-checked:text-primary-foreground group-has-[:focus-visible]/field-label:data-checked:border-primary dark:data-checked:bg-primary`,e),...t,children:(0,G.jsx)(Nw,{"data-slot":`checkbox-indicator`,className:`grid place-content-center text-current transition-none data-checked:animate-in data-checked:zoom-in-50 data-checked:duration-150 motion-reduce:animate-none [&>svg]:size-3.5`,children:t.indeterminate?(0,G.jsx)(Un,{}):(0,G.jsx)(dn,{})})})}function Fw({className:e,...t}){return(0,G.jsx)(`kbd`,{"data-slot":`kbd`,className:K(`pointer-events-none inline-flex h-5 w-fit min-w-5 items-center justify-center gap-1 rounded-[5px] border border-border bg-background px-1.5 font-sans text-[11px] font-medium text-muted-foreground shadow-[inset_0_-1.5px_0_var(--border)] select-none dark:bg-muted/40 [&_svg:not([class*='size-'])]:size-3`,e),...t})}function Iw({className:e,...t}){return(0,G.jsx)(`kbd`,{"data-slot":`kbd-group`,className:K(`inline-flex items-center gap-1`,e),...t})}function Lw(e){let t=U.useRef(!0);t.current&&(t.current=!1,e())}function Rw(e){let[t,n]=U.useState({current:e,previous:null});return Object.is(e,t.current)||n({current:e,previous:t.current}),t.previous}function zw(e){return e==null||e.hasAttribute(`disabled`)||e.getAttribute(`aria-disabled`)===`true`}function Bw(e){let t=Ai(Vw,e).current;return t.next=e,J(t.effect),t}function Vw(e){let t={current:e,next:e,effect:()=>{t.current=t.next}};return t}var Hw=[],Uw=void 0;function Ww(){return Uw}function Gw(e){Hw.push(e)}function Kw(e){let t=(t,n)=>{let r=Ai(Jw).current,i;try{Uw=r;for(let e of Hw)e.before(r);i=e(t,n);for(let e of Hw)e.after(r);r.didInitialize=!0}finally{Uw=void 0}return i};return t.displayName=e.displayName||e.name,t}function qw(e){return U.forwardRef(Kw(e))}function Jw(){return{didInitialize:!1}}var Yw=Ri(19)?Qw:$w;function Xw(e,t,n,r,i){return Yw(e,t,n,r,i)}function Zw(e,t,n,r,i){let a=U.useCallback(()=>t(e.getSnapshot(),n,r,i),[e,t,n,r,i]);return(0,ou.useSyncExternalStore)(e.subscribe,a,a)}Gw({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){let r=e.syncHooks[n],i=r.selector(r.store.state,r.a1,r.a2,r.a3);Object.is(r.value,i)||(t=!0,r.value=i)}return t&&(e.syncTick+=1),e.syncTick})},after(e){e.syncHooks.length>0&&(e.didChangeStore&&(e.didChangeStore=!1,e.subscribe=t=>{let n=new Set;for(let t of e.syncHooks)n.add(t.store);let r=[];for(let e of n)r.push(e.subscribe(t));return()=>{for(let e of r)e()}}),(0,ou.useSyncExternalStore)(e.subscribe,e.getSnapshot,e.getSnapshot))}});function Qw(e,t,n,r,i){let a=Ww();if(!a)return Zw(e,t,n,r,i);let o=a.syncIndex;a.syncIndex+=1;let s;return a.didInitialize?(s=a.syncHooks[o],(s.store!==e||s.selector!==t||!Object.is(s.a1,n)||!Object.is(s.a2,r)||!Object.is(s.a3,i))&&(s.store!==e&&(a.didChangeStore=!0),s.store=e,s.selector=t,s.a1=n,s.a2=r,s.a3=i,s.value=t(e.getSnapshot(),n,r,i))):(s={store:e,selector:t,a1:n,a2:r,a3:i,value:t(e.getSnapshot(),n,r,i)},a.syncHooks.push(s)),s.value}function $w(e,t,n,r,i){return(0,su.useSyncExternalStoreWithSelector)(e.subscribe,e.getSnapshot,e.getSnapshot,e=>t(e,n,r,i))}var eT=class{static create(e){return new this(e)}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;let t=this.updateTick;for(let n of this.listeners){if(t!==this.updateTick)return;n(e)}}update(e){for(let t in e)if(!Object.is(this.state[t],e[t])){this.setState({...this.state,...e});return}}set(e,t){Object.is(this.state[e],t)||this.setState({...this.state,[e]:t})}notifyAll(){let e={...this.state};this.setState(e)}use(e,t,n,r){return Xw(this,e,t,n,r)}},tT=class extends eT{constructor(e,t={},n){super(e),this.context=t,this.selectors=n}useSyncedValue(e,t){U.useDebugValue(e);let n=this;J(()=>{n.state[e]!==t&&n.set(e,t)},[n,e,t])}useSyncedValueWithCleanup(e,t){let n=this;J(()=>(n.state[e]!==t&&n.set(e,t),()=>{n.set(e,void 0)}),[n,e,t])}useSyncedValues(e){let t=this;J(()=>{t.update(e)},[t,...Object.values(e)])}useControlledProp(e,t){U.useDebugValue(e);let n=this,r=t!==void 0;J(()=>{r&&!Object.is(n.state[e],t)&&n.setState({...n.state,[e]:t})},[n,e,t,r])}select(e,t,n,r){let i=this.selectors[e];return i(this.state,t,n,r)}useState(e,t,n,r){return U.useDebugValue(e),Xw(this,this.selectors[e],t,n,r)}useContextCallback(e,t){U.useDebugValue(e);let n=q(t??Vi);this.context[e]=n}useStateSetter(e){let t=U.useRef(void 0);return t.current===void 0&&(t.current=t=>{this.set(e,t)}),t.current}observe(e,t){let n;n=typeof e==`function`?e:this.selectors[e];let r=n(this.state);return t(r,r,this),this.subscribe(e=>{let i=n(e);if(!Object.is(r,i)){let e=r;r=i,t(i,e,this)}})}};function nT(...e){return()=>{for(let t=0;t<e.length;t+=1){let n=e[t];n&&n()}}}function rT(e,t,n,r){return e.addEventListener(t,n,r),()=>{e.removeEventListener(t,n,r)}}function iT(e,t){return t!=null&&!bS(t)?0:typeof e==`function`?e():e}function aT(e,t,n){let r=iT(e,n);return typeof r==`number`?r:r?.[t]}function oT(e){return typeof e==`function`?e():e}function sT(e,t){return t||e===`click`||e===`mousedown`}function cT(e){return e?.includes(`mouse`)&&e!==`mousedown`}var lT=U.createContext({hasProvider:!1,timeoutMs:0,delayRef:{current:0},initialDelayRef:{current:0},timeout:new Ka,currentIdRef:{current:null},currentContextRef:{current:null}});function uT(e,t){e.current=t.current}function dT(e){let{children:t,delay:n,timeoutMs:r=0}=e,i=U.useRef(n),a=U.useRef(n),o=U.useRef(null),s=U.useRef(null),c=qa();return J(()=>{a.current=n,o.current?i.current={open:aT(i.current,`open`),close:aT(n,`close`)}:i.current=n},[n,o,i,a]),(0,G.jsx)(lT.Provider,{value:U.useMemo(()=>({hasProvider:!0,delayRef:i,initialDelayRef:a,currentIdRef:o,timeoutMs:r,currentContextRef:s,timeout:c}),[r,c]),children:t})}function fT(e,t={open:!1}){let{open:n}=t,r=e.useState(`floatingId`),{currentIdRef:i,delayRef:a,timeoutMs:o,initialDelayRef:s,currentContextRef:c,hasProvider:l,timeout:u}=U.useContext(lT),[d,f]=U.useState(!1),p=U.useRef(n);return J(()=>{p.current=n},[n]),J(()=>{function t(){c.current?.setIsInstantPhase(!1),i.current=null,c.current=null,a.current=s.current,u.clear()}if(i.current&&!n&&i.current===r){if(f(!1),o){let n=r;return u.start(o,()=>{e.select(`open`)||i.current&&i.current!==n||t()}),()=>{(p.current||i.current!==n)&&u.clear()}}t()}},[n,r,i,a,o,s,c,u,e]),J(()=>{if(!n)return;let t=c.current,o=i.current;u.clear(),c.current={onOpenChange:e.setOpen,setIsInstantPhase:f},i.current=r,a.current={open:0,close:aT(s.current,`close`)},o!==null&&o!==r?(f(!0),t?.setIsInstantPhase(!0),t?.onOpenChange(!1,$(MC))):(f(!1),t?.setIsInstantPhase(!1))},[n,r,e,i,a,s,c,u]),J(()=>()=>{if(i.current===r){if(c.current=null,!p.current)return;i.current=null,uT(a,s),u.clear()}},[c,i,a,r,s,u]),U.useMemo(()=>({activeIdRef:i,hasProvider:l,delayRef:a,isInstantPhase:d}),[i,l,a,d])}var pT=U.forwardRef(function(e,t){let[n,r]=U.useState();J(()=>{Px&&Nx&&r(`button`)},[]);let i={tabIndex:0,role:n};return(0,G.jsx)(`span`,{...e,ref:t,style:xw,"aria-hidden":!n||void 0,...i,"data-base-ui-focus-guard":``})});function mT(e){return`data-base-ui-${e}`}var hT=0;function gT(e,t={}){let{preventScroll:n=!1,sync:r=!1,shouldFocus:i}=t;cancelAnimationFrame(hT);function a(){(!i||i())&&e?.focus({preventScroll:n})}if(r)return a(),Vi;let o=requestAnimationFrame(a);return hT=o,()=>{hT===o&&(cancelAnimationFrame(o),hT=0)}}var _T=`data-base-ui-inert`,vT=new WeakMap,yT=new WeakSet,bT=new WeakMap,xT=0;function ST(e){return e?yb(e)?e.host:ST(e.parentNode):null}var CT=(e,t)=>t.map(t=>{if(e.contains(t))return t;let n=ST(t);return e.contains(n)?n:null}).filter(e=>e!=null),wT=e=>{let t=new Set;return e.forEach(e=>{let n=e;for(;n&&!t.has(n);)t.add(n),n=n.parentNode}),t},TT=(e,t,n)=>{let r=[],i=e=>{e&&!n.has(e)&&Array.from(e.children).forEach(e=>{pb(e)!==`script`&&(t.has(e)?i(e):r.push(e))})};return i(e),r};function ET(e,t,n,{mark:r=!0}){let i=CT(t,e),a=r?TT(t,wT(i),new Set(i)):[],o=[],s=[];if(n){let e=CT(t,Array.from(t.querySelectorAll(`[aria-live]`))),n=i.concat(e);TT(t,wT(n),new Set(n)).forEach(e=>{let t=e.getAttribute(`aria-hidden`),n=t!==null&&t!==`false`,r=(vT.get(e)||0)+1;vT.set(e,r),o.push(e),r===1&&n&&yT.add(e),n||e.setAttribute(`aria-hidden`,`true`)})}return r&&a.forEach(e=>{let t=(bT.get(e)||0)+1;bT.set(e,t),s.push(e),t===1&&e.setAttribute(_T,``)}),xT+=1,()=>{o.forEach(e=>{let t=(vT.get(e)||0)-1;vT.set(e,t),t||(yT.has(e)||e.removeAttribute(`aria-hidden`),yT.delete(e))}),r&&s.forEach(e=>{let t=(bT.get(e)||0)-1;bT.set(e,t),t||e.removeAttribute(_T)}),--xT,xT||(vT=new WeakMap,yT=new WeakSet,bT=new WeakMap)}}function DT(e,t={}){let{ariaHidden:n=!1,mark:r=!0}=t,i=Bb(e[0]).body;return ET(e,i,n,{mark:r})}var OT={style:{transition:`none`}},kT=`data-base-ui-click-trigger`,AT={fallbackAxisSide:`none`},jT={fallbackAxisSide:`end`},MT={clipPath:`inset(50%)`,position:`fixed`,top:0,left:0},NT=U.createContext(null),PT=()=>U.useContext(NT),FT=mT(`portal`);function IT(e={}){let{ref:t,container:n,componentProps:r=Ui,elementProps:i}=e,a=mx(),o=PT()?.portalNode,[s,c]=U.useState(null),[l,u]=U.useState(null),d=q(e=>{e!==null&&u(e)}),f=U.useRef(null);J(()=>{if(n===null){f.current&&(f.current=null,u(null),c(null));return}let e=(n&&(gb(n)?n:n.current))??o??document.body;e==null?f.current&&(f.current=null,u(null),c(null)):f.current!==e&&(f.current=e,u(null),c(e))},[n,o]);let p=sa(`div`,r,{ref:[t,d],props:[{id:a,[FT]:``},i]}),m=s&&p?W.createPortal(p,s):null;return{node:l,nodeId:U.isValidElement(p)?p.props.id:void 0,subtree:m}}var LT=U.forwardRef(function(e,t){let{render:n,className:r,style:i,children:a,container:o,portalOwnerRole:s,...c}=e,{node:l,nodeId:u,subtree:d}=IT({container:o,ref:t,componentProps:e,elementProps:c}),f=U.useRef(null),p=U.useRef(null),m=U.useRef(null),h=U.useRef(null),[g,_]=U.useState(null),v=U.useRef(!1),y=g?.modal,b=g?.open,x=!!g&&!g.modal&&g.open&&!!l;U.useEffect(()=>{if(!l||y)return;function e(e){l&&e.relatedTarget&&CC(e)&&(e.type===`focusin`?v.current&&=(TC(l),!1):(wC(l),v.current=!0))}return nT(rT(l,`focusin`,e,!0),rT(l,`focusout`,e,!0))},[l,y]),J(()=>{l&&b===!0&&v.current&&(TC(l),v.current=!1)},[b,l]);let S=U.useMemo(()=>({beforeOutsideRef:f,afterOutsideRef:p,beforeInsideRef:m,afterInsideRef:h,portalNode:l,setFocusManagerState:_}),[l]);return(0,G.jsxs)(U.Fragment,{children:[d,(0,G.jsxs)(NT.Provider,{value:S,children:[x&&l&&(0,G.jsx)(pT,{"data-type":`outside`,ref:f,onFocus:e=>{CC(e,l)?m.current?.focus():xC(g?g.domReference:null)?.focus()}}),x&&l&&(0,G.jsx)(`span`,{role:s,"aria-owns":u,style:MT}),l&&W.createPortal(a,l),x&&l&&(0,G.jsx)(pT,{"data-type":`outside`,ref:p,onFocus:e=>{CC(e,l)?h.current?.focus():(bC(g?g.domReference:null)?.focus(),g?.closeOnFocusOut&&g?.onOpenChange(!1,$(`focus-out`,e.nativeEvent)))}})]})]})});function RT(){let 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 zT=class{nodesRef={current:[]};events=RT();addNode(e){this.nodesRef.current.push(e)}removeNode(e){let t=this.nodesRef.current.findIndex(t=>t===e);t!==-1&&this.nodesRef.current.splice(t,1)}},BT=U.createContext(null),VT=U.createContext(null),HT=()=>U.useContext(BT)?.id||null,UT=e=>{let t=U.useContext(VT);return e??t};function WT(e){let t=mx(),n=UT(e),r=HT();return J(()=>{if(!t)return;let e={id:t,parentId:r};return n?.addNode(e),()=>{n?.removeNode(e)}},[n,t,r]),t}function GT(e){let{children:t,id:n}=e,r=HT();return(0,G.jsx)(BT.Provider,{value:U.useMemo(()=>({id:n,parentId:r}),[n,r]),children:t})}function KT(e){let{children:t,externalTree:n}=e,r=Ai(()=>n??new zT).current;return(0,G.jsx)(VT.Provider,{value:r,children:t})}function qT(e,t){let n=mb(Rx(e));return e instanceof n.KeyboardEvent?`keyboard`:e instanceof n.FocusEvent?t||`keyboard`:`pointerType`in e?e.pointerType||(vS(e)?`keyboard`:t||`mouse`):`touches`in e?`touch`:e instanceof n.MouseEvent?t||(e.detail===0?`keyboard`:`mouse`):``}var JT=20,YT=[];function XT(){YT=YT.filter(e=>e.deref()?.isConnected)}function ZT(e){XT(),e&&pb(e)!==`body`&&(YT.push(new WeakRef(e)),YT.length>JT&&(YT=YT.slice(-20)))}function QT(){return XT(),YT[YT.length-1]?.deref()}function $T(e){return e?gC(e)?e:vC(e)[0]||e:null}function eE(e){if(e.hasAttribute(`tabindex`)&&!e.hasAttribute(`data-tabindex`)||!e.getAttribute(`role`)?.includes(`dialog`))return;let t=_C(e).filter(e=>{let t=e.getAttribute(`data-tabindex`)||``;return gC(e)||e.hasAttribute(`data-tabindex`)&&!t.startsWith(`-`)}),n=e.getAttribute(`tabindex`);t.length===0?n!==`0`&&(e.setAttribute(`tabindex`,`0`),e.setAttribute(`data-tabindex`,`0`)):(n!==`-1`||e.hasAttribute(`data-tabindex`)&&e.getAttribute(`data-tabindex`)!==`-1`)&&(e.setAttribute(`tabindex`,`-1`),e.setAttribute(`data-tabindex`,`-1`))}function tE(e){let{context:t,children:n,disabled:r=!1,initialFocus:i=!0,returnFocus:a=!0,explicitReturnFocus:o,restoreFocus:s=!1,modal:c=!0,closeOnFocusOut:l=!0,openInteractionType:u=``,nextFocusableElement:d,previousFocusableElement:f,beforeContentFocusGuardRef:p,externalTree:m,getInsideElements:h}=e,g=t.useState(`open`),_=t.useState(`domReferenceElement`),v=t.useState(`floatingElement`),{events:y,dataRef:b}=t.context,x=q(()=>b.current.floatingContext?.nodeId),S=i===!1,C=dS(_)&&S,w=Bw(i),T=Bw(a),E=Bw(o),D=Bw(u),O=Bw(g),k=UT(m),A=PT(),j=U.useRef(!1),M=U.useRef(!1),N=U.useRef(!1),P=U.useRef(null),F=U.useRef(``),I=U.useRef(``),L=U.useRef(null),R=U.useRef(null),z=ji(L,p,A?.beforeInsideRef),B=ji(R,A?.afterInsideRef),ee=qa(),V=qa(),te=ka(),ne=A!=null,H=pS(v),re=q((e=H)=>e?vC(e):[]),ie=q(()=>h?.().filter(e=>e!=null)??[]);U.useEffect(()=>{if(r||!c)return;function e(e){e.key===`Tab`&&Q(H,Ix(Bb(H)))&&re().length===0&&!C&&gS(e)}return rT(Bb(H),`keydown`,e)},[r,H,c,C,re]),U.useEffect(()=>{if(r||!g)return;let e=Bb(H);function t(){N.current=!1}function n(e){let t=Rx(e),n=ie(),r=Q(v,t)||Q(_,t)||Q(A?.portalNode,t)||n.some(e=>e===t||Q(e,t));N.current=!r,I.current=e.pointerType||`keyboard`,Lx(t,`[data-base-ui-click-trigger]`)&&(M.current=!0,V.start(0,()=>{M.current=!1}))}function i(){I.current=`keyboard`}return nT(rT(e,`pointerdown`,n,!0),rT(e,`pointerup`,t,!0),rT(e,`pointercancel`,t,!0),rT(e,`keydown`,i,!0),t)},[r,v,_,H,g,A,V,ie]),U.useEffect(()=>{if(r||!l)return;let e=Bb(H);function n(){M.current=!0,V.start(0,()=>{M.current=!1})}function i(e){let t=Rx(e);gC(t)&&(P.current=t)}function a(n){let r=n.relatedTarget,i=n.currentTarget,a=Rx(n);c&&r==null&&a!=null&&Q(v,a)&&ZT(a),queueMicrotask(()=>{let o=x(),l=t.context.triggerElements,u=ie(),p=r?.hasAttribute(mT(`focus-guard`))&&[L.current,R.current,A?.beforeInsideRef.current,A?.afterInsideRef.current,A?.beforeOutsideRef.current,A?.afterOutsideRef.current,Aa(f),Aa(d)].includes(r),m=!(Q(_,r)||Q(v,r)||Q(r,v)||Q(A?.portalNode,r)||u.some(e=>e===r||Q(e,r))||l.hasMatchingElement(e=>Q(e,r))||p||k&&(mS(k.nodesRef.current,o).find(e=>Q(e.context?.elements.floating,r)||Q(e.context?.elements.domReference,r))||hS(k.nodesRef.current,o).find(e=>[e.context?.elements.floating,pS(e.context?.elements.floating)].includes(r)||e.context?.elements.domReference===r)));if(i===_&&H&&eE(H),s&&i!==_&&!nC(a)&&Ix(e)===e.body){if(vb(H)&&(H.focus(),s===`popup`)){te.request(()=>{H.focus()});return}let e=re(),t=P.current,n=(t&&e.includes(t)?t:null)||e[e.length-1]||H;vb(n)&&n.focus()}b.current.insideReactTree?b.current.insideReactTree=!1:(C||!c)&&r&&m&&!M.current&&(C||r!==QT())&&(j.current=!0,t.setOpen(!1,$(zC,n)))})}function o(){N.current||(b.current.insideReactTree=!0,ee.start(0,()=>{b.current.insideReactTree=!1}))}let u=vb(_)?_:null;if(v||u)return nT(u&&rT(u,`focusout`,a),u&&rT(u,`pointerdown`,n),v&&rT(v,`focusin`,i),v&&rT(v,`focusout`,a),v&&A&&rT(v,`focusout`,o,!0))},[r,_,v,H,c,k,A,t,l,s,re,C,x,b,ee,V,te,d,f,ie]),U.useEffect(()=>{if(r||!v||!g)return;let e=Array.from(A?.portalNode?.querySelectorAll(`[${mT(`portal`)}]`)||[]),t=(k?hS(k.nodesRef.current,x()):[]).find(e=>dS(e.context?.elements.domReference||null))?.context?.elements.domReference,n=DT([v,...e,L.current,R.current,A?.beforeOutsideRef.current,A?.afterOutsideRef.current,...ie(),t,Aa(f),Aa(d),C?_:null].filter(e=>e!=null),{ariaHidden:c||C,mark:!1}),i=DT([v,...e].filter(e=>e!=null));return()=>{i(),n()}},[g,r,_,v,c,A,C,k,x,d,f,ie]),J(()=>{if(!g||r||!vb(H))return;F.current=``,I.current=``;let e=Bb(H),t=Ix(e);queueMicrotask(()=>{let n=w.current,r=typeof n==`function`?n(D.current||``):n;if(r===void 0||r===!1||Q(H,t))return;let i=null,a=()=>(i??=re(H),i[0]||H),o;o=r===!0||r===null?a():Aa(r),o||=a();let s=Q(H,Ix(e)),c=b.current.openEvent,l=c?.type===`mousedown`&&vS(c);gT(o,{sync:l,preventScroll:o===H,shouldFocus(){if(!O.current)return!1;if(s)return!0;let t=Ix(e);return!(t!==o&&Q(H,t))}})})},[r,g,H,re,w,D,O,b]);let ae=U.useRef(null);J(()=>{if(r||!H){ae.current=null;return}ae.current&&=(ae.current.cancelled=!0,null);let e=Bb(H),t=Ix(e),n=D.current==null;ZT(t);function i(e){if(e.open||(F.current=qT(e.nativeEvent,I.current)),(e.reason===`focus-out`&&e.triggerElement?.hasAttribute(mT(`focus-guard`))||e.reason===`trigger-hover`&&e.nativeEvent.type===`mouseleave`)&&(j.current=!0),e.reason===`outside-press`){if(e.nested)j.current=!1;else if(vS(e.nativeEvent)||yS(e.nativeEvent))j.current=!1;else{let e=!1;Bb(H).createElement(`div`).focus({get preventScroll(){return e=!0,!1}}),e?j.current=!1:j.current=!0}}}y.on(`openchange`,i);function a(e){let r=T.current,i=typeof r==`function`?r(e):r;if(i===void 0||i===!1)return null;i===null&&(i=!0);let a=_?.isConnected?_:null,o=t?.isConnected&&pb(t)!==`body`?t:null,s=n?o||a:a||o;return s||=QT()||null,typeof i==`boolean`?s:Aa(i)||s||null}return()=>{y.off(`openchange`,i);let t=Ix(e),n=ie(),r=Q(v,t)||n.some(e=>e===t||Q(e,t))||k&&mS(k.nodesRef.current,x(),!1).some(e=>Q(e.context?.elements.floating,t)),o=T.current,s=F.current,c=a(s),l={cancelled:!1};ae.current=l,queueMicrotask(()=>{ae.current===l&&(ae.current=null);let n=$T(c),i=E.current??typeof o!=`boolean`;if(!l.cancelled&&o&&!j.current&&vb(n)&&(i||n===t||t===e.body||r)){let e={preventScroll:!0};s===`keyboard`&&(e.focusVisible=!0),n.focus(e)}j.current=!1})}},[r,v,H,T,E,D,y,k,_,x,ie]),J(()=>{if(!Nx||g||!v)return;let e=Ix(Bb(v));vb(e)&&lS(e)&&Q(v,e)&&e.blur()},[g,v]),J(()=>{if(!r&&A)return A.setFocusManagerState({modal:c,closeOnFocusOut:l,open:g,onOpenChange:t.setOpen,domReference:_}),()=>{A.setFocusManagerState(null)}},[r,A,c,g,t,l,_]),J(()=>{if(!r&&H)return eE(H),()=>{queueMicrotask(XT)}},[r,H]);let oe=!r&&(!c||!C)&&(ne||c);return(0,G.jsxs)(U.Fragment,{children:[oe&&(0,G.jsx)(pT,{"data-type":`inside`,ref:z,onFocus:e=>{if(c){let e=re();gT(e[e.length-1])}else A?.portalNode&&(j.current=!1,CC(e,A.portalNode)?bC(_)?.focus():Aa(f??A.beforeOutsideRef)?.focus())}}),n,oe&&(0,G.jsx)(pT,{"data-type":`inside`,ref:B,onFocus:e=>{c?gT(re()[0]):A?.portalNode&&(l&&(j.current=!0),CC(e,A.portalNode)?xC(_)?.focus():Aa(d??A.afterOutsideRef)?.focus())}})]})}function nE(e,t={}){let{enabled:n=!0,event:r=`click`,toggle:i=!0,ignoreMouse:a=!1,stickIfOpen:o=!0,touchOpenDelay:s=0,reason:c=NC}=t,l=e.context.dataRef,u=U.useRef(void 0),d=ka(),f=qa(),p=U.useMemo(()=>{function t(t,n,r,i){let a=$(c,n,r);t&&i===`touch`&&s>0?f.start(s,()=>{e.setOpen(!0,a)}):e.setOpen(t,a)}function n(t,n,r){let a=l.current.openEvent,s=e.select(`domReferenceElement`)!==n;return t&&s||!t||!i?!0:a&&(typeof o==`function`?o():o)?!r(a.type):!1}return{onPointerDown(e){u.current=bS(e.pointerType,!0)&&yS(e.nativeEvent)?`virtual`:e.pointerType},onMouseDown(i){let o=u.current,s=i.nativeEvent,c=e.select(`open`);if(i.button!==0||r===`click`||bS(o,!0)&&a)return;let l=n(c,i.currentTarget,e=>e===`click`||e===`mousedown`),f=Rx(s),p=lS(f);if(p||o===`virtual`){t(l,s,p?f:i.currentTarget,o);return}let m=i.currentTarget;d.request(()=>{t(l,s,m,o)})},onClick(i){if(r===`mousedown-only`)return;let o=u.current;r===`mousedown`&&o?u.current=void 0:bS(o,!0)&&a||t(n(e.select(`open`),i.currentTarget,e=>e===`click`||e===`mousedown`||e===`keydown`||e===`keyup`),i.nativeEvent,i.currentTarget,o)},onKeyDown(){u.current=void 0}}},[l,r,a,c,e,o,i,d,f,s]);return U.useMemo(()=>n?{reference:p}:Ui,[n,p])}function rE(e,t){let n=null,r=null,i=!1;return{contextElement:e||void 0,getBoundingClientRect(){let a=e?.getBoundingClientRect()||{width:0,height:0,x:0,y:0},o=t.axis===`x`||t.axis===`both`,s=t.axis===`y`||t.axis===`both`,c=[`mouseenter`,`mousemove`].includes(t.dataRef.current.openEvent?.type||``)&&t.pointerType!==`touch`,l=t.axis===`y`?a.width:0,u=t.axis===`x`?a.height:0,d=a.x,f=a.y;return n==null&&t.x&&o&&(n=a.x-t.x),r==null&&t.y&&s&&(r=a.y-t.y),d-=n||0,f-=r||0,(!i||c)&&(d=o&&t.x!=null?t.x:d,f=s&&t.y!=null?t.y:f),i=!0,{width:l,height:u,x:d,y:f,top:f,right:d+l,bottom:f+u,left:d}}}}function iE(e){return e!=null&&e.clientX!=null}function aE(e,t={}){let{enabled:n=!0,axis:r=`both`}=t,i=e.useState(`open`),a=e.useState(`floatingElement`),o=e.useState(`domReferenceElement`),s=e.context.dataRef,c=U.useRef(!1),l=U.useRef(null),[u,d]=U.useState(),[f,p]=U.useState([]),m=q(t=>{e.set(`positionReference`,t)}),h=q((t,n,i)=>{c.current||(!s.current.openEvent||iE(s.current.openEvent))&&e.set(`positionReference`,rE(i??o,{x:t,y:n,axis:r,dataRef:s,pointerType:u}))}),g=q(e=>{i?l.current||(h(e.clientX,e.clientY,e.currentTarget),p([])):h(e.clientX,e.clientY,e.currentTarget)}),_=bS(u)?a:i;U.useEffect(()=>{if(!n){m(o);return}if(!_)return;function e(){l.current?.(),l.current=null}let t=mb(a);function r(t){let n=Rx(t);Q(a,n)?e():h(t.clientX,t.clientY)}return!s.current.openEvent||iE(s.current.openEvent)?l.current=rT(t,`mousemove`,r):m(o),e},[_,n,a,s,o,e,h,m,f]),U.useEffect(()=>()=>{e.set(`positionReference`,null)},[e]),U.useEffect(()=>{n&&!a&&(c.current=!1)},[n,a]),U.useEffect(()=>{!n&&i&&(c.current=!0)},[n,i]);let v=U.useMemo(()=>{function e(e){d(e.pointerType)}return{onPointerDown:e,onPointerEnter:e,onMouseMove:g,onMouseEnter:g}},[g]);return U.useMemo(()=>n?{reference:v,trigger:v}:{},[n,v])}function oE(){return!1}function sE(e){return{escapeKey:typeof e==`boolean`?e:e?.escapeKey??!1,outsidePress:typeof e==`boolean`?e:e?.outsidePress??!0}}function cE(e,t={}){let{enabled:n=!0,escapeKey:r=!0,outsidePress:i=!0,outsidePressEvent:a=`sloppy`,referencePress:o=oE,bubbles:s,externalTree:c}=t,l=e.useState(`open`),u=e.useState(`floatingElement`),{dataRef:d,events:f}=e.context,p=UT(c),m=q(typeof i==`function`?i:()=>!1),h=typeof i==`function`?m:i,g=h!==!1,_=q(()=>a),{escapeKey:v,outsidePress:y}=sE(s),b=U.useRef(!1),x=U.useRef(!1),S=U.useRef(!1),C=U.useRef(!1),w=U.useRef(!1),T=U.useRef(``),E=U.useRef(null),D=qa(),O=qa(),k=qa(),A=q(()=>{O.clear(),d.current.insideReactTree=!1}),j=q(e=>{let t=d.current.floatingContext?.nodeId;return(p?mS(p.nodesRef.current,t):[]).some(t=>t.context?.open&&!t.context.dataRef.current[e])}),M=q(t=>sS(t,e.select(`floatingElement`))||sS(t,e.select(`domReferenceElement`))),N=q(t=>{o()&&e.setOpen(!1,$(NC,t.nativeEvent))}),P=q(t=>{if(!l||!n||!r||t.key!==`Escape`)return;let i=_S(t)?t.nativeEvent:t;if(w.current||i.isComposing||!v&&j(`__escapeKeyBubbles`))return;let a=$(BC,i);e.setOpen(!1,a),a.isCanceled||t.preventDefault(),!v&&!a.isPropagationAllowed&&t.stopPropagation()}),F=q(()=>{d.current.insideReactTree=!0,O.start(0,A)}),I=q(t=>{if(!l||!n||t.button!==0)return;let r=Rx(t.nativeEvent);Q(e.select(`floatingElement`),r)&&(b.current||(b.current=!0,x.current=!1))}),L=q(e=>{l&&n&&(e.defaultPrevented||e.nativeEvent.defaultPrevented)&&b.current&&(x.current=!0)});U.useEffect(()=>{function e(e){e.open||(C.current=!1)}return f.on(`openchange`,e),()=>{f.off(`openchange`,e)}},[f]),U.useEffect(()=>A,[A]),U.useEffect(()=>{if(!l||!n)return l||(C.current=!1,w.current=!1,T.current=``,E.current=null),A;d.current.__escapeKeyBubbles=v,d.current.__outsidePressBubbles=y;let t=new Ka,i=Bb(u);function a(){k.clear(),w.current=!0}function o(){w.current=!0,k.start(Nx?5:0,()=>{w.current=!1})}function s(){S.current=!0,t.start(0,()=>{S.current=!1})}function c(){b.current=!1,x.current=!1}function f(){let e=T.current,t=e===`pen`||!e?`mouse`:e,n=_(),r=typeof n==`function`?n():n;return typeof r==`string`?r:r[t]}function m(e){let t=f();return t===`intentional`&&e.type!==`click`||t===`sloppy`&&e.type===`click`}function O(e){let t=d.current.floatingContext?.nodeId,n=p&&mS(p.nodesRef.current,t).some(t=>sS(e,t.context?.elements.floating));return M(e)||n}function N(n){if(m(n)){n.type!==`click`&&!M(n)&&(t.clear(),S.current=!1),A();return}if(d.current.insideReactTree){A();return}let r=Rx(n),i=`[${mT(`inert`)}]`,a=_b(r)?r.getRootNode():null,o=Array.from((yb(a)?a:Bb(e.select(`floatingElement`))).querySelectorAll(i)),s=e.context.triggerElements;if(r&&(s.hasElement(r)||s.hasMatchingElement(e=>Q(e,r))))return;let c=_b(r)?r:null;for(;c&&!Ab(c);){let e=Nb(c);if(Ab(e)||!_b(e))break;c=e}if(!(o.length&&_b(r)&&!cS(r)&&!Q(r,e.select(`floatingElement`))&&o.every(e=>!Q(c,e)))){if(vb(r)&&!(`touches`in n)){let e=Ab(r),t=jb(r),i=/auto|scroll/,a=e||i.test(t.overflowX),o=e||i.test(t.overflowY),s=a&&r.clientWidth>0&&r.scrollWidth>r.clientWidth,c=o&&r.clientHeight>0&&r.scrollHeight>r.clientHeight,l=t.direction===`rtl`,u=c&&(l?n.offsetX<=r.offsetWidth-r.clientWidth:n.offsetX>r.clientWidth),d=s&&n.offsetY>r.clientHeight;if(u||d)return}if(!O(n)){if(f()===`intentional`){if(n.detail!==0&&!vS(n)&&!C.current)return;if(S.current){t.clear(),S.current=!1;return}}(typeof h!=`function`||h(n))&&(j(`__outsidePressBubbles`)||(e.setOpen(!1,$(IC,n)),A()))}}}function F(t){f()===`sloppy`&&t.pointerType!==`touch`&&e.select(`open`)&&n&&!M(t)&&N(t)}function I(t){if(f()!==`sloppy`||!e.select(`open`)||!n||M(t))return;let r=t.touches[0];r&&(E.current={startTime:Date.now(),startX:r.clientX,startY:r.clientY,dismissOnTouchEnd:!1,dismissOnMouseDown:!0},D.start(1e3,()=>{E.current&&(E.current.dismissOnTouchEnd=!1,E.current.dismissOnMouseDown=!1)}))}function L(e,t){let n=Rx(e);if(!n)return;let r=rT(n,e.type,()=>{t(e),r()})}function R(e){T.current=`touch`,L(e,I)}function z(e){D.clear(),e.type===`pointerdown`&&(e.button===0&&(C.current=!0),T.current=e.pointerType),(e.type!==`mousedown`||!E.current||E.current.dismissOnMouseDown)&&L(e,e=>{e.type===`pointerdown`?F(e):N(e)})}function B(e){if(e.type===`pointercancel`&&(C.current=!1),!b.current)return;let n=x.current;c(),f()===`intentional`&&(e.type===`pointercancel`?n&&s():O(e)||(n?s():(typeof h!=`function`||h(e))&&(t.clear(),S.current=!0,A())))}function ee(e){if(f()!==`sloppy`||!E.current||M(e))return;let t=e.touches[0];if(!t)return;let n=Math.abs(t.clientX-E.current.startX),r=Math.abs(t.clientY-E.current.startY),i=Math.sqrt(n*n+r*r);i>5&&(E.current.dismissOnTouchEnd=!0),i>10&&(N(e),D.clear(),E.current=null)}function V(e){L(e,ee)}function te(e){f()===`sloppy`&&E.current&&!M(e)&&(E.current.dismissOnTouchEnd&&N(e),D.clear(),E.current=null)}function ne(e){L(e,te)}let H=nT(r&&nT(rT(i,`keydown`,P),rT(i,`compositionstart`,a),rT(i,`compositionend`,o)),g&&nT(rT(i,`click`,z,!0),rT(i,`pointerdown`,z,!0),rT(i,`pointerup`,B,!0),rT(i,`pointercancel`,B,!0),rT(i,`mousedown`,z,!0),rT(i,`mouseup`,B,!0),rT(i,`touchstart`,R,{capture:!0,passive:!0}),rT(i,`touchmove`,V,{capture:!0,passive:!0}),rT(i,`touchend`,ne,{capture:!0,passive:!0})));return()=>{H(),t.clear(),c(),S.current=!1}},[d,u,r,g,h,l,n,v,y,P,A,_,j,M,p,e,D,k]);let R=U.useMemo(()=>({onKeyDown:P,onPointerDown:N,onClick:N}),[P,N]),z=U.useMemo(()=>({onKeyDown:P,onPointerDown:L,onMouseDown:L,onClickCapture:F,onMouseDownCapture(e){F(),I(e)},onPointerDownCapture(e){F(),I(e)},onMouseUpCapture:F,onTouchEndCapture:F,onTouchMoveCapture:F}),[P,F,I,L]);return U.useMemo(()=>n?{reference:R,floating:z,trigger:R}:{},[n,R,z])}function lE(e){let{popupStore:t,treatPopupAsFloatingElement:n=!1,floatingRootContext:r,floatingId:i,nested:a,onOpenChange:o}=e,s=t.useState(`open`),c=t.useState(`activeTriggerElement`),l=t.useState(n?`popupElement`:`positionerElement`),u=o;return t.useSyncedValue(`floatingId`,i),J(()=>{let e={open:s,floatingId:i,referenceElement:c,floatingElement:l};_b(c)&&(e.domReferenceElement=c),r.state.positionReference===r.state.referenceElement&&(e.positionReference=c),r.update(e)},[s,i,c,l,r]),r.context.onOpenChange=u,r.context.nested=a,r}function uE(e){let{open:t,ref:n,preventUnmountOnClose:r,setPreventUnmountOnClose:i,onUnmount:a,animateInitialOpen:o}=e,s=q(i),{mounted:c,setMounted:l,transitionStatus:u}=Va(t,!1,!1,o),d=!t&&r;J(()=>{t&&s(!1)},[t,s]);let f=U.useRef(c),p=U.useRef(!1),m=ux(),h=()=>{f.current=!1,l(!1),a()};J(()=>{f.current=c,p.current&&(p.current=!1,!t&&c&&h())});let g=q(()=>{f.current&&(t?(p.current=!0,m()):h())});return La({enabled:c&&!t&&!d,open:t,ref:n,onComplete(){t||g()}}),{mounted:c,transitionStatus:u,preventUnmountingOnClose:d,forceUnmount:g}}var dE={tabIndex:-1,[zx]:``};function fE(e){return t=>t!==`touch`||e.current}function pE(e,t=!1){let n=mx(),r=HT()!=null,i=Ai(()=>e(n,r)).current;return lE({popupStore:i,treatPopupAsFloatingElement:t,floatingRootContext:i.state.floatingRootContext,floatingId:n,nested:r,onOpenChange:i.setOpen}),i}function mE({handle:e,store:t}){return J(()=>e.attachStore(t),[e,t]),null}function hE(e){let t=e.context.triggerElements.size;e.select(`open`)&&e.state.triggerCount!==t&&e.set(`triggerCount`,t)}function gE(e,t){let n=U.useRef(null);return q(r=>{let i=n.current;if(i!==null){if(i.element===r&&i.store===t&&i.id===e)return;n.current=null;let a=i.store;a.context.triggerElements.getById(i.id)===i.element&&(a.context.triggerElements.delete(i.id),hE(a))}r!==null&&e!==void 0&&(n.current={store:t,id:e,element:r},t.context.triggerElements.add(e,r),hE(t))})}function _E(e,t,n,r=!1){let i=e.preventUnmountingOnClose;t?i=!1:r&&(i=!0);let a=n?.id??null,o=e.activeTriggerId,s=e.activeTriggerElement;return(a||t)&&(o=a,s=n??null),{open:t,preventUnmountingOnClose:i,activeTriggerId:o,activeTriggerElement:s,openedWithoutTrigger:t?n==null:e.openedWithoutTrigger}}function vE(e){let t=!1;return e.preventUnmountOnClose=()=>{t=!0},()=>t}function yE(e,t,n,r={}){let i=n.reason,a=i===PC,o=t&&i===`trigger-focus`,s=!t&&(i===`trigger-press`||i===`escape-key`),c=vE(n);if(e.context.onOpenChange?.(t,n),n.isCanceled)return;r.onBeforeDispatch?.(),e.state.floatingRootContext.dispatchOpenChange(t,n);let l=()=>{let i=_E(e.state,t,n.trigger,c()),l={...r.extraState,...i};o?l.instantType=`focus`:s?l.instantType=`dismiss`:a&&(l.instantType=void 0),e.update(l)};a?W.flushSync(l):l()}function bE(e,t,n,r){let i=n.useState(`isMountedByTrigger`,e),a=gE(e,n),o=q(t=>{let i=n.select(`open`),a=n.select(`activeTriggerId`);if(a===e){let e={activeTriggerElement:t,...i?r:null};n.update(e)}else if(a==null&&i&&!n.state.openedWithoutTrigger){let i={activeTriggerId:e??null,activeTriggerElement:t,...r};n.update(i)}}),s=q(e=>{a(e),e&&o(e)});return J(()=>(s(t.current),()=>s(null)),[s,t,n,e]),J(()=>{if(i){let e={activeTriggerElement:t.current,...r};n.update(e)}},[i,n,t,...Object.values(r)]),{registerTrigger:s,isMountedByThisTrigger:i}}function xE(e,t={}){let{closeOnActiveTriggerUnmount:n=!1}=t,r=U.useRef(null),i=e.useState(`open`);J(()=>{if(!i){r.current=null,e.state.triggerCount!==0&&e.set(`triggerCount`,0),e.state.openedWithoutTrigger&&e.set(`openedWithoutTrigger`,!1);return}let t=e.context.triggerElements.size,a={};e.state.triggerCount!==t&&(a.triggerCount=t);let o=e.select(`activeTriggerId`),s=null;if(o){let t=e.context.triggerElements.getById(o);if(t)r.current=o,t!==e.state.activeTriggerElement&&(a.activeTriggerElement=t);else{for(let[t,n]of e.context.triggerElements.entries())if(n===e.state.activeTriggerElement){a.activeTriggerId=t,a.activeTriggerElement=n,r.current=t;break}a.activeTriggerId===void 0&&(r.current===o?s=o:r.current=null)}}else r.current=null;if(!s&&!o&&!e.state.openedWithoutTrigger&&t===1){let t=e.context.triggerElements.entries().next();if(!t.done){let[e,n]=t.value;a.activeTriggerId=e,a.activeTriggerElement=n,r.current=e}}(a.triggerCount!==void 0||a.activeTriggerId!==void 0||a.activeTriggerElement!==void 0)&&e.update(a),s&&n&&queueMicrotask(()=>{if(e.select(`open`)&&e.select(`activeTriggerId`)===s&&!e.context.triggerElements.getById(s)){let t=$(MC);e.setOpen(!1,t),t.isCanceled||e.update({activeTriggerId:null,activeTriggerElement:null})}})},[i,e,e.useState(`triggerCount`),e.useState(`activeTriggerId`),e.useState(`activeTriggerElement`),n])}function SE(e,t,n,r){let{mounted:i,transitionStatus:a,forceUnmount:o}=uE({open:e,ref:t.context.popupRef,preventUnmountOnClose:t.useState(`preventUnmountingOnClose`),setPreventUnmountOnClose:e=>t.set(`preventUnmountingOnClose`,e),animateInitialOpen:r,onUnmount(){t.update({activeTriggerId:null,activeTriggerElement:null,mounted:!1,preventUnmountingOnClose:!1}),n?.(),t.context.onOpenChangeComplete?.(!1)}});return Ai(()=>(t.set(`mounted`,i),null)),t.useSyncedValues({mounted:i,transitionStatus:a}),{forceUnmount:o,transitionStatus:a}}function CE(e,t){e.useSyncedValues(t),J(()=>()=>{e.update({activeTriggerProps:Ui,inactiveTriggerProps:Ui,popupProps:Ui})},[e])}function wE(e,t){J(()=>{!t&&e.state.openMethod!==null&&e.set(`openMethod`,null)},[t,e]),J(()=>()=>{e.state.openMethod!==null&&e.set(`openMethod`,null)},[e])}var TE=class{idMap=new Map;add(e,t){this.idMap.set(e,t)}delete(e){this.idMap.delete(e)}hasElement(e){for(let t of this.idMap.values())if(t===e)return!0;return!1}hasMatchingElement(e){for(let t of this.idMap.values())if(e(t))return!0;return!1}getById(e){return this.idMap.get(e)}entries(){return this.idMap.entries()}elements(){return this.idMap.values()}get size(){return this.idMap.size}},EE={open:e=>e.open,transitionStatus:e=>e.transitionStatus,domReferenceElement:e=>e.domReferenceElement,referenceElement:e=>e.positionReference??e.referenceElement,floatingElement:e=>e.floatingElement,floatingId:e=>e.floatingId},DE=class extends tT{constructor(e){let{syncOnly:t,nested:n,onOpenChange:r,triggerElements:i,...a}=e;super({...a,positionReference:a.referenceElement,domReferenceElement:a.referenceElement},{onOpenChange:r,dataRef:{current:{}},events:RT(),nested:n,triggerElements:i},EE),this.syncOnly=t}syncOpenEvent=(e,t)=>{(!e||!this.state.open||t!=null&&xS(t))&&(this.context.dataRef.current.openEvent=e?t:void 0)};dispatchOpenChange=(e,t)=>{this.syncOpenEvent(e,t.event);let 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 OE(e,t,n=!1){return{open:!1,openProp:void 0,mounted:!1,transitionStatus:void 0,floatingRootContext:new DE({open:!1,transitionStatus:void 0,floatingElement:null,referenceElement:null,triggerElements:e,floatingId:t,syncOnly:!0,nested:n,onOpenChange:void 0}),floatingId:t,triggerCount:0,preventUnmountingOnClose:!1,payload:void 0,activeTriggerId:null,activeTriggerElement:null,openedWithoutTrigger:!1,triggerIdProp:void 0,popupElement:null,positionerElement:null,activeTriggerProps:Ui,inactiveTriggerProps:Ui,popupProps:Ui}}var kE=e=>e.triggerIdProp??e.activeTriggerId,AE=e=>e.openProp??e.open,jE=e=>(e.popupElement?.id??e.floatingId)||void 0;function ME(e,t){return t!==void 0&&AE(e)&&kE(e)===t}function NE(e,t){return ME(e,t)?!0:t!==void 0&&AE(e)&&kE(e)==null&&!e.openedWithoutTrigger&&e.triggerCount===1}var PE={open:AE,mounted:e=>e.mounted,transitionStatus:e=>AE(e)&&!e.mounted?`starting`:e.transitionStatus,floatingRootContext:e=>e.floatingRootContext,triggerCount:e=>e.triggerCount,preventUnmountingOnClose:e=>e.preventUnmountingOnClose,payload:e=>e.payload,activeTriggerId:kE,activeTriggerElement:e=>e.mounted?e.activeTriggerElement:null,popupId:jE,isTriggerActive:(e,t)=>t!==void 0&&kE(e)===t,isOpenedByTrigger:(e,t)=>ME(e,t),isMountedByTrigger:(e,t)=>t!==void 0&&kE(e)===t&&e.mounted,triggerProps:(e,t)=>t?e.activeTriggerProps:e.inactiveTriggerProps,triggerPopupId:(e,t)=>NE(e,t)?jE(e):void 0,popupProps:e=>e.popupProps,popupElement:e=>e.popupElement,positionerElement:e=>e.positionerElement};function FE(e){let t=U.useCallback(t=>e===void 0?Vi:e.subscribeStore(t),[e]),n=U.useCallback(()=>e===void 0?void 0:e.store,[e]);return(0,ou.useSyncExternalStore)(t,n,()=>e?.serverStore)}function IE(e){let{open:t=!1,onOpenChange:n,elements:r={}}=e,i=mx(),a=HT()!=null,o=Ai(()=>new DE({open:t,transitionStatus:void 0,onOpenChange:n,referenceElement:r.reference??null,floatingElement:r.floating??null,triggerElements:new TE,floatingId:i,syncOnly:!1,nested:a})).current;return J(()=>{let e={open:t,floatingId:i};r.reference!==void 0&&(e.referenceElement=r.reference,e.domReferenceElement=_b(r.reference)?r.reference:null),r.floating!==void 0&&(e.floatingElement=r.floating),o.update(e)},[t,i,r.reference,r.floating,o]),o.context.onOpenChange=n,o.context.nested=a,o}var LE=jx&&Nx;function RE(e,t={}){let{enabled:n=!0,delay:r}=t,{events:i,dataRef:a}=e.context,o=U.useRef(!1),s=U.useRef(null),c=U.useRef(!0),l=qa();U.useEffect(()=>{let t=e.select(`domReferenceElement`);if(!n)return;let r=mb(t);function i(){let t=e.select(`domReferenceElement`);!e.select(`open`)&&vb(t)&&t===Ix(Bb(t))&&(o.current=!0,s.current=t)}function a(){c.current=!0}function l(){c.current=!1}return nT(rT(r,`blur`,i),LE&&rT(r,`keydown`,a,!0),LE&&rT(r,`pointerdown`,l,!0))},[e,n]),U.useEffect(()=>{if(!n)return;function t(t){if(t.reason===`trigger-press`||t.reason===`escape-key`){let t=e.select(`domReferenceElement`);_b(t)&&(s.current=t,o.current=!0)}}return i.on(`openchange`,t),()=>{i.off(`openchange`,t)}},[i,n,e]);let u=U.useMemo(()=>{function t(){o.current=!1,s.current=null}return{onMouseLeave(){t()},onFocus(n){let i=n.currentTarget;if(o.current){if(s.current===i)return;t()}let a=Rx(n.nativeEvent);if(_b(a)){if(LE&&!n.relatedTarget){if(!c.current&&!lS(a))return}else if(!fS(a))return}let u=oS(n.relatedTarget,e.context.triggerElements),{nativeEvent:d,currentTarget:f}=n;e.select(`open`)&&u||!r?e.setOpen(!0,$(FC,d,f)):l.start(r,()=>{o.current||e.setOpen(!0,$(FC,d,f))})},onBlur(n){t();let r=n.relatedTarget,i=n.nativeEvent,o=_b(r)&&r.hasAttribute(mT(`focus-guard`))&&r.getAttribute(`data-type`)===`outside`;l.start(0,()=>{let t=e.select(`domReferenceElement`),n=Ix(Bb(t));(r||n!==t)&&(Q(a.current.floatingContext?.refs.floating.current,n)||Q(t,n)||o||oS(r??n,e.context.triggerElements)||e.setOpen(!1,$(FC,i)))})}}},[a,r,e,l]);return U.useMemo(()=>n?{reference:u,trigger:u}:{},[n,u])}var zE=class e{pointerType=void 0;interactedInside=!1;handler=void 0;blockMouseMove=!0;performedPointerEventsMutation=!1;pointerEventsScopeElement=null;pointerEventsReferenceElement=null;pointerEventsFloatingElement=null;restTimeoutPending=!1;openChangeTimeout=new Ka;restTimeout=new Ka;handleCloseOptions=void 0;static create(){return new e}dispose=()=>{this.openChangeTimeout.clear(),this.restTimeout.clear()};disposeEffect=()=>this.dispose},BE=new WeakMap;function VE(e){if(!e.performedPointerEventsMutation)return;let t=e.pointerEventsScopeElement;t&&BE.get(t)===e&&(e.pointerEventsScopeElement?.style.removeProperty(`pointer-events`),e.pointerEventsReferenceElement?.style.removeProperty(`pointer-events`),e.pointerEventsFloatingElement?.style.removeProperty(`pointer-events`),BE.delete(t)),e.performedPointerEventsMutation=!1,e.pointerEventsScopeElement=null,e.pointerEventsReferenceElement=null,e.pointerEventsFloatingElement=null}function HE(e,t){let{scopeElement:n,referenceElement:r,floatingElement:i}=t,a=BE.get(n);a&&a!==e&&VE(a),VE(e),e.performedPointerEventsMutation=!0,e.pointerEventsScopeElement=n,e.pointerEventsReferenceElement=r,e.pointerEventsFloatingElement=i,BE.set(n,e),n.style.pointerEvents=`none`,r.style.pointerEvents=`auto`,i.style.pointerEvents=`auto`}function UE(e){let t=e.context.dataRef.current,n=Ai(()=>t.hoverInteractionState??zE.create()).current;return t.hoverInteractionState||=n,Ta(t.hoverInteractionState.disposeEffect),t.hoverInteractionState}function WE(e,t={}){let{enabled:n=!0,closeDelay:r=0,nodeId:i}=t,a=e.useState(`open`),o=e.useState(`floatingElement`),s=e.useState(`domReferenceElement`),{dataRef:c}=e.context,l=UT(),u=HT(),d=UE(e),f=qa(),p=q(()=>sT(c.current.openEvent?.type,d.interactedInside)),m=q(()=>cT(c.current.openEvent?.type)),h=q(()=>{VE(d)});J(()=>{a||(d.pointerType=void 0,d.restTimeoutPending=!1,d.interactedInside=!1,h())},[a,d,h]),U.useEffect(()=>h,[h]),J(()=>{if(n&&a&&d.handleCloseOptions?.blockPointerEvents&&m()&&_b(s)&&o){let e=s,t=o,n=Bb(o),r=l?.nodesRef.current.find(e=>e.id===u)?.context?.elements.floating;r&&(r.style.pointerEvents=``);let i=d.pointerEventsScopeElement===t?null:d.pointerEventsScopeElement,a=r===t?null:r,c=d.handleCloseOptions?.getScope?.()??i??a??Lx(e,`[data-rootownerid]`)??n.body;return HE(d,{scopeElement:c,referenceElement:e,floatingElement:t}),()=>{h()}}},[n,a,s,o,d,m,l,u,h]),U.useEffect(()=>{if(!n)return;function t(){return!!(l&&u&&mS(l.nodesRef.current,u).length>0)}function a(t){let n=aT(r,`close`,d.pointerType),i=()=>{e.setOpen(!1,$(PC,t)),l?.events.emit(`floating.closed`,t)};n?d.openChangeTimeout.start(n,i):(d.openChangeTimeout.clear(),i())}function s(e){let t=Rx(e);uS(t)?d.interactedInside=Lx(t,`[aria-haspopup]`)!=null:d.interactedInside=!1}function g(){d.openChangeTimeout.clear(),f.clear(),l?.events.off(`floating.closed`,v),h()}function _(n){if(t()&&l){l.events.on(`floating.closed`,v);return}if(oS(n.relatedTarget,e.context.triggerElements))return;let r=c.current.floatingContext?.nodeId??i,o=n.relatedTarget;l&&r&&_b(o)&&mS(l.nodesRef.current,r,!1).some(e=>Q(e.context?.elements.floating,o))||(d.handler?d.handler(n):(h(),m()&&!p()&&a(n)))}function v(n){l&&u&&!t()&&f.start(0,()=>{l.events.off(`floating.closed`,v),e.setOpen(!1,$(PC,n)),l.events.emit(`floating.closed`,n)})}let y=o;return nT(y&&rT(y,`mouseenter`,g),y&&rT(y,`mouseleave`,_),y&&rT(y,`pointerdown`,s,!0),()=>{l?.events.off(`floating.closed`,v)})},[n,o,e,c,r,i,m,p,h,d,l,u,f])}var GE={current:null};function KE(e,t={}){let{enabled:n=!0,delay:r=0,handleClose:i=null,mouseOnly:a=!1,restMs:o=0,move:s=!0,triggerElementRef:c=GE,externalTree:l,isActiveTrigger:u=!0,getHandleCloseContext:d,isClosing:f,shouldOpen:p,guardStaleOpen:m=!1}=t,{dataRef:h,events:g}=e.context,_=UT(l),v=UE(e),y=U.useRef(!1),b=Bw(i),x=Bw(r),S=Bw(o),C=Bw(n),w=Bw(p),T=Bw(f),E=q(()=>sT(h.current.openEvent?.type,v.interactedInside)),D=q(()=>w.current?.()!==!1),O=q((t,n,r)=>{let i=e.context.triggerElements;if(i.hasElement(n))return!t||!Q(t,n);if(!_b(r))return!1;let a=r;return i.hasMatchingElement(e=>Q(e,a))&&(!t||!Q(t,a))}),k=q(()=>{v.handler&&=(Bb(e.select(`domReferenceElement`)).removeEventListener(`mousemove`,v.handler),void 0)}),A=q(()=>{VE(v)});return u&&(v.handleCloseOptions=i?.__options),U.useEffect(()=>k,[k]),U.useEffect(()=>{if(!n)return;function e(e){e.open?y.current=!1:(y.current=e.reason===PC,k(),v.openChangeTimeout.clear(),v.restTimeout.clear(),v.blockMouseMove=!0,v.restTimeoutPending=!1)}return g.on(`openchange`,e),()=>{g.off(`openchange`,e)}},[n,g,v,k]),U.useEffect(()=>{if(!n)return;function t(t,n=!0){let r=aT(x.current,`close`,v.pointerType);r?v.openChangeTimeout.start(r,()=>{e.setOpen(!1,$(PC,t)),_?.events.emit(`floating.closed`,t)}):n&&(v.openChangeTimeout.clear(),e.setOpen(!1,$(PC,t)),_?.events.emit(`floating.closed`,t))}let r=c.current??(u?e.select(`domReferenceElement`):null);if(!_b(r))return;function i(t){if(v.openChangeTimeout.clear(),v.blockMouseMove=!1,a&&!bS(v.pointerType))return;let n=oT(S.current),r=aT(x.current,`open`,v.pointerType),i=Rx(t),o=t.currentTarget??null,s=e.select(`domReferenceElement`),c=o;if(_b(i)&&!e.context.triggerElements.hasElement(i)){for(let t of e.context.triggerElements.elements())if(Q(t,i)){c=t;break}}_b(o)&&_b(s)&&!e.context.triggerElements.hasElement(o)&&Q(o,s)&&(c=s);let l=c!=null&&O(s,c,i),u=e.select(`open`),d=T.current?.()??e.select(`transitionStatus`)===`ending`,f=!u&&d&&y.current,p=!l&&_b(c)&&_b(s)&&Q(s,c)&&f,m=n>0&&!r,h=l&&(u||f)||p,g=!u||l;h?D()&&e.setOpen(!0,$(PC,t,c)):m||(r?v.openChangeTimeout.start(r,()=>{g&&D()&&e.setOpen(!0,$(PC,t,c))}):g&&D()&&e.setOpen(!0,$(PC,t,c)))}function o(n){if(E()){A();return}k();let r=Bb(e.select(`domReferenceElement`));v.restTimeout.clear(),v.restTimeoutPending=!1;let i=h.current.floatingContext??d?.();if(!oS(n.relatedTarget,e.context.triggerElements)){if(b.current&&i){e.select(`open`)||v.openChangeTimeout.clear();let a=c.current;v.handler=b.current({...i,tree:_,x:n.clientX,y:n.clientY,onClose(){A(),k(),C.current&&!E()&&a===e.select(`domReferenceElement`)&&t(n,!0)}}),r.addEventListener(`mousemove`,v.handler),v.handler(n)}else(v.pointerType!==`touch`||!Q(e.select(`floatingElement`),n.relatedTarget))&&t(n)}}function l(e){Q(r,e.relatedTarget)||(v.openChangeTimeout.clear(),v.restTimeout.clear(),v.restTimeoutPending=!1)}let f=m?rT(r,`mouseout`,l):void 0;return s?nT(rT(r,`mousemove`,i,{once:!0}),rT(r,`mouseenter`,i),rT(r,`mouseleave`,o),f):nT(rT(r,`mouseenter`,i),rT(r,`mouseleave`,o),f)},[k,A,h,x,e,n,b,v,u,O,E,a,s,S,c,_,C,d,T,D,m]),U.useMemo(()=>{if(!n)return;function t(e){v.pointerType=e.pointerType}return{onPointerDown:t,onPointerEnter:t,onMouseMove(t){let{nativeEvent:n}=t,r=t.currentTarget,i=e.select(`domReferenceElement`),o=e.select(`open`),s=O(i,r,t.target);if(a&&!bS(v.pointerType))return;if(o&&s&&v.handleCloseOptions?.blockPointerEvents){let t=e.select(`floatingElement`);if(t){let e=v.handleCloseOptions?.getScope?.()??r.ownerDocument.body;HE(v,{scopeElement:e,referenceElement:r,floatingElement:t})}}let c=oT(S.current);if(o&&!s||c===0||!s&&v.restTimeoutPending&&t.movementX**2+t.movementY**2<2)return;v.restTimeout.clear();function l(){if(v.restTimeoutPending=!1,E())return;let t=e.select(`open`);!v.blockMouseMove&&(!t||s)&&D()&&e.setOpen(!0,$(PC,n,r))}v.pointerType===`touch`?W.flushSync(()=>{l()}):s&&o?l():(v.restTimeoutPending=!0,v.restTimeout.start(c,l))}}},[n,v,E,O,a,e,S,D])}function qE(e){return Nx&&e.movementX===0&&e.movementY===0}function JE(e,t,n){switch(e){case`vertical`:return t;case`horizontal`:return n;default:return t||n}}function YE(e,t){return JE(t,e===`ArrowUp`||e===`ArrowDown`,e===`ArrowLeft`||e===`ArrowRight`)}function XE(e,t,n){return JE(t,e===`ArrowDown`,n?e===`ArrowLeft`:e===`ArrowRight`)||e===`Enter`||e===` `||e===``}function ZE(e,t,n){return JE(t,n?e===Vx:e===Hx,e===Wx)}function QE(e,t,n,r){return t===`both`||t===`horizontal`&&r?e===`Escape`:JE(t,n?e===Hx:e===Vx,e===Ux)}function $E(e,t){let{listRef:n,activeIndex:r,onNavigate:i=()=>{},enabled:a=!0,selectedIndex:o=null,allowEscape:s=!1,loopFocus:c=!1,nested:l=!1,rtl:u=!1,virtual:d=!1,focusItemOnOpen:f=`auto`,focusItemOnHover:p=!0,openOnArrowKeyDown:m=!0,disabledIndices:h=void 0,orientation:g=`vertical`,triggerOrientation:_=g,parentOrientation:v,id:y,resetOnPointerLeave:b=!0,externalTree:x,nestedReturnFocusRef:S,grid:C}=t,w=C!=null,T=e.useState(`open`),E=e.useState(`floatingElement`),D=e.useState(`domReferenceElement`),O=e.context.dataRef,k=pS(E),A=dS(D),j=Bw(k),M=HT(),N=UT(x),P=U.useRef(f),F=U.useRef(o??-1),I=U.useRef(null),L=U.useRef(!0),R=q(e=>{i(F.current===-1?null:F.current,e)}),z=U.useRef(!!E),B=U.useRef(T),ee=U.useRef(!1),V=U.useRef(!1),te=U.useRef(null),ne=Bw(h),H=Bw(T),re=Bw(o),ie=Bw(b),ae=ka(),oe=ka(),se=q(()=>{ae.cancel();function e(e){d||(te.current=gT(e,{sync:ee.current,preventScroll:!0}))}let t=n.current[F.current],r=V.current;t&&e(t),(ee.current?e=>e():e=>ae.request(e))(()=>{let i=n.current[F.current]||t;i&&(t||e(i),pe&&(r||!L.current)&&i.scrollIntoView?.({block:`nearest`,inline:`nearest`}))})});J(()=>{O.current.orientation=g},[O,g]),J(()=>{T||(I.current=null),(!T||f!==`auto`)&&(P.current=f)},[T,f]),J(()=>{a&&(T&&E?(F.current=o??-1,P.current&&o!=null&&(V.current=!0,R())):z.current&&(F.current=-1,R()))},[a,T,E,o,R]),J(()=>{if(a){if(!T)ee.current=!1;else if(E){if(r==null){if(ee.current=!1,re.current!=null)return;if(z.current&&(F.current=-1,se()),(!B.current||!z.current)&&P.current&&(I.current!=null||P.current===!0&&I.current==null)){let e=0,t=()=>{n.current[0]==null?(e<2&&(e?e=>oe.request(e):queueMicrotask)(t),e+=1):(F.current=I.current==null||XE(I.current,_,u)||l?XS(n):ZS(n),I.current=null,R())};t()}}else YS(n.current,r)||(F.current=r,se(),V.current=!1)}}},[a,T,E,r,re,l,n,_,u,R,se,oe]),J(()=>{if(!a||E||!N||d||!z.current)return;let e=N.nodesRef.current,t=e.find(e=>e.id===M)?.context?.elements.floating,n=Ix(Bb(D??t??null)),r=e.some(e=>e.context&&Q(e.context.elements.floating,n));t&&!r&&L.current&&t.focus({preventScroll:!0})},[a,E,D,N,M,d]),J(()=>{B.current=T,z.current=!!E});let ce=r!=null,le=q(e=>{if(!H.current)return;let t=n.current.indexOf(e.currentTarget);t!==-1&&(F.current!==t||r!==t)&&(F.current=t,R(e))}),ue=q(()=>v??N?.nodesRef.current.find(e=>e.id===M)?.context?.dataRef?.current.orientation),de=q(()=>XS(n,ne.current)),fe=q(t=>{if(L.current=!1,ee.current=!0,t.which===229||!H.current&&t.currentTarget===j.current)return;if(l&&QE(t.key,g,u,w)){YE(t.key,ue())||gS(t),e.setOpen(!1,$(VC,t.nativeEvent));let n=S?.current??D;vb(n)&&n.focus();return}r!=null&&r!==F.current&&!YS(n.current,r)&&(F.current=r);let i=F.current,a=XS(n,h),o=ZS(n,h);if(A||(t.key===`Home`&&(gS(t),F.current=a,R(t)),t.key===`End`&&(gS(t),F.current=o,R(t))),C!=null){let e=C(t,F.current,n,g,c,u,h,a,o);if(e!=null&&e!==F.current&&(F.current=e,R(t)),g===`both`)return}if(YE(t.key,g)){gS(t);let e=Ix(t.currentTarget.ownerDocument);if(T&&!d&&Q(t.currentTarget,e)&&!n.current.some(t=>t!=null&&Q(t,e))){F.current=XE(t.key,g,u)?a:o,R(t),r===F.current&&se();return}let{index:l,wrapped:f}=QS(n.current,i,{decrement:!XE(t.key,g,u),loopFocus:c,allowEscape:s,disabledIndices:h,minIndex:a,maxIndex:o});f&&(ee.current=!1),F.current=l,R(t)}}),pe=U.useMemo(()=>({onFocus(e){ee.current=!0,le(e)},onClick({currentTarget:e}){d||e.focus({preventScroll:!0})},onMouseMove(e){qE(e)||(ee.current=!0,V.current=!1,p&&le(e))},onPointerLeave(e){if(!H.current||!L.current||e.pointerType===`touch`)return;ee.current=!0;let t=e.relatedTarget;if(p&&!n.current.includes(t)&&ie.current&&(te.current?.(),te.current=null,F.current=-1,R(e),!d)){let e=j.current,t=Ix(Bb(e));e&&Q(e,t)&&e.focus({preventScroll:!0})}}}),[le,H,j,p,n,R,ie,d]),W=U.useMemo(()=>d&&T&&ce&&{"aria-activedescendant":`${y}-${r}`},[d,T,ce,y,r]),me=U.useMemo(()=>({...A?{}:W,onKeyDown(t){if(t.key===`Tab`&&t.shiftKey&&T&&!d){let n=Rx(t.nativeEvent);if(n&&!Q(j.current,n))return;gS(t);let r=$(zC,t.nativeEvent);e.setOpen(!1,r);let i=S?.current??D;!r.isCanceled&&vb(i)&&i.focus()}else fe(t)},onPointerMove(e){qE(e)||(L.current=!0)}}),[W,fe,j,A,e,T,d,D,S]),he=U.useMemo(()=>{function t(t){e.setOpen(!0,$(VC,t.nativeEvent,t.currentTarget))}function n(e){f===`auto`&&vS(e.nativeEvent)&&(P.current=!d)}function r(e){P.current=f,f===`auto`&&yS(e.nativeEvent)&&(P.current=!0)}return{onKeyDown(n){let r=e.select(`open`);L.current=!1;let i=n.key.startsWith(`Arrow`),a=ZE(n.key,ue(),u),o=YE(n.key,r?g:_),s=(l?a:o)||n.key===`Enter`||n.key.trim()===``;if(d&&r&&(!l||lS(n.currentTarget)))return fe(n);if(r||m||!i){if(s){let e=YE(n.key,ue());I.current=l&&e?null:n.key}l?a&&(gS(n),r?(F.current=de(),R(n),d&&j.current?.focus()):t(n)):o&&(re.current!=null&&(F.current=re.current),gS(n),!r&&m?t(n):fe(n),r&&R(n))}},onFocus(t){t.target===t.currentTarget&&e.select(`open`)&&!d&&(F.current=-1,R(t))},onPointerDown:r,onPointerEnter:r,onMouseDown:n,onClick:n}},[fe,f,de,l,R,e,m,g,_,ue,u,re,d,j]),ge=U.useMemo(()=>({...W,...he}),[W,he]);return U.useMemo(()=>a?{reference:ge,floating:me,item:pe,trigger:he}:{},[a,ge,me,he,pe])}function eD(e,t){let{listRef:n,elementsRef:r,activeIndex:i,onMatch:a,disabledIndices:o,onTyping:s,enabled:c=!0,resetMs:l=750,selectedIndex:u=null}=t,d=q(s),f=e.useState(`open`),p=qa(),m=U.useRef(``),h=U.useRef(u??i??-1),g=U.useRef(null),_=q(e=>{function t(e){return r?.current[e]}function s(e){let n=t(e);return n&&!nC(n)||n?.matches(`:disabled`)?!1:o==null||!eC(Hi,e,o)}function c(e,t,n=0){if(e.length===0)return-1;let r=(n%e.length+e.length)%e.length,i=t.toLowerCase();for(let t=0;t<e.length;t+=1){let n=(r+t)%e.length;if(e[n]?.toLowerCase().startsWith(i)&&s(n))return n}return-1}let _=n.current;if(m.current.length>0&&e.key===` `&&(gS(e),d?.(!0)),m.current.length>0&&m.current[0]!==` `&&c(_,m.current)===-1&&e.key!==` `&&d?.(!1),_==null||e.key.length!==1||e.ctrlKey||e.metaKey||e.altKey)return;f&&e.key!==` `&&(gS(e),d?.(!0));let v=m.current===``;v&&(h.current=u??i??-1),_.every((e,t)=>e&&s(t)?e[0]?.toLowerCase()!==e[1]?.toLowerCase():!0)&&m.current===e.key&&(m.current=``,h.current=g.current),m.current+=e.key,p.start(l,()=>{m.current=``,h.current=g.current,d?.(!1)});let y=((v?u??i??-1:h.current)??0)+1,b=c(_,m.current,y);b===-1?e.key!==` `&&(m.current=``,d?.(!1)):(a?.(b,e),g.current=b)}),v=q(t=>{let n=t.relatedTarget,r=e.select(`domReferenceElement`),i=e.select(`floatingElement`);Q(r,n)||Q(i,n)||(p.clear(),m.current=``,h.current=g.current,d?.(!1))});J(()=>{(f||u===null)&&(p.clear(),g.current=null,m.current!==``&&(m.current=``,d?.(!1)))},[f,u,p,d]);let y=U.useMemo(()=>({onKeyDown:_,onBlur:v}),[_,v]);return U.useMemo(()=>c?{reference:y,floating:y}:{},[c,y])}var tD=.1,nD=tD*tD,rD=.5;function iD(e,t,n,r,i,a){return r>=t!=a>=t&&e<=(i-n)*(t-r)/(a-r)+n}function aD(e,t,n,r,i,a,o,s,c,l){let u=!1;return iD(e,t,n,r,i,a)&&(u=!u),iD(e,t,i,a,o,s)&&(u=!u),iD(e,t,o,s,c,l)&&(u=!u),iD(e,t,c,l,n,r)&&(u=!u),u}function oD(e,t,n){return e>=n.x&&e<=n.x+n.width&&t>=n.y&&t<=n.y+n.height}function sD(e,t,n,r,i,a){return e>=Math.min(n,i)&&e<=Math.max(n,i)&&t>=Math.min(r,a)&&t<=Math.max(r,a)}function cD(e={}){let{blockPointerEvents:t=!1}=e,n=new Ka,r=({x:e,y:t,placement:r,elements:i,onClose:a,nodeId:o,tree:s})=>{let c=r?.split(`-`)[0],l=!1,u=null,d=null,f=typeof performance<`u`?performance.now():0;function p(e,t){let n=performance.now(),r=n-f;if(u===null||d===null||r===0)return u=e,d=t,f=n,!1;let i=e-u,a=t-d,o=i*i+a*a,s=r*r*nD;return u=e,d=t,f=n,o<s}function m(){n.clear(),a()}return function(r){n.clear();let a=i.domReference,u=i.floating;if(!a||!u||c==null||e==null||t==null)return;let{clientX:d,clientY:f}=r,h=Rx(r),g=r.type===`mouseleave`,_=Q(u,h),v=Q(a,h);if(_&&(l=!0,!g))return;if(v&&(l=!1,!g)){l=!0;return}if(g&&_b(r.relatedTarget)&&Q(u,r.relatedTarget))return;function y(){return!!(s&&mS(s.nodesRef.current,o).length>0)}function b(){y()||m()}if(y())return;let x=a.getBoundingClientRect(),S=u.getBoundingClientRect(),C=e>S.right-S.width/2,w=t>S.bottom-S.height/2,T=S.width>x.width,E=S.height>x.height,D=(T?x:S).left,O=(T?x:S).right,k=(E?x:S).top,A=(E?x:S).bottom;if(c===`top`&&t>=x.bottom-1||c===`bottom`&&t<=x.top+1||c===`left`&&e>=x.right-1||c===`right`&&e<=x.left+1){b();return}let j=!1;switch(c){case`top`:j=sD(d,f,D,x.top+1,O,S.bottom-1);break;case`bottom`:j=sD(d,f,D,S.top+1,O,x.bottom-1);break;case`left`:j=sD(d,f,S.right-1,A,x.left+1,k);break;case`right`:j=sD(d,f,x.right-1,A,S.left+1,k)}if(j)return;if(l&&!oD(d,f,x)||!g&&p(d,f)){b();return}let M=!1;switch(c){case`top`:{let n=T?rD/2:rD*4,r=T||C?e+n:e-n,i=T?e-n:C?e+n:e-n,a=t+rD+1,o=C||T?S.bottom-rD:S.top,s=C?T?S.bottom-rD:S.top:S.bottom-rD;M=aD(d,f,r,a,i,a,S.left,o,S.right,s);break}case`bottom`:{let n=T?rD/2:rD*4,r=T||C?e+n:e-n,i=T?e-n:C?e+n:e-n,a=t-rD,o=C||T?S.top+rD:S.bottom,s=C?T?S.top+rD:S.bottom:S.top+rD;M=aD(d,f,r,a,i,a,S.left,o,S.right,s);break}case`left`:{let n=E?rD/2:rD*4,r=E||w?t+n:t-n,i=E?t-n:w?t+n:t-n,a=e+rD+1,o=w||E?S.right-rD:S.left,s=w?E?S.right-rD:S.left:S.right-rD;M=aD(d,f,o,S.top,s,S.bottom,a,r,a,i);break}case`right`:{let n=E?rD/2:rD*4,r=E||w?t+n:t-n,i=E?t-n:w?t+n:t-n,a=e-rD,o=w||E?S.left+rD:S.right,s=w?E?S.left+rD:S.right:S.left+rD;M=aD(d,f,a,r,a,i,o,S.top,s,S.bottom);break}}M?l||n.start(40,b):b()}};return r.__options={...e,blockPointerEvents:t},r}function lD(e,t,n){let{reference:r,floating:i}=e,a=PS(t),o=FS(t),s=NS(o),c=AS(t),l=a===`y`,u=r.x+r.width/2-i.width/2,d=r.y+r.height/2-i.height/2,f=r[s]/2-i[s]/2,p;switch(c){case`top`:p={x:u,y:r.y-i.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-i.width,y:d};break;default:p={x:r.x,y:r.y}}let m=jS(t);return m&&(p[o]+=f*(m===`end`?1:-1)*(n&&l?-1:1)),p}async function uD(e,t){t===void 0&&(t={});let{x:n,y:r,platform:i,rects:a,elements:o,strategy:s}=e,{boundary:c=`clippingAncestors`,rootBoundary:l=`viewport`,elementContext:u=`floating`,altBoundary:d=!1,padding:f=0}=kS(t,e),p=qS(f),m=o[d?u===`floating`?`reference`:`floating`:u],h=JS(await i.getClippingRect({element:await(i.isElement==null?void 0:i.isElement(m))??!0?m:m.contextElement||await(i.getDocumentElement==null?void 0:i.getDocumentElement(o.floating)),boundary:c,rootBoundary:l,strategy:s})),g=u===`floating`?{x:n,y:r,width:a.floating.width,height:a.floating.height}:a.reference,_=await(i.getOffsetParent==null?void 0:i.getOffsetParent(o.floating)),v=await(i.isElement==null?void 0:i.isElement(_))&&await(i.getScale==null?void 0:i.getScale(_))||{x:1,y:1},y=JS(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:o,rect:g,offsetParent:_,strategy:s}):g);return{top:(h.top-y.top+p.top)/v.y,bottom:(y.bottom-h.bottom+p.bottom)/v.y,left:(h.left-y.left+p.left)/v.x,right:(y.right-h.right+p.right)/v.x}}var dD=50,fD=async(e,t,n)=>{let{placement:r=`bottom`,strategy:i=`absolute`,middleware:a=[],platform:o}=n,s=o.detectOverflow?o:{...o,detectOverflow:uD},c=await(o.isRTL==null?void 0:o.isRTL(t)),l=await o.getElementRects({reference:e,floating:t,strategy:i}),{x:u,y:d}=lD(l,r,c),f=r,p=0,m={};for(let n=0;n<a.length;n++){let h=a[n];if(!h)continue;let{name:g,fn:_}=h,{x:v,y,data:b,reset:x}=await _({x:u,y:d,initialPlacement:r,placement:f,strategy:i,middlewareData:m,rects:l,platform:s,elements:{reference:e,floating:t}});u=v??u,d=y??d,m[g]={...m[g],...b},x&&p<dD&&(p++,typeof x==`object`&&(x.placement&&(f=x.placement),x.rects&&(l=x.rects===!0?await o.getElementRects({reference:e,floating:t,strategy:i}):x.rects),{x:u,y:d}=lD(l,f,c)),n=-1)}return{x:u,y:d,placement:f,strategy:i,middlewareData:m}},pD=function(e){return e===void 0&&(e={}),{name:`flip`,options:e,async fn(t){var n;let{placement:r,middlewareData:i,rects:a,initialPlacement:o,platform:s,elements:c}=t,{mainAxis:l=!0,crossAxis:u=!0,fallbackPlacements:d,fallbackStrategy:f=`bestFit`,fallbackAxisSideDirection:p=`none`,flipAlignment:m=!0,...h}=kS(e,t);if((n=i.arrow)!=null&&n.alignmentOffset)return{};let g=AS(r),_=PS(o),v=AS(o)===o,y=await(s.isRTL==null?void 0:s.isRTL(c.floating)),b=d||(v||!m?[GS(o)]:LS(o)),x=p!==`none`;!d&&x&&b.push(...WS(o,m,p,y));let S=[o,...b],C=await s.detectOverflow(t,h),w=[],T=i.flip?.overflows||[];if(l&&w.push(C[g]),u){let e=IS(r,a,y);w.push(C[e[0]],C[e[1]])}if(T=[...T,{placement:r,overflows:w}],!w.every(e=>e<=0)){let e=(i.flip?.index||0)+1,t=S[e];if(t&&(u!==`alignment`||_===PS(t)||T.every(e=>PS(e.placement)!==_||e.overflows[0]>0)))return{data:{index:e,overflows:T},reset:{placement:t}};let n=T.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0]?.placement;if(!n)switch(f){case`bestFit`:{let e=T.filter(e=>{if(x){let t=PS(e.placement);return t===_||t===`y`}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]?.[0];e&&(n=e);break}case`initialPlacement`:n=o}if(r!==n)return{reset:{placement:n}}}return{}}}},mD=new Set([`left`,`top`]);async function hD(e,t){let{placement:n,platform:r,elements:i}=e,a=await(r.isRTL==null?void 0:r.isRTL(i.floating)),o=AS(n),s=jS(n),c=PS(n)===`y`,l=mD.has(o)?-1:1,u=a&&c?-1:1,d=kS(t,e),{mainAxis:f,crossAxis:p,alignmentAxis:m}=typeof d==`number`?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return s&&typeof m==`number`&&(p=s===`end`?m*-1:m),c?{x:p*u,y:f*l}:{x:f*l,y:p*u}}var gD=function(e){return e===void 0&&(e=0),{name:`offset`,options:e,async fn(t){var n;let{x:r,y:i,placement:a,middlewareData:o}=t,s=await hD(t,e);return a===o.offset?.placement&&(n=o.arrow)!=null&&n.alignmentOffset?{}:{x:r+s.x,y:i+s.y,data:{...s,placement:a}}}}},_D=function(e){return e===void 0&&(e={}),{name:`shift`,options:e,async fn(t){let{x:n,y:r,placement:i,platform:a}=t,{mainAxis:o=!0,crossAxis:s=!1,limiter:c={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...l}=kS(e,t),u={x:n,y:r},d=await a.detectOverflow(t,l),f=PS(i),p=MS(f),m=u[p],h=u[f],g=(e,t)=>OS(t+d[e===`y`?`top`:`left`],t,t-d[e===`y`?`bottom`:`right`]);o&&(m=g(p,m)),s&&(h=g(f,h));let _=c.fn({...t,[p]:m,[f]:h});return{..._,data:{x:_.x-n,y:_.y-r,enabled:{[p]:o,[f]:s}}}}}},vD=function(e){return e===void 0&&(e={}),{options:e,fn(t){let{x:n,y:r,placement:i,rects:a,middlewareData:o}=t,{offset:s=0,mainAxis:c=!0,crossAxis:l=!0}=kS(e,t),u={x:n,y:r},d=PS(i),f=MS(d),p=u[f],m=u[d],h=kS(s,t),g=typeof h==`number`?{mainAxis:h,crossAxis:0}:{mainAxis:h.mainAxis??0,crossAxis:h.crossAxis??0};if(c){let e=f===`y`?`height`:`width`,t=a.reference[f]-a.floating[e]+g.mainAxis,n=a.reference[f]+a.reference[e]-g.mainAxis;p<t?p=t:p>n&&(p=n)}if(l){let e=f===`y`?`width`:`height`,t=mD.has(AS(i)),n=a.reference[d]-a.floating[e]+(t&&o.offset?.[d]||0)+(t?0:g.crossAxis),r=a.reference[d]+a.reference[e]+(t?0:o.offset?.[d]||0)-(t?g.crossAxis:0);m<n?m=n:m>r&&(m=r)}return{[f]:p,[d]:m}}}},yD=function(e){return e===void 0&&(e={}),{name:`size`,options:e,async fn(t){let{placement:n,rects:r,platform:i,elements:a}=t,{apply:o=()=>{},...s}=kS(e,t),c=await i.detectOverflow(t,s),l=AS(n),u=jS(n),d=PS(n)===`y`,{width:f,height:p}=r.floating,m,h;l===`top`||l===`bottom`?(m=l,h=u===(await(i.isRTL==null?void 0:i.isRTL(a.floating))?`start`:`end`)?`left`:`right`):(h=l,m=u===`end`?`top`:`bottom`);let g=p-c.top-c.bottom,_=f-c.left-c.right,v=SS(p-c[m],g),y=SS(f-c[h],_),b=t.middlewareData.shift,x=!b,S=v,C=y;b!=null&&b.enabled.x&&(C=_),b!=null&&b.enabled.y&&(S=g),x&&!u&&(d?C=f-2*CS(c.left,c.right):S=p-2*CS(c.top,c.bottom)),await o({...t,availableWidth:C,availableHeight:S});let w=await i.getDimensions(a.floating);return f!==w.width||p!==w.height?{reset:{rects:!0}}:{}}}};function bD(e){let t=jb(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,i=vb(e),a=i?e.offsetWidth:n,o=i?e.offsetHeight:r,s=wS(n)!==a||wS(r)!==o;return s&&(n=a,r=o),{width:n,height:r,$:s}}function xD(e){return _b(e)?e:e.contextElement}function SD(e){let t=xD(e);if(!vb(t))return ES(1);let n=t.getBoundingClientRect(),{width:r,height:i,$:a}=bD(t),o=(a?wS(n.width):n.width)/r,s=(a?wS(n.height):n.height)/i;return(!o||!Number.isFinite(o))&&(o=1),(!s||!Number.isFinite(s))&&(s=1),{x:o,y:s}}var CD=ES(0);function wD(e){let t=mb(e);return!kb()||!t.visualViewport?CD:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function TD(e,t,n){return t===void 0&&(t=!1),!!n&&t&&n===mb(e)}function ED(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);let i=e.getBoundingClientRect(),a=xD(e),o=ES(1);t&&(r?_b(r)&&(o=SD(r)):o=SD(e));let s=TD(a,n,r)?wD(a):ES(0),c=(i.left+s.x)/o.x,l=(i.top+s.y)/o.y,u=i.width/o.x,d=i.height/o.y;if(a&&r){let e=mb(a),t=_b(r)?mb(r):r,n=e,i=Ib(n);for(;i&&t!==n;){let e=SD(i),t=i.getBoundingClientRect(),r=jb(i),a=t.left+(i.clientLeft+parseFloat(r.paddingLeft))*e.x,o=t.top+(i.clientTop+parseFloat(r.paddingTop))*e.y;c*=e.x,l*=e.y,u*=e.x,d*=e.y,c+=a,l+=o,n=mb(i),i=Ib(n)}}return JS({width:u,height:d,x:c,y:l})}function DD(e,t){let n=Mb(e).scrollLeft;return t?t.left+n:ED(hb(e)).left+n}function OD(e,t){let n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-DD(e,n),y:n.top+t.scrollTop}}function kD(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e,a=i===`fixed`,o=hb(r),s=t?Sb(t.floating):!1;if(r===o||s&&a)return n;let c={scrollLeft:0,scrollTop:0},l=ES(1),u=ES(0),d=vb(r);if((d||!a)&&((pb(r)!==`body`||bb(o))&&(c=Mb(r)),d)){let e=ED(r);l=SD(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}let f=o&&!d&&!a?OD(o,c):ES(0);return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-c.scrollLeft*l.x+u.x+f.x,y:n.y*l.y-c.scrollTop*l.y+u.y+f.y}}function AD(e){return e.getClientRects?Array.from(e.getClientRects()):[]}function jD(e){let t=Mb(e),n=e.ownerDocument.body,r=CS(e.scrollWidth,e.clientWidth,n.scrollWidth,n.clientWidth),i=CS(e.scrollHeight,e.clientHeight,n.scrollHeight,n.clientHeight),a=-t.scrollLeft+DD(e),o=-t.scrollTop;return jb(n).direction===`rtl`&&(a+=CS(e.clientWidth,n.clientWidth)-r),{width:r,height:i,x:a,y:o}}var MD=25;function ND(e,t,n){n===void 0&&(n=`viewport`);let r=n===`layoutViewport`,i=mb(e),a=hb(e),o=i.visualViewport,s=a.clientWidth,c=a.clientHeight,l=0,u=0;if(o){let e=!kb()||t===`fixed`;r?e||(l=-o.offsetLeft,u=-o.offsetTop):(s=o.width,c=o.height,e&&(l=o.offsetLeft,u=o.offsetTop))}if(DD(a)<=0){let e=a.ownerDocument,t=e.body,n=getComputedStyle(t),r=e.compatMode===`CSS1Compat`&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,i=Math.abs(a.clientWidth-t.clientWidth-r),o=getComputedStyle(a).scrollbarGutter===`stable both-edges`?i/2:i;o<=MD&&(s-=o)}return{width:s,height:c,x:l,y:u}}function PD(e,t){let n=ED(e,!0,t===`fixed`),r=n.top+e.clientTop,i=n.left+e.clientLeft,a=SD(e);return{width:e.clientWidth*a.x,height:e.clientHeight*a.y,x:i*a.x,y:r*a.y}}function FD(e,t,n){let r;if(t===`viewport`||t===`layoutViewport`)r=ND(e,n,t);else if(t===`document`)r=jD(hb(e));else if(_b(t))r=PD(t,n);else{let n=wD(e);r={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return JS(r)}function ID(e,t){let n=t.get(e);if(n)return n;let r=Fb(e,[],!1).filter(e=>_b(e)&&pb(e)!==`body`),i=null,a=jb(e).position===`fixed`,o=a?Nb(e):e;for(;_b(o)&&!Ab(o);){let e=jb(o),t=Db(o),n=i?i.position:a?`fixed`:``;!t&&(n===`fixed`||n===`absolute`&&e.position===`static`)?r=r.filter(e=>e!==o):i=e,o=Nb(o)}return t.set(e,r),r}function LD(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e,a=[...n===`clippingAncestors`?Sb(t)?[]:ID(t,this._c):[].concat(n),r],o=FD(t,a[0],i),s=o.top,c=o.right,l=o.bottom,u=o.left;for(let e=1;e<a.length;e++){let n=FD(t,a[e],i);s=CS(n.top,s),c=SS(n.right,c),l=SS(n.bottom,l),u=CS(n.left,u)}return{width:c-u,height:l-s,x:u,y:s}}function RD(e){let{width:t,height:n}=bD(e);return{width:t,height:n}}function zD(e,t,n){let r=vb(t),i=hb(t),a=n===`fixed`,o=ED(e,!0,a,t),s={scrollLeft:0,scrollTop:0},c=ES(0);if((r||!a)&&((pb(t)!==`body`||bb(i))&&(s=Mb(t)),r)){let e=ED(t,!0,a,t);c.x=e.x+t.clientLeft,c.y=e.y+t.clientTop}!r&&i&&(c.x=DD(i));let l=i&&!r&&!a?OD(i,s):ES(0);return{x:o.left+s.scrollLeft-c.x-l.x,y:o.top+s.scrollTop-c.y-l.y,width:o.width,height:o.height}}function BD(e){return jb(e).position===`static`}function VD(e,t){if(!vb(e)||jb(e).position===`fixed`)return null;if(t)return t(e);let n=e.offsetParent;return hb(e)===n&&(n=n.ownerDocument.body),n}function HD(e,t){let n=mb(e);if(Sb(e))return n;if(!vb(e)){let t=Nb(e);for(;t&&!Ab(t);){if(_b(t)&&!BD(t))return t;t=Nb(t)}return n}let r=VD(e,t);for(;r&&xb(r)&&BD(r);)r=VD(r,t);return r&&Ab(r)&&BD(r)&&!Db(r)?n:r||Ob(e)||n}var UD=async function(e){let t=this.getOffsetParent||HD,n=this.getDimensions,r=await n(e.floating);return{reference:zD(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function WD(e){return jb(e).direction===`rtl`}var GD={convertOffsetParentRelativeRectToViewportRelativeRect:kD,getDocumentElement:hb,getClippingRect:LD,getOffsetParent:HD,getElementRects:UD,getClientRects:AD,getDimensions:RD,getScale:SD,isElement:_b,isRTL:WD};function KD(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function qD(e,t,n){let r=null,i,a=hb(e);function o(){var e;clearTimeout(i),(e=r)==null||e.disconnect(),r=null}function s(n,c){n===void 0&&(n=!1),c===void 0&&(c=1),o();let l=e.getBoundingClientRect(),{left:u,top:d,width:f,height:p}=l;if(n||t(),!f||!p)return;let m=TS(d),h=TS(a.clientWidth-(u+f)),g=TS(a.clientHeight-(d+p)),_=TS(u),v={rootMargin:-m+`px `+-h+`px `+-g+`px `+-_+`px`,threshold:CS(0,SS(1,c))||1},y=!0;function b(t){let n=t[0].intersectionRatio;if(!KD(l,e.getBoundingClientRect()))return s();if(n!==c){if(!y)return s();n?s(!1,n):i=setTimeout(()=>{s(!1,1e-7)},1e3)}y=!1}try{r=new IntersectionObserver(b,{...v,root:a.ownerDocument})}catch{r=new IntersectionObserver(b,v)}r.observe(e)}let c=mb(e),l=()=>s(n);return c.addEventListener(`resize`,l),s(!0),()=>{c.removeEventListener(`resize`,l),o()}}function JD(e,t,n,r){r===void 0&&(r={});let{ancestorScroll:i=!0,ancestorResize:a=!0,elementResize:o=typeof ResizeObserver==`function`,layoutShift:s=typeof IntersectionObserver==`function`,animationFrame:c=!1}=r,l=xD(e),u=i||a?[...l?Fb(l):[],...t?Fb(t):[]]:[];u.forEach(e=>{i&&e.addEventListener(`scroll`,n),a&&e.addEventListener(`resize`,n)});let d=l&&s?qD(l,n,a):null,f=-1,p=null;o&&(p=new ResizeObserver(e=>{let[r]=e;r&&r.target===l&&p&&t&&(p.unobserve(t),cancelAnimationFrame(f),f=requestAnimationFrame(()=>{var e;(e=p)==null||e.observe(t)})),n()}),l&&!c&&p.observe(l),t&&p.observe(t));let m,h=c?ED(e):null;c&&g();function g(){let t=ED(e);h&&!KD(h,t)&&n(),h=t,m=requestAnimationFrame(g)}return n(),()=>{var e;u.forEach(e=>{i&&e.removeEventListener(`scroll`,n),a&&e.removeEventListener(`resize`,n)}),d?.(),(e=p)==null||e.disconnect(),p=null,c&&cancelAnimationFrame(m)}}var YD=gD,XD=_D,ZD=pD,QD=yD,$D=vD,eO=(e,t,n)=>{let r=new Map,i=n??{},a={...GD,...i.platform,_c:r};return fD(e,t,{...i,platform:a})},tO=typeof document<`u`?U.useLayoutEffect:function(){};function nO(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e==`function`&&e.toString()===t.toString())return!0;let n,r,i;if(e&&t&&typeof e==`object`){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!nO(e[r],t[r]))return!1;return!0}if(i=Object.keys(e),n=i.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,i[r]))return!1;for(r=n;r--!==0;){let n=i[r];if(!(n===`_owner`&&e.$$typeof)&&!nO(e[n],t[n]))return!1}return!0}return e!==e&&t!==t}function rO(e){return typeof window>`u`?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function iO(e,t){let n=rO(e);return Math.round(t*n)/n}function aO(e){let t=U.useRef(e);return tO(()=>{t.current=e}),t}function oO(e){e===void 0&&(e={});let{placement:t=`bottom`,strategy:n=`absolute`,middleware:r=[],platform:i,elements:{reference:a,floating:o}={},transform:s=!0,whileElementsMounted:c,open:l}=e,[u,d]=U.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[f,p]=U.useState(r);nO(f,r)||p(r);let[m,h]=U.useState(null),[g,_]=U.useState(null),v=U.useCallback(e=>{e!==S.current&&(S.current=e,h(e))},[]),y=U.useCallback(e=>{e!==C.current&&(C.current=e,_(e))},[]),b=a||m,x=o||g,S=U.useRef(null),C=U.useRef(null),w=U.useRef(u),T=c!=null,E=aO(c),D=aO(i),O=aO(l),k=U.useCallback(()=>{if(!S.current||!C.current)return;let e={placement:t,strategy:n,middleware:f};D.current&&(e.platform=D.current),eO(S.current,C.current,e).then(e=>{let t={...e,isPositioned:O.current!==!1};A.current&&!nO(w.current,t)&&(w.current=t,W.flushSync(()=>{d(t)}))})},[f,t,n,D,O]);tO(()=>{l===!1&&w.current.isPositioned&&(w.current.isPositioned=!1,d(e=>({...e,isPositioned:!1})))},[l]);let A=U.useRef(!1);tO(()=>(A.current=!0,()=>{A.current=!1}),[]),tO(()=>{if(b&&(S.current=b),x&&(C.current=x),b&&x){if(E.current)return E.current(b,x,k);k()}},[b,x,k,E,T]);let j=U.useMemo(()=>({reference:S,floating:C,setReference:v,setFloating:y}),[v,y]),M=U.useMemo(()=>({reference:b,floating:x}),[b,x]),N=U.useMemo(()=>{let e={position:n,left:0,top:0};if(!M.floating)return e;let t=iO(M.floating,u.x),r=iO(M.floating,u.y);return s?{...e,transform:`translate(`+t+`px, `+r+`px)`,...rO(M.floating)>=1.5&&{willChange:`transform`}}:{position:n,left:t,top:r}},[n,s,M.floating,u.x,u.y]);return U.useMemo(()=>({...u,update:k,refs:j,elements:M,floatingStyles:N}),[u,k,j,M,N])}var sO=(e,t)=>{let n=YD(e);return{name:n.name,fn:n.fn,options:[e,t]}},cO=(e,t)=>{let n=XD(e);return{name:n.name,fn:n.fn,options:[e,t]}},lO=(e,t)=>({fn:$D(e).fn,options:[e,t]}),uO=(e,t)=>{let n=ZD(e);return{name:n.name,fn:n.fn,options:[e,t]}},dO=(e,t)=>{let n=QD(e);return{name:n.name,fn:n.fn,options:[e,t]}},fO=U.createContext(void 0),pO=U.createContext(void 0);function mO(){let e=U.useContext(fO);if(e===void 0)throw Error(ha(60));return e}function hO(){let e=U.useContext(pO);if(e===void 0)throw Error(ha(61));return e}function gO(e,t,n=Object.is){let{length:r}=e;if(r!==t.length)return!1;for(let i=0;i<r;i+=1)if(!n(e[i],t[i]))return!1;return!0}var _O=(e,t)=>Object.is(e,t);function vO(e,t,n){return e==null||t==null?Object.is(e,t):n(e,t)}function yO(e,t,n){return Array.isArray(e)&&Array.isArray(t)?!gO(e,t,(e,t)=>vO(e,t,n)):e!==t}function bO(e,t,n){return e?e.some(e=>e!==void 0&&vO(t,e,n)):!1}function xO(e,t,n){return e?e.findIndex(e=>e!==void 0&&vO(e,t,n)):-1}function SO(e,t){if(t!==_O)return n=>bO(e,n,t);let n=new Set(e);return n.delete(void 0),t=>n.has(t)&&(t!==0||e.some(e=>Object.is(t,e)))}function CO(e,t,n,r){let i=r&&Array.isArray(t)?e.findIndex(SO(t,n)):xO(e,t,n);return i===-1?null:i}function wO(e,t,n,r,i,a){return bO(r,t,i)?a!=null&&e>a&&bO(r,n[a],i)?a:e:e===a?CO(n,r,i,!0):a}function TO(e,t,n){return e.filter(e=>!vO(t,e,n))}function EO(e){if(e==null)return``;if(typeof e==`string`)return e;try{return JSON.stringify(e)}catch{return String(e)}}function DO(e){return typeof e==`object`&&!!e&&Array.isArray(e.items)}function OO(e){return DO(e?.[0])}function kO(e){return OO(e)?e.flatMap(e=>e.items):e}function AO(e){if(!Array.isArray(e))return e!=null&&`null`in e;let t=e;if(OO(t)){for(let e of t)for(let t of e.items)if(t&&t.value==null&&t.label!=null)return!0;return!1}for(let e of t)if(e&&e.value==null&&e.label!=null)return!0;return!1}function jO(e,t){if(t&&e!=null)return t(e)??``;if(e&&typeof e==`object`){if(`label`in e&&e.label!=null)return String(e.label);if(`value`in e)return String(e.value)}return EO(e)}function MO(e,t){return t&&e!=null?t(e)??``:e&&typeof e==`object`&&`value`in e&&`label`in e?EO(e.value):EO(e)}function NO(e,t,n){function r(){return jO(e,n)}if(n&&e!=null)return n(e);if(e&&typeof e==`object`&&`label`in e&&e.label!=null)return e.label;if(t&&!Array.isArray(t))return(Object.hasOwn(t,e)?t[e]:void 0)??r();if(Array.isArray(t)){let n=kO(t);if(typeof e!=`object`||!e){let t=n.find(t=>t.value===e);return t&&t.label!=null?t.label:r()}if(`value`in e){let t=n.find(t=>t&&t.value===e.value);if(t&&t.label!=null)return t.label}}return r()}function PO(e,t,n){return e.reduce((e,r,i)=>(i>0&&e.push(`, `),e.push((0,G.jsx)(U.Fragment,{children:NO(r,t,n)},i)),e),[])}var FO={id:e=>e.id,labelId:e=>e.labelId,modal:e=>e.modal,multiple:e=>e.multiple,disabled:e=>e.disabled,readOnly:e=>e.readOnly,required:e=>e.required,highlightItemOnHover:e=>e.highlightItemOnHover,items:e=>e.items,itemToStringLabel:e=>e.itemToStringLabel,isItemEqualToValue:e=>e.isItemEqualToValue,value:e=>e.value,hasSelectedValue:e=>{let{value:t,multiple:n,itemToStringValue:r}=e;return t==null?!1:n&&Array.isArray(t)?t.length>0:MO(t,r)!==``},hasNullItemLabel:(e,t)=>t?AO(e.items):!1,open:e=>e.open,mounted:e=>e.mounted,forceMount:e=>e.forceMount,transitionStatus:e=>e.transitionStatus,openMethod:e=>e.openMethod,activeIndex:e=>e.activeIndex,selectedIndex:e=>e.selectedIndex,isActive:(e,t)=>e.activeIndex===t,isSelected:(e,t)=>{let n=e.isItemEqualToValue,r=e.value;return e.multiple?Array.isArray(r)&&r.some(e=>vO(t,e,n)):vO(t,r,n)},isSelectedByFocus:(e,t)=>e.selectedIndex===t,popupProps:e=>e.popupProps,triggerProps:e=>e.triggerProps,itemRoot:e=>e.itemRoot,triggerElement:e=>e.triggerElement,positionerElement:e=>e.positionerElement,listElement:e=>e.listElement,popupSide:e=>e.popupSide,scrollUpArrowVisible:e=>e.scrollUpArrowVisible,scrollDownArrowVisible:e=>e.scrollDownArrowVisible,hasScrollArrows:e=>e.hasScrollArrows};function IO(e){let t=U.useRef(``),n=U.useCallback(n=>{n.defaultPrevented||(t.current=n.pointerType,e(n,n.pointerType))},[e]);return{onClick:U.useCallback(n=>{n.detail===0?e(n,`keyboard`):(`pointerType`in n?e(n,n.pointerType):e(n,t.current),t.current=``)},[e]),onPointerDown:n}}function LO(e,t){let{onClick:n,onPointerDown:r}=IO(q((n,r)=>{(typeof e==`function`?e():e)||t(r||(Ox?`touch`:``))}));return U.useMemo(()=>({onClick:n,onPointerDown:r}),[n,r])}function RO(e){let[t,n]=U.useState(null),r=LO(e,n);return AC(e,t=>{t&&!e&&n(null)}),U.useMemo(()=>({openMethod:t,triggerProps:r}),[t,r])}function zO(e,t=-(2**53-1),n=2**53-1){return Math.max(t,Math.min(e,n))}function BO(e,t){return Math.max(0,e-t)}function VO(e,t){if(t<=0)return 0;let n=zO(e,0,t),r=n,i=t-n,a=r<=1,o=i<=1;return a&&o?r<=i?0:t:a?0:o?t:n}function HO(e){let{id:t,value:n,defaultValue:r=null,onValueChange:i,open:a,defaultOpen:o=!1,onOpenChange:s,name:c,form:l,autoComplete:u,disabled:d=!1,readOnly:f=!1,required:p=!1,modal:m=!0,actionsRef:h,inputRef:g,onOpenChangeComplete:_,items:v,multiple:y=!1,itemToStringLabel:b,itemToStringValue:x,isItemEqualToValue:S=_O,highlightItemOnHover:C=!0,children:w}=e,{clearErrors:T}=lx(),{setDirty:E,setTouched:D,setFocused:O,validityData:k,setFilled:A,name:j,disabled:M,validation:N,validationMode:P}=sx(),F=xx({id:t}),I=M||d,L=j??c,[R,z]=yw({controlled:n,default:y?r??Hi:r,name:`Select`,state:`value`}),[B,ee]=yw({controlled:a,default:o,name:`Select`,state:`open`}),V=U.useRef([]),te=U.useRef([]),ne=U.useRef(null),H=U.useRef(null),re=U.useRef(0),ie=U.useRef(null),ae=U.useRef([]),oe=U.useRef(!1),se=U.useRef(null),ce=U.useRef(null),le=U.useRef({allowSelectedMouseUp:!1,allowUnselectedMouseUp:!1,dragY:0}),ue=U.useRef(!1),de=U.useRef(R),{openMethod:fe,triggerProps:pe}=RO(B),W=Ai(()=>new tT({id:F,labelId:void 0,modal:m,multiple:y,disabled:I,readOnly:f,required:p,highlightItemOnHover:C,itemToStringLabel:b,itemToStringValue:x,isItemEqualToValue:S,value:R,open:B,mounted:B,transitionStatus:void 0,items:v,forceMount:!1,openMethod:null,activeIndex:null,selectedIndex:null,popupProps:Ui,triggerProps:Ui,itemRoot:{props:Ui,multiple:y,disabled:I,readOnly:f,isItemEqualToValue:S},triggerElement:null,positionerElement:null,listElement:null,popupSide:null,scrollUpArrowVisible:!1,scrollDownArrowVisible:!1,hasScrollArrows:!1},{setValue:Vi,setOpen:Vi,handleScrollArrowVisibility:Vi,onOpenChangeComplete:Vi,listRef:V,popupRef:ne,scrollHandlerRef:H,scrollArrowsMountedCountRef:re,valueRef:ie,valuesRef:ae,labelsRef:te,typingRef:oe,selectionRef:le,firstItemTextRef:se,selectedItemTextRef:ce,alignItemWithTriggerActiveRef:ue,initialValueRef:de},FO)).current,[me,he]=U.useState(!1),{mounted:ge,transitionStatus:_e,forceUnmount:ve}=uE({open:B,ref:ne,preventUnmountOnClose:me,setPreventUnmountOnClose:he,onUnmount(){W.update({activeIndex:null,openMethod:null,scrollUpArrowVisible:!1,scrollDownArrowVisible:!1}),_?.(!1)}}),ye=W.useState(`activeIndex`),be=W.useState(`selectedIndex`),xe=W.useState(`triggerElement`),Se=W.useState(`positionerElement`),Ce=Rw(fe),we=fe??Ce,Te=U.useMemo(()=>y?``:MO(R,x),[y,R,x]),Ee=U.useMemo(()=>y&&Array.isArray(R)?R.map(e=>MO(e,x)):MO(R,x),[y,R,x]);kC(Bw(xe),F,R,q(()=>Ee),!I,c);let De=y?Array.isArray(R)&&R.length>0:R!=null&&Te!==``;J(()=>{A(De)},[De,A]),J(function(){let e=CO(ae.current,R,S,y);e===null&&(ce.current=null),!B&&W.set(`selectedIndex`,e)},[y,B,R,S,W]),AC(R,()=>{T(L),E(yO(R,k.initialValue,S)),N.change(R)});let Oe=q((e,t)=>{let n=t,r=vE(n);s?.(e,n),!t.isCanceled&&(e||he(r()),ee(e),!e&&(t.reason===`focus-out`||t.reason===`outside-press`)&&(D(!0),O(!1),P===`onBlur`&&N.commit(R)))});U.useImperativeHandle(h,()=>({unmount:ve,close:()=>{W.state.open&&Oe(!1,$(YC))}}),[ve,Oe,W]);let ke=q((e,t)=>{i?.(e,t),!t.isCanceled&&z(e)}),Ae=q(e=>{let t=BO(e.scrollHeight,e.clientHeight),n=VO(e.scrollTop,t),r=n>0,i=n<t;W.set(`scrollUpArrowVisible`,r),W.set(`scrollDownArrowVisible`,i)}),je=IE({open:B,onOpenChange:Oe,elements:{reference:xe,floating:Se}}),Me=nE(je,{enabled:!I,event:`mousedown`}),Ne=cE(je),Pe=$E(je,{enabled:!I,listRef:V,activeIndex:ye,selectedIndex:be,disabledIndices:Hi,onNavigate(e){(e!==null||B)&&W.set(`activeIndex`,e)},focusItemOnHover:C}),Fe=eD(je,{enabled:!I&&(B||!f&&!y),listRef:te,activeIndex:ye,selectedIndex:be,disabledIndices:e=>zw(V.current[e]),onMatch(e){B?W.set(`activeIndex`,e):ke(ae.current[e],$(MC))},onTyping(e){oe.current=e}}),Ie=U.useMemo(()=>Ji(Fe.reference,Pe.reference,Ne.reference,Me.reference,pe),[Me.reference,Fe.reference,Pe.reference,Ne.reference,pe]),Le=U.useMemo(()=>Ji(dE,Fe.floating,Pe.floating,Ne.floating),[Fe.floating,Pe.floating,Ne.floating]),Re=Pe.item??Ui,ze=U.useMemo(()=>({props:Re,multiple:y,disabled:I,readOnly:f,isItemEqualToValue:S}),[Re,y,I,f,S]);W.useContextCallback(`setValue`,ke),W.useContextCallback(`setOpen`,Oe),W.useContextCallback(`handleScrollArrowVisibility`,Ae),W.useContextCallback(`onOpenChangeComplete`,_),Lw(()=>{W.update({popupProps:Le,triggerProps:Ie,itemRoot:ze})}),W.useSyncedValues({id:F,modal:m,multiple:y,disabled:I,readOnly:f,required:p,highlightItemOnHover:C,value:R,open:B,mounted:ge,transitionStatus:_e,popupProps:Le,triggerProps:Ie,itemRoot:ze,items:v,itemToStringLabel:b,itemToStringValue:x,isItemEqualToValue:S,openMethod:we});let Be=ji(g,N.inputRef),Ve=y?void 0:L,He=U.useMemo(()=>!y||!Array.isArray(R)||!L?null:R.map(e=>{let t=MO(e,x);return(0,G.jsx)(`input`,{type:`hidden`,form:l,name:L,value:t,disabled:I},t)}),[y,R,l,L,x,I]);return(0,G.jsxs)(fO.Provider,{value:W,children:[(0,G.jsx)(pO.Provider,{value:je,children:w}),(0,G.jsx)(`input`,{...N.getValidationProps(I,{onFocus(){W.state.triggerElement?.focus({focusVisible:!0})},onChange(e){if(e.nativeEvent.defaultPrevented||I||f)return;let t=e.currentTarget.value,n=$(MC,e.nativeEvent);function r(){if(y)return;let e=t.toLowerCase(),r=ae.current.findIndex(t=>MO(t,x).toLowerCase()===e||jO(t,b).toLowerCase()===e);r===-1&&(r=ae.current.findIndex((t,n)=>{let r=te.current[n];return r!=null&&r.toLowerCase()===e}));let i=ae.current[r];i!=null&&ke(i,n)}W.set(`forceMount`,!0),queueMicrotask(r)}}),id:F&&Ve==null?`${F}-hidden-input`:void 0,form:l,name:Ve,autoComplete:u,value:Te,disabled:I,required:p&&!(y&&De),readOnly:f,ref:Be,style:L?Sw:xw,tabIndex:-1,"aria-hidden":!0,suppressHydrationWarning:!0}),He]})}function UO(e,t){return e??t}var WO=5;function GO(e,t){let n=KO(t);return e.clientX>=n.left-WO&&e.clientX<=n.right+WO&&e.clientY>=n.top-WO&&e.clientY<=n.bottom+WO}function KO(e){let t=e.getBoundingClientRect(),n=mb(e);if(Fx)return t;let r=n.getComputedStyle(e,`::before`),i=n.getComputedStyle(e,`::after`);if(r.content===`none`&&i.content===`none`)return t;let a=parseFloat(r.width)||0,o=parseFloat(r.height)||0,s=parseFloat(i.width)||0,c=parseFloat(i.height)||0,l=Math.max(t.width,a,s),u=Math.max(t.height,o,c),d=l-t.width,f=u-t.height;return{left:t.left-d/2,right:t.right+d/2,top:t.top-f/2,bottom:t.bottom+f/2}}var qO=`data-popup-side`,JO=400,YO={...nS,...ix,popupSide:e=>e?{[qO]:e}:null,value:()=>null},XO=U.forwardRef(function(e,t){let{render:n,className:r,id:i,disabled:a=!1,nativeButton:o=!0,style:s,...c}=e,{setTouched:l,validationMode:u,validation:d,state:f,disabled:p}=sx(),{labelId:m}=_x(),h=mO(),g=h.useState(`readOnly`),_=h.useState(`required`),v=h.useState(`disabled`),y=p||v||a,b=h.useState(`open`),x=h.useState(`mounted`),S=h.useState(`value`),C=h.useState(`triggerProps`),w=h.useState(`positionerElement`),T=h.useState(`listElement`),E=h.useState(`popupSide`),D=h.useState(`id`),O=h.useState(`labelId`),k=h.useState(`hasSelectedValue`),A=x&&w?E:null,j=i??D,M=UO(m,O);xx({id:i});let N=Bw(w),P=U.useRef(null),F=OC(y,P),{getButtonProps:I,buttonRef:L}=Hb({disabled:y,native:o}),R=h.useStateSetter(`triggerElement`),z=qa(),B=qa(),ee=qa();U.useEffect(()=>{if(b)return ee.start(JO,()=>{h.context.selectionRef.current.allowUnselectedMouseUp=!0,h.context.selectionRef.current.allowSelectedMouseUp=!0}),()=>{ee.clear()};h.context.selectionRef.current={allowSelectedMouseUp:!1,allowUnselectedMouseUp:!1,dragY:0},B.clear()},[b,h,B,ee]);let V=Ji(C,{id:j,role:`combobox`,"aria-expanded":b,"aria-haspopup":`listbox`,"aria-controls":b?T?.id??pS(w)?.id:void 0,"aria-labelledby":M,"aria-readonly":g||void 0,"aria-required":_||void 0,tabIndex:y?-1:0,onFocus(e){F(!0),b&&h.context.alignItemWithTriggerActiveRef.current&&h.context.setOpen(!1,$(MC,e.nativeEvent)),z.start(0,()=>{h.set(`forceMount`,!0)})},onBlur(e){Q(w,e.relatedTarget)||(l(!0),F(!1),u===`onBlur`&&d.commit(S))},onMouseDown(e){if(b)return;let t=Bb(e.currentTarget);function n(e){if(!P.current)return;let t=e.target;Q(P.current,t)||Q(N.current,t)||GO(e,P.current)||h.context.setOpen(!1,$(WC,e))}B.start(0,()=>{t.addEventListener(`mouseup`,n,{once:!0})})}},c,I),te=d.getValidationProps(y,V);te.role=`combobox`;let ne={...f,open:b,disabled:y,value:S,readOnly:g,popupSide:A,placeholder:!k};return sa(`button`,e,{ref:[t,P,L,R],state:ne,stateAttributesMapping:YO,props:te})}),ZO={value:()=>null},QO=U.forwardRef(function(e,t){let{className:n,render:r,children:i,placeholder:a,style:o,...s}=e,c=mO(),l=c.useState(`value`),u=c.useState(`items`),d=c.useState(`itemToStringLabel`),f=c.useState(`hasSelectedValue`),p=!f&&a!=null&&i==null,m=c.useState(`hasNullItemLabel`,p),h={value:l,placeholder:!f},g=null;return g=typeof i==`function`?i(l):i??(p&&!m?a:Array.isArray(l)?PO(l,u,d):NO(l,u,d)),sa(`span`,e,{state:h,ref:[t,c.context.valueRef],props:[{children:g},s],stateAttributesMapping:ZO})}),$O=U.forwardRef(function(e,t){let{render:n,className:r,style:i,...a}=e;return sa(`span`,e,{state:{open:mO().useState(`open`)},ref:t,props:[{"aria-hidden":!0,children:`▼`},a],stateAttributesMapping:tS})}),ek=U.forwardRef(function(e,t){let n=mO(),r=n.useState(`mounted`),i=n.useState(`forceMount`);return r||i?(0,G.jsx)(LT,{ref:t,...e}):null});function tk(e){return Ri(19)?e:e?`true`:void 0}var nk=U.createContext({register:()=>{},unregister:()=>{},subscribeMapChange:()=>()=>{},nextIndexRef:{current:0}});function rk(){return U.useContext(nk)}function ik(e){let{children:t,elementsRef:n,labelsRef:r,onMapChange:i}=e,a=q(i),[,o]=U.useState(0),s=Ai(ok).current,c=Ai(ak).current,l=U.useRef(0),u=U.useRef(!0),d=U.useRef(null),f=U.useRef(null),p=q(()=>{u.current||(u.current=!0,o(e=>e+1))}),m=q((e,t)=>{c.set(e,t),p()}),h=q(e=>{c.delete(e),p()}),g=q(e=>{let t=new Map;return n.current.length=0,r&&(r.current.length=0),e.forEach(e=>{t.set(e.element,{...e.registration.metadata??{},index:e.index}),n.current[e.index]=e.element,r&&(r.current[e.index]=e.registration.label===void 0?e.registration.textRef?.current?.textContent??e.element.textContent:e.registration.label)}),l.current=n.current.length,t});function _(e){if(f.current?.disconnect(),f.current=null,typeof MutationObserver!=`function`||e.length<2)return;let t=new MutationObserver(n=>{if(!lk(n))return;let r=null;for(let n of e)if(n.isConnected){if(r&&uk(r,n)>0){t.disconnect(),p();return}r=n}});f.current=t;let n=new Set;for(let t=1;t<e.length;t+=1){let r=ck(e[t-1],e[t]);r&&n.add(r)}n.forEach(e=>t.observe(e,{childList:!0}))}let v=q(()=>{let[e,t]=sk(c),n=g(e),r=d.current,i=!r||r.length!==e.length||e.some((e,t)=>{let n=r[t];return e.index!==n.index||e.element!==n.element||e.registration.index!==n.registration.index||e.registration.metadata!==n.registration.metadata});_(t),d.current=e,u.current=!1,i&&(s.forEach(e=>e(n)),a(n))});J(()=>(!u.current&&d.current&&g(d.current),()=>{n.current=[],r&&(r.current=[])}),[n,r,g]),J(()=>{u.current&&v()}),J(()=>()=>{f.current?.disconnect(),u.current=!0},[]);let y=q(e=>(s.add(e),()=>{s.delete(e)})),b=U.useMemo(()=>({register:m,unregister:h,subscribeMapChange:y,nextIndexRef:l}),[m,h,y,l]);return(0,G.jsx)(nk.Provider,{value:b,children:t})}function ak(){return new Map}function ok(){return new Set}function sk(e){let t=new Set,n=[],r=[];e.forEach((e,i)=>{if(!i.isConnected)return;let a=e.index,o={index:a??-1,element:i,registration:e};a===null?r.push(o):a>=0&&(t.add(a),n.push(o))});let i=0;return r.sort((e,t)=>uk(e.element,t.element)),r.forEach(e=>{for(;t.has(i);)i+=1;e.index=i,n.push(e),i+=1}),t.size>0&&n.sort((e,t)=>e.index-t.index),[n,r.map(e=>e.element)]}function ck(e,t){let n=e.parentElement;for(;n&&!n.contains(t);)n=n.parentElement;return n}function lk(e){for(let t of e)for(let e=0;e<t.removedNodes.length;e+=1)if(t.removedNodes[e].isConnected)return!0;return!1}function uk(e,t){return e.nextElementSibling===t?-1:t.nextElementSibling===e?1:e.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_FOLLOWING?-1:1}function dk(e){let{nodeId:t,externalTree:n,rootContext:r}=e,i=r.useState(`referenceElement`),a=r.useState(`floatingElement`),o=r.useState(`domReferenceElement`),s=r.useState(`open`),c=r.useState(`floatingId`),[l,u]=U.useState(null),d=U.useRef(null),f=UT(n),p=U.useMemo(()=>({reference:i,floating:a,domReference:o}),[i,a,o]),m=oO({...e,elements:{...p,...l&&{reference:l}}}),h=U.useCallback(e=>{let t=_b(e)?{getBoundingClientRect:()=>e.getBoundingClientRect(),getClientRects:()=>e.getClientRects(),contextElement:e}:e;u(t),m.refs.setReference(t)},[m.refs]),g=U.useMemo(()=>({...m.refs,setPositionReference:h,domReference:d}),[m.refs,h]),_=U.useMemo(()=>({...m.elements,domReference:o}),[m.elements,o]),v=U.useMemo(()=>({...m,dataRef:r.context.dataRef,open:s,onOpenChange:r.setOpen,events:r.context.events,floatingId:c,refs:g,elements:_,nodeId:t,rootStore:r}),[m,g,_,t,r,s,c]);return J(()=>{o&&(d.current=o)},[o]),J(()=>{r.context.dataRef.current.floatingContext=v;let e=f?.nodesRef.current.find(e=>e.id===t);e&&(e.context=v)}),U.useMemo(()=>({...m,context:v,refs:g,elements:_,rootStore:r}),[m,g,_,v,r])}var fk=U.createContext(void 0);function pk(){return U.useContext(fk)?.direction??`ltr`}var mk=e=>({name:`arrow`,options:e,async fn(t){let{x:n,y:r,placement:i,rects:a,platform:o,elements:s,middlewareData:c}=t,{element:l,padding:u=0}=kS(e,t)||{};if(l==null)return{};let d=qS(u),f={x:n,y:r},p=FS(i),m=NS(p),h=await o.getDimensions(l),g=p===`y`,_=g?`top`:`left`,v=g?`bottom`:`right`,y=g?`clientHeight`:`clientWidth`,b=a.reference[m]+a.reference[p]-f[p]-a.floating[m],x=f[p]-a.reference[p],S=s.floating[y]||a.floating[m],C=b/2-x/2,w=S/2-h[m]/2-1,T=Math.min(d[_],w),E=Math.min(d[v],w),D=T,O=S-h[m]-E,k=S/2-h[m]/2+C,A=OS(D,k,O),j=!c.arrow&&jS(i)!=null&&k!==A&&a.reference[m]/2-(k<D?T:E)-h[m]/2<0,M=j?k<D?k-D:k-O:0;return{[p]:f[p]+M,data:{[p]:A,centerOffset:k-A-M,...j&&{alignmentOffset:M}},reset:j}}}),hk=(e,t)=>{let{name:n,fn:r}=mk(e);return{name:n,fn:r,options:[e,t]}},gk={name:`hide`,async fn(e){let{width:t,height:n,x:r,y:i}=e.rects.reference,a=t===0&&n===0&&r===0&&i===0,o=await e.platform.detectOverflow(e,{elementContext:`reference`});return{data:{referenceHidden:o.top-n>=0||o.right-t>=0||o.bottom-n>=0||o.left-t>=0||a}}}},_k={sideX:`left`,sideY:`top`},vk=`--available-width`,yk=`--available-height`,bk=`--anchor-width`,xk=`--anchor-height`,Sk=`--transform-origin`,Ck=vk,wk=yk;function Tk(e,t,n){let r=e===`inline-start`||e===`inline-end`;return{top:`top`,right:r?n?`inline-start`:`inline-end`:`right`,bottom:`bottom`,left:r?n?`inline-end`:`inline-start`:`left`}[t]}function Ek(e,t,n){let{rects:r,placement:i}=e;return{side:Tk(t,AS(i),n),align:jS(i)||`center`,anchor:{width:r.reference.width,height:r.reference.height},positioner:{width:r.floating.width,height:r.floating.height}}}function Dk(e){return Ok(e,dk)}function Ok(e,t){let{anchor:n,positionMethod:r=`absolute`,side:i=`bottom`,sideOffset:a=0,align:o=`center`,alignOffset:s=0,collisionBoundary:c,collisionPadding:l=5,sticky:u=!1,arrowPadding:d=5,disableAnchorTracking:f=!1,inline:p,keepMounted:m=!1,floatingRootContext:h,mounted:g,collisionAvoidance:_,shift:v,nodeId:y,adaptiveOrigin:b,lazyFlip:x=!1,externalTree:S}=e,C=_.side||`flip`,w=_.align||`flip`,T=_.fallbackAxisSide||`end`,E=v?.crossAxis??!1,D=v?.rootBoundary,O=typeof n==`function`?n:void 0,k=q(O),A=O?k:n,j=Bw(n),M=Bw(g),N=pk()===`rtl`,[P,F]=U.useState(null);!g&&P!==null&&F(null);let I=x===`placement`,L=P?AS(P):null,R=P&&I?jS(P)||`center`:null,z=L||{top:`top`,right:`right`,bottom:`bottom`,left:`left`,"inline-end":N?`left`:`right`,"inline-start":N?`right`:`left`}[i],B=R||o,ee=B===`center`?z:`${z}-${B}`,V=l;typeof V==`number`?V={top:V,right:V,bottom:V,left:V}:V&&={top:V.top||0,right:V.right||0,bottom:V.bottom||0,left:V.left||0};let te=+(i===`bottom`),ne=+(i===`top`),H=+(i===`right`),re=+(i===`left`),ie={boundary:c===`clipping-ancestors`?`clippingAncestors`:c,padding:V},ae=U.useRef(null),oe=Bw(a),se=Bw(s),ce=typeof a==`function`?0:a,le=typeof s==`function`?0:s,ue=[];p&&ue.push(p),ue.push(sO(e=>{let t=Ek(e,i,N),n=typeof oe.current==`function`?oe.current(t):oe.current,r=typeof se.current==`function`?se.current(t):se.current;return{mainAxis:n,crossAxis:r,alignmentAxis:r}},[ce,le,N,i]));let de=w===`none`&&C!==`shift`,fe=!de&&(u||E||C===`shift`),pe=C===`none`?null:uO({...ie,padding:{top:V.top+1+te,right:V.right+1+re,bottom:V.bottom+1+ne,left:V.left+1+H},mainAxis:!E&&C===`flip`,crossAxis:w===`flip`&&`alignment`,fallbackAxisSideDirection:T}),W=de?null:cO({...ie,rootBoundary:D,mainAxis:w!==`none`,crossAxis:fe,limiter:u||E?void 0:lO(e=>{if(!ae.current)return{};let{width:t,height:n}=ae.current.getBoundingClientRect(),r=PS(AS(e.placement)),i=r===`y`?t:n,a=r===`y`?V.left+V.right:V.top+V.bottom;return{offset:i/2+a/2}})},[ie,u,E,D,V,w]);C===`shift`||w===`shift`||B===`center`?ue.push(W,pe):ue.push(pe,W),ue.push(dO({...ie,apply({elements:{floating:e},availableWidth:t,availableHeight:n,rects:r}){if(!M.current)return;let i=e.style;i.setProperty(Ck,`${t}px`),i.setProperty(wk,`${n}px`);let a=mb(e).devicePixelRatio||1,{x:o,y:s,width:c,height:l}=r.reference,u=(Math.round((o+c)*a)-Math.round(o*a))/a,d=(Math.round((s+l)*a)-Math.round(s*a))/a;i.setProperty(bk,`${u}px`),i.setProperty(xk,`${d}px`)}}),hk(e=>({element:ae.current||Bb(e.elements.floating).createElement(`div`),padding:ae.current?d:0}),[d]),{name:`transformOrigin`,fn(e){let{elements:{floating:t},middlewareData:n,placement:r,platform:o,rects:s,y:c}=e,l=AS(r),u=jS(r),d=PS(l)===`y`,f=ae.current,p=typeof a==`function`?a(Ek(e,i,N)):a,m;m=!f&&u&&Math.abs(d?n.shift?.x||0:n.shift?.y||0)<=1?u===`start`===(d&&o.isRTL?.(t)===!0)?`100%`:`0%`:`${(d?n.arrow?.x||0:n.arrow?.y||0)+(d?f?.clientWidth||0:f?.clientHeight||0)/2}px`;let h=l===`top`||l===`left`?`calc(100% + ${p}px)`:`${-p}px`;return fe&&d&&Math.abs(n.shift?.y||0)>p&&(h=`${s.reference.y+s.reference.height/2-c}px`),t.style.setProperty(Sk,d?`${m} ${h}`:`${h} ${m}`),{}}},gk,b),J(()=>{!g&&h&&h.update({referenceElement:null,floatingElement:null,domReferenceElement:null,positionReference:null})},[g,h]);let me=U.useMemo(()=>({ancestorScroll:!f,elementResize:!f&&typeof ResizeObserver<`u`,layoutShift:!f&&typeof IntersectionObserver<`u`}),[f]),{refs:he,elements:ge,x:G,y:_e,middlewareData:ve,update:ye,placement:be,context:xe,isPositioned:Se,floatingStyles:Ce}=t({rootContext:h,open:m?g:void 0,placement:ee,middleware:ue,strategy:r,whileElementsMounted:m?void 0:(...e)=>JD(...e,me),nodeId:y,externalTree:S}),{sideX:we,sideY:Te}=ve.adaptiveOrigin||_k,Ee=Se?r:`fixed`,De=U.useMemo(()=>{let e;return e=Se?b?{position:Ee,[we]:G,[Te]:_e}:{...Ce,position:Ee}:{position:Ee,top:0,left:0},e[Ck]=`100vw`,e[wk]=`100vh`,Se||(e.opacity=0),e},[b,Ee,we,G,Te,_e,Ce,Se]),Oe=U.useRef(null);J(()=>{if(!g)return;let e=j.current,t=typeof e==`function`?e():e,n=(kk(t)?t.current:t)||null;n!==Oe.current&&(he.setPositionReference(n),Oe.current=n)},[g,he,A,j]),U.useEffect(()=>{if(!g)return;let e=j.current;typeof e!=`function`&&kk(e)&&e.current!==Oe.current&&(he.setPositionReference(e.current),Oe.current=e.current)},[g,he,A,j]),U.useEffect(()=>{if(m&&g&&ge.reference&&ge.floating)return JD(ge.reference,ge.floating,ye,me)},[m,g,ge,ye,me]);let ke=AS(be),Ae=Tk(i,ke,N),je=jS(be)||`center`,Me=!!ve.hide?.referenceHidden;J(()=>{x&&g&&Se&&(ke!==z||I&&je!==B)&&F(be)},[x,I,g,Se,be,ke,je,z,B]);let Ne=U.useMemo(()=>({position:`absolute`,top:ve.arrow?.y,left:ve.arrow?.x}),[ve.arrow]),Pe=ve.arrow?.centerOffset!==0;return U.useMemo(()=>({positionerStyles:De,arrowStyles:Ne,arrowRef:ae,arrowUncentered:Pe,side:Ae,align:je,physicalSide:ke,anchorHidden:Me,refs:he,context:xe,isPositioned:Se,update:ye}),[De,Ne,ae,Pe,Ae,je,ke,Me,he,xe,Se,ye])}function kk(e){return e!=null&&`current`in e}var Ak=U.createContext(void 0);function jk(){let e=U.useContext(Ak);if(!e)throw Error(ha(59));return e}var Mk=U.forwardRef(function(e,t){let{cutout:n,...r}=e,i;if(n){let e=n.getBoundingClientRect();i=`polygon(0% 0%,100% 0%,100% 100%,0% 100%,0% 0%,${e.left}px ${e.top}px,${e.left}px ${e.bottom}px,${e.right}px ${e.bottom}px,${e.right}px ${e.top}px,${e.left}px ${e.top}px)`}return(0,G.jsx)(`div`,{ref:t,role:`presentation`,"data-base-ui-inert":``,...r,style:{position:`fixed`,inset:0,userSelect:`none`,WebkitUserSelect:`none`,clipPath:i}})});function Nk(e,t){e&&Object.assign(e.style,t)}var Pk={position:`relative`,maxHeight:`100%`,overflowX:`hidden`,overflowY:`auto`};function Fk(e){return e===`starting`?OT:Ui}function Ik(e,t,{styles:n,transitionStatus:r,props:i,refs:a,hidden:o,inert:s=!1}){let c={...n};return s&&(c.pointerEvents=`none`),sa(`div`,e,{state:t,ref:a,props:[{role:`presentation`,hidden:o,style:c},Fk(r),i],stateAttributesMapping:rS})}var Lk={},Rk={},zk=``;function Bk(e,t){return bb(e)?e:t}function Vk(e,t,n){return/hidden|clip/.test(e.getComputedStyle(Bk(t,n)).overflowY)}function Hk(e){if(typeof document>`u`)return!1;let t=Bb(e);return mb(t).innerWidth-t.documentElement.clientWidth>0}function Uk(e){if(!(typeof CSS<`u`&&CSS.supports&&CSS.supports(`scrollbar-gutter`,`stable`))||typeof document>`u`)return!1;let t=Bb(e),n=t.documentElement,r=t.body,i=Bk(n,r),a=i.style.overflowY,o=n.style.scrollbarGutter;n.style.scrollbarGutter=`stable`,i.style.overflowY=`scroll`;let s=i.offsetWidth;i.style.overflowY=`hidden`;let c=i.offsetWidth;return i.style.overflowY=a,n.style.scrollbarGutter=o,s===c}function Wk(e){let t=Bb(e),n=t.documentElement,r=t.body,i=Bk(n,r),a={overflowY:i.style.overflowY,overflowX:i.style.overflowX};return Object.assign(i.style,{overflowY:`hidden`,overflowX:`hidden`}),()=>{Object.assign(i.style,a)}}function Gk(e){let t=Bb(e),n=t.documentElement,r=t.body,i=mb(n),a=0,o=0,s=!1,c=Oa.create();if(Nx&&(i.visualViewport?.scale??1)!==1)return()=>{};function l(){let t=i.getComputedStyle(n),c=i.getComputedStyle(r),l=(t.scrollbarGutter||``).includes(`both-edges`)?`stable both-edges`:`stable`;a=n.scrollTop,o=n.scrollLeft,Lk={scrollbarGutter:n.style.scrollbarGutter,overflowY:n.style.overflowY,overflowX:n.style.overflowX},zk=n.style.scrollBehavior,Rk={position:r.style.position,height:r.style.height,width:r.style.width,boxSizing:r.style.boxSizing,overflowY:r.style.overflowY,overflowX:r.style.overflowX,scrollBehavior:r.style.scrollBehavior};let u=n.scrollHeight>n.clientHeight,d=n.scrollWidth>n.clientWidth,f=t.overflowY===`scroll`||c.overflowY===`scroll`,p=t.overflowX===`scroll`||c.overflowX===`scroll`,m=Math.max(0,i.innerWidth-r.clientWidth),h=Math.max(0,i.innerHeight-r.clientHeight),g=parseFloat(c.marginTop)+parseFloat(c.marginBottom),_=parseFloat(c.marginLeft)+parseFloat(c.marginRight),v=Bk(n,r);s=Uk(e),s?(n.style.scrollbarGutter=l,v.style.overflowY=`hidden`,v.style.overflowX=`hidden`):(Object.assign(n.style,{scrollbarGutter:l,overflowY:`hidden`,overflowX:`hidden`}),(u||f)&&(n.style.overflowY=`scroll`),(d||p)&&(n.style.overflowX=`scroll`),Object.assign(r.style,{position:`relative`,height:g||h?`calc(100dvh - ${g+h}px)`:`100dvh`,width:_||m?`calc(100vw - ${_+m}px)`:`100vw`,boxSizing:`border-box`,overflowY:`hidden`,overflowX:`hidden`,scrollBehavior:`unset`}),r.scrollTop=a,r.scrollLeft=o,n.setAttribute(`data-base-ui-scroll-locked`,``),n.style.scrollBehavior=`unset`)}function u(){Object.assign(n.style,Lk),Object.assign(r.style,Rk),s||(n.scrollTop=a,n.scrollLeft=o,n.removeAttribute(`data-base-ui-scroll-locked`),n.style.scrollBehavior=zk)}function d(){u(),c.request(l)}l();let f=rT(i,`resize`,d);return()=>{c.cancel(),u(),typeof i.removeEventListener==`function`&&f()}}var Kk=new class{lockCount=0;restore=null;timeoutLock=Ka.create();timeoutUnlock=Ka.create();acquire(e){return this.lockCount+=1,this.lockCount===1&&this.restore===null&&this.timeoutLock.start(0,()=>this.lock(e)),this.release}release=()=>{--this.lockCount,this.lockCount===0&&this.restore&&this.timeoutUnlock.start(0,this.unlock)};unlock=()=>{this.lockCount===0&&this.restore&&(this.restore?.(),this.restore=null)};lock(e){if(this.lockCount===0||this.restore!==null)return;let t=Bb(e),n=t.documentElement,r=t.body,i=mb(n);if(Vk(i,n,r)){let t=new i.MutationObserver(()=>{Vk(i,n,r)||(t.disconnect(),this.restore=null,this.lock(e))}),a={attributes:!0};t.observe(n,a),t.observe(r,a),this.restore=()=>t.disconnect();return}let a=Ox||!Hk(e);this.restore=a?Wk(e):Gk(e)}};function qk(e=!0,t=null){J(()=>{if(e)return Kk.acquire(t)},[e,t])}var Jk=20;function Yk(e,t,n,r){let[i,a]=U.useState(!1);J(()=>{if(!e||!t||n==null){a(!1);return}let r=Bb(n).documentElement.clientWidth,i=n.offsetWidth;a(r>0&&i>0&&i>=r-Jk)},[e,t,n]),qk(e&&(!t||i),r)}var Xk={position:`fixed`},Zk=U.forwardRef(function(e,t){let{anchor:n,className:r,render:i,positionMethod:a,side:o,align:s,sideOffset:c,alignOffset:l,collisionBoundary:u=`clipping-ancestors`,collisionPadding:d,arrowPadding:f,sticky:p,disableAnchorTracking:m,alignItemWithTrigger:h=!0,collisionAvoidance:g=AT,style:_,...v}=e,y=mO(),b=hO(),x=y.useState(`open`),S=y.useState(`mounted`),C=y.useState(`modal`),w=y.useState(`value`),T=y.useState(`openMethod`),E=y.useState(`positionerElement`),D=y.useState(`triggerElement`),O=y.useState(`isItemEqualToValue`),k=y.useState(`transitionStatus`),A=U.useRef(null),j=U.useRef(null),[M,N]=U.useState(h),P=S&&M&&T!==`touch`;!S&&M!==h&&N(h),U.useImperativeHandle(y.context.alignItemWithTriggerActiveRef,()=>P),Yk((P||C)&&x,T===`touch`,E,D);let F=Dk({anchor:n,floatingRootContext:b,positionMethod:a,mounted:S,side:o,sideOffset:c,align:s,alignOffset:l,arrowPadding:f,collisionBoundary:u,collisionPadding:d,sticky:p,disableAnchorTracking:m??P,collisionAvoidance:g,keepMounted:!0}),I=P?`none`:F.side,L=P?Xk:F.positionerStyles,R={open:x,side:I,align:F.align,anchorHidden:F.anchorHidden};J(()=>{y.set(`popupSide`,F.side)},[y,F.side]);let z=Ik(e,R,{styles:L,transitionStatus:k,props:v,refs:[t,y.useStateSetter(`positionerElement`)],hidden:!S,inert:!x}),B=U.useRef(0),ee=q(e=>{if(y.context.valuesRef.current.length===0)return;let t=B.current;B.current=e.size;let n=$(MC);if(t!==0&&!y.state.multiple&&w!==null&&xO(y.context.valuesRef.current,w,O)===-1){let e=y.context.initialValueRef.current,t=e!=null&&xO(y.context.valuesRef.current,e,O)!==-1?e:null;y.context.setValue(t,n),t===null&&(y.set(`selectedIndex`,null),y.context.selectedItemTextRef.current=null)}if(t!==0&&y.state.multiple&&Array.isArray(w)){let e=w.filter(e=>xO(y.context.valuesRef.current,e,O)!==-1);e.length!==w.length&&(y.context.setValue(e,n),e.length===0&&(y.set(`selectedIndex`,null),y.context.selectedItemTextRef.current=null))}if(x&&P){y.update({scrollUpArrowVisible:!1,scrollDownArrowVisible:!1});let e={height:``};Nk(E,e),Nk(y.context.popupRef.current,e)}}),V=U.useMemo(()=>({...F,side:I,alignItemWithTriggerActive:P,setControlledAlignItemWithTrigger:N,scrollUpArrowRef:A,scrollDownArrowRef:j}),[F,I,P,N]);return(0,G.jsx)(ik,{elementsRef:y.context.listRef,labelsRef:y.context.labelsRef,onMapChange:ee,children:(0,G.jsxs)(Ak.Provider,{value:V,children:[S&&C&&(0,G.jsx)(Mk,{inert:tk(!x),cutout:D}),z]})})}),Qk=`base-ui-disable-scrollbar`,$k={className:Qk,getElement(e){return(0,G.jsx)(`style`,{nonce:e,href:Qk,precedence:`base-ui:low`,children:`.${Qk}{scrollbar-width:none}.${Qk}::-webkit-scrollbar{display:none}`})}},eA=U.createContext(void 0);function tA(e){let t=U.useContext(eA);if(t===void 0&&!e)throw Error(ha(69));return t}var nA=`ArrowUp`,rA=`ArrowDown`,iA=`ArrowLeft`,aA=`ArrowRight`,oA=`Home`,sA=new Set([nA,rA,iA,aA,oA,`End`]),cA=`Shift`,lA=[cA,`Control`,`Alt`,`Meta`];function uA(e){return vb(e)&&e.tagName===`INPUT`}function dA(e){return!!(uA(e)&&e.selectionStart!=null||vb(e)&&e.tagName===`TEXTAREA`)}function fA(e,t,n,r){if(!e||!t||!t.scrollTo)return;let i=e.scrollLeft,a=e.scrollTop,o=e.clientWidth<e.scrollWidth,s=e.clientHeight<e.scrollHeight;if(o&&r!==`vertical`){let r=pA(e,t,`left`),a=mA(e),o=mA(t);n===`ltr`&&(r+t.offsetWidth+o.scrollMarginRight>e.scrollLeft+e.clientWidth-a.scrollPaddingRight?i=r+t.offsetWidth+o.scrollMarginRight-e.clientWidth+a.scrollPaddingRight:r-o.scrollMarginLeft<e.scrollLeft+a.scrollPaddingLeft&&(i=r-o.scrollMarginLeft-a.scrollPaddingLeft)),n===`rtl`&&(r-o.scrollMarginLeft<e.scrollLeft+a.scrollPaddingLeft?i=r-o.scrollMarginLeft-a.scrollPaddingLeft:r+t.offsetWidth+o.scrollMarginRight>e.scrollLeft+e.clientWidth-a.scrollPaddingRight&&(i=r+t.offsetWidth+o.scrollMarginRight-e.clientWidth+a.scrollPaddingRight))}if(s&&r!==`horizontal`){let n=pA(e,t,`top`),r=mA(e),i=mA(t);n-i.scrollMarginTop<e.scrollTop+r.scrollPaddingTop?a=n-i.scrollMarginTop-r.scrollPaddingTop:n+t.offsetHeight+i.scrollMarginBottom>e.scrollTop+e.clientHeight-r.scrollPaddingBottom&&(a=n+t.offsetHeight+i.scrollMarginBottom-e.clientHeight+r.scrollPaddingBottom)}e.scrollTo({left:i,top:a,behavior:`auto`})}function pA(e,t,n){let r=n===`left`?`offsetLeft`:`offsetTop`,i=0;for(;t.offsetParent&&(i+=t[r],t.offsetParent!==e);)t=t.offsetParent;return i}function mA(e){let t=getComputedStyle(e);return{scrollMarginTop:parseFloat(t.scrollMarginTop)||0,scrollMarginRight:parseFloat(t.scrollMarginRight)||0,scrollMarginBottom:parseFloat(t.scrollMarginBottom)||0,scrollMarginLeft:parseFloat(t.scrollMarginLeft)||0,scrollPaddingTop:parseFloat(t.scrollPaddingTop)||0,scrollPaddingRight:parseFloat(t.scrollPaddingRight)||0,scrollPaddingBottom:parseFloat(t.scrollPaddingBottom)||0,scrollPaddingLeft:parseFloat(t.scrollPaddingLeft)||0}}var hA=U.createContext(void 0),gA={disableStyleElements:!1};function _A(){return U.useContext(hA)??gA}var vA=`--transform-origin`,yA={...rS,...Ba},bA=U.forwardRef(function(e,t){let{render:n,className:r,style:i,finalFocus:a,...o}=e,s=mO(),c=s.useState(`multiple`),l=s.useState(`readOnly`),u=s.useState(`highlightItemOnHover`),d=hO(),{side:f,align:p,alignItemWithTriggerActive:m,isPositioned:h,setControlledAlignItemWithTrigger:g}=jk(),_=tA(!0)!=null,v=pk(),{nonce:y,disableStyleElements:b}=_A(),x=s.useState(`id`),S=s.useState(`open`),C=s.useState(`openMethod`),w=s.useState(`mounted`),T=s.useState(`popupProps`),E=s.useState(`transitionStatus`),D=s.useState(`triggerElement`),O=s.useState(`positionerElement`),k=s.useState(`listElement`),A=U.useRef(!1),j=U.useRef(!1),M=U.useRef({}),N=ka(),P=q(e=>{if(!O||!s.context.popupRef.current||!j.current)return;let t=O.style.top===`0px`,n=O.style.bottom===`0px`;if(A.current||!m||!t&&!n){s.context.handleScrollArrowVisibility(e);return}let r=CA(O),i=wA(O.getBoundingClientRect().height,`y`,r),a=Bb(O),o=mb(O),c=o.getComputedStyle(O),l=parseFloat(c.marginTop),u=parseFloat(c.marginBottom),d=xA(o.getComputedStyle(s.context.popupRef.current)),f=Math.min(a.documentElement.clientHeight-l-u,d),p=e.scrollTop,h=SA(e),g=null,_=e=>{O.style.height=`${e}px`},v=t?h-p:p,y=Math.min(i+v,f);if(v<=1){let n=zO(v,0,f-i);n>0&&_(i+n),e.scrollTop=t?h:0,f-(i+n)<=1&&(A.current=!0),s.context.handleScrollArrowVisibility(e);return}f-y>1?g=t?1/0:0:n&&p<h&&(g=p-(v-(i+v-f)));let b=Math.ceil(y);if(b!==0&&_(b),g!=null){let t=zO(g,0,SA(e));Math.abs(e.scrollTop-t)>1&&(e.scrollTop=t)}b>=f-1&&(A.current=!0),s.context.handleScrollArrowVisibility(e)});U.useImperativeHandle(s.context.scrollHandlerRef,()=>P,[P]),La({open:S,ref:s.context.popupRef,onComplete(){S&&s.context.onOpenChangeComplete(!0)}});let F={open:S,transitionStatus:E,side:f,align:p};J(()=>{O&&s.context.popupRef.current&&!Object.keys(M.current).length&&(M.current={top:O.style.top||`0`,left:O.style.left||`0`,right:O.style.right,height:O.style.height,bottom:O.style.bottom,minHeight:O.style.minHeight,maxHeight:O.style.maxHeight,marginTop:O.style.marginTop,marginBottom:O.style.marginBottom})},[s,O]),J(()=>{S||m||(j.current=!1,A.current=!1,Nk(O,M.current))},[S,m,O]),J(()=>{let e=s.context.popupRef.current;if(!S||!D||!O||!e||m&&!h||s.state.transitionStatus===`ending`)return;if(j.current=!0,e.style.removeProperty(vA),!m){N.request(()=>s.context.handleScrollArrowVisibility(k||e));return}let t=DA(e);try{let t=s.context.selectedItemTextRef.current;t?.isConnected||(t=!s.select(`hasSelectedValue`)&&s.context.firstItemTextRef.current?.isConnected?s.context.firstItemTextRef.current:null);let n=s.context.valueRef.current,r=mb(O),i=r.getComputedStyle(O),a=r.getComputedStyle(e),o=Bb(D),c=CA(D),l=TA(D.getBoundingClientRect(),c),d=TA(O.getBoundingClientRect(),c),f=l.height,p=k||e,m=p.scrollHeight,h=parseFloat(a.borderBottomWidth),_=parseFloat(i.marginTop)||10,y=parseFloat(i.marginBottom)||10,b=parseFloat(i.minHeight)||100,x=xA(a),S=o.documentElement.clientHeight-_-y,C=o.documentElement.clientWidth,w=S-l.bottom+f,T,E=v===`rtl`?l.right-d.width:l.left,j=0;if(t&&n){let e=TA(n.getBoundingClientRect(),c);T=TA(t.getBoundingClientRect(),c),E=d.left+(v===`rtl`?e.right-T.right:e.left-T.left);let r=e.top-l.top+e.height/2;j=T.top-d.top+T.height/2-r}let N=w+j+y+h,P=Math.min(S,N),F=S-_-y,I=N-P,L=C-5;O.style.left=`${zO(E,5,L-d.width)}px`,O.style.height=`${P}px`,O.style.maxHeight=`none`,O.style.marginTop=`${_}px`,O.style.marginBottom=`${y}px`,e.style.height=`100%`;let R=SA(p),z=I>=R-1;z&&(P=Math.min(S,d.height)-(I-R));let B=l.top<20||l.bottom>S-20||Math.ceil(P)+1<Math.min(m,b),ee=(r.visualViewport?.scale??1)!==1&&Nx;if(B||ee){Nk(O,M.current),g(!1);return}let V=Math.max(b,P);if(z){let e=Math.max(0,S-N);O.style.top=d.height>=F?`0`:`${e}px`,O.style.height=`${P}px`,p.scrollTop=SA(p)}else O.style.bottom=`0`,p.scrollTop=I;if(T){let t=d.top,n=d.height,r=T.top+T.height/2,i=zO(n>0?(r-t)/n*100:50,0,100);e.style.setProperty(vA,`50% ${i}%`)}(V===S||P>=x)&&(A.current=!0),s.context.handleScrollArrowVisibility(p),u&&s.state.selectedIndex===null&&s.state.activeIndex===null&&s.context.listRef.current[0]!=null&&s.set(`activeIndex`,0)}finally{t()}},[s,S,O,D,m,g,N,k,u,v,h]),U.useEffect(()=>{if(!m||!O||!S)return;let e=mb(O);function t(e){s.context.setOpen(!1,$(XC,e))}return rT(e,`resize`,t)},[s,m,O,S]);let I={...k?{role:`presentation`}:{role:`listbox`,"aria-multiselectable":c||void 0,"aria-readonly":l||void 0,id:`${x}-list`},onKeyDown(e){_&&sA.has(e.key)&&e.stopPropagation()},onScroll(e){k||P(e.currentTarget)},...m&&{style:k?{height:`100%`}:Pk},className:!k&&m?$k.className:void 0},L=sa(`div`,e,{ref:[t,s.context.popupRef],state:F,stateAttributesMapping:yA,props:[T,I,Fk(E),o]});return(0,G.jsxs)(U.Fragment,{children:[!b&&$k.getElement(y),(0,G.jsx)(tE,{context:d,modal:!1,disabled:!w,openInteractionType:C,returnFocus:a,restoreFocus:!0,children:L})]})});function xA(e){let t=e.maxHeight;return t.endsWith(`px`)&&parseFloat(t)||1/0}function SA(e){return BO(e.scrollHeight,e.clientHeight)}function CA(e){return GD.getScale(e)}function wA(e,t,n){return e/n[t]}function TA(e,t){return JS({x:wA(e.x,`x`,t),y:wA(e.y,`y`,t),width:wA(e.width,`x`,t),height:wA(e.height,`y`,t)})}var EA=[[`transform`,`none`],[`scale`,`1`],[`translate`,`0 0`]];function DA(e){let{style:t}=e,n={};for(let[e,r]of EA)n[e]=t.getPropertyValue(e),t.setProperty(e,r,`important`);return()=>{for(let[e]of EA){let r=n[e];r?t.setProperty(e,r):t.removeProperty(e)}}}var OA=U.forwardRef(function(e,t){let{render:n,className:r,style:i,...a}=e,o=mO(),s=o.useState(`multiple`),c=o.useState(`readOnly`),{alignItemWithTriggerActive:l}=jk(),u=o.useState(`hasScrollArrows`),d=o.useState(`openMethod`),f={id:`${o.useState(`id`)}-list`,role:`listbox`,"aria-multiselectable":s||void 0,"aria-readonly":c||void 0,onScroll(e){o.context.scrollHandlerRef.current?.(e.currentTarget)},...l&&{style:Pk},className:u&&d!==`touch`?$k.className:void 0};return sa(`div`,e,{ref:[t,o.useStateSetter(`listElement`)],props:[f,a]})});function kA(e={}){let{guess:t,label:n,metadata:r,textRef:i,index:a}=e,{register:o,unregister:s,subscribeMapChange:c,nextIndexRef:l}=rk(),u=U.useRef(-1),[d,f]=U.useState(a==null&&t?()=>{if(u.current===-1){let e=l.current;l.current+=1,u.current=e}return u.current}:-1),p=a??d,m=U.useRef(null),h=U.useCallback(e=>{let t=m.current;t&&s(t),m.current=e,e&&o(e,{metadata:r??null,index:a??null,label:n,textRef:i})},[a,o,s,r,n,i]);return J(()=>{if(a==null)return c(e=>{let t=m.current?e.get(m.current)?.index:null;t!=null&&f(t)})},[a,c]),{ref:h,index:p}}var AA=U.createContext(void 0);function jA(){let e=U.useContext(AA);if(!e)throw Error(ha(57));return e}var MA=U.memo(U.forwardRef(function(e,t){let{render:n,className:r,style:i,value:a=null,label:o,disabled:s=!1,nativeButton:c=!1,...l}=e,u=U.useRef(null),d=kA({guess:!0,label:o,textRef:u}),f=mO(),{props:p,multiple:m,disabled:h,readOnly:g,isItemEqualToValue:_}=f.useState(`itemRoot`),v=h||s,y=f.useState(`isActive`,d.index),b=f.useState(`open`),x=f.useState(`isSelected`,a),S=f.useState(`isSelectedByFocus`,d.index),C=d.index,w=U.useRef(null);J(()=>{let e=f.context.valuesRef.current;return e[C]=a,()=>{delete e[C]}},[C,a,f]),J(()=>{let e=f.state.value,t=f.state.selectedIndex,n=t,r;m&&Array.isArray(e)?(n=wO(C,a,f.context.valuesRef.current,e,_,t),r=n===C,C===t&&!r&&(f.context.selectedItemTextRef.current=null)):(r=e!==void 0&&vO(a,e,_),r&&(n=C)),f.set(`selectedIndex`,n),r&&u.current&&(f.context.selectedItemTextRef.current=u.current)},[C,m,_,f,a]);let T=U.useRef(`mouse`),E=U.useRef(!1),{getButtonProps:D,buttonRef:O}=Hb({disabled:v,focusableWhenDisabled:!0,native:c,composite:!0}),k={disabled:v,selected:x,highlighted:y};function A(e){if(h||g)return;let t=f.state.value;if(m){let n=Array.isArray(t)?t:[],r=x?TO(n,a,_):[...n,a];f.context.setValue(r,$(LC,e))}else f.context.setValue(a,$(LC,e)),f.context.setOpen(!1,$(LC,e))}function j(){f.context.selectionRef.current.dragY=0}let M={role:`option`,"aria-selected":x,tabIndex:b&&y?0:-1,onKeyDown(e){f.set(`activeIndex`,C),e.key===` `&&f.context.typingRef.current&&e.preventDefault()},onClick(e){let t=T.current!==`touch`,n=e.nativeEvent.pointerType,r=t&&vS(e.nativeEvent)&&(n!==void 0||y),i=t&&!r&&!E.current;E.current=!1,!(v||i)&&A(e.nativeEvent)},onPointerEnter(e){T.current=e.pointerType},onPointerMove(e){if(e.pointerType===`mouse`&&e.buttons===1){let t=f.context.selectionRef.current;t.dragY+=e.movementY,t.dragY**2>=64&&(t.allowUnselectedMouseUp=!0)}},onPointerDown(e){T.current=e.pointerType,E.current=!0,j()},onMouseUp(){if(j(),v||T.current===`touch`||E.current)return;let e=!f.context.selectionRef.current.allowSelectedMouseUp&&x,t=!f.context.selectionRef.current.allowUnselectedMouseUp&&!x;e||t||(E.current=!0,w.current?.click(),E.current=!1)}},N=sa(`div`,e,{ref:[O,t,d.ref,w],state:k,props:[p,M,l,D]}),P=U.useMemo(()=>({selected:x,index:C,textRef:u,selectedByFocus:S}),[x,C,u,S]);return(0,G.jsx)(AA.Provider,{value:P,children:N})})),NA=U.memo(U.forwardRef(function(e,t){let{render:n,className:r,style:i,keepMounted:a,selected:o,...s}=e,c=U.useRef(null),{transitionStatus:l,setMounted:u}=Va(o),d=sa(`span`,e,{ref:[t,c],state:{selected:o,transitionStatus:l},props:[{"aria-hidden":!0,children:`✔️`},s],stateAttributesMapping:Ba});return La({batch:!0,enabled:!o,open:o,ref:c,onComplete(){o||u(!1)}}),d})),PA=U.forwardRef(function(e,t){let{selected:n}=jA();return e.keepMounted||n?(0,G.jsx)(NA,{...e,selected:n,ref:t}):null}),FA=U.memo(U.forwardRef(function(e,t){let{index:n,textRef:r,selectedByFocus:i}=jA(),a=mO(),{render:o,className:s,style:c,...l}=e;return sa(`div`,e,{ref:[U.useCallback(e=>{e&&(n===0&&(a.context.firstItemTextRef.current=e),i&&(a.context.selectedItemTextRef.current=e))},[a,n,i]),t,r],props:l})})),IA=U.forwardRef(function(e,t){let{render:n,className:r,style:i,direction:a,keepMounted:o,...s}=e,c=a===`up`,l=mO(),{side:u,scrollDownArrowRef:d,scrollUpArrowRef:f}=jk(),p=c?`scrollUpArrowVisible`:`scrollDownArrowVisible`,m=l.useState(p),h=l.useState(`openMethod`),g=m&&h!==`touch`,_=qa(),v=c?f:d,{mounted:y,transitionStatus:b,setMounted:x}=Va(g);J(()=>(l.context.scrollArrowsMountedCountRef.current+=1,l.set(`hasScrollArrows`,!0),()=>{l.context.scrollArrowsMountedCountRef.current=Math.max(0,l.context.scrollArrowsMountedCountRef.current-1),l.context.scrollArrowsMountedCountRef.current===0&&l.set(`hasScrollArrows`,!1)}),[l]),La({open:g,ref:v,onComplete(){g||x(!1)}});let S=sa(`div`,e,{ref:[t,v],state:{direction:a,visible:g,side:u,transitionStatus:b},props:[{"aria-hidden":!0,children:c?`▲`:`▼`,style:{position:`absolute`},onMouseMove(e){if(e.movementX===0&&e.movementY===0||_.isStarted())return;l.set(`activeIndex`,null);function t(){let e=l.state.listElement??l.context.popupRef.current;if(!e)return;l.set(`activeIndex`,null),l.context.handleScrollArrowVisibility(e);let n=BO(e.scrollHeight,e.clientHeight),r=VO(e.scrollTop,n),i=r===(c?0:n),a=l.context.listRef.current;if(r!==e.scrollTop&&(e.scrollTop=r),i)_.clear();else{if(a.length>0){let t=v.current?.offsetHeight||0;e.scrollTop=LA(a,c,r,e.clientHeight,t,n)}_.start(40,t)}}_.start(40,t)},onMouseLeave(){_.clear()}},s],stateAttributesMapping:Ba});return y||o?S:null});function LA(e,t,n,r,i,a){if(t){let t=0,r=n+i-1;for(let n=0;n<e.length;n+=1){let i=e[n];if(i&&i.offsetTop>=r){t=n;break}}let o=Math.max(0,t-1),s=e[o];return o<t&&s?VO(s.offsetTop-i,a):0}let o=e.length-1,s=n+r-i+1;for(let t=0;t<e.length;t+=1){let n=e[t];if(n&&n.offsetTop+n.offsetHeight>s){o=Math.max(0,t-1);break}}let c=Math.min(e.length-1,o+1),l=e[c];return c>o&&l?VO(l.offsetTop+l.offsetHeight-r+i,a):a}var RA=U.forwardRef(function(e,t){return(0,G.jsx)(IA,{...e,ref:t,direction:`down`})}),zA=U.forwardRef(function(e,t){return(0,G.jsx)(IA,{...e,ref:t,direction:`up`})}),BA=U.createContext(void 0);function VA(){let e=U.useContext(BA);if(e===void 0)throw Error(ha(56));return e}var HA=U.forwardRef(function(e,t){let{render:n,className:r,style:i,...a}=e,[o,s]=U.useState(),c=U.useMemo(()=>({labelId:o,setLabelId:s}),[o,s]),l=sa(`div`,e,{ref:t,props:[{role:`group`,"aria-labelledby":o},a]});return(0,G.jsx)(BA.Provider,{value:c,children:l})}),UA=U.forwardRef(function(e,t){let{render:n,className:r,style:i,id:a,...o}=e,{setLabelId:s}=VA(),c=hx(a);return J(()=>(s(c),()=>{s(e=>e===c?void 0:e)}),[c,s]),sa(`div`,e,{ref:t,props:[{id:c,"aria-hidden":!0},o]})}),WA=HO;function GA({className:e,...t}){return(0,G.jsx)(HA,{"data-slot":`select-group`,className:K(`scroll-my-1 p-1`,e),...t})}function KA({className:e,...t}){return(0,G.jsx)(QO,{"data-slot":`select-value`,className:K(`flex flex-1 text-left`,e),...t})}function qA({className:e,size:t=`default`,children:n,...r}){return(0,G.jsxs)(XO,{"data-slot":`select-trigger`,"data-size":t,className:K(`flex w-fit items-center justify-between gap-1.5 rounded-md border border-input bg-transparent py-2 pr-2 pl-2.5 text-[13px] whitespace-nowrap transition-colors outline-none select-none focus-visible:border-primary focus-visible:ring-2 focus-visible:ring-primary/20 disabled:cursor-not-allowed disabled:opacity-50 aria-invalid:border-destructive aria-invalid:ring-3 aria-invalid:ring-destructive/20 data-placeholder:text-muted-foreground data-[size=default]:h-8 data-[size=sm]:h-7 data-[size=sm]:rounded-[min(var(--radius-md),10px)] *:data-[slot=select-value]:line-clamp-1 *:data-[slot=select-value]:flex *:data-[slot=select-value]:items-center *:data-[slot=select-value]:gap-1.5 dark:bg-input/30 dark:hover:bg-input/50 dark:aria-invalid:border-destructive/50 dark:aria-invalid:ring-destructive/40 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4`,e),...r,children:[n,(0,G.jsx)($O,{render:(0,G.jsx)(pn,{className:`pointer-events-none size-4 text-muted-foreground`})})]})}function JA({className:e,children:t,side:n=`bottom`,sideOffset:r=4,align:i=`center`,alignOffset:a=0,alignItemWithTrigger:o=!0,...s}){return(0,G.jsx)(ek,{children:(0,G.jsx)(Zk,{side:n,sideOffset:r,align:i,alignOffset:a,alignItemWithTrigger:o,className:`isolate z-50`,children:(0,G.jsxs)(bA,{"data-slot":`select-content`,"data-align-trigger":o,className:K(`relative isolate z-50 max-h-(--available-height) w-(--anchor-width) min-w-36 origin-(--transform-origin) overflow-x-hidden overflow-y-auto rounded-lg bg-popover text-popover-foreground border border-border/70 shadow-float duration-100 data-[align-trigger=true]:animate-none 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-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),...s,children:[(0,G.jsx)(ZA,{}),(0,G.jsx)(OA,{children:t}),(0,G.jsx)(QA,{})]})})})}function YA({className:e,...t}){return(0,G.jsx)(UA,{"data-slot":`select-label`,className:K(`px-1.5 py-1 text-xs text-muted-foreground`,e),...t})}function XA({className:e,children:t,...n}){return(0,G.jsxs)(MA,{"data-slot":`select-item`,className:K(`relative flex w-full cursor-default items-center gap-1.5 rounded-md py-1 pr-8 pl-1.5 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 *:[span]:last:flex *:[span]:last:items-center *:[span]:last:gap-2`,e),...n,children:[(0,G.jsx)(FA,{className:`flex flex-1 shrink-0 gap-2 whitespace-nowrap`,children:t}),(0,G.jsx)(PA,{render:(0,G.jsx)(`span`,{className:`pointer-events-none absolute right-2 flex size-4 items-center justify-center`}),children:(0,G.jsx)(dn,{className:`pointer-events-none`})})]})}function ZA({className:e,...t}){return(0,G.jsx)(zA,{"data-slot":`select-scroll-up-button`,className:K(`top-0 z-10 flex w-full cursor-default items-center justify-center bg-popover py-1 [&_svg:not([class*='size-'])]:size-4`,e),...t,children:(0,G.jsx)(hn,{})})}function QA({className:e,...t}){return(0,G.jsx)(RA,{"data-slot":`select-scroll-down-button`,className:K(`bottom-0 z-10 flex w-full cursor-default items-center justify-center bg-popover py-1 [&_svg:not([class*='size-'])]:size-4`,e),...t,children:(0,G.jsx)(pn,{})})}var $A=U.createContext(void 0);function ej(e){let t=U.useContext($A);if(!e&&t===void 0)throw Error(ha(27));return t}var tj=U.forwardRef(function(e,t){let{render:n,className:r,style:i,forceRender:a=!1,...o}=e,s=ej(),c=s.useState(`open`),l=s.useState(`nested`),u=s.useState(`mounted`);return sa(`div`,e,{state:{open:c,transitionStatus:s.useState(`transitionStatus`)},ref:[s.context.backdropRef,t],stateAttributesMapping:iS,props:[{role:`presentation`,hidden:!u,style:{userSelect:`none`,WebkitUserSelect:`none`}},o],enabled:a||!l})}),nj=U.forwardRef(function(e,t){let{render:n,className:r,style:i,disabled:a=!1,nativeButton:o=!0,...s}=e,c=ej(),l=c.useState(`open`),{getButtonProps:u,buttonRef:d}=Hb({disabled:a,native:o}),f={disabled:a};function p(e){l&&c.setOpen(!1,$(RC,e.nativeEvent))}return sa(`button`,e,{state:f,ref:[t,d],props:[{onClick:p},s,u]})}),rj=U.forwardRef(function(e,t){let{render:n,className:r,style:i,id:a,...o}=e,s=ej(),c=hx(a);return s.useSyncedValueWithCleanup(`descriptionElementId`,c),sa(`p`,e,{ref:t,props:[{id:c},o]})}),ij=U.createContext(void 0);function aj(){let e=U.useContext(ij);if(e===void 0)throw Error(ha(26));return e}var oj=`--nested-dialogs`,sj=`data-nested-dialog-open`,cj={...rS,...Ba,nestedDialogOpen(e){return e?{[sj]:``}:null}},lj=U.forwardRef(function(e,t){let{render:n,className:r,style:i,finalFocus:a,initialFocus:o,...s}=e,c=ej(),l=c.useState(`descriptionElementId`),u=c.useState(`disablePointerDismissal`),d=c.useState(`floatingRootContext`),f=c.useState(`popupProps`),p=c.useState(`modal`),m=c.useState(`mounted`),h=c.useState(`nested`),g=c.useState(`nestedOpenDialogCount`),_=c.useState(`open`),v=c.useState(`openMethod`),y=c.useState(`titleElementId`),b=c.useState(`transitionStatus`),x=c.useState(`role`),S=d.useState(`floatingId`);aj(),La({open:_,ref:c.context.popupRef,onComplete(){_&&c.context.onOpenChangeComplete?.(!0)}});let C=o===void 0?fE(c.context.popupRef):o,w=g>0,T=c.useStateSetter(`popupElement`),E=sa(`div`,e,{state:{open:_,nested:h,transitionStatus:b,nestedDialogOpen:w},props:[f,{id:S,"aria-labelledby":y,"aria-describedby":l,role:x,...dE,hidden:!m,onKeyDown(e){sA.has(e.key)&&e.stopPropagation()},style:{[oj]:g}},s],ref:[t,c.context.popupRef,T],stateAttributesMapping:cj});return(0,G.jsx)(tE,{context:d,openInteractionType:v,disabled:!m,closeOnFocusOut:!u,initialFocus:C,returnFocus:a,modal:p!==!1,restoreFocus:`popup`,children:E})}),uj=U.forwardRef(function(e,t){let{keepMounted:n=!1,...r}=e,i=ej(),a=i.useState(`mounted`),o=i.useState(`modal`),s=i.useState(`open`);return a||n?(0,G.jsx)(ij.Provider,{value:n,children:(0,G.jsxs)(LT,{ref:t,...r,children:[a&&o===!0&&(0,G.jsx)(Mk,{ref:i.context.internalBackdropRef,inert:tk(!s)}),e.children]})}):null});function dj({store:e,parentContext:t,isDrawer:n}){let r=e.useState(`open`),i=e.useState(`mounted`),a=e.useState(`disablePointerDismissal`),o=e.useState(`modal`),s=e.useState(`popupElement`),c=e.useState(`floatingRootContext`),[l,u]=U.useState(0),[d,f]=U.useState(0),p=l===0,m=cE(c,{outsidePressEvent(){return e.context.internalBackdropRef.current||e.context.backdropRef.current?`intentional`:{mouse:o===`trap-focus`?`sloppy`:`intentional`,touch:`sloppy`}},outsidePress(t){if(!e.context.outsidePressEnabledRef.current||`button`in t&&t.button!==0)return!1;if(`touches`in t){if(t.type===`touchend`){if(t.changedTouches.length!==1||t.touches.length!==0)return!1}else if(t.touches.length!==1)return!1}let n=Rx(t);if(p&&!a){if(o){let t=e.context.internalBackdropRef.current,r=e.context.backdropRef.current;return t||r?t===n||r===n||Q(n,s)&&!n?.hasAttribute(`data-base-ui-portal`):!0}return!0}return!1},escapeKey:p});return qk(r&&o===!0,s),e.useContextCallback(`onNestedDialogOpen`,(t,n)=>{(e.select(`open`)||e.select(`mounted`))&&(u(t),f(n))}),J(()=>{!r&&!i&&(u(0),f(0))},[r,i]),J(()=>(t?.onNestedDialogOpen&&r&&t.onNestedDialogOpen(l+1,d+ +!!n),()=>{t?.onNestedDialogOpen&&r&&t.onNestedDialogOpen(0,0)}),[n,r,l,d,t]),CE(e,{activeTriggerProps:m.reference,inactiveTriggerProps:m.trigger,popupProps:m.floating,nestedOpenDialogCount:l,nestedOpenDrawerCount:d}),null}var fj={...PE,modal:e=>e.modal,nested:e=>e.nested,nestedOpenDialogCount:e=>e.nestedOpenDialogCount,nestedOpenDrawerCount:e=>e.nestedOpenDrawerCount,disablePointerDismissal:e=>e.disablePointerDismissal,openMethod:e=>e.openMethod,descriptionElementId:e=>e.descriptionElementId,titleElementId:e=>e.titleElementId,viewportElement:e=>e.viewportElement,role:e=>e.role},pj=class extends tT{constructor(e,t,n){let r=new TE,i=mj(e,r,t,n);super(i,hj(r),fj)}setOpen=(e,t)=>{t.preventUnmountOnClose=()=>{this.set(`preventUnmountingOnClose`,!0)},!e&&t.trigger==null&&this.state.activeTriggerId!=null&&(t.trigger=this.state.activeTriggerElement??void 0),this.context.onOpenChange?.(e,t),!t.isCanceled&&(this.state.floatingRootContext.dispatchOpenChange(e,t),this.update(_E(this.state,e,t.trigger)))}};function mj(e,t,n,r=!1){return{...OE(t,n,r),modal:!0,disablePointerDismissal:!1,viewportElement:null,descriptionElementId:void 0,titleElementId:void 0,openMethod:null,nested:!1,nestedOpenDialogCount:0,nestedOpenDrawerCount:0,role:`dialog`,...e}}function hj(e){return{popupRef:U.createRef(),backdropRef:U.createRef(),internalBackdropRef:U.createRef(),outsidePressEnabledRef:{current:!0},triggerElements:e,onOpenChange:void 0,onOpenChangeComplete:void 0}}function gj(e,t){let{children:n,open:r,defaultOpen:i=!1,onOpenChange:a,onOpenChangeComplete:o,disablePointerDismissal:s=!1,modal:c=!0,actionsRef:l,handle:u,triggerId:d,defaultTriggerId:f=null}=t,p=e===`drawer`,m=e===`alert-dialog`,h=m?!0:c,g=m||s,_=m?`alertdialog`:`dialog`,v=ej(!0),y={modal:h,disablePointerDismissal:g,nested:v!=null,role:_},b=pE((e,t)=>new pj({open:i,openProp:r,activeTriggerId:f,triggerIdProp:d,...y},e,t),!0);b.useControlledProp(`openProp`,r),b.useControlledProp(`triggerIdProp`,d),b.useSyncedValues(y),b.useContextCallback(`onOpenChange`,a),b.useContextCallback(`onOpenChangeComplete`,o);let x=b.useState(`open`),S=b.useState(`mounted`),C=b.useState(`payload`);wE(b,x),xE(b);let{forceUnmount:w}=SE(x,b);U.useImperativeHandle(l,()=>({unmount:w,close:()=>b.setOpen(!1,$(YC))}),[w,b]);let T=x||S||u!=null;return(0,G.jsxs)($A.Provider,{value:b,children:[u&&(0,G.jsx)(mE,{handle:u,store:b}),T&&(0,G.jsx)(dj,{store:b,parentContext:v?.context,isDrawer:p}),typeof n==`function`?n({payload:C}):n]})}var _j=Kw(function(e){return gj(`dialog`,e)}),vj=U.forwardRef(function(e,t){let{render:n,className:r,style:i,id:a,...o}=e,s=ej(),c=hx(a);return s.useSyncedValueWithCleanup(`titleElementId`,c),sa(`h2`,e,{ref:t,props:[{id:c},o]})}),yj=qw(function(e,t){let{render:n,className:r,style:i,disabled:a=!1,nativeButton:o=!0,id:s,payload:c,handle:l,...u}=e,d=ej(!0),f=FE(l)??d;if(!f)throw Error(ha(79));let p=hx(s),m=f.useState(`floatingRootContext`),h=f.useState(`isOpenedByTrigger`,p),g=f.useState(`triggerPopupId`,p),_=U.useRef(null),{registerTrigger:v,isMountedByThisTrigger:y}=bE(p,_,f,{payload:c}),{getButtonProps:b,buttonRef:x}=Hb({disabled:a,native:o}),S=nE(m),C=LO(()=>f.select(`open`),e=>{f.set(`openMethod`,e)}),w={disabled:a,open:h},T=f.useState(`triggerProps`,y);return sa(`button`,e,{state:w,ref:[x,t,v,_],props:[S.reference,T,C,{[kT]:``,id:p,"aria-haspopup":`dialog`,"aria-expanded":h,"aria-controls":g},u,b],stateAttributesMapping:tS})});function bj({...e}){return(0,G.jsx)(_j,{"data-slot":`dialog`,...e})}function xj({...e}){return(0,G.jsx)(yj,{"data-slot":`dialog-trigger`,...e})}function Sj({...e}){return(0,G.jsx)(uj,{"data-slot":`dialog-portal`,...e})}function Cj({...e}){return(0,G.jsx)(nj,{"data-slot":`dialog-close`,...e})}function wj({className:e,...t}){return(0,G.jsx)(tj,{"data-slot":`dialog-overlay`,className:K(`fixed inset-0 isolate z-50 bg-black/10 duration-100 supports-backdrop-filter:backdrop-blur-xs data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0`,e),...t})}function Tj({className:e,children:t,showCloseButton:n=!0,...r}){let i=U.useRef(null);return(0,G.jsxs)(Sj,{children:[(0,G.jsx)(wj,{}),(0,G.jsxs)(lj,{ref:i,"data-slot":`dialog-content`,initialFocus:()=>i.current?.querySelector(`input:not([type=hidden]):not([disabled]), textarea:not([disabled]), select:not([disabled]), [role=combobox]:not([disabled])`)??i.current,className:K(`fixed top-1/2 left-1/2 z-50 grid w-full max-w-[calc(100%-2rem)] -translate-x-1/2 -translate-y-1/2 gap-4 rounded-xl bg-popover p-4 text-sm text-popover-foreground border border-border/70 shadow-overlay duration-100 outline-none sm:max-w-sm 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),...r,children:[t,n&&(0,G.jsxs)(nj,{"data-slot":`dialog-close`,render:(0,G.jsx)($b,{variant:`ghost`,className:`absolute top-2 right-2`,size:`icon-sm`}),children:[(0,G.jsx)($n,{}),(0,G.jsx)(`span`,{className:`sr-only`,children:D(`shell.primitive.close`)})]})]})]})}function Ej({className:e,...t}){return(0,G.jsx)(`div`,{"data-slot":`dialog-header`,className:K(`flex flex-col gap-2`,e),...t})}function Dj({className:e,showCloseButton:t=!1,children:n,...r}){return(0,G.jsxs)(`div`,{"data-slot":`dialog-footer`,className:K(`-mx-4 -mb-4 flex flex-col-reverse gap-2 rounded-b-xl border-t bg-muted/50 p-4 sm:flex-row sm:justify-end`,e),...r,children:[n,t&&(0,G.jsx)(nj,{render:(0,G.jsx)($b,{variant:`outline`}),children:D(`shell.primitive.close`)})]})}function Oj({className:e,...t}){return(0,G.jsx)(vj,{"data-slot":`dialog-title`,className:K(`font-heading text-base leading-none font-medium`,e),...t})}function kj({className:e,...t}){return(0,G.jsx)(rj,{"data-slot":`dialog-description`,className:K(`text-sm text-muted-foreground *:[a]:underline *:[a]:underline-offset-3 *:[a]:hover:text-foreground`,e),...t})}function Aj(e){return gj(`alert-dialog`,e)}var jj=yj;function Mj({...e}){return(0,G.jsx)(Aj,{"data-slot":`alert-dialog`,...e})}function Nj({...e}){return(0,G.jsx)(jj,{"data-slot":`alert-dialog-trigger`,...e})}function Pj({...e}){return(0,G.jsx)(uj,{"data-slot":`alert-dialog-portal`,...e})}function Fj({className:e,...t}){return(0,G.jsx)(tj,{"data-slot":`alert-dialog-overlay`,className:K(`fixed inset-0 isolate z-50 bg-black/10 duration-100 supports-backdrop-filter:backdrop-blur-xs data-open:animate-in data-open:fade-in-0 data-closed:animate-out data-closed:fade-out-0`,e),...t})}function Ij({className:e,size:t=`default`,...n}){return(0,G.jsxs)(Pj,{children:[(0,G.jsx)(Fj,{}),(0,G.jsx)(lj,{"data-slot":`alert-dialog-content`,"data-size":t,className:K(`group/alert-dialog-content fixed top-1/2 left-1/2 z-50 grid w-full -translate-x-1/2 -translate-y-1/2 gap-4 rounded-xl bg-popover p-4 text-popover-foreground border border-border/70 shadow-overlay duration-100 outline-none data-[size=default]:max-w-xs data-[size=sm]:max-w-xs data-[size=default]:sm:max-w-sm 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),...n})]})}function Lj({className:e,...t}){return(0,G.jsx)(`div`,{"data-slot":`alert-dialog-header`,className:K(`grid grid-rows-[auto_1fr] place-items-center gap-1.5 text-center has-data-[slot=alert-dialog-media]:grid-rows-[auto_auto_1fr] has-data-[slot=alert-dialog-media]:gap-x-4 sm:group-data-[size=default]/alert-dialog-content:place-items-start sm:group-data-[size=default]/alert-dialog-content:text-left sm:group-data-[size=default]/alert-dialog-content:has-data-[slot=alert-dialog-media]:grid-rows-[auto_1fr]`,e),...t})}function Rj({className:e,...t}){return(0,G.jsx)(`div`,{"data-slot":`alert-dialog-footer`,className:K(`-mx-4 -mb-4 flex flex-col-reverse gap-2 rounded-b-xl border-t bg-muted/50 p-4 group-data-[size=sm]/alert-dialog-content:grid group-data-[size=sm]/alert-dialog-content:grid-cols-2 sm:flex-row sm:justify-end`,e),...t})}function zj({className:e,...t}){return(0,G.jsx)(vj,{"data-slot":`alert-dialog-title`,className:K(`font-heading text-base font-medium sm:group-data-[size=default]/alert-dialog-content:group-has-data-[slot=alert-dialog-media]/alert-dialog-content:col-start-2`,e),...t})}function Bj({className:e,...t}){return(0,G.jsx)(rj,{"data-slot":`alert-dialog-description`,className:K(`text-sm text-balance text-muted-foreground md:text-pretty *:[a]:underline *:[a]:underline-offset-3 *:[a]:hover:text-foreground`,e),...t})}function Vj({className:e,...t}){return(0,G.jsx)($b,{"data-slot":`alert-dialog-action`,className:K(e),...t})}function Hj({className:e,variant:t=`outline`,size:n=`default`,...r}){return(0,G.jsx)(nj,{"data-slot":`alert-dialog-cancel`,className:K(e),render:(0,G.jsx)($b,{variant:t,size:n}),...r})}var Uj=U.createContext(void 0);function Wj(e){let t=U.useContext(Uj);if(t===void 0&&!e)throw Error(ha(72));return t}var Gj={...PE,disabled:e=>e.disabled,instantType:e=>e.instantType,isInstantPhase:e=>e.isInstantPhase,trackCursorAxis:e=>e.trackCursorAxis,disableHoverablePopup:e=>e.disableHoverablePopup,lastOpenChangeReason:e=>e.openChangeReason,closeOnClick:e=>e.closeOnClick,appliedTriggerProps:(e,t)=>t?e.activeTriggerProps:void 0,closeDelay:e=>e.closeDelay,adaptiveOrigin:e=>e.adaptiveOrigin},Kj=class extends tT{constructor(e,t,n){let r=new TE;super(qj(e,r,t,n),Jj(r),Gj)}setOpen=(e,t)=>{yE(this,e,t,{extraState:{openChangeReason:t.reason}})};cancelPendingOpen(e){this.state.floatingRootContext.dispatchOpenChange(!1,$(NC,e))}};function qj(e,t,n,r=!1){return{...OE(t,n,r),disabled:!1,instantType:void 0,isInstantPhase:!1,trackCursorAxis:`none`,disableHoverablePopup:!1,openChangeReason:null,closeOnClick:!0,closeDelay:0,adaptiveOrigin:void 0,...e}}function Jj(e){return{popupRef:U.createRef(),onOpenChange:void 0,onOpenChangeComplete:void 0,triggerElements:e}}var Yj=Kw(function(e){let{disabled:t=!1,defaultOpen:n=!1,open:r,disableHoverablePopup:i=!1,trackCursorAxis:a=`none`,actionsRef:o,onOpenChange:s,onOpenChangeComplete:c,handle:l,triggerId:u,defaultTriggerId:d=null,children:f}=e,p=pE((e,t)=>new Kj({open:n,openProp:r,activeTriggerId:d,triggerIdProp:u},e,t));p.useControlledProp(`openProp`,r),p.useControlledProp(`triggerIdProp`,u),p.useContextCallback(`onOpenChange`,s),p.useContextCallback(`onOpenChangeComplete`,c);let m=p.useState(`open`),h=!t&&m,g=p.useState(`activeTriggerId`),_=p.useState(`mounted`),v=p.useState(`payload`);p.useSyncedValues({trackCursorAxis:a,disableHoverablePopup:i,disabled:t}),xE(p,{closeOnActiveTriggerUnmount:!0});let{forceUnmount:y,transitionStatus:b}=SE(h,p),x=p.useState(`isInstantPhase`),S=p.useState(`instantType`),C=p.useState(`lastOpenChangeReason`),w=U.useRef(null);J(()=>{m&&t&&p.setOpen(!1,$(KC))},[m,t,p]),J(()=>{b===`ending`&&C===`none`||b!==`ending`&&x?(S!==`delay`&&(w.current=S),p.set(`instantType`,`delay`)):w.current!==null&&(p.set(`instantType`,w.current),w.current=null)},[b,x,C,S,p]),J(()=>{h&&(g??p.set(`payload`,void 0))},[p,g,h]),U.useImperativeHandle(o,()=>({unmount:y,close:()=>p.setOpen(!1,$(YC))}),[y,p]);let T=h||_||!t&&a!==`none`;return(0,G.jsxs)(Uj.Provider,{value:p,children:[l&&(0,G.jsx)(mE,{handle:l,store:p}),T&&(0,G.jsx)(Xj,{store:p,disabled:t,trackCursorAxis:a}),typeof f==`function`?f({payload:v}):f]})});function Xj({store:e,disabled:t,trackCursorAxis:n}){let r=e.useState(`floatingRootContext`),i=cE(r,{enabled:!t,referencePress:()=>e.select(`closeOnClick`)}),a=aE(r,{enabled:!t&&n!==`none`,axis:n===`none`?void 0:n}),o=U.useMemo(()=>Ji(a.reference,i.reference),[a.reference,i.reference]);return CE(e,{activeTriggerProps:o,inactiveTriggerProps:o,popupProps:i.floating??Ui}),null}var Zj=U.createContext(void 0);function Qj(){return U.useContext(Zj)}var $j=`data-base-ui-tooltip-trigger`;function eM(e){let t=Rx(e);return _b(t)?t:null}var tM=qw(function(e,t){let{render:n,className:r,style:i,handle:a,payload:o,disabled:s,delay:c,closeOnClick:l=!0,closeDelay:u,id:d,...f}=e,p=Wj(!0),m=FE(a)??p;if(!m)throw Error(ha(82));let h=hx(d),g=m.useState(`isTriggerActive`,h),_=m.useState(`isOpenedByTrigger`,h),v=m.useState(`floatingRootContext`),y=U.useRef(null),b=u??0,{registerTrigger:x,isMountedByThisTrigger:S}=bE(h,y,m,{payload:o,closeOnClick:l,closeDelay:b}),C=Qj(),{activeIdRef:w,delayRef:T,isInstantPhase:E,hasProvider:D}=fT(v,{open:_}),O=UE(v);m.useSyncedValue(`isInstantPhase`,E);let k=m.useState(`disabled`),A=s??k,j=Bw(A),M=m.useState(`trackCursorAxis`),N=m.useState(`disableHoverablePopup`),P=U.useRef(!1),F=qa(),I=U.useRef(void 0);function L(){return D&&w.current!=null?0:c??C??600}function R(e){let t=y.current;if(!t||!e)return!1;let n=Lx(e,`[${$j}]`);return n!==null&&n!==t&&Q(t,n)}function z(e){let t=R(e);return P.current=t,t&&(O.openChangeTimeout.clear(),O.restTimeout.clear(),O.restTimeoutPending=!1,F.clear()),t}let B=KE(v,{enabled:!A,mouseOnly:!0,move:!1,handleClose:!N&&M!==`both`?cD():null,restMs:L,delay(){return u==null&&D?{close:aT(T.current,`close`)}:{close:b}},triggerElementRef:y,isActiveTrigger:g,isClosing:()=>m.select(`transitionStatus`)===`ending`,shouldOpen(){return!P.current}}),ee=RE(v,{enabled:!A}).reference,V=e=>{let t=P.current,n=eM(e),r=z(n),i=y.current,a=i&&n&&Q(i,n);if(r&&m.select(`open`)&&m.select(`lastOpenChangeReason`)===`trigger-hover`)m.setOpen(!1,$(PC,e));else if(t&&!r&&a&&!j.current&&!m.select(`open`)&&i&&bS(I.current)){let t=()=>{!P.current&&!j.current&&!m.select(`open`)&&m.setOpen(!0,$(PC,e,i))},n=L();n===0?(F.clear(),t()):F.start(n,t)}},te=m.useState(`appliedTriggerProps`,S||M!==`none`);return sa(`button`,e,{state:{open:_},ref:[t,x,y],props:[B,ee,te,{onMouseOver(e){V(e.nativeEvent)},onFocus(e){R(eM(e.nativeEvent))&&e.preventBaseUIHandler()},onMouseLeave(){P.current=!1,F.clear(),I.current=void 0},onPointerEnter(e){I.current=e.pointerType},onPointerDown(e){I.current=e.pointerType,m.set(`closeOnClick`,l),l&&!m.select(`open`)&&m.cancelPendingOpen(e.nativeEvent)},onClick(e){l&&!m.select(`open`)&&m.cancelPendingOpen(e.nativeEvent)},id:h,[aS]:A?``:void 0,[$j]:A?void 0:``},f],stateAttributesMapping:tS})}),nM=U.createContext(void 0);function rM(){let e=U.useContext(nM);if(e===void 0)throw Error(ha(70));return e}var iM=U.forwardRef(function(e,t){let{children:n,container:r,className:i,render:a,style:o,...s}=e,{node:c,subtree:l}=IT({container:r,ref:t,componentProps:e,elementProps:s});return!l&&!c?null:(0,G.jsxs)(U.Fragment,{children:[l,c&&W.createPortal(n,c)]})}),aM=U.forwardRef(function(e,t){let{keepMounted:n=!1,...r}=e;return Wj().useState(`mounted`)||n?(0,G.jsx)(nM.Provider,{value:n,children:(0,G.jsx)(iM,{ref:t,...r})}):null}),oM=U.createContext(void 0);function sM(){let e=U.useContext(oM);if(e===void 0)throw Error(ha(71));return e}var cM=U.forwardRef(function(e,t){let{render:n,className:r,anchor:i,positionMethod:a=`absolute`,side:o=`top`,align:s=`center`,sideOffset:c=0,alignOffset:l=0,collisionBoundary:u=`clipping-ancestors`,collisionPadding:d=5,arrowPadding:f=5,sticky:p=!1,disableAnchorTracking:m=!1,collisionAvoidance:h=jT,style:g,..._}=e,v=Wj(),y=rM(),b=v.useState(`open`),x=v.useState(`mounted`),S=v.useState(`trackCursorAxis`),C=v.useState(`disableHoverablePopup`),w=v.useState(`floatingRootContext`),T=v.useState(`instantType`),E=v.useState(`transitionStatus`),D=Dk({anchor:i,positionMethod:a,floatingRootContext:w,mounted:x,side:o,sideOffset:c,align:s,alignOffset:l,collisionBoundary:u,collisionPadding:d,sticky:p,arrowPadding:f,disableAnchorTracking:m,keepMounted:y,collisionAvoidance:h,adaptiveOrigin:v.useState(`adaptiveOrigin`)}),O=Ik(e,U.useMemo(()=>({open:b,side:D.side,align:D.align,anchorHidden:D.anchorHidden,instant:S===`none`?T:`tracking-cursor`}),[b,D.side,D.align,D.anchorHidden,S,T]),{styles:D.positionerStyles,transitionStatus:E,props:_,refs:[t,v.useStateSetter(`positionerElement`)],hidden:!x,inert:!b||S===`both`||C});return(0,G.jsx)(oM.Provider,{value:D,children:O})}),lM=U.forwardRef(function(e,t){let{render:n,className:r,style:i,...a}=e,o=Wj(),{side:s,align:c}=sM(),l=o.useState(`open`),u=o.useState(`instantType`),d=o.useState(`transitionStatus`),f=o.useState(`popupProps`),p=o.useState(`floatingRootContext`),m=o.useState(`disabled`),h=o.useState(`closeDelay`);La({open:l,ref:o.context.popupRef,onComplete(){l&&o.context.onOpenChangeComplete?.(!0)}}),WE(p,{enabled:!m,closeDelay:h});let g=o.useStateSetter(`popupElement`);return sa(`div`,e,{state:{open:l,side:s,align:c,instant:u,transitionStatus:d},ref:[t,o.context.popupRef,g],props:[dE,f,Fk(d),a],stateAttributesMapping:iS})}),uM=function(e){let{delay:t,closeDelay:n,timeout:r=400}=e,i=U.useMemo(()=>({open:t,close:n}),[t,n]);return(0,G.jsx)(Zj.Provider,{value:t,children:(0,G.jsx)(dT,{delay:i,timeoutMs:r,children:e.children})})};function dM({delay:e=0,...t}){return(0,G.jsx)(uM,{"data-slot":`tooltip-provider`,delay:e,...t})}function fM({...e}){return(0,G.jsx)(Yj,{"data-slot":`tooltip`,...e})}function pM({...e}){return(0,G.jsx)(tM,{"data-slot":`tooltip-trigger`,...e})}function mM({className:e,side:t=`top`,sideOffset:n=4,align:r=`center`,alignOffset:i=0,children:a,...o}){return(0,G.jsx)(aM,{children:(0,G.jsx)(cM,{align:r,alignOffset:i,side:t,sideOffset:n,className:`isolate z-50`,children:(0,G.jsx)(lM,{"data-slot":`tooltip-content`,className:K(`z-50 inline-flex w-fit max-w-xs origin-(--transform-origin) items-center gap-1.5 rounded-md border border-border/70 bg-popover px-2.5 py-1.5 text-xs text-popover-foreground shadow-float 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),...o,children:a})})})}function hM(e){return sa(e.defaultTagName??`div`,e,e)}var gM=Xb(`group/badge inline-flex h-5 w-fit shrink-0 items-center justify-center gap-1 overflow-hidden rounded-md border border-transparent px-1.5 py-0.5 text-[10px] font-medium whitespace-nowrap transition-all focus-visible:border-transparent focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background has-data-[icon=inline-end]:pr-1.5 has-data-[icon=inline-start]:pl-1.5 aria-invalid:border-destructive aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 [&>svg]:pointer-events-none [&>svg]:size-3!`,{variants:{variant:{default:`bg-primary text-primary-foreground [a]:hover:bg-primary/80`,secondary:`bg-secondary text-secondary-foreground [a]:hover:bg-secondary/80`,destructive:`bg-destructive/10 text-destructive focus-visible:ring-destructive/20 dark:bg-destructive/20 dark:focus-visible:ring-destructive/40 [a]:hover:bg-destructive/20`,outline:`border-border text-foreground [a]:hover:bg-muted [a]:hover:text-muted-foreground`,ghost:`hover:bg-muted hover:text-muted-foreground dark:hover:bg-muted/50`,link:`text-primary underline-offset-4 hover:underline`}},defaultVariants:{variant:`default`}});function _M({className:e,variant:t=`default`,render:n,...r}){return hM({defaultTagName:`span`,props:Ji({className:K(gM({variant:t}),e)},r),render:n,state:{slot:`badge`,variant:t}})}function vM({className:e,...t}){return(0,G.jsx)(`div`,{"data-slot":`skeleton`,className:K(`animate-pulse rounded-md bg-muted`,e),...t})}function yM({className:e,...t}){return(0,G.jsx)(Vn,{"data-slot":`spinner`,"aria-hidden":`true`,className:K(`size-4 animate-spin`,e),...t})}var bM=Xb(`group/alert relative grid w-full gap-0.5 rounded-lg border px-2.5 py-2 text-left text-sm has-data-[slot=alert-action]:relative has-data-[slot=alert-action]:pr-18 has-[>svg]:grid-cols-[auto_1fr] has-[>svg]:gap-x-2 *:[svg]:row-span-2 *:[svg]:translate-y-0.5 *:[svg]:text-current *:[svg:not([class*='size-'])]:size-4`,{variants:{variant:{default:`bg-card text-card-foreground`,destructive:`bg-card text-destructive *:data-[slot=alert-description]:text-destructive/90 *:[svg]:text-current`}},defaultVariants:{variant:`default`}});function xM({className:e,variant:t,...n}){return(0,G.jsx)(`div`,{"data-slot":`alert`,role:`alert`,className:K(bM({variant:t}),e),...n})}function SM({className:e,...t}){return(0,G.jsx)(`div`,{"data-slot":`alert-title`,className:K(`font-medium group-has-[>svg]/alert:col-start-2 [&_a]:underline [&_a]:underline-offset-3 [&_a]:hover:text-foreground`,e),...t})}function CM({className:e,...t}){return(0,G.jsx)(`div`,{"data-slot":`alert-description`,className:K(`text-sm text-balance text-muted-foreground md:text-pretty [&_a]:underline [&_a]:underline-offset-3 [&_a]:hover:text-foreground [&_p:not(:last-child)]:mb-4`,e),...t})}function wM({className:e,...t}){return(0,G.jsx)(`div`,{"data-slot":`empty`,className:K(`flex w-full min-w-0 flex-1 flex-col items-center justify-center gap-4 rounded-xl border-dashed p-6 text-center text-balance`,e),...t})}function TM({className:e,...t}){return(0,G.jsx)(`div`,{"data-slot":`empty-header`,className:K(`flex max-w-sm flex-col items-center gap-2`,e),...t})}var EM=Xb(`mb-2 flex shrink-0 items-center justify-center [&_svg]:pointer-events-none [&_svg]:shrink-0`,{variants:{variant:{default:`bg-transparent`,icon:`flex size-8 shrink-0 items-center justify-center rounded-lg bg-muted text-foreground [&_svg:not([class*='size-'])]:size-4`}},defaultVariants:{variant:`default`}});function DM({className:e,variant:t=`default`,...n}){return(0,G.jsx)(`div`,{"data-slot":`empty-icon`,"data-variant":t,className:K(EM({variant:t,className:e})),...n})}function OM({className:e,...t}){return(0,G.jsx)(`div`,{"data-slot":`empty-title`,className:K(`font-heading text-sm font-medium tracking-tight`,e),...t})}function kM(){return(0,G.jsxs)(G.Fragment,{children:[(0,G.jsx)(`svg`,{className:`brand-mark h-5 w-7 shrink-0 text-primary`,viewBox:db.viewBox,"aria-hidden":`true`,children:(0,G.jsx)(`path`,{d:db.path,fill:`currentColor`})}),(0,G.jsx)(`span`,{className:`brand-word text-sm font-semibold tracking-tight group-data-[collapsible=icon]:hidden`,children:`Kanvil`})]})}var AM=`relative mb-4 min-w-0 [&>[data-slot=field-label]]:text-xs [&>[data-slot=field-label]]:font-medium [&>[data-slot=field-label]]:text-muted-foreground`,jM=e=>li.error(g(e));function MM({label:e,shortcut:t,children:n,...r}){return(0,G.jsxs)(fM,{children:[(0,G.jsx)(pM,{render:(0,G.jsx)($b,{variant:`ghost`,size:`icon`,"aria-label":e,...r}),children:n}),(0,G.jsxs)(mM,{children:[e,t&&(0,G.jsx)(Iw,{children:t.split(` `).map(e=>(0,G.jsx)(Fw,{children:e},e))})]})]})}function NM({label:e,labelHidden:t=!1,...n}){let r=(0,U.useId)(),[i,a]=(0,U.useState)(!1);return(0,G.jsxs)(mw,{className:K(AM,t&&`mb-0`),children:[(0,G.jsx)(gw,{htmlFor:r,className:K(t&&`sr-only`),children:e}),n.type===`password`?(0,G.jsxs)(tw,{children:[(0,G.jsx)(ow,{...n,id:r,type:i?`text`:`password`}),(0,G.jsx)(rw,{align:`inline-end`,children:(0,G.jsx)(aw,{size:`icon-sm`,"aria-label":D(i?`shell.ui.hideValue`:`shell.ui.showValue`,{label:e}),title:D(i?`shell.ui.hideValue`:`shell.ui.showValue`,{label:e}),disabled:n.disabled,onClick:()=>a(e=>!e),children:i?(0,G.jsx)(Fn,{}):(0,G.jsx)(Ln,{})})})]}):(0,G.jsx)($C,{...n,id:r})]})}function PM({label:e,...t}){let n=(0,U.useId)();return(0,G.jsxs)(mw,{className:AM,children:[(0,G.jsx)(gw,{htmlFor:n,children:e}),(0,G.jsx)(ew,{...t,id:n})]})}function FM(e){return U.Children.toArray(e).flatMap(e=>(0,U.isValidElement)(e)?e.props.value===void 0?FM(e.props.children):[{value:e.props.value,label:e.props.children}]:[])}function IM({label:e,children:t,className:n,layout:r=`field`,labelHidden:i=!1,...a}){let o=(0,U.useId)(),s=FM(t);return(0,G.jsxs)(mw,{className:K(AM,r===`property`&&`mb-0 grid grid-cols-[72px_minmax(0,1fr)] items-center gap-2`,n),children:[(0,G.jsx)(gw,{htmlFor:o,className:K(r===`property`&&`text-xs font-normal text-muted-foreground`,i&&`sr-only`),children:e}),(0,G.jsxs)(WA,{items:s,defaultValue:s[0]?.value??``,...a,children:[(0,G.jsx)(qA,{id:o,className:K(`w-full`,r===`property`&&`h-auto min-h-8 border-transparent bg-transparent shadow-none hover:bg-muted dark:bg-transparent`),children:(0,G.jsx)(KA,{})}),(0,G.jsx)(JA,{alignItemWithTrigger:!1,children:t})]})]})}function LM({label:e,description:t,className:n,...r}){let i=(0,U.useId)(),a=n===`sr-checkbox`;return(0,G.jsxs)(mw,{orientation:`horizontal`,className:K(`my-2 min-h-7 w-auto`,a&&`my-0 min-h-4 justify-center`),children:[(0,G.jsx)(Pw,{...r,id:i,"aria-describedby":t?[r[`aria-describedby`],`${i}-description`].filter(Boolean).join(` `):r[`aria-describedby`]}),t?(0,G.jsxs)(hw,{children:[(0,G.jsx)(gw,{htmlFor:i,className:K(`font-normal`,a&&`sr-only`),children:e}),(0,G.jsx)(_w,{id:`${i}-description`,className:`text-xs`,children:t})]}):(0,G.jsx)(gw,{htmlFor:i,className:K(`font-normal`,a&&`sr-only`),children:e})]})}function RM({error:e}){return e?(0,G.jsxs)(xM,{variant:`destructive`,className:`my-3`,children:[(0,G.jsx)(_n,{}),(0,G.jsx)(CM,{children:g(e)})]}):null}function zM({noun:e,offset:t,total:n,size:r,onChange:i}){return n<=r&&!t?null:(0,G.jsxs)(`footer`,{className:`mt-5 flex flex-wrap items-center justify-end gap-2 text-xs text-muted-foreground [&>span]:mr-auto`,children:[(0,G.jsx)($b,{disabled:!t,onClick:()=>i(Math.max(0,t-r)),children:D(`shell.ui.previousPage`,{noun:e})}),(0,G.jsx)(`span`,{children:D(`shell.ui.pageRange`,{from:B(t+1),to:B(Math.min(t+r,n)),total:B(n)})}),(0,G.jsx)($b,{disabled:t+r>=n,onClick:()=>i(t+r),children:D(`shell.ui.nextPage`,{noun:e})})]})}function BM(){return(0,G.jsxs)(`div`,{role:`status`,className:`space-y-4 py-5`,children:[(0,G.jsx)(`span`,{className:`sr-only`,children:D(`common.state.loading`)}),(0,G.jsx)(vM,{className:`h-6 w-40`}),(0,G.jsx)(vM,{className:`h-12 w-full`}),(0,G.jsx)(vM,{className:`h-12 w-full`}),(0,G.jsx)(vM,{className:`h-12 w-3/4`})]})}function VM({title:e,icon:t=xn,children:n,className:r}){return(0,G.jsxs)(wM,{className:K(`relative isolate overflow-hidden py-20`,r),children:[(0,G.jsxs)(TM,{className:`w-full`,children:[(0,G.jsx)(DM,{variant:`icon`,children:(0,G.jsx)(t,{})}),(0,G.jsxs)(OM,{className:`relative w-full`,children:[(0,G.jsx)(`svg`,{"aria-hidden":`true`,viewBox:db.viewBox,className:`pointer-events-none absolute top-1/2 left-1/2 -z-10 h-auto w-full -translate-x-[44.2%] -translate-y-[59.2%] text-foreground/[0.07] dark:text-foreground/[0.09]`,children:(0,G.jsx)(`path`,{d:db.path,fill:`none`,stroke:`currentColor`,strokeWidth:5})}),e]})]}),n]})}var HM={"circle-dashed":xn,circle:Dn,"circle-dot":Cn,clock:kn,"circle-check":yn,"circle-x":Tn,"octagon-alert":Gn,"arrow-up":nn,equal:Nn,"arrow-down":en,minus:Un,sparkles:Yn,bug:sn,wrench:Zn,"flask-conical":zn,"book-open":an},UM={muted:`text-muted-foreground`,foreground:`text-foreground`,accent:`text-primary`,warning:`text-[var(--warning)]`,success:`text-[var(--success)]`,danger:`text-destructive`},WM=e=>UM[S.status[e].tone];function GM({property:e,value:t,iconOnly:n=!1,label:r,color:i}){let o=e===`status`&&i&&i!=="default"?ge(i):void 0,s=e===`status`?S.status[t]:S.priority[t],c=HM[s.icon],l=o?.className??UM[s.tone],u=e===`status`?r??T[t]:a[t],d=e===`priority`&&t!==`none`?D(`shell.ui.priority`,{label:u}):u;return(0,G.jsxs)(_M,{variant:`outline`,className:K(e===`status`?`status rounded-full bg-current/8 px-2 text-xs whitespace-nowrap`:`h-6 border-transparent bg-transparent px-0 text-xs`,`gap-1.5 border-transparent font-normal`,l),style:o?.style,"data-priority":e===`priority`?t:void 0,role:n?`img`:void 0,"aria-label":n?d:void 0,title:n?d:void 0,children:[(0,G.jsx)(c,{className:e===`status`?`size-3.5`:`size-4.5`,strokeWidth:e===`status`?2:2.5,"aria-hidden":`true`}),!n&&u]})}var KM=e=>e.type===`text`?e.value:e.type===`element`&&![`ul`,`ol`].includes(e.tagName)?e.children.map(KM).join(``):``,qM=(0,U.lazy)(()=>ue(()=>import(`./markdown-blocks-B6mE_S6n.js`),__vite__mapDeps([0,1,2,3,4,5,6])));function JM(e){let t=e?.children[0];if(t?.type!==`element`||t.tagName!==`code`)return;let n=t.properties.className;return(Array.isArray(n)?n:[]).map(String).find(e=>e.startsWith(`language-`))?.slice(9)}var YM=(0,U.createContext)({source:``}),XM=(0,U.createContext)(null);function ZM({checked:e}){let{source:t,onChange:n}=(0,U.useContext)(YM),r=(0,U.useContext)(XM),i=r?.offset;return(0,G.jsx)(Pw,{checked:e,"aria-label":r?.label,disabled:!n||i===void 0,onCheckedChange:e=>{n&&i!==void 0&&n(yu(t,i,e))},className:`relative top-0.5 -ml-6 mr-2 inline-flex`})}var QM={pre:({children:e,node:t,...n})=>{let r=JM(t),i=(0,G.jsx)(`pre`,{...n,children:e});return r&&t?(0,G.jsx)(U.Suspense,{fallback:i,children:(0,G.jsx)(qM,{language:r,code:KM(t).replace(/\n$/,``)})}):i},img:({node:e,...t})=>(0,G.jsx)(`img`,{...t,loading:`lazy`,className:`my-2 rounded-md border`}),a:({children:e,node:t,...n})=>n.href?.startsWith(`mention:`)?(0,G.jsx)(`span`,{className:`rounded-sm bg-primary/10 px-0.5 font-medium text-primary`,children:e}):(0,G.jsx)(`a`,{...n,target:`_blank`,rel:`noreferrer`,children:e}),li:({children:e,node:t,className:n,...r})=>n?.includes(`task-list-item`)&&t?(0,G.jsx)(`li`,{...r,className:K(n,`list-none`),children:(0,G.jsx)(XM,{value:{offset:t.position?.start.offset,label:KM(t).trim()},children:e})}):(0,G.jsx)(`li`,{...r,className:n,children:e}),input:({node:e,...t})=>t.type===`checkbox`?(0,G.jsx)(ZM,{checked:!!t.checked}):(0,G.jsx)(`input`,{...t})};function $M({children:e,onChange:t}){return(0,G.jsx)(`div`,{className:`markdown`,children:(0,G.jsx)(YM,{value:{source:e,...t?{onChange:t}:{}},children:(0,G.jsx)(i_,{remarkPlugins:[ub],components:QM,urlTransform:e=>e.startsWith(`mention:`)?e:c_(e),children:e})})})}var eN=(0,U.createContext)(null),tN=()=>(0,U.useContext)(eN),nN={default:`max-h-[90dvh] overflow-y-auto p-6 sm:max-w-2xl`,composer:`flex max-h-[calc(100dvh-2rem)] w-[calc(100%-1rem)] flex-col gap-0 overflow-hidden p-0 sm:max-w-3xl has-[[data-expanded=true]]:h-[calc(100dvh-1rem)] has-[[data-expanded=true]]:w-[calc(100%-1rem)] has-[[data-expanded=true]]:sm:max-w-[calc(100%-1rem)] max-sm:h-dvh max-sm:w-full max-sm:max-w-none max-sm:rounded-none`};function rN({title:e,description:t,trigger:n,children:r,open:i,onOpenChange:a,busy:o=!1,size:s=`default`}){let[c,l]=(0,U.useState)(!1),u=o||c;return(0,G.jsx)(eN,{value:l,children:(0,G.jsxs)(bj,{...i===void 0?{}:{open:i},onOpenChange:(e,t)=>{!e&&u?t.cancel():a?.(e)},children:[n&&(0,G.jsx)(xj,{render:(0,G.jsx)($b,{variant:`outline`}),children:n}),(0,G.jsxs)(Tj,{showCloseButton:!u,className:nN[s],"aria-describedby":void 0,children:[(0,G.jsxs)(Ej,{className:K(`mb-2`,s===`composer`&&`m-0 shrink-0 border-b px-5 py-3 pr-24`),children:[(0,G.jsx)(Oj,{className:K(`mb-0`,s===`composer`?`text-sm`:`text-lg`),children:e}),t&&(0,G.jsx)(kj,{children:t})]}),r]})]})})}function iN({error:e,layout:t=`dialog`,pending:n=!1,submitLabel:r,pendingLabel:i,onCancel:a,cancelLabel:o=D(`common.action.cancel`),submitDisabled:s=!1,danger:c=!1,children:l}){return(0,G.jsxs)(G.Fragment,{children:[(0,G.jsx)(RM,{error:e}),(0,G.jsxs)(aN,{className:t===`inline`?`mx-0 mb-0 rounded-none border-0 bg-transparent px-0`:``,children:[l,a&&(0,G.jsx)($b,{disabled:n,onClick:a,children:o}),(0,G.jsxs)($b,{type:`submit`,variant:c?`destructive`:`default`,disabled:n||s,children:[n&&(0,G.jsx)(yM,{}),n&&i?i:r]})]})]})}function aN({children:e,className:t}){return(0,G.jsx)(Dj,{className:K(`mt-4`,t),children:e})}function oN({label:e,description:t,onConfirm:n,danger:r=!1,icon:i,disabled:a=!1,open:o,onOpenChange:s,trigger:c=!0}){let[l,u]=(0,U.useState)(!1),d=o??l,f=s??u,[p,m]=(0,U.useState)(!1),[h,g]=(0,U.useState)();return(0,G.jsxs)(Mj,{open:d,onOpenChange:f,children:[c&&(0,G.jsx)(Nj,{render:i?(0,G.jsx)(MM,{label:e,disabled:a}):(0,G.jsx)($b,{variant:r?`destructive`:`outline`,disabled:a}),children:i??e}),(0,G.jsxs)(Ij,{children:[(0,G.jsxs)(Lj,{children:[(0,G.jsx)(zj,{children:e}),(0,G.jsx)(Bj,{children:t})]}),(0,G.jsx)(RM,{error:h}),(0,G.jsxs)(Rj,{children:[(0,G.jsx)(Hj,{disabled:p,children:D(`common.action.cancel`)}),(0,G.jsx)(Vj,{variant:r?`destructive`:`default`,disabled:p,onClick:()=>{m(!0),g(void 0),n().then(()=>f(!1)).catch(g).finally(()=>m(!1))},children:p?D(`shell.ui.working`):e})]})]})]})}var sN=e=>B(e/1e3,{style:`unit`,unit:`kilobyte`,maximumFractionDigits:1});function cN({value:e,className:t}){let n=new Date(e);return(0,G.jsx)(`time`,{dateTime:e,title:f(e),className:t,children:oe(n)})}function lN({value:e,open:t=!0,className:n}){if(!e)return null;let r=t&&au(new Date(e));return(0,G.jsxs)(`span`,{className:K(`inline-flex items-center gap-1.5`,r?`text-destructive`:`text-muted-foreground`,n),children:[(0,G.jsx)(ln,{className:`size-3.5 shrink-0`,"aria-hidden":`true`}),(0,G.jsx)(cN,{value:e})]})}var uN=`mt-4 mb-6 max-w-4xl text-2xl leading-snug font-semibold tracking-tight [unicode-bidi:plaintext]`;function dN({title:e,children:t}){return(0,G.jsxs)(`header`,{className:`mb-4 flex min-h-8 flex-wrap items-center justify-between gap-3`,children:[typeof e==`string`?(0,G.jsx)(`h1`,{className:`m-0 text-base`,children:e}):e,t]})}function fN({title:e,description:t,action:n,compact:r=!1}){return(0,G.jsxs)(`header`,{className:K(`mb-4 flex flex-wrap items-start justify-between gap-3`,r&&`mb-3 items-center gap-2 [&_[data-slot=button]]:h-7 [&_[data-slot=button]]:text-xs`),children:[(0,G.jsxs)(`div`,{children:[(0,G.jsx)(`h2`,{className:K(`mb-0 text-sm`,r&&`text-[11px] font-medium tracking-[0.08em] text-muted-foreground uppercase`),children:e}),t&&(0,G.jsx)(`p`,{className:`mt-1.5 mb-0 max-w-xl text-sm text-muted-foreground`,children:t})]}),n]})}function pN({label:e,value:t,onChange:n,placeholder:r=D(`shell.ui.searchPlaceholder`),shortcut:i,defaultOpen:a=!1,wide:o=!1,className:s}){let[c,l]=(0,U.useState)(()=>a||t.length>0),u=(0,U.useRef)(null),d=c||t.length>0;return pu(i??``,()=>{l(!0),u.current?.focus()},{enabled:!!i}),(0,G.jsxs)(`div`,{role:`search`,"data-expanded":d,className:K(`group/search flex min-w-0 items-center`,d&&`flex-1`,s),children:[(0,G.jsx)(MM,{label:e,size:`icon-sm`,"aria-expanded":d,title:i?`${e} (${i})`:void 0,className:K(`transition-colors`,d&&`text-foreground`),onClick:()=>{l(!0),u.current?.focus()},children:(0,G.jsx)(qn,{})}),(0,G.jsxs)(`div`,{className:K(`flex items-center overflow-hidden transition-[width,opacity] duration-200 ease-out motion-reduce:transition-none`,d?K(`w-full opacity-100`,!o&&`max-w-56`):`w-0 opacity-0`),children:[(0,G.jsx)(`input`,{ref:u,type:`search`,"aria-label":e,placeholder:r,value:t,tabIndex:d?0:-1,onChange:e=>n(e.target.value),onBlur:()=>{t||l(a)},onKeyDown:e=>{(e.key===`Escape`||e.key===`Enter`)&&(e.preventDefault(),e.currentTarget.blur())},className:`h-8 min-w-0 flex-1 border-0 border-b border-border bg-transparent px-1 text-sm transition-colors outline-none placeholder:text-muted-foreground focus:border-foreground [&::-webkit-search-cancel-button]:hidden`}),t&&(0,G.jsx)(MM,{label:D(`shell.ui.clearValue`,{label:e}),size:`icon-xs`,onClick:()=>{n(``),l(a)},children:(0,G.jsx)($n,{})})]})]})}function mN({label:e,value:t,size:n=`icon`,className:r}){let[i,a]=(0,U.useState)(!1);return(0,G.jsx)(MM,{label:e,size:n,className:K(`text-muted-foreground hover:text-foreground`,r),onClick:()=>{cu(t).then(()=>{a(!0),setTimeout(()=>a(!1),1500),li.success(D(`shell.ui.copied`,{value:t}))}).catch(jM)},children:i?(0,G.jsx)(dn,{className:`text-(--success)`}):(0,G.jsx)(jn,{})})}function hN({label:e,value:t,inline:n=!1}){let r=(0,U.useId)(),i=(0,G.jsxs)(`div`,{role:`group`,"aria-label":n?e:void 0,"aria-labelledby":n?void 0:r,className:K(`flex min-w-0 items-center gap-3`,!n&&`justify-between`),children:[(0,G.jsx)(`code`,{className:`min-w-0 text-xs break-all`,children:t}),(0,G.jsx)(mN,{label:D(`shell.ui.copyValue`,{label:e}),value:t,size:n?`icon-sm`:`icon`})]});return n?i:(0,G.jsxs)(`div`,{className:`mb-4 min-w-0`,children:[(0,G.jsx)(`span`,{id:r,className:`mb-1 block text-xs text-muted-foreground`,children:e}),i]})}var gN=U.createContext(void 0);function _N(e){let t=U.useContext(gN);if(t===void 0&&!e)throw Error(ha(47));return t}var vN={...PE,disabled:e=>e.disabled,instantType:e=>e.instantType===`trigger-change`&&!PE.open(e)?void 0:e.instantType,openMethod:e=>e.openMethod,openChangeReason:e=>e.openChangeReason,isPressOpenedByTrigger:(e,t)=>e.openChangeReason===`trigger-press`&&PE.isOpenedByTrigger(e,t),isTouchPressOpen:(e,t)=>t&&e.openMethod===`touch`&&e.openChangeReason===`trigger-press`,hasTriggerFocusGuards:(e,t)=>PE.isOpenedByTrigger(e,t)&&!e.focusManagerModal,modal:e=>e.modal,titleElementId:e=>e.titleElementId,descriptionElementId:e=>e.descriptionElementId,openOnHover:e=>e.openOnHover,closeDelay:e=>e.closeDelay,adaptiveOrigin:e=>e.adaptiveOrigin},yN=class extends tT{constructor(e,t,n){let r=new TE;super(bN(e,r,t,n),xN(r),vN)}setOpen=(e,t)=>{let n=t.reason===PC,r=t.reason===`trigger-press`&&t.event.detail===0,i=!e&&(t.reason===`escape-key`||t.reason==null),a=vE(t),o=this.select(`activeTriggerId`);if(!e&&t.reason===`close-press`&&t.trigger==null&&o!=null&&(t.trigger=this.context.triggerElements.getById(o)??this.select(`activeTriggerElement`)??void 0),this.context.onOpenChange?.(e,t),t.isCanceled)return;this.state.floatingRootContext.dispatchOpenChange(e,t);let s=()=>{let n=_E(this.state,e,t.trigger,a());n.openChangeReason=t.reason,this.update(n)};n?(this.context.stickIfOpen=!0,this.context.stickIfOpenTimeout.start(500,()=>{this.context.stickIfOpen=!1}),W.flushSync(s)):s();let c;r?c=`click`:i?c=`dismiss`:t.reason===`focus-out`&&(c=`focus`),this.set(`instantType`,c)}};function bN(e,t,n,r=!1){let i={...OE(t,n,r),disabled:!1,modal:!1,focusManagerModal:!1,instantType:void 0,openMethod:null,openChangeReason:null,titleElementId:void 0,descriptionElementId:void 0,openOnHover:!1,closeDelay:0,adaptiveOrigin:void 0,...e};return i.open&&e?.mounted===void 0&&(i.mounted=!0),i}function xN(e){return{popupRef:U.createRef(),onOpenChange:void 0,onOpenChangeComplete:void 0,triggerFocusTargetRef:U.createRef(),beforeTriggerFocusGuardRef:U.createRef(),beforeContentFocusGuardRef:U.createRef(),stickIfOpenTimeout:new Ka,stickIfOpen:!0,triggerElements:e}}var SN=Kw(function({props:e}){let{children:t,open:n,defaultOpen:r=!1,onOpenChange:i,onOpenChangeComplete:a,modal:o=!1,handle:s,triggerId:c,defaultTriggerId:l=null}=e,u=wN(s,{modal:o,open:r,openProp:n,activeTriggerId:l,triggerIdProp:c});u.useControlledProp(`openProp`,n),u.useControlledProp(`triggerIdProp`,c);let d=u.useState(`open`),f=u.useState(`mounted`),p=u.useState(`payload`);u.useContextCallback(`onOpenChange`,i),u.useContextCallback(`onOpenChangeComplete`,a),wE(u,d),xE(u);let{forceUnmount:m}=SE(d,u,()=>{u.context.stickIfOpen=!0,u.set(`openChangeReason`,null)});u.useSyncedValues({modal:o}),U.useEffect(()=>{d||u.context.stickIfOpenTimeout.clear()},[u,d]),U.useImperativeHandle(e.actionsRef,()=>({unmount:m,close:()=>u.setOpen(!1,$(YC))}),[m,u]);let h=d||f||s!=null;return(0,G.jsxs)(gN.Provider,{value:u,children:[s&&(0,G.jsx)(mE,{handle:s,store:u}),h&&(0,G.jsx)(TN,{store:u,modal:o}),typeof t==`function`?t({payload:p}):t]})});function CN(e){return _N(!0)?(0,G.jsx)(SN,{props:e}):(0,G.jsx)(KT,{children:(0,G.jsx)(SN,{props:e})})}function wN(e,t){let n=pE((e,n)=>new yN(t,e,n));return U.useEffect(()=>n.context.stickIfOpenTimeout.disposeEffect(),[n]),n}function TN({store:e,modal:t}){let n=cE(e.useState(`floatingRootContext`),{outsidePressEvent:{mouse:t===`trap-focus`?`sloppy`:`intentional`,touch:`sloppy`}}),r=n.reference,i=n.floating;return CE(e,{activeTriggerProps:r,inactiveTriggerProps:r,popupProps:i}),null}function EN(e,t){function n(n,r,i){let a=n.currentTarget;W.flushSync(()=>{e.setOpen(!1,$(zC,n.nativeEvent,a))}),SC(a.isConnected?a:t.current,r,i)?.focus()}function r(t){n(t,-1,e.select(`positionerElement`))}function i(t){let r=e.select(`positionerElement`);r&&CC(t,r)?e.context.beforeContentFocusGuardRef.current?.focus():n(t,1,r)}return{handlePreFocusGuardFocus:r,handleFocusTargetFocus:i}}var DN=qw(function(e,t){let{render:n,className:r,style:i,disabled:a=!1,nativeButton:o=!0,handle:s,payload:c,openOnHover:l=!1,delay:u=300,closeDelay:d=0,id:f,...p}=e,m=_N(!0),h=FE(s)??m;if(!h)throw Error(ha(74));let g=hx(f),_=h.useState(`isTriggerActive`,g),v=h.useState(`floatingRootContext`),y=h.useState(`isOpenedByTrigger`,g),b=h.useState(`triggerPopupId`,g),x=U.useRef(null),{registerTrigger:S,isMountedByThisTrigger:C}=bE(g,x,h,{payload:c,disabled:a,openOnHover:l,closeDelay:d}),w=h.useState(`isPressOpenedByTrigger`,g),T=h.useState(`isTouchPressOpen`,l),E=h.useState(`hasTriggerFocusGuards`,g),D=KE(v,{enabled:!a&&l&&!T,mouseOnly:!0,move:!1,handleClose:cD(),restMs:u,delay:{close:d},triggerElementRef:x,isActiveTrigger:_,isClosing:()=>h.select(`transitionStatus`)===`ending`}),O=nE(v,{stickIfOpen:q(()=>h.context.stickIfOpen)}),k=LO(()=>h.select(`open`),e=>{h.set(`openMethod`,e)}),A=h.useState(`triggerProps`,C),{getButtonProps:j,buttonRef:M}=Hb({disabled:a,native:o}),N={open(e){return w?nS.open(e):tS.open(e)}},{handlePreFocusGuardFocus:P,handleFocusTargetFocus:F}=EN(h,x),I=sa(`button`,e,{state:{disabled:a,open:y},ref:[M,t,S,x],props:[O.reference,D,A,k,{[kT]:``,id:g,"aria-haspopup":`dialog`,"aria-expanded":y,"aria-controls":b},p,j],stateAttributesMapping:N}),L=(0,G.jsx)(U.Fragment,{children:I},g);return E?(0,G.jsxs)(U.Fragment,{children:[(0,G.jsx)(pT,{ref:h.context.beforeTriggerFocusGuardRef,onFocus:P}),L,(0,G.jsx)(pT,{ref:h.context.triggerFocusTargetRef,onFocus:F})]}):L}),ON=U.createContext(void 0);function kN(){let e=U.useContext(ON);if(e===void 0)throw Error(ha(45));return e}var AN=U.forwardRef(function(e,t){let{keepMounted:n=!1,...r}=e;return _N().useState(`mounted`)||n?(0,G.jsx)(ON.Provider,{value:n,children:(0,G.jsx)(LT,{ref:t,...r})}):null}),jN=U.createContext(void 0);function MN(){let e=U.useContext(jN);if(!e)throw Error(ha(46));return e}function NN(e){let{store:t,domReference:n,positionerElement:r,open:i}=e,a=U.useRef(null),o=U.useRef(null),s=Ia(r);J(()=>{i||(o.current?.abort(),o.current=null,t.state.instantType===`trigger-change`&&t.set(`instantType`,void 0))},[i,t]),J(()=>{let e=n,r=a.current;if(e&&(a.current=e),!r||!e||e===r||!t.select(`open`))return;t.set(`instantType`,void 0);let i=new AbortController;return o.current=i,s(()=>{t.select(`open`)&&t.set(`instantType`,`trigger-change`)},i.signal),()=>{i.abort()}},[n,s,t])}var PN=U.forwardRef(function(e,t){let{render:n,className:r,style:i,anchor:a,positionMethod:o,side:s,align:c,sideOffset:l,alignOffset:u,collisionBoundary:d=`clipping-ancestors`,collisionPadding:f,arrowPadding:p,sticky:m,disableAnchorTracking:h=!1,collisionAvoidance:g=jT,..._}=e,v=_N(),y=kN(),b=WT(),x=v.useState(`floatingRootContext`),S=v.useState(`mounted`),C=v.useState(`open`),w=v.useState(`openChangeReason`),T=v.useState(`activeTriggerElement`),E=v.useState(`modal`),D=v.useState(`openMethod`),O=v.useState(`positionerElement`),k=v.useState(`instantType`),A=v.useState(`transitionStatus`),j=Dk({anchor:a,floatingRootContext:x,positionMethod:o,mounted:S,side:s,sideOffset:l,align:c,alignOffset:u,arrowPadding:p,collisionBoundary:d,collisionPadding:f,sticky:m,disableAnchorTracking:h,keepMounted:y,nodeId:b,collisionAvoidance:g,adaptiveOrigin:v.useState(`adaptiveOrigin`)});NN({store:v,domReference:x.useState(`domReferenceElement`),positionerElement:O,open:C});let M=E===!0&&w!==`trigger-hover`;Yk(C&&M,D===`touch`,O,T);let N=v.useStateSetter(`positionerElement`),P=Ik(e,{open:C,side:j.side,align:j.align,anchorHidden:j.anchorHidden,instant:k},{styles:j.positionerStyles,transitionStatus:A,props:_,refs:[t,N],hidden:!S,inert:!C});return(0,G.jsxs)(jN.Provider,{value:j,children:[S&&M&&(0,G.jsx)(Mk,{inert:tk(!C),cutout:T}),(0,G.jsx)(GT,{id:b,children:P})]})}),FN=U.createContext(void 0);function IN(){let[e,t]=U.useState(0),n=q(()=>(t(e=>e+1),()=>{t(e=>Math.max(0,e-1))}));return{context:U.useMemo(()=>({register:n}),[n]),hasClosePart:e>0}}var LN=U.forwardRef(function(e,t){let{render:n,className:r,style:i,initialFocus:a,finalFocus:o,...s}=e,c=_N(),l=MN(),u=tA(!0)!=null,{context:d,hasClosePart:f}=IN(),p=c.useState(`open`),m=c.useState(`openMethod`),h=c.useState(`instantType`),g=c.useState(`transitionStatus`),_=c.useState(`popupProps`),v=c.useState(`titleElementId`),y=c.useState(`descriptionElementId`),b=c.useState(`modal`),x=c.useState(`mounted`),S=c.useState(`openChangeReason`),C=c.useState(`activeTriggerElement`),w=c.useState(`floatingRootContext`),T=w.useState(`floatingId`),E=c.useState(`disabled`),D=c.useState(`openOnHover`),O=c.useState(`closeDelay`);La({open:p,ref:c.context.popupRef,onComplete(){p&&c.context.onOpenChangeComplete?.(!0)}}),WE(w,{enabled:D&&!E,closeDelay:O});let k=a===void 0?fE(c.context.popupRef):a,A=b!==!1&&f;c.useSyncedValue(`focusManagerModal`,A);let j=c.useStateSetter(`popupElement`),M=sa(`div`,e,{state:{open:p,side:l.side,align:l.align,instant:h,transitionStatus:g},ref:[t,c.context.popupRef,j],props:[_,{id:T,role:`dialog`,...dE,"aria-labelledby":v,"aria-describedby":y,onKeyDown(e){u&&sA.has(e.key)&&e.stopPropagation()}},Fk(g),s],stateAttributesMapping:iS});return(0,G.jsx)(tE,{context:w,openInteractionType:m,modal:A,disabled:!x||S===`trigger-hover`,initialFocus:k,returnFocus:o,restoreFocus:`popup`,getInsideElements:()=>[c.context.beforeTriggerFocusGuardRef.current],previousFocusableElement:vb(C)?C:void 0,nextFocusableElement:c.context.triggerFocusTargetRef,beforeContentFocusGuardRef:c.context.beforeContentFocusGuardRef,children:(0,G.jsx)(FN.Provider,{value:d,children:M})})}),RN=U.forwardRef(function(e,t){let{render:n,className:r,style:i,...a}=e,o=_N(),s=hx(a.id);return o.useSyncedValueWithCleanup(`titleElementId`,s),sa(`h2`,e,{ref:t,props:[{id:s},a]})});function zN({...e}){return(0,G.jsx)(CN,{"data-slot":`popover`,...e})}function BN({...e}){return(0,G.jsx)(DN,{"data-slot":`popover-trigger`,...e})}function VN({className:e,align:t=`center`,alignOffset:n=0,side:r=`bottom`,sideOffset:i=4,anchor:a,...o}){return(0,G.jsx)(AN,{children:(0,G.jsx)(PN,{anchor:a,align:t,alignOffset:n,side:r,sideOffset:i,className:`isolate z-50`,children:(0,G.jsx)(LN,{"data-slot":`popover-content`,className:K(`z-50 flex max-h-(--available-height) w-72 origin-(--transform-origin) flex-col overflow-y-auto gap-2.5 rounded-lg bg-popover p-2.5 text-sm text-popover-foreground border border-border/70 shadow-float outline-hidden duration-100 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-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),...o})})})}function HN({className:e,...t}){return(0,G.jsx)(RN,{"data-slot":`popover-title`,className:K(`font-medium`,e),...t})}var UN=1,WN=.9,GN=.8,KN=.17,qN=.1,JN=.999,YN=.9999,XN=.99,ZN=/[\\\/_+.#"@\[\(\{&]/,QN=/[\\\/_+.#"@\[\(\{&]/g,$N=/[\s-]/,eP=/[\s-]/g;function tP(e,t,n,r,i,a,o){if(a===t.length)return i===e.length?UN:XN;var s=`${i},${a}`;if(o[s]!==void 0)return o[s];for(var c=r.charAt(a),l=n.indexOf(c,i),u=0,d,f,p,m;l>=0;)d=tP(e,t,n,r,l+1,a+1,o),d>u&&(l===i?d*=UN:ZN.test(e.charAt(l-1))?(d*=GN,p=e.slice(i,l-1).match(QN),p&&i>0&&(d*=JN**+p.length)):$N.test(e.charAt(l-1))?(d*=WN,m=e.slice(i,l-1).match(eP),m&&i>0&&(d*=JN**+m.length)):(d*=KN,i>0&&(d*=JN**+(l-i))),e.charAt(l)!==t.charAt(a)&&(d*=YN)),(d<qN&&n.charAt(l-1)===r.charAt(a+1)||r.charAt(a+1)===r.charAt(a)&&n.charAt(l-1)!==r.charAt(a))&&(f=tP(e,t,n,r,l+1,a+2,o),f*qN>d&&(d=f*qN)),d>u&&(u=d),l=n.indexOf(c,l+1);return o[s]=u,u}function nP(e){return e.toLowerCase().replace(eP,` `)}function rP(e,t,n){return e=n&&n.length>0?`${e+` `+n.join(` `)}`:e,tP(e,t,nP(e),nP(t),0,0,{})}var iP=Object.defineProperty,aP=(e,t)=>iP(e,`name`,{value:t,configurable:!0}),oP=!!(typeof window<`u`&&window.document&&window.document.createElement);function sP(e,t,{checkForDefaultPrevented:n=!0}={}){return aP(function(r){if(e?.(r),n===!1||!r||!r.defaultPrevented)return t?.(r)},`handleEvent`)}aP(sP,`composeEventHandlers`);function cP(e){if(!oP)throw Error(`Cannot access window outside of the DOM`);return e?.ownerDocument?.defaultView??window}aP(cP,`getOwnerWindow`);function lP(e){if(!oP)throw Error(`Cannot access document outside of the DOM`);return e?.ownerDocument??document}aP(lP,`getOwnerDocument`);function uP(e,t=!1){let{activeElement:n}=lP(e);if(!n?.nodeName)return null;if(dP(n)&&n.contentDocument)return uP(n.contentDocument.body,t);if(t){let e=n.getAttribute(`aria-activedescendant`);if(e){let t=lP(n).getElementById(e);if(t)return t}}return n}aP(uP,`getActiveElement`);function dP(e){return e.tagName===`IFRAME`}aP(dP,`isFrame`);var fP=Object.defineProperty,pP=(e,t)=>fP(e,`name`,{value:t,configurable:!0});function mP(e,t){if(typeof e==`function`)return e(t);e!=null&&(e.current=t)}pP(mP,`setRef`);function hP(...e){return t=>{let n=!1,r=e.map(e=>{let r=mP(e,t);return!n&&typeof r==`function`&&(n=!0),r});if(n)return()=>{for(let t=0;t<r.length;t++){let n=r[t];typeof n==`function`?n():mP(e[t],null)}}}}pP(hP,`composeRefs`);function gP(...e){return U.useCallback(hP(...e),e)}pP(gP,`useComposedRefs`);var _P=Object.defineProperty,vP=(e,t)=>_P(e,`name`,{value:t,configurable:!0});function yP(e,t){let n=U.createContext(t);n.displayName=e+`Context`;let r=vP(e=>{let{children:t,...r}=e,i=U.useMemo(()=>r,Object.values(r));return(0,G.jsx)(n.Provider,{value:i,children:t})},`Provider`);r.displayName=e+`Provider`;function i(r,i={}){let{optional:a=!1}=i,o=U.useContext(n);if(o)return o;if(t!==void 0)return t;if(!a)throw Error(`\`${r}\` must be used within \`${e}\``)}return vP(i,`useContext`),[r,i]}vP(yP,`createContext`);function bP(e,t=[]){let n=[];function r(t,r){let i=U.createContext(r);i.displayName=t+`Context`;let a=n.length;n=[...n,r];let o=vP(t=>{let{scope:n,children:r,...o}=t,s=n?.[e]?.[a]||i,c=U.useMemo(()=>o,Object.values(o));return(0,G.jsx)(s.Provider,{value:c,children:r})},`Provider`);o.displayName=t+`Provider`;function s(n,o,s={}){let{optional:c=!1}=s,l=o?.[e]?.[a]||i,u=U.useContext(l);if(u)return u;if(r!==void 0)return r;if(!c)throw Error(`\`${n}\` must be used within \`${t}\``)}return vP(s,`useContext`),[o,s]}vP(r,`createContext`);let i=vP(()=>{let t=n.map(e=>U.createContext(e));return vP(function(n){let r=n?.[e]||t;return U.useMemo(()=>({[`__scope${e}`]:{...n,[e]:r}}),[n,r])},`useScope`)},`createScope`);return i.scopeName=e,[r,xP(i,...t)]}vP(bP,`createContextScope`);function xP(...e){let t=e[0];if(e.length===1)return t;let n=vP(()=>{let n=e.map(e=>({useScope:e(),scopeName:e.scopeName}));return vP(function(e){let r=n.reduce((t,{useScope:n,scopeName:r})=>{let i=n(e)[`__scope${r}`];return{...t,...i}},{});return U.useMemo(()=>({[`__scope${t.scopeName}`]:r}),[r])},`useComposedScopes`)},`createScope`);return n.scopeName=t.scopeName,n}vP(xP,`composeContextScopes`);var SP=globalThis?.document?U.useLayoutEffect:()=>{},CP=Object.defineProperty,wP=(e,t)=>CP(e,`name`,{value:t,configurable:!0}),TP=U.useId||(()=>void 0),EP=0;function DP(e){let[t,n]=U.useState(TP());return SP(()=>{e||n(e=>e??String(EP++))},[e]),e||(t?`radix-${t}`:``)}wP(DP,`useId`);var OP=Object.defineProperty,kP=(e,t)=>OP(e,`name`,{value:t,configurable:!0}),AP=U.useEffectEvent,jP=U.useInsertionEffect;function MP(e){if(typeof AP==`function`)return AP(e);let t=U.useRef(()=>{throw Error(`Cannot call an event handler while rendering.`)});return typeof jP==`function`?jP(()=>{t.current=e}):SP(()=>{t.current=e}),U.useMemo(()=>((...e)=>t.current?.(...e)),[])}kP(MP,`useEffectEvent`);var NP=Object.defineProperty,PP=(e,t)=>NP(e,`name`,{value:t,configurable:!0}),FP=U.useInsertionEffect||SP;function IP({prop:e,defaultProp:t,onChange:n=PP(()=>{},`onChange`),caller:r}){let[i,a,o]=LP({defaultProp:t,onChange:n}),s=e!==void 0;return[s?e:i,U.useCallback(t=>{if(s){let n=RP(t)?t(e):t;n!==e&&o.current?.(n)}else a(t)},[s,e,a,o])]}PP(IP,`useControllableState`);function LP({defaultProp:e,onChange:t}){let[n,r]=U.useState(e),i=U.useRef(n),a=U.useRef(t);return FP(()=>{a.current=t},[t]),U.useEffect(()=>{i.current!==n&&(a.current?.(n),i.current=n)},[n,i]),[n,r,a]}PP(LP,`useUncontrolledState`);function RP(e){return typeof e==`function`}PP(RP,`isFunction`);var zP=Symbol(`RADIX:SYNC_STATE`);function BP(e,t,n,r){let{prop:i,defaultProp:a,onChange:o,caller:s}=t,c=i!==void 0,l=MP(o),u=[{...n,state:a}];r&&u.push(r);let[d,f]=U.useReducer((t,n)=>{if(n.type===zP)return{...t,state:n.state};let r=e(t,n);return c&&!Object.is(r.state,t.state)&&l(r.state),r},...u),p=d.state,m=U.useRef(p);U.useEffect(()=>{m.current!==p&&(m.current=p,c||l(p))},[p,m,c]);let h=U.useMemo(()=>i===void 0?d:{...d,state:i},[d,i]);return U.useEffect(()=>{c&&!Object.is(i,d.state)&&f({type:zP,state:i})},[i,d.state,c]),[h,f]}PP(BP,`useControllableStateReducer`);var VP=Object.defineProperty,HP=(e,t)=>VP(e,`name`,{value:t,configurable:!0});function UP(e){let t=U.forwardRef((t,n)=>{let{children:r,...i}=t,a=null,o=!1,s=[];r=$P(r),U.Children.forEach(r,e=>{if(YP(e)){o=!0;let t=e,n=`child`in t.props?t.props.child:t.props.children;for(;ZP(n)&&typeof rF==`function`;)n=rF(n._payload);a=KP(t,n),s.push(a?.props?.children)}else s.push(e)}),a?a=U.cloneElement(a,void 0,s):!o&&U.Children.count(r)===1&&U.isValidElement(r)&&(a=r);let c=a?JP(a):void 0,l=gP(n,c);if(!a){if(r||r===0)throw Error(o?nF(e):tF(e));return r}let u=qP(i,a.props??{});return a.type!==U.Fragment&&(u.ref=n?l:c),U.cloneElement(a,u)});return t.displayName=`${e}.Slot`,t}HP(UP,`createSlot`);var WP=Symbol.for(`radix.slottable`);function GP(e){let t=HP(e=>`child`in e?e.children(e.child):e.children,`Slottable`);return t.displayName=`${e}.Slottable`,t.__radixId=WP,t}HP(GP,`createSlottable`);var KP=HP((e,t)=>`child`in e.props?U.isValidElement(t)?U.cloneElement(t,void 0,e.props.children(t.props.children)):null:U.isValidElement(t)?t:null,`getSlottableElementFromSlottable`);function qP(e,t){let n={...t};for(let r in t){let i=e[r],a=t[r];/^on[A-Z]/.test(r)?i&&a?n[r]=(...e)=>{let t=a(...e);return i(...e),t}:i&&(n[r]=i):r===`style`?n[r]={...i,...a}:r===`className`?n[r]=[i,a].filter(Boolean).join(` `):r===`aria-describedby`&&(n[r]=eF(a,i))}return{...e,...n}}HP(qP,`mergeProps`);function JP(e){let t=Object.getOwnPropertyDescriptor(e.props,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}HP(JP,`getElementRef`);function YP(e){return U.isValidElement(e)&&typeof e.type==`function`&&`__radixId`in e.type&&e.type.__radixId===WP}HP(YP,`isSlottable`);var XP=Symbol.for(`react.lazy`);function ZP(e){return typeof e==`object`&&!!e&&`$$typeof`in e&&e.$$typeof===XP&&`_payload`in e&&QP(e._payload)}HP(ZP,`isLazyComponent`);function QP(e){return typeof e==`object`&&!!e&&`then`in e}HP(QP,`isPromiseLike`);function $P(e){let t=e;for(;ZP(t)&&typeof rF==`function`;)t=rF(t._payload);return t}HP($P,`useUnwrappedLazy`);function eF(...e){let t=new Set;for(let n of e)if(typeof n==`string`)for(let e of String(n).trim().split(/\s+/))e&&t.add(e);return t.size>0?Array.from(t).join(` `):void 0}HP(eF,`concatAriaDescribedby`);var tF=HP(e=>`${e} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`,`createSlotError`),nF=HP(e=>`${e} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`,`createSlottableError`),rF=U.use,iF=Object.defineProperty,aF=(e,t)=>iF(e,`name`,{value:t,configurable:!0}),oF=[`a`,`button`,`div`,`form`,`h2`,`h3`,`img`,`input`,`label`,`li`,`nav`,`ol`,`p`,`select`,`span`,`svg`,`ul`].reduce((e,t)=>{let n=UP(`Primitive.${t}`),r=U.forwardRef((e,r)=>{let{asChild:i,...a}=e,o=i?n:t;return typeof window<`u`&&(window[Symbol.for(`radix-ui`)]=!0),(0,G.jsx)(o,{...a,ref:r})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function sF(e,t){e&&W.flushSync(()=>e.dispatchEvent(t))}aF(sF,`dispatchDiscreteCustomEvent`);var cF=Object.defineProperty,lF=(e,t)=>cF(e,`name`,{value:t,configurable:!0}),uF=U.useInsertionEffect;function dF(e){let t=U.useRef(e);return typeof uF==`function`?uF(()=>{t.current=e}):SP(()=>{t.current=e}),U.useMemo(()=>((...e)=>t.current?.(...e)),[])}lF(dF,`useCallbackRef`);var fF=Object.defineProperty,pF=(e,t)=>fF(e,`name`,{value:t,configurable:!0}),mF=`dismissableLayer.update`,hF=`dismissableLayer.pointerDownOutside`,gF=`dismissableLayer.focusOutside`,_F,vF=U.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set,dismissableSurfaces:new Set}),yF=U.forwardRef(pF(function(e,t){let{disableOutsidePointerEvents:n=!1,deferPointerDownOutside:r=!1,onEscapeKeyDown:i,onPointerDownOutside:a,onFocusOutside:o,onInteractOutside:s,onDismiss:c,...l}=e,u=U.useContext(vF),[d,f]=U.useState(null),p=d?.ownerDocument??globalThis?.document,[,m]=U.useState({}),h=gP(t,f),g=Array.from(u.layers),[_]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),v=_?g.indexOf(_):-1,y=d?g.indexOf(d):-1,b=u.layersWithOutsidePointerEventsDisabled.size>0,x=y>=v,S=U.useRef(!1),C=SF(e=>{a?.(e),s?.(e),e.defaultPrevented||c?.()},{ownerDocument:p,deferPointerDownOutside:r,isDeferredPointerDownOutsideRef:S,dismissableSurfaces:u.dismissableSurfaces,shouldHandlePointerDownOutside:U.useCallback(e=>{if(!(e instanceof Node))return!1;let t=[...u.branches].some(t=>t.contains(e));return x&&!t},[u.branches,x])}),w=CF(e=>{if(r&&S.current)return;let t=e.target;[...u.branches].some(e=>e.contains(t))||(o?.(e),s?.(e),e.defaultPrevented||c?.())},p),T=d?y===g.length-1:!1,E=dF(e=>{e.key===`Escape`&&(i?.(e),!e.defaultPrevented&&c&&(e.preventDefault(),c()))});return U.useEffect(()=>{if(T)return p.addEventListener(`keydown`,E,{capture:!0}),()=>p.removeEventListener(`keydown`,E,{capture:!0})},[p,T,E]),U.useEffect(()=>{if(d)return n&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(_F=p.body.style.pointerEvents,p.body.style.pointerEvents=`none`),u.layersWithOutsidePointerEventsDisabled.add(d)),u.layers.add(d),wF(),()=>{n&&(u.layersWithOutsidePointerEventsDisabled.delete(d),u.layersWithOutsidePointerEventsDisabled.size===0&&(p.body.style.pointerEvents=_F))}},[d,p,n,u]),U.useEffect(()=>()=>{d&&(u.layers.delete(d),u.layersWithOutsidePointerEventsDisabled.delete(d),wF())},[d,u]),U.useEffect(()=>{let e=pF(()=>m({}),`handleUpdate`);return document.addEventListener(mF,e),()=>document.removeEventListener(mF,e)},[]),(0,G.jsx)(oF.div,{...l,ref:h,style:{pointerEvents:b?x?`auto`:`none`:void 0,...e.style},onFocusCapture:sP(e.onFocusCapture,w.onFocusCapture),onBlurCapture:sP(e.onBlurCapture,w.onBlurCapture),onPointerDownCapture:sP(e.onPointerDownCapture,C.onPointerDownCapture)})},`DismissableLayer`));function bF(){let e=U.useContext(vF),[t,n]=U.useState(null);return U.useEffect(()=>{if(t)return e.dismissableSurfaces.add(t),()=>{e.dismissableSurfaces.delete(t)}},[t,e.dismissableSurfaces]),n}pF(bF,`useDismissableLayerSurface`);var xF=pF(()=>!0,`IS_TRUE`);function SF(e,t){let{ownerDocument:n=globalThis?.document,deferPointerDownOutside:r=!1,isDeferredPointerDownOutsideRef:i,dismissableSurfaces:a,shouldHandlePointerDownOutside:o=xF}=t,s=dF(e),c=U.useRef(!1),l=U.useRef(!1),u=U.useRef(new Map),d=U.useRef(()=>{});return U.useEffect(()=>{function e(){l.current=!1,i.current=!1,u.current.clear()}pF(e,`resetOutsideInteraction`);function t(){return Array.from(u.current.values()).some(Boolean)}pF(t,`isOutsideInteractionIntercepted`);function f(e){if(!l.current)return;let t=e.target;t instanceof Node&&[...a].some(e=>e.contains(t))||u.current.set(e.type,!0),e.type===`click`&&window.setTimeout(()=>{l.current&&d.current()},0)}pF(f,`handleInteractionCapture`);function p(e){l.current&&u.current.set(e.type,!1)}pF(p,`handleInteractionBubble`);let m=pF(a=>{if(a.target&&!c.current){let f=function(){n.removeEventListener(`click`,d.current);let r=t();e(),r||TF(hF,s,p,{discrete:!0})};if(pF(f,`handleAndDispatchPointerDownOutsideEvent`),!o(a.target)){n.removeEventListener(`click`,d.current),e(),c.current=!1;return}let p={originalEvent:a};l.current=!0,i.current=r&&a.button===0,u.current.clear(),!r||a.button!==0?f():(n.removeEventListener(`click`,d.current),d.current=f,n.addEventListener(`click`,d.current,{once:!0}))}else n.removeEventListener(`click`,d.current),e();c.current=!1},`handlePointerDown`),h=[`pointerup`,`mousedown`,`mouseup`,`touchstart`,`touchend`,`click`];for(let e of h)n.addEventListener(e,f,!0),n.addEventListener(e,p);let g=window.setTimeout(()=>{n.addEventListener(`pointerdown`,m)},0);return()=>{window.clearTimeout(g),n.removeEventListener(`pointerdown`,m),n.removeEventListener(`click`,d.current);for(let e of h)n.removeEventListener(e,f,!0),n.removeEventListener(e,p)}},[n,s,r,i,a,o]),{onPointerDownCapture:pF(()=>c.current=!0,`onPointerDownCapture`)}}pF(SF,`usePointerDownOutside`);function CF(e,t=globalThis?.document){let n=dF(e),r=U.useRef(!1);return U.useEffect(()=>{let e=pF(e=>{e.target&&!r.current&&TF(gF,n,{originalEvent:e},{discrete:!1})},`handleFocus`);return t.addEventListener(`focusin`,e),()=>t.removeEventListener(`focusin`,e)},[t,n]),{onFocusCapture:pF(()=>r.current=!0,`onFocusCapture`),onBlurCapture:pF(()=>r.current=!1,`onBlurCapture`)}}pF(CF,`useFocusOutside`);function wF(){let e=new CustomEvent(mF);document.dispatchEvent(e)}pF(wF,`dispatchUpdate`);function TF(e,t,n,{discrete:r}){let i=n.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&i.addEventListener(e,t,{once:!0}),r?sF(i,a):i.dispatchEvent(a)}pF(TF,`handleAndDispatchCustomEvent`);var EF=Object.defineProperty,DF=(e,t)=>EF(e,`name`,{value:t,configurable:!0}),OF=`focusScope.autoFocusOnMount`,kF=`focusScope.autoFocusOnUnmount`,AF={bubbles:!1,cancelable:!0},jF=U.forwardRef(DF(function(e,t){let{loop:n=!1,trapped:r=!1,branches:i,onMountAutoFocus:a,onUnmountAutoFocus:o,...s}=e,[c,l]=U.useState(null),u=dF(a),d=dF(o),f=U.useRef(null),p=gP(t,l),m=U.useRef(i);U.useEffect(()=>{m.current=i});let h=U.useCallback(e=>e?c?.contains(e)?!0:!!m.current?.some(t=>t.contains(e)):!1,[c]),g=U.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;U.useEffect(()=>{if(r){let e=function(e){if(g.paused||!c)return;let t=e.target;h(t)?f.current=t:HF(f.current,{select:!0})},t=function(e){if(g.paused||!c)return;let t=e.relatedTarget;t!==null&&(h(t)||HF(f.current,{select:!0}))},n=function(e){if(document.activeElement===document.body)for(let t of e)t.removedNodes.length>0&&HF(c)};DF(e,`handleFocusIn`),DF(t,`handleFocusOut`),DF(n,`handleMutations`),document.addEventListener(`focusin`,e),document.addEventListener(`focusout`,t);let r=new MutationObserver(n);return c&&r.observe(c,{childList:!0,subtree:!0}),()=>{document.removeEventListener(`focusin`,e),document.removeEventListener(`focusout`,t),r.disconnect()}}},[r,c,g.paused,h]),U.useEffect(()=>{if(c){UF.add(g);let e=document.activeElement;if(!c.contains(e)){let t=new CustomEvent(OF,AF);c.addEventListener(OF,u),c.dispatchEvent(t),t.defaultPrevented||(IF(KF(RF(c)),{select:!0}),document.activeElement===e&&HF(c))}return()=>{c.removeEventListener(OF,u);let t=c.ownerDocument,n=CustomEvent;setTimeout(()=>{let r=new n(kF,AF);c.addEventListener(kF,d),c.dispatchEvent(r),r.defaultPrevented||HF(e??t.body,{select:!0}),c.removeEventListener(kF,d),UF.remove(g)},0)}}},[c,u,d,g]);let _=U.useCallback(e=>{if(!n&&!r||g.paused)return;let t=e.key===`Tab`&&!e.altKey&&!e.ctrlKey&&!e.metaKey,i=document.activeElement;if(t&&i){let t=e.currentTarget,[r,a]=LF(t);r&&a?!e.shiftKey&&i===a?(e.preventDefault(),n&&HF(r,{select:!0})):e.shiftKey&&i===r&&(e.preventDefault(),n&&HF(a,{select:!0})):i===t&&e.preventDefault()}},[n,r,g.paused]);return(0,G.jsx)(oF.div,{tabIndex:-1,...s,ref:p,onKeyDown:_})},`FocusScope`)),MF=U.createContext(null);function NF({registry:e,children:t}){return e?(0,G.jsx)(MF.Provider,{value:e,children:t}):t}DF(NF,`FocusScopeBranchProvider`);function PF(){let[e,t]=U.useState([]);return{nodes:e,registry:U.useMemo(()=>({add:DF(e=>t(t=>t.includes(e)?t:[...t,e]),`add`),remove:DF(e=>t(t=>t.filter(t=>t!==e)),`remove`)}),[])}}DF(PF,`useFocusScopeBranchRegistry`);function FF(e){let t=U.useContext(MF);U.useEffect(()=>{if(e&&t)return t.add(e),()=>t.remove(e)},[e,t])}DF(FF,`useFocusScopeBranch`);function IF(e,{select:t=!1}={}){let n=document.activeElement;for(let r of e)if(HF(r,{select:t}),document.activeElement!==n)return}DF(IF,`focusFirst`);function LF(e){let t=RF(e);return[zF(t,e),zF(t.reverse(),e)]}DF(LF,`getTabbableEdges`);function RF(e){let t=[],n=e.ownerDocument.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:DF(e=>{let t=e.tagName===`INPUT`&&e.type===`hidden`;return e.disabled||e.hidden||t?NodeFilter.FILTER_SKIP:e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP},`acceptNode`)});for(;n.nextNode();)t.push(n.currentNode);return t}DF(RF,`getTabbableCandidates`);function zF(e,t){let n=typeof t.checkVisibility==`function`&&t.checkVisibility({checkVisibilityCSS:!0});for(let r of e)if(!(n?!r.checkVisibility({checkVisibilityCSS:!0}):BF(r,{upTo:t})))return r}DF(zF,`findVisible`);function BF(e,{upTo:t}){if(getComputedStyle(e).visibility===`hidden`)return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display===`none`)return!0;e=e.parentElement}return!1}DF(BF,`isHidden`);function VF(e){return e.tagName===`INPUT`&&typeof e.select==`function`}DF(VF,`isSelectableInput`);function HF(e,{select:t=!1}={}){if(e&&e.focus){let n=(e.ownerDocument??document).activeElement;e.focus({preventScroll:!0}),e!==n&&VF(e)&&t&&e.select()}}DF(HF,`focus`);var UF=WF();function WF(){let e=[];return{add(t){let n=e[0];t!==n&&n?.pause(),e=GF(e,t),e.unshift(t)},remove(t){e=GF(e,t),e[0]?.resume()}}}DF(WF,`createFocusScopesStack`);function GF(e,t){let n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}DF(GF,`arrayRemove`);function KF(e){return e.filter(e=>e.tagName!==`A`)}DF(KF,`removeLinks`);var qF=Object.defineProperty,JF=U.forwardRef(((e,t)=>qF(e,`name`,{value:t,configurable:!0}))(function(e,t){let{container:n,...r}=e,[i,a]=U.useState(!1);SP(()=>a(!0),[]);let o=n||i&&globalThis?.document?.body;return o?W.createPortal((0,G.jsx)(oF.div,{...r,ref:t}),o):null},`Portal`)),YF=Object.defineProperty,XF=(e,t)=>YF(e,`name`,{value:t,configurable:!0});function ZF(e,t){return U.useReducer((e,n)=>t[e][n]??e,e)}XF(ZF,`useStateMachine`);var QF=XF(e=>{let{present:t,children:n}=e,r=$F(t),i=typeof n==`function`?n({present:r.isPresent}):U.Children.only(n),a=tI(r.ref,rI(i));return typeof n==`function`||r.isPresent?U.cloneElement(i,{ref:a}):null},`Presence`);function $F(e){let[t,n]=U.useState(),r=U.useRef(null),i=U.useRef(e),a=U.useRef(`none`),o=U.useRef(void 0),[s,c]=ZF(e?`mounted`:`unmounted`,{mounted:{UNMOUNT:`unmounted`,ANIMATION_OUT:`unmountSuspended`},unmountSuspended:{MOUNT:`mounted`,ANIMATION_END:`unmounted`},unmounted:{MOUNT:`mounted`}});return U.useEffect(()=>{s===`mounted`?(a.current=o.current??nI(r.current),o.current=void 0):a.current=`none`},[s]),SP(()=>{let t=r.current,n=i.current;if(n!==e){let r=a.current,s=nI(t);e?(o.current=s,c(`MOUNT`)):s===`none`||t?.display===`none`?c(`UNMOUNT`):c(n&&r!==s?`ANIMATION_OUT`:`UNMOUNT`),i.current=e}},[e,c]),SP(()=>{if(t){let e,n=t.ownerDocument.defaultView??window,o=XF(a=>{let o=nI(r.current).includes(CSS.escape(a.animationName));if(a.target===t&&o&&(c(`ANIMATION_END`),!i.current)){let r=t.style.animationFillMode;t.style.animationFillMode=`forwards`,e=n.setTimeout(()=>{t.style.animationFillMode===`forwards`&&(t.style.animationFillMode=r)})}},`handleAnimationEnd`),s=XF(e=>{e.target===t&&(a.current=nI(r.current))},`handleAnimationStart`);return t.addEventListener(`animationstart`,s),t.addEventListener(`animationcancel`,o),t.addEventListener(`animationend`,o),()=>{n.clearTimeout(e),t.removeEventListener(`animationstart`,s),t.removeEventListener(`animationcancel`,o),t.removeEventListener(`animationend`,o)}}c(`ANIMATION_END`)},[t,c]),{isPresent:[`mounted`,`unmountSuspended`].includes(s),ref:U.useCallback(e=>{if(e){let t=getComputedStyle(e);r.current=t,o.current=nI(t)}else r.current=null;n(e)},[])}}XF($F,`usePresence`);function eI(e,t){if(typeof e==`function`)return e(t);e!=null&&(e.current=t)}XF(eI,`setRef`);function tI(...e){let t=U.useRef(e);return t.current=e,U.useCallback(e=>{let n=t.current,r=!1,i=n.map(t=>{let n=eI(t,e);return!r&&typeof n==`function`&&(r=!0),n});if(r)return()=>{for(let e=0;e<i.length;e++){let t=i[e];typeof t==`function`?t():eI(n[e],null)}}},[])}XF(tI,`useStableComposedRefs`);function nI(e){return e?.animationName||`none`}XF(nI,`getAnimationName`);function rI(e){let t=Object.getOwnPropertyDescriptor(e.props,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning;return n?e.ref:(t=Object.getOwnPropertyDescriptor(e,`ref`)?.get,n=t&&`isReactWarning`in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}XF(rI,`getElementRef`);var iI=Object.defineProperty,aI=(e,t)=>iI(e,`name`,{value:t,configurable:!0}),oI=0,sI=null;function cI(e){return lI(),e.children}aI(cI,`FocusGuards`);function lI(){U.useEffect(()=>{sI||={start:uI(),end:uI()};let{start:e,end:t}=sI;return document.body.firstElementChild!==e&&document.body.insertAdjacentElement(`afterbegin`,e),document.body.lastElementChild!==t&&document.body.insertAdjacentElement(`beforeend`,t),oI++,()=>{oI===1&&(sI?.start.remove(),sI?.end.remove(),sI=null),oI=Math.max(0,oI-1)}},[])}aI(lI,`useFocusGuards`);function uI(){let e=document.createElement(`span`);return e.setAttribute(`data-radix-focus-guard`,``),e.tabIndex=0,e.style.outline=`none`,e.style.opacity=`0`,e.style.position=`fixed`,e.style.pointerEvents=`none`,e}aI(uI,`createFocusGuard`);var dI=function(){return dI=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n],t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},dI.apply(this,arguments)};function fI(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols==`function`)for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n}function pI(e,t,n){if(n||arguments.length===2)for(var r=0,i=t.length,a;r<i;r++)(a||!(r in t))&&(a||=Array.prototype.slice.call(t,0,r),a[r]=t[r]);return e.concat(a||Array.prototype.slice.call(t))}var mI=`right-scroll-bar-position`,hI=`width-before-scroll-bar`,gI=`with-scroll-bars-hidden`,_I=`--removed-body-scroll-bar-size`;function vI(e,t){return typeof e==`function`?e(t):e&&(e.current=t),e}function yI(e,t){var n=(0,U.useState)(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(e){var t=n.value;t!==e&&(n.value=e,n.callback(e,t))}}}})[0];return n.callback=t,n.facade}var bI=typeof window<`u`?U.useLayoutEffect:U.useEffect,xI=new WeakMap;function SI(e,t){var n=yI(t||null,function(t){return e.forEach(function(e){return vI(e,t)})});return bI(function(){var t=xI.get(n);if(t){var r=new Set(t),i=new Set(e),a=n.current;r.forEach(function(e){i.has(e)||vI(e,null)}),i.forEach(function(e){r.has(e)||vI(e,a)})}xI.set(n,e)},[e]),n}function CI(e){return e}function wI(e,t){t===void 0&&(t=CI);var n=[],r=!1;return{read:function(){if(r)throw Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(e){var i=t(e,r);return n.push(i),function(){n=n.filter(function(e){return e!==i})}},assignSyncMedium:function(e){for(r=!0;n.length;){var t=n;n=[],t.forEach(e)}n={push:function(t){return e(t)},filter:function(){return n}}},assignMedium:function(e){r=!0;var t=[];if(n.length){var i=n;n=[],i.forEach(e),t=n}var a=function(){var n=t;t=[],n.forEach(e)},o=function(){return Promise.resolve().then(a)};o(),n={push:function(e){t.push(e),o()},filter:function(e){return t=t.filter(e),n}}}}}function TI(e){e===void 0&&(e={});var t=wI(null);return t.options=dI({async:!0,ssr:!1},e),t}var EI=function(e){var t=e.sideCar,n=fI(e,[`sideCar`]);if(!t)throw Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw Error(`Sidecar medium not found`);return U.createElement(r,dI({},n))};EI.isSideCarExport=!0;function DI(e,t){return e.useMedium(t),EI}var OI=TI(),kI=function(){},AI=U.forwardRef(function(e,t){var n=U.useRef(null),r=U.useState({onScrollCapture:kI,onWheelCapture:kI,onTouchMoveCapture:kI}),i=r[0],a=r[1],o=e.forwardProps,s=e.children,c=e.className,l=e.removeScrollBar,u=e.enabled,d=e.shards,f=e.sideCar,p=e.noRelative,m=e.noIsolation,h=e.inert,g=e.allowPinchZoom,_=e.as,v=_===void 0?`div`:_,y=e.gapMode,b=fI(e,[`forwardProps`,`children`,`className`,`removeScrollBar`,`enabled`,`shards`,`sideCar`,`noRelative`,`noIsolation`,`inert`,`allowPinchZoom`,`as`,`gapMode`]),x=f,S=SI([n,t]),C=dI(dI({},b),i);return U.createElement(U.Fragment,null,u&&U.createElement(x,{sideCar:OI,removeScrollBar:l,shards:d,noRelative:p,noIsolation:m,inert:h,setCallbacks:a,allowPinchZoom:!!g,lockRef:n,gapMode:y}),o?U.cloneElement(U.Children.only(s),dI(dI({},C),{ref:S})):U.createElement(v,dI({},C,{className:c,ref:S}),s))});AI.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},AI.classNames={fullWidth:hI,zeroRight:mI};var jI=function(){if(typeof __webpack_nonce__<`u`)return __webpack_nonce__};function MI(){if(!document)return null;var e=document.createElement(`style`);e.type=`text/css`;var t=jI();return t&&e.setAttribute(`nonce`,t),e}function NI(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function PI(e){(document.head||document.getElementsByTagName(`head`)[0]).appendChild(e)}var FI=function(){var e=0,t=null;return{add:function(n){e==0&&(t=MI())&&(NI(t,n),PI(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},II=function(){var e=FI();return function(t,n){U.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},LI=function(){var e=II();return function(t){var n=t.styles,r=t.dynamic;return e(n,r),null}},RI={left:0,top:0,right:0,gap:0},zI=function(e){return parseInt(e||``,10)||0},BI=function(e){var t=window.getComputedStyle(document.body),n=t[e===`padding`?`paddingLeft`:`marginLeft`],r=t[e===`padding`?`paddingTop`:`marginTop`],i=t[e===`padding`?`paddingRight`:`marginRight`];return[zI(n),zI(r),zI(i)]},VI=function(e){if(e===void 0&&(e=`margin`),typeof window>`u`)return RI;var t=BI(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},HI=LI(),UI=`data-scroll-locked`,WI=function(e,t,n,r){var i=e.left,a=e.top,o=e.right,s=e.gap;return n===void 0&&(n=`margin`),`
|
|
46
46
|
.${gI} {
|
|
47
47
|
overflow: hidden ${r};
|
|
48
48
|
padding-right: ${s}px ${r};
|