bertrand 0.20.0 → 0.20.1
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/dist/bertrand.js +39 -12
- package/dist/dashboard/assets/index-D_l3EPhC.css +1 -0
- package/dist/dashboard/assets/index-mg96b7q-.js +684 -0
- package/dist/dashboard/index.html +3 -3
- package/dist/run-screen.js +308 -455
- package/package.json +1 -1
- package/dist/dashboard/assets/index-DgvcDkSY.js +0 -673
- package/dist/dashboard/assets/index-qVHXGTGL.css +0 -1
- package/dist/dashboard/assets/workbox-window.prod.es5-BBnX5xw4.js +0 -2
- package/dist/dashboard/manifest.webmanifest +0 -1
- package/dist/dashboard/sw.js +0 -1
- package/dist/dashboard/workbox-e4022e15.js +0 -1
|
@@ -1,673 +0,0 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/html-GMplVEZG.js","assets/javascript-wDzz0qaB.js","assets/css-DPfMkruS.js"])))=>i.map(i=>d[i]);
|
|
2
|
-
var d6=Object.defineProperty;var h6=Object.getPrototypeOf;var p6=Reflect.get;var vT=e=>{throw TypeError(e)};var m6=(e,t,n)=>t in e?d6(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var te=(e,t,n)=>m6(e,typeof t!="symbol"?t+"":t,n),R0=(e,t,n)=>t.has(e)||vT("Cannot "+n);var K=(e,t,n)=>(R0(e,t,"read from private field"),n?n.call(e):t.get(e)),He=(e,t,n)=>t.has(e)?vT("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),$e=(e,t,n,r)=>(R0(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n),rt=(e,t,n)=>(R0(e,t,"access private method"),n);var hm=(e,t,n,r)=>({set _(i){$e(e,t,i,n)},get _(){return K(e,t,r)}}),xT=(e,t,n)=>p6(h6(e),n,t);function g6(e,t){for(var n=0;n<t.length;n++){const r=t[n];if(typeof r!="string"&&!Array.isArray(r)){for(const i in r)if(i!=="default"&&!(i in e)){const o=Object.getOwnPropertyDescriptor(r,i);o&&Object.defineProperty(e,i,o.get?o:{enumerable:!0,get:()=>r[i]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const i of document.querySelectorAll('link[rel="modulepreload"]'))r(i);new MutationObserver(i=>{for(const o of i)if(o.type==="childList")for(const a of o.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&r(a)}).observe(document,{childList:!0,subtree:!0});function n(i){const o={};return i.integrity&&(o.integrity=i.integrity),i.referrerPolicy&&(o.referrerPolicy=i.referrerPolicy),i.crossOrigin==="use-credentials"?o.credentials="include":i.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function r(i){if(i.ep)return;i.ep=!0;const o=n(i);fetch(i.href,o)}})();function nS(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var _0={exports:{}},pd={};/**
|
|
3
|
-
* @license React
|
|
4
|
-
* react-jsx-runtime.production.js
|
|
5
|
-
*
|
|
6
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
7
|
-
*
|
|
8
|
-
* This source code is licensed under the MIT license found in the
|
|
9
|
-
* LICENSE file in the root directory of this source tree.
|
|
10
|
-
*/var wT;function y6(){if(wT)return pd;wT=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function n(r,i,o){var a=null;if(o!==void 0&&(a=""+o),i.key!==void 0&&(a=""+i.key),"key"in i){o={};for(var u in i)u!=="key"&&(o[u]=i[u])}else o=i;return i=o.ref,{$$typeof:e,type:r,key:a,ref:i!==void 0?i:null,props:o}}return pd.Fragment=t,pd.jsx=n,pd.jsxs=n,pd}var ST;function b6(){return ST||(ST=1,_0.exports=y6()),_0.exports}var E=b6(),T0={exports:{}},nt={};/**
|
|
11
|
-
* @license React
|
|
12
|
-
* react.production.js
|
|
13
|
-
*
|
|
14
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
15
|
-
*
|
|
16
|
-
* This source code is licensed under the MIT license found in the
|
|
17
|
-
* LICENSE file in the root directory of this source tree.
|
|
18
|
-
*/var CT;function v6(){if(CT)return nt;CT=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),o=Symbol.for("react.consumer"),a=Symbol.for("react.context"),u=Symbol.for("react.forward_ref"),c=Symbol.for("react.suspense"),f=Symbol.for("react.memo"),h=Symbol.for("react.lazy"),p=Symbol.for("react.activity"),m=Symbol.iterator;function y(Y){return Y===null||typeof Y!="object"?null:(Y=m&&Y[m]||Y["@@iterator"],typeof Y=="function"?Y:null)}var b={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},v=Object.assign,S={};function x(Y,J,H){this.props=Y,this.context=J,this.refs=S,this.updater=H||b}x.prototype.isReactComponent={},x.prototype.setState=function(Y,J){if(typeof Y!="object"&&typeof Y!="function"&&Y!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,Y,J,"setState")},x.prototype.forceUpdate=function(Y){this.updater.enqueueForceUpdate(this,Y,"forceUpdate")};function _(){}_.prototype=x.prototype;function k(Y,J,H){this.props=Y,this.context=J,this.refs=S,this.updater=H||b}var T=k.prototype=new _;T.constructor=k,v(T,x.prototype),T.isPureReactComponent=!0;var A=Array.isArray;function D(){}var O={H:null,A:null,T:null,S:null},$=Object.prototype.hasOwnProperty;function B(Y,J,H){var ie=H.ref;return{$$typeof:e,type:Y,key:J,ref:ie!==void 0?ie:null,props:H}}function j(Y,J){return B(Y.type,J,Y.props)}function N(Y){return typeof Y=="object"&&Y!==null&&Y.$$typeof===e}function M(Y){var J={"=":"=0",":":"=2"};return"$"+Y.replace(/[=:]/g,function(H){return J[H]})}var z=/\/+/g;function G(Y,J){return typeof Y=="object"&&Y!==null&&Y.key!=null?M(""+Y.key):J.toString(36)}function L(Y){switch(Y.status){case"fulfilled":return Y.value;case"rejected":throw Y.reason;default:switch(typeof Y.status=="string"?Y.then(D,D):(Y.status="pending",Y.then(function(J){Y.status==="pending"&&(Y.status="fulfilled",Y.value=J)},function(J){Y.status==="pending"&&(Y.status="rejected",Y.reason=J)})),Y.status){case"fulfilled":return Y.value;case"rejected":throw Y.reason}}throw Y}function F(Y,J,H,ie,re){var he=typeof Y;(he==="undefined"||he==="boolean")&&(Y=null);var ve=!1;if(Y===null)ve=!0;else switch(he){case"bigint":case"string":case"number":ve=!0;break;case"object":switch(Y.$$typeof){case e:case t:ve=!0;break;case h:return ve=Y._init,F(ve(Y._payload),J,H,ie,re)}}if(ve)return re=re(Y),ve=ie===""?"."+G(Y,0):ie,A(re)?(H="",ve!=null&&(H=ve.replace(z,"$&/")+"/"),F(re,J,H,"",function(je){return je})):re!=null&&(N(re)&&(re=j(re,H+(re.key==null||Y&&Y.key===re.key?"":(""+re.key).replace(z,"$&/")+"/")+ve)),J.push(re)),1;ve=0;var Re=ie===""?".":ie+":";if(A(Y))for(var ce=0;ce<Y.length;ce++)ie=Y[ce],he=Re+G(ie,ce),ve+=F(ie,J,H,he,re);else if(ce=y(Y),typeof ce=="function")for(Y=ce.call(Y),ce=0;!(ie=Y.next()).done;)ie=ie.value,he=Re+G(ie,ce++),ve+=F(ie,J,H,he,re);else if(he==="object"){if(typeof Y.then=="function")return F(L(Y),J,H,ie,re);throw J=String(Y),Error("Objects are not valid as a React child (found: "+(J==="[object Object]"?"object with keys {"+Object.keys(Y).join(", ")+"}":J)+"). If you meant to render a collection of children, use an array instead.")}return ve}function U(Y,J,H){if(Y==null)return Y;var ie=[],re=0;return F(Y,ie,"","",function(he){return J.call(H,he,re++)}),ie}function q(Y){if(Y._status===-1){var J=Y._result;J=J(),J.then(function(H){(Y._status===0||Y._status===-1)&&(Y._status=1,Y._result=H)},function(H){(Y._status===0||Y._status===-1)&&(Y._status=2,Y._result=H)}),Y._status===-1&&(Y._status=0,Y._result=J)}if(Y._status===1)return Y._result.default;throw Y._result}var W=typeof reportError=="function"?reportError:function(Y){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var J=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof Y=="object"&&Y!==null&&typeof Y.message=="string"?String(Y.message):String(Y),error:Y});if(!window.dispatchEvent(J))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",Y);return}console.error(Y)},I={map:U,forEach:function(Y,J,H){U(Y,function(){J.apply(this,arguments)},H)},count:function(Y){var J=0;return U(Y,function(){J++}),J},toArray:function(Y){return U(Y,function(J){return J})||[]},only:function(Y){if(!N(Y))throw Error("React.Children.only expected to receive a single React element child.");return Y}};return nt.Activity=p,nt.Children=I,nt.Component=x,nt.Fragment=n,nt.Profiler=i,nt.PureComponent=k,nt.StrictMode=r,nt.Suspense=c,nt.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=O,nt.__COMPILER_RUNTIME={__proto__:null,c:function(Y){return O.H.useMemoCache(Y)}},nt.cache=function(Y){return function(){return Y.apply(null,arguments)}},nt.cacheSignal=function(){return null},nt.cloneElement=function(Y,J,H){if(Y==null)throw Error("The argument must be a React element, but you passed "+Y+".");var ie=v({},Y.props),re=Y.key;if(J!=null)for(he in J.key!==void 0&&(re=""+J.key),J)!$.call(J,he)||he==="key"||he==="__self"||he==="__source"||he==="ref"&&J.ref===void 0||(ie[he]=J[he]);var he=arguments.length-2;if(he===1)ie.children=H;else if(1<he){for(var ve=Array(he),Re=0;Re<he;Re++)ve[Re]=arguments[Re+2];ie.children=ve}return B(Y.type,re,ie)},nt.createContext=function(Y){return Y={$$typeof:a,_currentValue:Y,_currentValue2:Y,_threadCount:0,Provider:null,Consumer:null},Y.Provider=Y,Y.Consumer={$$typeof:o,_context:Y},Y},nt.createElement=function(Y,J,H){var ie,re={},he=null;if(J!=null)for(ie in J.key!==void 0&&(he=""+J.key),J)$.call(J,ie)&&ie!=="key"&&ie!=="__self"&&ie!=="__source"&&(re[ie]=J[ie]);var ve=arguments.length-2;if(ve===1)re.children=H;else if(1<ve){for(var Re=Array(ve),ce=0;ce<ve;ce++)Re[ce]=arguments[ce+2];re.children=Re}if(Y&&Y.defaultProps)for(ie in ve=Y.defaultProps,ve)re[ie]===void 0&&(re[ie]=ve[ie]);return B(Y,he,re)},nt.createRef=function(){return{current:null}},nt.forwardRef=function(Y){return{$$typeof:u,render:Y}},nt.isValidElement=N,nt.lazy=function(Y){return{$$typeof:h,_payload:{_status:-1,_result:Y},_init:q}},nt.memo=function(Y,J){return{$$typeof:f,type:Y,compare:J===void 0?null:J}},nt.startTransition=function(Y){var J=O.T,H={};O.T=H;try{var ie=Y(),re=O.S;re!==null&&re(H,ie),typeof ie=="object"&&ie!==null&&typeof ie.then=="function"&&ie.then(D,W)}catch(he){W(he)}finally{J!==null&&H.types!==null&&(J.types=H.types),O.T=J}},nt.unstable_useCacheRefresh=function(){return O.H.useCacheRefresh()},nt.use=function(Y){return O.H.use(Y)},nt.useActionState=function(Y,J,H){return O.H.useActionState(Y,J,H)},nt.useCallback=function(Y,J){return O.H.useCallback(Y,J)},nt.useContext=function(Y){return O.H.useContext(Y)},nt.useDebugValue=function(){},nt.useDeferredValue=function(Y,J){return O.H.useDeferredValue(Y,J)},nt.useEffect=function(Y,J){return O.H.useEffect(Y,J)},nt.useEffectEvent=function(Y){return O.H.useEffectEvent(Y)},nt.useId=function(){return O.H.useId()},nt.useImperativeHandle=function(Y,J,H){return O.H.useImperativeHandle(Y,J,H)},nt.useInsertionEffect=function(Y,J){return O.H.useInsertionEffect(Y,J)},nt.useLayoutEffect=function(Y,J){return O.H.useLayoutEffect(Y,J)},nt.useMemo=function(Y,J){return O.H.useMemo(Y,J)},nt.useOptimistic=function(Y,J){return O.H.useOptimistic(Y,J)},nt.useReducer=function(Y,J,H){return O.H.useReducer(Y,J,H)},nt.useRef=function(Y){return O.H.useRef(Y)},nt.useState=function(Y){return O.H.useState(Y)},nt.useSyncExternalStore=function(Y,J,H){return O.H.useSyncExternalStore(Y,J,H)},nt.useTransition=function(){return O.H.useTransition()},nt.version="19.2.5",nt}var ET;function kh(){return ET||(ET=1,T0.exports=v6()),T0.exports}var C=kh();const Ca=nS(C),as=g6({__proto__:null,default:Ca},[C]);var A0={exports:{}},md={},D0={exports:{}},M0={};/**
|
|
19
|
-
* @license React
|
|
20
|
-
* scheduler.production.js
|
|
21
|
-
*
|
|
22
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
23
|
-
*
|
|
24
|
-
* This source code is licensed under the MIT license found in the
|
|
25
|
-
* LICENSE file in the root directory of this source tree.
|
|
26
|
-
*/var kT;function x6(){return kT||(kT=1,(function(e){function t(F,U){var q=F.length;F.push(U);e:for(;0<q;){var W=q-1>>>1,I=F[W];if(0<i(I,U))F[W]=U,F[q]=I,q=W;else break e}}function n(F){return F.length===0?null:F[0]}function r(F){if(F.length===0)return null;var U=F[0],q=F.pop();if(q!==U){F[0]=q;e:for(var W=0,I=F.length,Y=I>>>1;W<Y;){var J=2*(W+1)-1,H=F[J],ie=J+1,re=F[ie];if(0>i(H,q))ie<I&&0>i(re,H)?(F[W]=re,F[ie]=q,W=ie):(F[W]=H,F[J]=q,W=J);else if(ie<I&&0>i(re,q))F[W]=re,F[ie]=q,W=ie;else break e}}return U}function i(F,U){var q=F.sortIndex-U.sortIndex;return q!==0?q:F.id-U.id}if(e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var o=performance;e.unstable_now=function(){return o.now()}}else{var a=Date,u=a.now();e.unstable_now=function(){return a.now()-u}}var c=[],f=[],h=1,p=null,m=3,y=!1,b=!1,v=!1,S=!1,x=typeof setTimeout=="function"?setTimeout:null,_=typeof clearTimeout=="function"?clearTimeout:null,k=typeof setImmediate<"u"?setImmediate:null;function T(F){for(var U=n(f);U!==null;){if(U.callback===null)r(f);else if(U.startTime<=F)r(f),U.sortIndex=U.expirationTime,t(c,U);else break;U=n(f)}}function A(F){if(v=!1,T(F),!b)if(n(c)!==null)b=!0,D||(D=!0,M());else{var U=n(f);U!==null&&L(A,U.startTime-F)}}var D=!1,O=-1,$=5,B=-1;function j(){return S?!0:!(e.unstable_now()-B<$)}function N(){if(S=!1,D){var F=e.unstable_now();B=F;var U=!0;try{e:{b=!1,v&&(v=!1,_(O),O=-1),y=!0;var q=m;try{t:{for(T(F),p=n(c);p!==null&&!(p.expirationTime>F&&j());){var W=p.callback;if(typeof W=="function"){p.callback=null,m=p.priorityLevel;var I=W(p.expirationTime<=F);if(F=e.unstable_now(),typeof I=="function"){p.callback=I,T(F),U=!0;break t}p===n(c)&&r(c),T(F)}else r(c);p=n(c)}if(p!==null)U=!0;else{var Y=n(f);Y!==null&&L(A,Y.startTime-F),U=!1}}break e}finally{p=null,m=q,y=!1}U=void 0}}finally{U?M():D=!1}}}var M;if(typeof k=="function")M=function(){k(N)};else if(typeof MessageChannel<"u"){var z=new MessageChannel,G=z.port2;z.port1.onmessage=N,M=function(){G.postMessage(null)}}else M=function(){x(N,0)};function L(F,U){O=x(function(){F(e.unstable_now())},U)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(F){F.callback=null},e.unstable_forceFrameRate=function(F){0>F||125<F?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):$=0<F?Math.floor(1e3/F):5},e.unstable_getCurrentPriorityLevel=function(){return m},e.unstable_next=function(F){switch(m){case 1:case 2:case 3:var U=3;break;default:U=m}var q=m;m=U;try{return F()}finally{m=q}},e.unstable_requestPaint=function(){S=!0},e.unstable_runWithPriority=function(F,U){switch(F){case 1:case 2:case 3:case 4:case 5:break;default:F=3}var q=m;m=F;try{return U()}finally{m=q}},e.unstable_scheduleCallback=function(F,U,q){var W=e.unstable_now();switch(typeof q=="object"&&q!==null?(q=q.delay,q=typeof q=="number"&&0<q?W+q:W):q=W,F){case 1:var I=-1;break;case 2:I=250;break;case 5:I=1073741823;break;case 4:I=1e4;break;default:I=5e3}return I=q+I,F={id:h++,callback:U,priorityLevel:F,startTime:q,expirationTime:I,sortIndex:-1},q>W?(F.sortIndex=q,t(f,F),n(c)===null&&F===n(f)&&(v?(_(O),O=-1):v=!0,L(A,q-W))):(F.sortIndex=I,t(c,F),b||y||(b=!0,D||(D=!0,M()))),F},e.unstable_shouldYield=j,e.unstable_wrapCallback=function(F){var U=m;return function(){var q=m;m=U;try{return F.apply(this,arguments)}finally{m=q}}}})(M0)),M0}var RT;function w6(){return RT||(RT=1,D0.exports=x6()),D0.exports}var O0={exports:{}},Yn={};/**
|
|
27
|
-
* @license React
|
|
28
|
-
* react-dom.production.js
|
|
29
|
-
*
|
|
30
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
31
|
-
*
|
|
32
|
-
* This source code is licensed under the MIT license found in the
|
|
33
|
-
* LICENSE file in the root directory of this source tree.
|
|
34
|
-
*/var _T;function S6(){if(_T)return Yn;_T=1;var e=kh();function t(c){var f="https://react.dev/errors/"+c;if(1<arguments.length){f+="?args[]="+encodeURIComponent(arguments[1]);for(var h=2;h<arguments.length;h++)f+="&args[]="+encodeURIComponent(arguments[h])}return"Minified React error #"+c+"; visit "+f+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function n(){}var r={d:{f:n,r:function(){throw Error(t(522))},D:n,C:n,L:n,m:n,X:n,S:n,M:n},p:0,findDOMNode:null},i=Symbol.for("react.portal");function o(c,f,h){var p=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:i,key:p==null?null:""+p,children:c,containerInfo:f,implementation:h}}var a=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function u(c,f){if(c==="font")return"";if(typeof f=="string")return f==="use-credentials"?f:""}return Yn.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=r,Yn.createPortal=function(c,f){var h=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!f||f.nodeType!==1&&f.nodeType!==9&&f.nodeType!==11)throw Error(t(299));return o(c,f,null,h)},Yn.flushSync=function(c){var f=a.T,h=r.p;try{if(a.T=null,r.p=2,c)return c()}finally{a.T=f,r.p=h,r.d.f()}},Yn.preconnect=function(c,f){typeof c=="string"&&(f?(f=f.crossOrigin,f=typeof f=="string"?f==="use-credentials"?f:"":void 0):f=null,r.d.C(c,f))},Yn.prefetchDNS=function(c){typeof c=="string"&&r.d.D(c)},Yn.preinit=function(c,f){if(typeof c=="string"&&f&&typeof f.as=="string"){var h=f.as,p=u(h,f.crossOrigin),m=typeof f.integrity=="string"?f.integrity:void 0,y=typeof f.fetchPriority=="string"?f.fetchPriority:void 0;h==="style"?r.d.S(c,typeof f.precedence=="string"?f.precedence:void 0,{crossOrigin:p,integrity:m,fetchPriority:y}):h==="script"&&r.d.X(c,{crossOrigin:p,integrity:m,fetchPriority:y,nonce:typeof f.nonce=="string"?f.nonce:void 0})}},Yn.preinitModule=function(c,f){if(typeof c=="string")if(typeof f=="object"&&f!==null){if(f.as==null||f.as==="script"){var h=u(f.as,f.crossOrigin);r.d.M(c,{crossOrigin:h,integrity:typeof f.integrity=="string"?f.integrity:void 0,nonce:typeof f.nonce=="string"?f.nonce:void 0})}}else f==null&&r.d.M(c)},Yn.preload=function(c,f){if(typeof c=="string"&&typeof f=="object"&&f!==null&&typeof f.as=="string"){var h=f.as,p=u(h,f.crossOrigin);r.d.L(c,h,{crossOrigin:p,integrity:typeof f.integrity=="string"?f.integrity:void 0,nonce:typeof f.nonce=="string"?f.nonce:void 0,type:typeof f.type=="string"?f.type:void 0,fetchPriority:typeof f.fetchPriority=="string"?f.fetchPriority:void 0,referrerPolicy:typeof f.referrerPolicy=="string"?f.referrerPolicy:void 0,imageSrcSet:typeof f.imageSrcSet=="string"?f.imageSrcSet:void 0,imageSizes:typeof f.imageSizes=="string"?f.imageSizes:void 0,media:typeof f.media=="string"?f.media:void 0})}},Yn.preloadModule=function(c,f){if(typeof c=="string")if(f){var h=u(f.as,f.crossOrigin);r.d.m(c,{as:typeof f.as=="string"&&f.as!=="script"?f.as:void 0,crossOrigin:h,integrity:typeof f.integrity=="string"?f.integrity:void 0})}else r.d.m(c)},Yn.requestFormReset=function(c){r.d.r(c)},Yn.unstable_batchedUpdates=function(c,f){return c(f)},Yn.useFormState=function(c,f,h){return a.H.useFormState(c,f,h)},Yn.useFormStatus=function(){return a.H.useHostTransitionStatus()},Yn.version="19.2.5",Yn}var TT;function $O(){if(TT)return O0.exports;TT=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),O0.exports=S6(),O0.exports}/**
|
|
35
|
-
* @license React
|
|
36
|
-
* react-dom-client.production.js
|
|
37
|
-
*
|
|
38
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
39
|
-
*
|
|
40
|
-
* This source code is licensed under the MIT license found in the
|
|
41
|
-
* LICENSE file in the root directory of this source tree.
|
|
42
|
-
*/var AT;function C6(){if(AT)return md;AT=1;var e=w6(),t=kh(),n=$O();function r(s){var l="https://react.dev/errors/"+s;if(1<arguments.length){l+="?args[]="+encodeURIComponent(arguments[1]);for(var d=2;d<arguments.length;d++)l+="&args[]="+encodeURIComponent(arguments[d])}return"Minified React error #"+s+"; visit "+l+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function i(s){return!(!s||s.nodeType!==1&&s.nodeType!==9&&s.nodeType!==11)}function o(s){var l=s,d=s;if(s.alternate)for(;l.return;)l=l.return;else{s=l;do l=s,(l.flags&4098)!==0&&(d=l.return),s=l.return;while(s)}return l.tag===3?d:null}function a(s){if(s.tag===13){var l=s.memoizedState;if(l===null&&(s=s.alternate,s!==null&&(l=s.memoizedState)),l!==null)return l.dehydrated}return null}function u(s){if(s.tag===31){var l=s.memoizedState;if(l===null&&(s=s.alternate,s!==null&&(l=s.memoizedState)),l!==null)return l.dehydrated}return null}function c(s){if(o(s)!==s)throw Error(r(188))}function f(s){var l=s.alternate;if(!l){if(l=o(s),l===null)throw Error(r(188));return l!==s?null:s}for(var d=s,g=l;;){var w=d.return;if(w===null)break;var R=w.alternate;if(R===null){if(g=w.return,g!==null){d=g;continue}break}if(w.child===R.child){for(R=w.child;R;){if(R===d)return c(w),s;if(R===g)return c(w),l;R=R.sibling}throw Error(r(188))}if(d.return!==g.return)d=w,g=R;else{for(var P=!1,V=w.child;V;){if(V===d){P=!0,d=w,g=R;break}if(V===g){P=!0,g=w,d=R;break}V=V.sibling}if(!P){for(V=R.child;V;){if(V===d){P=!0,d=R,g=w;break}if(V===g){P=!0,g=R,d=w;break}V=V.sibling}if(!P)throw Error(r(189))}}if(d.alternate!==g)throw Error(r(190))}if(d.tag!==3)throw Error(r(188));return d.stateNode.current===d?s:l}function h(s){var l=s.tag;if(l===5||l===26||l===27||l===6)return s;for(s=s.child;s!==null;){if(l=h(s),l!==null)return l;s=s.sibling}return null}var p=Object.assign,m=Symbol.for("react.element"),y=Symbol.for("react.transitional.element"),b=Symbol.for("react.portal"),v=Symbol.for("react.fragment"),S=Symbol.for("react.strict_mode"),x=Symbol.for("react.profiler"),_=Symbol.for("react.consumer"),k=Symbol.for("react.context"),T=Symbol.for("react.forward_ref"),A=Symbol.for("react.suspense"),D=Symbol.for("react.suspense_list"),O=Symbol.for("react.memo"),$=Symbol.for("react.lazy"),B=Symbol.for("react.activity"),j=Symbol.for("react.memo_cache_sentinel"),N=Symbol.iterator;function M(s){return s===null||typeof s!="object"?null:(s=N&&s[N]||s["@@iterator"],typeof s=="function"?s:null)}var z=Symbol.for("react.client.reference");function G(s){if(s==null)return null;if(typeof s=="function")return s.$$typeof===z?null:s.displayName||s.name||null;if(typeof s=="string")return s;switch(s){case v:return"Fragment";case x:return"Profiler";case S:return"StrictMode";case A:return"Suspense";case D:return"SuspenseList";case B:return"Activity"}if(typeof s=="object")switch(s.$$typeof){case b:return"Portal";case k:return s.displayName||"Context";case _:return(s._context.displayName||"Context")+".Consumer";case T:var l=s.render;return s=s.displayName,s||(s=l.displayName||l.name||"",s=s!==""?"ForwardRef("+s+")":"ForwardRef"),s;case O:return l=s.displayName||null,l!==null?l:G(s.type)||"Memo";case $:l=s._payload,s=s._init;try{return G(s(l))}catch{}}return null}var L=Array.isArray,F=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,U=n.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,q={pending:!1,data:null,method:null,action:null},W=[],I=-1;function Y(s){return{current:s}}function J(s){0>I||(s.current=W[I],W[I]=null,I--)}function H(s,l){I++,W[I]=s.current,s.current=l}var ie=Y(null),re=Y(null),he=Y(null),ve=Y(null);function Re(s,l){switch(H(he,l),H(re,s),H(ie,null),l.nodeType){case 9:case 11:s=(s=l.documentElement)&&(s=s.namespaceURI)?U_(s):0;break;default:if(s=l.tagName,l=l.namespaceURI)l=U_(l),s=H_(l,s);else switch(s){case"svg":s=1;break;case"math":s=2;break;default:s=0}}J(ie),H(ie,s)}function ce(){J(ie),J(re),J(he)}function je(s){s.memoizedState!==null&&H(ve,s);var l=ie.current,d=H_(l,s.type);l!==d&&(H(re,s),H(ie,d))}function We(s){re.current===s&&(J(ie),J(re)),ve.current===s&&(J(ve),cd._currentValue=q)}var X,Z;function ne(s){if(X===void 0)try{throw Error()}catch(d){var l=d.stack.trim().match(/\n( *(at )?)/);X=l&&l[1]||"",Z=-1<d.stack.indexOf(`
|
|
43
|
-
at`)?" (<anonymous>)":-1<d.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
44
|
-
`+X+s+Z}var xe=!1;function ge(s,l){if(!s||xe)return"";xe=!0;var d=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var g={DetermineComponentFrameRoot:function(){try{if(l){var Ee=function(){throw Error()};if(Object.defineProperty(Ee.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(Ee,[])}catch(ye){var pe=ye}Reflect.construct(s,[],Ee)}else{try{Ee.call()}catch(ye){pe=ye}s.call(Ee.prototype)}}else{try{throw Error()}catch(ye){pe=ye}(Ee=s())&&typeof Ee.catch=="function"&&Ee.catch(function(){})}}catch(ye){if(ye&&pe&&typeof ye.stack=="string")return[ye.stack,pe.stack]}return[null,null]}};g.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var w=Object.getOwnPropertyDescriptor(g.DetermineComponentFrameRoot,"name");w&&w.configurable&&Object.defineProperty(g.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var R=g.DetermineComponentFrameRoot(),P=R[0],V=R[1];if(P&&V){var Q=P.split(`
|
|
45
|
-
`),de=V.split(`
|
|
46
|
-
`);for(w=g=0;g<Q.length&&!Q[g].includes("DetermineComponentFrameRoot");)g++;for(;w<de.length&&!de[w].includes("DetermineComponentFrameRoot");)w++;if(g===Q.length||w===de.length)for(g=Q.length-1,w=de.length-1;1<=g&&0<=w&&Q[g]!==de[w];)w--;for(;1<=g&&0<=w;g--,w--)if(Q[g]!==de[w]){if(g!==1||w!==1)do if(g--,w--,0>w||Q[g]!==de[w]){var be=`
|
|
47
|
-
`+Q[g].replace(" at new "," at ");return s.displayName&&be.includes("<anonymous>")&&(be=be.replace("<anonymous>",s.displayName)),be}while(1<=g&&0<=w);break}}}finally{xe=!1,Error.prepareStackTrace=d}return(d=s?s.displayName||s.name:"")?ne(d):""}function Ce(s,l){switch(s.tag){case 26:case 27:case 5:return ne(s.type);case 16:return ne("Lazy");case 13:return s.child!==l&&l!==null?ne("Suspense Fallback"):ne("Suspense");case 19:return ne("SuspenseList");case 0:case 15:return ge(s.type,!1);case 11:return ge(s.type.render,!1);case 1:return ge(s.type,!0);case 31:return ne("Activity");default:return""}}function le(s){try{var l="",d=null;do l+=Ce(s,d),d=s,s=s.return;while(s);return l}catch(g){return`
|
|
48
|
-
Error generating stack: `+g.message+`
|
|
49
|
-
`+g.stack}}var oe=Object.prototype.hasOwnProperty,me=e.unstable_scheduleCallback,ae=e.unstable_cancelCallback,Oe=e.unstable_shouldYield,Te=e.unstable_requestPaint,_e=e.unstable_now,De=e.unstable_getCurrentPriorityLevel,ue=e.unstable_ImmediatePriority,Se=e.unstable_UserBlockingPriority,ke=e.unstable_NormalPriority,Pe=e.unstable_LowPriority,Le=e.unstable_IdlePriority,st=e.log,Ut=e.unstable_setDisableYieldValue,Ot=null,Me=null;function Qe(s){if(typeof st=="function"&&Ut(s),Me&&typeof Me.setStrictMode=="function")try{Me.setStrictMode(Ot,s)}catch{}}var Ne=Math.clz32?Math.clz32:ut,Tt=Math.log,ft=Math.LN2;function ut(s){return s>>>=0,s===0?32:31-(Tt(s)/ft|0)|0}var Rt=256,en=262144,Xt=4194304;function tn(s){var l=s&42;if(l!==0)return l;switch(s&-s){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return s&261888;case 262144:case 524288:case 1048576:case 2097152:return s&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return s&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return s}}function bn(s,l,d){var g=s.pendingLanes;if(g===0)return 0;var w=0,R=s.suspendedLanes,P=s.pingedLanes;s=s.warmLanes;var V=g&134217727;return V!==0?(g=V&~R,g!==0?w=tn(g):(P&=V,P!==0?w=tn(P):d||(d=V&~s,d!==0&&(w=tn(d))))):(V=g&~R,V!==0?w=tn(V):P!==0?w=tn(P):d||(d=g&~s,d!==0&&(w=tn(d)))),w===0?0:l!==0&&l!==w&&(l&R)===0&&(R=w&-w,d=l&-l,R>=d||R===32&&(d&4194048)!==0)?l:w}function ei(s,l){return(s.pendingLanes&~(s.suspendedLanes&~s.pingedLanes)&l)===0}function La(s,l){switch(s){case 1:case 2:case 4:case 8:case 64:return l+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return l+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function ki(){var s=Xt;return Xt<<=1,(Xt&62914560)===0&&(Xt=4194304),s}function Fa(s){for(var l=[],d=0;31>d;d++)l.push(s);return l}function Ri(s,l){s.pendingLanes|=l,l!==268435456&&(s.suspendedLanes=0,s.pingedLanes=0,s.warmLanes=0)}function lu(s,l,d,g,w,R){var P=s.pendingLanes;s.pendingLanes=d,s.suspendedLanes=0,s.pingedLanes=0,s.warmLanes=0,s.expiredLanes&=d,s.entangledLanes&=d,s.errorRecoveryDisabledLanes&=d,s.shellSuspendCounter=0;var V=s.entanglements,Q=s.expirationTimes,de=s.hiddenUpdates;for(d=P&~d;0<d;){var be=31-Ne(d),Ee=1<<be;V[be]=0,Q[be]=-1;var pe=de[be];if(pe!==null)for(de[be]=null,be=0;be<pe.length;be++){var ye=pe[be];ye!==null&&(ye.lane&=-536870913)}d&=~Ee}g!==0&&uu(s,g,0),R!==0&&w===0&&s.tag!==0&&(s.suspendedLanes|=R&~(P&~l))}function uu(s,l,d){s.pendingLanes|=l,s.suspendedLanes&=~l;var g=31-Ne(l);s.entangledLanes|=l,s.entanglements[g]=s.entanglements[g]|1073741824|d&261930}function fs(s,l){var d=s.entangledLanes|=l;for(s=s.entanglements;d;){var g=31-Ne(d),w=1<<g;w&l|s[g]&l&&(s[g]|=l),d&=~w}}function _i(s,l){var d=l&-l;return d=(d&42)!==0?1:za(d),(d&(s.suspendedLanes|l))!==0?0:d}function za(s){switch(s){case 2:s=1;break;case 8:s=4;break;case 32:s=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:s=128;break;case 268435456:s=134217728;break;default:s=0}return s}function Ba(s){return s&=-s,2<s?8<s?(s&134217727)!==0?32:268435456:8:2}function Hi(){var s=U.p;return s!==0?s:(s=window.event,s===void 0?32:dT(s.type))}function Ua(s,l){var d=U.p;try{return U.p=s,l()}finally{U.p=d}}var Or=Math.random().toString(36).slice(2),on="__reactFiber$"+Or,Ln="__reactProps$"+Or,fo="__reactContainer$"+Or,cu="__reactEvents$"+Or,tB="__reactListeners$"+Or,nB="__reactHandles$"+Or,AE="__reactResources$"+Or,kf="__reactMarker$"+Or;function bb(s){delete s[on],delete s[Ln],delete s[cu],delete s[tB],delete s[nB]}function fu(s){var l=s[on];if(l)return l;for(var d=s.parentNode;d;){if(l=d[fo]||d[on]){if(d=l.alternate,l.child!==null||d!==null&&d.child!==null)for(s=X_(s);s!==null;){if(d=s[on])return d;s=X_(s)}return l}s=d,d=s.parentNode}return null}function du(s){if(s=s[on]||s[fo]){var l=s.tag;if(l===5||l===6||l===13||l===31||l===26||l===27||l===3)return s}return null}function Rf(s){var l=s.tag;if(l===5||l===26||l===27||l===6)return s.stateNode;throw Error(r(33))}function hu(s){var l=s[AE];return l||(l=s[AE]={hoistableStyles:new Map,hoistableScripts:new Map}),l}function On(s){s[kf]=!0}var DE=new Set,ME={};function Ha(s,l){pu(s,l),pu(s+"Capture",l)}function pu(s,l){for(ME[s]=l,s=0;s<l.length;s++)DE.add(l[s])}var rB=RegExp("^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"),OE={},$E={};function iB(s){return oe.call($E,s)?!0:oe.call(OE,s)?!1:rB.test(s)?$E[s]=!0:(OE[s]=!0,!1)}function tp(s,l,d){if(iB(l))if(d===null)s.removeAttribute(l);else{switch(typeof d){case"undefined":case"function":case"symbol":s.removeAttribute(l);return;case"boolean":var g=l.toLowerCase().slice(0,5);if(g!=="data-"&&g!=="aria-"){s.removeAttribute(l);return}}s.setAttribute(l,""+d)}}function np(s,l,d){if(d===null)s.removeAttribute(l);else{switch(typeof d){case"undefined":case"function":case"symbol":case"boolean":s.removeAttribute(l);return}s.setAttribute(l,""+d)}}function ho(s,l,d,g){if(g===null)s.removeAttribute(d);else{switch(typeof g){case"undefined":case"function":case"symbol":case"boolean":s.removeAttribute(d);return}s.setAttributeNS(l,d,""+g)}}function ti(s){switch(typeof s){case"bigint":case"boolean":case"number":case"string":case"undefined":return s;case"object":return s;default:return""}}function PE(s){var l=s.type;return(s=s.nodeName)&&s.toLowerCase()==="input"&&(l==="checkbox"||l==="radio")}function oB(s,l,d){var g=Object.getOwnPropertyDescriptor(s.constructor.prototype,l);if(!s.hasOwnProperty(l)&&typeof g<"u"&&typeof g.get=="function"&&typeof g.set=="function"){var w=g.get,R=g.set;return Object.defineProperty(s,l,{configurable:!0,get:function(){return w.call(this)},set:function(P){d=""+P,R.call(this,P)}}),Object.defineProperty(s,l,{enumerable:g.enumerable}),{getValue:function(){return d},setValue:function(P){d=""+P},stopTracking:function(){s._valueTracker=null,delete s[l]}}}}function vb(s){if(!s._valueTracker){var l=PE(s)?"checked":"value";s._valueTracker=oB(s,l,""+s[l])}}function NE(s){if(!s)return!1;var l=s._valueTracker;if(!l)return!0;var d=l.getValue(),g="";return s&&(g=PE(s)?s.checked?"true":"false":s.value),s=g,s!==d?(l.setValue(s),!0):!1}function rp(s){if(s=s||(typeof document<"u"?document:void 0),typeof s>"u")return null;try{return s.activeElement||s.body}catch{return s.body}}var sB=/[\n"\\]/g;function ni(s){return s.replace(sB,function(l){return"\\"+l.charCodeAt(0).toString(16)+" "})}function xb(s,l,d,g,w,R,P,V){s.name="",P!=null&&typeof P!="function"&&typeof P!="symbol"&&typeof P!="boolean"?s.type=P:s.removeAttribute("type"),l!=null?P==="number"?(l===0&&s.value===""||s.value!=l)&&(s.value=""+ti(l)):s.value!==""+ti(l)&&(s.value=""+ti(l)):P!=="submit"&&P!=="reset"||s.removeAttribute("value"),l!=null?wb(s,P,ti(l)):d!=null?wb(s,P,ti(d)):g!=null&&s.removeAttribute("value"),w==null&&R!=null&&(s.defaultChecked=!!R),w!=null&&(s.checked=w&&typeof w!="function"&&typeof w!="symbol"),V!=null&&typeof V!="function"&&typeof V!="symbol"&&typeof V!="boolean"?s.name=""+ti(V):s.removeAttribute("name")}function IE(s,l,d,g,w,R,P,V){if(R!=null&&typeof R!="function"&&typeof R!="symbol"&&typeof R!="boolean"&&(s.type=R),l!=null||d!=null){if(!(R!=="submit"&&R!=="reset"||l!=null)){vb(s);return}d=d!=null?""+ti(d):"",l=l!=null?""+ti(l):d,V||l===s.value||(s.value=l),s.defaultValue=l}g=g??w,g=typeof g!="function"&&typeof g!="symbol"&&!!g,s.checked=V?s.checked:!!g,s.defaultChecked=!!g,P!=null&&typeof P!="function"&&typeof P!="symbol"&&typeof P!="boolean"&&(s.name=P),vb(s)}function wb(s,l,d){l==="number"&&rp(s.ownerDocument)===s||s.defaultValue===""+d||(s.defaultValue=""+d)}function mu(s,l,d,g){if(s=s.options,l){l={};for(var w=0;w<d.length;w++)l["$"+d[w]]=!0;for(d=0;d<s.length;d++)w=l.hasOwnProperty("$"+s[d].value),s[d].selected!==w&&(s[d].selected=w),w&&g&&(s[d].defaultSelected=!0)}else{for(d=""+ti(d),l=null,w=0;w<s.length;w++){if(s[w].value===d){s[w].selected=!0,g&&(s[w].defaultSelected=!0);return}l!==null||s[w].disabled||(l=s[w])}l!==null&&(l.selected=!0)}}function jE(s,l,d){if(l!=null&&(l=""+ti(l),l!==s.value&&(s.value=l),d==null)){s.defaultValue!==l&&(s.defaultValue=l);return}s.defaultValue=d!=null?""+ti(d):""}function LE(s,l,d,g){if(l==null){if(g!=null){if(d!=null)throw Error(r(92));if(L(g)){if(1<g.length)throw Error(r(93));g=g[0]}d=g}d==null&&(d=""),l=d}d=ti(l),s.defaultValue=d,g=s.textContent,g===d&&g!==""&&g!==null&&(s.value=g),vb(s)}function gu(s,l){if(l){var d=s.firstChild;if(d&&d===s.lastChild&&d.nodeType===3){d.nodeValue=l;return}}s.textContent=l}var aB=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" "));function FE(s,l,d){var g=l.indexOf("--")===0;d==null||typeof d=="boolean"||d===""?g?s.setProperty(l,""):l==="float"?s.cssFloat="":s[l]="":g?s.setProperty(l,d):typeof d!="number"||d===0||aB.has(l)?l==="float"?s.cssFloat=d:s[l]=(""+d).trim():s[l]=d+"px"}function zE(s,l,d){if(l!=null&&typeof l!="object")throw Error(r(62));if(s=s.style,d!=null){for(var g in d)!d.hasOwnProperty(g)||l!=null&&l.hasOwnProperty(g)||(g.indexOf("--")===0?s.setProperty(g,""):g==="float"?s.cssFloat="":s[g]="");for(var w in l)g=l[w],l.hasOwnProperty(w)&&d[w]!==g&&FE(s,w,g)}else for(var R in l)l.hasOwnProperty(R)&&FE(s,R,l[R])}function Sb(s){if(s.indexOf("-")===-1)return!1;switch(s){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var lB=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),uB=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function ip(s){return uB.test(""+s)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":s}function po(){}var Cb=null;function Eb(s){return s=s.target||s.srcElement||window,s.correspondingUseElement&&(s=s.correspondingUseElement),s.nodeType===3?s.parentNode:s}var yu=null,bu=null;function BE(s){var l=du(s);if(l&&(s=l.stateNode)){var d=s[Ln]||null;e:switch(s=l.stateNode,l.type){case"input":if(xb(s,d.value,d.defaultValue,d.defaultValue,d.checked,d.defaultChecked,d.type,d.name),l=d.name,d.type==="radio"&&l!=null){for(d=s;d.parentNode;)d=d.parentNode;for(d=d.querySelectorAll('input[name="'+ni(""+l)+'"][type="radio"]'),l=0;l<d.length;l++){var g=d[l];if(g!==s&&g.form===s.form){var w=g[Ln]||null;if(!w)throw Error(r(90));xb(g,w.value,w.defaultValue,w.defaultValue,w.checked,w.defaultChecked,w.type,w.name)}}for(l=0;l<d.length;l++)g=d[l],g.form===s.form&&NE(g)}break e;case"textarea":jE(s,d.value,d.defaultValue);break e;case"select":l=d.value,l!=null&&mu(s,!!d.multiple,l,!1)}}}var kb=!1;function UE(s,l,d){if(kb)return s(l,d);kb=!0;try{var g=s(l);return g}finally{if(kb=!1,(yu!==null||bu!==null)&&(Vp(),yu&&(l=yu,s=bu,bu=yu=null,BE(l),s)))for(l=0;l<s.length;l++)BE(s[l])}}function _f(s,l){var d=s.stateNode;if(d===null)return null;var g=d[Ln]||null;if(g===null)return null;d=g[l];e:switch(l){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(g=!g.disabled)||(s=s.type,g=!(s==="button"||s==="input"||s==="select"||s==="textarea")),s=!g;break e;default:s=!1}if(s)return null;if(d&&typeof d!="function")throw Error(r(231,l,typeof d));return d}var mo=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Rb=!1;if(mo)try{var Tf={};Object.defineProperty(Tf,"passive",{get:function(){Rb=!0}}),window.addEventListener("test",Tf,Tf),window.removeEventListener("test",Tf,Tf)}catch{Rb=!1}var ds=null,_b=null,op=null;function HE(){if(op)return op;var s,l=_b,d=l.length,g,w="value"in ds?ds.value:ds.textContent,R=w.length;for(s=0;s<d&&l[s]===w[s];s++);var P=d-s;for(g=1;g<=P&&l[d-g]===w[R-g];g++);return op=w.slice(s,1<g?1-g:void 0)}function sp(s){var l=s.keyCode;return"charCode"in s?(s=s.charCode,s===0&&l===13&&(s=13)):s=l,s===10&&(s=13),32<=s||s===13?s:0}function ap(){return!0}function GE(){return!1}function hr(s){function l(d,g,w,R,P){this._reactName=d,this._targetInst=w,this.type=g,this.nativeEvent=R,this.target=P,this.currentTarget=null;for(var V in s)s.hasOwnProperty(V)&&(d=s[V],this[V]=d?d(R):R[V]);return this.isDefaultPrevented=(R.defaultPrevented!=null?R.defaultPrevented:R.returnValue===!1)?ap:GE,this.isPropagationStopped=GE,this}return p(l.prototype,{preventDefault:function(){this.defaultPrevented=!0;var d=this.nativeEvent;d&&(d.preventDefault?d.preventDefault():typeof d.returnValue!="unknown"&&(d.returnValue=!1),this.isDefaultPrevented=ap)},stopPropagation:function(){var d=this.nativeEvent;d&&(d.stopPropagation?d.stopPropagation():typeof d.cancelBubble!="unknown"&&(d.cancelBubble=!0),this.isPropagationStopped=ap)},persist:function(){},isPersistent:ap}),l}var Ga={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(s){return s.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},lp=hr(Ga),Af=p({},Ga,{view:0,detail:0}),cB=hr(Af),Tb,Ab,Df,up=p({},Af,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Mb,button:0,buttons:0,relatedTarget:function(s){return s.relatedTarget===void 0?s.fromElement===s.srcElement?s.toElement:s.fromElement:s.relatedTarget},movementX:function(s){return"movementX"in s?s.movementX:(s!==Df&&(Df&&s.type==="mousemove"?(Tb=s.screenX-Df.screenX,Ab=s.screenY-Df.screenY):Ab=Tb=0,Df=s),Tb)},movementY:function(s){return"movementY"in s?s.movementY:Ab}}),VE=hr(up),fB=p({},up,{dataTransfer:0}),dB=hr(fB),hB=p({},Af,{relatedTarget:0}),Db=hr(hB),pB=p({},Ga,{animationName:0,elapsedTime:0,pseudoElement:0}),mB=hr(pB),gB=p({},Ga,{clipboardData:function(s){return"clipboardData"in s?s.clipboardData:window.clipboardData}}),yB=hr(gB),bB=p({},Ga,{data:0}),qE=hr(bB),vB={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},xB={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},wB={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function SB(s){var l=this.nativeEvent;return l.getModifierState?l.getModifierState(s):(s=wB[s])?!!l[s]:!1}function Mb(){return SB}var CB=p({},Af,{key:function(s){if(s.key){var l=vB[s.key]||s.key;if(l!=="Unidentified")return l}return s.type==="keypress"?(s=sp(s),s===13?"Enter":String.fromCharCode(s)):s.type==="keydown"||s.type==="keyup"?xB[s.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Mb,charCode:function(s){return s.type==="keypress"?sp(s):0},keyCode:function(s){return s.type==="keydown"||s.type==="keyup"?s.keyCode:0},which:function(s){return s.type==="keypress"?sp(s):s.type==="keydown"||s.type==="keyup"?s.keyCode:0}}),EB=hr(CB),kB=p({},up,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),YE=hr(kB),RB=p({},Af,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Mb}),_B=hr(RB),TB=p({},Ga,{propertyName:0,elapsedTime:0,pseudoElement:0}),AB=hr(TB),DB=p({},up,{deltaX:function(s){return"deltaX"in s?s.deltaX:"wheelDeltaX"in s?-s.wheelDeltaX:0},deltaY:function(s){return"deltaY"in s?s.deltaY:"wheelDeltaY"in s?-s.wheelDeltaY:"wheelDelta"in s?-s.wheelDelta:0},deltaZ:0,deltaMode:0}),MB=hr(DB),OB=p({},Ga,{newState:0,oldState:0}),$B=hr(OB),PB=[9,13,27,32],Ob=mo&&"CompositionEvent"in window,Mf=null;mo&&"documentMode"in document&&(Mf=document.documentMode);var NB=mo&&"TextEvent"in window&&!Mf,WE=mo&&(!Ob||Mf&&8<Mf&&11>=Mf),KE=" ",XE=!1;function QE(s,l){switch(s){case"keyup":return PB.indexOf(l.keyCode)!==-1;case"keydown":return l.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function ZE(s){return s=s.detail,typeof s=="object"&&"data"in s?s.data:null}var vu=!1;function IB(s,l){switch(s){case"compositionend":return ZE(l);case"keypress":return l.which!==32?null:(XE=!0,KE);case"textInput":return s=l.data,s===KE&&XE?null:s;default:return null}}function jB(s,l){if(vu)return s==="compositionend"||!Ob&&QE(s,l)?(s=HE(),op=_b=ds=null,vu=!1,s):null;switch(s){case"paste":return null;case"keypress":if(!(l.ctrlKey||l.altKey||l.metaKey)||l.ctrlKey&&l.altKey){if(l.char&&1<l.char.length)return l.char;if(l.which)return String.fromCharCode(l.which)}return null;case"compositionend":return WE&&l.locale!=="ko"?null:l.data;default:return null}}var LB={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function JE(s){var l=s&&s.nodeName&&s.nodeName.toLowerCase();return l==="input"?!!LB[s.type]:l==="textarea"}function ek(s,l,d,g){yu?bu?bu.push(g):bu=[g]:yu=g,l=Zp(l,"onChange"),0<l.length&&(d=new lp("onChange","change",null,d,g),s.push({event:d,listeners:l}))}var Of=null,$f=null;function FB(s){I_(s,0)}function cp(s){var l=Rf(s);if(NE(l))return s}function tk(s,l){if(s==="change")return l}var nk=!1;if(mo){var $b;if(mo){var Pb="oninput"in document;if(!Pb){var rk=document.createElement("div");rk.setAttribute("oninput","return;"),Pb=typeof rk.oninput=="function"}$b=Pb}else $b=!1;nk=$b&&(!document.documentMode||9<document.documentMode)}function ik(){Of&&(Of.detachEvent("onpropertychange",ok),$f=Of=null)}function ok(s){if(s.propertyName==="value"&&cp($f)){var l=[];ek(l,$f,s,Eb(s)),UE(FB,l)}}function zB(s,l,d){s==="focusin"?(ik(),Of=l,$f=d,Of.attachEvent("onpropertychange",ok)):s==="focusout"&&ik()}function BB(s){if(s==="selectionchange"||s==="keyup"||s==="keydown")return cp($f)}function UB(s,l){if(s==="click")return cp(l)}function HB(s,l){if(s==="input"||s==="change")return cp(l)}function GB(s,l){return s===l&&(s!==0||1/s===1/l)||s!==s&&l!==l}var $r=typeof Object.is=="function"?Object.is:GB;function Pf(s,l){if($r(s,l))return!0;if(typeof s!="object"||s===null||typeof l!="object"||l===null)return!1;var d=Object.keys(s),g=Object.keys(l);if(d.length!==g.length)return!1;for(g=0;g<d.length;g++){var w=d[g];if(!oe.call(l,w)||!$r(s[w],l[w]))return!1}return!0}function sk(s){for(;s&&s.firstChild;)s=s.firstChild;return s}function ak(s,l){var d=sk(s);s=0;for(var g;d;){if(d.nodeType===3){if(g=s+d.textContent.length,s<=l&&g>=l)return{node:d,offset:l-s};s=g}e:{for(;d;){if(d.nextSibling){d=d.nextSibling;break e}d=d.parentNode}d=void 0}d=sk(d)}}function lk(s,l){return s&&l?s===l?!0:s&&s.nodeType===3?!1:l&&l.nodeType===3?lk(s,l.parentNode):"contains"in s?s.contains(l):s.compareDocumentPosition?!!(s.compareDocumentPosition(l)&16):!1:!1}function uk(s){s=s!=null&&s.ownerDocument!=null&&s.ownerDocument.defaultView!=null?s.ownerDocument.defaultView:window;for(var l=rp(s.document);l instanceof s.HTMLIFrameElement;){try{var d=typeof l.contentWindow.location.href=="string"}catch{d=!1}if(d)s=l.contentWindow;else break;l=rp(s.document)}return l}function Nb(s){var l=s&&s.nodeName&&s.nodeName.toLowerCase();return l&&(l==="input"&&(s.type==="text"||s.type==="search"||s.type==="tel"||s.type==="url"||s.type==="password")||l==="textarea"||s.contentEditable==="true")}var VB=mo&&"documentMode"in document&&11>=document.documentMode,xu=null,Ib=null,Nf=null,jb=!1;function ck(s,l,d){var g=d.window===d?d.document:d.nodeType===9?d:d.ownerDocument;jb||xu==null||xu!==rp(g)||(g=xu,"selectionStart"in g&&Nb(g)?g={start:g.selectionStart,end:g.selectionEnd}:(g=(g.ownerDocument&&g.ownerDocument.defaultView||window).getSelection(),g={anchorNode:g.anchorNode,anchorOffset:g.anchorOffset,focusNode:g.focusNode,focusOffset:g.focusOffset}),Nf&&Pf(Nf,g)||(Nf=g,g=Zp(Ib,"onSelect"),0<g.length&&(l=new lp("onSelect","select",null,l,d),s.push({event:l,listeners:g}),l.target=xu)))}function Va(s,l){var d={};return d[s.toLowerCase()]=l.toLowerCase(),d["Webkit"+s]="webkit"+l,d["Moz"+s]="moz"+l,d}var wu={animationend:Va("Animation","AnimationEnd"),animationiteration:Va("Animation","AnimationIteration"),animationstart:Va("Animation","AnimationStart"),transitionrun:Va("Transition","TransitionRun"),transitionstart:Va("Transition","TransitionStart"),transitioncancel:Va("Transition","TransitionCancel"),transitionend:Va("Transition","TransitionEnd")},Lb={},fk={};mo&&(fk=document.createElement("div").style,"AnimationEvent"in window||(delete wu.animationend.animation,delete wu.animationiteration.animation,delete wu.animationstart.animation),"TransitionEvent"in window||delete wu.transitionend.transition);function qa(s){if(Lb[s])return Lb[s];if(!wu[s])return s;var l=wu[s],d;for(d in l)if(l.hasOwnProperty(d)&&d in fk)return Lb[s]=l[d];return s}var dk=qa("animationend"),hk=qa("animationiteration"),pk=qa("animationstart"),qB=qa("transitionrun"),YB=qa("transitionstart"),WB=qa("transitioncancel"),mk=qa("transitionend"),gk=new Map,Fb="abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");Fb.push("scrollEnd");function Ti(s,l){gk.set(s,l),Ha(l,[s])}var fp=typeof reportError=="function"?reportError:function(s){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var l=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof s=="object"&&s!==null&&typeof s.message=="string"?String(s.message):String(s),error:s});if(!window.dispatchEvent(l))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",s);return}console.error(s)},ri=[],Su=0,zb=0;function dp(){for(var s=Su,l=zb=Su=0;l<s;){var d=ri[l];ri[l++]=null;var g=ri[l];ri[l++]=null;var w=ri[l];ri[l++]=null;var R=ri[l];if(ri[l++]=null,g!==null&&w!==null){var P=g.pending;P===null?w.next=w:(w.next=P.next,P.next=w),g.pending=w}R!==0&&yk(d,w,R)}}function hp(s,l,d,g){ri[Su++]=s,ri[Su++]=l,ri[Su++]=d,ri[Su++]=g,zb|=g,s.lanes|=g,s=s.alternate,s!==null&&(s.lanes|=g)}function Bb(s,l,d,g){return hp(s,l,d,g),pp(s)}function Ya(s,l){return hp(s,null,null,l),pp(s)}function yk(s,l,d){s.lanes|=d;var g=s.alternate;g!==null&&(g.lanes|=d);for(var w=!1,R=s.return;R!==null;)R.childLanes|=d,g=R.alternate,g!==null&&(g.childLanes|=d),R.tag===22&&(s=R.stateNode,s===null||s._visibility&1||(w=!0)),s=R,R=R.return;return s.tag===3?(R=s.stateNode,w&&l!==null&&(w=31-Ne(d),s=R.hiddenUpdates,g=s[w],g===null?s[w]=[l]:g.push(l),l.lane=d|536870912),R):null}function pp(s){if(50<rd)throw rd=0,Xv=null,Error(r(185));for(var l=s.return;l!==null;)s=l,l=s.return;return s.tag===3?s.stateNode:null}var Cu={};function KB(s,l,d,g){this.tag=s,this.key=d,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=l,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=g,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Pr(s,l,d,g){return new KB(s,l,d,g)}function Ub(s){return s=s.prototype,!(!s||!s.isReactComponent)}function go(s,l){var d=s.alternate;return d===null?(d=Pr(s.tag,l,s.key,s.mode),d.elementType=s.elementType,d.type=s.type,d.stateNode=s.stateNode,d.alternate=s,s.alternate=d):(d.pendingProps=l,d.type=s.type,d.flags=0,d.subtreeFlags=0,d.deletions=null),d.flags=s.flags&65011712,d.childLanes=s.childLanes,d.lanes=s.lanes,d.child=s.child,d.memoizedProps=s.memoizedProps,d.memoizedState=s.memoizedState,d.updateQueue=s.updateQueue,l=s.dependencies,d.dependencies=l===null?null:{lanes:l.lanes,firstContext:l.firstContext},d.sibling=s.sibling,d.index=s.index,d.ref=s.ref,d.refCleanup=s.refCleanup,d}function bk(s,l){s.flags&=65011714;var d=s.alternate;return d===null?(s.childLanes=0,s.lanes=l,s.child=null,s.subtreeFlags=0,s.memoizedProps=null,s.memoizedState=null,s.updateQueue=null,s.dependencies=null,s.stateNode=null):(s.childLanes=d.childLanes,s.lanes=d.lanes,s.child=d.child,s.subtreeFlags=0,s.deletions=null,s.memoizedProps=d.memoizedProps,s.memoizedState=d.memoizedState,s.updateQueue=d.updateQueue,s.type=d.type,l=d.dependencies,s.dependencies=l===null?null:{lanes:l.lanes,firstContext:l.firstContext}),s}function mp(s,l,d,g,w,R){var P=0;if(g=s,typeof s=="function")Ub(s)&&(P=1);else if(typeof s=="string")P=e6(s,d,ie.current)?26:s==="html"||s==="head"||s==="body"?27:5;else e:switch(s){case B:return s=Pr(31,d,l,w),s.elementType=B,s.lanes=R,s;case v:return Wa(d.children,w,R,l);case S:P=8,w|=24;break;case x:return s=Pr(12,d,l,w|2),s.elementType=x,s.lanes=R,s;case A:return s=Pr(13,d,l,w),s.elementType=A,s.lanes=R,s;case D:return s=Pr(19,d,l,w),s.elementType=D,s.lanes=R,s;default:if(typeof s=="object"&&s!==null)switch(s.$$typeof){case k:P=10;break e;case _:P=9;break e;case T:P=11;break e;case O:P=14;break e;case $:P=16,g=null;break e}P=29,d=Error(r(130,s===null?"null":typeof s,"")),g=null}return l=Pr(P,d,l,w),l.elementType=s,l.type=g,l.lanes=R,l}function Wa(s,l,d,g){return s=Pr(7,s,g,l),s.lanes=d,s}function Hb(s,l,d){return s=Pr(6,s,null,l),s.lanes=d,s}function vk(s){var l=Pr(18,null,null,0);return l.stateNode=s,l}function Gb(s,l,d){return l=Pr(4,s.children!==null?s.children:[],s.key,l),l.lanes=d,l.stateNode={containerInfo:s.containerInfo,pendingChildren:null,implementation:s.implementation},l}var xk=new WeakMap;function ii(s,l){if(typeof s=="object"&&s!==null){var d=xk.get(s);return d!==void 0?d:(l={value:s,source:l,stack:le(l)},xk.set(s,l),l)}return{value:s,source:l,stack:le(l)}}var Eu=[],ku=0,gp=null,If=0,oi=[],si=0,hs=null,Gi=1,Vi="";function yo(s,l){Eu[ku++]=If,Eu[ku++]=gp,gp=s,If=l}function wk(s,l,d){oi[si++]=Gi,oi[si++]=Vi,oi[si++]=hs,hs=s;var g=Gi;s=Vi;var w=32-Ne(g)-1;g&=~(1<<w),d+=1;var R=32-Ne(l)+w;if(30<R){var P=w-w%5;R=(g&(1<<P)-1).toString(32),g>>=P,w-=P,Gi=1<<32-Ne(l)+w|d<<w|g,Vi=R+s}else Gi=1<<R|d<<w|g,Vi=s}function Vb(s){s.return!==null&&(yo(s,1),wk(s,1,0))}function qb(s){for(;s===gp;)gp=Eu[--ku],Eu[ku]=null,If=Eu[--ku],Eu[ku]=null;for(;s===hs;)hs=oi[--si],oi[si]=null,Vi=oi[--si],oi[si]=null,Gi=oi[--si],oi[si]=null}function Sk(s,l){oi[si++]=Gi,oi[si++]=Vi,oi[si++]=hs,Gi=l.id,Vi=l.overflow,hs=s}var Fn=null,Qt=null,Et=!1,ps=null,ai=!1,Yb=Error(r(519));function ms(s){var l=Error(r(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw jf(ii(l,s)),Yb}function Ck(s){var l=s.stateNode,d=s.type,g=s.memoizedProps;switch(l[on]=s,l[Ln]=g,d){case"dialog":bt("cancel",l),bt("close",l);break;case"iframe":case"object":case"embed":bt("load",l);break;case"video":case"audio":for(d=0;d<od.length;d++)bt(od[d],l);break;case"source":bt("error",l);break;case"img":case"image":case"link":bt("error",l),bt("load",l);break;case"details":bt("toggle",l);break;case"input":bt("invalid",l),IE(l,g.value,g.defaultValue,g.checked,g.defaultChecked,g.type,g.name,!0);break;case"select":bt("invalid",l);break;case"textarea":bt("invalid",l),LE(l,g.value,g.defaultValue,g.children)}d=g.children,typeof d!="string"&&typeof d!="number"&&typeof d!="bigint"||l.textContent===""+d||g.suppressHydrationWarning===!0||z_(l.textContent,d)?(g.popover!=null&&(bt("beforetoggle",l),bt("toggle",l)),g.onScroll!=null&&bt("scroll",l),g.onScrollEnd!=null&&bt("scrollend",l),g.onClick!=null&&(l.onclick=po),l=!0):l=!1,l||ms(s,!0)}function Ek(s){for(Fn=s.return;Fn;)switch(Fn.tag){case 5:case 31:case 13:ai=!1;return;case 27:case 3:ai=!0;return;default:Fn=Fn.return}}function Ru(s){if(s!==Fn)return!1;if(!Et)return Ek(s),Et=!0,!1;var l=s.tag,d;if((d=l!==3&&l!==27)&&((d=l===5)&&(d=s.type,d=!(d!=="form"&&d!=="button")||f0(s.type,s.memoizedProps)),d=!d),d&&Qt&&ms(s),Ek(s),l===13){if(s=s.memoizedState,s=s!==null?s.dehydrated:null,!s)throw Error(r(317));Qt=K_(s)}else if(l===31){if(s=s.memoizedState,s=s!==null?s.dehydrated:null,!s)throw Error(r(317));Qt=K_(s)}else l===27?(l=Qt,As(s.type)?(s=g0,g0=null,Qt=s):Qt=l):Qt=Fn?ui(s.stateNode.nextSibling):null;return!0}function Ka(){Qt=Fn=null,Et=!1}function Wb(){var s=ps;return s!==null&&(yr===null?yr=s:yr.push.apply(yr,s),ps=null),s}function jf(s){ps===null?ps=[s]:ps.push(s)}var Kb=Y(null),Xa=null,bo=null;function gs(s,l,d){H(Kb,l._currentValue),l._currentValue=d}function vo(s){s._currentValue=Kb.current,J(Kb)}function Xb(s,l,d){for(;s!==null;){var g=s.alternate;if((s.childLanes&l)!==l?(s.childLanes|=l,g!==null&&(g.childLanes|=l)):g!==null&&(g.childLanes&l)!==l&&(g.childLanes|=l),s===d)break;s=s.return}}function Qb(s,l,d,g){var w=s.child;for(w!==null&&(w.return=s);w!==null;){var R=w.dependencies;if(R!==null){var P=w.child;R=R.firstContext;e:for(;R!==null;){var V=R;R=w;for(var Q=0;Q<l.length;Q++)if(V.context===l[Q]){R.lanes|=d,V=R.alternate,V!==null&&(V.lanes|=d),Xb(R.return,d,s),g||(P=null);break e}R=V.next}}else if(w.tag===18){if(P=w.return,P===null)throw Error(r(341));P.lanes|=d,R=P.alternate,R!==null&&(R.lanes|=d),Xb(P,d,s),P=null}else P=w.child;if(P!==null)P.return=w;else for(P=w;P!==null;){if(P===s){P=null;break}if(w=P.sibling,w!==null){w.return=P.return,P=w;break}P=P.return}w=P}}function _u(s,l,d,g){s=null;for(var w=l,R=!1;w!==null;){if(!R){if((w.flags&524288)!==0)R=!0;else if((w.flags&262144)!==0)break}if(w.tag===10){var P=w.alternate;if(P===null)throw Error(r(387));if(P=P.memoizedProps,P!==null){var V=w.type;$r(w.pendingProps.value,P.value)||(s!==null?s.push(V):s=[V])}}else if(w===ve.current){if(P=w.alternate,P===null)throw Error(r(387));P.memoizedState.memoizedState!==w.memoizedState.memoizedState&&(s!==null?s.push(cd):s=[cd])}w=w.return}s!==null&&Qb(l,s,d,g),l.flags|=262144}function yp(s){for(s=s.firstContext;s!==null;){if(!$r(s.context._currentValue,s.memoizedValue))return!0;s=s.next}return!1}function Qa(s){Xa=s,bo=null,s=s.dependencies,s!==null&&(s.firstContext=null)}function zn(s){return kk(Xa,s)}function bp(s,l){return Xa===null&&Qa(s),kk(s,l)}function kk(s,l){var d=l._currentValue;if(l={context:l,memoizedValue:d,next:null},bo===null){if(s===null)throw Error(r(308));bo=l,s.dependencies={lanes:0,firstContext:l},s.flags|=524288}else bo=bo.next=l;return d}var XB=typeof AbortController<"u"?AbortController:function(){var s=[],l=this.signal={aborted:!1,addEventListener:function(d,g){s.push(g)}};this.abort=function(){l.aborted=!0,s.forEach(function(d){return d()})}},QB=e.unstable_scheduleCallback,ZB=e.unstable_NormalPriority,vn={$$typeof:k,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Zb(){return{controller:new XB,data:new Map,refCount:0}}function Lf(s){s.refCount--,s.refCount===0&&QB(ZB,function(){s.controller.abort()})}var Ff=null,Jb=0,Tu=0,Au=null;function JB(s,l){if(Ff===null){var d=Ff=[];Jb=0,Tu=n0(),Au={status:"pending",value:void 0,then:function(g){d.push(g)}}}return Jb++,l.then(Rk,Rk),l}function Rk(){if(--Jb===0&&Ff!==null){Au!==null&&(Au.status="fulfilled");var s=Ff;Ff=null,Tu=0,Au=null;for(var l=0;l<s.length;l++)(0,s[l])()}}function e5(s,l){var d=[],g={status:"pending",value:null,reason:null,then:function(w){d.push(w)}};return s.then(function(){g.status="fulfilled",g.value=l;for(var w=0;w<d.length;w++)(0,d[w])(l)},function(w){for(g.status="rejected",g.reason=w,w=0;w<d.length;w++)(0,d[w])(void 0)}),g}var _k=F.S;F.S=function(s,l){c_=_e(),typeof l=="object"&&l!==null&&typeof l.then=="function"&&JB(s,l),_k!==null&&_k(s,l)};var Za=Y(null);function ev(){var s=Za.current;return s!==null?s:Yt.pooledCache}function vp(s,l){l===null?H(Za,Za.current):H(Za,l.pool)}function Tk(){var s=ev();return s===null?null:{parent:vn._currentValue,pool:s}}var Du=Error(r(460)),tv=Error(r(474)),xp=Error(r(542)),wp={then:function(){}};function Ak(s){return s=s.status,s==="fulfilled"||s==="rejected"}function Dk(s,l,d){switch(d=s[d],d===void 0?s.push(l):d!==l&&(l.then(po,po),l=d),l.status){case"fulfilled":return l.value;case"rejected":throw s=l.reason,Ok(s),s;default:if(typeof l.status=="string")l.then(po,po);else{if(s=Yt,s!==null&&100<s.shellSuspendCounter)throw Error(r(482));s=l,s.status="pending",s.then(function(g){if(l.status==="pending"){var w=l;w.status="fulfilled",w.value=g}},function(g){if(l.status==="pending"){var w=l;w.status="rejected",w.reason=g}})}switch(l.status){case"fulfilled":return l.value;case"rejected":throw s=l.reason,Ok(s),s}throw el=l,Du}}function Ja(s){try{var l=s._init;return l(s._payload)}catch(d){throw d!==null&&typeof d=="object"&&typeof d.then=="function"?(el=d,Du):d}}var el=null;function Mk(){if(el===null)throw Error(r(459));var s=el;return el=null,s}function Ok(s){if(s===Du||s===xp)throw Error(r(483))}var Mu=null,zf=0;function Sp(s){var l=zf;return zf+=1,Mu===null&&(Mu=[]),Dk(Mu,s,l)}function Bf(s,l){l=l.props.ref,s.ref=l!==void 0?l:null}function Cp(s,l){throw l.$$typeof===m?Error(r(525)):(s=Object.prototype.toString.call(l),Error(r(31,s==="[object Object]"?"object with keys {"+Object.keys(l).join(", ")+"}":s)))}function $k(s){function l(se,ee){if(s){var fe=se.deletions;fe===null?(se.deletions=[ee],se.flags|=16):fe.push(ee)}}function d(se,ee){if(!s)return null;for(;ee!==null;)l(se,ee),ee=ee.sibling;return null}function g(se){for(var ee=new Map;se!==null;)se.key!==null?ee.set(se.key,se):ee.set(se.index,se),se=se.sibling;return ee}function w(se,ee){return se=go(se,ee),se.index=0,se.sibling=null,se}function R(se,ee,fe){return se.index=fe,s?(fe=se.alternate,fe!==null?(fe=fe.index,fe<ee?(se.flags|=67108866,ee):fe):(se.flags|=67108866,ee)):(se.flags|=1048576,ee)}function P(se){return s&&se.alternate===null&&(se.flags|=67108866),se}function V(se,ee,fe,we){return ee===null||ee.tag!==6?(ee=Hb(fe,se.mode,we),ee.return=se,ee):(ee=w(ee,fe),ee.return=se,ee)}function Q(se,ee,fe,we){var Ze=fe.type;return Ze===v?be(se,ee,fe.props.children,we,fe.key):ee!==null&&(ee.elementType===Ze||typeof Ze=="object"&&Ze!==null&&Ze.$$typeof===$&&Ja(Ze)===ee.type)?(ee=w(ee,fe.props),Bf(ee,fe),ee.return=se,ee):(ee=mp(fe.type,fe.key,fe.props,null,se.mode,we),Bf(ee,fe),ee.return=se,ee)}function de(se,ee,fe,we){return ee===null||ee.tag!==4||ee.stateNode.containerInfo!==fe.containerInfo||ee.stateNode.implementation!==fe.implementation?(ee=Gb(fe,se.mode,we),ee.return=se,ee):(ee=w(ee,fe.children||[]),ee.return=se,ee)}function be(se,ee,fe,we,Ze){return ee===null||ee.tag!==7?(ee=Wa(fe,se.mode,we,Ze),ee.return=se,ee):(ee=w(ee,fe),ee.return=se,ee)}function Ee(se,ee,fe){if(typeof ee=="string"&&ee!==""||typeof ee=="number"||typeof ee=="bigint")return ee=Hb(""+ee,se.mode,fe),ee.return=se,ee;if(typeof ee=="object"&&ee!==null){switch(ee.$$typeof){case y:return fe=mp(ee.type,ee.key,ee.props,null,se.mode,fe),Bf(fe,ee),fe.return=se,fe;case b:return ee=Gb(ee,se.mode,fe),ee.return=se,ee;case $:return ee=Ja(ee),Ee(se,ee,fe)}if(L(ee)||M(ee))return ee=Wa(ee,se.mode,fe,null),ee.return=se,ee;if(typeof ee.then=="function")return Ee(se,Sp(ee),fe);if(ee.$$typeof===k)return Ee(se,bp(se,ee),fe);Cp(se,ee)}return null}function pe(se,ee,fe,we){var Ze=ee!==null?ee.key:null;if(typeof fe=="string"&&fe!==""||typeof fe=="number"||typeof fe=="bigint")return Ze!==null?null:V(se,ee,""+fe,we);if(typeof fe=="object"&&fe!==null){switch(fe.$$typeof){case y:return fe.key===Ze?Q(se,ee,fe,we):null;case b:return fe.key===Ze?de(se,ee,fe,we):null;case $:return fe=Ja(fe),pe(se,ee,fe,we)}if(L(fe)||M(fe))return Ze!==null?null:be(se,ee,fe,we,null);if(typeof fe.then=="function")return pe(se,ee,Sp(fe),we);if(fe.$$typeof===k)return pe(se,ee,bp(se,fe),we);Cp(se,fe)}return null}function ye(se,ee,fe,we,Ze){if(typeof we=="string"&&we!==""||typeof we=="number"||typeof we=="bigint")return se=se.get(fe)||null,V(ee,se,""+we,Ze);if(typeof we=="object"&&we!==null){switch(we.$$typeof){case y:return se=se.get(we.key===null?fe:we.key)||null,Q(ee,se,we,Ze);case b:return se=se.get(we.key===null?fe:we.key)||null,de(ee,se,we,Ze);case $:return we=Ja(we),ye(se,ee,fe,we,Ze)}if(L(we)||M(we))return se=se.get(fe)||null,be(ee,se,we,Ze,null);if(typeof we.then=="function")return ye(se,ee,fe,Sp(we),Ze);if(we.$$typeof===k)return ye(se,ee,fe,bp(ee,we),Ze);Cp(ee,we)}return null}function Be(se,ee,fe,we){for(var Ze=null,At=null,qe=ee,at=ee=0,St=null;qe!==null&&at<fe.length;at++){qe.index>at?(St=qe,qe=null):St=qe.sibling;var Dt=pe(se,qe,fe[at],we);if(Dt===null){qe===null&&(qe=St);break}s&&qe&&Dt.alternate===null&&l(se,qe),ee=R(Dt,ee,at),At===null?Ze=Dt:At.sibling=Dt,At=Dt,qe=St}if(at===fe.length)return d(se,qe),Et&&yo(se,at),Ze;if(qe===null){for(;at<fe.length;at++)qe=Ee(se,fe[at],we),qe!==null&&(ee=R(qe,ee,at),At===null?Ze=qe:At.sibling=qe,At=qe);return Et&&yo(se,at),Ze}for(qe=g(qe);at<fe.length;at++)St=ye(qe,se,at,fe[at],we),St!==null&&(s&&St.alternate!==null&&qe.delete(St.key===null?at:St.key),ee=R(St,ee,at),At===null?Ze=St:At.sibling=St,At=St);return s&&qe.forEach(function(Ps){return l(se,Ps)}),Et&&yo(se,at),Ze}function et(se,ee,fe,we){if(fe==null)throw Error(r(151));for(var Ze=null,At=null,qe=ee,at=ee=0,St=null,Dt=fe.next();qe!==null&&!Dt.done;at++,Dt=fe.next()){qe.index>at?(St=qe,qe=null):St=qe.sibling;var Ps=pe(se,qe,Dt.value,we);if(Ps===null){qe===null&&(qe=St);break}s&&qe&&Ps.alternate===null&&l(se,qe),ee=R(Ps,ee,at),At===null?Ze=Ps:At.sibling=Ps,At=Ps,qe=St}if(Dt.done)return d(se,qe),Et&&yo(se,at),Ze;if(qe===null){for(;!Dt.done;at++,Dt=fe.next())Dt=Ee(se,Dt.value,we),Dt!==null&&(ee=R(Dt,ee,at),At===null?Ze=Dt:At.sibling=Dt,At=Dt);return Et&&yo(se,at),Ze}for(qe=g(qe);!Dt.done;at++,Dt=fe.next())Dt=ye(qe,se,at,Dt.value,we),Dt!==null&&(s&&Dt.alternate!==null&&qe.delete(Dt.key===null?at:Dt.key),ee=R(Dt,ee,at),At===null?Ze=Dt:At.sibling=Dt,At=Dt);return s&&qe.forEach(function(f6){return l(se,f6)}),Et&&yo(se,at),Ze}function Vt(se,ee,fe,we){if(typeof fe=="object"&&fe!==null&&fe.type===v&&fe.key===null&&(fe=fe.props.children),typeof fe=="object"&&fe!==null){switch(fe.$$typeof){case y:e:{for(var Ze=fe.key;ee!==null;){if(ee.key===Ze){if(Ze=fe.type,Ze===v){if(ee.tag===7){d(se,ee.sibling),we=w(ee,fe.props.children),we.return=se,se=we;break e}}else if(ee.elementType===Ze||typeof Ze=="object"&&Ze!==null&&Ze.$$typeof===$&&Ja(Ze)===ee.type){d(se,ee.sibling),we=w(ee,fe.props),Bf(we,fe),we.return=se,se=we;break e}d(se,ee);break}else l(se,ee);ee=ee.sibling}fe.type===v?(we=Wa(fe.props.children,se.mode,we,fe.key),we.return=se,se=we):(we=mp(fe.type,fe.key,fe.props,null,se.mode,we),Bf(we,fe),we.return=se,se=we)}return P(se);case b:e:{for(Ze=fe.key;ee!==null;){if(ee.key===Ze)if(ee.tag===4&&ee.stateNode.containerInfo===fe.containerInfo&&ee.stateNode.implementation===fe.implementation){d(se,ee.sibling),we=w(ee,fe.children||[]),we.return=se,se=we;break e}else{d(se,ee);break}else l(se,ee);ee=ee.sibling}we=Gb(fe,se.mode,we),we.return=se,se=we}return P(se);case $:return fe=Ja(fe),Vt(se,ee,fe,we)}if(L(fe))return Be(se,ee,fe,we);if(M(fe)){if(Ze=M(fe),typeof Ze!="function")throw Error(r(150));return fe=Ze.call(fe),et(se,ee,fe,we)}if(typeof fe.then=="function")return Vt(se,ee,Sp(fe),we);if(fe.$$typeof===k)return Vt(se,ee,bp(se,fe),we);Cp(se,fe)}return typeof fe=="string"&&fe!==""||typeof fe=="number"||typeof fe=="bigint"?(fe=""+fe,ee!==null&&ee.tag===6?(d(se,ee.sibling),we=w(ee,fe),we.return=se,se=we):(d(se,ee),we=Hb(fe,se.mode,we),we.return=se,se=we),P(se)):d(se,ee)}return function(se,ee,fe,we){try{zf=0;var Ze=Vt(se,ee,fe,we);return Mu=null,Ze}catch(qe){if(qe===Du||qe===xp)throw qe;var At=Pr(29,qe,null,se.mode);return At.lanes=we,At.return=se,At}finally{}}}var tl=$k(!0),Pk=$k(!1),ys=!1;function nv(s){s.updateQueue={baseState:s.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function rv(s,l){s=s.updateQueue,l.updateQueue===s&&(l.updateQueue={baseState:s.baseState,firstBaseUpdate:s.firstBaseUpdate,lastBaseUpdate:s.lastBaseUpdate,shared:s.shared,callbacks:null})}function bs(s){return{lane:s,tag:0,payload:null,callback:null,next:null}}function vs(s,l,d){var g=s.updateQueue;if(g===null)return null;if(g=g.shared,($t&2)!==0){var w=g.pending;return w===null?l.next=l:(l.next=w.next,w.next=l),g.pending=l,l=pp(s),yk(s,null,d),l}return hp(s,g,l,d),pp(s)}function Uf(s,l,d){if(l=l.updateQueue,l!==null&&(l=l.shared,(d&4194048)!==0)){var g=l.lanes;g&=s.pendingLanes,d|=g,l.lanes=d,fs(s,d)}}function iv(s,l){var d=s.updateQueue,g=s.alternate;if(g!==null&&(g=g.updateQueue,d===g)){var w=null,R=null;if(d=d.firstBaseUpdate,d!==null){do{var P={lane:d.lane,tag:d.tag,payload:d.payload,callback:null,next:null};R===null?w=R=P:R=R.next=P,d=d.next}while(d!==null);R===null?w=R=l:R=R.next=l}else w=R=l;d={baseState:g.baseState,firstBaseUpdate:w,lastBaseUpdate:R,shared:g.shared,callbacks:g.callbacks},s.updateQueue=d;return}s=d.lastBaseUpdate,s===null?d.firstBaseUpdate=l:s.next=l,d.lastBaseUpdate=l}var ov=!1;function Hf(){if(ov){var s=Au;if(s!==null)throw s}}function Gf(s,l,d,g){ov=!1;var w=s.updateQueue;ys=!1;var R=w.firstBaseUpdate,P=w.lastBaseUpdate,V=w.shared.pending;if(V!==null){w.shared.pending=null;var Q=V,de=Q.next;Q.next=null,P===null?R=de:P.next=de,P=Q;var be=s.alternate;be!==null&&(be=be.updateQueue,V=be.lastBaseUpdate,V!==P&&(V===null?be.firstBaseUpdate=de:V.next=de,be.lastBaseUpdate=Q))}if(R!==null){var Ee=w.baseState;P=0,be=de=Q=null,V=R;do{var pe=V.lane&-536870913,ye=pe!==V.lane;if(ye?(wt&pe)===pe:(g&pe)===pe){pe!==0&&pe===Tu&&(ov=!0),be!==null&&(be=be.next={lane:0,tag:V.tag,payload:V.payload,callback:null,next:null});e:{var Be=s,et=V;pe=l;var Vt=d;switch(et.tag){case 1:if(Be=et.payload,typeof Be=="function"){Ee=Be.call(Vt,Ee,pe);break e}Ee=Be;break e;case 3:Be.flags=Be.flags&-65537|128;case 0:if(Be=et.payload,pe=typeof Be=="function"?Be.call(Vt,Ee,pe):Be,pe==null)break e;Ee=p({},Ee,pe);break e;case 2:ys=!0}}pe=V.callback,pe!==null&&(s.flags|=64,ye&&(s.flags|=8192),ye=w.callbacks,ye===null?w.callbacks=[pe]:ye.push(pe))}else ye={lane:pe,tag:V.tag,payload:V.payload,callback:V.callback,next:null},be===null?(de=be=ye,Q=Ee):be=be.next=ye,P|=pe;if(V=V.next,V===null){if(V=w.shared.pending,V===null)break;ye=V,V=ye.next,ye.next=null,w.lastBaseUpdate=ye,w.shared.pending=null}}while(!0);be===null&&(Q=Ee),w.baseState=Q,w.firstBaseUpdate=de,w.lastBaseUpdate=be,R===null&&(w.shared.lanes=0),Es|=P,s.lanes=P,s.memoizedState=Ee}}function Nk(s,l){if(typeof s!="function")throw Error(r(191,s));s.call(l)}function Ik(s,l){var d=s.callbacks;if(d!==null)for(s.callbacks=null,s=0;s<d.length;s++)Nk(d[s],l)}var Ou=Y(null),Ep=Y(0);function jk(s,l){s=To,H(Ep,s),H(Ou,l),To=s|l.baseLanes}function sv(){H(Ep,To),H(Ou,Ou.current)}function av(){To=Ep.current,J(Ou),J(Ep)}var Nr=Y(null),li=null;function xs(s){var l=s.alternate;H(hn,hn.current&1),H(Nr,s),li===null&&(l===null||Ou.current!==null||l.memoizedState!==null)&&(li=s)}function lv(s){H(hn,hn.current),H(Nr,s),li===null&&(li=s)}function Lk(s){s.tag===22?(H(hn,hn.current),H(Nr,s),li===null&&(li=s)):ws()}function ws(){H(hn,hn.current),H(Nr,Nr.current)}function Ir(s){J(Nr),li===s&&(li=null),J(hn)}var hn=Y(0);function kp(s){for(var l=s;l!==null;){if(l.tag===13){var d=l.memoizedState;if(d!==null&&(d=d.dehydrated,d===null||p0(d)||m0(d)))return l}else if(l.tag===19&&(l.memoizedProps.revealOrder==="forwards"||l.memoizedProps.revealOrder==="backwards"||l.memoizedProps.revealOrder==="unstable_legacy-backwards"||l.memoizedProps.revealOrder==="together")){if((l.flags&128)!==0)return l}else if(l.child!==null){l.child.return=l,l=l.child;continue}if(l===s)break;for(;l.sibling===null;){if(l.return===null||l.return===s)return null;l=l.return}l.sibling.return=l.return,l=l.sibling}return null}var xo=0,ot=null,Ht=null,xn=null,Rp=!1,$u=!1,nl=!1,_p=0,Vf=0,Pu=null,t5=0;function sn(){throw Error(r(321))}function uv(s,l){if(l===null)return!1;for(var d=0;d<l.length&&d<s.length;d++)if(!$r(s[d],l[d]))return!1;return!0}function cv(s,l,d,g,w,R){return xo=R,ot=l,l.memoizedState=null,l.updateQueue=null,l.lanes=0,F.H=s===null||s.memoizedState===null?wR:kv,nl=!1,R=d(g,w),nl=!1,$u&&(R=zk(l,d,g,w)),Fk(s),R}function Fk(s){F.H=Wf;var l=Ht!==null&&Ht.next!==null;if(xo=0,xn=Ht=ot=null,Rp=!1,Vf=0,Pu=null,l)throw Error(r(300));s===null||wn||(s=s.dependencies,s!==null&&yp(s)&&(wn=!0))}function zk(s,l,d,g){ot=s;var w=0;do{if($u&&(Pu=null),Vf=0,$u=!1,25<=w)throw Error(r(301));if(w+=1,xn=Ht=null,s.updateQueue!=null){var R=s.updateQueue;R.lastEffect=null,R.events=null,R.stores=null,R.memoCache!=null&&(R.memoCache.index=0)}F.H=SR,R=l(d,g)}while($u);return R}function n5(){var s=F.H,l=s.useState()[0];return l=typeof l.then=="function"?qf(l):l,s=s.useState()[0],(Ht!==null?Ht.memoizedState:null)!==s&&(ot.flags|=1024),l}function fv(){var s=_p!==0;return _p=0,s}function dv(s,l,d){l.updateQueue=s.updateQueue,l.flags&=-2053,s.lanes&=~d}function hv(s){if(Rp){for(s=s.memoizedState;s!==null;){var l=s.queue;l!==null&&(l.pending=null),s=s.next}Rp=!1}xo=0,xn=Ht=ot=null,$u=!1,Vf=_p=0,Pu=null}function nr(){var s={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return xn===null?ot.memoizedState=xn=s:xn=xn.next=s,xn}function pn(){if(Ht===null){var s=ot.alternate;s=s!==null?s.memoizedState:null}else s=Ht.next;var l=xn===null?ot.memoizedState:xn.next;if(l!==null)xn=l,Ht=s;else{if(s===null)throw ot.alternate===null?Error(r(467)):Error(r(310));Ht=s,s={memoizedState:Ht.memoizedState,baseState:Ht.baseState,baseQueue:Ht.baseQueue,queue:Ht.queue,next:null},xn===null?ot.memoizedState=xn=s:xn=xn.next=s}return xn}function Tp(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function qf(s){var l=Vf;return Vf+=1,Pu===null&&(Pu=[]),s=Dk(Pu,s,l),l=ot,(xn===null?l.memoizedState:xn.next)===null&&(l=l.alternate,F.H=l===null||l.memoizedState===null?wR:kv),s}function Ap(s){if(s!==null&&typeof s=="object"){if(typeof s.then=="function")return qf(s);if(s.$$typeof===k)return zn(s)}throw Error(r(438,String(s)))}function pv(s){var l=null,d=ot.updateQueue;if(d!==null&&(l=d.memoCache),l==null){var g=ot.alternate;g!==null&&(g=g.updateQueue,g!==null&&(g=g.memoCache,g!=null&&(l={data:g.data.map(function(w){return w.slice()}),index:0})))}if(l==null&&(l={data:[],index:0}),d===null&&(d=Tp(),ot.updateQueue=d),d.memoCache=l,d=l.data[l.index],d===void 0)for(d=l.data[l.index]=Array(s),g=0;g<s;g++)d[g]=j;return l.index++,d}function wo(s,l){return typeof l=="function"?l(s):l}function Dp(s){var l=pn();return mv(l,Ht,s)}function mv(s,l,d){var g=s.queue;if(g===null)throw Error(r(311));g.lastRenderedReducer=d;var w=s.baseQueue,R=g.pending;if(R!==null){if(w!==null){var P=w.next;w.next=R.next,R.next=P}l.baseQueue=w=R,g.pending=null}if(R=s.baseState,w===null)s.memoizedState=R;else{l=w.next;var V=P=null,Q=null,de=l,be=!1;do{var Ee=de.lane&-536870913;if(Ee!==de.lane?(wt&Ee)===Ee:(xo&Ee)===Ee){var pe=de.revertLane;if(pe===0)Q!==null&&(Q=Q.next={lane:0,revertLane:0,gesture:null,action:de.action,hasEagerState:de.hasEagerState,eagerState:de.eagerState,next:null}),Ee===Tu&&(be=!0);else if((xo&pe)===pe){de=de.next,pe===Tu&&(be=!0);continue}else Ee={lane:0,revertLane:de.revertLane,gesture:null,action:de.action,hasEagerState:de.hasEagerState,eagerState:de.eagerState,next:null},Q===null?(V=Q=Ee,P=R):Q=Q.next=Ee,ot.lanes|=pe,Es|=pe;Ee=de.action,nl&&d(R,Ee),R=de.hasEagerState?de.eagerState:d(R,Ee)}else pe={lane:Ee,revertLane:de.revertLane,gesture:de.gesture,action:de.action,hasEagerState:de.hasEagerState,eagerState:de.eagerState,next:null},Q===null?(V=Q=pe,P=R):Q=Q.next=pe,ot.lanes|=Ee,Es|=Ee;de=de.next}while(de!==null&&de!==l);if(Q===null?P=R:Q.next=V,!$r(R,s.memoizedState)&&(wn=!0,be&&(d=Au,d!==null)))throw d;s.memoizedState=R,s.baseState=P,s.baseQueue=Q,g.lastRenderedState=R}return w===null&&(g.lanes=0),[s.memoizedState,g.dispatch]}function gv(s){var l=pn(),d=l.queue;if(d===null)throw Error(r(311));d.lastRenderedReducer=s;var g=d.dispatch,w=d.pending,R=l.memoizedState;if(w!==null){d.pending=null;var P=w=w.next;do R=s(R,P.action),P=P.next;while(P!==w);$r(R,l.memoizedState)||(wn=!0),l.memoizedState=R,l.baseQueue===null&&(l.baseState=R),d.lastRenderedState=R}return[R,g]}function Bk(s,l,d){var g=ot,w=pn(),R=Et;if(R){if(d===void 0)throw Error(r(407));d=d()}else d=l();var P=!$r((Ht||w).memoizedState,d);if(P&&(w.memoizedState=d,wn=!0),w=w.queue,vv(Gk.bind(null,g,w,s),[s]),w.getSnapshot!==l||P||xn!==null&&xn.memoizedState.tag&1){if(g.flags|=2048,Nu(9,{destroy:void 0},Hk.bind(null,g,w,d,l),null),Yt===null)throw Error(r(349));R||(xo&127)!==0||Uk(g,l,d)}return d}function Uk(s,l,d){s.flags|=16384,s={getSnapshot:l,value:d},l=ot.updateQueue,l===null?(l=Tp(),ot.updateQueue=l,l.stores=[s]):(d=l.stores,d===null?l.stores=[s]:d.push(s))}function Hk(s,l,d,g){l.value=d,l.getSnapshot=g,Vk(l)&&qk(s)}function Gk(s,l,d){return d(function(){Vk(l)&&qk(s)})}function Vk(s){var l=s.getSnapshot;s=s.value;try{var d=l();return!$r(s,d)}catch{return!0}}function qk(s){var l=Ya(s,2);l!==null&&br(l,s,2)}function yv(s){var l=nr();if(typeof s=="function"){var d=s;if(s=d(),nl){Qe(!0);try{d()}finally{Qe(!1)}}}return l.memoizedState=l.baseState=s,l.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:wo,lastRenderedState:s},l}function Yk(s,l,d,g){return s.baseState=d,mv(s,Ht,typeof g=="function"?g:wo)}function r5(s,l,d,g,w){if($p(s))throw Error(r(485));if(s=l.action,s!==null){var R={payload:w,action:s,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(P){R.listeners.push(P)}};F.T!==null?d(!0):R.isTransition=!1,g(R),d=l.pending,d===null?(R.next=l.pending=R,Wk(l,R)):(R.next=d.next,l.pending=d.next=R)}}function Wk(s,l){var d=l.action,g=l.payload,w=s.state;if(l.isTransition){var R=F.T,P={};F.T=P;try{var V=d(w,g),Q=F.S;Q!==null&&Q(P,V),Kk(s,l,V)}catch(de){bv(s,l,de)}finally{R!==null&&P.types!==null&&(R.types=P.types),F.T=R}}else try{R=d(w,g),Kk(s,l,R)}catch(de){bv(s,l,de)}}function Kk(s,l,d){d!==null&&typeof d=="object"&&typeof d.then=="function"?d.then(function(g){Xk(s,l,g)},function(g){return bv(s,l,g)}):Xk(s,l,d)}function Xk(s,l,d){l.status="fulfilled",l.value=d,Qk(l),s.state=d,l=s.pending,l!==null&&(d=l.next,d===l?s.pending=null:(d=d.next,l.next=d,Wk(s,d)))}function bv(s,l,d){var g=s.pending;if(s.pending=null,g!==null){g=g.next;do l.status="rejected",l.reason=d,Qk(l),l=l.next;while(l!==g)}s.action=null}function Qk(s){s=s.listeners;for(var l=0;l<s.length;l++)(0,s[l])()}function Zk(s,l){return l}function Jk(s,l){if(Et){var d=Yt.formState;if(d!==null){e:{var g=ot;if(Et){if(Qt){t:{for(var w=Qt,R=ai;w.nodeType!==8;){if(!R){w=null;break t}if(w=ui(w.nextSibling),w===null){w=null;break t}}R=w.data,w=R==="F!"||R==="F"?w:null}if(w){Qt=ui(w.nextSibling),g=w.data==="F!";break e}}ms(g)}g=!1}g&&(l=d[0])}}return d=nr(),d.memoizedState=d.baseState=l,g={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Zk,lastRenderedState:l},d.queue=g,d=bR.bind(null,ot,g),g.dispatch=d,g=yv(!1),R=Ev.bind(null,ot,!1,g.queue),g=nr(),w={state:l,dispatch:null,action:s,pending:null},g.queue=w,d=r5.bind(null,ot,w,R,d),w.dispatch=d,g.memoizedState=s,[l,d,!1]}function eR(s){var l=pn();return tR(l,Ht,s)}function tR(s,l,d){if(l=mv(s,l,Zk)[0],s=Dp(wo)[0],typeof l=="object"&&l!==null&&typeof l.then=="function")try{var g=qf(l)}catch(P){throw P===Du?xp:P}else g=l;l=pn();var w=l.queue,R=w.dispatch;return d!==l.memoizedState&&(ot.flags|=2048,Nu(9,{destroy:void 0},i5.bind(null,w,d),null)),[g,R,s]}function i5(s,l){s.action=l}function nR(s){var l=pn(),d=Ht;if(d!==null)return tR(l,d,s);pn(),l=l.memoizedState,d=pn();var g=d.queue.dispatch;return d.memoizedState=s,[l,g,!1]}function Nu(s,l,d,g){return s={tag:s,create:d,deps:g,inst:l,next:null},l=ot.updateQueue,l===null&&(l=Tp(),ot.updateQueue=l),d=l.lastEffect,d===null?l.lastEffect=s.next=s:(g=d.next,d.next=s,s.next=g,l.lastEffect=s),s}function rR(){return pn().memoizedState}function Mp(s,l,d,g){var w=nr();ot.flags|=s,w.memoizedState=Nu(1|l,{destroy:void 0},d,g===void 0?null:g)}function Op(s,l,d,g){var w=pn();g=g===void 0?null:g;var R=w.memoizedState.inst;Ht!==null&&g!==null&&uv(g,Ht.memoizedState.deps)?w.memoizedState=Nu(l,R,d,g):(ot.flags|=s,w.memoizedState=Nu(1|l,R,d,g))}function iR(s,l){Mp(8390656,8,s,l)}function vv(s,l){Op(2048,8,s,l)}function o5(s){ot.flags|=4;var l=ot.updateQueue;if(l===null)l=Tp(),ot.updateQueue=l,l.events=[s];else{var d=l.events;d===null?l.events=[s]:d.push(s)}}function oR(s){var l=pn().memoizedState;return o5({ref:l,nextImpl:s}),function(){if(($t&2)!==0)throw Error(r(440));return l.impl.apply(void 0,arguments)}}function sR(s,l){return Op(4,2,s,l)}function aR(s,l){return Op(4,4,s,l)}function lR(s,l){if(typeof l=="function"){s=s();var d=l(s);return function(){typeof d=="function"?d():l(null)}}if(l!=null)return s=s(),l.current=s,function(){l.current=null}}function uR(s,l,d){d=d!=null?d.concat([s]):null,Op(4,4,lR.bind(null,l,s),d)}function xv(){}function cR(s,l){var d=pn();l=l===void 0?null:l;var g=d.memoizedState;return l!==null&&uv(l,g[1])?g[0]:(d.memoizedState=[s,l],s)}function fR(s,l){var d=pn();l=l===void 0?null:l;var g=d.memoizedState;if(l!==null&&uv(l,g[1]))return g[0];if(g=s(),nl){Qe(!0);try{s()}finally{Qe(!1)}}return d.memoizedState=[g,l],g}function wv(s,l,d){return d===void 0||(xo&1073741824)!==0&&(wt&261930)===0?s.memoizedState=l:(s.memoizedState=d,s=d_(),ot.lanes|=s,Es|=s,d)}function dR(s,l,d,g){return $r(d,l)?d:Ou.current!==null?(s=wv(s,d,g),$r(s,l)||(wn=!0),s):(xo&42)===0||(xo&1073741824)!==0&&(wt&261930)===0?(wn=!0,s.memoizedState=d):(s=d_(),ot.lanes|=s,Es|=s,l)}function hR(s,l,d,g,w){var R=U.p;U.p=R!==0&&8>R?R:8;var P=F.T,V={};F.T=V,Ev(s,!1,l,d);try{var Q=w(),de=F.S;if(de!==null&&de(V,Q),Q!==null&&typeof Q=="object"&&typeof Q.then=="function"){var be=e5(Q,g);Yf(s,l,be,Fr(s))}else Yf(s,l,g,Fr(s))}catch(Ee){Yf(s,l,{then:function(){},status:"rejected",reason:Ee},Fr())}finally{U.p=R,P!==null&&V.types!==null&&(P.types=V.types),F.T=P}}function s5(){}function Sv(s,l,d,g){if(s.tag!==5)throw Error(r(476));var w=pR(s).queue;hR(s,w,l,q,d===null?s5:function(){return mR(s),d(g)})}function pR(s){var l=s.memoizedState;if(l!==null)return l;l={memoizedState:q,baseState:q,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:wo,lastRenderedState:q},next:null};var d={};return l.next={memoizedState:d,baseState:d,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:wo,lastRenderedState:d},next:null},s.memoizedState=l,s=s.alternate,s!==null&&(s.memoizedState=l),l}function mR(s){var l=pR(s);l.next===null&&(l=s.alternate.memoizedState),Yf(s,l.next.queue,{},Fr())}function Cv(){return zn(cd)}function gR(){return pn().memoizedState}function yR(){return pn().memoizedState}function a5(s){for(var l=s.return;l!==null;){switch(l.tag){case 24:case 3:var d=Fr();s=bs(d);var g=vs(l,s,d);g!==null&&(br(g,l,d),Uf(g,l,d)),l={cache:Zb()},s.payload=l;return}l=l.return}}function l5(s,l,d){var g=Fr();d={lane:g,revertLane:0,gesture:null,action:d,hasEagerState:!1,eagerState:null,next:null},$p(s)?vR(l,d):(d=Bb(s,l,d,g),d!==null&&(br(d,s,g),xR(d,l,g)))}function bR(s,l,d){var g=Fr();Yf(s,l,d,g)}function Yf(s,l,d,g){var w={lane:g,revertLane:0,gesture:null,action:d,hasEagerState:!1,eagerState:null,next:null};if($p(s))vR(l,w);else{var R=s.alternate;if(s.lanes===0&&(R===null||R.lanes===0)&&(R=l.lastRenderedReducer,R!==null))try{var P=l.lastRenderedState,V=R(P,d);if(w.hasEagerState=!0,w.eagerState=V,$r(V,P))return hp(s,l,w,0),Yt===null&&dp(),!1}catch{}finally{}if(d=Bb(s,l,w,g),d!==null)return br(d,s,g),xR(d,l,g),!0}return!1}function Ev(s,l,d,g){if(g={lane:2,revertLane:n0(),gesture:null,action:g,hasEagerState:!1,eagerState:null,next:null},$p(s)){if(l)throw Error(r(479))}else l=Bb(s,d,g,2),l!==null&&br(l,s,2)}function $p(s){var l=s.alternate;return s===ot||l!==null&&l===ot}function vR(s,l){$u=Rp=!0;var d=s.pending;d===null?l.next=l:(l.next=d.next,d.next=l),s.pending=l}function xR(s,l,d){if((d&4194048)!==0){var g=l.lanes;g&=s.pendingLanes,d|=g,l.lanes=d,fs(s,d)}}var Wf={readContext:zn,use:Ap,useCallback:sn,useContext:sn,useEffect:sn,useImperativeHandle:sn,useLayoutEffect:sn,useInsertionEffect:sn,useMemo:sn,useReducer:sn,useRef:sn,useState:sn,useDebugValue:sn,useDeferredValue:sn,useTransition:sn,useSyncExternalStore:sn,useId:sn,useHostTransitionStatus:sn,useFormState:sn,useActionState:sn,useOptimistic:sn,useMemoCache:sn,useCacheRefresh:sn};Wf.useEffectEvent=sn;var wR={readContext:zn,use:Ap,useCallback:function(s,l){return nr().memoizedState=[s,l===void 0?null:l],s},useContext:zn,useEffect:iR,useImperativeHandle:function(s,l,d){d=d!=null?d.concat([s]):null,Mp(4194308,4,lR.bind(null,l,s),d)},useLayoutEffect:function(s,l){return Mp(4194308,4,s,l)},useInsertionEffect:function(s,l){Mp(4,2,s,l)},useMemo:function(s,l){var d=nr();l=l===void 0?null:l;var g=s();if(nl){Qe(!0);try{s()}finally{Qe(!1)}}return d.memoizedState=[g,l],g},useReducer:function(s,l,d){var g=nr();if(d!==void 0){var w=d(l);if(nl){Qe(!0);try{d(l)}finally{Qe(!1)}}}else w=l;return g.memoizedState=g.baseState=w,s={pending:null,lanes:0,dispatch:null,lastRenderedReducer:s,lastRenderedState:w},g.queue=s,s=s.dispatch=l5.bind(null,ot,s),[g.memoizedState,s]},useRef:function(s){var l=nr();return s={current:s},l.memoizedState=s},useState:function(s){s=yv(s);var l=s.queue,d=bR.bind(null,ot,l);return l.dispatch=d,[s.memoizedState,d]},useDebugValue:xv,useDeferredValue:function(s,l){var d=nr();return wv(d,s,l)},useTransition:function(){var s=yv(!1);return s=hR.bind(null,ot,s.queue,!0,!1),nr().memoizedState=s,[!1,s]},useSyncExternalStore:function(s,l,d){var g=ot,w=nr();if(Et){if(d===void 0)throw Error(r(407));d=d()}else{if(d=l(),Yt===null)throw Error(r(349));(wt&127)!==0||Uk(g,l,d)}w.memoizedState=d;var R={value:d,getSnapshot:l};return w.queue=R,iR(Gk.bind(null,g,R,s),[s]),g.flags|=2048,Nu(9,{destroy:void 0},Hk.bind(null,g,R,d,l),null),d},useId:function(){var s=nr(),l=Yt.identifierPrefix;if(Et){var d=Vi,g=Gi;d=(g&~(1<<32-Ne(g)-1)).toString(32)+d,l="_"+l+"R_"+d,d=_p++,0<d&&(l+="H"+d.toString(32)),l+="_"}else d=t5++,l="_"+l+"r_"+d.toString(32)+"_";return s.memoizedState=l},useHostTransitionStatus:Cv,useFormState:Jk,useActionState:Jk,useOptimistic:function(s){var l=nr();l.memoizedState=l.baseState=s;var d={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return l.queue=d,l=Ev.bind(null,ot,!0,d),d.dispatch=l,[s,l]},useMemoCache:pv,useCacheRefresh:function(){return nr().memoizedState=a5.bind(null,ot)},useEffectEvent:function(s){var l=nr(),d={impl:s};return l.memoizedState=d,function(){if(($t&2)!==0)throw Error(r(440));return d.impl.apply(void 0,arguments)}}},kv={readContext:zn,use:Ap,useCallback:cR,useContext:zn,useEffect:vv,useImperativeHandle:uR,useInsertionEffect:sR,useLayoutEffect:aR,useMemo:fR,useReducer:Dp,useRef:rR,useState:function(){return Dp(wo)},useDebugValue:xv,useDeferredValue:function(s,l){var d=pn();return dR(d,Ht.memoizedState,s,l)},useTransition:function(){var s=Dp(wo)[0],l=pn().memoizedState;return[typeof s=="boolean"?s:qf(s),l]},useSyncExternalStore:Bk,useId:gR,useHostTransitionStatus:Cv,useFormState:eR,useActionState:eR,useOptimistic:function(s,l){var d=pn();return Yk(d,Ht,s,l)},useMemoCache:pv,useCacheRefresh:yR};kv.useEffectEvent=oR;var SR={readContext:zn,use:Ap,useCallback:cR,useContext:zn,useEffect:vv,useImperativeHandle:uR,useInsertionEffect:sR,useLayoutEffect:aR,useMemo:fR,useReducer:gv,useRef:rR,useState:function(){return gv(wo)},useDebugValue:xv,useDeferredValue:function(s,l){var d=pn();return Ht===null?wv(d,s,l):dR(d,Ht.memoizedState,s,l)},useTransition:function(){var s=gv(wo)[0],l=pn().memoizedState;return[typeof s=="boolean"?s:qf(s),l]},useSyncExternalStore:Bk,useId:gR,useHostTransitionStatus:Cv,useFormState:nR,useActionState:nR,useOptimistic:function(s,l){var d=pn();return Ht!==null?Yk(d,Ht,s,l):(d.baseState=s,[s,d.queue.dispatch])},useMemoCache:pv,useCacheRefresh:yR};SR.useEffectEvent=oR;function Rv(s,l,d,g){l=s.memoizedState,d=d(g,l),d=d==null?l:p({},l,d),s.memoizedState=d,s.lanes===0&&(s.updateQueue.baseState=d)}var _v={enqueueSetState:function(s,l,d){s=s._reactInternals;var g=Fr(),w=bs(g);w.payload=l,d!=null&&(w.callback=d),l=vs(s,w,g),l!==null&&(br(l,s,g),Uf(l,s,g))},enqueueReplaceState:function(s,l,d){s=s._reactInternals;var g=Fr(),w=bs(g);w.tag=1,w.payload=l,d!=null&&(w.callback=d),l=vs(s,w,g),l!==null&&(br(l,s,g),Uf(l,s,g))},enqueueForceUpdate:function(s,l){s=s._reactInternals;var d=Fr(),g=bs(d);g.tag=2,l!=null&&(g.callback=l),l=vs(s,g,d),l!==null&&(br(l,s,d),Uf(l,s,d))}};function CR(s,l,d,g,w,R,P){return s=s.stateNode,typeof s.shouldComponentUpdate=="function"?s.shouldComponentUpdate(g,R,P):l.prototype&&l.prototype.isPureReactComponent?!Pf(d,g)||!Pf(w,R):!0}function ER(s,l,d,g){s=l.state,typeof l.componentWillReceiveProps=="function"&&l.componentWillReceiveProps(d,g),typeof l.UNSAFE_componentWillReceiveProps=="function"&&l.UNSAFE_componentWillReceiveProps(d,g),l.state!==s&&_v.enqueueReplaceState(l,l.state,null)}function rl(s,l){var d=l;if("ref"in l){d={};for(var g in l)g!=="ref"&&(d[g]=l[g])}if(s=s.defaultProps){d===l&&(d=p({},d));for(var w in s)d[w]===void 0&&(d[w]=s[w])}return d}function kR(s){fp(s)}function RR(s){console.error(s)}function _R(s){fp(s)}function Pp(s,l){try{var d=s.onUncaughtError;d(l.value,{componentStack:l.stack})}catch(g){setTimeout(function(){throw g})}}function TR(s,l,d){try{var g=s.onCaughtError;g(d.value,{componentStack:d.stack,errorBoundary:l.tag===1?l.stateNode:null})}catch(w){setTimeout(function(){throw w})}}function Tv(s,l,d){return d=bs(d),d.tag=3,d.payload={element:null},d.callback=function(){Pp(s,l)},d}function AR(s){return s=bs(s),s.tag=3,s}function DR(s,l,d,g){var w=d.type.getDerivedStateFromError;if(typeof w=="function"){var R=g.value;s.payload=function(){return w(R)},s.callback=function(){TR(l,d,g)}}var P=d.stateNode;P!==null&&typeof P.componentDidCatch=="function"&&(s.callback=function(){TR(l,d,g),typeof w!="function"&&(ks===null?ks=new Set([this]):ks.add(this));var V=g.stack;this.componentDidCatch(g.value,{componentStack:V!==null?V:""})})}function u5(s,l,d,g,w){if(d.flags|=32768,g!==null&&typeof g=="object"&&typeof g.then=="function"){if(l=d.alternate,l!==null&&_u(l,d,w,!0),d=Nr.current,d!==null){switch(d.tag){case 31:case 13:return li===null?qp():d.alternate===null&&an===0&&(an=3),d.flags&=-257,d.flags|=65536,d.lanes=w,g===wp?d.flags|=16384:(l=d.updateQueue,l===null?d.updateQueue=new Set([g]):l.add(g),Jv(s,g,w)),!1;case 22:return d.flags|=65536,g===wp?d.flags|=16384:(l=d.updateQueue,l===null?(l={transitions:null,markerInstances:null,retryQueue:new Set([g])},d.updateQueue=l):(d=l.retryQueue,d===null?l.retryQueue=new Set([g]):d.add(g)),Jv(s,g,w)),!1}throw Error(r(435,d.tag))}return Jv(s,g,w),qp(),!1}if(Et)return l=Nr.current,l!==null?((l.flags&65536)===0&&(l.flags|=256),l.flags|=65536,l.lanes=w,g!==Yb&&(s=Error(r(422),{cause:g}),jf(ii(s,d)))):(g!==Yb&&(l=Error(r(423),{cause:g}),jf(ii(l,d))),s=s.current.alternate,s.flags|=65536,w&=-w,s.lanes|=w,g=ii(g,d),w=Tv(s.stateNode,g,w),iv(s,w),an!==4&&(an=2)),!1;var R=Error(r(520),{cause:g});if(R=ii(R,d),nd===null?nd=[R]:nd.push(R),an!==4&&(an=2),l===null)return!0;g=ii(g,d),d=l;do{switch(d.tag){case 3:return d.flags|=65536,s=w&-w,d.lanes|=s,s=Tv(d.stateNode,g,s),iv(d,s),!1;case 1:if(l=d.type,R=d.stateNode,(d.flags&128)===0&&(typeof l.getDerivedStateFromError=="function"||R!==null&&typeof R.componentDidCatch=="function"&&(ks===null||!ks.has(R))))return d.flags|=65536,w&=-w,d.lanes|=w,w=AR(w),DR(w,s,d,g),iv(d,w),!1}d=d.return}while(d!==null);return!1}var Av=Error(r(461)),wn=!1;function Bn(s,l,d,g){l.child=s===null?Pk(l,null,d,g):tl(l,s.child,d,g)}function MR(s,l,d,g,w){d=d.render;var R=l.ref;if("ref"in g){var P={};for(var V in g)V!=="ref"&&(P[V]=g[V])}else P=g;return Qa(l),g=cv(s,l,d,P,R,w),V=fv(),s!==null&&!wn?(dv(s,l,w),So(s,l,w)):(Et&&V&&Vb(l),l.flags|=1,Bn(s,l,g,w),l.child)}function OR(s,l,d,g,w){if(s===null){var R=d.type;return typeof R=="function"&&!Ub(R)&&R.defaultProps===void 0&&d.compare===null?(l.tag=15,l.type=R,$R(s,l,R,g,w)):(s=mp(d.type,null,g,l,l.mode,w),s.ref=l.ref,s.return=l,l.child=s)}if(R=s.child,!jv(s,w)){var P=R.memoizedProps;if(d=d.compare,d=d!==null?d:Pf,d(P,g)&&s.ref===l.ref)return So(s,l,w)}return l.flags|=1,s=go(R,g),s.ref=l.ref,s.return=l,l.child=s}function $R(s,l,d,g,w){if(s!==null){var R=s.memoizedProps;if(Pf(R,g)&&s.ref===l.ref)if(wn=!1,l.pendingProps=g=R,jv(s,w))(s.flags&131072)!==0&&(wn=!0);else return l.lanes=s.lanes,So(s,l,w)}return Dv(s,l,d,g,w)}function PR(s,l,d,g){var w=g.children,R=s!==null?s.memoizedState:null;if(s===null&&l.stateNode===null&&(l.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),g.mode==="hidden"){if((l.flags&128)!==0){if(R=R!==null?R.baseLanes|d:d,s!==null){for(g=l.child=s.child,w=0;g!==null;)w=w|g.lanes|g.childLanes,g=g.sibling;g=w&~R}else g=0,l.child=null;return NR(s,l,R,d,g)}if((d&536870912)!==0)l.memoizedState={baseLanes:0,cachePool:null},s!==null&&vp(l,R!==null?R.cachePool:null),R!==null?jk(l,R):sv(),Lk(l);else return g=l.lanes=536870912,NR(s,l,R!==null?R.baseLanes|d:d,d,g)}else R!==null?(vp(l,R.cachePool),jk(l,R),ws(),l.memoizedState=null):(s!==null&&vp(l,null),sv(),ws());return Bn(s,l,w,d),l.child}function Kf(s,l){return s!==null&&s.tag===22||l.stateNode!==null||(l.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),l.sibling}function NR(s,l,d,g,w){var R=ev();return R=R===null?null:{parent:vn._currentValue,pool:R},l.memoizedState={baseLanes:d,cachePool:R},s!==null&&vp(l,null),sv(),Lk(l),s!==null&&_u(s,l,g,!0),l.childLanes=w,null}function Np(s,l){return l=jp({mode:l.mode,children:l.children},s.mode),l.ref=s.ref,s.child=l,l.return=s,l}function IR(s,l,d){return tl(l,s.child,null,d),s=Np(l,l.pendingProps),s.flags|=2,Ir(l),l.memoizedState=null,s}function c5(s,l,d){var g=l.pendingProps,w=(l.flags&128)!==0;if(l.flags&=-129,s===null){if(Et){if(g.mode==="hidden")return s=Np(l,g),l.lanes=536870912,Kf(null,s);if(lv(l),(s=Qt)?(s=W_(s,ai),s=s!==null&&s.data==="&"?s:null,s!==null&&(l.memoizedState={dehydrated:s,treeContext:hs!==null?{id:Gi,overflow:Vi}:null,retryLane:536870912,hydrationErrors:null},d=vk(s),d.return=l,l.child=d,Fn=l,Qt=null)):s=null,s===null)throw ms(l);return l.lanes=536870912,null}return Np(l,g)}var R=s.memoizedState;if(R!==null){var P=R.dehydrated;if(lv(l),w)if(l.flags&256)l.flags&=-257,l=IR(s,l,d);else if(l.memoizedState!==null)l.child=s.child,l.flags|=128,l=null;else throw Error(r(558));else if(wn||_u(s,l,d,!1),w=(d&s.childLanes)!==0,wn||w){if(g=Yt,g!==null&&(P=_i(g,d),P!==0&&P!==R.retryLane))throw R.retryLane=P,Ya(s,P),br(g,s,P),Av;qp(),l=IR(s,l,d)}else s=R.treeContext,Qt=ui(P.nextSibling),Fn=l,Et=!0,ps=null,ai=!1,s!==null&&Sk(l,s),l=Np(l,g),l.flags|=4096;return l}return s=go(s.child,{mode:g.mode,children:g.children}),s.ref=l.ref,l.child=s,s.return=l,s}function Ip(s,l){var d=l.ref;if(d===null)s!==null&&s.ref!==null&&(l.flags|=4194816);else{if(typeof d!="function"&&typeof d!="object")throw Error(r(284));(s===null||s.ref!==d)&&(l.flags|=4194816)}}function Dv(s,l,d,g,w){return Qa(l),d=cv(s,l,d,g,void 0,w),g=fv(),s!==null&&!wn?(dv(s,l,w),So(s,l,w)):(Et&&g&&Vb(l),l.flags|=1,Bn(s,l,d,w),l.child)}function jR(s,l,d,g,w,R){return Qa(l),l.updateQueue=null,d=zk(l,g,d,w),Fk(s),g=fv(),s!==null&&!wn?(dv(s,l,R),So(s,l,R)):(Et&&g&&Vb(l),l.flags|=1,Bn(s,l,d,R),l.child)}function LR(s,l,d,g,w){if(Qa(l),l.stateNode===null){var R=Cu,P=d.contextType;typeof P=="object"&&P!==null&&(R=zn(P)),R=new d(g,R),l.memoizedState=R.state!==null&&R.state!==void 0?R.state:null,R.updater=_v,l.stateNode=R,R._reactInternals=l,R=l.stateNode,R.props=g,R.state=l.memoizedState,R.refs={},nv(l),P=d.contextType,R.context=typeof P=="object"&&P!==null?zn(P):Cu,R.state=l.memoizedState,P=d.getDerivedStateFromProps,typeof P=="function"&&(Rv(l,d,P,g),R.state=l.memoizedState),typeof d.getDerivedStateFromProps=="function"||typeof R.getSnapshotBeforeUpdate=="function"||typeof R.UNSAFE_componentWillMount!="function"&&typeof R.componentWillMount!="function"||(P=R.state,typeof R.componentWillMount=="function"&&R.componentWillMount(),typeof R.UNSAFE_componentWillMount=="function"&&R.UNSAFE_componentWillMount(),P!==R.state&&_v.enqueueReplaceState(R,R.state,null),Gf(l,g,R,w),Hf(),R.state=l.memoizedState),typeof R.componentDidMount=="function"&&(l.flags|=4194308),g=!0}else if(s===null){R=l.stateNode;var V=l.memoizedProps,Q=rl(d,V);R.props=Q;var de=R.context,be=d.contextType;P=Cu,typeof be=="object"&&be!==null&&(P=zn(be));var Ee=d.getDerivedStateFromProps;be=typeof Ee=="function"||typeof R.getSnapshotBeforeUpdate=="function",V=l.pendingProps!==V,be||typeof R.UNSAFE_componentWillReceiveProps!="function"&&typeof R.componentWillReceiveProps!="function"||(V||de!==P)&&ER(l,R,g,P),ys=!1;var pe=l.memoizedState;R.state=pe,Gf(l,g,R,w),Hf(),de=l.memoizedState,V||pe!==de||ys?(typeof Ee=="function"&&(Rv(l,d,Ee,g),de=l.memoizedState),(Q=ys||CR(l,d,Q,g,pe,de,P))?(be||typeof R.UNSAFE_componentWillMount!="function"&&typeof R.componentWillMount!="function"||(typeof R.componentWillMount=="function"&&R.componentWillMount(),typeof R.UNSAFE_componentWillMount=="function"&&R.UNSAFE_componentWillMount()),typeof R.componentDidMount=="function"&&(l.flags|=4194308)):(typeof R.componentDidMount=="function"&&(l.flags|=4194308),l.memoizedProps=g,l.memoizedState=de),R.props=g,R.state=de,R.context=P,g=Q):(typeof R.componentDidMount=="function"&&(l.flags|=4194308),g=!1)}else{R=l.stateNode,rv(s,l),P=l.memoizedProps,be=rl(d,P),R.props=be,Ee=l.pendingProps,pe=R.context,de=d.contextType,Q=Cu,typeof de=="object"&&de!==null&&(Q=zn(de)),V=d.getDerivedStateFromProps,(de=typeof V=="function"||typeof R.getSnapshotBeforeUpdate=="function")||typeof R.UNSAFE_componentWillReceiveProps!="function"&&typeof R.componentWillReceiveProps!="function"||(P!==Ee||pe!==Q)&&ER(l,R,g,Q),ys=!1,pe=l.memoizedState,R.state=pe,Gf(l,g,R,w),Hf();var ye=l.memoizedState;P!==Ee||pe!==ye||ys||s!==null&&s.dependencies!==null&&yp(s.dependencies)?(typeof V=="function"&&(Rv(l,d,V,g),ye=l.memoizedState),(be=ys||CR(l,d,be,g,pe,ye,Q)||s!==null&&s.dependencies!==null&&yp(s.dependencies))?(de||typeof R.UNSAFE_componentWillUpdate!="function"&&typeof R.componentWillUpdate!="function"||(typeof R.componentWillUpdate=="function"&&R.componentWillUpdate(g,ye,Q),typeof R.UNSAFE_componentWillUpdate=="function"&&R.UNSAFE_componentWillUpdate(g,ye,Q)),typeof R.componentDidUpdate=="function"&&(l.flags|=4),typeof R.getSnapshotBeforeUpdate=="function"&&(l.flags|=1024)):(typeof R.componentDidUpdate!="function"||P===s.memoizedProps&&pe===s.memoizedState||(l.flags|=4),typeof R.getSnapshotBeforeUpdate!="function"||P===s.memoizedProps&&pe===s.memoizedState||(l.flags|=1024),l.memoizedProps=g,l.memoizedState=ye),R.props=g,R.state=ye,R.context=Q,g=be):(typeof R.componentDidUpdate!="function"||P===s.memoizedProps&&pe===s.memoizedState||(l.flags|=4),typeof R.getSnapshotBeforeUpdate!="function"||P===s.memoizedProps&&pe===s.memoizedState||(l.flags|=1024),g=!1)}return R=g,Ip(s,l),g=(l.flags&128)!==0,R||g?(R=l.stateNode,d=g&&typeof d.getDerivedStateFromError!="function"?null:R.render(),l.flags|=1,s!==null&&g?(l.child=tl(l,s.child,null,w),l.child=tl(l,null,d,w)):Bn(s,l,d,w),l.memoizedState=R.state,s=l.child):s=So(s,l,w),s}function FR(s,l,d,g){return Ka(),l.flags|=256,Bn(s,l,d,g),l.child}var Mv={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Ov(s){return{baseLanes:s,cachePool:Tk()}}function $v(s,l,d){return s=s!==null?s.childLanes&~d:0,l&&(s|=Lr),s}function zR(s,l,d){var g=l.pendingProps,w=!1,R=(l.flags&128)!==0,P;if((P=R)||(P=s!==null&&s.memoizedState===null?!1:(hn.current&2)!==0),P&&(w=!0,l.flags&=-129),P=(l.flags&32)!==0,l.flags&=-33,s===null){if(Et){if(w?xs(l):ws(),(s=Qt)?(s=W_(s,ai),s=s!==null&&s.data!=="&"?s:null,s!==null&&(l.memoizedState={dehydrated:s,treeContext:hs!==null?{id:Gi,overflow:Vi}:null,retryLane:536870912,hydrationErrors:null},d=vk(s),d.return=l,l.child=d,Fn=l,Qt=null)):s=null,s===null)throw ms(l);return m0(s)?l.lanes=32:l.lanes=536870912,null}var V=g.children;return g=g.fallback,w?(ws(),w=l.mode,V=jp({mode:"hidden",children:V},w),g=Wa(g,w,d,null),V.return=l,g.return=l,V.sibling=g,l.child=V,g=l.child,g.memoizedState=Ov(d),g.childLanes=$v(s,P,d),l.memoizedState=Mv,Kf(null,g)):(xs(l),Pv(l,V))}var Q=s.memoizedState;if(Q!==null&&(V=Q.dehydrated,V!==null)){if(R)l.flags&256?(xs(l),l.flags&=-257,l=Nv(s,l,d)):l.memoizedState!==null?(ws(),l.child=s.child,l.flags|=128,l=null):(ws(),V=g.fallback,w=l.mode,g=jp({mode:"visible",children:g.children},w),V=Wa(V,w,d,null),V.flags|=2,g.return=l,V.return=l,g.sibling=V,l.child=g,tl(l,s.child,null,d),g=l.child,g.memoizedState=Ov(d),g.childLanes=$v(s,P,d),l.memoizedState=Mv,l=Kf(null,g));else if(xs(l),m0(V)){if(P=V.nextSibling&&V.nextSibling.dataset,P)var de=P.dgst;P=de,g=Error(r(419)),g.stack="",g.digest=P,jf({value:g,source:null,stack:null}),l=Nv(s,l,d)}else if(wn||_u(s,l,d,!1),P=(d&s.childLanes)!==0,wn||P){if(P=Yt,P!==null&&(g=_i(P,d),g!==0&&g!==Q.retryLane))throw Q.retryLane=g,Ya(s,g),br(P,s,g),Av;p0(V)||qp(),l=Nv(s,l,d)}else p0(V)?(l.flags|=192,l.child=s.child,l=null):(s=Q.treeContext,Qt=ui(V.nextSibling),Fn=l,Et=!0,ps=null,ai=!1,s!==null&&Sk(l,s),l=Pv(l,g.children),l.flags|=4096);return l}return w?(ws(),V=g.fallback,w=l.mode,Q=s.child,de=Q.sibling,g=go(Q,{mode:"hidden",children:g.children}),g.subtreeFlags=Q.subtreeFlags&65011712,de!==null?V=go(de,V):(V=Wa(V,w,d,null),V.flags|=2),V.return=l,g.return=l,g.sibling=V,l.child=g,Kf(null,g),g=l.child,V=s.child.memoizedState,V===null?V=Ov(d):(w=V.cachePool,w!==null?(Q=vn._currentValue,w=w.parent!==Q?{parent:Q,pool:Q}:w):w=Tk(),V={baseLanes:V.baseLanes|d,cachePool:w}),g.memoizedState=V,g.childLanes=$v(s,P,d),l.memoizedState=Mv,Kf(s.child,g)):(xs(l),d=s.child,s=d.sibling,d=go(d,{mode:"visible",children:g.children}),d.return=l,d.sibling=null,s!==null&&(P=l.deletions,P===null?(l.deletions=[s],l.flags|=16):P.push(s)),l.child=d,l.memoizedState=null,d)}function Pv(s,l){return l=jp({mode:"visible",children:l},s.mode),l.return=s,s.child=l}function jp(s,l){return s=Pr(22,s,null,l),s.lanes=0,s}function Nv(s,l,d){return tl(l,s.child,null,d),s=Pv(l,l.pendingProps.children),s.flags|=2,l.memoizedState=null,s}function BR(s,l,d){s.lanes|=l;var g=s.alternate;g!==null&&(g.lanes|=l),Xb(s.return,l,d)}function Iv(s,l,d,g,w,R){var P=s.memoizedState;P===null?s.memoizedState={isBackwards:l,rendering:null,renderingStartTime:0,last:g,tail:d,tailMode:w,treeForkCount:R}:(P.isBackwards=l,P.rendering=null,P.renderingStartTime=0,P.last=g,P.tail=d,P.tailMode=w,P.treeForkCount=R)}function UR(s,l,d){var g=l.pendingProps,w=g.revealOrder,R=g.tail;g=g.children;var P=hn.current,V=(P&2)!==0;if(V?(P=P&1|2,l.flags|=128):P&=1,H(hn,P),Bn(s,l,g,d),g=Et?If:0,!V&&s!==null&&(s.flags&128)!==0)e:for(s=l.child;s!==null;){if(s.tag===13)s.memoizedState!==null&&BR(s,d,l);else if(s.tag===19)BR(s,d,l);else if(s.child!==null){s.child.return=s,s=s.child;continue}if(s===l)break e;for(;s.sibling===null;){if(s.return===null||s.return===l)break e;s=s.return}s.sibling.return=s.return,s=s.sibling}switch(w){case"forwards":for(d=l.child,w=null;d!==null;)s=d.alternate,s!==null&&kp(s)===null&&(w=d),d=d.sibling;d=w,d===null?(w=l.child,l.child=null):(w=d.sibling,d.sibling=null),Iv(l,!1,w,d,R,g);break;case"backwards":case"unstable_legacy-backwards":for(d=null,w=l.child,l.child=null;w!==null;){if(s=w.alternate,s!==null&&kp(s)===null){l.child=w;break}s=w.sibling,w.sibling=d,d=w,w=s}Iv(l,!0,d,null,R,g);break;case"together":Iv(l,!1,null,null,void 0,g);break;default:l.memoizedState=null}return l.child}function So(s,l,d){if(s!==null&&(l.dependencies=s.dependencies),Es|=l.lanes,(d&l.childLanes)===0)if(s!==null){if(_u(s,l,d,!1),(d&l.childLanes)===0)return null}else return null;if(s!==null&&l.child!==s.child)throw Error(r(153));if(l.child!==null){for(s=l.child,d=go(s,s.pendingProps),l.child=d,d.return=l;s.sibling!==null;)s=s.sibling,d=d.sibling=go(s,s.pendingProps),d.return=l;d.sibling=null}return l.child}function jv(s,l){return(s.lanes&l)!==0?!0:(s=s.dependencies,!!(s!==null&&yp(s)))}function f5(s,l,d){switch(l.tag){case 3:Re(l,l.stateNode.containerInfo),gs(l,vn,s.memoizedState.cache),Ka();break;case 27:case 5:je(l);break;case 4:Re(l,l.stateNode.containerInfo);break;case 10:gs(l,l.type,l.memoizedProps.value);break;case 31:if(l.memoizedState!==null)return l.flags|=128,lv(l),null;break;case 13:var g=l.memoizedState;if(g!==null)return g.dehydrated!==null?(xs(l),l.flags|=128,null):(d&l.child.childLanes)!==0?zR(s,l,d):(xs(l),s=So(s,l,d),s!==null?s.sibling:null);xs(l);break;case 19:var w=(s.flags&128)!==0;if(g=(d&l.childLanes)!==0,g||(_u(s,l,d,!1),g=(d&l.childLanes)!==0),w){if(g)return UR(s,l,d);l.flags|=128}if(w=l.memoizedState,w!==null&&(w.rendering=null,w.tail=null,w.lastEffect=null),H(hn,hn.current),g)break;return null;case 22:return l.lanes=0,PR(s,l,d,l.pendingProps);case 24:gs(l,vn,s.memoizedState.cache)}return So(s,l,d)}function HR(s,l,d){if(s!==null)if(s.memoizedProps!==l.pendingProps)wn=!0;else{if(!jv(s,d)&&(l.flags&128)===0)return wn=!1,f5(s,l,d);wn=(s.flags&131072)!==0}else wn=!1,Et&&(l.flags&1048576)!==0&&wk(l,If,l.index);switch(l.lanes=0,l.tag){case 16:e:{var g=l.pendingProps;if(s=Ja(l.elementType),l.type=s,typeof s=="function")Ub(s)?(g=rl(s,g),l.tag=1,l=LR(null,l,s,g,d)):(l.tag=0,l=Dv(null,l,s,g,d));else{if(s!=null){var w=s.$$typeof;if(w===T){l.tag=11,l=MR(null,l,s,g,d);break e}else if(w===O){l.tag=14,l=OR(null,l,s,g,d);break e}}throw l=G(s)||s,Error(r(306,l,""))}}return l;case 0:return Dv(s,l,l.type,l.pendingProps,d);case 1:return g=l.type,w=rl(g,l.pendingProps),LR(s,l,g,w,d);case 3:e:{if(Re(l,l.stateNode.containerInfo),s===null)throw Error(r(387));g=l.pendingProps;var R=l.memoizedState;w=R.element,rv(s,l),Gf(l,g,null,d);var P=l.memoizedState;if(g=P.cache,gs(l,vn,g),g!==R.cache&&Qb(l,[vn],d,!0),Hf(),g=P.element,R.isDehydrated)if(R={element:g,isDehydrated:!1,cache:P.cache},l.updateQueue.baseState=R,l.memoizedState=R,l.flags&256){l=FR(s,l,g,d);break e}else if(g!==w){w=ii(Error(r(424)),l),jf(w),l=FR(s,l,g,d);break e}else{switch(s=l.stateNode.containerInfo,s.nodeType){case 9:s=s.body;break;default:s=s.nodeName==="HTML"?s.ownerDocument.body:s}for(Qt=ui(s.firstChild),Fn=l,Et=!0,ps=null,ai=!0,d=Pk(l,null,g,d),l.child=d;d;)d.flags=d.flags&-3|4096,d=d.sibling}else{if(Ka(),g===w){l=So(s,l,d);break e}Bn(s,l,g,d)}l=l.child}return l;case 26:return Ip(s,l),s===null?(d=eT(l.type,null,l.pendingProps,null))?l.memoizedState=d:Et||(d=l.type,s=l.pendingProps,g=Jp(he.current).createElement(d),g[on]=l,g[Ln]=s,Un(g,d,s),On(g),l.stateNode=g):l.memoizedState=eT(l.type,s.memoizedProps,l.pendingProps,s.memoizedState),null;case 27:return je(l),s===null&&Et&&(g=l.stateNode=Q_(l.type,l.pendingProps,he.current),Fn=l,ai=!0,w=Qt,As(l.type)?(g0=w,Qt=ui(g.firstChild)):Qt=w),Bn(s,l,l.pendingProps.children,d),Ip(s,l),s===null&&(l.flags|=4194304),l.child;case 5:return s===null&&Et&&((w=g=Qt)&&(g=B5(g,l.type,l.pendingProps,ai),g!==null?(l.stateNode=g,Fn=l,Qt=ui(g.firstChild),ai=!1,w=!0):w=!1),w||ms(l)),je(l),w=l.type,R=l.pendingProps,P=s!==null?s.memoizedProps:null,g=R.children,f0(w,R)?g=null:P!==null&&f0(w,P)&&(l.flags|=32),l.memoizedState!==null&&(w=cv(s,l,n5,null,null,d),cd._currentValue=w),Ip(s,l),Bn(s,l,g,d),l.child;case 6:return s===null&&Et&&((s=d=Qt)&&(d=U5(d,l.pendingProps,ai),d!==null?(l.stateNode=d,Fn=l,Qt=null,s=!0):s=!1),s||ms(l)),null;case 13:return zR(s,l,d);case 4:return Re(l,l.stateNode.containerInfo),g=l.pendingProps,s===null?l.child=tl(l,null,g,d):Bn(s,l,g,d),l.child;case 11:return MR(s,l,l.type,l.pendingProps,d);case 7:return Bn(s,l,l.pendingProps,d),l.child;case 8:return Bn(s,l,l.pendingProps.children,d),l.child;case 12:return Bn(s,l,l.pendingProps.children,d),l.child;case 10:return g=l.pendingProps,gs(l,l.type,g.value),Bn(s,l,g.children,d),l.child;case 9:return w=l.type._context,g=l.pendingProps.children,Qa(l),w=zn(w),g=g(w),l.flags|=1,Bn(s,l,g,d),l.child;case 14:return OR(s,l,l.type,l.pendingProps,d);case 15:return $R(s,l,l.type,l.pendingProps,d);case 19:return UR(s,l,d);case 31:return c5(s,l,d);case 22:return PR(s,l,d,l.pendingProps);case 24:return Qa(l),g=zn(vn),s===null?(w=ev(),w===null&&(w=Yt,R=Zb(),w.pooledCache=R,R.refCount++,R!==null&&(w.pooledCacheLanes|=d),w=R),l.memoizedState={parent:g,cache:w},nv(l),gs(l,vn,w)):((s.lanes&d)!==0&&(rv(s,l),Gf(l,null,null,d),Hf()),w=s.memoizedState,R=l.memoizedState,w.parent!==g?(w={parent:g,cache:g},l.memoizedState=w,l.lanes===0&&(l.memoizedState=l.updateQueue.baseState=w),gs(l,vn,g)):(g=R.cache,gs(l,vn,g),g!==w.cache&&Qb(l,[vn],d,!0))),Bn(s,l,l.pendingProps.children,d),l.child;case 29:throw l.pendingProps}throw Error(r(156,l.tag))}function Co(s){s.flags|=4}function Lv(s,l,d,g,w){if((l=(s.mode&32)!==0)&&(l=!1),l){if(s.flags|=16777216,(w&335544128)===w)if(s.stateNode.complete)s.flags|=8192;else if(g_())s.flags|=8192;else throw el=wp,tv}else s.flags&=-16777217}function GR(s,l){if(l.type!=="stylesheet"||(l.state.loading&4)!==0)s.flags&=-16777217;else if(s.flags|=16777216,!oT(l))if(g_())s.flags|=8192;else throw el=wp,tv}function Lp(s,l){l!==null&&(s.flags|=4),s.flags&16384&&(l=s.tag!==22?ki():536870912,s.lanes|=l,Fu|=l)}function Xf(s,l){if(!Et)switch(s.tailMode){case"hidden":l=s.tail;for(var d=null;l!==null;)l.alternate!==null&&(d=l),l=l.sibling;d===null?s.tail=null:d.sibling=null;break;case"collapsed":d=s.tail;for(var g=null;d!==null;)d.alternate!==null&&(g=d),d=d.sibling;g===null?l||s.tail===null?s.tail=null:s.tail.sibling=null:g.sibling=null}}function Zt(s){var l=s.alternate!==null&&s.alternate.child===s.child,d=0,g=0;if(l)for(var w=s.child;w!==null;)d|=w.lanes|w.childLanes,g|=w.subtreeFlags&65011712,g|=w.flags&65011712,w.return=s,w=w.sibling;else for(w=s.child;w!==null;)d|=w.lanes|w.childLanes,g|=w.subtreeFlags,g|=w.flags,w.return=s,w=w.sibling;return s.subtreeFlags|=g,s.childLanes=d,l}function d5(s,l,d){var g=l.pendingProps;switch(qb(l),l.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Zt(l),null;case 1:return Zt(l),null;case 3:return d=l.stateNode,g=null,s!==null&&(g=s.memoizedState.cache),l.memoizedState.cache!==g&&(l.flags|=2048),vo(vn),ce(),d.pendingContext&&(d.context=d.pendingContext,d.pendingContext=null),(s===null||s.child===null)&&(Ru(l)?Co(l):s===null||s.memoizedState.isDehydrated&&(l.flags&256)===0||(l.flags|=1024,Wb())),Zt(l),null;case 26:var w=l.type,R=l.memoizedState;return s===null?(Co(l),R!==null?(Zt(l),GR(l,R)):(Zt(l),Lv(l,w,null,g,d))):R?R!==s.memoizedState?(Co(l),Zt(l),GR(l,R)):(Zt(l),l.flags&=-16777217):(s=s.memoizedProps,s!==g&&Co(l),Zt(l),Lv(l,w,s,g,d)),null;case 27:if(We(l),d=he.current,w=l.type,s!==null&&l.stateNode!=null)s.memoizedProps!==g&&Co(l);else{if(!g){if(l.stateNode===null)throw Error(r(166));return Zt(l),null}s=ie.current,Ru(l)?Ck(l):(s=Q_(w,g,d),l.stateNode=s,Co(l))}return Zt(l),null;case 5:if(We(l),w=l.type,s!==null&&l.stateNode!=null)s.memoizedProps!==g&&Co(l);else{if(!g){if(l.stateNode===null)throw Error(r(166));return Zt(l),null}if(R=ie.current,Ru(l))Ck(l);else{var P=Jp(he.current);switch(R){case 1:R=P.createElementNS("http://www.w3.org/2000/svg",w);break;case 2:R=P.createElementNS("http://www.w3.org/1998/Math/MathML",w);break;default:switch(w){case"svg":R=P.createElementNS("http://www.w3.org/2000/svg",w);break;case"math":R=P.createElementNS("http://www.w3.org/1998/Math/MathML",w);break;case"script":R=P.createElement("div"),R.innerHTML="<script><\/script>",R=R.removeChild(R.firstChild);break;case"select":R=typeof g.is=="string"?P.createElement("select",{is:g.is}):P.createElement("select"),g.multiple?R.multiple=!0:g.size&&(R.size=g.size);break;default:R=typeof g.is=="string"?P.createElement(w,{is:g.is}):P.createElement(w)}}R[on]=l,R[Ln]=g;e:for(P=l.child;P!==null;){if(P.tag===5||P.tag===6)R.appendChild(P.stateNode);else if(P.tag!==4&&P.tag!==27&&P.child!==null){P.child.return=P,P=P.child;continue}if(P===l)break e;for(;P.sibling===null;){if(P.return===null||P.return===l)break e;P=P.return}P.sibling.return=P.return,P=P.sibling}l.stateNode=R;e:switch(Un(R,w,g),w){case"button":case"input":case"select":case"textarea":g=!!g.autoFocus;break e;case"img":g=!0;break e;default:g=!1}g&&Co(l)}}return Zt(l),Lv(l,l.type,s===null?null:s.memoizedProps,l.pendingProps,d),null;case 6:if(s&&l.stateNode!=null)s.memoizedProps!==g&&Co(l);else{if(typeof g!="string"&&l.stateNode===null)throw Error(r(166));if(s=he.current,Ru(l)){if(s=l.stateNode,d=l.memoizedProps,g=null,w=Fn,w!==null)switch(w.tag){case 27:case 5:g=w.memoizedProps}s[on]=l,s=!!(s.nodeValue===d||g!==null&&g.suppressHydrationWarning===!0||z_(s.nodeValue,d)),s||ms(l,!0)}else s=Jp(s).createTextNode(g),s[on]=l,l.stateNode=s}return Zt(l),null;case 31:if(d=l.memoizedState,s===null||s.memoizedState!==null){if(g=Ru(l),d!==null){if(s===null){if(!g)throw Error(r(318));if(s=l.memoizedState,s=s!==null?s.dehydrated:null,!s)throw Error(r(557));s[on]=l}else Ka(),(l.flags&128)===0&&(l.memoizedState=null),l.flags|=4;Zt(l),s=!1}else d=Wb(),s!==null&&s.memoizedState!==null&&(s.memoizedState.hydrationErrors=d),s=!0;if(!s)return l.flags&256?(Ir(l),l):(Ir(l),null);if((l.flags&128)!==0)throw Error(r(558))}return Zt(l),null;case 13:if(g=l.memoizedState,s===null||s.memoizedState!==null&&s.memoizedState.dehydrated!==null){if(w=Ru(l),g!==null&&g.dehydrated!==null){if(s===null){if(!w)throw Error(r(318));if(w=l.memoizedState,w=w!==null?w.dehydrated:null,!w)throw Error(r(317));w[on]=l}else Ka(),(l.flags&128)===0&&(l.memoizedState=null),l.flags|=4;Zt(l),w=!1}else w=Wb(),s!==null&&s.memoizedState!==null&&(s.memoizedState.hydrationErrors=w),w=!0;if(!w)return l.flags&256?(Ir(l),l):(Ir(l),null)}return Ir(l),(l.flags&128)!==0?(l.lanes=d,l):(d=g!==null,s=s!==null&&s.memoizedState!==null,d&&(g=l.child,w=null,g.alternate!==null&&g.alternate.memoizedState!==null&&g.alternate.memoizedState.cachePool!==null&&(w=g.alternate.memoizedState.cachePool.pool),R=null,g.memoizedState!==null&&g.memoizedState.cachePool!==null&&(R=g.memoizedState.cachePool.pool),R!==w&&(g.flags|=2048)),d!==s&&d&&(l.child.flags|=8192),Lp(l,l.updateQueue),Zt(l),null);case 4:return ce(),s===null&&s0(l.stateNode.containerInfo),Zt(l),null;case 10:return vo(l.type),Zt(l),null;case 19:if(J(hn),g=l.memoizedState,g===null)return Zt(l),null;if(w=(l.flags&128)!==0,R=g.rendering,R===null)if(w)Xf(g,!1);else{if(an!==0||s!==null&&(s.flags&128)!==0)for(s=l.child;s!==null;){if(R=kp(s),R!==null){for(l.flags|=128,Xf(g,!1),s=R.updateQueue,l.updateQueue=s,Lp(l,s),l.subtreeFlags=0,s=d,d=l.child;d!==null;)bk(d,s),d=d.sibling;return H(hn,hn.current&1|2),Et&&yo(l,g.treeForkCount),l.child}s=s.sibling}g.tail!==null&&_e()>Hp&&(l.flags|=128,w=!0,Xf(g,!1),l.lanes=4194304)}else{if(!w)if(s=kp(R),s!==null){if(l.flags|=128,w=!0,s=s.updateQueue,l.updateQueue=s,Lp(l,s),Xf(g,!0),g.tail===null&&g.tailMode==="hidden"&&!R.alternate&&!Et)return Zt(l),null}else 2*_e()-g.renderingStartTime>Hp&&d!==536870912&&(l.flags|=128,w=!0,Xf(g,!1),l.lanes=4194304);g.isBackwards?(R.sibling=l.child,l.child=R):(s=g.last,s!==null?s.sibling=R:l.child=R,g.last=R)}return g.tail!==null?(s=g.tail,g.rendering=s,g.tail=s.sibling,g.renderingStartTime=_e(),s.sibling=null,d=hn.current,H(hn,w?d&1|2:d&1),Et&&yo(l,g.treeForkCount),s):(Zt(l),null);case 22:case 23:return Ir(l),av(),g=l.memoizedState!==null,s!==null?s.memoizedState!==null!==g&&(l.flags|=8192):g&&(l.flags|=8192),g?(d&536870912)!==0&&(l.flags&128)===0&&(Zt(l),l.subtreeFlags&6&&(l.flags|=8192)):Zt(l),d=l.updateQueue,d!==null&&Lp(l,d.retryQueue),d=null,s!==null&&s.memoizedState!==null&&s.memoizedState.cachePool!==null&&(d=s.memoizedState.cachePool.pool),g=null,l.memoizedState!==null&&l.memoizedState.cachePool!==null&&(g=l.memoizedState.cachePool.pool),g!==d&&(l.flags|=2048),s!==null&&J(Za),null;case 24:return d=null,s!==null&&(d=s.memoizedState.cache),l.memoizedState.cache!==d&&(l.flags|=2048),vo(vn),Zt(l),null;case 25:return null;case 30:return null}throw Error(r(156,l.tag))}function h5(s,l){switch(qb(l),l.tag){case 1:return s=l.flags,s&65536?(l.flags=s&-65537|128,l):null;case 3:return vo(vn),ce(),s=l.flags,(s&65536)!==0&&(s&128)===0?(l.flags=s&-65537|128,l):null;case 26:case 27:case 5:return We(l),null;case 31:if(l.memoizedState!==null){if(Ir(l),l.alternate===null)throw Error(r(340));Ka()}return s=l.flags,s&65536?(l.flags=s&-65537|128,l):null;case 13:if(Ir(l),s=l.memoizedState,s!==null&&s.dehydrated!==null){if(l.alternate===null)throw Error(r(340));Ka()}return s=l.flags,s&65536?(l.flags=s&-65537|128,l):null;case 19:return J(hn),null;case 4:return ce(),null;case 10:return vo(l.type),null;case 22:case 23:return Ir(l),av(),s!==null&&J(Za),s=l.flags,s&65536?(l.flags=s&-65537|128,l):null;case 24:return vo(vn),null;case 25:return null;default:return null}}function VR(s,l){switch(qb(l),l.tag){case 3:vo(vn),ce();break;case 26:case 27:case 5:We(l);break;case 4:ce();break;case 31:l.memoizedState!==null&&Ir(l);break;case 13:Ir(l);break;case 19:J(hn);break;case 10:vo(l.type);break;case 22:case 23:Ir(l),av(),s!==null&&J(Za);break;case 24:vo(vn)}}function Qf(s,l){try{var d=l.updateQueue,g=d!==null?d.lastEffect:null;if(g!==null){var w=g.next;d=w;do{if((d.tag&s)===s){g=void 0;var R=d.create,P=d.inst;g=R(),P.destroy=g}d=d.next}while(d!==w)}}catch(V){Ft(l,l.return,V)}}function Ss(s,l,d){try{var g=l.updateQueue,w=g!==null?g.lastEffect:null;if(w!==null){var R=w.next;g=R;do{if((g.tag&s)===s){var P=g.inst,V=P.destroy;if(V!==void 0){P.destroy=void 0,w=l;var Q=d,de=V;try{de()}catch(be){Ft(w,Q,be)}}}g=g.next}while(g!==R)}}catch(be){Ft(l,l.return,be)}}function qR(s){var l=s.updateQueue;if(l!==null){var d=s.stateNode;try{Ik(l,d)}catch(g){Ft(s,s.return,g)}}}function YR(s,l,d){d.props=rl(s.type,s.memoizedProps),d.state=s.memoizedState;try{d.componentWillUnmount()}catch(g){Ft(s,l,g)}}function Zf(s,l){try{var d=s.ref;if(d!==null){switch(s.tag){case 26:case 27:case 5:var g=s.stateNode;break;case 30:g=s.stateNode;break;default:g=s.stateNode}typeof d=="function"?s.refCleanup=d(g):d.current=g}}catch(w){Ft(s,l,w)}}function qi(s,l){var d=s.ref,g=s.refCleanup;if(d!==null)if(typeof g=="function")try{g()}catch(w){Ft(s,l,w)}finally{s.refCleanup=null,s=s.alternate,s!=null&&(s.refCleanup=null)}else if(typeof d=="function")try{d(null)}catch(w){Ft(s,l,w)}else d.current=null}function WR(s){var l=s.type,d=s.memoizedProps,g=s.stateNode;try{e:switch(l){case"button":case"input":case"select":case"textarea":d.autoFocus&&g.focus();break e;case"img":d.src?g.src=d.src:d.srcSet&&(g.srcset=d.srcSet)}}catch(w){Ft(s,s.return,w)}}function Fv(s,l,d){try{var g=s.stateNode;N5(g,s.type,d,l),g[Ln]=l}catch(w){Ft(s,s.return,w)}}function KR(s){return s.tag===5||s.tag===3||s.tag===26||s.tag===27&&As(s.type)||s.tag===4}function zv(s){e:for(;;){for(;s.sibling===null;){if(s.return===null||KR(s.return))return null;s=s.return}for(s.sibling.return=s.return,s=s.sibling;s.tag!==5&&s.tag!==6&&s.tag!==18;){if(s.tag===27&&As(s.type)||s.flags&2||s.child===null||s.tag===4)continue e;s.child.return=s,s=s.child}if(!(s.flags&2))return s.stateNode}}function Bv(s,l,d){var g=s.tag;if(g===5||g===6)s=s.stateNode,l?(d.nodeType===9?d.body:d.nodeName==="HTML"?d.ownerDocument.body:d).insertBefore(s,l):(l=d.nodeType===9?d.body:d.nodeName==="HTML"?d.ownerDocument.body:d,l.appendChild(s),d=d._reactRootContainer,d!=null||l.onclick!==null||(l.onclick=po));else if(g!==4&&(g===27&&As(s.type)&&(d=s.stateNode,l=null),s=s.child,s!==null))for(Bv(s,l,d),s=s.sibling;s!==null;)Bv(s,l,d),s=s.sibling}function Fp(s,l,d){var g=s.tag;if(g===5||g===6)s=s.stateNode,l?d.insertBefore(s,l):d.appendChild(s);else if(g!==4&&(g===27&&As(s.type)&&(d=s.stateNode),s=s.child,s!==null))for(Fp(s,l,d),s=s.sibling;s!==null;)Fp(s,l,d),s=s.sibling}function XR(s){var l=s.stateNode,d=s.memoizedProps;try{for(var g=s.type,w=l.attributes;w.length;)l.removeAttributeNode(w[0]);Un(l,g,d),l[on]=s,l[Ln]=d}catch(R){Ft(s,s.return,R)}}var Eo=!1,Sn=!1,Uv=!1,QR=typeof WeakSet=="function"?WeakSet:Set,$n=null;function p5(s,l){if(s=s.containerInfo,u0=sm,s=uk(s),Nb(s)){if("selectionStart"in s)var d={start:s.selectionStart,end:s.selectionEnd};else e:{d=(d=s.ownerDocument)&&d.defaultView||window;var g=d.getSelection&&d.getSelection();if(g&&g.rangeCount!==0){d=g.anchorNode;var w=g.anchorOffset,R=g.focusNode;g=g.focusOffset;try{d.nodeType,R.nodeType}catch{d=null;break e}var P=0,V=-1,Q=-1,de=0,be=0,Ee=s,pe=null;t:for(;;){for(var ye;Ee!==d||w!==0&&Ee.nodeType!==3||(V=P+w),Ee!==R||g!==0&&Ee.nodeType!==3||(Q=P+g),Ee.nodeType===3&&(P+=Ee.nodeValue.length),(ye=Ee.firstChild)!==null;)pe=Ee,Ee=ye;for(;;){if(Ee===s)break t;if(pe===d&&++de===w&&(V=P),pe===R&&++be===g&&(Q=P),(ye=Ee.nextSibling)!==null)break;Ee=pe,pe=Ee.parentNode}Ee=ye}d=V===-1||Q===-1?null:{start:V,end:Q}}else d=null}d=d||{start:0,end:0}}else d=null;for(c0={focusedElem:s,selectionRange:d},sm=!1,$n=l;$n!==null;)if(l=$n,s=l.child,(l.subtreeFlags&1028)!==0&&s!==null)s.return=l,$n=s;else for(;$n!==null;){switch(l=$n,R=l.alternate,s=l.flags,l.tag){case 0:if((s&4)!==0&&(s=l.updateQueue,s=s!==null?s.events:null,s!==null))for(d=0;d<s.length;d++)w=s[d],w.ref.impl=w.nextImpl;break;case 11:case 15:break;case 1:if((s&1024)!==0&&R!==null){s=void 0,d=l,w=R.memoizedProps,R=R.memoizedState,g=d.stateNode;try{var Be=rl(d.type,w);s=g.getSnapshotBeforeUpdate(Be,R),g.__reactInternalSnapshotBeforeUpdate=s}catch(et){Ft(d,d.return,et)}}break;case 3:if((s&1024)!==0){if(s=l.stateNode.containerInfo,d=s.nodeType,d===9)h0(s);else if(d===1)switch(s.nodeName){case"HEAD":case"HTML":case"BODY":h0(s);break;default:s.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((s&1024)!==0)throw Error(r(163))}if(s=l.sibling,s!==null){s.return=l.return,$n=s;break}$n=l.return}}function ZR(s,l,d){var g=d.flags;switch(d.tag){case 0:case 11:case 15:Ro(s,d),g&4&&Qf(5,d);break;case 1:if(Ro(s,d),g&4)if(s=d.stateNode,l===null)try{s.componentDidMount()}catch(P){Ft(d,d.return,P)}else{var w=rl(d.type,l.memoizedProps);l=l.memoizedState;try{s.componentDidUpdate(w,l,s.__reactInternalSnapshotBeforeUpdate)}catch(P){Ft(d,d.return,P)}}g&64&&qR(d),g&512&&Zf(d,d.return);break;case 3:if(Ro(s,d),g&64&&(s=d.updateQueue,s!==null)){if(l=null,d.child!==null)switch(d.child.tag){case 27:case 5:l=d.child.stateNode;break;case 1:l=d.child.stateNode}try{Ik(s,l)}catch(P){Ft(d,d.return,P)}}break;case 27:l===null&&g&4&&XR(d);case 26:case 5:Ro(s,d),l===null&&g&4&&WR(d),g&512&&Zf(d,d.return);break;case 12:Ro(s,d);break;case 31:Ro(s,d),g&4&&t_(s,d);break;case 13:Ro(s,d),g&4&&n_(s,d),g&64&&(s=d.memoizedState,s!==null&&(s=s.dehydrated,s!==null&&(d=C5.bind(null,d),H5(s,d))));break;case 22:if(g=d.memoizedState!==null||Eo,!g){l=l!==null&&l.memoizedState!==null||Sn,w=Eo;var R=Sn;Eo=g,(Sn=l)&&!R?_o(s,d,(d.subtreeFlags&8772)!==0):Ro(s,d),Eo=w,Sn=R}break;case 30:break;default:Ro(s,d)}}function JR(s){var l=s.alternate;l!==null&&(s.alternate=null,JR(l)),s.child=null,s.deletions=null,s.sibling=null,s.tag===5&&(l=s.stateNode,l!==null&&bb(l)),s.stateNode=null,s.return=null,s.dependencies=null,s.memoizedProps=null,s.memoizedState=null,s.pendingProps=null,s.stateNode=null,s.updateQueue=null}var nn=null,pr=!1;function ko(s,l,d){for(d=d.child;d!==null;)e_(s,l,d),d=d.sibling}function e_(s,l,d){if(Me&&typeof Me.onCommitFiberUnmount=="function")try{Me.onCommitFiberUnmount(Ot,d)}catch{}switch(d.tag){case 26:Sn||qi(d,l),ko(s,l,d),d.memoizedState?d.memoizedState.count--:d.stateNode&&(d=d.stateNode,d.parentNode.removeChild(d));break;case 27:Sn||qi(d,l);var g=nn,w=pr;As(d.type)&&(nn=d.stateNode,pr=!1),ko(s,l,d),ad(d.stateNode),nn=g,pr=w;break;case 5:Sn||qi(d,l);case 6:if(g=nn,w=pr,nn=null,ko(s,l,d),nn=g,pr=w,nn!==null)if(pr)try{(nn.nodeType===9?nn.body:nn.nodeName==="HTML"?nn.ownerDocument.body:nn).removeChild(d.stateNode)}catch(R){Ft(d,l,R)}else try{nn.removeChild(d.stateNode)}catch(R){Ft(d,l,R)}break;case 18:nn!==null&&(pr?(s=nn,q_(s.nodeType===9?s.body:s.nodeName==="HTML"?s.ownerDocument.body:s,d.stateNode),Yu(s)):q_(nn,d.stateNode));break;case 4:g=nn,w=pr,nn=d.stateNode.containerInfo,pr=!0,ko(s,l,d),nn=g,pr=w;break;case 0:case 11:case 14:case 15:Ss(2,d,l),Sn||Ss(4,d,l),ko(s,l,d);break;case 1:Sn||(qi(d,l),g=d.stateNode,typeof g.componentWillUnmount=="function"&&YR(d,l,g)),ko(s,l,d);break;case 21:ko(s,l,d);break;case 22:Sn=(g=Sn)||d.memoizedState!==null,ko(s,l,d),Sn=g;break;default:ko(s,l,d)}}function t_(s,l){if(l.memoizedState===null&&(s=l.alternate,s!==null&&(s=s.memoizedState,s!==null))){s=s.dehydrated;try{Yu(s)}catch(d){Ft(l,l.return,d)}}}function n_(s,l){if(l.memoizedState===null&&(s=l.alternate,s!==null&&(s=s.memoizedState,s!==null&&(s=s.dehydrated,s!==null))))try{Yu(s)}catch(d){Ft(l,l.return,d)}}function m5(s){switch(s.tag){case 31:case 13:case 19:var l=s.stateNode;return l===null&&(l=s.stateNode=new QR),l;case 22:return s=s.stateNode,l=s._retryCache,l===null&&(l=s._retryCache=new QR),l;default:throw Error(r(435,s.tag))}}function zp(s,l){var d=m5(s);l.forEach(function(g){if(!d.has(g)){d.add(g);var w=E5.bind(null,s,g);g.then(w,w)}})}function mr(s,l){var d=l.deletions;if(d!==null)for(var g=0;g<d.length;g++){var w=d[g],R=s,P=l,V=P;e:for(;V!==null;){switch(V.tag){case 27:if(As(V.type)){nn=V.stateNode,pr=!1;break e}break;case 5:nn=V.stateNode,pr=!1;break e;case 3:case 4:nn=V.stateNode.containerInfo,pr=!0;break e}V=V.return}if(nn===null)throw Error(r(160));e_(R,P,w),nn=null,pr=!1,R=w.alternate,R!==null&&(R.return=null),w.return=null}if(l.subtreeFlags&13886)for(l=l.child;l!==null;)r_(l,s),l=l.sibling}var Ai=null;function r_(s,l){var d=s.alternate,g=s.flags;switch(s.tag){case 0:case 11:case 14:case 15:mr(l,s),gr(s),g&4&&(Ss(3,s,s.return),Qf(3,s),Ss(5,s,s.return));break;case 1:mr(l,s),gr(s),g&512&&(Sn||d===null||qi(d,d.return)),g&64&&Eo&&(s=s.updateQueue,s!==null&&(g=s.callbacks,g!==null&&(d=s.shared.hiddenCallbacks,s.shared.hiddenCallbacks=d===null?g:d.concat(g))));break;case 26:var w=Ai;if(mr(l,s),gr(s),g&512&&(Sn||d===null||qi(d,d.return)),g&4){var R=d!==null?d.memoizedState:null;if(g=s.memoizedState,d===null)if(g===null)if(s.stateNode===null){e:{g=s.type,d=s.memoizedProps,w=w.ownerDocument||w;t:switch(g){case"title":R=w.getElementsByTagName("title")[0],(!R||R[kf]||R[on]||R.namespaceURI==="http://www.w3.org/2000/svg"||R.hasAttribute("itemprop"))&&(R=w.createElement(g),w.head.insertBefore(R,w.querySelector("head > title"))),Un(R,g,d),R[on]=s,On(R),g=R;break e;case"link":var P=rT("link","href",w).get(g+(d.href||""));if(P){for(var V=0;V<P.length;V++)if(R=P[V],R.getAttribute("href")===(d.href==null||d.href===""?null:d.href)&&R.getAttribute("rel")===(d.rel==null?null:d.rel)&&R.getAttribute("title")===(d.title==null?null:d.title)&&R.getAttribute("crossorigin")===(d.crossOrigin==null?null:d.crossOrigin)){P.splice(V,1);break t}}R=w.createElement(g),Un(R,g,d),w.head.appendChild(R);break;case"meta":if(P=rT("meta","content",w).get(g+(d.content||""))){for(V=0;V<P.length;V++)if(R=P[V],R.getAttribute("content")===(d.content==null?null:""+d.content)&&R.getAttribute("name")===(d.name==null?null:d.name)&&R.getAttribute("property")===(d.property==null?null:d.property)&&R.getAttribute("http-equiv")===(d.httpEquiv==null?null:d.httpEquiv)&&R.getAttribute("charset")===(d.charSet==null?null:d.charSet)){P.splice(V,1);break t}}R=w.createElement(g),Un(R,g,d),w.head.appendChild(R);break;default:throw Error(r(468,g))}R[on]=s,On(R),g=R}s.stateNode=g}else iT(w,s.type,s.stateNode);else s.stateNode=nT(w,g,s.memoizedProps);else R!==g?(R===null?d.stateNode!==null&&(d=d.stateNode,d.parentNode.removeChild(d)):R.count--,g===null?iT(w,s.type,s.stateNode):nT(w,g,s.memoizedProps)):g===null&&s.stateNode!==null&&Fv(s,s.memoizedProps,d.memoizedProps)}break;case 27:mr(l,s),gr(s),g&512&&(Sn||d===null||qi(d,d.return)),d!==null&&g&4&&Fv(s,s.memoizedProps,d.memoizedProps);break;case 5:if(mr(l,s),gr(s),g&512&&(Sn||d===null||qi(d,d.return)),s.flags&32){w=s.stateNode;try{gu(w,"")}catch(Be){Ft(s,s.return,Be)}}g&4&&s.stateNode!=null&&(w=s.memoizedProps,Fv(s,w,d!==null?d.memoizedProps:w)),g&1024&&(Uv=!0);break;case 6:if(mr(l,s),gr(s),g&4){if(s.stateNode===null)throw Error(r(162));g=s.memoizedProps,d=s.stateNode;try{d.nodeValue=g}catch(Be){Ft(s,s.return,Be)}}break;case 3:if(nm=null,w=Ai,Ai=em(l.containerInfo),mr(l,s),Ai=w,gr(s),g&4&&d!==null&&d.memoizedState.isDehydrated)try{Yu(l.containerInfo)}catch(Be){Ft(s,s.return,Be)}Uv&&(Uv=!1,i_(s));break;case 4:g=Ai,Ai=em(s.stateNode.containerInfo),mr(l,s),gr(s),Ai=g;break;case 12:mr(l,s),gr(s);break;case 31:mr(l,s),gr(s),g&4&&(g=s.updateQueue,g!==null&&(s.updateQueue=null,zp(s,g)));break;case 13:mr(l,s),gr(s),s.child.flags&8192&&s.memoizedState!==null!=(d!==null&&d.memoizedState!==null)&&(Up=_e()),g&4&&(g=s.updateQueue,g!==null&&(s.updateQueue=null,zp(s,g)));break;case 22:w=s.memoizedState!==null;var Q=d!==null&&d.memoizedState!==null,de=Eo,be=Sn;if(Eo=de||w,Sn=be||Q,mr(l,s),Sn=be,Eo=de,gr(s),g&8192)e:for(l=s.stateNode,l._visibility=w?l._visibility&-2:l._visibility|1,w&&(d===null||Q||Eo||Sn||il(s)),d=null,l=s;;){if(l.tag===5||l.tag===26){if(d===null){Q=d=l;try{if(R=Q.stateNode,w)P=R.style,typeof P.setProperty=="function"?P.setProperty("display","none","important"):P.display="none";else{V=Q.stateNode;var Ee=Q.memoizedProps.style,pe=Ee!=null&&Ee.hasOwnProperty("display")?Ee.display:null;V.style.display=pe==null||typeof pe=="boolean"?"":(""+pe).trim()}}catch(Be){Ft(Q,Q.return,Be)}}}else if(l.tag===6){if(d===null){Q=l;try{Q.stateNode.nodeValue=w?"":Q.memoizedProps}catch(Be){Ft(Q,Q.return,Be)}}}else if(l.tag===18){if(d===null){Q=l;try{var ye=Q.stateNode;w?Y_(ye,!0):Y_(Q.stateNode,!1)}catch(Be){Ft(Q,Q.return,Be)}}}else if((l.tag!==22&&l.tag!==23||l.memoizedState===null||l===s)&&l.child!==null){l.child.return=l,l=l.child;continue}if(l===s)break e;for(;l.sibling===null;){if(l.return===null||l.return===s)break e;d===l&&(d=null),l=l.return}d===l&&(d=null),l.sibling.return=l.return,l=l.sibling}g&4&&(g=s.updateQueue,g!==null&&(d=g.retryQueue,d!==null&&(g.retryQueue=null,zp(s,d))));break;case 19:mr(l,s),gr(s),g&4&&(g=s.updateQueue,g!==null&&(s.updateQueue=null,zp(s,g)));break;case 30:break;case 21:break;default:mr(l,s),gr(s)}}function gr(s){var l=s.flags;if(l&2){try{for(var d,g=s.return;g!==null;){if(KR(g)){d=g;break}g=g.return}if(d==null)throw Error(r(160));switch(d.tag){case 27:var w=d.stateNode,R=zv(s);Fp(s,R,w);break;case 5:var P=d.stateNode;d.flags&32&&(gu(P,""),d.flags&=-33);var V=zv(s);Fp(s,V,P);break;case 3:case 4:var Q=d.stateNode.containerInfo,de=zv(s);Bv(s,de,Q);break;default:throw Error(r(161))}}catch(be){Ft(s,s.return,be)}s.flags&=-3}l&4096&&(s.flags&=-4097)}function i_(s){if(s.subtreeFlags&1024)for(s=s.child;s!==null;){var l=s;i_(l),l.tag===5&&l.flags&1024&&l.stateNode.reset(),s=s.sibling}}function Ro(s,l){if(l.subtreeFlags&8772)for(l=l.child;l!==null;)ZR(s,l.alternate,l),l=l.sibling}function il(s){for(s=s.child;s!==null;){var l=s;switch(l.tag){case 0:case 11:case 14:case 15:Ss(4,l,l.return),il(l);break;case 1:qi(l,l.return);var d=l.stateNode;typeof d.componentWillUnmount=="function"&&YR(l,l.return,d),il(l);break;case 27:ad(l.stateNode);case 26:case 5:qi(l,l.return),il(l);break;case 22:l.memoizedState===null&&il(l);break;case 30:il(l);break;default:il(l)}s=s.sibling}}function _o(s,l,d){for(d=d&&(l.subtreeFlags&8772)!==0,l=l.child;l!==null;){var g=l.alternate,w=s,R=l,P=R.flags;switch(R.tag){case 0:case 11:case 15:_o(w,R,d),Qf(4,R);break;case 1:if(_o(w,R,d),g=R,w=g.stateNode,typeof w.componentDidMount=="function")try{w.componentDidMount()}catch(de){Ft(g,g.return,de)}if(g=R,w=g.updateQueue,w!==null){var V=g.stateNode;try{var Q=w.shared.hiddenCallbacks;if(Q!==null)for(w.shared.hiddenCallbacks=null,w=0;w<Q.length;w++)Nk(Q[w],V)}catch(de){Ft(g,g.return,de)}}d&&P&64&&qR(R),Zf(R,R.return);break;case 27:XR(R);case 26:case 5:_o(w,R,d),d&&g===null&&P&4&&WR(R),Zf(R,R.return);break;case 12:_o(w,R,d);break;case 31:_o(w,R,d),d&&P&4&&t_(w,R);break;case 13:_o(w,R,d),d&&P&4&&n_(w,R);break;case 22:R.memoizedState===null&&_o(w,R,d),Zf(R,R.return);break;case 30:break;default:_o(w,R,d)}l=l.sibling}}function Hv(s,l){var d=null;s!==null&&s.memoizedState!==null&&s.memoizedState.cachePool!==null&&(d=s.memoizedState.cachePool.pool),s=null,l.memoizedState!==null&&l.memoizedState.cachePool!==null&&(s=l.memoizedState.cachePool.pool),s!==d&&(s!=null&&s.refCount++,d!=null&&Lf(d))}function Gv(s,l){s=null,l.alternate!==null&&(s=l.alternate.memoizedState.cache),l=l.memoizedState.cache,l!==s&&(l.refCount++,s!=null&&Lf(s))}function Di(s,l,d,g){if(l.subtreeFlags&10256)for(l=l.child;l!==null;)o_(s,l,d,g),l=l.sibling}function o_(s,l,d,g){var w=l.flags;switch(l.tag){case 0:case 11:case 15:Di(s,l,d,g),w&2048&&Qf(9,l);break;case 1:Di(s,l,d,g);break;case 3:Di(s,l,d,g),w&2048&&(s=null,l.alternate!==null&&(s=l.alternate.memoizedState.cache),l=l.memoizedState.cache,l!==s&&(l.refCount++,s!=null&&Lf(s)));break;case 12:if(w&2048){Di(s,l,d,g),s=l.stateNode;try{var R=l.memoizedProps,P=R.id,V=R.onPostCommit;typeof V=="function"&&V(P,l.alternate===null?"mount":"update",s.passiveEffectDuration,-0)}catch(Q){Ft(l,l.return,Q)}}else Di(s,l,d,g);break;case 31:Di(s,l,d,g);break;case 13:Di(s,l,d,g);break;case 23:break;case 22:R=l.stateNode,P=l.alternate,l.memoizedState!==null?R._visibility&2?Di(s,l,d,g):Jf(s,l):R._visibility&2?Di(s,l,d,g):(R._visibility|=2,Iu(s,l,d,g,(l.subtreeFlags&10256)!==0||!1)),w&2048&&Hv(P,l);break;case 24:Di(s,l,d,g),w&2048&&Gv(l.alternate,l);break;default:Di(s,l,d,g)}}function Iu(s,l,d,g,w){for(w=w&&((l.subtreeFlags&10256)!==0||!1),l=l.child;l!==null;){var R=s,P=l,V=d,Q=g,de=P.flags;switch(P.tag){case 0:case 11:case 15:Iu(R,P,V,Q,w),Qf(8,P);break;case 23:break;case 22:var be=P.stateNode;P.memoizedState!==null?be._visibility&2?Iu(R,P,V,Q,w):Jf(R,P):(be._visibility|=2,Iu(R,P,V,Q,w)),w&&de&2048&&Hv(P.alternate,P);break;case 24:Iu(R,P,V,Q,w),w&&de&2048&&Gv(P.alternate,P);break;default:Iu(R,P,V,Q,w)}l=l.sibling}}function Jf(s,l){if(l.subtreeFlags&10256)for(l=l.child;l!==null;){var d=s,g=l,w=g.flags;switch(g.tag){case 22:Jf(d,g),w&2048&&Hv(g.alternate,g);break;case 24:Jf(d,g),w&2048&&Gv(g.alternate,g);break;default:Jf(d,g)}l=l.sibling}}var ed=8192;function ju(s,l,d){if(s.subtreeFlags&ed)for(s=s.child;s!==null;)s_(s,l,d),s=s.sibling}function s_(s,l,d){switch(s.tag){case 26:ju(s,l,d),s.flags&ed&&s.memoizedState!==null&&t6(d,Ai,s.memoizedState,s.memoizedProps);break;case 5:ju(s,l,d);break;case 3:case 4:var g=Ai;Ai=em(s.stateNode.containerInfo),ju(s,l,d),Ai=g;break;case 22:s.memoizedState===null&&(g=s.alternate,g!==null&&g.memoizedState!==null?(g=ed,ed=16777216,ju(s,l,d),ed=g):ju(s,l,d));break;default:ju(s,l,d)}}function a_(s){var l=s.alternate;if(l!==null&&(s=l.child,s!==null)){l.child=null;do l=s.sibling,s.sibling=null,s=l;while(s!==null)}}function td(s){var l=s.deletions;if((s.flags&16)!==0){if(l!==null)for(var d=0;d<l.length;d++){var g=l[d];$n=g,u_(g,s)}a_(s)}if(s.subtreeFlags&10256)for(s=s.child;s!==null;)l_(s),s=s.sibling}function l_(s){switch(s.tag){case 0:case 11:case 15:td(s),s.flags&2048&&Ss(9,s,s.return);break;case 3:td(s);break;case 12:td(s);break;case 22:var l=s.stateNode;s.memoizedState!==null&&l._visibility&2&&(s.return===null||s.return.tag!==13)?(l._visibility&=-3,Bp(s)):td(s);break;default:td(s)}}function Bp(s){var l=s.deletions;if((s.flags&16)!==0){if(l!==null)for(var d=0;d<l.length;d++){var g=l[d];$n=g,u_(g,s)}a_(s)}for(s=s.child;s!==null;){switch(l=s,l.tag){case 0:case 11:case 15:Ss(8,l,l.return),Bp(l);break;case 22:d=l.stateNode,d._visibility&2&&(d._visibility&=-3,Bp(l));break;default:Bp(l)}s=s.sibling}}function u_(s,l){for(;$n!==null;){var d=$n;switch(d.tag){case 0:case 11:case 15:Ss(8,d,l);break;case 23:case 22:if(d.memoizedState!==null&&d.memoizedState.cachePool!==null){var g=d.memoizedState.cachePool.pool;g!=null&&g.refCount++}break;case 24:Lf(d.memoizedState.cache)}if(g=d.child,g!==null)g.return=d,$n=g;else e:for(d=s;$n!==null;){g=$n;var w=g.sibling,R=g.return;if(JR(g),g===d){$n=null;break e}if(w!==null){w.return=R,$n=w;break e}$n=R}}}var g5={getCacheForType:function(s){var l=zn(vn),d=l.data.get(s);return d===void 0&&(d=s(),l.data.set(s,d)),d},cacheSignal:function(){return zn(vn).controller.signal}},y5=typeof WeakMap=="function"?WeakMap:Map,$t=0,Yt=null,yt=null,wt=0,Lt=0,jr=null,Cs=!1,Lu=!1,Vv=!1,To=0,an=0,Es=0,ol=0,qv=0,Lr=0,Fu=0,nd=null,yr=null,Yv=!1,Up=0,c_=0,Hp=1/0,Gp=null,ks=null,En=0,Rs=null,zu=null,Ao=0,Wv=0,Kv=null,f_=null,rd=0,Xv=null;function Fr(){return($t&2)!==0&&wt!==0?wt&-wt:F.T!==null?n0():Hi()}function d_(){if(Lr===0)if((wt&536870912)===0||Et){var s=en;en<<=1,(en&3932160)===0&&(en=262144),Lr=s}else Lr=536870912;return s=Nr.current,s!==null&&(s.flags|=32),Lr}function br(s,l,d){(s===Yt&&(Lt===2||Lt===9)||s.cancelPendingCommit!==null)&&(Bu(s,0),_s(s,wt,Lr,!1)),Ri(s,d),(($t&2)===0||s!==Yt)&&(s===Yt&&(($t&2)===0&&(ol|=d),an===4&&_s(s,wt,Lr,!1)),Yi(s))}function h_(s,l,d){if(($t&6)!==0)throw Error(r(327));var g=!d&&(l&127)===0&&(l&s.expiredLanes)===0||ei(s,l),w=g?x5(s,l):Zv(s,l,!0),R=g;do{if(w===0){Lu&&!g&&_s(s,l,0,!1);break}else{if(d=s.current.alternate,R&&!b5(d)){w=Zv(s,l,!1),R=!1;continue}if(w===2){if(R=l,s.errorRecoveryDisabledLanes&R)var P=0;else P=s.pendingLanes&-536870913,P=P!==0?P:P&536870912?536870912:0;if(P!==0){l=P;e:{var V=s;w=nd;var Q=V.current.memoizedState.isDehydrated;if(Q&&(Bu(V,P).flags|=256),P=Zv(V,P,!1),P!==2){if(Vv&&!Q){V.errorRecoveryDisabledLanes|=R,ol|=R,w=4;break e}R=yr,yr=w,R!==null&&(yr===null?yr=R:yr.push.apply(yr,R))}w=P}if(R=!1,w!==2)continue}}if(w===1){Bu(s,0),_s(s,l,0,!0);break}e:{switch(g=s,R=w,R){case 0:case 1:throw Error(r(345));case 4:if((l&4194048)!==l)break;case 6:_s(g,l,Lr,!Cs);break e;case 2:yr=null;break;case 3:case 5:break;default:throw Error(r(329))}if((l&62914560)===l&&(w=Up+300-_e(),10<w)){if(_s(g,l,Lr,!Cs),bn(g,0,!0)!==0)break e;Ao=l,g.timeoutHandle=G_(p_.bind(null,g,d,yr,Gp,Yv,l,Lr,ol,Fu,Cs,R,"Throttled",-0,0),w);break e}p_(g,d,yr,Gp,Yv,l,Lr,ol,Fu,Cs,R,null,-0,0)}}break}while(!0);Yi(s)}function p_(s,l,d,g,w,R,P,V,Q,de,be,Ee,pe,ye){if(s.timeoutHandle=-1,Ee=l.subtreeFlags,Ee&8192||(Ee&16785408)===16785408){Ee={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:po},s_(l,R,Ee);var Be=(R&62914560)===R?Up-_e():(R&4194048)===R?c_-_e():0;if(Be=n6(Ee,Be),Be!==null){Ao=R,s.cancelPendingCommit=Be(S_.bind(null,s,l,R,d,g,w,P,V,Q,be,Ee,null,pe,ye)),_s(s,R,P,!de);return}}S_(s,l,R,d,g,w,P,V,Q)}function b5(s){for(var l=s;;){var d=l.tag;if((d===0||d===11||d===15)&&l.flags&16384&&(d=l.updateQueue,d!==null&&(d=d.stores,d!==null)))for(var g=0;g<d.length;g++){var w=d[g],R=w.getSnapshot;w=w.value;try{if(!$r(R(),w))return!1}catch{return!1}}if(d=l.child,l.subtreeFlags&16384&&d!==null)d.return=l,l=d;else{if(l===s)break;for(;l.sibling===null;){if(l.return===null||l.return===s)return!0;l=l.return}l.sibling.return=l.return,l=l.sibling}}return!0}function _s(s,l,d,g){l&=~qv,l&=~ol,s.suspendedLanes|=l,s.pingedLanes&=~l,g&&(s.warmLanes|=l),g=s.expirationTimes;for(var w=l;0<w;){var R=31-Ne(w),P=1<<R;g[R]=-1,w&=~P}d!==0&&uu(s,d,l)}function Vp(){return($t&6)===0?(id(0),!1):!0}function Qv(){if(yt!==null){if(Lt===0)var s=yt.return;else s=yt,bo=Xa=null,hv(s),Mu=null,zf=0,s=yt;for(;s!==null;)VR(s.alternate,s),s=s.return;yt=null}}function Bu(s,l){var d=s.timeoutHandle;d!==-1&&(s.timeoutHandle=-1,L5(d)),d=s.cancelPendingCommit,d!==null&&(s.cancelPendingCommit=null,d()),Ao=0,Qv(),Yt=s,yt=d=go(s.current,null),wt=l,Lt=0,jr=null,Cs=!1,Lu=ei(s,l),Vv=!1,Fu=Lr=qv=ol=Es=an=0,yr=nd=null,Yv=!1,(l&8)!==0&&(l|=l&32);var g=s.entangledLanes;if(g!==0)for(s=s.entanglements,g&=l;0<g;){var w=31-Ne(g),R=1<<w;l|=s[w],g&=~R}return To=l,dp(),d}function m_(s,l){ot=null,F.H=Wf,l===Du||l===xp?(l=Mk(),Lt=3):l===tv?(l=Mk(),Lt=4):Lt=l===Av?8:l!==null&&typeof l=="object"&&typeof l.then=="function"?6:1,jr=l,yt===null&&(an=1,Pp(s,ii(l,s.current)))}function g_(){var s=Nr.current;return s===null?!0:(wt&4194048)===wt?li===null:(wt&62914560)===wt||(wt&536870912)!==0?s===li:!1}function y_(){var s=F.H;return F.H=Wf,s===null?Wf:s}function b_(){var s=F.A;return F.A=g5,s}function qp(){an=4,Cs||(wt&4194048)!==wt&&Nr.current!==null||(Lu=!0),(Es&134217727)===0&&(ol&134217727)===0||Yt===null||_s(Yt,wt,Lr,!1)}function Zv(s,l,d){var g=$t;$t|=2;var w=y_(),R=b_();(Yt!==s||wt!==l)&&(Gp=null,Bu(s,l)),l=!1;var P=an;e:do try{if(Lt!==0&&yt!==null){var V=yt,Q=jr;switch(Lt){case 8:Qv(),P=6;break e;case 3:case 2:case 9:case 6:Nr.current===null&&(l=!0);var de=Lt;if(Lt=0,jr=null,Uu(s,V,Q,de),d&&Lu){P=0;break e}break;default:de=Lt,Lt=0,jr=null,Uu(s,V,Q,de)}}v5(),P=an;break}catch(be){m_(s,be)}while(!0);return l&&s.shellSuspendCounter++,bo=Xa=null,$t=g,F.H=w,F.A=R,yt===null&&(Yt=null,wt=0,dp()),P}function v5(){for(;yt!==null;)v_(yt)}function x5(s,l){var d=$t;$t|=2;var g=y_(),w=b_();Yt!==s||wt!==l?(Gp=null,Hp=_e()+500,Bu(s,l)):Lu=ei(s,l);e:do try{if(Lt!==0&&yt!==null){l=yt;var R=jr;t:switch(Lt){case 1:Lt=0,jr=null,Uu(s,l,R,1);break;case 2:case 9:if(Ak(R)){Lt=0,jr=null,x_(l);break}l=function(){Lt!==2&&Lt!==9||Yt!==s||(Lt=7),Yi(s)},R.then(l,l);break e;case 3:Lt=7;break e;case 4:Lt=5;break e;case 7:Ak(R)?(Lt=0,jr=null,x_(l)):(Lt=0,jr=null,Uu(s,l,R,7));break;case 5:var P=null;switch(yt.tag){case 26:P=yt.memoizedState;case 5:case 27:var V=yt;if(P?oT(P):V.stateNode.complete){Lt=0,jr=null;var Q=V.sibling;if(Q!==null)yt=Q;else{var de=V.return;de!==null?(yt=de,Yp(de)):yt=null}break t}}Lt=0,jr=null,Uu(s,l,R,5);break;case 6:Lt=0,jr=null,Uu(s,l,R,6);break;case 8:Qv(),an=6;break e;default:throw Error(r(462))}}w5();break}catch(be){m_(s,be)}while(!0);return bo=Xa=null,F.H=g,F.A=w,$t=d,yt!==null?0:(Yt=null,wt=0,dp(),an)}function w5(){for(;yt!==null&&!Oe();)v_(yt)}function v_(s){var l=HR(s.alternate,s,To);s.memoizedProps=s.pendingProps,l===null?Yp(s):yt=l}function x_(s){var l=s,d=l.alternate;switch(l.tag){case 15:case 0:l=jR(d,l,l.pendingProps,l.type,void 0,wt);break;case 11:l=jR(d,l,l.pendingProps,l.type.render,l.ref,wt);break;case 5:hv(l);default:VR(d,l),l=yt=bk(l,To),l=HR(d,l,To)}s.memoizedProps=s.pendingProps,l===null?Yp(s):yt=l}function Uu(s,l,d,g){bo=Xa=null,hv(l),Mu=null,zf=0;var w=l.return;try{if(u5(s,w,l,d,wt)){an=1,Pp(s,ii(d,s.current)),yt=null;return}}catch(R){if(w!==null)throw yt=w,R;an=1,Pp(s,ii(d,s.current)),yt=null;return}l.flags&32768?(Et||g===1?s=!0:Lu||(wt&536870912)!==0?s=!1:(Cs=s=!0,(g===2||g===9||g===3||g===6)&&(g=Nr.current,g!==null&&g.tag===13&&(g.flags|=16384))),w_(l,s)):Yp(l)}function Yp(s){var l=s;do{if((l.flags&32768)!==0){w_(l,Cs);return}s=l.return;var d=d5(l.alternate,l,To);if(d!==null){yt=d;return}if(l=l.sibling,l!==null){yt=l;return}yt=l=s}while(l!==null);an===0&&(an=5)}function w_(s,l){do{var d=h5(s.alternate,s);if(d!==null){d.flags&=32767,yt=d;return}if(d=s.return,d!==null&&(d.flags|=32768,d.subtreeFlags=0,d.deletions=null),!l&&(s=s.sibling,s!==null)){yt=s;return}yt=s=d}while(s!==null);an=6,yt=null}function S_(s,l,d,g,w,R,P,V,Q){s.cancelPendingCommit=null;do Wp();while(En!==0);if(($t&6)!==0)throw Error(r(327));if(l!==null){if(l===s.current)throw Error(r(177));if(R=l.lanes|l.childLanes,R|=zb,lu(s,d,R,P,V,Q),s===Yt&&(yt=Yt=null,wt=0),zu=l,Rs=s,Ao=d,Wv=R,Kv=w,f_=g,(l.subtreeFlags&10256)!==0||(l.flags&10256)!==0?(s.callbackNode=null,s.callbackPriority=0,k5(ke,function(){return __(),null})):(s.callbackNode=null,s.callbackPriority=0),g=(l.flags&13878)!==0,(l.subtreeFlags&13878)!==0||g){g=F.T,F.T=null,w=U.p,U.p=2,P=$t,$t|=4;try{p5(s,l,d)}finally{$t=P,U.p=w,F.T=g}}En=1,C_(),E_(),k_()}}function C_(){if(En===1){En=0;var s=Rs,l=zu,d=(l.flags&13878)!==0;if((l.subtreeFlags&13878)!==0||d){d=F.T,F.T=null;var g=U.p;U.p=2;var w=$t;$t|=4;try{r_(l,s);var R=c0,P=uk(s.containerInfo),V=R.focusedElem,Q=R.selectionRange;if(P!==V&&V&&V.ownerDocument&&lk(V.ownerDocument.documentElement,V)){if(Q!==null&&Nb(V)){var de=Q.start,be=Q.end;if(be===void 0&&(be=de),"selectionStart"in V)V.selectionStart=de,V.selectionEnd=Math.min(be,V.value.length);else{var Ee=V.ownerDocument||document,pe=Ee&&Ee.defaultView||window;if(pe.getSelection){var ye=pe.getSelection(),Be=V.textContent.length,et=Math.min(Q.start,Be),Vt=Q.end===void 0?et:Math.min(Q.end,Be);!ye.extend&&et>Vt&&(P=Vt,Vt=et,et=P);var se=ak(V,et),ee=ak(V,Vt);if(se&&ee&&(ye.rangeCount!==1||ye.anchorNode!==se.node||ye.anchorOffset!==se.offset||ye.focusNode!==ee.node||ye.focusOffset!==ee.offset)){var fe=Ee.createRange();fe.setStart(se.node,se.offset),ye.removeAllRanges(),et>Vt?(ye.addRange(fe),ye.extend(ee.node,ee.offset)):(fe.setEnd(ee.node,ee.offset),ye.addRange(fe))}}}}for(Ee=[],ye=V;ye=ye.parentNode;)ye.nodeType===1&&Ee.push({element:ye,left:ye.scrollLeft,top:ye.scrollTop});for(typeof V.focus=="function"&&V.focus(),V=0;V<Ee.length;V++){var we=Ee[V];we.element.scrollLeft=we.left,we.element.scrollTop=we.top}}sm=!!u0,c0=u0=null}finally{$t=w,U.p=g,F.T=d}}s.current=l,En=2}}function E_(){if(En===2){En=0;var s=Rs,l=zu,d=(l.flags&8772)!==0;if((l.subtreeFlags&8772)!==0||d){d=F.T,F.T=null;var g=U.p;U.p=2;var w=$t;$t|=4;try{ZR(s,l.alternate,l)}finally{$t=w,U.p=g,F.T=d}}En=3}}function k_(){if(En===4||En===3){En=0,Te();var s=Rs,l=zu,d=Ao,g=f_;(l.subtreeFlags&10256)!==0||(l.flags&10256)!==0?En=5:(En=0,zu=Rs=null,R_(s,s.pendingLanes));var w=s.pendingLanes;if(w===0&&(ks=null),Ba(d),l=l.stateNode,Me&&typeof Me.onCommitFiberRoot=="function")try{Me.onCommitFiberRoot(Ot,l,void 0,(l.current.flags&128)===128)}catch{}if(g!==null){l=F.T,w=U.p,U.p=2,F.T=null;try{for(var R=s.onRecoverableError,P=0;P<g.length;P++){var V=g[P];R(V.value,{componentStack:V.stack})}}finally{F.T=l,U.p=w}}(Ao&3)!==0&&Wp(),Yi(s),w=s.pendingLanes,(d&261930)!==0&&(w&42)!==0?s===Xv?rd++:(rd=0,Xv=s):rd=0,id(0)}}function R_(s,l){(s.pooledCacheLanes&=l)===0&&(l=s.pooledCache,l!=null&&(s.pooledCache=null,Lf(l)))}function Wp(){return C_(),E_(),k_(),__()}function __(){if(En!==5)return!1;var s=Rs,l=Wv;Wv=0;var d=Ba(Ao),g=F.T,w=U.p;try{U.p=32>d?32:d,F.T=null,d=Kv,Kv=null;var R=Rs,P=Ao;if(En=0,zu=Rs=null,Ao=0,($t&6)!==0)throw Error(r(331));var V=$t;if($t|=4,l_(R.current),o_(R,R.current,P,d),$t=V,id(0,!1),Me&&typeof Me.onPostCommitFiberRoot=="function")try{Me.onPostCommitFiberRoot(Ot,R)}catch{}return!0}finally{U.p=w,F.T=g,R_(s,l)}}function T_(s,l,d){l=ii(d,l),l=Tv(s.stateNode,l,2),s=vs(s,l,2),s!==null&&(Ri(s,2),Yi(s))}function Ft(s,l,d){if(s.tag===3)T_(s,s,d);else for(;l!==null;){if(l.tag===3){T_(l,s,d);break}else if(l.tag===1){var g=l.stateNode;if(typeof l.type.getDerivedStateFromError=="function"||typeof g.componentDidCatch=="function"&&(ks===null||!ks.has(g))){s=ii(d,s),d=AR(2),g=vs(l,d,2),g!==null&&(DR(d,g,l,s),Ri(g,2),Yi(g));break}}l=l.return}}function Jv(s,l,d){var g=s.pingCache;if(g===null){g=s.pingCache=new y5;var w=new Set;g.set(l,w)}else w=g.get(l),w===void 0&&(w=new Set,g.set(l,w));w.has(d)||(Vv=!0,w.add(d),s=S5.bind(null,s,l,d),l.then(s,s))}function S5(s,l,d){var g=s.pingCache;g!==null&&g.delete(l),s.pingedLanes|=s.suspendedLanes&d,s.warmLanes&=~d,Yt===s&&(wt&d)===d&&(an===4||an===3&&(wt&62914560)===wt&&300>_e()-Up?($t&2)===0&&Bu(s,0):qv|=d,Fu===wt&&(Fu=0)),Yi(s)}function A_(s,l){l===0&&(l=ki()),s=Ya(s,l),s!==null&&(Ri(s,l),Yi(s))}function C5(s){var l=s.memoizedState,d=0;l!==null&&(d=l.retryLane),A_(s,d)}function E5(s,l){var d=0;switch(s.tag){case 31:case 13:var g=s.stateNode,w=s.memoizedState;w!==null&&(d=w.retryLane);break;case 19:g=s.stateNode;break;case 22:g=s.stateNode._retryCache;break;default:throw Error(r(314))}g!==null&&g.delete(l),A_(s,d)}function k5(s,l){return me(s,l)}var Kp=null,Hu=null,e0=!1,Xp=!1,t0=!1,Ts=0;function Yi(s){s!==Hu&&s.next===null&&(Hu===null?Kp=Hu=s:Hu=Hu.next=s),Xp=!0,e0||(e0=!0,_5())}function id(s,l){if(!t0&&Xp){t0=!0;do for(var d=!1,g=Kp;g!==null;){if(s!==0){var w=g.pendingLanes;if(w===0)var R=0;else{var P=g.suspendedLanes,V=g.pingedLanes;R=(1<<31-Ne(42|s)+1)-1,R&=w&~(P&~V),R=R&201326741?R&201326741|1:R?R|2:0}R!==0&&(d=!0,$_(g,R))}else R=wt,R=bn(g,g===Yt?R:0,g.cancelPendingCommit!==null||g.timeoutHandle!==-1),(R&3)===0||ei(g,R)||(d=!0,$_(g,R));g=g.next}while(d);t0=!1}}function R5(){D_()}function D_(){Xp=e0=!1;var s=0;Ts!==0&&j5()&&(s=Ts);for(var l=_e(),d=null,g=Kp;g!==null;){var w=g.next,R=M_(g,l);R===0?(g.next=null,d===null?Kp=w:d.next=w,w===null&&(Hu=d)):(d=g,(s!==0||(R&3)!==0)&&(Xp=!0)),g=w}En!==0&&En!==5||id(s),Ts!==0&&(Ts=0)}function M_(s,l){for(var d=s.suspendedLanes,g=s.pingedLanes,w=s.expirationTimes,R=s.pendingLanes&-62914561;0<R;){var P=31-Ne(R),V=1<<P,Q=w[P];Q===-1?((V&d)===0||(V&g)!==0)&&(w[P]=La(V,l)):Q<=l&&(s.expiredLanes|=V),R&=~V}if(l=Yt,d=wt,d=bn(s,s===l?d:0,s.cancelPendingCommit!==null||s.timeoutHandle!==-1),g=s.callbackNode,d===0||s===l&&(Lt===2||Lt===9)||s.cancelPendingCommit!==null)return g!==null&&g!==null&&ae(g),s.callbackNode=null,s.callbackPriority=0;if((d&3)===0||ei(s,d)){if(l=d&-d,l===s.callbackPriority)return l;switch(g!==null&&ae(g),Ba(d)){case 2:case 8:d=Se;break;case 32:d=ke;break;case 268435456:d=Le;break;default:d=ke}return g=O_.bind(null,s),d=me(d,g),s.callbackPriority=l,s.callbackNode=d,l}return g!==null&&g!==null&&ae(g),s.callbackPriority=2,s.callbackNode=null,2}function O_(s,l){if(En!==0&&En!==5)return s.callbackNode=null,s.callbackPriority=0,null;var d=s.callbackNode;if(Wp()&&s.callbackNode!==d)return null;var g=wt;return g=bn(s,s===Yt?g:0,s.cancelPendingCommit!==null||s.timeoutHandle!==-1),g===0?null:(h_(s,g,l),M_(s,_e()),s.callbackNode!=null&&s.callbackNode===d?O_.bind(null,s):null)}function $_(s,l){if(Wp())return null;h_(s,l,!0)}function _5(){F5(function(){($t&6)!==0?me(ue,R5):D_()})}function n0(){if(Ts===0){var s=Tu;s===0&&(s=Rt,Rt<<=1,(Rt&261888)===0&&(Rt=256)),Ts=s}return Ts}function P_(s){return s==null||typeof s=="symbol"||typeof s=="boolean"?null:typeof s=="function"?s:ip(""+s)}function N_(s,l){var d=l.ownerDocument.createElement("input");return d.name=l.name,d.value=l.value,s.id&&d.setAttribute("form",s.id),l.parentNode.insertBefore(d,l),s=new FormData(s),d.parentNode.removeChild(d),s}function T5(s,l,d,g,w){if(l==="submit"&&d&&d.stateNode===w){var R=P_((w[Ln]||null).action),P=g.submitter;P&&(l=(l=P[Ln]||null)?P_(l.formAction):P.getAttribute("formAction"),l!==null&&(R=l,P=null));var V=new lp("action","action",null,g,w);s.push({event:V,listeners:[{instance:null,listener:function(){if(g.defaultPrevented){if(Ts!==0){var Q=P?N_(w,P):new FormData(w);Sv(d,{pending:!0,data:Q,method:w.method,action:R},null,Q)}}else typeof R=="function"&&(V.preventDefault(),Q=P?N_(w,P):new FormData(w),Sv(d,{pending:!0,data:Q,method:w.method,action:R},R,Q))},currentTarget:w}]})}}for(var r0=0;r0<Fb.length;r0++){var i0=Fb[r0],A5=i0.toLowerCase(),D5=i0[0].toUpperCase()+i0.slice(1);Ti(A5,"on"+D5)}Ti(dk,"onAnimationEnd"),Ti(hk,"onAnimationIteration"),Ti(pk,"onAnimationStart"),Ti("dblclick","onDoubleClick"),Ti("focusin","onFocus"),Ti("focusout","onBlur"),Ti(qB,"onTransitionRun"),Ti(YB,"onTransitionStart"),Ti(WB,"onTransitionCancel"),Ti(mk,"onTransitionEnd"),pu("onMouseEnter",["mouseout","mouseover"]),pu("onMouseLeave",["mouseout","mouseover"]),pu("onPointerEnter",["pointerout","pointerover"]),pu("onPointerLeave",["pointerout","pointerover"]),Ha("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Ha("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Ha("onBeforeInput",["compositionend","keypress","textInput","paste"]),Ha("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Ha("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Ha("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var od="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),M5=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(od));function I_(s,l){l=(l&4)!==0;for(var d=0;d<s.length;d++){var g=s[d],w=g.event;g=g.listeners;e:{var R=void 0;if(l)for(var P=g.length-1;0<=P;P--){var V=g[P],Q=V.instance,de=V.currentTarget;if(V=V.listener,Q!==R&&w.isPropagationStopped())break e;R=V,w.currentTarget=de;try{R(w)}catch(be){fp(be)}w.currentTarget=null,R=Q}else for(P=0;P<g.length;P++){if(V=g[P],Q=V.instance,de=V.currentTarget,V=V.listener,Q!==R&&w.isPropagationStopped())break e;R=V,w.currentTarget=de;try{R(w)}catch(be){fp(be)}w.currentTarget=null,R=Q}}}}function bt(s,l){var d=l[cu];d===void 0&&(d=l[cu]=new Set);var g=s+"__bubble";d.has(g)||(j_(l,s,2,!1),d.add(g))}function o0(s,l,d){var g=0;l&&(g|=4),j_(d,s,g,l)}var Qp="_reactListening"+Math.random().toString(36).slice(2);function s0(s){if(!s[Qp]){s[Qp]=!0,DE.forEach(function(d){d!=="selectionchange"&&(M5.has(d)||o0(d,!1,s),o0(d,!0,s))});var l=s.nodeType===9?s:s.ownerDocument;l===null||l[Qp]||(l[Qp]=!0,o0("selectionchange",!1,l))}}function j_(s,l,d,g){switch(dT(l)){case 2:var w=o6;break;case 8:w=s6;break;default:w=w0}d=w.bind(null,l,d,s),w=void 0,!Rb||l!=="touchstart"&&l!=="touchmove"&&l!=="wheel"||(w=!0),g?w!==void 0?s.addEventListener(l,d,{capture:!0,passive:w}):s.addEventListener(l,d,!0):w!==void 0?s.addEventListener(l,d,{passive:w}):s.addEventListener(l,d,!1)}function a0(s,l,d,g,w){var R=g;if((l&1)===0&&(l&2)===0&&g!==null)e:for(;;){if(g===null)return;var P=g.tag;if(P===3||P===4){var V=g.stateNode.containerInfo;if(V===w)break;if(P===4)for(P=g.return;P!==null;){var Q=P.tag;if((Q===3||Q===4)&&P.stateNode.containerInfo===w)return;P=P.return}for(;V!==null;){if(P=fu(V),P===null)return;if(Q=P.tag,Q===5||Q===6||Q===26||Q===27){g=R=P;continue e}V=V.parentNode}}g=g.return}UE(function(){var de=R,be=Eb(d),Ee=[];e:{var pe=gk.get(s);if(pe!==void 0){var ye=lp,Be=s;switch(s){case"keypress":if(sp(d)===0)break e;case"keydown":case"keyup":ye=EB;break;case"focusin":Be="focus",ye=Db;break;case"focusout":Be="blur",ye=Db;break;case"beforeblur":case"afterblur":ye=Db;break;case"click":if(d.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":ye=VE;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":ye=dB;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":ye=_B;break;case dk:case hk:case pk:ye=mB;break;case mk:ye=AB;break;case"scroll":case"scrollend":ye=cB;break;case"wheel":ye=MB;break;case"copy":case"cut":case"paste":ye=yB;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":ye=YE;break;case"toggle":case"beforetoggle":ye=$B}var et=(l&4)!==0,Vt=!et&&(s==="scroll"||s==="scrollend"),se=et?pe!==null?pe+"Capture":null:pe;et=[];for(var ee=de,fe;ee!==null;){var we=ee;if(fe=we.stateNode,we=we.tag,we!==5&&we!==26&&we!==27||fe===null||se===null||(we=_f(ee,se),we!=null&&et.push(sd(ee,we,fe))),Vt)break;ee=ee.return}0<et.length&&(pe=new ye(pe,Be,null,d,be),Ee.push({event:pe,listeners:et}))}}if((l&7)===0){e:{if(pe=s==="mouseover"||s==="pointerover",ye=s==="mouseout"||s==="pointerout",pe&&d!==Cb&&(Be=d.relatedTarget||d.fromElement)&&(fu(Be)||Be[fo]))break e;if((ye||pe)&&(pe=be.window===be?be:(pe=be.ownerDocument)?pe.defaultView||pe.parentWindow:window,ye?(Be=d.relatedTarget||d.toElement,ye=de,Be=Be?fu(Be):null,Be!==null&&(Vt=o(Be),et=Be.tag,Be!==Vt||et!==5&&et!==27&&et!==6)&&(Be=null)):(ye=null,Be=de),ye!==Be)){if(et=VE,we="onMouseLeave",se="onMouseEnter",ee="mouse",(s==="pointerout"||s==="pointerover")&&(et=YE,we="onPointerLeave",se="onPointerEnter",ee="pointer"),Vt=ye==null?pe:Rf(ye),fe=Be==null?pe:Rf(Be),pe=new et(we,ee+"leave",ye,d,be),pe.target=Vt,pe.relatedTarget=fe,we=null,fu(be)===de&&(et=new et(se,ee+"enter",Be,d,be),et.target=fe,et.relatedTarget=Vt,we=et),Vt=we,ye&&Be)t:{for(et=O5,se=ye,ee=Be,fe=0,we=se;we;we=et(we))fe++;we=0;for(var Ze=ee;Ze;Ze=et(Ze))we++;for(;0<fe-we;)se=et(se),fe--;for(;0<we-fe;)ee=et(ee),we--;for(;fe--;){if(se===ee||ee!==null&&se===ee.alternate){et=se;break t}se=et(se),ee=et(ee)}et=null}else et=null;ye!==null&&L_(Ee,pe,ye,et,!1),Be!==null&&Vt!==null&&L_(Ee,Vt,Be,et,!0)}}e:{if(pe=de?Rf(de):window,ye=pe.nodeName&&pe.nodeName.toLowerCase(),ye==="select"||ye==="input"&&pe.type==="file")var At=tk;else if(JE(pe))if(nk)At=HB;else{At=BB;var qe=zB}else ye=pe.nodeName,!ye||ye.toLowerCase()!=="input"||pe.type!=="checkbox"&&pe.type!=="radio"?de&&Sb(de.elementType)&&(At=tk):At=UB;if(At&&(At=At(s,de))){ek(Ee,At,d,be);break e}qe&&qe(s,pe,de),s==="focusout"&&de&&pe.type==="number"&&de.memoizedProps.value!=null&&wb(pe,"number",pe.value)}switch(qe=de?Rf(de):window,s){case"focusin":(JE(qe)||qe.contentEditable==="true")&&(xu=qe,Ib=de,Nf=null);break;case"focusout":Nf=Ib=xu=null;break;case"mousedown":jb=!0;break;case"contextmenu":case"mouseup":case"dragend":jb=!1,ck(Ee,d,be);break;case"selectionchange":if(VB)break;case"keydown":case"keyup":ck(Ee,d,be)}var at;if(Ob)e:{switch(s){case"compositionstart":var St="onCompositionStart";break e;case"compositionend":St="onCompositionEnd";break e;case"compositionupdate":St="onCompositionUpdate";break e}St=void 0}else vu?QE(s,d)&&(St="onCompositionEnd"):s==="keydown"&&d.keyCode===229&&(St="onCompositionStart");St&&(WE&&d.locale!=="ko"&&(vu||St!=="onCompositionStart"?St==="onCompositionEnd"&&vu&&(at=HE()):(ds=be,_b="value"in ds?ds.value:ds.textContent,vu=!0)),qe=Zp(de,St),0<qe.length&&(St=new qE(St,s,null,d,be),Ee.push({event:St,listeners:qe}),at?St.data=at:(at=ZE(d),at!==null&&(St.data=at)))),(at=NB?IB(s,d):jB(s,d))&&(St=Zp(de,"onBeforeInput"),0<St.length&&(qe=new qE("onBeforeInput","beforeinput",null,d,be),Ee.push({event:qe,listeners:St}),qe.data=at)),T5(Ee,s,de,d,be)}I_(Ee,l)})}function sd(s,l,d){return{instance:s,listener:l,currentTarget:d}}function Zp(s,l){for(var d=l+"Capture",g=[];s!==null;){var w=s,R=w.stateNode;if(w=w.tag,w!==5&&w!==26&&w!==27||R===null||(w=_f(s,d),w!=null&&g.unshift(sd(s,w,R)),w=_f(s,l),w!=null&&g.push(sd(s,w,R))),s.tag===3)return g;s=s.return}return[]}function O5(s){if(s===null)return null;do s=s.return;while(s&&s.tag!==5&&s.tag!==27);return s||null}function L_(s,l,d,g,w){for(var R=l._reactName,P=[];d!==null&&d!==g;){var V=d,Q=V.alternate,de=V.stateNode;if(V=V.tag,Q!==null&&Q===g)break;V!==5&&V!==26&&V!==27||de===null||(Q=de,w?(de=_f(d,R),de!=null&&P.unshift(sd(d,de,Q))):w||(de=_f(d,R),de!=null&&P.push(sd(d,de,Q)))),d=d.return}P.length!==0&&s.push({event:l,listeners:P})}var $5=/\r\n?/g,P5=/\u0000|\uFFFD/g;function F_(s){return(typeof s=="string"?s:""+s).replace($5,`
|
|
50
|
-
`).replace(P5,"")}function z_(s,l){return l=F_(l),F_(s)===l}function Gt(s,l,d,g,w,R){switch(d){case"children":typeof g=="string"?l==="body"||l==="textarea"&&g===""||gu(s,g):(typeof g=="number"||typeof g=="bigint")&&l!=="body"&&gu(s,""+g);break;case"className":np(s,"class",g);break;case"tabIndex":np(s,"tabindex",g);break;case"dir":case"role":case"viewBox":case"width":case"height":np(s,d,g);break;case"style":zE(s,g,R);break;case"data":if(l!=="object"){np(s,"data",g);break}case"src":case"href":if(g===""&&(l!=="a"||d!=="href")){s.removeAttribute(d);break}if(g==null||typeof g=="function"||typeof g=="symbol"||typeof g=="boolean"){s.removeAttribute(d);break}g=ip(""+g),s.setAttribute(d,g);break;case"action":case"formAction":if(typeof g=="function"){s.setAttribute(d,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof R=="function"&&(d==="formAction"?(l!=="input"&&Gt(s,l,"name",w.name,w,null),Gt(s,l,"formEncType",w.formEncType,w,null),Gt(s,l,"formMethod",w.formMethod,w,null),Gt(s,l,"formTarget",w.formTarget,w,null)):(Gt(s,l,"encType",w.encType,w,null),Gt(s,l,"method",w.method,w,null),Gt(s,l,"target",w.target,w,null)));if(g==null||typeof g=="symbol"||typeof g=="boolean"){s.removeAttribute(d);break}g=ip(""+g),s.setAttribute(d,g);break;case"onClick":g!=null&&(s.onclick=po);break;case"onScroll":g!=null&&bt("scroll",s);break;case"onScrollEnd":g!=null&&bt("scrollend",s);break;case"dangerouslySetInnerHTML":if(g!=null){if(typeof g!="object"||!("__html"in g))throw Error(r(61));if(d=g.__html,d!=null){if(w.children!=null)throw Error(r(60));s.innerHTML=d}}break;case"multiple":s.multiple=g&&typeof g!="function"&&typeof g!="symbol";break;case"muted":s.muted=g&&typeof g!="function"&&typeof g!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(g==null||typeof g=="function"||typeof g=="boolean"||typeof g=="symbol"){s.removeAttribute("xlink:href");break}d=ip(""+g),s.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",d);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":g!=null&&typeof g!="function"&&typeof g!="symbol"?s.setAttribute(d,""+g):s.removeAttribute(d);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":g&&typeof g!="function"&&typeof g!="symbol"?s.setAttribute(d,""):s.removeAttribute(d);break;case"capture":case"download":g===!0?s.setAttribute(d,""):g!==!1&&g!=null&&typeof g!="function"&&typeof g!="symbol"?s.setAttribute(d,g):s.removeAttribute(d);break;case"cols":case"rows":case"size":case"span":g!=null&&typeof g!="function"&&typeof g!="symbol"&&!isNaN(g)&&1<=g?s.setAttribute(d,g):s.removeAttribute(d);break;case"rowSpan":case"start":g==null||typeof g=="function"||typeof g=="symbol"||isNaN(g)?s.removeAttribute(d):s.setAttribute(d,g);break;case"popover":bt("beforetoggle",s),bt("toggle",s),tp(s,"popover",g);break;case"xlinkActuate":ho(s,"http://www.w3.org/1999/xlink","xlink:actuate",g);break;case"xlinkArcrole":ho(s,"http://www.w3.org/1999/xlink","xlink:arcrole",g);break;case"xlinkRole":ho(s,"http://www.w3.org/1999/xlink","xlink:role",g);break;case"xlinkShow":ho(s,"http://www.w3.org/1999/xlink","xlink:show",g);break;case"xlinkTitle":ho(s,"http://www.w3.org/1999/xlink","xlink:title",g);break;case"xlinkType":ho(s,"http://www.w3.org/1999/xlink","xlink:type",g);break;case"xmlBase":ho(s,"http://www.w3.org/XML/1998/namespace","xml:base",g);break;case"xmlLang":ho(s,"http://www.w3.org/XML/1998/namespace","xml:lang",g);break;case"xmlSpace":ho(s,"http://www.w3.org/XML/1998/namespace","xml:space",g);break;case"is":tp(s,"is",g);break;case"innerText":case"textContent":break;default:(!(2<d.length)||d[0]!=="o"&&d[0]!=="O"||d[1]!=="n"&&d[1]!=="N")&&(d=lB.get(d)||d,tp(s,d,g))}}function l0(s,l,d,g,w,R){switch(d){case"style":zE(s,g,R);break;case"dangerouslySetInnerHTML":if(g!=null){if(typeof g!="object"||!("__html"in g))throw Error(r(61));if(d=g.__html,d!=null){if(w.children!=null)throw Error(r(60));s.innerHTML=d}}break;case"children":typeof g=="string"?gu(s,g):(typeof g=="number"||typeof g=="bigint")&&gu(s,""+g);break;case"onScroll":g!=null&&bt("scroll",s);break;case"onScrollEnd":g!=null&&bt("scrollend",s);break;case"onClick":g!=null&&(s.onclick=po);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!ME.hasOwnProperty(d))e:{if(d[0]==="o"&&d[1]==="n"&&(w=d.endsWith("Capture"),l=d.slice(2,w?d.length-7:void 0),R=s[Ln]||null,R=R!=null?R[d]:null,typeof R=="function"&&s.removeEventListener(l,R,w),typeof g=="function")){typeof R!="function"&&R!==null&&(d in s?s[d]=null:s.hasAttribute(d)&&s.removeAttribute(d)),s.addEventListener(l,g,w);break e}d in s?s[d]=g:g===!0?s.setAttribute(d,""):tp(s,d,g)}}}function Un(s,l,d){switch(l){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":bt("error",s),bt("load",s);var g=!1,w=!1,R;for(R in d)if(d.hasOwnProperty(R)){var P=d[R];if(P!=null)switch(R){case"src":g=!0;break;case"srcSet":w=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(r(137,l));default:Gt(s,l,R,P,d,null)}}w&&Gt(s,l,"srcSet",d.srcSet,d,null),g&&Gt(s,l,"src",d.src,d,null);return;case"input":bt("invalid",s);var V=R=P=w=null,Q=null,de=null;for(g in d)if(d.hasOwnProperty(g)){var be=d[g];if(be!=null)switch(g){case"name":w=be;break;case"type":P=be;break;case"checked":Q=be;break;case"defaultChecked":de=be;break;case"value":R=be;break;case"defaultValue":V=be;break;case"children":case"dangerouslySetInnerHTML":if(be!=null)throw Error(r(137,l));break;default:Gt(s,l,g,be,d,null)}}IE(s,R,V,Q,de,P,w,!1);return;case"select":bt("invalid",s),g=P=R=null;for(w in d)if(d.hasOwnProperty(w)&&(V=d[w],V!=null))switch(w){case"value":R=V;break;case"defaultValue":P=V;break;case"multiple":g=V;default:Gt(s,l,w,V,d,null)}l=R,d=P,s.multiple=!!g,l!=null?mu(s,!!g,l,!1):d!=null&&mu(s,!!g,d,!0);return;case"textarea":bt("invalid",s),R=w=g=null;for(P in d)if(d.hasOwnProperty(P)&&(V=d[P],V!=null))switch(P){case"value":g=V;break;case"defaultValue":w=V;break;case"children":R=V;break;case"dangerouslySetInnerHTML":if(V!=null)throw Error(r(91));break;default:Gt(s,l,P,V,d,null)}LE(s,g,w,R);return;case"option":for(Q in d)if(d.hasOwnProperty(Q)&&(g=d[Q],g!=null))switch(Q){case"selected":s.selected=g&&typeof g!="function"&&typeof g!="symbol";break;default:Gt(s,l,Q,g,d,null)}return;case"dialog":bt("beforetoggle",s),bt("toggle",s),bt("cancel",s),bt("close",s);break;case"iframe":case"object":bt("load",s);break;case"video":case"audio":for(g=0;g<od.length;g++)bt(od[g],s);break;case"image":bt("error",s),bt("load",s);break;case"details":bt("toggle",s);break;case"embed":case"source":case"link":bt("error",s),bt("load",s);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(de in d)if(d.hasOwnProperty(de)&&(g=d[de],g!=null))switch(de){case"children":case"dangerouslySetInnerHTML":throw Error(r(137,l));default:Gt(s,l,de,g,d,null)}return;default:if(Sb(l)){for(be in d)d.hasOwnProperty(be)&&(g=d[be],g!==void 0&&l0(s,l,be,g,d,void 0));return}}for(V in d)d.hasOwnProperty(V)&&(g=d[V],g!=null&&Gt(s,l,V,g,d,null))}function N5(s,l,d,g){switch(l){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var w=null,R=null,P=null,V=null,Q=null,de=null,be=null;for(ye in d){var Ee=d[ye];if(d.hasOwnProperty(ye)&&Ee!=null)switch(ye){case"checked":break;case"value":break;case"defaultValue":Q=Ee;default:g.hasOwnProperty(ye)||Gt(s,l,ye,null,g,Ee)}}for(var pe in g){var ye=g[pe];if(Ee=d[pe],g.hasOwnProperty(pe)&&(ye!=null||Ee!=null))switch(pe){case"type":R=ye;break;case"name":w=ye;break;case"checked":de=ye;break;case"defaultChecked":be=ye;break;case"value":P=ye;break;case"defaultValue":V=ye;break;case"children":case"dangerouslySetInnerHTML":if(ye!=null)throw Error(r(137,l));break;default:ye!==Ee&&Gt(s,l,pe,ye,g,Ee)}}xb(s,P,V,Q,de,be,R,w);return;case"select":ye=P=V=pe=null;for(R in d)if(Q=d[R],d.hasOwnProperty(R)&&Q!=null)switch(R){case"value":break;case"multiple":ye=Q;default:g.hasOwnProperty(R)||Gt(s,l,R,null,g,Q)}for(w in g)if(R=g[w],Q=d[w],g.hasOwnProperty(w)&&(R!=null||Q!=null))switch(w){case"value":pe=R;break;case"defaultValue":V=R;break;case"multiple":P=R;default:R!==Q&&Gt(s,l,w,R,g,Q)}l=V,d=P,g=ye,pe!=null?mu(s,!!d,pe,!1):!!g!=!!d&&(l!=null?mu(s,!!d,l,!0):mu(s,!!d,d?[]:"",!1));return;case"textarea":ye=pe=null;for(V in d)if(w=d[V],d.hasOwnProperty(V)&&w!=null&&!g.hasOwnProperty(V))switch(V){case"value":break;case"children":break;default:Gt(s,l,V,null,g,w)}for(P in g)if(w=g[P],R=d[P],g.hasOwnProperty(P)&&(w!=null||R!=null))switch(P){case"value":pe=w;break;case"defaultValue":ye=w;break;case"children":break;case"dangerouslySetInnerHTML":if(w!=null)throw Error(r(91));break;default:w!==R&&Gt(s,l,P,w,g,R)}jE(s,pe,ye);return;case"option":for(var Be in d)if(pe=d[Be],d.hasOwnProperty(Be)&&pe!=null&&!g.hasOwnProperty(Be))switch(Be){case"selected":s.selected=!1;break;default:Gt(s,l,Be,null,g,pe)}for(Q in g)if(pe=g[Q],ye=d[Q],g.hasOwnProperty(Q)&&pe!==ye&&(pe!=null||ye!=null))switch(Q){case"selected":s.selected=pe&&typeof pe!="function"&&typeof pe!="symbol";break;default:Gt(s,l,Q,pe,g,ye)}return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var et in d)pe=d[et],d.hasOwnProperty(et)&&pe!=null&&!g.hasOwnProperty(et)&&Gt(s,l,et,null,g,pe);for(de in g)if(pe=g[de],ye=d[de],g.hasOwnProperty(de)&&pe!==ye&&(pe!=null||ye!=null))switch(de){case"children":case"dangerouslySetInnerHTML":if(pe!=null)throw Error(r(137,l));break;default:Gt(s,l,de,pe,g,ye)}return;default:if(Sb(l)){for(var Vt in d)pe=d[Vt],d.hasOwnProperty(Vt)&&pe!==void 0&&!g.hasOwnProperty(Vt)&&l0(s,l,Vt,void 0,g,pe);for(be in g)pe=g[be],ye=d[be],!g.hasOwnProperty(be)||pe===ye||pe===void 0&&ye===void 0||l0(s,l,be,pe,g,ye);return}}for(var se in d)pe=d[se],d.hasOwnProperty(se)&&pe!=null&&!g.hasOwnProperty(se)&&Gt(s,l,se,null,g,pe);for(Ee in g)pe=g[Ee],ye=d[Ee],!g.hasOwnProperty(Ee)||pe===ye||pe==null&&ye==null||Gt(s,l,Ee,pe,g,ye)}function B_(s){switch(s){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function I5(){if(typeof performance.getEntriesByType=="function"){for(var s=0,l=0,d=performance.getEntriesByType("resource"),g=0;g<d.length;g++){var w=d[g],R=w.transferSize,P=w.initiatorType,V=w.duration;if(R&&V&&B_(P)){for(P=0,V=w.responseEnd,g+=1;g<d.length;g++){var Q=d[g],de=Q.startTime;if(de>V)break;var be=Q.transferSize,Ee=Q.initiatorType;be&&B_(Ee)&&(Q=Q.responseEnd,P+=be*(Q<V?1:(V-de)/(Q-de)))}if(--g,l+=8*(R+P)/(w.duration/1e3),s++,10<s)break}}if(0<s)return l/s/1e6}return navigator.connection&&(s=navigator.connection.downlink,typeof s=="number")?s:5}var u0=null,c0=null;function Jp(s){return s.nodeType===9?s:s.ownerDocument}function U_(s){switch(s){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function H_(s,l){if(s===0)switch(l){case"svg":return 1;case"math":return 2;default:return 0}return s===1&&l==="foreignObject"?0:s}function f0(s,l){return s==="textarea"||s==="noscript"||typeof l.children=="string"||typeof l.children=="number"||typeof l.children=="bigint"||typeof l.dangerouslySetInnerHTML=="object"&&l.dangerouslySetInnerHTML!==null&&l.dangerouslySetInnerHTML.__html!=null}var d0=null;function j5(){var s=window.event;return s&&s.type==="popstate"?s===d0?!1:(d0=s,!0):(d0=null,!1)}var G_=typeof setTimeout=="function"?setTimeout:void 0,L5=typeof clearTimeout=="function"?clearTimeout:void 0,V_=typeof Promise=="function"?Promise:void 0,F5=typeof queueMicrotask=="function"?queueMicrotask:typeof V_<"u"?function(s){return V_.resolve(null).then(s).catch(z5)}:G_;function z5(s){setTimeout(function(){throw s})}function As(s){return s==="head"}function q_(s,l){var d=l,g=0;do{var w=d.nextSibling;if(s.removeChild(d),w&&w.nodeType===8)if(d=w.data,d==="/$"||d==="/&"){if(g===0){s.removeChild(w),Yu(l);return}g--}else if(d==="$"||d==="$?"||d==="$~"||d==="$!"||d==="&")g++;else if(d==="html")ad(s.ownerDocument.documentElement);else if(d==="head"){d=s.ownerDocument.head,ad(d);for(var R=d.firstChild;R;){var P=R.nextSibling,V=R.nodeName;R[kf]||V==="SCRIPT"||V==="STYLE"||V==="LINK"&&R.rel.toLowerCase()==="stylesheet"||d.removeChild(R),R=P}}else d==="body"&&ad(s.ownerDocument.body);d=w}while(d);Yu(l)}function Y_(s,l){var d=s;s=0;do{var g=d.nextSibling;if(d.nodeType===1?l?(d._stashedDisplay=d.style.display,d.style.display="none"):(d.style.display=d._stashedDisplay||"",d.getAttribute("style")===""&&d.removeAttribute("style")):d.nodeType===3&&(l?(d._stashedText=d.nodeValue,d.nodeValue=""):d.nodeValue=d._stashedText||""),g&&g.nodeType===8)if(d=g.data,d==="/$"){if(s===0)break;s--}else d!=="$"&&d!=="$?"&&d!=="$~"&&d!=="$!"||s++;d=g}while(d)}function h0(s){var l=s.firstChild;for(l&&l.nodeType===10&&(l=l.nextSibling);l;){var d=l;switch(l=l.nextSibling,d.nodeName){case"HTML":case"HEAD":case"BODY":h0(d),bb(d);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(d.rel.toLowerCase()==="stylesheet")continue}s.removeChild(d)}}function B5(s,l,d,g){for(;s.nodeType===1;){var w=d;if(s.nodeName.toLowerCase()!==l.toLowerCase()){if(!g&&(s.nodeName!=="INPUT"||s.type!=="hidden"))break}else if(g){if(!s[kf])switch(l){case"meta":if(!s.hasAttribute("itemprop"))break;return s;case"link":if(R=s.getAttribute("rel"),R==="stylesheet"&&s.hasAttribute("data-precedence"))break;if(R!==w.rel||s.getAttribute("href")!==(w.href==null||w.href===""?null:w.href)||s.getAttribute("crossorigin")!==(w.crossOrigin==null?null:w.crossOrigin)||s.getAttribute("title")!==(w.title==null?null:w.title))break;return s;case"style":if(s.hasAttribute("data-precedence"))break;return s;case"script":if(R=s.getAttribute("src"),(R!==(w.src==null?null:w.src)||s.getAttribute("type")!==(w.type==null?null:w.type)||s.getAttribute("crossorigin")!==(w.crossOrigin==null?null:w.crossOrigin))&&R&&s.hasAttribute("async")&&!s.hasAttribute("itemprop"))break;return s;default:return s}}else if(l==="input"&&s.type==="hidden"){var R=w.name==null?null:""+w.name;if(w.type==="hidden"&&s.getAttribute("name")===R)return s}else return s;if(s=ui(s.nextSibling),s===null)break}return null}function U5(s,l,d){if(l==="")return null;for(;s.nodeType!==3;)if((s.nodeType!==1||s.nodeName!=="INPUT"||s.type!=="hidden")&&!d||(s=ui(s.nextSibling),s===null))return null;return s}function W_(s,l){for(;s.nodeType!==8;)if((s.nodeType!==1||s.nodeName!=="INPUT"||s.type!=="hidden")&&!l||(s=ui(s.nextSibling),s===null))return null;return s}function p0(s){return s.data==="$?"||s.data==="$~"}function m0(s){return s.data==="$!"||s.data==="$?"&&s.ownerDocument.readyState!=="loading"}function H5(s,l){var d=s.ownerDocument;if(s.data==="$~")s._reactRetry=l;else if(s.data!=="$?"||d.readyState!=="loading")l();else{var g=function(){l(),d.removeEventListener("DOMContentLoaded",g)};d.addEventListener("DOMContentLoaded",g),s._reactRetry=g}}function ui(s){for(;s!=null;s=s.nextSibling){var l=s.nodeType;if(l===1||l===3)break;if(l===8){if(l=s.data,l==="$"||l==="$!"||l==="$?"||l==="$~"||l==="&"||l==="F!"||l==="F")break;if(l==="/$"||l==="/&")return null}}return s}var g0=null;function K_(s){s=s.nextSibling;for(var l=0;s;){if(s.nodeType===8){var d=s.data;if(d==="/$"||d==="/&"){if(l===0)return ui(s.nextSibling);l--}else d!=="$"&&d!=="$!"&&d!=="$?"&&d!=="$~"&&d!=="&"||l++}s=s.nextSibling}return null}function X_(s){s=s.previousSibling;for(var l=0;s;){if(s.nodeType===8){var d=s.data;if(d==="$"||d==="$!"||d==="$?"||d==="$~"||d==="&"){if(l===0)return s;l--}else d!=="/$"&&d!=="/&"||l++}s=s.previousSibling}return null}function Q_(s,l,d){switch(l=Jp(d),s){case"html":if(s=l.documentElement,!s)throw Error(r(452));return s;case"head":if(s=l.head,!s)throw Error(r(453));return s;case"body":if(s=l.body,!s)throw Error(r(454));return s;default:throw Error(r(451))}}function ad(s){for(var l=s.attributes;l.length;)s.removeAttributeNode(l[0]);bb(s)}var ci=new Map,Z_=new Set;function em(s){return typeof s.getRootNode=="function"?s.getRootNode():s.nodeType===9?s:s.ownerDocument}var Do=U.d;U.d={f:G5,r:V5,D:q5,C:Y5,L:W5,m:K5,X:Q5,S:X5,M:Z5};function G5(){var s=Do.f(),l=Vp();return s||l}function V5(s){var l=du(s);l!==null&&l.tag===5&&l.type==="form"?mR(l):Do.r(s)}var Gu=typeof document>"u"?null:document;function J_(s,l,d){var g=Gu;if(g&&typeof l=="string"&&l){var w=ni(l);w='link[rel="'+s+'"][href="'+w+'"]',typeof d=="string"&&(w+='[crossorigin="'+d+'"]'),Z_.has(w)||(Z_.add(w),s={rel:s,crossOrigin:d,href:l},g.querySelector(w)===null&&(l=g.createElement("link"),Un(l,"link",s),On(l),g.head.appendChild(l)))}}function q5(s){Do.D(s),J_("dns-prefetch",s,null)}function Y5(s,l){Do.C(s,l),J_("preconnect",s,l)}function W5(s,l,d){Do.L(s,l,d);var g=Gu;if(g&&s&&l){var w='link[rel="preload"][as="'+ni(l)+'"]';l==="image"&&d&&d.imageSrcSet?(w+='[imagesrcset="'+ni(d.imageSrcSet)+'"]',typeof d.imageSizes=="string"&&(w+='[imagesizes="'+ni(d.imageSizes)+'"]')):w+='[href="'+ni(s)+'"]';var R=w;switch(l){case"style":R=Vu(s);break;case"script":R=qu(s)}ci.has(R)||(s=p({rel:"preload",href:l==="image"&&d&&d.imageSrcSet?void 0:s,as:l},d),ci.set(R,s),g.querySelector(w)!==null||l==="style"&&g.querySelector(ld(R))||l==="script"&&g.querySelector(ud(R))||(l=g.createElement("link"),Un(l,"link",s),On(l),g.head.appendChild(l)))}}function K5(s,l){Do.m(s,l);var d=Gu;if(d&&s){var g=l&&typeof l.as=="string"?l.as:"script",w='link[rel="modulepreload"][as="'+ni(g)+'"][href="'+ni(s)+'"]',R=w;switch(g){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":R=qu(s)}if(!ci.has(R)&&(s=p({rel:"modulepreload",href:s},l),ci.set(R,s),d.querySelector(w)===null)){switch(g){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(d.querySelector(ud(R)))return}g=d.createElement("link"),Un(g,"link",s),On(g),d.head.appendChild(g)}}}function X5(s,l,d){Do.S(s,l,d);var g=Gu;if(g&&s){var w=hu(g).hoistableStyles,R=Vu(s);l=l||"default";var P=w.get(R);if(!P){var V={loading:0,preload:null};if(P=g.querySelector(ld(R)))V.loading=5;else{s=p({rel:"stylesheet",href:s,"data-precedence":l},d),(d=ci.get(R))&&y0(s,d);var Q=P=g.createElement("link");On(Q),Un(Q,"link",s),Q._p=new Promise(function(de,be){Q.onload=de,Q.onerror=be}),Q.addEventListener("load",function(){V.loading|=1}),Q.addEventListener("error",function(){V.loading|=2}),V.loading|=4,tm(P,l,g)}P={type:"stylesheet",instance:P,count:1,state:V},w.set(R,P)}}}function Q5(s,l){Do.X(s,l);var d=Gu;if(d&&s){var g=hu(d).hoistableScripts,w=qu(s),R=g.get(w);R||(R=d.querySelector(ud(w)),R||(s=p({src:s,async:!0},l),(l=ci.get(w))&&b0(s,l),R=d.createElement("script"),On(R),Un(R,"link",s),d.head.appendChild(R)),R={type:"script",instance:R,count:1,state:null},g.set(w,R))}}function Z5(s,l){Do.M(s,l);var d=Gu;if(d&&s){var g=hu(d).hoistableScripts,w=qu(s),R=g.get(w);R||(R=d.querySelector(ud(w)),R||(s=p({src:s,async:!0,type:"module"},l),(l=ci.get(w))&&b0(s,l),R=d.createElement("script"),On(R),Un(R,"link",s),d.head.appendChild(R)),R={type:"script",instance:R,count:1,state:null},g.set(w,R))}}function eT(s,l,d,g){var w=(w=he.current)?em(w):null;if(!w)throw Error(r(446));switch(s){case"meta":case"title":return null;case"style":return typeof d.precedence=="string"&&typeof d.href=="string"?(l=Vu(d.href),d=hu(w).hoistableStyles,g=d.get(l),g||(g={type:"style",instance:null,count:0,state:null},d.set(l,g)),g):{type:"void",instance:null,count:0,state:null};case"link":if(d.rel==="stylesheet"&&typeof d.href=="string"&&typeof d.precedence=="string"){s=Vu(d.href);var R=hu(w).hoistableStyles,P=R.get(s);if(P||(w=w.ownerDocument||w,P={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},R.set(s,P),(R=w.querySelector(ld(s)))&&!R._p&&(P.instance=R,P.state.loading=5),ci.has(s)||(d={rel:"preload",as:"style",href:d.href,crossOrigin:d.crossOrigin,integrity:d.integrity,media:d.media,hrefLang:d.hrefLang,referrerPolicy:d.referrerPolicy},ci.set(s,d),R||J5(w,s,d,P.state))),l&&g===null)throw Error(r(528,""));return P}if(l&&g!==null)throw Error(r(529,""));return null;case"script":return l=d.async,d=d.src,typeof d=="string"&&l&&typeof l!="function"&&typeof l!="symbol"?(l=qu(d),d=hu(w).hoistableScripts,g=d.get(l),g||(g={type:"script",instance:null,count:0,state:null},d.set(l,g)),g):{type:"void",instance:null,count:0,state:null};default:throw Error(r(444,s))}}function Vu(s){return'href="'+ni(s)+'"'}function ld(s){return'link[rel="stylesheet"]['+s+"]"}function tT(s){return p({},s,{"data-precedence":s.precedence,precedence:null})}function J5(s,l,d,g){s.querySelector('link[rel="preload"][as="style"]['+l+"]")?g.loading=1:(l=s.createElement("link"),g.preload=l,l.addEventListener("load",function(){return g.loading|=1}),l.addEventListener("error",function(){return g.loading|=2}),Un(l,"link",d),On(l),s.head.appendChild(l))}function qu(s){return'[src="'+ni(s)+'"]'}function ud(s){return"script[async]"+s}function nT(s,l,d){if(l.count++,l.instance===null)switch(l.type){case"style":var g=s.querySelector('style[data-href~="'+ni(d.href)+'"]');if(g)return l.instance=g,On(g),g;var w=p({},d,{"data-href":d.href,"data-precedence":d.precedence,href:null,precedence:null});return g=(s.ownerDocument||s).createElement("style"),On(g),Un(g,"style",w),tm(g,d.precedence,s),l.instance=g;case"stylesheet":w=Vu(d.href);var R=s.querySelector(ld(w));if(R)return l.state.loading|=4,l.instance=R,On(R),R;g=tT(d),(w=ci.get(w))&&y0(g,w),R=(s.ownerDocument||s).createElement("link"),On(R);var P=R;return P._p=new Promise(function(V,Q){P.onload=V,P.onerror=Q}),Un(R,"link",g),l.state.loading|=4,tm(R,d.precedence,s),l.instance=R;case"script":return R=qu(d.src),(w=s.querySelector(ud(R)))?(l.instance=w,On(w),w):(g=d,(w=ci.get(R))&&(g=p({},d),b0(g,w)),s=s.ownerDocument||s,w=s.createElement("script"),On(w),Un(w,"link",g),s.head.appendChild(w),l.instance=w);case"void":return null;default:throw Error(r(443,l.type))}else l.type==="stylesheet"&&(l.state.loading&4)===0&&(g=l.instance,l.state.loading|=4,tm(g,d.precedence,s));return l.instance}function tm(s,l,d){for(var g=d.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),w=g.length?g[g.length-1]:null,R=w,P=0;P<g.length;P++){var V=g[P];if(V.dataset.precedence===l)R=V;else if(R!==w)break}R?R.parentNode.insertBefore(s,R.nextSibling):(l=d.nodeType===9?d.head:d,l.insertBefore(s,l.firstChild))}function y0(s,l){s.crossOrigin==null&&(s.crossOrigin=l.crossOrigin),s.referrerPolicy==null&&(s.referrerPolicy=l.referrerPolicy),s.title==null&&(s.title=l.title)}function b0(s,l){s.crossOrigin==null&&(s.crossOrigin=l.crossOrigin),s.referrerPolicy==null&&(s.referrerPolicy=l.referrerPolicy),s.integrity==null&&(s.integrity=l.integrity)}var nm=null;function rT(s,l,d){if(nm===null){var g=new Map,w=nm=new Map;w.set(d,g)}else w=nm,g=w.get(d),g||(g=new Map,w.set(d,g));if(g.has(s))return g;for(g.set(s,null),d=d.getElementsByTagName(s),w=0;w<d.length;w++){var R=d[w];if(!(R[kf]||R[on]||s==="link"&&R.getAttribute("rel")==="stylesheet")&&R.namespaceURI!=="http://www.w3.org/2000/svg"){var P=R.getAttribute(l)||"";P=s+P;var V=g.get(P);V?V.push(R):g.set(P,[R])}}return g}function iT(s,l,d){s=s.ownerDocument||s,s.head.insertBefore(d,l==="title"?s.querySelector("head > title"):null)}function e6(s,l,d){if(d===1||l.itemProp!=null)return!1;switch(s){case"meta":case"title":return!0;case"style":if(typeof l.precedence!="string"||typeof l.href!="string"||l.href==="")break;return!0;case"link":if(typeof l.rel!="string"||typeof l.href!="string"||l.href===""||l.onLoad||l.onError)break;switch(l.rel){case"stylesheet":return s=l.disabled,typeof l.precedence=="string"&&s==null;default:return!0}case"script":if(l.async&&typeof l.async!="function"&&typeof l.async!="symbol"&&!l.onLoad&&!l.onError&&l.src&&typeof l.src=="string")return!0}return!1}function oT(s){return!(s.type==="stylesheet"&&(s.state.loading&3)===0)}function t6(s,l,d,g){if(d.type==="stylesheet"&&(typeof g.media!="string"||matchMedia(g.media).matches!==!1)&&(d.state.loading&4)===0){if(d.instance===null){var w=Vu(g.href),R=l.querySelector(ld(w));if(R){l=R._p,l!==null&&typeof l=="object"&&typeof l.then=="function"&&(s.count++,s=rm.bind(s),l.then(s,s)),d.state.loading|=4,d.instance=R,On(R);return}R=l.ownerDocument||l,g=tT(g),(w=ci.get(w))&&y0(g,w),R=R.createElement("link"),On(R);var P=R;P._p=new Promise(function(V,Q){P.onload=V,P.onerror=Q}),Un(R,"link",g),d.instance=R}s.stylesheets===null&&(s.stylesheets=new Map),s.stylesheets.set(d,l),(l=d.state.preload)&&(d.state.loading&3)===0&&(s.count++,d=rm.bind(s),l.addEventListener("load",d),l.addEventListener("error",d))}}var v0=0;function n6(s,l){return s.stylesheets&&s.count===0&&om(s,s.stylesheets),0<s.count||0<s.imgCount?function(d){var g=setTimeout(function(){if(s.stylesheets&&om(s,s.stylesheets),s.unsuspend){var R=s.unsuspend;s.unsuspend=null,R()}},6e4+l);0<s.imgBytes&&v0===0&&(v0=62500*I5());var w=setTimeout(function(){if(s.waitingForImages=!1,s.count===0&&(s.stylesheets&&om(s,s.stylesheets),s.unsuspend)){var R=s.unsuspend;s.unsuspend=null,R()}},(s.imgBytes>v0?50:800)+l);return s.unsuspend=d,function(){s.unsuspend=null,clearTimeout(g),clearTimeout(w)}}:null}function rm(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)om(this,this.stylesheets);else if(this.unsuspend){var s=this.unsuspend;this.unsuspend=null,s()}}}var im=null;function om(s,l){s.stylesheets=null,s.unsuspend!==null&&(s.count++,im=new Map,l.forEach(r6,s),im=null,rm.call(s))}function r6(s,l){if(!(l.state.loading&4)){var d=im.get(s);if(d)var g=d.get(null);else{d=new Map,im.set(s,d);for(var w=s.querySelectorAll("link[data-precedence],style[data-precedence]"),R=0;R<w.length;R++){var P=w[R];(P.nodeName==="LINK"||P.getAttribute("media")!=="not all")&&(d.set(P.dataset.precedence,P),g=P)}g&&d.set(null,g)}w=l.instance,P=w.getAttribute("data-precedence"),R=d.get(P)||g,R===g&&d.set(null,w),d.set(P,w),this.count++,g=rm.bind(this),w.addEventListener("load",g),w.addEventListener("error",g),R?R.parentNode.insertBefore(w,R.nextSibling):(s=s.nodeType===9?s.head:s,s.insertBefore(w,s.firstChild)),l.state.loading|=4}}var cd={$$typeof:k,Provider:null,Consumer:null,_currentValue:q,_currentValue2:q,_threadCount:0};function i6(s,l,d,g,w,R,P,V,Q){this.tag=1,this.containerInfo=s,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=Fa(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Fa(0),this.hiddenUpdates=Fa(null),this.identifierPrefix=g,this.onUncaughtError=w,this.onCaughtError=R,this.onRecoverableError=P,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=Q,this.incompleteTransitions=new Map}function sT(s,l,d,g,w,R,P,V,Q,de,be,Ee){return s=new i6(s,l,d,P,Q,de,be,Ee,V),l=1,R===!0&&(l|=24),R=Pr(3,null,null,l),s.current=R,R.stateNode=s,l=Zb(),l.refCount++,s.pooledCache=l,l.refCount++,R.memoizedState={element:g,isDehydrated:d,cache:l},nv(R),s}function aT(s){return s?(s=Cu,s):Cu}function lT(s,l,d,g,w,R){w=aT(w),g.context===null?g.context=w:g.pendingContext=w,g=bs(l),g.payload={element:d},R=R===void 0?null:R,R!==null&&(g.callback=R),d=vs(s,g,l),d!==null&&(br(d,s,l),Uf(d,s,l))}function uT(s,l){if(s=s.memoizedState,s!==null&&s.dehydrated!==null){var d=s.retryLane;s.retryLane=d!==0&&d<l?d:l}}function x0(s,l){uT(s,l),(s=s.alternate)&&uT(s,l)}function cT(s){if(s.tag===13||s.tag===31){var l=Ya(s,67108864);l!==null&&br(l,s,67108864),x0(s,67108864)}}function fT(s){if(s.tag===13||s.tag===31){var l=Fr();l=za(l);var d=Ya(s,l);d!==null&&br(d,s,l),x0(s,l)}}var sm=!0;function o6(s,l,d,g){var w=F.T;F.T=null;var R=U.p;try{U.p=2,w0(s,l,d,g)}finally{U.p=R,F.T=w}}function s6(s,l,d,g){var w=F.T;F.T=null;var R=U.p;try{U.p=8,w0(s,l,d,g)}finally{U.p=R,F.T=w}}function w0(s,l,d,g){if(sm){var w=S0(g);if(w===null)a0(s,l,g,am,d),hT(s,g);else if(l6(w,s,l,d,g))g.stopPropagation();else if(hT(s,g),l&4&&-1<a6.indexOf(s)){for(;w!==null;){var R=du(w);if(R!==null)switch(R.tag){case 3:if(R=R.stateNode,R.current.memoizedState.isDehydrated){var P=tn(R.pendingLanes);if(P!==0){var V=R;for(V.pendingLanes|=2,V.entangledLanes|=2;P;){var Q=1<<31-Ne(P);V.entanglements[1]|=Q,P&=~Q}Yi(R),($t&6)===0&&(Hp=_e()+500,id(0))}}break;case 31:case 13:V=Ya(R,2),V!==null&&br(V,R,2),Vp(),x0(R,2)}if(R=S0(g),R===null&&a0(s,l,g,am,d),R===w)break;w=R}w!==null&&g.stopPropagation()}else a0(s,l,g,null,d)}}function S0(s){return s=Eb(s),C0(s)}var am=null;function C0(s){if(am=null,s=fu(s),s!==null){var l=o(s);if(l===null)s=null;else{var d=l.tag;if(d===13){if(s=a(l),s!==null)return s;s=null}else if(d===31){if(s=u(l),s!==null)return s;s=null}else if(d===3){if(l.stateNode.current.memoizedState.isDehydrated)return l.tag===3?l.stateNode.containerInfo:null;s=null}else l!==s&&(s=null)}}return am=s,null}function dT(s){switch(s){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(De()){case ue:return 2;case Se:return 8;case ke:case Pe:return 32;case Le:return 268435456;default:return 32}default:return 32}}var E0=!1,Ds=null,Ms=null,Os=null,fd=new Map,dd=new Map,$s=[],a6="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset".split(" ");function hT(s,l){switch(s){case"focusin":case"focusout":Ds=null;break;case"dragenter":case"dragleave":Ms=null;break;case"mouseover":case"mouseout":Os=null;break;case"pointerover":case"pointerout":fd.delete(l.pointerId);break;case"gotpointercapture":case"lostpointercapture":dd.delete(l.pointerId)}}function hd(s,l,d,g,w,R){return s===null||s.nativeEvent!==R?(s={blockedOn:l,domEventName:d,eventSystemFlags:g,nativeEvent:R,targetContainers:[w]},l!==null&&(l=du(l),l!==null&&cT(l)),s):(s.eventSystemFlags|=g,l=s.targetContainers,w!==null&&l.indexOf(w)===-1&&l.push(w),s)}function l6(s,l,d,g,w){switch(l){case"focusin":return Ds=hd(Ds,s,l,d,g,w),!0;case"dragenter":return Ms=hd(Ms,s,l,d,g,w),!0;case"mouseover":return Os=hd(Os,s,l,d,g,w),!0;case"pointerover":var R=w.pointerId;return fd.set(R,hd(fd.get(R)||null,s,l,d,g,w)),!0;case"gotpointercapture":return R=w.pointerId,dd.set(R,hd(dd.get(R)||null,s,l,d,g,w)),!0}return!1}function pT(s){var l=fu(s.target);if(l!==null){var d=o(l);if(d!==null){if(l=d.tag,l===13){if(l=a(d),l!==null){s.blockedOn=l,Ua(s.priority,function(){fT(d)});return}}else if(l===31){if(l=u(d),l!==null){s.blockedOn=l,Ua(s.priority,function(){fT(d)});return}}else if(l===3&&d.stateNode.current.memoizedState.isDehydrated){s.blockedOn=d.tag===3?d.stateNode.containerInfo:null;return}}}s.blockedOn=null}function lm(s){if(s.blockedOn!==null)return!1;for(var l=s.targetContainers;0<l.length;){var d=S0(s.nativeEvent);if(d===null){d=s.nativeEvent;var g=new d.constructor(d.type,d);Cb=g,d.target.dispatchEvent(g),Cb=null}else return l=du(d),l!==null&&cT(l),s.blockedOn=d,!1;l.shift()}return!0}function mT(s,l,d){lm(s)&&d.delete(l)}function u6(){E0=!1,Ds!==null&&lm(Ds)&&(Ds=null),Ms!==null&&lm(Ms)&&(Ms=null),Os!==null&&lm(Os)&&(Os=null),fd.forEach(mT),dd.forEach(mT)}function um(s,l){s.blockedOn===l&&(s.blockedOn=null,E0||(E0=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,u6)))}var cm=null;function gT(s){cm!==s&&(cm=s,e.unstable_scheduleCallback(e.unstable_NormalPriority,function(){cm===s&&(cm=null);for(var l=0;l<s.length;l+=3){var d=s[l],g=s[l+1],w=s[l+2];if(typeof g!="function"){if(C0(g||d)===null)continue;break}var R=du(d);R!==null&&(s.splice(l,3),l-=3,Sv(R,{pending:!0,data:w,method:d.method,action:g},g,w))}}))}function Yu(s){function l(Q){return um(Q,s)}Ds!==null&&um(Ds,s),Ms!==null&&um(Ms,s),Os!==null&&um(Os,s),fd.forEach(l),dd.forEach(l);for(var d=0;d<$s.length;d++){var g=$s[d];g.blockedOn===s&&(g.blockedOn=null)}for(;0<$s.length&&(d=$s[0],d.blockedOn===null);)pT(d),d.blockedOn===null&&$s.shift();if(d=(s.ownerDocument||s).$$reactFormReplay,d!=null)for(g=0;g<d.length;g+=3){var w=d[g],R=d[g+1],P=w[Ln]||null;if(typeof R=="function")P||gT(d);else if(P){var V=null;if(R&&R.hasAttribute("formAction")){if(w=R,P=R[Ln]||null)V=P.formAction;else if(C0(w)!==null)continue}else V=P.action;typeof V=="function"?d[g+1]=V:(d.splice(g,3),g-=3),gT(d)}}}function yT(){function s(R){R.canIntercept&&R.info==="react-transition"&&R.intercept({handler:function(){return new Promise(function(P){return w=P})},focusReset:"manual",scroll:"manual"})}function l(){w!==null&&(w(),w=null),g||setTimeout(d,20)}function d(){if(!g&&!navigation.transition){var R=navigation.currentEntry;R&&R.url!=null&&navigation.navigate(R.url,{state:R.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var g=!1,w=null;return navigation.addEventListener("navigate",s),navigation.addEventListener("navigatesuccess",l),navigation.addEventListener("navigateerror",l),setTimeout(d,100),function(){g=!0,navigation.removeEventListener("navigate",s),navigation.removeEventListener("navigatesuccess",l),navigation.removeEventListener("navigateerror",l),w!==null&&(w(),w=null)}}}function k0(s){this._internalRoot=s}fm.prototype.render=k0.prototype.render=function(s){var l=this._internalRoot;if(l===null)throw Error(r(409));var d=l.current,g=Fr();lT(d,g,s,l,null,null)},fm.prototype.unmount=k0.prototype.unmount=function(){var s=this._internalRoot;if(s!==null){this._internalRoot=null;var l=s.containerInfo;lT(s.current,2,null,s,null,null),Vp(),l[fo]=null}};function fm(s){this._internalRoot=s}fm.prototype.unstable_scheduleHydration=function(s){if(s){var l=Hi();s={blockedOn:null,target:s,priority:l};for(var d=0;d<$s.length&&l!==0&&l<$s[d].priority;d++);$s.splice(d,0,s),d===0&&pT(s)}};var bT=t.version;if(bT!=="19.2.5")throw Error(r(527,bT,"19.2.5"));U.findDOMNode=function(s){var l=s._reactInternals;if(l===void 0)throw typeof s.render=="function"?Error(r(188)):(s=Object.keys(s).join(","),Error(r(268,s)));return s=f(l),s=s!==null?h(s):null,s=s===null?null:s.stateNode,s};var c6={bundleType:0,version:"19.2.5",rendererPackageName:"react-dom",currentDispatcherRef:F,reconcilerVersion:"19.2.5"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var dm=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!dm.isDisabled&&dm.supportsFiber)try{Ot=dm.inject(c6),Me=dm}catch{}}return md.createRoot=function(s,l){if(!i(s))throw Error(r(299));var d=!1,g="",w=kR,R=RR,P=_R;return l!=null&&(l.unstable_strictMode===!0&&(d=!0),l.identifierPrefix!==void 0&&(g=l.identifierPrefix),l.onUncaughtError!==void 0&&(w=l.onUncaughtError),l.onCaughtError!==void 0&&(R=l.onCaughtError),l.onRecoverableError!==void 0&&(P=l.onRecoverableError)),l=sT(s,1,!1,null,null,d,g,null,w,R,P,yT),s[fo]=l.current,s0(s),new k0(l)},md.hydrateRoot=function(s,l,d){if(!i(s))throw Error(r(299));var g=!1,w="",R=kR,P=RR,V=_R,Q=null;return d!=null&&(d.unstable_strictMode===!0&&(g=!0),d.identifierPrefix!==void 0&&(w=d.identifierPrefix),d.onUncaughtError!==void 0&&(R=d.onUncaughtError),d.onCaughtError!==void 0&&(P=d.onCaughtError),d.onRecoverableError!==void 0&&(V=d.onRecoverableError),d.formState!==void 0&&(Q=d.formState)),l=sT(s,1,!0,l,d??null,g,w,Q,R,P,V,yT),l.context=aT(null),d=l.current,g=Fr(),g=za(g),w=bs(g),w.callback=null,vs(d,w,g),d=g,l.current.lanes=d,Ri(l,d),Yi(l),s[fo]=l.current,s0(s),new fm(l)},md.version="19.2.5",md}var DT;function E6(){if(DT)return A0.exports;DT=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),A0.exports=C6(),A0.exports}var k6=E6(),rf=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(){}},wl,Ys,Ec,SO,R6=(SO=class extends rf{constructor(){super();He(this,wl);He(this,Ys);He(this,Ec);$e(this,Ec,t=>{if(typeof window<"u"&&window.addEventListener){const n=()=>t();return window.addEventListener("visibilitychange",n,!1),()=>{window.removeEventListener("visibilitychange",n)}}})}onSubscribe(){K(this,Ys)||this.setEventListener(K(this,Ec))}onUnsubscribe(){var t;this.hasListeners()||((t=K(this,Ys))==null||t.call(this),$e(this,Ys,void 0))}setEventListener(t){var n;$e(this,Ec,t),(n=K(this,Ys))==null||n.call(this),$e(this,Ys,t(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()}))}setFocused(t){K(this,wl)!==t&&($e(this,wl,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(n=>{n(t)})}isFocused(){var t;return typeof K(this,wl)=="boolean"?K(this,wl):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},wl=new WeakMap,Ys=new WeakMap,Ec=new WeakMap,SO),rS=new R6,_6={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},Ws,tS,CO,T6=(CO=class{constructor(){He(this,Ws,_6);He(this,tS,!1)}setTimeoutProvider(e){$e(this,Ws,e)}setTimeout(e,t){return K(this,Ws).setTimeout(e,t)}clearTimeout(e){K(this,Ws).clearTimeout(e)}setInterval(e,t){return K(this,Ws).setInterval(e,t)}clearInterval(e){K(this,Ws).clearInterval(e)}},Ws=new WeakMap,tS=new WeakMap,CO),ml=new T6;function A6(e){setTimeout(e,0)}var D6=typeof window>"u"||"Deno"in globalThis;function ir(){}function M6(e,t){return typeof e=="function"?e(t):e}function u1(e){return typeof e=="number"&&e>=0&&e!==1/0}function PO(e,t){return Math.max(e+(t||0)-Date.now(),0)}function ca(e,t){return typeof e=="function"?e(t):e}function mi(e,t){return typeof e=="function"?e(t):e}function MT(e,t){const{type:n="all",exact:r,fetchStatus:i,predicate:o,queryKey:a,stale:u}=e;if(a){if(r){if(t.queryHash!==iS(a,t.options))return!1}else if(!Xd(t.queryKey,a))return!1}if(n!=="all"){const c=t.isActive();if(n==="active"&&!c||n==="inactive"&&c)return!1}return!(typeof u=="boolean"&&t.isStale()!==u||i&&i!==t.state.fetchStatus||o&&!o(t))}function OT(e,t){const{exact:n,status:r,predicate:i,mutationKey:o}=e;if(o){if(!t.options.mutationKey)return!1;if(n){if(Fl(t.options.mutationKey)!==Fl(o))return!1}else if(!Xd(t.options.mutationKey,o))return!1}return!(r&&t.state.status!==r||i&&!i(t))}function iS(e,t){return((t==null?void 0:t.queryKeyHashFn)||Fl)(e)}function Fl(e){return JSON.stringify(e,(t,n)=>c1(n)?Object.keys(n).sort().reduce((r,i)=>(r[i]=n[i],r),{}):n)}function Xd(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(n=>Xd(e[n],t[n])):!1}var O6=Object.prototype.hasOwnProperty;function NO(e,t,n=0){if(e===t)return e;if(n>500)return t;const r=$T(e)&&$T(t);if(!r&&!(c1(e)&&c1(t)))return t;const o=(r?e:Object.keys(e)).length,a=r?t:Object.keys(t),u=a.length,c=r?new Array(u):{};let f=0;for(let h=0;h<u;h++){const p=r?h:a[h],m=e[p],y=t[p];if(m===y){c[p]=m,(r?h<o:O6.call(e,p))&&f++;continue}if(m===null||y===null||typeof m!="object"||typeof y!="object"){c[p]=y;continue}const b=NO(m,y,n+1);c[p]=b,b===m&&f++}return o===u&&f===o?e:c}function Rg(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(e[n]!==t[n])return!1;return!0}function $T(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function c1(e){if(!PT(e))return!1;const t=e.constructor;if(t===void 0)return!0;const n=t.prototype;return!(!PT(n)||!n.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function PT(e){return Object.prototype.toString.call(e)==="[object Object]"}function $6(e){return new Promise(t=>{ml.setTimeout(t,e)})}function f1(e,t,n){return typeof n.structuralSharing=="function"?n.structuralSharing(e,t):n.structuralSharing!==!1?NO(e,t):t}function Rh(e){return e}function P6(e,t,n=0){const r=[...e,t];return n&&r.length>n?r.slice(1):r}function N6(e,t,n=0){const r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var oS=Symbol();function IO(e,t){return!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===oS?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function sS(e,t){return typeof e=="function"?e(...t):!!e}function I6(e,t,n){let r=!1,i;return Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(i??(i=t()),r||(r=!0,i.aborted?n():i.addEventListener("abort",n,{once:!0})),i)}),e}var Qd=(()=>{let e=()=>D6;return{isServer(){return e()},setIsServer(t){e=t}}})();function d1(){let e,t;const n=new Promise((i,o)=>{e=i,t=o});n.status="pending",n.catch(()=>{});function r(i){Object.assign(n,i),delete n.resolve,delete n.reject}return n.resolve=i=>{r({status:"fulfilled",value:i}),e(i)},n.reject=i=>{r({status:"rejected",reason:i}),t(i)},n}var j6=A6;function L6(){let e=[],t=0,n=u=>{u()},r=u=>{u()},i=j6;const o=u=>{t?e.push(u):i(()=>{n(u)})},a=()=>{const u=e;e=[],u.length&&i(()=>{r(()=>{u.forEach(c=>{n(c)})})})};return{batch:u=>{let c;t++;try{c=u()}finally{t--,t||a()}return c},batchCalls:u=>(...c)=>{o(()=>{u(...c)})},schedule:o,setNotifyFunction:u=>{n=u},setBatchNotifyFunction:u=>{r=u},setScheduler:u=>{i=u}}}var _n=L6(),kc,Ks,Rc,EO,F6=(EO=class extends rf{constructor(){super();He(this,kc,!0);He(this,Ks);He(this,Rc);$e(this,Rc,t=>{if(typeof window<"u"&&window.addEventListener){const n=()=>t(!0),r=()=>t(!1);return window.addEventListener("online",n,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",n),window.removeEventListener("offline",r)}}})}onSubscribe(){K(this,Ks)||this.setEventListener(K(this,Rc))}onUnsubscribe(){var t;this.hasListeners()||((t=K(this,Ks))==null||t.call(this),$e(this,Ks,void 0))}setEventListener(t){var n;$e(this,Rc,t),(n=K(this,Ks))==null||n.call(this),$e(this,Ks,t(this.setOnline.bind(this)))}setOnline(t){K(this,kc)!==t&&($e(this,kc,t),this.listeners.forEach(r=>{r(t)}))}isOnline(){return K(this,kc)}},kc=new WeakMap,Ks=new WeakMap,Rc=new WeakMap,EO),_g=new F6;function z6(e){return Math.min(1e3*2**e,3e4)}function jO(e){return(e??"online")==="online"?_g.isOnline():!0}var h1=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function LO(e){let t=!1,n=0,r;const i=d1(),o=()=>i.status!=="pending",a=v=>{var S;if(!o()){const x=new h1(v);m(x),(S=e.onCancel)==null||S.call(e,x)}},u=()=>{t=!0},c=()=>{t=!1},f=()=>rS.isFocused()&&(e.networkMode==="always"||_g.isOnline())&&e.canRun(),h=()=>jO(e.networkMode)&&e.canRun(),p=v=>{o()||(r==null||r(),i.resolve(v))},m=v=>{o()||(r==null||r(),i.reject(v))},y=()=>new Promise(v=>{var S;r=x=>{(o()||f())&&v(x)},(S=e.onPause)==null||S.call(e)}).then(()=>{var v;r=void 0,o()||(v=e.onContinue)==null||v.call(e)}),b=()=>{if(o())return;let v;const S=n===0?e.initialPromise:void 0;try{v=S??e.fn()}catch(x){v=Promise.reject(x)}Promise.resolve(v).then(p).catch(x=>{var D;if(o())return;const _=e.retry??(Qd.isServer()?0:3),k=e.retryDelay??z6,T=typeof k=="function"?k(n,x):k,A=_===!0||typeof _=="number"&&n<_||typeof _=="function"&&_(n,x);if(t||!A){m(x);return}n++,(D=e.onFail)==null||D.call(e,n,x),$6(T).then(()=>f()?void 0:y()).then(()=>{t?m(x):b()})})};return{promise:i,status:()=>i.status,cancel:a,continue:()=>(r==null||r(),i),cancelRetry:u,continueRetry:c,canStart:h,start:()=>(h()?b():y().then(b),i)}}var Sl,kO,FO=(kO=class{constructor(){He(this,Sl)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),u1(this.gcTime)&&$e(this,Sl,ml.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(Qd.isServer()?1/0:300*1e3))}clearGcTimeout(){K(this,Sl)!==void 0&&(ml.clearTimeout(K(this,Sl)),$e(this,Sl,void 0))}},Sl=new WeakMap,kO),Cl,_c,hi,El,Pn,vh,kl,Hr,zO,No,RO,B6=(RO=class extends FO{constructor(t){super();He(this,Hr);He(this,Cl);He(this,_c);He(this,hi);He(this,El);He(this,Pn);He(this,vh);He(this,kl);$e(this,kl,!1),$e(this,vh,t.defaultOptions),this.setOptions(t.options),this.observers=[],$e(this,El,t.client),$e(this,hi,K(this,El).getQueryCache()),this.queryKey=t.queryKey,this.queryHash=t.queryHash,$e(this,Cl,IT(this.options)),this.state=t.state??K(this,Cl),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var t;return(t=K(this,Pn))==null?void 0:t.promise}setOptions(t){if(this.options={...K(this,vh),...t},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const n=IT(this.options);n.data!==void 0&&(this.setState(NT(n.data,n.dataUpdatedAt)),$e(this,Cl,n))}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&K(this,hi).remove(this)}setData(t,n){const r=f1(this.state.data,t,this.options);return rt(this,Hr,No).call(this,{data:r,type:"success",dataUpdatedAt:n==null?void 0:n.updatedAt,manual:n==null?void 0:n.manual}),r}setState(t,n){rt(this,Hr,No).call(this,{type:"setState",state:t,setStateOptions:n})}cancel(t){var r,i;const n=(r=K(this,Pn))==null?void 0:r.promise;return(i=K(this,Pn))==null||i.cancel(t),n?n.then(ir).catch(ir):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return K(this,Cl)}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(t=>mi(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===oS||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>ca(t.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(t=>t.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(t=0){return this.state.data===void 0?!0:t==="static"?!1:this.state.isInvalidated?!0:!PO(this.state.dataUpdatedAt,t)}onFocus(){var n;const t=this.observers.find(r=>r.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(n=K(this,Pn))==null||n.continue()}onOnline(){var n;const t=this.observers.find(r=>r.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(n=K(this,Pn))==null||n.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),K(this,hi).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(n=>n!==t),this.observers.length||(K(this,Pn)&&(K(this,kl)||rt(this,Hr,zO).call(this)?K(this,Pn).cancel({revert:!0}):K(this,Pn).cancelRetry()),this.scheduleGc()),K(this,hi).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||rt(this,Hr,No).call(this,{type:"invalidate"})}async fetch(t,n){var c,f,h,p,m,y,b,v,S,x,_,k;if(this.state.fetchStatus!=="idle"&&((c=K(this,Pn))==null?void 0:c.status())!=="rejected"){if(this.state.data!==void 0&&(n!=null&&n.cancelRefetch))this.cancel({silent:!0});else if(K(this,Pn))return K(this,Pn).continueRetry(),K(this,Pn).promise}if(t&&this.setOptions(t),!this.options.queryFn){const T=this.observers.find(A=>A.options.queryFn);T&&this.setOptions(T.options)}const r=new AbortController,i=T=>{Object.defineProperty(T,"signal",{enumerable:!0,get:()=>($e(this,kl,!0),r.signal)})},o=()=>{const T=IO(this.options,n),D=(()=>{const O={client:K(this,El),queryKey:this.queryKey,meta:this.meta};return i(O),O})();return $e(this,kl,!1),this.options.persister?this.options.persister(T,D,this):T(D)},u=(()=>{const T={fetchOptions:n,options:this.options,queryKey:this.queryKey,client:K(this,El),state:this.state,fetchFn:o};return i(T),T})();(f=this.options.behavior)==null||f.onFetch(u,this),$e(this,_c,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((h=u.fetchOptions)==null?void 0:h.meta))&&rt(this,Hr,No).call(this,{type:"fetch",meta:(p=u.fetchOptions)==null?void 0:p.meta}),$e(this,Pn,LO({initialPromise:n==null?void 0:n.initialPromise,fn:u.fetchFn,onCancel:T=>{T instanceof h1&&T.revert&&this.setState({...K(this,_c),fetchStatus:"idle"}),r.abort()},onFail:(T,A)=>{rt(this,Hr,No).call(this,{type:"failed",failureCount:T,error:A})},onPause:()=>{rt(this,Hr,No).call(this,{type:"pause"})},onContinue:()=>{rt(this,Hr,No).call(this,{type:"continue"})},retry:u.options.retry,retryDelay:u.options.retryDelay,networkMode:u.options.networkMode,canRun:()=>!0}));try{const T=await K(this,Pn).start();if(T===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(T),(y=(m=K(this,hi).config).onSuccess)==null||y.call(m,T,this),(v=(b=K(this,hi).config).onSettled)==null||v.call(b,T,this.state.error,this),T}catch(T){if(T instanceof h1){if(T.silent)return K(this,Pn).promise;if(T.revert){if(this.state.data===void 0)throw T;return this.state.data}}throw rt(this,Hr,No).call(this,{type:"error",error:T}),(x=(S=K(this,hi).config).onError)==null||x.call(S,T,this),(k=(_=K(this,hi).config).onSettled)==null||k.call(_,this.state.data,T,this),T}finally{this.scheduleGc()}}},Cl=new WeakMap,_c=new WeakMap,hi=new WeakMap,El=new WeakMap,Pn=new WeakMap,vh=new WeakMap,kl=new WeakMap,Hr=new WeakSet,zO=function(){return this.state.fetchStatus==="paused"&&this.state.status==="pending"},No=function(t){const n=r=>{switch(t.type){case"failed":return{...r,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...r,fetchStatus:"paused"};case"continue":return{...r,fetchStatus:"fetching"};case"fetch":return{...r,...BO(r.data,this.options),fetchMeta:t.meta??null};case"success":const i={...r,...NT(t.data,t.dataUpdatedAt),dataUpdateCount:r.dataUpdateCount+1,...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return $e(this,_c,t.manual?i:void 0),i;case"error":const o=t.error;return{...r,error:o,errorUpdateCount:r.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:r.fetchFailureCount+1,fetchFailureReason:o,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...r,isInvalidated:!0};case"setState":return{...r,...t.state}}};this.state=n(this.state),_n.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate()}),K(this,hi).notify({query:this,type:"updated",action:t})})},RO);function BO(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:jO(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function NT(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:"success"}}function IT(e){const 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 wr,kt,xh,rr,Rl,Tc,Lo,Xs,wh,Ac,Dc,_l,Tl,Qs,Mc,jt,Md,p1,m1,g1,y1,b1,v1,x1,UO,_O,U6=(_O=class extends rf{constructor(t,n){super();He(this,jt);He(this,wr);He(this,kt);He(this,xh);He(this,rr);He(this,Rl);He(this,Tc);He(this,Lo);He(this,Xs);He(this,wh);He(this,Ac);He(this,Dc);He(this,_l);He(this,Tl);He(this,Qs);He(this,Mc,new Set);this.options=n,$e(this,wr,t),$e(this,Xs,null),$e(this,Lo,d1()),this.bindMethods(),this.setOptions(n)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(K(this,kt).addObserver(this),jT(K(this,kt),this.options)?rt(this,jt,Md).call(this):this.updateResult(),rt(this,jt,y1).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return w1(K(this,kt),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return w1(K(this,kt),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,rt(this,jt,b1).call(this),rt(this,jt,v1).call(this),K(this,kt).removeObserver(this)}setOptions(t){const n=this.options,r=K(this,kt);if(this.options=K(this,wr).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof mi(this.options.enabled,K(this,kt))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");rt(this,jt,x1).call(this),K(this,kt).setOptions(this.options),n._defaulted&&!Rg(this.options,n)&&K(this,wr).getQueryCache().notify({type:"observerOptionsUpdated",query:K(this,kt),observer:this});const i=this.hasListeners();i&<(K(this,kt),r,this.options,n)&&rt(this,jt,Md).call(this),this.updateResult(),i&&(K(this,kt)!==r||mi(this.options.enabled,K(this,kt))!==mi(n.enabled,K(this,kt))||ca(this.options.staleTime,K(this,kt))!==ca(n.staleTime,K(this,kt)))&&rt(this,jt,p1).call(this);const o=rt(this,jt,m1).call(this);i&&(K(this,kt)!==r||mi(this.options.enabled,K(this,kt))!==mi(n.enabled,K(this,kt))||o!==K(this,Qs))&&rt(this,jt,g1).call(this,o)}getOptimisticResult(t){const n=K(this,wr).getQueryCache().build(K(this,wr),t),r=this.createResult(n,t);return G6(this,r)&&($e(this,rr,r),$e(this,Tc,this.options),$e(this,Rl,K(this,kt).state)),r}getCurrentResult(){return K(this,rr)}trackResult(t,n){return new Proxy(t,{get:(r,i)=>(this.trackProp(i),n==null||n(i),i==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&K(this,Lo).status==="pending"&&K(this,Lo).reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(r,i))})}trackProp(t){K(this,Mc).add(t)}getCurrentQuery(){return K(this,kt)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const n=K(this,wr).defaultQueryOptions(t),r=K(this,wr).getQueryCache().build(K(this,wr),n);return r.fetch().then(()=>this.createResult(r,n))}fetch(t){return rt(this,jt,Md).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),K(this,rr)))}createResult(t,n){var B;const r=K(this,kt),i=this.options,o=K(this,rr),a=K(this,Rl),u=K(this,Tc),f=t!==r?t.state:K(this,xh),{state:h}=t;let p={...h},m=!1,y;if(n._optimisticResults){const j=this.hasListeners(),N=!j&&jT(t,n),M=j&<(t,r,n,i);(N||M)&&(p={...p,...BO(h.data,t.options)}),n._optimisticResults==="isRestoring"&&(p.fetchStatus="idle")}let{error:b,errorUpdatedAt:v,status:S}=p;y=p.data;let x=!1;if(n.placeholderData!==void 0&&y===void 0&&S==="pending"){let j;o!=null&&o.isPlaceholderData&&n.placeholderData===(u==null?void 0:u.placeholderData)?(j=o.data,x=!0):j=typeof n.placeholderData=="function"?n.placeholderData((B=K(this,Dc))==null?void 0:B.state.data,K(this,Dc)):n.placeholderData,j!==void 0&&(S="success",y=f1(o==null?void 0:o.data,j,n),m=!0)}if(n.select&&y!==void 0&&!x)if(o&&y===(a==null?void 0:a.data)&&n.select===K(this,wh))y=K(this,Ac);else try{$e(this,wh,n.select),y=n.select(y),y=f1(o==null?void 0:o.data,y,n),$e(this,Ac,y),$e(this,Xs,null)}catch(j){$e(this,Xs,j)}K(this,Xs)&&(b=K(this,Xs),y=K(this,Ac),v=Date.now(),S="error");const _=p.fetchStatus==="fetching",k=S==="pending",T=S==="error",A=k&&_,D=y!==void 0,$={status:S,fetchStatus:p.fetchStatus,isPending:k,isSuccess:S==="success",isError:T,isInitialLoading:A,isLoading:A,data:y,dataUpdatedAt:p.dataUpdatedAt,error:b,errorUpdatedAt:v,failureCount:p.fetchFailureCount,failureReason:p.fetchFailureReason,errorUpdateCount:p.errorUpdateCount,isFetched:t.isFetched(),isFetchedAfterMount:p.dataUpdateCount>f.dataUpdateCount||p.errorUpdateCount>f.errorUpdateCount,isFetching:_,isRefetching:_&&!k,isLoadingError:T&&!D,isPaused:p.fetchStatus==="paused",isPlaceholderData:m,isRefetchError:T&&D,isStale:aS(t,n),refetch:this.refetch,promise:K(this,Lo),isEnabled:mi(n.enabled,t)!==!1};if(this.options.experimental_prefetchInRender){const j=$.data!==void 0,N=$.status==="error"&&!j,M=L=>{N?L.reject($.error):j&&L.resolve($.data)},z=()=>{const L=$e(this,Lo,$.promise=d1());M(L)},G=K(this,Lo);switch(G.status){case"pending":t.queryHash===r.queryHash&&M(G);break;case"fulfilled":(N||$.data!==G.value)&&z();break;case"rejected":(!N||$.error!==G.reason)&&z();break}}return $}updateResult(){const t=K(this,rr),n=this.createResult(K(this,kt),this.options);if($e(this,Rl,K(this,kt).state),$e(this,Tc,this.options),K(this,Rl).data!==void 0&&$e(this,Dc,K(this,kt)),Rg(n,t))return;$e(this,rr,n);const r=()=>{if(!t)return!0;const{notifyOnChangeProps:i}=this.options,o=typeof i=="function"?i():i;if(o==="all"||!o&&!K(this,Mc).size)return!0;const a=new Set(o??K(this,Mc));return this.options.throwOnError&&a.add("error"),Object.keys(K(this,rr)).some(u=>{const c=u;return K(this,rr)[c]!==t[c]&&a.has(c)})};rt(this,jt,UO).call(this,{listeners:r()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&rt(this,jt,y1).call(this)}},wr=new WeakMap,kt=new WeakMap,xh=new WeakMap,rr=new WeakMap,Rl=new WeakMap,Tc=new WeakMap,Lo=new WeakMap,Xs=new WeakMap,wh=new WeakMap,Ac=new WeakMap,Dc=new WeakMap,_l=new WeakMap,Tl=new WeakMap,Qs=new WeakMap,Mc=new WeakMap,jt=new WeakSet,Md=function(t){rt(this,jt,x1).call(this);let n=K(this,kt).fetch(this.options,t);return t!=null&&t.throwOnError||(n=n.catch(ir)),n},p1=function(){rt(this,jt,b1).call(this);const t=ca(this.options.staleTime,K(this,kt));if(Qd.isServer()||K(this,rr).isStale||!u1(t))return;const r=PO(K(this,rr).dataUpdatedAt,t)+1;$e(this,_l,ml.setTimeout(()=>{K(this,rr).isStale||this.updateResult()},r))},m1=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(K(this,kt)):this.options.refetchInterval)??!1},g1=function(t){rt(this,jt,v1).call(this),$e(this,Qs,t),!(Qd.isServer()||mi(this.options.enabled,K(this,kt))===!1||!u1(K(this,Qs))||K(this,Qs)===0)&&$e(this,Tl,ml.setInterval(()=>{(this.options.refetchIntervalInBackground||rS.isFocused())&&rt(this,jt,Md).call(this)},K(this,Qs)))},y1=function(){rt(this,jt,p1).call(this),rt(this,jt,g1).call(this,rt(this,jt,m1).call(this))},b1=function(){K(this,_l)!==void 0&&(ml.clearTimeout(K(this,_l)),$e(this,_l,void 0))},v1=function(){K(this,Tl)!==void 0&&(ml.clearInterval(K(this,Tl)),$e(this,Tl,void 0))},x1=function(){const t=K(this,wr).getQueryCache().build(K(this,wr),this.options);if(t===K(this,kt))return;const n=K(this,kt);$e(this,kt,t),$e(this,xh,t.state),this.hasListeners()&&(n==null||n.removeObserver(this),t.addObserver(this))},UO=function(t){_n.batch(()=>{t.listeners&&this.listeners.forEach(n=>{n(K(this,rr))}),K(this,wr).getQueryCache().notify({query:K(this,kt),type:"observerResultsUpdated"})})},_O);function H6(e,t){return mi(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function jT(e,t){return H6(e,t)||e.state.data!==void 0&&w1(e,t,t.refetchOnMount)}function w1(e,t,n){if(mi(t.enabled,e)!==!1&&ca(t.staleTime,e)!=="static"){const r=typeof n=="function"?n(e):n;return r==="always"||r!==!1&&aS(e,t)}return!1}function LT(e,t,n,r){return(e!==t||mi(r.enabled,e)===!1)&&(!n.suspense||e.state.status!=="error")&&aS(e,n)}function aS(e,t){return mi(t.enabled,e)!==!1&&e.isStaleByTime(ca(t.staleTime,e))}function G6(e,t){return!Rg(e.getCurrentResult(),t)}function FT(e){return{onFetch:(t,n)=>{var h,p,m,y,b;const r=t.options,i=(m=(p=(h=t.fetchOptions)==null?void 0:h.meta)==null?void 0:p.fetchMore)==null?void 0:m.direction,o=((y=t.state.data)==null?void 0:y.pages)||[],a=((b=t.state.data)==null?void 0:b.pageParams)||[];let u={pages:[],pageParams:[]},c=0;const f=async()=>{let v=!1;const S=k=>{I6(k,()=>t.signal,()=>v=!0)},x=IO(t.options,t.fetchOptions),_=async(k,T,A)=>{if(v)return Promise.reject();if(T==null&&k.pages.length)return Promise.resolve(k);const O=(()=>{const N={client:t.client,queryKey:t.queryKey,pageParam:T,direction:A?"backward":"forward",meta:t.options.meta};return S(N),N})(),$=await x(O),{maxPages:B}=t.options,j=A?N6:P6;return{pages:j(k.pages,$,B),pageParams:j(k.pageParams,T,B)}};if(i&&o.length){const k=i==="backward",T=k?V6:zT,A={pages:o,pageParams:a},D=T(r,A);u=await _(A,D,k)}else{const k=e??o.length;do{const T=c===0?a[0]??r.initialPageParam:zT(r,u);if(c>0&&T==null)break;u=await _(u,T),c++}while(c<k)}return u};t.options.persister?t.fetchFn=()=>{var v,S;return(S=(v=t.options).persister)==null?void 0:S.call(v,f,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n)}:t.fetchFn=f}}}function zT(e,{pages:t,pageParams:n}){const r=t.length-1;return t.length>0?e.getNextPageParam(t[r],t,n[r],n):void 0}function V6(e,{pages:t,pageParams:n}){var r;return t.length>0?(r=e.getPreviousPageParam)==null?void 0:r.call(e,t[0],t,n[0],n):void 0}var Sh,Ji,Kn,Al,eo,Fs,TO,q6=(TO=class extends FO{constructor(t){super();He(this,eo);He(this,Sh);He(this,Ji);He(this,Kn);He(this,Al);$e(this,Sh,t.client),this.mutationId=t.mutationId,$e(this,Kn,t.mutationCache),$e(this,Ji,[]),this.state=t.state||HO(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){K(this,Ji).includes(t)||(K(this,Ji).push(t),this.clearGcTimeout(),K(this,Kn).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){$e(this,Ji,K(this,Ji).filter(n=>n!==t)),this.scheduleGc(),K(this,Kn).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){K(this,Ji).length||(this.state.status==="pending"?this.scheduleGc():K(this,Kn).remove(this))}continue(){var t;return((t=K(this,Al))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var a,u,c,f,h,p,m,y,b,v,S,x,_,k,T,A,D,O;const n=()=>{rt(this,eo,Fs).call(this,{type:"continue"})},r={client:K(this,Sh),meta:this.options.meta,mutationKey:this.options.mutationKey};$e(this,Al,LO({fn:()=>this.options.mutationFn?this.options.mutationFn(t,r):Promise.reject(new Error("No mutationFn found")),onFail:($,B)=>{rt(this,eo,Fs).call(this,{type:"failed",failureCount:$,error:B})},onPause:()=>{rt(this,eo,Fs).call(this,{type:"pause"})},onContinue:n,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>K(this,Kn).canRun(this)}));const i=this.state.status==="pending",o=!K(this,Al).canStart();try{if(i)n();else{rt(this,eo,Fs).call(this,{type:"pending",variables:t,isPaused:o}),K(this,Kn).config.onMutate&&await K(this,Kn).config.onMutate(t,this,r);const B=await((u=(a=this.options).onMutate)==null?void 0:u.call(a,t,r));B!==this.state.context&&rt(this,eo,Fs).call(this,{type:"pending",context:B,variables:t,isPaused:o})}const $=await K(this,Al).start();return await((f=(c=K(this,Kn).config).onSuccess)==null?void 0:f.call(c,$,t,this.state.context,this,r)),await((p=(h=this.options).onSuccess)==null?void 0:p.call(h,$,t,this.state.context,r)),await((y=(m=K(this,Kn).config).onSettled)==null?void 0:y.call(m,$,null,this.state.variables,this.state.context,this,r)),await((v=(b=this.options).onSettled)==null?void 0:v.call(b,$,null,t,this.state.context,r)),rt(this,eo,Fs).call(this,{type:"success",data:$}),$}catch($){try{await((x=(S=K(this,Kn).config).onError)==null?void 0:x.call(S,$,t,this.state.context,this,r))}catch(B){Promise.reject(B)}try{await((k=(_=this.options).onError)==null?void 0:k.call(_,$,t,this.state.context,r))}catch(B){Promise.reject(B)}try{await((A=(T=K(this,Kn).config).onSettled)==null?void 0:A.call(T,void 0,$,this.state.variables,this.state.context,this,r))}catch(B){Promise.reject(B)}try{await((O=(D=this.options).onSettled)==null?void 0:O.call(D,void 0,$,t,this.state.context,r))}catch(B){Promise.reject(B)}throw rt(this,eo,Fs).call(this,{type:"error",error:$}),$}finally{K(this,Kn).runNext(this)}}},Sh=new WeakMap,Ji=new WeakMap,Kn=new WeakMap,Al=new WeakMap,eo=new WeakSet,Fs=function(t){const n=r=>{switch(t.type){case"failed":return{...r,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...r,isPaused:!0};case"continue":return{...r,isPaused:!1};case"pending":return{...r,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...r,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...r,data:void 0,error:t.error,failureCount:r.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=n(this.state),_n.batch(()=>{K(this,Ji).forEach(r=>{r.onMutationUpdate(t)}),K(this,Kn).notify({mutation:this,type:"updated",action:t})})},TO);function HO(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var Fo,$i,Ch,AO,Y6=(AO=class extends rf{constructor(t={}){super();He(this,Fo);He(this,$i);He(this,Ch);this.config=t,$e(this,Fo,new Set),$e(this,$i,new Map),$e(this,Ch,0)}build(t,n,r){const i=new q6({client:t,mutationCache:this,mutationId:++hm(this,Ch)._,options:t.defaultMutationOptions(n),state:r});return this.add(i),i}add(t){K(this,Fo).add(t);const n=pm(t);if(typeof n=="string"){const r=K(this,$i).get(n);r?r.push(t):K(this,$i).set(n,[t])}this.notify({type:"added",mutation:t})}remove(t){if(K(this,Fo).delete(t)){const n=pm(t);if(typeof n=="string"){const r=K(this,$i).get(n);if(r)if(r.length>1){const i=r.indexOf(t);i!==-1&&r.splice(i,1)}else r[0]===t&&K(this,$i).delete(n)}}this.notify({type:"removed",mutation:t})}canRun(t){const n=pm(t);if(typeof n=="string"){const r=K(this,$i).get(n),i=r==null?void 0:r.find(o=>o.state.status==="pending");return!i||i===t}else return!0}runNext(t){var r;const n=pm(t);if(typeof n=="string"){const i=(r=K(this,$i).get(n))==null?void 0:r.find(o=>o!==t&&o.state.isPaused);return(i==null?void 0:i.continue())??Promise.resolve()}else return Promise.resolve()}clear(){_n.batch(()=>{K(this,Fo).forEach(t=>{this.notify({type:"removed",mutation:t})}),K(this,Fo).clear(),K(this,$i).clear()})}getAll(){return Array.from(K(this,Fo))}find(t){const n={exact:!0,...t};return this.getAll().find(r=>OT(n,r))}findAll(t={}){return this.getAll().filter(n=>OT(t,n))}notify(t){_n.batch(()=>{this.listeners.forEach(n=>{n(t)})})}resumePausedMutations(){const t=this.getAll().filter(n=>n.state.isPaused);return _n.batch(()=>Promise.all(t.map(n=>n.continue().catch(ir))))}},Fo=new WeakMap,$i=new WeakMap,Ch=new WeakMap,AO);function pm(e){var t;return(t=e.options.scope)==null?void 0:t.id}var zo,Zs,Sr,Bo,es,ng,S1,DO,W6=(DO=class extends rf{constructor(n,r){super();He(this,es);He(this,zo);He(this,Zs);He(this,Sr);He(this,Bo);$e(this,zo,n),this.setOptions(r),this.bindMethods(),rt(this,es,ng).call(this)}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(n){var i;const r=this.options;this.options=K(this,zo).defaultMutationOptions(n),Rg(this.options,r)||K(this,zo).getMutationCache().notify({type:"observerOptionsUpdated",mutation:K(this,Sr),observer:this}),r!=null&&r.mutationKey&&this.options.mutationKey&&Fl(r.mutationKey)!==Fl(this.options.mutationKey)?this.reset():((i=K(this,Sr))==null?void 0:i.state.status)==="pending"&&K(this,Sr).setOptions(this.options)}onUnsubscribe(){var n;this.hasListeners()||(n=K(this,Sr))==null||n.removeObserver(this)}onMutationUpdate(n){rt(this,es,ng).call(this),rt(this,es,S1).call(this,n)}getCurrentResult(){return K(this,Zs)}reset(){var n;(n=K(this,Sr))==null||n.removeObserver(this),$e(this,Sr,void 0),rt(this,es,ng).call(this),rt(this,es,S1).call(this)}mutate(n,r){var i;return $e(this,Bo,r),(i=K(this,Sr))==null||i.removeObserver(this),$e(this,Sr,K(this,zo).getMutationCache().build(K(this,zo),this.options)),K(this,Sr).addObserver(this),K(this,Sr).execute(n)}},zo=new WeakMap,Zs=new WeakMap,Sr=new WeakMap,Bo=new WeakMap,es=new WeakSet,ng=function(){var r;const n=((r=K(this,Sr))==null?void 0:r.state)??HO();$e(this,Zs,{...n,isPending:n.status==="pending",isSuccess:n.status==="success",isError:n.status==="error",isIdle:n.status==="idle",mutate:this.mutate,reset:this.reset})},S1=function(n){_n.batch(()=>{var r,i,o,a,u,c,f,h;if(K(this,Bo)&&this.hasListeners()){const p=K(this,Zs).variables,m=K(this,Zs).context,y={client:K(this,zo),meta:this.options.meta,mutationKey:this.options.mutationKey};if((n==null?void 0:n.type)==="success"){try{(i=(r=K(this,Bo)).onSuccess)==null||i.call(r,n.data,p,m,y)}catch(b){Promise.reject(b)}try{(a=(o=K(this,Bo)).onSettled)==null||a.call(o,n.data,null,p,m,y)}catch(b){Promise.reject(b)}}else if((n==null?void 0:n.type)==="error"){try{(c=(u=K(this,Bo)).onError)==null||c.call(u,n.error,p,m,y)}catch(b){Promise.reject(b)}try{(h=(f=K(this,Bo)).onSettled)==null||h.call(f,void 0,n.error,p,m,y)}catch(b){Promise.reject(b)}}}this.listeners.forEach(p=>{p(K(this,Zs))})})},DO),to,MO,K6=(MO=class extends rf{constructor(t={}){super();He(this,to);this.config=t,$e(this,to,new Map)}build(t,n,r){const i=n.queryKey,o=n.queryHash??iS(i,n);let a=this.get(o);return a||(a=new B6({client:t,queryKey:i,queryHash:o,options:t.defaultQueryOptions(n),state:r,defaultOptions:t.getQueryDefaults(i)}),this.add(a)),a}add(t){K(this,to).has(t.queryHash)||(K(this,to).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const n=K(this,to).get(t.queryHash);n&&(t.destroy(),n===t&&K(this,to).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){_n.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return K(this,to).get(t)}getAll(){return[...K(this,to).values()]}find(t){const n={exact:!0,...t};return this.getAll().find(r=>MT(n,r))}findAll(t={}){const n=this.getAll();return Object.keys(t).length>0?n.filter(r=>MT(t,r)):n}notify(t){_n.batch(()=>{this.listeners.forEach(n=>{n(t)})})}onFocus(){_n.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){_n.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},to=new WeakMap,MO),ln,Js,ea,Oc,$c,ta,Pc,Nc,OO,X6=(OO=class{constructor(e={}){He(this,ln);He(this,Js);He(this,ea);He(this,Oc);He(this,$c);He(this,ta);He(this,Pc);He(this,Nc);$e(this,ln,e.queryCache||new K6),$e(this,Js,e.mutationCache||new Y6),$e(this,ea,e.defaultOptions||{}),$e(this,Oc,new Map),$e(this,$c,new Map),$e(this,ta,0)}mount(){hm(this,ta)._++,K(this,ta)===1&&($e(this,Pc,rS.subscribe(async e=>{e&&(await this.resumePausedMutations(),K(this,ln).onFocus())})),$e(this,Nc,_g.subscribe(async e=>{e&&(await this.resumePausedMutations(),K(this,ln).onOnline())})))}unmount(){var e,t;hm(this,ta)._--,K(this,ta)===0&&((e=K(this,Pc))==null||e.call(this),$e(this,Pc,void 0),(t=K(this,Nc))==null||t.call(this),$e(this,Nc,void 0))}isFetching(e){return K(this,ln).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return K(this,Js).findAll({...e,status:"pending"}).length}getQueryData(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=K(this,ln).get(t.queryHash))==null?void 0:n.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),n=K(this,ln).build(this,t),r=n.state.data;return r===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(ca(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(r))}getQueriesData(e){return K(this,ln).findAll(e).map(({queryKey:t,state:n})=>{const r=n.data;return[t,r]})}setQueryData(e,t,n){const r=this.defaultQueryOptions({queryKey:e}),i=K(this,ln).get(r.queryHash),o=i==null?void 0:i.state.data,a=M6(t,o);if(a!==void 0)return K(this,ln).build(this,r).setData(a,{...n,manual:!0})}setQueriesData(e,t,n){return _n.batch(()=>K(this,ln).findAll(e).map(({queryKey:r})=>[r,this.setQueryData(r,t,n)]))}getQueryState(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=K(this,ln).get(t.queryHash))==null?void 0:n.state}removeQueries(e){const t=K(this,ln);_n.batch(()=>{t.findAll(e).forEach(n=>{t.remove(n)})})}resetQueries(e,t){const n=K(this,ln);return _n.batch(()=>(n.findAll(e).forEach(r=>{r.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const n={revert:!0,...t},r=_n.batch(()=>K(this,ln).findAll(e).map(i=>i.cancel(n)));return Promise.all(r).then(ir).catch(ir)}invalidateQueries(e,t={}){return _n.batch(()=>(K(this,ln).findAll(e).forEach(n=>{n.invalidate()}),(e==null?void 0:e.refetchType)==="none"?Promise.resolve():this.refetchQueries({...e,type:(e==null?void 0:e.refetchType)??(e==null?void 0:e.type)??"active"},t)))}refetchQueries(e,t={}){const n={...t,cancelRefetch:t.cancelRefetch??!0},r=_n.batch(()=>K(this,ln).findAll(e).filter(i=>!i.isDisabled()&&!i.isStatic()).map(i=>{let o=i.fetch(void 0,n);return n.throwOnError||(o=o.catch(ir)),i.state.fetchStatus==="paused"?Promise.resolve():o}));return Promise.all(r).then(ir)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=K(this,ln).build(this,t);return n.isStaleByTime(ca(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(ir).catch(ir)}fetchInfiniteQuery(e){return e.behavior=FT(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(ir).catch(ir)}ensureInfiniteQueryData(e){return e.behavior=FT(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return _g.isOnline()?K(this,Js).resumePausedMutations():Promise.resolve()}getQueryCache(){return K(this,ln)}getMutationCache(){return K(this,Js)}getDefaultOptions(){return K(this,ea)}setDefaultOptions(e){$e(this,ea,e)}setQueryDefaults(e,t){K(this,Oc).set(Fl(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...K(this,Oc).values()],n={};return t.forEach(r=>{Xd(e,r.queryKey)&&Object.assign(n,r.defaultOptions)}),n}setMutationDefaults(e,t){K(this,$c).set(Fl(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...K(this,$c).values()],n={};return t.forEach(r=>{Xd(e,r.mutationKey)&&Object.assign(n,r.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;const t={...K(this,ea).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=iS(t.queryKey,t)),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!=="always"),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===oS&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...K(this,ea).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){K(this,ln).clear(),K(this,Js).clear()}},ln=new WeakMap,Js=new WeakMap,ea=new WeakMap,Oc=new WeakMap,$c=new WeakMap,ta=new WeakMap,Pc=new WeakMap,Nc=new WeakMap,OO),GO=C.createContext(void 0),ky=e=>{const t=C.useContext(GO);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},Q6=({client:e,children:t})=>(C.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),E.jsx(GO.Provider,{value:e,children:t})),VO=C.createContext(!1),Z6=()=>C.useContext(VO);VO.Provider;function J6(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var e8=C.createContext(J6()),t8=()=>C.useContext(e8),n8=(e,t,n)=>{const r=n!=null&&n.state.error&&typeof e.throwOnError=="function"?sS(e.throwOnError,[n.state.error,n]):e.throwOnError;(e.suspense||e.experimental_prefetchInRender||r)&&(t.isReset()||(e.retryOnMount=!1))},r8=e=>{C.useEffect(()=>{e.clearReset()},[e])},i8=({result:e,errorResetBoundary:t,throwOnError:n,query:r,suspense:i})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&(i&&e.data===void 0||sS(n,[e.error,r])),o8=e=>{if(e.suspense){const n=i=>i==="static"?i:Math.max(i??1e3,1e3),r=e.staleTime;e.staleTime=typeof r=="function"?(...i)=>n(r(...i)):n(r),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3))}},s8=(e,t)=>e.isLoading&&e.isFetching&&!t,a8=(e,t)=>(e==null?void 0:e.suspense)&&t.isPending,BT=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function l8(e,t,n){var m,y,b,v;const r=Z6(),i=t8(),o=ky(),a=o.defaultQueryOptions(e);(y=(m=o.getDefaultOptions().queries)==null?void 0:m._experimental_beforeQuery)==null||y.call(m,a);const u=o.getQueryCache().get(a.queryHash);a._optimisticResults=r?"isRestoring":"optimistic",o8(a),n8(a,i,u),r8(i);const c=!o.getQueryCache().get(a.queryHash),[f]=C.useState(()=>new t(o,a)),h=f.getOptimisticResult(a),p=!r&&e.subscribed!==!1;if(C.useSyncExternalStore(C.useCallback(S=>{const x=p?f.subscribe(_n.batchCalls(S)):ir;return f.updateResult(),x},[f,p]),()=>f.getCurrentResult(),()=>f.getCurrentResult()),C.useEffect(()=>{f.setOptions(a)},[a,f]),a8(a,h))throw BT(a,f,i);if(i8({result:h,errorResetBoundary:i,throwOnError:a.throwOnError,query:u,suspense:a.suspense}))throw h.error;if((v=(b=o.getDefaultOptions().queries)==null?void 0:b._experimental_afterQuery)==null||v.call(b,a,h),a.experimental_prefetchInRender&&!Qd.isServer()&&s8(h,r)){const S=c?BT(a,f,i):u==null?void 0:u.promise;S==null||S.catch(ir).finally(()=>{f.updateResult()})}return a.notifyOnChangeProps?h:f.trackResult(h)}function Kr(e,t){return l8(e,U6)}function UT(e,t){const n=ky(),[r]=C.useState(()=>new W6(n,e));C.useEffect(()=>{r.setOptions(e)},[r,e]);const i=C.useSyncExternalStore(C.useCallback(a=>r.subscribe(_n.batchCalls(a)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),o=C.useCallback((a,u)=>{r.mutate(a,u).catch(ir)},[r]);if(i.error&&sS(r.options.throwOnError,[i.error]))throw i.error;return{...i,mutate:o,mutateAsync:i.mutate}}var Od=typeof window<"u"?C.useLayoutEffect:C.useEffect;function $0(e){const t=C.useRef({value:e,prev:null}),n=t.current.value;return e!==n&&(t.current={value:e,prev:n}),t.current.prev}function u8(e,t,n={},r={}){C.useEffect(()=>{if(!e.current||r.disabled||typeof IntersectionObserver!="function")return;const i=new IntersectionObserver(([o])=>{t(o)},n);return i.observe(e.current),()=>{i.disconnect()}},[t,n,r.disabled,e])}function c8(e){const t=C.useRef(null);return C.useImperativeHandle(e,()=>t.current,[]),t}var qO=!1;function Zd(e){return e[e.length-1]}function f8(e){return typeof e=="function"}function oa(e,t){return f8(e)?e(t):e}var d8=Object.prototype.hasOwnProperty,HT=Object.prototype.propertyIsEnumerable,h8=()=>Object.create(null),sl=(e,t)=>sa(e,t,h8);function sa(e,t,n=()=>({}),r=0){if(e===t)return e;if(r>500)return t;const i=t,o=qT(e)&&qT(i);if(!o&&!(Ic(e)&&Ic(i)))return i;const a=o?e:GT(e);if(!a)return i;const u=o?i:GT(i);if(!u)return i;const c=a.length,f=u.length,h=o?new Array(f):n();let p=0;for(let m=0;m<f;m++){const y=o?m:u[m],b=e[y],v=i[y];if(b===v){h[y]=b,(o?m<c:d8.call(e,y))&&p++;continue}if(b===null||v===null||typeof b!="object"||typeof v!="object"){h[y]=v;continue}const S=sa(b,v,n,r+1);h[y]=S,S===b&&p++}return c===f&&p===c?e:h}function GT(e){const t=Object.getOwnPropertyNames(e);for(const i of t)if(!HT.call(e,i))return!1;const n=Object.getOwnPropertySymbols(e);if(n.length===0)return t;const r=t;for(const i of n){if(!HT.call(e,i))return!1;r.push(i)}return r}function Ic(e){if(!VT(e))return!1;const t=e.constructor;if(typeof t>"u")return!0;const n=t.prototype;return!(!VT(n)||!n.hasOwnProperty("isPrototypeOf"))}function VT(e){return Object.prototype.toString.call(e)==="[object Object]"}function qT(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function Ol(e,t,n){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return!1;for(let r=0,i=e.length;r<i;r++)if(!Ol(e[r],t[r],n))return!1;return!0}if(Ic(e)&&Ic(t)){const r=(n==null?void 0:n.ignoreUndefined)??!0;if(n!=null&&n.partial){for(const a in t)if((!r||t[a]!==void 0)&&!Ol(e[a],t[a],n))return!1;return!0}let i=0;if(!r)i=Object.keys(e).length;else for(const a in e)e[a]!==void 0&&i++;let o=0;for(const a in t)if((!r||t[a]!==void 0)&&(o++,o>i||!Ol(e[a],t[a],n)))return!1;return i===o}return!1}function jc(e){let t,n;const r=new Promise((i,o)=>{t=i,n=o});return r.status="pending",r.resolve=i=>{r.status="resolved",r.value=i,t(i),e==null||e(i)},r.reject=i=>{r.status="rejected",n(i)},r}function Jd(e){return!!(e&&typeof e=="object"&&typeof e.then=="function")}function p8(e){return e.replace(/[\x00-\x1f\x7f]/g,"")}function YT(e){let t;try{t=decodeURI(e)}catch{t=e.replaceAll(/%[0-9A-F]{2}/gi,n=>{try{return decodeURI(n)}catch{return n}})}return p8(t)}var m8=["http:","https:","mailto:","tel:"];function Tg(e,t){if(!e)return!1;try{const n=new URL(e);return!t.has(n.protocol)}catch{return!1}}function gd(e){if(!e)return{path:e,handledProtocolRelativeURL:!1};if(!/[%\\\x00-\x1f\x7f]/.test(e)&&!e.startsWith("//"))return{path:e,handledProtocolRelativeURL:!1};const t=/%25|%5C/gi;let n=0,r="",i;for(;(i=t.exec(e))!==null;)r+=YT(e.slice(n,i.index))+i[0],n=t.lastIndex;r=r+YT(n?e.slice(n):e);let o=!1;return r.startsWith("//")&&(o=!0,r="/"+r.replace(/^\/+/,"")),{path:r,handledProtocolRelativeURL:o}}function g8(e){return/\s|[^\u0000-\u007F]/.test(e)?e.replace(/\s|[^\u0000-\u007F]/gu,encodeURIComponent):e}function y8(e,t){if(e===t)return!0;if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}function Wo(){throw new Error("Invariant failed")}function eh(e){const t=new Map;let n,r;const i=o=>{o.next&&(o.prev?(o.prev.next=o.next,o.next.prev=o.prev,o.next=void 0,r&&(r.next=o,o.prev=r)):(o.next.prev=void 0,n=o.next,o.next=void 0,r&&(o.prev=r,r.next=o)),r=o)};return{get(o){const a=t.get(o);if(a)return i(a),a.value},set(o,a){if(t.size>=e&&n){const c=n;t.delete(c.key),c.next&&(n=c.next,c.next.prev=void 0),c===r&&(r=void 0)}const u=t.get(o);if(u)u.value=a,i(u);else{const c={key:o,value:a,prev:r};r&&(r.next=c),r=c,n||(n=c),t.set(o,c)}},clear(){t.clear(),n=void 0,r=void 0}}}var gl=4,YO=5;function b8(e){const t=e.indexOf("{");if(t===-1)return null;const n=e.indexOf("}",t);return n===-1||t+1>=e.length?null:[t,n]}function lS(e,t,n=new Uint16Array(6)){const r=e.indexOf("/",t),i=r===-1?e.length:r,o=e.substring(t,i);if(!o||!o.includes("$"))return n[0]=0,n[1]=t,n[2]=t,n[3]=i,n[4]=i,n[5]=i,n;if(o==="$"){const u=e.length;return n[0]=2,n[1]=t,n[2]=t,n[3]=u,n[4]=u,n[5]=u,n}if(o.charCodeAt(0)===36)return n[0]=1,n[1]=t,n[2]=t+1,n[3]=i,n[4]=i,n[5]=i,n;const a=b8(o);if(a){const[u,c]=a,f=o.charCodeAt(u+1);if(f===45){if(u+2<o.length&&o.charCodeAt(u+2)===36){const h=u+3,p=c;if(h<p)return n[0]=3,n[1]=t+u,n[2]=t+h,n[3]=t+p,n[4]=t+c+1,n[5]=i,n}}else if(f===36){const h=u+1,p=u+2;return p===c?(n[0]=2,n[1]=t+u,n[2]=t+h,n[3]=t+p,n[4]=t+c+1,n[5]=e.length,n):(n[0]=1,n[1]=t+u,n[2]=t+p,n[3]=t+c,n[4]=t+c+1,n[5]=i,n)}}return n[0]=0,n[1]=t,n[2]=t,n[3]=i,n[4]=i,n[5]=i,n}function Ry(e,t,n,r,i,o,a){var c,f,h,p,m,y,b,v,S,x,_,k,T;a==null||a(n);let u=r;{const A=n.fullPath??n.from,D=A.length,O=((c=n.options)==null?void 0:c.caseSensitive)??e,$=!!((h=(f=n.options)==null?void 0:f.params)!=null&&h.parse&&((m=(p=n.options)==null?void 0:p.skipRouteOnParseError)!=null&&m.params));for(;u<D;){const j=lS(A,u,t);let N;const M=u,z=j[5];switch(u=z+1,o++,j[0]){case 0:{const G=A.substring(j[2],j[3]);if(O){const L=(y=i.static)==null?void 0:y.get(G);if(L)N=L;else{i.static??(i.static=new Map);const F=yl(n.fullPath??n.from);F.parent=i,F.depth=o,N=F,i.static.set(G,F)}}else{const L=G.toLowerCase(),F=(b=i.staticInsensitive)==null?void 0:b.get(L);if(F)N=F;else{i.staticInsensitive??(i.staticInsensitive=new Map);const U=yl(n.fullPath??n.from);U.parent=i,U.depth=o,N=U,i.staticInsensitive.set(L,U)}}break}case 1:{const G=A.substring(M,j[1]),L=A.substring(j[4],z),F=O&&!!(G||L),U=G?F?G:G.toLowerCase():void 0,q=L?F?L:L.toLowerCase():void 0,W=!$&&((v=i.dynamic)==null?void 0:v.find(I=>!I.skipOnParamError&&I.caseSensitive===F&&I.prefix===U&&I.suffix===q));if(W)N=W;else{const I=N0(1,n.fullPath??n.from,F,U,q);N=I,I.depth=o,I.parent=i,i.dynamic??(i.dynamic=[]),i.dynamic.push(I)}break}case 3:{const G=A.substring(M,j[1]),L=A.substring(j[4],z),F=O&&!!(G||L),U=G?F?G:G.toLowerCase():void 0,q=L?F?L:L.toLowerCase():void 0,W=!$&&((S=i.optional)==null?void 0:S.find(I=>!I.skipOnParamError&&I.caseSensitive===F&&I.prefix===U&&I.suffix===q));if(W)N=W;else{const I=N0(3,n.fullPath??n.from,F,U,q);N=I,I.parent=i,I.depth=o,i.optional??(i.optional=[]),i.optional.push(I)}break}case 2:{const G=A.substring(M,j[1]),L=A.substring(j[4],z),F=O&&!!(G||L),U=G?F?G:G.toLowerCase():void 0,q=L?F?L:L.toLowerCase():void 0,W=N0(2,n.fullPath??n.from,F,U,q);N=W,W.parent=i,W.depth=o,i.wildcard??(i.wildcard=[]),i.wildcard.push(W)}}i=N}if($&&n.children&&!n.isRoot&&n.id&&n.id.charCodeAt(n.id.lastIndexOf("/")+1)===95){const j=yl(n.fullPath??n.from);j.kind=YO,j.parent=i,o++,j.depth=o,i.pathless??(i.pathless=[]),i.pathless.push(j),i=j}const B=(n.path||!n.children)&&!n.isRoot;if(B&&A.endsWith("/")){const j=yl(n.fullPath??n.from);j.kind=gl,j.parent=i,o++,j.depth=o,i.index=j,i=j}i.parse=((_=(x=n.options)==null?void 0:x.params)==null?void 0:_.parse)??null,i.skipOnParamError=$,i.parsingPriority=((T=(k=n.options)==null?void 0:k.skipRouteOnParseError)==null?void 0:T.priority)??0,B&&!i.route&&(i.route=n,i.fullPath=n.fullPath??n.from)}if(n.children)for(const A of n.children)Ry(e,t,A,u,i,o,a)}function P0(e,t){if(e.skipOnParamError&&!t.skipOnParamError)return-1;if(!e.skipOnParamError&&t.skipOnParamError)return 1;if(e.skipOnParamError&&t.skipOnParamError&&(e.parsingPriority||t.parsingPriority))return t.parsingPriority-e.parsingPriority;if(e.prefix&&t.prefix&&e.prefix!==t.prefix){if(e.prefix.startsWith(t.prefix))return-1;if(t.prefix.startsWith(e.prefix))return 1}if(e.suffix&&t.suffix&&e.suffix!==t.suffix){if(e.suffix.endsWith(t.suffix))return-1;if(t.suffix.endsWith(e.suffix))return 1}return e.prefix&&!t.prefix?-1:!e.prefix&&t.prefix?1:e.suffix&&!t.suffix?-1:!e.suffix&&t.suffix?1:e.caseSensitive&&!t.caseSensitive?-1:!e.caseSensitive&&t.caseSensitive?1:0}function Hs(e){var t,n,r;if(e.pathless)for(const i of e.pathless)Hs(i);if(e.static)for(const i of e.static.values())Hs(i);if(e.staticInsensitive)for(const i of e.staticInsensitive.values())Hs(i);if((t=e.dynamic)!=null&&t.length){e.dynamic.sort(P0);for(const i of e.dynamic)Hs(i)}if((n=e.optional)!=null&&n.length){e.optional.sort(P0);for(const i of e.optional)Hs(i)}if((r=e.wildcard)!=null&&r.length){e.wildcard.sort(P0);for(const i of e.wildcard)Hs(i)}}function yl(e){return{kind:0,depth:0,pathless:null,index:null,static:null,staticInsensitive:null,dynamic:null,optional:null,wildcard:null,route:null,fullPath:e,parent:null,parse:null,skipOnParamError:!1,parsingPriority:0}}function N0(e,t,n,r,i){return{kind:e,depth:0,pathless:null,index:null,static:null,staticInsensitive:null,dynamic:null,optional:null,wildcard:null,route:null,fullPath:t,parent:null,parse:null,skipOnParamError:!1,parsingPriority:0,caseSensitive:n,prefix:r,suffix:i}}function v8(e,t){const n=yl("/"),r=new Uint16Array(6);for(const i of e)Ry(!1,r,i,1,n,0);Hs(n),t.masksTree=n,t.flatCache=eh(1e3)}function x8(e,t){e||(e="/");const n=t.flatCache.get(e);if(n)return n;const r=uS(e,t.masksTree);return t.flatCache.set(e,r),r}function w8(e,t,n,r,i){e||(e="/"),r||(r="/");const o=t?`case\0${e}`:e;let a=i.singleCache.get(o);return a||(a=yl("/"),Ry(t,new Uint16Array(6),{from:e},1,a,0),i.singleCache.set(o,a)),uS(r,a,n)}function S8(e,t,n=!1){const r=n?e:`nofuzz\0${e}`,i=t.matchCache.get(r);if(i!==void 0)return i;e||(e="/");let o;try{o=uS(e,t.segmentTree,n)}catch(a){if(a instanceof URIError)o=null;else throw a}return o&&(o.branch=k8(o.route)),t.matchCache.set(r,o),o}function C8(e){return e==="/"?e:e.replace(/\/{1,}$/,"")}function E8(e,t=!1,n){const r=yl(e.fullPath),i=new Uint16Array(6),o={},a={};let u=0;return Ry(t,i,e,1,r,0,c=>{if(n==null||n(c,u),c.id in o&&Wo(),o[c.id]=c,u!==0&&c.path){const f=C8(c.fullPath);(!a[f]||c.fullPath.endsWith("/"))&&(a[f]=c)}u++}),Hs(r),{processedTree:{segmentTree:r,singleCache:eh(1e3),matchCache:eh(1e3),flatCache:null,masksTree:null},routesById:o,routesByPath:a}}function uS(e,t,n=!1){const r=e.split("/"),i=_8(e,r,t,n);if(!i)return null;const[o]=WO(e,r,i);return{route:i.node.route,rawParams:o,parsedParams:i.parsedParams}}function WO(e,t,n){var h,p,m,y,b,v,S,x,_,k;const r=R8(n.node);let i=null;const o=Object.create(null);let a=((h=n.extract)==null?void 0:h.part)??0,u=((p=n.extract)==null?void 0:p.node)??0,c=((m=n.extract)==null?void 0:m.path)??0,f=((y=n.extract)==null?void 0:y.segment)??0;for(;u<r.length;a++,u++,c++,f++){const T=r[u];if(T.kind===gl)break;if(T.kind===YO){f--,a--,c--;continue}const A=t[a],D=c;if(A&&(c+=A.length),T.kind===1){i??(i=n.node.fullPath.split("/"));const O=i[f],$=((b=T.prefix)==null?void 0:b.length)??0;if(O.charCodeAt($)===123){const B=((v=T.suffix)==null?void 0:v.length)??0,j=O.substring($+2,O.length-B-1),N=A.substring($,A.length-B);o[j]=decodeURIComponent(N)}else{const B=O.substring(1);o[B]=decodeURIComponent(A)}}else if(T.kind===3){if(n.skipped&1<<u){a--,c=D-1;continue}i??(i=n.node.fullPath.split("/"));const O=i[f],$=((S=T.prefix)==null?void 0:S.length)??0,B=((x=T.suffix)==null?void 0:x.length)??0,j=O.substring($+3,O.length-B-1),N=T.suffix||T.prefix?A.substring($,A.length-B):A;N&&(o[j]=decodeURIComponent(N))}else if(T.kind===2){const O=T,$=e.substring(D+(((_=O.prefix)==null?void 0:_.length)??0),e.length-(((k=O.suffix)==null?void 0:k.length)??0)),B=decodeURIComponent($);o["*"]=B,o._splat=B;break}}return n.rawParams&&Object.assign(o,n.rawParams),[o,{part:a,node:u,path:c,segment:f}]}function k8(e){const t=[e];for(;e.parentRoute;)e=e.parentRoute,t.push(e);return t.reverse(),t}function R8(e){const t=Array(e.depth+1);do t[e.depth]=e,e=e.parent;while(e);return t}function _8(e,t,n,r){if(e==="/"&&n.index)return{node:n.index,skipped:0};const i=!Zd(t),o=i&&e!=="/",a=t.length-(i?1:0),u=[{node:n,index:1,skipped:0,depth:1,statics:1,dynamics:0,optionals:0}];let c=null,f=null,h=null;for(;u.length;){const p=u.pop(),{node:m,index:y,skipped:b,depth:v,statics:S,dynamics:x,optionals:_}=p;let{extract:k,rawParams:T,parsedParams:A}=p;if(m.skipOnParamError){if(!I0(e,t,p))continue;T=p.rawParams,k=p.extract,A=p.parsedParams}r&&m.route&&m.kind!==gl&&yd(f,p)&&(f=p);const D=y===a;if(D&&(m.route&&!o&&yd(h,p)&&(h=p),!m.optional&&!m.wildcard&&!m.index&&!m.pathless))continue;const O=D?void 0:t[y];let $;if(D&&m.index){const B={node:m.index,index:y,skipped:b,depth:v+1,statics:S,dynamics:x,optionals:_,extract:k,rawParams:T,parsedParams:A};let j=!0;if(m.index.skipOnParamError&&(I0(e,t,B)||(j=!1)),j){if(S===a&&!x&&!_&&!b)return B;yd(h,B)&&(h=B)}}if(m.wildcard&&yd(c,p))for(const B of m.wildcard){const{prefix:j,suffix:N}=B;if(j&&(D||!(B.caseSensitive?O:$??($=O.toLowerCase())).startsWith(j)))continue;if(N){if(D)continue;const z=t.slice(y).join("/").slice(-N.length);if((B.caseSensitive?z:z.toLowerCase())!==N)continue}const M={node:B,index:a,skipped:b,depth:v,statics:S,dynamics:x,optionals:_,extract:k,rawParams:T,parsedParams:A};if(!(B.skipOnParamError&&!I0(e,t,M))){c=M;break}}if(m.optional){const B=b|1<<v,j=v+1;for(let N=m.optional.length-1;N>=0;N--){const M=m.optional[N];u.push({node:M,index:y,skipped:B,depth:j,statics:S,dynamics:x,optionals:_,extract:k,rawParams:T,parsedParams:A})}if(!D)for(let N=m.optional.length-1;N>=0;N--){const M=m.optional[N],{prefix:z,suffix:G}=M;if(z||G){const L=M.caseSensitive?O:$??($=O.toLowerCase());if(z&&!L.startsWith(z)||G&&!L.endsWith(G))continue}u.push({node:M,index:y+1,skipped:b,depth:j,statics:S,dynamics:x,optionals:_+1,extract:k,rawParams:T,parsedParams:A})}}if(!D&&m.dynamic&&O)for(let B=m.dynamic.length-1;B>=0;B--){const j=m.dynamic[B],{prefix:N,suffix:M}=j;if(N||M){const z=j.caseSensitive?O:$??($=O.toLowerCase());if(N&&!z.startsWith(N)||M&&!z.endsWith(M))continue}u.push({node:j,index:y+1,skipped:b,depth:v+1,statics:S,dynamics:x+1,optionals:_,extract:k,rawParams:T,parsedParams:A})}if(!D&&m.staticInsensitive){const B=m.staticInsensitive.get($??($=O.toLowerCase()));B&&u.push({node:B,index:y+1,skipped:b,depth:v+1,statics:S+1,dynamics:x,optionals:_,extract:k,rawParams:T,parsedParams:A})}if(!D&&m.static){const B=m.static.get(O);B&&u.push({node:B,index:y+1,skipped:b,depth:v+1,statics:S+1,dynamics:x,optionals:_,extract:k,rawParams:T,parsedParams:A})}if(m.pathless){const B=v+1;for(let j=m.pathless.length-1;j>=0;j--){const N=m.pathless[j];u.push({node:N,index:y,skipped:b,depth:B,statics:S,dynamics:x,optionals:_,extract:k,rawParams:T,parsedParams:A})}}}if(h&&c)return yd(c,h)?h:c;if(h)return h;if(c)return c;if(r&&f){let p=f.index;for(let y=0;y<f.index;y++)p+=t[y].length;const m=p===e.length?"/":e.slice(p);return f.rawParams??(f.rawParams=Object.create(null)),f.rawParams["**"]=decodeURIComponent(m),f}return null}function I0(e,t,n){try{const[r,i]=WO(e,t,n);n.rawParams=r,n.extract=i;const o=n.node.parse(r);return n.parsedParams=Object.assign(Object.create(null),n.parsedParams,o),!0}catch{return null}}function yd(e,t){return e?t.statics>e.statics||t.statics===e.statics&&(t.dynamics>e.dynamics||t.dynamics===e.dynamics&&(t.optionals>e.optionals||t.optionals===e.optionals&&((t.node.kind===gl)>(e.node.kind===gl)||t.node.kind===gl==(e.node.kind===gl)&&t.depth>e.depth))):!0}function rg(e){return cS(e.filter(t=>t!==void 0).join("/"))}function cS(e){return e.replace(/\/{2,}/g,"/")}function KO(e){return e==="/"?e:e.replace(/^\/{1,}/,"")}function fa(e){const t=e.length;return t>1&&e[t-1]==="/"?e.replace(/\/{1,}$/,""):e}function XO(e){return fa(KO(e))}function Ag(e,t){return e!=null&&e.endsWith("/")&&e!=="/"&&e!==`${t}/`?e.slice(0,-1):e}function T8(e,t,n){return Ag(e,n)===Ag(t,n)}function A8({base:e,to:t,trailingSlash:n="never",cache:r}){const i=t.startsWith("/"),o=!i&&t===".";let a;if(r){a=i?t:o?e:e+"\0"+t;const p=r.get(a);if(p)return p}let u;if(o)u=e.split("/");else if(i)u=t.split("/");else{for(u=e.split("/");u.length>1&&Zd(u)==="";)u.pop();const p=t.split("/");for(let m=0,y=p.length;m<y;m++){const b=p[m];b===""?m?m===y-1&&u.push(b):u=[b]:b===".."?u.pop():b==="."||u.push(b)}}u.length>1&&(Zd(u)===""?n==="never"&&u.pop():n==="always"&&u.push(""));let c,f="";for(let p=0;p<u.length;p++){p>0&&(f+="/");const m=u[p];if(!m)continue;c=lS(m,0,c);const y=c[0];if(y===0){f+=m;continue}const b=c[5],v=m.substring(0,c[1]),S=m.substring(c[4],b),x=m.substring(c[2],c[3]);y===1?f+=v||S?`${v}{$${x}}${S}`:`$${x}`:y===2?f+=v||S?`${v}{$}${S}`:"$":f+=`${v}{-$${x}}${S}`}f=cS(f);const h=f||"/";return a&&r&&r.set(a,h),h}function D8(e){const t=new Map(e.map(i=>[encodeURIComponent(i),i])),n=Array.from(t.keys()).map(i=>i.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")).join("|"),r=new RegExp(n,"g");return i=>i.replace(r,o=>t.get(o)??o)}function j0(e,t,n){const r=t[e];return typeof r!="string"?r:e==="_splat"?/^[a-zA-Z0-9\-._~!/]*$/.test(r)?r:r.split("/").map(i=>KT(i,n)).join("/"):KT(r,n)}function WT({path:e,params:t,decoder:n,...r}){let i=!1;const o=Object.create(null);if(!e||e==="/")return{interpolatedPath:"/",usedParams:o,isMissingParams:i};if(!e.includes("$"))return{interpolatedPath:e,usedParams:o,isMissingParams:i};const a=e.length;let u=0,c,f="";for(;u<a;){const h=u;c=lS(e,h,c);const p=c[5];if(u=p+1,h===p)continue;const m=c[0];if(m===0){f+="/"+e.substring(h,p);continue}if(m===2){const y=t._splat;o._splat=y,o["*"]=y;const b=e.substring(h,c[1]),v=e.substring(c[4],p);if(!y){i=!0,(b||v)&&(f+="/"+b+v);continue}const S=j0("_splat",t,n);f+="/"+b+S+v;continue}if(m===1){const y=e.substring(c[2],c[3]);!i&&!(y in t)&&(i=!0),o[y]=t[y];const b=e.substring(h,c[1]),v=e.substring(c[4],p),S=j0(y,t,n)??"undefined";f+="/"+b+S+v;continue}if(m===3){const y=e.substring(c[2],c[3]),b=t[y];if(b==null)continue;o[y]=b;const v=e.substring(h,c[1]),S=e.substring(c[4],p),x=j0(y,t,n)??"";f+="/"+v+x+S;continue}}return e.endsWith("/")&&(f+="/"),{usedParams:o,interpolatedPath:f||"/",isMissingParams:i}}function KT(e,t){const n=encodeURIComponent(e);return(t==null?void 0:t(n))??n}function Jn(e){return(e==null?void 0:e.isNotFound)===!0}function M8(){try{return typeof window<"u"&&typeof window.sessionStorage=="object"?window.sessionStorage:void 0}catch{return}}var O8="tsr-scroll-restoration-v1_3";function $8(){const e=M8();if(!e)return null;let t={};try{const r=JSON.parse(e.getItem("tsr-scroll-restoration-v1_3")||"{}");Ic(r)&&(t=r)}catch{}return{get state(){return t},set:r=>{t=oa(r,t)||t},persist:()=>{try{e.setItem(O8,JSON.stringify(t))}catch{}}}}var XT=$8(),P8=e=>e.state.__TSR_key||e.href;function N8(e){const t=[];let n;for(;n=e.parentNode;)t.push(`${e.tagName}:nth-child(${Array.prototype.indexOf.call(n.children,e)+1})`),e=n;return`${t.reverse().join(" > ")}`.toLowerCase()}var mm=!1,bd="window",QT="data-scroll-restoration-id";function I8(e,t){if(!XT)return;const n=XT;if((e.options.scrollRestoration??!1)&&(e.isScrollRestoring=!0),e.isScrollRestorationSetup||!n)return;e.isScrollRestorationSetup=!0,mm=!1;const r=e.options.getScrollRestorationKey||P8,i=new Map;window.history.scrollRestoration="manual";const o=u=>{if(!(mm||!e.isScrollRestoring))if(u.target===document||u.target===window)i.set(bd,{scrollX:window.scrollX||0,scrollY:window.scrollY||0});else{const c=u.target;i.set(c,{scrollX:c.scrollLeft||0,scrollY:c.scrollTop||0})}},a=u=>{var f;if(!e.isScrollRestoring||!u||i.size===0||!n)return;const c=(f=n.state)[u]||(f[u]={});for(const[h,p]of i){let m;if(h===bd)m=bd;else if(h.isConnected){const y=h.getAttribute(QT);m=y?`[${QT}="${y}"]`:N8(h)}m&&(c[m]=p)}};document.addEventListener("scroll",o,!0),e.subscribe("onBeforeLoad",u=>{a(u.fromLocation?r(u.fromLocation):void 0),i.clear()}),window.addEventListener("pagehide",()=>{a(r(e.stores.resolvedLocation.get()??e.stores.location.get())),n.persist()}),e.subscribe("onRendered",u=>{var p;const c=r(u.toLocation),f=e.options.scrollRestorationBehavior,h=e.options.scrollToTopSelectors;if(i.clear(),!e.resetNextScroll){e.resetNextScroll=!0;return}if(!(typeof e.options.scrollRestoration=="function"&&!e.options.scrollRestoration({location:e.latestLocation}))){mm=!0;try{const m=e.isScrollRestoring?n.state[c]:void 0;let y=!1;if(m)for(const b in m){const v=m[b];if(!Ic(v))continue;const{scrollX:S,scrollY:x}=v;if(!(!Number.isFinite(S)||!Number.isFinite(x))){if(b===bd)window.scrollTo({top:x,left:S,behavior:f}),y=!0;else if(b){let _;try{_=document.querySelector(b)}catch{continue}_&&(_.scrollLeft=S,_.scrollTop=x,y=!0)}}}if(!y){const b=e.history.location.hash.slice(1);if(b){const v=((p=window.history.state)==null?void 0:p.__hashScrollIntoViewOptions)??!0;if(v){const S=document.getElementById(b);S&&S.scrollIntoView(v)}}else{const v={top:0,left:0,behavior:f};if(window.scrollTo(v),h)for(const S of h){if(S===bd)continue;const x=typeof S=="function"?S():document.querySelector(S);x&&x.scrollTo(v)}}}}finally{mm=!1}e.isScrollRestoring&&n.set(m=>(m[c]||(m[c]={}),m))}})}function j8(e,t=String){const n=new URLSearchParams;for(const r in e){const i=e[r];i!==void 0&&n.set(r,t(i))}return n.toString()}function L0(e){return e?e==="false"?!1:e==="true"?!0:+e*0===0&&+e+""===e?+e:e:""}function L8(e){const t=new URLSearchParams(e),n=Object.create(null);for(const[r,i]of t.entries()){const o=n[r];o==null?n[r]=L0(i):Array.isArray(o)?o.push(L0(i)):n[r]=[o,L0(i)]}return n}var F8=B8(JSON.parse),z8=U8(JSON.stringify,JSON.parse);function B8(e){return t=>{t[0]==="?"&&(t=t.substring(1));const n=L8(t);for(const r in n){const i=n[r];if(typeof i=="string")try{n[r]=e(i)}catch{}}return n}}function U8(e,t){const n=typeof t=="function";function r(i){if(typeof i=="object"&&i!==null)try{return e(i)}catch{}else if(n&&typeof i=="string")try{return t(i),e(i)}catch{}return i}return i=>{const o=j8(i,r);return o?`?${o}`:""}}var $l="__root__";function H8(e){if(e.statusCode=e.statusCode||e.code||307,!e._builtLocation&&!e.reloadDocument&&typeof e.href=="string")try{new URL(e.href),e.reloadDocument=!0}catch{}const t=new Headers(e.headers);e.href&&t.get("Location")===null&&t.set("Location",e.href);const n=new Response(null,{status:e.statusCode,headers:t});if(n.options=e,e.throw)throw n;return n}function kr(e){return e instanceof Response&&!!e.options}function G8(e){return{input:({url:t})=>{for(const n of e)t=C1(n,t);return t},output:({url:t})=>{for(let n=e.length-1;n>=0;n--)t=QO(e[n],t);return t}}}function V8(e){const t=XO(e.basepath),n=`/${t}`,r=`${n}/`,i=e.caseSensitive?n:n.toLowerCase(),o=e.caseSensitive?r:r.toLowerCase();return{input:({url:a})=>{const u=e.caseSensitive?a.pathname:a.pathname.toLowerCase();return u===i?a.pathname="/":u.startsWith(o)&&(a.pathname=a.pathname.slice(n.length)),a},output:({url:a})=>(a.pathname=rg(["/",t,a.pathname]),a)}}function C1(e,t){var r;const n=(r=e==null?void 0:e.input)==null?void 0:r.call(e,{url:t});if(n){if(typeof n=="string")return new URL(n);if(n instanceof URL)return n}return t}function QO(e,t){var r;const n=(r=e==null?void 0:e.output)==null?void 0:r.call(e,{url:t});if(n){if(typeof n=="string")return new URL(n);if(n instanceof URL)return n}return t}function q8(e,t){const{createMutableStore:n,createReadonlyStore:r,batch:i,init:o}=t,a=new Map,u=new Map,c=new Map,f=n(e.status),h=n(e.loadedAt),p=n(e.isLoading),m=n(e.isTransitioning),y=n(e.location),b=n(e.resolvedLocation),v=n(e.statusCode),S=n(e.redirect),x=n([]),_=n([]),k=n([]),T=r(()=>F0(a,x.get())),A=r(()=>F0(u,_.get())),D=r(()=>F0(c,k.get())),O=r(()=>x.get()[0]),$=r(()=>x.get().some(U=>{var q;return((q=a.get(U))==null?void 0:q.get().status)==="pending"})),B=r(()=>{var U;return{locationHref:y.get().href,resolvedLocationHref:(U=b.get())==null?void 0:U.href,status:f.get()}}),j=r(()=>({status:f.get(),loadedAt:h.get(),isLoading:p.get(),isTransitioning:m.get(),matches:T.get(),location:y.get(),resolvedLocation:b.get(),statusCode:v.get(),redirect:S.get()})),N=eh(64);function M(U){let q=N.get(U);return q||(q=r(()=>{const W=x.get();for(const I of W){const Y=a.get(I);if(Y&&Y.routeId===U)return Y.get()}}),N.set(U,q)),q}const z={status:f,loadedAt:h,isLoading:p,isTransitioning:m,location:y,resolvedLocation:b,statusCode:v,redirect:S,matchesId:x,pendingIds:_,cachedIds:k,matches:T,pendingMatches:A,cachedMatches:D,firstId:O,hasPending:$,matchRouteDeps:B,matchStores:a,pendingMatchStores:u,cachedMatchStores:c,__store:j,getRouteMatchStore:M,setMatches:G,setPending:L,setCached:F};G(e.matches),o==null||o(z);function G(U){z0(U,a,x,n,i)}function L(U){z0(U,u,_,n,i)}function F(U){z0(U,c,k,n,i)}return z}function F0(e,t){const n=[];for(const r of t){const i=e.get(r);i&&n.push(i.get())}return n}function z0(e,t,n,r,i){const o=e.map(u=>u.id),a=new Set(o);i(()=>{for(const u of t.keys())a.has(u)||t.delete(u);for(const u of e){const c=t.get(u.id);if(!c){const f=r(u);f.routeId=u.routeId,t.set(u.id,f);continue}c.routeId=u.routeId,c.get()!==u&&c.set(u)}y8(n.get(),o)||n.set(o)})}var E1=e=>{var t;if(!e.rendered)return e.rendered=!0,(t=e.onReady)==null?void 0:t.call(e)},Y8=e=>e.stores.matchesId.get().some(t=>{var n;return(n=e.stores.matchStores.get(t))==null?void 0:n.get()._forcePending}),_y=(e,t)=>!!(e.preload&&!e.router.stores.matchStores.has(t)),Pl=(e,t,n=!0)=>{const r={...e.router.options.context??{}},i=n?t:t-1;for(let o=0;o<=i;o++){const a=e.matches[o];if(!a)continue;const u=e.router.getMatch(a.id);u&&Object.assign(r,u.__routeContext,u.__beforeLoadContext)}return r},ZT=(e,t)=>{if(!e.matches.length)return;const n=t.routeId,r=e.matches.findIndex(a=>a.routeId===e.router.routeTree.id),i=r>=0?r:0;let o=n?e.matches.findIndex(a=>a.routeId===n):e.firstBadMatchIndex??e.matches.length-1;o<0&&(o=i);for(let a=o;a>=0;a--){const u=e.matches[a];if(e.router.looseRoutesById[u.routeId].options.notFoundComponent)return a}return n?o:i},aa=(e,t,n)=>{var r,i,o;if(!(!kr(n)&&!Jn(n)))throw kr(n)&&n.redirectHandled&&!n.options.reloadDocument||(t&&((r=t._nonReactive.beforeLoadPromise)==null||r.resolve(),(i=t._nonReactive.loaderPromise)==null||i.resolve(),t._nonReactive.beforeLoadPromise=void 0,t._nonReactive.loaderPromise=void 0,t._nonReactive.error=n,e.updateMatch(t.id,a=>({...a,status:kr(n)?"redirected":Jn(n)?"notFound":a.status==="pending"?"success":a.status,context:Pl(e,t.index),isFetching:!1,error:n})),Jn(n)&&!n.routeId&&(n.routeId=t.routeId),(o=t._nonReactive.loadPromise)==null||o.resolve()),kr(n)&&(e.rendered=!0,n.options._fromLocation=e.location,n.redirectHandled=!0,n=e.router.resolveRedirect(n))),n},ZO=(e,t)=>{const n=e.router.getMatch(t);return!!(!n||n._nonReactive.dehydrated)},JT=(e,t,n)=>{const r=Pl(e,n);e.updateMatch(t,i=>({...i,context:r}))},vd=(e,t,n,r)=>{var u,c;const{id:i,routeId:o}=e.matches[t],a=e.router.looseRoutesById[o];if(n instanceof Promise)throw n;n.routerCode=r,e.firstBadMatchIndex??(e.firstBadMatchIndex=t),aa(e,e.router.getMatch(i),n);try{(c=(u=a.options).onError)==null||c.call(u,n)}catch(f){n=f,aa(e,e.router.getMatch(i),n)}e.updateMatch(i,f=>{var h,p;return(h=f._nonReactive.beforeLoadPromise)==null||h.resolve(),f._nonReactive.beforeLoadPromise=void 0,(p=f._nonReactive.loadPromise)==null||p.resolve(),{...f,error:n,status:"error",isFetching:!1,updatedAt:Date.now(),abortController:new AbortController}}),!e.preload&&!kr(n)&&!Jn(n)&&(e.serialError??(e.serialError=n))},JO=(e,t,n,r)=>{var o;if(r._nonReactive.pendingTimeout!==void 0)return;const i=n.options.pendingMs??e.router.options.defaultPendingMs;if(e.onReady&&!_y(e,t)&&(n.options.loader||n.options.beforeLoad||t$(n))&&typeof i=="number"&&i!==1/0&&(n.options.pendingComponent??((o=e.router.options)==null?void 0:o.defaultPendingComponent))){const a=setTimeout(()=>{E1(e)},i);r._nonReactive.pendingTimeout=a}},W8=(e,t,n)=>{const r=e.router.getMatch(t);if(!r._nonReactive.beforeLoadPromise&&!r._nonReactive.loaderPromise)return;JO(e,t,n,r);const i=()=>{const o=e.router.getMatch(t);o.preload&&(o.status==="redirected"||o.status==="notFound")&&aa(e,o,o.error)};return r._nonReactive.beforeLoadPromise?r._nonReactive.beforeLoadPromise.then(i):i()},K8=(e,t,n,r)=>{const i=e.router.getMatch(t);let o=i._nonReactive.loadPromise;i._nonReactive.loadPromise=jc(()=>{o==null||o.resolve(),o=void 0});const{paramsError:a,searchError:u}=i;a&&vd(e,n,a,"PARSE_PARAMS"),u&&vd(e,n,u,"VALIDATE_SEARCH"),JO(e,t,r,i);const c=new AbortController;let f=!1;const h=()=>{f||(f=!0,e.updateMatch(t,T=>({...T,isFetching:"beforeLoad",fetchCount:T.fetchCount+1,abortController:c})))},p=()=>{var T;(T=i._nonReactive.beforeLoadPromise)==null||T.resolve(),i._nonReactive.beforeLoadPromise=void 0,e.updateMatch(t,A=>({...A,isFetching:!1}))};if(!r.options.beforeLoad){e.router.batch(()=>{h(),p()});return}i._nonReactive.beforeLoadPromise=jc();const m={...Pl(e,n,!1),...i.__routeContext},{search:y,params:b,cause:v}=i,S=_y(e,t),x={search:y,abortController:c,params:b,preload:S,context:m,location:e.location,navigate:T=>e.router.navigate({...T,_fromLocation:e.location}),buildLocation:e.router.buildLocation,cause:S?"preload":v,matches:e.matches,routeId:r.id,...e.router.options.additionalContext},_=T=>{if(T===void 0){e.router.batch(()=>{h(),p()});return}(kr(T)||Jn(T))&&(h(),vd(e,n,T,"BEFORE_LOAD")),e.router.batch(()=>{h(),e.updateMatch(t,A=>({...A,__beforeLoadContext:T})),p()})};let k;try{if(k=r.options.beforeLoad(x),Jd(k))return h(),k.catch(T=>{vd(e,n,T,"BEFORE_LOAD")}).then(_)}catch(T){h(),vd(e,n,T,"BEFORE_LOAD")}_(k)},X8=(e,t)=>{const{id:n,routeId:r}=e.matches[t],i=e.router.looseRoutesById[r],o=()=>u(),a=()=>K8(e,n,t,i),u=()=>{if(ZO(e,n))return;const c=W8(e,n,i);return Jd(c)?c.then(a):a()};return o()},Q8=(e,t,n)=>{var o,a,u,c,f,h;const r=e.router.getMatch(t);if(!r||!n.options.head&&!n.options.scripts&&!n.options.headers)return;const i={ssr:e.router.options.ssr,matches:e.matches,match:r,params:r.params,loaderData:r.loaderData};return Promise.all([(a=(o=n.options).head)==null?void 0:a.call(o,i),(c=(u=n.options).scripts)==null?void 0:c.call(u,i),(h=(f=n.options).headers)==null?void 0:h.call(f,i)]).then(([p,m,y])=>({meta:p==null?void 0:p.meta,links:p==null?void 0:p.links,headScripts:p==null?void 0:p.scripts,headers:y,scripts:m,styles:p==null?void 0:p.styles}))},e$=(e,t,n,r,i)=>{const o=t[r-1],{params:a,loaderDeps:u,abortController:c,cause:f}=e.router.getMatch(n),h=Pl(e,r),p=_y(e,n);return{params:a,deps:u,preload:!!p,parentMatchPromise:o,abortController:c,context:h,location:e.location,navigate:m=>e.router.navigate({...m,_fromLocation:e.location}),cause:p?"preload":f,route:i,...e.router.options.additionalContext}},eA=async(e,t,n,r,i)=>{var o,a,u,c,f;try{const h=e.router.getMatch(n);try{(!(qO??e.router.isServer)||h.ssr===!0)&&th(i);const p=i.options.loader,m=typeof p=="function"?p:p==null?void 0:p.handler,y=m==null?void 0:m(e$(e,t,n,r,i)),b=!!m&&Jd(y);if((b||i._lazyPromise||i._componentsPromise||i.options.head||i.options.scripts||i.options.headers||h._nonReactive.minPendingPromise)&&e.updateMatch(n,S=>({...S,isFetching:"loader"})),m){const S=b?await y:y;aa(e,e.router.getMatch(n),S),S!==void 0&&e.updateMatch(n,x=>({...x,loaderData:S}))}i._lazyPromise&&await i._lazyPromise;const v=h._nonReactive.minPendingPromise;v&&await v,i._componentsPromise&&await i._componentsPromise,e.updateMatch(n,S=>({...S,error:void 0,context:Pl(e,r),status:"success",isFetching:!1,updatedAt:Date.now()}))}catch(p){let m=p;if((m==null?void 0:m.name)==="AbortError"){if(h.abortController.signal.aborted){(o=h._nonReactive.loaderPromise)==null||o.resolve(),h._nonReactive.loaderPromise=void 0;return}e.updateMatch(n,b=>({...b,status:b.status==="pending"?"success":b.status,isFetching:!1,context:Pl(e,r)}));return}const y=h._nonReactive.minPendingPromise;y&&await y,Jn(p)&&await((u=(a=i.options.notFoundComponent)==null?void 0:a.preload)==null?void 0:u.call(a)),aa(e,e.router.getMatch(n),p);try{(f=(c=i.options).onError)==null||f.call(c,p)}catch(b){m=b,aa(e,e.router.getMatch(n),b)}!kr(m)&&!Jn(m)&&await th(i,["errorComponent"]),e.updateMatch(n,b=>({...b,error:m,context:Pl(e,r),status:"error",isFetching:!1}))}}catch(h){const p=e.router.getMatch(n);p&&(p._nonReactive.loaderPromise=void 0),aa(e,p,h)}},Z8=async(e,t,n)=>{var y,b,v,S;async function r(x,_,k,T,A){const D=Date.now()-_.updatedAt,O=x?A.options.preloadStaleTime??e.router.options.defaultPreloadStaleTime??3e4:A.options.staleTime??e.router.options.defaultStaleTime??0,$=A.options.shouldReload,B=typeof $=="function"?$(e$(e,t,i,n,A)):$,{status:j,invalid:N}=T,M=D>=O&&(!!e.forceStaleReload||T.cause==="enter"||k!==void 0&&k!==T.id);a=j==="success"&&(N||(B??M)),x&&A.options.preload===!1||(a&&!e.sync&&h?(u=!0,(async()=>{var z,G;try{await eA(e,t,i,n,A);const L=e.router.getMatch(i);(z=L._nonReactive.loaderPromise)==null||z.resolve(),(G=L._nonReactive.loadPromise)==null||G.resolve(),L._nonReactive.loaderPromise=void 0,L._nonReactive.loadPromise=void 0}catch(L){kr(L)&&await e.router.navigate(L.options)}})()):j!=="success"||a?await eA(e,t,i,n,A):JT(e,i,n))}const{id:i,routeId:o}=e.matches[n];let a=!1,u=!1;const c=e.router.looseRoutesById[o],f=c.options.loader,h=((typeof f=="function"||f==null?void 0:f.staleReloadMode)??e.router.options.defaultStaleReloadMode)!=="blocking";if(ZO(e,i)){if(!e.router.getMatch(i))return e.matches[n];JT(e,i,n)}else{const x=e.router.getMatch(i),_=e.router.stores.matchesId.get()[n],k=((y=_&&e.router.stores.matchStores.get(_)||null)==null?void 0:y.routeId)===o?_:(b=e.router.stores.matches.get().find(A=>A.routeId===o))==null?void 0:b.id,T=_y(e,i);if(x._nonReactive.loaderPromise){if(x.status==="success"&&!e.sync&&!x.preload&&h)return x;await x._nonReactive.loaderPromise;const A=e.router.getMatch(i),D=A._nonReactive.error||A.error;D&&aa(e,A,D),A.status==="pending"&&await r(T,x,k,A,c)}else{const A=T&&!e.router.stores.matchStores.has(i),D=e.router.getMatch(i);D._nonReactive.loaderPromise=jc(),A!==D.preload&&e.updateMatch(i,O=>({...O,preload:A})),await r(T,x,k,D,c)}}const p=e.router.getMatch(i);u||((v=p._nonReactive.loaderPromise)==null||v.resolve(),(S=p._nonReactive.loadPromise)==null||S.resolve(),p._nonReactive.loadPromise=void 0),clearTimeout(p._nonReactive.pendingTimeout),p._nonReactive.pendingTimeout=void 0,u||(p._nonReactive.loaderPromise=void 0),p._nonReactive.dehydrated=void 0;const m=u?p.isFetching:!1;return m!==p.isFetching||p.invalid!==!1?(e.updateMatch(i,x=>({...x,isFetching:m,invalid:!1})),e.router.getMatch(i)):p};async function tA(e){var m,y;const t=e,n=[];Y8(t.router)&&E1(t);let r;for(let b=0;b<t.matches.length;b++){try{const v=X8(t,b);Jd(v)&&await v}catch(v){if(kr(v))throw v;if(Jn(v))r=v;else if(!t.preload)throw v;break}if(t.serialError||t.firstBadMatchIndex!=null)break}const i=t.firstBadMatchIndex??t.matches.length,o=r&&!t.preload?ZT(t,r):void 0,a=r&&t.preload?0:o!==void 0?Math.min(o+1,i):i;let u,c;for(let b=0;b<a;b++)n.push(Z8(t,n,b));try{await Promise.all(n)}catch{const b=await Promise.allSettled(n);for(const v of b){if(v.status!=="rejected")continue;const S=v.reason;if(kr(S))throw S;Jn(S)?u??(u=S):c??(c=S)}if(c!==void 0)throw c}const f=u??(r&&!t.preload?r:void 0);let h=t.firstBadMatchIndex!==void 0?t.firstBadMatchIndex:t.matches.length-1;if(!f&&r&&t.preload)return t.matches;if(f){const b=ZT(t,f);b===void 0&&Wo();const v=t.matches[b],S=t.router.looseRoutesById[v.routeId],x=(m=t.router.options)==null?void 0:m.defaultNotFoundComponent;!S.options.notFoundComponent&&x&&(S.options.notFoundComponent=x),f.routeId=v.routeId;const _=v.routeId===t.router.routeTree.id;t.updateMatch(v.id,k=>({...k,..._?{status:"success",globalNotFound:!0,error:void 0}:{status:"notFound",error:f},isFetching:!1})),h=b,await th(S,["notFoundComponent"])}else if(!t.preload){const b=t.matches[0];b.globalNotFound||(y=t.router.getMatch(b.id))!=null&&y.globalNotFound&&t.updateMatch(b.id,v=>({...v,globalNotFound:!1,error:void 0}))}if(t.serialError&&t.firstBadMatchIndex!==void 0){const b=t.router.looseRoutesById[t.matches[t.firstBadMatchIndex].routeId];await th(b,["errorComponent"])}for(let b=0;b<=h;b++){const{id:v,routeId:S}=t.matches[b],x=t.router.looseRoutesById[S];try{const _=Q8(t,v,x);if(_){const k=await _;t.updateMatch(v,T=>({...T,...k}))}}catch(_){console.error(`Error executing head for route ${S}:`,_)}}const p=E1(t);if(Jd(p)&&await p,f)throw f;if(t.serialError&&!t.preload&&!t.onReady)throw t.serialError;return t.matches}function nA(e,t){const n=t.map(r=>{var i,o;return(o=(i=e.options[r])==null?void 0:i.preload)==null?void 0:o.call(i)}).filter(Boolean);if(n.length!==0)return Promise.all(n)}function th(e,t=ig){!e._lazyLoaded&&e._lazyPromise===void 0&&(e.lazyFn?e._lazyPromise=e.lazyFn().then(r=>{const{id:i,...o}=r.options;Object.assign(e.options,o),e._lazyLoaded=!0,e._lazyPromise=void 0}):e._lazyLoaded=!0);const n=()=>e._componentsLoaded?void 0:t===ig?(()=>{if(e._componentsPromise===void 0){const r=nA(e,ig);r?e._componentsPromise=r.then(()=>{e._componentsLoaded=!0,e._componentsPromise=void 0}):e._componentsLoaded=!0}return e._componentsPromise})():nA(e,t);return e._lazyPromise?e._lazyPromise.then(n):n()}function t$(e){var t;for(const n of ig)if((t=e.options[n])!=null&&t.preload)return!0;return!1}var ig=["component","errorComponent","pendingComponent","notFoundComponent"],da="__TSR_index",rA="popstate",iA="beforeunload";function J8(e){let t=e.getLocation();const n=new Set,r=a=>{t=e.getLocation(),n.forEach(u=>u({location:t,action:a}))},i=a=>{e.notifyOnIndexChange??!0?r(a):t=e.getLocation()},o=async({task:a,navigateOpts:u,...c})=>{var p,m;if((u==null?void 0:u.ignoreBlocker)??!1){a();return}const f=((p=e.getBlockers)==null?void 0:p.call(e))??[],h=c.type==="PUSH"||c.type==="REPLACE";if(typeof document<"u"&&f.length&&h)for(const y of f){const b=Dg(c.path,c.state);if(await y.blockerFn({currentLocation:t,nextLocation:b,action:c.type})){(m=e.onBlocked)==null||m.call(e);return}}a()};return{get location(){return t},get length(){return e.getLength()},subscribers:n,subscribe:a=>(n.add(a),()=>{n.delete(a)}),push:(a,u,c)=>{const f=t.state[da];u=oA(f+1,u),o({task:()=>{e.pushState(a,u),r({type:"PUSH"})},navigateOpts:c,type:"PUSH",path:a,state:u})},replace:(a,u,c)=>{const f=t.state[da];u=oA(f,u),o({task:()=>{e.replaceState(a,u),r({type:"REPLACE"})},navigateOpts:c,type:"REPLACE",path:a,state:u})},go:(a,u)=>{o({task:()=>{e.go(a),i({type:"GO",index:a})},navigateOpts:u,type:"GO"})},back:a=>{o({task:()=>{e.back((a==null?void 0:a.ignoreBlocker)??!1),i({type:"BACK"})},navigateOpts:a,type:"BACK"})},forward:a=>{o({task:()=>{e.forward((a==null?void 0:a.ignoreBlocker)??!1),i({type:"FORWARD"})},navigateOpts:a,type:"FORWARD"})},canGoBack:()=>t.state[da]!==0,createHref:a=>e.createHref(a),block:a=>{var c;if(!e.setBlockers)return()=>{};const u=((c=e.getBlockers)==null?void 0:c.call(e))??[];return e.setBlockers([...u,a]),()=>{var h,p;const f=((h=e.getBlockers)==null?void 0:h.call(e))??[];(p=e.setBlockers)==null||p.call(e,f.filter(m=>m!==a))}},flush:()=>{var a;return(a=e.flush)==null?void 0:a.call(e)},destroy:()=>{var a;return(a=e.destroy)==null?void 0:a.call(e)},notify:r}}function oA(e,t){t||(t={});const n=fS();return{...t,key:n,__TSR_key:n,[da]:e}}function e9(e){var $,B;const t=typeof document<"u"?window:void 0,n=t.history.pushState,r=t.history.replaceState;let i=[];const o=()=>i,a=j=>i=j,u=(j=>j),c=(()=>Dg(`${t.location.pathname}${t.location.search}${t.location.hash}`,t.history.state));if(!(($=t.history.state)!=null&&$.__TSR_key)&&!((B=t.history.state)!=null&&B.key)){const j=fS();t.history.replaceState({[da]:0,key:j,__TSR_key:j},"")}let f=c(),h,p=!1,m=!1,y=!1,b=!1;const v=()=>f;let S,x;const _=()=>{S&&(O._ignoreSubscribers=!0,(S.isPush?t.history.pushState:t.history.replaceState)(S.state,"",S.href),O._ignoreSubscribers=!1,S=void 0,x=void 0,h=void 0)},k=(j,N,M)=>{const z=u(N);x||(h=f),f=Dg(N,M),S={href:z,state:M,isPush:(S==null?void 0:S.isPush)||j==="push"},x||(x=Promise.resolve().then(()=>_()))},T=j=>{f=c(),O.notify({type:j})},A=async()=>{if(m){m=!1;return}const j=c(),N=j.state[da]-f.state[da],M=N===1,z=N===-1,G=!M&&!z||p;p=!1;const L=G?"GO":z?"BACK":"FORWARD",F=G?{type:"GO",index:N}:{type:z?"BACK":"FORWARD"};if(y)y=!1;else{const U=o();if(typeof document<"u"&&U.length){for(const q of U)if(await q.blockerFn({currentLocation:f,nextLocation:j,action:L})){m=!0,t.history.go(1),O.notify(F);return}}}f=c(),O.notify(F)},D=j=>{if(b){b=!1;return}let N=!1;const M=o();if(typeof document<"u"&&M.length)for(const z of M){const G=z.enableBeforeUnload??!0;if(G===!0){N=!0;break}if(typeof G=="function"&&G()===!0){N=!0;break}}if(N)return j.preventDefault(),j.returnValue=""},O=J8({getLocation:v,getLength:()=>t.history.length,pushState:(j,N)=>k("push",j,N),replaceState:(j,N)=>k("replace",j,N),back:j=>(j&&(y=!0),b=!0,t.history.back()),forward:j=>{j&&(y=!0),b=!0,t.history.forward()},go:j=>{p=!0,t.history.go(j)},createHref:j=>u(j),flush:_,destroy:()=>{t.history.pushState=n,t.history.replaceState=r,t.removeEventListener(iA,D,{capture:!0}),t.removeEventListener(rA,A)},onBlocked:()=>{h&&f!==h&&(f=h)},getBlockers:o,setBlockers:a,notifyOnIndexChange:!1});return t.addEventListener(iA,D,{capture:!0}),t.addEventListener(rA,A),t.history.pushState=function(...j){const N=n.apply(t.history,j);return O._ignoreSubscribers||T("PUSH"),N},t.history.replaceState=function(...j){const N=r.apply(t.history,j);return O._ignoreSubscribers||T("REPLACE"),N},O}function t9(e){let t=e.replace(/[\x00-\x1f\x7f]/g,"");return t.startsWith("//")&&(t="/"+t.replace(/^\/+/,"")),t}function Dg(e,t){const n=t9(e),r=n.indexOf("#"),i=n.indexOf("?"),o=fS();return{href:n,pathname:n.substring(0,r>0?i>0?Math.min(r,i):r:i>0?i:n.length),hash:r>-1?n.substring(r):"",search:i>-1?n.slice(i,r===-1?void 0:r):"",state:t||{[da]:0,key:o,__TSR_key:o}}}function fS(){return(Math.random()+1).toString(36).substring(7)}function fc(e,t){const n=t,r=e;return{fromLocation:n,toLocation:r,pathChanged:(n==null?void 0:n.pathname)!==r.pathname,hrefChanged:(n==null?void 0:n.href)!==r.href,hashChanged:(n==null?void 0:n.hash)!==r.hash}}var n9=class{constructor(e,t){this.tempLocationKey=`${Math.round(Math.random()*1e7)}`,this.resetNextScroll=!0,this.shouldViewTransition=void 0,this.isViewTransitionTypesSupported=void 0,this.subscribers=new Set,this.isScrollRestoring=!1,this.isScrollRestorationSetup=!1,this.startTransition=n=>n(),this.update=n=>{var h;const r=this.options,i=this.basepath??(r==null?void 0:r.basepath)??"/",o=this.basepath===void 0,a=r==null?void 0:r.rewrite;if(this.options={...r,...n},this.isServer=this.options.isServer??typeof document>"u",this.protocolAllowlist=new Set(this.options.protocolAllowlist),this.options.pathParamsAllowedCharacters&&(this.pathParamsDecoder=D8(this.options.pathParamsAllowedCharacters)),(!this.history||this.options.history&&this.options.history!==this.history)&&(this.options.history?this.history=this.options.history:this.history=e9()),this.origin=this.options.origin,this.origin||(window!=null&&window.origin&&window.origin!=="null"?this.origin=window.origin:this.origin="http://localhost"),this.history&&this.updateLatestLocation(),this.options.routeTree!==this.routeTree){this.routeTree=this.options.routeTree;let p;this.resolvePathCache=eh(1e3),p=this.buildRouteTree(),this.setRoutes(p)}if(!this.stores&&this.latestLocation){const p=this.getStoreConfig(this);this.batch=p.batch,this.stores=q8(i9(this.latestLocation),p),I8(this)}let u=!1;const c=this.options.basepath??"/",f=this.options.rewrite;if(o||i!==c||a!==f){this.basepath=c;const p=[],m=XO(c);m&&m!=="/"&&p.push(V8({basepath:c})),f&&p.push(f),this.rewrite=p.length===0?void 0:p.length===1?p[0]:G8(p),this.history&&this.updateLatestLocation(),u=!0}u&&this.stores&&this.stores.location.set(this.latestLocation),typeof window<"u"&&"CSS"in window&&typeof((h=window.CSS)==null?void 0:h.supports)=="function"&&(this.isViewTransitionTypesSupported=window.CSS.supports("selector(:active-view-transition-type(a)"))},this.updateLatestLocation=()=>{this.latestLocation=this.parseLocation(this.history.location,this.latestLocation)},this.buildRouteTree=()=>{const n=E8(this.routeTree,this.options.caseSensitive,(r,i)=>{r.init({originalIndex:i})});return this.options.routeMasks&&v8(this.options.routeMasks,n.processedTree),n},this.subscribe=(n,r)=>{const i={eventType:n,fn:r};return this.subscribers.add(i),()=>{this.subscribers.delete(i)}},this.emit=n=>{this.subscribers.forEach(r=>{r.eventType===n.type&&r.fn(n)})},this.parseLocation=(n,r)=>{const i=({pathname:c,search:f,hash:h,href:p,state:m})=>{if(!this.rewrite&&!/[ \x00-\x1f\x7f\u0080-\uffff]/.test(c)){const x=this.options.parseSearch(f),_=this.options.stringifySearch(x);return{href:c+_+h,publicHref:c+_+h,pathname:gd(c).path,external:!1,searchStr:_,search:sl(r==null?void 0:r.search,x),hash:gd(h.slice(1)).path,state:sa(r==null?void 0:r.state,m)}}const y=new URL(p,this.origin),b=C1(this.rewrite,y),v=this.options.parseSearch(b.search),S=this.options.stringifySearch(v);return b.search=S,{href:b.href.replace(b.origin,""),publicHref:p,pathname:gd(b.pathname).path,external:!!this.rewrite&&b.origin!==this.origin,searchStr:S,search:sl(r==null?void 0:r.search,v),hash:gd(b.hash.slice(1)).path,state:sa(r==null?void 0:r.state,m)}},o=i(n),{__tempLocation:a,__tempKey:u}=o.state;if(a&&(!u||u===this.tempLocationKey)){const c=i(a);return c.state.key=o.state.key,c.state.__TSR_key=o.state.__TSR_key,delete c.state.__tempLocation,{...c,maskedLocation:o}}return o},this.resolvePathWithBase=(n,r)=>A8({base:n,to:cS(r),trailingSlash:this.options.trailingSlash,cache:this.resolvePathCache}),this.matchRoutes=(n,r,i)=>typeof n=="string"?this.matchRoutesInternal({pathname:n,search:r},i):this.matchRoutesInternal(n,r),this.getMatchedRoutes=n=>o9({pathname:n,routesById:this.routesById,processedTree:this.processedTree}),this.cancelMatch=n=>{const r=this.getMatch(n);r&&(r.abortController.abort(),clearTimeout(r._nonReactive.pendingTimeout),r._nonReactive.pendingTimeout=void 0)},this.cancelMatches=()=>{this.stores.pendingIds.get().forEach(n=>{this.cancelMatch(n)}),this.stores.matchesId.get().forEach(n=>{var i;if(this.stores.pendingMatchStores.has(n))return;const r=(i=this.stores.matchStores.get(n))==null?void 0:i.get();r&&(r.status==="pending"||r.isFetching==="loader")&&this.cancelMatch(n)})},this.buildLocation=n=>{const r=(o={})=>{var j,N;const a=o._fromLocation||this.pendingBuiltLocation||this.latestLocation,u=this.matchRoutesLightweight(a);o.from;const c=o.unsafeRelative==="path"?a.pathname:o.from??u.fullPath,f=this.resolvePathWithBase(c,"."),h=u.search,p=Object.assign(Object.create(null),u.params),m=o.to?this.resolvePathWithBase(f,`${o.to}`):this.resolvePathWithBase(f,"."),y=o.params===!1||o.params===null?Object.create(null):(o.params??!0)===!0?p:Object.assign(p,oa(o.params,p)),b=this.getMatchedRoutes(m);let v=b.matchedRoutes;if((!b.foundRoute||b.foundRoute.path!=="/"&&b.routeParams["**"])&&this.options.notFoundRoute&&(v=[...v,this.options.notFoundRoute]),Object.keys(y).length>0)for(const M of v){const z=((j=M.options.params)==null?void 0:j.stringify)??M.options.stringifyParams;if(z)try{Object.assign(y,z(y))}catch{}}const S=n.leaveParams?m:gd(WT({path:m,params:y,decoder:this.pathParamsDecoder,server:this.isServer}).interpolatedPath).path;let x=h;if(n._includeValidateSearch&&((N=this.options.search)!=null&&N.strict)){const M={};v.forEach(z=>{if(z.options.validateSearch)try{Object.assign(M,og(z.options.validateSearch,{...M,...x}))}catch{}}),x=M}x=s9({search:x,dest:o,destRoutes:v,_includeValidateSearch:n._includeValidateSearch}),x=sl(h,x);const _=this.options.stringifySearch(x),k=o.hash===!0?a.hash:o.hash?oa(o.hash,a.hash):void 0,T=k?`#${k}`:"";let A=o.state===!0?a.state:o.state?oa(o.state,a.state):{};A=sa(a.state,A);const D=`${S}${_}${T}`;let O,$,B=!1;if(this.rewrite){const M=new URL(D,this.origin),z=QO(this.rewrite,M);O=M.href.replace(M.origin,""),z.origin!==this.origin?($=z.href,B=!0):$=z.pathname+z.search+z.hash}else O=g8(D),$=O;return{publicHref:$,href:O,pathname:S,search:x,searchStr:_,state:A,hash:k??"",external:B,unmaskOnReload:o.unmaskOnReload}},i=(o={},a)=>{const u=r(o);let c=a?r(a):void 0;if(!c){const f=Object.create(null);if(this.options.routeMasks){const h=x8(u.pathname,this.processedTree);if(h){Object.assign(f,h.rawParams);const{from:p,params:m,...y}=h.route,b=m===!1||m===null?Object.create(null):(m??!0)===!0?f:Object.assign(f,oa(m,f));a={from:n.from,...y,params:b},c=r(a)}}}return c&&(u.maskedLocation=c),u};return n.mask?i(n,{from:n.from,...n.mask}):i(n)},this.commitLocation=async({viewTransition:n,ignoreBlocker:r,...i})=>{const o=()=>{const c=["key","__TSR_key","__TSR_index","__hashScrollIntoViewOptions"];c.forEach(h=>{i.state[h]=this.latestLocation.state[h]});const f=Ol(i.state,this.latestLocation.state);return c.forEach(h=>{delete i.state[h]}),f},a=fa(this.latestLocation.href)===fa(i.href);let u=this.commitLocationPromise;if(this.commitLocationPromise=jc(()=>{u==null||u.resolve(),u=void 0}),a&&o())this.load();else{let{maskedLocation:c,hashScrollIntoView:f,...h}=i;c&&(h={...c,state:{...c.state,__tempKey:void 0,__tempLocation:{...h,search:h.searchStr,state:{...h.state,__tempKey:void 0,__tempLocation:void 0,__TSR_key:void 0,key:void 0}}}},(h.unmaskOnReload??this.options.unmaskOnReload??!1)&&(h.state.__tempKey=this.tempLocationKey)),h.state.__hashScrollIntoViewOptions=f??this.options.defaultHashScrollIntoView??!0,this.shouldViewTransition=n,this.history[i.replace?"replace":"push"](h.publicHref,h.state,{ignoreBlocker:r})}return this.resetNextScroll=i.resetScroll??!0,this.history.subscribers.size||this.load(),this.commitLocationPromise},this.buildAndCommitLocation=({replace:n,resetScroll:r,hashScrollIntoView:i,viewTransition:o,ignoreBlocker:a,href:u,...c}={})=>{if(u){const p=this.history.location.state.__TSR_index,m=Dg(u,{__TSR_index:n?p:p+1}),y=new URL(m.pathname,this.origin);c.to=C1(this.rewrite,y).pathname,c.search=this.options.parseSearch(m.search),c.hash=m.hash.slice(1)}const f=this.buildLocation({...c,_includeValidateSearch:!0});this.pendingBuiltLocation=f;const h=this.commitLocation({...f,viewTransition:o,replace:n,resetScroll:r,hashScrollIntoView:i,ignoreBlocker:a});return Promise.resolve().then(()=>{this.pendingBuiltLocation===f&&(this.pendingBuiltLocation=void 0)}),h},this.navigate=async({to:n,reloadDocument:r,href:i,publicHref:o,...a})=>{var c,f;let u=!1;if(i)try{new URL(`${i}`),u=!0}catch{}if(u&&!r&&(r=!0),r){if(n!==void 0||!i){const p=this.buildLocation({to:n,...a});i=i??p.publicHref,o=o??p.publicHref}const h=!u&&o?o:i;if(Tg(h,this.protocolAllowlist))return Promise.resolve();if(!a.ignoreBlocker){const p=((f=(c=this.history).getBlockers)==null?void 0:f.call(c))??[];for(const m of p)if(m!=null&&m.blockerFn&&await m.blockerFn({currentLocation:this.latestLocation,nextLocation:this.latestLocation,action:"PUSH"}))return Promise.resolve()}return a.replace?window.location.replace(h):window.location.href=h,Promise.resolve()}return this.buildAndCommitLocation({...a,href:i,to:n,_isNavigate:!0})},this.beforeLoad=()=>{this.cancelMatches(),this.updateLatestLocation();const n=this.matchRoutes(this.latestLocation),r=this.stores.cachedMatches.get().filter(i=>!n.some(o=>o.id===i.id));this.batch(()=>{this.stores.status.set("pending"),this.stores.statusCode.set(200),this.stores.isLoading.set(!0),this.stores.location.set(this.latestLocation),this.stores.setPending(n),this.stores.setCached(r)})},this.load=async n=>{let r,i,o;const a=this.stores.resolvedLocation.get()??this.stores.location.get();for(o=new Promise(c=>{this.startTransition(async()=>{var f;try{this.beforeLoad();const h=this.latestLocation,p=fc(h,this.stores.resolvedLocation.get());this.stores.redirect.get()||this.emit({type:"onBeforeNavigate",...p}),this.emit({type:"onBeforeLoad",...p}),await tA({router:this,sync:n==null?void 0:n.sync,forceStaleReload:a.href===h.href,matches:this.stores.pendingMatches.get(),location:h,updateMatch:this.updateMatch,onReady:async()=>{this.startTransition(()=>{this.startViewTransition(async()=>{var S,x;let m=null,y=null,b=null,v=null;this.batch(()=>{const _=this.stores.pendingMatches.get(),k=_.length,T=this.stores.matches.get();m=k?T.filter(O=>!this.stores.pendingMatchStores.has(O.id)):null;const A=new Set;for(const O of this.stores.pendingMatchStores.values())O.routeId&&A.add(O.routeId);const D=new Set;for(const O of this.stores.matchStores.values())O.routeId&&D.add(O.routeId);y=k?T.filter(O=>!A.has(O.routeId)):null,b=k?_.filter(O=>!D.has(O.routeId)):null,v=k?_.filter(O=>D.has(O.routeId)):T,this.stores.isLoading.set(!1),this.stores.loadedAt.set(Date.now()),k&&(this.stores.setMatches(_),this.stores.setPending([]),this.stores.setCached([...this.stores.cachedMatches.get(),...m.filter(O=>O.status!=="error"&&O.status!=="notFound"&&O.status!=="redirected")]),this.clearExpiredCache())});for(const[_,k]of[[y,"onLeave"],[b,"onEnter"],[v,"onStay"]])if(_)for(const T of _)(x=(S=this.looseRoutesById[T.routeId].options)[k])==null||x.call(S,T)})})}})}catch(h){kr(h)?(r=h,this.navigate({...r.options,replace:!0,ignoreBlocker:!0})):Jn(h)&&(i=h);const p=r?r.status:i?404:this.stores.matches.get().some(m=>m.status==="error")?500:200;this.batch(()=>{this.stores.statusCode.set(p),this.stores.redirect.set(r)})}this.latestLoadPromise===o&&((f=this.commitLocationPromise)==null||f.resolve(),this.latestLoadPromise=void 0,this.commitLocationPromise=void 0),c()})}),this.latestLoadPromise=o,await o;this.latestLoadPromise&&o!==this.latestLoadPromise;)await this.latestLoadPromise;let u;this.hasNotFoundMatch()?u=404:this.stores.matches.get().some(c=>c.status==="error")&&(u=500),u!==void 0&&this.stores.statusCode.set(u)},this.startViewTransition=n=>{const r=this.shouldViewTransition??this.options.defaultViewTransition;if(this.shouldViewTransition=void 0,r&&typeof document<"u"&&"startViewTransition"in document&&typeof document.startViewTransition=="function"){let i;if(typeof r=="object"&&this.isViewTransitionTypesSupported){const o=this.latestLocation,a=this.stores.resolvedLocation.get(),u=typeof r.types=="function"?r.types(fc(o,a)):r.types;if(u===!1){n();return}i={update:n,types:u}}else i=n;document.startViewTransition(i)}else n()},this.updateMatch=(n,r)=>{this.startTransition(()=>{const i=this.stores.pendingMatchStores.get(n);if(i){i.set(r);return}const o=this.stores.matchStores.get(n);if(o){o.set(r);return}const a=this.stores.cachedMatchStores.get(n);if(a){const u=r(a.get());u.status==="redirected"?this.stores.cachedMatchStores.delete(n)&&this.stores.cachedIds.set(c=>c.filter(f=>f!==n)):a.set(u)}})},this.getMatch=n=>{var r,i,o;return((r=this.stores.cachedMatchStores.get(n))==null?void 0:r.get())??((i=this.stores.pendingMatchStores.get(n))==null?void 0:i.get())??((o=this.stores.matchStores.get(n))==null?void 0:o.get())},this.invalidate=n=>{const r=i=>{var o;return((o=n==null?void 0:n.filter)==null?void 0:o.call(n,i))??!0?{...i,invalid:!0,...n!=null&&n.forcePending||i.status==="error"||i.status==="notFound"?{status:"pending",error:void 0}:void 0}:i};return this.batch(()=>{this.stores.setMatches(this.stores.matches.get().map(r)),this.stores.setCached(this.stores.cachedMatches.get().map(r)),this.stores.setPending(this.stores.pendingMatches.get().map(r))}),this.shouldViewTransition=!1,this.load({sync:n==null?void 0:n.sync})},this.getParsedLocationHref=n=>n.publicHref||"/",this.resolveRedirect=n=>{const r=n.headers.get("Location");if(!n.options.href||n.options._builtLocation){const i=n.options._builtLocation??this.buildLocation(n.options),o=this.getParsedLocationHref(i);n.options.href=o,n.headers.set("Location",o)}else if(r)try{const i=new URL(r);if(this.origin&&i.origin===this.origin){const o=i.pathname+i.search+i.hash;n.options.href=o,n.headers.set("Location",o)}}catch{}if(n.options.href&&!n.options._builtLocation&&Tg(n.options.href,this.protocolAllowlist))throw new Error("Redirect blocked: unsafe protocol");return n.headers.get("Location")||n.headers.set("Location",n.options.href),n},this.clearCache=n=>{const r=n==null?void 0:n.filter;r!==void 0?this.stores.setCached(this.stores.cachedMatches.get().filter(i=>!r(i))):this.stores.setCached([])},this.clearExpiredCache=()=>{const n=Date.now(),r=i=>{const o=this.looseRoutesById[i.routeId];if(!o.options.loader)return!0;const a=(i.preload?o.options.preloadGcTime??this.options.defaultPreloadGcTime:o.options.gcTime??this.options.defaultGcTime)??300*1e3;return i.status==="error"?!0:n-i.updatedAt>=a};this.clearCache({filter:r})},this.loadRouteChunk=th,this.preloadRoute=async n=>{const r=n._builtLocation??this.buildLocation(n);let i=this.matchRoutes(r,{throwOnError:!0,preload:!0,dest:n});const o=new Set([...this.stores.matchesId.get(),...this.stores.pendingIds.get()]),a=new Set([...o,...this.stores.cachedIds.get()]),u=i.filter(c=>!a.has(c.id));if(u.length){const c=this.stores.cachedMatches.get();this.stores.setCached([...c,...u])}try{return i=await tA({router:this,matches:i,location:r,preload:!0,updateMatch:(c,f)=>{o.has(c)?i=i.map(h=>h.id===c?f(h):h):this.updateMatch(c,f)}}),i}catch(c){if(kr(c))return c.options.reloadDocument?void 0:await this.preloadRoute({...c.options,_fromLocation:r});Jn(c)||console.error(c);return}},this.matchRoute=(n,r)=>{const i={...n,to:n.to?this.resolvePathWithBase(n.from||"",n.to):void 0,params:n.params||{},leaveParams:!0},o=this.buildLocation(i);if(r!=null&&r.pending&&this.stores.status.get()!=="pending")return!1;const a=((r==null?void 0:r.pending)===void 0?!this.stores.isLoading.get():r.pending)?this.latestLocation:this.stores.resolvedLocation.get()||this.stores.location.get(),u=w8(o.pathname,(r==null?void 0:r.caseSensitive)??!1,(r==null?void 0:r.fuzzy)??!1,a.pathname,this.processedTree);return!u||n.params&&!Ol(u.rawParams,n.params,{partial:!0})?!1:(r==null?void 0:r.includeSearch)??!0?Ol(a.search,o.search,{partial:!0})?u.rawParams:!1:u.rawParams},this.hasNotFoundMatch=()=>this.stores.matches.get().some(n=>n.status==="notFound"||n.globalNotFound),this.getStoreConfig=t,this.update({defaultPreloadDelay:50,defaultPendingMs:1e3,defaultPendingMinMs:500,context:void 0,...e,caseSensitive:e.caseSensitive??!1,notFoundMode:e.notFoundMode??"fuzzy",stringifySearch:e.stringifySearch??z8,parseSearch:e.parseSearch??F8,protocolAllowlist:e.protocolAllowlist??m8}),typeof document<"u"&&(self.__TSR_ROUTER__=this)}isShell(){return!!this.options.isShell}isPrerendering(){return!!this.options.isPrerendering}get state(){return this.stores.__store.get()}setRoutes({routesById:e,routesByPath:t,processedTree:n}){this.routesById=e,this.routesByPath=t,this.processedTree=n;const r=this.options.notFoundRoute;r&&(r.init({originalIndex:99999999999}),this.routesById[r.id]=r)}get looseRoutesById(){return this.routesById}getParentContext(e){return e!=null&&e.id?e.context??this.options.context??void 0:this.options.context??void 0}matchRoutesInternal(e,t){var p,m;const n=this.getMatchedRoutes(e.pathname),{foundRoute:r,routeParams:i,parsedParams:o}=n;let{matchedRoutes:a}=n,u=!1;(r?r.path!=="/"&&i["**"]:fa(e.pathname))&&(this.options.notFoundRoute?a=[...a,this.options.notFoundRoute]:u=!0);const c=u?l9(this.options.notFoundMode,a):void 0,f=new Array(a.length),h=new Map;for(const y of this.stores.matchStores.values())y.routeId&&h.set(y.routeId,y.get());for(let y=0;y<a.length;y++){const b=a[y],v=f[y-1];let S,x,_;{const L=(v==null?void 0:v.search)??e.search,F=(v==null?void 0:v._strictSearch)??void 0;try{const U=og(b.options.validateSearch,{...L})??void 0;S={...L,...U},x={...F,...U},_=void 0}catch(U){let q=U;if(U instanceof Mg||(q=new Mg(U.message,{cause:U})),t!=null&&t.throwOnError)throw q;S=L,x={},_=q}}const k=((m=(p=b.options).loaderDeps)==null?void 0:m.call(p,{search:S}))??"",T=k?JSON.stringify(k):"",{interpolatedPath:A,usedParams:D}=WT({path:b.fullPath,params:i,decoder:this.pathParamsDecoder,server:this.isServer}),O=b.id+A+T,$=this.getMatch(O),B=h.get(b.id),j=($==null?void 0:$._strictParams)??D;let N;if(!$)try{sA(b,D,o,j)}catch(L){if(Jn(L)||kr(L)?N=L:N=new r9(L.message,{cause:L}),t!=null&&t.throwOnError)throw N}Object.assign(i,j);const M=B?"stay":"enter";let z;if($)z={...$,cause:M,params:(B==null?void 0:B.params)??i,_strictParams:j,search:sl(B?B.search:$.search,S),_strictSearch:x};else{const L=b.options.loader||b.options.beforeLoad||b.lazyFn||t$(b)?"pending":"success";z={id:O,ssr:b.options.ssr,index:y,routeId:b.id,params:(B==null?void 0:B.params)??i,_strictParams:j,pathname:A,updatedAt:Date.now(),search:B?sl(B.search,S):S,_strictSearch:x,searchError:void 0,status:L,isFetching:!1,error:void 0,paramsError:N,__routeContext:void 0,_nonReactive:{loadPromise:jc()},__beforeLoadContext:void 0,context:{},abortController:new AbortController,fetchCount:0,cause:M,loaderDeps:B?sa(B.loaderDeps,k):k,invalid:!1,preload:!1,links:void 0,scripts:void 0,headScripts:void 0,meta:void 0,staticData:b.options.staticData||{},fullPath:b.fullPath}}t!=null&&t.preload||(z.globalNotFound=c===b.id),z.searchError=_;const G=this.getParentContext(v);z.context={...G,...z.__routeContext,...z.__beforeLoadContext},f[y]=z}for(let y=0;y<f.length;y++){const b=f[y],v=this.looseRoutesById[b.routeId],S=this.getMatch(b.id),x=h.get(b.routeId);if(b.params=x?sl(x.params,i):i,!S){const _=f[y-1],k=this.getParentContext(_);if(v.options.context){const T={deps:b.loaderDeps,params:b.params,context:k??{},location:e,navigate:A=>this.navigate({...A,_fromLocation:e}),buildLocation:this.buildLocation,cause:b.cause,abortController:b.abortController,preload:!!b.preload,matches:f,routeId:v.id};b.__routeContext=v.options.context(T)??void 0}b.context={...k,...b.__routeContext,...b.__beforeLoadContext}}}return f}matchRoutesLightweight(e){var h;const{matchedRoutes:t,routeParams:n,parsedParams:r}=this.getMatchedRoutes(e.pathname),i=Zd(t),o={...e.search};for(const p of t)try{Object.assign(o,og(p.options.validateSearch,o))}catch{}const a=Zd(this.stores.matchesId.get()),u=a&&((h=this.stores.matchStores.get(a))==null?void 0:h.get()),c=u&&u.routeId===i.id&&u.pathname===e.pathname;let f;if(c)f=u.params;else{const p=Object.assign(Object.create(null),n);for(const m of t)try{sA(m,n,r??{},p)}catch{}f=p}return{matchedRoutes:t,fullPath:i.fullPath,search:o,params:f}}},Mg=class extends Error{},r9=class extends Error{};function i9(e){return{loadedAt:0,isLoading:!1,isTransitioning:!1,status:"idle",resolvedLocation:void 0,location:e,matches:[],statusCode:200}}function og(e,t){if(e==null)return{};if("~standard"in e){const n=e["~standard"].validate(t);if(n instanceof Promise)throw new Mg("Async validation not supported");if(n.issues)throw new Mg(JSON.stringify(n.issues,void 0,2),{cause:n});return n.value}return"parse"in e?e.parse(t):typeof e=="function"?e(t):{}}function o9({pathname:e,routesById:t,processedTree:n}){const r=Object.create(null),i=fa(e);let o,a;const u=S8(i,n,!0);return u&&(o=u.route,Object.assign(r,u.rawParams),a=Object.assign(Object.create(null),u.parsedParams)),{matchedRoutes:(u==null?void 0:u.branch)||[t.__root__],routeParams:r,foundRoute:o,parsedParams:a}}function s9({search:e,dest:t,destRoutes:n,_includeValidateSearch:r}){return a9(n)(e,t,r??!1)}function a9(e){var i;const t={dest:null,_includeValidateSearch:!1,middlewares:[]};for(const o of e){if("search"in o.options)(i=o.options.search)!=null&&i.middlewares&&t.middlewares.push(...o.options.search.middlewares);else if(o.options.preSearchFilters||o.options.postSearchFilters){const a=({search:u,next:c})=>{let f=u;"preSearchFilters"in o.options&&o.options.preSearchFilters&&(f=o.options.preSearchFilters.reduce((p,m)=>m(p),u));const h=c(f);return"postSearchFilters"in o.options&&o.options.postSearchFilters?o.options.postSearchFilters.reduce((p,m)=>m(p),h):h};t.middlewares.push(a)}if(o.options.validateSearch){const a=({search:u,next:c})=>{const f=c(u);if(!t._includeValidateSearch)return f;try{return{...f,...og(o.options.validateSearch,f)??void 0}}catch{return f}};t.middlewares.push(a)}}const n=({search:o})=>{const a=t.dest;return a.search?a.search===!0?o:oa(a.search,o):{}};t.middlewares.push(n);const r=(o,a,u)=>{if(o>=u.length)return a;const c=u[o];return c({search:a,next:h=>r(o+1,h,u)})};return function(a,u,c){return t.dest=u,t._includeValidateSearch=c,r(0,a,t.middlewares)}}function l9(e,t){if(e!=="root")for(let n=t.length-1;n>=0;n--){const r=t[n];if(r.children)return r.id}return $l}function sA(e,t,n,r){var o;const i=((o=e.options.params)==null?void 0:o.parse)??e.options.parseParams;if(i)if(e.options.skipRouteOnParseError)for(const a in t)a in n&&(r[a]=n[a]);else{const a=i(r);Object.assign(r,a)}}var u9="Error preloading route! ☝️",n$=class{get to(){return this._to}get id(){return this._id}get path(){return this._path}get fullPath(){return this._fullPath}constructor(e){if(this.init=t=>{var c,f;this.originalIndex=t.originalIndex;const n=this.options,r=!(n!=null&&n.path)&&!(n!=null&&n.id);this.parentRoute=(f=(c=this.options).getParentRoute)==null?void 0:f.call(c),r?this._path=$l:this.parentRoute||Wo();let i=r?$l:n==null?void 0:n.path;i&&i!=="/"&&(i=KO(i));const o=(n==null?void 0:n.id)||i;let a=r?$l:rg([this.parentRoute.id==="__root__"?"":this.parentRoute.id,o]);i==="__root__"&&(i="/"),a!=="__root__"&&(a=rg(["/",a]));const u=a==="__root__"?"/":rg([this.parentRoute.fullPath,i]);this._path=i,this._id=a,this._fullPath=u,this._to=fa(u)},this.addChildren=t=>this._addFileChildren(t),this._addFileChildren=t=>(Array.isArray(t)&&(this.children=t),typeof t=="object"&&t!==null&&(this.children=Object.values(t)),this),this._addFileTypes=()=>this,this.updateLoader=t=>(Object.assign(this.options,t),this),this.update=t=>(Object.assign(this.options,t),this),this.lazy=t=>(this.lazyFn=t,this),this.redirect=t=>H8({from:this.fullPath,...t}),this.options=e||{},this.isRoot=!(e!=null&&e.getParentRoute),e!=null&&e.id&&(e!=null&&e.path))throw new Error("Route cannot have both an 'id' and a 'path' option.")}},c9=class extends n${constructor(e){super(e)}};function f9(e){if(typeof document<"u"&&document.querySelector){const t=e.stores.location.get(),n=t.state.__hashScrollIntoViewOptions??!0;if(n&&t.hash!==""){const r=document.getElementById(t.hash);r&&r.scrollIntoView(n)}}}function dS(e){const t=e.errorComponent??hS;return E.jsx(d9,{getResetKey:e.getResetKey,onCatch:e.onCatch,children:({error:n,reset:r})=>n?C.createElement(t,{error:n,reset:r}):e.children})}var d9=class extends C.Component{constructor(...e){super(...e),this.state={error:null}}static getDerivedStateFromProps(e,t){const n=e.getResetKey();return t.error&&t.resetKey!==n?{resetKey:n,error:null}:{resetKey:n}}static getDerivedStateFromError(e){return{error:e}}reset(){this.setState({error:null})}componentDidCatch(e,t){this.props.onCatch&&this.props.onCatch(e,t)}render(){return this.props.children({error:this.state.error,reset:()=>{this.reset()}})}};function hS({error:e}){const[t,n]=C.useState(!1);return E.jsxs("div",{style:{padding:".5rem",maxWidth:"100%"},children:[E.jsxs("div",{style:{display:"flex",alignItems:"center",gap:".5rem"},children:[E.jsx("strong",{style:{fontSize:"1rem"},children:"Something went wrong!"}),E.jsx("button",{style:{appearance:"none",fontSize:".6em",border:"1px solid currentColor",padding:".1rem .2rem",fontWeight:"bold",borderRadius:".25rem"},onClick:()=>n(r=>!r),children:t?"Hide Error":"Show Error"})]}),E.jsx("div",{style:{height:".25rem"}}),t?E.jsx("div",{children:E.jsx("pre",{style:{fontSize:".7em",border:"1px solid red",borderRadius:".25rem",padding:".3rem",color:"red",overflow:"auto"},children:e.message?E.jsx("code",{children:e.message}):null})}):null]})}function h9({children:e,fallback:t=null}){return r$()?E.jsx(Ca.Fragment,{children:e}):E.jsx(Ca.Fragment,{children:t})}function r$(){return Ca.useSyncExternalStore(p9,()=>!0,()=>!1)}function p9(){return()=>{}}var i$=C.createContext(null);function Jr(e){return C.useContext(i$)}var Ty=C.createContext(void 0),m9=C.createContext(void 0),rn=(e=>(e[e.None=0]="None",e[e.Mutable=1]="Mutable",e[e.Watching=2]="Watching",e[e.RecursedCheck=4]="RecursedCheck",e[e.Recursed=8]="Recursed",e[e.Dirty=16]="Dirty",e[e.Pending=32]="Pending",e))(rn||{});function g9({update:e,notify:t,unwatched:n}){return{link:r,unlink:i,propagate:o,checkDirty:a,shallowPropagate:u};function r(f,h,p){const m=h.depsTail;if(m!==void 0&&m.dep===f)return;const y=m!==void 0?m.nextDep:h.deps;if(y!==void 0&&y.dep===f){y.version=p,h.depsTail=y;return}const b=f.subsTail;if(b!==void 0&&b.version===p&&b.sub===h)return;const v=h.depsTail=f.subsTail={version:p,dep:f,sub:h,prevDep:m,nextDep:y,prevSub:b,nextSub:void 0};y!==void 0&&(y.prevDep=v),m!==void 0?m.nextDep=v:h.deps=v,b!==void 0?b.nextSub=v:f.subs=v}function i(f,h=f.sub){const p=f.dep,m=f.prevDep,y=f.nextDep,b=f.nextSub,v=f.prevSub;return y!==void 0?y.prevDep=m:h.depsTail=m,m!==void 0?m.nextDep=y:h.deps=y,b!==void 0?b.prevSub=v:p.subsTail=v,v!==void 0?v.nextSub=b:(p.subs=b)===void 0&&n(p),y}function o(f){let h=f.nextSub,p;e:do{const m=f.sub;let y=m.flags;if(y&60?y&12?y&4?!(y&48)&&c(f,m)?(m.flags=y|40,y&=1):y=0:m.flags=y&-9|32:y=0:m.flags=y|32,y&2&&t(m),y&1){const b=m.subs;if(b!==void 0){const v=(f=b).nextSub;v!==void 0&&(p={value:h,prev:p},h=v);continue}}if((f=h)!==void 0){h=f.nextSub;continue}for(;p!==void 0;)if(f=p.value,p=p.prev,f!==void 0){h=f.nextSub;continue e}break}while(!0)}function a(f,h){let p,m=0,y=!1;e:do{const b=f.dep,v=b.flags;if(h.flags&16)y=!0;else if((v&17)===17){if(e(b)){const S=b.subs;S.nextSub!==void 0&&u(S),y=!0}}else if((v&33)===33){(f.nextSub!==void 0||f.prevSub!==void 0)&&(p={value:f,prev:p}),f=b.deps,h=b,++m;continue}if(!y){const S=f.nextDep;if(S!==void 0){f=S;continue}}for(;m--;){const S=h.subs,x=S.nextSub!==void 0;if(x?(f=p.value,p=p.prev):f=S,y){if(e(h)){x&&u(S),h=f.sub;continue}y=!1}else h.flags&=-33;h=f.sub;const _=f.nextDep;if(_!==void 0){f=_;continue e}}return y}while(!0)}function u(f){do{const h=f.sub,p=h.flags;(p&48)===32&&(h.flags=p|16,(p&6)===2&&t(h))}while((f=f.nextSub)!==void 0)}function c(f,h){let p=h.depsTail;for(;p!==void 0;){if(p===f)return!0;p=p.prevDep}return!1}}function y9(e,t,n){var o,a,u;const r=typeof e=="object",i=r?e:void 0;return{next:(o=r?e.next:e)==null?void 0:o.bind(i),error:(a=r?e.error:t)==null?void 0:a.bind(i),complete:(u=r?e.complete:n)==null?void 0:u.bind(i)}}const k1=[];let sg=0;const{link:aA,unlink:b9,propagate:v9,checkDirty:o$,shallowPropagate:lA}=g9({update(e){return e._update()},notify(e){k1[R1++]=e,e.flags&=~rn.Watching},unwatched(e){e.depsTail!==void 0&&(e.depsTail=void 0,e.flags=rn.Mutable|rn.Dirty,Og(e))}});let gm=0,R1=0,Xi,_1=0;function s$(e){try{++_1,e()}finally{--_1||a$()}}function Og(e){const t=e.depsTail;let n=t!==void 0?t.nextDep:e.deps;for(;n!==void 0;)n=b9(n,e)}function a$(){if(!(_1>0)){for(;gm<R1;){const e=k1[gm];k1[gm++]=void 0,e.notify()}gm=0,R1=0}}function uA(e,t){const n=typeof e=="function",r=e,i={_snapshot:n?void 0:e,subs:void 0,subsTail:void 0,deps:void 0,depsTail:void 0,flags:n?rn.None:rn.Mutable,get(){return Xi!==void 0&&aA(i,Xi,sg),i._snapshot},subscribe(o){const a=y9(o),u={current:!1},c=x9(()=>{var f;i.get(),u.current?(f=a.next)==null||f.call(a,i._snapshot):u.current=!0});return{unsubscribe:()=>{c.stop()}}},_update(o){const a=Xi,u=(t==null?void 0:t.compare)??Object.is;if(n)Xi=i,++sg,i.depsTail=void 0;else if(o===void 0)return!1;n&&(i.flags=rn.Mutable|rn.RecursedCheck);try{const c=i._snapshot,f=typeof o=="function"?o(c):o===void 0&&n?r(c):o;return c===void 0||!u(c,f)?(i._snapshot=f,!0):!1}finally{Xi=a,n&&(i.flags&=~rn.RecursedCheck),Og(i)}}};return n?(i.flags=rn.Mutable|rn.Dirty,i.get=function(){const o=i.flags;if(o&rn.Dirty||o&rn.Pending&&o$(i.deps,i)){if(i._update()){const a=i.subs;a!==void 0&&lA(a)}}else o&rn.Pending&&(i.flags=o&~rn.Pending);return Xi!==void 0&&aA(i,Xi,sg),i._snapshot}):i.set=function(o){if(i._update(o)){const a=i.subs;a!==void 0&&(v9(a),lA(a),a$())}},i}function x9(e){const t=()=>{const r=Xi;Xi=n,++sg,n.depsTail=void 0,n.flags=rn.Watching|rn.RecursedCheck;try{return e()}finally{Xi=r,n.flags&=~rn.RecursedCheck,Og(n)}},n={deps:void 0,depsTail:void 0,subs:void 0,subsTail:void 0,flags:rn.Watching|rn.RecursedCheck,notify(){const r=this.flags;r&rn.Dirty||r&rn.Pending&&o$(this.deps,this)?t():this.flags=rn.Watching},stop(){this.flags=rn.None,this.depsTail=void 0,Og(this)}};return t(),n}var B0={exports:{}},U0={},H0={exports:{}},G0={};/**
|
|
51
|
-
* @license React
|
|
52
|
-
* use-sync-external-store-shim.production.js
|
|
53
|
-
*
|
|
54
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
55
|
-
*
|
|
56
|
-
* This source code is licensed under the MIT license found in the
|
|
57
|
-
* LICENSE file in the root directory of this source tree.
|
|
58
|
-
*/var cA;function w9(){if(cA)return G0;cA=1;var e=kh();function t(p,m){return p===m&&(p!==0||1/p===1/m)||p!==p&&m!==m}var n=typeof Object.is=="function"?Object.is:t,r=e.useState,i=e.useEffect,o=e.useLayoutEffect,a=e.useDebugValue;function u(p,m){var y=m(),b=r({inst:{value:y,getSnapshot:m}}),v=b[0].inst,S=b[1];return o(function(){v.value=y,v.getSnapshot=m,c(v)&&S({inst:v})},[p,y,m]),i(function(){return c(v)&&S({inst:v}),p(function(){c(v)&&S({inst:v})})},[p]),a(y),y}function c(p){var m=p.getSnapshot;p=p.value;try{var y=m();return!n(p,y)}catch{return!0}}function f(p,m){return m()}var h=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?f:u;return G0.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:h,G0}var fA;function l$(){return fA||(fA=1,H0.exports=w9()),H0.exports}/**
|
|
59
|
-
* @license React
|
|
60
|
-
* use-sync-external-store-shim/with-selector.production.js
|
|
61
|
-
*
|
|
62
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
63
|
-
*
|
|
64
|
-
* This source code is licensed under the MIT license found in the
|
|
65
|
-
* LICENSE file in the root directory of this source tree.
|
|
66
|
-
*/var dA;function S9(){if(dA)return U0;dA=1;var e=kh(),t=l$();function n(f,h){return f===h&&(f!==0||1/f===1/h)||f!==f&&h!==h}var r=typeof Object.is=="function"?Object.is:n,i=t.useSyncExternalStore,o=e.useRef,a=e.useEffect,u=e.useMemo,c=e.useDebugValue;return U0.useSyncExternalStoreWithSelector=function(f,h,p,m,y){var b=o(null);if(b.current===null){var v={hasValue:!1,value:null};b.current=v}else v=b.current;b=u(function(){function x(D){if(!_){if(_=!0,k=D,D=m(D),y!==void 0&&v.hasValue){var O=v.value;if(y(O,D))return T=O}return T=D}if(O=T,r(k,D))return O;var $=m(D);return y!==void 0&&y(O,$)?(k=D,O):(k=D,T=$)}var _=!1,k,T,A=p===void 0?null:p;return[function(){return x(h())},A===null?void 0:function(){return x(A())}]},[h,p,m,y]);var S=i(f,b[0],b[1]);return a(function(){v.hasValue=!0,v.value=S},[S]),c(S),S},U0}var hA;function C9(){return hA||(hA=1,B0.exports=S9()),B0.exports}var u$=C9();function E9(e,t){return e===t}function _r(e,t,n=E9){const r=C.useCallback(a=>{if(!e)return()=>{};const{unsubscribe:u}=e.subscribe(a);return u},[e]),i=C.useCallback(()=>e==null?void 0:e.get(),[e]);return u$.useSyncExternalStoreWithSelector(r,i,i,t,n)}var k9={get:()=>{},subscribe:()=>({unsubscribe:()=>{}})};function Ra(e){const t=Jr(),n=C.useContext(e.from?m9:Ty),r=e.from??n,i=r?e.from?t.stores.getRouteMatchStore(r):t.stores.matchStores.get(r):void 0,o=C.useRef(void 0);return _r(i??k9,a=>{if((e.shouldThrow??!0)&&!a&&Wo(),a===void 0)return;const u=e.select?e.select(a):a;if(e.structuralSharing??t.options.defaultStructuralSharing){const c=sa(o.current,u);return o.current=c,c}return u})}function c$(e){return Ra({from:e.from,strict:e.strict,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.loaderData):t.loaderData})}function f$(e){const{select:t,...n}=e;return Ra({...n,select:r=>t?t(r.loaderDeps):r.loaderDeps})}function d$(e){return Ra({from:e.from,shouldThrow:e.shouldThrow,structuralSharing:e.structuralSharing,strict:e.strict,select:t=>{const n=e.strict===!1?t.params:t._strictParams;return e.select?e.select(n):n}})}function h$(e){return Ra({from:e.from,strict:e.strict,shouldThrow:e.shouldThrow,structuralSharing:e.structuralSharing,select:t=>e.select?e.select(t.search):t.search})}function p$(e){const t=Jr();return C.useCallback(n=>t.navigate({...n,from:n.from??(e==null?void 0:e.from)}),[e==null?void 0:e.from,t])}function m$(e){return Ra({...e,select:t=>e.select?e.select(t.context):t.context})}var yn=$O();function R9(e,t){const n=Jr(),r=c8(t),{activeProps:i,inactiveProps:o,activeOptions:a,to:u,preload:c,preloadDelay:f,preloadIntentProximity:h,hashScrollIntoView:p,replace:m,startTransition:y,resetScroll:b,viewTransition:v,children:S,target:x,disabled:_,style:k,className:T,onClick:A,onBlur:D,onFocus:O,onMouseEnter:$,onMouseLeave:B,onTouchStart:j,ignoreBlocker:N,params:M,search:z,hash:G,state:L,mask:F,reloadDocument:U,unsafeRelative:q,from:W,_fromLocation:I,...Y}=e,J=r$(),H=C.useMemo(()=>e,[n,e.from,e._fromLocation,e.hash,e.to,e.search,e.params,e.state,e.mask,e.unsafeRelative]),ie=_r(n.stores.location,De=>De,(De,ue)=>De.href===ue.href),re=C.useMemo(()=>{const De={_fromLocation:ie,...H};return n.buildLocation(De)},[n,ie,H]),he=re.maskedLocation?re.maskedLocation.publicHref:re.publicHref,ve=re.maskedLocation?re.maskedLocation.external:re.external,Re=C.useMemo(()=>O9(he,ve,n.history,_),[_,ve,he,n.history]),ce=C.useMemo(()=>{if(Re!=null&&Re.external)return Tg(Re.href,n.protocolAllowlist)?void 0:Re.href;if(!$9(u)&&!(typeof u!="string"||u.indexOf(":")===-1))try{return new URL(u),Tg(u,n.protocolAllowlist)?void 0:u}catch{}},[u,Re,n.protocolAllowlist]),je=C.useMemo(()=>{if(ce)return!1;if(a!=null&&a.exact){if(!T8(ie.pathname,re.pathname,n.basepath))return!1}else{const De=Ag(ie.pathname,n.basepath),ue=Ag(re.pathname,n.basepath);if(!(De.startsWith(ue)&&(De.length===ue.length||De[ue.length]==="/")))return!1}return((a==null?void 0:a.includeSearch)??!0)&&!Ol(ie.search,re.search,{partial:!(a!=null&&a.exact),ignoreUndefined:!(a!=null&&a.explicitUndefined)})?!1:a!=null&&a.includeHash?J&&ie.hash===re.hash:!0},[a==null?void 0:a.exact,a==null?void 0:a.explicitUndefined,a==null?void 0:a.includeHash,a==null?void 0:a.includeSearch,ie,ce,J,re.hash,re.pathname,re.search,n.basepath]),We=je?oa(i,{})??_9:V0,X=je?V0:oa(o,{})??V0,Z=[T,We.className,X.className].filter(Boolean).join(" "),ne=(k||We.style||X.style)&&{...k,...We.style,...X.style},[xe,ge]=C.useState(!1),Ce=C.useRef(!1),le=e.reloadDocument||ce?!1:c??n.options.defaultPreload,oe=f??n.options.defaultPreloadDelay??0,me=C.useCallback(()=>{n.preloadRoute({...H,_builtLocation:re}).catch(De=>{console.warn(De),console.warn(u9)})},[n,H,re]);u8(r,C.useCallback(De=>{De!=null&&De.isIntersecting&&me()},[me]),M9,{disabled:!!_||le!=="viewport"}),C.useEffect(()=>{Ce.current||!_&&le==="render"&&(me(),Ce.current=!0)},[_,me,le]);const ae=De=>{const ue=De.currentTarget.getAttribute("target"),Se=x!==void 0?x:ue;if(!_&&!P9(De)&&!De.defaultPrevented&&(!Se||Se==="_self")&&De.button===0){De.preventDefault(),yn.flushSync(()=>{ge(!0)});const ke=n.subscribe("onResolved",()=>{ke(),ge(!1)});n.navigate({...H,replace:m,resetScroll:b,hashScrollIntoView:p,startTransition:y,viewTransition:v,ignoreBlocker:N})}};if(ce)return{...Y,ref:r,href:ce,...S&&{children:S},...x&&{target:x},..._&&{disabled:_},...k&&{style:k},...T&&{className:T},...A&&{onClick:A},...D&&{onBlur:D},...O&&{onFocus:O},...$&&{onMouseEnter:$},...B&&{onMouseLeave:B},...j&&{onTouchStart:j}};const Oe=De=>{if(_||le!=="intent")return;if(!oe){me();return}const ue=De.currentTarget;if(xd.has(ue))return;const Se=setTimeout(()=>{xd.delete(ue),me()},oe);xd.set(ue,Se)},Te=De=>{_||le!=="intent"||me()},_e=De=>{if(_||!le||!oe)return;const ue=De.currentTarget,Se=xd.get(ue);Se&&(clearTimeout(Se),xd.delete(ue))};return{...Y,...We,...X,href:Re==null?void 0:Re.href,ref:r,onClick:Wu([A,ae]),onBlur:Wu([D,_e]),onFocus:Wu([O,Oe]),onMouseEnter:Wu([$,Oe]),onMouseLeave:Wu([B,_e]),onTouchStart:Wu([j,Te]),disabled:!!_,target:x,...ne&&{style:ne},...Z&&{className:Z},..._&&T9,...je&&A9,...J&&xe&&D9}}var V0={},_9={className:"active"},T9={role:"link","aria-disabled":!0},A9={"data-status":"active","aria-current":"page"},D9={"data-transitioning":"transitioning"},xd=new WeakMap,M9={rootMargin:"100px"},Wu=e=>t=>{for(const n of e)if(n){if(t.defaultPrevented)return;n(t)}};function O9(e,t,n,r){if(!r)return t?{href:e,external:!0}:{href:n.createHref(e)||"/",external:!1}}function $9(e){if(typeof e!="string")return!1;const t=e.charCodeAt(0);return t===47?e.charCodeAt(1)!==47:t===46}var Ql=C.forwardRef((e,t)=>{const{_asChild:n,...r}=e,{type:i,...o}=R9(r,t),a=typeof r.children=="function"?r.children({isActive:o["data-status"]==="active"}):r.children;if(!n){const{disabled:u,...c}=o;return C.createElement("a",c,a)}return C.createElement(n,o,a)});function P9(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}var N9=class extends n${constructor(t){super(t),this.useMatch=n=>Ra({select:n==null?void 0:n.select,from:this.id,structuralSharing:n==null?void 0:n.structuralSharing}),this.useRouteContext=n=>m$({...n,from:this.id}),this.useSearch=n=>h$({select:n==null?void 0:n.select,structuralSharing:n==null?void 0:n.structuralSharing,from:this.id}),this.useParams=n=>d$({select:n==null?void 0:n.select,structuralSharing:n==null?void 0:n.structuralSharing,from:this.id}),this.useLoaderDeps=n=>f$({...n,from:this.id}),this.useLoaderData=n=>c$({...n,from:this.id}),this.useNavigate=()=>p$({from:this.fullPath}),this.Link=Ca.forwardRef((n,r)=>E.jsx(Ql,{ref:r,from:this.fullPath,...n}))}};function I9(e){return new N9(e)}var j9=class extends c9{constructor(e){super(e),this.useMatch=t=>Ra({select:t==null?void 0:t.select,from:this.id,structuralSharing:t==null?void 0:t.structuralSharing}),this.useRouteContext=t=>m$({...t,from:this.id}),this.useSearch=t=>h$({select:t==null?void 0:t.select,structuralSharing:t==null?void 0:t.structuralSharing,from:this.id}),this.useParams=t=>d$({select:t==null?void 0:t.select,structuralSharing:t==null?void 0:t.structuralSharing,from:this.id}),this.useLoaderDeps=t=>f$({...t,from:this.id}),this.useLoaderData=t=>c$({...t,from:this.id}),this.useNavigate=()=>p$({from:this.fullPath}),this.Link=Ca.forwardRef((t,n)=>E.jsx(Ql,{ref:n,from:this.fullPath,...t}))}};function L9(e){return new j9(e)}function _h(e){return new F9(e,{silent:!0}).createRoute}var F9=class{constructor(e,t){this.path=e,this.createRoute=n=>{const r=I9(n);return r.isRoot=!1,r},this.silent=t==null?void 0:t.silent}};function z9(e){const t=Jr(),n=`not-found-${_r(t.stores.location,r=>r.pathname)}-${_r(t.stores.status,r=>r)}`;return E.jsx(dS,{getResetKey:()=>n,onCatch:(r,i)=>{var o;if(Jn(r))(o=e.onCatch)==null||o.call(e,r,i);else throw r},errorComponent:({error:r})=>{var i;if(Jn(r))return(i=e.fallback)==null?void 0:i.call(e,r);throw r},children:e.children})}function B9(){return E.jsx("p",{children:"Not Found"})}function tc(e){return E.jsx(E.Fragment,{children:e.children})}function g$(e,t,n){return t.options.notFoundComponent?E.jsx(t.options.notFoundComponent,{...n}):e.options.defaultNotFoundComponent?E.jsx(e.options.defaultNotFoundComponent,{...n}):E.jsx(B9,{})}function U9(e){return null}function H9(){return U9(Jr()),null}var y$=C.memo(function({matchId:t}){const n=Jr(),r=n.stores.matchStores.get(t);r||Wo();const i=_r(n.stores.loadedAt,a=>a),o=_r(r,a=>a);return E.jsx(G9,{router:n,matchId:t,resetKey:i,matchState:C.useMemo(()=>{var c;const a=o.routeId,u=(c=n.routesById[a].parentRoute)==null?void 0:c.id;return{routeId:a,ssr:o.ssr,_displayPending:o._displayPending,parentRouteId:u}},[o._displayPending,o.routeId,o.ssr,n.routesById])})});function G9({router:e,matchId:t,resetKey:n,matchState:r}){var b,v;const i=e.routesById[r.routeId],o=i.options.pendingComponent??e.options.defaultPendingComponent,a=o?E.jsx(o,{}):null,u=i.options.errorComponent??e.options.defaultErrorComponent,c=i.options.onCatch??e.options.defaultOnCatch,f=i.isRoot?i.options.notFoundComponent??((b=e.options.notFoundRoute)==null?void 0:b.options.component):i.options.notFoundComponent,h=r.ssr===!1||r.ssr==="data-only",p=(!i.isRoot||i.options.wrapInSuspense||h)&&(i.options.wrapInSuspense??o??(((v=i.options.errorComponent)==null?void 0:v.preload)||h))?C.Suspense:tc,m=u?dS:tc,y=f?z9:tc;return E.jsxs(i.isRoot?i.options.shellComponent??tc:tc,{children:[E.jsx(Ty.Provider,{value:t,children:E.jsx(p,{fallback:a,children:E.jsx(m,{getResetKey:()=>n,errorComponent:u||hS,onCatch:(S,x)=>{if(Jn(S))throw S.routeId??(S.routeId=r.routeId),S;c==null||c(S,x)},children:E.jsx(y,{fallback:S=>{if(S.routeId??(S.routeId=r.routeId),!f||S.routeId&&S.routeId!==r.routeId||!S.routeId&&!i.isRoot)throw S;return C.createElement(f,S)},children:h||r._displayPending?E.jsx(h9,{fallback:a,children:E.jsx(pA,{matchId:t})}):E.jsx(pA,{matchId:t})})})})}),r.parentRouteId===$l?E.jsxs(E.Fragment,{children:[E.jsx(V9,{resetKey:n}),e.options.scrollRestoration&&qO?E.jsx(H9,{}):null]}):null]})}function V9({resetKey:e}){const t=Jr(),n=C.useRef(void 0);return Od(()=>{const r=t.latestLocation.href;(n.current===void 0||n.current!==r)&&(t.emit({type:"onRendered",...fc(t.stores.location.get(),t.stores.resolvedLocation.get())}),n.current=r)},[t.latestLocation.state.__TSR_key,e,t]),null}var pA=C.memo(function({matchId:t}){const n=Jr(),r=(h,p)=>{var m;return((m=n.getMatch(h.id))==null?void 0:m._nonReactive[p])??h._nonReactive[p]},i=n.stores.matchStores.get(t);i||Wo();const o=_r(i,h=>h),a=o.routeId,u=n.routesById[a],c=C.useMemo(()=>{var p;const h=(p=n.routesById[a].options.remountDeps??n.options.defaultRemountDeps)==null?void 0:p({routeId:a,loaderDeps:o.loaderDeps,params:o._strictParams,search:o._strictSearch});return h?JSON.stringify(h):void 0},[a,o.loaderDeps,o._strictParams,o._strictSearch,n.options.defaultRemountDeps,n.routesById]),f=C.useMemo(()=>{const h=u.options.component??n.options.defaultComponent;return h?E.jsx(h,{},c):E.jsx(pS,{})},[c,u.options.component,n.options.defaultComponent]);if(o._displayPending)throw r(o,"displayPendingPromise");if(o._forcePending)throw r(o,"minPendingPromise");if(o.status==="pending"){const h=u.options.pendingMinMs??n.options.defaultPendingMinMs;if(h){const p=n.getMatch(o.id);if(p&&!p._nonReactive.minPendingPromise){const m=jc();p._nonReactive.minPendingPromise=m,setTimeout(()=>{m.resolve(),p._nonReactive.minPendingPromise=void 0},h)}}throw r(o,"loadPromise")}if(o.status==="notFound")return Jn(o.error)||Wo(),g$(n,u,o.error);if(o.status==="redirected")throw kr(o.error)||Wo(),r(o,"loadPromise");if(o.status==="error")throw o.error;return f}),pS=C.memo(function(){const t=Jr(),n=C.useContext(Ty);let r,i=!1,o;{const f=n?t.stores.matchStores.get(n):void 0;[r,i]=_r(f,h=>[h==null?void 0:h.routeId,(h==null?void 0:h.globalNotFound)??!1]),o=_r(t.stores.matchesId,h=>h[h.findIndex(p=>p===n)+1])}const a=r?t.routesById[r]:void 0,u=t.options.defaultPendingComponent?E.jsx(t.options.defaultPendingComponent,{}):null;if(i)return a||Wo(),g$(t,a,void 0);if(!o)return null;const c=E.jsx(y$,{matchId:o});return r===$l?E.jsx(C.Suspense,{fallback:u,children:c}):c});function q9(){const e=Jr(),t=C.useRef({router:e,mounted:!1}),[n,r]=C.useState(!1),i=_r(e.stores.isLoading,p=>p),o=_r(e.stores.hasPending,p=>p),a=$0(i),u=i||n||o,c=$0(u),f=i||o,h=$0(f);return e.startTransition=p=>{r(!0),C.startTransition(()=>{p(),r(!1)})},C.useEffect(()=>{const p=e.history.subscribe(e.load),m=e.buildLocation({to:e.latestLocation.pathname,search:!0,params:!0,hash:!0,state:!0,_includeValidateSearch:!0});return fa(e.latestLocation.publicHref)!==fa(m.publicHref)&&e.commitLocation({...m,replace:!0}),()=>{p()}},[e,e.history]),Od(()=>{if(typeof window<"u"&&e.ssr||t.current.router===e&&t.current.mounted)return;t.current={router:e,mounted:!0},(async()=>{try{await e.load()}catch(m){console.error(m)}})()},[e]),Od(()=>{a&&!i&&e.emit({type:"onLoad",...fc(e.stores.location.get(),e.stores.resolvedLocation.get())})},[a,e,i]),Od(()=>{h&&!f&&e.emit({type:"onBeforeRouteMount",...fc(e.stores.location.get(),e.stores.resolvedLocation.get())})},[f,h,e]),Od(()=>{if(c&&!u){const p=fc(e.stores.location.get(),e.stores.resolvedLocation.get());e.emit({type:"onResolved",...p}),s$(()=>{e.stores.status.set("idle"),e.stores.resolvedLocation.set(e.stores.location.get())}),p.hrefChanged&&f9(e)}},[u,c,e]),null}function Y9(){const e=Jr(),t=e.routesById[$l].options.pendingComponent??e.options.defaultPendingComponent,n=t?E.jsx(t,{}):null,r=E.jsxs(typeof document<"u"&&e.ssr?tc:C.Suspense,{fallback:n,children:[E.jsx(q9,{}),E.jsx(W9,{})]});return e.options.InnerWrap?E.jsx(e.options.InnerWrap,{children:r}):r}function W9(){const e=Jr(),t=_r(e.stores.firstId,i=>i),n=_r(e.stores.loadedAt,i=>i),r=t?E.jsx(y$,{matchId:t}):null;return E.jsx(Ty.Provider,{value:t,children:e.options.disableGlobalCatchBoundary?r:E.jsx(dS,{getResetKey:()=>n,errorComponent:hS,onCatch:void 0,children:r})})}var K9=e=>({createMutableStore:uA,createReadonlyStore:uA,batch:s$}),X9=e=>new Q9(e),Q9=class extends n9{constructor(e){super(e,K9)}};function Z9({router:e,children:t,...n}){Object.keys(n).length>0&&e.update({...e.options,...n,context:{...e.options.context,...n.context}});const r=E.jsx(i$.Provider,{value:e,children:t});return e.options.Wrap?E.jsx(e.options.Wrap,{children:r}):r}function J9({router:e,...t}){return E.jsx(Z9,{router:e,...t,children:E.jsx(Y9,{})})}function eU(e){const t=Jr({warn:(e==null?void 0:e.router)===void 0}),n=(e==null?void 0:e.router)||t,r=C.useRef(void 0);return _r(n.stores.__store,i=>{if(e!=null&&e.select){if(e.structuralSharing??n.options.defaultStructuralSharing){const o=sa(r.current,e.select(i));return r.current=o,o}return e.select(i)}return i})}function b$(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=b$(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function q0(){for(var e,t,n=0,r="",i=arguments.length;n<i;n++)(e=arguments[n])&&(t=b$(e))&&(r&&(r+=" "),r+=t);return r}const mA=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,tU=e=>{const t=function(){for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];var u,c;return typeof(e==null||(u=e.hooks)===null||u===void 0?void 0:u["cx:done"])<"u"?e==null?void 0:e.hooks["cx:done"](q0(o)):typeof(e==null||(c=e.hooks)===null||c===void 0?void 0:c.onComplete)<"u"?e==null?void 0:e.hooks.onComplete(q0(o)):q0(o)};return{compose:function(){for(var i=arguments.length,o=new Array(i),a=0;a<i;a++)o[a]=arguments[a];return u=>{const c=Object.fromEntries(Object.entries(u||{}).filter(f=>{let[h]=f;return!["class","className"].includes(h)}));return t(o.map(f=>f(c)),u==null?void 0:u.class,u==null?void 0:u.className)}},cva:i=>o=>{var a;if((i==null?void 0:i.variants)==null)return t(i==null?void 0:i.base,o==null?void 0:o.class,o==null?void 0:o.className);const{variants:u,defaultVariants:c}=i,f=Object.keys(u).map(m=>{const y=o==null?void 0:o[m],b=c==null?void 0:c[m],v=mA(y)||mA(b);return u[m][v]}),h={...c,...o&&Object.entries(o).reduce((m,y)=>{let[b,v]=y;return typeof v>"u"?m:{...m,[b]:v}},{})},p=i==null||(a=i.compoundVariants)===null||a===void 0?void 0:a.reduce((m,y)=>{let{class:b,className:v,...S}=y;return Object.entries(S).every(x=>{let[_,k]=x;const T=h[_];return Array.isArray(k)?k.includes(T):T===k})?[...m,b,v]:m},[]);return t(i==null?void 0:i.base,f,p,o==null?void 0:o.class,o==null?void 0:o.className)},cx:t}},nU=(e,t)=>{const n=new Array(e.length+t.length);for(let r=0;r<e.length;r++)n[r]=e[r];for(let r=0;r<t.length;r++)n[e.length+r]=t[r];return n},rU=(e,t)=>({classGroupId:e,validator:t}),v$=(e=new Map,t=null,n)=>({nextPart:e,validators:t,classGroupId:n}),$g="-",gA=[],iU="arbitrary..",oU=e=>{const t=aU(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:a=>{if(a.startsWith("[")&&a.endsWith("]"))return sU(a);const u=a.split($g),c=u[0]===""&&u.length>1?1:0;return x$(u,c,t)},getConflictingClassGroupIds:(a,u)=>{if(u){const c=r[a],f=n[a];return c?f?nU(f,c):c:f||gA}return n[a]||gA}}},x$=(e,t,n)=>{if(e.length-t===0)return n.classGroupId;const i=e[t],o=n.nextPart.get(i);if(o){const f=x$(e,t+1,o);if(f)return f}const a=n.validators;if(a===null)return;const u=t===0?e.join($g):e.slice(t).join($g),c=a.length;for(let f=0;f<c;f++){const h=a[f];if(h.validator(u))return h.classGroupId}},sU=e=>e.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const t=e.slice(1,-1),n=t.indexOf(":"),r=t.slice(0,n);return r?iU+r:void 0})(),aU=e=>{const{theme:t,classGroups:n}=e;return lU(n,t)},lU=(e,t)=>{const n=v$();for(const r in e){const i=e[r];mS(i,n,r,t)}return n},mS=(e,t,n,r)=>{const i=e.length;for(let o=0;o<i;o++){const a=e[o];uU(a,t,n,r)}},uU=(e,t,n,r)=>{if(typeof e=="string"){cU(e,t,n);return}if(typeof e=="function"){fU(e,t,n,r);return}dU(e,t,n,r)},cU=(e,t,n)=>{const r=e===""?t:w$(t,e);r.classGroupId=n},fU=(e,t,n,r)=>{if(hU(e)){mS(e(r),t,n,r);return}t.validators===null&&(t.validators=[]),t.validators.push(rU(n,e))},dU=(e,t,n,r)=>{const i=Object.entries(e),o=i.length;for(let a=0;a<o;a++){const[u,c]=i[a];mS(c,w$(t,u),n,r)}},w$=(e,t)=>{let n=e;const r=t.split($g),i=r.length;for(let o=0;o<i;o++){const a=r[o];let u=n.nextPart.get(a);u||(u=v$(),n.nextPart.set(a,u)),n=u}return n},hU=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,pU=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=Object.create(null),r=Object.create(null);const i=(o,a)=>{n[o]=a,t++,t>e&&(t=0,r=n,n=Object.create(null))};return{get(o){let a=n[o];if(a!==void 0)return a;if((a=r[o])!==void 0)return i(o,a),a},set(o,a){o in n?n[o]=a:i(o,a)}}},T1="!",yA=":",mU=[],bA=(e,t,n,r,i)=>({modifiers:e,hasImportantModifier:t,baseClassName:n,maybePostfixModifierPosition:r,isExternal:i}),gU=e=>{const{prefix:t,experimentalParseClassName:n}=e;let r=i=>{const o=[];let a=0,u=0,c=0,f;const h=i.length;for(let v=0;v<h;v++){const S=i[v];if(a===0&&u===0){if(S===yA){o.push(i.slice(c,v)),c=v+1;continue}if(S==="/"){f=v;continue}}S==="["?a++:S==="]"?a--:S==="("?u++:S===")"&&u--}const p=o.length===0?i:i.slice(c);let m=p,y=!1;p.endsWith(T1)?(m=p.slice(0,-1),y=!0):p.startsWith(T1)&&(m=p.slice(1),y=!0);const b=f&&f>c?f-c:void 0;return bA(o,y,m,b)};if(t){const i=t+yA,o=r;r=a=>a.startsWith(i)?o(a.slice(i.length)):bA(mU,!1,a,void 0,!0)}if(n){const i=r;r=o=>n({className:o,parseClassName:i})}return r},yU=e=>{const t=new Map;return e.orderSensitiveModifiers.forEach((n,r)=>{t.set(n,1e6+r)}),n=>{const r=[];let i=[];for(let o=0;o<n.length;o++){const a=n[o],u=a[0]==="[",c=t.has(a);u||c?(i.length>0&&(i.sort(),r.push(...i),i=[]),r.push(a)):i.push(a)}return i.length>0&&(i.sort(),r.push(...i)),r}},bU=e=>({cache:pU(e.cacheSize),parseClassName:gU(e),sortModifiers:yU(e),...oU(e)}),vU=/\s+/,xU=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:i,sortModifiers:o}=t,a=[],u=e.trim().split(vU);let c="";for(let f=u.length-1;f>=0;f-=1){const h=u[f],{isExternal:p,modifiers:m,hasImportantModifier:y,baseClassName:b,maybePostfixModifierPosition:v}=n(h);if(p){c=h+(c.length>0?" "+c:c);continue}let S=!!v,x=r(S?b.substring(0,v):b);if(!x){if(!S){c=h+(c.length>0?" "+c:c);continue}if(x=r(b),!x){c=h+(c.length>0?" "+c:c);continue}S=!1}const _=m.length===0?"":m.length===1?m[0]:o(m).join(":"),k=y?_+T1:_,T=k+x;if(a.indexOf(T)>-1)continue;a.push(T);const A=i(x,S);for(let D=0;D<A.length;++D){const O=A[D];a.push(k+O)}c=h+(c.length>0?" "+c:c)}return c},wU=(...e)=>{let t=0,n,r,i="";for(;t<e.length;)(n=e[t++])&&(r=S$(n))&&(i&&(i+=" "),i+=r);return i},S$=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=S$(e[r]))&&(n&&(n+=" "),n+=t);return n},SU=(e,...t)=>{let n,r,i,o;const a=c=>{const f=t.reduce((h,p)=>p(h),e());return n=bU(f),r=n.cache.get,i=n.cache.set,o=u,u(c)},u=c=>{const f=r(c);if(f)return f;const h=xU(c,n);return i(c,h),h};return o=a,(...c)=>o(wU(...c))},CU=[],kn=e=>{const t=n=>n[e]||CU;return t.isThemeGetter=!0,t},C$=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,E$=/^\((?:(\w[\w-]*):)?(.+)\)$/i,EU=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,kU=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,RU=/\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$/,_U=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,TU=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,AU=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Ns=e=>EU.test(e),dt=e=>!!e&&!Number.isNaN(Number(e)),Is=e=>!!e&&Number.isInteger(Number(e)),Y0=e=>e.endsWith("%")&&dt(e.slice(0,-1)),Mo=e=>kU.test(e),k$=()=>!0,DU=e=>RU.test(e)&&!_U.test(e),gS=()=>!1,MU=e=>TU.test(e),OU=e=>AU.test(e),$U=e=>!Ue(e)&&!Ge(e),PU=e=>_a(e,T$,gS),Ue=e=>C$.test(e),al=e=>_a(e,A$,DU),vA=e=>_a(e,UU,dt),NU=e=>_a(e,M$,k$),IU=e=>_a(e,D$,gS),xA=e=>_a(e,R$,gS),jU=e=>_a(e,_$,OU),ym=e=>_a(e,O$,MU),Ge=e=>E$.test(e),wd=e=>Zl(e,A$),LU=e=>Zl(e,D$),wA=e=>Zl(e,R$),FU=e=>Zl(e,T$),zU=e=>Zl(e,_$),bm=e=>Zl(e,O$,!0),BU=e=>Zl(e,M$,!0),_a=(e,t,n)=>{const r=C$.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},Zl=(e,t,n=!1)=>{const r=E$.exec(e);return r?r[1]?t(r[1]):n:!1},R$=e=>e==="position"||e==="percentage",_$=e=>e==="image"||e==="url",T$=e=>e==="length"||e==="size"||e==="bg-size",A$=e=>e==="length",UU=e=>e==="number",D$=e=>e==="family-name",M$=e=>e==="number"||e==="weight",O$=e=>e==="shadow",HU=()=>{const e=kn("color"),t=kn("font"),n=kn("text"),r=kn("font-weight"),i=kn("tracking"),o=kn("leading"),a=kn("breakpoint"),u=kn("container"),c=kn("spacing"),f=kn("radius"),h=kn("shadow"),p=kn("inset-shadow"),m=kn("text-shadow"),y=kn("drop-shadow"),b=kn("blur"),v=kn("perspective"),S=kn("aspect"),x=kn("ease"),_=kn("animate"),k=()=>["auto","avoid","all","avoid-page","page","left","right","column"],T=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],A=()=>[...T(),Ge,Ue],D=()=>["auto","hidden","clip","visible","scroll"],O=()=>["auto","contain","none"],$=()=>[Ge,Ue,c],B=()=>[Ns,"full","auto",...$()],j=()=>[Is,"none","subgrid",Ge,Ue],N=()=>["auto",{span:["full",Is,Ge,Ue]},Is,Ge,Ue],M=()=>[Is,"auto",Ge,Ue],z=()=>["auto","min","max","fr",Ge,Ue],G=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],L=()=>["start","end","center","stretch","center-safe","end-safe"],F=()=>["auto",...$()],U=()=>[Ns,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...$()],q=()=>[Ns,"screen","full","dvw","lvw","svw","min","max","fit",...$()],W=()=>[Ns,"screen","full","lh","dvh","lvh","svh","min","max","fit",...$()],I=()=>[e,Ge,Ue],Y=()=>[...T(),wA,xA,{position:[Ge,Ue]}],J=()=>["no-repeat",{repeat:["","x","y","space","round"]}],H=()=>["auto","cover","contain",FU,PU,{size:[Ge,Ue]}],ie=()=>[Y0,wd,al],re=()=>["","none","full",f,Ge,Ue],he=()=>["",dt,wd,al],ve=()=>["solid","dashed","dotted","double"],Re=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],ce=()=>[dt,Y0,wA,xA],je=()=>["","none",b,Ge,Ue],We=()=>["none",dt,Ge,Ue],X=()=>["none",dt,Ge,Ue],Z=()=>[dt,Ge,Ue],ne=()=>[Ns,"full",...$()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Mo],breakpoint:[Mo],color:[k$],container:[Mo],"drop-shadow":[Mo],ease:["in","out","in-out"],font:[$U],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Mo],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Mo],shadow:[Mo],spacing:["px",dt],text:[Mo],"text-shadow":[Mo],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Ns,Ue,Ge,S]}],container:["container"],columns:[{columns:[dt,Ue,Ge,u]}],"break-after":[{"break-after":k()}],"break-before":[{"break-before":k()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:A()}],overflow:[{overflow:D()}],"overflow-x":[{"overflow-x":D()}],"overflow-y":[{"overflow-y":D()}],overscroll:[{overscroll:O()}],"overscroll-x":[{"overscroll-x":O()}],"overscroll-y":[{"overscroll-y":O()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:B()}],"inset-x":[{"inset-x":B()}],"inset-y":[{"inset-y":B()}],start:[{"inset-s":B(),start:B()}],end:[{"inset-e":B(),end:B()}],"inset-bs":[{"inset-bs":B()}],"inset-be":[{"inset-be":B()}],top:[{top:B()}],right:[{right:B()}],bottom:[{bottom:B()}],left:[{left:B()}],visibility:["visible","invisible","collapse"],z:[{z:[Is,"auto",Ge,Ue]}],basis:[{basis:[Ns,"full","auto",u,...$()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[dt,Ns,"auto","initial","none",Ue]}],grow:[{grow:["",dt,Ge,Ue]}],shrink:[{shrink:["",dt,Ge,Ue]}],order:[{order:[Is,"first","last","none",Ge,Ue]}],"grid-cols":[{"grid-cols":j()}],"col-start-end":[{col:N()}],"col-start":[{"col-start":M()}],"col-end":[{"col-end":M()}],"grid-rows":[{"grid-rows":j()}],"row-start-end":[{row:N()}],"row-start":[{"row-start":M()}],"row-end":[{"row-end":M()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":z()}],"auto-rows":[{"auto-rows":z()}],gap:[{gap:$()}],"gap-x":[{"gap-x":$()}],"gap-y":[{"gap-y":$()}],"justify-content":[{justify:[...G(),"normal"]}],"justify-items":[{"justify-items":[...L(),"normal"]}],"justify-self":[{"justify-self":["auto",...L()]}],"align-content":[{content:["normal",...G()]}],"align-items":[{items:[...L(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...L(),{baseline:["","last"]}]}],"place-content":[{"place-content":G()}],"place-items":[{"place-items":[...L(),"baseline"]}],"place-self":[{"place-self":["auto",...L()]}],p:[{p:$()}],px:[{px:$()}],py:[{py:$()}],ps:[{ps:$()}],pe:[{pe:$()}],pbs:[{pbs:$()}],pbe:[{pbe:$()}],pt:[{pt:$()}],pr:[{pr:$()}],pb:[{pb:$()}],pl:[{pl:$()}],m:[{m:F()}],mx:[{mx:F()}],my:[{my:F()}],ms:[{ms:F()}],me:[{me:F()}],mbs:[{mbs:F()}],mbe:[{mbe:F()}],mt:[{mt:F()}],mr:[{mr:F()}],mb:[{mb:F()}],ml:[{ml:F()}],"space-x":[{"space-x":$()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":$()}],"space-y-reverse":["space-y-reverse"],size:[{size:U()}],"inline-size":[{inline:["auto",...q()]}],"min-inline-size":[{"min-inline":["auto",...q()]}],"max-inline-size":[{"max-inline":["none",...q()]}],"block-size":[{block:["auto",...W()]}],"min-block-size":[{"min-block":["auto",...W()]}],"max-block-size":[{"max-block":["none",...W()]}],w:[{w:[u,"screen",...U()]}],"min-w":[{"min-w":[u,"screen","none",...U()]}],"max-w":[{"max-w":[u,"screen","none","prose",{screen:[a]},...U()]}],h:[{h:["screen","lh",...U()]}],"min-h":[{"min-h":["screen","lh","none",...U()]}],"max-h":[{"max-h":["screen","lh",...U()]}],"font-size":[{text:["base",n,wd,al]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,BU,NU]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Y0,Ue]}],"font-family":[{font:[LU,IU,t]}],"font-features":[{"font-features":[Ue]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[i,Ge,Ue]}],"line-clamp":[{"line-clamp":[dt,"none",Ge,vA]}],leading:[{leading:[o,...$()]}],"list-image":[{"list-image":["none",Ge,Ue]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",Ge,Ue]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:I()}],"text-color":[{text:I()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...ve(),"wavy"]}],"text-decoration-thickness":[{decoration:[dt,"from-font","auto",Ge,al]}],"text-decoration-color":[{decoration:I()}],"underline-offset":[{"underline-offset":[dt,"auto",Ge,Ue]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:$()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Ge,Ue]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",Ge,Ue]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:Y()}],"bg-repeat":[{bg:J()}],"bg-size":[{bg:H()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Is,Ge,Ue],radial:["",Ge,Ue],conic:[Is,Ge,Ue]},zU,jU]}],"bg-color":[{bg:I()}],"gradient-from-pos":[{from:ie()}],"gradient-via-pos":[{via:ie()}],"gradient-to-pos":[{to:ie()}],"gradient-from":[{from:I()}],"gradient-via":[{via:I()}],"gradient-to":[{to:I()}],rounded:[{rounded:re()}],"rounded-s":[{"rounded-s":re()}],"rounded-e":[{"rounded-e":re()}],"rounded-t":[{"rounded-t":re()}],"rounded-r":[{"rounded-r":re()}],"rounded-b":[{"rounded-b":re()}],"rounded-l":[{"rounded-l":re()}],"rounded-ss":[{"rounded-ss":re()}],"rounded-se":[{"rounded-se":re()}],"rounded-ee":[{"rounded-ee":re()}],"rounded-es":[{"rounded-es":re()}],"rounded-tl":[{"rounded-tl":re()}],"rounded-tr":[{"rounded-tr":re()}],"rounded-br":[{"rounded-br":re()}],"rounded-bl":[{"rounded-bl":re()}],"border-w":[{border:he()}],"border-w-x":[{"border-x":he()}],"border-w-y":[{"border-y":he()}],"border-w-s":[{"border-s":he()}],"border-w-e":[{"border-e":he()}],"border-w-bs":[{"border-bs":he()}],"border-w-be":[{"border-be":he()}],"border-w-t":[{"border-t":he()}],"border-w-r":[{"border-r":he()}],"border-w-b":[{"border-b":he()}],"border-w-l":[{"border-l":he()}],"divide-x":[{"divide-x":he()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":he()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...ve(),"hidden","none"]}],"divide-style":[{divide:[...ve(),"hidden","none"]}],"border-color":[{border:I()}],"border-color-x":[{"border-x":I()}],"border-color-y":[{"border-y":I()}],"border-color-s":[{"border-s":I()}],"border-color-e":[{"border-e":I()}],"border-color-bs":[{"border-bs":I()}],"border-color-be":[{"border-be":I()}],"border-color-t":[{"border-t":I()}],"border-color-r":[{"border-r":I()}],"border-color-b":[{"border-b":I()}],"border-color-l":[{"border-l":I()}],"divide-color":[{divide:I()}],"outline-style":[{outline:[...ve(),"none","hidden"]}],"outline-offset":[{"outline-offset":[dt,Ge,Ue]}],"outline-w":[{outline:["",dt,wd,al]}],"outline-color":[{outline:I()}],shadow:[{shadow:["","none",h,bm,ym]}],"shadow-color":[{shadow:I()}],"inset-shadow":[{"inset-shadow":["none",p,bm,ym]}],"inset-shadow-color":[{"inset-shadow":I()}],"ring-w":[{ring:he()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:I()}],"ring-offset-w":[{"ring-offset":[dt,al]}],"ring-offset-color":[{"ring-offset":I()}],"inset-ring-w":[{"inset-ring":he()}],"inset-ring-color":[{"inset-ring":I()}],"text-shadow":[{"text-shadow":["none",m,bm,ym]}],"text-shadow-color":[{"text-shadow":I()}],opacity:[{opacity:[dt,Ge,Ue]}],"mix-blend":[{"mix-blend":[...Re(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":Re()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[dt]}],"mask-image-linear-from-pos":[{"mask-linear-from":ce()}],"mask-image-linear-to-pos":[{"mask-linear-to":ce()}],"mask-image-linear-from-color":[{"mask-linear-from":I()}],"mask-image-linear-to-color":[{"mask-linear-to":I()}],"mask-image-t-from-pos":[{"mask-t-from":ce()}],"mask-image-t-to-pos":[{"mask-t-to":ce()}],"mask-image-t-from-color":[{"mask-t-from":I()}],"mask-image-t-to-color":[{"mask-t-to":I()}],"mask-image-r-from-pos":[{"mask-r-from":ce()}],"mask-image-r-to-pos":[{"mask-r-to":ce()}],"mask-image-r-from-color":[{"mask-r-from":I()}],"mask-image-r-to-color":[{"mask-r-to":I()}],"mask-image-b-from-pos":[{"mask-b-from":ce()}],"mask-image-b-to-pos":[{"mask-b-to":ce()}],"mask-image-b-from-color":[{"mask-b-from":I()}],"mask-image-b-to-color":[{"mask-b-to":I()}],"mask-image-l-from-pos":[{"mask-l-from":ce()}],"mask-image-l-to-pos":[{"mask-l-to":ce()}],"mask-image-l-from-color":[{"mask-l-from":I()}],"mask-image-l-to-color":[{"mask-l-to":I()}],"mask-image-x-from-pos":[{"mask-x-from":ce()}],"mask-image-x-to-pos":[{"mask-x-to":ce()}],"mask-image-x-from-color":[{"mask-x-from":I()}],"mask-image-x-to-color":[{"mask-x-to":I()}],"mask-image-y-from-pos":[{"mask-y-from":ce()}],"mask-image-y-to-pos":[{"mask-y-to":ce()}],"mask-image-y-from-color":[{"mask-y-from":I()}],"mask-image-y-to-color":[{"mask-y-to":I()}],"mask-image-radial":[{"mask-radial":[Ge,Ue]}],"mask-image-radial-from-pos":[{"mask-radial-from":ce()}],"mask-image-radial-to-pos":[{"mask-radial-to":ce()}],"mask-image-radial-from-color":[{"mask-radial-from":I()}],"mask-image-radial-to-color":[{"mask-radial-to":I()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":T()}],"mask-image-conic-pos":[{"mask-conic":[dt]}],"mask-image-conic-from-pos":[{"mask-conic-from":ce()}],"mask-image-conic-to-pos":[{"mask-conic-to":ce()}],"mask-image-conic-from-color":[{"mask-conic-from":I()}],"mask-image-conic-to-color":[{"mask-conic-to":I()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:Y()}],"mask-repeat":[{mask:J()}],"mask-size":[{mask:H()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",Ge,Ue]}],filter:[{filter:["","none",Ge,Ue]}],blur:[{blur:je()}],brightness:[{brightness:[dt,Ge,Ue]}],contrast:[{contrast:[dt,Ge,Ue]}],"drop-shadow":[{"drop-shadow":["","none",y,bm,ym]}],"drop-shadow-color":[{"drop-shadow":I()}],grayscale:[{grayscale:["",dt,Ge,Ue]}],"hue-rotate":[{"hue-rotate":[dt,Ge,Ue]}],invert:[{invert:["",dt,Ge,Ue]}],saturate:[{saturate:[dt,Ge,Ue]}],sepia:[{sepia:["",dt,Ge,Ue]}],"backdrop-filter":[{"backdrop-filter":["","none",Ge,Ue]}],"backdrop-blur":[{"backdrop-blur":je()}],"backdrop-brightness":[{"backdrop-brightness":[dt,Ge,Ue]}],"backdrop-contrast":[{"backdrop-contrast":[dt,Ge,Ue]}],"backdrop-grayscale":[{"backdrop-grayscale":["",dt,Ge,Ue]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[dt,Ge,Ue]}],"backdrop-invert":[{"backdrop-invert":["",dt,Ge,Ue]}],"backdrop-opacity":[{"backdrop-opacity":[dt,Ge,Ue]}],"backdrop-saturate":[{"backdrop-saturate":[dt,Ge,Ue]}],"backdrop-sepia":[{"backdrop-sepia":["",dt,Ge,Ue]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":$()}],"border-spacing-x":[{"border-spacing-x":$()}],"border-spacing-y":[{"border-spacing-y":$()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",Ge,Ue]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[dt,"initial",Ge,Ue]}],ease:[{ease:["linear","initial",x,Ge,Ue]}],delay:[{delay:[dt,Ge,Ue]}],animate:[{animate:["none",_,Ge,Ue]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[v,Ge,Ue]}],"perspective-origin":[{"perspective-origin":A()}],rotate:[{rotate:We()}],"rotate-x":[{"rotate-x":We()}],"rotate-y":[{"rotate-y":We()}],"rotate-z":[{"rotate-z":We()}],scale:[{scale:X()}],"scale-x":[{"scale-x":X()}],"scale-y":[{"scale-y":X()}],"scale-z":[{"scale-z":X()}],"scale-3d":["scale-3d"],skew:[{skew:Z()}],"skew-x":[{"skew-x":Z()}],"skew-y":[{"skew-y":Z()}],transform:[{transform:[Ge,Ue,"","none","gpu","cpu"]}],"transform-origin":[{origin:A()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:ne()}],"translate-x":[{"translate-x":ne()}],"translate-y":[{"translate-y":ne()}],"translate-z":[{"translate-z":ne()}],"translate-none":["translate-none"],accent:[{accent:I()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:I()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",Ge,Ue]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":$()}],"scroll-mx":[{"scroll-mx":$()}],"scroll-my":[{"scroll-my":$()}],"scroll-ms":[{"scroll-ms":$()}],"scroll-me":[{"scroll-me":$()}],"scroll-mbs":[{"scroll-mbs":$()}],"scroll-mbe":[{"scroll-mbe":$()}],"scroll-mt":[{"scroll-mt":$()}],"scroll-mr":[{"scroll-mr":$()}],"scroll-mb":[{"scroll-mb":$()}],"scroll-ml":[{"scroll-ml":$()}],"scroll-p":[{"scroll-p":$()}],"scroll-px":[{"scroll-px":$()}],"scroll-py":[{"scroll-py":$()}],"scroll-ps":[{"scroll-ps":$()}],"scroll-pe":[{"scroll-pe":$()}],"scroll-pbs":[{"scroll-pbs":$()}],"scroll-pbe":[{"scroll-pbe":$()}],"scroll-pt":[{"scroll-pt":$()}],"scroll-pr":[{"scroll-pr":$()}],"scroll-pb":[{"scroll-pb":$()}],"scroll-pl":[{"scroll-pl":$()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",Ge,Ue]}],fill:[{fill:["none",...I()]}],"stroke-w":[{stroke:[dt,wd,al,vA]}],stroke:[{stroke:["none",...I()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","inset-bs","inset-be","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pbs","pbe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mbs","mbe","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-bs","border-w-be","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-bs","border-color-be","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mbs","scroll-mbe","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pbs","scroll-pbe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},GU=SU(HU),$$=tU({hooks:{onComplete:e=>GU(e)}}),Dn=$$.cva;function ze(...e){const t=$$.cx(...e);return t.trim()?t:void 0}const P$=({render:e,children:t,props:n,fallbackElement:r="div"})=>C.isValidElement(e)?C.cloneElement(e,{...n,children:t??e.props.children,className:ze(e.props.className,n.className),style:{...e.props.style,...n.style}}):C.createElement(r,n,t);function SA(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function VU(...e){return t=>{let n=!1;const r=e.map(i=>{const o=SA(i,t);return!n&&typeof o=="function"&&(n=!0),o});if(n)return()=>{for(let i=0;i<r.length;i++){const o=r[i];typeof o=="function"?o():SA(e[i],null)}}}}function qU(...e){return C.useCallback(t=>VU(...e)(t),e)}const YU=["evenly","fullwidth","fullheight","fullscreen"],WU=["ax","ay","direction"],KU={property:"justifyContent",values:["space-around","baseline","space-between","center","end","evenly","normal","start","stretch"]},XU={property:"alignItems",values:["baseline","center","end","start","stretch"]},QU={property:"flexDirection",values:["column","row"]},ZU=["b","bx","bl","br","by","bt","bb"],JU={property:"borderWidth"},e7={property:"borderInlineWidth"},t7={property:"borderInlineStartWidth"},n7={property:"borderInlineEndWidth"},r7={property:"borderBlockWidth"},i7={property:"borderBlockStartWidth"},o7={property:"borderBlockEndWidth"},s7=["gap","m","mx","ml","mr","my","mt","mb","p","px","pl","pr","py","pt","pb"],a7={property:"gap",unit:{variable:"--spacing-unit"}},l7={property:"margin",unit:{variable:"--spacing-unit"}},u7={property:"marginInline",unit:{variable:"--spacing-inline"}},c7={property:"marginInlineStart",unit:{variable:"--spacing-inline"}},f7={property:"marginInlineEnd",unit:{variable:"--spacing-inline"}},d7={property:"marginBlock",unit:{variable:"--spacing-block"}},h7={property:"marginBlockStart",unit:{variable:"--spacing-block"}},p7={property:"marginBlockEnd",unit:{variable:"--spacing-block"}},m7={property:"padding",unit:{variable:"--spacing-unit"}},g7={property:"paddingInline",unit:{variable:"--spacing-inline"}},y7={property:"paddingInlineStart",unit:{variable:"--spacing-inline"}},b7={property:"paddingInlineEnd",unit:{variable:"--spacing-inline"}},v7={property:"paddingBlock",unit:{variable:"--spacing-block"}},x7={property:"paddingBlockStart",unit:{variable:"--spacing-block"}},w7={property:"paddingBlockEnd",unit:{variable:"--spacing-block"}},S7=["w","minw","maxw","h","minh","maxh"],C7={property:"width"},E7={property:"minWidth"},k7={property:"maxWidth"},R7={property:"height"},_7={property:"minHeight"},T7={property:"maxHeight"},N$={b:JU,bx:e7,bl:t7,br:n7,by:r7,bt:i7,bb:o7,ax:KU,ay:XU,direction:QU,gap:a7,m:l7,mx:u7,ml:c7,mr:f7,my:d7,mt:h7,mb:p7,p:m7,px:g7,pl:y7,pr:b7,py:v7,pt:x7,pb:w7,w:C7,minw:E7,maxw:k7,h:R7,minh:_7,maxh:T7},A7=Object.keys(N$);({...Object.fromEntries(s7.map(e=>[e,"spacing"])),...Object.fromEntries(WU.map(e=>[e,"layout"])),...Object.fromEntries(S7.map(e=>[e,"sizing"])),...Object.fromEntries(ZU.map(e=>[e,"border"])),...Object.fromEntries(YU.map(e=>[e,"toggle"]))});function I$({componentName:e,props:t,styleProps:n=[]}){const r={"data-slot":e},i={},o={};for(const[u,c]of Object.entries(t))if(n.includes(u)&&c!==void 0){const f=N$[u];if(f&&c!=null)if("unit"in f&&f.unit&&typeof c=="number"){const h="suffix"in f.unit&&f.unit.suffix||"",p=`calc(${c} * var(${f.unit.variable}))${h}`;o[f.property]=p}else typeof c=="number"?o[f.property]=`${c}px`:o[f.property]=c}else i[u]=c;const a=Object.keys(o).length>0?{...o,...i.style||{}}:i.style;return{...r,...i,...a&&{style:a}}}const D7="_box_1f7bt_1",zs={box:D7,"toggle-evenly":"_toggle-evenly_1f7bt_8","toggle-fullheight":"_toggle-fullheight_1f7bt_15","toggle-fullwidth":"_toggle-fullwidth_1f7bt_20","toggle-fullscreen":"_toggle-fullscreen_1f7bt_26","toggle-rounded":"_toggle-rounded_1f7bt_31","toggle-square":"_toggle-square_1f7bt_35","toggle-bordered":"_toggle-bordered_1f7bt_39"},M7=Dn({variants:{bordered:{true:zs["toggle-bordered"]},evenly:{true:zs["toggle-evenly"]},rounded:{true:zs["toggle-rounded"]},square:{true:zs["toggle-square"]},fullheight:{true:zs["toggle-fullheight"]},fullwidth:{true:zs["toggle-fullwidth"]},fullscreen:{true:zs["toggle-fullscreen"]}}}),Ko=({bordered:e,evenly:t,fullwidth:n,fullheight:r,fullscreen:i,rounded:o,square:a,render:u,className:c,children:f,...h})=>{const p=I$({componentName:"box",styleProps:A7,props:h});return P$({fallbackElement:"div",props:{...p,className:ze(zs.box,M7({bordered:e,evenly:t,fullwidth:n,fullheight:r,fullscreen:i,rounded:o,square:a}),c)},render:u,children:f})};Ko.displayName="Box";function er({condition:e,render:t,children:n}){if(!e||!t)return E.jsx(E.Fragment,{children:n});const r=n??t.props.children;return C.cloneElement(t,void 0,r)}er.displayName="ConditionalRender";const O7="_group_h0evt_1",$7={group:O7},Xe=({className:e,...t})=>E.jsx(Ko,{"data-slot":"group",className:ze($7.group,e),...t});Xe.displayName="Group";const P7="_layer_1akt0_1",N7={layer:P7},yS=({offset:e,className:t,style:n,children:r,...i})=>{const o=C.Children.count(r),a={...n,...e&&{paddingInlineEnd:e.x?e.x*(o-1):void 0,paddingBlockEnd:e.y?e.y*(o-1):void 0}},u=e?C.Children.map(r,(c,f)=>{if(!C.isValidElement(c))return c;const h=e.x?e.x*f:0,p=e.y?e.y*f:0;return E.jsx("div",{style:{transform:`translate(${h}px, ${p}px)`},children:c})}):r;return E.jsx(Ko,{"data-slot":"layer",className:ze(N7.layer,t),style:a,...i,children:u})};yS.displayName="Layer";const I7="_text_vscxe_3",j7="_colored_vscxe_112",Ct={text:I7,"text-size--1":"_text-size--1_vscxe_17","text-size-0":"_text-size-0_vscxe_22","text-size-1":"_text-size-1_vscxe_27","text-size-2":"_text-size-2_vscxe_32","text-size-3":"_text-size-3_vscxe_37","text-size-4":"_text-size-4_vscxe_42","text-size-5":"_text-size-5_vscxe_47","text-size-6":"_text-size-6_vscxe_52","shade-background":"_shade-background_vscxe_58","shade-surface":"_shade-surface_vscxe_61","shade-accent":"_shade-accent_vscxe_64","shade-halftone":"_shade-halftone_vscxe_67","shade-muted":"_shade-muted_vscxe_70","shade-foreground":"_shade-foreground_vscxe_73","color-red":"_color-red_vscxe_78","color-orange":"_color-orange_vscxe_82","color-yellow":"_color-yellow_vscxe_86","color-green":"_color-green_vscxe_90","color-blue":"_color-blue_vscxe_94","color-indigo":"_color-indigo_vscxe_98","color-purple":"_color-purple_vscxe_102","color-neutral":"_color-neutral_vscxe_106",colored:j7,"toggle-underline":"_toggle-underline_vscxe_127","toggle-no-underline":"_toggle-no-underline_vscxe_131","toggle-strikethrough":"_toggle-strikethrough_vscxe_135","toggle-balance":"_toggle-balance_vscxe_139","family-mono":"_family-mono_vscxe_143","family-serif":"_family-serif_vscxe_147","family-sans":"_family-sans_vscxe_151","weight-bold":"_weight-bold_vscxe_155","weight-normal":"_weight-normal_vscxe_158","weight-light":"_weight-light_vscxe_161","weight-thin":"_weight-thin_vscxe_164"},bS={red:Ct["color-red"],orange:Ct["color-orange"],yellow:Ct["color-yellow"],green:Ct["color-green"],blue:Ct["color-blue"],indigo:Ct["color-indigo"],purple:Ct["color-purple"],neutral:Ct["color-neutral"]},L7=Ct.colored,F7=Object.fromEntries(Object.entries(bS).map(([e,t])=>[e,`${t} ${L7}`])),z7=Dn({variants:{strikethrough:{true:Ct["toggle-strikethrough"]},balance:{true:Ct["toggle-balance"]},mono:{true:Ct["toggle-mono"]},underline:{true:Ct["toggle-underline"],false:Ct["toggle-no-underline"]},family:{mono:Ct["family-mono"],serif:Ct["family-serif"],sans:Ct["family-sans"]},weight:{bold:Ct["weight-bold"],normal:Ct["weight-normal"],light:Ct["weight-light"],thin:Ct["weight-thin"]},shade:{background:Ct["shade-background"],surface:Ct["shade-surface"],accent:Ct["shade-accent"],halftone:Ct["shade-halftone"],muted:Ct["shade-muted"],foreground:Ct["shade-foreground"]},color:F7,size:{[-1]:Ct["text-size--1"],0:Ct["text-size-0"],1:Ct["text-size-1"],2:Ct["text-size-2"],3:Ct["text-size-3"],4:Ct["text-size-4"],5:Ct["text-size-5"],6:Ct["text-size-6"]}}}),B7=0,U7="sans",Ie=({shade:e,color:t,weight:n,underline:r,strikethrough:i,balance:o,size:a=B7,family:u=U7,render:c,className:f,children:h,...p})=>{const m=I$({componentName:"text",styleProps:["p","px","py","pl","pr","pt","pb","m","mx","my","ml","mr","mt","mb"],props:p});return P$({fallbackElement:"span",props:{...m,className:ze(Ct.text,z7({shade:e,color:t,size:a,weight:n,family:u,balance:o,underline:r,strikethrough:i}),f)},render:c,children:h})},H7="_stack_1svur_1",G7={stack:H7},Ye=({ax:e,ay:t,className:n,...r})=>E.jsx(Ko,{"data-slot":"stack",ax:t,ay:e,className:ze(G7.stack,n),...r});Ye.displayName="Stack";const of=({condition:e,render:t,children:n,...r})=>{const i=e?t.true:t.false;if(!i)return E.jsx(E.Fragment,{children:n});const o=n??i.props.children;return C.cloneElement(i,r,o)};of.displayName="SwitchRender";const V7="_separator_1u3u3_1",q7="_line_1u3u3_34",pi={separator:V7,"shade-background":"_shade-background_1u3u3_5","shade-surface":"_shade-surface_1u3u3_8","shade-accent":"_shade-accent_1u3u3_11","shade-halftone":"_shade-halftone_1u3u3_14","shade-muted":"_shade-muted_1u3u3_17","shade-foreground":"_shade-foreground_1u3u3_20","orientation-horizontal":"_orientation-horizontal_1u3u3_24","orientation-vertical":"_orientation-vertical_1u3u3_28",line:q7,"line-horizontal":"_line-horizontal_1u3u3_37","line-vertical":"_line-vertical_1u3u3_40"},CA=Dn({variants:{orientation:{horizontal:pi["orientation-horizontal"],vertical:pi["orientation-vertical"]},shade:{background:pi["shade-background"],surface:pi["shade-surface"],accent:pi["shade-accent"],halftone:pi["shade-halftone"],muted:pi["shade-muted"],foreground:pi["shade-foreground"]}}}),EA={};function j$(e,t){const n=C.useRef(EA);return n.current===EA&&(n.current=e(t)),n}function kA(e,t,n,r){const i=j$(L$).current;return W7(i,e,t,n,r)&&F$(i,[e,t,n,r]),i.callback}function Y7(e){const t=j$(L$).current;return K7(t,e)&&F$(t,e),t.callback}function L$(){return{callback:null,cleanup:null,refs:[]}}function W7(e,t,n,r,i){return e.refs[0]!==t||e.refs[1]!==n||e.refs[2]!==r||e.refs[3]!==i}function K7(e,t){return e.refs.length!==t.length||e.refs.some((n,r)=>n!==t[r])}function F$(e,t){if(e.refs=t,t.every(n=>n==null)){e.callback=null;return}e.callback=n=>{if(e.cleanup&&(e.cleanup(),e.cleanup=null),n!=null){const r=Array(t.length).fill(null);for(let i=0;i<t.length;i+=1){const o=t[i];if(o!=null)switch(typeof o){case"function":{const a=o(n);typeof a=="function"&&(r[i]=a);break}case"object":{o.current=n;break}}}e.cleanup=()=>{for(let i=0;i<t.length;i+=1){const o=t[i];if(o!=null)switch(typeof o){case"function":{const a=r[i];typeof a=="function"?a():o(null);break}case"object":{o.current=null;break}}}}}}}const X7=parseInt(C.version,10);function Q7(e){return X7>=e}function RA(e){if(!C.isValidElement(e))return null;const t=e,n=t.props;return(Q7(19)?n==null?void 0:n.ref:t.ref)??null}function A1(e,t){if(e&&!t)return e;if(!e&&t)return t;if(e||t)return{...e,...t}}function Z7(e,t){const n={};for(const r in e){const i=e[r];if(t!=null&&t.hasOwnProperty(r)){const o=t[r](i);o!=null&&Object.assign(n,o);continue}i===!0?n[`data-${r.toLowerCase()}`]="":i&&(n[`data-${r.toLowerCase()}`]=i.toString())}return n}function J7(e,t){return typeof e=="function"?e(t):e}function eH(e,t){return typeof e=="function"?e(t):e}const nc=Object.freeze({}),Pd={};function tH(e,t,n,r,i){let o={...D1(e,Pd)};return t&&(o=z$(o,t)),o}function nH(e){if(e.length===0)return Pd;if(e.length===1)return D1(e[0],Pd);let t={...D1(e[0],Pd)};for(let n=1;n<e.length;n+=1)t=z$(t,e[n]);return t}function z$(e,t){return B$(t)?t(e):rH(e,t)}function rH(e,t){if(!t)return e;for(const n in t){const r=t[n];switch(n){case"style":{e[n]=A1(e.style,r);break}case"className":{e[n]=U$(e.className,r);break}default:iH(n,r)?e[n]=oH(e[n],r):e[n]=r}}return e}function iH(e,t){const n=e.charCodeAt(0),r=e.charCodeAt(1),i=e.charCodeAt(2);return n===111&&r===110&&i>=65&&i<=90&&(typeof t=="function"||typeof t>"u")}function B$(e){return typeof e=="function"}function D1(e,t){return B$(e)?e(t):e??Pd}function oH(e,t){return t?e?n=>{if(aH(n)){const i=n;sH(i);const o=t(i);return i.baseUIHandlerPrevented||(e==null||e(i)),o}const r=t(n);return e==null||e(n),r}:t:e}function sH(e){return e.preventBaseUIHandler=()=>{e.baseUIHandlerPrevented=!0},e}function U$(e,t){return t?e?t+" "+e:t:e}function aH(e){return e!=null&&typeof e=="object"&&"nativeEvent"in e}function lH(e,t,n={}){const r=t.render,i=uH(t,n);if(n.enabled===!1)return null;const o=n.state??nc;return fH(e,r,i,o)}function uH(e,t={}){const{className:n,style:r,render:i}=e,{state:o=nc,ref:a,props:u,stateAttributesMapping:c,enabled:f=!0}=t,h=f?J7(n,o):void 0,p=f?eH(r,o):void 0,m=f?Z7(o,c):nc,y=f?A1(m,Array.isArray(u)?nH(u):u)??nc:nc;return typeof document<"u"&&(f?Array.isArray(a)?y.ref=Y7([y.ref,RA(i),...a]):y.ref=kA(y.ref,RA(i),a):kA(null,null)),f?(h!==void 0&&(y.className=U$(y.className,h)),p!==void 0&&(y.style=A1(y.style,p)),y):nc}const cH=Symbol.for("react.lazy");function fH(e,t,n,r){if(t){if(typeof t=="function")return t(n,r);const i=tH(n,t.props);i.ref=n.ref;let o=t;return(o==null?void 0:o.$$typeof)===cH&&(o=C.Children.toArray(t)[0]),C.cloneElement(o,i)}return dH(e,n)}function dH(e,t){return C.createElement(e,t)}const hH=C.forwardRef(function(e,t){const{className:n,render:r,orientation:i="horizontal",...o}=e;return lH("div",e,{state:{orientation:i},ref:t,props:[{role:"separator","aria-orientation":i},o]})}),H$=({shade:e,orientation:t="horizontal",className:n,children:r,render:i,...o})=>{if(r){const a=ze(pi.separator,pi.line,pi[`line-${t}`],CA({shade:e}));return E.jsxs(of,{condition:t==="horizontal",render:{true:E.jsx(Xe,{ay:"center",gap:2,fullwidth:!0}),false:E.jsx(Ye,{ax:"center",gap:2,fullheight:!0})},role:"separator","data-slot":"separator","data-orientation":t,className:n,...o,children:[E.jsx(Ko,{className:a}),E.jsx(er,{condition:typeof r=="string",render:E.jsx(Ie,{shade:"muted",weight:"bold"}),children:r}),E.jsx(Ko,{className:a})]})}return E.jsx(hH,{"data-slot":"separator",render:i??E.jsx(Ko,{}),className:ze(pi.separator,CA({shade:e,orientation:t}),n),"data-orientation":t,...o})};H$.displayName="Separator";const pH="_button_1m9vv_3",mH="_fullwidth_1m9vv_141",xr={button:pH,"button-content-container":"_button-content-container_1m9vv_49","button-spinner":"_button-spinner_1m9vv_61","variant-subtle":"_variant-subtle_1m9vv_75","variant-ghost":"_variant-ghost_1m9vv_84","variant-inverted":"_variant-inverted_1m9vv_94","size-xsmall":"_size-xsmall_1m9vv_104","size-small":"_size-small_1m9vv_110","size-medium":"_size-medium_1m9vv_115","size-large":"_size-large_1m9vv_120","shape-pill":"_shape-pill_1m9vv_126","shape-square":"_shape-square_1m9vv_130","shape-circle":"_shape-circle_1m9vv_135",fullwidth:mH},gH="medium",yH=Dn({variants:{shape:{pill:xr["shape-pill"],square:xr["shape-square"],circle:xr["shape-circle"]},fullwidth:{true:xr.fullwidth},variant:{subtle:xr["variant-subtle"],ghost:xr["variant-ghost"],inverted:xr["variant-inverted"]},size:{xsmall:xr["size-xsmall"],small:xr["size-small"],medium:xr["size-medium"],large:xr["size-large"]}},defaultVariants:{size:gH}}),G$=({loading:e,children:t,...n})=>E.jsx(Xe,{"data-slot":"button-content-container",className:xr["button-content-container"],"data-loading":e,"aria-hidden":e,ay:"center",gap:2,...n,children:t});G$.displayName="ButtonContentContainer";function bH(){return typeof window<"u"}function vH(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function xH(e){return bH()?e instanceof HTMLElement||e instanceof vH(e).HTMLElement:!1}const _A={};function vS(e,t){const n=C.useRef(_A);return n.current===_A&&(n.current=e(t)),n}const W0=as[`useInsertionEffect${Math.random().toFixed(1)}`.slice(0,-3)],wH=W0&&W0!==C.useLayoutEffect?W0:e=>e();function M1(e){const t=vS(SH).current;return t.next=e,wH(t.effect),t.trampoline}function SH(){const e={next:void 0,callback:CH,trampoline:(...t)=>{var n;return(n=e.callback)==null?void 0:n.call(e,...t)},effect:()=>{e.callback=e.next}};return e}function CH(){}const EH={...as},kH=()=>{},O1=typeof document<"u"?C.useLayoutEffect:kH;function xS(e,...t){const n=new URL("https://base-ui.com/production-error");return n.searchParams.set("code",e.toString()),t.forEach(r=>n.searchParams.append("args[]",r)),`Base UI error #${e}; visit ${n} for the full message.`}const RH=C.createContext(void 0);function V$(e=!1){const t=C.useContext(RH);if(t===void 0&&!e)throw new Error(xS(16));return t}function _H(e){const{focusableWhenDisabled:t,disabled:n,composite:r=!1,tabIndex:i=0,isNativeButton:o}=e,a=r&&t!==!1,u=r&&t===!1;return{props:C.useMemo(()=>{const c={onKeyDown(f){n&&t&&f.key!=="Tab"&&f.preventDefault()}};return r||(c.tabIndex=i,!o&&n&&(c.tabIndex=t?i:-1)),(o&&(t||a)||!o&&n)&&(c["aria-disabled"]=n),o&&(!t||u)&&(c.disabled=n),c},[r,n,t,a,u,o,i])}}function $1(e,t){if(e&&!t)return e;if(!e&&t)return t;if(e||t)return{...e,...t}}const Nd={};function q$(e,t,n,r,i){let o={...P1(e,Nd)};return t&&(o=ag(o,t)),n&&(o=ag(o,n)),r&&(o=ag(o,r)),o}function TH(e){if(e.length===0)return Nd;if(e.length===1)return P1(e[0],Nd);let t={...P1(e[0],Nd)};for(let n=1;n<e.length;n+=1)t=ag(t,e[n]);return t}function ag(e,t){return Y$(t)?t(e):AH(e,t)}function AH(e,t){if(!t)return e;for(const n in t){const r=t[n];switch(n){case"style":{e[n]=$1(e.style,r);break}case"className":{e[n]=W$(e.className,r);break}default:DH(n,r)?e[n]=MH(e[n],r):e[n]=r}}return e}function DH(e,t){const n=e.charCodeAt(0),r=e.charCodeAt(1),i=e.charCodeAt(2);return n===111&&r===110&&i>=65&&i<=90&&(typeof t=="function"||typeof t>"u")}function Y$(e){return typeof e=="function"}function P1(e,t){return Y$(e)?e(t):e??Nd}function MH(e,t){return t?e?n=>{if(OH(n)){const i=n;N1(i);const o=t(i);return i.baseUIHandlerPrevented||(e==null||e(i)),o}const r=t(n);return e==null||e(n),r}:t:e}function N1(e){return e.preventBaseUIHandler=()=>{e.baseUIHandlerPrevented=!0},e}function W$(e,t){return t?e?t+" "+e:t:e}function OH(e){return e!=null&&typeof e=="object"&&"nativeEvent"in e}function K$(e={}){const{disabled:t=!1,focusableWhenDisabled:n,tabIndex:r=0,native:i=!0}=e,o=C.useRef(null),a=V$(!0)!==void 0,u=M1(()=>{const m=o.current;return!!((m==null?void 0:m.tagName)==="A"&&(m!=null&&m.href))}),{props:c}=_H({focusableWhenDisabled:n,disabled:t,composite:a,tabIndex:r,isNativeButton:i}),f=C.useCallback(()=>{const m=o.current;$H(m)&&a&&t&&c.disabled===void 0&&m.disabled&&(m.disabled=!1)},[t,c.disabled,a]);O1(f,[f]);const h=C.useCallback((m={})=>{const{onClick:y,onMouseDown:b,onKeyUp:v,onKeyDown:S,onPointerDown:x,..._}=m;return q$({type:i?"button":void 0,onClick(k){if(t){k.preventDefault();return}y==null||y(k)},onMouseDown(k){t||(b==null||b(k))},onKeyDown(k){if(t||(N1(k),S==null||S(k)),k.baseUIHandlerPrevented)return;const T=k.target===k.currentTarget&&!i&&!u()&&!t,A=k.key==="Enter",D=k.key===" ";T&&((D||A)&&k.preventDefault(),A&&(y==null||y(k)))},onKeyUp(k){t||(N1(k),v==null||v(k)),!k.baseUIHandlerPrevented&&k.target===k.currentTarget&&!i&&!t&&k.key===" "&&(y==null||y(k))},onPointerDown(k){if(t){k.preventDefault();return}x==null||x(k)}},i?void 0:{role:"button"},c,_)},[t,c,i,u]),p=M1(m=>{o.current=m,f()});return{getButtonProps:h,buttonRef:p}}function $H(e){return xH(e)&&e.tagName==="BUTTON"}function I1(e,t,n,r){const i=vS(X$).current;return NH(i,e,t,n,r)&&Q$(i,[e,t,n,r]),i.callback}function PH(e){const t=vS(X$).current;return IH(t,e)&&Q$(t,e),t.callback}function X$(){return{callback:null,cleanup:null,refs:[]}}function NH(e,t,n,r,i){return e.refs[0]!==t||e.refs[1]!==n||e.refs[2]!==r||e.refs[3]!==i}function IH(e,t){return e.refs.length!==t.length||e.refs.some((n,r)=>n!==t[r])}function Q$(e,t){if(e.refs=t,t.every(n=>n==null)){e.callback=null;return}e.callback=n=>{if(e.cleanup&&(e.cleanup(),e.cleanup=null),n!=null){const r=Array(t.length).fill(null);for(let i=0;i<t.length;i+=1){const o=t[i];if(o!=null)switch(typeof o){case"function":{const a=o(n);typeof a=="function"&&(r[i]=a);break}case"object":{o.current=n;break}}}e.cleanup=()=>{for(let i=0;i<t.length;i+=1){const o=t[i];if(o!=null)switch(typeof o){case"function":{const a=r[i];typeof a=="function"?a():o(null);break}case"object":{o.current=null;break}}}}}}}const jH=parseInt(C.version,10);function LH(e){return jH>=e}function TA(e){if(!C.isValidElement(e))return null;const t=e,n=t.props;return(LH(19)?n==null?void 0:n.ref:t.ref)??null}function FH(e,t){const n={};for(const r in e){const i=e[r];if(t!=null&&t.hasOwnProperty(r)){const o=t[r](i);o!=null&&Object.assign(n,o);continue}i===!0?n[`data-${r.toLowerCase()}`]="":i&&(n[`data-${r.toLowerCase()}`]=i.toString())}return n}function zH(e,t){return typeof e=="function"?e(t):e}function BH(e,t){return typeof e=="function"?e(t):e}const AA=Object.freeze([]),Vs=Object.freeze({});function wS(e,t,n={}){const r=t.render,i=UH(t,n);if(n.enabled===!1)return null;const o=n.state??Vs;return GH(e,r,i,o)}function UH(e,t={}){const{className:n,style:r,render:i}=e,{state:o=Vs,ref:a,props:u,stateAttributesMapping:c,enabled:f=!0}=t,h=f?zH(n,o):void 0,p=f?BH(r,o):void 0,m=f?FH(o,c):Vs,y=f?$1(m,Array.isArray(u)?TH(u):u)??Vs:Vs;return typeof document<"u"&&(f?Array.isArray(a)?y.ref=PH([y.ref,TA(i),...a]):y.ref=I1(y.ref,TA(i),a):I1(null,null)),f?(h!==void 0&&(y.className=W$(y.className,h)),p!==void 0&&(y.style=$1(y.style,p)),y):Vs}const HH=Symbol.for("react.lazy");function GH(e,t,n,r){if(t){if(typeof t=="function")return t(n,r);const i=q$(n,t.props);i.ref=n.ref;let o=t;return(o==null?void 0:o.$$typeof)===HH&&(o=C.Children.toArray(t)[0]),C.cloneElement(o,i)}if(e&&typeof e=="string")return VH(e,n);throw new Error(xS(8))}function VH(e,t){return e==="button"?C.createElement("button",{type:"button",...t,key:t.key}):e==="img"?C.createElement("img",{alt:"",...t,key:t.key}):C.createElement(e,t)}const qH=C.forwardRef(function(e,t){const{render:n,className:r,disabled:i=!1,focusableWhenDisabled:o=!1,nativeButton:a=!0,...u}=e,{getButtonProps:c,buttonRef:f}=K$({disabled:i,focusableWhenDisabled:o,native:a});return wS("button",e,{state:{disabled:i},ref:[t,f],props:[u,c]})});/**
|
|
67
|
-
* @license lucide-react v0.564.0 - ISC
|
|
68
|
-
*
|
|
69
|
-
* This source code is licensed under the ISC license.
|
|
70
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
71
|
-
*/const Z$=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim();/**
|
|
72
|
-
* @license lucide-react v0.564.0 - ISC
|
|
73
|
-
*
|
|
74
|
-
* This source code is licensed under the ISC license.
|
|
75
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
76
|
-
*/const YH=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();/**
|
|
77
|
-
* @license lucide-react v0.564.0 - ISC
|
|
78
|
-
*
|
|
79
|
-
* This source code is licensed under the ISC license.
|
|
80
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
81
|
-
*/const WH=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,n,r)=>r?r.toUpperCase():n.toLowerCase());/**
|
|
82
|
-
* @license lucide-react v0.564.0 - ISC
|
|
83
|
-
*
|
|
84
|
-
* This source code is licensed under the ISC license.
|
|
85
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
86
|
-
*/const DA=e=>{const t=WH(e);return t.charAt(0).toUpperCase()+t.slice(1)};/**
|
|
87
|
-
* @license lucide-react v0.564.0 - ISC
|
|
88
|
-
*
|
|
89
|
-
* This source code is licensed under the ISC license.
|
|
90
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
91
|
-
*/var KH={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
|
|
92
|
-
* @license lucide-react v0.564.0 - ISC
|
|
93
|
-
*
|
|
94
|
-
* This source code is licensed under the ISC license.
|
|
95
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
96
|
-
*/const XH=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0;return!1};/**
|
|
97
|
-
* @license lucide-react v0.564.0 - ISC
|
|
98
|
-
*
|
|
99
|
-
* This source code is licensed under the ISC license.
|
|
100
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
101
|
-
*/const QH=C.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:i="",children:o,iconNode:a,...u},c)=>C.createElement("svg",{ref:c,...KH,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:Z$("lucide",i),...!o&&!XH(u)&&{"aria-hidden":"true"},...u},[...a.map(([f,h])=>C.createElement(f,h)),...Array.isArray(o)?o:[o]]));/**
|
|
102
|
-
* @license lucide-react v0.564.0 - ISC
|
|
103
|
-
*
|
|
104
|
-
* This source code is licensed under the ISC license.
|
|
105
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
106
|
-
*/const pt=(e,t)=>{const n=C.forwardRef(({className:r,...i},o)=>C.createElement(QH,{ref:o,iconNode:t,className:Z$(`lucide-${YH(DA(e))}`,`lucide-${e}`,r),...i}));return n.displayName=DA(e),n};/**
|
|
107
|
-
* @license lucide-react v0.564.0 - ISC
|
|
108
|
-
*
|
|
109
|
-
* This source code is licensed under the ISC license.
|
|
110
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
111
|
-
*/const ZH=[["rect",{width:"20",height:"5",x:"2",y:"3",rx:"1",key:"1wp1u1"}],["path",{d:"M4 8v11a2 2 0 0 0 2 2h2",key:"tvwodi"}],["path",{d:"M20 8v11a2 2 0 0 1-2 2h-2",key:"1gkqxj"}],["path",{d:"m9 15 3-3 3 3",key:"1pd0qc"}],["path",{d:"M12 12v9",key:"192myk"}]],JH=pt("archive-restore",ZH);/**
|
|
112
|
-
* @license lucide-react v0.564.0 - ISC
|
|
113
|
-
*
|
|
114
|
-
* This source code is licensed under the ISC license.
|
|
115
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
116
|
-
*/const eG=[["rect",{width:"20",height:"5",x:"2",y:"3",rx:"1",key:"1wp1u1"}],["path",{d:"M4 8v11a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8",key:"1s80jp"}],["path",{d:"M10 12h4",key:"a56b0p"}]],tG=pt("archive",eG);/**
|
|
117
|
-
* @license lucide-react v0.564.0 - ISC
|
|
118
|
-
*
|
|
119
|
-
* This source code is licensed under the ISC license.
|
|
120
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
121
|
-
*/const nG=[["path",{d:"M8 3 4 7l4 4",key:"9rb6wj"}],["path",{d:"M4 7h16",key:"6tx8e3"}],["path",{d:"m16 21 4-4-4-4",key:"siv7j2"}],["path",{d:"M20 17H4",key:"h6l3hr"}]],rG=pt("arrow-left-right",nG);/**
|
|
122
|
-
* @license lucide-react v0.564.0 - ISC
|
|
123
|
-
*
|
|
124
|
-
* This source code is licensed under the ISC license.
|
|
125
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
126
|
-
*/const iG=[["path",{d:"m2 16 4.039-9.69a.5.5 0 0 1 .923 0L11 16",key:"d5nyq2"}],["path",{d:"M22 9v7",key:"pvm9v3"}],["path",{d:"M3.304 13h6.392",key:"1q3zxz"}],["circle",{cx:"18.5",cy:"12.5",r:"3.5",key:"z97x68"}]],oG=pt("case-sensitive",iG);/**
|
|
127
|
-
* @license lucide-react v0.564.0 - ISC
|
|
128
|
-
*
|
|
129
|
-
* This source code is licensed under the ISC license.
|
|
130
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
131
|
-
*/const sG=[["path",{d:"M10 6h8",key:"zvc2xc"}],["path",{d:"M12 16h6",key:"yi5mkt"}],["path",{d:"M3 3v16a2 2 0 0 0 2 2h16",key:"c24i48"}],["path",{d:"M8 11h7",key:"wz2hg0"}]],aG=pt("chart-gantt",sG);/**
|
|
132
|
-
* @license lucide-react v0.564.0 - ISC
|
|
133
|
-
*
|
|
134
|
-
* This source code is licensed under the ISC license.
|
|
135
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
136
|
-
*/const lG=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],Th=pt("check",lG);/**
|
|
137
|
-
* @license lucide-react v0.564.0 - ISC
|
|
138
|
-
*
|
|
139
|
-
* This source code is licensed under the ISC license.
|
|
140
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
141
|
-
*/const uG=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],J$=pt("chevron-right",uG);/**
|
|
142
|
-
* @license lucide-react v0.564.0 - ISC
|
|
143
|
-
*
|
|
144
|
-
* This source code is licensed under the ISC license.
|
|
145
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
146
|
-
*/const cG=[["path",{d:"m7 20 5-5 5 5",key:"13a0gw"}],["path",{d:"m7 4 5 5 5-5",key:"1kwcof"}]],eP=pt("chevrons-down-up",cG);/**
|
|
147
|
-
* @license lucide-react v0.564.0 - ISC
|
|
148
|
-
*
|
|
149
|
-
* This source code is licensed under the ISC license.
|
|
150
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
151
|
-
*/const fG=[["path",{d:"m7 15 5 5 5-5",key:"1hf1tw"}],["path",{d:"m7 9 5-5 5 5",key:"sgt6xg"}]],Ah=pt("chevrons-up-down",fG);/**
|
|
152
|
-
* @license lucide-react v0.564.0 - ISC
|
|
153
|
-
*
|
|
154
|
-
* This source code is licensed under the ISC license.
|
|
155
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
156
|
-
*/const dG=[["path",{d:"M12 6v6l4 2",key:"mmk7yg"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],tP=pt("clock",dG);/**
|
|
157
|
-
* @license lucide-react v0.564.0 - ISC
|
|
158
|
-
*
|
|
159
|
-
* This source code is licensed under the ISC license.
|
|
160
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
161
|
-
*/const hG=[["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"}]],Dh=pt("copy",hG);/**
|
|
162
|
-
* @license lucide-react v0.564.0 - ISC
|
|
163
|
-
*
|
|
164
|
-
* This source code is licensed under the ISC license.
|
|
165
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
166
|
-
*/const pG=[["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M17 20v2",key:"1rnc9c"}],["path",{d:"M17 2v2",key:"11trls"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M2 17h2",key:"7oei6x"}],["path",{d:"M2 7h2",key:"asdhe0"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"M20 17h2",key:"1fpfkl"}],["path",{d:"M20 7h2",key:"1o8tra"}],["path",{d:"M7 20v2",key:"4gnj0m"}],["path",{d:"M7 2v2",key:"1i4yhu"}],["rect",{x:"4",y:"4",width:"16",height:"16",rx:"2",key:"1vbyd7"}],["rect",{x:"8",y:"8",width:"8",height:"8",rx:"1",key:"z9xiuo"}]],mG=pt("cpu",pG);/**
|
|
167
|
-
* @license lucide-react v0.564.0 - ISC
|
|
168
|
-
*
|
|
169
|
-
* This source code is licensed under the ISC license.
|
|
170
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
171
|
-
*/const gG=[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"12",cy:"5",r:"1",key:"gxeob9"}],["circle",{cx:"12",cy:"19",r:"1",key:"lyex9k"}]],nP=pt("ellipsis-vertical",gG);/**
|
|
172
|
-
* @license lucide-react v0.564.0 - ISC
|
|
173
|
-
*
|
|
174
|
-
* This source code is licensed under the ISC license.
|
|
175
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
176
|
-
*/const yG=[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]],bG=pt("ellipsis",yG);/**
|
|
177
|
-
* @license lucide-react v0.564.0 - ISC
|
|
178
|
-
*
|
|
179
|
-
* This source code is licensed under the ISC license.
|
|
180
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
181
|
-
*/const vG=[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]],xG=pt("external-link",vG);/**
|
|
182
|
-
* @license lucide-react v0.564.0 - ISC
|
|
183
|
-
*
|
|
184
|
-
* This source code is licensed under the ISC license.
|
|
185
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
186
|
-
*/const wG=[["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"}]],SG=pt("eye-off",wG);/**
|
|
187
|
-
* @license lucide-react v0.564.0 - ISC
|
|
188
|
-
*
|
|
189
|
-
* This source code is licensed under the ISC license.
|
|
190
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
191
|
-
*/const CG=[["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"}]],EG=pt("eye",CG);/**
|
|
192
|
-
* @license lucide-react v0.564.0 - ISC
|
|
193
|
-
*
|
|
194
|
-
* This source code is licensed under the ISC license.
|
|
195
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
196
|
-
*/const kG=[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M9 10h6",key:"9gxzsh"}],["path",{d:"M12 13V7",key:"h0r20n"}],["path",{d:"M9 17h6",key:"r8uit2"}]],rP=pt("file-diff",kG);/**
|
|
197
|
-
* @license lucide-react v0.564.0 - ISC
|
|
198
|
-
*
|
|
199
|
-
* This source code is licensed under the ISC license.
|
|
200
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
201
|
-
*/const RG=[["path",{d:"M15 2h-4a2 2 0 0 0-2 2v11a2 2 0 0 0 2 2h8a2 2 0 0 0 2-2V8",key:"14sh0y"}],["path",{d:"M16.706 2.706A2.4 2.4 0 0 0 15 2v5a1 1 0 0 0 1 1h5a2.4 2.4 0 0 0-.706-1.706z",key:"1970lx"}],["path",{d:"M5 7a2 2 0 0 0-2 2v11a2 2 0 0 0 2 2h8a2 2 0 0 0 1.732-1",key:"l4dndm"}]],iP=pt("files",RG);/**
|
|
202
|
-
* @license lucide-react v0.564.0 - ISC
|
|
203
|
-
*
|
|
204
|
-
* This source code is licensed under the ISC license.
|
|
205
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
206
|
-
*/const _G=[["path",{d:"m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2",key:"usdka0"}]],TG=pt("folder-open",_G);/**
|
|
207
|
-
* @license lucide-react v0.564.0 - ISC
|
|
208
|
-
*
|
|
209
|
-
* This source code is licensed under the ISC license.
|
|
210
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
211
|
-
*/const AG=[["path",{d:"m12 14 4-4",key:"9kzdfg"}],["path",{d:"M3.34 19a10 10 0 1 1 17.32 0",key:"19p75a"}]],DG=pt("gauge",AG);/**
|
|
212
|
-
* @license lucide-react v0.564.0 - ISC
|
|
213
|
-
*
|
|
214
|
-
* This source code is licensed under the ISC license.
|
|
215
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
216
|
-
*/const MG=[["circle",{cx:"18",cy:"18",r:"3",key:"1xkwt0"}],["circle",{cx:"6",cy:"6",r:"3",key:"1lh9wr"}],["path",{d:"M13 6h3a2 2 0 0 1 2 2v7",key:"1yeb86"}],["line",{x1:"6",x2:"6",y1:"9",y2:"21",key:"rroup"}]],OG=pt("git-pull-request",MG);/**
|
|
217
|
-
* @license lucide-react v0.564.0 - ISC
|
|
218
|
-
*
|
|
219
|
-
* This source code is licensed under the ISC license.
|
|
220
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
221
|
-
*/const $G=[["circle",{cx:"9",cy:"12",r:"1",key:"1vctgf"}],["circle",{cx:"9",cy:"5",r:"1",key:"hp0tcf"}],["circle",{cx:"9",cy:"19",r:"1",key:"fkjjf6"}],["circle",{cx:"15",cy:"12",r:"1",key:"1tmaij"}],["circle",{cx:"15",cy:"5",r:"1",key:"19l28e"}],["circle",{cx:"15",cy:"19",r:"1",key:"f4zoj3"}]],PG=pt("grip-vertical",$G);/**
|
|
222
|
-
* @license lucide-react v0.564.0 - ISC
|
|
223
|
-
*
|
|
224
|
-
* This source code is licensed under the ISC license.
|
|
225
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
226
|
-
*/const NG=[["path",{d:"M3 7V5c0-1.1.9-2 2-2h2",key:"adw53z"}],["path",{d:"M17 3h2c1.1 0 2 .9 2 2v2",key:"an4l38"}],["path",{d:"M21 17v2c0 1.1-.9 2-2 2h-2",key:"144t0e"}],["path",{d:"M7 21H5c-1.1 0-2-.9-2-2v-2",key:"rtnfgi"}],["rect",{width:"7",height:"5",x:"7",y:"7",rx:"1",key:"1eyiv7"}],["rect",{width:"7",height:"5",x:"10",y:"12",rx:"1",key:"1qlmkx"}]],IG=pt("group",NG);/**
|
|
227
|
-
* @license lucide-react v0.564.0 - ISC
|
|
228
|
-
*
|
|
229
|
-
* This source code is licensed under the ISC license.
|
|
230
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
231
|
-
*/const jG=[["path",{d:"m11 17 2 2a1 1 0 1 0 3-3",key:"efffak"}],["path",{d:"m14 14 2.5 2.5a1 1 0 1 0 3-3l-3.88-3.88a3 3 0 0 0-4.24 0l-.88.88a1 1 0 1 1-3-3l2.81-2.81a5.79 5.79 0 0 1 7.06-.87l.47.28a2 2 0 0 0 1.42.25L21 4",key:"9pr0kb"}],["path",{d:"m21 3 1 11h-2",key:"1tisrp"}],["path",{d:"M3 3 2 14l6.5 6.5a1 1 0 1 0 3-3",key:"1uvwmv"}],["path",{d:"M3 4h8",key:"1ep09j"}]],LG=pt("handshake",jG);/**
|
|
232
|
-
* @license lucide-react v0.564.0 - ISC
|
|
233
|
-
*
|
|
234
|
-
* This source code is licensed under the ISC license.
|
|
235
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
236
|
-
*/const FG=[["path",{d:"M5 22h14",key:"ehvnwv"}],["path",{d:"M5 2h14",key:"pdyrp9"}],["path",{d:"M17 22v-4.172a2 2 0 0 0-.586-1.414L12 12l-4.414 4.414A2 2 0 0 0 7 17.828V22",key:"1d314k"}],["path",{d:"M7 2v4.172a2 2 0 0 0 .586 1.414L12 12l4.414-4.414A2 2 0 0 0 17 6.172V2",key:"1vvvr6"}]],zG=pt("hourglass",FG);/**
|
|
237
|
-
* @license lucide-react v0.564.0 - ISC
|
|
238
|
-
*
|
|
239
|
-
* This source code is licensed under the ISC license.
|
|
240
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
241
|
-
*/const BG=[["path",{d:"M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z",key:"18887p"}],["path",{d:"M12 11h.01",key:"z322tv"}],["path",{d:"M16 11h.01",key:"xkw8gn"}],["path",{d:"M8 11h.01",key:"1dfujw"}]],UG=pt("message-square-more",BG);/**
|
|
242
|
-
* @license lucide-react v0.564.0 - ISC
|
|
243
|
-
*
|
|
244
|
-
* This source code is licensed under the ISC license.
|
|
245
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
246
|
-
*/const HG=[["path",{d:"M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z",key:"18887p"}],["path",{d:"M7 11h10",key:"1twpyw"}],["path",{d:"M7 15h6",key:"d9of3u"}],["path",{d:"M7 7h8",key:"af5zfr"}]],GG=pt("message-square-text",HG);/**
|
|
247
|
-
* @license lucide-react v0.564.0 - ISC
|
|
248
|
-
*
|
|
249
|
-
* This source code is licensed under the ISC license.
|
|
250
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
251
|
-
*/const VG=[["path",{d:"M5 12h14",key:"1ays0h"}]],qG=pt("minus",VG);/**
|
|
252
|
-
* @license lucide-react v0.564.0 - ISC
|
|
253
|
-
*
|
|
254
|
-
* This source code is licensed under the ISC license.
|
|
255
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
256
|
-
*/const YG=[["rect",{width:"20",height:"14",x:"2",y:"3",rx:"2",key:"48i651"}],["line",{x1:"8",x2:"16",y1:"21",y2:"21",key:"1svkeh"}],["line",{x1:"12",x2:"12",y1:"17",y2:"21",key:"vw1qmm"}]],WG=pt("monitor",YG);/**
|
|
257
|
-
* @license lucide-react v0.564.0 - ISC
|
|
258
|
-
*
|
|
259
|
-
* This source code is licensed under the ISC license.
|
|
260
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
261
|
-
*/const KG=[["path",{d:"M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401",key:"kfwtm"}]],XG=pt("moon",KG);/**
|
|
262
|
-
* @license lucide-react v0.564.0 - ISC
|
|
263
|
-
*
|
|
264
|
-
* This source code is licensed under the ISC license.
|
|
265
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
266
|
-
*/const QG=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M15 3v18",key:"14nvp0"}]],ZG=pt("panel-right",QG);/**
|
|
267
|
-
* @license lucide-react v0.564.0 - ISC
|
|
268
|
-
*
|
|
269
|
-
* This source code is licensed under the ISC license.
|
|
270
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
271
|
-
*/const JG=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],eV=pt("search",JG);/**
|
|
272
|
-
* @license lucide-react v0.564.0 - ISC
|
|
273
|
-
*
|
|
274
|
-
* This source code is licensed under the ISC license.
|
|
275
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
276
|
-
*/const tV=[["path",{d:"m2 2 20 20",key:"1ooewy"}],["path",{d:"M5 5a1 1 0 0 0-1 1v7c0 5 3.5 7.5 7.67 8.94a1 1 0 0 0 .67.01c2.35-.82 4.48-1.97 5.9-3.71",key:"1jlk70"}],["path",{d:"M9.309 3.652A12.252 12.252 0 0 0 11.24 2.28a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1v7a9.784 9.784 0 0 1-.08 1.264",key:"18rp1v"}]],nV=pt("shield-off",tV);/**
|
|
277
|
-
* @license lucide-react v0.564.0 - ISC
|
|
278
|
-
*
|
|
279
|
-
* This source code is licensed under the ISC license.
|
|
280
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
281
|
-
*/const rV=[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]],iV=pt("sun",rV);/**
|
|
282
|
-
* @license lucide-react v0.564.0 - ISC
|
|
283
|
-
*
|
|
284
|
-
* This source code is licensed under the ISC license.
|
|
285
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
286
|
-
*/const oV=[["path",{d:"M13.172 2a2 2 0 0 1 1.414.586l6.71 6.71a2.4 2.4 0 0 1 0 3.408l-4.592 4.592a2.4 2.4 0 0 1-3.408 0l-6.71-6.71A2 2 0 0 1 6 9.172V3a1 1 0 0 1 1-1z",key:"16rjxf"}],["path",{d:"M2 7v6.172a2 2 0 0 0 .586 1.414l6.71 6.71a2.4 2.4 0 0 0 3.191.193",key:"178nd4"}],["circle",{cx:"10.5",cy:"6.5",r:".5",fill:"currentColor",key:"12ikhr"}]],sV=pt("tags",oV);/**
|
|
287
|
-
* @license lucide-react v0.564.0 - ISC
|
|
288
|
-
*
|
|
289
|
-
* This source code is licensed under the ISC license.
|
|
290
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
291
|
-
*/const aV=[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]],lV=pt("trash-2",aV);/**
|
|
292
|
-
* @license lucide-react v0.564.0 - ISC
|
|
293
|
-
*
|
|
294
|
-
* This source code is licensed under the ISC license.
|
|
295
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
296
|
-
*/const uV=[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]],cV=pt("triangle-alert",uV);/**
|
|
297
|
-
* @license lucide-react v0.564.0 - ISC
|
|
298
|
-
*
|
|
299
|
-
* This source code is licensed under the ISC license.
|
|
300
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
301
|
-
*/const fV=[["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"}]],dV=pt("wrench",fV),oP=({size:e=14,fill:t="currentColor",...n})=>E.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",fill:t,viewBox:"0 0 24 24",width:e,height:e,...n,children:[E.jsx("path",{d:"M12 1a11 11 0 1 0 11 11A11 11 0 0 0 12 1Zm0 19a8 8 0 1 1 8-8 8 8 0 0 1-8 8Z",opacity:.25}),E.jsx("path",{d:"M10.72 19.9a8 8 0 0 1-6.5-9.79 7.77 7.77 0 0 1 6.18-5.95 8 8 0 0 1 9.49 6.52A1.54 1.54 0 0 0 21.38 12h.13a1.37 1.37 0 0 0 1.38-1.54 11 11 0 1 0-12.7 12.39A1.54 1.54 0 0 0 12 21.34a1.47 1.47 0 0 0-1.28-1.44Z",children:E.jsx("animateTransform",{attributeName:"transform",dur:"0.75s",repeatCount:"indefinite",type:"rotate",values:"0 12 12;360 12 12"})})]});oP.displayName="LoadingSpinner";const sP=({loading:e,...t})=>E.jsx(oP,{"data-slot":"button-spinner",className:xr["button-spinner"],"data-loading":e,"aria-hidden":e,...t});sP.displayName="ButtonSpinner";const aP=18,hV=2,pV=3,mV="_card_fipan_3",Qi={card:mV,"card-thumbnail":"_card-thumbnail_fipan_39","card-action":"_card-action_fipan_51","toggle-inverted":"_toggle-inverted_fipan_62","toggle-trimmed":"_toggle-trimmed_fipan_67","toggle-ghost":"_toggle-ghost_fipan_72","toggle-transparent":"_toggle-transparent_fipan_79","size-small":"_size-small_fipan_83","size-medium":"_size-medium_fipan_87","size-large":"_size-large_fipan_91"},gV=Dn({variants:{inverted:{true:Qi["toggle-inverted"]},trimmed:{true:Qi["toggle-trimmed"]},transparent:{true:Qi["toggle-transparent"]},ghost:{true:Qi["toggle-ghost"]},size:{small:Qi["size-small"],medium:Qi["size-medium"],large:Qi["size-large"]}}}),lP=({gap:e=pV,trimmed:t,transparent:n,ghost:r,inverted:i,size:o,className:a,children:u,...c})=>E.jsx(Ye,{"data-slot":"card-container",gap:e,className:ze(Qi.card,gV({trimmed:t,transparent:n,ghost:r,inverted:i,size:o}),a),...c,children:u});lP.displayName="CardContainer";const uP=({className:e,children:t,...n})=>E.jsx(Ye,{"data-slot":"card-thumbnail",className:ze(Qi["card-thumbnail"],e),ax:"stretch",fullwidth:!0,...n,children:t});uP.displayName="CardThumbnail";const cP=({icon:e,render:t,className:n})=>E.jsx(er,{condition:!!t,render:t,children:e?E.jsx(e,{size:aP,strokeWidth:hV,className:n}):null});cP.displayName="CardIcon";const fP=({children:e,style:t,...n})=>E.jsx(Ie,{"data-slot":"card-title",render:E.jsx("h3",{}),style:{minHeight:`${aP}px`,alignContent:"center",...t},size:1,weight:"bold",...n,children:e});fP.displayName="CardTitle";const dP=({children:e,className:t,...n})=>E.jsx(Xe,{"data-slot":"card-action",className:ze(Qi["card-action"],t),gap:2,...n,children:e});dP.displayName="CardAction";const hP=({children:e,...t})=>E.jsx(Xe,{"data-slot":"card-header",ay:"center",gap:2,fullwidth:!0,...t,children:e});hP.displayName="CardHeader";const pP=({children:e,...t})=>E.jsx(Ie,{"data-slot":"card-description",render:E.jsx("p",{}),shade:"muted",balance:!0,...t,children:e});pP.displayName="CardDescription";const mP=({children:e,...t})=>E.jsx(Xe,{"data-slot":"card-footer",gap:2,fullwidth:!0,...t,children:e});mP.displayName="CardFooter";const zt=({title:e,description:t,thumbnail:n,icon:r,action:i,footer:o,size:a,ContainerProps:u,HeaderProps:c,TitleProps:f,DescriptionProps:h,IconProps:p,ActionProps:m,FooterProps:y,ThumbnailProps:b,children:v,...S})=>{const x=(h==null?void 0:h.children)||t,_=(f==null?void 0:f.children)||e,k=(m==null?void 0:m.children)||i,T=(p==null?void 0:p.icon)||r;return E.jsxs(lP,{size:a,...S,...u,children:[n&&E.jsx(uP,{mb:2,...b,children:n}),E.jsxs(er,{condition:!!(e||r||i),render:E.jsx(hP,{...c}),children:[T&&E.jsx(cP,{icon:T,...p}),_&&E.jsx(fP,{...f,children:_}),k&&E.jsx(dP,{...m,children:k})]}),x&&E.jsx(pP,{...h,children:x}),v,o&&E.jsx(mP,{mt:4,...y,children:o})]})};zt.displayName="Card";const MA={};function fr(e,t){const n=C.useRef(MA);return n.current===MA&&(n.current=e(t)),n}function SS(e){const t=C.useRef(!0);t.current&&(t.current=!1,e())}const K0=as[`useInsertionEffect${Math.random().toFixed(1)}`.slice(0,-3)],yV=K0&&K0!==C.useLayoutEffect?K0:e=>e();function tt(e){const t=fr(bV).current;return t.next=e,yV(t.effect),t.trampoline}function bV(){const e={next:void 0,callback:vV,trampoline:(...t)=>{var n;return(n=e.callback)==null?void 0:n.call(e,...t)},effect:()=>{e.callback=e.next}};return e}function vV(){}function Ay(){return typeof window<"u"}function Ta(e){return CS(e)?(e.nodeName||"").toLowerCase():"#document"}function fn(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function lo(e){var t;return(t=(CS(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function CS(e){return Ay()?e instanceof Node||e instanceof fn(e).Node:!1}function Nt(e){return Ay()?e instanceof Element||e instanceof fn(e).Element:!1}function gn(e){return Ay()?e instanceof HTMLElement||e instanceof fn(e).HTMLElement:!1}function j1(e){return!Ay()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof fn(e).ShadowRoot}const xV=new Set(["inline","contents"]);function Aa(e){const{overflow:t,overflowX:n,overflowY:r,display:i}=Zr(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!xV.has(i)}const wV=new Set(["table","td","th"]);function SV(e){return wV.has(Ta(e))}const CV=[":popover-open",":modal"];function Dy(e){return CV.some(t=>{try{return e.matches(t)}catch{return!1}})}const EV=["transform","translate","scale","rotate","perspective"],kV=["transform","translate","scale","rotate","perspective","filter"],RV=["paint","layout","strict","content"];function ES(e){const t=My(),n=Nt(e)?Zr(e):e;return EV.some(r=>n[r]?n[r]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||kV.some(r=>(n.willChange||"").includes(r))||RV.some(r=>(n.contain||"").includes(r))}function _V(e){let t=ts(e);for(;gn(t)&&!Xo(t);){if(ES(t))return t;if(Dy(t))return null;t=ts(t)}return null}function My(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const TV=new Set(["html","body","#document"]);function Xo(e){return TV.has(Ta(e))}function Zr(e){return fn(e).getComputedStyle(e)}function Oy(e){return Nt(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function ts(e){if(Ta(e)==="html")return e;const t=e.assignedSlot||e.parentNode||j1(e)&&e.host||lo(e);return j1(t)?t.host:t}function gP(e){const t=ts(e);return Xo(t)?e.ownerDocument?e.ownerDocument.body:e.body:gn(t)&&Aa(t)?t:gP(t)}function ha(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const i=gP(e),o=i===((r=e.ownerDocument)==null?void 0:r.body),a=fn(i);if(o){const u=L1(a);return t.concat(a,a.visualViewport||[],Aa(i)?i:[],u&&n?ha(u):[])}return t.concat(i,ha(i,[],n))}function L1(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}const sf=typeof navigator<"u",X0=DV(),yP=OV(),bP=MV(),vP=typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter:none"),xP=X0.platform==="MacIntel"&&X0.maxTouchPoints>1?!0:/iP(hone|ad|od)|iOS/.test(X0.platform),wP=sf&&/apple/i.test(navigator.vendor),F1=sf&&/android/i.test(yP)||/android/i.test(bP),AV=sf&&yP.toLowerCase().startsWith("mac")&&!navigator.maxTouchPoints,SP=bP.includes("jsdom/");function DV(){if(!sf)return{platform:"",maxTouchPoints:-1};const e=navigator.userAgentData;return e!=null&&e.platform?{platform:e.platform,maxTouchPoints:navigator.maxTouchPoints}:{platform:navigator.platform??"",maxTouchPoints:navigator.maxTouchPoints??-1}}function MV(){if(!sf)return"";const e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(({brand:t,version:n})=>`${t}/${n}`).join(" "):navigator.userAgent}function OV(){if(!sf)return"";const e=navigator.userAgentData;return e!=null&&e.platform?e.platform:navigator.platform??""}function Mt(e){return(e==null?void 0:e.ownerDocument)||document}const $V=()=>{},gt=typeof document<"u"?C.useLayoutEffect:$V,PV=[];function Mh(e){C.useEffect(e,PV)}const Sd=0;let Bi=class CP{constructor(){te(this,"currentId",Sd);te(this,"clear",()=>{this.currentId!==Sd&&(clearTimeout(this.currentId),this.currentId=Sd)});te(this,"disposeEffect",()=>this.clear)}static create(){return new CP}start(t,n){this.clear(),this.currentId=setTimeout(()=>{this.currentId=Sd,n()},t)}isStarted(){return this.currentId!==Sd}};function Ea(){const e=fr(Bi.create).current;return Mh(e.disposeEffect),e}const vm=null;let NV=class{constructor(){te(this,"callbacks",[]);te(this,"callbacksCount",0);te(this,"nextId",1);te(this,"startId",1);te(this,"isScheduled",!1);te(this,"tick",t=>{var i;this.isScheduled=!1;const n=this.callbacks,r=this.callbacksCount;if(this.callbacks=[],this.callbacksCount=0,this.startId=this.nextId,r>0)for(let o=0;o<n.length;o+=1)(i=n[o])==null||i.call(n,t)})}request(t){const n=this.nextId;return this.nextId+=1,this.callbacks.push(t),this.callbacksCount+=1,(!this.isScheduled||!1)&&(requestAnimationFrame(this.tick),this.isScheduled=!0),n}cancel(t){const n=t-this.startId;n<0||n>=this.callbacks.length||(this.callbacks[n]=null,this.callbacksCount-=1)}};const xm=new NV;let Gs=class EP{constructor(){te(this,"currentId",vm);te(this,"cancel",()=>{this.currentId!==vm&&(xm.cancel(this.currentId),this.currentId=vm)});te(this,"disposeEffect",()=>this.cancel)}static create(){return new EP}static request(t){return xm.request(t)}static cancel(t){return xm.cancel(t)}request(t){this.cancel(),this.currentId=xm.request(()=>{this.currentId=vm,t()})}};function kS(){const e=fr(Gs.create).current;return Mh(e.disposeEffect),e}function kP(){}const Cr=Object.freeze({});let OA={},$A={},PA="";function IV(e){if(typeof document>"u")return!1;const t=Mt(e);return fn(t).innerWidth-t.documentElement.clientWidth>0}function jV(e){if(!(typeof CSS<"u"&&CSS.supports&&CSS.supports("scrollbar-gutter","stable"))||typeof document>"u")return!1;const t=Mt(e),n=t.documentElement,r=t.body,i=Aa(n)?n:r,o=i.style.overflowY,a=n.style.scrollbarGutter;n.style.scrollbarGutter="stable",i.style.overflowY="scroll";const u=i.offsetWidth;i.style.overflowY="hidden";const c=i.offsetWidth;return i.style.overflowY=o,n.style.scrollbarGutter=a,u===c}function LV(e){const t=Mt(e),n=t.documentElement,r=t.body,i=Aa(n)?n:r,o={overflowY:i.style.overflowY,overflowX:i.style.overflowX};return Object.assign(i.style,{overflowY:"hidden",overflowX:"hidden"}),()=>{Object.assign(i.style,o)}}function FV(e){var m;const t=Mt(e),n=t.documentElement,r=t.body,i=fn(n);let o=0,a=0,u=!1;const c=Gs.create();if(vP&&(((m=i.visualViewport)==null?void 0:m.scale)??1)!==1)return()=>{};function f(){const y=i.getComputedStyle(n),b=i.getComputedStyle(r),v=(y.scrollbarGutter||"").includes("both-edges")?"stable both-edges":"stable";o=n.scrollTop,a=n.scrollLeft,OA={scrollbarGutter:n.style.scrollbarGutter,overflowY:n.style.overflowY,overflowX:n.style.overflowX},PA=n.style.scrollBehavior,$A={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};const S=n.scrollHeight>n.clientHeight,x=n.scrollWidth>n.clientWidth,_=y.overflowY==="scroll"||b.overflowY==="scroll",k=y.overflowX==="scroll"||b.overflowX==="scroll",T=Math.max(0,i.innerWidth-r.clientWidth),A=Math.max(0,i.innerHeight-r.clientHeight),D=parseFloat(b.marginTop)+parseFloat(b.marginBottom),O=parseFloat(b.marginLeft)+parseFloat(b.marginRight),$=Aa(n)?n:r;if(u=jV(e),u){n.style.scrollbarGutter=v,$.style.overflowY="hidden",$.style.overflowX="hidden";return}Object.assign(n.style,{scrollbarGutter:v,overflowY:"hidden",overflowX:"hidden"}),(S||_)&&(n.style.overflowY="scroll"),(x||k)&&(n.style.overflowX="scroll"),Object.assign(r.style,{position:"relative",height:D||A?`calc(100dvh - ${D+A}px)`:"100dvh",width:O||T?`calc(100vw - ${O+T}px)`:"100vw",boxSizing:"border-box",overflow:"hidden",scrollBehavior:"unset"}),r.scrollTop=o,r.scrollLeft=a,n.setAttribute("data-base-ui-scroll-locked",""),n.style.scrollBehavior="unset"}function h(){Object.assign(n.style,OA),Object.assign(r.style,$A),u||(n.scrollTop=o,n.scrollLeft=a,n.removeAttribute("data-base-ui-scroll-locked"),n.style.scrollBehavior=PA)}function p(){h(),c.request(f)}return f(),i.addEventListener("resize",p),()=>{c.cancel(),h(),typeof i.removeEventListener=="function"&&i.removeEventListener("resize",p)}}let zV=class{constructor(){te(this,"lockCount",0);te(this,"restore",null);te(this,"timeoutLock",Bi.create());te(this,"timeoutUnlock",Bi.create());te(this,"release",()=>{this.lockCount-=1,this.lockCount===0&&this.restore&&this.timeoutUnlock.start(0,this.unlock)});te(this,"unlock",()=>{var t;this.lockCount===0&&this.restore&&((t=this.restore)==null||t.call(this),this.restore=null)})}acquire(t){return this.lockCount+=1,this.lockCount===1&&this.restore===null&&this.timeoutLock.start(0,()=>this.lock(t)),this.release}lock(t){if(this.lockCount===0||this.restore!==null)return;const n=Mt(t).documentElement,r=fn(n).getComputedStyle(n).overflowY;if(r==="hidden"||r==="clip"){this.restore=kP;return}const i=xP||!IV(t);this.restore=i?LV(t):FV(t)}};const BV=new zV;function RP(e=!0,t=null){gt(()=>{if(e)return BV.acquire(t)},[e,t])}function UV(e){const t=C.useRef(""),n=C.useCallback(r=>{r.defaultPrevented||(t.current=r.pointerType,e(r,r.pointerType))},[e]);return{onClick:C.useCallback(r=>{if(r.detail===0){e(r,"keyboard");return}"pointerType"in r?e(r,r.pointerType):e(r,t.current),t.current=""},[e]),onPointerDown:n}}function _P(e){const[t,n]=C.useState(null),r=tt((u,c)=>{e||n(c||(xP?"touch":""))}),i=C.useCallback(()=>{n(null)},[]),{onClick:o,onPointerDown:a}=UV(r);return C.useMemo(()=>({openMethod:t,reset:i,triggerProps:{onClick:o,onPointerDown:a}}),[t,i,o,a])}function qt(e,t,n,r){let i=!1,o=!1;const a=Cr;return{reason:e,event:t??new Event("base-ui"),cancel(){i=!0},allowPropagation(){o=!0},get isCanceled(){return i},get isPropagationAllowed(){return o},trigger:n,...a}}function HV(e,t=!1,n=!1){const[r,i]=C.useState(e&&t?"idle":void 0),[o,a]=C.useState(e);return e&&!o&&(a(!0),i("starting")),!e&&o&&r!=="ending"&&!n&&i("ending"),!e&&!o&&r==="ending"&&i(void 0),gt(()=>{if(!e&&o&&r!=="ending"&&n){const u=Gs.request(()=>{i("ending")});return()=>{Gs.cancel(u)}}},[e,o,r,n]),gt(()=>{if(!e||t)return;const u=Gs.request(()=>{i(void 0)});return()=>{Gs.cancel(u)}},[t,e]),gt(()=>{if(!e||!t)return;e&&o&&r!=="idle"&&i("starting");const u=Gs.request(()=>{i("idle")});return()=>{Gs.cancel(u)}},[t,e,o,i,r]),C.useMemo(()=>({mounted:o,setMounted:a,transitionStatus:r}),[o,r])}function Io(e){return e==null?e:"current"in e?e.current:e}let nh=(function(e){return e.startingStyle="data-starting-style",e.endingStyle="data-ending-style",e})({});const GV={[nh.startingStyle]:""},VV={[nh.endingStyle]:""},af={transitionStatus(e){return e==="starting"?GV:e==="ending"?VV:null}};function TP(e,t=!1,n=!0){const r=kS();return tt((i,o=null)=>{r.cancel();function a(){yn.flushSync(i)}const u=Io(e);if(u==null)return;const c=u;if(typeof c.getAnimations!="function"||globalThis.BASE_UI_ANIMATIONS_DISABLED)i();else{let f=function(){const p=nh.startingStyle;if(!c.hasAttribute(p)){r.request(h);return}const m=new MutationObserver(()=>{c.hasAttribute(p)||(m.disconnect(),h())});m.observe(c,{attributes:!0,attributeFilter:[p]}),o==null||o.addEventListener("abort",()=>m.disconnect(),{once:!0})},h=function(){Promise.all(c.getAnimations().map(p=>p.finished)).then(()=>{o!=null&&o.aborted||a()}).catch(()=>{const p=c.getAnimations();if(n){if(o!=null&&o.aborted)return;a()}else p.length>0&&p.some(m=>m.pending||m.playState!=="finished")&&h()})};if(t){f();return}r.request(h)}})}function Oh(e){const{enabled:t=!0,open:n,ref:r,onComplete:i}=e,o=tt(i),a=TP(r,n,!1);C.useEffect(()=>{if(!t)return;const u=new AbortController;return a(o,u.signal),()=>{u.abort()}},[t,n,o,a])}function qV(e,t){const n=C.useRef(null),r=C.useRef(null);return C.useCallback(i=>{if(e!==void 0){if(n.current!==null){const o=n.current,a=r.current,u=t.context.triggerElements.getById(o);a&&u===a&&t.context.triggerElements.delete(o),n.current=null,r.current=null}i!==null&&(n.current=e,r.current=i,t.context.triggerElements.add(e,i))}},[t,e])}function RS(e,t,n,r){const i=n.useState("isMountedByTrigger",e),o=qV(e,n),a=tt(u=>{if(o(u),!u||!n.select("open"))return;const c=n.select("activeTriggerId");if(c===e){n.update({activeTriggerElement:u,...r});return}c==null&&n.update({activeTriggerId:e,activeTriggerElement:u,...r})});return gt(()=>{i&&n.update({activeTriggerElement:t.current,...r})},[i,n,t,...Object.values(r)]),{registerTrigger:a,isMountedByThisTrigger:i}}function _S(e){const t=e.useState("open");gt(()=>{if(t&&!e.select("activeTriggerId")&&e.context.triggerElements.size===1){const n=e.context.triggerElements.entries().next();if(!n.done){const[r,i]=n.value;e.update({activeTriggerId:r,activeTriggerElement:i})}}},[t,e])}function TS(e,t,n){const{mounted:r,setMounted:i,transitionStatus:o}=HV(e);t.useSyncedValues({mounted:r,transitionStatus:o});const a=tt(()=>{var c,f;i(!1),t.update({activeTriggerId:null,activeTriggerElement:null,mounted:!1}),n==null||n(),(f=(c=t.context).onOpenChangeComplete)==null||f.call(c,!1)}),u=t.useState("preventUnmountingOnClose");return Oh({enabled:!u,open:e,ref:t.context.popupRef,onComplete(){e||a()}}),{forceUnmount:a,transitionStatus:o}}const YV={...as};let NA=0;function WV(e,t="mui"){const[n,r]=C.useState(e),i=e||n;return C.useEffect(()=>{n==null&&(NA+=1,r(`${t}-${NA}`))},[n,t]),i}const IA=YV.useId;function Jl(e,t){if(IA!==void 0){const n=IA();return e??(t?`${t}-${n}`:n)}return WV(e,t)}function AP(){const e=new Map;return{emit(t,n){var r;(r=e.get(t))==null||r.forEach(i=>i(n))},on(t,n){e.has(t)||e.set(t,new Set),e.get(t).add(n)},off(t,n){var r;(r=e.get(t))==null||r.delete(n)}}}let KV=class{constructor(){te(this,"nodesRef",{current:[]});te(this,"events",AP())}addNode(t){this.nodesRef.current.push(t)}removeNode(t){const n=this.nodesRef.current.findIndex(r=>r===t);n!==-1&&this.nodesRef.current.splice(n,1)}};const DP=C.createContext(null),MP=C.createContext(null),eu=()=>{var e;return((e=C.useContext(DP))==null?void 0:e.id)||null},lf=e=>{const t=C.useContext(MP);return e??t};function XV(e){const t=Jl(),n=lf(e),r=eu();return gt(()=>{if(!t)return;const i={id:t,parentId:r};return n==null||n.addNode(i),()=>{n==null||n.removeNode(i)}},[n,t,r]),t}function QV(e){const{children:t,id:n}=e,r=eu();return E.jsx(DP.Provider,{value:C.useMemo(()=>({id:n,parentId:r}),[n,r]),children:t})}function ZV(e){const{children:t,externalTree:n}=e,r=fr(()=>n??new KV).current;return E.jsx(MP.Provider,{value:r,children:t})}var Q0={exports:{}},Z0={},jA;function JV(){if(jA)return Z0;jA=1;var e=Ca;function t(p,m){return p===m&&(p!==0||1/p===1/m)||p!==p&&m!==m}var n=typeof Object.is=="function"?Object.is:t,r=e.useState,i=e.useEffect,o=e.useLayoutEffect,a=e.useDebugValue;function u(p,m){var y=m(),b=r({inst:{value:y,getSnapshot:m}}),v=b[0].inst,S=b[1];return o(function(){v.value=y,v.getSnapshot=m,c(v)&&S({inst:v})},[p,y,m]),i(function(){return c(v)&&S({inst:v}),p(function(){c(v)&&S({inst:v})})},[p]),a(y),y}function c(p){var m=p.getSnapshot;p=p.value;try{var y=m();return!n(p,y)}catch{return!0}}function f(p,m){return m()}var h=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?f:u;return Z0.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:h,Z0}var LA;function OP(){return LA||(LA=1,Q0.exports=JV()),Q0.exports}var $P=OP(),J0={exports:{}},ex={},FA;function eq(){if(FA)return ex;FA=1;var e=Ca,t=OP();function n(f,h){return f===h&&(f!==0||1/f===1/h)||f!==f&&h!==h}var r=typeof Object.is=="function"?Object.is:n,i=t.useSyncExternalStore,o=e.useRef,a=e.useEffect,u=e.useMemo,c=e.useDebugValue;return ex.useSyncExternalStoreWithSelector=function(f,h,p,m,y){var b=o(null);if(b.current===null){var v={hasValue:!1,value:null};b.current=v}else v=b.current;b=u(function(){function x(D){if(!_){if(_=!0,k=D,D=m(D),y!==void 0&&v.hasValue){var O=v.value;if(y(O,D))return T=O}return T=D}if(O=T,r(k,D))return O;var $=m(D);return y!==void 0&&y(O,$)?(k=D,O):(k=D,T=$)}var _=!1,k,T,A=p===void 0?null:p;return[function(){return x(h())},A===null?void 0:function(){return x(A())}]},[h,p,m,y]);var S=i(f,b[0],b[1]);return a(function(){v.hasValue=!0,v.value=S},[S]),c(S),S},ex}var zA;function tq(){return zA||(zA=1,J0.exports=eq()),J0.exports}var nq=tq();const rq=parseInt(C.version,10);function AS(e){return rq>=e}const z1=[];let B1;function iq(){return B1}function oq(e){z1.push(e)}function PP(e){const t=(n,r)=>{const i=fr(aq).current;let o;try{B1=i;for(const a of z1)a.before(i);o=e(n,r);for(const a of z1)a.after(i);i.didInitialize=!0}finally{B1=void 0}return o};return t.displayName=e.displayName||e.name,t}function sq(e){return C.forwardRef(PP(e))}function aq(){return{didInitialize:!1}}const lq=AS(19),uq=lq?fq:dq;function NP(e,t,n,r,i){return uq(e,t,n,r,i)}function cq(e,t,n,r,i){const o=C.useCallback(()=>t(e.getSnapshot(),n,r,i),[e,t,n,r,i]);return $P.useSyncExternalStore(e.subscribe,o,o)}oq({before(e){e.syncIndex=0,e.didInitialize||(e.syncTick=1,e.syncHooks=[],e.didChangeStore=!0,e.getSnapshot=()=>{let t=!1;for(let n=0;n<e.syncHooks.length;n+=1){const r=e.syncHooks[n],i=r.selector(r.store.state,r.a1,r.a2,r.a3);(r.didChange||!Object.is(r.value,i))&&(t=!0,r.value=i,r.didChange=!1)}return t&&(e.syncTick+=1),e.syncTick})},after(e){e.syncHooks.length>0&&(e.didChangeStore&&(e.didChangeStore=!1,e.subscribe=t=>{const n=new Set;for(const i of e.syncHooks)n.add(i.store);const r=[];for(const i of n)r.push(i.subscribe(t));return()=>{for(const i of r)i()}}),$P.useSyncExternalStore(e.subscribe,e.getSnapshot,e.getSnapshot))}});function fq(e,t,n,r,i){const o=iq();if(!o)return cq(e,t,n,r,i);const a=o.syncIndex;o.syncIndex+=1;let u;return o.didInitialize?(u=o.syncHooks[a],(u.store!==e||u.selector!==t||!Object.is(u.a1,n)||!Object.is(u.a2,r)||!Object.is(u.a3,i))&&(u.store!==e&&(o.didChangeStore=!0),u.store=e,u.selector=t,u.a1=n,u.a2=r,u.a3=i,u.didChange=!0)):(u={store:e,selector:t,a1:n,a2:r,a3:i,value:t(e.getSnapshot(),n,r,i),didChange:!1},o.syncHooks.push(u)),u.value}function dq(e,t,n,r,i){return nq.useSyncExternalStoreWithSelector(e.subscribe,e.getSnapshot,e.getSnapshot,o=>t(o,n,r,i))}let hq=class{constructor(t){te(this,"subscribe",t=>(this.listeners.add(t),()=>{this.listeners.delete(t)}));te(this,"getSnapshot",()=>this.state);this.state=t,this.listeners=new Set,this.updateTick=0}setState(t){if(this.state===t)return;this.state=t,this.updateTick+=1;const n=this.updateTick;for(const r of this.listeners){if(n!==this.updateTick)return;r(t)}}update(t){for(const n in t)if(!Object.is(this.state[n],t[n])){this.setState({...this.state,...t});return}}set(t,n){Object.is(this.state[t],n)||this.setState({...this.state,[t]:n})}notifyAll(){const t={...this.state};this.setState(t)}use(t,n,r,i){return NP(this,t,n,r,i)}},$h=class extends hq{constructor(t,n={},r){super(t),this.context=n,this.selectors=r}useSyncedValue(t,n){C.useDebugValue(t),gt(()=>{this.state[t]!==n&&this.set(t,n)},[t,n])}useSyncedValueWithCleanup(t,n){const r=this;gt(()=>(r.state[t]!==n&&r.set(t,n),()=>{r.set(t,void 0)}),[r,t,n])}useSyncedValues(t){const n=this,r=Object.values(t);gt(()=>{n.update(t)},[n,...r])}useControlledProp(t,n){C.useDebugValue(t);const r=n!==void 0;gt(()=>{r&&!Object.is(this.state[t],n)&&super.setState({...this.state,[t]:n})},[t,n,r])}select(t,n,r,i){const o=this.selectors[t];return o(this.state,n,r,i)}useState(t,n,r,i){return C.useDebugValue(t),NP(this,this.selectors[t],n,r,i)}useContextCallback(t,n){C.useDebugValue(t);const r=tt(n??kP);this.context[t]=r}useStateSetter(t){const n=C.useRef(void 0);return n.current===void 0&&(n.current=r=>{this.set(t,r)}),n.current}observe(t,n){let r;typeof t=="function"?r=t:r=this.selectors[t];let i=r(this.state);return n(i,i,this),this.subscribe(o=>{const a=r(o);if(!Object.is(i,a)){const u=i;i=a,n(a,u,this)}})}};function pq(e){e.preventDefault(),e.stopPropagation()}function mq(e){return"nativeEvent"in e}function gq(e){return e.pointerType===""&&e.isTrusted?!0:F1&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function yq(e){return SP?!1:!F1&&e.width===0&&e.height===0||F1&&e.width===1&&e.height===1&&e.pressure===0&&e.detail===0&&e.pointerType==="mouse"||e.width<1&&e.height<1&&e.pressure===0&&e.detail===0&&e.pointerType==="touch"}function zl(e,t){const n=["mouse","pen"];return t||n.push("",void 0),n.includes(e)}function IP(e){const t=e.type;return t==="click"||t==="mousedown"||t==="keydown"||t==="keyup"}function An(e,...t){const n=new URL("https://base-ui.com/production-error");return n.searchParams.set("code",e.toString()),t.forEach(r=>n.searchParams.append("args[]",r)),`Base UI error #${e}; visit ${n} for the full message.`}var Pg=Symbol("NOT_FOUND");function bq(e,t=`expected a function, instead received ${typeof e}`){if(typeof e!="function")throw new TypeError(t)}function vq(e,t=`expected an object, instead received ${typeof e}`){if(typeof e!="object")throw new TypeError(t)}function xq(e,t="expected all items to be functions, instead received the following types: "){if(!e.every(n=>typeof n=="function")){const n=e.map(r=>typeof r=="function"?`function ${r.name||"unnamed"}()`:typeof r).join(", ");throw new TypeError(`${t}[${n}]`)}}var BA=e=>Array.isArray(e)?e:[e];function wq(e){const t=Array.isArray(e[0])?e[0]:e;return xq(t,"createSelector expects all input-selectors to be functions, but received the following types: "),t}function Sq(e,t){const n=[],{length:r}=e;for(let i=0;i<r;i++)n.push(e[i].apply(null,t));return n}function Cq(e){let t;return{get(n){return t&&e(t.key,n)?t.value:Pg},put(n,r){t={key:n,value:r}},getEntries(){return t?[t]:[]},clear(){t=void 0}}}function Eq(e,t){let n=[];function r(u){const c=n.findIndex(f=>t(u,f.key));if(c>-1){const f=n[c];return c>0&&(n.splice(c,1),n.unshift(f)),f.value}return Pg}function i(u,c){r(u)===Pg&&(n.unshift({key:u,value:c}),n.length>e&&n.pop())}function o(){return n}function a(){n=[]}return{get:r,put:i,getEntries:o,clear:a}}var kq=(e,t)=>e===t;function Rq(e){return function(t,n){if(t===null||n===null||t.length!==n.length)return!1;const{length:r}=t;for(let i=0;i<r;i++)if(!e(t[i],n[i]))return!1;return!0}}function _q(e,t){const n=typeof t=="object"?t:{equalityCheck:t},{equalityCheck:r=kq,maxSize:i=1,resultEqualityCheck:o}=n,a=Rq(r);let u=0;const c=i<=1?Cq(a):Eq(i,a);function f(){let h=c.get(arguments);if(h===Pg){if(h=e.apply(null,arguments),u++,o){const p=c.getEntries().find(m=>o(m.value,h));p&&(h=p.value,u!==0&&u--)}c.put(arguments,h)}return h}return f.clearCache=()=>{c.clear(),f.resetResultsCount()},f.resultsCount=()=>u,f.resetResultsCount=()=>{u=0},f}var Tq=class{constructor(t){this.value=t}deref(){return this.value}},Aq=typeof WeakRef<"u"?WeakRef:Tq,Dq=0,UA=1;function wm(){return{s:Dq,v:void 0,o:null,p:null}}function jP(e,t={}){let n=wm();const{resultEqualityCheck:r}=t;let i,o=0;function a(){var p;let u=n;const{length:c}=arguments;for(let m=0,y=c;m<y;m++){const b=arguments[m];if(typeof b=="function"||typeof b=="object"&&b!==null){let v=u.o;v===null&&(u.o=v=new WeakMap);const S=v.get(b);S===void 0?(u=wm(),v.set(b,u)):u=S}else{let v=u.p;v===null&&(u.p=v=new Map);const S=v.get(b);S===void 0?(u=wm(),v.set(b,u)):u=S}}const f=u;let h;if(u.s===UA)h=u.v;else if(h=e.apply(null,arguments),o++,r){const m=((p=i==null?void 0:i.deref)==null?void 0:p.call(i))??i;m!=null&&r(m,h)&&(h=m,o!==0&&o--),i=typeof h=="object"&&h!==null||typeof h=="function"?new Aq(h):h}return f.s=UA,f.v=h,h}return a.clearCache=()=>{n=wm(),a.resetResultsCount()},a.resultsCount=()=>o,a.resetResultsCount=()=>{o=0},a}function LP(e,...t){const n=typeof e=="function"?{memoize:e,memoizeOptions:t}:e,r=(...i)=>{let o=0,a=0,u,c={},f=i.pop();typeof f=="object"&&(c=f,f=i.pop()),bq(f,`createSelector expects an output function after the inputs, but received: [${typeof f}]`);const h={...n,...c},{memoize:p,memoizeOptions:m=[],argsMemoize:y=jP,argsMemoizeOptions:b=[]}=h,v=BA(m),S=BA(b),x=wq(i),_=p(function(){return o++,f.apply(null,arguments)},...v),k=y(function(){a++;const T=Sq(x,arguments);return u=_.apply(null,T),u},...S);return Object.assign(k,{resultFunc:f,memoizedResultFunc:_,dependencies:x,dependencyRecomputations:()=>a,resetDependencyRecomputations:()=>{a=0},lastResult:()=>u,recomputations:()=>o,resetRecomputations:()=>{o=0},memoize:p,argsMemoize:y})};return Object.assign(r,{withTypes:()=>r}),r}var Mq=LP(jP),Oq=Object.assign((e,t=Mq)=>{vq(e,`createStructuredSelector expects first argument to be an object where each property is a selector, instead received a ${typeof e}`);const n=Object.keys(e),r=n.map(i=>e[i]);return t(r,(...i)=>i.reduce((o,a,u)=>(o[n[u]]=a,o),{}))},{withTypes:()=>Oq});const $q=LP({memoize:_q,memoizeOptions:{maxSize:1,equalityCheck:Object.is}}),Ke=(e,t,n,r,i,o,...a)=>{if(a.length>0)throw new Error(An(1));let u;if(e&&t)u=(c,f,h,p)=>{const m=e(c,f,h,p);return t(m,f,h,p)};else if(e)u=e;else throw new Error("Missing arguments");return u},Pq=(...e)=>{const t=new WeakMap;let n=1;const r=e[e.length-1],i=e.length-1||1,o=r.length-i;if(o>3)throw new Error(An(2));return(a,u,c,f)=>{let h=a.__cacheKey__;h||(h={id:n},a.__cacheKey__=h,n+=1);let p=t.get(h);if(!p){let m=e;const y=[void 0,void 0,void 0];switch(o){case 0:break;case 1:{m=[...e.slice(0,-1),()=>y[0],r];break}case 2:{m=[...e.slice(0,-1),()=>y[0],()=>y[1],r];break}case 3:{m=[...e.slice(0,-1),()=>y[0],()=>y[1],()=>y[2],r];break}default:throw new Error(An(2))}p=$q(...m),p.selectorArgs=y,t.set(h,p)}switch(p.selectorArgs[0]=u,p.selectorArgs[1]=c,p.selectorArgs[2]=f,o){case 0:return p(a);case 1:return p(a,u);case 2:return p(a,u,c);case 3:return p(a,u,c,f);default:throw new Error("unreachable")}}},Nq={open:Ke(e=>e.open),domReferenceElement:Ke(e=>e.domReferenceElement),referenceElement:Ke(e=>e.positionReference??e.referenceElement),floatingElement:Ke(e=>e.floatingElement),floatingId:Ke(e=>e.floatingId)};let DS=class extends $h{constructor(n){const{nested:r,noEmit:i,onOpenChange:o,triggerElements:a,...u}=n;super({...u,positionReference:u.referenceElement,domReferenceElement:u.referenceElement},{onOpenChange:o,dataRef:{current:{}},events:AP(),nested:r,noEmit:i,triggerElements:a},Nq);te(this,"setOpen",(n,r)=>{var i,o;if((!n||!this.state.open||IP(r.event))&&(this.context.dataRef.current.openEvent=n?r.event:void 0),!this.context.noEmit){const a={open:n,reason:r.reason,nativeEvent:r.event,nested:this.context.nested,triggerElement:r.trigger};this.context.events.emit("openchange",a)}(o=(i=this.context).onOpenChange)==null||o.call(i,n,r)})}};function MS(e){const{popupStore:t,noEmit:n=!1,treatPopupAsFloatingElement:r=!1,onOpenChange:i}=e,o=Jl(),a=eu()!=null,u=t.useState("open"),c=t.useState("activeTriggerElement"),f=t.useState(r?"popupElement":"positionerElement"),h=t.context.triggerElements,p=fr(()=>new DS({open:u,referenceElement:c,floatingElement:f,triggerElements:h,onOpenChange:i,floatingId:o,nested:a,noEmit:n})).current;return gt(()=>{const m={open:u,floatingId:o,referenceElement:c,floatingElement:f};Nt(c)&&(m.domReferenceElement=c),p.state.positionReference===p.state.referenceElement&&(m.positionReference=c),p.update(m)},[u,o,c,f,p]),p.context.onOpenChange=i,p.context.nested=a,p.context.noEmit=n,p}const U1="data-base-ui-focusable",FP="active",zP="selected",BP="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])";function Gr(e){var n;let t=e.activeElement;for(;((n=t==null?void 0:t.shadowRoot)==null?void 0:n.activeElement)!=null;)t=t.shadowRoot.activeElement;return t}function ct(e,t){var r;if(!e||!t)return!1;const n=(r=t.getRootNode)==null?void 0:r.call(t);if(e.contains(t))return!0;if(n&&j1(n)){let i=t;for(;i;){if(e===i)return!0;i=i.parentNode||i.host}}return!1}function Ng(e,t){if(!Nt(e))return!1;const n=e;if(t.hasElement(n))return!n.hasAttribute("data-trigger-disabled");for(const[,r]of t.entries())if(ct(r,n))return!r.hasAttribute("data-trigger-disabled");return!1}function Vn(e){return"composedPath"in e?e.composedPath()[0]:e.target}function Mi(e,t){if(t==null)return!1;if("composedPath"in e)return e.composedPath().includes(t);const n=e;return n.target!=null&&t.contains(n.target)}function Iq(e){return e.matches("html,body")}function $y(e){return gn(e)&&e.matches(BP)}function HA(e){return e?e.getAttribute("role")==="combobox"&&$y(e):!1}function Ig(e){if(!e||SP)return!0;try{return e.matches(":focus-visible")}catch{return!0}}function H1(e){return e?e.hasAttribute(U1)?e:e.querySelector(`[${U1}]`)||e:null}const jq=new Map([["select","listbox"],["combobox","listbox"],["label",!1]]);function UP(e,t={}){const n="rootStore"in e?e.rootStore:e,r=n.useState("open"),i=n.useState("floatingId"),o=n.useState("domReferenceElement"),a=n.useState("floatingElement"),{role:u="dialog"}=t,c=Jl(),f=(o==null?void 0:o.id)||c,h=C.useMemo(()=>{var x;return((x=H1(a))==null?void 0:x.id)||i},[a,i]),p=jq.get(u)??u,m=eu()!=null,y=C.useMemo(()=>p==="tooltip"||u==="label"?Cr:{"aria-haspopup":p==="alertdialog"?"dialog":p,"aria-expanded":"false",...p==="listbox"&&{role:"combobox"},...p==="menu"&&m&&{role:"menuitem"},...u==="select"&&{"aria-autocomplete":"none"},...u==="combobox"&&{"aria-autocomplete":"list"}},[p,m,u]),b=C.useMemo(()=>p==="tooltip"||u==="label"?{[`aria-${u==="label"?"labelledby":"describedby"}`]:r?h:void 0}:{...y,"aria-expanded":r?"true":"false","aria-controls":r?h:void 0,...p==="menu"&&{id:f}},[p,h,r,f,u,y]),v=C.useMemo(()=>{const x={id:h,...p&&{role:p}};return p==="tooltip"||u==="label"?x:{...x,...p==="menu"&&{"aria-labelledby":f}}},[p,h,f,u]),S=C.useCallback(({active:x,selected:_})=>{const k={role:"option",...x&&{id:`${h}-fui-option`}};switch(u){case"select":case"combobox":return{...k,"aria-selected":_}}return{}},[h,u]);return C.useMemo(()=>({reference:b,floating:v,item:S,trigger:y}),[b,v,y,S])}function Lc(e){return`data-base-ui-${e}`}function Nl(e,t,n=!0){return e.filter(r=>{var i;return r.parentId===t&&(!n||((i=r.context)==null?void 0:i.open))}).flatMap(r=>[r,...Nl(e,r.id,n)])}function GA(e,t){var i;let n=[],r=(i=e.find(o=>o.id===t))==null?void 0:i.parentId;for(;r;){const o=e.find(a=>a.id===r);r=o==null?void 0:o.parentId,o&&(n=n.concat(o))}return n}const OS="none",ka="trigger-press",Xn="trigger-hover",lg="trigger-focus",HP="outside-press",rh="focus-out",Py="escape-key",Lq="disabled",$S="imperative-action",Fq={intentional:"onClick",sloppy:"onPointerDown"};function zq(e){return{escapeKey:typeof e=="boolean"?e:(e==null?void 0:e.escapeKey)??!1,outsidePress:typeof e=="boolean"?e:(e==null?void 0:e.outsidePress)??!0}}function PS(e,t={}){const n="rootStore"in e?e.rootStore:e,r=n.useState("open"),i=n.useState("floatingElement"),o=n.useState("referenceElement"),a=n.useState("domReferenceElement"),{onOpenChange:u,dataRef:c}=n.context,{enabled:f=!0,escapeKey:h=!0,outsidePress:p=!0,outsidePressEvent:m="sloppy",referencePress:y=!1,referencePressEvent:b="sloppy",ancestorScroll:v=!1,bubbles:S,externalTree:x}=t,_=lf(x),k=tt(typeof p=="function"?p:()=>!1),T=typeof p=="function"?k:p,A=C.useRef(!1),{escapeKey:D,outsidePress:O}=zq(S),$=C.useRef(null),B=Ea(),j=Ea(),N=tt(()=>{j.clear(),c.current.insideReactTree=!1}),M=C.useRef(!1),z=C.useRef(""),G=tt(X=>{z.current=X.pointerType}),L=tt(()=>{const X=z.current,Z=X==="pen"||!X?"mouse":X,ne=typeof m=="function"?m():m;return typeof ne=="string"?ne:ne[Z]}),F=tt(X=>{var Ce;if(!r||!f||!h||X.key!=="Escape"||M.current)return;const Z=(Ce=c.current.floatingContext)==null?void 0:Ce.nodeId,ne=_?Nl(_.nodesRef.current,Z):[];if(!D&&ne.length>0){let le=!0;if(ne.forEach(oe=>{var me;(me=oe.context)!=null&&me.open&&!oe.context.dataRef.current.__escapeKeyBubbles&&(le=!1)}),!le)return}const xe=mq(X)?X.nativeEvent:X,ge=qt(Py,xe);n.setOpen(!1,ge),!D&&!ge.isPropagationAllowed&&X.stopPropagation()}),U=tt(X=>{const Z=L();return Z==="intentional"&&X.type!=="click"||Z==="sloppy"&&X.type==="click"}),q=tt(()=>{c.current.insideReactTree=!0,j.start(0,N)}),W=tt((X,Z=!1)=>{var Oe;if(U(X)){N();return}if(c.current.insideReactTree){N();return}if(L()==="intentional"&&Z||typeof T=="function"&&!T(X))return;const ne=Vn(X),xe=`[${Lc("inert")}]`,ge=Mt(n.select("floatingElement")).querySelectorAll(xe),Ce=n.context.triggerElements;if(ne&&(Ce.hasElement(ne)||Ce.hasMatchingElement(Te=>ct(Te,ne))))return;let le=Nt(ne)?ne:null;for(;le&&!Xo(le);){const Te=ts(le);if(Xo(Te)||!Nt(Te))break;le=Te}if(ge.length&&Nt(ne)&&!Iq(ne)&&!ct(ne,n.select("floatingElement"))&&Array.from(ge).every(Te=>!ct(le,Te)))return;if(gn(ne)&&!("touches"in X)){const Te=Xo(ne),_e=Zr(ne),De=/auto|scroll/,ue=Te||De.test(_e.overflowX),Se=Te||De.test(_e.overflowY),ke=ue&&ne.clientWidth>0&&ne.scrollWidth>ne.clientWidth,Pe=Se&&ne.clientHeight>0&&ne.scrollHeight>ne.clientHeight,Le=_e.direction==="rtl",st=Pe&&(Le?X.offsetX<=ne.offsetWidth-ne.clientWidth:X.offsetX>ne.clientWidth),Ut=ke&&X.offsetY>ne.clientHeight;if(st||Ut)return}const oe=(Oe=c.current.floatingContext)==null?void 0:Oe.nodeId,me=_&&Nl(_.nodesRef.current,oe).some(Te=>{var _e;return Mi(X,(_e=Te.context)==null?void 0:_e.elements.floating)});if(Mi(X,n.select("floatingElement"))||Mi(X,n.select("domReferenceElement"))||me)return;const ae=_?Nl(_.nodesRef.current,oe):[];if(ae.length>0){let Te=!0;if(ae.forEach(_e=>{var De;(De=_e.context)!=null&&De.open&&!_e.context.dataRef.current.__outsidePressBubbles&&(Te=!1)}),!Te)return}n.setOpen(!1,qt(HP,X)),N()}),I=tt(X=>{L()!=="sloppy"||X.pointerType==="touch"||!n.select("open")||!f||Mi(X,n.select("floatingElement"))||Mi(X,n.select("domReferenceElement"))||W(X)}),Y=tt(X=>{if(L()!=="sloppy"||!n.select("open")||!f||Mi(X,n.select("floatingElement"))||Mi(X,n.select("domReferenceElement")))return;const Z=X.touches[0];Z&&($.current={startTime:Date.now(),startX:Z.clientX,startY:Z.clientY,dismissOnTouchEnd:!1,dismissOnMouseDown:!0},B.start(1e3,()=>{$.current&&($.current.dismissOnTouchEnd=!1,$.current.dismissOnMouseDown=!1)}))}),J=tt(X=>{const Z=Vn(X);function ne(){Y(X),Z==null||Z.removeEventListener(X.type,ne)}Z==null||Z.addEventListener(X.type,ne)}),H=tt(X=>{const Z=A.current;if(A.current=!1,B.clear(),X.type==="mousedown"&&$.current&&!$.current.dismissOnMouseDown)return;const ne=Vn(X);function xe(){X.type==="pointerdown"?I(X):W(X,Z),ne==null||ne.removeEventListener(X.type,xe)}ne==null||ne.addEventListener(X.type,xe)}),ie=tt(X=>{if(L()!=="sloppy"||!$.current||Mi(X,n.select("floatingElement"))||Mi(X,n.select("domReferenceElement")))return;const Z=X.touches[0];if(!Z)return;const ne=Math.abs(Z.clientX-$.current.startX),xe=Math.abs(Z.clientY-$.current.startY),ge=Math.sqrt(ne*ne+xe*xe);ge>5&&($.current.dismissOnTouchEnd=!0),ge>10&&(W(X),B.clear(),$.current=null)}),re=tt(X=>{const Z=Vn(X);function ne(){ie(X),Z==null||Z.removeEventListener(X.type,ne)}Z==null||Z.addEventListener(X.type,ne)}),he=tt(X=>{L()!=="sloppy"||!$.current||Mi(X,n.select("floatingElement"))||Mi(X,n.select("domReferenceElement"))||($.current.dismissOnTouchEnd&&W(X),B.clear(),$.current=null)}),ve=tt(X=>{const Z=Vn(X);function ne(){he(X),Z==null||Z.removeEventListener(X.type,ne)}Z==null||Z.addEventListener(X.type,ne)});C.useEffect(()=>{if(!r||!f)return;c.current.__escapeKeyBubbles=D,c.current.__outsidePressBubbles=O;const X=new Bi;function Z(le){n.setOpen(!1,qt(OS,le))}function ne(){X.clear(),M.current=!0}function xe(){X.start(My()?5:0,()=>{M.current=!1})}const ge=Mt(i);ge.addEventListener("pointerdown",G,!0),h&&(ge.addEventListener("keydown",F),ge.addEventListener("compositionstart",ne),ge.addEventListener("compositionend",xe)),T&&(ge.addEventListener("click",H,!0),ge.addEventListener("pointerdown",H,!0),ge.addEventListener("touchstart",J,!0),ge.addEventListener("touchmove",re,!0),ge.addEventListener("touchend",ve,!0),ge.addEventListener("mousedown",H,!0));let Ce=[];return v&&(Nt(a)&&(Ce=ha(a)),Nt(i)&&(Ce=Ce.concat(ha(i))),!Nt(o)&&o&&o.contextElement&&(Ce=Ce.concat(ha(o.contextElement)))),Ce=Ce.filter(le=>{var oe;return le!==((oe=ge.defaultView)==null?void 0:oe.visualViewport)}),Ce.forEach(le=>{le.addEventListener("scroll",Z,{passive:!0})}),()=>{ge.removeEventListener("pointerdown",G,!0),h&&(ge.removeEventListener("keydown",F),ge.removeEventListener("compositionstart",ne),ge.removeEventListener("compositionend",xe)),T&&(ge.removeEventListener("click",H,!0),ge.removeEventListener("pointerdown",H,!0),ge.removeEventListener("touchstart",J,!0),ge.removeEventListener("touchmove",re,!0),ge.removeEventListener("touchend",ve,!0),ge.removeEventListener("mousedown",H,!0)),Ce.forEach(le=>{le.removeEventListener("scroll",Z)}),X.clear(),A.current=!1}},[c,i,o,a,h,T,r,u,v,f,D,O,F,W,H,I,J,re,ve,G,n]),C.useEffect(N,[T,N]);const Re=C.useMemo(()=>({onKeyDown:F,...y&&{[Fq[b]]:X=>{n.setOpen(!1,qt(ka,X.nativeEvent))},...b!=="intentional"&&{onClick(X){n.setOpen(!1,qt(ka,X.nativeEvent))}}}}),[F,n,y,b]),ce=tt(X=>{const Z=Vn(X.nativeEvent);!ct(n.select("floatingElement"),Z)||X.button!==0||(A.current=!0)}),je=tt(X=>{!r||!f||X.button!==0||(A.current=!0)}),We=C.useMemo(()=>({onKeyDown:F,onPointerDown:ce,onMouseDown:ce,onMouseUp:ce,onClickCapture:q,onMouseDownCapture(X){q(),je(X)},onPointerDownCapture(X){q(),je(X)},onMouseUpCapture:q,onTouchEndCapture:q,onTouchMoveCapture:q}),[F,ce,q,je]);return C.useMemo(()=>f?{reference:Re,floating:We,trigger:Re}:{},[f,Re,We])}function Ph(e=[]){const t=e.map(f=>f==null?void 0:f.reference),n=e.map(f=>f==null?void 0:f.floating),r=e.map(f=>f==null?void 0:f.item),i=e.map(f=>f==null?void 0:f.trigger),o=C.useCallback(f=>Sm(f,e,"reference"),t),a=C.useCallback(f=>Sm(f,e,"floating"),n),u=C.useCallback(f=>Sm(f,e,"item"),r),c=C.useCallback(f=>Sm(f,e,"trigger"),i);return C.useMemo(()=>({getReferenceProps:o,getFloatingProps:a,getItemProps:u,getTriggerProps:c}),[o,a,u,c])}function Sm(e,t,n){var a;const r=new Map,i=n==="item",o={};n==="floating"&&(o.tabIndex=-1,o[U1]="");for(const u in e)i&&e&&(u===FP||u===zP)||(o[u]=e[u]);for(let u=0;u<t.length;u+=1){let c;const f=(a=t[u])==null?void 0:a[n];typeof f=="function"?c=e?f(e):null:c=f,c&&VA(o,c,i,r)}return VA(o,e,i,r),o}function VA(e,t,n,r){var i;for(const o in t){const a=t[o];n&&(o===FP||o===zP)||(o.startsWith("on")?(r.has(o)||r.set(o,[]),typeof a=="function"&&((i=r.get(o))==null||i.push(a),e[o]=(...u)=>{var c;return(c=r.get(o))==null?void 0:c.map(f=>f(...u)).find(f=>f!==void 0)})):e[o]=a)}}function Bq(e){const{store:t,parentContext:n,actionsRef:r}=e,i=t.useState("open"),o=t.useState("disablePointerDismissal"),a=t.useState("modal"),u=t.useState("popupElement"),{openMethod:c,triggerProps:f,reset:h}=_P(i);_S(t);const{forceUnmount:p}=TS(i,t,()=>{h()}),m=tt(j=>{const N=qt(j);return N.preventUnmountOnClose=()=>{t.set("preventUnmountingOnClose",!0)},N}),y=C.useCallback(()=>{t.setOpen(!1,m($S))},[t,m]);C.useImperativeHandle(r,()=>({unmount:p,close:y}),[p,y]);const b=MS({popupStore:t,onOpenChange:t.setOpen,treatPopupAsFloatingElement:!0,noEmit:!0}),[v,S]=C.useState(0),x=v===0,_=UP(b),k=PS(b,{outsidePressEvent(){return t.context.internalBackdropRef.current||t.context.backdropRef.current?"intentional":{mouse:a==="trap-focus"?"sloppy":"intentional",touch:"sloppy"}},outsidePress(j){if(!t.context.outsidePressEnabledRef.current||"button"in j&&j.button!==0||"touches"in j&&j.touches.length!==1)return!1;const N=Vn(j);if(x&&!o){const M=N;return a&&(t.context.internalBackdropRef.current||t.context.backdropRef.current)?t.context.internalBackdropRef.current===M||t.context.backdropRef.current===M||ct(M,u)&&!(M!=null&&M.hasAttribute("data-base-ui-portal")):!0}return!1},escapeKey:x});RP(i&&a===!0,u);const{getReferenceProps:T,getFloatingProps:A,getTriggerProps:D}=Ph([_,k]);t.useContextCallback("onNestedDialogOpen",j=>{S(j+1)}),t.useContextCallback("onNestedDialogClose",()=>{S(0)}),C.useEffect(()=>(n!=null&&n.onNestedDialogOpen&&i&&n.onNestedDialogOpen(v),n!=null&&n.onNestedDialogClose&&!i&&n.onNestedDialogClose(),()=>{n!=null&&n.onNestedDialogClose&&i&&n.onNestedDialogClose()}),[i,n,v]);const O=C.useMemo(()=>T(f),[T,f]),$=C.useMemo(()=>D(f),[D,f]),B=C.useMemo(()=>A(),[A]);t.useSyncedValues({openMethod:c,activeTriggerProps:O,inactiveTriggerProps:$,popupProps:B,floatingRootContext:b,nestedOpenDialogCount:v})}const GP=C.createContext(void 0);function Nh(e){const t=C.useContext(GP);if(e===!1&&t===void 0)throw new Error(An(27));return t}let Ih=class{constructor(){this.elementsSet=new Set,this.idMap=new Map}add(t,n){const r=this.idMap.get(t);r!==n&&(r!==void 0&&this.elementsSet.delete(r),this.elementsSet.add(n),this.idMap.set(t,n))}delete(t){const n=this.idMap.get(t);n&&(this.elementsSet.delete(n),this.idMap.delete(t))}hasElement(t){return this.elementsSet.has(t)}hasMatchingElement(t){for(const n of this.elementsSet)if(t(n))return!0;return!1}getById(t){return this.idMap.get(t)}entries(){return this.idMap.entries()}elements(){return this.elementsSet.values()}get size(){return this.idMap.size}};function Uq(){return new DS({open:!1,floatingElement:null,referenceElement:null,triggerElements:new Ih,floatingId:"",nested:!1,noEmit:!1,onOpenChange:void 0})}function NS(){return{open:!1,openProp:void 0,mounted:!1,transitionStatus:"idle",floatingRootContext:Uq(),preventUnmountingOnClose:!1,payload:void 0,activeTriggerId:null,activeTriggerElement:null,triggerIdProp:void 0,popupElement:null,positionerElement:null,activeTriggerProps:Cr,inactiveTriggerProps:Cr,popupProps:Cr}}const Cm=Ke(e=>e.triggerIdProp??e.activeTriggerId),IS={open:Ke(e=>e.openProp??e.open),mounted:Ke(e=>e.mounted),transitionStatus:Ke(e=>e.transitionStatus),floatingRootContext:Ke(e=>e.floatingRootContext),preventUnmountingOnClose:Ke(e=>e.preventUnmountingOnClose),payload:Ke(e=>e.payload),activeTriggerId:Cm,activeTriggerElement:Ke(e=>e.mounted?e.activeTriggerElement:null),isTriggerActive:Ke((e,t)=>t!==void 0&&Cm(e)===t),isOpenedByTrigger:Ke((e,t)=>t!==void 0&&Cm(e)===t&&e.open),isMountedByTrigger:Ke((e,t)=>t!==void 0&&Cm(e)===t&&e.mounted),triggerProps:Ke((e,t)=>t?e.activeTriggerProps:e.inactiveTriggerProps),popupProps:Ke(e=>e.popupProps),popupElement:Ke(e=>e.popupElement),positionerElement:Ke(e=>e.positionerElement)},Hq={...IS,modal:Ke(e=>e.modal),nested:Ke(e=>e.nested),nestedOpenDialogCount:Ke(e=>e.nestedOpenDialogCount),disablePointerDismissal:Ke(e=>e.disablePointerDismissal),openMethod:Ke(e=>e.openMethod),descriptionElementId:Ke(e=>e.descriptionElementId),titleElementId:Ke(e=>e.titleElementId),viewportElement:Ke(e=>e.viewportElement),role:Ke(e=>e.role)};let Gq=class extends $h{constructor(n){super(Vq(n),{popupRef:C.createRef(),backdropRef:C.createRef(),internalBackdropRef:C.createRef(),outsidePressEnabledRef:{current:!0},triggerElements:new Ih,onOpenChange:void 0,onOpenChangeComplete:void 0},Hq);te(this,"setOpen",(n,r)=>{var u,c,f,h;if(r.preventUnmountOnClose=()=>{this.set("preventUnmountingOnClose",!0)},!n&&r.trigger==null&&this.state.activeTriggerId!=null&&(r.trigger=this.state.activeTriggerElement??void 0),(c=(u=this.context).onOpenChange)==null||c.call(u,n,r),r.isCanceled)return;const i={open:n,nativeEvent:r.event,reason:r.reason,nested:this.state.nested};(f=this.state.floatingRootContext.context.events)==null||f.emit("openchange",i);const o={open:n},a=((h=r.trigger)==null?void 0:h.id)??null;(a||n)&&(o.activeTriggerId=a,o.activeTriggerElement=r.trigger??null),this.update(o)})}};function Vq(e={}){return{...NS(),modal:!0,disablePointerDismissal:!1,popupElement:null,viewportElement:null,descriptionElementId:void 0,titleElementId:void 0,openMethod:null,nested:!1,nestedOpenDialogCount:0,role:"dialog",...e}}function qq(e){const{children:t,open:n,defaultOpen:r=!1,onOpenChange:i,onOpenChangeComplete:o,disablePointerDismissal:a=!1,modal:u=!0,actionsRef:c,handle:f,triggerId:h,defaultTriggerId:p=null}=e,m=Nh(!0),y=!!m,b=fr(()=>(f==null?void 0:f.store)??new Gq({open:r,openProp:n,activeTriggerId:p,triggerIdProp:h,modal:u,disablePointerDismissal:a,nested:y})).current;SS(()=>{n===void 0&&b.state.open===!1&&r===!0&&b.update({open:!0,activeTriggerId:p})}),b.useControlledProp("openProp",n),b.useControlledProp("triggerIdProp",h),b.useSyncedValues({disablePointerDismissal:a,nested:y,modal:u}),b.useContextCallback("onOpenChange",i),b.useContextCallback("onOpenChangeComplete",o);const v=b.useState("payload");Bq({store:b,actionsRef:c,parentContext:m==null?void 0:m.store.context});const S=C.useMemo(()=>({store:b}),[b]);return E.jsx(GP.Provider,{value:S,children:typeof t=="function"?t({payload:v}):t})}const Yq=C.createContext(void 0);function Wq(e=!1){const t=C.useContext(Yq);if(t===void 0&&!e)throw new Error(An(16));return t}function Kq(e){const{focusableWhenDisabled:t,disabled:n,composite:r=!1,tabIndex:i=0,isNativeButton:o}=e,a=r&&t!==!1,u=r&&t===!1;return{props:C.useMemo(()=>{const c={onKeyDown(f){n&&t&&f.key!=="Tab"&&f.preventDefault()}};return r||(c.tabIndex=i,!o&&n&&(c.tabIndex=t?i:-1)),(o&&(t||a)||!o&&n)&&(c["aria-disabled"]=n),o&&(!t||u)&&(c.disabled=n),c},[r,n,t,a,u,o,i])}}function G1(e,t){if(e&&!t)return e;if(!e&&t)return t;if(e||t)return{...e,...t}}const Id={};function VP(e,t,n,r,i){let o={...V1(e,Id)};return t&&(o=ug(o,t)),n&&(o=ug(o,n)),r&&(o=ug(o,r)),o}function Xq(e){if(e.length===0)return Id;if(e.length===1)return V1(e[0],Id);let t={...V1(e[0],Id)};for(let n=1;n<e.length;n+=1)t=ug(t,e[n]);return t}function ug(e,t){return qP(t)?t(e):Qq(e,t)}function Qq(e,t){if(!t)return e;for(const n in t){const r=t[n];switch(n){case"style":{e[n]=G1(e.style,r);break}case"className":{e[n]=YP(e.className,r);break}default:Zq(n,r)?e[n]=Jq(e[n],r):e[n]=r}}return e}function Zq(e,t){const n=e.charCodeAt(0),r=e.charCodeAt(1),i=e.charCodeAt(2);return n===111&&r===110&&i>=65&&i<=90&&(typeof t=="function"||typeof t>"u")}function qP(e){return typeof e=="function"}function V1(e,t){return qP(e)?e(t):e??Id}function Jq(e,t){return t?e?n=>{if(eY(n)){const i=n;q1(i);const o=t(i);return i.baseUIHandlerPrevented||(e==null||e(i)),o}const r=t(n);return e==null||e(n),r}:t:e}function q1(e){return e.preventBaseUIHandler=()=>{e.baseUIHandlerPrevented=!0},e}function YP(e,t){return t?e?t+" "+e:t:e}function eY(e){return e!=null&&typeof e=="object"&&"nativeEvent"in e}function WP(e={}){const{disabled:t=!1,focusableWhenDisabled:n,tabIndex:r=0,native:i=!0}=e,o=C.useRef(null),a=Wq(!0)!==void 0,u=tt(()=>{const m=o.current;return!!((m==null?void 0:m.tagName)==="A"&&(m!=null&&m.href))}),{props:c}=Kq({focusableWhenDisabled:n,disabled:t,composite:a,tabIndex:r,isNativeButton:i}),f=C.useCallback(()=>{const m=o.current;tY(m)&&a&&t&&c.disabled===void 0&&m.disabled&&(m.disabled=!1)},[t,c.disabled,a]);gt(f,[f]);const h=C.useCallback((m={})=>{const{onClick:y,onMouseDown:b,onKeyUp:v,onKeyDown:S,onPointerDown:x,..._}=m;return VP({type:i?"button":void 0,onClick(k){if(t){k.preventDefault();return}y==null||y(k)},onMouseDown(k){t||(b==null||b(k))},onKeyDown(k){if(t||(q1(k),S==null||S(k)),k.baseUIHandlerPrevented)return;const T=k.target===k.currentTarget&&!i&&!u()&&!t,A=k.key==="Enter",D=k.key===" ";T&&((D||A)&&k.preventDefault(),A&&(y==null||y(k)))},onKeyUp(k){t||(q1(k),v==null||v(k)),!k.baseUIHandlerPrevented&&k.target===k.currentTarget&&!i&&!t&&k.key===" "&&(y==null||y(k))},onPointerDown(k){if(t){k.preventDefault();return}x==null||x(k)}},i?void 0:{role:"button"},c,_)},[t,c,i,u]),p=tt(m=>{o.current=m,f()});return{getButtonProps:h,buttonRef:p}}function tY(e){return gn(e)&&e.tagName==="BUTTON"}function jg(e,t,n,r){const i=fr(KP).current;return rY(i,e,t,n,r)&&XP(i,[e,t,n,r]),i.callback}function nY(e){const t=fr(KP).current;return iY(t,e)&&XP(t,e),t.callback}function KP(){return{callback:null,cleanup:null,refs:[]}}function rY(e,t,n,r,i){return e.refs[0]!==t||e.refs[1]!==n||e.refs[2]!==r||e.refs[3]!==i}function iY(e,t){return e.refs.length!==t.length||e.refs.some((n,r)=>n!==t[r])}function XP(e,t){if(e.refs=t,t.every(n=>n==null)){e.callback=null;return}e.callback=n=>{if(e.cleanup&&(e.cleanup(),e.cleanup=null),n!=null){const r=Array(t.length).fill(null);for(let i=0;i<t.length;i+=1){const o=t[i];if(o!=null)switch(typeof o){case"function":{const a=o(n);typeof a=="function"&&(r[i]=a);break}case"object":{o.current=n;break}}}e.cleanup=()=>{for(let i=0;i<t.length;i+=1){const o=t[i];if(o!=null)switch(typeof o){case"function":{const a=r[i];typeof a=="function"?a():o(null);break}case"object":{o.current=null;break}}}}}}}function qA(e){if(!C.isValidElement(e))return null;const t=e,n=t.props;return(AS(19)?n==null?void 0:n.ref:t.ref)??null}function oY(e,t){const n={};for(const r in e){const i=e[r];if(t!=null&&t.hasOwnProperty(r)){const o=t[r](i);o!=null&&Object.assign(n,o);continue}i===!0?n[`data-${r.toLowerCase()}`]="":i&&(n[`data-${r.toLowerCase()}`]=i.toString())}return n}function sY(e,t){return typeof e=="function"?e(t):e}function aY(e,t){return typeof e=="function"?e(t):e}function Dr(e,t,n={}){const r=t.render,i=lY(t,n);if(n.enabled===!1)return null;const o=n.state??Cr;return cY(e,r,i,o)}function lY(e,t={}){const{className:n,style:r,render:i}=e,{state:o=Cr,ref:a,props:u,stateAttributesMapping:c,enabled:f=!0}=t,h=f?sY(n,o):void 0,p=f?aY(r,o):void 0,m=f?oY(o,c):Cr,y=f?G1(m,Array.isArray(u)?Xq(u):u)??Cr:Cr;return typeof document<"u"&&(f?Array.isArray(a)?y.ref=nY([y.ref,qA(i),...a]):y.ref=jg(y.ref,qA(i),a):jg(null,null)),f?(h!==void 0&&(y.className=YP(y.className,h)),p!==void 0&&(y.style=G1(y.style,p)),y):Cr}const uY=Symbol.for("react.lazy");function cY(e,t,n,r){if(t){if(typeof t=="function")return t(n,r);const i=VP(n,t.props);i.ref=n.ref;let o=t;return(o==null?void 0:o.$$typeof)===uY&&(o=C.Children.toArray(t)[0]),C.cloneElement(o,i)}if(e&&typeof e=="string")return fY(e,n);throw new Error(An(8))}function fY(e,t){return e==="button"?C.createElement("button",{type:"button",...t,key:t.key}):e==="img"?C.createElement("img",{alt:"",...t,key:t.key}):C.createElement(e,t)}let bl=(function(e){return e.open="data-open",e.closed="data-closed",e[e.startingStyle=nh.startingStyle]="startingStyle",e[e.endingStyle=nh.endingStyle]="endingStyle",e.anchorHidden="data-anchor-hidden",e.side="data-side",e.align="data-align",e})({}),Lg=(function(e){return e.popupOpen="data-popup-open",e.pressed="data-pressed",e})({});const dY={[Lg.popupOpen]:""},hY={[Lg.popupOpen]:"",[Lg.pressed]:""},pY={[bl.open]:""},mY={[bl.closed]:""},gY={[bl.anchorHidden]:""},jS={open(e){return e?dY:null}},yY={open(e){return e?hY:null}},tu={open(e){return e?pY:mY},anchorHidden(e){return e?gY:null}},bY=500,vY={style:{transition:"none"}},LS="data-base-ui-click-trigger",QP={fallbackAxisSide:"end"},xY={clipPath:"inset(50%)",position:"fixed",top:0,left:0};function FS(e){return Jl(e,"base-ui")}function ZP(e,t={}){const n="rootStore"in e?e.rootStore:e,r=n.context.dataRef,{enabled:i=!0,event:o="click",toggle:a=!0,ignoreMouse:u=!1,stickIfOpen:c=!0,touchOpenDelay:f=0,reason:h=ka}=t,p=C.useRef(void 0),m=kS(),y=Ea(),b=C.useMemo(()=>({onPointerDown(v){p.current=v.pointerType},onMouseDown(v){const S=p.current,x=v.nativeEvent,_=n.select("open");if(v.button!==0||o==="click"||zl(S,!0)&&u)return;const k=r.current.openEvent,T=k==null?void 0:k.type,A=n.select("domReferenceElement")!==v.currentTarget,D=_&&A||!(_&&a&&(!(k&&c)||T==="click"||T==="mousedown"));if($y(x.target)){const $=qt(h,x,x.target);D&&S==="touch"&&f>0?y.start(f,()=>{n.setOpen(!0,$)}):n.setOpen(D,$);return}const O=v.currentTarget;m.request(()=>{const $=qt(h,x,O);D&&S==="touch"&&f>0?y.start(f,()=>{n.setOpen(!0,$)}):n.setOpen(D,$)})},onClick(v){if(o==="mousedown-only")return;const S=p.current;if(o==="mousedown"&&S){p.current=void 0;return}if(zl(S,!0)&&u)return;const x=n.select("open"),_=r.current.openEvent,k=n.select("domReferenceElement")!==v.currentTarget,T=x&&k||!(x&&a&&(!(_&&c)||IP(_))),A=qt(h,v.nativeEvent,v.currentTarget);T&&S==="touch"&&f>0?y.start(f,()=>{n.setOpen(!0,A)}):n.setOpen(T,A)},onKeyDown(){p.current=void 0}}),[r,o,u,n,c,a,m,y,f,h]);return C.useMemo(()=>i?{reference:b}:Cr,[i,b])}const wY=C.forwardRef(function(e,t){const{render:n,className:r,disabled:i=!1,nativeButton:o=!0,id:a,payload:u,handle:c,...f}=e,h=Nh(!0),p=(c==null?void 0:c.store)??(h==null?void 0:h.store);if(!p)throw new Error(An(79));const m=FS(a),y=p.useState("floatingRootContext"),b=p.useState("isOpenedByTrigger",m),v=C.useRef(null),{registerTrigger:S,isMountedByThisTrigger:x}=RS(m,v,p,{payload:u}),{getButtonProps:_,buttonRef:k}=WP({disabled:i,native:o}),T=ZP(y,{enabled:y!=null}),A=Ph([T]),D={disabled:i,open:b},O=p.useState("triggerProps",x);return Dr("button",e,{state:D,ref:[k,t,S,v],props:[A.getReferenceProps(),O,{[LS]:"",id:m},f,_],stateAttributesMapping:jS})});function zS(e){return AS(19)?e:e?"true":void 0}const JP=C.createContext(void 0);function SY(){const e=C.useContext(JP);if(e===void 0)throw new Error(An(26));return e}const eN=C.forwardRef(function(e,t){const{cutout:n,...r}=e;let i;if(n){const o=n==null?void 0:n.getBoundingClientRect();i=`polygon(
|
|
302
|
-
0% 0%,
|
|
303
|
-
100% 0%,
|
|
304
|
-
100% 100%,
|
|
305
|
-
0% 100%,
|
|
306
|
-
0% 0%,
|
|
307
|
-
${o.left}px ${o.top}px,
|
|
308
|
-
${o.left}px ${o.bottom}px,
|
|
309
|
-
${o.right}px ${o.bottom}px,
|
|
310
|
-
${o.right}px ${o.top}px,
|
|
311
|
-
${o.left}px ${o.top}px
|
|
312
|
-
)`}return E.jsx("div",{ref:t,role:"presentation","data-base-ui-inert":"",...r,style:{position:"fixed",inset:0,userSelect:"none",WebkitUserSelect:"none",clipPath:i}})}),CY={clipPath:"inset(50%)",overflow:"hidden",whiteSpace:"nowrap",border:0,padding:0,width:1,height:1,margin:-1},BS={...CY,position:"fixed",top:0,left:0},Qo=C.forwardRef(function(e,t){const[n,r]=C.useState();return gt(()=>{wP&&r("button")},[]),E.jsx("span",{...e,ref:t,style:BS,"aria-hidden":n?void 0:!0,tabIndex:0,role:n,"data-base-ui-focus-guard":""})});var EY=["input:not([inert]):not([inert] *)","select:not([inert]):not([inert] *)","textarea:not([inert]):not([inert] *)","a[href]:not([inert]):not([inert] *)","button:not([inert]):not([inert] *)","[tabindex]:not(slot):not([inert]):not([inert] *)","audio[controls]:not([inert]):not([inert] *)","video[controls]:not([inert]):not([inert] *)",'[contenteditable]:not([contenteditable="false"]):not([inert]):not([inert] *)',"details>summary:first-of-type:not([inert]):not([inert] *)","details:not([inert]):not([inert] *)"],Fg=EY.join(","),tN=typeof Element>"u",Fc=tN?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,zg=!tN&&Element.prototype.getRootNode?function(e){var t;return e==null||(t=e.getRootNode)===null||t===void 0?void 0:t.call(e)}:function(e){return e==null?void 0:e.ownerDocument},Bg=function(e,t){var n;t===void 0&&(t=!0);var r=e==null||(n=e.getAttribute)===null||n===void 0?void 0:n.call(e,"inert"),i=r===""||r==="true",o=i||t&&e&&(typeof e.closest=="function"?e.closest("[inert]"):Bg(e.parentNode));return o},kY=function(e){var t,n=e==null||(t=e.getAttribute)===null||t===void 0?void 0:t.call(e,"contenteditable");return n===""||n==="true"},nN=function(e,t,n){if(Bg(e))return[];var r=Array.prototype.slice.apply(e.querySelectorAll(Fg));return t&&Fc.call(e,Fg)&&r.unshift(e),r=r.filter(n),r},Ug=function(e,t,n){for(var r=[],i=Array.from(e);i.length;){var o=i.shift();if(!Bg(o,!1))if(o.tagName==="SLOT"){var a=o.assignedElements(),u=a.length?a:o.children,c=Ug(u,!0,n);n.flatten?r.push.apply(r,c):r.push({scopeParent:o,candidates:c})}else{var f=Fc.call(o,Fg);f&&n.filter(o)&&(t||!e.includes(o))&&r.push(o);var h=o.shadowRoot||typeof n.getShadowRoot=="function"&&n.getShadowRoot(o),p=!Bg(h,!1)&&(!n.shadowRootFilter||n.shadowRootFilter(o));if(h&&p){var m=Ug(h===!0?o.children:h.children,!0,n);n.flatten?r.push.apply(r,m):r.push({scopeParent:o,candidates:m})}else i.unshift.apply(i,o.children)}}return r},rN=function(e){return!isNaN(parseInt(e.getAttribute("tabindex"),10))},iN=function(e){if(!e)throw new Error("No node provided");return e.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(e.tagName)||kY(e))&&!rN(e)?0:e.tabIndex},RY=function(e,t){var n=iN(e);return n<0&&t&&!rN(e)?0:n},_Y=function(e,t){return e.tabIndex===t.tabIndex?e.documentOrder-t.documentOrder:e.tabIndex-t.tabIndex},oN=function(e){return e.tagName==="INPUT"},TY=function(e){return oN(e)&&e.type==="hidden"},AY=function(e){var t=e.tagName==="DETAILS"&&Array.prototype.slice.apply(e.children).some(function(n){return n.tagName==="SUMMARY"});return t},DY=function(e,t){for(var n=0;n<e.length;n++)if(e[n].checked&&e[n].form===t)return e[n]},MY=function(e){if(!e.name)return!0;var t=e.form||zg(e),n=function(o){return t.querySelectorAll('input[type="radio"][name="'+o+'"]')},r;if(typeof window<"u"&&typeof window.CSS<"u"&&typeof window.CSS.escape=="function")r=n(window.CSS.escape(e.name));else try{r=n(e.name)}catch(o){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",o.message),!1}var i=DY(r,e.form);return!i||i===e},OY=function(e){return oN(e)&&e.type==="radio"},$Y=function(e){return OY(e)&&!MY(e)},PY=function(e){var t,n=e&&zg(e),r=(t=n)===null||t===void 0?void 0:t.host,i=!1;if(n&&n!==e){var o,a,u;for(i=!!((o=r)!==null&&o!==void 0&&(a=o.ownerDocument)!==null&&a!==void 0&&a.contains(r)||e!=null&&(u=e.ownerDocument)!==null&&u!==void 0&&u.contains(e));!i&&r;){var c,f,h;n=zg(r),r=(c=n)===null||c===void 0?void 0:c.host,i=!!((f=r)!==null&&f!==void 0&&(h=f.ownerDocument)!==null&&h!==void 0&&h.contains(r))}}return i},YA=function(e){var t=e.getBoundingClientRect(),n=t.width,r=t.height;return n===0&&r===0},NY=function(e,t){var n=t.displayCheck,r=t.getShadowRoot;if(n==="full-native"&&"checkVisibility"in e){var i=e.checkVisibility({checkOpacity:!1,opacityProperty:!1,contentVisibilityAuto:!0,visibilityProperty:!0,checkVisibilityCSS:!0});return!i}if(getComputedStyle(e).visibility==="hidden")return!0;var o=Fc.call(e,"details>summary:first-of-type"),a=o?e.parentElement:e;if(Fc.call(a,"details:not([open]) *"))return!0;if(!n||n==="full"||n==="full-native"||n==="legacy-full"){if(typeof r=="function"){for(var u=e;e;){var c=e.parentElement,f=zg(e);if(c&&!c.shadowRoot&&r(c)===!0)return YA(e);e.assignedSlot?e=e.assignedSlot:!c&&f!==e.ownerDocument?e=f.host:e=c}e=u}if(PY(e))return!e.getClientRects().length;if(n!=="legacy-full")return!0}else if(n==="non-zero-area")return YA(e);return!1},IY=function(e){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(e.tagName))for(var t=e.parentElement;t;){if(t.tagName==="FIELDSET"&&t.disabled){for(var n=0;n<t.children.length;n++){var r=t.children.item(n);if(r.tagName==="LEGEND")return Fc.call(t,"fieldset[disabled] *")?!0:!r.contains(e)}return!0}t=t.parentElement}return!1},Y1=function(e,t){return!(t.disabled||TY(t)||NY(t,e)||AY(t)||IY(t))},W1=function(e,t){return!($Y(t)||iN(t)<0||!Y1(e,t))},jY=function(e){var t=parseInt(e.getAttribute("tabindex"),10);return!!(isNaN(t)||t>=0)},sN=function(e){var t=[],n=[];return e.forEach(function(r,i){var o=!!r.scopeParent,a=o?r.scopeParent:r,u=RY(a,o),c=o?sN(r.candidates):a;u===0?o?t.push.apply(t,c):t.push(a):n.push({documentOrder:i,tabIndex:u,item:r,isScope:o,content:c})}),n.sort(_Y).reduce(function(r,i){return i.isScope?r.push.apply(r,i.content):r.push(i.content),r},[]).concat(t)},jh=function(e,t){t=t||{};var n;return t.getShadowRoot?n=Ug([e],t.includeContainer,{filter:W1.bind(null,t),flatten:!1,getShadowRoot:t.getShadowRoot,shadowRootFilter:jY}):n=nN(e,t.includeContainer,W1.bind(null,t)),sN(n)},LY=function(e,t){t=t||{};var n;return t.getShadowRoot?n=Ug([e],t.includeContainer,{filter:Y1.bind(null,t),flatten:!0,getShadowRoot:t.getShadowRoot}):n=nN(e,t.includeContainer,Y1.bind(null,t)),n},aN=function(e,t){if(t=t||{},!e)throw new Error("No node provided");return Fc.call(e,Fg)===!1?!1:W1(t,e)};const uf=()=>({getShadowRoot:!0,displayCheck:typeof ResizeObserver=="function"&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function lN(e,t){const n=jh(e,uf()),r=n.length;if(r===0)return;const i=Gr(Mt(e)),o=n.indexOf(i),a=o===-1?t===1?0:r-1:o+t;return n[a]}function US(e){return lN(Mt(e).body,1)||e}function uN(e){return lN(Mt(e).body,-1)||e}function cN(e,t){if(!e)return null;const n=jh(Mt(e).body,uf()),r=n.length;if(r===0)return null;const i=n.indexOf(e);if(i===-1)return null;const o=(i+t+r)%r;return n[o]}function FY(e){return cN(e,1)}function zY(e){return cN(e,-1)}function dc(e,t){const n=t||e.currentTarget,r=e.relatedTarget;return!r||!ct(n,r)}function BY(e){jh(e,uf()).forEach(t=>{t.dataset.tabindex=t.getAttribute("tabindex")||"",t.setAttribute("tabindex","-1")})}function WA(e){e.querySelectorAll("[data-tabindex]").forEach(t=>{const n=t.dataset.tabindex;delete t.dataset.tabindex,n?t.setAttribute("tabindex",n):t.removeAttribute("tabindex")})}const fN=C.createContext(null),dN=()=>C.useContext(fN),UY=Lc("portal");function hN(e={}){var b;const{ref:t,container:n,componentProps:r=Cr,elementProps:i}=e,o=Jl(),a=(b=dN())==null?void 0:b.portalNode,[u,c]=C.useState(null),[f,h]=C.useState(null),p=tt(v=>{v!==null&&h(v)}),m=C.useRef(null);gt(()=>{if(n===null){m.current&&(m.current=null,h(null),c(null));return}if(o==null)return;const v=(n&&(CS(n)?n:n.current))??a??document.body;if(v==null){m.current&&(m.current=null,h(null),c(null));return}m.current!==v&&(m.current=v,h(null),c(v))},[n,a,o]);const y=Dr("div",r,{ref:[t,p],props:[{id:o,[UY]:""},i]});return{portalNode:f,portalSubtree:u&&y?yn.createPortal(y,u):null}}const pN=C.forwardRef(function(e,t){const{children:n,container:r,className:i,render:o,renderGuards:a,...u}=e,{portalNode:c,portalSubtree:f}=hN({container:r,ref:t,componentProps:e,elementProps:u}),h=C.useRef(null),p=C.useRef(null),m=C.useRef(null),y=C.useRef(null),[b,v]=C.useState(null),S=b==null?void 0:b.modal,x=b==null?void 0:b.open,_=typeof a=="boolean"?a:!!b&&!b.modal&&b.open&&!!c;C.useEffect(()=>{if(!c||S)return;function T(A){c&&A.relatedTarget&&dc(A)&&(A.type==="focusin"?WA:BY)(c)}return c.addEventListener("focusin",T,!0),c.addEventListener("focusout",T,!0),()=>{c.removeEventListener("focusin",T,!0),c.removeEventListener("focusout",T,!0)}},[c,S]),C.useEffect(()=>{!c||x||WA(c)},[x,c]);const k=C.useMemo(()=>({beforeOutsideRef:h,afterOutsideRef:p,beforeInsideRef:m,afterInsideRef:y,portalNode:c,setFocusManagerState:v}),[c]);return E.jsxs(C.Fragment,{children:[f,E.jsxs(fN.Provider,{value:k,children:[_&&c&&E.jsx(Qo,{"data-type":"outside",ref:h,onFocus:T=>{var A,D;if(dc(T,c))(A=m.current)==null||A.focus();else{const O=b?b.domReference:null;(D=uN(O))==null||D.focus()}}}),_&&c&&E.jsx("span",{"aria-owns":c.id,style:xY}),c&&yn.createPortal(n,c),_&&c&&E.jsx(Qo,{"data-type":"outside",ref:p,onFocus:T=>{var A,D;if(dc(T,c))(A=y.current)==null||A.focus();else{const O=b?b.domReference:null;(D=US(O))==null||D.focus(),b!=null&&b.closeOnFocusOut&&(b==null||b.onOpenChange(!1,qt(rh,T.nativeEvent)))}}})]})]})}),HY=C.forwardRef(function(e,t){const{keepMounted:n=!1,...r}=e,{store:i}=Nh(),o=i.useState("mounted"),a=i.useState("modal"),u=i.useState("open");return o||n?E.jsx(JP.Provider,{value:n,children:E.jsxs(pN,{ref:t,...r,children:[o&&a===!0&&E.jsx(eN,{ref:i.context.internalBackdropRef,inert:zS(!u)}),e.children]})}):null}),GY={...tu,...af},VY=C.forwardRef(function(e,t){const{render:n,className:r,forceRender:i=!1,...o}=e,{store:a}=Nh(),u=a.useState("open"),c=a.useState("nested"),f=a.useState("mounted"),h=a.useState("transitionStatus");return Dr("div",e,{state:{open:u,transitionStatus:h},ref:[a.context.backdropRef,t],stateAttributesMapping:GY,props:[{role:"presentation",hidden:!f,style:{userSelect:"none",WebkitUserSelect:"none"}},o],enabled:i||!c})});let qY=(function(e){return e.nestedDialogs="--nested-dialogs",e})({}),YY=(function(e){return e[e.open=bl.open]="open",e[e.closed=bl.closed]="closed",e[e.startingStyle=bl.startingStyle]="startingStyle",e[e.endingStyle=bl.endingStyle]="endingStyle",e.nested="data-nested",e.nestedDialogOpen="data-nested-dialog-open",e})({});const mN="ArrowUp",gN="ArrowDown",yN="ArrowLeft",bN="ArrowRight",WY="Home",KY=new Set([yN,bN]),XY=new Set([mN,gN]),QY=new Set([...KY,...XY]);[...QY];const vN=new Set([mN,gN,yN,bN,WY,"End"]);function ro(e){const t=fr(ZY,e).current;return t.next=e,gt(t.effect),t}function ZY(e){const t={current:e,next:e,effect:()=>{t.current=t.next}};return t}let KA=0;function tx(e,t={}){const{preventScroll:n=!1,cancelPrevious:r=!0,sync:i=!1}=t;r&&cancelAnimationFrame(KA);const o=()=>e==null?void 0:e.focus({preventScroll:n});i?o():KA=requestAnimationFrame(o)}const hc={inert:new WeakMap,"aria-hidden":new WeakMap,none:new WeakMap};function XA(e){return e==="inert"?hc.inert:e==="aria-hidden"?hc["aria-hidden"]:hc.none}let Em=new WeakSet,km={},nx=0;const xN=e=>e&&(e.host||xN(e.parentNode)),JY=(e,t)=>t.map(n=>{if(e.contains(n))return n;const r=xN(n);return e.contains(r)?r:null}).filter(n=>n!=null);function eW(e,t,n,r){const i="data-base-ui-inert",o=r?"inert":n?"aria-hidden":null,a=JY(t,e),u=new Set,c=new Set(a),f=[];km[i]||(km[i]=new WeakMap);const h=km[i];a.forEach(p),m(t),u.clear();function p(y){!y||u.has(y)||(u.add(y),y.parentNode&&p(y.parentNode))}function m(y){!y||c.has(y)||[].forEach.call(y.children,b=>{if(Ta(b)!=="script")if(u.has(b))m(b);else{const v=o?b.getAttribute(o):null,S=v!==null&&v!=="false",x=XA(o),_=(x.get(b)||0)+1,k=(h.get(b)||0)+1;x.set(b,_),h.set(b,k),f.push(b),_===1&&S&&Em.add(b),k===1&&b.setAttribute(i,""),!S&&o&&b.setAttribute(o,o==="inert"?"":"true")}})}return nx+=1,()=>{f.forEach(y=>{const b=XA(o),v=(b.get(y)||0)-1,S=(h.get(y)||0)-1;b.set(y,v),h.set(y,S),v||(!Em.has(y)&&o&&y.removeAttribute(o),Em.delete(y)),S||y.removeAttribute(i)}),nx-=1,nx||(hc.inert=new WeakMap,hc["aria-hidden"]=new WeakMap,hc.none=new WeakMap,Em=new WeakSet,km={})}}function tW(e,t=!1,n=!1){const r=Mt(e[0]).body;return eW(e.concat(Array.from(r.querySelectorAll("[aria-live]"))),r,t,n)}function nW(e,t){const n=fn(e.target);return e instanceof n.KeyboardEvent?"keyboard":e instanceof n.FocusEvent?t||"keyboard":"pointerType"in e?e.pointerType||"keyboard":"touches"in e?"touch":e instanceof n.MouseEvent?t||(e.detail===0?"keyboard":"mouse"):""}const QA=20;let la=[];function HS(){la=la.filter(e=>{var t;return(t=e.deref())==null?void 0:t.isConnected})}function rW(e){HS(),e&&Ta(e)!=="body"&&(la.push(new WeakRef(e)),la.length>QA&&(la=la.slice(-QA)))}function rx(){var e;return HS(),(e=la[la.length-1])==null?void 0:e.deref()}function iW(e){if(!e)return null;const t=uf();return aN(e,t)?e:jh(e,t)[0]||e}function oW(e){return!e||!e.isConnected?!1:typeof e.checkVisibility=="function"?e.checkVisibility():Zr(e).display!=="none"}function ZA(e,t){var o;if(!t.current.includes("floating")&&!((o=e.getAttribute("role"))!=null&&o.includes("dialog")))return;const n=uf(),r=LY(e,n).filter(a=>{const u=a.getAttribute("data-tabindex")||"";return aN(a,n)||a.hasAttribute("data-tabindex")&&!u.startsWith("-")}),i=e.getAttribute("tabindex");t.current.includes("floating")||r.length===0?i!=="0"&&e.setAttribute("tabindex","0"):(i!=="-1"||e.hasAttribute("data-tabindex")&&e.getAttribute("data-tabindex")!=="-1")&&(e.setAttribute("tabindex","-1"),e.setAttribute("data-tabindex","-1"))}function wN(e){const{context:t,children:n,disabled:r=!1,initialFocus:i=!0,returnFocus:o=!0,restoreFocus:a=!1,modal:u=!0,closeOnFocusOut:c=!0,openInteractionType:f="",nextFocusableElement:h,previousFocusableElement:p,beforeContentFocusGuardRef:m,externalTree:y}=e,b="rootStore"in t?t.rootStore:t,v=b.useState("open"),S=b.useState("domReferenceElement"),x=b.useState("floatingElement"),{events:_,dataRef:k}=b.context,T=tt(()=>{var Z;return(Z=k.current.floatingContext)==null?void 0:Z.nodeId}),A=i===!1,D=HA(S)&&A,O=C.useRef(["content"]),$=ro(i),B=ro(o),j=ro(f),N=lf(y),M=dN(),z=C.useRef(null),G=C.useRef(null),L=C.useRef(!1),F=C.useRef(!1),U=C.useRef(!1),q=C.useRef(-1),W=C.useRef(""),I=C.useRef(""),Y=C.useRef(null),J=C.useRef(null),H=jg(Y,m,M==null?void 0:M.beforeInsideRef),ie=jg(J,M==null?void 0:M.afterInsideRef),re=Ea(),he=Ea(),ve=kS(),Re=M!=null,ce=H1(x),je=tt((Z=ce)=>Z?jh(Z,uf()):[]),We=tt(Z=>{const ne=je(Z);return O.current.map(()=>ne).filter(Boolean).flat()});C.useEffect(()=>{if(r||!u)return;function Z(xe){xe.key==="Tab"&&ct(ce,Gr(Mt(ce)))&&je().length===0&&!D&&pq(xe)}const ne=Mt(ce);return ne.addEventListener("keydown",Z),()=>{ne.removeEventListener("keydown",Z)}},[r,S,ce,u,O,D,je,We]),C.useEffect(()=>{if(r||!v)return;const Z=Mt(ce);function ne(){U.current=!1}function xe(Ce){const le=Vn(Ce),oe=ct(x,le)||ct(S,le)||ct(M==null?void 0:M.portalNode,le);U.current=!oe,I.current=Ce.pointerType||"keyboard",le!=null&&le.closest(`[${LS}]`)&&(F.current=!0)}function ge(){I.current="keyboard"}return Z.addEventListener("pointerdown",xe,!0),Z.addEventListener("pointerup",ne,!0),Z.addEventListener("pointercancel",ne,!0),Z.addEventListener("keydown",ge,!0),()=>{Z.removeEventListener("pointerdown",xe,!0),Z.removeEventListener("pointerup",ne,!0),Z.removeEventListener("pointercancel",ne,!0),Z.removeEventListener("keydown",ge,!0)}},[r,x,S,ce,v,M]),C.useEffect(()=>{if(r||!c)return;const Z=Mt(ce);function ne(){F.current=!0,he.start(0,()=>{F.current=!1})}function xe(me){const ae=Vn(me),Oe=je().indexOf(ae);Oe!==-1&&(q.current=Oe)}function ge(me){const ae=me.relatedTarget,Oe=me.currentTarget,Te=Vn(me);queueMicrotask(()=>{const _e=T(),De=b.context.triggerElements,ue=(ae==null?void 0:ae.hasAttribute(Lc("focus-guard")))&&[Y.current,J.current,M==null?void 0:M.beforeInsideRef.current,M==null?void 0:M.afterInsideRef.current,M==null?void 0:M.beforeOutsideRef.current,M==null?void 0:M.afterOutsideRef.current,Io(p),Io(h)].includes(ae),Se=!(ct(S,ae)||ct(x,ae)||ct(ae,x)||ct(M==null?void 0:M.portalNode,ae)||ae!=null&&De.hasElement(ae)||De.hasMatchingElement(ke=>ct(ke,ae))||ue||N&&(Nl(N.nodesRef.current,_e).find(ke=>{var Pe,Le;return ct((Pe=ke.context)==null?void 0:Pe.elements.floating,ae)||ct((Le=ke.context)==null?void 0:Le.elements.domReference,ae)})||GA(N.nodesRef.current,_e).find(ke=>{var Pe,Le,st;return[(Pe=ke.context)==null?void 0:Pe.elements.floating,H1((Le=ke.context)==null?void 0:Le.elements.floating)].includes(ae)||((st=ke.context)==null?void 0:st.elements.domReference)===ae})));if(Oe===S&&ce&&ZA(ce,O),a&&Oe!==S&&!oW(Te)&&Gr(Z)===Z.body){if(gn(ce)&&(ce.focus(),a==="popup")){ve.request(()=>{ce.focus()});return}const ke=q.current,Pe=je(),Le=Pe[ke]||Pe[Pe.length-1]||ce;gn(Le)&&Le.focus()}if(k.current.insideReactTree){k.current.insideReactTree=!1;return}(D||!u)&&ae&&Se&&!F.current&&(D||ae!==rx())&&(L.current=!0,b.setOpen(!1,qt(rh,me)))})}function Ce(){U.current||(k.current.insideReactTree=!0,re.start(0,()=>{k.current.insideReactTree=!1}))}const le=gn(S)?S:null,oe=[];if(!(!x&&!le))return le&&(le.addEventListener("focusout",ge),le.addEventListener("pointerdown",ne),oe.push(()=>{le.removeEventListener("focusout",ge),le.removeEventListener("pointerdown",ne)})),x&&(x.addEventListener("focusin",xe),x.addEventListener("focusout",ge),M&&(x.addEventListener("focusout",Ce,!0),oe.push(()=>{x.removeEventListener("focusout",Ce,!0)})),oe.push(()=>{x.removeEventListener("focusin",xe),x.removeEventListener("focusout",ge)})),()=>{oe.forEach(me=>{me()})}},[r,S,x,ce,u,N,M,b,c,a,je,D,T,O,k,re,he,ve,h,p]),C.useEffect(()=>{var ge,Ce,le;if(r||!x||!v)return;const Z=Array.from(((ge=M==null?void 0:M.portalNode)==null?void 0:ge.querySelectorAll(`[${Lc("portal")}]`))||[]),ne=(le=(Ce=(N?GA(N.nodesRef.current,T()):[]).find(oe=>{var me;return HA(((me=oe.context)==null?void 0:me.elements.domReference)||null)}))==null?void 0:Ce.context)==null?void 0:le.elements.domReference,xe=[x,ne,...Z,z.current,G.current,Y.current,J.current,M==null?void 0:M.beforeOutsideRef.current,M==null?void 0:M.afterOutsideRef.current,Io(p),Io(h),D?S:null].filter(oe=>oe!=null);return tW(xe,u||D)},[v,r,S,x,u,O,M,D,N,T,h,p]),gt(()=>{if(!v||r||!gn(ce))return;const Z=Mt(ce),ne=Gr(Z);queueMicrotask(()=>{const xe=We(ce),ge=$.current,Ce=typeof ge=="function"?ge(j.current||""):ge;if(Ce===void 0||Ce===!1)return;let le;Ce===!0||Ce===null?le=xe[0]||ce:le=Io(Ce),le=le||xe[0]||ce,!ct(ce,ne)&&tx(le,{preventScroll:le===ce})})},[r,v,ce,A,We,$,j]),gt(()=>{if(r||!ce)return;const Z=Mt(ce),ne=Gr(Z);rW(ne);function xe(le){if(le.open||(W.current=nW(le.nativeEvent,I.current)),le.reason===Xn&&le.nativeEvent.type==="mouseleave"&&(L.current=!0),le.reason===HP)if(le.nested)L.current=!1;else if(gq(le.nativeEvent)||yq(le.nativeEvent))L.current=!1;else{let oe=!1;document.createElement("div").focus({get preventScroll(){return oe=!0,!1}}),oe?L.current=!1:L.current=!0}}_.on("openchange",xe);const ge=Z.createElement("span");ge.setAttribute("tabindex","-1"),ge.setAttribute("aria-hidden","true"),Object.assign(ge.style,BS),Re&&S&&S.insertAdjacentElement("afterend",ge);function Ce(){const le=B.current;let oe=typeof le=="function"?le(W.current):le;if(oe===void 0||oe===!1)return null;if(oe===null&&(oe=!0),typeof oe=="boolean"){const ae=S||rx();return ae&&ae.isConnected?ae:ge}const me=S||rx()||ge;return Io(oe)||me}return()=>{_.off("openchange",xe);const le=Gr(Z),oe=ct(x,le)||N&&Nl(N.nodesRef.current,T(),!1).some(ae=>{var Oe;return ct((Oe=ae.context)==null?void 0:Oe.elements.floating,le)}),me=Ce();queueMicrotask(()=>{const ae=iW(me),Oe=typeof B.current!="boolean";B.current&&!L.current&&gn(ae)&&(!(!Oe&&ae!==le&&le!==Z.body)||oe)&&ae.focus({preventScroll:!0}),ge.remove(),L.current=!1})}},[r,x,ce,B,k,_,N,Re,S,T]),gt(()=>{if(!vP||v||!x)return;const Z=Gr(Mt(x));!gn(Z)||!$y(Z)||ct(x,Z)&&Z.blur()},[v,x]),gt(()=>{if(!(r||!M))return M.setFocusManagerState({modal:u,closeOnFocusOut:c,open:v,onOpenChange:b.setOpen,domReference:S}),()=>{M.setFocusManagerState(null)}},[r,M,u,v,b,c,S]),gt(()=>{if(!(r||!ce))return ZA(ce,O),()=>{queueMicrotask(HS)}},[r,ce,O]);const X=!r&&(u?!D:!0)&&(Re||u);return E.jsxs(C.Fragment,{children:[X&&E.jsx(Qo,{"data-type":"inside",ref:H,onFocus:Z=>{var ne,xe;if(u){const ge=We();tx(ge[ge.length-1])}else M!=null&&M.portalNode&&(L.current=!1,dc(Z,M.portalNode)?(ne=US(S))==null||ne.focus():(xe=Io(p??M.beforeOutsideRef))==null||xe.focus())}}),n,X&&E.jsx(Qo,{"data-type":"inside",ref:ie,onFocus:Z=>{var ne,xe;u?tx(We()[0]):M!=null&&M.portalNode&&(c&&(L.current=!0),dc(Z,M.portalNode)?(ne=uN(S))==null||ne.focus():(xe=Io(h??M.afterOutsideRef))==null||xe.focus())}})]})}const sW={...tu,...af,nestedDialogOpen(e){return e?{[YY.nestedDialogOpen]:""}:null}},aW=C.forwardRef(function(e,t){const{className:n,finalFocus:r,initialFocus:i,render:o,...a}=e,{store:u}=Nh(),c=u.useState("descriptionElementId"),f=u.useState("disablePointerDismissal"),h=u.useState("floatingRootContext"),p=u.useState("popupProps"),m=u.useState("modal"),y=u.useState("mounted"),b=u.useState("nested"),v=u.useState("nestedOpenDialogCount"),S=u.useState("open"),x=u.useState("openMethod"),_=u.useState("titleElementId"),k=u.useState("transitionStatus"),T=u.useState("role");SY(),Oh({open:S,ref:u.context.popupRef,onComplete(){var B,j;S&&((j=(B=u.context).onOpenChangeComplete)==null||j.call(B,!0))}});function A(B){return B==="touch"?u.context.popupRef.current:!0}const D=i===void 0?A:i,O=v>0,$=Dr("div",e,{state:{open:S,nested:b,transitionStatus:k,nestedDialogOpen:O},props:[p,{"aria-labelledby":_??void 0,"aria-describedby":c??void 0,role:T,tabIndex:-1,hidden:!y,onKeyDown(B){vN.has(B.key)&&B.stopPropagation()},style:{[qY.nestedDialogs]:v}},a],ref:[t,u.context.popupRef,u.useStateSetter("popupElement")],stateAttributesMapping:sW});return E.jsx(wN,{context:h,openInteractionType:x,disabled:!y,closeOnFocusOut:!f,initialFocus:D,returnFocus:r,modal:m!==!1,restoreFocus:"popup",children:$})}),SN=C.createContext(void 0);function cf(e){const t=C.useContext(SN);if(t===void 0&&!e)throw new Error(An(47));return t}function lW(){return{...NS(),disabled:!1,modal:!1,instantType:void 0,openMethod:null,openChangeReason:null,titleElementId:void 0,descriptionElementId:void 0,stickIfOpen:!0,nested:!1,openOnHover:!1,closeDelay:0,hasViewport:!1}}const uW={...IS,disabled:Ke(e=>e.disabled),instantType:Ke(e=>e.instantType),openMethod:Ke(e=>e.openMethod),openChangeReason:Ke(e=>e.openChangeReason),modal:Ke(e=>e.modal),stickIfOpen:Ke(e=>e.stickIfOpen),titleElementId:Ke(e=>e.titleElementId),descriptionElementId:Ke(e=>e.descriptionElementId),openOnHover:Ke(e=>e.openOnHover),closeDelay:Ke(e=>e.closeDelay),hasViewport:Ke(e=>e.hasViewport)};let cW=class CN extends $h{constructor(n){const r={...lW(),...n};r.open&&(n==null?void 0:n.mounted)===void 0&&(r.mounted=!0);super(r,{popupRef:C.createRef(),backdropRef:C.createRef(),internalBackdropRef:C.createRef(),onOpenChange:void 0,onOpenChangeComplete:void 0,triggerFocusTargetRef:C.createRef(),beforeContentFocusGuardRef:C.createRef(),stickIfOpenTimeout:new Bi,triggerElements:new Ih},uW);te(this,"setOpen",(n,r)=>{var f,h,p;const i=r.reason===Xn,o=r.reason===ka&&r.event.detail===0,a=!n&&(r.reason===Py||r.reason==null);if(r.preventUnmountOnClose=()=>{this.set("preventUnmountingOnClose",!0)},(h=(f=this.context).onOpenChange)==null||h.call(f,n,r),r.isCanceled)return;const u={open:n,nativeEvent:r.event,reason:r.reason,nested:this.state.nested,triggerElement:r.trigger};(p=this.state.floatingRootContext.context.events)==null||p.emit("openchange",u);const c=()=>{var b;const m={open:n,openChangeReason:r.reason},y=((b=r.trigger)==null?void 0:b.id)??null;(y||n)&&(m.activeTriggerId=y,m.activeTriggerElement=r.trigger??null),this.update(m)};i?(this.set("stickIfOpen",!0),this.context.stickIfOpenTimeout.start(bY,()=>{this.set("stickIfOpen",!1)}),yn.flushSync(c)):c(),o||a?this.set("instantType",o?"click":"dismiss"):r.reason===rh?this.set("instantType","focus"):this.set("instantType",void 0)});te(this,"disposeEffect",()=>this.context.stickIfOpenTimeout.disposeEffect())}static useStore(n,r){const i=fr(()=>new CN(r)).current,o=n??i;return Mh(i.disposeEffect),o}};function JA({props:e}){const{children:t,open:n,defaultOpen:r=!1,onOpenChange:i,onOpenChangeComplete:o,modal:a=!1,handle:u,triggerId:c,defaultTriggerId:f=null}=e,h=cW.useStore(u==null?void 0:u.store,{modal:a,open:r,openProp:n,activeTriggerId:f,triggerIdProp:c});SS(()=>{n===void 0&&h.state.open===!1&&r===!0&&h.update({open:!0,activeTriggerId:f})}),h.useControlledProp("openProp",n),h.useControlledProp("triggerIdProp",c);const p=h.useState("open"),m=h.useState("positionerElement"),y=h.useState("payload"),b=h.useState("openChangeReason");h.useContextCallback("onOpenChange",i),h.useContextCallback("onOpenChangeComplete",o);const{openMethod:v,triggerProps:S,reset:x}=_P(p);_S(h);const{forceUnmount:_}=TS(p,h,()=>{h.update({stickIfOpen:!0,openChangeReason:null}),x()});RP(p&&a===!0&&b!==Xn&&v!=="touch",m),C.useEffect(()=>{p||h.context.stickIfOpenTimeout.clear()},[h,p]);const k=C.useCallback(L=>{const F=qt(L);return F.preventUnmountOnClose=()=>{h.set("preventUnmountingOnClose",!0)},F},[h]),T=C.useCallback(()=>{h.setOpen(!1,k($S))},[h,k]);C.useImperativeHandle(e.actionsRef,()=>({unmount:_,close:T}),[_,T]);const A=MS({popupStore:h,onOpenChange:h.setOpen}),D=PS(A,{outsidePressEvent:{mouse:a==="trap-focus"?"sloppy":"intentional",touch:"sloppy"}}),O=UP(A),{getReferenceProps:$,getFloatingProps:B,getTriggerProps:j}=Ph([D,O]),N=C.useMemo(()=>$(S),[$,S]),M=C.useMemo(()=>j(S),[j,S]),z=C.useMemo(()=>B(),[B]);h.useSyncedValues({modal:a,openMethod:v,activeTriggerProps:N,inactiveTriggerProps:M,popupProps:z,floatingRootContext:A,nested:eu()!=null});const G=C.useMemo(()=>({store:h}),[h]);return E.jsx(SN.Provider,{value:G,children:typeof t=="function"?t({payload:y}):t})}function fW(e){return cf(!0)?E.jsx(JA,{props:e}):E.jsx(ZV,{children:E.jsx(JA,{props:e})})}const EN=({children:e,...t})=>E.jsx(fW,{"data-slot":"popover-root",...t,children:e});EN.displayName="PopoverRoot";const dW=300;function cg(e,t,n){if(n&&!zl(n))return 0;if(typeof e=="number")return e;if(typeof e=="function"){const r=e();return typeof r=="number"?r:r==null?void 0:r[t]}return e==null?void 0:e[t]}const K1=Lc("safe-polygon"),hW=`button,a,[role="button"],select,[tabindex]:not([tabindex="-1"]),${BP}`;function pW(e){return e?!!e.closest(hW):!1}let mW=class kN{constructor(){te(this,"dispose",()=>{this.openChangeTimeout.clear(),this.restTimeout.clear()});te(this,"disposeEffect",()=>this.dispose);this.pointerType=void 0,this.interactedInside=!1,this.handler=void 0,this.blockMouseMove=!0,this.performedPointerEventsMutation=!1,this.unbindMouseMove=()=>{},this.restTimeoutPending=!1,this.openChangeTimeout=new Bi,this.restTimeout=new Bi,this.handleCloseOptions=void 0}static create(){return new kN}};function RN(e){const t=fr(mW.create).current,n=e.context.dataRef.current;return n.hoverInteractionState||(n.hoverInteractionState=t),Mh(n.hoverInteractionState.disposeEffect),n.hoverInteractionState}function ix(e){return typeof e=="function"?e():e}const gW={current:null};function _N(e,t={}){var j;const n="rootStore"in e?e.rootStore:e,{dataRef:r,events:i}=n.context,{enabled:o=!0,delay:a=0,handleClose:u=null,mouseOnly:c=!1,restMs:f=0,move:h=!0,triggerElementRef:p=gW,externalTree:m,isActiveTrigger:y=!0}=t,b=lf(m),v=RN(n),S=ro(u),x=ro(a),_=ro(f),k=ro(o);y&&(v.handleCloseOptions=(j=S.current)==null?void 0:j.__options);const T=tt(()=>v.interactedInside?!0:r.current.openEvent?["click","mousedown"].includes(r.current.openEvent.type):!1),A=tt(N=>Ng(N,n.context.triggerElements)),D=C.useCallback((N,M=!0)=>{const z=cg(x.current,"close",v.pointerType);z&&!v.handler?v.openChangeTimeout.start(z,()=>n.setOpen(!1,qt(Xn,N))):M&&(v.openChangeTimeout.clear(),n.setOpen(!1,qt(Xn,N)))},[x,n,v]),O=tt(()=>{v.unbindMouseMove(),v.handler=void 0}),$=tt(()=>{if(v.performedPointerEventsMutation){const N=Mt(n.select("domReferenceElement")).body;N.style.pointerEvents="",N.removeAttribute(K1),v.performedPointerEventsMutation=!1}});C.useEffect(()=>{if(!o)return;function N(M){M.open||(v.openChangeTimeout.clear(),v.restTimeout.clear(),v.blockMouseMove=!0,v.restTimeoutPending=!1)}return i.on("openchange",N),()=>{i.off("openchange",N)}},[o,i,v]);const B=tt(N=>{var z;if(T()||!r.current.floatingContext||A(N.relatedTarget))return;const M=p.current;(z=S.current)==null||z.call(S,{...r.current.floatingContext,tree:b,x:N.clientX,y:N.clientY,onClose(){$(),O(),!T()&&M===n.select("domReferenceElement")&&D(N)}})(N)});return C.useEffect(()=>{if(!o)return;const N=p.current??(y?n.select("domReferenceElement"):null);if(!Nt(N))return;function M(L){if(v.openChangeTimeout.clear(),v.blockMouseMove=!1,c&&!zl(v.pointerType)||ix(_.current)>0&&!cg(x.current,"open"))return;const F=cg(x.current,"open",v.pointerType),U=n.select("domReferenceElement"),q=n.context.triggerElements,W=(q.hasElement(L.target)||q.hasMatchingElement(H=>ct(H,L.target)))&&(!U||!ct(U,L.target)),I=L.currentTarget??null,Y=n.select("open"),J=!Y||W;W&&Y?n.setOpen(!0,qt(Xn,L,I)):F?v.openChangeTimeout.start(F,()=>{J&&n.setOpen(!0,qt(Xn,L,I))}):J&&n.setOpen(!0,qt(Xn,L,I))}function z(L){if(T()){$();return}v.unbindMouseMove();const F=n.select("domReferenceElement"),U=Mt(F);if(v.restTimeout.clear(),v.restTimeoutPending=!1,!A(L.relatedTarget)){if(S.current&&r.current.floatingContext){n.select("open")||v.openChangeTimeout.clear();const q=p.current;v.handler=S.current({...r.current.floatingContext,tree:b,x:L.clientX,y:L.clientY,onClose(){$(),O(),k.current&&!T()&&q===n.select("domReferenceElement")&&D(L,!0)}});const W=v.handler;W(L),U.addEventListener("mousemove",W),v.unbindMouseMove=()=>{U.removeEventListener("mousemove",W)};return}(v.pointerType!=="touch"||!ct(n.select("floatingElement"),L.relatedTarget))&&D(L)}}function G(L){B(L)}return n.select("open")&&N.addEventListener("mouseleave",G),h&&N.addEventListener("mousemove",M,{once:!0}),N.addEventListener("mouseenter",M),N.addEventListener("mouseleave",z),()=>{N.removeEventListener("mouseleave",G),h&&N.removeEventListener("mousemove",M),N.removeEventListener("mouseenter",M),N.removeEventListener("mouseleave",z)}},[O,$,r,x,D,n,o,S,B,v,y,T,A,c,h,_,p,b,k]),C.useMemo(()=>{if(!o)return;function N(M){v.pointerType=M.pointerType}return{onPointerDown:N,onPointerEnter:N,onMouseMove(M){const{nativeEvent:z}=M,G=M.currentTarget,L=n.select("domReferenceElement"),F=n.context.triggerElements,U=n.select("open"),q=(F.hasElement(M.target)||F.hasMatchingElement(I=>ct(I,M.target)))&&(!L||!ct(L,M.target));if(c&&!zl(v.pointerType)||U&&!q||ix(_.current)===0||!q&&v.restTimeoutPending&&M.movementX**2+M.movementY**2<2)return;v.restTimeout.clear();function W(){if(v.restTimeoutPending=!1,T())return;const I=n.select("open");!v.blockMouseMove&&(!I||q)&&n.setOpen(!0,qt(Xn,z,G))}v.pointerType==="touch"?yn.flushSync(()=>{W()}):q&&U?W():(v.restTimeoutPending=!0,v.restTimeout.start(ix(_.current),W))}}},[o,v,T,c,n,_])}function eD(e,t){const[n,r]=e;let i=!1;const o=t.length;for(let a=0,u=o-1;a<o;u=a++){const[c,f]=t[a]||[0,0],[h,p]=t[u]||[0,0];f>=r!=p>=r&&n<=(h-c)*(r-f)/(p-f)+c&&(i=!i)}return i}function yW(e,t){return e[0]>=t.x&&e[0]<=t.x+t.width&&e[1]>=t.y&&e[1]<=t.y+t.height}function TN(e={}){const{buffer:t=.5,blockPointerEvents:n=!1,requireIntent:r=!0}=e,i=new Bi;let o=!1,a=null,u=null,c=typeof performance<"u"?performance.now():0;function f(p,m){const y=performance.now(),b=y-c;if(a===null||u===null||b===0)return a=p,u=m,c=y,null;const v=p-a,S=m-u,x=Math.sqrt(v*v+S*S)/b;return a=p,u=m,c=y,x}const h=({x:p,y:m,placement:y,elements:b,onClose:v,nodeId:S,tree:x})=>function(_){function k(){i.clear(),v()}if(i.clear(),!b.domReference||!b.floating||y==null||p==null||m==null)return;const{clientX:T,clientY:A}=_,D=[T,A],O=Vn(_),$=_.type==="mouseleave",B=ct(b.floating,O),j=ct(b.domReference,O),N=b.domReference.getBoundingClientRect(),M=b.floating.getBoundingClientRect(),z=y.split("-")[0],G=p>M.right-M.width/2,L=m>M.bottom-M.height/2,F=yW(D,N),U=M.width>N.width,q=M.height>N.height,W=(U?N:M).left,I=(U?N:M).right,Y=(q?N:M).top,J=(q?N:M).bottom;if(B&&(o=!0,!$))return;if(j&&(o=!1),j&&!$){o=!0;return}if($&&Nt(_.relatedTarget)&&ct(b.floating,_.relatedTarget)||x&&Nl(x.nodesRef.current,S).some(({context:re})=>re==null?void 0:re.open))return;if(z==="top"&&m>=N.bottom-1||z==="bottom"&&m<=N.top+1||z==="left"&&p>=N.right-1||z==="right"&&p<=N.left+1)return k();let H=[];switch(z){case"top":H=[[W,N.top+1],[W,M.bottom-1],[I,M.bottom-1],[I,N.top+1]];break;case"bottom":H=[[W,M.top+1],[W,N.bottom-1],[I,N.bottom-1],[I,M.top+1]];break;case"left":H=[[M.right-1,J],[M.right-1,Y],[N.left+1,Y],[N.left+1,J]];break;case"right":H=[[N.right-1,J],[N.right-1,Y],[M.left+1,Y],[M.left+1,J]];break}function ie([re,he]){switch(z){case"top":{const ve=[U?re+t/2:G?re+t*4:re-t*4,he+t+1],Re=[U?re-t/2:G?re+t*4:re-t*4,he+t+1],ce=[[M.left,G||U?M.bottom-t:M.top],[M.right,G?U?M.bottom-t:M.top:M.bottom-t]];return[ve,Re,...ce]}case"bottom":{const ve=[U?re+t/2:G?re+t*4:re-t*4,he-t],Re=[U?re-t/2:G?re+t*4:re-t*4,he-t],ce=[[M.left,G||U?M.top+t:M.bottom],[M.right,G?U?M.top+t:M.bottom:M.top+t]];return[ve,Re,...ce]}case"left":{const ve=[re+t+1,q?he+t/2:L?he+t*4:he-t*4],Re=[re+t+1,q?he-t/2:L?he+t*4:he-t*4];return[[L||q?M.right-t:M.left,M.top],[L?q?M.right-t:M.left:M.right-t,M.bottom],ve,Re]}case"right":{const ve=[re-t,q?he+t/2:L?he+t*4:he-t*4],Re=[re-t,q?he-t/2:L?he+t*4:he-t*4],ce=[[L||q?M.left+t:M.right,M.top],[L?q?M.left+t:M.right:M.left+t,M.bottom]];return[ve,Re,...ce]}default:return[]}}if(!eD([T,A],H)){if(o&&!F)return k();if(!$&&r){const re=f(_.clientX,_.clientY);if(re!==null&&re<.1)return k()}eD([T,A],ie([p,m]))?!o&&r&&i.start(40,k):k()}};return h.__options={blockPointerEvents:n},h}const bW=C.forwardRef(function(e,t){const{render:n,className:r,disabled:i=!1,nativeButton:o=!0,handle:a,payload:u,openOnHover:c=!1,delay:f=dW,closeDelay:h=0,id:p,...m}=e,y=cf(!0),b=(a==null?void 0:a.store)??(y==null?void 0:y.store);if(!b)throw new Error(An(74));const v=FS(p),S=b.useState("isTriggerActive",v),x=b.useState("floatingRootContext"),_=b.useState("isOpenedByTrigger",v),k=C.useRef(null),{registerTrigger:T,isMountedByThisTrigger:A}=RS(v,k,b,{payload:u,disabled:i,openOnHover:c,closeDelay:h}),D=b.useState("openChangeReason"),O=b.useState("stickIfOpen"),$=b.useState("openMethod"),B=_N(x,{enabled:x!=null&&c&&($!=="touch"||D!==ka),mouseOnly:!0,move:!1,handleClose:TN(),restMs:f,delay:{close:h},triggerElementRef:k,isActiveTrigger:S}),j=ZP(x,{enabled:x!=null,stickIfOpen:O}),N=Ph([j]),M=b.useState("triggerProps",A),z={disabled:i,open:_},{getButtonProps:G,buttonRef:L}=WP({disabled:i,native:o}),F=C.useMemo(()=>({open(Y){return Y&&D===ka?yY.open(Y):jS.open(Y)}}),[D]),U=Dr("button",e,{state:z,ref:[L,t,T,k],props:[N.getReferenceProps(),B,M,{[LS]:"",id:v},m,G],stateAttributesMapping:F}),q=C.useRef(null),W=tt(Y=>{var J;yn.flushSync(()=>{b.setOpen(!1,qt(rh,Y.nativeEvent,Y.currentTarget))}),(J=zY(q.current))==null||J.focus()}),I=tt(Y=>{var H;const J=b.select("positionerElement");if(J&&dc(Y,J))(H=b.context.beforeContentFocusGuardRef.current)==null||H.focus();else{yn.flushSync(()=>{b.setOpen(!1,qt(rh,Y.nativeEvent,Y.currentTarget))});let ie=FY(b.context.triggerFocusTargetRef.current||k.current);for(;ie!==null&&ct(J,ie);){const re=ie;if(ie=US(ie),ie===re)break}ie==null||ie.focus()}});return S?E.jsxs(C.Fragment,{children:[E.jsx(Qo,{ref:q,onFocus:W}),E.jsx(C.Fragment,{children:U},v),E.jsx(Qo,{ref:b.context.triggerFocusTargetRef,onFocus:I})]}):E.jsx(C.Fragment,{children:U},v)}),AN=({children:e,...t})=>{const n=C.isValidElement(e);return E.jsx(bW,{"data-slot":"popover-trigger",nativeButton:n,render:n?e:E.jsx("span",{role:"button",tabIndex:0,children:e}),...t})};AN.displayName="PopoverTrigger";const DN=C.createContext(void 0);function vW(){const e=C.useContext(DN);if(e===void 0)throw new Error(An(45));return e}const xW=C.forwardRef(function(e,t){const{keepMounted:n=!1,...r}=e,{store:i}=cf();return i.useState("mounted")||n?E.jsx(DN.Provider,{value:n,children:E.jsx(pN,{ref:t,...r})}):null}),MN=({children:e,...t})=>E.jsx(xW,{"data-slot":"popover-portal",...t,children:e});MN.displayName="PopoverPortal";const wW={...tu,...af},SW=C.forwardRef(function(e,t){const{className:n,render:r,...i}=e,{store:o}=cf(),a=o.useState("open"),u=o.useState("mounted"),c=o.useState("transitionStatus"),f=o.useState("openChangeReason");return Dr("div",e,{state:{open:a,transitionStatus:c},ref:[o.context.backdropRef,t],props:[{role:"presentation",hidden:!u,style:{pointerEvents:f===Xn?"none":void 0,userSelect:"none",WebkitUserSelect:"none"}},i],stateAttributesMapping:wW})}),ON=({...e})=>E.jsx(SW,{"data-slot":"popover-backdrop",...e});ON.displayName="PopoverBackdrop";const $N=C.createContext(void 0);function CW(){const e=C.useContext($N);if(!e)throw new Error(An(46));return e}const EW=["top","right","bottom","left"],zc=Math.min,Vr=Math.max,Hg=Math.round,Rm=Math.floor,io=e=>({x:e,y:e}),kW={left:"right",right:"left",bottom:"top",top:"bottom"},RW={start:"end",end:"start"};function X1(e,t,n){return Vr(e,zc(t,n))}function ns(e,t){return typeof e=="function"?e(t):e}function Rr(e){return e.split("-")[0]}function Da(e){return e.split("-")[1]}function GS(e){return e==="x"?"y":"x"}function VS(e){return e==="y"?"height":"width"}const _W=new Set(["top","bottom"]);function xi(e){return _W.has(Rr(e))?"y":"x"}function qS(e){return GS(xi(e))}function TW(e,t,n){n===void 0&&(n=!1);const r=Da(e),i=qS(e),o=VS(i);let a=i==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[o]>t.floating[o]&&(a=Gg(a)),[a,Gg(a)]}function AW(e){const t=Gg(e);return[Q1(e),t,Q1(t)]}function Q1(e){return e.replace(/start|end/g,t=>RW[t])}const tD=["left","right"],nD=["right","left"],DW=["top","bottom"],MW=["bottom","top"];function OW(e,t,n){switch(e){case"top":case"bottom":return n?t?nD:tD:t?tD:nD;case"left":case"right":return t?DW:MW;default:return[]}}function $W(e,t,n,r){const i=Da(e);let o=OW(Rr(e),n==="start",r);return i&&(o=o.map(a=>a+"-"+i),t&&(o=o.concat(o.map(Q1)))),o}function Gg(e){return e.replace(/left|right|bottom|top/g,t=>kW[t])}function PW(e){return{top:0,right:0,bottom:0,left:0,...e}}function PN(e){return typeof e!="number"?PW(e):{top:e,right:e,bottom:e,left:e}}function Vg(e){const{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}}const NW=C.createContext(void 0);function IW(){var e;return((e=C.useContext(NW))==null?void 0:e.direction)??"ltr"}const jW=e=>({name:"arrow",options:e,async fn(t){var W,I;const{x:n,y:r,placement:i,rects:o,platform:a,elements:u,middlewareData:c}=t,{element:f,padding:h=0,offsetParent:p="real"}=ns(e,t)||{};if(f==null)return{};const m=PN(h),y={x:n,y:r},b=qS(i),v=VS(b),S=await a.getDimensions(f),x=b==="y",_=x?"top":"left",k=x?"bottom":"right",T=x?"clientHeight":"clientWidth",A=o.reference[v]+o.reference[b]-y[b]-o.floating[v],D=y[b]-o.reference[b],O=p==="real"?await((W=a.getOffsetParent)==null?void 0:W.call(a,f)):u.floating;let $=u.floating[T]||o.floating[v];(!$||!await((I=a.isElement)==null?void 0:I.call(a,O)))&&($=u.floating[T]||o.floating[v]);const B=A/2-D/2,j=$/2-S[v]/2-1,N=Math.min(m[_],j),M=Math.min(m[k],j),z=N,G=$-S[v]-M,L=$/2-S[v]/2+B,F=X1(z,L,G),U=!c.arrow&&Da(i)!=null&&L!==F&&o.reference[v]/2-(L<z?N:M)-S[v]/2<0,q=U?L<z?L-z:L-G:0;return{[b]:y[b]+q,data:{[b]:F,centerOffset:L-F-q,...U&&{alignmentOffset:q}},reset:U}}}),LW=(e,t)=>({...jW(e),options:[e,t]});function rD(e,t,n){let{reference:r,floating:i}=e;const o=xi(t),a=qS(t),u=VS(a),c=Rr(t),f=o==="y",h=r.x+r.width/2-i.width/2,p=r.y+r.height/2-i.height/2,m=r[u]/2-i[u]/2;let y;switch(c){case"top":y={x:h,y:r.y-i.height};break;case"bottom":y={x:h,y:r.y+r.height};break;case"right":y={x:r.x+r.width,y:p};break;case"left":y={x:r.x-i.width,y:p};break;default:y={x:r.x,y:r.y}}switch(Da(t)){case"start":y[a]-=m*(n&&f?-1:1);break;case"end":y[a]+=m*(n&&f?-1:1);break}return y}async function FW(e,t){var n;t===void 0&&(t={});const{x:r,y:i,platform:o,rects:a,elements:u,strategy:c}=e,{boundary:f="clippingAncestors",rootBoundary:h="viewport",elementContext:p="floating",altBoundary:m=!1,padding:y=0}=ns(t,e),b=PN(y),v=u[m?p==="floating"?"reference":"floating":p],S=Vg(await o.getClippingRect({element:(n=await(o.isElement==null?void 0:o.isElement(v)))==null||n?v:v.contextElement||await(o.getDocumentElement==null?void 0:o.getDocumentElement(u.floating)),boundary:f,rootBoundary:h,strategy:c})),x=p==="floating"?{x:r,y:i,width:a.floating.width,height:a.floating.height}:a.reference,_=await(o.getOffsetParent==null?void 0:o.getOffsetParent(u.floating)),k=await(o.isElement==null?void 0:o.isElement(_))?await(o.getScale==null?void 0:o.getScale(_))||{x:1,y:1}:{x:1,y:1},T=Vg(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:u,rect:x,offsetParent:_,strategy:c}):x);return{top:(S.top-T.top+b.top)/k.y,bottom:(T.bottom-S.bottom+b.bottom)/k.y,left:(S.left-T.left+b.left)/k.x,right:(T.right-S.right+b.right)/k.x}}const zW=async(e,t,n)=>{const{placement:r="bottom",strategy:i="absolute",middleware:o=[],platform:a}=n,u=o.filter(Boolean),c=await(a.isRTL==null?void 0:a.isRTL(t));let f=await a.getElementRects({reference:e,floating:t,strategy:i}),{x:h,y:p}=rD(f,r,c),m=r,y={},b=0;for(let S=0;S<u.length;S++){var v;const{name:x,fn:_}=u[S],{x:k,y:T,data:A,reset:D}=await _({x:h,y:p,initialPlacement:r,placement:m,strategy:i,middlewareData:y,rects:f,platform:{...a,detectOverflow:(v=a.detectOverflow)!=null?v:FW},elements:{reference:e,floating:t}});h=k??h,p=T??p,y={...y,[x]:{...y[x],...A}},D&&b<=50&&(b++,typeof D=="object"&&(D.placement&&(m=D.placement),D.rects&&(f=D.rects===!0?await a.getElementRects({reference:e,floating:t,strategy:i}):D.rects),{x:h,y:p}=rD(f,m,c)),S=-1)}return{x:h,y:p,placement:m,strategy:i,middlewareData:y}},BW=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:i,middlewareData:o,rects:a,initialPlacement:u,platform:c,elements:f}=t,{mainAxis:h=!0,crossAxis:p=!0,fallbackPlacements:m,fallbackStrategy:y="bestFit",fallbackAxisSideDirection:b="none",flipAlignment:v=!0,...S}=ns(e,t);if((n=o.arrow)!=null&&n.alignmentOffset)return{};const x=Rr(i),_=xi(u),k=Rr(u)===u,T=await(c.isRTL==null?void 0:c.isRTL(f.floating)),A=m||(k||!v?[Gg(u)]:AW(u)),D=b!=="none";!m&&D&&A.push(...$W(u,v,b,T));const O=[u,...A],$=await c.detectOverflow(t,S),B=[];let j=((r=o.flip)==null?void 0:r.overflows)||[];if(h&&B.push($[x]),p){const G=TW(i,a,T);B.push($[G[0]],$[G[1]])}if(j=[...j,{placement:i,overflows:B}],!B.every(G=>G<=0)){var N,M;const G=(((N=o.flip)==null?void 0:N.index)||0)+1,L=O[G];if(L&&(!(p==="alignment"&&_!==xi(L))||j.every(U=>xi(U.placement)===_?U.overflows[0]>0:!0)))return{data:{index:G,overflows:j},reset:{placement:L}};let F=(M=j.filter(U=>U.overflows[0]<=0).sort((U,q)=>U.overflows[1]-q.overflows[1])[0])==null?void 0:M.placement;if(!F)switch(y){case"bestFit":{var z;const U=(z=j.filter(q=>{if(D){const W=xi(q.placement);return W===_||W==="y"}return!0}).map(q=>[q.placement,q.overflows.filter(W=>W>0).reduce((W,I)=>W+I,0)]).sort((q,W)=>q[1]-W[1])[0])==null?void 0:z[0];U&&(F=U);break}case"initialPlacement":F=u;break}if(i!==F)return{reset:{placement:F}}}return{}}}};function iD(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function oD(e){return EW.some(t=>e[t]>=0)}const UW=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n,platform:r}=t,{strategy:i="referenceHidden",...o}=ns(e,t);switch(i){case"referenceHidden":{const a=await r.detectOverflow(t,{...o,elementContext:"reference"}),u=iD(a,n.reference);return{data:{referenceHiddenOffsets:u,referenceHidden:oD(u)}}}case"escaped":{const a=await r.detectOverflow(t,{...o,altBoundary:!0}),u=iD(a,n.floating);return{data:{escapedOffsets:u,escaped:oD(u)}}}default:return{}}}}},NN=new Set(["left","top"]);async function HW(e,t){const{placement:n,platform:r,elements:i}=e,o=await(r.isRTL==null?void 0:r.isRTL(i.floating)),a=Rr(n),u=Da(n),c=xi(n)==="y",f=NN.has(a)?-1:1,h=o&&c?-1:1,p=ns(t,e);let{mainAxis:m,crossAxis:y,alignmentAxis:b}=typeof p=="number"?{mainAxis:p,crossAxis:0,alignmentAxis:null}:{mainAxis:p.mainAxis||0,crossAxis:p.crossAxis||0,alignmentAxis:p.alignmentAxis};return u&&typeof b=="number"&&(y=u==="end"?b*-1:b),c?{x:y*h,y:m*f}:{x:m*f,y:y*h}}const GW=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:i,y:o,placement:a,middlewareData:u}=t,c=await HW(t,e);return a===((n=u.offset)==null?void 0:n.placement)&&(r=u.arrow)!=null&&r.alignmentOffset?{}:{x:i+c.x,y:o+c.y,data:{...c,placement:a}}}}},VW=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:i,platform:o}=t,{mainAxis:a=!0,crossAxis:u=!1,limiter:c={fn:x=>{let{x:_,y:k}=x;return{x:_,y:k}}},...f}=ns(e,t),h={x:n,y:r},p=await o.detectOverflow(t,f),m=xi(Rr(i)),y=GS(m);let b=h[y],v=h[m];if(a){const x=y==="y"?"top":"left",_=y==="y"?"bottom":"right",k=b+p[x],T=b-p[_];b=X1(k,b,T)}if(u){const x=m==="y"?"top":"left",_=m==="y"?"bottom":"right",k=v+p[x],T=v-p[_];v=X1(k,v,T)}const S=c.fn({...t,[y]:b,[m]:v});return{...S,data:{x:S.x-n,y:S.y-r,enabled:{[y]:a,[m]:u}}}}}},qW=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:i,rects:o,middlewareData:a}=t,{offset:u=0,mainAxis:c=!0,crossAxis:f=!0}=ns(e,t),h={x:n,y:r},p=xi(i),m=GS(p);let y=h[m],b=h[p];const v=ns(u,t),S=typeof v=="number"?{mainAxis:v,crossAxis:0}:{mainAxis:0,crossAxis:0,...v};if(c){const k=m==="y"?"height":"width",T=o.reference[m]-o.floating[k]+S.mainAxis,A=o.reference[m]+o.reference[k]-S.mainAxis;y<T?y=T:y>A&&(y=A)}if(f){var x,_;const k=m==="y"?"width":"height",T=NN.has(Rr(i)),A=o.reference[p]-o.floating[k]+(T&&((x=a.offset)==null?void 0:x[p])||0)+(T?0:S.crossAxis),D=o.reference[p]+o.reference[k]+(T?0:((_=a.offset)==null?void 0:_[p])||0)-(T?S.crossAxis:0);b<A?b=A:b>D&&(b=D)}return{[m]:y,[p]:b}}}},YW=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:i,rects:o,platform:a,elements:u}=t,{apply:c=()=>{},...f}=ns(e,t),h=await a.detectOverflow(t,f),p=Rr(i),m=Da(i),y=xi(i)==="y",{width:b,height:v}=o.floating;let S,x;p==="top"||p==="bottom"?(S=p,x=m===(await(a.isRTL==null?void 0:a.isRTL(u.floating))?"start":"end")?"left":"right"):(x=p,S=m==="end"?"top":"bottom");const _=v-h.top-h.bottom,k=b-h.left-h.right,T=zc(v-h[S],_),A=zc(b-h[x],k),D=!t.middlewareData.shift;let O=T,$=A;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&($=k),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(O=_),D&&!m){const j=Vr(h.left,0),N=Vr(h.right,0),M=Vr(h.top,0),z=Vr(h.bottom,0);y?$=b-2*(j!==0||N!==0?j+N:Vr(h.left,h.right)):O=v-2*(M!==0||z!==0?M+z:Vr(h.top,h.bottom))}await c({...t,availableWidth:$,availableHeight:O});const B=await a.getDimensions(u.floating);return b!==B.width||v!==B.height?{reset:{rects:!0}}:{}}}};function IN(e){const t=Zr(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const i=gn(e),o=i?e.offsetWidth:n,a=i?e.offsetHeight:r,u=Hg(n)!==o||Hg(r)!==a;return u&&(n=o,r=a),{width:n,height:r,$:u}}function YS(e){return Nt(e)?e:e.contextElement}function pc(e){const t=YS(e);if(!gn(t))return io(1);const n=t.getBoundingClientRect(),{width:r,height:i,$:o}=IN(t);let a=(o?Hg(n.width):n.width)/r,u=(o?Hg(n.height):n.height)/i;return(!a||!Number.isFinite(a))&&(a=1),(!u||!Number.isFinite(u))&&(u=1),{x:a,y:u}}const WW=io(0);function jN(e){const t=fn(e);return!My()||!t.visualViewport?WW:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function KW(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==fn(e)?!1:t}function Bl(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const i=e.getBoundingClientRect(),o=YS(e);let a=io(1);t&&(r?Nt(r)&&(a=pc(r)):a=pc(e));const u=KW(o,n,r)?jN(o):io(0);let c=(i.left+u.x)/a.x,f=(i.top+u.y)/a.y,h=i.width/a.x,p=i.height/a.y;if(o){const m=fn(o),y=r&&Nt(r)?fn(r):r;let b=m,v=L1(b);for(;v&&r&&y!==b;){const S=pc(v),x=v.getBoundingClientRect(),_=Zr(v),k=x.left+(v.clientLeft+parseFloat(_.paddingLeft))*S.x,T=x.top+(v.clientTop+parseFloat(_.paddingTop))*S.y;c*=S.x,f*=S.y,h*=S.x,p*=S.y,c+=k,f+=T,b=fn(v),v=L1(b)}}return Vg({width:h,height:p,x:c,y:f})}function Ny(e,t){const n=Oy(e).scrollLeft;return t?t.left+n:Bl(lo(e)).left+n}function LN(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-Ny(e,n),i=n.top+t.scrollTop;return{x:r,y:i}}function XW(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e;const o=i==="fixed",a=lo(r),u=t?Dy(t.floating):!1;if(r===a||u&&o)return n;let c={scrollLeft:0,scrollTop:0},f=io(1);const h=io(0),p=gn(r);if((p||!p&&!o)&&((Ta(r)!=="body"||Aa(a))&&(c=Oy(r)),gn(r))){const y=Bl(r);f=pc(r),h.x=y.x+r.clientLeft,h.y=y.y+r.clientTop}const m=a&&!p&&!o?LN(a,c):io(0);return{width:n.width*f.x,height:n.height*f.y,x:n.x*f.x-c.scrollLeft*f.x+h.x+m.x,y:n.y*f.y-c.scrollTop*f.y+h.y+m.y}}function QW(e){return Array.from(e.getClientRects())}function ZW(e){const t=lo(e),n=Oy(e),r=e.ownerDocument.body,i=Vr(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),o=Vr(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let a=-n.scrollLeft+Ny(e);const u=-n.scrollTop;return Zr(r).direction==="rtl"&&(a+=Vr(t.clientWidth,r.clientWidth)-i),{width:i,height:o,x:a,y:u}}const sD=25;function JW(e,t){const n=fn(e),r=lo(e),i=n.visualViewport;let o=r.clientWidth,a=r.clientHeight,u=0,c=0;if(i){o=i.width,a=i.height;const h=My();(!h||h&&t==="fixed")&&(u=i.offsetLeft,c=i.offsetTop)}const f=Ny(r);if(f<=0){const h=r.ownerDocument,p=h.body,m=getComputedStyle(p),y=h.compatMode==="CSS1Compat"&&parseFloat(m.marginLeft)+parseFloat(m.marginRight)||0,b=Math.abs(r.clientWidth-p.clientWidth-y);b<=sD&&(o-=b)}else f<=sD&&(o+=f);return{width:o,height:a,x:u,y:c}}const eK=new Set(["absolute","fixed"]);function tK(e,t){const n=Bl(e,!0,t==="fixed"),r=n.top+e.clientTop,i=n.left+e.clientLeft,o=gn(e)?pc(e):io(1),a=e.clientWidth*o.x,u=e.clientHeight*o.y,c=i*o.x,f=r*o.y;return{width:a,height:u,x:c,y:f}}function aD(e,t,n){let r;if(t==="viewport")r=JW(e,n);else if(t==="document")r=ZW(lo(e));else if(Nt(t))r=tK(t,n);else{const i=jN(e);r={x:t.x-i.x,y:t.y-i.y,width:t.width,height:t.height}}return Vg(r)}function FN(e,t){const n=ts(e);return n===t||!Nt(n)||Xo(n)?!1:Zr(n).position==="fixed"||FN(n,t)}function nK(e,t){const n=t.get(e);if(n)return n;let r=ha(e,[],!1).filter(u=>Nt(u)&&Ta(u)!=="body"),i=null;const o=Zr(e).position==="fixed";let a=o?ts(e):e;for(;Nt(a)&&!Xo(a);){const u=Zr(a),c=ES(a);!c&&u.position==="fixed"&&(i=null),(o?!c&&!i:!c&&u.position==="static"&&i&&eK.has(i.position)||Aa(a)&&!c&&FN(e,a))?r=r.filter(f=>f!==a):i=u,a=ts(a)}return t.set(e,r),r}function rK(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e;const o=[...n==="clippingAncestors"?Dy(t)?[]:nK(t,this._c):[].concat(n),r],a=o[0],u=o.reduce((c,f)=>{const h=aD(t,f,i);return c.top=Vr(h.top,c.top),c.right=zc(h.right,c.right),c.bottom=zc(h.bottom,c.bottom),c.left=Vr(h.left,c.left),c},aD(t,a,i));return{width:u.right-u.left,height:u.bottom-u.top,x:u.left,y:u.top}}function iK(e){const{width:t,height:n}=IN(e);return{width:t,height:n}}function oK(e,t,n){const r=gn(t),i=lo(t),o=n==="fixed",a=Bl(e,!0,o,t);let u={scrollLeft:0,scrollTop:0};const c=io(0);function f(){c.x=Ny(i)}if(r||!r&&!o)if((Ta(t)!=="body"||Aa(i))&&(u=Oy(t)),r){const y=Bl(t,!0,o,t);c.x=y.x+t.clientLeft,c.y=y.y+t.clientTop}else i&&f();o&&!r&&i&&f();const h=i&&!r&&!o?LN(i,u):io(0),p=a.left+u.scrollLeft-c.x-h.x,m=a.top+u.scrollTop-c.y-h.y;return{x:p,y:m,width:a.width,height:a.height}}function ox(e){return Zr(e).position==="static"}function lD(e,t){if(!gn(e)||Zr(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return lo(e)===n&&(n=n.ownerDocument.body),n}function zN(e,t){const n=fn(e);if(Dy(e))return n;if(!gn(e)){let i=ts(e);for(;i&&!Xo(i);){if(Nt(i)&&!ox(i))return i;i=ts(i)}return n}let r=lD(e,t);for(;r&&SV(r)&&ox(r);)r=lD(r,t);return r&&Xo(r)&&ox(r)&&!ES(r)?n:r||_V(e)||n}const sK=async function(e){const t=this.getOffsetParent||zN,n=this.getDimensions,r=await n(e.floating);return{reference:oK(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function aK(e){return Zr(e).direction==="rtl"}const lK={convertOffsetParentRelativeRectToViewportRelativeRect:XW,getDocumentElement:lo,getClippingRect:rK,getOffsetParent:zN,getElementRects:sK,getClientRects:QW,getDimensions:iK,getScale:pc,isElement:Nt,isRTL:aK};function BN(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function uK(e,t){let n=null,r;const i=lo(e);function o(){var u;clearTimeout(r),(u=n)==null||u.disconnect(),n=null}function a(u,c){u===void 0&&(u=!1),c===void 0&&(c=1),o();const f=e.getBoundingClientRect(),{left:h,top:p,width:m,height:y}=f;if(u||t(),!m||!y)return;const b=Rm(p),v=Rm(i.clientWidth-(h+m)),S=Rm(i.clientHeight-(p+y)),x=Rm(h),_={rootMargin:-b+"px "+-v+"px "+-S+"px "+-x+"px",threshold:Vr(0,zc(1,c))||1};let k=!0;function T(A){const D=A[0].intersectionRatio;if(D!==c){if(!k)return a();D?a(!1,D):r=setTimeout(()=>{a(!1,1e-7)},1e3)}D===1&&!BN(f,e.getBoundingClientRect())&&a(),k=!1}try{n=new IntersectionObserver(T,{..._,root:i.ownerDocument})}catch{n=new IntersectionObserver(T,_)}n.observe(e)}return a(!0),o}function uD(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:i=!0,ancestorResize:o=!0,elementResize:a=typeof ResizeObserver=="function",layoutShift:u=typeof IntersectionObserver=="function",animationFrame:c=!1}=r,f=YS(e),h=i||o?[...f?ha(f):[],...ha(t)]:[];h.forEach(x=>{i&&x.addEventListener("scroll",n,{passive:!0}),o&&x.addEventListener("resize",n)});const p=f&&u?uK(f,n):null;let m=-1,y=null;a&&(y=new ResizeObserver(x=>{let[_]=x;_&&_.target===f&&y&&(y.unobserve(t),cancelAnimationFrame(m),m=requestAnimationFrame(()=>{var k;(k=y)==null||k.observe(t)})),n()}),f&&!c&&y.observe(f),y.observe(t));let b,v=c?Bl(e):null;c&&S();function S(){const x=Bl(e);v&&!BN(v,x)&&n(),v=x,b=requestAnimationFrame(S)}return n(),()=>{var x;h.forEach(_=>{i&&_.removeEventListener("scroll",n),o&&_.removeEventListener("resize",n)}),p==null||p(),(x=y)==null||x.disconnect(),y=null,c&&cancelAnimationFrame(b)}}const cK=GW,fK=VW,dK=BW,hK=YW,pK=UW,mK=qW,gK=(e,t,n)=>{const r=new Map,i={platform:lK,...n},o={...i.platform,_c:r};return zW(e,t,{...i,platform:o})};var yK=typeof document<"u",bK=function(){},fg=yK?C.useLayoutEffect:bK;function qg(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(!qg(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;){const o=i[r];if(!(o==="_owner"&&e.$$typeof)&&!qg(e[o],t[o]))return!1}return!0}return e!==e&&t!==t}function UN(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function cD(e,t){const n=UN(e);return Math.round(t*n)/n}function sx(e){const t=C.useRef(e);return fg(()=>{t.current=e}),t}function vK(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:i,elements:{reference:o,floating:a}={},transform:u=!0,whileElementsMounted:c,open:f}=e,[h,p]=C.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[m,y]=C.useState(r);qg(m,r)||y(r);const[b,v]=C.useState(null),[S,x]=C.useState(null),_=C.useCallback(q=>{q!==D.current&&(D.current=q,v(q))},[]),k=C.useCallback(q=>{q!==O.current&&(O.current=q,x(q))},[]),T=o||b,A=a||S,D=C.useRef(null),O=C.useRef(null),$=C.useRef(h),B=c!=null,j=sx(c),N=sx(i),M=sx(f),z=C.useCallback(()=>{if(!D.current||!O.current)return;const q={placement:t,strategy:n,middleware:m};N.current&&(q.platform=N.current),gK(D.current,O.current,q).then(W=>{const I={...W,isPositioned:M.current!==!1};G.current&&!qg($.current,I)&&($.current=I,yn.flushSync(()=>{p(I)}))})},[m,t,n,N,M]);fg(()=>{f===!1&&$.current.isPositioned&&($.current.isPositioned=!1,p(q=>({...q,isPositioned:!1})))},[f]);const G=C.useRef(!1);fg(()=>(G.current=!0,()=>{G.current=!1}),[]),fg(()=>{if(T&&(D.current=T),A&&(O.current=A),T&&A){if(j.current)return j.current(T,A,z);z()}},[T,A,z,j,B]);const L=C.useMemo(()=>({reference:D,floating:O,setReference:_,setFloating:k}),[_,k]),F=C.useMemo(()=>({reference:T,floating:A}),[T,A]),U=C.useMemo(()=>{const q={position:n,left:0,top:0};if(!F.floating)return q;const W=cD(F.floating,h.x),I=cD(F.floating,h.y);return u?{...q,transform:"translate("+W+"px, "+I+"px)",...UN(F.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:W,top:I}},[n,u,F.floating,h.x,h.y]);return C.useMemo(()=>({...h,update:z,refs:L,elements:F,floatingStyles:U}),[h,z,L,F,U])}const xK=(e,t)=>({...cK(e),options:[e,t]}),wK=(e,t)=>({...fK(e),options:[e,t]}),SK=(e,t)=>({...mK(e),options:[e,t]}),CK=(e,t)=>({...dK(e),options:[e,t]}),EK=(e,t)=>({...hK(e),options:[e,t]}),kK=(e,t)=>({...pK(e),options:[e,t]}),RK={name:"hide",async fn(e){var a;const{width:t,height:n,x:r,y:i}=e.rects.reference,o=t===0&&n===0&&r===0&&i===0;return{data:{referenceHidden:((a=(await kK().fn(e)).data)==null?void 0:a.referenceHidden)||o}}}},dg={sideX:"left",sideY:"top"},HN={name:"adaptiveOrigin",async fn(e){var x,_;const{x:t,y:n,rects:{floating:r},elements:{floating:i},platform:o,strategy:a,placement:u}=e,c=fn(i),f=c.getComputedStyle(i);if(!(f.transitionDuration!=="0s"&&f.transitionDuration!==""))return{x:t,y:n,data:dg};const h=await((x=o.getOffsetParent)==null?void 0:x.call(o,i));let p={width:0,height:0};if(a==="fixed"&&(c!=null&&c.visualViewport))p={width:c.visualViewport.width,height:c.visualViewport.height};else if(h===c){const k=Mt(i);p={width:k.documentElement.clientWidth,height:k.documentElement.clientHeight}}else await((_=o.isElement)==null?void 0:_.call(o,h))&&(p=await o.getDimensions(h));const m=Rr(u);let y=t,b=n;m==="left"&&(y=p.width-(t+r.width)),m==="top"&&(b=p.height-(n+r.height));const v=m==="left"?"right":dg.sideX,S=m==="top"?"bottom":dg.sideY;return{x:y,y:b,data:{sideX:v,sideY:S}}}};function _K(e){const{open:t=!1,onOpenChange:n,elements:r={}}=e,i=Jl(),o=eu()!=null,a=fr(()=>new DS({open:t,onOpenChange:n,referenceElement:r.reference??null,floatingElement:r.floating??null,triggerElements:new Ih,floatingId:i,nested:o,noEmit:!1})).current;return gt(()=>{const u={open:t,floatingId:i};r.reference!==void 0&&(u.referenceElement=r.reference,u.domReferenceElement=Nt(r.reference)?r.reference:null),r.floating!==void 0&&(u.floatingElement=r.floating),a.update(u)},[t,i,r.reference,r.floating,a]),a.context.onOpenChange=n,a.context.nested=o,a.context.noEmit=!1,a}function TK(e={}){const{nodeId:t,externalTree:n}=e,r=_K(e),i=e.rootContext||r,o={reference:i.useState("referenceElement"),floating:i.useState("floatingElement"),domReference:i.useState("domReferenceElement")},[a,u]=C.useState(null),c=C.useRef(null),f=lf(n);gt(()=>{o.domReference&&(c.current=o.domReference)},[o.domReference]);const h=vK({...e,elements:{...o,...a&&{reference:a}}}),p=C.useCallback(O=>{const $=Nt(O)?{getBoundingClientRect:()=>O.getBoundingClientRect(),getClientRects:()=>O.getClientRects(),contextElement:O}:O;u($),h.refs.setReference($)},[h.refs]),[m,y]=C.useState(null),[b,v]=C.useState(null);i.useSyncedValue("referenceElement",m),i.useSyncedValue("domReferenceElement",Nt(m)?m:null),i.useSyncedValue("floatingElement",b);const S=C.useCallback(O=>{(Nt(O)||O===null)&&(c.current=O,y(O)),(Nt(h.refs.reference.current)||h.refs.reference.current===null||O!==null&&!Nt(O))&&h.refs.setReference(O)},[h.refs,y]),x=C.useCallback(O=>{v(O),h.refs.setFloating(O)},[h.refs]),_=C.useMemo(()=>({...h.refs,setReference:S,setFloating:x,setPositionReference:p,domReference:c}),[h.refs,S,x,p]),k=C.useMemo(()=>({...h.elements,domReference:o.domReference}),[h.elements,o.domReference]),T=i.useState("open"),A=i.useState("floatingId"),D=C.useMemo(()=>({...h,dataRef:i.context.dataRef,open:T,onOpenChange:i.setOpen,events:i.context.events,floatingId:A,refs:_,elements:k,nodeId:t,rootStore:i}),[h,_,k,t,i,T,A]);return gt(()=>{i.context.dataRef.current.floatingContext=D;const O=f==null?void 0:f.nodesRef.current.find($=>$.id===t);O&&(O.context=D)}),C.useMemo(()=>({...h,context:D,refs:_,elements:k,rootStore:i}),[h,_,k,D,i])}function GN(e,t,n){const 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 fD(e,t,n){const{rects:r,placement:i}=e;return{side:GN(t,Rr(i),n),align:Da(i)||"center",anchor:{width:r.reference.width,height:r.reference.height},positioner:{width:r.floating.width,height:r.floating.height}}}function VN(e){var Me,Qe;const{anchor:t,positionMethod:n="absolute",side:r="bottom",sideOffset:i=0,align:o="center",alignOffset:a=0,collisionBoundary:u,collisionPadding:c=5,sticky:f=!1,arrowPadding:h=5,disableAnchorTracking:p=!1,keepMounted:m=!1,floatingRootContext:y,mounted:b,collisionAvoidance:v,shiftCrossAxis:S=!1,nodeId:x,adaptiveOrigin:_,lazyFlip:k=!1,externalTree:T}=e,[A,D]=C.useState(null);!b&&A!==null&&D(null);const O=v.side||"flip",$=v.align||"flip",B=v.fallbackAxisSide||"end",j=typeof t=="function"?t:void 0,N=tt(j),M=j?N:t,z=ro(t),G=IW()==="rtl",L=A||{top:"top",right:"right",bottom:"bottom",left:"left","inline-end":G?"left":"right","inline-start":G?"right":"left"}[r],F=o==="center"?L:`${L}-${o}`;let U=c;const q=1,W=r==="bottom"?q:0,I=r==="top"?q:0,Y=r==="right"?q:0,J=r==="left"?q:0;typeof U=="number"?U={top:U+W,right:U+J,bottom:U+I,left:U+Y}:U&&(U={top:(U.top||0)+W,right:(U.right||0)+J,bottom:(U.bottom||0)+I,left:(U.left||0)+Y});const H={boundary:u==="clipping-ancestors"?"clippingAncestors":u,padding:U},ie=C.useRef(null),re=ro(i),he=ro(a),ve=[xK(Ne=>{const Tt=fD(Ne,r,G),ft=typeof re.current=="function"?re.current(Tt):re.current,ut=typeof he.current=="function"?he.current(Tt):he.current;return{mainAxis:ft,crossAxis:ut,alignmentAxis:ut}},[typeof i!="function"?i:0,typeof a!="function"?a:0,G,r])],Re=$==="none"&&O!=="shift",ce=!Re&&(f||S||O==="shift"),je=O==="none"?null:CK({...H,padding:{top:U.top+q,right:U.right+q,bottom:U.bottom+q,left:U.left+q},mainAxis:!S&&O==="flip",crossAxis:$==="flip"?"alignment":!1,fallbackAxisSideDirection:B}),We=Re?null:wK(Ne=>{const Tt=Mt(Ne.elements.floating).documentElement;return{...H,rootBoundary:S?{x:0,y:0,width:Tt.clientWidth,height:Tt.clientHeight}:void 0,mainAxis:$!=="none",crossAxis:ce,limiter:f||S?void 0:SK(ft=>{if(!ie.current)return{};const{width:ut,height:Rt}=ie.current.getBoundingClientRect(),en=xi(Rr(ft.placement)),Xt=en==="y"?ut:Rt,tn=en==="y"?U.left+U.right:U.top+U.bottom;return{offset:Xt/2+tn/2}})}},[H,f,S,U,$]);O==="shift"||$==="shift"||o==="center"?ve.push(We,je):ve.push(je,We),ve.push(EK({...H,apply({elements:{floating:Ne},rects:{reference:Tt},availableWidth:ft,availableHeight:ut}){const Rt=Ne.style;Rt.setProperty("--available-width",`${ft}px`),Rt.setProperty("--available-height",`${ut}px`),Rt.setProperty("--anchor-width",`${Tt.width}px`),Rt.setProperty("--anchor-height",`${Tt.height}px`)}}),LW(()=>({element:ie.current||document.createElement("div"),padding:h,offsetParent:"floating"}),[h]),{name:"transformOrigin",fn(Ne){var Ua,Or,on;const{elements:Tt,middlewareData:ft,placement:ut,rects:Rt,y:en}=Ne,Xt=Rr(ut),tn=xi(Xt),bn=ie.current,ei=((Ua=ft.arrow)==null?void 0:Ua.x)||0,La=((Or=ft.arrow)==null?void 0:Or.y)||0,ki=(bn==null?void 0:bn.clientWidth)||0,Fa=(bn==null?void 0:bn.clientHeight)||0,Ri=ei+ki/2,lu=La+Fa/2,uu=Math.abs(((on=ft.shift)==null?void 0:on.y)||0),fs=Rt.reference.height/2,_i=typeof i=="function"?i(fD(Ne,r,G)):i,za=uu>_i,Ba={top:`${Ri}px calc(100% + ${_i}px)`,bottom:`${Ri}px ${-_i}px`,left:`calc(100% + ${_i}px) ${lu}px`,right:`${-_i}px ${lu}px`}[Xt],Hi=`${Ri}px ${Rt.reference.y+fs-en}px`;return Tt.floating.style.setProperty("--transform-origin",ce&&tn==="y"&&za?Hi:Ba),{}}},RK,_),gt(()=>{!b&&y&&y.update({referenceElement:null,floatingElement:null,domReferenceElement:null})},[b,y]);const X=C.useMemo(()=>({elementResize:!p&&typeof ResizeObserver<"u",layoutShift:!p&&typeof IntersectionObserver<"u"}),[p]),{refs:Z,elements:ne,x:xe,y:ge,middlewareData:Ce,update:le,placement:oe,context:me,isPositioned:ae,floatingStyles:Oe}=TK({rootContext:y,placement:F,middleware:ve,strategy:n,whileElementsMounted:m?void 0:(...Ne)=>uD(...Ne,X),nodeId:x,externalTree:T}),{sideX:Te,sideY:_e}=Ce.adaptiveOrigin||dg,De=ae?n:"fixed",ue=C.useMemo(()=>{const Ne=_?{position:De,[Te]:xe,[_e]:ge}:{position:De,...Oe};return ae||(Ne.opacity=0),Ne},[_,De,Te,xe,_e,ge,Oe,ae]),Se=C.useRef(null);gt(()=>{if(!b)return;const Ne=z.current,Tt=typeof Ne=="function"?Ne():Ne,ft=(dD(Tt)?Tt.current:Tt)||null||null;ft!==Se.current&&(Z.setPositionReference(ft),Se.current=ft)},[b,Z,M,z]),C.useEffect(()=>{if(!b)return;const Ne=z.current;typeof Ne!="function"&&dD(Ne)&&Ne.current!==Se.current&&(Z.setPositionReference(Ne.current),Se.current=Ne.current)},[b,Z,M,z]),C.useEffect(()=>{if(m&&b&&ne.domReference&&ne.floating)return uD(ne.domReference,ne.floating,le,X)},[m,b,ne,le,X]);const ke=Rr(oe),Pe=GN(r,ke,G),Le=Da(oe)||"center",st=!!((Me=Ce.hide)!=null&&Me.referenceHidden);gt(()=>{k&&b&&ae&&D(ke)},[k,b,ae,ke]);const Ut=C.useMemo(()=>{var Ne,Tt;return{position:"absolute",top:(Ne=Ce.arrow)==null?void 0:Ne.y,left:(Tt=Ce.arrow)==null?void 0:Tt.x}},[Ce.arrow]),Ot=((Qe=Ce.arrow)==null?void 0:Qe.centerOffset)!==0;return C.useMemo(()=>({positionerStyles:ue,arrowStyles:Ut,arrowRef:ie,arrowUncentered:Ot,side:Pe,align:Le,physicalSide:ke,anchorHidden:st,refs:Z,context:me,isPositioned:ae,update:le}),[ue,Ut,ie,Ot,Pe,Le,ke,st,Z,me,ae,le])}function dD(e){return e!=null&&"current"in e}function Iy(e){return e==="starting"?vY:Cr}const AK=C.forwardRef(function(e,t){const{render:n,className:r,anchor:i,positionMethod:o="absolute",side:a="bottom",align:u="center",sideOffset:c=0,alignOffset:f=0,collisionBoundary:h="clipping-ancestors",collisionPadding:p=5,arrowPadding:m=5,sticky:y=!1,disableAnchorTracking:b=!1,collisionAvoidance:v=QP,...S}=e,{store:x}=cf(),_=vW(),k=XV(),T=x.useState("floatingRootContext"),A=x.useState("mounted"),D=x.useState("open"),O=x.useState("openChangeReason"),$=x.useState("activeTriggerElement"),B=x.useState("modal"),j=x.useState("positionerElement"),N=x.useState("instantType"),M=x.useState("transitionStatus"),z=x.useState("hasViewport"),G=C.useRef(null),L=TP(j,!1,!1),F=VN({anchor:i,floatingRootContext:T,positionMethod:o,mounted:A,side:a,sideOffset:c,align:u,alignOffset:f,arrowPadding:m,collisionBoundary:h,collisionPadding:p,sticky:y,disableAnchorTracking:b,keepMounted:_,nodeId:k,collisionAvoidance:v,adaptiveOrigin:z?HN:void 0}),U=C.useMemo(()=>{const H={};return D||(H.pointerEvents="none"),{role:"presentation",hidden:!A,style:{...F.positionerStyles,...H}}},[D,A,F.positionerStyles]),q=C.useMemo(()=>({props:U,...F}),[U,F]),W=T.useState("domReferenceElement");gt(()=>{const H=W,ie=G.current;if(H&&(G.current=H),ie&&H&&H!==ie){x.set("instantType",void 0);const re=new AbortController;return L(()=>{x.set("instantType","trigger-change")},re.signal),()=>{re.abort()}}},[W,L,x]);const I={open:D,side:q.side,align:q.align,anchorHidden:q.anchorHidden,instant:N},Y=C.useCallback(H=>{x.set("positionerElement",H)},[x]),J=Dr("div",e,{state:I,props:[q.props,Iy(M),S],ref:[t,Y],stateAttributesMapping:tu});return E.jsxs($N.Provider,{value:q,children:[A&&B===!0&&O!==Xn&&E.jsx(eN,{ref:x.context.internalBackdropRef,inert:zS(!D),cutout:$}),E.jsx(QV,{id:k,children:J})]})}),qN=({children:e,...t})=>E.jsx(AK,{"data-slot":"popover-positioner",...t,children:e});qN.displayName="PopoverPositioner";const DK={"popover-popup":"_popover-popup_hjuwr_3"},MK=C.createContext(void 0);function OK(e){return C.useContext(MK)}const $K=new Set(["click","mousedown"]);function YN(e,t={}){const n="rootStore"in e?e.rootStore:e,r=n.useState("open"),i=n.useState("floatingElement"),o=n.useState("domReferenceElement"),{dataRef:a}=n.context,{enabled:u=!0,closeDelay:c=0}=t,f=RN(n),h=lf(),p=eu(),m=tt(()=>f.interactedInside?!0:a.current.openEvent?$K.has(a.current.openEvent.type):!1),y=tt(()=>{var T;const k=(T=a.current.openEvent)==null?void 0:T.type;return(k==null?void 0:k.includes("mouse"))&&k!=="mousedown"}),b=tt(k=>Ng(k,n.context.triggerElements)),v=C.useCallback((k,T=!0)=>{const A=PK(c,f.pointerType);A&&!f.handler?f.openChangeTimeout.start(A,()=>n.setOpen(!1,qt(Xn,k))):T&&(f.openChangeTimeout.clear(),n.setOpen(!1,qt(Xn,k)))},[c,n,f]),S=tt(()=>{f.unbindMouseMove(),f.handler=void 0}),x=tt(()=>{if(f.performedPointerEventsMutation){const k=Mt(i).body;k.style.pointerEvents="",k.removeAttribute(K1),f.performedPointerEventsMutation=!1}}),_=tt(k=>{const T=Vn(k);if(!pW(T)){f.interactedInside=!1;return}f.interactedInside=!0});gt(()=>{r||(f.pointerType=void 0,f.restTimeoutPending=!1,f.interactedInside=!1,S(),x())},[r,f,S,x]),C.useEffect(()=>()=>{S()},[S]),C.useEffect(()=>x,[x]),gt(()=>{var k,T,A;if(u&&r&&((k=f.handleCloseOptions)!=null&&k.blockPointerEvents)&&y()&&Nt(o)&&i){f.performedPointerEventsMutation=!0;const D=Mt(i).body;D.setAttribute(K1,"");const O=o,$=i,B=(A=(T=h==null?void 0:h.nodesRef.current.find(j=>j.id===p))==null?void 0:T.context)==null?void 0:A.elements.floating;return B&&(B.style.pointerEvents=""),D.style.pointerEvents="none",O.style.pointerEvents="auto",$.style.pointerEvents="auto",()=>{D.style.pointerEvents="",O.style.pointerEvents="",$.style.pointerEvents=""}}},[u,r,o,i,f,y,h,p]),C.useEffect(()=>{if(!u)return;function k(O){m()||!a.current.floatingContext||!n.select("open")||b(O.relatedTarget)||(x(),S(),m()||v(O))}function T(O){var $;f.openChangeTimeout.clear(),x(),($=f.handler)==null||$.call(f,O),S()}function A(O){m()||v(O,!1)}const D=i;return D&&(D.addEventListener("mouseleave",k),D.addEventListener("mouseenter",T),D.addEventListener("mouseleave",A),D.addEventListener("pointerdown",_,!0)),()=>{D&&(D.removeEventListener("mouseleave",k),D.removeEventListener("mouseenter",T),D.removeEventListener("mouseleave",A),D.removeEventListener("pointerdown",_,!0))}},[u,i,n,a,m,b,v,x,S,_,f])}function PK(e,t){return t&&!zl(t)?0:typeof e=="function"?e():e}const NK={...tu,...af},IK=C.forwardRef(function(e,t){const{className:n,render:r,initialFocus:i,finalFocus:o,...a}=e,{store:u}=cf(),c=CW(),f=OK()!=null,h=u.useState("open"),p=u.useState("openMethod"),m=u.useState("instantType"),y=u.useState("transitionStatus"),b=u.useState("popupProps"),v=u.useState("titleElementId"),S=u.useState("descriptionElementId"),x=u.useState("modal"),_=u.useState("mounted"),k=u.useState("openChangeReason"),T=u.useState("activeTriggerElement"),A=u.useState("floatingRootContext");Oh({open:h,ref:u.context.popupRef,onComplete(){var G,L;h&&((L=(G=u.context).onOpenChangeComplete)==null||L.call(G,!0))}});const D=u.useState("disabled"),O=u.useState("openOnHover"),$=u.useState("closeDelay");YN(A,{enabled:O&&!D,closeDelay:$});function B(G){return G==="touch"?u.context.popupRef.current:!0}const j=i===void 0?B:i,N={open:h,side:c.side,align:c.align,instant:m,transitionStatus:y},M=C.useCallback(G=>{u.set("popupElement",G)},[u]),z=Dr("div",e,{state:N,ref:[t,u.context.popupRef,M],props:[b,{"aria-labelledby":v,"aria-describedby":S,onKeyDown(G){f&&vN.has(G.key)&&G.stopPropagation()}},Iy(y),a],stateAttributesMapping:NK});return E.jsx(wN,{context:A,openInteractionType:p,modal:x==="trap-focus",disabled:!_||k===Xn,initialFocus:j,returnFocus:o,restoreFocus:"popup",previousFocusableElement:gn(T)?T:void 0,nextFocusableElement:u.context.triggerFocusTargetRef,beforeContentFocusGuardRef:u.context.beforeContentFocusGuardRef,children:z})}),WN=({title:e,description:t,icon:n,action:r,footer:i,children:o,className:a,...u})=>E.jsx(IK,{"data-slot":"popover-popup",render:E.jsx(zt,{title:e,description:t,icon:n,action:r,footer:i,children:o}),className:ze(DK["popover-popup"],a),"data-is-popup":!0,...u,children:o});WN.displayName="PopoverPopup";const KN=({trigger:e,open:t,onOpenChange:n,title:r,description:i,icon:o,action:a,footer:u,RootProps:c,TriggerProps:f,PortalProps:h,BackdropProps:p,PositionerProps:m={sideOffset:4,collisionPadding:16},PopupProps:y,children:b})=>E.jsxs(EN,{open:t,onOpenChange:n,...c,children:[E.jsx(AN,{...f,children:e}),E.jsxs(MN,{...h,children:[E.jsx(ON,{...p}),E.jsx(qN,{...m,children:E.jsx(WN,{title:r,description:i,icon:o,action:a,footer:u,...y,children:b})})]})]});KN.displayName="Popover";const XN=({children:e,...t})=>E.jsx(qq,{"data-slot":"sheet-root",...t,children:e});XN.displayName="SheetRoot";const QN=({children:e,...t})=>{const n=C.isValidElement(e);return E.jsx(wY,{"data-slot":"sheet-trigger",nativeButton:n,render:n?e:E.jsx("span",{role:"button",tabIndex:0,children:e}),...t,children:e})};QN.displayName="SheetTrigger";const ZN=({children:e,...t})=>E.jsx(HY,{"data-slot":"sheet-portal",...t,children:e});ZN.displayName="SheetPortal";const ac={"sheet-backdrop":"_sheet-backdrop_1hzld_3","sheet-popup":"_sheet-popup_1hzld_17","side-right":"_side-right_1hzld_41","side-left":"_side-left_1hzld_50","side-top":"_side-top_1hzld_59","side-bottom":"_side-bottom_1hzld_68"},JN=({className:e,...t})=>E.jsx(VY,{"data-slot":"sheet-backdrop",className:ze(ac["sheet-backdrop"],e),...t});JN.displayName="SheetBackdrop";const jK=Dn({variants:{side:{top:ac["side-top"],right:ac["side-right"],bottom:ac["side-bottom"],left:ac["side-left"]}}}),eI=({side:e,title:t,description:n,icon:r,action:i,footer:o,className:a,children:u,...c})=>E.jsx(aW,{render:E.jsx(zt,{gap:4,title:t,description:n,icon:r,action:i,footer:o,FooterProps:{style:{marginTop:"auto"}}}),className:ze(ac["sheet-popup"],jK({side:e}),a),...c,children:u});eI.displayName="SheetPopup";const tI=({side:e="right",title:t,description:n,icon:r,action:i,footer:o,RootProps:a,TriggerProps:u,PortalProps:c,BackdropProps:f,PopupProps:h,trigger:p,open:m,onOpenChange:y,children:b})=>E.jsxs(XN,{open:m,onOpenChange:y,...a,children:[E.jsx(QN,{...u,children:p??(u==null?void 0:u.children)}),E.jsxs(ZN,{...c,children:[E.jsx(JN,{...f}),E.jsx(eI,{side:e,title:t,description:n,icon:r,action:i,footer:o,...h,children:b??(h==null?void 0:h.children)})]})]});tI.displayName="Sheet";const LK="_toast_ornow_1",nI={"toast-viewport":"_toast-viewport_ornow_1",toast:LK},WS=C.createContext(void 0);function rI(){const e=C.useContext(WS);if(!e)throw new Error(An(73));return e}let hD=0;function FK(e){return hD+=1,`${e}-${Math.random().toString(36).slice(2,6)}-${hD}`}function ax(e,t){if(typeof e=="string")return{description:e};if(typeof e=="function"){const n=e(t);return typeof n=="string"?{description:n}:n}return e}const _m=Pq(e=>e.toasts,e=>{const t=new Map;let n=0,r=0;return e.forEach((i,o)=>{const a=i.transitionStatus==="ending";t.set(i.id,{value:i,domIndex:o,visibleIndex:a?-1:n,offsetY:r}),r+=i.height||0,a||(n+=1)}),t}),Oo={toasts:Ke(e=>e.toasts),isEmpty:Ke(e=>e.toasts.length===0),toast:Ke(_m,(e,t)=>{var n;return(n=e.get(t))==null?void 0:n.value}),toastIndex:Ke(_m,(e,t)=>{var n;return((n=e.get(t))==null?void 0:n.domIndex)??-1}),toastOffsetY:Ke(_m,(e,t)=>{var n;return((n=e.get(t))==null?void 0:n.offsetY)??0}),toastVisibleIndex:Ke(_m,(e,t)=>{var n;return((n=e.get(t))==null?void 0:n.visibleIndex)??-1}),hovering:Ke(e=>e.hovering),focused:Ke(e=>e.focused),expanded:Ke(e=>e.hovering||e.focused),expandedOrOutOfFocus:Ke(e=>e.hovering||e.focused||!e.isWindowFocused),prevFocusElement:Ke(e=>e.prevFocusElement)};let zK=class extends $h{constructor(n){super(n,{},Oo);te(this,"timers",new Map);te(this,"areTimersPaused",!1);te(this,"setViewport",n=>{this.set("viewport",n)});te(this,"disposeEffect",()=>()=>{this.timers.forEach(n=>{var r;(r=n.timeout)==null||r.clear()}),this.timers.clear()});te(this,"addToast",n=>{const{toasts:r,timeout:i,limit:o}=this.state,a=n.id||FK("toast"),u={...n,id:a,transitionStatus:"starting"},c=[u,...r],f=c.filter(p=>p.transitionStatus!=="ending");if(f.length>o){const p=f.length-o,m=f.slice(-p),y=new Set(m.map(b=>b.id));this.setToasts(c.map(b=>{const v=y.has(b.id);return b.limited!==v?{...b,limited:v}:b}))}else this.setToasts(c.map(p=>p.limited?{...p,limited:!1}:p));const h=u.timeout??i;return u.type!=="loading"&&h>0&&this.scheduleTimer(a,h,()=>this.closeToast(a)),Oo.expandedOrOutOfFocus(this.state)&&this.pauseTimers(),a});te(this,"updateToast",(n,r)=>{this.updateToastInternal(n,r)});te(this,"updateToastInternal",(n,r)=>{var v,S,x;const{timeout:i,toasts:o}=this.state,a=Oo.toast(this.state,n)??null;if(!a||a.transitionStatus==="ending")return;const u={...a,...r};this.setToasts(o.map(_=>_.id===n?{..._,...r}:_));const c=u.timeout??i,f=(a==null?void 0:a.timeout)??i,h=Object.hasOwn(r,"timeout"),p=u.transitionStatus!=="ending"&&u.type!=="loading"&&c>0,m=this.timers.has(n),y=f!==c,b=(a==null?void 0:a.type)==="loading";if(!p&&m){(S=(v=this.timers.get(n))==null?void 0:v.timeout)==null||S.clear(),this.timers.delete(n);return}if(p&&(!m||y||h||b)){const _=this.timers.get(n);_&&((x=_.timeout)==null||x.clear(),this.timers.delete(n)),this.scheduleTimer(n,c,()=>this.closeToast(n)),Oo.expandedOrOutOfFocus(this.state)&&this.pauseTimers()}});te(this,"closeToast",n=>{var c,f;(f=(c=Oo.toast(this.state,n))==null?void 0:c.onClose)==null||f.call(c);const{limit:r,toasts:i}=this.state;let o=0;const a=i.map(h=>{if(h.id===n)return{...h,transitionStatus:"ending",height:0};if(h.transitionStatus==="ending")return h;const p=o>=r;return o+=1,h.limited!==p?{...h,limited:p}:h}),u=this.timers.get(n);u&&u.timeout&&(u.timeout.clear(),this.timers.delete(n)),this.handleFocusManagement(n),this.setToasts(a)});te(this,"promiseToast",(n,r)=>{const i=ax(r.loading),o=this.addToast({...i,type:"loading"}),a=n.then(u=>{const c=ax(r.success,u);return this.updateToast(o,{...c,type:"success",timeout:c.timeout}),u}).catch(u=>{const c=ax(r.error,u);return this.updateToast(o,{...c,type:"error",timeout:c.timeout}),Promise.reject(u)});return{}.hasOwnProperty.call(r,"setPromise")&&r.setPromise(a),a});te(this,"handleDocumentPointerDown",n=>{if(n.pointerType!=="touch")return;const r=Vn(n);ct(this.state.viewport,r)||(this.resumeTimers(),this.update({hovering:!1,focused:!1}))})}setFocused(n){this.set("focused",n)}setHovering(n){this.set("hovering",n)}setIsWindowFocused(n){this.set("isWindowFocused",n)}setPrevFocusElement(n){this.set("prevFocusElement",n)}removeToast(n){var o,a;const r=Oo.toastIndex(this.state,n);if(r===-1)return;(a=(o=this.state.toasts[r])==null?void 0:o.onRemove)==null||a.call(o);const i=[...this.state.toasts];i.splice(r,1),this.setToasts(i)}pauseTimers(){this.areTimersPaused||(this.areTimersPaused=!0,this.timers.forEach(n=>{if(n.timeout){n.timeout.clear();const r=Date.now()-n.start,i=n.delay-r;n.remaining=i>0?i:0}}))}resumeTimers(){this.areTimersPaused&&(this.areTimersPaused=!1,this.timers.forEach((n,r)=>{n.remaining=n.remaining>0?n.remaining:n.delay,n.timeout??(n.timeout=Bi.create()),n.timeout.start(n.remaining,()=>{this.timers.delete(r),n.callback()}),n.start=Date.now()}))}restoreFocusToPrevElement(){var n;(n=this.state.prevFocusElement)==null||n.focus({preventScroll:!0})}scheduleTimer(n,r,i){const o=Date.now(),a=!Oo.expandedOrOutOfFocus(this.state),u=a?Bi.create():void 0;u==null||u.start(r,()=>{this.timers.delete(n),i()}),this.timers.set(n,{timeout:u,start:a?o:0,delay:r,remaining:r,callback:i})}setToasts(n){const r={toasts:n};n.length===0&&(r.hovering=!1,r.focused=!1),this.update(r)}handleFocusManagement(n){var c,f;const r=Gr(Mt(this.state.viewport));if(!this.state.viewport||!ct(this.state.viewport,r)||!Ig(r))return;const i=Oo.toasts(this.state),o=Oo.toastIndex(this.state,n);let a=null,u=o+1;for(;u<i.length;){if(i[u].transitionStatus!=="ending"){a=i[u];break}u+=1}if(!a)for(u=o-1;u>=0;){if(i[u].transitionStatus!=="ending"){a=i[u];break}u-=1}a?(f=(c=a.ref)==null?void 0:c.current)==null||f.focus():this.restoreFocusToPrevElement()}};const BK=function(e){const{children:t,timeout:n=5e3,limit:r=3,toastManager:i}=e,o=fr(()=>new zK({timeout:n,limit:r,viewport:null,toasts:[],hovering:!1,focused:!1,isWindowFocused:!0,prevFocusElement:null})).current;return Mh(o.disposeEffect),C.useEffect(function(){return i?i[" subscribe"](({action:a,options:u})=>{const c=u.id;a==="promise"&&u.promise?o.promiseToast(u.promise,u):a==="update"&&c?o.updateToast(c,u):a==="close"&&c?o.closeToast(c):o.addToast(u)}):void 0},[o,n,i]),o.useSyncedValues({timeout:n,limit:r}),E.jsx(WS.Provider,{value:o,children:t})};function UK(){const e=C.useContext(WS);if(!e)throw new Error(An(73));const t=e.useState("toasts");return C.useMemo(()=>({toasts:t,add:e.addToast,close:e.closeToast,update:e.updateToast,promise:e.promiseToast}),[t,e])}const HK=BK,iI=UK,oI=C.forwardRef(function(e,t){const{children:n,container:r,className:i,render:o,...a}=e,{portalNode:u,portalSubtree:c}=hN({container:r,ref:t,componentProps:e,elementProps:a});return!c&&!u?null:E.jsxs(C.Fragment,{children:[c,u&&yn.createPortal(n,u)]})}),GK=oI;let VK=(function(e){return e.frontmostHeight="--toast-frontmost-height",e})({});const qK=C.forwardRef(function(e,t){var N;const{render:n,className:r,children:i,...o}=e,a=rI(),u=Ea(),c=C.useRef(!1),f=C.useRef(!1),h=a.useState("isEmpty"),p=a.useState("toasts"),m=a.useState("focused"),y=a.useState("expanded"),b=a.useState("prevFocusElement"),v=((N=p[0])==null?void 0:N.height)??0,S=C.useMemo(()=>p.some(M=>M.transitionStatus==="ending"),[p]);C.useEffect(()=>{const M=a.state.viewport;if(!M)return;function z(L){h||L.key==="F6"&&L.target!==M&&(L.preventDefault(),a.setPrevFocusElement(Gr(Mt(M))),M==null||M.focus({preventScroll:!0}),a.pauseTimers(),a.setFocused(!0))}const G=fn(M);return G.addEventListener("keydown",z),()=>{G.removeEventListener("keydown",z)}},[a,h]),C.useEffect(()=>{const M=a.state.viewport;if(!M||h)return;const z=fn(M);function G(F){F.target===z&&(a.setIsWindowFocused(!1),a.pauseTimers())}function L(F){if(F.relatedTarget||F.target===z)return;const U=Vn(F),q=Gr(Mt(M));(!ct(M,U)||!Ig(q))&&a.resumeTimers(),u.start(0,()=>a.setIsWindowFocused(!0))}return z.addEventListener("blur",G,!0),z.addEventListener("focus",L,!0),()=>{z.removeEventListener("blur",G,!0),z.removeEventListener("focus",L,!0)}},[a,u,h]),C.useEffect(()=>{const M=a.state.viewport;if(!M||h)return;const z=Mt(M);return z.addEventListener("pointerdown",a.handleDocumentPointerDown,!0),()=>{z.removeEventListener("pointerdown",a.handleDocumentPointerDown,!0)}},[h,a]);function x(M){var G,L,F;const z=a.state.viewport;z&&(c.current=!0,M.relatedTarget===z?(F=(L=(G=p[0])==null?void 0:G.ref)==null?void 0:L.current)==null||F.focus():a.restoreFocusToPrevElement())}function _(M){M.key==="Tab"&&M.shiftKey&&M.target===a.state.viewport&&(M.preventDefault(),a.restoreFocusToPrevElement(),a.resumeTimers())}C.useEffect(()=>{!a.state.isWindowFocused||S||!f.current||(a.resumeTimers(),a.setHovering(!1),f.current=!1)},[S,a]);function k(){a.pauseTimers(),a.setHovering(!0),f.current=!1}function T(){S?f.current=!0:(a.resumeTimers(),a.setHovering(!1))}function A(){if(c.current){c.current=!1;return}m||Ig(Mt(a.state.viewport).activeElement)&&(a.setFocused(!0),a.pauseTimers())}function D(M){!m||ct(a.state.viewport,M.relatedTarget)||(a.setFocused(!1),a.resumeTimers())}const O={tabIndex:-1,role:"region","aria-live":"polite","aria-atomic":!1,"aria-relevant":"additions text","aria-label":"Notifications",onMouseEnter:k,onMouseMove:k,onMouseLeave:T,onFocus:A,onBlur:D,onKeyDown:_,onClick:A},$={expanded:y},B=Dr("div",e,{ref:[t,a.setViewport],state:$,props:[O,{style:{[VK.frontmostHeight]:v?`${v}px`:void 0}},o,{children:E.jsxs(C.Fragment,{children:[!h&&b&&E.jsx(Qo,{onFocus:x}),i,!h&&b&&E.jsx(Qo,{onFocus:x})]})}]}),j=C.useMemo(()=>p.filter(M=>M.priority==="high"),[p]);return E.jsxs(C.Fragment,{children:[!h&&b&&E.jsx(Qo,{onFocus:x}),B,!m&&j.length>0&&E.jsx("div",{style:BS,children:j.map(M=>E.jsxs("div",{role:"alert","aria-atomic":!0,children:[E.jsx("div",{children:M.title}),E.jsx("div",{children:M.description})]},M.id))})]})}),sI=C.createContext(void 0);function YK(){const e=C.useContext(sI);if(!e)throw new Error(An(66));return e}let ll=(function(e){return e.index="--toast-index",e.offsetY="--toast-offset-y",e.height="--toast-height",e.swipeMovementX="--toast-swipe-movement-x",e.swipeMovementY="--toast-swipe-movement-y",e})({});const WK={...af,swipeDirection(e){return e?{"data-swipe-direction":e}:null}},Cd=40,KK=10,js=.5,XK=1;function pD(e,t,n){switch(e){case"up":return-n;case"down":return n;case"left":return-t;case"right":return t;default:return 0}}function QK(e){const t=window.getComputedStyle(e).transform;let n=0,r=0,i=1;if(t&&t!=="none"){const o=t.match(/matrix(?:3d)?\(([^)]+)\)/);if(o){const a=o[1].split(", ").map(parseFloat);a.length===6?(n=a[4],r=a[5],i=Math.sqrt(a[0]*a[0]+a[1]*a[1])):a.length===16&&(n=a[12],r=a[13],i=a[0])}}return{x:n,y:r,scale:i}}const ZK=C.forwardRef(function(e,t){var le;const{toast:n,render:r,className:i,swipeDirection:o=["down","right"],...a}=e,u=((le=n.positionerProps)==null?void 0:le.anchor)!==void 0;let c=[];u||(c=Array.isArray(o)?o:[o]);const f=c.length>0,h=rI(),[p,m]=C.useState(void 0),[y,b]=C.useState(!1),[v,S]=C.useState(!1),[x,_]=C.useState(!1),[k,T]=C.useState({x:0,y:0}),[A,D]=C.useState({x:0,y:0,scale:1}),[O,$]=C.useState(),[B,j]=C.useState(),[N,M]=C.useState(null),z=C.useRef(null),G=C.useRef({x:0,y:0}),L=C.useRef({x:0,y:0,scale:1}),F=C.useRef(void 0),U=C.useRef(0),q=C.useRef(!1),W=C.useRef({x:0,y:0}),I=C.useRef(!1),Y=h.useState("toastIndex",n.id),J=h.useState("toastVisibleIndex",n.id),H=h.useState("toastOffsetY",n.id),ie=h.useState("focused"),re=h.useState("expanded");Oh({open:n.transitionStatus!=="ending",ref:z,onComplete(){n.transitionStatus==="ending"&&h.removeToast(n.id)}});const he=tt((oe=!1)=>{const me=z.current;if(!me)return;const ae=me.style.height;me.style.height="auto";const Oe=me.offsetHeight;me.style.height=ae;function Te(){h.updateToastInternal(n.id,{ref:z,height:Oe,...n.transitionStatus==="starting"?{transitionStatus:void 0}:{}})}oe?yn.flushSync(Te):Te()});gt(he,[he]);function ve(oe,me){let ae=oe,Oe=me;return!c.includes("left")&&!c.includes("right")?ae=oe>0?oe**js:-(Math.abs(oe)**js):(!c.includes("right")&&oe>0&&(ae=oe**js),!c.includes("left")&&oe<0&&(ae=-(Math.abs(oe)**js))),!c.includes("up")&&!c.includes("down")?Oe=me>0?me**js:-(Math.abs(me)**js):(!c.includes("down")&&me>0&&(Oe=me**js),!c.includes("up")&&me<0&&(Oe=-(Math.abs(me)**js))),{x:ae,y:Oe}}function Re(oe){var ae;if(oe.button!==0)return;oe.pointerType==="touch"&&h.pauseTimers();const me=Vn(oe.nativeEvent);if(!(me&&me.closest('button,a,input,textarea,[role="button"],[data-swipe-ignore]'))){if(q.current=!1,F.current=void 0,U.current=0,G.current={x:oe.clientX,y:oe.clientY},W.current=G.current,z.current){const Oe=QK(z.current);L.current=Oe,D(Oe),T({x:Oe.x,y:Oe.y})}h.setHovering(!0),b(!0),S(!1),M(null),I.current=!0,(ae=z.current)==null||ae.setPointerCapture(oe.pointerId)}}function ce(oe){if(!y)return;oe.preventDefault(),I.current&&(G.current={x:oe.clientX,y:oe.clientY},I.current=!1);const{clientY:me,clientX:ae,movementX:Oe,movementY:Te}=oe;(Te<0&&me>W.current.y||Te>0&&me<W.current.y)&&(W.current={x:W.current.x,y:me}),(Oe<0&&ae>W.current.x||Oe>0&&ae<W.current.x)&&(W.current={x:ae,y:W.current.y});const _e=ae-G.current.x,De=me-G.current.y,ue=me-W.current.y,Se=ae-W.current.x;if(!v&&Math.sqrt(_e*_e+De*De)>=XK&&(S(!0),N===null)){const Ut=c.includes("left")||c.includes("right"),Ot=c.includes("up")||c.includes("down");if(Ut&&Ot){const Me=Math.abs(_e),Qe=Math.abs(De);M(Me>Qe?"horizontal":"vertical")}}let ke;if(!F.current)N==="vertical"?De>0?ke="down":De<0&&(ke="up"):N==="horizontal"?_e>0?ke="right":_e<0&&(ke="left"):Math.abs(_e)>=Math.abs(De)?ke=_e>0?"right":"left":ke=De>0?"down":"up",ke&&c.includes(ke)&&(F.current=ke,U.current=pD(ke,_e,De),m(ke));else{const Ut=F.current,Ot=pD(Ut,Se,ue);Ot>Cd?(q.current=!1,m(Ut)):!(c.includes("left")&&c.includes("right"))&&!(c.includes("up")&&c.includes("down"))&&U.current-Ot>=KK&&(q.current=!0)}const Pe=ve(_e,De);let Le=L.current.x,st=L.current.y;N==="horizontal"?(c.includes("left")||c.includes("right"))&&(Le+=Pe.x):(N==="vertical"||(c.includes("left")||c.includes("right"))&&(Le+=Pe.x),(c.includes("up")||c.includes("down"))&&(st+=Pe.y)),T({x:Le,y:st})}function je(oe){var _e;if(!y)return;if(b(!1),S(!1),M(null),(_e=z.current)==null||_e.releasePointerCapture(oe.pointerId),q.current){T({x:A.x,y:A.y}),m(void 0);return}let me=!1;const ae=k.x-A.x,Oe=k.y-A.y;let Te;for(const De of c){switch(De){case"right":ae>Cd&&(me=!0,Te="right");break;case"left":ae<-Cd&&(me=!0,Te="left");break;case"down":Oe>Cd&&(me=!0,Te="down");break;case"up":Oe<-Cd&&(me=!0,Te="up");break}if(me)break}me?(m(Te),_(!0),h.closeToast(n.id)):(T({x:A.x,y:A.y}),m(void 0))}function We(oe){if(oe.key==="Escape"){if(!z.current||!ct(z.current,Gr(Mt(z.current))))return;h.closeToast(n.id)}}C.useEffect(()=>{if(!f)return;const oe=z.current;if(!oe)return;function me(ae){ct(oe,ae.target)&&ae.preventDefault()}return oe.addEventListener("touchmove",me,{passive:!1}),()=>{oe.removeEventListener("touchmove",me)}},[f]);function X(){if(!y&&k.x===A.x&&k.y===A.y&&!x)return{[ll.swipeMovementX]:"0px",[ll.swipeMovementY]:"0px"};const oe=k.x-A.x,me=k.y-A.y;return{transition:y?"none":void 0,transform:y?`translateX(${k.x}px) translateY(${k.y}px) scale(${A.scale})`:void 0,[ll.swipeMovementX]:`${oe}px`,[ll.swipeMovementY]:`${me}px`}}const Z=n.priority==="high",ne={role:Z?"alertdialog":"dialog",tabIndex:0,"aria-modal":!1,"aria-labelledby":O,"aria-describedby":B,"aria-hidden":Z&&!ie?!0:void 0,onPointerDown:f?Re:void 0,onPointerMove:f?ce:void 0,onPointerUp:f?je:void 0,onKeyDown:We,inert:zS(n.limited),style:{...X(),[ll.index]:n.transitionStatus==="ending"?Y:J,[ll.offsetY]:`${H}px`,[ll.height]:n.height?`${n.height}px`:void 0}},xe=C.useMemo(()=>({rootRef:z,toast:n,titleId:O,setTitleId:$,descriptionId:B,setDescriptionId:j,swiping:y,swipeDirection:p,recalculateHeight:he,index:Y,visibleIndex:J,expanded:re}),[n,O,B,y,p,he,Y,J,re]),ge={transitionStatus:n.transitionStatus,expanded:re,limited:n.limited||!1,type:n.type,swiping:xe.swiping,swipeDirection:xe.swipeDirection},Ce=Dr("div",e,{ref:[t,xe.rootRef],state:ge,stateAttributesMapping:WK,props:[ne,a]});return E.jsx(sI.Provider,{value:xe,children:Ce})}),JK=C.forwardRef(function(e,t){const{render:n,className:r,id:i,children:o,...a}=e,{toast:u,setDescriptionId:c}=YK(),f=o??u.description,h=!!f,p=Jl(i);gt(()=>{if(h)return c(p),()=>{c(void 0)}},[h,p,c]);const m={type:u.type},y=Dr("p",e,{ref:t,state:m,props:{...a,id:p,children:f}});return h?y:null}),aI=()=>{const{toasts:e}=iI();return e.map(t=>E.jsx(ZK,{toast:t,className:nI.toast,render:E.jsx(zt,{"data-slot":"toast",children:E.jsx(Ie,{size:0,shade:"muted",render:E.jsx(JK,{})})})},t.id))};aI.displayName="ToastList";const lI=({position:e="bottom"})=>E.jsx(GK,{children:E.jsx(qK,{className:nI["toast-viewport"],"data-position":e,children:E.jsx(aI,{})})});lI.displayName="Toaster";const uI=C.createContext(void 0);function eX(){return C.useContext(uI)}const cI=C.createContext({hasProvider:!1,timeoutMs:0,delayRef:{current:0},initialDelayRef:{current:0},timeout:new Bi,currentIdRef:{current:null},currentContextRef:{current:null}});function tX(e){const{children:t,delay:n,timeoutMs:r=0}=e,i=C.useRef(n),o=C.useRef(n),a=C.useRef(null),u=C.useRef(null),c=Ea();return E.jsx(cI.Provider,{value:C.useMemo(()=>({hasProvider:!0,delayRef:i,initialDelayRef:o,currentIdRef:a,timeoutMs:r,currentContextRef:u,timeout:c}),[r,c]),children:t})}function nX(e,t={open:!1}){const n="rootStore"in e?e.rootStore:e,r=n.useState("floatingId"),{open:i}=t,o=C.useContext(cI),{currentIdRef:a,delayRef:u,timeoutMs:c,initialDelayRef:f,currentContextRef:h,hasProvider:p,timeout:m}=o,[y,b]=C.useState(!1);return gt(()=>{function v(){var S;b(!1),(S=h.current)==null||S.setIsInstantPhase(!1),a.current=null,h.current=null,u.current=f.current}if(a.current&&!i&&a.current===r){if(b(!1),c){const S=r;return m.start(c,()=>{n.select("open")||a.current&&a.current!==S||v()}),()=>{m.clear()}}v()}},[i,r,a,u,c,f,h,m,n]),gt(()=>{if(!i)return;const v=h.current,S=a.current;m.clear(),h.current={onOpenChange:n.setOpen,setIsInstantPhase:b},a.current=r,u.current={open:0,close:cg(f.current,"close")},S!==null&&S!==r?(b(!0),v==null||v.setIsInstantPhase(!0),v==null||v.onOpenChange(!1,qt(OS))):(b(!1),v==null||v.setIsInstantPhase(!1))},[i,r,n,a,u,c,f,h,m]),gt(()=>()=>{h.current=null},[h]),C.useMemo(()=>({hasProvider:p,delayRef:u,isInstantPhase:y}),[p,u,y])}const rX=function(e){const{delay:t,closeDelay:n,timeout:r=400}=e,i=C.useMemo(()=>({delay:t,closeDelay:n}),[t,n]),o=C.useMemo(()=>({open:t,close:n}),[t,n]);return E.jsx(uI.Provider,{value:i,children:E.jsx(tX,{delay:o,timeoutMs:r,children:e.children})})},fI=({children:e,...t})=>E.jsx(rX,{"data-slot":"tooltip-provider",...t,children:e});fI.displayName="TooltipProvider";const dI=C.createContext(void 0);function jy(e){const t=C.useContext(dI);if(t===void 0&&!e)throw new Error(An(72));return t}const iX={...IS,disabled:Ke(e=>e.disabled),instantType:Ke(e=>e.instantType),isInstantPhase:Ke(e=>e.isInstantPhase),trackCursorAxis:Ke(e=>e.trackCursorAxis),disableHoverablePopup:Ke(e=>e.disableHoverablePopup),lastOpenChangeReason:Ke(e=>e.openChangeReason),closeDelay:Ke(e=>e.closeDelay),hasViewport:Ke(e=>e.hasViewport)};let oX=class hI extends $h{constructor(n){super({...sX(),...n},{popupRef:C.createRef(),onOpenChange:void 0,onOpenChangeComplete:void 0,triggerElements:new Ih},iX);te(this,"setOpen",(n,r)=>{var f,h;const i=r.reason,o=i===Xn,a=n&&i===lg,u=!n&&(i===ka||i===Py);if(r.preventUnmountOnClose=()=>{this.set("preventUnmountingOnClose",!0)},(h=(f=this.context).onOpenChange)==null||h.call(f,n,r),r.isCanceled)return;const c=()=>{var y;const p={open:n,openChangeReason:i};a?p.instantType="focus":u?p.instantType="dismiss":i===Xn&&(p.instantType=void 0);const m=((y=r.trigger)==null?void 0:y.id)??null;(m||n)&&(p.activeTriggerId=m,p.activeTriggerElement=r.trigger??null),this.update(p)};o?yn.flushSync(c):c()})}static useStore(n,r){const i=fr(()=>new hI(r)).current,o=n??i,a=MS({popupStore:o,onOpenChange:o.setOpen});return o.state.floatingRootContext=a,o}};function sX(){return{...NS(),disabled:!1,instantType:void 0,isInstantPhase:!1,trackCursorAxis:"none",disableHoverablePopup:!1,openChangeReason:null,closeDelay:0,hasViewport:!1}}function aX(e,t){let n=null,r=null,i=!1;return{contextElement:e||void 0,getBoundingClientRect(){var y;const o=(e==null?void 0:e.getBoundingClientRect())||{width:0,height:0,x:0,y:0},a=t.axis==="x"||t.axis==="both",u=t.axis==="y"||t.axis==="both",c=["mouseenter","mousemove"].includes(((y=t.dataRef.current.openEvent)==null?void 0:y.type)||"")&&t.pointerType!=="touch";let f=o.width,h=o.height,p=o.x,m=o.y;return n==null&&t.x&&a&&(n=o.x-t.x),r==null&&t.y&&u&&(r=o.y-t.y),p-=n||0,m-=r||0,f=0,h=0,!i||c?(f=t.axis==="y"?o.width:0,h=t.axis==="x"?o.height:0,p=a&&t.x!=null?t.x:p,m=u&&t.y!=null?t.y:m):i&&!c&&(h=t.axis==="x"?o.height:h,f=t.axis==="y"?o.width:f),i=!0,{width:f,height:h,x:p,y:m,top:m,right:p+f,bottom:m+h,left:p}}}}function mD(e){return e!=null&&e.clientX!=null}function lX(e,t={}){const n="rootStore"in e?e.rootStore:e,r=n.useState("open"),i=n.useState("floatingElement"),o=n.useState("domReferenceElement"),a=n.context.dataRef,{enabled:u=!0,axis:c="both"}=t,f=C.useRef(!1),h=C.useRef(null),[p,m]=C.useState(),[y,b]=C.useState([]),v=tt((T,A,D)=>{f.current||a.current.openEvent&&!mD(a.current.openEvent)||n.set("positionReference",aX(D??o,{x:T,y:A,axis:c,dataRef:a,pointerType:p}))}),S=tt(T=>{r?h.current||b([]):v(T.clientX,T.clientY,T.currentTarget)}),x=zl(p)?i:r,_=C.useCallback(()=>{if(!x||!u)return;const T=fn(i);function A(D){const O=Vn(D);ct(i,O)?(T.removeEventListener("mousemove",A),h.current=null):v(D.clientX,D.clientY)}if(!a.current.openEvent||mD(a.current.openEvent)){T.addEventListener("mousemove",A);const D=()=>{T.removeEventListener("mousemove",A),h.current=null};return h.current=D,D}n.set("positionReference",o)},[x,u,i,a,o,n,v]);C.useEffect(()=>_(),[_,y]),C.useEffect(()=>{u&&!i&&(f.current=!1)},[u,i]),C.useEffect(()=>{!u&&r&&(f.current=!0)},[u,r]);const k=C.useMemo(()=>{function T(A){m(A.pointerType)}return{onPointerDown:T,onPointerEnter:T,onMouseMove:S,onMouseEnter:S}},[S]);return C.useMemo(()=>u?{reference:k,trigger:k}:{},[u,k])}const uX=PP(function(e){const{disabled:t=!1,defaultOpen:n=!1,open:r,disableHoverablePopup:i=!1,trackCursorAxis:o="none",actionsRef:a,onOpenChange:u,onOpenChangeComplete:c,handle:f,triggerId:h,defaultTriggerId:p=null,children:m}=e,y=oX.useStore(f==null?void 0:f.store,{open:n,openProp:r,activeTriggerId:p,triggerIdProp:h});SS(()=>{r===void 0&&y.state.open===!1&&n===!0&&y.update({open:!0,activeTriggerId:p})}),y.useControlledProp("openProp",r),y.useControlledProp("triggerIdProp",h),y.useContextCallback("onOpenChange",u),y.useContextCallback("onOpenChangeComplete",c);const b=y.useState("open"),v=!t&&b,S=y.useState("activeTriggerId"),x=y.useState("payload");y.useSyncedValues({trackCursorAxis:o,disableHoverablePopup:i}),gt(()=>{b&&t&&y.setOpen(!1,qt(Lq))},[b,t,y]),y.useSyncedValue("disabled",t),_S(y);const{forceUnmount:_,transitionStatus:k}=TS(v,y),T=y.useState("isInstantPhase"),A=y.useState("instantType"),D=y.useState("lastOpenChangeReason"),O=C.useRef(null);gt(()=>{k==="ending"&&D===OS||k!=="ending"&&T?(A!=="delay"&&(O.current=A),y.set("instantType","delay")):O.current!==null&&(y.set("instantType",O.current),O.current=null)},[k,T,D,A,y]),gt(()=>{v&&S==null&&y.set("payload",void 0)},[y,S,v]);const $=C.useCallback(()=>{y.setOpen(!1,cX(y,$S))},[y]);C.useImperativeHandle(a,()=>({unmount:_,close:$}),[_,$]);const B=y.useState("floatingRootContext"),j=PS(B,{enabled:!t,referencePress:!0}),N=lX(B,{enabled:!t&&o!=="none",axis:o==="none"?void 0:o}),{getReferenceProps:M,getFloatingProps:z,getTriggerProps:G}=Ph([j,N]),L=C.useMemo(()=>M(),[M]),F=C.useMemo(()=>G(),[G]),U=C.useMemo(()=>z(),[z]);return y.useSyncedValues({activeTriggerProps:L,inactiveTriggerProps:F,popupProps:U}),E.jsx(dI.Provider,{value:y,children:typeof m=="function"?m({payload:x}):m})});function cX(e,t){const n=qt(t);return n.preventUnmountOnClose=()=>{e.set("preventUnmountingOnClose",!0)},n}const pI=({children:e,...t})=>E.jsx(uX,{"data-slot":"tooltip-root",...t,children:e});pI.displayName="TooltipRoot";let fX=(function(e){return e[e.popupOpen=Lg.popupOpen]="popupOpen",e.triggerDisabled="data-trigger-disabled",e})({});const dX=600,lx=AV&&wP;function hX(e,t={}){const n="rootStore"in e?e.rootStore:e,{events:r,dataRef:i}=n.context,{enabled:o=!0,delay:a}=t,u=C.useRef(!1),c=C.useRef(null),f=Ea(),h=C.useRef(!0);C.useEffect(()=>{const m=n.select("domReferenceElement");if(!o)return;const y=fn(m);function b(){const x=n.select("domReferenceElement");!n.select("open")&&gn(x)&&x===Gr(Mt(x))&&(u.current=!0)}function v(){h.current=!0}function S(){h.current=!1}return y.addEventListener("blur",b),lx&&(y.addEventListener("keydown",v,!0),y.addEventListener("pointerdown",S,!0)),()=>{y.removeEventListener("blur",b),lx&&(y.removeEventListener("keydown",v,!0),y.removeEventListener("pointerdown",S,!0))}},[n,o]),C.useEffect(()=>{if(!o)return;function m(y){if(y.reason===ka||y.reason===Py){const b=n.select("domReferenceElement");Nt(b)&&(c.current=b,u.current=!0)}}return r.on("openchange",m),()=>{r.off("openchange",m)}},[r,o,n]);const p=C.useMemo(()=>({onMouseLeave(){u.current=!1,c.current=null},onFocus(m){const y=m.currentTarget;if(u.current){if(c.current===y)return;u.current=!1,c.current=null}const b=Vn(m.nativeEvent);if(Nt(b)){if(lx&&!m.relatedTarget){if(!h.current&&!$y(b))return}else if(!Ig(b))return}const v=Ng(m.relatedTarget,n.context.triggerElements),{nativeEvent:S,currentTarget:x}=m,_=typeof a=="function"?a():a;if(n.select("open")&&v||_===0||_===void 0){n.setOpen(!0,qt(lg,S,x));return}f.start(_,()=>{u.current||n.setOpen(!0,qt(lg,S,x))})},onBlur(m){u.current=!1,c.current=null;const y=m.relatedTarget,b=m.nativeEvent,v=Nt(y)&&y.hasAttribute(Lc("focus-guard"))&&y.getAttribute("data-type")==="outside";f.start(0,()=>{var _;const S=n.select("domReferenceElement"),x=Gr(S?S.ownerDocument:document);!y&&x===S||ct((_=i.current.floatingContext)==null?void 0:_.refs.floating.current,x)||ct(S,x)||v||Ng(y??x,n.context.triggerElements)||n.setOpen(!1,qt(lg,b))})}}),[i,n,f,a]);return C.useMemo(()=>o?{reference:p,trigger:p}:{},[o,p])}const pX=sq(function(e,t){const{className:n,render:r,handle:i,payload:o,disabled:a,delay:u,closeDelay:c,id:f,...h}=e,p=jy(!0),m=(i==null?void 0:i.store)??p;if(!m)throw new Error(An(82));const y=FS(f),b=m.useState("isTriggerActive",y),v=m.useState("isOpenedByTrigger",y),S=m.useState("floatingRootContext"),x=C.useRef(null),_=u??dX,k=c??0,{registerTrigger:T,isMountedByThisTrigger:A}=RS(y,x,m,{payload:o,closeDelay:k}),D=eX(),{delayRef:O,isInstantPhase:$,hasProvider:B}=nX(S,{open:v});m.useSyncedValue("isInstantPhase",$);const j=m.useState("disabled"),N=a??j,M=m.useState("trackCursorAxis"),z=m.useState("disableHoverablePopup"),G=_N(S,{enabled:!N,mouseOnly:!0,move:!1,handleClose:!z&&M!=="both"?TN():null,restMs(){const q=D==null?void 0:D.delay,W=typeof O.current=="object"?O.current.open:void 0;let I=_;return B&&(W!==0?I=u??q??_:I=0),I},delay(){const q=typeof O.current=="object"?O.current.close:void 0;let W=k;return c==null&&B&&(W=q),{close:W}},triggerElementRef:x,isActiveTrigger:b}),L=hX(S,{enabled:!N}).reference,F={open:v},U=m.useState("triggerProps",A);return Dr("button",e,{state:F,ref:[t,T,x],props:[G,L,U,{id:y,[fX.triggerDisabled]:N?"":void 0},h],stateAttributesMapping:jS})}),mI=({children:e,...t})=>{const n=C.isValidElement(e);return E.jsx(pX,{"data-slot":"tooltip-trigger",render:n?e:E.jsx("span",{role:"button",tabIndex:0,children:e}),...t,children:e})};mI.displayName="TooltipTrigger";const gI=C.createContext(void 0);function mX(){const e=C.useContext(gI);if(e===void 0)throw new Error(An(70));return e}const gX=C.forwardRef(function(e,t){const{keepMounted:n=!1,...r}=e;return jy().useState("mounted")||n?E.jsx(gI.Provider,{value:n,children:E.jsx(oI,{ref:t,...r})}):null}),yI=({children:e,...t})=>E.jsx(gX,{"data-slot":"tooltip-portal",...t,children:e});yI.displayName="TooltipPortal";const bI=C.createContext(void 0);function yX(){const e=C.useContext(bI);if(e===void 0)throw new Error(An(71));return e}const bX=C.forwardRef(function(e,t){const{render:n,className:r,anchor:i,positionMethod:o="absolute",side:a="top",align:u="center",sideOffset:c=0,alignOffset:f=0,collisionBoundary:h="clipping-ancestors",collisionPadding:p=5,arrowPadding:m=5,sticky:y=!1,disableAnchorTracking:b=!1,collisionAvoidance:v=QP,...S}=e,x=jy(),_=mX(),k=x.useState("open"),T=x.useState("mounted"),A=x.useState("trackCursorAxis"),D=x.useState("disableHoverablePopup"),O=x.useState("floatingRootContext"),$=x.useState("instantType"),B=x.useState("transitionStatus"),j=x.useState("hasViewport"),N=VN({anchor:i,positionMethod:o,floatingRootContext:O,mounted:T,side:a,sideOffset:c,align:u,alignOffset:f,collisionBoundary:h,collisionPadding:p,sticky:y,arrowPadding:m,disableAnchorTracking:b,keepMounted:_,collisionAvoidance:v,adaptiveOrigin:j?HN:void 0}),M=C.useMemo(()=>{const F={};return(!k||A==="both"||D)&&(F.pointerEvents="none"),{role:"presentation",hidden:!T,style:{...N.positionerStyles,...F}}},[k,A,D,T,N.positionerStyles]),z=C.useMemo(()=>({open:k,side:N.side,align:N.align,anchorHidden:N.anchorHidden,instant:A!=="none"?"tracking-cursor":$}),[k,N.side,N.align,N.anchorHidden,A,$]),G=C.useMemo(()=>({...z,arrowRef:N.arrowRef,arrowStyles:N.arrowStyles,arrowUncentered:N.arrowUncentered}),[z,N.arrowRef,N.arrowStyles,N.arrowUncentered]),L=Dr("div",e,{state:z,props:[M,Iy(B),S],ref:[t,x.useStateSetter("positionerElement")],stateAttributesMapping:tu});return E.jsx(bI.Provider,{value:G,children:L})}),vI=({children:e,...t})=>E.jsx(bX,{"data-slot":"tooltip-positioner",style:{zIndex:1e3},...t,children:e});vI.displayName="TooltipPositioner";const vX={...tu,...af},xX=C.forwardRef(function(e,t){const{className:n,render:r,...i}=e,o=jy(),{side:a,align:u}=yX(),c=o.useState("open"),f=o.useState("instantType"),h=o.useState("transitionStatus"),p=o.useState("popupProps"),m=o.useState("floatingRootContext");Oh({open:c,ref:o.context.popupRef,onComplete(){var v,S;c&&((S=(v=o.context).onOpenChangeComplete)==null||S.call(v,!0))}});const y=o.useState("disabled"),b=o.useState("closeDelay");return YN(m,{enabled:!y,closeDelay:b}),Dr("div",e,{state:{open:c,side:a,align:u,instant:f,transitionStatus:h},ref:[t,o.context.popupRef,o.useStateSetter("popupElement")],props:[p,Iy(h),i],stateAttributesMapping:vX})}),xI=({children:e,...t})=>E.jsx(xX,{"data-slot":"tooltip-popup",render:E.jsx(zt,{py:2,px:2,inverted:!0}),"data-is-popup":!0,...t,children:E.jsx(Ie,{size:-1,children:e})});xI.displayName="TooltipPopup";const Il=({trigger:e,delay:t,open:n,onOpenChange:r,ProviderProps:i,RootProps:o,TriggerProps:a,PortalProps:u,PositionerProps:c={sideOffset:8,collisionPadding:16},PopupProps:f,children:h})=>E.jsx(fI,{delay:t,...i,children:E.jsxs(pI,{open:n,onOpenChange:r,...o,children:[E.jsx(mI,{...a,children:e}),E.jsx(yI,{...u,children:E.jsx(vI,{...c,children:E.jsx(xI,{...f,children:h})})})]})});Il.displayName="Tooltip";const wI=({tooltip:e,children:t})=>E.jsx(Il,{"data-slot":"button-tooltip-wrapper",trigger:t,TriggerProps:{render:E.jsx("div",{})},delay:300,children:e});wI.displayName="ButtonTooltipWrapper";const Ei=({tooltip:e,shape:t,fullwidth:n,size:r,variant:i,loading:o,className:a,children:u,...c})=>E.jsx(er,{condition:!!e,render:E.jsx(wI,{tooltip:e}),children:E.jsx(qH,{nativeButton:!c.render,"data-slot":"button",className:ze(xr.button,yH({shape:t,size:r,variant:i,fullwidth:n}),a),...c,children:E.jsxs(yS,{ay:"center",ax:"center",children:[E.jsx(G$,{loading:o,children:u}),E.jsx(sP,{loading:o})]})})});Ei.displayName="Button";function wX({controlled:e,default:t,name:n,state:r="value"}){const{current:i}=C.useRef(e!==void 0),[o,a]=C.useState(t),u=i?e:o,c=C.useCallback(f=>{i||a(f)},[]);return[u,c]}let gD=0;function SX(e,t="mui"){const[n,r]=C.useState(e),i=e||n;return C.useEffect(()=>{n==null&&(gD+=1,r(`${t}-${gD}`))},[n,t]),i}const yD=EH.useId;function CX(e,t){if(yD!==void 0){const n=yD();return e??`${t}-${n}`}return SX(e,t)}function EX(e){return CX(e,"base-ui")}const kX=C.createContext(void 0);function RX(e=!0){const t=C.useContext(kX);if(t===void 0&&!e)throw new Error(xS(7));return t}const _X=C.createContext({register:()=>{},unregister:()=>{},subscribeMapChange:()=>()=>{},elementsRef:{current:[]},nextIndexRef:{current:0}});function TX(){return C.useContext(_X)}let AX=(function(e){return e[e.None=0]="None",e[e.GuessFromOrder=1]="GuessFromOrder",e})({});function DX(e={}){const{label:t,metadata:n,textRef:r,indexGuessBehavior:i,index:o}=e,{register:a,unregister:u,subscribeMapChange:c,elementsRef:f,labelsRef:h,nextIndexRef:p}=TX(),m=C.useRef(-1),[y,b]=C.useState(o??(i===AX.GuessFromOrder?()=>{if(m.current===-1){const x=p.current;p.current+=1,m.current=x}return m.current}:-1)),v=C.useRef(null),S=C.useCallback(x=>{var _;if(v.current=x,y!==-1&&x!==null&&(f.current[y]=x,h)){const k=t!==void 0;h.current[y]=k?t:((_=r==null?void 0:r.current)==null?void 0:_.textContent)??x.textContent}},[y,f,h,t,r]);return O1(()=>{if(o!=null)return;const x=v.current;if(x)return a(x,n),()=>{u(x)}},[o,a,u,n]),O1(()=>{if(o==null)return c(x=>{var k;const _=v.current?(k=x.get(v.current))==null?void 0:k.index:null;_!=null&&b(_)})},[o,c,b]),C.useMemo(()=>({ref:S,index:y}),[y,S])}function MX(e={}){const{highlightItemOnHover:t,highlightedIndex:n,onHighlightedIndexChange:r}=V$(),{ref:i,index:o}=DX(e),a=n===o,u=C.useRef(null),c=I1(i,u);return{compositeProps:C.useMemo(()=>({tabIndex:a?0:-1,onFocus(){r(o)},onMouseMove(){const f=u.current;if(!t||!f)return;const h=f.hasAttribute("disabled")||f.ariaDisabled==="true";!a&&!h&&f.focus()}}),[a,r,o,t]),compositeRef:c,index:o}}function OX(e){const{render:t,className:n,state:r=Vs,props:i=AA,refs:o=AA,metadata:a,stateAttributesMapping:u,tag:c="div",...f}=e,{compositeProps:h,compositeRef:p}=MX({metadata:a});return wS(c,e,{state:r,ref:[...o,p],props:[h,...i,f],stateAttributesMapping:u})}function $X(e,t,n,r){let i=!1,o=!1;const a=Vs;return{reason:e,event:t??new Event("base-ui"),cancel(){i=!0},allowPropagation(){o=!0},get isCanceled(){return i},get isPropagationAllowed(){return o},trigger:n,...a}}const PX="none",NX=C.forwardRef(function(e,t){const{className:n,defaultPressed:r=!1,disabled:i=!1,form:o,onPressedChange:a,pressed:u,render:c,type:f,value:h,nativeButton:p=!0,...m}=e,y=EX(h||void 0),b=RX(),v=(b==null?void 0:b.value)??[],S=b?void 0:r,x=(i||(b==null?void 0:b.disabled))??!1,[_,k]=wX({controlled:b?y!==void 0&&v.indexOf(y)>-1:u,default:S,name:"Toggle",state:"pressed"}),T=M1((N,M)=>{var z;y&&((z=b==null?void 0:b.setGroupValue)==null||z.call(b,y,N,M)),a==null||a(N,M)}),{getButtonProps:A,buttonRef:D}=K$({disabled:x,native:p}),O={disabled:x,pressed:_},$=[D,t],B=[{"aria-pressed":_,onClick(N){const M=!_,z=$X(PX,N.nativeEvent);T(M,z),!z.isCanceled&&k(M)}},m,A],j=wS("button",e,{enabled:!b,state:O,ref:$,props:B});return b?E.jsx(OX,{tag:"button",render:c,className:n,state:O,refs:$,props:B}):j}),ih=({text:e,icon:t,children:n,...r})=>E.jsx(NX,{...r,render:(i,o)=>{const a=o.pressed?e==null?void 0:e.pressed:e==null?void 0:e.unpressed,u=o.pressed?t==null?void 0:t.pressed:t==null?void 0:t.unpressed;return E.jsxs(Ei,{...i,children:[u,a??n]})}});ih.displayName="ToggleButton";const IX="_badge_qf71h_3",jX="_colored_qf71h_32",mc={badge:IX,"size-small":"_size-small_qf71h_21","size-medium":"_size-medium_qf71h_24","size-large":"_size-large_qf71h_27",colored:jX},LX=mc.colored,KS=Object.fromEntries(Object.entries(bS).map(([e,t])=>[e,`${t} ${LX}`])),FX=Dn({variants:{size:{small:mc["size-small"],medium:mc["size-medium"],large:mc["size-large"]},color:KS},defaultVariants:{size:"medium"}}),cn=({size:e,color:t,className:n,children:r,...i})=>E.jsx(Xe,{"data-slot":"badge",className:ze(mc.badge,FX({size:e,color:t}),n),ay:"center",gap:1,...i,children:E.jsx(Ie,{"data-slot":"badge-text",className:mc["badge-text"],size:-1,weight:"bold",children:r})});cn.displayName="Badge";const zX="_status_iof57_1",Yg={status:zX,"status-dot":"_status-dot_iof57_5","toggle-inverted":"_toggle-inverted_iof57_26","toggle-pulse":"_toggle-pulse_iof57_31"},BX=Dn({variants:{inverted:{true:Yg["toggle-inverted"]},pulse:{true:Yg["toggle-pulse"]},color:bS}}),Ly=({pulse:e,inverted:t,color:n,className:r,children:i,...o})=>E.jsxs(er,{condition:!!i,render:E.jsx(Xe,{"data-slot":"status",className:ze(Yg.status,r),ay:"center",gap:2,...o}),children:[E.jsx("span",{"data-slot":"status-dot","data-colored":n?"":void 0,className:ze(Yg["status-dot"],BX({pulse:e,inverted:t,color:n}))}),i&&E.jsx(Ie,{"data-slot":"status-text",size:0,children:i})]});Ly.displayName="Status";const bD={meta:"Meta",ctrl:"Control",alt:"Alt",shift:"Shift"},UX={meta:"⌘",ctrl:"⌃",alt:"⌥",shift:"⇧",enter:"↵",backspace:"⌫",delete:"⌦",escape:"⎋",tab:"⇥",space:"␣",arrowup:"↑",arrowdown:"↓",arrowleft:"←",arrowright:"→"};function HX(e){const t=new Set;let n="";for(const r of e){const i=r.toLowerCase();bD[i]?t.add(bD[i]):n=i}return{modifiers:t,key:n}}function GX(e,t){const{modifiers:n,key:r}=HX(t);return n.has("Meta")!==e.metaKey||n.has("Control")!==e.ctrlKey||n.has("Alt")!==e.altKey||n.has("Shift")!==e.shiftKey?!1:r?e.key.toLowerCase()===r:n.has(e.key)}function VX(e){return e.map(t=>UX[t.toLowerCase()]??t.toUpperCase()).join(" + ")}const qX="_kbd_19d6z_1",YX={kbd:qX},SI=({className:e,active:t,hotkey:n,...r})=>{const[i,o]=C.useState(!1);return C.useEffect(()=>{if(!n||t!==void 0)return;const a=f=>{GX(f,n)&&o(!0)},u=()=>o(!1),c=()=>o(!1);return window.addEventListener("keydown",a),window.addEventListener("keyup",u),window.addEventListener("blur",c),()=>{window.removeEventListener("keydown",a),window.removeEventListener("keyup",u),window.removeEventListener("blur",c)}},[n,t]),E.jsx("kbd",{"data-slot":"kbd","data-active":(t??i)||void 0,className:ze(YX.kbd,e),...r,children:n?VX(n):null})};SI.displayName="Kbd";const WX="_progress_ttyvd_1",qs={progress:WX,"progress-label":"_progress-label_ttyvd_11","progress-value":"_progress-value_ttyvd_18","progress-track":"_progress-track_ttyvd_27","progress-indicator":"_progress-indicator_ttyvd_35","size-small":"_size-small_ttyvd_43","size-medium":"_size-medium_ttyvd_46","size-large":"_size-large_ttyvd_49"},KX=Dn({variants:{size:{small:qs["size-small"],medium:qs["size-medium"],large:qs["size-large"]},color:KS},defaultVariants:{size:"medium"}}),XX=()=>{},CI=typeof document<"u"?C.useLayoutEffect:XX,vD={};function XS(e,t){const n=C.useRef(vD);return n.current===vD&&(n.current=e(t)),n}function QX(e){const t=XS(ZX,e).current;return t.next=e,CI(t.effect),t}function ZX(e){const t={current:e,next:e,effect:()=>{t.current=t.next}};return t}const xD=new Map;function JX(e,t){const n=JSON.stringify({locale:e,options:t}),r=xD.get(n);if(r)return r;const i=new Intl.NumberFormat(e,t);return xD.set(n,i),i}function wD(e,t,n){return e==null?"":JX(t,n).format(e)}function eQ(e,t,n){return e==null?"":n?wD(e,t,n):wD(e/100,t,{style:"percent"})}function EI(e,...t){const n=new URL("https://base-ui.com/production-error");return n.searchParams.set("code",e.toString()),t.forEach(r=>n.searchParams.append("args[]",r)),`Base UI error #${e}; visit ${n} for the full message.`}function SD(e,t,n,r){const i=XS(kI).current;return nQ(i,e,t,n,r)&&RI(i,[e,t,n,r]),i.callback}function tQ(e){const t=XS(kI).current;return rQ(t,e)&&RI(t,e),t.callback}function kI(){return{callback:null,cleanup:null,refs:[]}}function nQ(e,t,n,r,i){return e.refs[0]!==t||e.refs[1]!==n||e.refs[2]!==r||e.refs[3]!==i}function rQ(e,t){return e.refs.length!==t.length||e.refs.some((n,r)=>n!==t[r])}function RI(e,t){if(e.refs=t,t.every(n=>n==null)){e.callback=null;return}e.callback=n=>{if(e.cleanup&&(e.cleanup(),e.cleanup=null),n!=null){const r=Array(t.length).fill(null);for(let i=0;i<t.length;i+=1){const o=t[i];if(o!=null)switch(typeof o){case"function":{const a=o(n);typeof a=="function"&&(r[i]=a);break}case"object":{o.current=n;break}}}e.cleanup=()=>{for(let i=0;i<t.length;i+=1){const o=t[i];if(o!=null)switch(typeof o){case"function":{const a=r[i];typeof a=="function"?a():o(null);break}case"object":{o.current=null;break}}}}}}}const iQ=parseInt(C.version,10);function oQ(e){return iQ>=e}function CD(e){if(!C.isValidElement(e))return null;const t=e,n=t.props;return(oQ(19)?n==null?void 0:n.ref:t.ref)??null}function Z1(e,t){if(e&&!t)return e;if(!e&&t)return t;if(e||t)return{...e,...t}}function sQ(e,t){const n={};for(const r in e){const i=e[r];if(t!=null&&t.hasOwnProperty(r)){const o=t[r](i);o!=null&&Object.assign(n,o);continue}i===!0?n[`data-${r.toLowerCase()}`]="":i&&(n[`data-${r.toLowerCase()}`]=i.toString())}return n}function aQ(e,t){return typeof e=="function"?e(t):e}function lQ(e,t){return typeof e=="function"?e(t):e}const rc=Object.freeze({}),jd={};function uQ(e,t,n,r,i){let o={...J1(e,jd)};return t&&(o=_I(o,t)),o}function cQ(e){if(e.length===0)return jd;if(e.length===1)return J1(e[0],jd);let t={...J1(e[0],jd)};for(let n=1;n<e.length;n+=1)t=_I(t,e[n]);return t}function _I(e,t){return TI(t)?t(e):fQ(e,t)}function fQ(e,t){if(!t)return e;for(const n in t){const r=t[n];switch(n){case"style":{e[n]=Z1(e.style,r);break}case"className":{e[n]=AI(e.className,r);break}default:dQ(n,r)?e[n]=hQ(e[n],r):e[n]=r}}return e}function dQ(e,t){const n=e.charCodeAt(0),r=e.charCodeAt(1),i=e.charCodeAt(2);return n===111&&r===110&&i>=65&&i<=90&&(typeof t=="function"||typeof t>"u")}function TI(e){return typeof e=="function"}function J1(e,t){return TI(e)?e(t):e??jd}function hQ(e,t){return t?e?n=>{if(mQ(n)){const i=n;pQ(i);const o=t(i);return i.baseUIHandlerPrevented||(e==null||e(i)),o}const r=t(n);return e==null||e(n),r}:t:e}function pQ(e){return e.preventBaseUIHandler=()=>{e.baseUIHandlerPrevented=!0},e}function AI(e,t){return t?e?t+" "+e:t:e}function mQ(e){return e!=null&&typeof e=="object"&&"nativeEvent"in e}function Lh(e,t,n={}){const r=t.render,i=gQ(t,n);if(n.enabled===!1)return null;const o=n.state??rc;return bQ(e,r,i,o)}function gQ(e,t={}){const{className:n,style:r,render:i}=e,{state:o=rc,ref:a,props:u,stateAttributesMapping:c,enabled:f=!0}=t,h=f?aQ(n,o):void 0,p=f?lQ(r,o):void 0,m=f?sQ(o,c):rc,y=f?Z1(m,Array.isArray(u)?cQ(u):u)??rc:rc;return typeof document<"u"&&(f?Array.isArray(a)?y.ref=tQ([y.ref,CD(i),...a]):y.ref=SD(y.ref,CD(i),a):SD(null,null)),f?(h!==void 0&&(y.className=AI(y.className,h)),p!==void 0&&(y.style=Z1(y.style,p)),y):rc}const yQ=Symbol.for("react.lazy");function bQ(e,t,n,r){if(t){if(typeof t=="function")return t(n,r);const i=uQ(n,t.props);i.ref=n.ref;let o=t;return(o==null?void 0:o.$$typeof)===yQ&&(o=C.Children.toArray(t)[0]),C.cloneElement(o,i)}if(e&&typeof e=="string")return vQ(e,n);throw new Error(EI(8))}function vQ(e,t){return e==="button"?C.createElement("button",{type:"button",...t,key:t.key}):e==="img"?C.createElement("img",{alt:"",...t,key:t.key}):C.createElement(e,t)}const DI=C.createContext(void 0);function Fy(){const e=C.useContext(DI);if(e===void 0)throw new Error(EI(51));return e}let ux=(function(e){return e.complete="data-complete",e.indeterminate="data-indeterminate",e.progressing="data-progressing",e})({});const Fh={status(e){return e==="progressing"?{[ux.progressing]:""}:e==="complete"?{[ux.complete]:""}:e==="indeterminate"?{[ux.indeterminate]:""}:null}};function xQ(e,t){return t==null?"indeterminate progress":e||`${t}%`}const wQ=C.forwardRef(function(e,t){const{format:n,getAriaValueText:r=xQ,locale:i,max:o=100,min:a=0,value:u,render:c,className:f,...h}=e,[p,m]=C.useState(),y=QX(n);let b="indeterminate";Number.isFinite(u)&&(b=u===o?"complete":"progressing");const v=eQ(u,i,y.current),S=C.useMemo(()=>({status:b}),[b]),x={"aria-labelledby":p,"aria-valuemax":o,"aria-valuemin":a,"aria-valuenow":u??void 0,"aria-valuetext":r(v,u),role:"progressbar"},_=C.useMemo(()=>({formattedValue:v,max:o,min:a,setLabelId:m,state:S,status:b,value:u}),[v,o,a,m,S,b,u]),k=Lh("div",e,{state:S,ref:t,props:[x,h],stateAttributesMapping:Fh});return E.jsx(DI.Provider,{value:_,children:k})}),SQ={...as};let ED=0;function CQ(e,t="mui"){const[n,r]=C.useState(e),i=e||n;return C.useEffect(()=>{n==null&&(ED+=1,r(`${t}-${ED}`))},[n,t]),i}const kD=SQ.useId;function EQ(e,t){if(kD!==void 0){const n=kD();return e??`${t}-${n}`}return CQ(e,t)}function kQ(e){return EQ(e,"base-ui")}const RQ=C.forwardRef(function(e,t){const{render:n,className:r,id:i,...o}=e,a=kQ(i),{setLabelId:u,state:c}=Fy();return CI(()=>(u(a),()=>u(void 0)),[a,u]),Lh("span",e,{state:c,ref:t,props:[{id:a},o],stateAttributesMapping:Fh})}),_Q=C.forwardRef(function(e,t){const{className:n,render:r,children:i,...o}=e,{value:a,formattedValue:u,state:c}=Fy(),f=a==null?"indeterminate":u,h=a==null?null:u;return Lh("span",e,{state:c,ref:t,props:[{"aria-hidden":!0,children:typeof i=="function"?i(f,a):h},o],stateAttributesMapping:Fh})}),TQ=C.forwardRef(function(e,t){const{render:n,className:r,...i}=e,{state:o}=Fy();return Lh("div",e,{state:o,ref:t,props:i,stateAttributesMapping:Fh})});function AQ(e,t,n){return(e-t)*100/(n-t)}const DQ=C.forwardRef(function(e,t){const{render:n,className:r,...i}=e,{max:o,min:a,value:u,state:c}=Fy(),f=Number.isFinite(u)&&u!==null?AQ(u,a,o):null,h=C.useCallback(()=>f==null?{}:{insetInlineStart:0,height:"inherit",width:`${f}%`},[f]);return Lh("div",e,{state:c,ref:t,props:[{style:h()},i],stateAttributesMapping:Fh})}),QS=({value:e=0,label:t,size:n,color:r,className:i,RootProps:o,TrackProps:a,IndicatorProps:u,ValueProps:c,LabelProps:f})=>E.jsxs(wQ,{"data-slot":"progress",className:ze(qs.progress,KX({size:n,color:r}),i),value:e,...o,children:[t&&E.jsx(RQ,{"data-slot":"progress-label",className:qs["progress-label"],...f,children:t}),E.jsx(_Q,{"data-slot":"progress-value",className:qs["progress-value"],...c}),E.jsx(TQ,{"data-slot":"progress-track",className:qs["progress-track"],...a,children:E.jsx(DQ,{"data-slot":"progress-indicator",className:qs["progress-indicator"],...u})})]});QS.displayName="Progress";const ZS="Timeline",ew="TimelineItem",MQ="TimelineDot",RD="TimelineConnector",OQ="TimelineContent",$Q="vertical",JS=C.createContext(null);function PQ(e){const t=C.useContext(JS);if(!t)throw new Error(`\`${e}\` must be used within \`${ZS}\``);return t}const MI=C.createContext(null);function OI(e){const t=C.useContext(MI);if(!t)throw new Error(`\`${e}\` must be used within \`${ZS}\``);return t}const $I=C.createContext(null);function eC(e){const t=C.useContext($I);if(!t)throw new Error(`\`${e}\` must be used within \`${ew}\``);return t}const NQ=typeof window<"u"?C.useLayoutEffect:C.useEffect;function _D(e){const t=C.useRef(null);return t.current===null&&(t.current=e()),t}function PI(e){const t=C.useContext(JS);if(!t)throw new Error(`\`useStore\` must be used within \`${ZS}\``);const n=C.useCallback(()=>e(t),[t,e]);return C.useSyncExternalStore(t.subscribe,n,n)}function NI(e,t){return t===void 0?"pending":e<t?"completed":e===t?"active":"pending"}function TD(e){return e.sort((t,n)=>{const r=t[1].current,i=n[1].current;if(!r||!i)return 0;const o=r.compareDocumentPosition(i);return o&Node.DOCUMENT_POSITION_FOLLOWING?-1:o&Node.DOCUMENT_POSITION_PRECEDING?1:0})}const IQ="_timeline_vzu9j_1",jQ="_completed_vzu9j_40",ji={timeline:IQ,"timeline-item":"_timeline-item_vzu9j_7","timeline-dot":"_timeline-dot_vzu9j_12","timeline-connector":"_timeline-connector_vzu9j_35",completed:jQ,"orientation-vertical":"_orientation-vertical_vzu9j_48","orientation-horizontal":"_orientation-horizontal_vzu9j_55"},II=Dn({variants:{color:KS}}),LQ=Dn({base:ji["timeline-item"]}),FQ=Dn({base:ji["timeline-dot"],variants:{status:{completed:ji["status-completed"],active:ji["status-active"],pending:ji["status-pending"]}},defaultVariants:{status:"pending"}}),zQ=Dn({base:ji["timeline-connector"],variants:{isCompleted:{true:ji.completed},orientation:{vertical:ji["orientation-vertical"],horizontal:ji["orientation-horizontal"]}},defaultVariants:{isCompleted:!1,orientation:"vertical"}}),BQ=C.createContext(void 0);function UQ(){var e;return((e=C.useContext(BQ))==null?void 0:e.direction)??"ltr"}const jI=({className:e,id:t,ref:n,color:r,children:i,...o})=>{const{dir:a,orientation:u,activeIndex:c}=OI(ew),f=PQ(ew),h=C.useId(),p=t??h,m=C.useRef(null),y=qU(n,m),b=PI(_=>_.getItemIndex(p)),v=C.useMemo(()=>NI(b,c),[c,b]);NQ(()=>(f.onItemRegister(p,m),()=>{f.onItemUnregister(p)}),[t,f]);const S=C.useMemo(()=>({id:p,status:v}),[p,v]),x={role:"listitem","aria-current":v==="active"?"step":void 0,"data-slot":"timeline-item","data-status":v,"data-orientation":u,id:p,dir:a,ref:y,className:ze(LQ(),II({color:r}),e),...o};return E.jsx($I.Provider,{value:S,children:u==="vertical"?E.jsx(Xe,{gap:3,pb:4,...x,children:i}):E.jsx(Ye,{gap:3,...x,children:i})})};jI.displayName="TimelineItem";const LI=({className:e,children:t,...n})=>{const{status:r}=eC(MQ);return E.jsx("div",{"data-slot":"timeline-dot","data-status":r,className:ze(FQ({status:r}),e),...n,children:t})};LI.displayName="TimelineDot";const FI=({forceMount:e,className:t,children:n,...r})=>{const{orientation:i,activeIndex:o}=OI(RD),{id:a,status:u}=eC(RD),c=PI(h=>h.getNextItemStatus(a,o));if(!e&&c===void 0)return null;const f=c==="completed"||c==="active";return E.jsx("div",{"aria-hidden":"true","data-slot":"timeline-connector","data-completed":f?"":void 0,"data-status":u,"data-orientation":i,className:ze(zQ({isCompleted:f,orientation:i}),t),...r,children:n})};FI.displayName="TimelineConnector";const zI=({variant:e,children:t,...n})=>{const{status:r}=eC(OQ);return E.jsx(er,{condition:e==="card",render:E.jsx(zt,{}),children:E.jsx(Ye,{"data-slot":"timeline-content","data-status":r,gap:3,pb:2,pr:4,...n,children:t})})};zI.displayName="TimelineContent";const BI=({className:e,children:t,...n})=>E.jsx(Ie,{"data-slot":"timeline-title",className:ze(ji["timeline-title"],e),size:1,weight:"bold",...n,children:t});BI.displayName="TimelineTitle";const UI=({children:e,...t})=>E.jsx(Ie,{"data-slot":"timeline-time",render:E.jsx("time",{}),shade:"muted",size:-1,...t,children:e});UI.displayName="TimelineTime";const HI=({children:e,...t})=>E.jsx(Ie,{"data-slot":"timeline-description",shade:"muted",mt:1,...t,children:e});HI.displayName="TimelineDescription";function GI({orientation:e=$Q,dir:t,activeIndex:n,color:r,items:i,ItemProps:o,DotProps:a,ConnectorProps:u,ContentProps:c,TitleProps:f,DescriptionProps:h,TimeProps:p,className:m,children:y,...b}){const v=UQ(),S=t??v??"ltr",x=_D(()=>new Set),_=_D(()=>({items:new Map})),k=C.useMemo(()=>({subscribe:A=>(x.current.add(A),()=>x.current.delete(A)),getState:()=>_.current,notify:()=>{for(const A of x.current)A()},onItemRegister:(A,D)=>{_.current.items.set(A,D),k.notify()},onItemUnregister:A=>{_.current.items.delete(A),k.notify()},getNextItemStatus:(A,D)=>{const O=Array.from(_.current.items.entries()),$=TD(O),B=$.findIndex(([N])=>N===A);if(B===-1||B===$.length-1)return;const j=B+1;return NI(j,D)},getItemIndex:A=>{const D=Array.from(_.current.items.entries());return TD(D).findIndex(([O])=>O===A)}}),[x,_]),T=C.useMemo(()=>({dir:S,orientation:e,activeIndex:n}),[S,e,n]);return E.jsx(JS.Provider,{value:k,children:E.jsx(MI.Provider,{value:T,children:E.jsx(of,{"data-slot":"timeline",role:"list",className:ze(ji.timeline,II({color:r}),m),render:{true:E.jsx(Ye,{gap:2}),false:E.jsx(Xe,{gap:2})},condition:e==="vertical","aria-orientation":e,"data-orientation":e,dir:S,...b,children:i?i.map(({title:A,description:D,time:O,color:$,content:B},j)=>E.jsxs(jI,{color:$,...o,children:[E.jsx(LI,{...a}),E.jsx(FI,{...u}),E.jsxs(zI,{...c,children:[E.jsx(BI,{...f,children:A}),O&&E.jsx(UI,{...p,children:O}),D&&E.jsx(HI,{...h,children:D}),B]})]},j)):y})})})}GI.displayName="Timeline";const HQ="typescript",VI=!1,GQ=!0,VQ="",qI={javascript:"JavaScript",typescript:"TypeScript",jsx:"JSX",tsx:"TSX",json:"JSON",css:"CSS",html:"HTML",bash:"Bash",markdown:"Markdown",python:"Python"},Tm={"code-typography":"_code-typography_hkdop_4","shiki-theme":"_shiki-theme_hkdop_14","shiki-reset":"_shiki-reset_hkdop_24","line-numbers":"_line-numbers_hkdop_47"},qQ=Dn({base:[Tm["code-typography"],Tm["shiki-theme"],Tm["shiki-reset"]],variants:{showLineNumbers:{true:Tm["line-numbers"]}},defaultVariants:{showLineNumbers:VI}}),YQ="modulepreload",WQ=function(e){return"/"+e},AD={},Ur=function(t,n,r){let i=Promise.resolve();if(n&&n.length>0){let a=function(f){return Promise.all(f.map(h=>Promise.resolve(h).then(p=>({status:"fulfilled",value:p}),p=>({status:"rejected",reason:p}))))};document.getElementsByTagName("link");const u=document.querySelector("meta[property=csp-nonce]"),c=(u==null?void 0:u.nonce)||(u==null?void 0:u.getAttribute("nonce"));i=a(n.map(f=>{if(f=WQ(f),f in AD)return;AD[f]=!0;const h=f.endsWith(".css"),p=h?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${f}"]${p}`))return;const m=document.createElement("link");if(m.rel=h?"stylesheet":YQ,h||(m.as="script"),m.crossOrigin="",m.href=f,c&&m.setAttribute("nonce",c),document.head.appendChild(m),h)return new Promise((y,b)=>{m.addEventListener("load",y),m.addEventListener("error",()=>b(new Error(`Unable to preload CSS for ${f}`)))})}))}function o(a){const u=new Event("vite:preloadError",{cancelable:!0});if(u.payload=a,window.dispatchEvent(u),!u.defaultPrevented)throw a}return i.then(a=>{for(const u of a||[])u.status==="rejected"&&o(u.reason);return t().catch(o)})};let Nn=class extends Error{constructor(t){super(t),this.name="ShikiError"}};function KQ(e){return tC(e)}function tC(e){return Array.isArray(e)?XQ(e):e instanceof RegExp?e:typeof e=="object"?QQ(e):e}function XQ(e){let t=[];for(let n=0,r=e.length;n<r;n++)t[n]=tC(e[n]);return t}function QQ(e){let t={};for(let n in e)t[n]=tC(e[n]);return t}function YI(e,...t){return t.forEach(n=>{for(let r in n)e[r]=n[r]}),e}function WI(e){const t=~e.lastIndexOf("/")||~e.lastIndexOf("\\");return t===0?e:~t===e.length-1?WI(e.substring(0,e.length-1)):e.substr(~t+1)}var cx=/\$(\d+)|\${(\d+):\/(downcase|upcase)}/g,Am=class{static hasCaptures(e){return e===null?!1:(cx.lastIndex=0,cx.test(e))}static replaceCaptures(e,t,n){return e.replace(cx,(r,i,o,a)=>{let u=n[parseInt(i||o,10)];if(u){let c=t.substring(u.start,u.end);for(;c[0]===".";)c=c.substring(1);switch(a){case"downcase":return c.toLowerCase();case"upcase":return c.toUpperCase();default:return c}}else return r})}};function KI(e,t){return e<t?-1:e>t?1:0}function XI(e,t){if(e===null&&t===null)return 0;if(!e)return-1;if(!t)return 1;let n=e.length,r=t.length;if(n===r){for(let i=0;i<n;i++){let o=KI(e[i],t[i]);if(o!==0)return o}return 0}return n-r}function DD(e){return!!(/^#[0-9a-f]{6}$/i.test(e)||/^#[0-9a-f]{8}$/i.test(e)||/^#[0-9a-f]{3}$/i.test(e)||/^#[0-9a-f]{4}$/i.test(e))}function QI(e){return e.replace(/[\-\\\{\}\*\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&")}var ZI=class{constructor(e){te(this,"cache",new Map);this.fn=e}get(e){if(this.cache.has(e))return this.cache.get(e);const t=this.fn(e);return this.cache.set(e,t),t}},Wg=class{constructor(e,t,n){te(this,"_cachedMatchRoot",new ZI(e=>this._root.match(e)));this._colorMap=e,this._defaults=t,this._root=n}static createFromRawTheme(e,t){return this.createFromParsedTheme(eZ(e),t)}static createFromParsedTheme(e,t){return nZ(e,t)}getColorMap(){return this._colorMap.getColorMap()}getDefaults(){return this._defaults}match(e){if(e===null)return this._defaults;const t=e.scopeName,r=this._cachedMatchRoot.get(t).find(i=>ZQ(e.parent,i.parentScopes));return r?new JI(r.fontStyle,r.foreground,r.background):null}},fx=class hg{constructor(t,n){this.parent=t,this.scopeName=n}static push(t,n){for(const r of n)t=new hg(t,r);return t}static from(...t){let n=null;for(let r=0;r<t.length;r++)n=new hg(n,t[r]);return n}push(t){return new hg(this,t)}getSegments(){let t=this;const n=[];for(;t;)n.push(t.scopeName),t=t.parent;return n.reverse(),n}toString(){return this.getSegments().join(" ")}extends(t){return this===t?!0:this.parent===null?!1:this.parent.extends(t)}getExtensionIfDefined(t){const n=[];let r=this;for(;r&&r!==t;)n.push(r.scopeName),r=r.parent;return r===t?n.reverse():void 0}};function ZQ(e,t){if(t.length===0)return!0;for(let n=0;n<t.length;n++){let r=t[n],i=!1;if(r===">"){if(n===t.length-1)return!1;r=t[++n],i=!0}for(;e&&!JQ(e.scopeName,r);){if(i)return!1;e=e.parent}if(!e)return!1;e=e.parent}return!0}function JQ(e,t){return t===e||e.startsWith(t)&&e[t.length]==="."}var JI=class{constructor(e,t,n){this.fontStyle=e,this.foregroundId=t,this.backgroundId=n}};function eZ(e){if(!e)return[];if(!e.settings||!Array.isArray(e.settings))return[];let t=e.settings,n=[],r=0;for(let i=0,o=t.length;i<o;i++){let a=t[i];if(!a.settings)continue;let u;if(typeof a.scope=="string"){let p=a.scope;p=p.replace(/^[,]+/,""),p=p.replace(/[,]+$/,""),u=p.split(",")}else Array.isArray(a.scope)?u=a.scope:u=[""];let c=-1;if(typeof a.settings.fontStyle=="string"){c=0;let p=a.settings.fontStyle.split(" ");for(let m=0,y=p.length;m<y;m++)switch(p[m]){case"italic":c=c|1;break;case"bold":c=c|2;break;case"underline":c=c|4;break;case"strikethrough":c=c|8;break}}let f=null;typeof a.settings.foreground=="string"&&DD(a.settings.foreground)&&(f=a.settings.foreground);let h=null;typeof a.settings.background=="string"&&DD(a.settings.background)&&(h=a.settings.background);for(let p=0,m=u.length;p<m;p++){let b=u[p].trim().split(" "),v=b[b.length-1],S=null;b.length>1&&(S=b.slice(0,b.length-1),S.reverse()),n[r++]=new tZ(v,S,i,c,f,h)}}return n}var tZ=class{constructor(e,t,n,r,i,o){this.scope=e,this.parentScopes=t,this.index=n,this.fontStyle=r,this.foreground=i,this.background=o}},Qn=(e=>(e[e.NotSet=-1]="NotSet",e[e.None=0]="None",e[e.Italic=1]="Italic",e[e.Bold=2]="Bold",e[e.Underline=4]="Underline",e[e.Strikethrough=8]="Strikethrough",e))(Qn||{});function nZ(e,t){e.sort((c,f)=>{let h=KI(c.scope,f.scope);return h!==0||(h=XI(c.parentScopes,f.parentScopes),h!==0)?h:c.index-f.index});let n=0,r="#000000",i="#ffffff";for(;e.length>=1&&e[0].scope==="";){let c=e.shift();c.fontStyle!==-1&&(n=c.fontStyle),c.foreground!==null&&(r=c.foreground),c.background!==null&&(i=c.background)}let o=new rZ(t),a=new JI(n,o.getId(r),o.getId(i)),u=new oZ(new tw(0,null,-1,0,0),[]);for(let c=0,f=e.length;c<f;c++){let h=e[c];u.insert(0,h.scope,h.parentScopes,h.fontStyle,o.getId(h.foreground),o.getId(h.background))}return new Wg(o,a,u)}var rZ=class{constructor(e){te(this,"_isFrozen");te(this,"_lastColorId");te(this,"_id2color");te(this,"_color2id");if(this._lastColorId=0,this._id2color=[],this._color2id=Object.create(null),Array.isArray(e)){this._isFrozen=!0;for(let t=0,n=e.length;t<n;t++)this._color2id[e[t]]=t,this._id2color[t]=e[t]}else this._isFrozen=!1}getId(e){if(e===null)return 0;e=e.toUpperCase();let t=this._color2id[e];if(t)return t;if(this._isFrozen)throw new Error(`Missing color in color map - ${e}`);return t=++this._lastColorId,this._color2id[e]=t,this._id2color[t]=e,t}getColorMap(){return this._id2color.slice(0)}},iZ=Object.freeze([]),tw=class ej{constructor(t,n,r,i,o){te(this,"scopeDepth");te(this,"parentScopes");te(this,"fontStyle");te(this,"foreground");te(this,"background");this.scopeDepth=t,this.parentScopes=n||iZ,this.fontStyle=r,this.foreground=i,this.background=o}clone(){return new ej(this.scopeDepth,this.parentScopes,this.fontStyle,this.foreground,this.background)}static cloneArr(t){let n=[];for(let r=0,i=t.length;r<i;r++)n[r]=t[r].clone();return n}acceptOverwrite(t,n,r,i){this.scopeDepth>t?console.log("how did this happen?"):this.scopeDepth=t,n!==-1&&(this.fontStyle=n),r!==0&&(this.foreground=r),i!==0&&(this.background=i)}},oZ=class nw{constructor(t,n=[],r={}){te(this,"_rulesWithParentScopes");this._mainRule=t,this._children=r,this._rulesWithParentScopes=n}static _cmpBySpecificity(t,n){if(t.scopeDepth!==n.scopeDepth)return n.scopeDepth-t.scopeDepth;let r=0,i=0;for(;t.parentScopes[r]===">"&&r++,n.parentScopes[i]===">"&&i++,!(r>=t.parentScopes.length||i>=n.parentScopes.length);){const o=n.parentScopes[i].length-t.parentScopes[r].length;if(o!==0)return o;r++,i++}return n.parentScopes.length-t.parentScopes.length}match(t){if(t!==""){let r=t.indexOf("."),i,o;if(r===-1?(i=t,o=""):(i=t.substring(0,r),o=t.substring(r+1)),this._children.hasOwnProperty(i))return this._children[i].match(o)}const n=this._rulesWithParentScopes.concat(this._mainRule);return n.sort(nw._cmpBySpecificity),n}insert(t,n,r,i,o,a){if(n===""){this._doInsertHere(t,r,i,o,a);return}let u=n.indexOf("."),c,f;u===-1?(c=n,f=""):(c=n.substring(0,u),f=n.substring(u+1));let h;this._children.hasOwnProperty(c)?h=this._children[c]:(h=new nw(this._mainRule.clone(),tw.cloneArr(this._rulesWithParentScopes)),this._children[c]=h),h.insert(t+1,f,r,i,o,a)}_doInsertHere(t,n,r,i,o){if(n===null){this._mainRule.acceptOverwrite(t,r,i,o);return}for(let a=0,u=this._rulesWithParentScopes.length;a<u;a++){let c=this._rulesWithParentScopes[a];if(XI(c.parentScopes,n)===0){c.acceptOverwrite(t,r,i,o);return}}r===-1&&(r=this._mainRule.fontStyle),i===0&&(i=this._mainRule.foreground),o===0&&(o=this._mainRule.background),this._rulesWithParentScopes.push(new tw(t,n,r,i,o))}},Bc=class fi{static toBinaryStr(t){return t.toString(2).padStart(32,"0")}static print(t){const n=fi.getLanguageId(t),r=fi.getTokenType(t),i=fi.getFontStyle(t),o=fi.getForeground(t),a=fi.getBackground(t);console.log({languageId:n,tokenType:r,fontStyle:i,foreground:o,background:a})}static getLanguageId(t){return(t&255)>>>0}static getTokenType(t){return(t&768)>>>8}static containsBalancedBrackets(t){return(t&1024)!==0}static getFontStyle(t){return(t&30720)>>>11}static getForeground(t){return(t&16744448)>>>15}static getBackground(t){return(t&4278190080)>>>24}static set(t,n,r,i,o,a,u){let c=fi.getLanguageId(t),f=fi.getTokenType(t),h=fi.containsBalancedBrackets(t)?1:0,p=fi.getFontStyle(t),m=fi.getForeground(t),y=fi.getBackground(t);return n!==0&&(c=n),r!==8&&(f=r),i!==null&&(h=i?1:0),o!==-1&&(p=o),a!==0&&(m=a),u!==0&&(y=u),(c<<0|f<<8|h<<10|p<<11|m<<15|y<<24)>>>0}};function Kg(e,t){const n=[],r=sZ(e);let i=r.next();for(;i!==null;){let c=0;if(i.length===2&&i.charAt(1)===":"){switch(i.charAt(0)){case"R":c=1;break;case"L":c=-1;break;default:console.log(`Unknown priority ${i} in scope selector`)}i=r.next()}let f=a();if(n.push({matcher:f,priority:c}),i!==",")break;i=r.next()}return n;function o(){if(i==="-"){i=r.next();const c=o();return f=>!!c&&!c(f)}if(i==="("){i=r.next();const c=u();return i===")"&&(i=r.next()),c}if(MD(i)){const c=[];do c.push(i),i=r.next();while(MD(i));return f=>t(c,f)}return null}function a(){const c=[];let f=o();for(;f;)c.push(f),f=o();return h=>c.every(p=>p(h))}function u(){const c=[];let f=a();for(;f&&(c.push(f),i==="|"||i===",");){do i=r.next();while(i==="|"||i===",");f=a()}return h=>c.some(p=>p(h))}}function MD(e){return!!e&&!!e.match(/[\w\.:]+/)}function sZ(e){let t=/([LR]:|[\w\.:][\w\.:\-]*|[\,\|\-\(\)])/g,n=t.exec(e);return{next:()=>{if(!n)return null;const r=n[0];return n=t.exec(e),r}}}function tj(e){typeof e.dispose=="function"&&e.dispose()}var oh=class{constructor(e){this.scopeName=e}toKey(){return this.scopeName}},aZ=class{constructor(e,t){this.scopeName=e,this.ruleName=t}toKey(){return`${this.scopeName}#${this.ruleName}`}},lZ=class{constructor(){te(this,"_references",[]);te(this,"_seenReferenceKeys",new Set);te(this,"visitedRule",new Set)}get references(){return this._references}add(e){const t=e.toKey();this._seenReferenceKeys.has(t)||(this._seenReferenceKeys.add(t),this._references.push(e))}},uZ=class{constructor(e,t){te(this,"seenFullScopeRequests",new Set);te(this,"seenPartialScopeRequests",new Set);te(this,"Q");this.repo=e,this.initialScopeName=t,this.seenFullScopeRequests.add(this.initialScopeName),this.Q=[new oh(this.initialScopeName)]}processQueue(){const e=this.Q;this.Q=[];const t=new lZ;for(const n of e)cZ(n,this.initialScopeName,this.repo,t);for(const n of t.references)if(n instanceof oh){if(this.seenFullScopeRequests.has(n.scopeName))continue;this.seenFullScopeRequests.add(n.scopeName),this.Q.push(n)}else{if(this.seenFullScopeRequests.has(n.scopeName)||this.seenPartialScopeRequests.has(n.toKey()))continue;this.seenPartialScopeRequests.add(n.toKey()),this.Q.push(n)}}};function cZ(e,t,n,r){const i=n.lookup(e.scopeName);if(!i){if(e.scopeName===t)throw new Error(`No grammar provided for <${t}>`);return}const o=n.lookup(t);e instanceof oh?pg({baseGrammar:o,selfGrammar:i},r):rw(e.ruleName,{baseGrammar:o,selfGrammar:i,repository:i.repository},r);const a=n.injections(e.scopeName);if(a)for(const u of a)r.add(new oh(u))}function rw(e,t,n){if(t.repository&&t.repository[e]){const r=t.repository[e];Xg([r],t,n)}}function pg(e,t){e.selfGrammar.patterns&&Array.isArray(e.selfGrammar.patterns)&&Xg(e.selfGrammar.patterns,{...e,repository:e.selfGrammar.repository},t),e.selfGrammar.injections&&Xg(Object.values(e.selfGrammar.injections),{...e,repository:e.selfGrammar.repository},t)}function Xg(e,t,n){for(const r of e){if(n.visitedRule.has(r))continue;n.visitedRule.add(r);const i=r.repository?YI({},t.repository,r.repository):t.repository;Array.isArray(r.patterns)&&Xg(r.patterns,{...t,repository:i},n);const o=r.include;if(!o)continue;const a=nj(o);switch(a.kind){case 0:pg({...t,selfGrammar:t.baseGrammar},n);break;case 1:pg(t,n);break;case 2:rw(a.ruleName,{...t,repository:i},n);break;case 3:case 4:const u=a.scopeName===t.selfGrammar.scopeName?t.selfGrammar:a.scopeName===t.baseGrammar.scopeName?t.baseGrammar:void 0;if(u){const c={baseGrammar:t.baseGrammar,selfGrammar:u,repository:i};a.kind===4?rw(a.ruleName,c,n):pg(c,n)}else a.kind===4?n.add(new aZ(a.scopeName,a.ruleName)):n.add(new oh(a.scopeName));break}}}var fZ=class{constructor(){te(this,"kind",0)}},dZ=class{constructor(){te(this,"kind",1)}},hZ=class{constructor(e){te(this,"kind",2);this.ruleName=e}},pZ=class{constructor(e){te(this,"kind",3);this.scopeName=e}},mZ=class{constructor(e,t){te(this,"kind",4);this.scopeName=e,this.ruleName=t}};function nj(e){if(e==="$base")return new fZ;if(e==="$self")return new dZ;const t=e.indexOf("#");if(t===-1)return new pZ(e);if(t===0)return new hZ(e.substring(1));{const n=e.substring(0,t),r=e.substring(t+1);return new mZ(n,r)}}var gZ=/\\(\d+)/,OD=/\\(\d+)/g,yZ=-1,rj=-2;var zh=class{constructor(e,t,n,r){te(this,"$location");te(this,"id");te(this,"_nameIsCapturing");te(this,"_name");te(this,"_contentNameIsCapturing");te(this,"_contentName");this.$location=e,this.id=t,this._name=n||null,this._nameIsCapturing=Am.hasCaptures(this._name),this._contentName=r||null,this._contentNameIsCapturing=Am.hasCaptures(this._contentName)}get debugName(){const e=this.$location?`${WI(this.$location.filename)}:${this.$location.line}`:"unknown";return`${this.constructor.name}#${this.id} @ ${e}`}getName(e,t){return!this._nameIsCapturing||this._name===null||e===null||t===null?this._name:Am.replaceCaptures(this._name,e,t)}getContentName(e,t){return!this._contentNameIsCapturing||this._contentName===null?this._contentName:Am.replaceCaptures(this._contentName,e,t)}},bZ=class extends zh{constructor(t,n,r,i,o){super(t,n,r,i);te(this,"retokenizeCapturedWithRuleId");this.retokenizeCapturedWithRuleId=o}dispose(){}collectPatterns(t,n){throw new Error("Not supported!")}compile(t,n){throw new Error("Not supported!")}compileAG(t,n,r,i){throw new Error("Not supported!")}},vZ=class extends zh{constructor(t,n,r,i,o){super(t,n,r,null);te(this,"_match");te(this,"captures");te(this,"_cachedCompiledPatterns");this._match=new sh(i,this.id),this.captures=o,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}get debugMatchRegExp(){return`${this._match.source}`}collectPatterns(t,n){n.push(this._match)}compile(t,n){return this._getCachedCompiledPatterns(t).compile(t)}compileAG(t,n,r,i){return this._getCachedCompiledPatterns(t).compileAG(t,r,i)}_getCachedCompiledPatterns(t){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new ah,this.collectPatterns(t,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},$D=class extends zh{constructor(t,n,r,i,o){super(t,n,r,i);te(this,"hasMissingPatterns");te(this,"patterns");te(this,"_cachedCompiledPatterns");this.patterns=o.patterns,this.hasMissingPatterns=o.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}collectPatterns(t,n){for(const r of this.patterns)t.getRule(r).collectPatterns(t,n)}compile(t,n){return this._getCachedCompiledPatterns(t).compile(t)}compileAG(t,n,r,i){return this._getCachedCompiledPatterns(t).compileAG(t,r,i)}_getCachedCompiledPatterns(t){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new ah,this.collectPatterns(t,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},iw=class extends zh{constructor(t,n,r,i,o,a,u,c,f,h){super(t,n,r,i);te(this,"_begin");te(this,"beginCaptures");te(this,"_end");te(this,"endHasBackReferences");te(this,"endCaptures");te(this,"applyEndPatternLast");te(this,"hasMissingPatterns");te(this,"patterns");te(this,"_cachedCompiledPatterns");this._begin=new sh(o,this.id),this.beginCaptures=a,this._end=new sh(u||"",-1),this.endHasBackReferences=this._end.hasBackReferences,this.endCaptures=c,this.applyEndPatternLast=f||!1,this.patterns=h.patterns,this.hasMissingPatterns=h.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugEndRegExp(){return`${this._end.source}`}getEndWithResolvedBackReferences(t,n){return this._end.resolveBackReferences(t,n)}collectPatterns(t,n){n.push(this._begin)}compile(t,n){return this._getCachedCompiledPatterns(t,n).compile(t)}compileAG(t,n,r,i){return this._getCachedCompiledPatterns(t,n).compileAG(t,r,i)}_getCachedCompiledPatterns(t,n){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new ah;for(const r of this.patterns)t.getRule(r).collectPatterns(t,this._cachedCompiledPatterns);this.applyEndPatternLast?this._cachedCompiledPatterns.push(this._end.hasBackReferences?this._end.clone():this._end):this._cachedCompiledPatterns.unshift(this._end.hasBackReferences?this._end.clone():this._end)}return this._end.hasBackReferences&&(this.applyEndPatternLast?this._cachedCompiledPatterns.setSource(this._cachedCompiledPatterns.length()-1,n):this._cachedCompiledPatterns.setSource(0,n)),this._cachedCompiledPatterns}},Qg=class extends zh{constructor(t,n,r,i,o,a,u,c,f){super(t,n,r,i);te(this,"_begin");te(this,"beginCaptures");te(this,"whileCaptures");te(this,"_while");te(this,"whileHasBackReferences");te(this,"hasMissingPatterns");te(this,"patterns");te(this,"_cachedCompiledPatterns");te(this,"_cachedCompiledWhilePatterns");this._begin=new sh(o,this.id),this.beginCaptures=a,this.whileCaptures=c,this._while=new sh(u,rj),this.whileHasBackReferences=this._while.hasBackReferences,this.patterns=f.patterns,this.hasMissingPatterns=f.hasMissingPatterns,this._cachedCompiledPatterns=null,this._cachedCompiledWhilePatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null),this._cachedCompiledWhilePatterns&&(this._cachedCompiledWhilePatterns.dispose(),this._cachedCompiledWhilePatterns=null)}get debugBeginRegExp(){return`${this._begin.source}`}get debugWhileRegExp(){return`${this._while.source}`}getWhileWithResolvedBackReferences(t,n){return this._while.resolveBackReferences(t,n)}collectPatterns(t,n){n.push(this._begin)}compile(t,n){return this._getCachedCompiledPatterns(t).compile(t)}compileAG(t,n,r,i){return this._getCachedCompiledPatterns(t).compileAG(t,r,i)}_getCachedCompiledPatterns(t){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new ah;for(const n of this.patterns)t.getRule(n).collectPatterns(t,this._cachedCompiledPatterns)}return this._cachedCompiledPatterns}compileWhile(t,n){return this._getCachedCompiledWhilePatterns(t,n).compile(t)}compileWhileAG(t,n,r,i){return this._getCachedCompiledWhilePatterns(t,n).compileAG(t,r,i)}_getCachedCompiledWhilePatterns(t,n){return this._cachedCompiledWhilePatterns||(this._cachedCompiledWhilePatterns=new ah,this._cachedCompiledWhilePatterns.push(this._while.hasBackReferences?this._while.clone():this._while)),this._while.hasBackReferences&&this._cachedCompiledWhilePatterns.setSource(0,n||""),this._cachedCompiledWhilePatterns}},ij=class Wn{static createCaptureRule(t,n,r,i,o){return t.registerRule(a=>new bZ(n,a,r,i,o))}static getCompiledRuleId(t,n,r){return t.id||n.registerRule(i=>{if(t.id=i,t.match)return new vZ(t.$vscodeTextmateLocation,t.id,t.name,t.match,Wn._compileCaptures(t.captures,n,r));if(typeof t.begin>"u"){t.repository&&(r=YI({},r,t.repository));let o=t.patterns;return typeof o>"u"&&t.include&&(o=[{include:t.include}]),new $D(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,Wn._compilePatterns(o,n,r))}return t.while?new Qg(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,t.begin,Wn._compileCaptures(t.beginCaptures||t.captures,n,r),t.while,Wn._compileCaptures(t.whileCaptures||t.captures,n,r),Wn._compilePatterns(t.patterns,n,r)):new iw(t.$vscodeTextmateLocation,t.id,t.name,t.contentName,t.begin,Wn._compileCaptures(t.beginCaptures||t.captures,n,r),t.end,Wn._compileCaptures(t.endCaptures||t.captures,n,r),t.applyEndPatternLast,Wn._compilePatterns(t.patterns,n,r))}),t.id}static _compileCaptures(t,n,r){let i=[];if(t){let o=0;for(const a in t){if(a==="$vscodeTextmateLocation")continue;const u=parseInt(a,10);u>o&&(o=u)}for(let a=0;a<=o;a++)i[a]=null;for(const a in t){if(a==="$vscodeTextmateLocation")continue;const u=parseInt(a,10);let c=0;t[a].patterns&&(c=Wn.getCompiledRuleId(t[a],n,r)),i[u]=Wn.createCaptureRule(n,t[a].$vscodeTextmateLocation,t[a].name,t[a].contentName,c)}}return i}static _compilePatterns(t,n,r){let i=[];if(t)for(let o=0,a=t.length;o<a;o++){const u=t[o];let c=-1;if(u.include){const f=nj(u.include);switch(f.kind){case 0:case 1:c=Wn.getCompiledRuleId(r[u.include],n,r);break;case 2:let h=r[f.ruleName];h&&(c=Wn.getCompiledRuleId(h,n,r));break;case 3:case 4:const p=f.scopeName,m=f.kind===4?f.ruleName:null,y=n.getExternalGrammar(p,r);if(y)if(m){let b=y.repository[m];b&&(c=Wn.getCompiledRuleId(b,n,y.repository))}else c=Wn.getCompiledRuleId(y.repository.$self,n,y.repository);break}}else c=Wn.getCompiledRuleId(u,n,r);if(c!==-1){const f=n.getRule(c);let h=!1;if((f instanceof $D||f instanceof iw||f instanceof Qg)&&f.hasMissingPatterns&&f.patterns.length===0&&(h=!0),h)continue;i.push(c)}}return{patterns:i,hasMissingPatterns:(t?t.length:0)!==i.length}}},sh=class oj{constructor(t,n){te(this,"source");te(this,"ruleId");te(this,"hasAnchor");te(this,"hasBackReferences");te(this,"_anchorCache");if(t&&typeof t=="string"){const r=t.length;let i=0,o=[],a=!1;for(let u=0;u<r;u++)if(t.charAt(u)==="\\"&&u+1<r){const f=t.charAt(u+1);f==="z"?(o.push(t.substring(i,u)),o.push("$(?!\\n)(?<!\\n)"),i=u+2):(f==="A"||f==="G")&&(a=!0),u++}this.hasAnchor=a,i===0?this.source=t:(o.push(t.substring(i,r)),this.source=o.join(""))}else this.hasAnchor=!1,this.source=t;this.hasAnchor?this._anchorCache=this._buildAnchorCache():this._anchorCache=null,this.ruleId=n,typeof this.source=="string"?this.hasBackReferences=gZ.test(this.source):this.hasBackReferences=!1}clone(){return new oj(this.source,this.ruleId)}setSource(t){this.source!==t&&(this.source=t,this.hasAnchor&&(this._anchorCache=this._buildAnchorCache()))}resolveBackReferences(t,n){if(typeof this.source!="string")throw new Error("This method should only be called if the source is a string");let r=n.map(i=>t.substring(i.start,i.end));return OD.lastIndex=0,this.source.replace(OD,(i,o)=>QI(r[parseInt(o,10)]||""))}_buildAnchorCache(){if(typeof this.source!="string")throw new Error("This method should only be called if the source is a string");let t=[],n=[],r=[],i=[],o,a,u,c;for(o=0,a=this.source.length;o<a;o++)u=this.source.charAt(o),t[o]=u,n[o]=u,r[o]=u,i[o]=u,u==="\\"&&o+1<a&&(c=this.source.charAt(o+1),c==="A"?(t[o+1]="",n[o+1]="",r[o+1]="A",i[o+1]="A"):c==="G"?(t[o+1]="",n[o+1]="G",r[o+1]="",i[o+1]="G"):(t[o+1]=c,n[o+1]=c,r[o+1]=c,i[o+1]=c),o++);return{A0_G0:t.join(""),A0_G1:n.join(""),A1_G0:r.join(""),A1_G1:i.join("")}}resolveAnchors(t,n){return!this.hasAnchor||!this._anchorCache||typeof this.source!="string"?this.source:t?n?this._anchorCache.A1_G1:this._anchorCache.A1_G0:n?this._anchorCache.A0_G1:this._anchorCache.A0_G0}},ah=class{constructor(){te(this,"_items");te(this,"_hasAnchors");te(this,"_cached");te(this,"_anchorCache");this._items=[],this._hasAnchors=!1,this._cached=null,this._anchorCache={A0_G0:null,A0_G1:null,A1_G0:null,A1_G1:null}}dispose(){this._disposeCaches()}_disposeCaches(){this._cached&&(this._cached.dispose(),this._cached=null),this._anchorCache.A0_G0&&(this._anchorCache.A0_G0.dispose(),this._anchorCache.A0_G0=null),this._anchorCache.A0_G1&&(this._anchorCache.A0_G1.dispose(),this._anchorCache.A0_G1=null),this._anchorCache.A1_G0&&(this._anchorCache.A1_G0.dispose(),this._anchorCache.A1_G0=null),this._anchorCache.A1_G1&&(this._anchorCache.A1_G1.dispose(),this._anchorCache.A1_G1=null)}push(e){this._items.push(e),this._hasAnchors=this._hasAnchors||e.hasAnchor}unshift(e){this._items.unshift(e),this._hasAnchors=this._hasAnchors||e.hasAnchor}length(){return this._items.length}setSource(e,t){this._items[e].source!==t&&(this._disposeCaches(),this._items[e].setSource(t))}compile(e){if(!this._cached){let t=this._items.map(n=>n.source);this._cached=new PD(e,t,this._items.map(n=>n.ruleId))}return this._cached}compileAG(e,t,n){return this._hasAnchors?t?n?(this._anchorCache.A1_G1||(this._anchorCache.A1_G1=this._resolveAnchors(e,t,n)),this._anchorCache.A1_G1):(this._anchorCache.A1_G0||(this._anchorCache.A1_G0=this._resolveAnchors(e,t,n)),this._anchorCache.A1_G0):n?(this._anchorCache.A0_G1||(this._anchorCache.A0_G1=this._resolveAnchors(e,t,n)),this._anchorCache.A0_G1):(this._anchorCache.A0_G0||(this._anchorCache.A0_G0=this._resolveAnchors(e,t,n)),this._anchorCache.A0_G0):this.compile(e)}_resolveAnchors(e,t,n){let r=this._items.map(i=>i.resolveAnchors(t,n));return new PD(e,r,this._items.map(i=>i.ruleId))}},PD=class{constructor(e,t,n){te(this,"scanner");this.regExps=t,this.rules=n,this.scanner=e.createOnigScanner(t)}dispose(){typeof this.scanner.dispose=="function"&&this.scanner.dispose()}toString(){const e=[];for(let t=0,n=this.rules.length;t<n;t++)e.push(" - "+this.rules[t]+": "+this.regExps[t]);return e.join(`
|
|
313
|
-
`)}findNextMatchSync(e,t,n){const r=this.scanner.findNextMatchSync(e,t,n);return r?{ruleId:this.rules[r.index],captureIndices:r.captureIndices}:null}},dx=class{constructor(e,t){this.languageId=e,this.tokenType=t}},Vo,xZ=(Vo=class{constructor(t,n){te(this,"_defaultAttributes");te(this,"_embeddedLanguagesMatcher");te(this,"_getBasicScopeAttributes",new ZI(t=>{const n=this._scopeToLanguage(t),r=this._toStandardTokenType(t);return new dx(n,r)}));this._defaultAttributes=new dx(t,8),this._embeddedLanguagesMatcher=new wZ(Object.entries(n||{}))}getDefaultAttributes(){return this._defaultAttributes}getBasicScopeAttributes(t){return t===null?Vo._NULL_SCOPE_METADATA:this._getBasicScopeAttributes.get(t)}_scopeToLanguage(t){return this._embeddedLanguagesMatcher.match(t)||0}_toStandardTokenType(t){const n=t.match(Vo.STANDARD_TOKEN_TYPE_REGEXP);if(!n)return 8;switch(n[1]){case"comment":return 1;case"string":return 2;case"regex":return 3;case"meta.embedded":return 0}throw new Error("Unexpected match for standard token type!")}},te(Vo,"_NULL_SCOPE_METADATA",new dx(0,0)),te(Vo,"STANDARD_TOKEN_TYPE_REGEXP",/\b(comment|string|regex|meta\.embedded)\b/),Vo),wZ=class{constructor(e){te(this,"values");te(this,"scopesRegExp");if(e.length===0)this.values=null,this.scopesRegExp=null;else{this.values=new Map(e);const t=e.map(([n,r])=>QI(n));t.sort(),t.reverse(),this.scopesRegExp=new RegExp(`^((${t.join(")|(")}))($|\\.)`,"")}}match(e){if(!this.scopesRegExp)return;const t=e.match(this.scopesRegExp);if(t)return this.values.get(t[1])}},ND=class{constructor(e,t){this.stack=e,this.stoppedEarly=t}};function sj(e,t,n,r,i,o,a,u){const c=t.content.length;let f=!1,h=-1;if(a){const y=SZ(e,t,n,r,i,o);i=y.stack,r=y.linePos,n=y.isFirstLine,h=y.anchorPosition}const p=Date.now();for(;!f;){if(u!==0&&Date.now()-p>u)return new ND(i,!0);m()}return new ND(i,!1);function m(){const y=CZ(e,t,n,r,i,h);if(!y){o.produce(i,c),f=!0;return}const b=y.captureIndices,v=y.matchedRuleId,S=b&&b.length>0?b[0].end>r:!1;if(v===yZ){const x=i.getRule(e);o.produce(i,b[0].start),i=i.withContentNameScopesList(i.nameScopesList),$d(e,t,n,i,o,x.endCaptures,b),o.produce(i,b[0].end);const _=i;if(i=i.parent,h=_.getAnchorPos(),!S&&_.getEnterPos()===r){i=_,o.produce(i,c),f=!0;return}}else{const x=e.getRule(v);o.produce(i,b[0].start);const _=i,k=x.getName(t.content,b),T=i.contentNameScopesList.pushAttributed(k,e);if(i=i.push(v,r,h,b[0].end===c,null,T,T),x instanceof iw){const A=x;$d(e,t,n,i,o,A.beginCaptures,b),o.produce(i,b[0].end),h=b[0].end;const D=A.getContentName(t.content,b),O=T.pushAttributed(D,e);if(i=i.withContentNameScopesList(O),A.endHasBackReferences&&(i=i.withEndRule(A.getEndWithResolvedBackReferences(t.content,b))),!S&&_.hasSameRuleAs(i)){i=i.pop(),o.produce(i,c),f=!0;return}}else if(x instanceof Qg){const A=x;$d(e,t,n,i,o,A.beginCaptures,b),o.produce(i,b[0].end),h=b[0].end;const D=A.getContentName(t.content,b),O=T.pushAttributed(D,e);if(i=i.withContentNameScopesList(O),A.whileHasBackReferences&&(i=i.withEndRule(A.getWhileWithResolvedBackReferences(t.content,b))),!S&&_.hasSameRuleAs(i)){i=i.pop(),o.produce(i,c),f=!0;return}}else if($d(e,t,n,i,o,x.captures,b),o.produce(i,b[0].end),i=i.pop(),!S){i=i.safePop(),o.produce(i,c),f=!0;return}}b[0].end>r&&(r=b[0].end,n=!1)}}function SZ(e,t,n,r,i,o){let a=i.beginRuleCapturedEOL?0:-1;const u=[];for(let c=i;c;c=c.pop()){const f=c.getRule(e);f instanceof Qg&&u.push({rule:f,stack:c})}for(let c=u.pop();c;c=u.pop()){const{ruleScanner:f,findOptions:h}=RZ(c.rule,e,c.stack.endRule,n,r===a),p=f.findNextMatchSync(t,r,h);if(p){if(p.ruleId!==rj){i=c.stack.pop();break}p.captureIndices&&p.captureIndices.length&&(o.produce(c.stack,p.captureIndices[0].start),$d(e,t,n,c.stack,o,c.rule.whileCaptures,p.captureIndices),o.produce(c.stack,p.captureIndices[0].end),a=p.captureIndices[0].end,p.captureIndices[0].end>r&&(r=p.captureIndices[0].end,n=!1))}else{i=c.stack.pop();break}}return{stack:i,linePos:r,anchorPosition:a,isFirstLine:n}}function CZ(e,t,n,r,i,o){const a=EZ(e,t,n,r,i,o),u=e.getInjections();if(u.length===0)return a;const c=kZ(u,e,t,n,r,i,o);if(!c)return a;if(!a)return c;const f=a.captureIndices[0].start,h=c.captureIndices[0].start;return h<f||c.priorityMatch&&h===f?c:a}function EZ(e,t,n,r,i,o){const a=i.getRule(e),{ruleScanner:u,findOptions:c}=aj(a,e,i.endRule,n,r===o),f=u.findNextMatchSync(t,r,c);return f?{captureIndices:f.captureIndices,matchedRuleId:f.ruleId}:null}function kZ(e,t,n,r,i,o,a){let u=Number.MAX_VALUE,c=null,f,h=0;const p=o.contentNameScopesList.getScopeNames();for(let m=0,y=e.length;m<y;m++){const b=e[m];if(!b.matcher(p))continue;const v=t.getRule(b.ruleId),{ruleScanner:S,findOptions:x}=aj(v,t,null,r,i===a),_=S.findNextMatchSync(n,i,x);if(!_)continue;const k=_.captureIndices[0].start;if(!(k>=u)&&(u=k,c=_.captureIndices,f=_.ruleId,h=b.priority,u===i))break}return c?{priorityMatch:h===-1,captureIndices:c,matchedRuleId:f}:null}function aj(e,t,n,r,i){return{ruleScanner:e.compileAG(t,n,r,i),findOptions:0}}function RZ(e,t,n,r,i){return{ruleScanner:e.compileWhileAG(t,n,r,i),findOptions:0}}function $d(e,t,n,r,i,o,a){if(o.length===0)return;const u=t.content,c=Math.min(o.length,a.length),f=[],h=a[0].end;for(let p=0;p<c;p++){const m=o[p];if(m===null)continue;const y=a[p];if(y.length===0)continue;if(y.start>h)break;for(;f.length>0&&f[f.length-1].endPos<=y.start;)i.produceFromScopes(f[f.length-1].scopes,f[f.length-1].endPos),f.pop();if(f.length>0?i.produceFromScopes(f[f.length-1].scopes,y.start):i.produce(r,y.start),m.retokenizeCapturedWithRuleId){const v=m.getName(u,a),S=r.contentNameScopesList.pushAttributed(v,e),x=m.getContentName(u,a),_=S.pushAttributed(x,e),k=r.push(m.retokenizeCapturedWithRuleId,y.start,-1,!1,null,S,_),T=e.createOnigString(u.substring(0,y.end));sj(e,T,n&&y.start===0,y.start,k,i,!1,0),tj(T);continue}const b=m.getName(u,a);if(b!==null){const S=(f.length>0?f[f.length-1].scopes:r.contentNameScopesList).pushAttributed(b,e);f.push(new _Z(S,y.end))}}for(;f.length>0;)i.produceFromScopes(f[f.length-1].scopes,f[f.length-1].endPos),f.pop()}var _Z=class{constructor(e,t){te(this,"scopes");te(this,"endPos");this.scopes=e,this.endPos=t}};function TZ(e,t,n,r,i,o,a,u){return new DZ(e,t,n,r,i,o,a,u)}function ID(e,t,n,r,i){const o=Kg(t,Zg),a=ij.getCompiledRuleId(n,r,i.repository);for(const u of o)e.push({debugSelector:t,matcher:u.matcher,ruleId:a,grammar:i,priority:u.priority})}function Zg(e,t){if(t.length<e.length)return!1;let n=0;return e.every(r=>{for(let i=n;i<t.length;i++)if(AZ(t[i],r))return n=i+1,!0;return!1})}function AZ(e,t){if(!e)return!1;if(e===t)return!0;const n=t.length;return e.length>n&&e.substr(0,n)===t&&e[n]==="."}var DZ=class{constructor(e,t,n,r,i,o,a,u){te(this,"_rootId");te(this,"_lastRuleId");te(this,"_ruleId2desc");te(this,"_includedGrammars");te(this,"_grammarRepository");te(this,"_grammar");te(this,"_injections");te(this,"_basicScopeAttributesProvider");te(this,"_tokenTypeMatchers");if(this._rootScopeName=e,this.balancedBracketSelectors=o,this._onigLib=u,this._basicScopeAttributesProvider=new xZ(n,r),this._rootId=-1,this._lastRuleId=0,this._ruleId2desc=[null],this._includedGrammars={},this._grammarRepository=a,this._grammar=jD(t,null),this._injections=null,this._tokenTypeMatchers=[],i)for(const c of Object.keys(i)){const f=Kg(c,Zg);for(const h of f)this._tokenTypeMatchers.push({matcher:h.matcher,type:i[c]})}}get themeProvider(){return this._grammarRepository}dispose(){for(const e of this._ruleId2desc)e&&e.dispose()}createOnigScanner(e){return this._onigLib.createOnigScanner(e)}createOnigString(e){return this._onigLib.createOnigString(e)}getMetadataForScope(e){return this._basicScopeAttributesProvider.getBasicScopeAttributes(e)}_collectInjections(){const e={lookup:i=>i===this._rootScopeName?this._grammar:this.getExternalGrammar(i),injections:i=>this._grammarRepository.injections(i)},t=[],n=this._rootScopeName,r=e.lookup(n);if(r){const i=r.injections;if(i)for(let a in i)ID(t,a,i[a],this,r);const o=this._grammarRepository.injections(n);o&&o.forEach(a=>{const u=this.getExternalGrammar(a);if(u){const c=u.injectionSelector;c&&ID(t,c,u,this,u)}})}return t.sort((i,o)=>i.priority-o.priority),t}getInjections(){return this._injections===null&&(this._injections=this._collectInjections()),this._injections}registerRule(e){const t=++this._lastRuleId,n=e(t);return this._ruleId2desc[t]=n,n}getRule(e){return this._ruleId2desc[e]}getExternalGrammar(e,t){if(this._includedGrammars[e])return this._includedGrammars[e];if(this._grammarRepository){const n=this._grammarRepository.lookup(e);if(n)return this._includedGrammars[e]=jD(n,t&&t.$base),this._includedGrammars[e]}}tokenizeLine(e,t,n=0){const r=this._tokenize(e,t,!1,n);return{tokens:r.lineTokens.getResult(r.ruleStack,r.lineLength),ruleStack:r.ruleStack,stoppedEarly:r.stoppedEarly}}tokenizeLine2(e,t,n=0){const r=this._tokenize(e,t,!0,n);return{tokens:r.lineTokens.getBinaryResult(r.ruleStack,r.lineLength),ruleStack:r.ruleStack,stoppedEarly:r.stoppedEarly}}_tokenize(e,t,n,r){this._rootId===-1&&(this._rootId=ij.getCompiledRuleId(this._grammar.repository.$self,this,this._grammar.repository),this.getInjections());let i;if(!t||t===ow.NULL){i=!0;const f=this._basicScopeAttributesProvider.getDefaultAttributes(),h=this.themeProvider.getDefaults(),p=Bc.set(0,f.languageId,f.tokenType,null,h.fontStyle,h.foregroundId,h.backgroundId),m=this.getRule(this._rootId).getName(null,null);let y;m?y=Ld.createRootAndLookUpScopeName(m,p,this):y=Ld.createRoot("unknown",p),t=new ow(null,this._rootId,-1,-1,!1,null,y,y)}else i=!1,t.reset();e=e+`
|
|
314
|
-
`;const o=this.createOnigString(e),a=o.content.length,u=new OZ(n,e,this._tokenTypeMatchers,this.balancedBracketSelectors),c=sj(this,o,i,0,t,u,!0,r);return tj(o),{lineLength:a,lineTokens:u,ruleStack:c.stack,stoppedEarly:c.stoppedEarly}}};function jD(e,t){return e=KQ(e),e.repository=e.repository||{},e.repository.$self={$vscodeTextmateLocation:e.$vscodeTextmateLocation,patterns:e.patterns,name:e.scopeName},e.repository.$base=t||e.repository.$self,e}var Ld=class Wi{constructor(t,n,r){this.parent=t,this.scopePath=n,this.tokenAttributes=r}static fromExtension(t,n){let r=t,i=(t==null?void 0:t.scopePath)??null;for(const o of n)i=fx.push(i,o.scopeNames),r=new Wi(r,i,o.encodedTokenAttributes);return r}static createRoot(t,n){return new Wi(null,new fx(null,t),n)}static createRootAndLookUpScopeName(t,n,r){const i=r.getMetadataForScope(t),o=new fx(null,t),a=r.themeProvider.themeMatch(o),u=Wi.mergeAttributes(n,i,a);return new Wi(null,o,u)}get scopeName(){return this.scopePath.scopeName}toString(){return this.getScopeNames().join(" ")}equals(t){return Wi.equals(this,t)}static equals(t,n){do{if(t===n||!t&&!n)return!0;if(!t||!n||t.scopeName!==n.scopeName||t.tokenAttributes!==n.tokenAttributes)return!1;t=t.parent,n=n.parent}while(!0)}static mergeAttributes(t,n,r){let i=-1,o=0,a=0;return r!==null&&(i=r.fontStyle,o=r.foregroundId,a=r.backgroundId),Bc.set(t,n.languageId,n.tokenType,null,i,o,a)}pushAttributed(t,n){if(t===null)return this;if(t.indexOf(" ")===-1)return Wi._pushAttributed(this,t,n);const r=t.split(/ /g);let i=this;for(const o of r)i=Wi._pushAttributed(i,o,n);return i}static _pushAttributed(t,n,r){const i=r.getMetadataForScope(n),o=t.scopePath.push(n),a=r.themeProvider.themeMatch(o),u=Wi.mergeAttributes(t.tokenAttributes,i,a);return new Wi(t,o,u)}getScopeNames(){return this.scopePath.getSegments()}getExtensionIfDefined(t){var i;const n=[];let r=this;for(;r&&r!==t;)n.push({encodedTokenAttributes:r.tokenAttributes,scopeNames:r.scopePath.getExtensionIfDefined(((i=r.parent)==null?void 0:i.scopePath)??null)}),r=r.parent;return r===t?n.reverse():void 0}},bi,ow=(bi=class{constructor(t,n,r,i,o,a,u,c){te(this,"_stackElementBrand");te(this,"_enterPos");te(this,"_anchorPos");te(this,"depth");this.parent=t,this.ruleId=n,this.beginRuleCapturedEOL=o,this.endRule=a,this.nameScopesList=u,this.contentNameScopesList=c,this.depth=this.parent?this.parent.depth+1:1,this._enterPos=r,this._anchorPos=i}equals(t){return t===null?!1:bi._equals(this,t)}static _equals(t,n){return t===n?!0:this._structuralEquals(t,n)?Ld.equals(t.contentNameScopesList,n.contentNameScopesList):!1}static _structuralEquals(t,n){do{if(t===n||!t&&!n)return!0;if(!t||!n||t.depth!==n.depth||t.ruleId!==n.ruleId||t.endRule!==n.endRule)return!1;t=t.parent,n=n.parent}while(!0)}clone(){return this}static _reset(t){for(;t;)t._enterPos=-1,t._anchorPos=-1,t=t.parent}reset(){bi._reset(this)}pop(){return this.parent}safePop(){return this.parent?this.parent:this}push(t,n,r,i,o,a,u){return new bi(this,t,n,r,i,o,a,u)}getEnterPos(){return this._enterPos}getAnchorPos(){return this._anchorPos}getRule(t){return t.getRule(this.ruleId)}toString(){const t=[];return this._writeString(t,0),"["+t.join(",")+"]"}_writeString(t,n){var r,i;return this.parent&&(n=this.parent._writeString(t,n)),t[n++]=`(${this.ruleId}, ${(r=this.nameScopesList)==null?void 0:r.toString()}, ${(i=this.contentNameScopesList)==null?void 0:i.toString()})`,n}withContentNameScopesList(t){return this.contentNameScopesList===t?this:this.parent.push(this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,this.endRule,this.nameScopesList,t)}withEndRule(t){return this.endRule===t?this:new bi(this.parent,this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,t,this.nameScopesList,this.contentNameScopesList)}hasSameRuleAs(t){let n=this;for(;n&&n._enterPos===t._enterPos;){if(n.ruleId===t.ruleId)return!0;n=n.parent}return!1}toStateStackFrame(){var t,n,r;return{ruleId:this.ruleId,beginRuleCapturedEOL:this.beginRuleCapturedEOL,endRule:this.endRule,nameScopesList:((n=this.nameScopesList)==null?void 0:n.getExtensionIfDefined(((t=this.parent)==null?void 0:t.nameScopesList)??null))??[],contentNameScopesList:((r=this.contentNameScopesList)==null?void 0:r.getExtensionIfDefined(this.nameScopesList))??[]}}static pushFrame(t,n){const r=Ld.fromExtension((t==null?void 0:t.nameScopesList)??null,n.nameScopesList);return new bi(t,n.ruleId,n.enterPos??-1,n.anchorPos??-1,n.beginRuleCapturedEOL,n.endRule,r,Ld.fromExtension(r,n.contentNameScopesList))}},te(bi,"NULL",new bi(null,0,0,0,!1,null,null,null)),bi),MZ=class{constructor(e,t){te(this,"balancedBracketScopes");te(this,"unbalancedBracketScopes");te(this,"allowAny",!1);this.balancedBracketScopes=e.flatMap(n=>n==="*"?(this.allowAny=!0,[]):Kg(n,Zg).map(r=>r.matcher)),this.unbalancedBracketScopes=t.flatMap(n=>Kg(n,Zg).map(r=>r.matcher))}get matchesAlways(){return this.allowAny&&this.unbalancedBracketScopes.length===0}get matchesNever(){return this.balancedBracketScopes.length===0&&!this.allowAny}match(e){for(const t of this.unbalancedBracketScopes)if(t(e))return!1;for(const t of this.balancedBracketScopes)if(t(e))return!0;return this.allowAny}},OZ=class{constructor(e,t,n,r){te(this,"_emitBinaryTokens");te(this,"_lineText");te(this,"_tokens");te(this,"_binaryTokens");te(this,"_lastTokenEndIndex");te(this,"_tokenTypeOverrides");this.balancedBracketSelectors=r,this._emitBinaryTokens=e,this._tokenTypeOverrides=n,this._lineText=null,this._tokens=[],this._binaryTokens=[],this._lastTokenEndIndex=0}produce(e,t){this.produceFromScopes(e.contentNameScopesList,t)}produceFromScopes(e,t){var r;if(this._lastTokenEndIndex>=t)return;if(this._emitBinaryTokens){let i=(e==null?void 0:e.tokenAttributes)??0,o=!1;if((r=this.balancedBracketSelectors)!=null&&r.matchesAlways&&(o=!0),this._tokenTypeOverrides.length>0||this.balancedBracketSelectors&&!this.balancedBracketSelectors.matchesAlways&&!this.balancedBracketSelectors.matchesNever){const a=(e==null?void 0:e.getScopeNames())??[];for(const u of this._tokenTypeOverrides)u.matcher(a)&&(i=Bc.set(i,0,u.type,null,-1,0,0));this.balancedBracketSelectors&&(o=this.balancedBracketSelectors.match(a))}if(o&&(i=Bc.set(i,0,8,o,-1,0,0)),this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-1]===i){this._lastTokenEndIndex=t;return}this._binaryTokens.push(this._lastTokenEndIndex),this._binaryTokens.push(i),this._lastTokenEndIndex=t;return}const n=(e==null?void 0:e.getScopeNames())??[];this._tokens.push({startIndex:this._lastTokenEndIndex,endIndex:t,scopes:n}),this._lastTokenEndIndex=t}getResult(e,t){return this._tokens.length>0&&this._tokens[this._tokens.length-1].startIndex===t-1&&this._tokens.pop(),this._tokens.length===0&&(this._lastTokenEndIndex=-1,this.produce(e,t),this._tokens[this._tokens.length-1].startIndex=0),this._tokens}getBinaryResult(e,t){this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-2]===t-1&&(this._binaryTokens.pop(),this._binaryTokens.pop()),this._binaryTokens.length===0&&(this._lastTokenEndIndex=-1,this.produce(e,t),this._binaryTokens[this._binaryTokens.length-2]=0);const n=new Uint32Array(this._binaryTokens.length);for(let r=0,i=this._binaryTokens.length;r<i;r++)n[r]=this._binaryTokens[r];return n}},$Z=class{constructor(e,t){te(this,"_grammars",new Map);te(this,"_rawGrammars",new Map);te(this,"_injectionGrammars",new Map);te(this,"_theme");this._onigLib=t,this._theme=e}dispose(){for(const e of this._grammars.values())e.dispose()}setTheme(e){this._theme=e}getColorMap(){return this._theme.getColorMap()}addGrammar(e,t){this._rawGrammars.set(e.scopeName,e),t&&this._injectionGrammars.set(e.scopeName,t)}lookup(e){return this._rawGrammars.get(e)}injections(e){return this._injectionGrammars.get(e)}getDefaults(){return this._theme.getDefaults()}themeMatch(e){return this._theme.match(e)}grammarForScopeName(e,t,n,r,i){if(!this._grammars.has(e)){let o=this._rawGrammars.get(e);if(!o)return null;this._grammars.set(e,TZ(e,o,t,n,r,i,this,this._onigLib))}return this._grammars.get(e)}},PZ=class{constructor(t){te(this,"_options");te(this,"_syncRegistry");te(this,"_ensureGrammarCache");this._options=t,this._syncRegistry=new $Z(Wg.createFromRawTheme(t.theme,t.colorMap),t.onigLib),this._ensureGrammarCache=new Map}dispose(){this._syncRegistry.dispose()}setTheme(t,n){this._syncRegistry.setTheme(Wg.createFromRawTheme(t,n))}getColorMap(){return this._syncRegistry.getColorMap()}loadGrammarWithEmbeddedLanguages(t,n,r){return this.loadGrammarWithConfiguration(t,n,{embeddedLanguages:r})}loadGrammarWithConfiguration(t,n,r){return this._loadGrammar(t,n,r.embeddedLanguages,r.tokenTypes,new MZ(r.balancedBracketSelectors||[],r.unbalancedBracketSelectors||[]))}loadGrammar(t){return this._loadGrammar(t,0,null,null,null)}_loadGrammar(t,n,r,i,o){const a=new uZ(this._syncRegistry,t);for(;a.Q.length>0;)a.Q.map(u=>this._loadSingleGrammar(u.scopeName)),a.processQueue();return this._grammarForScopeName(t,n,r,i,o)}_loadSingleGrammar(t){this._ensureGrammarCache.has(t)||(this._doLoadSingleGrammar(t),this._ensureGrammarCache.set(t,!0))}_doLoadSingleGrammar(t){const n=this._options.loadGrammar(t);if(n){const r=typeof this._options.getInjections=="function"?this._options.getInjections(t):void 0;this._syncRegistry.addGrammar(n,r)}}addGrammar(t,n=[],r=0,i=null){return this._syncRegistry.addGrammar(t,n),this._grammarForScopeName(t.scopeName,r,i)}_grammarForScopeName(t,n=0,r=null,i=null,o=null){return this._syncRegistry.grammarForScopeName(t,n,r,i,o)}},sw=ow.NULL;const NZ=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","keygen","link","meta","param","source","track","wbr"];class Bh{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}}Bh.prototype.normal={};Bh.prototype.property={};Bh.prototype.space=void 0;function lj(e,t){const n={},r={};for(const i of e)Object.assign(n,i.property),Object.assign(r,i.normal);return new Bh(n,r,t)}function aw(e){return e.toLowerCase()}class Mr{constructor(t,n){this.attribute=n,this.property=t}}Mr.prototype.attribute="";Mr.prototype.booleanish=!1;Mr.prototype.boolean=!1;Mr.prototype.commaOrSpaceSeparated=!1;Mr.prototype.commaSeparated=!1;Mr.prototype.defined=!1;Mr.prototype.mustUseProperty=!1;Mr.prototype.number=!1;Mr.prototype.overloadedBoolean=!1;Mr.prototype.property="";Mr.prototype.spaceSeparated=!1;Mr.prototype.space=void 0;let IZ=0;const lt=nu(),Cn=nu(),lw=nu(),Ae=nu(),Kt=nu(),gc=nu(),zr=nu();function nu(){return 2**++IZ}const uw=Object.freeze(Object.defineProperty({__proto__:null,boolean:lt,booleanish:Cn,commaOrSpaceSeparated:zr,commaSeparated:gc,number:Ae,overloadedBoolean:lw,spaceSeparated:Kt},Symbol.toStringTag,{value:"Module"})),hx=Object.keys(uw);class nC extends Mr{constructor(t,n,r,i){let o=-1;if(super(t,n),LD(this,"space",i),typeof r=="number")for(;++o<hx.length;){const a=hx[o];LD(this,hx[o],(r&uw[a])===uw[a])}}}nC.prototype.defined=!0;function LD(e,t,n){n&&(e[t]=n)}function ff(e){const t={},n={};for(const[r,i]of Object.entries(e.properties)){const o=new nC(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(o.mustUseProperty=!0),t[r]=o,n[aw(r)]=r,n[aw(o.attribute)]=r}return new Bh(t,n,e.space)}const uj=ff({properties:{ariaActiveDescendant:null,ariaAtomic:Cn,ariaAutoComplete:null,ariaBusy:Cn,ariaChecked:Cn,ariaColCount:Ae,ariaColIndex:Ae,ariaColSpan:Ae,ariaControls:Kt,ariaCurrent:null,ariaDescribedBy:Kt,ariaDetails:null,ariaDisabled:Cn,ariaDropEffect:Kt,ariaErrorMessage:null,ariaExpanded:Cn,ariaFlowTo:Kt,ariaGrabbed:Cn,ariaHasPopup:null,ariaHidden:Cn,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:Kt,ariaLevel:Ae,ariaLive:null,ariaModal:Cn,ariaMultiLine:Cn,ariaMultiSelectable:Cn,ariaOrientation:null,ariaOwns:Kt,ariaPlaceholder:null,ariaPosInSet:Ae,ariaPressed:Cn,ariaReadOnly:Cn,ariaRelevant:null,ariaRequired:Cn,ariaRoleDescription:Kt,ariaRowCount:Ae,ariaRowIndex:Ae,ariaRowSpan:Ae,ariaSelected:Cn,ariaSetSize:Ae,ariaSort:null,ariaValueMax:Ae,ariaValueMin:Ae,ariaValueNow:Ae,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function cj(e,t){return t in e?e[t]:t}function fj(e,t){return cj(e,t.toLowerCase())}const jZ=ff({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:gc,acceptCharset:Kt,accessKey:Kt,action:null,allow:null,allowFullScreen:lt,allowPaymentRequest:lt,allowUserMedia:lt,alt:null,as:null,async:lt,autoCapitalize:null,autoComplete:Kt,autoFocus:lt,autoPlay:lt,blocking:Kt,capture:null,charSet:null,checked:lt,cite:null,className:Kt,cols:Ae,colSpan:null,content:null,contentEditable:Cn,controls:lt,controlsList:Kt,coords:Ae|gc,crossOrigin:null,data:null,dateTime:null,decoding:null,default:lt,defer:lt,dir:null,dirName:null,disabled:lt,download:lw,draggable:Cn,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:lt,formTarget:null,headers:Kt,height:Ae,hidden:lw,high:Ae,href:null,hrefLang:null,htmlFor:Kt,httpEquiv:Kt,id:null,imageSizes:null,imageSrcSet:null,inert:lt,inputMode:null,integrity:null,is:null,isMap:lt,itemId:null,itemProp:Kt,itemRef:Kt,itemScope:lt,itemType:Kt,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:lt,low:Ae,manifest:null,max:null,maxLength:Ae,media:null,method:null,min:null,minLength:Ae,multiple:lt,muted:lt,name:null,nonce:null,noModule:lt,noValidate:lt,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:lt,optimum:Ae,pattern:null,ping:Kt,placeholder:null,playsInline:lt,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:lt,referrerPolicy:null,rel:Kt,required:lt,reversed:lt,rows:Ae,rowSpan:Ae,sandbox:Kt,scope:null,scoped:lt,seamless:lt,selected:lt,shadowRootClonable:lt,shadowRootDelegatesFocus:lt,shadowRootMode:null,shape:null,size:Ae,sizes:null,slot:null,span:Ae,spellCheck:Cn,src:null,srcDoc:null,srcLang:null,srcSet:null,start:Ae,step:null,style:null,tabIndex:Ae,target:null,title:null,translate:null,type:null,typeMustMatch:lt,useMap:null,value:Cn,width:Ae,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:Kt,axis:null,background:null,bgColor:null,border:Ae,borderColor:null,bottomMargin:Ae,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:lt,declare:lt,event:null,face:null,frame:null,frameBorder:null,hSpace:Ae,leftMargin:Ae,link:null,longDesc:null,lowSrc:null,marginHeight:Ae,marginWidth:Ae,noResize:lt,noHref:lt,noShade:lt,noWrap:lt,object:null,profile:null,prompt:null,rev:null,rightMargin:Ae,rules:null,scheme:null,scrolling:Cn,standby:null,summary:null,text:null,topMargin:Ae,valueType:null,version:null,vAlign:null,vLink:null,vSpace:Ae,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:lt,disableRemotePlayback:lt,prefix:null,property:null,results:Ae,security:null,unselectable:null},space:"html",transform:fj}),LZ=ff({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:zr,accentHeight:Ae,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:Ae,amplitude:Ae,arabicForm:null,ascent:Ae,attributeName:null,attributeType:null,azimuth:Ae,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:Ae,by:null,calcMode:null,capHeight:Ae,className:Kt,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:Ae,diffuseConstant:Ae,direction:null,display:null,dur:null,divisor:Ae,dominantBaseline:null,download:lt,dx:null,dy:null,edgeMode:null,editable:null,elevation:Ae,enableBackground:null,end:null,event:null,exponent:Ae,externalResourcesRequired:null,fill:null,fillOpacity:Ae,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:gc,g2:gc,glyphName:gc,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:Ae,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:Ae,horizOriginX:Ae,horizOriginY:Ae,id:null,ideographic:Ae,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:Ae,k:Ae,k1:Ae,k2:Ae,k3:Ae,k4:Ae,kernelMatrix:zr,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:Ae,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:Ae,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:Ae,overlineThickness:Ae,paintOrder:null,panose1:null,path:null,pathLength:Ae,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:Kt,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:Ae,pointsAtY:Ae,pointsAtZ:Ae,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:zr,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:zr,rev:zr,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:zr,requiredFeatures:zr,requiredFonts:zr,requiredFormats:zr,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:Ae,specularExponent:Ae,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:Ae,strikethroughThickness:Ae,string:null,stroke:null,strokeDashArray:zr,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:Ae,strokeOpacity:Ae,strokeWidth:null,style:null,surfaceScale:Ae,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:zr,tabIndex:Ae,tableValues:null,target:null,targetX:Ae,targetY:Ae,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:zr,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:Ae,underlineThickness:Ae,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:Ae,values:null,vAlphabetic:Ae,vMathematical:Ae,vectorEffect:null,vHanging:Ae,vIdeographic:Ae,version:null,vertAdvY:Ae,vertOriginX:Ae,vertOriginY:Ae,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:Ae,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:cj}),dj=ff({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(e,t){return"xlink:"+t.slice(5).toLowerCase()}}),hj=ff({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:fj}),pj=ff({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),FZ={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"},zZ=/[A-Z]/g,FD=/-[a-z]/g,BZ=/^data[-\w.:]+$/i;function mj(e,t){const n=aw(t);let r=t,i=Mr;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&BZ.test(t)){if(t.charAt(4)==="-"){const o=t.slice(5).replace(FD,HZ);r="data"+o.charAt(0).toUpperCase()+o.slice(1)}else{const o=t.slice(4);if(!FD.test(o)){let a=o.replace(zZ,UZ);a.charAt(0)!=="-"&&(a="-"+a),t="data"+a}}i=nC}return new i(r,t)}function UZ(e){return"-"+e.toLowerCase()}function HZ(e){return e.charAt(1).toUpperCase()}const gj=lj([uj,jZ,dj,hj,pj],"html"),Uh=lj([uj,LZ,dj,hj,pj],"svg"),zD={}.hasOwnProperty;function GZ(e,t){const n=t||{};function r(i,...o){let a=r.invalid;const u=r.handlers;if(i&&zD.call(i,e)){const c=String(i[e]);a=zD.call(u,c)?u[c]:r.unknown}if(a)return a.call(this,i,...o)}return r.handlers=n.handlers||{},r.invalid=n.invalid,r.unknown=n.unknown,r}const VZ=/["&'<>`]/g,qZ=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,YZ=/[\x01-\t\v\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g,WZ=/[|\\{}()[\]^$+*?.]/g,BD=new WeakMap;function KZ(e,t){if(e=e.replace(t.subset?XZ(t.subset):VZ,r),t.subset||t.escapeOnly)return e;return e.replace(qZ,n).replace(YZ,r);function n(i,o,a){return t.format((i.charCodeAt(0)-55296)*1024+i.charCodeAt(1)-56320+65536,a.charCodeAt(o+2),t)}function r(i,o,a){return t.format(i.charCodeAt(0),a.charCodeAt(o+1),t)}}function XZ(e){let t=BD.get(e);return t||(t=QZ(e),BD.set(e,t)),t}function QZ(e){const t=[];let n=-1;for(;++n<e.length;)t.push(e[n].replace(WZ,"\\$&"));return new RegExp("(?:"+t.join("|")+")","g")}const ZZ=/[\dA-Fa-f]/;function JZ(e,t,n){const r="&#x"+e.toString(16).toUpperCase();return n&&t&&!ZZ.test(String.fromCharCode(t))?r:r+";"}const eJ=/\d/;function tJ(e,t,n){const r="&#"+String(e);return n&&t&&!eJ.test(String.fromCharCode(t))?r:r+";"}const nJ=["AElig","AMP","Aacute","Acirc","Agrave","Aring","Atilde","Auml","COPY","Ccedil","ETH","Eacute","Ecirc","Egrave","Euml","GT","Iacute","Icirc","Igrave","Iuml","LT","Ntilde","Oacute","Ocirc","Ograve","Oslash","Otilde","Ouml","QUOT","REG","THORN","Uacute","Ucirc","Ugrave","Uuml","Yacute","aacute","acirc","acute","aelig","agrave","amp","aring","atilde","auml","brvbar","ccedil","cedil","cent","copy","curren","deg","divide","eacute","ecirc","egrave","eth","euml","frac12","frac14","frac34","gt","iacute","icirc","iexcl","igrave","iquest","iuml","laquo","lt","macr","micro","middot","nbsp","not","ntilde","oacute","ocirc","ograve","ordf","ordm","oslash","otilde","ouml","para","plusmn","pound","quot","raquo","reg","sect","shy","sup1","sup2","sup3","szlig","thorn","times","uacute","ucirc","ugrave","uml","uuml","yacute","yen","yuml"],px={nbsp:" ",iexcl:"¡",cent:"¢",pound:"£",curren:"¤",yen:"¥",brvbar:"¦",sect:"§",uml:"¨",copy:"©",ordf:"ª",laquo:"«",not:"¬",shy:"",reg:"®",macr:"¯",deg:"°",plusmn:"±",sup2:"²",sup3:"³",acute:"´",micro:"µ",para:"¶",middot:"·",cedil:"¸",sup1:"¹",ordm:"º",raquo:"»",frac14:"¼",frac12:"½",frac34:"¾",iquest:"¿",Agrave:"À",Aacute:"Á",Acirc:"Â",Atilde:"Ã",Auml:"Ä",Aring:"Å",AElig:"Æ",Ccedil:"Ç",Egrave:"È",Eacute:"É",Ecirc:"Ê",Euml:"Ë",Igrave:"Ì",Iacute:"Í",Icirc:"Î",Iuml:"Ï",ETH:"Ð",Ntilde:"Ñ",Ograve:"Ò",Oacute:"Ó",Ocirc:"Ô",Otilde:"Õ",Ouml:"Ö",times:"×",Oslash:"Ø",Ugrave:"Ù",Uacute:"Ú",Ucirc:"Û",Uuml:"Ü",Yacute:"Ý",THORN:"Þ",szlig:"ß",agrave:"à",aacute:"á",acirc:"â",atilde:"ã",auml:"ä",aring:"å",aelig:"æ",ccedil:"ç",egrave:"è",eacute:"é",ecirc:"ê",euml:"ë",igrave:"ì",iacute:"í",icirc:"î",iuml:"ï",eth:"ð",ntilde:"ñ",ograve:"ò",oacute:"ó",ocirc:"ô",otilde:"õ",ouml:"ö",divide:"÷",oslash:"ø",ugrave:"ù",uacute:"ú",ucirc:"û",uuml:"ü",yacute:"ý",thorn:"þ",yuml:"ÿ",fnof:"ƒ",Alpha:"Α",Beta:"Β",Gamma:"Γ",Delta:"Δ",Epsilon:"Ε",Zeta:"Ζ",Eta:"Η",Theta:"Θ",Iota:"Ι",Kappa:"Κ",Lambda:"Λ",Mu:"Μ",Nu:"Ν",Xi:"Ξ",Omicron:"Ο",Pi:"Π",Rho:"Ρ",Sigma:"Σ",Tau:"Τ",Upsilon:"Υ",Phi:"Φ",Chi:"Χ",Psi:"Ψ",Omega:"Ω",alpha:"α",beta:"β",gamma:"γ",delta:"δ",epsilon:"ε",zeta:"ζ",eta:"η",theta:"θ",iota:"ι",kappa:"κ",lambda:"λ",mu:"μ",nu:"ν",xi:"ξ",omicron:"ο",pi:"π",rho:"ρ",sigmaf:"ς",sigma:"σ",tau:"τ",upsilon:"υ",phi:"φ",chi:"χ",psi:"ψ",omega:"ω",thetasym:"ϑ",upsih:"ϒ",piv:"ϖ",bull:"•",hellip:"…",prime:"′",Prime:"″",oline:"‾",frasl:"⁄",weierp:"℘",image:"ℑ",real:"ℜ",trade:"™",alefsym:"ℵ",larr:"←",uarr:"↑",rarr:"→",darr:"↓",harr:"↔",crarr:"↵",lArr:"⇐",uArr:"⇑",rArr:"⇒",dArr:"⇓",hArr:"⇔",forall:"∀",part:"∂",exist:"∃",empty:"∅",nabla:"∇",isin:"∈",notin:"∉",ni:"∋",prod:"∏",sum:"∑",minus:"−",lowast:"∗",radic:"√",prop:"∝",infin:"∞",ang:"∠",and:"∧",or:"∨",cap:"∩",cup:"∪",int:"∫",there4:"∴",sim:"∼",cong:"≅",asymp:"≈",ne:"≠",equiv:"≡",le:"≤",ge:"≥",sub:"⊂",sup:"⊃",nsub:"⊄",sube:"⊆",supe:"⊇",oplus:"⊕",otimes:"⊗",perp:"⊥",sdot:"⋅",lceil:"⌈",rceil:"⌉",lfloor:"⌊",rfloor:"⌋",lang:"〈",rang:"〉",loz:"◊",spades:"♠",clubs:"♣",hearts:"♥",diams:"♦",quot:'"',amp:"&",lt:"<",gt:">",OElig:"Œ",oelig:"œ",Scaron:"Š",scaron:"š",Yuml:"Ÿ",circ:"ˆ",tilde:"˜",ensp:" ",emsp:" ",thinsp:" ",zwnj:"",zwj:"",lrm:"",rlm:"",ndash:"–",mdash:"—",lsquo:"‘",rsquo:"’",sbquo:"‚",ldquo:"“",rdquo:"”",bdquo:"„",dagger:"†",Dagger:"‡",permil:"‰",lsaquo:"‹",rsaquo:"›",euro:"€"},rJ=["cent","copy","divide","gt","lt","not","para","times"],yj={}.hasOwnProperty,cw={};let Dm;for(Dm in px)yj.call(px,Dm)&&(cw[px[Dm]]=Dm);const iJ=/[^\dA-Za-z]/;function oJ(e,t,n,r){const i=String.fromCharCode(e);if(yj.call(cw,i)){const o=cw[i],a="&"+o;return n&&nJ.includes(o)&&!rJ.includes(o)&&(!r||t&&t!==61&&iJ.test(String.fromCharCode(t)))?a:a+";"}return""}function sJ(e,t,n){let r=JZ(e,t,n.omitOptionalSemicolons),i;if((n.useNamedReferences||n.useShortestReferences)&&(i=oJ(e,t,n.omitOptionalSemicolons,n.attribute)),(n.useShortestReferences||!i)&&n.useShortestReferences){const o=tJ(e,t,n.omitOptionalSemicolons);o.length<r.length&&(r=o)}return i&&(!n.useShortestReferences||i.length<r.length)?i:r}function yc(e,t){return KZ(e,Object.assign({format:sJ},t))}const aJ=/^>|^->|<!--|-->|--!>|<!-$/g,lJ=[">"],uJ=["<",">"];function cJ(e,t,n,r){return r.settings.bogusComments?"<?"+yc(e.value,Object.assign({},r.settings.characterReferences,{subset:lJ}))+">":"<!--"+e.value.replace(aJ,i)+"-->";function i(o){return yc(o,Object.assign({},r.settings.characterReferences,{subset:uJ}))}}function fJ(e,t,n,r){return"<!"+(r.settings.upperDoctype?"DOCTYPE":"doctype")+(r.settings.tightDoctype?"":" ")+"html>"}function Jg(e,t){const n=String(e);if(typeof t!="string")throw new TypeError("Expected character");let r=0,i=n.indexOf(t);for(;i!==-1;)r++,i=n.indexOf(t,i+t.length);return r}function bj(e,t){const n=t||{};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}function vj(e){return e.join(" ").trim()}const dJ=/[ \t\n\f\r]/g;function zy(e){return typeof e=="object"?e.type==="text"?UD(e.value):!1:UD(e)}function UD(e){return e.replace(dJ,"")===""}const Mn=wj(1),xj=wj(-1),hJ=[];function wj(e){return t;function t(n,r,i){const o=n?n.children:hJ;let a=(r||0)+e,u=o[a];if(!i)for(;u&&zy(u);)a+=e,u=o[a];return u}}const pJ={}.hasOwnProperty;function Sj(e){return t;function t(n,r,i){return pJ.call(e,n.tagName)&&e[n.tagName](n,r,i)}}const rC=Sj({body:gJ,caption:mx,colgroup:mx,dd:xJ,dt:vJ,head:mx,html:mJ,li:bJ,optgroup:wJ,option:SJ,p:yJ,rp:HD,rt:HD,tbody:EJ,td:GD,tfoot:kJ,th:GD,thead:CJ,tr:RJ});function mx(e,t,n){const r=Mn(n,t,!0);return!r||r.type!=="comment"&&!(r.type==="text"&&zy(r.value.charAt(0)))}function mJ(e,t,n){const r=Mn(n,t);return!r||r.type!=="comment"}function gJ(e,t,n){const r=Mn(n,t);return!r||r.type!=="comment"}function yJ(e,t,n){const r=Mn(n,t);return r?r.type==="element"&&(r.tagName==="address"||r.tagName==="article"||r.tagName==="aside"||r.tagName==="blockquote"||r.tagName==="details"||r.tagName==="div"||r.tagName==="dl"||r.tagName==="fieldset"||r.tagName==="figcaption"||r.tagName==="figure"||r.tagName==="footer"||r.tagName==="form"||r.tagName==="h1"||r.tagName==="h2"||r.tagName==="h3"||r.tagName==="h4"||r.tagName==="h5"||r.tagName==="h6"||r.tagName==="header"||r.tagName==="hgroup"||r.tagName==="hr"||r.tagName==="main"||r.tagName==="menu"||r.tagName==="nav"||r.tagName==="ol"||r.tagName==="p"||r.tagName==="pre"||r.tagName==="section"||r.tagName==="table"||r.tagName==="ul"):!n||!(n.type==="element"&&(n.tagName==="a"||n.tagName==="audio"||n.tagName==="del"||n.tagName==="ins"||n.tagName==="map"||n.tagName==="noscript"||n.tagName==="video"))}function bJ(e,t,n){const r=Mn(n,t);return!r||r.type==="element"&&r.tagName==="li"}function vJ(e,t,n){const r=Mn(n,t);return!!(r&&r.type==="element"&&(r.tagName==="dt"||r.tagName==="dd"))}function xJ(e,t,n){const r=Mn(n,t);return!r||r.type==="element"&&(r.tagName==="dt"||r.tagName==="dd")}function HD(e,t,n){const r=Mn(n,t);return!r||r.type==="element"&&(r.tagName==="rp"||r.tagName==="rt")}function wJ(e,t,n){const r=Mn(n,t);return!r||r.type==="element"&&r.tagName==="optgroup"}function SJ(e,t,n){const r=Mn(n,t);return!r||r.type==="element"&&(r.tagName==="option"||r.tagName==="optgroup")}function CJ(e,t,n){const r=Mn(n,t);return!!(r&&r.type==="element"&&(r.tagName==="tbody"||r.tagName==="tfoot"))}function EJ(e,t,n){const r=Mn(n,t);return!r||r.type==="element"&&(r.tagName==="tbody"||r.tagName==="tfoot")}function kJ(e,t,n){return!Mn(n,t)}function RJ(e,t,n){const r=Mn(n,t);return!r||r.type==="element"&&r.tagName==="tr"}function GD(e,t,n){const r=Mn(n,t);return!r||r.type==="element"&&(r.tagName==="td"||r.tagName==="th")}const _J=Sj({body:DJ,colgroup:MJ,head:AJ,html:TJ,tbody:OJ});function TJ(e){const t=Mn(e,-1);return!t||t.type!=="comment"}function AJ(e){const t=new Set;for(const r of e.children)if(r.type==="element"&&(r.tagName==="base"||r.tagName==="title")){if(t.has(r.tagName))return!1;t.add(r.tagName)}const n=e.children[0];return!n||n.type==="element"}function DJ(e){const t=Mn(e,-1,!0);return!t||t.type!=="comment"&&!(t.type==="text"&&zy(t.value.charAt(0)))&&!(t.type==="element"&&(t.tagName==="meta"||t.tagName==="link"||t.tagName==="script"||t.tagName==="style"||t.tagName==="template"))}function MJ(e,t,n){const r=xj(n,t),i=Mn(e,-1,!0);return n&&r&&r.type==="element"&&r.tagName==="colgroup"&&rC(r,n.children.indexOf(r),n)?!1:!!(i&&i.type==="element"&&i.tagName==="col")}function OJ(e,t,n){const r=xj(n,t),i=Mn(e,-1);return n&&r&&r.type==="element"&&(r.tagName==="thead"||r.tagName==="tbody")&&rC(r,n.children.indexOf(r),n)?!1:!!(i&&i.type==="element"&&i.tagName==="tr")}const Mm={name:[[`
|
|
315
|
-
\f\r &/=>`.split(""),`
|
|
316
|
-
\f\r "&'/=>\``.split("")],[`\0
|
|
317
|
-
\f\r "&'/<=>`.split(""),`\0
|
|
318
|
-
\f\r "&'/<=>\``.split("")]],unquoted:[[`
|
|
319
|
-
\f\r &>`.split(""),`\0
|
|
320
|
-
\f\r "&'<=>\``.split("")],[`\0
|
|
321
|
-
\f\r "&'<=>\``.split(""),`\0
|
|
322
|
-
\f\r "&'<=>\``.split("")]],single:[["&'".split(""),"\"&'`".split("")],["\0&'".split(""),"\0\"&'`".split("")]],double:[['"&'.split(""),"\"&'`".split("")],['\0"&'.split(""),"\0\"&'`".split("")]]};function $J(e,t,n,r){const i=r.schema,o=i.space==="svg"?!1:r.settings.omitOptionalTags;let a=i.space==="svg"?r.settings.closeEmptyElements:r.settings.voids.includes(e.tagName.toLowerCase());const u=[];let c;i.space==="html"&&e.tagName==="svg"&&(r.schema=Uh);const f=PJ(r,e.properties),h=r.all(i.space==="html"&&e.tagName==="template"?e.content:e);return r.schema=i,h&&(a=!1),(f||!o||!_J(e,t,n))&&(u.push("<",e.tagName,f?" "+f:""),a&&(i.space==="svg"||r.settings.closeSelfClosing)&&(c=f.charAt(f.length-1),(!r.settings.tightSelfClosing||c==="/"||c&&c!=='"'&&c!=="'")&&u.push(" "),u.push("/")),u.push(">")),u.push(h),!a&&(!o||!rC(e,t,n))&&u.push("</"+e.tagName+">"),u.join("")}function PJ(e,t){const n=[];let r=-1,i;if(t){for(i in t)if(t[i]!==null&&t[i]!==void 0){const o=NJ(e,i,t[i]);o&&n.push(o)}}for(;++r<n.length;){const o=e.settings.tightAttributes?n[r].charAt(n[r].length-1):void 0;r!==n.length-1&&o!=='"'&&o!=="'"&&(n[r]+=" ")}return n.join("")}function NJ(e,t,n){const r=mj(e.schema,t),i=e.settings.allowParseErrors&&e.schema.space==="html"?0:1,o=e.settings.allowDangerousCharacters?0:1;let a=e.quote,u;if(r.overloadedBoolean&&(n===r.attribute||n==="")?n=!0:(r.boolean||r.overloadedBoolean)&&(typeof n!="string"||n===r.attribute||n==="")&&(n=!!n),n==null||n===!1||typeof n=="number"&&Number.isNaN(n))return"";const c=yc(r.attribute,Object.assign({},e.settings.characterReferences,{subset:Mm.name[i][o]}));return n===!0||(n=Array.isArray(n)?(r.commaSeparated?bj:vj)(n,{padLeft:!e.settings.tightCommaSeparatedLists}):String(n),e.settings.collapseEmptyAttributes&&!n)?c:(e.settings.preferUnquoted&&(u=yc(n,Object.assign({},e.settings.characterReferences,{attribute:!0,subset:Mm.unquoted[i][o]}))),u!==n&&(e.settings.quoteSmart&&Jg(n,a)>Jg(n,e.alternative)&&(a=e.alternative),u=a+yc(n,Object.assign({},e.settings.characterReferences,{subset:(a==="'"?Mm.single:Mm.double)[i][o],attribute:!0}))+a),c+(u&&"="+u))}const IJ=["<","&"];function Cj(e,t,n,r){return n&&n.type==="element"&&(n.tagName==="script"||n.tagName==="style")?e.value:yc(e.value,Object.assign({},r.settings.characterReferences,{subset:IJ}))}function jJ(e,t,n,r){return r.settings.allowDangerousHtml?e.value:Cj(e,t,n,r)}function LJ(e,t,n,r){return r.all(e)}const FJ=GZ("type",{invalid:zJ,unknown:BJ,handlers:{comment:cJ,doctype:fJ,element:$J,raw:jJ,root:LJ,text:Cj}});function zJ(e){throw new Error("Expected node, not `"+e+"`")}function BJ(e){const t=e;throw new Error("Cannot compile unknown node `"+t.type+"`")}const UJ={},HJ={},GJ=[];function VJ(e,t){const n=t||UJ,r=n.quote||'"',i=r==='"'?"'":'"';if(r!=='"'&&r!=="'")throw new Error("Invalid quote `"+r+"`, expected `'` or `\"`");return{one:qJ,all:YJ,settings:{omitOptionalTags:n.omitOptionalTags||!1,allowParseErrors:n.allowParseErrors||!1,allowDangerousCharacters:n.allowDangerousCharacters||!1,quoteSmart:n.quoteSmart||!1,preferUnquoted:n.preferUnquoted||!1,tightAttributes:n.tightAttributes||!1,upperDoctype:n.upperDoctype||!1,tightDoctype:n.tightDoctype||!1,bogusComments:n.bogusComments||!1,tightCommaSeparatedLists:n.tightCommaSeparatedLists||!1,tightSelfClosing:n.tightSelfClosing||!1,collapseEmptyAttributes:n.collapseEmptyAttributes||!1,allowDangerousHtml:n.allowDangerousHtml||!1,voids:n.voids||NZ,characterReferences:n.characterReferences||HJ,closeSelfClosing:n.closeSelfClosing||!1,closeEmptyElements:n.closeEmptyElements||!1},schema:n.space==="svg"?Uh:gj,quote:r,alternative:i}.one(Array.isArray(e)?{type:"root",children:e}:e,void 0,void 0)}function qJ(e,t,n){return FJ(e,t,n,this)}function YJ(e){const t=[],n=e&&e.children||GJ;let r=-1;for(;++r<n.length;)t[r]=this.one(n[r],r,e);return t.join("")}function ey(e,t){const n=typeof e=="string"?{}:{...e.colorReplacements},r=typeof e=="string"?e:e.name;for(const[i,o]of Object.entries((t==null?void 0:t.colorReplacements)||{}))typeof o=="string"?n[i]=o:i===r&&Object.assign(n,o);return n}function pa(e,t){return e&&((t==null?void 0:t[e==null?void 0:e.toLowerCase()])||e)}function WJ(e){return Array.isArray(e)?e:[e]}async function Ej(e){return Promise.resolve(typeof e=="function"?e():e).then(t=>t.default||t)}function iC(e){return!e||["plaintext","txt","text","plain"].includes(e)}function KJ(e){return e==="ansi"||iC(e)}function oC(e){return e==="none"}function XJ(e){return oC(e)}function kj(e,t){var r;if(!t)return e;e.properties||(e.properties={}),(r=e.properties).class||(r.class=[]),typeof e.properties.class=="string"&&(e.properties.class=e.properties.class.split(/\s+/g)),Array.isArray(e.properties.class)||(e.properties.class=[]);const n=Array.isArray(t)?t:t.split(/\s+/g);for(const i of n)i&&!e.properties.class.includes(i)&&e.properties.class.push(i);return e}function By(e,t=!1){var o;if(e.length===0)return[["",0]];const n=e.split(/(\r?\n)/g);let r=0;const i=[];for(let a=0;a<n.length;a+=2){const u=t?n[a]+(n[a+1]||""):n[a];i.push([u,r]),r+=n[a].length,r+=((o=n[a+1])==null?void 0:o.length)||0}return i}function QJ(e){const t=By(e,!0).map(([i])=>i);function n(i){if(i===e.length)return{line:t.length-1,character:t[t.length-1].length};let o=i,a=0;for(const u of t){if(o<u.length)break;o-=u.length,a++}return{line:a,character:o}}function r(i,o){let a=0;for(let u=0;u<i;u++)a+=t[u].length;return a+=o,a}return{lines:t,indexToPos:n,posToIndex:r}}const sC="light-dark()",ZJ=["color","background-color"];function JJ(e,t){let n=0;const r=[];for(const i of t)i>n&&r.push({...e,content:e.content.slice(n,i),offset:e.offset+n}),n=i;return n<e.content.length&&r.push({...e,content:e.content.slice(n),offset:e.offset+n}),r}function eee(e,t){const n=Array.from(t instanceof Set?t:new Set(t)).sort((r,i)=>r-i);return n.length?e.map(r=>r.flatMap(i=>{const o=n.filter(a=>i.offset<a&&a<i.offset+i.content.length).map(a=>a-i.offset).sort((a,u)=>a-u);return o.length?JJ(i,o):i})):e}function tee(e,t,n,r,i="css-vars"){const o={content:e.content,explanation:e.explanation,offset:e.offset},a=t.map(h=>ty(e.variants[h])),u=new Set(a.flatMap(h=>Object.keys(h))),c={},f=(h,p)=>{const m=p==="color"?"":p==="background-color"?"-bg":`-${p}`;return n+t[h]+(p==="color"?"":m)};return a.forEach((h,p)=>{for(const m of u){const y=h[m]||"inherit";if(p===0&&r&&ZJ.includes(m))if(r===sC&&a.length>1){const b=t.findIndex(_=>_==="light"),v=t.findIndex(_=>_==="dark");if(b===-1||v===-1)throw new Nn('When using `defaultColor: "light-dark()"`, you must provide both `light` and `dark` themes');const S=a[b][m]||"inherit",x=a[v][m]||"inherit";c[m]=`light-dark(${S}, ${x})`,i==="css-vars"&&(c[f(p,m)]=y)}else c[m]=y;else i==="css-vars"&&(c[f(p,m)]=y)}}),o.htmlStyle=c,o}function ty(e){const t={};if(e.color&&(t.color=e.color),e.bgColor&&(t["background-color"]=e.bgColor),e.fontStyle){e.fontStyle&Qn.Italic&&(t["font-style"]="italic"),e.fontStyle&Qn.Bold&&(t["font-weight"]="bold");const n=[];e.fontStyle&Qn.Underline&&n.push("underline"),e.fontStyle&Qn.Strikethrough&&n.push("line-through"),n.length&&(t["text-decoration"]=n.join(" "))}return t}function fw(e){return typeof e=="string"?e:Object.entries(e).map(([t,n])=>`${t}:${n}`).join(";")}const Rj=new WeakMap;function Uy(e,t){Rj.set(e,t)}function lh(e){return Rj.get(e)}class df{constructor(...t){te(this,"_stacks",{});te(this,"lang");if(t.length===2){const[n,r]=t;this.lang=r,this._stacks=n}else{const[n,r,i]=t;this.lang=r,this._stacks={[i]:n}}}get themes(){return Object.keys(this._stacks)}get theme(){return this.themes[0]}get _stack(){return this._stacks[this.theme]}static initial(t,n){return new df(Object.fromEntries(WJ(n).map(r=>[r,sw])),t)}getInternalStack(t=this.theme){return this._stacks[t]}getScopes(t=this.theme){return nee(this._stacks[t])}toJSON(){return{lang:this.lang,theme:this.theme,themes:this.themes,scopes:this.getScopes()}}}function nee(e){const t=[],n=new Set;function r(i){var a;if(n.has(i))return;n.add(i);const o=(a=i==null?void 0:i.nameScopesList)==null?void 0:a.scopeName;o&&t.push(o),i.parent&&r(i.parent)}return r(e),t}function ree(e,t){if(!(e instanceof df))throw new Nn("Invalid grammar state");return e.getInternalStack(t)}function iee(){const e=new WeakMap;function t(n){if(!e.has(n.meta)){let r=function(a){if(typeof a=="number"){if(a<0||a>n.source.length)throw new Nn(`Invalid decoration offset: ${a}. Code length: ${n.source.length}`);return{...i.indexToPos(a),offset:a}}else{const u=i.lines[a.line];if(u===void 0)throw new Nn(`Invalid decoration position ${JSON.stringify(a)}. Lines length: ${i.lines.length}`);let c=a.character;if(c<0&&(c=u.length+c),c<0||c>u.length)throw new Nn(`Invalid decoration position ${JSON.stringify(a)}. Line ${a.line} length: ${u.length}`);return{...a,character:c,offset:i.posToIndex(a.line,c)}}};const i=QJ(n.source),o=(n.options.decorations||[]).map(a=>({...a,start:r(a.start),end:r(a.end)}));oee(o),e.set(n.meta,{decorations:o,converter:i,source:n.source})}return e.get(n.meta)}return{name:"shiki:decorations",tokens(n){var a;if(!((a=this.options.decorations)!=null&&a.length))return;const i=t(this).decorations.flatMap(u=>[u.start.offset,u.end.offset]);return eee(n,i)},code(n){var h;if(!((h=this.options.decorations)!=null&&h.length))return;const r=t(this),i=Array.from(n.children).filter(p=>p.type==="element"&&p.tagName==="span");if(i.length!==r.converter.lines.length)throw new Nn(`Number of lines in code element (${i.length}) does not match the number of lines in the source (${r.converter.lines.length}). Failed to apply decorations.`);function o(p,m,y,b){const v=i[p];let S="",x=-1,_=-1;if(m===0&&(x=0),y===0&&(_=0),y===Number.POSITIVE_INFINITY&&(_=v.children.length),x===-1||_===-1)for(let T=0;T<v.children.length;T++)S+=_j(v.children[T]),x===-1&&S.length===m&&(x=T+1),_===-1&&S.length===y&&(_=T+1);if(x===-1)throw new Nn(`Failed to find start index for decoration ${JSON.stringify(b.start)}`);if(_===-1)throw new Nn(`Failed to find end index for decoration ${JSON.stringify(b.end)}`);const k=v.children.slice(x,_);if(!b.alwaysWrap&&k.length===v.children.length)u(v,b,"line");else if(!b.alwaysWrap&&k.length===1&&k[0].type==="element")u(k[0],b,"token");else{const T={type:"element",tagName:"span",properties:{},children:k};u(T,b,"wrapper"),v.children.splice(x,k.length,T)}}function a(p,m){i[p]=u(i[p],m,"line")}function u(p,m,y){var S;const b=m.properties||{},v=m.transform||(x=>x);return p.tagName=m.tagName||"span",p.properties={...p.properties,...b,class:p.properties.class},(S=m.properties)!=null&&S.class&&kj(p,m.properties.class),p=v(p,y)||p,p}const c=[],f=r.decorations.sort((p,m)=>m.start.offset-p.start.offset||p.end.offset-m.end.offset);for(const p of f){const{start:m,end:y}=p;if(m.line===y.line)o(m.line,m.character,y.character,p);else if(m.line<y.line){o(m.line,m.character,Number.POSITIVE_INFINITY,p);for(let b=m.line+1;b<y.line;b++)c.unshift(()=>a(b,p));o(y.line,0,y.character,p)}}c.forEach(p=>p())}}}function oee(e){for(let t=0;t<e.length;t++){const n=e[t];if(n.start.offset>n.end.offset)throw new Nn(`Invalid decoration range: ${JSON.stringify(n.start)} - ${JSON.stringify(n.end)}`);for(let r=t+1;r<e.length;r++){const i=e[r],o=n.start.offset<=i.start.offset&&i.start.offset<n.end.offset,a=n.start.offset<i.end.offset&&i.end.offset<=n.end.offset,u=i.start.offset<=n.start.offset&&n.start.offset<i.end.offset,c=i.start.offset<n.end.offset&&n.end.offset<=i.end.offset;if(o||a||u||c){if(o&&a||u&&c||u&&n.start.offset===n.end.offset||a&&i.start.offset===i.end.offset)continue;throw new Nn(`Decorations ${JSON.stringify(n.start)} and ${JSON.stringify(i.start)} intersect.`)}}}}function _j(e){return e.type==="text"?e.value:e.type==="element"?e.children.map(_j).join(""):""}const see=[iee()];function ny(e){const t=aee(e.transformers||[]);return[...t.pre,...t.normal,...t.post,...see]}function aee(e){const t=[],n=[],r=[];for(const i of e)switch(i.enforce){case"pre":t.push(i);break;case"post":n.push(i);break;default:r.push(i)}return{pre:t,post:n,normal:r}}var vl=["black","red","green","yellow","blue","magenta","cyan","white","brightBlack","brightRed","brightGreen","brightYellow","brightBlue","brightMagenta","brightCyan","brightWhite"],gx={1:"bold",2:"dim",3:"italic",4:"underline",7:"reverse",8:"hidden",9:"strikethrough"};function lee(e,t){const n=e.indexOf("\x1B",t);if(n!==-1&&e[n+1]==="["){const r=e.indexOf("m",n);if(r!==-1)return{sequence:e.substring(n+2,r).split(";"),startPosition:n,position:r+1}}return{position:e.length}}function VD(e){const t=e.shift();if(t==="2"){const n=e.splice(0,3).map(r=>Number.parseInt(r));return n.length!==3||n.some(r=>Number.isNaN(r))?void 0:{type:"rgb",rgb:n}}else if(t==="5"){const n=e.shift();if(n)return{type:"table",index:Number(n)}}}function uee(e){const t=[];for(;e.length>0;){const n=e.shift();if(!n)continue;const r=Number.parseInt(n);if(!Number.isNaN(r))if(r===0)t.push({type:"resetAll"});else if(r<=9)gx[r]&&t.push({type:"setDecoration",value:gx[r]});else if(r<=29){const i=gx[r-20];i&&(t.push({type:"resetDecoration",value:i}),i==="dim"&&t.push({type:"resetDecoration",value:"bold"}))}else if(r<=37)t.push({type:"setForegroundColor",value:{type:"named",name:vl[r-30]}});else if(r===38){const i=VD(e);i&&t.push({type:"setForegroundColor",value:i})}else if(r===39)t.push({type:"resetForegroundColor"});else if(r<=47)t.push({type:"setBackgroundColor",value:{type:"named",name:vl[r-40]}});else if(r===48){const i=VD(e);i&&t.push({type:"setBackgroundColor",value:i})}else r===49?t.push({type:"resetBackgroundColor"}):r===53?t.push({type:"setDecoration",value:"overline"}):r===55?t.push({type:"resetDecoration",value:"overline"}):r>=90&&r<=97?t.push({type:"setForegroundColor",value:{type:"named",name:vl[r-90+8]}}):r>=100&&r<=107&&t.push({type:"setBackgroundColor",value:{type:"named",name:vl[r-100+8]}})}return t}function cee(){let e=null,t=null,n=new Set;return{parse(r){const i=[];let o=0;do{const a=lee(r,o),u=a.sequence?r.substring(o,a.startPosition):r.substring(o);if(u.length>0&&i.push({value:u,foreground:e,background:t,decorations:new Set(n)}),a.sequence){const c=uee(a.sequence);for(const f of c)f.type==="resetAll"?(e=null,t=null,n.clear()):f.type==="resetForegroundColor"?e=null:f.type==="resetBackgroundColor"?t=null:f.type==="resetDecoration"&&n.delete(f.value);for(const f of c)f.type==="setForegroundColor"?e=f.value:f.type==="setBackgroundColor"?t=f.value:f.type==="setDecoration"&&n.add(f.value)}o=a.position}while(o<r.length);return i}}}var fee={black:"#000000",red:"#bb0000",green:"#00bb00",yellow:"#bbbb00",blue:"#0000bb",magenta:"#ff00ff",cyan:"#00bbbb",white:"#eeeeee",brightBlack:"#555555",brightRed:"#ff5555",brightGreen:"#00ff00",brightYellow:"#ffff55",brightBlue:"#5555ff",brightMagenta:"#ff55ff",brightCyan:"#55ffff",brightWhite:"#ffffff"};function dee(e=fee){function t(u){return e[u]}function n(u){return`#${u.map(c=>Math.max(0,Math.min(c,255)).toString(16).padStart(2,"0")).join("")}`}let r;function i(){if(r)return r;r=[];for(let f=0;f<vl.length;f++)r.push(t(vl[f]));let u=[0,95,135,175,215,255];for(let f=0;f<6;f++)for(let h=0;h<6;h++)for(let p=0;p<6;p++)r.push(n([u[f],u[h],u[p]]));let c=8;for(let f=0;f<24;f++,c+=10)r.push(n([c,c,c]));return r}function o(u){return i()[u]}function a(u){switch(u.type){case"named":return t(u.name);case"rgb":return n(u.rgb);case"table":return o(u.index)}}return{value:a}}const hee={black:"#000000",red:"#cd3131",green:"#0DBC79",yellow:"#E5E510",blue:"#2472C8",magenta:"#BC3FBC",cyan:"#11A8CD",white:"#E5E5E5",brightBlack:"#666666",brightRed:"#F14C4C",brightGreen:"#23D18B",brightYellow:"#F5F543",brightBlue:"#3B8EEA",brightMagenta:"#D670D6",brightCyan:"#29B8DB",brightWhite:"#FFFFFF"};function pee(e,t,n){const r=ey(e,n),i=By(t),o=Object.fromEntries(vl.map(c=>{var p;const f=`terminal.ansi${c[0].toUpperCase()}${c.substring(1)}`,h=(p=e.colors)==null?void 0:p[f];return[c,h||hee[c]]})),a=dee(o),u=cee();return i.map(c=>u.parse(c[0]).map(f=>{let h,p;f.decorations.has("reverse")?(h=f.background?a.value(f.background):e.bg,p=f.foreground?a.value(f.foreground):e.fg):(h=f.foreground?a.value(f.foreground):e.fg,p=f.background?a.value(f.background):void 0),h=pa(h,r),p=pa(p,r),f.decorations.has("dim")&&(h=mee(h));let m=Qn.None;return f.decorations.has("bold")&&(m|=Qn.Bold),f.decorations.has("italic")&&(m|=Qn.Italic),f.decorations.has("underline")&&(m|=Qn.Underline),f.decorations.has("strikethrough")&&(m|=Qn.Strikethrough),{content:f.value,offset:c[1],color:h,bgColor:p,fontStyle:m}}))}function mee(e){const t=e.match(/#([0-9a-f]{3,8})/i);if(t){const r=t[1];if(r.length===8){const i=Math.round(Number.parseInt(r.slice(6,8),16)/2).toString(16).padStart(2,"0");return`#${r.slice(0,6)}${i}`}else{if(r.length===6)return`#${r}80`;if(r.length===4){const i=r[0],o=r[1],a=r[2],u=r[3],c=Math.round(Number.parseInt(`${u}${u}`,16)/2).toString(16).padStart(2,"0");return`#${i}${i}${o}${o}${a}${a}${c}`}else if(r.length===3){const i=r[0],o=r[1],a=r[2];return`#${i}${i}${o}${o}${a}${a}80`}}}const n=e.match(/var\((--[\w-]+-ansi-[\w-]+)\)/);return n?`var(${n[1]}-dim)`:e}function aC(e,t,n={}){const{theme:r=e.getLoadedThemes()[0]}=n,i=e.resolveLangAlias(n.lang||"text");if(iC(i)||oC(r))return By(t).map(c=>[{content:c[0],offset:c[1]}]);const{theme:o,colorMap:a}=e.setTheme(r);if(i==="ansi")return pee(o,t,n);const u=e.getLanguage(n.lang||"text");if(n.grammarState){if(n.grammarState.lang!==u.name)throw new Nn(`Grammar state language "${n.grammarState.lang}" does not match highlight language "${u.name}"`);if(!n.grammarState.themes.includes(o.name))throw new Nn(`Grammar state themes "${n.grammarState.themes}" do not contain highlight theme "${o.name}"`)}return yee(t,u,o,a,n)}function gee(...e){if(e.length===2)return lh(e[1]);const[t,n,r={}]=e,{lang:i="text",theme:o=t.getLoadedThemes()[0]}=r;if(iC(i)||oC(o))throw new Nn("Plain language does not have grammar state");if(i==="ansi")throw new Nn("ANSI language does not have grammar state");const{theme:a,colorMap:u}=t.setTheme(o),c=t.getLanguage(i);return new df(lC(n,c,a,u,r).stateStack,c.name,a.name)}function yee(e,t,n,r,i){const o=lC(e,t,n,r,i),a=new df(o.stateStack,t.name,n.name);return Uy(o.tokens,a),o.tokens}function lC(e,t,n,r,i){const o=ey(n,i),{tokenizeMaxLineLength:a=0,tokenizeTimeLimit:u=500}=i,c=By(e);let f=i.grammarState?ree(i.grammarState,n.name)??sw:i.grammarContextCode!=null?lC(i.grammarContextCode,t,n,r,{...i,grammarState:void 0,grammarContextCode:void 0}).stateStack:sw,h=[];const p=[];for(let m=0,y=c.length;m<y;m++){const[b,v]=c[m];if(b===""){h=[],p.push([]);continue}if(a>0&&b.length>=a){h=[],p.push([{content:b,offset:v,color:"",fontStyle:0}]);continue}let S,x,_;i.includeExplanation&&(S=t.tokenizeLine(b,f,u),x=S.tokens,_=0);const k=t.tokenizeLine2(b,f,u),T=k.tokens.length/2;for(let A=0;A<T;A++){const D=k.tokens[2*A],O=A+1<T?k.tokens[2*A+2]:b.length;if(D===O)continue;const $=k.tokens[2*A+1],B=pa(r[Bc.getForeground($)],o),j=Bc.getFontStyle($),N={content:b.substring(D,O),offset:v+D,color:B,fontStyle:j};if(i.includeExplanation){const M=[];if(i.includeExplanation!=="scopeName")for(const G of n.settings){let L;switch(typeof G.scope){case"string":L=G.scope.split(/,/).map(F=>F.trim());break;case"object":L=G.scope;break;default:continue}M.push({settings:G,selectors:L.map(F=>F.split(/ /))})}N.explanation=[];let z=0;for(;D+z<O;){const G=x[_],L=b.substring(G.startIndex,G.endIndex);z+=L.length,N.explanation.push({content:L,scopes:i.includeExplanation==="scopeName"?bee(G.scopes):vee(M,G.scopes)}),_+=1}}h.push(N)}p.push(h),h=[],f=k.ruleStack}return{tokens:p,stateStack:f}}function bee(e){return e.map(t=>({scopeName:t}))}function vee(e,t){const n=[];for(let r=0,i=t.length;r<i;r++){const o=t[r];n[r]={scopeName:o,themeMatches:wee(e,o,t.slice(0,r))}}return n}function qD(e,t){return e===t||t.substring(0,e.length)===e&&t[e.length]==="."}function xee(e,t,n){if(!qD(e[e.length-1],t))return!1;let r=e.length-2,i=n.length-1;for(;r>=0&&i>=0;)qD(e[r],n[i])&&(r-=1),i-=1;return r===-1}function wee(e,t,n){const r=[];for(const{selectors:i,settings:o}of e)for(const a of i)if(xee(a,t,n)){r.push(o);break}return r}function Tj(e,t,n){const r=Object.entries(n.themes).filter(c=>c[1]).map(c=>({color:c[0],theme:c[1]})),i=r.map(c=>{const f=aC(e,t,{...n,theme:c.theme}),h=lh(f),p=typeof c.theme=="string"?c.theme:c.theme.name;return{tokens:f,state:h,theme:p}}),o=See(...i.map(c=>c.tokens)),a=o[0].map((c,f)=>c.map((h,p)=>{const m={content:h.content,variants:{},offset:h.offset};return"includeExplanation"in n&&n.includeExplanation&&(m.explanation=h.explanation),o.forEach((y,b)=>{const{content:v,explanation:S,offset:x,..._}=y[f][p];m.variants[r[b].color]=_}),m})),u=i[0].state?new df(Object.fromEntries(i.map(c=>{var f;return[c.theme,(f=c.state)==null?void 0:f.getInternalStack(c.theme)]})),i[0].state.lang):void 0;return u&&Uy(a,u),a}function See(...e){const t=e.map(()=>[]),n=e.length;for(let r=0;r<e[0].length;r++){const i=e.map(c=>c[r]),o=t.map(()=>[]);t.forEach((c,f)=>c.push(o[f]));const a=i.map(()=>0),u=i.map(c=>c[0]);for(;u.every(c=>c);){const c=Math.min(...u.map(f=>f.content.length));for(let f=0;f<n;f++){const h=u[f];h.content.length===c?(o[f].push(h),a[f]+=1,u[f]=i[f][a[f]]):(o[f].push({...h,content:h.content.slice(0,c)}),u[f]={...h,content:h.content.slice(c),offset:h.offset+c})}}}return t}function ry(e,t,n){let r,i,o,a,u,c;if("themes"in n){const{defaultColor:f="light",cssVariablePrefix:h="--shiki-",colorsRendering:p="css-vars"}=n,m=Object.entries(n.themes).filter(x=>x[1]).map(x=>({color:x[0],theme:x[1]})).sort((x,_)=>x.color===f?-1:_.color===f?1:0);if(m.length===0)throw new Nn("`themes` option must not be empty");const y=Tj(e,t,n);if(c=lh(y),f&&sC!==f&&!m.find(x=>x.color===f))throw new Nn(`\`themes\` option must contain the defaultColor key \`${f}\``);const b=m.map(x=>e.getTheme(x.theme)),v=m.map(x=>x.color);o=y.map(x=>x.map(_=>tee(_,v,h,f,p))),c&&Uy(o,c);const S=m.map(x=>ey(x.theme,n));i=YD(m,b,S,h,f,"fg",p),r=YD(m,b,S,h,f,"bg",p),a=`shiki-themes ${b.map(x=>x.name).join(" ")}`,u=f?void 0:[i,r].join(";")}else if("theme"in n){const f=ey(n.theme,n);o=aC(e,t,n);const h=e.getTheme(n.theme);r=pa(h.bg,f),i=pa(h.fg,f),a=h.name,c=lh(o)}else throw new Nn("Invalid options, either `theme` or `themes` must be provided");return{tokens:o,fg:i,bg:r,themeName:a,rootStyle:u,grammarState:c}}function YD(e,t,n,r,i,o,a){return e.map((u,c)=>{const f=pa(t[c][o],n[c])||"inherit",h=`${r+u.color}${o==="bg"?"-bg":""}:${f}`;if(c===0&&i){if(i===sC&&e.length>1){const p=e.findIndex(v=>v.color==="light"),m=e.findIndex(v=>v.color==="dark");if(p===-1||m===-1)throw new Nn('When using `defaultColor: "light-dark()"`, you must provide both `light` and `dark` themes');const y=pa(t[p][o],n[p])||"inherit",b=pa(t[m][o],n[m])||"inherit";return`light-dark(${y}, ${b});${h}`}return f}return a==="css-vars"?h:null}).filter(u=>!!u).join(";")}function iy(e,t,n,r={meta:{},options:n,codeToHast:(i,o)=>iy(e,i,o),codeToTokens:(i,o)=>ry(e,i,o)}){var b,v;let i=t;for(const S of ny(n))i=((b=S.preprocess)==null?void 0:b.call(r,i,n))||i;let{tokens:o,fg:a,bg:u,themeName:c,rootStyle:f,grammarState:h}=ry(e,i,n);const{mergeWhitespaces:p=!0,mergeSameStyleTokens:m=!1}=n;p===!0?o=Eee(o):p==="never"&&(o=kee(o)),m&&(o=Ree(o));const y={...r,get source(){return i}};for(const S of ny(n))o=((v=S.tokens)==null?void 0:v.call(y,o))||o;return Cee(o,{...n,fg:a,bg:u,themeName:c,rootStyle:n.rootStyle===!1?!1:n.rootStyle??f},y,h)}function Cee(e,t,n,r=lh(e)){var v,S,x,_;const i=ny(t),o=[],a={type:"root",children:[]},{structure:u="classic",tabindex:c="0"}=t,f={class:`shiki ${t.themeName||""}`};t.rootStyle!==!1&&(t.rootStyle!=null?f.style=t.rootStyle:f.style=`background-color:${t.bg};color:${t.fg}`),c!==!1&&c!=null&&(f.tabindex=c.toString());for(const[k,T]of Object.entries(t.meta||{}))k.startsWith("_")||(f[k]=T);let h={type:"element",tagName:"pre",properties:f,children:[],data:t.data},p={type:"element",tagName:"code",properties:{},children:o};const m=[],y={...n,structure:u,addClassToHast:kj,get source(){return n.source},get tokens(){return e},get options(){return t},get root(){return a},get pre(){return h},get code(){return p},get lines(){return m}};if(e.forEach((k,T)=>{var O,$;T&&(u==="inline"?a.children.push({type:"element",tagName:"br",properties:{},children:[]}):u==="classic"&&o.push({type:"text",value:`
|
|
323
|
-
`}));let A={type:"element",tagName:"span",properties:{class:"line"},children:[]},D=0;for(const B of k){let j={type:"element",tagName:"span",properties:{...B.htmlAttrs},children:[{type:"text",value:B.content}]};const N=fw(B.htmlStyle||ty(B));N&&(j.properties.style=N);for(const M of i)j=((O=M==null?void 0:M.span)==null?void 0:O.call(y,j,T+1,D,A,B))||j;u==="inline"?a.children.push(j):u==="classic"&&A.children.push(j),D+=B.content.length}if(u==="classic"){for(const B of i)A=(($=B==null?void 0:B.line)==null?void 0:$.call(y,A,T+1))||A;m.push(A),o.push(A)}else u==="inline"&&m.push(A)}),u==="classic"){for(const k of i)p=((v=k==null?void 0:k.code)==null?void 0:v.call(y,p))||p;h.children.push(p);for(const k of i)h=((S=k==null?void 0:k.pre)==null?void 0:S.call(y,h))||h;a.children.push(h)}else if(u==="inline"){const k=[];let T={type:"element",tagName:"span",properties:{class:"line"},children:[]};for(const O of a.children)O.type==="element"&&O.tagName==="br"?(k.push(T),T={type:"element",tagName:"span",properties:{class:"line"},children:[]}):(O.type==="element"||O.type==="text")&&T.children.push(O);k.push(T);let D={type:"element",tagName:"code",properties:{},children:k};for(const O of i)D=((x=O==null?void 0:O.code)==null?void 0:x.call(y,D))||D;a.children=[];for(let O=0;O<D.children.length;O++){O>0&&a.children.push({type:"element",tagName:"br",properties:{},children:[]});const $=D.children[O];$.type==="element"&&a.children.push(...$.children)}}let b=a;for(const k of i)b=((_=k==null?void 0:k.root)==null?void 0:_.call(y,b))||b;return r&&Uy(b,r),b}function Eee(e){return e.map(t=>{const n=[];let r="",i;return t.forEach((o,a)=>{const c=!(o.fontStyle&&(o.fontStyle&Qn.Underline||o.fontStyle&Qn.Strikethrough));c&&o.content.match(/^\s+$/)&&t[a+1]?(i===void 0&&(i=o.offset),r+=o.content):r?(c?n.push({...o,offset:i,content:r+o.content}):n.push({content:r,offset:i},o),i=void 0,r=""):n.push(o)}),n})}function kee(e){return e.map(t=>t.flatMap(n=>{if(n.content.match(/^\s+$/))return n;const r=n.content.match(/^(\s*)(.*?)(\s*)$/);if(!r)return n;const[,i,o,a]=r;if(!i&&!a)return n;const u=[{...n,offset:n.offset+i.length,content:o}];return i&&u.unshift({content:i,offset:n.offset}),a&&u.push({content:a,offset:n.offset+i.length+o.length}),u}))}function Ree(e){return e.map(t=>{const n=[];for(const r of t){if(n.length===0){n.push({...r});continue}const i=n[n.length-1],o=fw(i.htmlStyle||ty(i)),a=fw(r.htmlStyle||ty(r)),u=i.fontStyle&&(i.fontStyle&Qn.Underline||i.fontStyle&Qn.Strikethrough),c=r.fontStyle&&(r.fontStyle&Qn.Underline||r.fontStyle&Qn.Strikethrough);!u&&!c&&o===a?i.content+=r.content:n.push({...r})}return n})}const _ee=VJ;function Tee(e,t,n){var o;const r={meta:{},options:n,codeToHast:(a,u)=>iy(e,a,u),codeToTokens:(a,u)=>ry(e,a,u)};let i=_ee(iy(e,t,n,r));for(const a of ny(n))i=((o=a.postprocess)==null?void 0:o.call(r,i,n))||i;return i}const WD={light:"#333333",dark:"#bbbbbb"},KD={light:"#fffffe",dark:"#1e1e1e"},XD="__shiki_resolved";function uC(e){var u,c,f,h,p;if(e!=null&&e[XD])return e;const t={...e};t.tokenColors&&!t.settings&&(t.settings=t.tokenColors,delete t.tokenColors),t.type||(t.type="dark"),t.colorReplacements={...t.colorReplacements},t.settings||(t.settings=[]);let{bg:n,fg:r}=t;if(!n||!r){const m=t.settings?t.settings.find(y=>!y.name&&!y.scope):void 0;(u=m==null?void 0:m.settings)!=null&&u.foreground&&(r=m.settings.foreground),(c=m==null?void 0:m.settings)!=null&&c.background&&(n=m.settings.background),!r&&((f=t==null?void 0:t.colors)!=null&&f["editor.foreground"])&&(r=t.colors["editor.foreground"]),!n&&((h=t==null?void 0:t.colors)!=null&&h["editor.background"])&&(n=t.colors["editor.background"]),r||(r=t.type==="light"?WD.light:WD.dark),n||(n=t.type==="light"?KD.light:KD.dark),t.fg=r,t.bg=n}t.settings[0]&&t.settings[0].settings&&!t.settings[0].scope||t.settings.unshift({settings:{foreground:t.fg,background:t.bg}});let i=0;const o=new Map;function a(m){var b;if(o.has(m))return o.get(m);i+=1;const y=`#${i.toString(16).padStart(8,"0").toLowerCase()}`;return(b=t.colorReplacements)!=null&&b[`#${y}`]?a(m):(o.set(m,y),y)}t.settings=t.settings.map(m=>{var S,x;const y=((S=m.settings)==null?void 0:S.foreground)&&!m.settings.foreground.startsWith("#"),b=((x=m.settings)==null?void 0:x.background)&&!m.settings.background.startsWith("#");if(!y&&!b)return m;const v={...m,settings:{...m.settings}};if(y){const _=a(m.settings.foreground);t.colorReplacements[_]=m.settings.foreground,v.settings.foreground=_}if(b){const _=a(m.settings.background);t.colorReplacements[_]=m.settings.background,v.settings.background=_}return v});for(const m of Object.keys(t.colors||{}))if((m==="editor.foreground"||m==="editor.background"||m.startsWith("terminal.ansi"))&&!((p=t.colors[m])!=null&&p.startsWith("#"))){const y=a(t.colors[m]);t.colorReplacements[y]=t.colors[m],t.colors[m]=y}return Object.defineProperty(t,XD,{enumerable:!1,writable:!1,value:!0}),t}async function Aj(e){return Array.from(new Set((await Promise.all(e.filter(t=>!KJ(t)).map(async t=>await Ej(t).then(n=>Array.isArray(n)?n:[n])))).flat()))}async function Dj(e){return(await Promise.all(e.map(async n=>XJ(n)?null:uC(await Ej(n))))).filter(n=>!!n)}let Aee=3;function Dee(e,t=3){t>Aee||console.trace(`[SHIKI DEPRECATE]: ${e}`)}class lc extends Error{constructor(t){super(t),this.name="ShikiError"}}function Mj(e,t){if(!t)return e;if(t[e]){const n=new Set([e]);for(;t[e];){if(e=t[e],n.has(e))throw new lc(`Circular alias \`${Array.from(n).join(" -> ")} -> ${e}\``);n.add(e)}}return e}class Mee extends PZ{constructor(n,r,i,o={}){super(n);te(this,"_resolvedThemes",new Map);te(this,"_resolvedGrammars",new Map);te(this,"_langMap",new Map);te(this,"_langGraph",new Map);te(this,"_textmateThemeCache",new WeakMap);te(this,"_loadedThemesCache",null);te(this,"_loadedLanguagesCache",null);this._resolver=n,this._themes=r,this._langs=i,this._alias=o,this._themes.map(a=>this.loadTheme(a)),this.loadLanguages(this._langs)}getTheme(n){return typeof n=="string"?this._resolvedThemes.get(n):this.loadTheme(n)}loadTheme(n){const r=uC(n);return r.name&&(this._resolvedThemes.set(r.name,r),this._loadedThemesCache=null),r}getLoadedThemes(){return this._loadedThemesCache||(this._loadedThemesCache=[...this._resolvedThemes.keys()]),this._loadedThemesCache}setTheme(n){let r=this._textmateThemeCache.get(n);r||(r=Wg.createFromRawTheme(n),this._textmateThemeCache.set(n,r)),this._syncRegistry.setTheme(r)}getGrammar(n){return n=Mj(n,this._alias),this._resolvedGrammars.get(n)}loadLanguage(n){var a,u,c,f;if(this.getGrammar(n.name))return;const r=new Set([...this._langMap.values()].filter(h=>{var p;return(p=h.embeddedLangsLazy)==null?void 0:p.includes(n.name)}));this._resolver.addLanguage(n);const i={balancedBracketSelectors:n.balancedBracketSelectors||["*"],unbalancedBracketSelectors:n.unbalancedBracketSelectors||[]};this._syncRegistry._rawGrammars.set(n.scopeName,n);const o=this.loadGrammarWithConfiguration(n.scopeName,1,i);if(o.name=n.name,this._resolvedGrammars.set(n.name,o),n.aliases&&n.aliases.forEach(h=>{this._alias[h]=n.name}),this._loadedLanguagesCache=null,r.size)for(const h of r)this._resolvedGrammars.delete(h.name),this._loadedLanguagesCache=null,(u=(a=this._syncRegistry)==null?void 0:a._injectionGrammars)==null||u.delete(h.scopeName),(f=(c=this._syncRegistry)==null?void 0:c._grammars)==null||f.delete(h.scopeName),this.loadLanguage(this._langMap.get(h.name))}dispose(){super.dispose(),this._resolvedThemes.clear(),this._resolvedGrammars.clear(),this._langMap.clear(),this._langGraph.clear(),this._loadedThemesCache=null}loadLanguages(n){for(const o of n)this.resolveEmbeddedLanguages(o);const r=Array.from(this._langGraph.entries()),i=r.filter(([o,a])=>!a);if(i.length){const o=r.filter(([a,u])=>{if(!u)return!1;const c=u.embeddedLanguages||u.embeddedLangs;return c==null?void 0:c.some(f=>i.map(([h])=>h).includes(f))}).filter(a=>!i.includes(a));throw new lc(`Missing languages ${i.map(([a])=>`\`${a}\``).join(", ")}, required by ${o.map(([a])=>`\`${a}\``).join(", ")}`)}for(const[o,a]of r)this._resolver.addLanguage(a);for(const[o,a]of r)this.loadLanguage(a)}getLoadedLanguages(){return this._loadedLanguagesCache||(this._loadedLanguagesCache=[...new Set([...this._resolvedGrammars.keys(),...Object.keys(this._alias)])]),this._loadedLanguagesCache}resolveEmbeddedLanguages(n){this._langMap.set(n.name,n),this._langGraph.set(n.name,n);const r=n.embeddedLanguages??n.embeddedLangs;if(r)for(const i of r)this._langGraph.set(i,this._langMap.get(i))}}class Oee{constructor(t,n){te(this,"_langs",new Map);te(this,"_scopeToLang",new Map);te(this,"_injections",new Map);te(this,"_onigLib");this._onigLib={createOnigScanner:r=>t.createScanner(r),createOnigString:r=>t.createString(r)},n.forEach(r=>this.addLanguage(r))}get onigLib(){return this._onigLib}getLangRegistration(t){return this._langs.get(t)}loadGrammar(t){return this._scopeToLang.get(t)}addLanguage(t){this._langs.set(t.name,t),t.aliases&&t.aliases.forEach(n=>{this._langs.set(n,t)}),this._scopeToLang.set(t.scopeName,t),t.injectTo&&t.injectTo.forEach(n=>{this._injections.get(n)||this._injections.set(n,[]),this._injections.get(n).push(t.scopeName)})}getInjections(t){const n=t.split(".");let r=[];for(let i=1;i<=n.length;i++){const o=n.slice(0,i).join(".");r=[...r,...this._injections.get(o)||[]]}return r}}let Ed=0;function $ee(e){Ed+=1,e.warnings!==!1&&Ed>=10&&Ed%10===0&&console.warn(`[Shiki] ${Ed} instances have been created. Shiki is supposed to be used as a singleton, consider refactoring your code to cache your highlighter instance; Or call \`highlighter.dispose()\` to release unused instances.`);let t=!1;if(!e.engine)throw new lc("`engine` option is required for synchronous mode");const n=(e.langs||[]).flat(1),r=(e.themes||[]).flat(1).map(uC),i=new Oee(e.engine,n),o=new Mee(i,r,n,e.langAlias);let a;function u(k){return Mj(k,e.langAlias)}function c(k){x();const T=o.getGrammar(typeof k=="string"?k:k.name);if(!T)throw new lc(`Language \`${k}\` not found, you may need to load it first`);return T}function f(k){if(k==="none")return{bg:"",fg:"",name:"none",settings:[],type:"dark"};x();const T=o.getTheme(k);if(!T)throw new lc(`Theme \`${k}\` not found, you may need to load it first`);return T}function h(k){x();const T=f(k);a!==k&&(o.setTheme(T),a=k);const A=o.getColorMap();return{theme:T,colorMap:A}}function p(){return x(),o.getLoadedThemes()}function m(){return x(),o.getLoadedLanguages()}function y(...k){x(),o.loadLanguages(k.flat(1))}async function b(...k){return y(await Aj(k))}function v(...k){x();for(const T of k.flat(1))o.loadTheme(T)}async function S(...k){return x(),v(await Dj(k))}function x(){if(t)throw new lc("Shiki instance has been disposed")}function _(){t||(t=!0,o.dispose(),Ed-=1)}return{setTheme:h,getTheme:f,getLanguage:c,getLoadedThemes:p,getLoadedLanguages:m,resolveLangAlias:u,loadLanguage:b,loadLanguageSync:y,loadTheme:S,loadThemeSync:v,dispose:_,[Symbol.dispose]:_}}async function Pee(e){e.engine||Dee("`engine` option is required. Use `createOnigurumaEngine` or `createJavaScriptRegexEngine` to create an engine.");const[t,n,r]=await Promise.all([Dj(e.themes||[]),Aj(e.langs||[]),e.engine]);return $ee({...e,themes:t,langs:n,engine:r})}async function Nee(e){const t=await Pee(e);return{getLastGrammarState:(...n)=>gee(t,...n),codeToTokensBase:(n,r)=>aC(t,n,r),codeToTokensWithThemes:(n,r)=>Tj(t,n,r),codeToTokens:(n,r)=>ry(t,n,r),codeToHast:(n,r)=>iy(t,n,r),codeToHtml:(n,r)=>Tee(t,n,r),getBundledLanguages:()=>({}),getBundledThemes:()=>({}),...t,getInternalContext:()=>t}}function hf(e){if([...e].length!==1)throw new Error(`Expected "${e}" to be a single code point`);return e.codePointAt(0)}function Iee(e,t,n){return e.has(t)||e.set(t,n),e.get(t)}const cC=new Set(["alnum","alpha","ascii","blank","cntrl","digit","graph","lower","print","punct","space","upper","word","xdigit"]),In=String.raw;function pf(e,t){if(e==null)throw new Error(t??"Value expected");return e}const Oj=In`\[\^?`,$j=`c.? | C(?:-.?)?|${In`[pP]\{(?:\^?[-\x20_]*[A-Za-z][-\x20\w]*\})?`}|${In`x[89A-Fa-f]\p{AHex}(?:\\x[89A-Fa-f]\p{AHex})*`}|${In`u(?:\p{AHex}{4})? | x\{[^\}]*\}? | x\p{AHex}{0,2}`}|${In`o\{[^\}]*\}?`}|${In`\d{1,3}`}`,fC=/[?*+][?+]?|\{(?:\d+(?:,\d*)?|,\d+)\}\??/,Om=new RegExp(In`
|
|
324
|
-
\\ (?:
|
|
325
|
-
${$j}
|
|
326
|
-
| [gk]<[^>]*>?
|
|
327
|
-
| [gk]'[^']*'?
|
|
328
|
-
| .
|
|
329
|
-
)
|
|
330
|
-
| \( (?:
|
|
331
|
-
\? (?:
|
|
332
|
-
[:=!>({]
|
|
333
|
-
| <[=!]
|
|
334
|
-
| <[^>]*>
|
|
335
|
-
| '[^']*'
|
|
336
|
-
| ~\|?
|
|
337
|
-
| #(?:[^)\\]|\\.?)*
|
|
338
|
-
| [^:)]*[:)]
|
|
339
|
-
)?
|
|
340
|
-
| \*[^\)]*\)?
|
|
341
|
-
)?
|
|
342
|
-
| (?:${fC.source})+
|
|
343
|
-
| ${Oj}
|
|
344
|
-
| .
|
|
345
|
-
`.replace(/\s+/g,""),"gsu"),yx=new RegExp(In`
|
|
346
|
-
\\ (?:
|
|
347
|
-
${$j}
|
|
348
|
-
| .
|
|
349
|
-
)
|
|
350
|
-
| \[:(?:\^?\p{Alpha}+|\^):\]
|
|
351
|
-
| ${Oj}
|
|
352
|
-
| &&
|
|
353
|
-
| .
|
|
354
|
-
`.replace(/\s+/g,""),"gsu");function jee(e,t={}){const n={flags:"",...t,rules:{captureGroup:!1,singleline:!1,...t.rules}};if(typeof e!="string")throw new Error("String expected as pattern");const r=nte(n.flags),i=[r.extended],o={captureGroup:n.rules.captureGroup,getCurrentModX(){return i.at(-1)},numOpenGroups:0,popModX(){i.pop()},pushModX(p){i.push(p)},replaceCurrentModX(p){i[i.length-1]=p},singleline:n.rules.singleline};let a=[],u;for(Om.lastIndex=0;u=Om.exec(e);){const p=Lee(o,e,u[0],Om.lastIndex);p.tokens?a.push(...p.tokens):p.token&&a.push(p.token),p.lastIndex!==void 0&&(Om.lastIndex=p.lastIndex)}const c=[];let f=0;a.filter(p=>p.type==="GroupOpen").forEach(p=>{p.kind==="capturing"?p.number=++f:p.raw==="("&&c.push(p)}),f||c.forEach((p,m)=>{p.kind="capturing",p.number=m+1});const h=f||c.length;return{tokens:a.map(p=>p.type==="EscapedNumber"?ite(p,h):p).flat(),flags:r}}function Lee(e,t,n,r){const[i,o]=n;if(n==="["||n==="[^"){const a=Fee(t,n,r);return{tokens:a.tokens,lastIndex:a.lastIndex}}if(i==="\\"){if("AbBGyYzZ".includes(o))return{token:QD(n,n)};if(/^\\g[<']/.test(n)){if(!/^\\g(?:<[^>]+>|'[^']+')$/.test(n))throw new Error(`Invalid group name "${n}"`);return{token:Kee(n)}}if(/^\\k[<']/.test(n)){if(!/^\\k(?:<[^>]+>|'[^']+')$/.test(n))throw new Error(`Invalid group name "${n}"`);return{token:Nj(n)}}if(o==="K")return{token:Ij("keep",n)};if(o==="N"||o==="R")return{token:xl("newline",n,{negate:o==="N"})};if(o==="O")return{token:xl("any",n)};if(o==="X")return{token:xl("text_segment",n)};const a=Pj(n,{inCharClass:!1});return Array.isArray(a)?{tokens:a}:{token:a}}if(i==="("){if(o==="*")return{token:Jee(n)};if(n==="(?{")throw new Error(`Unsupported callout "${n}"`);if(n.startsWith("(?#")){if(t[r]!==")")throw new Error('Unclosed comment group "(?#"');return{lastIndex:r+1}}if(/^\(\?[-imx]+[:)]$/.test(n))return{token:Zee(n,e)};if(e.pushModX(e.getCurrentModX()),e.numOpenGroups++,n==="("&&!e.captureGroup||n==="(?:")return{token:ic("group",n)};if(n==="(?>")return{token:ic("atomic",n)};if(n==="(?="||n==="(?!"||n==="(?<="||n==="(?<!")return{token:ic(n[2]==="<"?"lookbehind":"lookahead",n,{negate:n.endsWith("!")})};if(n==="("&&e.captureGroup||n.startsWith("(?<")&&n.endsWith(">")||n.startsWith("(?'")&&n.endsWith("'"))return{token:ic("capturing",n,{...n!=="("&&{name:n.slice(3,-1)}})};if(n.startsWith("(?~")){if(n==="(?~|")throw new Error(`Unsupported absence function kind "${n}"`);return{token:ic("absence_repeater",n)}}throw n==="(?("?new Error(`Unsupported conditional "${n}"`):new Error(`Invalid or unsupported group option "${n}"`)}if(n===")"){if(e.popModX(),e.numOpenGroups--,e.numOpenGroups<0)throw new Error('Unmatched ")"');return{token:qee(n)}}if(e.getCurrentModX()){if(n==="#"){const a=t.indexOf(`
|
|
355
|
-
`,r);return{lastIndex:a===-1?t.length:a}}if(/^\s$/.test(n)){const a=/\s+/y;return a.lastIndex=r,{lastIndex:a.exec(t)?a.lastIndex:r}}}if(n===".")return{token:xl("dot",n)};if(n==="^"||n==="$"){const a=e.singleline?{"^":In`\A`,$:In`\Z`}[n]:n;return{token:QD(a,n)}}return n==="|"?{token:Bee(n)}:fC.test(n)?{tokens:ote(n)}:{token:qo(hf(n),n)}}function Fee(e,t,n){const r=[ZD(t[1]==="^",t)];let i=1,o;for(yx.lastIndex=n;o=yx.exec(e);){const a=o[0];if(a[0]==="["&&a[1]!==":")i++,r.push(ZD(a[1]==="^",a));else if(a==="]"){if(r.at(-1).type==="CharacterClassOpen")r.push(qo(93,a));else if(i--,r.push(Uee(a)),!i)break}else{const u=zee(a);Array.isArray(u)?r.push(...u):r.push(u)}}return{tokens:r,lastIndex:yx.lastIndex||e.length}}function zee(e){if(e[0]==="\\")return Pj(e,{inCharClass:!0});if(e[0]==="["){const t=/\[:(?<negate>\^?)(?<name>[a-z]+):\]/.exec(e);if(!t||!cC.has(t.groups.name))throw new Error(`Invalid POSIX class "${e}"`);return xl("posix",e,{value:t.groups.name,negate:!!t.groups.negate})}return e==="-"?Hee(e):e==="&&"?Gee(e):qo(hf(e),e)}function Pj(e,{inCharClass:t}){const n=e[1];if(n==="c"||n==="C")return Qee(e);if("dDhHsSwW".includes(n))return ete(e);if(e.startsWith(In`\o{`))throw new Error(`Incomplete, invalid, or unsupported octal code point "${e}"`);if(/^\\[pP]\{/.test(e)){if(e.length===3)throw new Error(`Incomplete or invalid Unicode property "${e}"`);return tte(e)}if(new RegExp("^\\\\x[89A-Fa-f]\\p{AHex}","u").test(e))try{const r=e.split(/\\x/).slice(1).map(a=>parseInt(a,16)),i=new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0}).decode(new Uint8Array(r)),o=new TextEncoder;return[...i].map(a=>{const u=[...o.encode(a)].map(c=>`\\x${c.toString(16)}`).join("");return qo(hf(a),u)})}catch{throw new Error(`Multibyte code "${e}" incomplete or invalid in Oniguruma`)}if(n==="u"||n==="x")return qo(rte(e),e);if(JD.has(n))return qo(JD.get(n),e);if(/\d/.test(n))return Vee(t,e);if(e==="\\")throw new Error(In`Incomplete escape "\"`);if(n==="M")throw new Error(`Unsupported meta "${e}"`);if([...e].length===2)return qo(e.codePointAt(1),e);throw new Error(`Unexpected escape "${e}"`)}function Bee(e){return{type:"Alternator",raw:e}}function QD(e,t){return{type:"Assertion",kind:e,raw:t}}function Nj(e){return{type:"Backreference",raw:e}}function qo(e,t){return{type:"Character",value:e,raw:t}}function Uee(e){return{type:"CharacterClassClose",raw:e}}function Hee(e){return{type:"CharacterClassHyphen",raw:e}}function Gee(e){return{type:"CharacterClassIntersector",raw:e}}function ZD(e,t){return{type:"CharacterClassOpen",negate:e,raw:t}}function xl(e,t,n={}){return{type:"CharacterSet",kind:e,...n,raw:t}}function Ij(e,t,n={}){return e==="keep"?{type:"Directive",kind:e,raw:t}:{type:"Directive",kind:e,flags:pf(n.flags),raw:t}}function Vee(e,t){return{type:"EscapedNumber",inCharClass:e,raw:t}}function qee(e){return{type:"GroupClose",raw:e}}function ic(e,t,n={}){return{type:"GroupOpen",kind:e,...n,raw:t}}function Yee(e,t,n,r){return{type:"NamedCallout",kind:e,tag:t,arguments:n,raw:r}}function Wee(e,t,n,r){return{type:"Quantifier",kind:e,min:t,max:n,raw:r}}function Kee(e){return{type:"Subroutine",raw:e}}const Xee=new Set(["COUNT","CMP","ERROR","FAIL","MAX","MISMATCH","SKIP","TOTAL_COUNT"]),JD=new Map([["a",7],["b",8],["e",27],["f",12],["n",10],["r",13],["t",9],["v",11]]);function Qee(e){const t=e[1]==="c"?e[2]:e[3];if(!t||!/[A-Za-z]/.test(t))throw new Error(`Unsupported control character "${e}"`);return qo(hf(t.toUpperCase())-64,e)}function Zee(e,t){let{on:n,off:r}=/^\(\?(?<on>[imx]*)(?:-(?<off>[-imx]*))?/.exec(e).groups;r??(r="");const i=(t.getCurrentModX()||n.includes("x"))&&!r.includes("x"),o=tM(n),a=tM(r),u={};if(o&&(u.enable=o),a&&(u.disable=a),e.endsWith(")"))return t.replaceCurrentModX(i),Ij("flags",e,{flags:u});if(e.endsWith(":"))return t.pushModX(i),t.numOpenGroups++,ic("group",e,{...(o||a)&&{flags:u}});throw new Error(`Unexpected flag modifier "${e}"`)}function Jee(e){const t=/\(\*(?<name>[A-Za-z_]\w*)?(?:\[(?<tag>(?:[A-Za-z_]\w*)?)\])?(?:\{(?<args>[^}]*)\})?\)/.exec(e);if(!t)throw new Error(`Incomplete or invalid named callout "${e}"`);const{name:n,tag:r,args:i}=t.groups;if(!n)throw new Error(`Invalid named callout "${e}"`);if(r==="")throw new Error(`Named callout tag with empty value not allowed "${e}"`);const o=i?i.split(",").filter(h=>h!=="").map(h=>/^[+-]?\d+$/.test(h)?+h:h):[],[a,u,c]=o,f=Xee.has(n)?n.toLowerCase():"custom";switch(f){case"fail":case"mismatch":case"skip":if(o.length>0)throw new Error(`Named callout arguments not allowed "${o}"`);break;case"error":if(o.length>1)throw new Error(`Named callout allows only one argument "${o}"`);if(typeof a=="string")throw new Error(`Named callout argument must be a number "${a}"`);break;case"max":if(!o.length||o.length>2)throw new Error(`Named callout must have one or two arguments "${o}"`);if(typeof a=="string"&&!/^[A-Za-z_]\w*$/.test(a))throw new Error(`Named callout argument one must be a tag or number "${a}"`);if(o.length===2&&(typeof u=="number"||!/^[<>X]$/.test(u)))throw new Error(`Named callout optional argument two must be '<', '>', or 'X' "${u}"`);break;case"count":case"total_count":if(o.length>1)throw new Error(`Named callout allows only one argument "${o}"`);if(o.length===1&&(typeof a=="number"||!/^[<>X]$/.test(a)))throw new Error(`Named callout optional argument must be '<', '>', or 'X' "${a}"`);break;case"cmp":if(o.length!==3)throw new Error(`Named callout must have three arguments "${o}"`);if(typeof a=="string"&&!/^[A-Za-z_]\w*$/.test(a))throw new Error(`Named callout argument one must be a tag or number "${a}"`);if(typeof u=="number"||!/^(?:[<>!=]=|[<>])$/.test(u))throw new Error(`Named callout argument two must be '==', '!=', '>', '<', '>=', or '<=' "${u}"`);if(typeof c=="string"&&!/^[A-Za-z_]\w*$/.test(c))throw new Error(`Named callout argument three must be a tag or number "${c}"`);break;case"custom":throw new Error(`Undefined callout name "${n}"`);default:throw new Error(`Unexpected named callout kind "${f}"`)}return Yee(f,r??null,(i==null?void 0:i.split(","))??null,e)}function eM(e){let t=null,n,r;if(e[0]==="{"){const{minStr:i,maxStr:o}=/^\{(?<minStr>\d*)(?:,(?<maxStr>\d*))?/.exec(e).groups,a=1e5;if(+i>a||o&&+o>a)throw new Error("Quantifier value unsupported in Oniguruma");if(n=+i,r=o===void 0?+i:o===""?1/0:+o,n>r&&(t="possessive",[n,r]=[r,n]),e.endsWith("?")){if(t==="possessive")throw new Error('Unsupported possessive interval quantifier chain with "?"');t="lazy"}else t||(t="greedy")}else n=e[0]==="+"?1:0,r=e[0]==="?"?1:1/0,t=e[1]==="+"?"possessive":e[1]==="?"?"lazy":"greedy";return Wee(t,n,r,e)}function ete(e){const t=e[1].toLowerCase();return xl({d:"digit",h:"hex",s:"space",w:"word"}[t],e,{negate:e[1]!==t})}function tte(e){const{p:t,neg:n,value:r}=/^\\(?<p>[pP])\{(?<neg>\^?)(?<value>[^}]+)/.exec(e).groups;return xl("property",e,{value:r,negate:t==="P"&&!n||t==="p"&&!!n})}function tM(e){const t={};return e.includes("i")&&(t.ignoreCase=!0),e.includes("m")&&(t.dotAll=!0),e.includes("x")&&(t.extended=!0),Object.keys(t).length?t:null}function nte(e){const t={ignoreCase:!1,dotAll:!1,extended:!1,digitIsAscii:!1,posixIsAscii:!1,spaceIsAscii:!1,wordIsAscii:!1,textSegmentMode:null};for(let n=0;n<e.length;n++){const r=e[n];if(!"imxDPSWy".includes(r))throw new Error(`Invalid flag "${r}"`);if(r==="y"){if(!/^y{[gw]}/.test(e.slice(n)))throw new Error('Invalid or unspecified flag "y" mode');t.textSegmentMode=e[n+2]==="g"?"grapheme":"word",n+=3;continue}t[{i:"ignoreCase",m:"dotAll",x:"extended",D:"digitIsAscii",P:"posixIsAscii",S:"spaceIsAscii",W:"wordIsAscii"}[r]]=!0}return t}function rte(e){if(new RegExp("^(?:\\\\u(?!\\p{AHex}{4})|\\\\x(?!\\p{AHex}{1,2}|\\{\\p{AHex}{1,8}\\}))","u").test(e))throw new Error(`Incomplete or invalid escape "${e}"`);const t=e[2]==="{"?new RegExp("^\\\\x\\{\\s*(?<hex>\\p{AHex}+)","u").exec(e).groups.hex:e.slice(2);return parseInt(t,16)}function ite(e,t){const{raw:n,inCharClass:r}=e,i=n.slice(1);if(!r&&(i!=="0"&&i.length===1||i[0]!=="0"&&+i<=t))return[Nj(n)];const o=[],a=i.match(/^[0-7]+|\d/g);for(let u=0;u<a.length;u++){const c=a[u];let f;if(u===0&&c!=="8"&&c!=="9"){if(f=parseInt(c,8),f>127)throw new Error(In`Octal encoded byte above 177 unsupported "${n}"`)}else f=hf(c);o.push(qo(f,(u===0?"\\":"")+c))}return o}function ote(e){const t=[],n=new RegExp(fC,"gy");let r;for(;r=n.exec(e);){const i=r[0];if(i[0]==="{"){const o=/^\{(?<min>\d+),(?<max>\d+)\}\??$/.exec(i);if(o){const{min:a,max:u}=o.groups;if(+a>+u&&i.endsWith("?")){n.lastIndex--,t.push(eM(i.slice(0,-1)));continue}}}t.push(eM(i))}return t}function jj(e,t){if(!Array.isArray(e.body))throw new Error("Expected node with body array");if(e.body.length!==1)return!1;const n=e.body[0];return!t||Object.keys(t).every(r=>t[r]===n[r])}function ste(e){return ate.has(e.type)}const ate=new Set(["AbsenceFunction","Backreference","CapturingGroup","Character","CharacterClass","CharacterSet","Group","Quantifier","Subroutine"]);function Lj(e,t={}){const n={flags:"",normalizeUnknownPropertyNames:!1,skipBackrefValidation:!1,skipLookbehindValidation:!1,skipPropertyNameValidation:!1,unicodePropertyMap:null,...t,rules:{captureGroup:!1,singleline:!1,...t.rules}},r=jee(e,{flags:n.flags,rules:{captureGroup:n.rules.captureGroup,singleline:n.rules.singleline}}),i=(m,y)=>{const b=r.tokens[o.nextIndex];switch(o.parent=m,o.nextIndex++,b.type){case"Alternator":return Ul();case"Assertion":return lte(b);case"Backreference":return ute(b,o);case"Character":return Hy(b.value,{useLastValid:!!y.isCheckingRangeEnd});case"CharacterClassHyphen":return cte(b,o,y);case"CharacterClassOpen":return fte(b,o,y);case"CharacterSet":return dte(b,o);case"Directive":return bte(b.kind,{flags:b.flags});case"GroupOpen":return hte(b,o,y);case"NamedCallout":return xte(b.kind,b.tag,b.arguments);case"Quantifier":return pte(b,o);case"Subroutine":return mte(b,o);default:throw new Error(`Unexpected token type "${b.type}"`)}},o={capturingGroups:[],hasNumberedRef:!1,namedGroupsByName:new Map,nextIndex:0,normalizeUnknownPropertyNames:n.normalizeUnknownPropertyNames,parent:null,skipBackrefValidation:n.skipBackrefValidation,skipLookbehindValidation:n.skipLookbehindValidation,skipPropertyNameValidation:n.skipPropertyNameValidation,subroutines:[],tokens:r.tokens,unicodePropertyMap:n.unicodePropertyMap,walk:i},a=Ste(vte(r.flags));let u=a.body[0];for(;o.nextIndex<r.tokens.length;){const m=i(u,{});m.type==="Alternative"?(a.body.push(m),u=m):u.body.push(m)}const{capturingGroups:c,hasNumberedRef:f,namedGroupsByName:h,subroutines:p}=o;if(f&&h.size&&!n.rules.captureGroup)throw new Error("Numbered backref/subroutine not allowed when using named capture");for(const{ref:m}of p)if(typeof m=="number"){if(m>c.length)throw new Error("Subroutine uses a group number that's not defined");m&&(c[m-1].isSubroutined=!0)}else if(h.has(m)){if(h.get(m).length>1)throw new Error(In`Subroutine uses a duplicate group name "\g<${m}>"`);h.get(m)[0].isSubroutined=!0}else throw new Error(In`Subroutine uses a group name that's not defined "\g<${m}>"`);return a}function lte({kind:e}){return dw(pf({"^":"line_start",$:"line_end","\\A":"string_start","\\b":"word_boundary","\\B":"word_boundary","\\G":"search_start","\\y":"text_segment_boundary","\\Y":"text_segment_boundary","\\z":"string_end","\\Z":"string_end_newline"}[e],`Unexpected assertion kind "${e}"`),{negate:e===In`\B`||e===In`\Y`})}function ute({raw:e},t){const n=/^\\k[<']/.test(e),r=n?e.slice(3,-1):e.slice(1),i=(o,a=!1)=>{const u=t.capturingGroups.length;let c=!1;if(o>u)if(t.skipBackrefValidation)c=!0;else throw new Error(`Not enough capturing groups defined to the left "${e}"`);return t.hasNumberedRef=!0,hw(a?u+1-o:o,{orphan:c})};if(n){const o=/^(?<sign>-?)0*(?<num>[1-9]\d*)$/.exec(r);if(o)return i(+o.groups.num,!!o.groups.sign);if(/[-+]/.test(r))throw new Error(`Invalid backref name "${e}"`);if(!t.namedGroupsByName.has(r))throw new Error(`Group name not defined to the left "${e}"`);return hw(r)}return i(+r)}function cte(e,t,n){const{tokens:r,walk:i}=t,o=t.parent,a=o.body.at(-1),u=r[t.nextIndex];if(!n.isCheckingRangeEnd&&a&&a.type!=="CharacterClass"&&a.type!=="CharacterClassRange"&&u&&u.type!=="CharacterClassOpen"&&u.type!=="CharacterClassClose"&&u.type!=="CharacterClassIntersector"){const c=i(o,{...n,isCheckingRangeEnd:!0});if(a.type==="Character"&&c.type==="Character")return o.body.pop(),yte(a,c);throw new Error("Invalid character class range")}return Hy(hf("-"))}function fte({negate:e},t,n){const{tokens:r,walk:i}=t,o=[mg()],a=r[t.nextIndex];let u=iM(a);for(;u.type!=="CharacterClassClose";){if(u.type==="CharacterClassIntersector")o.push(mg()),t.nextIndex++;else{const f=o.at(-1);f.body.push(i(f,n))}u=iM(r[t.nextIndex],a)}const c=mg({negate:e});return o.length===1?c.body=o[0].body:(c.kind="intersection",c.body=o.map(f=>f.body.length===1?f.body[0]:f)),t.nextIndex++,c}function dte({kind:e,negate:t,value:n},r){const{normalizeUnknownPropertyNames:i,skipPropertyNameValidation:o,unicodePropertyMap:a}=r;if(e==="property"){const u=Gy(n);if(cC.has(u)&&!(a!=null&&a.has(u)))e="posix",n=u;else return oc(n,{negate:t,normalizeUnknownPropertyNames:i,skipPropertyNameValidation:o,unicodePropertyMap:a})}return e==="posix"?wte(n,{negate:t}):pw(e,{negate:t})}function hte(e,t,n){const{tokens:r,capturingGroups:i,namedGroupsByName:o,skipLookbehindValidation:a,walk:u}=t,c=Cte(e),f=c.type==="AbsenceFunction",h=rM(c),p=h&&c.negate;if(c.type==="CapturingGroup"&&(i.push(c),c.name&&Iee(o,c.name,[]).push(c)),f&&n.isInAbsenceFunction)throw new Error("Nested absence function not supported by Oniguruma");let m=oM(r[t.nextIndex]);for(;m.type!=="GroupClose";){if(m.type==="Alternator")c.body.push(Ul()),t.nextIndex++;else{const y=c.body.at(-1),b=u(y,{...n,isInAbsenceFunction:n.isInAbsenceFunction||f,isInLookbehind:n.isInLookbehind||h,isInNegLookbehind:n.isInNegLookbehind||p});if(y.body.push(b),(h||n.isInLookbehind)&&!a){const v="Lookbehind includes a pattern not allowed by Oniguruma";if(p||n.isInNegLookbehind){if(nM(b)||b.type==="CapturingGroup")throw new Error(v)}else if(nM(b)||rM(b)&&b.negate)throw new Error(v)}}m=oM(r[t.nextIndex])}return t.nextIndex++,c}function pte({kind:e,min:t,max:n},r){const i=r.parent,o=i.body.at(-1);if(!o||!ste(o))throw new Error("Quantifier requires a repeatable token");const a=zj(e,t,n,o);return i.body.pop(),a}function mte({raw:e},t){const{capturingGroups:n,subroutines:r}=t;let i=e.slice(3,-1);const o=/^(?<sign>[-+]?)0*(?<num>[1-9]\d*)$/.exec(i);if(o){const u=+o.groups.num,c=n.length;if(t.hasNumberedRef=!0,i={"":u,"+":c+u,"-":c+1-u}[o.groups.sign],i<1)throw new Error("Invalid subroutine number")}else i==="0"&&(i=0);const a=Bj(i);return r.push(a),a}function gte(e,t){return{type:"AbsenceFunction",kind:e,body:Hh(t==null?void 0:t.body)}}function Ul(e){return{type:"Alternative",body:Uj(e==null?void 0:e.body)}}function dw(e,t){const n={type:"Assertion",kind:e};return(e==="word_boundary"||e==="text_segment_boundary")&&(n.negate=!!(t!=null&&t.negate)),n}function hw(e,t){const n=!!(t!=null&&t.orphan);return{type:"Backreference",ref:e,...n&&{orphan:n}}}function Fj(e,t){const n={name:void 0,isSubroutined:!1,...t};if(n.name!==void 0&&!Ete(n.name))throw new Error(`Group name "${n.name}" invalid in Oniguruma`);return{type:"CapturingGroup",number:e,...n.name&&{name:n.name},...n.isSubroutined&&{isSubroutined:n.isSubroutined},body:Hh(t==null?void 0:t.body)}}function Hy(e,t){const n={useLastValid:!1,...t};if(e>1114111){const r=e.toString(16);if(n.useLastValid)e=1114111;else throw e>1310719?new Error(`Invalid code point out of range "\\x{${r}}"`):new Error(`Invalid code point out of range in JS "\\x{${r}}"`)}return{type:"Character",value:e}}function mg(e){const t={kind:"union",negate:!1,...e};return{type:"CharacterClass",kind:t.kind,negate:t.negate,body:Uj(e==null?void 0:e.body)}}function yte(e,t){if(t.value<e.value)throw new Error("Character class range out of order");return{type:"CharacterClassRange",min:e,max:t}}function pw(e,t){const n=!!(t!=null&&t.negate),r={type:"CharacterSet",kind:e};return(e==="digit"||e==="hex"||e==="newline"||e==="space"||e==="word")&&(r.negate=n),(e==="text_segment"||e==="newline"&&!n)&&(r.variableLength=!0),r}function bte(e,t={}){if(e==="keep")return{type:"Directive",kind:e};if(e==="flags")return{type:"Directive",kind:e,flags:pf(t.flags)};throw new Error(`Unexpected directive kind "${e}"`)}function vte(e){return{type:"Flags",...e}}function Pi(e){const t=e==null?void 0:e.atomic,n=e==null?void 0:e.flags;if(t&&n)throw new Error("Atomic group cannot have flags");return{type:"Group",...t&&{atomic:t},...n&&{flags:n},body:Hh(e==null?void 0:e.body)}}function pl(e){const t={behind:!1,negate:!1,...e};return{type:"LookaroundAssertion",kind:t.behind?"lookbehind":"lookahead",negate:t.negate,body:Hh(e==null?void 0:e.body)}}function xte(e,t,n){return{type:"NamedCallout",kind:e,tag:t,arguments:n}}function wte(e,t){const n=!!(t!=null&&t.negate);if(!cC.has(e))throw new Error(`Invalid POSIX class "${e}"`);return{type:"CharacterSet",kind:"posix",value:e,negate:n}}function zj(e,t,n,r){if(t>n)throw new Error("Invalid reversed quantifier range");return{type:"Quantifier",kind:e,min:t,max:n,body:r}}function Ste(e,t){return{type:"Regex",body:Hh(t==null?void 0:t.body),flags:e}}function Bj(e){return{type:"Subroutine",ref:e}}function oc(e,t){var i;const n={negate:!1,normalizeUnknownPropertyNames:!1,skipPropertyNameValidation:!1,unicodePropertyMap:null,...t};let r=(i=n.unicodePropertyMap)==null?void 0:i.get(Gy(e));if(!r){if(n.normalizeUnknownPropertyNames)r=kte(e);else if(n.unicodePropertyMap&&!n.skipPropertyNameValidation)throw new Error(In`Invalid Unicode property "\p{${e}}"`)}return{type:"CharacterSet",kind:"property",value:r??e,negate:n.negate}}function Cte({flags:e,kind:t,name:n,negate:r,number:i}){switch(t){case"absence_repeater":return gte("repeater");case"atomic":return Pi({atomic:!0});case"capturing":return Fj(i,{name:n});case"group":return Pi({flags:e});case"lookahead":case"lookbehind":return pl({behind:t==="lookbehind",negate:r});default:throw new Error(`Unexpected group kind "${t}"`)}}function Hh(e){if(e===void 0)e=[Ul()];else if(!Array.isArray(e)||!e.length||!e.every(t=>t.type==="Alternative"))throw new Error("Invalid body; expected array of one or more Alternative nodes");return e}function Uj(e){if(e===void 0)e=[];else if(!Array.isArray(e)||!e.every(t=>!!t.type))throw new Error("Invalid body; expected array of nodes");return e}function nM(e){return e.type==="LookaroundAssertion"&&e.kind==="lookahead"}function rM(e){return e.type==="LookaroundAssertion"&&e.kind==="lookbehind"}function Ete(e){return/^[\p{Alpha}\p{Pc}][^)]*$/u.test(e)}function kte(e){return e.trim().replace(/[- _]+/g,"_").replace(/[A-Z][a-z]+(?=[A-Z])/g,"$&_").replace(/[A-Za-z]+/g,t=>t[0].toUpperCase()+t.slice(1).toLowerCase())}function Gy(e){return e.replace(/[- _]+/g,"").toLowerCase()}function iM(e,t){const n=t;return pf(e,`Unclosed character class${(n==null?void 0:n.type)==="Character"&&n.value===93&&n.raw==="]"?' (started with "]")':""}`)}function oM(e){return pf(e,"Unclosed group")}function Fd(e,t,n=null){function r(o,a){for(let u=0;u<o.length;u++){const c=i(o[u],a,u,o);u=Math.max(-1,u+c)}}function i(o,a=null,u=null,c=null){var x,_;let f=0,h=!1;const p={node:o,parent:a,key:u,container:c,root:e,remove(){$m(c).splice(Math.max(0,Ku(u)+f),1),f--,h=!0},removeAllNextSiblings(){return $m(c).splice(Ku(u)+1)},removeAllPrevSiblings(){const k=Ku(u)+f;return f-=k,$m(c).splice(0,Math.max(0,k))},replaceWith(k,T={}){const A=!!T.traverse;c?c[Math.max(0,Ku(u)+f)]=k:pf(a,"Can't replace root node")[u]=k,A&&i(k,a,u,c),h=!0},replaceWithMultiple(k,T={}){const A=!!T.traverse;if($m(c).splice(Math.max(0,Ku(u)+f),1,...k),f+=k.length-1,A){let D=0;for(let O=0;O<k.length;O++)D+=i(k[O],a,Ku(u)+O+D,c)}h=!0},skip(){h=!0}},{type:m}=o,y=t["*"],b=t[m],v=typeof y=="function"?y:y==null?void 0:y.enter,S=typeof b=="function"?b:b==null?void 0:b.enter;if(v==null||v(p,n),S==null||S(p,n),!h)switch(m){case"AbsenceFunction":case"Alternative":case"CapturingGroup":case"CharacterClass":case"Group":case"LookaroundAssertion":r(o.body,o);break;case"Assertion":case"Backreference":case"Character":case"CharacterSet":case"Directive":case"Flags":case"NamedCallout":case"Subroutine":break;case"CharacterClassRange":i(o.min,o,"min"),i(o.max,o,"max");break;case"Quantifier":i(o.body,o,"body");break;case"Regex":r(o.body,o),i(o.flags,o,"flags");break;default:throw new Error(`Unexpected node type "${m}"`)}return(x=b==null?void 0:b.exit)==null||x.call(b,p,n),(_=y==null?void 0:y.exit)==null||_.call(y,p,n),f}return i(e),e}function $m(e){if(!Array.isArray(e))throw new Error("Container expected");return e}function Ku(e){if(typeof e!="number")throw new Error("Numeric key expected");return e}const Rte=String.raw`\(\?(?:[:=!>A-Za-z\-]|<[=!]|\(DEFINE\))`;function _te(e,t){for(let n=0;n<e.length;n++)e[n]>=t&&e[n]++}function Tte(e,t,n,r){return e.slice(0,t)+r+e.slice(t+n.length)}const wi=Object.freeze({DEFAULT:"DEFAULT",CHAR_CLASS:"CHAR_CLASS"});function dC(e,t,n,r){const i=new RegExp(String.raw`${t}|(?<$skip>\[\^?|\\?.)`,"gsu"),o=[!1];let a=0,u="";for(const c of e.matchAll(i)){const{0:f,groups:{$skip:h}}=c;if(!h&&(!r||r===wi.DEFAULT==!a)){n instanceof Function?u+=n(c,{context:a?wi.CHAR_CLASS:wi.DEFAULT,negated:o[o.length-1]}):u+=n;continue}f[0]==="["?(a++,o.push(f[1]==="^")):f==="]"&&a&&(a--,o.pop()),u+=f}return u}function Hj(e,t,n,r){dC(e,t,n,r)}function Ate(e,t,n=0,r){if(!new RegExp(t,"su").test(e))return null;const i=new RegExp(`${t}|(?<$skip>\\\\?.)`,"gsu");i.lastIndex=n;let o=0,a;for(;a=i.exec(e);){const{0:u,groups:{$skip:c}}=a;if(!c&&(!r||r===wi.DEFAULT==!o))return a;u==="["?o++:u==="]"&&o&&o--,i.lastIndex==a.index&&i.lastIndex++}return null}function Pm(e,t,n){return!!Ate(e,t,0,n)}function Dte(e,t){const n=/\\?./gsu;n.lastIndex=t;let r=e.length,i=0,o=1,a;for(;a=n.exec(e);){const[u]=a;if(u==="[")i++;else if(i)u==="]"&&i--;else if(u==="(")o++;else if(u===")"&&(o--,!o)){r=a.index;break}}return e.slice(t,r)}const sM=new RegExp(String.raw`(?<noncapturingStart>${Rte})|(?<capturingStart>\((?:\?<[^>]+>)?)|\\?.`,"gsu");function Mte(e,t){const n=(t==null?void 0:t.hiddenCaptures)??[];let r=(t==null?void 0:t.captureTransfers)??new Map;if(!/\(\?>/.test(e))return{pattern:e,captureTransfers:r,hiddenCaptures:n};const i="(?>",o="(?:(?=(",a=[0],u=[];let c=0,f=0,h=NaN,p;do{p=!1;let m=0,y=0,b=!1,v;for(sM.lastIndex=Number.isNaN(h)?0:h+o.length;v=sM.exec(e);){const{0:S,index:x,groups:{capturingStart:_,noncapturingStart:k}}=v;if(S==="[")m++;else if(m)S==="]"&&m--;else if(S===i&&!b)h=x,b=!0;else if(b&&k)y++;else if(_)b?y++:(c++,a.push(c+f));else if(S===")"&&b){if(!y){f++;const T=c+f;if(e=`${e.slice(0,h)}${o}${e.slice(h+i.length,x)}))<$$${T}>)${e.slice(x+1)}`,p=!0,u.push(T),_te(n,T),r.size){const A=new Map;r.forEach((D,O)=>{A.set(O>=T?O+1:O,D.map($=>$>=T?$+1:$))}),r=A}break}y--}}}while(p);return n.push(...u),e=dC(e,String.raw`\\(?<backrefNum>[1-9]\d*)|<\$\$(?<wrappedBackrefNum>\d+)>`,({0:m,groups:{backrefNum:y,wrappedBackrefNum:b}})=>{if(y){const v=+y;if(v>a.length-1)throw new Error(`Backref "${m}" greater than number of captures`);return`\\${a[v]}`}return`\\${b}`},wi.DEFAULT),{pattern:e,captureTransfers:r,hiddenCaptures:n}}const Gj=String.raw`(?:[?*+]|\{\d+(?:,\d*)?\})`,bx=new RegExp(String.raw`
|
|
356
|
-
\\(?: \d+
|
|
357
|
-
| c[A-Za-z]
|
|
358
|
-
| [gk]<[^>]+>
|
|
359
|
-
| [pPu]\{[^\}]+\}
|
|
360
|
-
| u[A-Fa-f\d]{4}
|
|
361
|
-
| x[A-Fa-f\d]{2}
|
|
362
|
-
)
|
|
363
|
-
| \((?: \? (?: [:=!>]
|
|
364
|
-
| <(?:[=!]|[^>]+>)
|
|
365
|
-
| [A-Za-z\-]+:
|
|
366
|
-
| \(DEFINE\)
|
|
367
|
-
))?
|
|
368
|
-
| (?<qBase>${Gj})(?<qMod>[?+]?)(?<invalidQ>[?*+\{]?)
|
|
369
|
-
| \\?.
|
|
370
|
-
`.replace(/\s+/g,""),"gsu");function Ote(e){if(!new RegExp(`${Gj}\\+`).test(e))return{pattern:e};const t=[];let n=null,r=null,i="",o=0,a;for(bx.lastIndex=0;a=bx.exec(e);){const{0:u,index:c,groups:{qBase:f,qMod:h,invalidQ:p}}=a;if(u==="[")o||(r=c),o++;else if(u==="]")o?o--:r=null;else if(!o)if(h==="+"&&i&&!i.startsWith("(")){if(p)throw new Error(`Invalid quantifier "${u}"`);let m=-1;if(/^\{\d+\}$/.test(f))e=Tte(e,c+f.length,h,"");else{if(i===")"||i==="]"){const y=i===")"?n:r;if(y===null)throw new Error(`Invalid unmatched "${i}"`);e=`${e.slice(0,y)}(?>${e.slice(y,c)}${f})${e.slice(c+u.length)}`}else e=`${e.slice(0,c-i.length)}(?>${i}${f})${e.slice(c+u.length)}`;m+=4}bx.lastIndex+=m}else u[0]==="("?t.push(c):u===")"&&(n=t.length?t.pop():null);i=u}return{pattern:e}}const vi=String.raw,$te=vi`\\g<(?<gRNameOrNum>[^>&]+)&R=(?<gRDepth>[^>]+)>`,mw=vi`\(\?R=(?<rDepth>[^\)]+)\)|${$te}`,Vy=vi`\(\?<(?![=!])(?<captureName>[^>]+)>`,Vj=vi`${Vy}|(?<unnamed>\()(?!\?)`,ul=new RegExp(vi`${Vy}|${mw}|\(\?|\\?.`,"gsu"),vx="Cannot use multiple overlapping recursions";function Pte(e,t){const{hiddenCaptures:n,mode:r}={hiddenCaptures:[],mode:"plugin",...t};let i=(t==null?void 0:t.captureTransfers)??new Map;if(!new RegExp(mw,"su").test(e))return{pattern:e,captureTransfers:i,hiddenCaptures:n};if(r==="plugin"&&Pm(e,vi`\(\?\(DEFINE\)`,wi.DEFAULT))throw new Error("DEFINE groups cannot be used with recursion");const o=[],a=Pm(e,vi`\\[1-9]`,wi.DEFAULT),u=new Map,c=[];let f=!1,h=0,p=0,m;for(ul.lastIndex=0;m=ul.exec(e);){const{0:y,groups:{captureName:b,rDepth:v,gRNameOrNum:S,gRDepth:x}}=m;if(y==="[")h++;else if(h)y==="]"&&h--;else if(v){if(aM(v),f)throw new Error(vx);if(a)throw new Error(`${r==="external"?"Backrefs":"Numbered backrefs"} cannot be used with global recursion`);const _=e.slice(0,m.index),k=e.slice(ul.lastIndex);if(Pm(k,mw,wi.DEFAULT))throw new Error(vx);const T=+v-1;e=lM(_,k,T,!1,n,o,p),i=cM(i,_,T,o.length,0,p);break}else if(S){aM(x);let _=!1;for(const M of c)if(M.name===S||M.num===+S){if(_=!0,M.hasRecursedWithin)throw new Error(vx);break}if(!_)throw new Error(vi`Recursive \g cannot be used outside the referenced group "${r==="external"?S:vi`\g<${S}&R=${x}>`}"`);const k=u.get(S),T=Dte(e,k);if(a&&Pm(T,vi`${Vy}|\((?!\?)`,wi.DEFAULT))throw new Error(`${r==="external"?"Backrefs":"Numbered backrefs"} cannot be used with recursion of capturing groups`);const A=e.slice(k,m.index),D=T.slice(A.length+y.length),O=o.length,$=+x-1,B=lM(A,D,$,!0,n,o,p);i=cM(i,A,$,o.length-O,O,p);const j=e.slice(0,k),N=e.slice(k+T.length);e=`${j}${B}${N}`,ul.lastIndex+=B.length-y.length-A.length-D.length,c.forEach(M=>M.hasRecursedWithin=!0),f=!0}else if(b)p++,u.set(String(p),ul.lastIndex),u.set(b,ul.lastIndex),c.push({num:p,name:b});else if(y[0]==="("){const _=y==="(";_&&(p++,u.set(String(p),ul.lastIndex)),c.push(_?{num:p}:{})}else y===")"&&c.pop()}return n.push(...o),{pattern:e,captureTransfers:i,hiddenCaptures:n}}function aM(e){const t=`Max depth must be integer between 2 and 100; used ${e}`;if(!/^[1-9]\d*$/.test(e))throw new Error(t);if(e=+e,e<2||e>100)throw new Error(t)}function lM(e,t,n,r,i,o,a){const u=new Set;r&&Hj(e+t,Vy,({groups:{captureName:f}})=>{u.add(f)},wi.DEFAULT);const c=[n,r?u:null,i,o,a];return`${e}${uM(`(?:${e}`,"forward",...c)}(?:)${uM(`${t})`,"backward",...c)}${t}`}function uM(e,t,n,r,i,o,a){const c=h=>t==="forward"?h+2:n-h+2-1;let f="";for(let h=0;h<n;h++){const p=c(h);f+=dC(e,vi`${Vj}|\\k<(?<backref>[^>]+)>`,({0:m,groups:{captureName:y,unnamed:b,backref:v}})=>{if(v&&r&&!r.has(v))return m;const S=`_$${p}`;if(b||y){const x=a+o.length+1;return o.push(x),Nte(i,x),b?m:`(?<${y}${S}>`}return vi`\k<${v}${S}>`},wi.DEFAULT)}return f}function Nte(e,t){for(let n=0;n<e.length;n++)e[n]>=t&&e[n]++}function cM(e,t,n,r,i,o){if(e.size&&r){let a=0;Hj(t,Vj,()=>a++,wi.DEFAULT);const u=o-a+i,c=new Map;return e.forEach((f,h)=>{const p=(r-a*n)/n,m=a*n,y=h>u+a?h+r:h,b=[];for(const v of f)if(v<=u)b.push(v);else if(v>u+a+p)b.push(v+r);else if(v<=u+a)for(let S=0;S<=n;S++)b.push(v+a*S);else for(let S=0;S<=n;S++)b.push(v+m+p*S);c.set(y,b)}),c}return e}var Rn=String.fromCodePoint,it=String.raw,Fi={},qy=globalThis.RegExp;Fi.flagGroups=(()=>{try{new qy("(?i:)")}catch{return!1}return!0})();Fi.unicodeSets=(()=>{try{new qy("[[]]","v")}catch{return!1}return!0})();Fi.bugFlagVLiteralHyphenIsRange=Fi.unicodeSets?(()=>{try{new qy(it`[\d\-a]`,"v")}catch{return!0}return!1})():!1;Fi.bugNestedClassIgnoresNegation=Fi.unicodeSets&&new qy("[[^a]]","v").test("a");function oy(e,{enable:t,disable:n}){return{dotAll:!(n!=null&&n.dotAll)&&!!(t!=null&&t.dotAll||e.dotAll),ignoreCase:!(n!=null&&n.ignoreCase)&&!!(t!=null&&t.ignoreCase||e.ignoreCase)}}function uh(e,t,n){return e.has(t)||e.set(t,n),e.get(t)}function gw(e,t){return fM[e]>=fM[t]}function Ite(e,t){if(e==null)throw new Error(t??"Value expected");return e}var fM={ES2025:2025,ES2024:2024,ES2018:2018},jte={auto:"auto",ES2025:"ES2025",ES2024:"ES2024",ES2018:"ES2018"};function qj(e={}){if({}.toString.call(e)!=="[object Object]")throw new Error("Unexpected options");if(e.target!==void 0&&!jte[e.target])throw new Error(`Unexpected target "${e.target}"`);const t={accuracy:"default",avoidSubclass:!1,flags:"",global:!1,hasIndices:!1,lazyCompileLength:1/0,target:"auto",verbose:!1,...e,rules:{allowOrphanBackrefs:!1,asciiWordBoundaries:!1,captureGroup:!1,recursionLimit:20,singleline:!1,...e.rules}};return t.target==="auto"&&(t.target=Fi.flagGroups?"ES2025":Fi.unicodeSets?"ES2024":"ES2018"),t}var Lte="[ -\r ]",Fte=new Set([Rn(304),Rn(305)]),$o=it`[\p{L}\p{M}\p{N}\p{Pc}]`;function Yj(e){if(Fte.has(e))return[e];const t=new Set,n=e.toLowerCase(),r=n.toUpperCase(),i=Ute.get(n),o=zte.get(n),a=Bte.get(n);return[...r].length===1&&t.add(r),a&&t.add(a),i&&t.add(i),t.add(n),o&&t.add(o),[...t]}var hC=new Map(`C Other
|
|
371
|
-
Cc Control cntrl
|
|
372
|
-
Cf Format
|
|
373
|
-
Cn Unassigned
|
|
374
|
-
Co Private_Use
|
|
375
|
-
Cs Surrogate
|
|
376
|
-
L Letter
|
|
377
|
-
LC Cased_Letter
|
|
378
|
-
Ll Lowercase_Letter
|
|
379
|
-
Lm Modifier_Letter
|
|
380
|
-
Lo Other_Letter
|
|
381
|
-
Lt Titlecase_Letter
|
|
382
|
-
Lu Uppercase_Letter
|
|
383
|
-
M Mark Combining_Mark
|
|
384
|
-
Mc Spacing_Mark
|
|
385
|
-
Me Enclosing_Mark
|
|
386
|
-
Mn Nonspacing_Mark
|
|
387
|
-
N Number
|
|
388
|
-
Nd Decimal_Number digit
|
|
389
|
-
Nl Letter_Number
|
|
390
|
-
No Other_Number
|
|
391
|
-
P Punctuation punct
|
|
392
|
-
Pc Connector_Punctuation
|
|
393
|
-
Pd Dash_Punctuation
|
|
394
|
-
Pe Close_Punctuation
|
|
395
|
-
Pf Final_Punctuation
|
|
396
|
-
Pi Initial_Punctuation
|
|
397
|
-
Po Other_Punctuation
|
|
398
|
-
Ps Open_Punctuation
|
|
399
|
-
S Symbol
|
|
400
|
-
Sc Currency_Symbol
|
|
401
|
-
Sk Modifier_Symbol
|
|
402
|
-
Sm Math_Symbol
|
|
403
|
-
So Other_Symbol
|
|
404
|
-
Z Separator
|
|
405
|
-
Zl Line_Separator
|
|
406
|
-
Zp Paragraph_Separator
|
|
407
|
-
Zs Space_Separator
|
|
408
|
-
ASCII
|
|
409
|
-
ASCII_Hex_Digit AHex
|
|
410
|
-
Alphabetic Alpha
|
|
411
|
-
Any
|
|
412
|
-
Assigned
|
|
413
|
-
Bidi_Control Bidi_C
|
|
414
|
-
Bidi_Mirrored Bidi_M
|
|
415
|
-
Case_Ignorable CI
|
|
416
|
-
Cased
|
|
417
|
-
Changes_When_Casefolded CWCF
|
|
418
|
-
Changes_When_Casemapped CWCM
|
|
419
|
-
Changes_When_Lowercased CWL
|
|
420
|
-
Changes_When_NFKC_Casefolded CWKCF
|
|
421
|
-
Changes_When_Titlecased CWT
|
|
422
|
-
Changes_When_Uppercased CWU
|
|
423
|
-
Dash
|
|
424
|
-
Default_Ignorable_Code_Point DI
|
|
425
|
-
Deprecated Dep
|
|
426
|
-
Diacritic Dia
|
|
427
|
-
Emoji
|
|
428
|
-
Emoji_Component EComp
|
|
429
|
-
Emoji_Modifier EMod
|
|
430
|
-
Emoji_Modifier_Base EBase
|
|
431
|
-
Emoji_Presentation EPres
|
|
432
|
-
Extended_Pictographic ExtPict
|
|
433
|
-
Extender Ext
|
|
434
|
-
Grapheme_Base Gr_Base
|
|
435
|
-
Grapheme_Extend Gr_Ext
|
|
436
|
-
Hex_Digit Hex
|
|
437
|
-
IDS_Binary_Operator IDSB
|
|
438
|
-
IDS_Trinary_Operator IDST
|
|
439
|
-
ID_Continue IDC
|
|
440
|
-
ID_Start IDS
|
|
441
|
-
Ideographic Ideo
|
|
442
|
-
Join_Control Join_C
|
|
443
|
-
Logical_Order_Exception LOE
|
|
444
|
-
Lowercase Lower
|
|
445
|
-
Math
|
|
446
|
-
Noncharacter_Code_Point NChar
|
|
447
|
-
Pattern_Syntax Pat_Syn
|
|
448
|
-
Pattern_White_Space Pat_WS
|
|
449
|
-
Quotation_Mark QMark
|
|
450
|
-
Radical
|
|
451
|
-
Regional_Indicator RI
|
|
452
|
-
Sentence_Terminal STerm
|
|
453
|
-
Soft_Dotted SD
|
|
454
|
-
Terminal_Punctuation Term
|
|
455
|
-
Unified_Ideograph UIdeo
|
|
456
|
-
Uppercase Upper
|
|
457
|
-
Variation_Selector VS
|
|
458
|
-
White_Space space
|
|
459
|
-
XID_Continue XIDC
|
|
460
|
-
XID_Start XIDS`.split(/\s/).map(e=>[Gy(e),e])),zte=new Map([["s",Rn(383)],[Rn(383),"s"]]),Bte=new Map([[Rn(223),Rn(7838)],[Rn(107),Rn(8490)],[Rn(229),Rn(8491)],[Rn(969),Rn(8486)]]),Ute=new Map([Bs(453),Bs(456),Bs(459),Bs(498),...xx(8072,8079),...xx(8088,8095),...xx(8104,8111),Bs(8124),Bs(8140),Bs(8188)]),Hte=new Map([["alnum",it`[\p{Alpha}\p{Nd}]`],["alpha",it`\p{Alpha}`],["ascii",it`\p{ASCII}`],["blank",it`[\p{Zs}\t]`],["cntrl",it`\p{Cc}`],["digit",it`\p{Nd}`],["graph",it`[\P{space}&&\P{Cc}&&\P{Cn}&&\P{Cs}]`],["lower",it`\p{Lower}`],["print",it`[[\P{space}&&\P{Cc}&&\P{Cn}&&\P{Cs}]\p{Zs}]`],["punct",it`[\p{P}\p{S}]`],["space",it`\p{space}`],["upper",it`\p{Upper}`],["word",it`[\p{Alpha}\p{M}\p{Nd}\p{Pc}]`],["xdigit",it`\p{AHex}`]]);function Gte(e,t){const n=[];for(let r=e;r<=t;r++)n.push(r);return n}function Bs(e){const t=Rn(e);return[t.toLowerCase(),t]}function xx(e,t){return Gte(e,t).map(n=>Bs(n))}var Wj=new Set(["Lower","Lowercase","Upper","Uppercase","Ll","Lowercase_Letter","Lt","Titlecase_Letter","Lu","Uppercase_Letter"]);function Vte(e,t){const n={accuracy:"default",asciiWordBoundaries:!1,avoidSubclass:!1,bestEffortTarget:"ES2025",...t};Kj(e);const r={accuracy:n.accuracy,asciiWordBoundaries:n.asciiWordBoundaries,avoidSubclass:n.avoidSubclass,flagDirectivesByAlt:new Map,jsGroupNameMap:new Map,minTargetEs2024:gw(n.bestEffortTarget,"ES2024"),passedLookbehind:!1,strategy:null,subroutineRefMap:new Map,supportedGNodes:new Set,digitIsAscii:e.flags.digitIsAscii,spaceIsAscii:e.flags.spaceIsAscii,wordIsAscii:e.flags.wordIsAscii};Fd(e,qte,r);const i={dotAll:e.flags.dotAll,ignoreCase:e.flags.ignoreCase},o={currentFlags:i,prevFlags:null,globalFlags:i,groupOriginByCopy:new Map,groupsByName:new Map,multiplexCapturesToLeftByRef:new Map,openRefs:new Map,reffedNodesByReferencer:new Map,subroutineRefMap:r.subroutineRefMap};Fd(e,Yte,o);const a={groupsByName:o.groupsByName,highestOrphanBackref:0,numCapturesToLeft:0,reffedNodesByReferencer:o.reffedNodesByReferencer};return Fd(e,Wte,a),e._originMap=o.groupOriginByCopy,e._strategy=r.strategy,e}var qte={AbsenceFunction({node:e,parent:t,replaceWith:n}){const{body:r,kind:i}=e;if(i==="repeater"){const o=Pi();o.body[0].body.push(pl({negate:!0,body:r}),oc("Any"));const a=Pi();a.body[0].body.push(zj("greedy",0,1/0,o)),n(mn(a,t),{traverse:!0})}else throw new Error('Unsupported absence function "(?~|"')},Alternative:{enter({node:e,parent:t,key:n},{flagDirectivesByAlt:r}){const i=e.body.filter(o=>o.kind==="flags");for(let o=n+1;o<t.body.length;o++){const a=t.body[o];uh(r,a,[]).push(...i)}},exit({node:e},{flagDirectivesByAlt:t}){var n;if((n=t.get(e))!=null&&n.length){const r=Qj(t.get(e));if(r){const i=Pi({flags:r});i.body[0].body=e.body,e.body=[mn(i,e)]}}}},Assertion({node:e,parent:t,key:n,container:r,root:i,remove:o,replaceWith:a},u){const{kind:c,negate:f}=e,{asciiWordBoundaries:h,avoidSubclass:p,supportedGNodes:m,wordIsAscii:y}=u;if(c==="text_segment_boundary")throw new Error(`Unsupported text segment boundary "\\${f?"Y":"y"}"`);if(c==="line_end")a(mn(pl({body:[Ul({body:[dw("string_end")]}),Ul({body:[Hy(10)]})]}),t));else if(c==="line_start")a(mn(Po(it`(?<=\A|\n(?!\z))`,{skipLookbehindValidation:!0}),t));else if(c==="search_start")if(m.has(e))i.flags.sticky=!0,o();else{const b=r[n-1];if(b&&ene(b))a(mn(pl({negate:!0}),t));else{if(p)throw new Error(it`Uses "\G" in a way that requires a subclass`);a(Us(dw("string_start"),t)),u.strategy="clip_search"}}else if(!(c==="string_end"||c==="string_start"))if(c==="string_end_newline")a(mn(Po(it`(?=\n?\z)`),t));else if(c==="word_boundary"){if(!y&&!h){const b=`(?:(?<=${$o})(?!${$o})|(?<!${$o})(?=${$o}))`,v=`(?:(?<=${$o})(?=${$o})|(?<!${$o})(?!${$o}))`;a(mn(Po(f?v:b),t))}}else throw new Error(`Unexpected assertion kind "${c}"`)},Backreference({node:e},{jsGroupNameMap:t}){let{ref:n}=e;typeof n=="string"&&!Sx(n)&&(n=wx(n,t),e.ref=n)},CapturingGroup({node:e},{jsGroupNameMap:t,subroutineRefMap:n}){let{name:r}=e;r&&!Sx(r)&&(r=wx(r,t),e.name=r),n.set(e.number,e),r&&n.set(r,e)},CharacterClassRange({node:e,parent:t,replaceWith:n}){if(t.kind==="intersection"){const r=mg({body:[e]});n(mn(r,t),{traverse:!0})}},CharacterSet({node:e,parent:t,replaceWith:n},{accuracy:r,minTargetEs2024:i,digitIsAscii:o,spaceIsAscii:a,wordIsAscii:u}){const{kind:c,negate:f,value:h}=e;if(o&&(c==="digit"||h==="digit")){n(Us(pw("digit",{negate:f}),t));return}if(a&&(c==="space"||h==="space")){n(mn(Cx(Po(Lte),f),t));return}if(u&&(c==="word"||h==="word")){n(Us(pw("word",{negate:f}),t));return}if(c==="any")n(Us(oc("Any"),t));else if(c==="digit")n(Us(oc("Nd",{negate:f}),t));else if(c!=="dot")if(c==="text_segment"){if(r==="strict")throw new Error(it`Use of "\X" requires non-strict accuracy`);const p="\\p{Emoji}(?:\\p{EMod}|\\uFE0F\\u20E3?|[\\x{E0020}-\\x{E007E}]+\\x{E007F})?",m=it`\p{RI}{2}|${p}(?:\u200D${p})*`;n(mn(Po(it`(?>\r\n|${i?it`\p{RGI_Emoji}`:m}|\P{M}\p{M}*)`,{skipPropertyNameValidation:!0}),t))}else if(c==="hex")n(Us(oc("AHex",{negate:f}),t));else if(c==="newline")n(mn(Po(f?`[^
|
|
461
|
-
]`:`(?>\r
|
|
462
|
-
?|[
|
|
463
|
-
\v\f
\u2028\u2029])`),t));else if(c==="posix")if(!i&&(h==="graph"||h==="print")){if(r==="strict")throw new Error(`POSIX class "${h}" requires min target ES2024 or non-strict accuracy`);let p={graph:"!-~",print:" -~"}[h];f&&(p=`\0-${Rn(p.codePointAt(0)-1)}${Rn(p.codePointAt(2)+1)}-`),n(mn(Po(`[${p}]`),t))}else n(mn(Cx(Po(Hte.get(h)),f),t));else if(c==="property")hC.has(Gy(h))||(e.key="sc");else if(c==="space")n(Us(oc("space",{negate:f}),t));else if(c==="word")n(mn(Cx(Po($o),f),t));else throw new Error(`Unexpected character set kind "${c}"`)},Directive({node:e,parent:t,root:n,remove:r,replaceWith:i,removeAllPrevSiblings:o,removeAllNextSiblings:a}){const{kind:u,flags:c}=e;if(u==="flags")if(!c.enable&&!c.disable)r();else{const f=Pi({flags:c});f.body[0].body=a(),i(mn(f,t),{traverse:!0})}else if(u==="keep"){const f=n.body[0],p=n.body.length===1&&jj(f,{type:"Group"})&&f.body[0].body.length===1?f.body[0]:n;if(t.parent!==p||p.body.length>1)throw new Error(it`Uses "\K" in a way that's unsupported`);const m=pl({behind:!0});m.body[0].body=o(),i(mn(m,t))}else throw new Error(`Unexpected directive kind "${u}"`)},Flags({node:e,parent:t}){if(e.posixIsAscii)throw new Error('Unsupported flag "P"');if(e.textSegmentMode==="word")throw new Error('Unsupported flag "y{w}"');["digitIsAscii","extended","posixIsAscii","spaceIsAscii","wordIsAscii","textSegmentMode"].forEach(n=>delete e[n]),Object.assign(e,{global:!1,hasIndices:!1,multiline:!1,sticky:e.sticky??!1}),t.options={disable:{x:!0,n:!0},force:{v:!0}}},Group({node:e}){if(!e.flags)return;const{enable:t,disable:n}=e.flags;t!=null&&t.extended&&delete t.extended,n!=null&&n.extended&&delete n.extended,t!=null&&t.dotAll&&(n!=null&&n.dotAll)&&delete t.dotAll,t!=null&&t.ignoreCase&&(n!=null&&n.ignoreCase)&&delete t.ignoreCase,t&&!Object.keys(t).length&&delete e.flags.enable,n&&!Object.keys(n).length&&delete e.flags.disable,!e.flags.enable&&!e.flags.disable&&delete e.flags},LookaroundAssertion({node:e},t){const{kind:n}=e;n==="lookbehind"&&(t.passedLookbehind=!0)},NamedCallout({node:e,parent:t,replaceWith:n}){const{kind:r}=e;if(r==="fail")n(mn(pl({negate:!0}),t));else throw new Error(`Unsupported named callout "(*${r.toUpperCase()}"`)},Quantifier({node:e}){if(e.body.type==="Quantifier"){const t=Pi();t.body[0].body.push(e.body),e.body=mn(t,e)}},Regex:{enter({node:e},{supportedGNodes:t}){const n=[];let r=!1,i=!1;for(const o of e.body)if(o.body.length===1&&o.body[0].kind==="search_start")o.body.pop();else{const a=Jj(o.body);a?(r=!0,Array.isArray(a)?n.push(...a):n.push(a)):i=!0}r&&!i&&n.forEach(o=>t.add(o))},exit(e,{accuracy:t,passedLookbehind:n,strategy:r}){if(t==="strict"&&n&&r)throw new Error(it`Uses "\G" in a way that requires non-strict accuracy`)}},Subroutine({node:e},{jsGroupNameMap:t}){let{ref:n}=e;typeof n=="string"&&!Sx(n)&&(n=wx(n,t),e.ref=n)}},Yte={Backreference({node:e},{multiplexCapturesToLeftByRef:t,reffedNodesByReferencer:n}){const{orphan:r,ref:i}=e;r||n.set(e,[...t.get(i).map(({node:o})=>o)])},CapturingGroup:{enter({node:e,parent:t,replaceWith:n,skip:r},{groupOriginByCopy:i,groupsByName:o,multiplexCapturesToLeftByRef:a,openRefs:u,reffedNodesByReferencer:c}){const f=i.get(e);if(f&&u.has(e.number)){const p=Us(dM(e.number),t);c.set(p,u.get(e.number)),n(p);return}u.set(e.number,e),a.set(e.number,[]),e.name&&uh(a,e.name,[]);const h=a.get(e.name??e.number);for(let p=0;p<h.length;p++){const m=h[p];if(f===m.node||f&&f===m.origin||e===m.origin){h.splice(p,1);break}}if(a.get(e.number).push({node:e,origin:f}),e.name&&a.get(e.name).push({node:e,origin:f}),e.name){const p=uh(o,e.name,new Map);let m=!1;if(f)m=!0;else for(const y of p.values())if(!y.hasDuplicateNameToRemove){m=!0;break}o.get(e.name).set(e,{node:e,hasDuplicateNameToRemove:m})}},exit({node:e},{openRefs:t}){t.get(e.number)===e&&t.delete(e.number)}},Group:{enter({node:e},t){t.prevFlags=t.currentFlags,e.flags&&(t.currentFlags=oy(t.currentFlags,e.flags))},exit(e,t){t.currentFlags=t.prevFlags}},Subroutine({node:e,parent:t,replaceWith:n},r){const{isRecursive:i,ref:o}=e;if(i){let h=t;for(;(h=h.parent)&&!(h.type==="CapturingGroup"&&(h.name===o||h.number===o)););r.reffedNodesByReferencer.set(e,h);return}const a=r.subroutineRefMap.get(o),u=o===0,c=u?dM(0):Xj(a,r.groupOriginByCopy,null);let f=c;if(!u){const h=Qj(Qte(a,m=>m.type==="Group"&&!!m.flags)),p=h?oy(r.globalFlags,h):r.globalFlags;Kte(p,r.currentFlags)||(f=Pi({flags:Zte(p)}),f.body[0].body.push(c))}n(mn(f,t),{traverse:!u})}},Wte={Backreference({node:e,parent:t,replaceWith:n},r){if(e.orphan){r.highestOrphanBackref=Math.max(r.highestOrphanBackref,e.ref);return}const o=r.reffedNodesByReferencer.get(e).filter(a=>Xte(a,e));if(!o.length)n(mn(pl({negate:!0}),t));else if(o.length>1){const a=Pi({atomic:!0,body:o.reverse().map(u=>Ul({body:[hw(u.number)]}))});n(mn(a,t))}else e.ref=o[0].number},CapturingGroup({node:e},t){e.number=++t.numCapturesToLeft,e.name&&t.groupsByName.get(e.name).get(e).hasDuplicateNameToRemove&&delete e.name},Regex:{exit({node:e},t){const n=Math.max(t.highestOrphanBackref-t.numCapturesToLeft,0);for(let r=0;r<n;r++){const i=Fj();e.body.at(-1).body.push(i)}}},Subroutine({node:e},t){!e.isRecursive||e.ref===0||(e.ref=t.reffedNodesByReferencer.get(e).number)}};function Kj(e){Fd(e,{"*"({node:t,parent:n}){t.parent=n}})}function Kte(e,t){return e.dotAll===t.dotAll&&e.ignoreCase===t.ignoreCase}function Xte(e,t){let n=t;do{if(n.type==="Regex")return!1;if(n.type==="Alternative")continue;if(n===e)return!1;const r=Zj(n.parent);for(const i of r){if(i===n)break;if(i===e||eL(i,e))return!0}}while(n=n.parent);throw new Error("Unexpected path")}function Xj(e,t,n,r){const i=Array.isArray(e)?[]:{};for(const[o,a]of Object.entries(e))o==="parent"?i.parent=Array.isArray(n)?r:n:a&&typeof a=="object"?i[o]=Xj(a,t,i,n):(o==="type"&&a==="CapturingGroup"&&t.set(i,t.get(e)??e),i[o]=a);return i}function dM(e){const t=Bj(e);return t.isRecursive=!0,t}function Qte(e,t){const n=[];for(;e=e.parent;)(!t||t(e))&&n.push(e);return n}function wx(e,t){if(t.has(e))return t.get(e);const n=`$${t.size}_${e.replace(/^[^$_\p{IDS}]|[^$\u200C\u200D\p{IDC}]/ug,"_")}`;return t.set(e,n),n}function Qj(e){const t=["dotAll","ignoreCase"],n={enable:{},disable:{}};return e.forEach(({flags:r})=>{t.forEach(i=>{var o,a;(o=r.enable)!=null&&o[i]&&(delete n.disable[i],n.enable[i]=!0),(a=r.disable)!=null&&a[i]&&(n.disable[i]=!0)})}),Object.keys(n.enable).length||delete n.enable,Object.keys(n.disable).length||delete n.disable,n.enable||n.disable?n:null}function Zte({dotAll:e,ignoreCase:t}){const n={};return(e||t)&&(n.enable={},e&&(n.enable.dotAll=!0),t&&(n.enable.ignoreCase=!0)),(!e||!t)&&(n.disable={},!e&&(n.disable.dotAll=!0),!t&&(n.disable.ignoreCase=!0)),n}function Zj(e){if(!e)throw new Error("Node expected");const{body:t}=e;return Array.isArray(t)?t:t?[t]:null}function Jj(e){const t=e.find(n=>n.kind==="search_start"||tne(n,{negate:!1})||!Jte(n));if(!t)return null;if(t.kind==="search_start")return t;if(t.type==="LookaroundAssertion")return t.body[0].body[0];if(t.type==="CapturingGroup"||t.type==="Group"){const n=[];for(const r of t.body){const i=Jj(r.body);if(!i)return null;Array.isArray(i)?n.push(...i):n.push(i)}return n}return null}function eL(e,t){const n=Zj(e)??[];for(const r of n)if(r===t||eL(r,t))return!0;return!1}function Jte({type:e}){return e==="Assertion"||e==="Directive"||e==="LookaroundAssertion"}function ene(e){const t=["Character","CharacterClass","CharacterSet"];return t.includes(e.type)||e.type==="Quantifier"&&e.min&&t.includes(e.body.type)}function tne(e,t){const n={negate:null,...t};return e.type==="LookaroundAssertion"&&(n.negate===null||e.negate===n.negate)&&e.body.length===1&&jj(e.body[0],{type:"Assertion",kind:"search_start"})}function Sx(e){return/^[$_\p{IDS}][$\u200C\u200D\p{IDC}]*$/u.test(e)}function Po(e,t){const r=Lj(e,{...t,unicodePropertyMap:hC}).body;return r.length>1||r[0].body.length>1?Pi({body:r}):r[0].body[0]}function Cx(e,t){return e.negate=t,e}function Us(e,t){return e.parent=t,e}function mn(e,t){return Kj(e),e.parent=t,e}function nne(e,t){const n=qj(t),r=gw(n.target,"ES2024"),i=gw(n.target,"ES2025"),o=n.rules.recursionLimit;if(!Number.isInteger(o)||o<2||o>20)throw new Error("Invalid recursionLimit; use 2-20");let a=null,u=null;if(!i){const y=[e.flags.ignoreCase];Fd(e,rne,{getCurrentModI:()=>y.at(-1),popModI(){y.pop()},pushModI(b){y.push(b)},setHasCasedChar(){y.at(-1)?a=!0:u=!0}})}const c={dotAll:e.flags.dotAll,ignoreCase:!!((e.flags.ignoreCase||a)&&!u)};let f=e;const h={accuracy:n.accuracy,appliedGlobalFlags:c,captureMap:new Map,currentFlags:{dotAll:e.flags.dotAll,ignoreCase:e.flags.ignoreCase},inCharClass:!1,lastNode:f,originMap:e._originMap,recursionLimit:o,useAppliedIgnoreCase:!!(!i&&a&&u),useFlagMods:i,useFlagV:r,verbose:n.verbose};function p(y){return h.lastNode=f,f=y,Ite(ine[y.type],`Unexpected node type "${y.type}"`)(y,h,p)}const m={pattern:e.body.map(p).join("|"),flags:p(e.flags),options:{...e.options}};return r||(delete m.options.force.v,m.options.disable.v=!0,m.options.unicodeSetsPlugin=null),m._captureTransfers=new Map,m._hiddenCaptures=[],h.captureMap.forEach((y,b)=>{y.hidden&&m._hiddenCaptures.push(b),y.transferTo&&uh(m._captureTransfers,y.transferTo,[]).push(b)}),m}var rne={"*":{enter({node:e},t){if(pM(e)){const n=t.getCurrentModI();t.pushModI(e.flags?oy({ignoreCase:n},e.flags).ignoreCase:n)}},exit({node:e},t){pM(e)&&t.popModI()}},Backreference(e,t){t.setHasCasedChar()},Character({node:e},t){pC(Rn(e.value))&&t.setHasCasedChar()},CharacterClassRange({node:e,skip:t},n){t(),tL(e,{firstOnly:!0}).length&&n.setHasCasedChar()},CharacterSet({node:e},t){e.kind==="property"&&Wj.has(e.value)&&t.setHasCasedChar()}},ine={Alternative({body:e},t,n){return e.map(n).join("")},Assertion({kind:e,negate:t}){if(e==="string_end")return"$";if(e==="string_start")return"^";if(e==="word_boundary")return t?it`\B`:it`\b`;throw new Error(`Unexpected assertion kind "${e}"`)},Backreference({ref:e},t){if(typeof e!="number")throw new Error("Unexpected named backref in transformed AST");if(!t.useFlagMods&&t.accuracy==="strict"&&t.currentFlags.ignoreCase&&!t.captureMap.get(e).ignoreCase)throw new Error("Use of case-insensitive backref to case-sensitive group requires target ES2025 or non-strict accuracy");return"\\"+e},CapturingGroup(e,t,n){const{body:r,name:i,number:o}=e,a={ignoreCase:t.currentFlags.ignoreCase},u=t.originMap.get(e);return u&&(a.hidden=!0,o>u.number&&(a.transferTo=u.number)),t.captureMap.set(o,a),`(${i?`?<${i}>`:""}${r.map(n).join("|")})`},Character({value:e},t){const n=Rn(e),r=Xu(e,{escDigit:t.lastNode.type==="Backreference",inCharClass:t.inCharClass,useFlagV:t.useFlagV});if(r!==n)return r;if(t.useAppliedIgnoreCase&&t.currentFlags.ignoreCase&&pC(n)){const i=Yj(n);return t.inCharClass?i.join(""):i.length>1?`[${i.join("")}]`:i[0]}return n},CharacterClass(e,t,n){const{kind:r,negate:i,parent:o}=e;let{body:a}=e;if(r==="intersection"&&!t.useFlagV)throw new Error("Use of character class intersection requires min target ES2024");Fi.bugFlagVLiteralHyphenIsRange&&t.useFlagV&&a.some(mM)&&(a=[Hy(45),...a.filter(f=>!mM(f))]);const u=()=>`[${i?"^":""}${a.map(n).join(r==="intersection"?"&&":"")}]`;if(!t.inCharClass){if((!t.useFlagV||Fi.bugNestedClassIgnoresNegation)&&!i){const h=a.filter(p=>p.type==="CharacterClass"&&p.kind==="union"&&p.negate);if(h.length){const p=Pi(),m=p.body[0];return p.parent=o,m.parent=p,a=a.filter(y=>!h.includes(y)),e.body=a,a.length?(e.parent=m,m.body.push(e)):p.body.pop(),h.forEach(y=>{const b=Ul({body:[y]});y.parent=b,b.parent=p,p.body.push(b)}),n(p)}}t.inCharClass=!0;const f=u();return t.inCharClass=!1,f}const c=a[0];if(r==="union"&&!i&&c&&((!t.useFlagV||!t.verbose)&&o.kind==="union"&&!(Fi.bugFlagVLiteralHyphenIsRange&&t.useFlagV)||!t.verbose&&o.kind==="intersection"&&a.length===1&&c.type!=="CharacterClassRange"))return a.map(n).join("");if(!t.useFlagV&&o.type==="CharacterClass")throw new Error("Uses nested character class in a way that requires min target ES2024");return u()},CharacterClassRange(e,t){const n=e.min.value,r=e.max.value,i={escDigit:!1,inCharClass:!0,useFlagV:t.useFlagV},o=Xu(n,i),a=Xu(r,i),u=new Set;if(t.useAppliedIgnoreCase&&t.currentFlags.ignoreCase){const c=tL(e);une(c).forEach(h=>{u.add(Array.isArray(h)?`${Xu(h[0],i)}-${Xu(h[1],i)}`:Xu(h,i))})}return`${o}-${a}${[...u].join("")}`},CharacterSet({kind:e,negate:t,value:n,key:r},i){if(e==="dot")return i.currentFlags.dotAll?i.appliedGlobalFlags.dotAll||i.useFlagMods?".":"[^]":it`[^\n]`;if(e==="digit")return t?it`\D`:it`\d`;if(e==="property"){if(i.useAppliedIgnoreCase&&i.currentFlags.ignoreCase&&Wj.has(n))throw new Error(`Unicode property "${n}" can't be case-insensitive when other chars have specific case`);return`${t?it`\P`:it`\p`}{${r?`${r}=`:""}${n}}`}if(e==="word")return t?it`\W`:it`\w`;throw new Error(`Unexpected character set kind "${e}"`)},Flags(e,t){return(t.appliedGlobalFlags.ignoreCase?"i":"")+(e.dotAll?"s":"")+(e.sticky?"y":"")},Group({atomic:e,body:t,flags:n,parent:r},i,o){const a=i.currentFlags;n&&(i.currentFlags=oy(a,n));const u=t.map(o).join("|"),c=!i.verbose&&t.length===1&&r.type!=="Quantifier"&&!e&&(!i.useFlagMods||!n)?u:`(?${cne(e,n,i.useFlagMods)}${u})`;return i.currentFlags=a,c},LookaroundAssertion({body:e,kind:t,negate:n},r,i){return`(?${`${t==="lookahead"?"":"<"}${n?"!":"="}`}${e.map(i).join("|")})`},Quantifier(e,t,n){return n(e.body)+fne(e)},Subroutine({isRecursive:e,ref:t},n){if(!e)throw new Error("Unexpected non-recursive subroutine in transformed AST");const r=n.recursionLimit;return t===0?`(?R=${r})`:it`\g<${t}&R=${r}>`}},one=new Set(["$","(",")","*","+",".","?","[","\\","]","^","{","|","}"]),sne=new Set(["-","\\","]","^","["]),ane=new Set(["(",")","-","/","[","\\","]","^","{","|","}","!","#","$","%","&","*","+",",",".",":",";","<","=",">","?","@","`","~"]),hM=new Map([[9,it`\t`],[10,it`\n`],[11,it`\v`],[12,it`\f`],[13,it`\r`],[8232,it`\u2028`],[8233,it`\u2029`],[65279,it`\uFEFF`]]),lne=new RegExp("^\\p{Cased}$","u");function pC(e){return lne.test(e)}function tL(e,t){const n=!!(t!=null&&t.firstOnly),r=e.min.value,i=e.max.value,o=[];if(r<65&&(i===65535||i>=131071)||r===65536&&i>=131071)return o;for(let a=r;a<=i;a++){const u=Rn(a);if(!pC(u))continue;const c=Yj(u).filter(f=>{const h=f.codePointAt(0);return h<r||h>i});if(c.length&&(o.push(...c),n))break}return o}function Xu(e,{escDigit:t,inCharClass:n,useFlagV:r}){if(hM.has(e))return hM.get(e);if(e<32||e>126&&e<160||e>262143||t&&dne(e))return e>255?`\\u{${e.toString(16).toUpperCase()}}`:`\\x${e.toString(16).toUpperCase().padStart(2,"0")}`;const i=n?r?ane:sne:one,o=Rn(e);return(i.has(o)?"\\":"")+o}function une(e){const t=e.map(i=>i.codePointAt(0)).sort((i,o)=>i-o),n=[];let r=null;for(let i=0;i<t.length;i++)t[i+1]===t[i]+1?r??(r=t[i]):r===null?n.push(t[i]):(n.push([r,t[i]]),r=null);return n}function cne(e,t,n){if(e)return">";let r="";if(t&&n){const{enable:i,disable:o}=t;r=(i!=null&&i.ignoreCase?"i":"")+(i!=null&&i.dotAll?"s":"")+(o?"-":"")+(o!=null&&o.ignoreCase?"i":"")+(o!=null&&o.dotAll?"s":"")}return`${r}:`}function fne({kind:e,max:t,min:n}){let r;return!n&&t===1?r="?":!n&&t===1/0?r="*":n===1&&t===1/0?r="+":n===t?r=`{${n}}`:r=`{${n},${t===1/0?"":t}}`,r+{greedy:"",lazy:"?",possessive:"+"}[e]}function pM({type:e}){return e==="CapturingGroup"||e==="Group"||e==="LookaroundAssertion"}function dne(e){return e>47&&e<58}function mM({type:e,value:t}){return e==="Character"&&t===45}var na,Uo,Dl,ra,Ml,Eh,yw,Sa,hne=(Sa=class extends RegExp{constructor(n,r,i){var t=(...Sve)=>(super(...Sve),He(this,Eh),He(this,na,new Map),He(this,Uo,null),He(this,Dl),He(this,ra,null),He(this,Ml,null),te(this,"rawOptions",{}),this);const o=!!(i!=null&&i.lazyCompile);if(n instanceof RegExp){if(i)throw new Error("Cannot provide options when copying a regexp");const a=n;t(a,r),$e(this,Dl,a.source),a instanceof Sa&&($e(this,na,K(a,na)),$e(this,ra,K(a,ra)),$e(this,Ml,K(a,Ml)),this.rawOptions=a.rawOptions)}else{const a={hiddenCaptures:[],strategy:null,transfers:[],...i};t(o?"":n,r),$e(this,Dl,n),$e(this,na,mne(a.hiddenCaptures,a.transfers)),$e(this,Ml,a.strategy),this.rawOptions=i??{}}o||$e(this,Uo,this)}get source(){return K(this,Dl)||"(?:)"}exec(n){if(!K(this,Uo)){const{lazyCompile:o,...a}=this.rawOptions;$e(this,Uo,new Sa(K(this,Dl),this.flags,a))}const r=this.global||this.sticky,i=this.lastIndex;if(K(this,Ml)==="clip_search"&&r&&i){this.lastIndex=0;const o=rt(this,Eh,yw).call(this,n.slice(i));return o&&(pne(o,i,n,this.hasIndices),this.lastIndex+=i),o}return rt(this,Eh,yw).call(this,n)}},na=new WeakMap,Uo=new WeakMap,Dl=new WeakMap,ra=new WeakMap,Ml=new WeakMap,Eh=new WeakSet,yw=function(n){K(this,Uo).lastIndex=this.lastIndex;const r=xT(Sa.prototype,this,"exec").call(K(this,Uo),n);if(this.lastIndex=K(this,Uo).lastIndex,!r||!K(this,na).size)return r;const i=[...r];r.length=1;let o;this.hasIndices&&(o=[...r.indices],r.indices.length=1);const a=[0];for(let u=1;u<i.length;u++){const{hidden:c,transferTo:f}=K(this,na).get(u)??{};if(c?a.push(null):(a.push(r.length),r.push(i[u]),this.hasIndices&&r.indices.push(o[u])),f&&i[u]!==void 0){const h=a[f];if(!h)throw new Error(`Invalid capture transfer to "${h}"`);if(r[h]=i[u],this.hasIndices&&(r.indices[h]=o[u]),r.groups){K(this,ra)||$e(this,ra,gne(this.source));const p=K(this,ra).get(f);p&&(r.groups[p]=i[u],this.hasIndices&&(r.indices.groups[p]=o[u]))}}}return r},Sa);function pne(e,t,n,r){if(e.index+=t,e.input=n,r){const i=e.indices;for(let a=0;a<i.length;a++){const u=i[a];u&&(i[a]=[u[0]+t,u[1]+t])}const o=i.groups;o&&Object.keys(o).forEach(a=>{const u=o[a];u&&(o[a]=[u[0]+t,u[1]+t])})}}function mne(e,t){const n=new Map;for(const r of e)n.set(r,{hidden:!0});for(const[r,i]of t)for(const o of i)uh(n,o,{}).transferTo=r;return n}function gne(e){const t=/(?<capture>\((?:\?<(?![=!])(?<name>[^>]+)>|(?!\?)))|\\?./gsu,n=new Map;let r=0,i=0,o;for(;o=t.exec(e);){const{0:a,groups:{capture:u,name:c}}=o;a==="["?r++:r?a==="]"&&r--:u&&(i++,c&&n.set(i,c))}return n}function yne(e,t){const n=bne(e,t);return n.options?new hne(n.pattern,n.flags,n.options):new RegExp(n.pattern,n.flags)}function bne(e,t){const n=qj(t),r=Lj(e,{flags:n.flags,normalizeUnknownPropertyNames:!0,rules:{captureGroup:n.rules.captureGroup,singleline:n.rules.singleline},skipBackrefValidation:n.rules.allowOrphanBackrefs,unicodePropertyMap:hC}),i=Vte(r,{accuracy:n.accuracy,asciiWordBoundaries:n.rules.asciiWordBoundaries,avoidSubclass:n.avoidSubclass,bestEffortTarget:n.target}),o=nne(i,n),a=Pte(o.pattern,{captureTransfers:o._captureTransfers,hiddenCaptures:o._hiddenCaptures,mode:"external"}),u=Ote(a.pattern),c=Mte(u.pattern,{captureTransfers:a.captureTransfers,hiddenCaptures:a.hiddenCaptures}),f={pattern:c.pattern,flags:`${n.hasIndices?"d":""}${n.global?"g":""}${o.flags}${o.options.disable.v?"u":"v"}`};if(n.avoidSubclass){if(n.lazyCompileLength!==1/0)throw new Error("Lazy compilation requires subclass")}else{const h=c.hiddenCaptures.sort((b,v)=>b-v),p=Array.from(c.captureTransfers),m=i._strategy,y=f.pattern.length>=n.lazyCompileLength;(h.length||p.length||m||y)&&(f.options={...h.length&&{hiddenCaptures:h},...p.length&&{transfers:p},...m&&{strategy:m},...y&&{lazyCompile:y}})}return f}const gM=4294967295;class vne{constructor(t,n={}){te(this,"regexps");this.patterns=t,this.options=n;const{forgiving:r=!1,cache:i,regexConstructor:o}=n;if(!o)throw new Error("Option `regexConstructor` is not provided");this.regexps=t.map(a=>{if(typeof a!="string")return a;const u=i==null?void 0:i.get(a);if(u){if(u instanceof RegExp)return u;if(r)return null;throw u}try{const c=o(a);return i==null||i.set(a,c),c}catch(c){if(i==null||i.set(a,c),r)return null;throw c}})}findNextMatchSync(t,n,r){const i=typeof t=="string"?t:t.content,o=[];function a(u,c,f=0){return{index:u,captureIndices:c.indices.map(h=>h==null?{start:gM,end:gM,length:0}:{start:h[0]+f,end:h[1]+f,length:h[1]-h[0]})}}for(let u=0;u<this.regexps.length;u++){const c=this.regexps[u];if(c)try{c.lastIndex=n;const f=c.exec(i);if(!f)continue;if(f.index===n)return a(u,f,0);o.push([u,f,0])}catch(f){if(this.options.forgiving)continue;throw f}}if(o.length){const u=Math.min(...o.map(c=>c[1].index));for(const[c,f,h]of o)if(f.index===u)return a(c,f,h)}return null}}function xne(e,t){return yne(e,{global:!0,hasIndices:!0,lazyCompileLength:3e3,rules:{allowOrphanBackrefs:!0,asciiWordBoundaries:!0,captureGroup:!0,recursionLimit:5,singleline:!0},...t})}function wne(e={}){const t=Object.assign({target:"auto",cache:new Map},e);return t.regexConstructor||(t.regexConstructor=n=>xne(n,{target:t.target})),{createScanner(n){return new vne(n,t)},createString(n){return{content:n}}}}const Sne=[[/^(<!--)(.+)(-->)$/,!1],[/^(\/\*)(.+)(\*\/)$/,!1],[/^(\/\/|["'#]|;{1,2}|%{1,2}|--)(.*)$/,!0],[/^(\*)(.+)$/,!0]];function Cne(e,t,n){const r=[];for(const i of e){if(n==="v3"){const u=i.children.flatMap((c,f)=>{if(c.type!=="element")return c;const h=c.children[0];if(h.type!=="text")return c;const p=f===i.children.length-1;if(!Ex(h.value,p))return c;const y=h.value.split(/(\s+\/\/)/);if(y.length<=1)return c;let b=[y[0]];for(let v=1;v<y.length;v+=2)b.push(y[v]+(y[v+1]||""));return b=b.filter(Boolean),b.length<=1?c:b.map(v=>({...c,children:[{type:"text",value:v}]}))});u.length!==i.children.length&&(i.children=u)}const o=i.children;let a=o.length-1;n==="v1"?a=0:t&&(a=o.length-2);for(let u=Math.max(a,0);u<o.length;u++){const c=o[u];if(c.type!=="element")continue;const f=c.children.at(0);if((f==null?void 0:f.type)!=="text")continue;const h=u===o.length-1;let p=Ex(f.value,h),m;if(!p&&u>0&&f.value.trim().startsWith("[!code")){const y=o[u-1];if((y==null?void 0:y.type)==="element"){const b=y.children.at(0);if((b==null?void 0:b.type)==="text"&&b.value.includes("//")){const v=b.value+f.value,S=Ex(v,h);if(S){p=S,r.push({info:S,line:i,token:y,isLineCommentOnly:o.length===2&&y.children.length===1&&c.children.length===1,isJsxStyle:!1,additionalTokens:[c]});continue}}}}if(p)if(t&&!h&&u!==0){const y=yM(o[u-1],"{")&&yM(o[u+1],"}");r.push({info:p,line:i,token:c,isLineCommentOnly:o.length===3&&c.children.length===1,isJsxStyle:y,additionalTokens:m})}else r.push({info:p,line:i,token:c,isLineCommentOnly:o.length===1&&c.children.length===1,isJsxStyle:!1,additionalTokens:m})}}return r}function yM(e,t){if(e.type!=="element")return!1;const n=e.children[0];return n.type!=="text"?!1:n.value.trim()===t}function Ex(e,t){let n=e.trimStart();const r=e.length-n.length;n=n.trimEnd();const i=e.length-n.length-r;for(const[o,a]of Sne){if(a&&!t)continue;const u=o.exec(n);if(u)return[" ".repeat(r)+u[1],u[2],u[3]?u[3]+" ".repeat(i):void 0]}}function Ene(e){const t=e.match(/(?:\/\/|["'#]|;{1,2}|%{1,2}|--)(\s*)$/);return t&&t[1].trim().length===0?e.slice(0,t.index):e}function kne(e,t,n,r){return r==null&&(r="v3"),{name:e,code(i){const o=i.children.filter(f=>f.type==="element"),a=[];i.data??(i.data={});const u=i.data;u._shiki_notation??(u._shiki_notation=Cne(o,["jsx","tsx"].includes(this.options.lang),r));const c=u._shiki_notation;for(const f of c){if(f.info[1].length===0)continue;let h=o.indexOf(f.line);f.isLineCommentOnly&&r!=="v1"&&h++;let p=!1;if(f.info[1]=f.info[1].replace(t,(...y)=>n.call(this,y,f.line,f.token,o,h)?(p=!0,""):y[0]),!p)continue;r==="v1"&&(f.info[1]=Ene(f.info[1]));const m=f.info[1].trim().length===0;if(m&&(f.info[1]=""),m&&f.isLineCommentOnly)a.push(f.line);else if(m&&f.isJsxStyle)f.line.children.splice(f.line.children.indexOf(f.token)-1,3);else if(m){if(f.additionalTokens)for(let y=f.additionalTokens.length-1;y>=0;y--){const b=f.additionalTokens[y],v=f.line.children.indexOf(b);v!==-1&&f.line.children.splice(v,1)}f.line.children.splice(f.line.children.indexOf(f.token),1)}else{const y=f.token.children[0];if(y.type==="text"&&(y.value=f.info.join(""),f.additionalTokens))for(const b of f.additionalTokens){const v=b.children[0];(v==null?void 0:v.type)==="text"&&(v.value="")}}}for(const f of a){const h=i.children.indexOf(f),p=i.children[h+1];let m=1;(p==null?void 0:p.type)==="text"&&(p==null?void 0:p.value)===`
|
|
464
|
-
`&&(m=2),i.children.splice(h,m)}}}}function Rne(e){if(!e)return null;const t=e.match(/\{([\d,-]+)\}/);return t?t[1].split(",").flatMap(r=>{const i=r.split("-").map(o=>Number.parseInt(o,10));return i.length===1?[i[0]]:Array.from({length:i[1]-i[0]+1},(o,a)=>i[0]+a)}):null}const Nm=Symbol("highlighted-lines");function _ne(e={}){const{className:t="highlighted",zeroIndexed:n=!1}=e;return{name:"@shikijs/transformers:meta-highlight",line(r,i){var c;if(!((c=this.options.meta)!=null&&c.__raw))return;const o=this.meta;o[Nm]??(o[Nm]=Rne(this.options.meta.__raw));const a=o[Nm]??[],u=n?i-1:i;return a.includes(u)&&this.addClassToHast(r,t),r}}}function Tne(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function nL(e={},t="@shikijs/transformers:notation-map"){const{classMap:n={},classActivePre:r=void 0,classActiveCode:i=void 0}=e;return kne(t,new RegExp(`#?\\s*\\[!code (${Object.keys(n).map(Tne).join("|")})(:\\d+)?\\]`,"gi"),function([o,a,u=":1"],c,f,h,p){const m=Number.parseInt(u.slice(1),10);for(let y=p;y<Math.min(p+m,h.length);y++)this.addClassToHast(h[y],n[a]);return r&&this.addClassToHast(this.pre,r),i&&this.addClassToHast(this.code,i),!0},e.matchAlgorithm)}function Ane(e={}){const{classLineAdd:t="diff add",classLineRemove:n="diff remove",classActivePre:r="has-diff",classActiveCode:i}=e;return nL({classMap:{"++":t,"--":n},classActivePre:r,classActiveCode:i,matchAlgorithm:e.matchAlgorithm},"@shikijs/transformers:notation-diff")}function Dne(e={}){const{classActiveLine:t="highlighted",classActivePre:n="has-highlighted",classActiveCode:r}=e;return nL({classMap:{highlight:t,hl:t},classActivePre:n,classActiveCode:r,matchAlgorithm:e.matchAlgorithm},"@shikijs/transformers:notation-highlight")}const Mne="vitesse-black",One="vitesse-light",$ne={javascript:()=>Ur(()=>import("./javascript-wDzz0qaB.js"),[]),typescript:()=>Ur(()=>import("./typescript-BPQ3VLAy.js"),[]),jsx:()=>Ur(()=>import("./jsx-g9-lgVsj.js"),[]),tsx:()=>Ur(()=>import("./tsx-COt5Ahok.js"),[]),json:()=>Ur(()=>import("./json-Cp-IABpG.js"),[]),css:()=>Ur(()=>import("./css-DPfMkruS.js"),[]),html:()=>Ur(()=>import("./html-GMplVEZG.js"),__vite__mapDeps([0,1,2])),bash:()=>Ur(()=>import("./bash-Yzrsuije.js"),[]),markdown:()=>Ur(()=>import("./markdown-Cvjx9yec.js"),[]),python:()=>Ur(()=>import("./python-B6aJPvgy.js"),[])},Pne=()=>Ur(()=>import("./vitesse-black-Bkuqu6BP.js"),[]),Nne=()=>Ur(()=>import("./vitesse-light-CVO1_9PV.js"),[]);let kx=null,Rx=null;const bM=new Set;async function mC(){return kx||Rx||(Rx=Nee({themes:[Pne,Nne],langs:[],engine:wne()}),kx=await Rx,kx)}async function rL(e){if(bM.has(e))return;const t=$ne[e];if(!t)throw new Error(`Unknown language: ${e}`);const n=await mC(),r=await t();await n.loadLanguage(r),bM.add(e)}async function Ine(e,t="typescript",n={}){await rL(t);const r=await mC(),{highlightLines:i}=n,o=i!=null&&i.length?{__raw:`{${i.join(",")}}`}:void 0;return r.codeToHtml(e,{lang:t,themes:{light:One,dark:Mne},defaultColor:!1,...o&&{meta:o},transformers:[Ane(),Dne(),_ne()]})}function iL(e,t="typescript",n={}){var p;const[r,i]=C.useState(""),[o,a]=C.useState(!0),[u,c]=C.useState(null),f=C.useRef(0),h=((p=n.highlightLines)==null?void 0:p.join(","))??"";return C.useEffect(()=>{const m=++f.current;Ine(e,t,{highlightLines:n.highlightLines}).then(y=>{f.current===m&&(i(y),a(!1),c(null))}).catch(y=>{f.current===m&&(c(y),a(!1))})},[e,t,h]),{html:r,loading:o,error:u}}const bc={"code-block":"_code-block_5ek21_1","code-block-header":"_code-block-header_5ek21_9","code-block-copy-button":"_code-block-copy-button_5ek21_16","code-block-content":"_code-block-content_5ek21_21","code-block-loading":"_code-block-loading_5ek21_72","code-block-error":"_code-block-error_5ek21_76"},oL=({code:e,className:t,children:n,...r})=>{const[i,o]=C.useState(!1),a=C.useCallback(async()=>{try{await navigator.clipboard.writeText(e),o(!0),setTimeout(()=>o(!1),2e3)}catch(u){console.error("Failed to copy code:",u)}},[e]);return E.jsxs(Ei,{type:"button","data-slot":"code-block-copy-button","data-copied":i,"aria-label":i?"Copied":"Copy code",className:ze(bc["code-block-copy-button"],t),onClick:a,size:"xsmall",variant:"inverted",...r,children:[i?E.jsx(Th,{}):E.jsx(Dh,{}),n??(i?"Copied":"Copy")]})};oL.displayName="CodeBlockCopyButton";const sL=({filename:e,copyable:t=GQ,code:n=VQ,className:r,CopyButtonProps:i,children:o,...a})=>E.jsxs(Xe,{"data-slot":"code-block-header",className:ze(bc["code-block-header"],r),ay:"center",ax:"space-between",gap:4,py:2,px:4,fullwidth:!0,...a,children:[E.jsx(Ie,{size:-1,family:"mono",shade:"muted",children:e}),o,E.jsx(oL,{code:n,disabled:!t||!n,...i})]});sL.displayName="CodeBlockHeader";const aL=({html:e,showLineNumbers:t=VI,className:n,...r})=>E.jsx(Ye,{"data-slot":"code-block-content","data-line-numbers":t||void 0,className:ze(bc["code-block-content"],qQ({showLineNumbers:t}),n),dangerouslySetInnerHTML:{__html:e},ax:"stretch",fullwidth:!0,...r});aL.displayName="CodeBlockContent";const gC=({code:e,language:t=HQ,filename:n,showLineNumbers:r,copyable:i=!0,highlightLines:o,rows:a,html:u,className:c,HeaderProps:f,CopyButtonProps:h,...p})=>{const{html:m,loading:y,error:b}=iL(e,t,{highlightLines:o}),v=u||m,S=n||i,x=a?{maxHeight:`calc(${a} * var(--code-font-size) * var(--code-line-height) + 2 * var(--code-padding))`,overflowY:"auto"}:void 0;return E.jsxs("div",{"data-slot":"code-block",className:ze(bc["code-block"],c),...p,children:[S&&E.jsx(sL,{filename:n,copyable:i,code:e,CopyButtonProps:h,...f}),y&&!u&&E.jsx(Ye,{ay:"center",ax:"center",className:bc["code-block-loading"]}),b&&!u&&E.jsxs(Ye,{ay:"center",ax:"center",className:bc["code-block-error"],children:["Error highlighting code: ",b.message]}),v&&E.jsx(aL,{html:v,showLineNumbers:r,style:x})]})};gC.displayName="CodeBlock";const _x={"code-inline":"_code-inline_h7rdt_1"},lL=({language:e,html:t,className:n,children:r,...i})=>{const o=typeof r=="string"?r:"",{html:a}=iL(o,e||"typescript");if(!e)return E.jsx("code",{"data-slot":"code-inline",className:ze(_x["code-inline"],n),...i,children:r});const u=t||a;if(u){const c=u.replace(/<pre[^>]*><code[^>]*>/,"").replace(/<\/code><\/pre>/,"");return E.jsx("code",{"data-slot":"code-inline",className:ze(_x["code-inline"],n),dangerouslySetInnerHTML:{__html:c},...i})}return E.jsx("code",{"data-slot":"code-inline",className:ze(_x["code-inline"],n),...i,children:r})};lL.displayName="CodeInline";const vM={};function Ma(e,t){const n=C.useRef(vM);return n.current===vM&&(n.current=e(t)),n}const Tx=as[`useInsertionEffect${Math.random().toFixed(1)}`.slice(0,-3)],jne=Tx&&Tx!==C.useLayoutEffect?Tx:e=>e();function lr(e){const t=Ma(Lne).current;return t.next=e,jne(t.effect),t.trampoline}function Lne(){const e={next:void 0,callback:Fne,trampoline:(...t)=>{var n;return(n=e.callback)==null?void 0:n.call(e,...t)},effect:()=>{e.callback=e.next}};return e}function Fne(){}function uL({controlled:e,default:t,name:n,state:r="value"}){const{current:i}=C.useRef(e!==void 0),[o,a]=C.useState(t),u=i?e:o,c=C.useCallback(f=>{i||a(f)},[]);return[u,c]}const zne=()=>{},qn=typeof document<"u"?C.useLayoutEffect:zne;function bw(e,t,n,r){const i=Ma(cL).current;return Une(i,e,t,n,r)&&fL(i,[e,t,n,r]),i.callback}function Bne(e){const t=Ma(cL).current;return Hne(t,e)&&fL(t,e),t.callback}function cL(){return{callback:null,cleanup:null,refs:[]}}function Une(e,t,n,r,i){return e.refs[0]!==t||e.refs[1]!==n||e.refs[2]!==r||e.refs[3]!==i}function Hne(e,t){return e.refs.length!==t.length||e.refs.some((n,r)=>n!==t[r])}function fL(e,t){if(e.refs=t,t.every(n=>n==null)){e.callback=null;return}e.callback=n=>{if(e.cleanup&&(e.cleanup(),e.cleanup=null),n!=null){const r=Array(t.length).fill(null);for(let i=0;i<t.length;i+=1){const o=t[i];if(o!=null)switch(typeof o){case"function":{const a=o(n);typeof a=="function"&&(r[i]=a);break}case"object":{o.current=n;break}}}e.cleanup=()=>{for(let i=0;i<t.length;i+=1){const o=t[i];if(o!=null)switch(typeof o){case"function":{const a=r[i];typeof a=="function"?a():o(null);break}case"object":{o.current=null;break}}}}}}}const dL={clipPath:"inset(50%)",overflow:"hidden",whiteSpace:"nowrap",border:0,padding:0,width:1,height:1,margin:-1},Gne={...dL,position:"fixed",top:0,left:0},Vne={...dL,position:"absolute"};function Er(){}const Ni=Object.freeze({});function hL(e,t,n,r){let i=!1,o=!1;const a=Ni;return{reason:e,event:t??new Event("base-ui"),cancel(){i=!0},allowPropagation(){o=!0},get isCanceled(){return i},get isPropagationAllowed(){return o},trigger:n,...a}}function mf(e,...t){const n=new URL("https://base-ui.com/production-error");return n.searchParams.set("code",e.toString()),t.forEach(r=>n.searchParams.append("args[]",r)),`Base UI error #${e}; visit ${n} for the full message.`}const qne=[];function pL(e){C.useEffect(e,qne)}const Im=null;let Yne=class{constructor(){te(this,"callbacks",[]);te(this,"callbacksCount",0);te(this,"nextId",1);te(this,"startId",1);te(this,"isScheduled",!1);te(this,"tick",t=>{var i;this.isScheduled=!1;const n=this.callbacks,r=this.callbacksCount;if(this.callbacks=[],this.callbacksCount=0,this.startId=this.nextId,r>0)for(let o=0;o<n.length;o+=1)(i=n[o])==null||i.call(n,t)})}request(t){const n=this.nextId;return this.nextId+=1,this.callbacks.push(t),this.callbacksCount+=1,(!this.isScheduled||!1)&&(requestAnimationFrame(this.tick),this.isScheduled=!0),n}cancel(t){const n=t-this.startId;n<0||n>=this.callbacks.length||(this.callbacks[n]=null,this.callbacksCount-=1)}};const jm=new Yne;let hl=class mL{constructor(){te(this,"currentId",Im);te(this,"cancel",()=>{this.currentId!==Im&&(jm.cancel(this.currentId),this.currentId=Im)});te(this,"disposeEffect",()=>this.cancel)}static create(){return new mL}static request(t){return jm.request(t)}static cancel(t){return jm.cancel(t)}request(t){this.cancel(),this.currentId=jm.request(()=>{this.currentId=Im,t()})}};function Wne(){const e=Ma(hl.create).current;return pL(e.disposeEffect),e}function Kne(e){return e==null?e:"current"in e?e.current:e}let yC=(function(e){return e.startingStyle="data-starting-style",e.endingStyle="data-ending-style",e})({});const Xne={[yC.startingStyle]:""},Qne={[yC.endingStyle]:""},gL={transitionStatus(e){return e==="starting"?Xne:e==="ending"?Qne:null}};function Zne(e,t=!1,n=!0){const r=Wne();return lr((i,o=null)=>{r.cancel();function a(){yn.flushSync(i)}const u=Kne(e);if(u==null)return;const c=u;if(typeof c.getAnimations!="function"||globalThis.BASE_UI_ANIMATIONS_DISABLED)i();else{let f=function(){const p=yC.startingStyle;if(!c.hasAttribute(p)){r.request(h);return}const m=new MutationObserver(()=>{c.hasAttribute(p)||(m.disconnect(),h())});m.observe(c,{attributes:!0,attributeFilter:[p]}),o==null||o.addEventListener("abort",()=>m.disconnect(),{once:!0})},h=function(){Promise.all(c.getAnimations().map(p=>p.finished)).then(()=>{o!=null&&o.aborted||a()}).catch(()=>{const p=c.getAnimations();if(n){if(o!=null&&o.aborted)return;a()}else p.length>0&&p.some(m=>m.pending||m.playState!=="finished")&&h()})};if(t){f();return}r.request(h)}})}function yL(e){const{enabled:t=!0,open:n,ref:r,onComplete:i}=e,o=lr(i),a=Zne(r,n,!1);C.useEffect(()=>{if(!t)return;const u=new AbortController;return a(o,u.signal),()=>{u.abort()}},[t,n,o,a])}let xM=(function(e){return e.disabled="data-disabled",e.valid="data-valid",e.invalid="data-invalid",e.touched="data-touched",e.dirty="data-dirty",e.filled="data-filled",e.focused="data-focused",e})({});const Yy={badInput:!1,customError:!1,patternMismatch:!1,rangeOverflow:!1,rangeUnderflow:!1,stepMismatch:!1,tooLong:!1,tooShort:!1,typeMismatch:!1,valid:null,valueMissing:!1},ru={valid(e){return e===null?null:e?{[xM.valid]:""}:{[xM.invalid]:""}}},bL=C.createContext({invalid:void 0,name:void 0,validityData:{state:Yy,errors:[],error:"",value:"",initialValue:null},setValidityData:Er,disabled:void 0,touched:!1,setTouched:Er,dirty:!1,setDirty:Er,filled:!1,setFilled:Er,focused:!1,setFocused:Er,validate:()=>null,validationMode:"onSubmit",validationDebounceTime:0,shouldValidateOnChange:()=>!1,state:{disabled:!1,valid:null,touched:!1,dirty:!1,filled:!1,focused:!1},markedDirtyRef:{current:!1},validation:{getValidationProps:(e=Ni)=>e,getInputValidationProps:(e=Ni)=>e,inputRef:{current:null},commit:async()=>{}}});function gf(e=!0){const t=C.useContext(bL);if(t.setValidityData===Er&&!e)throw new Error(mf(28));return t}function vw(e,t){return{...e,state:{...e.state,valid:!t&&e.state.valid}}}const Jne=C.createContext({formRef:{current:{fields:new Map}},errors:{},clearErrors:Er,validationMode:"onSubmit",submitAttemptedRef:{current:!1}});function Gh(){return C.useContext(Jne)}function vL(e){const{enabled:t=!0,value:n,id:r,name:i,controlRef:o,commit:a}=e,{formRef:u}=Gh(),{invalid:c,markedDirtyRef:f,validityData:h,setValidityData:p}=gf(),m=lr(e.getValue);qn(()=>{if(!t)return;let y=n;y===void 0&&(y=m()),h.initialValue===null&&y!==null&&p(b=>({...b,initialValue:y}))},[t,p,n,h.initialValue,m]),qn(()=>{!t||!r||u.current.fields.set(r,{getValue:m,name:i,controlRef:o,validityData:vw(h,c),validate(y=!0){let b=n;b===void 0&&(b=m()),f.current=!0,y?yn.flushSync(()=>a(b)):a(b)}})},[a,o,t,u,m,r,c,f,i,h,n]),qn(()=>{const y=u.current.fields;return()=>{r&&y.delete(r)}},[u,r])}function xL(){return typeof window<"u"}function wL(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function ere(e){return xL()?e instanceof Element||e instanceof wL(e).Element:!1}function SL(e){return xL()?e instanceof HTMLElement||e instanceof wL(e).HTMLElement:!1}const tre={...as};let wM=0;function nre(e,t="mui"){const[n,r]=C.useState(e),i=e||n;return C.useEffect(()=>{n==null&&(wM+=1,r(`${t}-${wM}`))},[n,t]),i}const SM=tre.useId;function rre(e,t){if(SM!==void 0){const n=SM();return e??`${t}-${n}`}return nre(e,t)}function Hl(e){return rre(e,"base-ui")}const CL=C.createContext({controlId:void 0,registerControlId:Er,labelId:void 0,setLabelId:Er,messageIds:[],setMessageIds:Er,getDescriptionProps:e=>e});function Oa(){return C.useContext(CL)}function ire(e={}){const{id:t,implicit:n=!1,controlRef:r}=e,{controlId:i,registerControlId:o}=Oa(),a=Hl(t),u=n?i:void 0,c=Ma(()=>Symbol("labelable-control")),f=C.useRef(!1),h=C.useRef(t!=null),p=lr(()=>{!f.current||o===Er||(f.current=!1,o(c.current,void 0))});return qn(()=>{if(o===Er)return;let m;if(n){const y=r==null?void 0:r.current;ere(y)&&y.closest("label")!=null?m=t??null:m=u??a}else if(t!=null)h.current=!0,m=t;else if(h.current)m=a;else{p();return}if(m===void 0){p();return}f.current=!0,o(c.current,m)},[t,r,u,o,n,a,c,p]),C.useEffect(()=>p,[p]),i??a}function EL(e,t=!1,n=!1){const[r,i]=C.useState(e&&t?"idle":void 0),[o,a]=C.useState(e);return e&&!o&&(a(!0),i("starting")),!e&&o&&r!=="ending"&&!n&&i("ending"),!e&&!o&&r==="ending"&&i(void 0),qn(()=>{if(!e&&o&&r!=="ending"&&n){const u=hl.request(()=>{i("ending")});return()=>{hl.cancel(u)}}},[e,o,r,n]),qn(()=>{if(!e||t)return;const u=hl.request(()=>{i(void 0)});return()=>{hl.cancel(u)}},[t,e]),qn(()=>{if(!e||!t)return;e&&o&&r!=="idle"&&i("starting");const u=hl.request(()=>{i("idle")});return()=>{hl.cancel(u)}},[t,e,o,i,r]),C.useMemo(()=>({mounted:o,setMounted:a,transitionStatus:r}),[o,r])}function ore(e,t){const n=C.useRef(e),r=lr(t);qn(()=>{n.current!==e&&r(n.current)},[e,r]),qn(()=>{n.current=e},[e])}const sre=parseInt(C.version,10);function are(e){return sre>=e}function lre(e){var n;let t=e.activeElement;for(;((n=t==null?void 0:t.shadowRoot)==null?void 0:n.activeElement)!=null;)t=t.shadowRoot.activeElement;return t}function ure(e){return"composedPath"in e?e.composedPath()[0]:e.target}const kd=0;let cre=class kL{constructor(){te(this,"currentId",kd);te(this,"clear",()=>{this.currentId!==kd&&(clearTimeout(this.currentId),this.currentId=kd)});te(this,"disposeEffect",()=>this.clear)}static create(){return new kL}start(t,n){this.clear(),this.currentId=setTimeout(()=>{this.currentId=kd,n()},t)}isStarted(){return this.currentId!==kd}};function fre(){const e=Ma(cre.create).current;return pL(e.disposeEffect),e}const RL="none";function _L(e){return(e==null?void 0:e.ownerDocument)||document}const jl={"field-label-group":"_field-label-group_1bag1_3","field-label":"_field-label_1bag1_3","field-root-floating":"_field-root-floating_1bag1_15","field-hint":"_field-hint_1bag1_19","field-error-tooltip":"_field-error-tooltip_1bag1_20","field-error-absolute":"_field-error-absolute_1bag1_31"},TL=50,AL=({icon:e,text:t,tooltip:n,className:r,...i})=>n&&e?E.jsxs("span",{"data-slot":"field-hint",className:ze(jl["field-hint"],r),...i,children:[E.jsx(Il,{trigger:E.jsx(e,{}),delay:TL,TriggerProps:{render:E.jsx("span",{})},PositionerProps:{align:"end"},children:n}),t&&E.jsx(Ie,{size:-1,children:t})]}):E.jsxs("span",{"data-slot":"field-hint",className:ze(jl["field-hint"],r),...i,children:[e&&E.jsx(e,{}),t&&E.jsx(Ie,{size:-1,children:t})]});AL.displayName="FieldHint";const dre=C.createContext({legendId:void 0,setLegendId:()=>{},disabled:void 0});function hre(e=!1){const t=C.useContext(dre);if(!t&&!e)throw new Error(mf(86));return t}function CM(e){if(!C.isValidElement(e))return null;const t=e,n=t.props;return(are(19)?n==null?void 0:n.ref:t.ref)??null}function xw(e,t){if(e&&!t)return e;if(!e&&t)return t;if(e||t)return{...e,...t}}function pre(e,t){const n={};for(const r in e){const i=e[r];if(t!=null&&t.hasOwnProperty(r)){const o=t[r](i);o!=null&&Object.assign(n,o);continue}i===!0?n[`data-${r.toLowerCase()}`]="":i&&(n[`data-${r.toLowerCase()}`]=i.toString())}return n}function mre(e,t){return typeof e=="function"?e(t):e}function gre(e,t){return typeof e=="function"?e(t):e}const zd={};function Uc(e,t,n,r,i){let o={...ww(e,zd)};return t&&(o=gg(o,t)),n&&(o=gg(o,n)),r&&(o=gg(o,r)),o}function yre(e){if(e.length===0)return zd;if(e.length===1)return ww(e[0],zd);let t={...ww(e[0],zd)};for(let n=1;n<e.length;n+=1)t=gg(t,e[n]);return t}function gg(e,t){return DL(t)?t(e):bre(e,t)}function bre(e,t){if(!t)return e;for(const n in t){const r=t[n];switch(n){case"style":{e[n]=xw(e.style,r);break}case"className":{e[n]=ML(e.className,r);break}default:vre(n,r)?e[n]=xre(e[n],r):e[n]=r}}return e}function vre(e,t){const n=e.charCodeAt(0),r=e.charCodeAt(1),i=e.charCodeAt(2);return n===111&&r===110&&i>=65&&i<=90&&(typeof t=="function"||typeof t>"u")}function DL(e){return typeof e=="function"}function ww(e,t){return DL(e)?e(t):e??zd}function xre(e,t){return t?e?n=>{if(wre(n)){const i=n;Sw(i);const o=t(i);return i.baseUIHandlerPrevented||(e==null||e(i)),o}const r=t(n);return e==null||e(n),r}:t:e}function Sw(e){return e.preventBaseUIHandler=()=>{e.baseUIHandlerPrevented=!0},e}function ML(e,t){return t?e?t+" "+e:t:e}function wre(e){return e!=null&&typeof e=="object"&&"nativeEvent"in e}function iu(e,t,n={}){const r=t.render,i=Sre(t,n);if(n.enabled===!1)return null;const o=n.state??Ni;return Ere(e,r,i,o)}function Sre(e,t={}){const{className:n,style:r,render:i}=e,{state:o=Ni,ref:a,props:u,stateAttributesMapping:c,enabled:f=!0}=t,h=f?mre(n,o):void 0,p=f?gre(r,o):void 0,m=f?pre(o,c):Ni,y=f?xw(m,Array.isArray(u)?yre(u):u)??Ni:Ni;return typeof document<"u"&&(f?Array.isArray(a)?y.ref=Bne([y.ref,CM(i),...a]):y.ref=bw(y.ref,CM(i),a):bw(null,null)),f?(h!==void 0&&(y.className=ML(y.className,h)),p!==void 0&&(y.style=xw(y.style,p)),y):Ni}const Cre=Symbol.for("react.lazy");function Ere(e,t,n,r){if(t){if(typeof t=="function")return t(n,r);const i=Uc(n,t.props);i.ref=n.ref;let o=t;return(o==null?void 0:o.$$typeof)===Cre&&(o=C.Children.toArray(t)[0]),C.cloneElement(o,i)}if(e&&typeof e=="string")return kre(e,n);throw new Error(mf(8))}function kre(e,t){return e==="button"?C.createElement("button",{type:"button",...t,key:t.key}):e==="img"?C.createElement("img",{alt:"",...t,key:t.key}):C.createElement(e,t)}const yg=Object.keys(Yy);function Rre(e){if(!e||e.valid||!e.valueMissing)return!1;let t=!1;for(const n of yg)n!=="valid"&&(n==="valueMissing"&&(t=e[n]),e[n]&&(t=!1));return t}function _re(e){const{formRef:t,clearErrors:n}=Gh(),{setValidityData:r,validate:i,validityData:o,validationDebounceTime:a,invalid:u,markedDirtyRef:c,state:f,name:h,shouldValidateOnChange:p}=e,{controlId:m,getDescriptionProps:y}=Oa(),b=fre(),v=C.useRef(null),S=lr(async(k,T=!1)=>{const A=v.current;if(!A)return;if(T){if(f.valid!==!1)return;const z=A.validity;if(!z.valueMissing){const L={value:k,state:{...Yy,valid:!0},error:"",errors:[],initialValue:o.initialValue};if(A.setCustomValidity(""),m){const F=t.current.fields.get(m);F&&t.current.fields.set(m,{...F,...vw(L,!1)})}r(L);return}const G=yg.reduce((L,F)=>(L[F]=z[F],L),{});if(!G.valid&&!Rre(G))return}function D(z){const G=yg.reduce((F,U)=>(F[U]=z.validity[U],F),{});let L=!1;for(const F of yg)if(F!=="valid"){if(F==="valueMissing"&&G[F])L=!0;else if(G[F])return G}return L&&!c.current&&(G.valid=!0,G.valueMissing=!1),G}b.clear();let O=null,$=[];const B=D(A);let j;const N=p();if(A.validationMessage&&!N)j=A.validationMessage,$=[A.validationMessage];else{const z=Array.from(t.current.fields.values()).reduce((L,F)=>(F.name&&(L[F.name]=F.getValue()),L),{}),G=i(k,z);typeof G=="object"&&G!==null&&"then"in G?O=await G:O=G,O!==null?(B.valid=!1,B.customError=!0,Array.isArray(O)?($=O,A.setCustomValidity(O.join(`
|
|
465
|
-
`))):O&&($=[O],A.setCustomValidity(O))):N&&(A.setCustomValidity(""),B.customError=!1,A.validationMessage?(j=A.validationMessage,$=[A.validationMessage]):A.validity.valid&&!B.valid&&(B.valid=!0))}const M={value:k,state:B,error:j??(Array.isArray(O)?O[0]:O??""),errors:$,initialValue:o.initialValue};if(m){const z=t.current.fields.get(m);z&&t.current.fields.set(m,{...z,...vw(M,u)})}r(M)}),x=C.useCallback((k={})=>Uc(y,f.valid===!1?{"aria-invalid":!0}:Ni,k),[y,f.valid]),_=C.useCallback((k={})=>Uc({onChange(T){if(T.nativeEvent.defaultPrevented)return;if(n(h),!p()){S(T.currentTarget.value,!0);return}if(u)return;const A=T.currentTarget;if(A.value===""){S(A.value);return}b.clear(),a?b.start(a,()=>{S(A.value)}):S(A.value)}},x(k)),[x,n,h,b,S,u,a,p]);return C.useMemo(()=>({getValidationProps:x,getInputValidationProps:_,inputRef:v,commit:S}),[x,_,S])}const Tre=function(e){const t=Hl(),[n,r]=C.useState(e.initialControlId===void 0?t:e.initialControlId),[i,o]=C.useState(void 0),[a,u]=C.useState([]),c=Ma(()=>new Map),{messageIds:f}=Oa(),h=lr((y,b)=>{const v=c.current;if(b===void 0){v.delete(y);return}v.set(y,b),r(S=>{if(v.size===0)return;let x;for(const _ of v.values()){if(S!==void 0&&_===S)return S;x===void 0&&(x=_)}return x})}),p=C.useCallback(y=>Uc({"aria-describedby":f.concat(a).join(" ")||void 0},y),[f,a]),m=C.useMemo(()=>({controlId:n,registerControlId:h,labelId:i,setLabelId:o,messageIds:a,setMessageIds:u,getDescriptionProps:p}),[n,h,i,o,a,u,p]);return E.jsx(CL.Provider,{value:m,children:e.children})},Are=C.forwardRef(function(e,t){const{errors:n,validationMode:r,submitAttemptedRef:i}=Gh(),{render:o,className:a,validate:u,validationDebounceTime:c=0,validationMode:f=r,name:h,disabled:p=!1,invalid:m,dirty:y,touched:b,actionsRef:v,...S}=e,{disabled:x}=hre(),_=lr(u||(()=>null)),k=x||p,[T,A]=C.useState(!1),[D,O]=C.useState(!1),[$,B]=C.useState(!1),[j,N]=C.useState(!1),M=y??D,z=b??T,G=C.useRef(!1),L=lr(ve=>{y===void 0&&(ve&&(G.current=!0),O(ve))}),F=lr(ve=>{b===void 0&&A(ve)}),U=lr(()=>f==="onChange"||f==="onSubmit"&&i.current),q=!!(m||h&&{}.hasOwnProperty.call(n,h)&&n[h]!==void 0),[W,I]=C.useState({state:Yy,error:"",errors:[],value:null,initialValue:null}),Y=!q&&W.state.valid,J=C.useMemo(()=>({disabled:k,touched:z,dirty:M,valid:Y,filled:$,focused:j}),[k,z,M,Y,$,j]),H=_re({setValidityData:I,validate:_,validityData:W,validationDebounceTime:c,invalid:q,markedDirtyRef:G,state:J,name:h,shouldValidateOnChange:U}),ie=C.useCallback(()=>{G.current=!0,H.commit(W.value)},[H,W]);C.useImperativeHandle(v,()=>({validate:ie}),[ie]);const re=C.useMemo(()=>({invalid:q,name:h,validityData:W,setValidityData:I,disabled:k,touched:z,setTouched:F,dirty:M,setDirty:L,filled:$,setFilled:B,focused:j,setFocused:N,validate:_,validationMode:f,validationDebounceTime:c,shouldValidateOnChange:U,state:J,markedDirtyRef:G,validation:H}),[q,h,W,k,z,F,M,L,$,B,j,N,_,f,c,U,J,H]),he=iu("div",e,{ref:t,state:J,props:S,stateAttributesMapping:ru});return E.jsx(bL.Provider,{value:re,children:he})}),Dre=C.forwardRef(function(e,t){return E.jsx(Tre,{children:E.jsx(Are,{...e,ref:t})})}),bC=({children:e,fullwidth:t,...n})=>E.jsx(Dre,{"data-slot":"field-root",render:E.jsx(Ye,{gap:3,ax:"stretch",fullwidth:t}),...n,children:e});bC.displayName="FieldRoot";const Mre=C.forwardRef(function(e,t){const{render:n,className:r,id:i,nativeLabel:o=!0,...a}=e,u=gf(!1),{controlId:c,setLabelId:f,labelId:h}=Oa(),p=Hl(i),m=C.useRef(null),y=lr(b=>{var S;if((S=ure(b.nativeEvent))!=null&&S.closest("button,input,select,textarea")||(!b.defaultPrevented&&b.detail>1&&b.preventDefault(),o||!c))return;const v=_L(b.currentTarget).getElementById(c);SL(v)&&v.focus({focusVisible:!0})});return qn(()=>(p&&f(p),()=>{f(void 0)}),[p,f]),iu("label",e,{ref:[t,m],state:u.state,props:[{id:h},o?{htmlFor:c??void 0,onMouseDown:y}:{onClick:y,onPointerDown(b){b.preventDefault()}},a],stateAttributesMapping:ru})}),vC=({required:e,weight:t="bold",className:n,children:r,...i})=>E.jsx(Mre,{"data-slot":"field-label","data-required":e??void 0,render:E.jsx(Ie,{render:E.jsx("label",{}),weight:t}),className:ze(jl["field-label"],n),...i,children:r});vC.displayName="FieldLabel";const Ore={...ru,...gL},OL=C.forwardRef(function(e,t){const{render:n,id:r,className:i,match:o,...a}=e,u=Hl(r),{validityData:c,state:f,name:h}=gf(!1),{setMessageIds:p}=Oa(),{errors:m}=Gh(),y=h?m[h]:null;let b=!1;y||o===!0?b=!0:o?b=!!c.state[o]:b=c.state.valid===!1;const{mounted:v,transitionStatus:S,setMounted:x}=EL(b);qn(()=>{if(!(!b||!u))return p(N=>N.concat(u)),()=>{p(N=>N.filter(M=>M!==u))}},[b,u,p]);const _=C.useRef(null),[k,T]=C.useState(null),[A,D]=C.useState(null),O=y||(c.errors.length>1?E.jsx("ul",{children:c.errors.map(N=>E.jsx("li",{children:N},N))}):c.error);let $=c.error;y!=null?$=Array.isArray(y)?JSON.stringify(y):y:c.errors.length>1&&($=JSON.stringify(c.errors)),b&&$!==A&&(D($),T(O)),yL({open:b,ref:_,onComplete(){b||x(!1)}});const B={...f,transitionStatus:S},j=iu("div",e,{ref:[t,_],state:B,props:[{id:u,children:b?O:k},a],stateAttributesMapping:Ore,enabled:v});return v?j:null}),$L=e=>E.jsx(OL,{"data-slot":"field-error-tooltip",render:E.jsx(Il,{delay:TL,PositionerProps:{align:"end"},PopupProps:{style:{backgroundColor:"var(--shade-foreground)"}},trigger:E.jsx("span",{className:jl["field-error-tooltip"],children:E.jsx(cV,{color:"var(--shade-foreground)"})})}),...e});$L.displayName="FieldErrorTooltip";const sy=e=>E.jsx(OL,{"data-slot":"field-error",render:E.jsx(Ie,{shade:"foreground"}),...e});sy.displayName="FieldError";const $re=C.forwardRef(function(e,t){const{render:n,id:r,className:i,...o}=e,a=Hl(r),u=gf(!1),{setMessageIds:c}=Oa();return qn(()=>{if(a)return c(f=>f.concat(a)),()=>{c(f=>f.filter(h=>h!==a))}},[a,c]),iu("p",e,{ref:t,state:u.state,props:[{id:a},o],stateAttributesMapping:ru})}),xC=({children:e,...t})=>E.jsx($re,{"data-slot":"field-description",render:E.jsx(Ie,{shade:"muted"}),...t,children:e});xC.displayName="FieldDescription";const PL=({label:e,hint:t,errorType:n="inline",description:r,required:i,RootProps:o,LabelProps:a,ErrorProps:u,HintProps:c,DescriptionProps:f,children:h,...p})=>E.jsxs(bC,{...p,...o,className:ze(n==="absolute"&&jl["field-root-floating"],o==null?void 0:o.className),children:[(e||t||n==="tooltip")&&E.jsxs(Xe,{className:jl["field-label-group"],ax:"space-between",ay:"center",children:[e&&E.jsx(vC,{required:i,...a,children:e}),E.jsxs(Xe,{ay:"center",children:[n==="tooltip"&&E.jsx($L,{...u}),t&&E.jsx(AL,{...t,...c})]})]}),h,n==="absolute"&&E.jsx(sy,{className:jl["field-error-absolute"],...u}),n==="inline"&&E.jsx(sy,{...u}),r&&E.jsx(xC,{...f,children:r})]});PL.displayName="Field";const Pre="_input_jh1b5_3",Ii={input:Pre,"size-small":"_size-small_jh1b5_49","size-medium":"_size-medium_jh1b5_54","size-large":"_size-large_jh1b5_59","toggle-fullwidth":"_toggle-fullwidth_jh1b5_65","toggle-ghost":"_toggle-ghost_jh1b5_70","input-wrapper":"_input-wrapper_jh1b5_89","input-inner":"_input-inner_jh1b5_112","input-slot":"_input-slot_jh1b5_131"},Nre="medium",NL=Dn({variants:{fullwidth:{true:Ii["toggle-fullwidth"]},ghost:{true:Ii["toggle-ghost"]},size:{small:Ii["size-small"],medium:Ii["size-medium"],large:Ii["size-large"]}},defaultVariants:{size:Nre}}),IL=({before:e,after:t,size:n,fullwidth:r,ghost:i,className:o,children:a})=>!e&&!t?E.jsx(E.Fragment,{children:a}):E.jsxs(Xe,{"data-slot":"input-wrapper",ay:"center",className:ze(Ii.input,Ii["input-wrapper"],NL({size:n,fullwidth:r,ghost:i}),o),children:[e&&E.jsx("span",{"data-slot":"input-before",className:Ii["input-slot"],children:e}),a,t&&E.jsx("span",{"data-slot":"input-after",className:Ii["input-slot"],children:t})]});IL.displayName="InputWrapper";const Ire=C.forwardRef(function(e,t){const{render:n,className:r,id:i,name:o,value:a,disabled:u=!1,onValueChange:c,defaultValue:f,autoFocus:h=!1,...p}=e,{state:m,name:y,disabled:b,setTouched:v,setDirty:S,validityData:x,setFocused:_,setFilled:k,validationMode:T,validation:A}=gf(),D=b||u,O=y??o,$={...m,disabled:D},{labelId:B}=Oa(),j=ire({id:i});qn(()=>{var F;const L=a!=null;(F=A.inputRef.current)!=null&&F.value||L&&a!==""?k(!0):L&&a===""&&k(!1)},[A.inputRef,k,a]);const N=C.useRef(null);qn(()=>{h&&N.current===lre(_L(N.current))&&_(!0)},[h,_]);const[M]=uL({controlled:a,default:f,name:"FieldControl",state:"value"}),z=a!==void 0,G=z?M:void 0;return vL({id:j,name:O,commit:A.commit,value:G,getValue:()=>{var L;return(L=A.inputRef.current)==null?void 0:L.value},controlRef:A.inputRef}),iu("input",e,{ref:[t,N],state:$,props:[{id:j,disabled:D,name:O,ref:A.inputRef,"aria-labelledby":B,autoFocus:h,...z?{value:G}:{defaultValue:f},onChange(L){const F=L.currentTarget.value;c==null||c(F,hL(RL,L.nativeEvent)),S(F!==x.initialValue),k(F!=="")},onFocus(){_(!0)},onBlur(L){v(!0),_(!1),T==="onBlur"&&A.commit(L.currentTarget.value)},onKeyDown(L){L.currentTarget.tagName==="INPUT"&&L.key==="Enter"&&(v(!0),A.commit(L.currentTarget.value))}},A.getInputValidationProps(),p],stateAttributesMapping:ru})}),jre=C.forwardRef(function(e,t){return E.jsx(Ire,{ref:t,...e})}),jL=({label:e,description:t,required:n,name:r,size:i,fullwidth:o,ghost:a,before:u,after:c,FieldProps:f,className:h,ref:p,...m})=>{const y=!!(u||c);return E.jsx(er,{condition:!!(e||t),render:E.jsx(PL,{name:r,label:e,description:t,required:n,...f}),children:E.jsx(IL,{before:u,after:c,size:i,fullwidth:o,ghost:a,children:E.jsx(jre,{"data-slot":"input",ref:p,name:r,className:ze(Ii.input,y?Ii["input-inner"]:NL({size:i,fullwidth:o,ghost:a}),h),...m})})})};jL.displayName="Input";const LL=16,Lre=12,Fre="medium",zre="none",Bre="column",Ure="_list_10sxx_3",Ho={list:Ure,"list-item-group-collapsible-trigger":"_list-item-group-collapsible-trigger_10sxx_53","list-item-group":"_list-item-group_10sxx_53","list-item-group-category":"_list-item-group-category_10sxx_86","list-item-panel":"_list-item-panel_10sxx_92","list-item":"_list-item_10sxx_53","list-text-label":"_list-text-label_10sxx_129","list-text-description":"_list-text-description_10sxx_141"};function Vh({controlled:e,default:t,name:n,state:r="value"}){const{current:i}=C.useRef(e!==void 0),[o,a]=C.useState(t),u=i?e:o,c=C.useCallback(f=>{i||a(f)},[]);return[u,c]}const EM={};function Tr(e,t){const n=C.useRef(EM);return n.current===EM&&(n.current=e(t)),n}const Ax=as[`useInsertionEffect${Math.random().toFixed(1)}`.slice(0,-3)],Hre=Ax&&Ax!==C.useLayoutEffect?Ax:e=>e();function Fe(e){const t=Tr(Gre).current;return t.next=e,Hre(t.effect),t.trampoline}function Gre(){const e={next:void 0,callback:Vre,trampoline:(...t)=>{var n;return(n=e.callback)==null?void 0:n.call(e,...t)},effect:()=>{e.callback=e.next}};return e}function Vre(){}const qre=()=>{},Ve=typeof document<"u"?C.useLayoutEffect:qre,FL=C.createContext({register:()=>{},unregister:()=>{},subscribeMapChange:()=>()=>{},elementsRef:{current:[]},nextIndexRef:{current:0}});function Yre(){return C.useContext(FL)}function Wy(e){const{children:t,elementsRef:n,labelsRef:r,onMapChange:i}=e,o=Fe(i),a=C.useRef(0),u=Tr(Kre).current,c=Tr(Wre).current,[f,h]=C.useState(0),p=C.useRef(f),m=Fe((x,_)=>{c.set(x,_??null),p.current+=1,h(p.current)}),y=Fe(x=>{c.delete(x),p.current+=1,h(p.current)}),b=C.useMemo(()=>{const x=new Map;return Array.from(c.keys()).filter(k=>k.isConnected).sort(Xre).forEach((k,T)=>{const A=c.get(k)??{};x.set(k,{...A,index:T})}),x},[c,f]);Ve(()=>{if(typeof MutationObserver!="function"||b.size===0)return;const x=new MutationObserver(_=>{const k=new Set,T=A=>k.has(A)?k.delete(A):k.add(A);_.forEach(A=>{A.removedNodes.forEach(T),A.addedNodes.forEach(T)}),k.size===0&&(p.current+=1,h(p.current))});return b.forEach((_,k)=>{k.parentElement&&x.observe(k.parentElement,{childList:!0})}),()=>{x.disconnect()}},[b]),Ve(()=>{p.current===f&&(n.current.length!==b.size&&(n.current.length=b.size),r&&r.current.length!==b.size&&(r.current.length=b.size),a.current=b.size),o(b)},[o,b,n,r,f]),Ve(()=>()=>{n.current=[]},[n]),Ve(()=>()=>{r&&(r.current=[])},[r]);const v=Fe(x=>(u.add(x),()=>{u.delete(x)}));Ve(()=>{u.forEach(x=>x(b))},[u,b]);const S=C.useMemo(()=>({register:m,unregister:y,subscribeMapChange:v,elementsRef:n,labelsRef:r,nextIndexRef:a}),[m,y,v,n,r,a]);return E.jsx(FL.Provider,{value:S,children:t})}function Wre(){return new Map}function Kre(){return new Set}function Xre(e,t){const n=e.compareDocumentPosition(t);return n&Node.DOCUMENT_POSITION_FOLLOWING||n&Node.DOCUMENT_POSITION_CONTAINED_BY?-1:n&Node.DOCUMENT_POSITION_PRECEDING||n&Node.DOCUMENT_POSITION_CONTAINS?1:0}const Qre=C.createContext(void 0);function qh(){const e=C.useContext(Qre);return(e==null?void 0:e.direction)??"ltr"}function dr(e,...t){const n=new URL("https://base-ui.com/production-error");return n.searchParams.set("code",e.toString()),t.forEach(r=>n.searchParams.append("args[]",r)),`Base UI error #${e}; visit ${n} for the full message.`}const zL=C.createContext(void 0);function wC(){const e=C.useContext(zL);if(e===void 0)throw new Error(dr(10));return e}function rs(e,t,n,r){const i=Tr(BL).current;return Jre(i,e,t,n,r)&&UL(i,[e,t,n,r]),i.callback}function Zre(e){const t=Tr(BL).current;return eie(t,e)&&UL(t,e),t.callback}function BL(){return{callback:null,cleanup:null,refs:[]}}function Jre(e,t,n,r,i){return e.refs[0]!==t||e.refs[1]!==n||e.refs[2]!==r||e.refs[3]!==i}function eie(e,t){return e.refs.length!==t.length||e.refs.some((n,r)=>n!==t[r])}function UL(e,t){if(e.refs=t,t.every(n=>n==null)){e.callback=null;return}e.callback=n=>{if(e.cleanup&&(e.cleanup(),e.cleanup=null),n!=null){const r=Array(t.length).fill(null);for(let i=0;i<t.length;i+=1){const o=t[i];if(o!=null)switch(typeof o){case"function":{const a=o(n);typeof a=="function"&&(r[i]=a);break}case"object":{o.current=n;break}}}e.cleanup=()=>{for(let i=0;i<t.length;i+=1){const o=t[i];if(o!=null)switch(typeof o){case"function":{const a=r[i];typeof a=="function"?a():o(null);break}case"object":{o.current=null;break}}}}}}}const tie=parseInt(C.version,10);function SC(e){return tie>=e}function kM(e){if(!C.isValidElement(e))return null;const t=e,n=t.props;return(SC(19)?n==null?void 0:n.ref:t.ref)??null}function Cw(e,t){if(e&&!t)return e;if(!e&&t)return t;if(e||t)return{...e,...t}}function nie(e,t){const n={};for(const r in e){const i=e[r];if(t!=null&&t.hasOwnProperty(r)){const o=t[r](i);o!=null&&Object.assign(n,o);continue}i===!0?n[`data-${r.toLowerCase()}`]="":i&&(n[`data-${r.toLowerCase()}`]=i.toString())}return n}function rie(e,t){return typeof e=="function"?e(t):e}function iie(e,t){return typeof e=="function"?e(t):e}const Bd={};function ch(e,t,n,r,i){let o={...Ew(e,Bd)};return t&&(o=bg(o,t)),n&&(o=bg(o,n)),r&&(o=bg(o,r)),o}function oie(e){if(e.length===0)return Bd;if(e.length===1)return Ew(e[0],Bd);let t={...Ew(e[0],Bd)};for(let n=1;n<e.length;n+=1)t=bg(t,e[n]);return t}function bg(e,t){return HL(t)?t(e):sie(e,t)}function sie(e,t){if(!t)return e;for(const n in t){const r=t[n];switch(n){case"style":{e[n]=Cw(e.style,r);break}case"className":{e[n]=GL(e.className,r);break}default:aie(n,r)?e[n]=lie(e[n],r):e[n]=r}}return e}function aie(e,t){const n=e.charCodeAt(0),r=e.charCodeAt(1),i=e.charCodeAt(2);return n===111&&r===110&&i>=65&&i<=90&&(typeof t=="function"||typeof t>"u")}function HL(e){return typeof e=="function"}function Ew(e,t){return HL(e)?e(t):e??Bd}function lie(e,t){return t?e?n=>{if(uie(n)){const i=n;kw(i);const o=t(i);return i.baseUIHandlerPrevented||e==null||e(i),o}const r=t(n);return e==null||e(n),r}:t:e}function kw(e){return e.preventBaseUIHandler=()=>{e.baseUIHandlerPrevented=!0},e}function GL(e,t){return t?e?t+" "+e:t:e}function uie(e){return e!=null&&typeof e=="object"&&"nativeEvent"in e}function VL(){}const Hc=Object.freeze([]),Tn=Object.freeze({}),cie=500,fie=500,die={style:{transition:"none"}},hie="data-base-ui-click-trigger",pie={fallbackAxisSide:"none"},mie={fallbackAxisSide:"end"},gie={clipPath:"inset(50%)",position:"fixed",top:0,left:0};function dn(e,t,n={}){const r=t.render,i=yie(t,n);if(n.enabled===!1)return null;const o=n.state??Tn;return vie(e,r,i,o)}function yie(e,t={}){const{className:n,style:r,render:i}=e,{state:o=Tn,ref:a,props:u,stateAttributesMapping:c,enabled:f=!0}=t,h=f?rie(n,o):void 0,p=f?iie(r,o):void 0,m=f?nie(o,c):Tn,y=f?Cw(m,Array.isArray(u)?oie(u):u)??Tn:Tn;return typeof document<"u"&&(f?Array.isArray(a)?y.ref=Zre([y.ref,kM(i),...a]):y.ref=rs(y.ref,kM(i),a):rs(null,null)),f?(h!==void 0&&(y.className=GL(y.className,h)),p!==void 0&&(y.style=Cw(y.style,p)),y):Tn}const bie=Symbol.for("react.lazy");function vie(e,t,n,r){if(t){if(typeof t=="function")return t(n,r);const i=ch(n,t.props);i.ref=n.ref;let o=t;return(o==null?void 0:o.$$typeof)===bie&&(o=C.Children.toArray(t)[0]),C.cloneElement(o,i)}if(e&&typeof e=="string")return xie(e,n);throw new Error(dr(8))}function xie(e,t){return e==="button"?C.createElement("button",{type:"button",...t,key:t.key}):e==="img"?C.createElement("img",{alt:"",...t,key:t.key}):C.createElement(e,t)}const Gc="none",Vc="trigger-press",qr="trigger-hover",Ud="trigger-focus",CC="outside-press",qL="item-press",qc="focus-out",EC="escape-key",vg="list-navigation",wie="cancel-open",xg="sibling-open",Sie="imperative-action";function mt(e,t,n,r){let i=!1,o=!1;const a=r??Tn;return{reason:e,event:t??new Event("base-ui"),cancel(){i=!0},allowPropagation(){o=!0},get isCanceled(){return i},get isPropagationAllowed(){return o},trigger:n,...a}}const Cie={value:()=>null},Eie=C.forwardRef(function(t,n){const{render:r,className:i,disabled:o=!1,hiddenUntilFound:a,keepMounted:u,loopFocus:c=!0,onValueChange:f,multiple:h=!1,orientation:p="vertical",value:m,defaultValue:y,...b}=t,v=qh(),S=C.useMemo(()=>{if(m===void 0)return y??[]},[m,y]),x=Fe(f),_=C.useRef([]),[k,T]=Vh({controlled:m,default:S,name:"Accordion",state:"value"}),A=Fe((B,j)=>{const N=mt(Gc);if(h)if(j){const M=k.slice();if(M.push(B),x(M,N),N.isCanceled)return;T(M)}else{const M=k.filter(z=>z!==B);if(x(M,N),N.isCanceled)return;T(M)}else{const M=k[0]===B?[]:[B];if(x(M,N),N.isCanceled)return;T(M)}}),D=C.useMemo(()=>({value:k,disabled:o,orientation:p}),[k,o,p]),O=C.useMemo(()=>({accordionItemRefs:_,direction:v,disabled:o,handleValueChange:A,hiddenUntilFound:a??!1,keepMounted:u??!1,loopFocus:c,orientation:p,state:D,value:k}),[v,o,A,a,u,c,p,D,k]),$=dn("div",t,{state:D,ref:n,props:[{dir:v,role:"region"},b],stateAttributesMapping:Cie});return E.jsx(zL.Provider,{value:O,children:E.jsx(Wy,{elementsRef:_,children:$})})}),kie={...as};let RM=0;function Rie(e,t="mui"){const[n,r]=C.useState(e),i=e||n;return C.useEffect(()=>{n==null&&(RM+=1,r(`${t}-${RM}`))},[n,t]),i}const _M=kie.useId;function ou(e,t){if(_M!==void 0){const n=_M();return e??(t?`${t}-${n}`:n)}return Rie(e,t)}function is(e){return ou(e,"base-ui")}const _ie=[];function Yh(e){C.useEffect(e,_ie)}const Lm=null;class Tie{constructor(){te(this,"callbacks",[]);te(this,"callbacksCount",0);te(this,"nextId",1);te(this,"startId",1);te(this,"isScheduled",!1);te(this,"tick",t=>{var i;this.isScheduled=!1;const n=this.callbacks,r=this.callbacksCount;if(this.callbacks=[],this.callbacksCount=0,this.startId=this.nextId,r>0)for(let o=0;o<n.length;o+=1)(i=n[o])==null||i.call(n,t)})}request(t){const n=this.nextId;return this.nextId+=1,this.callbacks.push(t),this.callbacksCount+=1,(!this.isScheduled||!1)&&(requestAnimationFrame(this.tick),this.isScheduled=!0),n}cancel(t){const n=t-this.startId;n<0||n>=this.callbacks.length||(this.callbacks[n]=null,this.callbacksCount-=1)}}const Fm=new Tie;class un{constructor(){te(this,"currentId",Lm);te(this,"cancel",()=>{this.currentId!==Lm&&(Fm.cancel(this.currentId),this.currentId=Lm)});te(this,"disposeEffect",()=>this.cancel)}static create(){return new un}static request(t){return Fm.request(t)}static cancel(t){return Fm.cancel(t)}request(t){this.cancel(),this.currentId=Fm.request(()=>{this.currentId=Lm,t()})}}function Ky(){const e=Tr(un.create).current;return Yh(e.disposeEffect),e}function jo(e){return e==null?e:"current"in e?e.current:e}let Gl=(function(e){return e.startingStyle="data-starting-style",e.endingStyle="data-ending-style",e})({});const Aie={[Gl.startingStyle]:""},Die={[Gl.endingStyle]:""},Wh={transitionStatus(e){return e==="starting"?Aie:e==="ending"?Die:null}};function YL(e,t=!1,n=!0){const r=Ky();return Fe((i,o=null)=>{r.cancel();function a(){yn.flushSync(i)}const u=jo(e);if(u==null)return;const c=u;if(typeof c.getAnimations!="function"||globalThis.BASE_UI_ANIMATIONS_DISABLED)i();else{let p=function(){const y=Gl.startingStyle;if(!c.hasAttribute(y)){r.request(m);return}const b=new MutationObserver(()=>{c.hasAttribute(y)||(b.disconnect(),m())});b.observe(c,{attributes:!0,attributeFilter:[y]}),o==null||o.addEventListener("abort",()=>b.disconnect(),{once:!0})},m=function(){Promise.all(c.getAnimations().map(y=>y.finished)).then(()=>{o!=null&&o.aborted||a()}).catch(()=>{const y=c.getAnimations();if(n){if(o!=null&&o.aborted)return;a()}else y.length>0&&y.some(b=>b.pending||b.playState!=="finished")&&m()})};var f=p,h=m;if(t){p();return}r.request(m)}})}function kC(e,t=!1,n=!1){const[r,i]=C.useState(e&&t?"idle":void 0),[o,a]=C.useState(e);return e&&!o&&(a(!0),i("starting")),!e&&o&&r!=="ending"&&!n&&i("ending"),!e&&!o&&r==="ending"&&i(void 0),Ve(()=>{if(!e&&o&&r!=="ending"&&n){const u=un.request(()=>{i("ending")});return()=>{un.cancel(u)}}},[e,o,r,n]),Ve(()=>{if(!e||t)return;const u=un.request(()=>{i(void 0)});return()=>{un.cancel(u)}},[t,e]),Ve(()=>{if(!e||!t)return;e&&o&&r!=="idle"&&i("starting");const u=un.request(()=>{i("idle")});return()=>{un.cancel(u)}},[t,e,o,i,r]),C.useMemo(()=>({mounted:o,setMounted:a,transitionStatus:r}),[o,r])}function WL(e){const{open:t,defaultOpen:n,onOpenChange:r,disabled:i}=e,o=t!==void 0,[a,u]=Vh({controlled:t,default:n,name:"Collapsible",state:"open"}),{mounted:c,setMounted:f,transitionStatus:h}=kC(a,!0,!0),[p,m]=C.useState(a),[{height:y,width:b},v]=C.useState({height:void 0,width:void 0}),S=is(),[x,_]=C.useState(),k=x??S,[T,A]=C.useState(!1),[D,O]=C.useState(!1),$=C.useRef(null),B=C.useRef(null),j=C.useRef(null),N=C.useRef(null),M=YL(N,!1),z=Fe(G=>{const L=!a,F=mt(Vc,G.nativeEvent);if(r(L,F),F.isCanceled)return;const U=N.current;B.current==="css-animation"&&U!=null&&U.style.removeProperty("animation-name"),!T&&!D&&(B.current!=null&&B.current!=="css-animation"&&!c&&L&&f(!0),B.current==="css-animation"&&(!p&&L&&m(!0),!c&&L&&f(!0))),u(L),B.current==="none"&&c&&!L&&f(!1)});return Ve(()=>{o&&B.current==="none"&&!D&&!a&&f(!1)},[o,D,a,t,f]),C.useMemo(()=>({abortControllerRef:$,animationTypeRef:B,disabled:i,handleTrigger:z,height:y,mounted:c,open:a,panelId:k,panelRef:N,runOnceAnimationsFinish:M,setDimensions:v,setHiddenUntilFound:A,setKeepMounted:O,setMounted:f,setOpen:u,setPanelIdState:_,setVisible:m,transitionDimensionRef:j,transitionStatus:h,visible:p,width:b}),[$,B,i,z,y,c,a,k,N,M,v,A,O,f,u,m,j,h,p,b])}const RC=C.createContext(void 0);function Xy(){const e=C.useContext(RC);if(e===void 0)throw new Error(dr(15));return e}let Mie=(function(e){return e[e.None=0]="None",e[e.GuessFromOrder=1]="GuessFromOrder",e})({});function Kh(e={}){const{label:t,metadata:n,textRef:r,indexGuessBehavior:i,index:o}=e,{register:a,unregister:u,subscribeMapChange:c,elementsRef:f,labelsRef:h,nextIndexRef:p}=Yre(),m=C.useRef(-1),[y,b]=C.useState(o??(i===Mie.GuessFromOrder?()=>{if(m.current===-1){const x=p.current;p.current+=1,m.current=x}return m.current}:-1)),v=C.useRef(null),S=C.useCallback(x=>{var _;if(v.current=x,y!==-1&&x!==null&&(f.current[y]=x,h)){const k=t!==void 0;h.current[y]=k?t:((_=r==null?void 0:r.current)==null?void 0:_.textContent)??x.textContent}},[y,f,h,t,r]);return Ve(()=>{if(o!=null)return;const x=v.current;if(x)return a(x,n),()=>{u(x)}},[o,a,u,n]),Ve(()=>{if(o==null)return c(x=>{var k;const _=v.current?(k=x.get(v.current))==null?void 0:k.index:null;_!=null&&b(_)})},[o,c,b]),C.useMemo(()=>({ref:S,index:y}),[y,S])}const KL=C.createContext(void 0);function _C(){const e=C.useContext(KL);if(e===void 0)throw new Error(dr(9));return e}let Hd=(function(e){return e.open="data-open",e.closed="data-closed",e[e.startingStyle=Gl.startingStyle]="startingStyle",e[e.endingStyle=Gl.endingStyle]="endingStyle",e})({}),Oie=(function(e){return e.panelOpen="data-panel-open",e})({});const $ie={[Hd.open]:""},Pie={[Hd.closed]:""},XL={open(e){return e?{[Oie.panelOpen]:""}:null}},QL={open(e){return e?$ie:Pie}};let Nie=(function(e){return e.index="data-index",e.disabled="data-disabled",e.open="data-open",e})({});const TC={...QL,index:e=>Number.isInteger(e)?{[Nie.index]:String(e)}:null,...Wh,value:()=>null},Iie=C.forwardRef(function(t,n){const{className:r,disabled:i=!1,onOpenChange:o,render:a,value:u,...c}=t,{ref:f,index:h}=Kh(),p=rs(n,f),{disabled:m,handleValueChange:y,state:b,value:v}=wC(),S=is(),x=u??S,_=i||m,k=C.useMemo(()=>{if(!v)return!1;for(let z=0;z<v.length;z+=1)if(v[z]===x)return!0;return!1},[v,x]),T=Fe((z,G)=>{o==null||o(z,G),!G.isCanceled&&y(x,z)}),A=WL({open:k,onOpenChange:T,disabled:_}),D=C.useMemo(()=>({open:A.open,disabled:A.disabled,hidden:!A.mounted,transitionStatus:A.transitionStatus}),[A.open,A.disabled,A.mounted,A.transitionStatus]),O=C.useMemo(()=>({...A,onOpenChange:T,state:D}),[A,D,T]),$=C.useMemo(()=>({...b,index:h,disabled:_,open:k}),[_,h,k,b]),[B,j]=C.useState(is()),N=C.useMemo(()=>({open:k,state:$,setTriggerId:j,triggerId:B}),[k,$,j,B]),M=dn("div",t,{state:$,ref:p,props:c,stateAttributesMapping:TC});return E.jsx(RC.Provider,{value:O,children:E.jsx(KL.Provider,{value:N,children:M})})}),jie=C.forwardRef(function(t,n){const{render:r,className:i,...o}=t,{state:a}=_C();return dn("h3",t,{state:a,ref:n,props:o,stateAttributesMapping:TC})});function Rw(e){return e==null||e.hasAttribute("disabled")||e.getAttribute("aria-disabled")==="true"}function Qy(){return typeof window<"u"}function $a(e){return AC(e)?(e.nodeName||"").toLowerCase():"#document"}function jn(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function uo(e){var t;return(t=(AC(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function AC(e){return Qy()?e instanceof Node||e instanceof jn(e).Node:!1}function It(e){return Qy()?e instanceof Element||e instanceof jn(e).Element:!1}function Jt(e){return Qy()?e instanceof HTMLElement||e instanceof jn(e).HTMLElement:!1}function _w(e){return!Qy()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof jn(e).ShadowRoot}function Pa(e){const{overflow:t,overflowX:n,overflowY:r,display:i}=Ar(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&i!=="inline"&&i!=="contents"}function Lie(e){return/^(table|td|th)$/.test($a(e))}function Zy(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}const Fie=/transform|translate|scale|rotate|perspective|filter/,zie=/paint|layout|strict|content/,cl=e=>!!e&&e!=="none";let Dx;function DC(e){const t=It(e)?Ar(e):e;return cl(t.transform)||cl(t.translate)||cl(t.scale)||cl(t.rotate)||cl(t.perspective)||!Jy()&&(cl(t.backdropFilter)||cl(t.filter))||Fie.test(t.willChange||"")||zie.test(t.contain||"")}function Bie(e){let t=ao(e);for(;Jt(t)&&!oo(t);){if(DC(t))return t;if(Zy(t))return null;t=ao(t)}return null}function Jy(){return Dx==null&&(Dx=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),Dx}function oo(e){return/^(html|body|#document)$/.test($a(e))}function Ar(e){return jn(e).getComputedStyle(e)}function eb(e){return It(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function ao(e){if($a(e)==="html")return e;const t=e.assignedSlot||e.parentNode||_w(e)&&e.host||uo(e);return _w(t)?t.host:t}function ZL(e){const t=ao(e);return oo(t)?e.ownerDocument?e.ownerDocument.body:e.body:Jt(t)&&Pa(t)?t:ZL(t)}function ma(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const i=ZL(e),o=i===((r=e.ownerDocument)==null?void 0:r.body),a=jn(i);if(o){const u=Tw(a);return t.concat(a,a.visualViewport||[],Pa(i)?i:[],u&&n?ma(u):[])}else return t.concat(i,ma(i,[],n))}function Tw(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}const JL=C.createContext(void 0);function MC(e=!1){const t=C.useContext(JL);if(t===void 0&&!e)throw new Error(dr(16));return t}function Uie(e){const{focusableWhenDisabled:t,disabled:n,composite:r=!1,tabIndex:i=0,isNativeButton:o}=e,a=r&&t!==!1,u=r&&t===!1;return{props:C.useMemo(()=>{const f={onKeyDown(h){n&&t&&h.key!=="Tab"&&h.preventDefault()}};return r||(f.tabIndex=i,!o&&n&&(f.tabIndex=t?i:-1)),(o&&(t||a)||!o&&n)&&(f["aria-disabled"]=n),o&&(!t||u)&&(f.disabled=n),f},[r,n,t,a,u,o,i])}}function yf(e={}){const{disabled:t=!1,focusableWhenDisabled:n,tabIndex:r=0,native:i=!0}=e,o=C.useRef(null),a=MC(!0)!==void 0,u=Fe(()=>{const m=o.current;return!!((m==null?void 0:m.tagName)==="A"&&(m!=null&&m.href))}),{props:c}=Uie({focusableWhenDisabled:n,disabled:t,composite:a,tabIndex:r,isNativeButton:i}),f=C.useCallback(()=>{const m=o.current;Hie(m)&&a&&t&&c.disabled===void 0&&m.disabled&&(m.disabled=!1)},[t,c.disabled,a]);Ve(f,[f]);const h=C.useCallback((m={})=>{const{onClick:y,onMouseDown:b,onKeyUp:v,onKeyDown:S,onPointerDown:x,..._}=m;return ch({type:i?"button":void 0,onClick(T){if(t){T.preventDefault();return}y==null||y(T)},onMouseDown(T){t||b==null||b(T)},onKeyDown(T){if(t||(kw(T),S==null||S(T)),T.baseUIHandlerPrevented)return;const A=T.target===T.currentTarget&&!i&&!u()&&!t,D=T.key==="Enter",O=T.key===" ";A&&((O||D)&&T.preventDefault(),D&&(y==null||y(T)))},onKeyUp(T){t||(kw(T),v==null||v(T)),!T.baseUIHandlerPrevented&&T.target===T.currentTarget&&!i&&!t&&T.key===" "&&(y==null||y(T))},onPointerDown(T){if(t){T.preventDefault();return}x==null||x(T)}},i?void 0:{role:"button"},c,_)},[t,c,i,u]),p=Fe(m=>{o.current=m,f()});return{getButtonProps:h,buttonRef:p}}function Hie(e){return Jt(e)&&e.tagName==="BUTTON"}const bf=typeof navigator<"u",Mx=Vie(),eF=Yie(),tF=qie(),nF=typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter:none"),rF=Mx.platform==="MacIntel"&&Mx.maxTouchPoints>1?!0:/iP(hone|ad|od)|iOS/.test(Mx.platform),iF=bf&&/apple/i.test(navigator.vendor),Aw=bf&&/android/i.test(eF)||/android/i.test(tF),Gie=bf&&eF.toLowerCase().startsWith("mac")&&!navigator.maxTouchPoints,oF=tF.includes("jsdom/");function Vie(){if(!bf)return{platform:"",maxTouchPoints:-1};const e=navigator.userAgentData;return e!=null&&e.platform?{platform:e.platform,maxTouchPoints:navigator.maxTouchPoints}:{platform:navigator.platform??"",maxTouchPoints:navigator.maxTouchPoints??-1}}function qie(){if(!bf)return"";const e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map(({brand:t,version:n})=>`${t}/${n}`).join(" "):navigator.userAgent}function Yie(){if(!bf)return"";const e=navigator.userAgentData;return e!=null&&e.platform?e.platform:navigator.platform??""}const Dw="data-base-ui-focusable",sF="active",aF="selected",lF="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])",ga="ArrowLeft",ya="ArrowRight",OC="ArrowUp",Xh="ArrowDown";function gi(e){var n;let t=e.activeElement;for(;((n=t==null?void 0:t.shadowRoot)==null?void 0:n.activeElement)!=null;)t=t.shadowRoot.activeElement;return t}function ht(e,t){var r;if(!e||!t)return!1;const n=(r=t.getRootNode)==null?void 0:r.call(t);if(e.contains(t))return!0;if(n&&_w(n)){let i=t;for(;i;){if(e===i)return!0;i=i.parentNode||i.host}}return!1}function ay(e,t){if(!It(e))return!1;const n=e;if(t.hasElement(n))return!n.hasAttribute("data-trigger-disabled");for(const[,r]of t.entries())if(ht(r,n))return!r.hasAttribute("data-trigger-disabled");return!1}function Yr(e){return"composedPath"in e?e.composedPath()[0]:e.target}function Oi(e,t){if(t==null)return!1;if("composedPath"in e)return e.composedPath().includes(t);const n=e;return n.target!=null&&t.contains(n.target)}function Wie(e){return e.matches("html,body")}function tb(e){return Jt(e)&&e.matches(lF)}function Mw(e){return e?e.getAttribute("role")==="combobox"&&tb(e):!1}function Kie(e){if(!e||oF)return!0;try{return e.matches(":focus-visible")}catch{return!0}}function ly(e){return e?e.hasAttribute(Dw)?e:e.querySelector(`[${Dw}]`)||e:null}function Ll(e,t,n=!0){return e.filter(i=>{var o;return i.parentId===t&&(!n||((o=i.context)==null?void 0:o.open))}).flatMap(i=>[i,...Ll(e,i.id,n)])}function TM(e,t){var i;let n=[],r=(i=e.find(o=>o.id===t))==null?void 0:i.parentId;for(;r;){const o=e.find(a=>a.id===r);r=o==null?void 0:o.parentId,o&&(n=n.concat(o))}return n}function Gn(e){e.preventDefault(),e.stopPropagation()}function Xie(e){return"nativeEvent"in e}function uF(e){return e.pointerType===""&&e.isTrusted?!0:Aw&&e.pointerType?e.type==="click"&&e.buttons===1:e.detail===0&&!e.pointerType}function cF(e){return oF?!1:!Aw&&e.width===0&&e.height===0||Aw&&e.width===1&&e.height===1&&e.pressure===0&&e.detail===0&&e.pointerType==="mouse"||e.width<1&&e.height<1&&e.pressure===0&&e.detail===0&&e.pointerType==="touch"}function Yc(e,t){const n=["mouse","pen"];return t||n.push("",void 0),n.includes(e)}function fF(e){const t=e.type;return t==="click"||t==="mousedown"||t==="keydown"||t==="keyup"}const Qie=["top","right","bottom","left"],Wc=Math.min,Wr=Math.max,Kc=Math.round,uc=Math.floor,so=e=>({x:e,y:e}),Zie={left:"right",right:"left",bottom:"top",top:"bottom"};function Ow(e,t,n){return Wr(e,Wc(t,n))}function os(e,t){return typeof e=="function"?e(t):e}function Xr(e){return e.split("-")[0]}function Na(e){return e.split("-")[1]}function $C(e){return e==="x"?"y":"x"}function PC(e){return e==="y"?"height":"width"}function Si(e){const t=e[0];return t==="t"||t==="b"?"y":"x"}function NC(e){return $C(Si(e))}function Jie(e,t,n){n===void 0&&(n=!1);const r=Na(e),i=NC(e),o=PC(i);let a=i==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[o]>t.floating[o]&&(a=uy(a)),[a,uy(a)]}function eoe(e){const t=uy(e);return[$w(e),t,$w(t)]}function $w(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const AM=["left","right"],DM=["right","left"],toe=["top","bottom"],noe=["bottom","top"];function roe(e,t,n){switch(e){case"top":case"bottom":return n?t?DM:AM:t?AM:DM;case"left":case"right":return t?toe:noe;default:return[]}}function ioe(e,t,n,r){const i=Na(e);let o=roe(Xr(e),n==="start",r);return i&&(o=o.map(a=>a+"-"+i),t&&(o=o.concat(o.map($w)))),o}function uy(e){const t=Xr(e);return Zie[t]+e.slice(t.length)}function ooe(e){return{top:0,right:0,bottom:0,left:0,...e}}function dF(e){return typeof e!="number"?ooe(e):{top:e,right:e,bottom:e,left:e}}function cy(e){const{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 zm(e,t,n){return Math.floor(e/t)!==n}function vc(e,t){return t<0||t>=e.current.length}function wg(e,t){return Hn(e,{disabledIndices:t})}function Pw(e,t){return Hn(e,{decrement:!0,startingIndex:e.current.length,disabledIndices:t})}function Hn(e,{startingIndex:t=-1,decrement:n=!1,disabledIndices:r,amount:i=1}={}){let o=t;do o+=n?-i:i;while(o>=0&&o<=e.current.length-1&&ba(e,o,r));return o}function hF(e,{event:t,orientation:n,loopFocus:r,rtl:i,cols:o,disabledIndices:a,minIndex:u,maxIndex:c,prevIndex:f,stopEvent:h=!1}){let p=f;const m=[],y={};let b=!1;{let x=null,_=-1;e.current.forEach((k,T)=>{if(k==null)return;const A=k.closest('[role="row"]');A&&(b=!0),(A!==x||_===-1)&&(x=A,_+=1,m[_]=[]),m[_].push(T),y[T]=_})}const v=b&&m.length>0&&m.some(x=>x.length!==o);function S(x){if(!v||f===-1)return;const _=y[f];if(_==null)return;const k=m[_].indexOf(f);let T=x==="up"?_-1:_+1;r&&(T<0?T=m.length-1:T>=m.length&&(T=0));const A=new Set;for(;T>=0&&T<m.length&&!A.has(T);){A.add(T);const D=m[T];if(D.length===0){T=x==="up"?T-1:T+1;continue}const O=Math.min(k,D.length-1);for(let $=O;$>=0;$-=1){const B=D[$];if(!ba(e,B,a))return B}T=x==="up"?T-1:T+1,r&&(T<0?T=m.length-1:T>=m.length&&(T=0))}}if(t.key===OC){const x=S("up");if(x!==void 0)h&&Gn(t),p=x;else{if(h&&Gn(t),f===-1)p=c;else if(p=Hn(e,{startingIndex:p,amount:o,decrement:!0,disabledIndices:a}),r&&(f-o<u||p<0)){const _=f%o,k=c%o,T=c-(k-_);k===_?p=c:p=k>_?T:T-o}vc(e,p)&&(p=f)}}if(t.key===Xh){const x=S("down");x!==void 0?(h&&Gn(t),p=x):(h&&Gn(t),f===-1?p=u:(p=Hn(e,{startingIndex:f,amount:o,disabledIndices:a}),r&&f+o>c&&(p=Hn(e,{startingIndex:f%o-o,amount:o,disabledIndices:a}))),vc(e,p)&&(p=f))}if(n==="both"){const x=uc(f/o);t.key===(i?ga:ya)&&(h&&Gn(t),f%o!==o-1?(p=Hn(e,{startingIndex:f,disabledIndices:a}),r&&zm(p,o,x)&&(p=Hn(e,{startingIndex:f-f%o-1,disabledIndices:a}))):r&&(p=Hn(e,{startingIndex:f-f%o-1,disabledIndices:a})),zm(p,o,x)&&(p=f)),t.key===(i?ya:ga)&&(h&&Gn(t),f%o!==0?(p=Hn(e,{startingIndex:f,decrement:!0,disabledIndices:a}),r&&zm(p,o,x)&&(p=Hn(e,{startingIndex:f+(o-f%o),decrement:!0,disabledIndices:a}))):r&&(p=Hn(e,{startingIndex:f+(o-f%o),decrement:!0,disabledIndices:a})),zm(p,o,x)&&(p=f));const _=uc(c/o)===x;vc(e,p)&&(r&&_?p=t.key===(i?ya:ga)?c:Hn(e,{startingIndex:f-f%o-1,disabledIndices:a}):p=f)}return p}function pF(e,t,n){const r=[];let i=0;return e.forEach(({width:o,height:a},u)=>{let c=!1;for(n&&(i=0);!c;){const f=[];for(let h=0;h<o;h+=1)for(let p=0;p<a;p+=1)f.push(i+h+p*t);i%t+o<=t&&f.every(h=>r[h]==null)?(f.forEach(h=>{r[h]=u}),c=!0):i+=1}}),[...r]}function mF(e,t,n,r,i){if(e===-1)return-1;const o=n.indexOf(e),a=t[e];switch(i){case"tl":return o;case"tr":return a?o+a.width-1:o;case"bl":return a?o+(a.height-1)*r:o;case"br":return n.lastIndexOf(e);default:return-1}}function gF(e,t){return t.flatMap((n,r)=>e.includes(n)?[r]:[])}function ba(e,t,n){if(typeof n=="function")return n(t);if(n)return n.includes(t);const r=e.current[t];return r?r.hasAttribute("disabled")||r.getAttribute("aria-disabled")==="true":!1}/*!
|
|
466
|
-
* tabbable 6.4.0
|
|
467
|
-
* @license MIT, https://github.com/focus-trap/tabbable/blob/master/LICENSE
|
|
468
|
-
*/var soe=["input:not([inert]):not([inert] *)","select:not([inert]):not([inert] *)","textarea:not([inert]):not([inert] *)","a[href]:not([inert]):not([inert] *)","button:not([inert]):not([inert] *)","[tabindex]:not(slot):not([inert]):not([inert] *)","audio[controls]:not([inert]):not([inert] *)","video[controls]:not([inert]):not([inert] *)",'[contenteditable]:not([contenteditable="false"]):not([inert]):not([inert] *)',"details>summary:first-of-type:not([inert]):not([inert] *)","details:not([inert]):not([inert] *)"],fy=soe.join(","),yF=typeof Element>"u",Xc=yF?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,dy=!yF&&Element.prototype.getRootNode?function(e){var t;return e==null||(t=e.getRootNode)===null||t===void 0?void 0:t.call(e)}:function(e){return e==null?void 0:e.ownerDocument},hy=function(t,n){var r;n===void 0&&(n=!0);var i=t==null||(r=t.getAttribute)===null||r===void 0?void 0:r.call(t,"inert"),o=i===""||i==="true",a=o||n&&t&&(typeof t.closest=="function"?t.closest("[inert]"):hy(t.parentNode));return a},aoe=function(t){var n,r=t==null||(n=t.getAttribute)===null||n===void 0?void 0:n.call(t,"contenteditable");return r===""||r==="true"},bF=function(t,n,r){if(hy(t))return[];var i=Array.prototype.slice.apply(t.querySelectorAll(fy));return n&&Xc.call(t,fy)&&i.unshift(t),i=i.filter(r),i},py=function(t,n,r){for(var i=[],o=Array.from(t);o.length;){var a=o.shift();if(!hy(a,!1))if(a.tagName==="SLOT"){var u=a.assignedElements(),c=u.length?u:a.children,f=py(c,!0,r);r.flatten?i.push.apply(i,f):i.push({scopeParent:a,candidates:f})}else{var h=Xc.call(a,fy);h&&r.filter(a)&&(n||!t.includes(a))&&i.push(a);var p=a.shadowRoot||typeof r.getShadowRoot=="function"&&r.getShadowRoot(a),m=!hy(p,!1)&&(!r.shadowRootFilter||r.shadowRootFilter(a));if(p&&m){var y=py(p===!0?a.children:p.children,!0,r);r.flatten?i.push.apply(i,y):i.push({scopeParent:a,candidates:y})}else o.unshift.apply(o,a.children)}}return i},vF=function(t){return!isNaN(parseInt(t.getAttribute("tabindex"),10))},xF=function(t){if(!t)throw new Error("No node provided");return t.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName)||aoe(t))&&!vF(t)?0:t.tabIndex},loe=function(t,n){var r=xF(t);return r<0&&n&&!vF(t)?0:r},uoe=function(t,n){return t.tabIndex===n.tabIndex?t.documentOrder-n.documentOrder:t.tabIndex-n.tabIndex},wF=function(t){return t.tagName==="INPUT"},coe=function(t){return wF(t)&&t.type==="hidden"},foe=function(t){var n=t.tagName==="DETAILS"&&Array.prototype.slice.apply(t.children).some(function(r){return r.tagName==="SUMMARY"});return n},doe=function(t,n){for(var r=0;r<t.length;r++)if(t[r].checked&&t[r].form===n)return t[r]},hoe=function(t){if(!t.name)return!0;var n=t.form||dy(t),r=function(u){return n.querySelectorAll('input[type="radio"][name="'+u+'"]')},i;if(typeof window<"u"&&typeof window.CSS<"u"&&typeof window.CSS.escape=="function")i=r(window.CSS.escape(t.name));else try{i=r(t.name)}catch(a){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",a.message),!1}var o=doe(i,t.form);return!o||o===t},poe=function(t){return wF(t)&&t.type==="radio"},moe=function(t){return poe(t)&&!hoe(t)},goe=function(t){var n,r=t&&dy(t),i=(n=r)===null||n===void 0?void 0:n.host,o=!1;if(r&&r!==t){var a,u,c;for(o=!!((a=i)!==null&&a!==void 0&&(u=a.ownerDocument)!==null&&u!==void 0&&u.contains(i)||t!=null&&(c=t.ownerDocument)!==null&&c!==void 0&&c.contains(t));!o&&i;){var f,h,p;r=dy(i),i=(f=r)===null||f===void 0?void 0:f.host,o=!!((h=i)!==null&&h!==void 0&&(p=h.ownerDocument)!==null&&p!==void 0&&p.contains(i))}}return o},MM=function(t){var n=t.getBoundingClientRect(),r=n.width,i=n.height;return r===0&&i===0},yoe=function(t,n){var r=n.displayCheck,i=n.getShadowRoot;if(r==="full-native"&&"checkVisibility"in t){var o=t.checkVisibility({checkOpacity:!1,opacityProperty:!1,contentVisibilityAuto:!0,visibilityProperty:!0,checkVisibilityCSS:!0});return!o}if(getComputedStyle(t).visibility==="hidden")return!0;var a=Xc.call(t,"details>summary:first-of-type"),u=a?t.parentElement:t;if(Xc.call(u,"details:not([open]) *"))return!0;if(!r||r==="full"||r==="full-native"||r==="legacy-full"){if(typeof i=="function"){for(var c=t;t;){var f=t.parentElement,h=dy(t);if(f&&!f.shadowRoot&&i(f)===!0)return MM(t);t.assignedSlot?t=t.assignedSlot:!f&&h!==t.ownerDocument?t=h.host:t=f}t=c}if(goe(t))return!t.getClientRects().length;if(r!=="legacy-full")return!0}else if(r==="non-zero-area")return MM(t);return!1},boe=function(t){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(t.tagName))for(var n=t.parentElement;n;){if(n.tagName==="FIELDSET"&&n.disabled){for(var r=0;r<n.children.length;r++){var i=n.children.item(r);if(i.tagName==="LEGEND")return Xc.call(n,"fieldset[disabled] *")?!0:!i.contains(t)}return!0}n=n.parentElement}return!1},Nw=function(t,n){return!(n.disabled||coe(n)||yoe(n,t)||foe(n)||boe(n))},Iw=function(t,n){return!(moe(n)||xF(n)<0||!Nw(t,n))},voe=function(t){var n=parseInt(t.getAttribute("tabindex"),10);return!!(isNaN(n)||n>=0)},SF=function(t){var n=[],r=[];return t.forEach(function(i,o){var a=!!i.scopeParent,u=a?i.scopeParent:i,c=loe(u,a),f=a?SF(i.candidates):u;c===0?a?n.push.apply(n,f):n.push(u):r.push({documentOrder:o,tabIndex:c,item:i,isScope:a,content:f})}),r.sort(uoe).reduce(function(i,o){return o.isScope?i.push.apply(i,o.content):i.push(o.content),i},[]).concat(n)},Qh=function(t,n){n=n||{};var r;return n.getShadowRoot?r=py([t],n.includeContainer,{filter:Iw.bind(null,n),flatten:!1,getShadowRoot:n.getShadowRoot,shadowRootFilter:voe}):r=bF(t,n.includeContainer,Iw.bind(null,n)),SF(r)},xoe=function(t,n){n=n||{};var r;return n.getShadowRoot?r=py([t],n.includeContainer,{filter:Nw.bind(null,n),flatten:!0,getShadowRoot:n.getShadowRoot}):r=bF(t,n.includeContainer,Nw.bind(null,n)),r},CF=function(t,n){if(n=n||{},!t)throw new Error("No node provided");return Xc.call(t,fy)===!1?!1:Iw(n,t)};function Pt(e){return(e==null?void 0:e.ownerDocument)||document}const vf=()=>({getShadowRoot:!0,displayCheck:typeof ResizeObserver=="function"&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function EF(e,t){const n=Qh(e,vf()),r=n.length;if(r===0)return;const i=gi(Pt(e)),o=n.indexOf(i),a=o===-1?t===1?0:r-1:o+t;return n[a]}function IC(e){return EF(Pt(e).body,1)||e}function kF(e){return EF(Pt(e).body,-1)||e}function RF(e,t){if(!e)return null;const n=Qh(Pt(e).body,vf()),r=n.length;if(r===0)return null;const i=n.indexOf(e);if(i===-1)return null;const o=(i+t+r)%r;return n[o]}function woe(e){return RF(e,1)}function Soe(e){return RF(e,-1)}function xc(e,t){const n=t||e.currentTarget,r=e.relatedTarget;return!r||!ht(n,r)}function Coe(e){Qh(e,vf()).forEach(n=>{n.dataset.tabindex=n.getAttribute("tabindex")||"",n.setAttribute("tabindex","-1")})}function OM(e){e.querySelectorAll("[data-tabindex]").forEach(n=>{const r=n.dataset.tabindex;delete n.dataset.tabindex,r?n.setAttribute("tabindex",r):n.removeAttribute("tabindex")})}const va="ArrowUp",Yo="ArrowDown",Vl="ArrowLeft",xa="ArrowRight",xf="Home",wf="End",_F=new Set([Vl,xa]),Eoe=new Set([Vl,xa,xf,wf]),TF=new Set([va,Yo]),koe=new Set([va,Yo,xf,wf]),AF=new Set([..._F,...TF]),Roe=new Set([...AF,xf,wf]),_oe=new Set([va,Yo,Vl,xa,xf,wf]),Toe="Shift",Aoe="Control",Doe="Alt",Moe="Meta",Ooe=new Set([Toe,Aoe,Doe,Moe]);function $oe(e){return Jt(e)&&e.tagName==="INPUT"}function $M(e){return!!($oe(e)&&e.selectionStart!=null||Jt(e)&&e.tagName==="TEXTAREA")}function PM(e,t,n,r){if(!e||!t||!t.scrollTo)return;let i=e.scrollLeft,o=e.scrollTop;const a=e.clientWidth<e.scrollWidth,u=e.clientHeight<e.scrollHeight;if(a&&r!=="vertical"){const c=NM(e,t,"left"),f=Bm(e),h=Bm(t);n==="ltr"&&(c+t.offsetWidth+h.scrollMarginRight>e.scrollLeft+e.clientWidth-f.scrollPaddingRight?i=c+t.offsetWidth+h.scrollMarginRight-e.clientWidth+f.scrollPaddingRight:c-h.scrollMarginLeft<e.scrollLeft+f.scrollPaddingLeft&&(i=c-h.scrollMarginLeft-f.scrollPaddingLeft)),n==="rtl"&&(c-h.scrollMarginRight<e.scrollLeft+f.scrollPaddingLeft?i=c-h.scrollMarginLeft-f.scrollPaddingLeft:c+t.offsetWidth+h.scrollMarginRight>e.scrollLeft+e.clientWidth-f.scrollPaddingRight&&(i=c+t.offsetWidth+h.scrollMarginRight-e.clientWidth+f.scrollPaddingRight))}if(u&&r!=="horizontal"){const c=NM(e,t,"top"),f=Bm(e),h=Bm(t);c-h.scrollMarginTop<e.scrollTop+f.scrollPaddingTop?o=c-h.scrollMarginTop-f.scrollPaddingTop:c+t.offsetHeight+h.scrollMarginBottom>e.scrollTop+e.clientHeight-f.scrollPaddingBottom&&(o=c+t.offsetHeight+h.scrollMarginBottom-e.clientHeight+f.scrollPaddingBottom)}e.scrollTo({left:i,top:o,behavior:"auto"})}function NM(e,t,n){const r=n==="left"?"offsetLeft":"offsetTop";let i=0;for(;t.offsetParent&&(i+=t[r],t.offsetParent!==e);)t=t.offsetParent;return i}function Bm(e){const 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}}const Poe=new Set([Yo,va,xa,Vl,xf,wf]);function Noe(e){const{current:t}=e,n=[];for(let r=0;r<t.length;r+=1){const i=t[r];if(!Rw(i)){const o=i==null?void 0:i.querySelector('[type="button"], [role="button"]');o&&!Rw(o)&&n.push(o)}}return n}const Ioe=C.forwardRef(function(t,n){const{disabled:r,className:i,id:o,render:a,nativeButton:u=!0,...c}=t,{panelId:f,open:h,handleTrigger:p,disabled:m}=Xy(),y=r??m,{getButtonProps:b,buttonRef:v}=yf({disabled:y,focusableWhenDisabled:!0,native:u}),{accordionItemRefs:S,direction:x,loopFocus:_,orientation:k}=wC(),T=x==="rtl",A=k==="horizontal",{state:D,setTriggerId:O,triggerId:$}=_C();Ve(()=>(o&&O(o),()=>{O(void 0)}),[o,O]);const B=C.useMemo(()=>({"aria-controls":h?f:void 0,"aria-expanded":h,id:$,onClick:p,onKeyDown(N){if(!Poe.has(N.key))return;Gn(N);const M=Noe(S),G=M.length-1;let L=-1;const F=M.indexOf(N.target);function U(){_?L=F+1>G?0:F+1:L=Math.min(F+1,G)}function q(){_?L=F===0?G:F-1:L=F-1}switch(N.key){case Yo:A||U();break;case va:A||q();break;case xa:A&&(T?q():U());break;case Vl:A&&(T?U():q());break;case"Home":L=0;break;case"End":L=G;break}L>-1&&M[L].focus()}}),[S,p,$,A,T,_,h,f]);return dn("button",t,{state:D,ref:[n,v],props:[B,c,b],stateAttributesMapping:XL})});let joe=(function(e){return e.disabled="data-disabled",e.orientation="data-orientation",e})({});function DF(e){const{abortControllerRef:t,animationTypeRef:n,externalRef:r,height:i,hiddenUntilFound:o,keepMounted:a,id:u,mounted:c,onOpenChange:f,open:h,panelRef:p,runOnceAnimationsFinish:m,setDimensions:y,setMounted:b,setOpen:v,setVisible:S,transitionDimensionRef:x,visible:_,width:k}=e,T=C.useRef(!1),A=C.useRef(null),D=C.useRef(h),O=C.useRef(h),$=Ky(),B=C.useMemo(()=>n.current==="css-animation"?!_:!h&&!c,[h,c,_,n]),j=Fe(M=>{if(!M)return;if(n.current==null||x.current==null){const L=getComputedStyle(M),F=L.animationName!=="none"&&L.animationName!=="",U=L.transitionDuration!=="0s"&&L.transitionDuration!=="";F&&U||(L.animationName==="none"&&L.transitionDuration!=="0s"?n.current="css-transition":L.animationName!=="none"&&L.transitionDuration==="0s"?n.current="css-animation":n.current="none"),M.getAttribute(joe.orientation)==="horizontal"||L.transitionProperty.indexOf("width")>-1?x.current="width":x.current="height"}if(n.current!=="css-transition")return;(i===void 0||k===void 0)&&(y({height:M.scrollHeight,width:M.scrollWidth}),O.current&&M.style.setProperty("transition-duration","0s"));let z=-1,G=-1;return z=un.request(()=>{O.current=!1,G=un.request(()=>{setTimeout(()=>{M.style.removeProperty("transition-duration")})})}),()=>{un.cancel(z),un.cancel(G)}}),N=rs(r,p,j);return Ve(()=>{if(n.current!=="css-transition")return;const M=p.current;if(!M)return;let z=-1;if(t.current!=null&&(t.current.abort(),t.current=null),h){const G={"justify-content":M.style.justifyContent,"align-items":M.style.alignItems,"align-content":M.style.alignContent,"justify-items":M.style.justifyItems};Object.keys(G).forEach(L=>{M.style.setProperty(L,"initial","important")}),!O.current&&!a&&M.setAttribute(Hd.startingStyle,""),y({height:M.scrollHeight,width:M.scrollWidth}),z=un.request(()=>{Object.entries(G).forEach(([L,F])=>{F===""?M.style.removeProperty(L):M.style.setProperty(L,F)})})}else{if(M.scrollHeight===0&&M.scrollWidth===0)return;y({height:M.scrollHeight,width:M.scrollWidth});const G=new AbortController;t.current=G;const L=G.signal;let F=null;const U=Hd.endingStyle;return F=new MutationObserver(q=>{q.some(I=>I.type==="attributes"&&I.attributeName===U)&&(F==null||F.disconnect(),F=null,m(()=>{y({height:0,width:0}),M.style.removeProperty("content-visibility"),b(!1),t.current===G&&(t.current=null)},L))}),F.observe(M,{attributes:!0,attributeFilter:[U]}),()=>{F==null||F.disconnect(),$.cancel(),t.current===G&&(G.abort(),t.current=null)}}return()=>{un.cancel(z)}},[t,n,$,o,a,c,h,p,m,y,b]),Ve(()=>{if(n.current!=="css-animation")return;const M=p.current;M&&(A.current=M.style.animationName||A.current,M.style.setProperty("animation-name","none"),y({height:M.scrollHeight,width:M.scrollWidth}),!D.current&&!T.current&&M.style.removeProperty("animation-name"),h?(t.current!=null&&(t.current.abort(),t.current=null),b(!0),S(!0)):(t.current=new AbortController,m(()=>{b(!1),S(!1),t.current=null},t.current.signal)))},[t,n,h,p,m,y,b,S,_]),Yh(()=>{const M=un.request(()=>{D.current=!1});return()=>un.cancel(M)}),Ve(()=>{if(!o)return;const M=p.current;if(!M)return;let z=-1,G=-1;return h&&T.current&&(M.style.transitionDuration="0s",y({height:M.scrollHeight,width:M.scrollWidth}),z=un.request(()=>{T.current=!1,G=un.request(()=>{setTimeout(()=>{M.style.removeProperty("transition-duration")})})})),()=>{un.cancel(z),un.cancel(G)}},[o,h,p,y]),Ve(()=>{const M=p.current;M&&o&&B&&(M.setAttribute("hidden","until-found"),n.current==="css-transition"&&M.setAttribute(Hd.startingStyle,""))},[o,B,n,p]),C.useEffect(function(){const z=p.current;if(!z)return;function G(L){T.current=!0,v(!0),f(!0,mt(Gc,L))}return z.addEventListener("beforematch",G),()=>{z.removeEventListener("beforematch",G)}},[f,p,v]),C.useMemo(()=>({props:{hidden:B,id:u,ref:N}}),[B,u,N])}let IM=(function(e){return e.accordionPanelHeight="--accordion-panel-height",e.accordionPanelWidth="--accordion-panel-width",e})({});function Zh(e){const{enabled:t=!0,open:n,ref:r,onComplete:i}=e,o=Fe(i),a=YL(r,n,!1);C.useEffect(()=>{if(!t)return;const u=new AbortController;return a(o,u.signal),()=>{u.abort()}},[t,n,o,a])}const Loe=C.forwardRef(function(t,n){const{className:r,hiddenUntilFound:i,keepMounted:o,id:a,render:u,...c}=t,{hiddenUntilFound:f,keepMounted:h}=wC(),{abortControllerRef:p,animationTypeRef:m,height:y,mounted:b,onOpenChange:v,open:S,panelId:x,panelRef:_,runOnceAnimationsFinish:k,setDimensions:T,setHiddenUntilFound:A,setKeepMounted:D,setMounted:O,setOpen:$,setVisible:B,transitionDimensionRef:j,visible:N,width:M,setPanelIdState:z,transitionStatus:G}=Xy(),L=i??f,F=o??h;Ve(()=>{if(a)return z(a),()=>{z(void 0)}},[a,z]),Ve(()=>{A(L)},[A,L]),Ve(()=>{D(F)},[D,F]),Zh({open:S&&G==="idle",ref:_,onComplete(){S&&T({width:void 0,height:void 0})}});const{props:U}=DF({abortControllerRef:p,animationTypeRef:m,externalRef:n,height:y,hiddenUntilFound:L,id:a??x,keepMounted:F,mounted:b,onOpenChange:v,open:S,panelRef:_,runOnceAnimationsFinish:k,setDimensions:T,setMounted:O,setOpen:$,setVisible:B,transitionDimensionRef:j,visible:N,width:M}),{state:q,triggerId:W}=_C(),I=C.useMemo(()=>({...q,transitionStatus:G}),[q,G]),Y=dn("div",t,{state:I,ref:[n,_],props:[U,{"aria-labelledby":W,role:"region",style:{[IM.accordionPanelHeight]:y===void 0?"auto":`${y}px`,[IM.accordionPanelWidth]:M===void 0?"auto":`${M}px`}},c],stateAttributesMapping:TC});return F||L||!F&&b?Y:null}),Rd=0;class ss{constructor(){te(this,"currentId",Rd);te(this,"clear",()=>{this.currentId!==Rd&&(clearTimeout(this.currentId),this.currentId=Rd)});te(this,"disposeEffect",()=>this.clear)}static create(){return new ss}start(t,n){this.clear(),this.currentId=setTimeout(()=>{this.currentId=Rd,n()},t)}isStarted(){return this.currentId!==Rd}}function Ui(){const e=Tr(ss.create).current;return Yh(e.disposeEffect),e}let jM={},LM={},FM="";function Foe(e){if(typeof document>"u")return!1;const t=Pt(e);return jn(t).innerWidth-t.documentElement.clientWidth>0}function zoe(e){if(!(typeof CSS<"u"&&CSS.supports&&CSS.supports("scrollbar-gutter","stable"))||typeof document>"u")return!1;const n=Pt(e),r=n.documentElement,i=n.body,o=Pa(r)?r:i,a=o.style.overflowY,u=r.style.scrollbarGutter;r.style.scrollbarGutter="stable",o.style.overflowY="scroll";const c=o.offsetWidth;o.style.overflowY="hidden";const f=o.offsetWidth;return o.style.overflowY=a,r.style.scrollbarGutter=u,c===f}function Boe(e){const t=Pt(e),n=t.documentElement,r=t.body,i=Pa(n)?n:r,o={overflowY:i.style.overflowY,overflowX:i.style.overflowX};return Object.assign(i.style,{overflowY:"hidden",overflowX:"hidden"}),()=>{Object.assign(i.style,o)}}function Uoe(e){var m;const t=Pt(e),n=t.documentElement,r=t.body,i=jn(n);let o=0,a=0,u=!1;const c=un.create();if(nF&&(((m=i.visualViewport)==null?void 0:m.scale)??1)!==1)return()=>{};function f(){const y=i.getComputedStyle(n),b=i.getComputedStyle(r),x=(y.scrollbarGutter||"").includes("both-edges")?"stable both-edges":"stable";o=n.scrollTop,a=n.scrollLeft,jM={scrollbarGutter:n.style.scrollbarGutter,overflowY:n.style.overflowY,overflowX:n.style.overflowX},FM=n.style.scrollBehavior,LM={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};const _=n.scrollHeight>n.clientHeight,k=n.scrollWidth>n.clientWidth,T=y.overflowY==="scroll"||b.overflowY==="scroll",A=y.overflowX==="scroll"||b.overflowX==="scroll",D=Math.max(0,i.innerWidth-r.clientWidth),O=Math.max(0,i.innerHeight-r.clientHeight),$=parseFloat(b.marginTop)+parseFloat(b.marginBottom),B=parseFloat(b.marginLeft)+parseFloat(b.marginRight),j=Pa(n)?n:r;if(u=zoe(e),u){n.style.scrollbarGutter=x,j.style.overflowY="hidden",j.style.overflowX="hidden";return}Object.assign(n.style,{scrollbarGutter:x,overflowY:"hidden",overflowX:"hidden"}),(_||T)&&(n.style.overflowY="scroll"),(k||A)&&(n.style.overflowX="scroll"),Object.assign(r.style,{position:"relative",height:$||O?`calc(100dvh - ${$+O}px)`:"100dvh",width:B||D?`calc(100vw - ${B+D}px)`:"100vw",boxSizing:"border-box",overflow:"hidden",scrollBehavior:"unset"}),r.scrollTop=o,r.scrollLeft=a,n.setAttribute("data-base-ui-scroll-locked",""),n.style.scrollBehavior="unset"}function h(){Object.assign(n.style,jM),Object.assign(r.style,LM),u||(n.scrollTop=o,n.scrollLeft=a,n.removeAttribute("data-base-ui-scroll-locked"),n.style.scrollBehavior=FM)}function p(){h(),c.request(f)}return f(),i.addEventListener("resize",p),()=>{c.cancel(),h(),typeof i.removeEventListener=="function"&&i.removeEventListener("resize",p)}}class Hoe{constructor(){te(this,"lockCount",0);te(this,"restore",null);te(this,"timeoutLock",ss.create());te(this,"timeoutUnlock",ss.create());te(this,"release",()=>{this.lockCount-=1,this.lockCount===0&&this.restore&&this.timeoutUnlock.start(0,this.unlock)});te(this,"unlock",()=>{var t;this.lockCount===0&&this.restore&&((t=this.restore)==null||t.call(this),this.restore=null)})}acquire(t){return this.lockCount+=1,this.lockCount===1&&this.restore===null&&this.timeoutLock.start(0,()=>this.lock(t)),this.release}lock(t){if(this.lockCount===0||this.restore!==null)return;const r=Pt(t).documentElement,i=jn(r).getComputedStyle(r).overflowY;if(i==="hidden"||i==="clip"){this.restore=VL;return}const o=rF||!Foe(t);this.restore=o?Boe(t):Uoe(t)}}const Goe=new Hoe;function Voe(e=!0,t=null){Ve(()=>{if(e)return Goe.acquire(t)},[e,t])}function sr(e){const t=Tr(qoe,e).current;return t.next=e,Ve(t.effect),t}function qoe(e){const t={current:e,next:e,effect:()=>{t.current=t.next}};return t}function MF(){const e=new Map;return{emit(t,n){var r;(r=e.get(t))==null||r.forEach(i=>i(n))},on(t,n){e.has(t)||e.set(t,new Set),e.get(t).add(n)},off(t,n){var r;(r=e.get(t))==null||r.delete(n)}}}class jC{constructor(){te(this,"nodesRef",{current:[]});te(this,"events",MF())}addNode(t){this.nodesRef.current.push(t)}removeNode(t){const n=this.nodesRef.current.findIndex(r=>r===t);n!==-1&&this.nodesRef.current.splice(n,1)}}const OF=C.createContext(null),$F=C.createContext(null),ls=()=>{var e;return((e=C.useContext(OF))==null?void 0:e.id)||null},Ia=e=>{const t=C.useContext($F);return e??t};function PF(e){const t=ou(),n=Ia(e),r=ls();return Ve(()=>{if(!t)return;const i={id:t,parentId:r};return n==null||n.addNode(i),()=>{n==null||n.removeNode(i)}},[n,t,r]),t}function Yoe(e){const{children:t,id:n}=e,r=ls();return E.jsx(OF.Provider,{value:C.useMemo(()=>({id:n,parentId:r}),[n,r]),children:t})}function Woe(e){const{children:t,externalTree:n}=e,r=Tr(()=>n??new jC).current;return E.jsx($F.Provider,{value:r,children:t})}function Qc(e){return`data-base-ui-${e}`}function Ox(e,t,n){if(n&&!Yc(n))return 0;if(typeof e=="number")return e;if(typeof e=="function"){const r=e();return typeof r=="number"?r:r==null?void 0:r[t]}return e==null?void 0:e[t]}const Koe={clipPath:"inset(50%)",overflow:"hidden",whiteSpace:"nowrap",border:0,padding:0,width:1,height:1,margin:-1},NF={...Koe,position:"fixed",top:0,left:0},Zc=C.forwardRef(function(t,n){const[r,i]=C.useState();Ve(()=>{iF&&i("button")},[]);const o={tabIndex:0,role:r};return E.jsx("span",{...t,ref:n,style:NF,"aria-hidden":r?void 0:!0,...o,"data-base-ui-focus-guard":""})});let zM=0;function Gd(e,t={}){const{preventScroll:n=!1,cancelPrevious:r=!0,sync:i=!1}=t;r&&cancelAnimationFrame(zM);const o=()=>e==null?void 0:e.focus({preventScroll:n});i?o():zM=requestAnimationFrame(o)}const wc={inert:new WeakMap,"aria-hidden":new WeakMap,none:new WeakMap};function BM(e){return e==="inert"?wc.inert:e==="aria-hidden"?wc["aria-hidden"]:wc.none}let Um=new WeakSet,Hm={},$x=0;const IF=e=>e&&(e.host||IF(e.parentNode)),Xoe=(e,t)=>t.map(n=>{if(e.contains(n))return n;const r=IF(n);return e.contains(r)?r:null}).filter(n=>n!=null);function Qoe(e,t,n,r){const i="data-base-ui-inert",o=r?"inert":n?"aria-hidden":null,a=Xoe(t,e),u=new Set,c=new Set(a),f=[];Hm[i]||(Hm[i]=new WeakMap);const h=Hm[i];a.forEach(p),m(t),u.clear();function p(y){!y||u.has(y)||(u.add(y),y.parentNode&&p(y.parentNode))}function m(y){!y||c.has(y)||[].forEach.call(y.children,b=>{if($a(b)!=="script")if(u.has(b))m(b);else{const v=o?b.getAttribute(o):null,S=v!==null&&v!=="false",x=BM(o),_=(x.get(b)||0)+1,k=(h.get(b)||0)+1;x.set(b,_),h.set(b,k),f.push(b),_===1&&S&&Um.add(b),k===1&&b.setAttribute(i,""),!S&&o&&b.setAttribute(o,o==="inert"?"":"true")}})}return $x+=1,()=>{f.forEach(y=>{const b=BM(o),S=(b.get(y)||0)-1,x=(h.get(y)||0)-1;b.set(y,S),h.set(y,x),S||(!Um.has(y)&&o&&y.removeAttribute(o),Um.delete(y)),x||y.removeAttribute(i)}),$x-=1,$x||(wc.inert=new WeakMap,wc["aria-hidden"]=new WeakMap,wc.none=new WeakMap,Um=new WeakSet,Hm={})}}function Zoe(e,t=!1,n=!1){const r=Pt(e[0]).body;return Qoe(e.concat(Array.from(r.querySelectorAll("[aria-live]"))),r,t,n)}const jF=C.createContext(null),LF=()=>C.useContext(jF),Joe=Qc("portal");function ese(e={}){const{ref:t,container:n,componentProps:r=Tn,elementProps:i}=e,o=ou(),a=LF(),u=a==null?void 0:a.portalNode,[c,f]=C.useState(null),[h,p]=C.useState(null),m=Fe(S=>{S!==null&&p(S)}),y=C.useRef(null);Ve(()=>{if(n===null){y.current&&(y.current=null,p(null),f(null));return}if(o==null)return;const S=(n&&(AC(n)?n:n.current))??u??document.body;if(S==null){y.current&&(y.current=null,p(null),f(null));return}y.current!==S&&(y.current=S,p(null),f(S))},[n,u,o]);const b=dn("div",r,{ref:[t,m],props:[{id:o,[Joe]:""},i]});return{portalNode:h,portalSubtree:c&&b?yn.createPortal(b,c):null}}const tse=C.forwardRef(function(t,n){const{children:r,container:i,className:o,render:a,renderGuards:u,...c}=t,{portalNode:f,portalSubtree:h}=ese({container:i,ref:n,componentProps:t,elementProps:c}),p=C.useRef(null),m=C.useRef(null),y=C.useRef(null),b=C.useRef(null),[v,S]=C.useState(null),x=v==null?void 0:v.modal,_=v==null?void 0:v.open,k=typeof u=="boolean"?u:!!v&&!v.modal&&v.open&&!!f;C.useEffect(()=>{if(!f||x)return;function A(D){f&&D.relatedTarget&&xc(D)&&(D.type==="focusin"?OM:Coe)(f)}return f.addEventListener("focusin",A,!0),f.addEventListener("focusout",A,!0),()=>{f.removeEventListener("focusin",A,!0),f.removeEventListener("focusout",A,!0)}},[f,x]),C.useEffect(()=>{!f||_||OM(f)},[_,f]);const T=C.useMemo(()=>({beforeOutsideRef:p,afterOutsideRef:m,beforeInsideRef:y,afterInsideRef:b,portalNode:f,setFocusManagerState:S}),[f]);return E.jsxs(C.Fragment,{children:[h,E.jsxs(jF.Provider,{value:T,children:[k&&f&&E.jsx(Zc,{"data-type":"outside",ref:p,onFocus:A=>{var D;if(xc(A,f))(D=y.current)==null||D.focus();else{const O=v?v.domReference:null,$=kF(O);$==null||$.focus()}}}),k&&f&&E.jsx("span",{"aria-owns":f.id,style:gie}),f&&yn.createPortal(r,f),k&&f&&E.jsx(Zc,{"data-type":"outside",ref:m,onFocus:A=>{var D;if(xc(A,f))(D=b.current)==null||D.focus();else{const O=v?v.domReference:null,$=IC(O);$==null||$.focus(),v!=null&&v.closeOnFocusOut&&(v==null||v.onOpenChange(!1,mt(qc,A.nativeEvent)))}}})]})]})});function nse(e,t){const n=jn(e.target);return e instanceof n.KeyboardEvent?"keyboard":e instanceof n.FocusEvent?t||"keyboard":"pointerType"in e?e.pointerType||"keyboard":"touches"in e?"touch":e instanceof n.MouseEvent?t||(e.detail===0?"keyboard":"mouse"):""}const UM=20;let ua=[];function LC(){ua=ua.filter(e=>{var t;return(t=e.deref())==null?void 0:t.isConnected})}function rse(e){LC(),e&&$a(e)!=="body"&&(ua.push(new WeakRef(e)),ua.length>UM&&(ua=ua.slice(-UM)))}function Px(){var e;return LC(),(e=ua[ua.length-1])==null?void 0:e.deref()}function ise(e){if(!e)return null;const t=vf();return CF(e,t)?e:Qh(e,t)[0]||e}function ose(e){return!e||!e.isConnected?!1:typeof e.checkVisibility=="function"?e.checkVisibility():Ar(e).display!=="none"}function HM(e,t){var a;if(!t.current.includes("floating")&&!((a=e.getAttribute("role"))!=null&&a.includes("dialog")))return;const n=vf(),i=xoe(e,n).filter(u=>{const c=u.getAttribute("data-tabindex")||"";return CF(u,n)||u.hasAttribute("data-tabindex")&&!c.startsWith("-")}),o=e.getAttribute("tabindex");t.current.includes("floating")||i.length===0?o!=="0"&&e.setAttribute("tabindex","0"):(o!=="-1"||e.hasAttribute("data-tabindex")&&e.getAttribute("data-tabindex")!=="-1")&&(e.setAttribute("tabindex","-1"),e.setAttribute("data-tabindex","-1"))}function sse(e){const{context:t,children:n,disabled:r=!1,initialFocus:i=!0,returnFocus:o=!0,restoreFocus:a=!1,modal:u=!0,closeOnFocusOut:c=!0,openInteractionType:f="",nextFocusableElement:h,previousFocusableElement:p,beforeContentFocusGuardRef:m,externalTree:y}=e,b="rootStore"in t?t.rootStore:t,v=b.useState("open"),S=b.useState("domReferenceElement"),x=b.useState("floatingElement"),{events:_,dataRef:k}=b.context,T=Fe(()=>{var Z;return(Z=k.current.floatingContext)==null?void 0:Z.nodeId}),A=i===!1,D=Mw(S)&&A,O=C.useRef(["content"]),$=sr(i),B=sr(o),j=sr(f),N=Ia(y),M=LF(),z=C.useRef(null),G=C.useRef(null),L=C.useRef(!1),F=C.useRef(!1),U=C.useRef(!1),q=C.useRef(-1),W=C.useRef(""),I=C.useRef(""),Y=C.useRef(null),J=C.useRef(null),H=rs(Y,m,M==null?void 0:M.beforeInsideRef),ie=rs(J,M==null?void 0:M.afterInsideRef),re=Ui(),he=Ui(),ve=Ky(),Re=M!=null,ce=ly(x),je=Fe((Z=ce)=>Z?Qh(Z,vf()):[]),We=Fe(Z=>{const ne=je(Z);return O.current.map(()=>ne).filter(Boolean).flat()});C.useEffect(()=>{if(r||!u)return;function Z(xe){xe.key==="Tab"&&ht(ce,gi(Pt(ce)))&&je().length===0&&!D&&Gn(xe)}const ne=Pt(ce);return ne.addEventListener("keydown",Z),()=>{ne.removeEventListener("keydown",Z)}},[r,S,ce,u,O,D,je,We]),C.useEffect(()=>{if(r||!v)return;const Z=Pt(ce);function ne(){U.current=!1}function xe(Ce){const le=Yr(Ce),oe=ht(x,le)||ht(S,le)||ht(M==null?void 0:M.portalNode,le);U.current=!oe,I.current=Ce.pointerType||"keyboard",le!=null&&le.closest(`[${hie}]`)&&(F.current=!0)}function ge(){I.current="keyboard"}return Z.addEventListener("pointerdown",xe,!0),Z.addEventListener("pointerup",ne,!0),Z.addEventListener("pointercancel",ne,!0),Z.addEventListener("keydown",ge,!0),()=>{Z.removeEventListener("pointerdown",xe,!0),Z.removeEventListener("pointerup",ne,!0),Z.removeEventListener("pointercancel",ne,!0),Z.removeEventListener("keydown",ge,!0)}},[r,x,S,ce,v,M]),C.useEffect(()=>{if(r||!c)return;const Z=Pt(ce);function ne(){F.current=!0,he.start(0,()=>{F.current=!1})}function xe(me){const ae=Yr(me),Te=je().indexOf(ae);Te!==-1&&(q.current=Te)}function ge(me){const ae=me.relatedTarget,Oe=me.currentTarget,Te=Yr(me);queueMicrotask(()=>{const _e=T(),De=b.context.triggerElements,ue=(ae==null?void 0:ae.hasAttribute(Qc("focus-guard")))&&[Y.current,J.current,M==null?void 0:M.beforeInsideRef.current,M==null?void 0:M.afterInsideRef.current,M==null?void 0:M.beforeOutsideRef.current,M==null?void 0:M.afterOutsideRef.current,jo(p),jo(h)].includes(ae),Se=!(ht(S,ae)||ht(x,ae)||ht(ae,x)||ht(M==null?void 0:M.portalNode,ae)||ae!=null&&De.hasElement(ae)||De.hasMatchingElement(ke=>ht(ke,ae))||ue||N&&(Ll(N.nodesRef.current,_e).find(ke=>{var Pe,Le;return ht((Pe=ke.context)==null?void 0:Pe.elements.floating,ae)||ht((Le=ke.context)==null?void 0:Le.elements.domReference,ae)})||TM(N.nodesRef.current,_e).find(ke=>{var Pe,Le,st;return[(Pe=ke.context)==null?void 0:Pe.elements.floating,ly((Le=ke.context)==null?void 0:Le.elements.floating)].includes(ae)||((st=ke.context)==null?void 0:st.elements.domReference)===ae})));if(Oe===S&&ce&&HM(ce,O),a&&Oe!==S&&!ose(Te)&&gi(Z)===Z.body){if(Jt(ce)&&(ce.focus(),a==="popup")){ve.request(()=>{ce.focus()});return}const ke=q.current,Pe=je(),Le=Pe[ke]||Pe[Pe.length-1]||ce;Jt(Le)&&Le.focus()}if(k.current.insideReactTree){k.current.insideReactTree=!1;return}(D||!u)&&ae&&Se&&!F.current&&(D||ae!==Px())&&(L.current=!0,b.setOpen(!1,mt(qc,me)))})}function Ce(){U.current||(k.current.insideReactTree=!0,re.start(0,()=>{k.current.insideReactTree=!1}))}const le=Jt(S)?S:null,oe=[];if(!(!x&&!le))return le&&(le.addEventListener("focusout",ge),le.addEventListener("pointerdown",ne),oe.push(()=>{le.removeEventListener("focusout",ge),le.removeEventListener("pointerdown",ne)})),x&&(x.addEventListener("focusin",xe),x.addEventListener("focusout",ge),M&&(x.addEventListener("focusout",Ce,!0),oe.push(()=>{x.removeEventListener("focusout",Ce,!0)})),oe.push(()=>{x.removeEventListener("focusin",xe),x.removeEventListener("focusout",ge)})),()=>{oe.forEach(me=>{me()})}},[r,S,x,ce,u,N,M,b,c,a,je,D,T,O,k,re,he,ve,h,p]),C.useEffect(()=>{var Ce,le,oe;if(r||!x||!v)return;const Z=Array.from(((Ce=M==null?void 0:M.portalNode)==null?void 0:Ce.querySelectorAll(`[${Qc("portal")}]`))||[]),xe=(oe=(le=(N?TM(N.nodesRef.current,T()):[]).find(me=>{var ae;return Mw(((ae=me.context)==null?void 0:ae.elements.domReference)||null)}))==null?void 0:le.context)==null?void 0:oe.elements.domReference,ge=[x,xe,...Z,z.current,G.current,Y.current,J.current,M==null?void 0:M.beforeOutsideRef.current,M==null?void 0:M.afterOutsideRef.current,jo(p),jo(h),D?S:null].filter(me=>me!=null);return Zoe(ge,u||D)},[v,r,S,x,u,O,M,D,N,T,h,p]),Ve(()=>{if(!v||r||!Jt(ce))return;const Z=Pt(ce),ne=gi(Z);queueMicrotask(()=>{const xe=We(ce),ge=$.current,Ce=typeof ge=="function"?ge(j.current||""):ge;if(Ce===void 0||Ce===!1)return;let le;Ce===!0||Ce===null?le=xe[0]||ce:le=jo(Ce),le=le||xe[0]||ce,!ht(ce,ne)&&Gd(le,{preventScroll:le===ce})})},[r,v,ce,A,We,$,j]),Ve(()=>{if(r||!ce)return;const Z=Pt(ce),ne=gi(Z);rse(ne);function xe(le){if(le.open||(W.current=nse(le.nativeEvent,I.current)),le.reason===qr&&le.nativeEvent.type==="mouseleave"&&(L.current=!0),le.reason===CC)if(le.nested)L.current=!1;else if(uF(le.nativeEvent)||cF(le.nativeEvent))L.current=!1;else{let oe=!1;document.createElement("div").focus({get preventScroll(){return oe=!0,!1}}),oe?L.current=!1:L.current=!0}}_.on("openchange",xe);const ge=Z.createElement("span");ge.setAttribute("tabindex","-1"),ge.setAttribute("aria-hidden","true"),Object.assign(ge.style,NF),Re&&S&&S.insertAdjacentElement("afterend",ge);function Ce(){const le=B.current;let oe=typeof le=="function"?le(W.current):le;if(oe===void 0||oe===!1)return null;if(oe===null&&(oe=!0),typeof oe=="boolean"){const ae=S||Px();return ae&&ae.isConnected?ae:ge}const me=S||Px()||ge;return jo(oe)||me}return()=>{_.off("openchange",xe);const le=gi(Z),oe=ht(x,le)||N&&Ll(N.nodesRef.current,T(),!1).some(ae=>{var Oe;return ht((Oe=ae.context)==null?void 0:Oe.elements.floating,le)}),me=Ce();queueMicrotask(()=>{const ae=ise(me),Oe=typeof B.current!="boolean";B.current&&!L.current&&Jt(ae)&&(!(!Oe&&ae!==le&&le!==Z.body)||oe)&&ae.focus({preventScroll:!0}),ge.remove(),L.current=!1})}},[r,x,ce,B,k,_,N,Re,S,T]),Ve(()=>{if(!nF||v||!x)return;const Z=gi(Pt(x));!Jt(Z)||!tb(Z)||ht(x,Z)&&Z.blur()},[v,x]),Ve(()=>{if(!(r||!M))return M.setFocusManagerState({modal:u,closeOnFocusOut:c,open:v,onOpenChange:b.setOpen,domReference:S}),()=>{M.setFocusManagerState(null)}},[r,M,u,v,b,c,S]),Ve(()=>{if(!(r||!ce))return HM(ce,O),()=>{queueMicrotask(LC)}},[r,ce,O]);const X=!r&&(u?!D:!0)&&(Re||u);return E.jsxs(C.Fragment,{children:[X&&E.jsx(Zc,{"data-type":"inside",ref:H,onFocus:Z=>{var ne;if(u){const xe=We();Gd(xe[xe.length-1])}else if(M!=null&&M.portalNode)if(L.current=!1,xc(Z,M.portalNode)){const xe=IC(S);xe==null||xe.focus()}else(ne=jo(p??M.beforeOutsideRef))==null||ne.focus()}}),n,X&&E.jsx(Zc,{"data-type":"inside",ref:ie,onFocus:Z=>{var ne;if(u)Gd(We()[0]);else if(M!=null&&M.portalNode)if(c&&(L.current=!0),xc(Z,M.portalNode)){const xe=kF(S);xe==null||xe.focus()}else(ne=jo(h??M.afterOutsideRef))==null||ne.focus()}})]})}function FF(e,t={}){const n="rootStore"in e?e.rootStore:e,r=n.context.dataRef,{enabled:i=!0,event:o="click",toggle:a=!0,ignoreMouse:u=!1,stickIfOpen:c=!0,touchOpenDelay:f=0,reason:h=Vc}=t,p=C.useRef(void 0),m=Ky(),y=Ui(),b=C.useMemo(()=>({onPointerDown(v){p.current=v.pointerType},onMouseDown(v){const S=p.current,x=v.nativeEvent,_=n.select("open");if(v.button!==0||o==="click"||Yc(S,!0)&&u)return;const k=r.current.openEvent,T=k==null?void 0:k.type,A=n.select("domReferenceElement")!==v.currentTarget,D=_&&A||!(_&&a&&(!(k&&c)||T==="click"||T==="mousedown"));if(tb(x.target)){const $=mt(h,x,x.target);D&&S==="touch"&&f>0?y.start(f,()=>{n.setOpen(!0,$)}):n.setOpen(D,$);return}const O=v.currentTarget;m.request(()=>{const $=mt(h,x,O);D&&S==="touch"&&f>0?y.start(f,()=>{n.setOpen(!0,$)}):n.setOpen(D,$)})},onClick(v){if(o==="mousedown-only")return;const S=p.current;if(o==="mousedown"&&S){p.current=void 0;return}if(Yc(S,!0)&&u)return;const x=n.select("open"),_=r.current.openEvent,k=n.select("domReferenceElement")!==v.currentTarget,T=x&&k||!(x&&a&&(!(_&&c)||fF(_))),A=mt(h,v.nativeEvent,v.currentTarget);T&&S==="touch"&&f>0?y.start(f,()=>{n.setOpen(!0,A)}):n.setOpen(T,A)},onKeyDown(){p.current=void 0}}),[r,o,u,n,c,a,m,y,f,h]);return C.useMemo(()=>i?{reference:b}:Tn,[i,b])}function GM(e,t,n){let{reference:r,floating:i}=e;const o=Si(t),a=NC(t),u=PC(a),c=Xr(t),f=o==="y",h=r.x+r.width/2-i.width/2,p=r.y+r.height/2-i.height/2,m=r[u]/2-i[u]/2;let y;switch(c){case"top":y={x:h,y:r.y-i.height};break;case"bottom":y={x:h,y:r.y+r.height};break;case"right":y={x:r.x+r.width,y:p};break;case"left":y={x:r.x-i.width,y:p};break;default:y={x:r.x,y:r.y}}switch(Na(t)){case"start":y[a]-=m*(n&&f?-1:1);break;case"end":y[a]+=m*(n&&f?-1:1);break}return y}async function ase(e,t){var n;t===void 0&&(t={});const{x:r,y:i,platform:o,rects:a,elements:u,strategy:c}=e,{boundary:f="clippingAncestors",rootBoundary:h="viewport",elementContext:p="floating",altBoundary:m=!1,padding:y=0}=os(t,e),b=dF(y),S=u[m?p==="floating"?"reference":"floating":p],x=cy(await o.getClippingRect({element:(n=await(o.isElement==null?void 0:o.isElement(S)))==null||n?S:S.contextElement||await(o.getDocumentElement==null?void 0:o.getDocumentElement(u.floating)),boundary:f,rootBoundary:h,strategy:c})),_=p==="floating"?{x:r,y:i,width:a.floating.width,height:a.floating.height}:a.reference,k=await(o.getOffsetParent==null?void 0:o.getOffsetParent(u.floating)),T=await(o.isElement==null?void 0:o.isElement(k))?await(o.getScale==null?void 0:o.getScale(k))||{x:1,y:1}:{x:1,y:1},A=cy(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:u,rect:_,offsetParent:k,strategy:c}):_);return{top:(x.top-A.top+b.top)/T.y,bottom:(A.bottom-x.bottom+b.bottom)/T.y,left:(x.left-A.left+b.left)/T.x,right:(A.right-x.right+b.right)/T.x}}const lse=50,use=async(e,t,n)=>{const{placement:r="bottom",strategy:i="absolute",middleware:o=[],platform:a}=n,u=a.detectOverflow?a:{...a,detectOverflow:ase},c=await(a.isRTL==null?void 0:a.isRTL(t));let f=await a.getElementRects({reference:e,floating:t,strategy:i}),{x:h,y:p}=GM(f,r,c),m=r,y=0;const b={};for(let v=0;v<o.length;v++){const S=o[v];if(!S)continue;const{name:x,fn:_}=S,{x:k,y:T,data:A,reset:D}=await _({x:h,y:p,initialPlacement:r,placement:m,strategy:i,middlewareData:b,rects:f,platform:u,elements:{reference:e,floating:t}});h=k??h,p=T??p,b[x]={...b[x],...A},D&&y<lse&&(y++,typeof D=="object"&&(D.placement&&(m=D.placement),D.rects&&(f=D.rects===!0?await a.getElementRects({reference:e,floating:t,strategy:i}):D.rects),{x:h,y:p}=GM(f,m,c)),v=-1)}return{x:h,y:p,placement:m,strategy:i,middlewareData:b}},cse=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:i,middlewareData:o,rects:a,initialPlacement:u,platform:c,elements:f}=t,{mainAxis:h=!0,crossAxis:p=!0,fallbackPlacements:m,fallbackStrategy:y="bestFit",fallbackAxisSideDirection:b="none",flipAlignment:v=!0,...S}=os(e,t);if((n=o.arrow)!=null&&n.alignmentOffset)return{};const x=Xr(i),_=Si(u),k=Xr(u)===u,T=await(c.isRTL==null?void 0:c.isRTL(f.floating)),A=m||(k||!v?[uy(u)]:eoe(u)),D=b!=="none";!m&&D&&A.push(...ioe(u,v,b,T));const O=[u,...A],$=await c.detectOverflow(t,S),B=[];let j=((r=o.flip)==null?void 0:r.overflows)||[];if(h&&B.push($[x]),p){const G=Jie(i,a,T);B.push($[G[0]],$[G[1]])}if(j=[...j,{placement:i,overflows:B}],!B.every(G=>G<=0)){var N,M;const G=(((N=o.flip)==null?void 0:N.index)||0)+1,L=O[G];if(L&&(!(p==="alignment"?_!==Si(L):!1)||j.every(q=>Si(q.placement)===_?q.overflows[0]>0:!0)))return{data:{index:G,overflows:j},reset:{placement:L}};let F=(M=j.filter(U=>U.overflows[0]<=0).sort((U,q)=>U.overflows[1]-q.overflows[1])[0])==null?void 0:M.placement;if(!F)switch(y){case"bestFit":{var z;const U=(z=j.filter(q=>{if(D){const W=Si(q.placement);return W===_||W==="y"}return!0}).map(q=>[q.placement,q.overflows.filter(W=>W>0).reduce((W,I)=>W+I,0)]).sort((q,W)=>q[1]-W[1])[0])==null?void 0:z[0];U&&(F=U);break}case"initialPlacement":F=u;break}if(i!==F)return{reset:{placement:F}}}return{}}}};function VM(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function qM(e){return Qie.some(t=>e[t]>=0)}const fse=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n,platform:r}=t,{strategy:i="referenceHidden",...o}=os(e,t);switch(i){case"referenceHidden":{const a=await r.detectOverflow(t,{...o,elementContext:"reference"}),u=VM(a,n.reference);return{data:{referenceHiddenOffsets:u,referenceHidden:qM(u)}}}case"escaped":{const a=await r.detectOverflow(t,{...o,altBoundary:!0}),u=VM(a,n.floating);return{data:{escapedOffsets:u,escaped:qM(u)}}}default:return{}}}}},zF=new Set(["left","top"]);async function dse(e,t){const{placement:n,platform:r,elements:i}=e,o=await(r.isRTL==null?void 0:r.isRTL(i.floating)),a=Xr(n),u=Na(n),c=Si(n)==="y",f=zF.has(a)?-1:1,h=o&&c?-1:1,p=os(t,e);let{mainAxis:m,crossAxis:y,alignmentAxis:b}=typeof p=="number"?{mainAxis:p,crossAxis:0,alignmentAxis:null}:{mainAxis:p.mainAxis||0,crossAxis:p.crossAxis||0,alignmentAxis:p.alignmentAxis};return u&&typeof b=="number"&&(y=u==="end"?b*-1:b),c?{x:y*h,y:m*f}:{x:m*f,y:y*h}}const hse=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:i,y:o,placement:a,middlewareData:u}=t,c=await dse(t,e);return a===((n=u.offset)==null?void 0:n.placement)&&(r=u.arrow)!=null&&r.alignmentOffset?{}:{x:i+c.x,y:o+c.y,data:{...c,placement:a}}}}},pse=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:i,platform:o}=t,{mainAxis:a=!0,crossAxis:u=!1,limiter:c={fn:x=>{let{x:_,y:k}=x;return{x:_,y:k}}},...f}=os(e,t),h={x:n,y:r},p=await o.detectOverflow(t,f),m=Si(Xr(i)),y=$C(m);let b=h[y],v=h[m];if(a){const x=y==="y"?"top":"left",_=y==="y"?"bottom":"right",k=b+p[x],T=b-p[_];b=Ow(k,b,T)}if(u){const x=m==="y"?"top":"left",_=m==="y"?"bottom":"right",k=v+p[x],T=v-p[_];v=Ow(k,v,T)}const S=c.fn({...t,[y]:b,[m]:v});return{...S,data:{x:S.x-n,y:S.y-r,enabled:{[y]:a,[m]:u}}}}}},mse=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:i,rects:o,middlewareData:a}=t,{offset:u=0,mainAxis:c=!0,crossAxis:f=!0}=os(e,t),h={x:n,y:r},p=Si(i),m=$C(p);let y=h[m],b=h[p];const v=os(u,t),S=typeof v=="number"?{mainAxis:v,crossAxis:0}:{mainAxis:0,crossAxis:0,...v};if(c){const k=m==="y"?"height":"width",T=o.reference[m]-o.floating[k]+S.mainAxis,A=o.reference[m]+o.reference[k]-S.mainAxis;y<T?y=T:y>A&&(y=A)}if(f){var x,_;const k=m==="y"?"width":"height",T=zF.has(Xr(i)),A=o.reference[p]-o.floating[k]+(T&&((x=a.offset)==null?void 0:x[p])||0)+(T?0:S.crossAxis),D=o.reference[p]+o.reference[k]+(T?0:((_=a.offset)==null?void 0:_[p])||0)-(T?S.crossAxis:0);b<A?b=A:b>D&&(b=D)}return{[m]:y,[p]:b}}}},gse=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:i,rects:o,platform:a,elements:u}=t,{apply:c=()=>{},...f}=os(e,t),h=await a.detectOverflow(t,f),p=Xr(i),m=Na(i),y=Si(i)==="y",{width:b,height:v}=o.floating;let S,x;p==="top"||p==="bottom"?(S=p,x=m===(await(a.isRTL==null?void 0:a.isRTL(u.floating))?"start":"end")?"left":"right"):(x=p,S=m==="end"?"top":"bottom");const _=v-h.top-h.bottom,k=b-h.left-h.right,T=Wc(v-h[S],_),A=Wc(b-h[x],k),D=!t.middlewareData.shift;let O=T,$=A;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&($=k),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(O=_),D&&!m){const j=Wr(h.left,0),N=Wr(h.right,0),M=Wr(h.top,0),z=Wr(h.bottom,0);y?$=b-2*(j!==0||N!==0?j+N:Wr(h.left,h.right)):O=v-2*(M!==0||z!==0?M+z:Wr(h.top,h.bottom))}await c({...t,availableWidth:$,availableHeight:O});const B=await a.getDimensions(u.floating);return b!==B.width||v!==B.height?{reset:{rects:!0}}:{}}}};function BF(e){const t=Ar(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const i=Jt(e),o=i?e.offsetWidth:n,a=i?e.offsetHeight:r,u=Kc(n)!==o||Kc(r)!==a;return u&&(n=o,r=a),{width:n,height:r,$:u}}function FC(e){return It(e)?e:e.contextElement}function Sc(e){const t=FC(e);if(!Jt(t))return so(1);const n=t.getBoundingClientRect(),{width:r,height:i,$:o}=BF(t);let a=(o?Kc(n.width):n.width)/r,u=(o?Kc(n.height):n.height)/i;return(!a||!Number.isFinite(a))&&(a=1),(!u||!Number.isFinite(u))&&(u=1),{x:a,y:u}}const yse=so(0);function UF(e){const t=jn(e);return!Jy()||!t.visualViewport?yse:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function bse(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==jn(e)?!1:t}function ql(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const i=e.getBoundingClientRect(),o=FC(e);let a=so(1);t&&(r?It(r)&&(a=Sc(r)):a=Sc(e));const u=bse(o,n,r)?UF(o):so(0);let c=(i.left+u.x)/a.x,f=(i.top+u.y)/a.y,h=i.width/a.x,p=i.height/a.y;if(o){const m=jn(o),y=r&&It(r)?jn(r):r;let b=m,v=Tw(b);for(;v&&r&&y!==b;){const S=Sc(v),x=v.getBoundingClientRect(),_=Ar(v),k=x.left+(v.clientLeft+parseFloat(_.paddingLeft))*S.x,T=x.top+(v.clientTop+parseFloat(_.paddingTop))*S.y;c*=S.x,f*=S.y,h*=S.x,p*=S.y,c+=k,f+=T,b=jn(v),v=Tw(b)}}return cy({width:h,height:p,x:c,y:f})}function nb(e,t){const n=eb(e).scrollLeft;return t?t.left+n:ql(uo(e)).left+n}function HF(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-nb(e,n),i=n.top+t.scrollTop;return{x:r,y:i}}function vse(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e;const o=i==="fixed",a=uo(r),u=t?Zy(t.floating):!1;if(r===a||u&&o)return n;let c={scrollLeft:0,scrollTop:0},f=so(1);const h=so(0),p=Jt(r);if((p||!p&&!o)&&(($a(r)!=="body"||Pa(a))&&(c=eb(r)),p)){const y=ql(r);f=Sc(r),h.x=y.x+r.clientLeft,h.y=y.y+r.clientTop}const m=a&&!p&&!o?HF(a,c):so(0);return{width:n.width*f.x,height:n.height*f.y,x:n.x*f.x-c.scrollLeft*f.x+h.x+m.x,y:n.y*f.y-c.scrollTop*f.y+h.y+m.y}}function xse(e){return Array.from(e.getClientRects())}function wse(e){const t=uo(e),n=eb(e),r=e.ownerDocument.body,i=Wr(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),o=Wr(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let a=-n.scrollLeft+nb(e);const u=-n.scrollTop;return Ar(r).direction==="rtl"&&(a+=Wr(t.clientWidth,r.clientWidth)-i),{width:i,height:o,x:a,y:u}}const YM=25;function Sse(e,t){const n=jn(e),r=uo(e),i=n.visualViewport;let o=r.clientWidth,a=r.clientHeight,u=0,c=0;if(i){o=i.width,a=i.height;const h=Jy();(!h||h&&t==="fixed")&&(u=i.offsetLeft,c=i.offsetTop)}const f=nb(r);if(f<=0){const h=r.ownerDocument,p=h.body,m=getComputedStyle(p),y=h.compatMode==="CSS1Compat"&&parseFloat(m.marginLeft)+parseFloat(m.marginRight)||0,b=Math.abs(r.clientWidth-p.clientWidth-y);b<=YM&&(o-=b)}else f<=YM&&(o+=f);return{width:o,height:a,x:u,y:c}}function Cse(e,t){const n=ql(e,!0,t==="fixed"),r=n.top+e.clientTop,i=n.left+e.clientLeft,o=Jt(e)?Sc(e):so(1),a=e.clientWidth*o.x,u=e.clientHeight*o.y,c=i*o.x,f=r*o.y;return{width:a,height:u,x:c,y:f}}function WM(e,t,n){let r;if(t==="viewport")r=Sse(e,n);else if(t==="document")r=wse(uo(e));else if(It(t))r=Cse(t,n);else{const i=UF(e);r={x:t.x-i.x,y:t.y-i.y,width:t.width,height:t.height}}return cy(r)}function GF(e,t){const n=ao(e);return n===t||!It(n)||oo(n)?!1:Ar(n).position==="fixed"||GF(n,t)}function Ese(e,t){const n=t.get(e);if(n)return n;let r=ma(e,[],!1).filter(u=>It(u)&&$a(u)!=="body"),i=null;const o=Ar(e).position==="fixed";let a=o?ao(e):e;for(;It(a)&&!oo(a);){const u=Ar(a),c=DC(a);!c&&u.position==="fixed"&&(i=null),(o?!c&&!i:!c&&u.position==="static"&&!!i&&(i.position==="absolute"||i.position==="fixed")||Pa(a)&&!c&&GF(e,a))?r=r.filter(h=>h!==a):i=u,a=ao(a)}return t.set(e,r),r}function kse(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e;const a=[...n==="clippingAncestors"?Zy(t)?[]:Ese(t,this._c):[].concat(n),r],u=WM(t,a[0],i);let c=u.top,f=u.right,h=u.bottom,p=u.left;for(let m=1;m<a.length;m++){const y=WM(t,a[m],i);c=Wr(y.top,c),f=Wc(y.right,f),h=Wc(y.bottom,h),p=Wr(y.left,p)}return{width:f-p,height:h-c,x:p,y:c}}function Rse(e){const{width:t,height:n}=BF(e);return{width:t,height:n}}function _se(e,t,n){const r=Jt(t),i=uo(t),o=n==="fixed",a=ql(e,!0,o,t);let u={scrollLeft:0,scrollTop:0};const c=so(0);function f(){c.x=nb(i)}if(r||!r&&!o)if(($a(t)!=="body"||Pa(i))&&(u=eb(t)),r){const y=ql(t,!0,o,t);c.x=y.x+t.clientLeft,c.y=y.y+t.clientTop}else i&&f();o&&!r&&i&&f();const h=i&&!r&&!o?HF(i,u):so(0),p=a.left+u.scrollLeft-c.x-h.x,m=a.top+u.scrollTop-c.y-h.y;return{x:p,y:m,width:a.width,height:a.height}}function Nx(e){return Ar(e).position==="static"}function KM(e,t){if(!Jt(e)||Ar(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return uo(e)===n&&(n=n.ownerDocument.body),n}function VF(e,t){const n=jn(e);if(Zy(e))return n;if(!Jt(e)){let i=ao(e);for(;i&&!oo(i);){if(It(i)&&!Nx(i))return i;i=ao(i)}return n}let r=KM(e,t);for(;r&&Lie(r)&&Nx(r);)r=KM(r,t);return r&&oo(r)&&Nx(r)&&!DC(r)?n:r||Bie(e)||n}const Tse=async function(e){const t=this.getOffsetParent||VF,n=this.getDimensions,r=await n(e.floating);return{reference:_se(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function Ase(e){return Ar(e).direction==="rtl"}const Dse={convertOffsetParentRelativeRectToViewportRelativeRect:vse,getDocumentElement:uo,getClippingRect:kse,getOffsetParent:VF,getElementRects:Tse,getClientRects:xse,getDimensions:Rse,getScale:Sc,isElement:It,isRTL:Ase};function qF(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Mse(e,t){let n=null,r;const i=uo(e);function o(){var u;clearTimeout(r),(u=n)==null||u.disconnect(),n=null}function a(u,c){u===void 0&&(u=!1),c===void 0&&(c=1),o();const f=e.getBoundingClientRect(),{left:h,top:p,width:m,height:y}=f;if(u||t(),!m||!y)return;const b=uc(p),v=uc(i.clientWidth-(h+m)),S=uc(i.clientHeight-(p+y)),x=uc(h),k={rootMargin:-b+"px "+-v+"px "+-S+"px "+-x+"px",threshold:Wr(0,Wc(1,c))||1};let T=!0;function A(D){const O=D[0].intersectionRatio;if(O!==c){if(!T)return a();O?a(!1,O):r=setTimeout(()=>{a(!1,1e-7)},1e3)}O===1&&!qF(f,e.getBoundingClientRect())&&a(),T=!1}try{n=new IntersectionObserver(A,{...k,root:i.ownerDocument})}catch{n=new IntersectionObserver(A,k)}n.observe(e)}return a(!0),o}function XM(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:i=!0,ancestorResize:o=!0,elementResize:a=typeof ResizeObserver=="function",layoutShift:u=typeof IntersectionObserver=="function",animationFrame:c=!1}=r,f=FC(e),h=i||o?[...f?ma(f):[],...t?ma(t):[]]:[];h.forEach(x=>{i&&x.addEventListener("scroll",n,{passive:!0}),o&&x.addEventListener("resize",n)});const p=f&&u?Mse(f,n):null;let m=-1,y=null;a&&(y=new ResizeObserver(x=>{let[_]=x;_&&_.target===f&&y&&t&&(y.unobserve(t),cancelAnimationFrame(m),m=requestAnimationFrame(()=>{var k;(k=y)==null||k.observe(t)})),n()}),f&&!c&&y.observe(f),t&&y.observe(t));let b,v=c?ql(e):null;c&&S();function S(){const x=ql(e);v&&!qF(v,x)&&n(),v=x,b=requestAnimationFrame(S)}return n(),()=>{var x;h.forEach(_=>{i&&_.removeEventListener("scroll",n),o&&_.removeEventListener("resize",n)}),p==null||p(),(x=y)==null||x.disconnect(),y=null,c&&cancelAnimationFrame(b)}}const Ose=hse,$se=pse,Pse=cse,Nse=gse,Ise=fse,jse=mse,Lse=(e,t,n)=>{const r=new Map,i={platform:Dse,...n},o={...i.platform,_c:r};return use(e,t,{...i,platform:o})};var Fse=typeof document<"u",zse=function(){},Sg=Fse?C.useLayoutEffect:zse;function my(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(!my(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;){const o=i[r];if(!(o==="_owner"&&e.$$typeof)&&!my(e[o],t[o]))return!1}return!0}return e!==e&&t!==t}function YF(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function QM(e,t){const n=YF(e);return Math.round(t*n)/n}function Ix(e){const t=C.useRef(e);return Sg(()=>{t.current=e}),t}function Bse(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:i,elements:{reference:o,floating:a}={},transform:u=!0,whileElementsMounted:c,open:f}=e,[h,p]=C.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[m,y]=C.useState(r);my(m,r)||y(r);const[b,v]=C.useState(null),[S,x]=C.useState(null),_=C.useCallback(q=>{q!==D.current&&(D.current=q,v(q))},[]),k=C.useCallback(q=>{q!==O.current&&(O.current=q,x(q))},[]),T=o||b,A=a||S,D=C.useRef(null),O=C.useRef(null),$=C.useRef(h),B=c!=null,j=Ix(c),N=Ix(i),M=Ix(f),z=C.useCallback(()=>{if(!D.current||!O.current)return;const q={placement:t,strategy:n,middleware:m};N.current&&(q.platform=N.current),Lse(D.current,O.current,q).then(W=>{const I={...W,isPositioned:M.current!==!1};G.current&&!my($.current,I)&&($.current=I,yn.flushSync(()=>{p(I)}))})},[m,t,n,N,M]);Sg(()=>{f===!1&&$.current.isPositioned&&($.current.isPositioned=!1,p(q=>({...q,isPositioned:!1})))},[f]);const G=C.useRef(!1);Sg(()=>(G.current=!0,()=>{G.current=!1}),[]),Sg(()=>{if(T&&(D.current=T),A&&(O.current=A),T&&A){if(j.current)return j.current(T,A,z);z()}},[T,A,z,j,B]);const L=C.useMemo(()=>({reference:D,floating:O,setReference:_,setFloating:k}),[_,k]),F=C.useMemo(()=>({reference:T,floating:A}),[T,A]),U=C.useMemo(()=>{const q={position:n,left:0,top:0};if(!F.floating)return q;const W=QM(F.floating,h.x),I=QM(F.floating,h.y);return u?{...q,transform:"translate("+W+"px, "+I+"px)",...YF(F.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:W,top:I}},[n,u,F.floating,h.x,h.y]);return C.useMemo(()=>({...h,update:z,refs:L,elements:F,floatingStyles:U}),[h,z,L,F,U])}const Use=(e,t)=>{const n=Ose(e);return{name:n.name,fn:n.fn,options:[e,t]}},Hse=(e,t)=>{const n=$se(e);return{name:n.name,fn:n.fn,options:[e,t]}},Gse=(e,t)=>({fn:jse(e).fn,options:[e,t]}),Vse=(e,t)=>{const n=Pse(e);return{name:n.name,fn:n.fn,options:[e,t]}},qse=(e,t)=>{const n=Nse(e);return{name:n.name,fn:n.fn,options:[e,t]}},Yse=(e,t)=>{const n=Ise(e);return{name:n.name,fn:n.fn,options:[e,t]}},Wse={intentional:"onClick",sloppy:"onPointerDown"};function Kse(e){return{escapeKey:typeof e=="boolean"?e:(e==null?void 0:e.escapeKey)??!1,outsidePress:typeof e=="boolean"?e:(e==null?void 0:e.outsidePress)??!0}}function Xse(e,t={}){const n="rootStore"in e?e.rootStore:e,r=n.useState("open"),i=n.useState("floatingElement"),o=n.useState("referenceElement"),a=n.useState("domReferenceElement"),{onOpenChange:u,dataRef:c}=n.context,{enabled:f=!0,escapeKey:h=!0,outsidePress:p=!0,outsidePressEvent:m="sloppy",referencePress:y=!1,referencePressEvent:b="sloppy",ancestorScroll:v=!1,bubbles:S,externalTree:x}=t,_=Ia(x),k=Fe(typeof p=="function"?p:()=>!1),T=typeof p=="function"?k:p,A=C.useRef(!1),{escapeKey:D,outsidePress:O}=Kse(S),$=C.useRef(null),B=Ui(),j=Ui(),N=Fe(()=>{j.clear(),c.current.insideReactTree=!1}),M=C.useRef(!1),z=C.useRef(""),G=Fe(X=>{z.current=X.pointerType}),L=Fe(()=>{const X=z.current,Z=X==="pen"||!X?"mouse":X,ne=typeof m=="function"?m():m;return typeof ne=="string"?ne:ne[Z]}),F=Fe(X=>{var Ce;if(!r||!f||!h||X.key!=="Escape"||M.current)return;const Z=(Ce=c.current.floatingContext)==null?void 0:Ce.nodeId,ne=_?Ll(_.nodesRef.current,Z):[];if(!D&&ne.length>0){let le=!0;if(ne.forEach(oe=>{var me;(me=oe.context)!=null&&me.open&&!oe.context.dataRef.current.__escapeKeyBubbles&&(le=!1)}),!le)return}const xe=Xie(X)?X.nativeEvent:X,ge=mt(EC,xe);n.setOpen(!1,ge),!D&&!ge.isPropagationAllowed&&X.stopPropagation()}),U=Fe(X=>{const Z=L();return Z==="intentional"&&X.type!=="click"||Z==="sloppy"&&X.type==="click"}),q=Fe(()=>{c.current.insideReactTree=!0,j.start(0,N)}),W=Fe((X,Z=!1)=>{var Oe;if(U(X)){N();return}if(c.current.insideReactTree){N();return}if(L()==="intentional"&&Z||typeof T=="function"&&!T(X))return;const ne=Yr(X),xe=`[${Qc("inert")}]`,ge=Pt(n.select("floatingElement")).querySelectorAll(xe),Ce=n.context.triggerElements;if(ne&&(Ce.hasElement(ne)||Ce.hasMatchingElement(Te=>ht(Te,ne))))return;let le=It(ne)?ne:null;for(;le&&!oo(le);){const Te=ao(le);if(oo(Te)||!It(Te))break;le=Te}if(ge.length&&It(ne)&&!Wie(ne)&&!ht(ne,n.select("floatingElement"))&&Array.from(ge).every(Te=>!ht(le,Te)))return;if(Jt(ne)&&!("touches"in X)){const Te=oo(ne),_e=Ar(ne),De=/auto|scroll/,ue=Te||De.test(_e.overflowX),Se=Te||De.test(_e.overflowY),ke=ue&&ne.clientWidth>0&&ne.scrollWidth>ne.clientWidth,Pe=Se&&ne.clientHeight>0&&ne.scrollHeight>ne.clientHeight,Le=_e.direction==="rtl",st=Pe&&(Le?X.offsetX<=ne.offsetWidth-ne.clientWidth:X.offsetX>ne.clientWidth),Ut=ke&&X.offsetY>ne.clientHeight;if(st||Ut)return}const oe=(Oe=c.current.floatingContext)==null?void 0:Oe.nodeId,me=_&&Ll(_.nodesRef.current,oe).some(Te=>{var _e;return Oi(X,(_e=Te.context)==null?void 0:_e.elements.floating)});if(Oi(X,n.select("floatingElement"))||Oi(X,n.select("domReferenceElement"))||me)return;const ae=_?Ll(_.nodesRef.current,oe):[];if(ae.length>0){let Te=!0;if(ae.forEach(_e=>{var De;(De=_e.context)!=null&&De.open&&!_e.context.dataRef.current.__outsidePressBubbles&&(Te=!1)}),!Te)return}n.setOpen(!1,mt(CC,X)),N()}),I=Fe(X=>{L()!=="sloppy"||X.pointerType==="touch"||!n.select("open")||!f||Oi(X,n.select("floatingElement"))||Oi(X,n.select("domReferenceElement"))||W(X)}),Y=Fe(X=>{if(L()!=="sloppy"||!n.select("open")||!f||Oi(X,n.select("floatingElement"))||Oi(X,n.select("domReferenceElement")))return;const Z=X.touches[0];Z&&($.current={startTime:Date.now(),startX:Z.clientX,startY:Z.clientY,dismissOnTouchEnd:!1,dismissOnMouseDown:!0},B.start(1e3,()=>{$.current&&($.current.dismissOnTouchEnd=!1,$.current.dismissOnMouseDown=!1)}))}),J=Fe(X=>{const Z=Yr(X);function ne(){Y(X),Z==null||Z.removeEventListener(X.type,ne)}Z==null||Z.addEventListener(X.type,ne)}),H=Fe(X=>{const Z=A.current;if(A.current=!1,B.clear(),X.type==="mousedown"&&$.current&&!$.current.dismissOnMouseDown)return;const ne=Yr(X);function xe(){X.type==="pointerdown"?I(X):W(X,Z),ne==null||ne.removeEventListener(X.type,xe)}ne==null||ne.addEventListener(X.type,xe)}),ie=Fe(X=>{if(L()!=="sloppy"||!$.current||Oi(X,n.select("floatingElement"))||Oi(X,n.select("domReferenceElement")))return;const Z=X.touches[0];if(!Z)return;const ne=Math.abs(Z.clientX-$.current.startX),xe=Math.abs(Z.clientY-$.current.startY),ge=Math.sqrt(ne*ne+xe*xe);ge>5&&($.current.dismissOnTouchEnd=!0),ge>10&&(W(X),B.clear(),$.current=null)}),re=Fe(X=>{const Z=Yr(X);function ne(){ie(X),Z==null||Z.removeEventListener(X.type,ne)}Z==null||Z.addEventListener(X.type,ne)}),he=Fe(X=>{L()!=="sloppy"||!$.current||Oi(X,n.select("floatingElement"))||Oi(X,n.select("domReferenceElement"))||($.current.dismissOnTouchEnd&&W(X),B.clear(),$.current=null)}),ve=Fe(X=>{const Z=Yr(X);function ne(){he(X),Z==null||Z.removeEventListener(X.type,ne)}Z==null||Z.addEventListener(X.type,ne)});C.useEffect(()=>{if(!r||!f)return;c.current.__escapeKeyBubbles=D,c.current.__outsidePressBubbles=O;const X=new ss;function Z(le){n.setOpen(!1,mt(Gc,le))}function ne(){X.clear(),M.current=!0}function xe(){X.start(Jy()?5:0,()=>{M.current=!1})}const ge=Pt(i);ge.addEventListener("pointerdown",G,!0),h&&(ge.addEventListener("keydown",F),ge.addEventListener("compositionstart",ne),ge.addEventListener("compositionend",xe)),T&&(ge.addEventListener("click",H,!0),ge.addEventListener("pointerdown",H,!0),ge.addEventListener("touchstart",J,!0),ge.addEventListener("touchmove",re,!0),ge.addEventListener("touchend",ve,!0),ge.addEventListener("mousedown",H,!0));let Ce=[];return v&&(It(a)&&(Ce=ma(a)),It(i)&&(Ce=Ce.concat(ma(i))),!It(o)&&o&&o.contextElement&&(Ce=Ce.concat(ma(o.contextElement)))),Ce=Ce.filter(le=>{var oe;return le!==((oe=ge.defaultView)==null?void 0:oe.visualViewport)}),Ce.forEach(le=>{le.addEventListener("scroll",Z,{passive:!0})}),()=>{ge.removeEventListener("pointerdown",G,!0),h&&(ge.removeEventListener("keydown",F),ge.removeEventListener("compositionstart",ne),ge.removeEventListener("compositionend",xe)),T&&(ge.removeEventListener("click",H,!0),ge.removeEventListener("pointerdown",H,!0),ge.removeEventListener("touchstart",J,!0),ge.removeEventListener("touchmove",re,!0),ge.removeEventListener("touchend",ve,!0),ge.removeEventListener("mousedown",H,!0)),Ce.forEach(le=>{le.removeEventListener("scroll",Z)}),X.clear(),A.current=!1}},[c,i,o,a,h,T,r,u,v,f,D,O,F,W,H,I,J,re,ve,G,n]),C.useEffect(N,[T,N]);const Re=C.useMemo(()=>({onKeyDown:F,...y&&{[Wse[b]]:X=>{n.setOpen(!1,mt(Vc,X.nativeEvent))},...b!=="intentional"&&{onClick(X){n.setOpen(!1,mt(Vc,X.nativeEvent))}}}}),[F,n,y,b]),ce=Fe(X=>{const Z=Yr(X.nativeEvent);!ht(n.select("floatingElement"),Z)||X.button!==0||(A.current=!0)}),je=Fe(X=>{!r||!f||X.button!==0||(A.current=!0)}),We=C.useMemo(()=>({onKeyDown:F,onPointerDown:ce,onMouseDown:ce,onMouseUp:ce,onClickCapture:q,onMouseDownCapture(X){q(),je(X)},onPointerDownCapture(X){q(),je(X)},onMouseUpCapture:q,onTouchEndCapture:q,onTouchMoveCapture:q}),[F,ce,q,je]);return C.useMemo(()=>f?{reference:Re,floating:We,trigger:Re}:{},[f,Re,We])}var gy=Symbol("NOT_FOUND");function Qse(e,t=`expected a function, instead received ${typeof e}`){if(typeof e!="function")throw new TypeError(t)}function Zse(e,t=`expected an object, instead received ${typeof e}`){if(typeof e!="object")throw new TypeError(t)}function Jse(e,t="expected all items to be functions, instead received the following types: "){if(!e.every(n=>typeof n=="function")){const n=e.map(r=>typeof r=="function"?`function ${r.name||"unnamed"}()`:typeof r).join(", ");throw new TypeError(`${t}[${n}]`)}}var ZM=e=>Array.isArray(e)?e:[e];function eae(e){const t=Array.isArray(e[0])?e[0]:e;return Jse(t,"createSelector expects all input-selectors to be functions, but received the following types: "),t}function tae(e,t){const n=[],{length:r}=e;for(let i=0;i<r;i++)n.push(e[i].apply(null,t));return n}function nae(e){let t;return{get(n){return t&&e(t.key,n)?t.value:gy},put(n,r){t={key:n,value:r}},getEntries(){return t?[t]:[]},clear(){t=void 0}}}function rae(e,t){let n=[];function r(u){const c=n.findIndex(f=>t(u,f.key));if(c>-1){const f=n[c];return c>0&&(n.splice(c,1),n.unshift(f)),f.value}return gy}function i(u,c){r(u)===gy&&(n.unshift({key:u,value:c}),n.length>e&&n.pop())}function o(){return n}function a(){n=[]}return{get:r,put:i,getEntries:o,clear:a}}var iae=(e,t)=>e===t;function oae(e){return function(n,r){if(n===null||r===null||n.length!==r.length)return!1;const{length:i}=n;for(let o=0;o<i;o++)if(!e(n[o],r[o]))return!1;return!0}}function sae(e,t){const n=typeof t=="object"?t:{equalityCheck:t},{equalityCheck:r=iae,maxSize:i=1,resultEqualityCheck:o}=n,a=oae(r);let u=0;const c=i<=1?nae(a):rae(i,a);function f(){let h=c.get(arguments);if(h===gy){if(h=e.apply(null,arguments),u++,o){const m=c.getEntries().find(y=>o(y.value,h));m&&(h=m.value,u!==0&&u--)}c.put(arguments,h)}return h}return f.clearCache=()=>{c.clear(),f.resetResultsCount()},f.resultsCount=()=>u,f.resetResultsCount=()=>{u=0},f}var aae=class{constructor(e){this.value=e}deref(){return this.value}},lae=typeof WeakRef<"u"?WeakRef:aae,uae=0,JM=1;function Gm(){return{s:uae,v:void 0,o:null,p:null}}function WF(e,t={}){let n=Gm();const{resultEqualityCheck:r}=t;let i,o=0;function a(){var p;let u=n;const{length:c}=arguments;for(let m=0,y=c;m<y;m++){const b=arguments[m];if(typeof b=="function"||typeof b=="object"&&b!==null){let v=u.o;v===null&&(u.o=v=new WeakMap);const S=v.get(b);S===void 0?(u=Gm(),v.set(b,u)):u=S}else{let v=u.p;v===null&&(u.p=v=new Map);const S=v.get(b);S===void 0?(u=Gm(),v.set(b,u)):u=S}}const f=u;let h;if(u.s===JM)h=u.v;else if(h=e.apply(null,arguments),o++,r){const m=((p=i==null?void 0:i.deref)==null?void 0:p.call(i))??i;m!=null&&r(m,h)&&(h=m,o!==0&&o--),i=typeof h=="object"&&h!==null||typeof h=="function"?new lae(h):h}return f.s=JM,f.v=h,h}return a.clearCache=()=>{n=Gm(),a.resetResultsCount()},a.resultsCount=()=>o,a.resetResultsCount=()=>{o=0},a}function KF(e,...t){const n=typeof e=="function"?{memoize:e,memoizeOptions:t}:e,r=(...i)=>{let o=0,a=0,u,c={},f=i.pop();typeof f=="object"&&(c=f,f=i.pop()),Qse(f,`createSelector expects an output function after the inputs, but received: [${typeof f}]`);const h={...n,...c},{memoize:p,memoizeOptions:m=[],argsMemoize:y=WF,argsMemoizeOptions:b=[]}=h,v=ZM(m),S=ZM(b),x=eae(i),_=p(function(){return o++,f.apply(null,arguments)},...v),k=y(function(){a++;const A=tae(x,arguments);return u=_.apply(null,A),u},...S);return Object.assign(k,{resultFunc:f,memoizedResultFunc:_,dependencies:x,dependencyRecomputations:()=>a,resetDependencyRecomputations:()=>{a=0},lastResult:()=>u,recomputations:()=>o,resetRecomputations:()=>{o=0},memoize:p,argsMemoize:y})};return Object.assign(r,{withTypes:()=>r}),r}var cae=KF(WF),fae=Object.assign((e,t=cae)=>{Zse(e,`createStructuredSelector expects first argument to be an object where each property is a selector, instead received a ${typeof e}`);const n=Object.keys(e),r=n.map(o=>e[o]);return t(r,(...o)=>o.reduce((a,u,c)=>(a[n[c]]=u,a),{}))},{withTypes:()=>fae});KF({memoize:sae,memoizeOptions:{maxSize:1,equalityCheck:Object.is}});const vt=(e,t,n,r,i,o,...a)=>{if(a.length>0)throw new Error(dr(1));let u;if(e)u=e;else throw new Error("Missing arguments");return u};var XF=l$();const jw=[];let Lw;function dae(){return Lw}function hae(e){jw.push(e)}function QF(e){const t=(n,r)=>{const i=Tr(mae).current;let o;try{Lw=i;for(const a of jw)a.before(i);o=e(n,r);for(const a of jw)a.after(i);i.didInitialize=!0}finally{Lw=void 0}return o};return t.displayName=e.displayName||e.name,t}function pae(e){return C.forwardRef(QF(e))}function mae(){return{didInitialize:!1}}const gae=SC(19),yae=gae?vae:xae;function ZF(e,t,n,r,i){return yae(e,t,n,r,i)}function bae(e,t,n,r,i){const o=C.useCallback(()=>t(e.getSnapshot(),n,r,i),[e,t,n,r,i]);return XF.useSyncExternalStore(e.subscribe,o,o)}hae({before(e){e.syncIndex=0,e.didInitialize||(e.syncTick=1,e.syncHooks=[],e.didChangeStore=!0,e.getSnapshot=()=>{let t=!1;for(let n=0;n<e.syncHooks.length;n+=1){const r=e.syncHooks[n],i=r.selector(r.store.state,r.a1,r.a2,r.a3);(r.didChange||!Object.is(r.value,i))&&(t=!0,r.value=i,r.didChange=!1)}return t&&(e.syncTick+=1),e.syncTick})},after(e){e.syncHooks.length>0&&(e.didChangeStore&&(e.didChangeStore=!1,e.subscribe=t=>{const n=new Set;for(const i of e.syncHooks)n.add(i.store);const r=[];for(const i of n)r.push(i.subscribe(t));return()=>{for(const i of r)i()}}),XF.useSyncExternalStore(e.subscribe,e.getSnapshot,e.getSnapshot))}});function vae(e,t,n,r,i){const o=dae();if(!o)return bae(e,t,n,r,i);const a=o.syncIndex;o.syncIndex+=1;let u;return o.didInitialize?(u=o.syncHooks[a],(u.store!==e||u.selector!==t||!Object.is(u.a1,n)||!Object.is(u.a2,r)||!Object.is(u.a3,i))&&(u.store!==e&&(o.didChangeStore=!0),u.store=e,u.selector=t,u.a1=n,u.a2=r,u.a3=i,u.didChange=!0)):(u={store:e,selector:t,a1:n,a2:r,a3:i,value:t(e.getSnapshot(),n,r,i),didChange:!1},o.syncHooks.push(u)),u.value}function xae(e,t,n,r,i){return u$.useSyncExternalStoreWithSelector(e.subscribe,e.getSnapshot,e.getSnapshot,o=>t(o,n,r,i))}class wae{constructor(t){te(this,"subscribe",t=>(this.listeners.add(t),()=>{this.listeners.delete(t)}));te(this,"getSnapshot",()=>this.state);this.state=t,this.listeners=new Set,this.updateTick=0}setState(t){if(this.state===t)return;this.state=t,this.updateTick+=1;const n=this.updateTick;for(const r of this.listeners){if(n!==this.updateTick)return;r(t)}}update(t){for(const n in t)if(!Object.is(this.state[n],t[n])){this.setState({...this.state,...t});return}}set(t,n){Object.is(this.state[t],n)||this.setState({...this.state,[t]:n})}notifyAll(){const t={...this.state};this.setState(t)}use(t,n,r,i){return ZF(this,t,n,r,i)}}class JF extends wae{constructor(t,n={},r){super(t),this.context=n,this.selectors=r}useSyncedValue(t,n){C.useDebugValue(t),Ve(()=>{this.state[t]!==n&&this.set(t,n)},[t,n])}useSyncedValueWithCleanup(t,n){const r=this;Ve(()=>(r.state[t]!==n&&r.set(t,n),()=>{r.set(t,void 0)}),[r,t,n])}useSyncedValues(t){const n=this,r=Object.values(t);Ve(()=>{n.update(t)},[n,...r])}useControlledProp(t,n){C.useDebugValue(t);const r=n!==void 0;Ve(()=>{r&&!Object.is(this.state[t],n)&&super.setState({...this.state,[t]:n})},[t,n,r])}select(t,n,r,i){const o=this.selectors[t];return o(this.state,n,r,i)}useState(t,n,r,i){return C.useDebugValue(t),ZF(this,this.selectors[t],n,r,i)}useContextCallback(t,n){C.useDebugValue(t);const r=Fe(n??VL);this.context[t]=r}useStateSetter(t){const n=C.useRef(void 0);return n.current===void 0&&(n.current=r=>{this.set(t,r)}),n.current}observe(t,n){let r;typeof t=="function"?r=t:r=this.selectors[t];let i=r(this.state);return n(i,i,this),this.subscribe(o=>{const a=r(o);if(!Object.is(i,a)){const u=i;i=a,n(a,u,this)}})}}function Sae(){const[,e]=C.useState({});return C.useCallback(()=>{e({})},[])}const Cae={open:vt(e=>e.open),domReferenceElement:vt(e=>e.domReferenceElement),referenceElement:vt(e=>e.positionReference??e.referenceElement),floatingElement:vt(e=>e.floatingElement),floatingId:vt(e=>e.floatingId)};class zC extends JF{constructor(n){const{nested:r,noEmit:i,onOpenChange:o,triggerElements:a,...u}=n;super({...u,positionReference:u.referenceElement,domReferenceElement:u.referenceElement},{onOpenChange:o,dataRef:{current:{}},events:MF(),nested:r,noEmit:i,triggerElements:a},Cae);te(this,"setOpen",(n,r)=>{var i,o;if((!n||!this.state.open||fF(r.event))&&(this.context.dataRef.current.openEvent=n?r.event:void 0),!this.context.noEmit){const a={open:n,reason:r.reason,nativeEvent:r.event,nested:this.context.nested,triggerElement:r.trigger};this.context.events.emit("openchange",a)}(o=(i=this.context).onOpenChange)==null||o.call(i,n,r)})}}function ez(e,t){const n=C.useRef(null),r=C.useRef(null);return C.useCallback(i=>{if(e!==void 0){if(n.current!==null){const o=n.current,a=r.current,u=t.context.triggerElements.getById(o);a&&u===a&&t.context.triggerElements.delete(o),n.current=null,r.current=null}i!==null&&(n.current=e,r.current=i,t.context.triggerElements.add(e,i))}},[t,e])}function Eae(e,t,n,r){const i=n.useState("isMountedByTrigger",e),o=ez(e,n),a=Fe(u=>{if(o(u),!u||!n.select("open"))return;const c=n.select("activeTriggerId");if(c===e){n.update({activeTriggerElement:u,...r});return}c==null&&n.update({activeTriggerId:e,activeTriggerElement:u,...r})});return Ve(()=>{i&&n.update({activeTriggerElement:t.current,...r})},[i,n,t,...Object.values(r)]),{registerTrigger:a,isMountedByThisTrigger:i}}function kae(e){const t=e.useState("open");Ve(()=>{if(t&&!e.select("activeTriggerId")&&e.context.triggerElements.size===1){const n=e.context.triggerElements.entries().next();if(!n.done){const[r,i]=n.value;e.update({activeTriggerId:r,activeTriggerElement:i})}}},[t,e])}function Rae(e,t,n){const{mounted:r,setMounted:i,transitionStatus:o}=kC(e);t.useSyncedValues({mounted:r,transitionStatus:o});const a=Fe(()=>{var c,f;i(!1),t.update({activeTriggerId:null,activeTriggerElement:null,mounted:!1}),n==null||n(),(f=(c=t.context).onOpenChangeComplete)==null||f.call(c,!1)}),u=t.useState("preventUnmountingOnClose");return Zh({enabled:!u,open:e,ref:t.context.popupRef,onComplete(){e||a()}}),{forceUnmount:a,transitionStatus:o}}class BC{constructor(){this.elementsSet=new Set,this.idMap=new Map}add(t,n){const r=this.idMap.get(t);r!==n&&(r!==void 0&&this.elementsSet.delete(r),this.elementsSet.add(n),this.idMap.set(t,n))}delete(t){const n=this.idMap.get(t);n&&(this.elementsSet.delete(n),this.idMap.delete(t))}hasElement(t){return this.elementsSet.has(t)}hasMatchingElement(t){for(const n of this.elementsSet)if(t(n))return!0;return!1}getById(t){return this.idMap.get(t)}entries(){return this.idMap.entries()}elements(){return this.elementsSet.values()}get size(){return this.idMap.size}}function _ae(){return new zC({open:!1,floatingElement:null,referenceElement:null,triggerElements:new BC,floatingId:"",nested:!1,noEmit:!1,onOpenChange:void 0})}function Tae(){return{open:!1,openProp:void 0,mounted:!1,transitionStatus:"idle",floatingRootContext:_ae(),preventUnmountingOnClose:!1,payload:void 0,activeTriggerId:null,activeTriggerElement:null,triggerIdProp:void 0,popupElement:null,positionerElement:null,activeTriggerProps:Tn,inactiveTriggerProps:Tn,popupProps:Tn}}const Vm=vt(e=>e.triggerIdProp??e.activeTriggerId),Aae={open:vt(e=>e.openProp??e.open),mounted:vt(e=>e.mounted),transitionStatus:vt(e=>e.transitionStatus),floatingRootContext:vt(e=>e.floatingRootContext),preventUnmountingOnClose:vt(e=>e.preventUnmountingOnClose),payload:vt(e=>e.payload),activeTriggerId:Vm,activeTriggerElement:vt(e=>e.mounted?e.activeTriggerElement:null),isTriggerActive:vt((e,t)=>t!==void 0&&Vm(e)===t),isOpenedByTrigger:vt((e,t)=>t!==void 0&&Vm(e)===t&&e.open),isMountedByTrigger:vt((e,t)=>t!==void 0&&Vm(e)===t&&e.mounted),triggerProps:vt((e,t)=>t?e.activeTriggerProps:e.inactiveTriggerProps),popupProps:vt(e=>e.popupProps),popupElement:vt(e=>e.popupElement),positionerElement:vt(e=>e.positionerElement)};function Dae(e){const{open:t=!1,onOpenChange:n,elements:r={}}=e,i=ou(),o=ls()!=null,a=Tr(()=>new zC({open:t,onOpenChange:n,referenceElement:r.reference??null,floatingElement:r.floating??null,triggerElements:new BC,floatingId:i,nested:o,noEmit:!1})).current;return Ve(()=>{const u={open:t,floatingId:i};r.reference!==void 0&&(u.referenceElement=r.reference,u.domReferenceElement=It(r.reference)?r.reference:null),r.floating!==void 0&&(u.floatingElement=r.floating),a.update(u)},[t,i,r.reference,r.floating,a]),a.context.onOpenChange=n,a.context.nested=o,a.context.noEmit=!1,a}function Mae(e={}){const{nodeId:t,externalTree:n}=e,r=Dae(e),i=e.rootContext||r,o={reference:i.useState("referenceElement"),floating:i.useState("floatingElement"),domReference:i.useState("domReferenceElement")},[a,u]=C.useState(null),c=C.useRef(null),f=Ia(n);Ve(()=>{o.domReference&&(c.current=o.domReference)},[o.domReference]);const h=Bse({...e,elements:{...o,...a&&{reference:a}}}),p=C.useCallback(O=>{const $=It(O)?{getBoundingClientRect:()=>O.getBoundingClientRect(),getClientRects:()=>O.getClientRects(),contextElement:O}:O;u($),h.refs.setReference($)},[h.refs]),[m,y]=C.useState(null),[b,v]=C.useState(null);i.useSyncedValue("referenceElement",m),i.useSyncedValue("domReferenceElement",It(m)?m:null),i.useSyncedValue("floatingElement",b);const S=C.useCallback(O=>{(It(O)||O===null)&&(c.current=O,y(O)),(It(h.refs.reference.current)||h.refs.reference.current===null||O!==null&&!It(O))&&h.refs.setReference(O)},[h.refs,y]),x=C.useCallback(O=>{v(O),h.refs.setFloating(O)},[h.refs]),_=C.useMemo(()=>({...h.refs,setReference:S,setFloating:x,setPositionReference:p,domReference:c}),[h.refs,S,x,p]),k=C.useMemo(()=>({...h.elements,domReference:o.domReference}),[h.elements,o.domReference]),T=i.useState("open"),A=i.useState("floatingId"),D=C.useMemo(()=>({...h,dataRef:i.context.dataRef,open:T,onOpenChange:i.setOpen,events:i.context.events,floatingId:A,refs:_,elements:k,nodeId:t,rootStore:i}),[h,_,k,t,i,T,A]);return Ve(()=>{i.context.dataRef.current.floatingContext=D;const O=f==null?void 0:f.nodesRef.current.find($=>$.id===t);O&&(O.context=D)}),C.useMemo(()=>({...h,context:D,refs:_,elements:k,rootStore:i}),[h,_,k,D,i])}function Oae(e){const{popupStore:t,noEmit:n=!1,treatPopupAsFloatingElement:r=!1,onOpenChange:i}=e,o=ou(),a=ls()!=null,u=t.useState("open"),c=t.useState("activeTriggerElement"),f=t.useState(r?"popupElement":"positionerElement"),h=t.context.triggerElements,p=Tr(()=>new zC({open:u,referenceElement:c,floatingElement:f,triggerElements:h,onOpenChange:i,floatingId:o,nested:a,noEmit:n})).current;return Ve(()=>{const m={open:u,floatingId:o,referenceElement:c,floatingElement:f};It(c)&&(m.domReferenceElement=c),p.state.positionReference===p.state.referenceElement&&(m.positionReference=c),p.update(m)},[u,o,c,f,p]),p.context.onOpenChange=i,p.context.nested=a,p.context.noEmit=n,p}const jx=Gie&&iF;function $ae(e,t={}){const n="rootStore"in e?e.rootStore:e,{events:r,dataRef:i}=n.context,{enabled:o=!0,delay:a}=t,u=C.useRef(!1),c=C.useRef(null),f=Ui(),h=C.useRef(!0);C.useEffect(()=>{const m=n.select("domReferenceElement");if(!o)return;const y=jn(m);function b(){const x=n.select("domReferenceElement");!n.select("open")&&Jt(x)&&x===gi(Pt(x))&&(u.current=!0)}function v(){h.current=!0}function S(){h.current=!1}return y.addEventListener("blur",b),jx&&(y.addEventListener("keydown",v,!0),y.addEventListener("pointerdown",S,!0)),()=>{y.removeEventListener("blur",b),jx&&(y.removeEventListener("keydown",v,!0),y.removeEventListener("pointerdown",S,!0))}},[n,o]),C.useEffect(()=>{if(!o)return;function m(y){if(y.reason===Vc||y.reason===EC){const b=n.select("domReferenceElement");It(b)&&(c.current=b,u.current=!0)}}return r.on("openchange",m),()=>{r.off("openchange",m)}},[r,o,n]);const p=C.useMemo(()=>({onMouseLeave(){u.current=!1,c.current=null},onFocus(m){const y=m.currentTarget;if(u.current){if(c.current===y)return;u.current=!1,c.current=null}const b=Yr(m.nativeEvent);if(It(b)){if(jx&&!m.relatedTarget){if(!h.current&&!tb(b))return}else if(!Kie(b))return}const v=ay(m.relatedTarget,n.context.triggerElements),{nativeEvent:S,currentTarget:x}=m,_=typeof a=="function"?a():a;if(n.select("open")&&v||_===0||_===void 0){n.setOpen(!0,mt(Ud,S,x));return}f.start(_,()=>{u.current||n.setOpen(!0,mt(Ud,S,x))})},onBlur(m){u.current=!1,c.current=null;const y=m.relatedTarget,b=m.nativeEvent,v=It(y)&&y.hasAttribute(Qc("focus-guard"))&&y.getAttribute("data-type")==="outside";f.start(0,()=>{var k;const S=n.select("domReferenceElement"),x=gi(S?S.ownerDocument:document);!y&&x===S||ht((k=i.current.floatingContext)==null?void 0:k.refs.floating.current,x)||ht(S,x)||v||ay(y??x,n.context.triggerElements)||n.setOpen(!1,mt(Ud,b))})}}),[i,n,f,a]);return C.useMemo(()=>o?{reference:p,trigger:p}:{},[o,p])}const Fw=Qc("safe-polygon"),Pae=`button,a,[role="button"],select,[tabindex]:not([tabindex="-1"]),${lF}`;function Nae(e){return e?!!e.closest(Pae):!1}class UC{constructor(){te(this,"dispose",()=>{this.openChangeTimeout.clear(),this.restTimeout.clear()});te(this,"disposeEffect",()=>this.dispose);this.pointerType=void 0,this.interactedInside=!1,this.handler=void 0,this.blockMouseMove=!0,this.performedPointerEventsMutation=!1,this.unbindMouseMove=()=>{},this.restTimeoutPending=!1,this.openChangeTimeout=new ss,this.restTimeout=new ss,this.handleCloseOptions=void 0}static create(){return new UC}}function tz(e){const t=Tr(UC.create).current,n=e.context.dataRef.current;return n.hoverInteractionState||(n.hoverInteractionState=t),Yh(n.hoverInteractionState.disposeEffect),n.hoverInteractionState}const Iae=new Set(["click","mousedown"]);function jae(e,t={}){const n="rootStore"in e?e.rootStore:e,r=n.useState("open"),i=n.useState("floatingElement"),o=n.useState("domReferenceElement"),{dataRef:a}=n.context,{enabled:u=!0,closeDelay:c=0}=t,f=tz(n),h=Ia(),p=ls(),m=Fe(()=>f.interactedInside?!0:a.current.openEvent?Iae.has(a.current.openEvent.type):!1),y=Fe(()=>{var T;const k=(T=a.current.openEvent)==null?void 0:T.type;return(k==null?void 0:k.includes("mouse"))&&k!=="mousedown"}),b=Fe(k=>ay(k,n.context.triggerElements)),v=C.useCallback((k,T=!0)=>{const A=Lae(c,f.pointerType);A&&!f.handler?f.openChangeTimeout.start(A,()=>n.setOpen(!1,mt(qr,k))):T&&(f.openChangeTimeout.clear(),n.setOpen(!1,mt(qr,k)))},[c,n,f]),S=Fe(()=>{f.unbindMouseMove(),f.handler=void 0}),x=Fe(()=>{if(f.performedPointerEventsMutation){const k=Pt(i).body;k.style.pointerEvents="",k.removeAttribute(Fw),f.performedPointerEventsMutation=!1}}),_=Fe(k=>{const T=Yr(k);if(!Nae(T)){f.interactedInside=!1;return}f.interactedInside=!0});Ve(()=>{r||(f.pointerType=void 0,f.restTimeoutPending=!1,f.interactedInside=!1,S(),x())},[r,f,S,x]),C.useEffect(()=>()=>{S()},[S]),C.useEffect(()=>x,[x]),Ve(()=>{var k,T,A;if(u&&r&&(k=f.handleCloseOptions)!=null&&k.blockPointerEvents&&y()&&It(o)&&i){f.performedPointerEventsMutation=!0;const D=Pt(i).body;D.setAttribute(Fw,"");const O=o,$=i,B=(A=(T=h==null?void 0:h.nodesRef.current.find(j=>j.id===p))==null?void 0:T.context)==null?void 0:A.elements.floating;return B&&(B.style.pointerEvents=""),D.style.pointerEvents="none",O.style.pointerEvents="auto",$.style.pointerEvents="auto",()=>{D.style.pointerEvents="",O.style.pointerEvents="",$.style.pointerEvents=""}}},[u,r,o,i,f,y,h,p]),C.useEffect(()=>{if(!u)return;function k(O){m()||!a.current.floatingContext||!n.select("open")||b(O.relatedTarget)||(x(),S(),m()||v(O))}function T(O){var $;f.openChangeTimeout.clear(),x(),($=f.handler)==null||$.call(f,O),S()}function A(O){m()||v(O,!1)}const D=i;return D&&(D.addEventListener("mouseleave",k),D.addEventListener("mouseenter",T),D.addEventListener("mouseleave",A),D.addEventListener("pointerdown",_,!0)),()=>{D&&(D.removeEventListener("mouseleave",k),D.removeEventListener("mouseenter",T),D.removeEventListener("mouseleave",A),D.removeEventListener("pointerdown",_,!0))}},[u,i,n,a,m,b,v,x,S,_,f])}function Lae(e,t){return t&&!Yc(t)?0:typeof e=="function"?e():e}function Lx(e){return typeof e=="function"?e():e}const Fae={current:null};function nz(e,t={}){var j;const n="rootStore"in e?e.rootStore:e,{dataRef:r,events:i}=n.context,{enabled:o=!0,delay:a=0,handleClose:u=null,mouseOnly:c=!1,restMs:f=0,move:h=!0,triggerElementRef:p=Fae,externalTree:m,isActiveTrigger:y=!0}=t,b=Ia(m),v=tz(n),S=sr(u),x=sr(a),_=sr(f),k=sr(o);y&&(v.handleCloseOptions=(j=S.current)==null?void 0:j.__options);const T=Fe(()=>v.interactedInside?!0:r.current.openEvent?["click","mousedown"].includes(r.current.openEvent.type):!1),A=Fe(N=>ay(N,n.context.triggerElements)),D=C.useCallback((N,M=!0)=>{const z=Ox(x.current,"close",v.pointerType);z&&!v.handler?v.openChangeTimeout.start(z,()=>n.setOpen(!1,mt(qr,N))):M&&(v.openChangeTimeout.clear(),n.setOpen(!1,mt(qr,N)))},[x,n,v]),O=Fe(()=>{v.unbindMouseMove(),v.handler=void 0}),$=Fe(()=>{if(v.performedPointerEventsMutation){const N=Pt(n.select("domReferenceElement")).body;N.style.pointerEvents="",N.removeAttribute(Fw),v.performedPointerEventsMutation=!1}});C.useEffect(()=>{if(!o)return;function N(M){M.open||(v.openChangeTimeout.clear(),v.restTimeout.clear(),v.blockMouseMove=!0,v.restTimeoutPending=!1)}return i.on("openchange",N),()=>{i.off("openchange",N)}},[o,i,v]);const B=Fe(N=>{var z;if(T()||!r.current.floatingContext||A(N.relatedTarget))return;const M=p.current;(z=S.current)==null||z.call(S,{...r.current.floatingContext,tree:b,x:N.clientX,y:N.clientY,onClose(){$(),O(),!T()&&M===n.select("domReferenceElement")&&D(N)}})(N)});return C.useEffect(()=>{if(!o)return;const N=p.current??(y?n.select("domReferenceElement"):null);if(!It(N))return;function M(L){if(v.openChangeTimeout.clear(),v.blockMouseMove=!1,c&&!Yc(v.pointerType)||Lx(_.current)>0&&!Ox(x.current,"open"))return;const F=Ox(x.current,"open",v.pointerType),U=n.select("domReferenceElement"),q=n.context.triggerElements,W=(q.hasElement(L.target)||q.hasMatchingElement(H=>ht(H,L.target)))&&(!U||!ht(U,L.target)),I=L.currentTarget??null,Y=n.select("open"),J=!Y||W;W&&Y?n.setOpen(!0,mt(qr,L,I)):F?v.openChangeTimeout.start(F,()=>{J&&n.setOpen(!0,mt(qr,L,I))}):J&&n.setOpen(!0,mt(qr,L,I))}function z(L){if(T()){$();return}v.unbindMouseMove();const F=n.select("domReferenceElement"),U=Pt(F);if(v.restTimeout.clear(),v.restTimeoutPending=!1,A(L.relatedTarget))return;if(S.current&&r.current.floatingContext){n.select("open")||v.openChangeTimeout.clear();const W=p.current;v.handler=S.current({...r.current.floatingContext,tree:b,x:L.clientX,y:L.clientY,onClose(){$(),O(),k.current&&!T()&&W===n.select("domReferenceElement")&&D(L,!0)}});const I=v.handler;I(L),U.addEventListener("mousemove",I),v.unbindMouseMove=()=>{U.removeEventListener("mousemove",I)};return}(v.pointerType==="touch"?!ht(n.select("floatingElement"),L.relatedTarget):!0)&&D(L)}function G(L){B(L)}return n.select("open")&&N.addEventListener("mouseleave",G),h&&N.addEventListener("mousemove",M,{once:!0}),N.addEventListener("mouseenter",M),N.addEventListener("mouseleave",z),()=>{N.removeEventListener("mouseleave",G),h&&N.removeEventListener("mousemove",M),N.removeEventListener("mouseenter",M),N.removeEventListener("mouseleave",z)}},[O,$,r,x,D,n,o,S,B,v,y,T,A,c,h,_,p,b,k]),C.useMemo(()=>{if(!o)return;function N(M){v.pointerType=M.pointerType}return{onPointerDown:N,onPointerEnter:N,onMouseMove(M){const{nativeEvent:z}=M,G=M.currentTarget,L=n.select("domReferenceElement"),F=n.context.triggerElements,U=n.select("open"),q=(F.hasElement(M.target)||F.hasMatchingElement(I=>ht(I,M.target)))&&(!L||!ht(L,M.target));if(c&&!Yc(v.pointerType)||U&&!q||Lx(_.current)===0||!q&&v.restTimeoutPending&&M.movementX**2+M.movementY**2<2)return;v.restTimeout.clear();function W(){if(v.restTimeoutPending=!1,T())return;const I=n.select("open");!v.blockMouseMove&&(!I||q)&&n.setOpen(!0,mt(qr,z,G))}v.pointerType==="touch"?yn.flushSync(()=>{W()}):q&&U?W():(v.restTimeoutPending=!0,v.restTimeout.start(Lx(_.current),W))}}},[o,v,T,c,n,_])}function HC(e=[]){const t=e.map(f=>f==null?void 0:f.reference),n=e.map(f=>f==null?void 0:f.floating),r=e.map(f=>f==null?void 0:f.item),i=e.map(f=>f==null?void 0:f.trigger),o=C.useCallback(f=>qm(f,e,"reference"),t),a=C.useCallback(f=>qm(f,e,"floating"),n),u=C.useCallback(f=>qm(f,e,"item"),r),c=C.useCallback(f=>qm(f,e,"trigger"),i);return C.useMemo(()=>({getReferenceProps:o,getFloatingProps:a,getItemProps:u,getTriggerProps:c}),[o,a,u,c])}function qm(e,t,n){var a;const r=new Map,i=n==="item",o={};n==="floating"&&(o.tabIndex=-1,o[Dw]="");for(const u in e)i&&e&&(u===sF||u===aF)||(o[u]=e[u]);for(let u=0;u<t.length;u+=1){let c;const f=(a=t[u])==null?void 0:a[n];typeof f=="function"?c=e?f(e):null:c=f,c&&e2(o,c,i,r)}return e2(o,e,i,r),o}function e2(e,t,n,r){var i;for(const o in t){const a=t[o];n&&(o===sF||o===aF)||(o.startsWith("on")?(r.has(o)||r.set(o,[]),typeof a=="function"&&((i=r.get(o))==null||i.push(a),e[o]=(...u)=>{var c;return(c=r.get(o))==null?void 0:c.map(f=>f(...u)).find(f=>f!==void 0)})):e[o]=a)}}const zae="Escape";function rb(e,t,n){switch(e){case"vertical":return t;case"horizontal":return n;default:return t||n}}function Ym(e,t){return rb(t,e===OC||e===Xh,e===ga||e===ya)}function Fx(e,t,n){return rb(t,e===Xh,n?e===ga:e===ya)||e==="Enter"||e===" "||e===""}function Bae(e,t,n){return rb(t,n?e===ga:e===ya,e===Xh)}function Uae(e,t,n,r){const i=n?e===ya:e===ga,o=e===OC;return t==="both"||t==="horizontal"&&r&&r>1?e===zae:rb(t,i,o)}function Hae(e,t){const n="rootStore"in e?e.rootStore:e,r=n.useState("open"),i=n.useState("floatingElement"),o=n.useState("domReferenceElement"),a=n.context.dataRef,{listRef:u,activeIndex:c,onNavigate:f=()=>{},enabled:h=!0,selectedIndex:p=null,allowEscape:m=!1,loopFocus:y=!1,nested:b=!1,rtl:v=!1,virtual:S=!1,focusItemOnOpen:x="auto",focusItemOnHover:_=!0,openOnArrowKeyDown:k=!0,disabledIndices:T=void 0,orientation:A="vertical",parentOrientation:D,cols:O=1,id:$,resetOnPointerLeave:B=!0,externalTree:j}=t,N=ly(i),M=sr(N),z=ls(),G=Ia(j);Ve(()=>{a.current.orientation=A},[a,A]);const L=Mw(o),F=C.useRef(x),U=C.useRef(p??-1),q=C.useRef(null),W=C.useRef(!0),I=Fe(oe=>{f(U.current===-1?null:U.current,oe)}),Y=C.useRef(I),J=C.useRef(!!i),H=C.useRef(r),ie=C.useRef(!1),re=C.useRef(!1),he=sr(T),ve=sr(r),Re=sr(p),ce=sr(B),je=Fe(()=>{function oe(Te){S?G==null||G.events.emit("virtualfocus",Te):Gd(Te,{sync:ie.current,preventScroll:!0})}const me=u.current[U.current],ae=re.current;me&&oe(me),(ie.current?Te=>Te():requestAnimationFrame)(()=>{var De;const Te=u.current[U.current]||me;if(!Te)return;me||oe(Te),X&&(ae||!W.current)&&((De=Te.scrollIntoView)==null||De.call(Te,{block:"nearest",inline:"nearest"}))})});Ve(()=>{h&&(r&&i?(U.current=p??-1,F.current&&p!=null&&(re.current=!0,I())):J.current&&(U.current=-1,Y.current()))},[h,r,i,p,I]),Ve(()=>{if(h){if(!r){ie.current=!1;return}if(i)if(c==null){if(ie.current=!1,Re.current!=null)return;if(J.current&&(U.current=-1,je()),(!H.current||!J.current)&&F.current&&(q.current!=null||F.current===!0&&q.current==null)){let oe=0;const me=()=>{u.current[0]==null?(oe<2&&(oe?requestAnimationFrame:queueMicrotask)(me),oe+=1):(U.current=q.current==null||Fx(q.current,A,v)||b?wg(u):Pw(u),q.current=null,I())};me()}}else vc(u,c)||(U.current=c,je(),re.current=!1)}},[h,r,i,c,Re,b,u,A,v,I,je,he]),Ve(()=>{var Te,_e;if(!h||i||!G||S||!J.current)return;const oe=G.nodesRef.current,me=(_e=(Te=oe.find(De=>De.id===z))==null?void 0:Te.context)==null?void 0:_e.elements.floating,ae=gi(Pt(i)),Oe=oe.some(De=>De.context&&ht(De.context.elements.floating,ae));me&&!Oe&&W.current&&me.focus({preventScroll:!0})},[h,i,G,z,S]),Ve(()=>{Y.current=I,H.current=r,J.current=!!i}),Ve(()=>{r||(q.current=null,F.current=x)},[r,x]);const We=c!=null,X=C.useMemo(()=>{function oe(ae){if(!ve.current)return;const Oe=u.current.indexOf(ae.currentTarget);Oe!==-1&&U.current!==Oe&&(U.current=Oe,I(ae))}return{onFocus(ae){ie.current=!0,oe(ae)},onClick:({currentTarget:ae})=>ae.focus({preventScroll:!0}),onMouseMove(ae){ie.current=!0,re.current=!1,_&&oe(ae)},onPointerLeave(ae){var Te;if(!ve.current||!W.current||ae.pointerType==="touch")return;ie.current=!0;const Oe=ae.relatedTarget;!_||u.current.includes(Oe)||ce.current&&(Gd(null,{sync:!0}),U.current=-1,I(ae),S||(Te=M.current)==null||Te.focus({preventScroll:!0}))}}},[ve,M,_,u,I,ce,S]),Z=C.useCallback(()=>{var oe,me,ae;return D??((ae=(me=(oe=G==null?void 0:G.nodesRef.current.find(Oe=>Oe.id===z))==null?void 0:oe.context)==null?void 0:me.dataRef)==null?void 0:ae.current.orientation)},[z,G,D]),ne=Fe(oe=>{if(W.current=!1,ie.current=!0,oe.which===229||!ve.current&&oe.currentTarget===M.current)return;if(b&&Uae(oe.key,A,v,O)){Ym(oe.key,Z())||Gn(oe),n.setOpen(!1,mt(vg,oe.nativeEvent)),Jt(o)&&(S?G==null||G.events.emit("virtualfocus",o):o.focus());return}const me=U.current,ae=wg(u,T),Oe=Pw(u,T);if(L||(oe.key==="Home"&&(Gn(oe),U.current=ae,I(oe)),oe.key==="End"&&(Gn(oe),U.current=Oe,I(oe))),O>1){const Te=Array.from({length:u.current.length},()=>({width:1,height:1})),_e=pF(Te,O,!1),De=_e.findIndex(ke=>ke!=null&&!ba(u,ke,T)),ue=_e.reduce((ke,Pe,Le)=>Pe!=null&&!ba(u,Pe,T)?Le:ke,-1),Se=_e[hF({current:_e.map(ke=>ke!=null?u.current[ke]:null)},{event:oe,orientation:A,loopFocus:y,rtl:v,cols:O,disabledIndices:gF([...(typeof T!="function"?T:null)||u.current.map((ke,Pe)=>ba(u,Pe,T)?Pe:void 0),void 0],_e),minIndex:De,maxIndex:ue,prevIndex:mF(U.current>Oe?ae:U.current,Te,_e,O,oe.key===Xh?"bl":oe.key===(v?ga:ya)?"tr":"tl"),stopEvent:!0})];if(Se!=null&&(U.current=Se,I(oe)),A==="both")return}if(Ym(oe.key,A)){if(Gn(oe),r&&!S&&gi(oe.currentTarget.ownerDocument)===oe.currentTarget){U.current=Fx(oe.key,A,v)?ae:Oe,I(oe);return}Fx(oe.key,A,v)?y?me>=Oe?m&&me!==u.current.length?U.current=-1:(ie.current=!1,U.current=ae):U.current=Hn(u,{startingIndex:me,disabledIndices:T}):U.current=Math.min(Oe,Hn(u,{startingIndex:me,disabledIndices:T})):y?me<=ae?m&&me!==-1?U.current=u.current.length:(ie.current=!1,U.current=Oe):U.current=Hn(u,{startingIndex:me,decrement:!0,disabledIndices:T}):U.current=Math.max(ae,Hn(u,{startingIndex:me,decrement:!0,disabledIndices:T})),vc(u,U.current)&&(U.current=-1),I(oe)}}),xe=C.useMemo(()=>S&&r&&We&&{"aria-activedescendant":`${$}-${c}`},[S,r,We,$,c]),ge=C.useMemo(()=>({"aria-orientation":A==="both"?void 0:A,...L?{}:xe,onKeyDown(oe){if(oe.key==="Tab"&&oe.shiftKey&&r&&!S){const me=Yr(oe.nativeEvent);if(me&&!ht(M.current,me))return;Gn(oe),n.setOpen(!1,mt(qc,oe.nativeEvent)),Jt(o)&&o.focus();return}ne(oe)},onPointerMove(){W.current=!0}}),[xe,ne,M,A,L,n,r,S,o]),Ce=C.useMemo(()=>{function oe(ae){x==="auto"&&uF(ae.nativeEvent)&&(F.current=!S)}function me(ae){F.current=x,x==="auto"&&cF(ae.nativeEvent)&&(F.current=!0)}return{onKeyDown(ae){const Oe=n.select("open");W.current=!1;const Te=ae.key.startsWith("Arrow"),_e=Bae(ae.key,Z(),v),De=Ym(ae.key,A),ue=(b?_e:De)||ae.key==="Enter"||ae.key.trim()==="";if(S&&Oe)return ne(ae);if(!(!Oe&&!k&&Te)){if(ue){const Se=Ym(ae.key,Z());q.current=b&&Se?null:ae.key}if(b){_e&&(Gn(ae),Oe?(U.current=wg(u,he.current),I(ae)):n.setOpen(!0,mt(vg,ae.nativeEvent,ae.currentTarget)));return}De&&(Re.current!=null&&(U.current=Re.current),Gn(ae),!Oe&&k?n.setOpen(!0,mt(vg,ae.nativeEvent,ae.currentTarget)):ne(ae),Oe&&I(ae))}},onFocus(ae){n.select("open")&&!S&&(U.current=-1,I(ae))},onPointerDown:me,onPointerEnter:me,onMouseDown:oe,onClick:oe}},[ne,he,x,u,b,I,n,k,A,Z,v,Re,S]),le=C.useMemo(()=>({...xe,...Ce}),[xe,Ce]);return C.useMemo(()=>h?{reference:le,floating:ge,item:X,trigger:Ce}:{},[h,le,ge,Ce,X])}const Gae=new Map([["select","listbox"],["combobox","listbox"],["label",!1]]);function Vae(e,t={}){const n="rootStore"in e?e.rootStore:e,r=n.useState("open"),i=n.useState("floatingId"),o=n.useState("domReferenceElement"),a=n.useState("floatingElement"),{role:u="dialog"}=t,c=ou(),f=(o==null?void 0:o.id)||c,h=C.useMemo(()=>{var _;return((_=ly(a))==null?void 0:_.id)||i},[a,i]),p=Gae.get(u)??u,y=ls()!=null,b=C.useMemo(()=>p==="tooltip"||u==="label"?Tn:{"aria-haspopup":p==="alertdialog"?"dialog":p,"aria-expanded":"false",...p==="listbox"&&{role:"combobox"},...p==="menu"&&y&&{role:"menuitem"},...u==="select"&&{"aria-autocomplete":"none"},...u==="combobox"&&{"aria-autocomplete":"list"}},[p,y,u]),v=C.useMemo(()=>p==="tooltip"||u==="label"?{[`aria-${u==="label"?"labelledby":"describedby"}`]:r?h:void 0}:{...b,"aria-expanded":r?"true":"false","aria-controls":r?h:void 0,...p==="menu"&&{id:f}},[p,h,r,f,u,b]),S=C.useMemo(()=>{const _={id:h,...p&&{role:p}};return p==="tooltip"||u==="label"?_:{..._,...p==="menu"&&{"aria-labelledby":f}}},[p,h,f,u]),x=C.useCallback(({active:_,selected:k})=>{const T={role:"option",..._&&{id:`${h}-fui-option`}};switch(u){case"select":case"combobox":return{...T,"aria-selected":k}}return{}},[h,u]);return C.useMemo(()=>({reference:v,floating:S,item:x,trigger:b}),[v,S,b,x])}function qae(e,t){const n="rootStore"in e?e.rootStore:e,r=n.context.dataRef,i=n.useState("open"),{listRef:o,activeIndex:a,onMatch:u,onTypingChange:c,enabled:f=!0,resetMs:h=750,selectedIndex:p=null}=t,m=Ui(),y=C.useRef(""),b=C.useRef(p??a??-1),v=C.useRef(null);Ve(()=>{!i&&p!==null||(m.clear(),v.current=null,y.current!==""&&(y.current=""))},[i,p,m]),Ve(()=>{i&&y.current===""&&(b.current=p??a??-1)},[i,p,a]);const S=Fe(A=>{A?r.current.typing||(r.current.typing=A,c==null||c(A)):r.current.typing&&(r.current.typing=A,c==null||c(A))}),x=Fe(A=>{function D(M,z,G){const L=z.find(F=>(F==null?void 0:F.toLocaleLowerCase().indexOf(G.toLocaleLowerCase()))===0);return L?M.indexOf(L):-1}const O=o.current;if(y.current.length>0&&y.current[0]!==" "&&(D(O,O,y.current)===-1?S(!1):A.key===" "&&Gn(A)),O==null||A.key.length!==1||A.ctrlKey||A.metaKey||A.altKey)return;i&&A.key!==" "&&(Gn(A),S(!0));const $=y.current==="";$&&(b.current=p??a??-1),O.every(M=>{var z,G;return M?((z=M[0])==null?void 0:z.toLocaleLowerCase())!==((G=M[1])==null?void 0:G.toLocaleLowerCase()):!0})&&y.current===A.key&&(y.current="",b.current=v.current),y.current+=A.key,m.start(h,()=>{y.current="",b.current=v.current,S(!1)});const j=$?p??a??-1:b.current,N=D(O,[...O.slice((j||0)+1),...O.slice(0,(j||0)+1)],y.current);N!==-1?(u==null||u(N),v.current=N):A.key!==" "&&(y.current="",S(!1))}),_=Fe(A=>{const D=A.relatedTarget,O=n.select("domReferenceElement"),$=n.select("floatingElement"),B=ht(O,D),j=ht($,D);B||j||(m.clear(),y.current="",b.current=v.current,S(!1))}),k=C.useMemo(()=>({onKeyDown:x,onBlur:_}),[x,_]),T=C.useMemo(()=>({onKeyDown:x,onKeyUp(A){A.key===" "&&S(!1)},onBlur:_}),[x,_,S]);return C.useMemo(()=>f?{reference:k,floating:T}:{},[f,k,T])}function t2(e,t){const[n,r]=e;let i=!1;const o=t.length;for(let a=0,u=o-1;a<o;u=a++){const[c,f]=t[a]||[0,0],[h,p]=t[u]||[0,0];f>=r!=p>=r&&n<=(h-c)*(r-f)/(p-f)+c&&(i=!i)}return i}function Yae(e,t){return e[0]>=t.x&&e[0]<=t.x+t.width&&e[1]>=t.y&&e[1]<=t.y+t.height}function rz(e={}){const{buffer:t=.5,blockPointerEvents:n=!1,requireIntent:r=!0}=e,i=new ss;let o=!1,a=null,u=null,c=typeof performance<"u"?performance.now():0;function f(p,m){const y=performance.now(),b=y-c;if(a===null||u===null||b===0)return a=p,u=m,c=y,null;const v=p-a,S=m-u,_=Math.sqrt(v*v+S*S)/b;return a=p,u=m,c=y,_}const h=({x:p,y:m,placement:y,elements:b,onClose:v,nodeId:S,tree:x})=>function(k){function T(){i.clear(),v()}if(i.clear(),!b.domReference||!b.floating||y==null||p==null||m==null)return;const{clientX:A,clientY:D}=k,O=[A,D],$=Yr(k),B=k.type==="mouseleave",j=ht(b.floating,$),N=ht(b.domReference,$),M=b.domReference.getBoundingClientRect(),z=b.floating.getBoundingClientRect(),G=y.split("-")[0],L=p>z.right-z.width/2,F=m>z.bottom-z.height/2,U=Yae(O,M),q=z.width>M.width,W=z.height>M.height,I=(q?M:z).left,Y=(q?M:z).right,J=(W?M:z).top,H=(W?M:z).bottom;if(j&&(o=!0,!B))return;if(N&&(o=!1),N&&!B){o=!0;return}if(B&&It(k.relatedTarget)&&ht(b.floating,k.relatedTarget)||x&&Ll(x.nodesRef.current,S).some(({context:he})=>he==null?void 0:he.open))return;if(G==="top"&&m>=M.bottom-1||G==="bottom"&&m<=M.top+1||G==="left"&&p>=M.right-1||G==="right"&&p<=M.left+1)return T();let ie=[];switch(G){case"top":ie=[[I,M.top+1],[I,z.bottom-1],[Y,z.bottom-1],[Y,M.top+1]];break;case"bottom":ie=[[I,z.top+1],[I,M.bottom-1],[Y,M.bottom-1],[Y,z.top+1]];break;case"left":ie=[[z.right-1,H],[z.right-1,J],[M.left+1,J],[M.left+1,H]];break;case"right":ie=[[M.right-1,H],[M.right-1,J],[z.left+1,J],[z.left+1,H]];break}function re([he,ve]){switch(G){case"top":{const Re=[q?he+t/2:L?he+t*4:he-t*4,ve+t+1],ce=[q?he-t/2:L?he+t*4:he-t*4,ve+t+1],je=[[z.left,L||q?z.bottom-t:z.top],[z.right,L?q?z.bottom-t:z.top:z.bottom-t]];return[Re,ce,...je]}case"bottom":{const Re=[q?he+t/2:L?he+t*4:he-t*4,ve-t],ce=[q?he-t/2:L?he+t*4:he-t*4,ve-t],je=[[z.left,L||q?z.top+t:z.bottom],[z.right,L?q?z.top+t:z.bottom:z.top+t]];return[Re,ce,...je]}case"left":{const Re=[he+t+1,W?ve+t/2:F?ve+t*4:ve-t*4],ce=[he+t+1,W?ve-t/2:F?ve+t*4:ve-t*4];return[...[[F||W?z.right-t:z.left,z.top],[F?W?z.right-t:z.left:z.right-t,z.bottom]],Re,ce]}case"right":{const Re=[he-t,W?ve+t/2:F?ve+t*4:ve-t*4],ce=[he-t,W?ve-t/2:F?ve+t*4:ve-t*4],je=[[F||W?z.left+t:z.right,z.top],[F?W?z.left+t:z.right:z.left+t,z.bottom]];return[Re,ce,...je]}default:return[]}}if(!t2([A,D],ie)){if(o&&!U)return T();if(!B&&r){const he=f(k.clientX,k.clientY);if(he!==null&&he<.1)return T()}t2([A,D],re([p,m]))?!o&&r&&i.start(40,T):T()}};return h.__options={blockPointerEvents:n},h}function Wae(e){const t=C.useRef(""),n=C.useCallback(i=>{i.defaultPrevented||(t.current=i.pointerType,e(i,i.pointerType))},[e]);return{onClick:C.useCallback(i=>{if(i.detail===0){e(i,"keyboard");return}"pointerType"in i?e(i,i.pointerType):e(i,t.current),t.current=""},[e]),onPointerDown:n}}function Kae(e){const[t,n]=C.useState(null),r=Fe((u,c)=>{e||n(c||(rF?"touch":""))}),i=C.useCallback(()=>{n(null)},[]),{onClick:o,onPointerDown:a}=Wae(r);return C.useMemo(()=>({openMethod:t,reset:i,triggerProps:{onClick:o,onPointerDown:a}}),[t,i,o,a])}let GC=(function(e){return e.open="data-open",e.closed="data-closed",e[e.startingStyle=Gl.startingStyle]="startingStyle",e[e.endingStyle=Gl.endingStyle]="endingStyle",e.anchorHidden="data-anchor-hidden",e.side="data-side",e.align="data-align",e})({}),zw=(function(e){return e.popupOpen="data-popup-open",e.pressed="data-pressed",e})({});const Xae={[zw.popupOpen]:""},Qae={[zw.popupOpen]:"",[zw.pressed]:""},Zae={[GC.open]:""},Jae={[GC.closed]:""},ele={[GC.anchorHidden]:""},tle={open(e){return e?Xae:null}},n2={open(e){return e?Qae:null}},iz={open(e){return e?Zae:Jae},anchorHidden(e){return e?ele:null}};function oz(e){return SC(19)?e:e?"true":void 0}const nle=C.forwardRef(function(t,n){const{cutout:r,...i}=t;let o;if(r){const a=r==null?void 0:r.getBoundingClientRect();o=`polygon(
|
|
469
|
-
0% 0%,
|
|
470
|
-
100% 0%,
|
|
471
|
-
100% 100%,
|
|
472
|
-
0% 100%,
|
|
473
|
-
0% 0%,
|
|
474
|
-
${a.left}px ${a.top}px,
|
|
475
|
-
${a.left}px ${a.bottom}px,
|
|
476
|
-
${a.right}px ${a.bottom}px,
|
|
477
|
-
${a.right}px ${a.top}px,
|
|
478
|
-
${a.left}px ${a.top}px
|
|
479
|
-
)`}return E.jsx("div",{ref:n,role:"presentation","data-base-ui-inert":"",...i,style:{position:"fixed",inset:0,userSelect:"none",WebkitUserSelect:"none",clipPath:o}})});function rle(e){const t=C.useRef(!0);t.current&&(t.current=!1,e())}function ile(e){const t=e.getBoundingClientRect(),n=window.getComputedStyle(e,"::before"),r=window.getComputedStyle(e,"::after");if(!(n.content!=="none"||r.content!=="none"))return t;const o=parseFloat(n.width)||0,a=parseFloat(n.height)||0,u=parseFloat(r.width)||0,c=parseFloat(r.height)||0,f=Math.max(t.width,o,u),h=Math.max(t.height,a,c),p=f-t.width,m=h-t.height;return{left:t.left-p/2,right:t.right+p/2,top:t.top-m/2,bottom:t.bottom+m/2}}const ole=e=>({name:"arrow",options:e,async fn(t){var W,I;const{x:n,y:r,placement:i,rects:o,platform:a,elements:u,middlewareData:c}=t,{element:f,padding:h=0,offsetParent:p="real"}=os(e,t)||{};if(f==null)return{};const m=dF(h),y={x:n,y:r},b=NC(i),v=PC(b),S=await a.getDimensions(f),x=b==="y",_=x?"top":"left",k=x?"bottom":"right",T=x?"clientHeight":"clientWidth",A=o.reference[v]+o.reference[b]-y[b]-o.floating[v],D=y[b]-o.reference[b],O=p==="real"?await((W=a.getOffsetParent)==null?void 0:W.call(a,f)):u.floating;let $=u.floating[T]||o.floating[v];(!$||!await((I=a.isElement)==null?void 0:I.call(a,O)))&&($=u.floating[T]||o.floating[v]);const B=A/2-D/2,j=$/2-S[v]/2-1,N=Math.min(m[_],j),M=Math.min(m[k],j),z=N,G=$-S[v]-M,L=$/2-S[v]/2+B,F=Ow(z,L,G),U=!c.arrow&&Na(i)!=null&&L!==F&&o.reference[v]/2-(L<z?N:M)-S[v]/2<0,q=U?L<z?L-z:L-G:0;return{[b]:y[b]+q,data:{[b]:F,centerOffset:L-F-q,...U&&{alignmentOffset:q}},reset:U}}}),sle=(e,t)=>({...ole(e),options:[e,t]}),ale={name:"hide",async fn(e){var u;const{width:t,height:n,x:r,y:i}=e.rects.reference,o=t===0&&n===0&&r===0&&i===0;return{data:{referenceHidden:((u=(await Yse().fn(e)).data)==null?void 0:u.referenceHidden)||o}}}},lle={sideX:"left",sideY:"top"};function sz(e,t,n){const 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 r2(e,t,n){const{rects:r,placement:i}=e;return{side:sz(t,Xr(i),n),align:Na(i)||"center",anchor:{width:r.reference.width,height:r.reference.height},positioner:{width:r.floating.width,height:r.floating.height}}}function ule(e){var Tt,ft;const{anchor:t,positionMethod:n="absolute",side:r="bottom",sideOffset:i=0,align:o="center",alignOffset:a=0,collisionBoundary:u,collisionPadding:c=5,sticky:f=!1,arrowPadding:h=5,disableAnchorTracking:p=!1,keepMounted:m=!1,floatingRootContext:y,mounted:b,collisionAvoidance:v,shiftCrossAxis:S=!1,nodeId:x,adaptiveOrigin:_,lazyFlip:k=!1,externalTree:T}=e,[A,D]=C.useState(null);!b&&A!==null&&D(null);const O=v.side||"flip",$=v.align||"flip",B=v.fallbackAxisSide||"end",j=typeof t=="function"?t:void 0,N=Fe(j),M=j?N:t,z=sr(t),L=qh()==="rtl",F=A||{top:"top",right:"right",bottom:"bottom",left:"left","inline-end":L?"left":"right","inline-start":L?"right":"left"}[r],U=o==="center"?F:`${F}-${o}`;let q=c;const W=1,I=r==="bottom"?W:0,Y=r==="top"?W:0,J=r==="right"?W:0,H=r==="left"?W:0;typeof q=="number"?q={top:q+I,right:q+H,bottom:q+Y,left:q+J}:q&&(q={top:(q.top||0)+I,right:(q.right||0)+H,bottom:(q.bottom||0)+Y,left:(q.left||0)+J});const ie={boundary:u==="clipping-ancestors"?"clippingAncestors":u,padding:q},re=C.useRef(null),he=sr(i),ve=sr(a),je=[Use(ut=>{const Rt=r2(ut,r,L),en=typeof he.current=="function"?he.current(Rt):he.current,Xt=typeof ve.current=="function"?ve.current(Rt):ve.current;return{mainAxis:en,crossAxis:Xt,alignmentAxis:Xt}},[typeof i!="function"?i:0,typeof a!="function"?a:0,L,r])],We=$==="none"&&O!=="shift",X=!We&&(f||S||O==="shift"),Z=O==="none"?null:Vse({...ie,padding:{top:q.top+W,right:q.right+W,bottom:q.bottom+W,left:q.left+W},mainAxis:!S&&O==="flip",crossAxis:$==="flip"?"alignment":!1,fallbackAxisSideDirection:B}),ne=We?null:Hse(ut=>{const Rt=Pt(ut.elements.floating).documentElement;return{...ie,rootBoundary:S?{x:0,y:0,width:Rt.clientWidth,height:Rt.clientHeight}:void 0,mainAxis:$!=="none",crossAxis:X,limiter:f||S?void 0:Gse(en=>{if(!re.current)return{};const{width:Xt,height:tn}=re.current.getBoundingClientRect(),bn=Si(Xr(en.placement)),ei=bn==="y"?Xt:tn,La=bn==="y"?q.left+q.right:q.top+q.bottom;return{offset:ei/2+La/2}})}},[ie,f,S,q,$]);O==="shift"||$==="shift"||o==="center"?je.push(ne,Z):je.push(Z,ne),je.push(qse({...ie,apply({elements:{floating:ut},rects:{reference:Rt},availableWidth:en,availableHeight:Xt}){const tn=ut.style;tn.setProperty("--available-width",`${en}px`),tn.setProperty("--available-height",`${Xt}px`),tn.setProperty("--anchor-width",`${Rt.width}px`),tn.setProperty("--anchor-height",`${Rt.height}px`)}}),sle(()=>({element:re.current||document.createElement("div"),padding:h,offsetParent:"floating"}),[h]),{name:"transformOrigin",fn(ut){var Ln,fo,cu;const{elements:Rt,middlewareData:en,placement:Xt,rects:tn,y:bn}=ut,ei=Xr(Xt),La=Si(ei),ki=re.current,Fa=((Ln=en.arrow)==null?void 0:Ln.x)||0,Ri=((fo=en.arrow)==null?void 0:fo.y)||0,lu=(ki==null?void 0:ki.clientWidth)||0,uu=(ki==null?void 0:ki.clientHeight)||0,fs=Fa+lu/2,_i=Ri+uu/2,za=Math.abs(((cu=en.shift)==null?void 0:cu.y)||0),Ba=tn.reference.height/2,Hi=typeof i=="function"?i(r2(ut,r,L)):i,Ua=za>Hi,Or={top:`${fs}px calc(100% + ${Hi}px)`,bottom:`${fs}px ${-Hi}px`,left:`calc(100% + ${Hi}px) ${_i}px`,right:`${-Hi}px ${_i}px`}[ei],on=`${fs}px ${tn.reference.y+Ba-bn}px`;return Rt.floating.style.setProperty("--transform-origin",X&&La==="y"&&Ua?on:Or),{}}},ale,_),Ve(()=>{!b&&y&&y.update({referenceElement:null,floatingElement:null,domReferenceElement:null})},[b,y]);const xe=C.useMemo(()=>({elementResize:!p&&typeof ResizeObserver<"u",layoutShift:!p&&typeof IntersectionObserver<"u"}),[p]),{refs:ge,elements:Ce,x:le,y:oe,middlewareData:me,update:ae,placement:Oe,context:Te,isPositioned:_e,floatingStyles:De}=Mae({rootContext:y,placement:U,middleware:je,strategy:n,whileElementsMounted:m?void 0:(...ut)=>XM(...ut,xe),nodeId:x,externalTree:T}),{sideX:ue,sideY:Se}=me.adaptiveOrigin||lle,ke=_e?n:"fixed",Pe=C.useMemo(()=>{const ut=_?{position:ke,[ue]:le,[Se]:oe}:{position:ke,...De};return _e||(ut.opacity=0),ut},[_,ke,ue,le,Se,oe,De,_e]),Le=C.useRef(null);Ve(()=>{if(!b)return;const ut=z.current,Rt=typeof ut=="function"?ut():ut,Xt=(i2(Rt)?Rt.current:Rt)||null||null;Xt!==Le.current&&(ge.setPositionReference(Xt),Le.current=Xt)},[b,ge,M,z]),C.useEffect(()=>{if(!b)return;const ut=z.current;typeof ut!="function"&&i2(ut)&&ut.current!==Le.current&&(ge.setPositionReference(ut.current),Le.current=ut.current)},[b,ge,M,z]),C.useEffect(()=>{if(m&&b&&Ce.domReference&&Ce.floating)return XM(Ce.domReference,Ce.floating,ae,xe)},[m,b,Ce,ae,xe]);const st=Xr(Oe),Ut=sz(r,st,L),Ot=Na(Oe)||"center",Me=!!((Tt=me.hide)!=null&&Tt.referenceHidden);Ve(()=>{k&&b&&_e&&D(st)},[k,b,_e,st]);const Qe=C.useMemo(()=>{var ut,Rt;return{position:"absolute",top:(ut=me.arrow)==null?void 0:ut.y,left:(Rt=me.arrow)==null?void 0:Rt.x}},[me.arrow]),Ne=((ft=me.arrow)==null?void 0:ft.centerOffset)!==0;return C.useMemo(()=>({positionerStyles:Pe,arrowStyles:Qe,arrowRef:re,arrowUncentered:Ne,side:Ut,align:Ot,physicalSide:st,anchorHidden:Me,refs:ge,context:Te,isPositioned:_e,update:ae}),[Pe,Qe,re,Ne,Ut,Ot,st,Me,ge,Te,_e,ae])}function i2(e){return e!=null&&"current"in e}function az(e){return e==="starting"?die:Tn}const lz={...QL,...Wh},cle=C.forwardRef(function(t,n){const{render:r,className:i,defaultOpen:o=!1,disabled:a=!1,onOpenChange:u,open:c,...f}=t,h=Fe(u),p=WL({open:c,defaultOpen:o,onOpenChange:h,disabled:a}),m=C.useMemo(()=>({open:p.open,disabled:p.disabled,transitionStatus:p.transitionStatus}),[p.open,p.disabled,p.transitionStatus]),y=C.useMemo(()=>({...p,onOpenChange:h,state:m}),[p,h,m]),b=dn("div",t,{state:m,ref:n,props:f,stateAttributesMapping:lz});return E.jsx(RC.Provider,{value:y,children:b})}),fle={...XL,...Wh},dle=C.forwardRef(function(t,n){const{panelId:r,open:i,handleTrigger:o,state:a,disabled:u}=Xy(),{className:c,disabled:f=u,id:h,render:p,nativeButton:m=!0,...y}=t,{getButtonProps:b,buttonRef:v}=yf({disabled:f,focusableWhenDisabled:!0,native:m}),S=C.useMemo(()=>({"aria-controls":i?r:void 0,"aria-expanded":i,onClick:o}),[r,i,o]);return dn("button",t,{state:a,ref:[n,v],props:[S,y,b],stateAttributesMapping:fle})});let o2=(function(e){return e.collapsiblePanelHeight="--collapsible-panel-height",e.collapsiblePanelWidth="--collapsible-panel-width",e})({});const hle=C.forwardRef(function(t,n){const{className:r,hiddenUntilFound:i,keepMounted:o,render:a,id:u,...c}=t,{abortControllerRef:f,animationTypeRef:h,height:p,mounted:m,onOpenChange:y,open:b,panelId:v,panelRef:S,runOnceAnimationsFinish:x,setDimensions:_,setHiddenUntilFound:k,setKeepMounted:T,setMounted:A,setPanelIdState:D,setOpen:O,setVisible:$,state:B,transitionDimensionRef:j,visible:N,width:M,transitionStatus:z}=Xy(),G=i??!1,L=o??!1;Ve(()=>{if(u)return D(u),()=>{D(void 0)}},[u,D]),Ve(()=>{k(G)},[k,G]),Ve(()=>{T(L)},[T,L]);const{props:F}=DF({abortControllerRef:f,animationTypeRef:h,externalRef:n,height:p,hiddenUntilFound:G,id:v,keepMounted:L,mounted:m,onOpenChange:y,open:b,panelRef:S,runOnceAnimationsFinish:x,setDimensions:_,setMounted:A,setOpen:O,setVisible:$,transitionDimensionRef:j,visible:N,width:M});Zh({open:b&&z==="idle",ref:S,onComplete(){b&&_({height:void 0,width:void 0})}});const U=C.useMemo(()=>({...B,transitionStatus:z}),[B,z]),q=dn("div",t,{state:U,ref:[n,S],props:[F,{style:{[o2.collapsiblePanelHeight]:p===void 0?"auto":`${p}px`,[o2.collapsiblePanelWidth]:M===void 0?"auto":`${M}px`}},c],stateAttributesMapping:lz});return L||G||!L&&m?q:null}),ple=C.createContext(void 0);function ib(e=!0){const t=C.useContext(ple);if(t===void 0&&!e)throw new Error(dr(25));return t}const uz=C.createContext(void 0);function VC(e){const t=C.useContext(uz);if(t===void 0&&!e)throw new Error(dr(33));return t}const cz=C.createContext(void 0);function us(e){const t=C.useContext(cz);if(t===void 0&&!e)throw new Error(dr(36));return t}function mle(e){const{closeOnClick:t,highlighted:n,id:r,nodeId:i,store:o,itemRef:a,itemMetadata:u}=e,{events:c}=o.useState("floatingTreeRoot"),f=ib(!0),h=f!==void 0;return C.useMemo(()=>({id:r,role:"menuitem",tabIndex:n?0:-1,onMouseMove(p){i&&c.emit("itemhover",{nodeId:i,target:p.currentTarget})},onClick(p){t&&c.emit("close",{domEvent:p,reason:qL})},onMouseUp(p){if(f){const m=f.initialCursorPointRef.current;if(f.initialCursorPointRef.current=null,h&&m&&Math.abs(p.clientX-m.x)<=1&&Math.abs(p.clientY-m.y)<=1)return}a.current&&o.context.allowMouseUpTriggerRef.current&&(!h||p.button===2)&&(!u||u.type==="regular-item")&&a.current.click()}}),[t,n,r,c,i,o,a,f,h,u])}const gle={type:"regular-item"};function fz(e){const{closeOnClick:t,disabled:n=!1,highlighted:r,id:i,store:o,nativeButton:a,itemMetadata:u,nodeId:c}=e,f=C.useRef(null),{getButtonProps:h,buttonRef:p}=yf({disabled:n,focusableWhenDisabled:!0,native:a}),m=mle({closeOnClick:t,highlighted:r,id:i,nodeId:c,store:o,itemRef:f,itemMetadata:u}),y=C.useCallback(v=>ch(m,{onMouseEnter(){u.type==="submenu-trigger"&&u.setActive()},onKeyUp(S){S.key===" "&&o.context.typingRef.current&&S.preventBaseUIHandler()}},v,h),[m,h,o,u]),b=rs(f,p);return C.useMemo(()=>({getItemProps:y,itemRef:b}),[y,b])}const yle=C.forwardRef(function(t,n){const{render:r,className:i,id:o,label:a,nativeButton:u=!1,disabled:c=!1,closeOnClick:f=!0,...h}=t,p=Kh({label:a}),m=VC(!0),y=is(o),{store:b}=us(),v=b.useState("isActive",p.index),S=b.useState("itemProps"),{getItemProps:x,itemRef:_}=fz({closeOnClick:f,disabled:c,highlighted:v,id:y,store:b,nativeButton:u,nodeId:m==null?void 0:m.nodeId,itemMetadata:gle});return dn("div",t,{state:{disabled:c,highlighted:v},props:[S,h,x],ref:[_,n,p.ref]})}),ble=C.createContext(void 0);function dz(e){return C.useContext(ble)}const vle={...iz,...Wh},xle=C.forwardRef(function(t,n){const{render:r,className:i,finalFocus:o,...a}=t,{store:u}=us(),{side:c,align:f}=VC(),h=dz()!=null,p=u.useState("open"),m=u.useState("transitionStatus"),y=u.useState("popupProps"),b=u.useState("mounted"),v=u.useState("instantType"),S=u.useState("activeTriggerElement"),x=u.useState("parent"),_=u.useState("lastOpenChangeReason"),k=u.useState("rootId"),T=u.useState("floatingRootContext"),A=u.useState("floatingTreeRoot"),D=u.useState("closeDelay"),O=u.useState("activeTriggerElement"),$=x.type==="context-menu";Zh({open:p,ref:u.context.popupRef,onComplete(){var G,L;p&&((L=(G=u.context).onOpenChangeComplete)==null||L.call(G,!0))}}),C.useEffect(()=>{function G(L){u.setOpen(!1,mt(L.reason,L.domEvent))}return A.events.on("close",G),()=>{A.events.off("close",G)}},[A.events,u]);const B=u.useState("hoverEnabled"),j=u.useState("disabled");jae(T,{enabled:B&&!j&&!$&&x.type!=="menubar",closeDelay:D});const N={transitionStatus:m,side:c,align:f,open:p,nested:x.type==="menu",instant:v},M=dn("div",t,{state:N,ref:[n,u.context.popupRef],stateAttributesMapping:vle,props:[y,{onKeyDown(G){h&&_oe.has(G.key)&&G.stopPropagation()}},az(m),a,{"data-rootownerid":k}]});let z=x.type===void 0||$;return(S||x.type==="menubar"&&_!==CC)&&(z=!0),E.jsx(sse,{context:T,modal:$,disabled:!b,returnFocus:o===void 0?z:o,initialFocus:x.type!=="menu",restoreFocus:!0,externalTree:x.type!=="menubar"?A:void 0,previousFocusableElement:O,nextFocusableElement:x.type===void 0?u.context.triggerFocusTargetRef:void 0,beforeContentFocusGuardRef:x.type===void 0?u.context.beforeContentFocusGuardRef:void 0,children:M})}),hz=C.createContext(void 0);function wle(){const e=C.useContext(hz);if(e===void 0)throw new Error(dr(32));return e}const Sle=C.forwardRef(function(t,n){const{keepMounted:r=!1,...i}=t,{store:o}=us();return o.useState("mounted")||r?E.jsx(hz.Provider,{value:r,children:E.jsx(tse,{ref:n,...i})}):null}),Cle=C.forwardRef(function(t,n){var We;const{anchor:r,positionMethod:i="absolute",className:o,render:a,side:u,align:c,sideOffset:f=0,alignOffset:h=0,collisionBoundary:p="clipping-ancestors",collisionPadding:m=5,arrowPadding:y=5,sticky:b=!1,disableAnchorTracking:v=!1,collisionAvoidance:S=pie,...x}=t,{store:_}=us(),k=wle(),T=ib(!0),A=_.useState("parent"),D=_.useState("floatingRootContext"),O=_.useState("floatingTreeRoot"),$=_.useState("mounted"),B=_.useState("open"),j=_.useState("modal"),N=_.useState("activeTriggerElement"),M=_.useState("transitionStatus"),z=_.useState("lastOpenChangeReason"),G=_.useState("floatingNodeId"),L=_.useState("floatingParentNodeId");let F=r,U=f,q=h,W=c,I=S;A.type==="context-menu"&&(F=r??((We=A.context)==null?void 0:We.anchor),W=W??"start",!u&&W!=="center"&&(q=t.alignOffset??2,U=t.sideOffset??-5));let Y=u,J=W;A.type==="menu"?(Y=Y??"inline-end",J=J??"start",I=t.collisionAvoidance??mie):A.type==="menubar"&&(Y=Y??"bottom",J=J??"start");const H=A.type==="context-menu",ie=ule({anchor:F,floatingRootContext:D,positionMethod:T?"fixed":i,mounted:$,side:Y,sideOffset:U,align:J,alignOffset:q,arrowPadding:H?0:y,collisionBoundary:p,collisionPadding:m,sticky:b,nodeId:G,keepMounted:k,disableAnchorTracking:v,collisionAvoidance:I,shiftCrossAxis:H&&!("side"in I&&I.side==="flip"),externalTree:O}),re=C.useMemo(()=>{const X={};return B||(X.pointerEvents="none"),{role:"presentation",hidden:!$,style:{...ie.positionerStyles,...X}}},[B,$,ie.positionerStyles]);C.useEffect(()=>{function X(Z){Z.open&&(Z.parentNodeId===G&&_.set("hoverEnabled",!1),Z.nodeId!==G&&Z.parentNodeId===_.select("floatingParentNodeId")&&_.setOpen(!1,mt(xg)))}return O.events.on("menuopenchange",X),()=>{O.events.off("menuopenchange",X)}},[_,O.events,G]),C.useEffect(()=>{if(_.select("floatingParentNodeId")==null)return;function X(Z){if(Z.open||Z.nodeId!==_.select("floatingParentNodeId"))return;const ne=Z.reason??xg;_.setOpen(!1,mt(ne))}return O.events.on("menuopenchange",X),()=>{O.events.off("menuopenchange",X)}},[O.events,_]),C.useEffect(()=>{function X(Z){!B||Z.nodeId!==_.select("floatingParentNodeId")||Z.target&&N&&N!==Z.target&&_.setOpen(!1,mt(xg))}return O.events.on("itemhover",X),()=>{O.events.off("itemhover",X)}},[O.events,B,N,_]),C.useEffect(()=>{const X={open:B,nodeId:G,parentNodeId:L,reason:_.select("lastOpenChangeReason")};O.events.emit("menuopenchange",X)},[O.events,B,_,G,L]);const he={open:B,side:ie.side,align:ie.align,anchorHidden:ie.anchorHidden,nested:A.type==="menu"},ve=C.useMemo(()=>({side:ie.side,align:ie.align,arrowRef:ie.arrowRef,arrowUncentered:ie.arrowUncentered,arrowStyles:ie.arrowStyles,nodeId:ie.context.nodeId}),[ie.side,ie.align,ie.arrowRef,ie.arrowUncentered,ie.arrowStyles,ie.context.nodeId]),Re=dn("div",t,{state:he,stateAttributesMapping:iz,ref:[n,_.useStateSetter("positionerElement")],props:[re,az(M),x]}),ce=$&&A.type!=="menu"&&(A.type!=="menubar"&&j&&z!==qr||A.type==="menubar"&&A.context.modal);let je=null;return A.type==="menubar"?je=A.context.contentElement:A.type===void 0&&(je=N),E.jsxs(uz.Provider,{value:ve,children:[ce&&E.jsx(nle,{ref:A.type==="context-menu"||A.type==="nested-context-menu"?A.context.internalBackdropRef:null,inert:oz(!B),cutout:je}),E.jsx(Yoe,{id:G,children:E.jsx(Wy,{elementsRef:_.context.itemDomElements,labelsRef:_.context.itemLabels,children:Re})})]})}),Ele=C.createContext(null);function pz(e){return C.useContext(Ele)}const kle={...Aae,disabled:vt(e=>e.parent.type==="menubar"&&e.parent.context.disabled||e.disabled),modal:vt(e=>(e.parent.type===void 0||e.parent.type==="context-menu")&&(e.modal??!0)),allowMouseEnter:vt(e=>e.allowMouseEnter),stickIfOpen:vt(e=>e.stickIfOpen),parent:vt(e=>e.parent),rootId:vt(e=>e.parent.type==="menu"?e.parent.store.select("rootId"):e.parent.type!==void 0?e.parent.context.rootId:e.rootId),activeIndex:vt(e=>e.activeIndex),isActive:vt((e,t)=>e.activeIndex===t),hoverEnabled:vt(e=>e.hoverEnabled),instantType:vt(e=>e.instantType),lastOpenChangeReason:vt(e=>e.openChangeReason),floatingTreeRoot:vt(e=>e.parent.type==="menu"?e.parent.store.select("floatingTreeRoot"):e.floatingTreeRoot),floatingNodeId:vt(e=>e.floatingNodeId),floatingParentNodeId:vt(e=>e.floatingParentNodeId),itemProps:vt(e=>e.itemProps),closeDelay:vt(e=>e.closeDelay),keyboardEventRelay:vt(e=>{if(e.keyboardEventRelay)return e.keyboardEventRelay;if(e.parent.type==="menu")return e.parent.store.select("keyboardEventRelay")})};class qC extends JF{constructor(n){super({...Rle(),...n},{positionerRef:C.createRef(),popupRef:C.createRef(),typingRef:{current:!1},itemDomElements:{current:[]},itemLabels:{current:[]},allowMouseUpTriggerRef:{current:!1},triggerFocusTargetRef:C.createRef(),beforeContentFocusGuardRef:C.createRef(),onOpenChangeComplete:void 0,triggerElements:new BC},kle);te(this,"unsubscribeParentListener",null);this.unsubscribeParentListener=this.observe("parent",r=>{var i;if((i=this.unsubscribeParentListener)==null||i.call(this),r.type==="menu"){this.unsubscribeParentListener=r.store.subscribe(()=>{this.notifyAll()}),this.context.allowMouseUpTriggerRef=r.store.context.allowMouseUpTriggerRef;return}r.type!==void 0&&(this.context.allowMouseUpTriggerRef=r.context.allowMouseUpTriggerRef),this.unsubscribeParentListener=null})}setOpen(n,r){this.state.floatingRootContext.context.events.emit("setOpen",{open:n,eventDetails:r})}static useStore(n,r){const i=Tr(()=>new qC(r)).current;return n??i}}function Rle(){return{...Tae(),disabled:!1,modal:!0,allowMouseEnter:!1,stickIfOpen:!0,parent:{type:void 0},rootId:void 0,activeIndex:null,hoverEnabled:!0,instantType:void 0,openChangeReason:null,floatingTreeRoot:new jC,floatingNodeId:void 0,floatingParentNodeId:null,itemProps:Tn,keyboardEventRelay:void 0,closeDelay:0}}const mz=C.createContext(void 0);function gz(){return C.useContext(mz)}const yz=QF(function(t){const{children:n,open:r,onOpenChange:i,onOpenChangeComplete:o,defaultOpen:a=!1,disabled:u=!1,modal:c,loopFocus:f=!0,orientation:h="vertical",actionsRef:p,closeParentOnEsc:m=!1,handle:y,triggerId:b,defaultTriggerId:v=null,highlightItemOnHover:S=!0}=t,x=ib(!0),_=us(!0),k=pz(!0),T=gz(),A=C.useMemo(()=>T&&_?{type:"menu",store:_.store}:k?{type:"menubar",context:k}:x&&!_?{type:"context-menu",context:x}:{type:void 0},[x,_,k,T]),D=qC.useStore(y==null?void 0:y.store,{open:a,openProp:r,activeTriggerId:v,triggerIdProp:b,parent:A});rle(()=>{r===void 0&&D.state.open===!1&&a===!0&&D.update({open:!0,activeTriggerId:v})}),D.useControlledProp("openProp",r),D.useControlledProp("triggerIdProp",b),D.useContextCallback("onOpenChangeComplete",o);const O=D.useState("floatingTreeRoot"),$=PF(O),B=ls();Ve(()=>{x&&!_?D.update({parent:{type:"context-menu",context:x},floatingNodeId:$,floatingParentNodeId:B}):_&&D.update({floatingNodeId:$,floatingParentNodeId:B})},[x,_,$,B,D]);const j=D.useState("open"),N=D.useState("activeTriggerElement"),M=D.useState("positionerElement"),z=D.useState("hoverEnabled"),G=D.useState("modal"),L=D.useState("disabled"),F=D.useState("lastOpenChangeReason"),U=D.useState("parent"),q=D.useState("activeIndex"),W=D.useState("payload"),I=D.useState("floatingParentNodeId"),Y=C.useRef(null),J=I!=null;let H;D.useSyncedValues({disabled:u,modal:U.type===void 0?c:void 0,rootId:ou()});const{openMethod:ie,triggerProps:re,reset:he}=Kae(j);kae(D);const{forceUnmount:ve}=Rae(j,D,()=>{D.update({allowMouseEnter:!1,stickIfOpen:!0}),he()}),Re=C.useRef(U.type!=="context-menu"),ce=Ui();C.useEffect(()=>{if(j||(Y.current=null),U.type==="context-menu"){if(!j){ce.clear(),Re.current=!1;return}ce.start(500,()=>{Re.current=!0})}},[ce,j,U.type]),Voe(j&&G&&F!==qr&&ie!=="touch",M),Ve(()=>{!j&&!z&&D.set("hoverEnabled",!0)},[j,z,D]);const je=C.useRef(!0),We=Ui(),X=Fe((Me,Qe)=>{var tn;const Ne=Qe.reason;if(j===Me&&Qe.trigger===N&&F===Ne||(Qe.preventUnmountOnClose=()=>{D.set("preventUnmountingOnClose",!0)},!Me&&Qe.trigger==null&&(Qe.trigger=N??void 0),i==null||i(Me,Qe),Qe.isCanceled))return;const Tt={open:Me,nativeEvent:Qe.event,reason:Qe.reason,nested:J};H==null||H.emit("openchange",Tt);const ft=Qe.event;if(Me===!1&&(ft==null?void 0:ft.type)==="click"&&ft.pointerType==="touch"&&!je.current)return;if(!Me&&q!==null){const bn=D.context.itemDomElements.current[q];queueMicrotask(()=>{bn==null||bn.setAttribute("tabindex","-1")})}Me&&Ne===Ud?(je.current=!1,We.start(300,()=>{je.current=!0})):(je.current=!0,We.clear());const ut=(Ne===Vc||Ne===qL)&&ft.detail===0&&(ft==null?void 0:ft.isTrusted),Rt=!Me&&(Ne===EC||Ne==null),en={open:Me,openChangeReason:Ne};Y.current=Qe.event??null;const Xt=((tn=Qe.trigger)==null?void 0:tn.id)??null;(Xt||Me)&&(en.activeTriggerId=Xt,en.activeTriggerElement=Qe.trigger??null),D.update(en),U.type==="menubar"&&(Ne===Ud||Ne===qc||Ne===qr||Ne===vg||Ne===xg)?D.set("instantType","group"):ut||Rt?D.set("instantType",ut?"click":"dismiss"):D.set("instantType",void 0)}),Z=C.useCallback(Me=>{const Qe=mt(Me);return Qe.preventUnmountOnClose=()=>{D.set("preventUnmountingOnClose",!0)},Qe},[D]),ne=C.useCallback(()=>{D.setOpen(!1,Z(Sie))},[D,Z]);C.useImperativeHandle(p,()=>({unmount:ve,close:ne}),[ve,ne]);let xe;U.type==="context-menu"&&(xe=U.context),C.useImperativeHandle(xe==null?void 0:xe.positionerRef,()=>M,[M]),C.useImperativeHandle(xe==null?void 0:xe.actionsRef,()=>({setOpen:X}),[X]);const ge=Oae({popupStore:D,onOpenChange:X});H=ge.context.events,C.useEffect(()=>{const Me=({open:Qe,eventDetails:Ne})=>X(Qe,Ne);return H.on("setOpen",Me),()=>{H==null||H.off("setOpen",Me)}},[H,X]);const Ce=Xse(ge,{enabled:!L,bubbles:{escapeKey:m&&U.type==="menu"},outsidePress(){var Me;return U.type!=="context-menu"||((Me=Y.current)==null?void 0:Me.type)==="contextmenu"?!0:Re.current},externalTree:J?O:void 0}),le=Vae(ge,{role:"menu"}),oe=qh(),me=C.useCallback(Me=>{D.select("activeIndex")!==Me&&D.set("activeIndex",Me)},[D]),ae=Hae(ge,{enabled:!L,listRef:D.context.itemDomElements,activeIndex:q,nested:U.type!==void 0,loopFocus:f,orientation:h,parentOrientation:U.type==="menubar"?U.context.orientation:void 0,rtl:oe==="rtl",disabledIndices:Hc,onNavigate:me,openOnArrowKeyDown:U.type!=="context-menu",externalTree:J?O:void 0,focusItemOnHover:S}),Oe=C.useCallback(Me=>{D.context.typingRef.current=Me},[D]),Te=qae(ge,{listRef:D.context.itemLabels,activeIndex:q,resetMs:cie,onMatch:Me=>{j&&Me!==q&&D.set("activeIndex",Me)},onTypingChange:Oe}),{getReferenceProps:_e,getFloatingProps:De,getItemProps:ue,getTriggerProps:Se}=HC([Ce,le,ae,Te]),ke=C.useMemo(()=>{const Me=ch(_e(),{onMouseMove(){D.set("allowMouseEnter",!0)}},re);return delete Me.role,Me},[_e,D,re]),Pe=C.useMemo(()=>{const Me=Se();if(!Me)return Me;const Qe=ch(Me,re);return delete Qe.role,delete Qe["aria-controls"],Qe},[Se,re]),Le=C.useMemo(()=>De({onMouseMove(){D.set("allowMouseEnter",!0),U.type==="menu"&&D.set("hoverEnabled",!1)},onClick(){D.select("hoverEnabled")&&D.set("hoverEnabled",!1)},onKeyDown(Me){const Qe=D.select("keyboardEventRelay");Qe&&!Me.isPropagationStopped()&&Qe(Me)}}),[De,U.type,D]),st=C.useMemo(()=>ue(),[ue]);D.useSyncedValues({floatingRootContext:ge,activeTriggerProps:ke,inactiveTriggerProps:Pe,popupProps:Le,itemProps:st});const Ut=C.useMemo(()=>({store:D,parent:A}),[D,A]),Ot=E.jsx(cz.Provider,{value:Ut,children:typeof n=="function"?n({payload:W}):n});return U.type===void 0||U.type==="context-menu"?E.jsx(Woe,{externalTree:O,children:Ot}):Ot});function _le(e){const t=us().store,n=C.useMemo(()=>({parentMenu:t}),[t]);return E.jsx(mz.Provider,{value:n,children:E.jsx(yz,{...e})})}function bz(e={}){const{highlightItemOnHover:t,highlightedIndex:n,onHighlightedIndexChange:r}=MC(),{ref:i,index:o}=Kh(e),a=n===o,u=C.useRef(null),c=rs(i,u);return{compositeProps:C.useMemo(()=>({tabIndex:a?0:-1,onFocus(){r(o)},onMouseMove(){const h=u.current;if(!t||!h)return;const p=h.hasAttribute("disabled")||h.ariaDisabled==="true";!a&&!p&&h.focus()}}),[a,r,o,t]),compositeRef:c,index:o}}function vz(e){const{render:t,className:n,state:r=Tn,props:i=Hc,refs:o=Hc,metadata:a,stateAttributesMapping:u,tag:c="div",...f}=e,{compositeProps:h,compositeRef:p}=bz({metadata:a});return dn(c,e,{state:r,ref:[...o,p],props:[h,...i,f],stateAttributesMapping:u})}function xz(e){if(Jt(e)&&e.hasAttribute("data-rootownerid"))return e.getAttribute("data-rootownerid")??void 0;if(!oo(e))return xz(ao(e))}function Tle(e){const{enabled:t=!0,mouseDownAction:n,open:r}=e,i=C.useRef(!1);return C.useMemo(()=>t?{onMouseDown:o=>{(n==="open"&&!r||n==="close"&&r)&&(i.current=!0,Pt(o.currentTarget).addEventListener("click",()=>{i.current=!1},{once:!0}))},onClick:o=>{i.current&&(i.current=!1,o.preventBaseUIHandler())}}:Tn,[t,n,r])}const Wm=2,Ale=pae(function(t,n){const{render:r,className:i,disabled:o=!1,nativeButton:a=!0,id:u,openOnHover:c,delay:f=100,closeDelay:h=0,handle:p,payload:m,...y}=t,b=us(!0),v=(p==null?void 0:p.store)??(b==null?void 0:b.store);if(!v)throw new Error(dr(85));const S=is(u),x=v.useState("isTriggerActive",S),_=v.useState("floatingRootContext"),k=v.useState("isOpenedByTrigger",S),T=C.useRef(null),A=Mle(),D=MC(!0),O=Ia(),$=C.useMemo(()=>O??new jC,[O]),B=PF($),j=ls(),{registerTrigger:N,isMountedByThisTrigger:M}=Eae(S,T,v,{payload:m,closeDelay:h,parent:A,floatingTreeRoot:$,floatingNodeId:B,floatingParentNodeId:j,keyboardEventRelay:D==null?void 0:D.relayKeyboardEvent}),z=A.type==="menubar",G=v.useState("disabled"),L=o||G||z&&A.context.disabled,{getButtonProps:F,buttonRef:U}=yf({disabled:L,native:a});C.useEffect(()=>{!k&&A.type===void 0&&(v.context.allowMouseUpTriggerRef.current=!1)},[v,k,A.type]);const q=C.useRef(null),W=Ui(),I=Fe(Ce=>{if(!q.current)return;W.clear(),v.context.allowMouseUpTriggerRef.current=!1;const le=Ce.target;if(ht(q.current,le)||ht(v.select("positionerElement"),le)||le===q.current||le!=null&&xz(le)===v.select("rootId"))return;const oe=ile(q.current);Ce.clientX>=oe.left-Wm&&Ce.clientX<=oe.right+Wm&&Ce.clientY>=oe.top-Wm&&Ce.clientY<=oe.bottom+Wm||$.events.emit("close",{domEvent:Ce,reason:wie})});C.useEffect(()=>{k&&v.select("lastOpenChangeReason")===qr&&Pt(q.current).addEventListener("mouseup",I,{once:!0})},[k,I,v]);const Y=z&&A.context.hasSubmenuOpen,H=nz(_,{enabled:(c??Y)&&!L&&A.type!=="context-menu"&&(!z||Y&&!M),handleClose:rz({blockPointerEvents:!z}),mouseOnly:!0,move:!1,restMs:A.type===void 0?f:void 0,delay:{close:h},triggerElementRef:T,externalTree:$,isActiveTrigger:x}),ie=Dle(k,v.select("lastOpenChangeReason")),re=FF(_,{enabled:!L&&A.type!=="context-menu",event:k&&z?"click":"mousedown",toggle:!0,ignoreMouse:!1,stickIfOpen:A.type===void 0?ie:!1}),he=$ae(_,{enabled:!L&&Y}),ve=Tle({open:k,enabled:z,mouseDownAction:"open"}),Re=HC([re,he]),ce={disabled:L,open:k},je=v.useState("triggerProps",M),We=[q,n,U,N,T],X=[Re.getReferenceProps(),H??Tn,je,{"aria-haspopup":"menu",id:S,onMouseDown:Ce=>{if(v.select("open"))return;W.start(200,()=>{v.context.allowMouseUpTriggerRef.current=!0}),Pt(Ce.currentTarget).addEventListener("mouseup",I,{once:!0})}},z?{role:"menuitem"}:{},ve,y,F],Z=C.useRef(null),ne=Fe(Ce=>{yn.flushSync(()=>{v.setOpen(!1,mt(qc,Ce.nativeEvent,Ce.currentTarget))});const le=Soe(Z.current);le==null||le.focus()}),xe=Fe(Ce=>{var oe;const le=v.select("positionerElement");if(le&&xc(Ce,le))(oe=v.context.beforeContentFocusGuardRef.current)==null||oe.focus();else{yn.flushSync(()=>{v.setOpen(!1,mt(qc,Ce.nativeEvent,Ce.currentTarget))});let me=woe(v.context.triggerFocusTargetRef.current||T.current);for(;me!==null&&ht(le,me);){const ae=me;if(me=IC(me),me===ae)break}me==null||me.focus()}}),ge=dn("button",t,{enabled:!z,stateAttributesMapping:n2,state:ce,ref:We,props:X});return z?E.jsx(vz,{tag:"button",render:r,className:i,state:ce,refs:We,props:X,stateAttributesMapping:n2}):k?E.jsxs(C.Fragment,{children:[E.jsx(Zc,{ref:Z,onFocus:ne},`${S}-pre-focus-guard`),E.jsx(C.Fragment,{children:ge},S),E.jsx(Zc,{ref:v.context.triggerFocusTargetRef,onFocus:xe},`${S}-post-focus-guard`)]}):E.jsx(C.Fragment,{children:ge},S)});function Dle(e,t){const n=Ui(),[r,i]=C.useState(!1);return Ve(()=>{e&&t==="trigger-hover"?(i(!0),n.start(fie,()=>{i(!1)})):e||(n.clear(),i(!1))},[e,t,n]),r}function Mle(){const e=ib(!0),t=us(!0),n=pz();return C.useMemo(()=>n?{type:"menubar",context:n}:e&&!t?{type:"context-menu",context:e}:{type:void 0},[e,t,n])}const Ole=C.forwardRef(function(t,n){const{render:r,className:i,label:o,id:a,nativeButton:u=!1,openOnHover:c=!0,delay:f=100,closeDelay:h=0,disabled:p=!1,...m}=t,y=Kh(),b=VC(),{store:v}=us(),S=is(a),x=v.useState("open"),_=v.useState("floatingRootContext"),k=v.useState("floatingTreeRoot"),T=ez(S,v),A=C.useCallback(re=>{const he=T(re);return re!==null&&v.select("open")&&v.select("activeTriggerId")==null&&v.update({activeTriggerId:S,activeTriggerElement:re,closeDelay:h}),he},[T,h,v,S]),D=C.useRef(null),O=C.useCallback(re=>{D.current=re,v.set("activeTriggerElement",re)},[v]),$=gz();if(!($!=null&&$.parentMenu))throw new Error(dr(37));v.useSyncedValue("closeDelay",h);const B=$.parentMenu,j=B.useState("itemProps"),N=B.useState("isActive",y.index),M=C.useMemo(()=>({type:"submenu-trigger",setActive(){B.set("activeIndex",y.index)}}),[B,y.index]),z=v.useState("disabled"),G=p||z,{getItemProps:L,itemRef:F}=fz({closeOnClick:!1,disabled:G,highlighted:N,id:S,store:v,nativeButton:u,itemMetadata:M,nodeId:b==null?void 0:b.nodeId}),U=v.useState("hoverEnabled"),q=B.useState("allowMouseEnter"),W=nz(_,{enabled:U&&c&&!G,handleClose:rz({blockPointerEvents:!0}),mouseOnly:!0,move:!0,restMs:f,delay:q?{open:f,close:h}:0,triggerElementRef:D,externalTree:k}),I=FF(_,{enabled:!G,event:"mousedown",toggle:!c,ignoreMouse:c,stickIfOpen:!1}),Y=HC([I]),J=v.useState("triggerProps",!0);return delete J.id,dn("div",t,{state:{disabled:G,highlighted:N,open:x},stateAttributesMapping:tle,props:[Y.getReferenceProps(),W,J,j,{tabIndex:x||N?0:-1,onBlur(){N&&B.set("activeIndex",null)}},m,L],ref:[n,y.ref,F,A,O]})}),$le=C.createContext(void 0),Ple={disableStyleElements:!1};function Nle(){return C.useContext($le)??Ple}const wz="data-composite-item-active",Ile=[];function jle(e){const{itemSizes:t,cols:n=1,loopFocus:r=!0,dense:i=!1,orientation:o="both",direction:a,highlightedIndex:u,onHighlightedIndexChange:c,rootRef:f,enableHomeAndEndKeys:h=!1,stopEventPropagation:p=!1,disabledIndices:m,modifierKeys:y=Ile}=e,[b,v]=C.useState(0),S=n>1,x=C.useRef(null),_=rs(x,f),k=C.useRef([]),T=C.useRef(!1),A=u??b,D=Fe((B,j=!1)=>{if((c??v)(B),j){const N=k.current[B];PM(x.current,N,a,o)}}),O=Fe(B=>{if(B.size===0||T.current)return;T.current=!0;const j=Array.from(B.keys()),N=j.find(z=>z==null?void 0:z.hasAttribute(wz))??null,M=N?j.indexOf(N):-1;M!==-1&&D(M),PM(x.current,N,a,o)}),$=C.useMemo(()=>({"aria-orientation":o==="both"?void 0:o,ref:_,onFocus(B){!x.current||!$M(B.target)||B.target.setSelectionRange(0,B.target.value.length??0)},onKeyDown(B){const j=h?Roe:AF;if(!j.has(B.key)||Lle(B,y)||!x.current)return;const M=a==="rtl",z=M?Vl:xa,G={horizontal:z,vertical:Yo,both:z}[o],L=M?xa:Vl,F={horizontal:L,vertical:va,both:L}[o];if($M(B.target)&&!Rw(B.target)){const H=B.target.selectionStart,ie=B.target.selectionEnd,re=B.target.value??"";if(H==null||B.shiftKey||H!==ie||B.key!==F&&H<re.length||B.key!==G&&H>0)return}let U=A;const q=wg(k,m),W=Pw(k,m);if(S){const H=t||Array.from({length:k.current.length},()=>({width:1,height:1})),ie=pF(H,n,i),re=ie.findIndex(ve=>ve!=null&&!ba(k,ve,m)),he=ie.reduce((ve,Re,ce)=>Re!=null&&!ba(k,Re,m)?ce:ve,-1);U=ie[hF({current:ie.map(ve=>ve?k.current[ve]:null)},{event:B,orientation:o,loopFocus:r,cols:n,disabledIndices:gF([...m||k.current.map((ve,Re)=>ba(k,Re)?Re:void 0),void 0],ie),minIndex:re,maxIndex:he,prevIndex:mF(A>W?q:A,H,ie,n,B.key===Yo?"bl":B.key===xa?"tr":"tl"),rtl:M})]}const I={horizontal:[z],vertical:[Yo],both:[z,Yo]}[o],Y={horizontal:[L],vertical:[va],both:[L,va]}[o],J=S?j:{horizontal:h?Eoe:_F,vertical:h?koe:TF,both:j}[o];h&&(B.key===xf?U=q:B.key===wf&&(U=W)),U===A&&(I.includes(B.key)||Y.includes(B.key))&&(r&&U===W&&I.includes(B.key)?U=q:r&&U===q&&Y.includes(B.key)?U=W:U=Hn(k,{startingIndex:U,decrement:Y.includes(B.key),disabledIndices:m})),U!==A&&!vc(k,U)&&(p&&B.stopPropagation(),J.has(B.key)&&B.preventDefault(),D(U,!0),queueMicrotask(()=>{var H;(H=k.current[U])==null||H.focus()}))}}),[n,i,a,m,k,h,A,S,t,r,_,y,D,o,p]);return C.useMemo(()=>({props:$,highlightedIndex:A,onHighlightedIndexChange:D,elementsRef:k,disabledIndices:m,onMapChange:O,relayKeyboardEvent:$.onKeyDown}),[$,A,D,k,m,O])}function Lle(e,t){for(const n of Ooe.values())if(!t.includes(n)&&e.getModifierState(n))return!0;return!1}function Sz(e){const{render:t,className:n,refs:r=Hc,props:i=Hc,state:o=Tn,stateAttributesMapping:a,highlightedIndex:u,onHighlightedIndexChange:c,orientation:f,dense:h,itemSizes:p,loopFocus:m,cols:y,enableHomeAndEndKeys:b,onMapChange:v,stopEventPropagation:S=!0,rootRef:x,disabledIndices:_,modifierKeys:k,highlightItemOnHover:T=!1,tag:A="div",...D}=e,O=qh(),{props:$,highlightedIndex:B,onHighlightedIndexChange:j,elementsRef:N,onMapChange:M,relayKeyboardEvent:z}=jle({itemSizes:p,cols:y,loopFocus:m,dense:h,orientation:f,highlightedIndex:u,onHighlightedIndexChange:c,rootRef:x,stopEventPropagation:S,enableHomeAndEndKeys:b,direction:O,disabledIndices:_,modifierKeys:k}),G=dn(A,e,{state:o,ref:r,props:[$,...i,D],stateAttributesMapping:a}),L=C.useMemo(()=>({highlightedIndex:B,onHighlightedIndexChange:j,highlightItemOnHover:T,relayKeyboardEvent:z}),[B,j,T,z]);return E.jsx(JL.Provider,{value:L,children:E.jsx(Wy,{elementsRef:N,onMapChange:F=>{v==null||v(F),M(F)},children:G})})}function s2(e){const t=Ar(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const i=Jt(e),o=i?e.offsetWidth:n,a=i?e.offsetHeight:r;return(Kc(n)!==o||Kc(r)!==a)&&(n=o,r=a),{width:n,height:r}}const Cz=C.createContext(void 0);function fh(){const e=C.useContext(Cz);if(e===void 0)throw new Error(dr(64));return e}let Fle=(function(e){return e.activationDirection="data-activation-direction",e.orientation="data-orientation",e})({});const ob={tabActivationDirection:e=>({[Fle.activationDirection]:e})},zle=C.forwardRef(function(t,n){const{className:r,defaultValue:i=0,onValueChange:o,orientation:a="horizontal",render:u,value:c,...f}=t,h=qh(),p=Object.hasOwn(t,"defaultValue"),m=C.useRef([]),[y,b]=C.useState(()=>new Map),[v,S]=Vh({controlled:c,default:i,name:"Tabs",state:"value"}),x=c!==void 0,[_,k]=C.useState(()=>new Map),[T,A]=C.useState("none"),D=Fe((U,q)=>{o==null||o(U,q),!q.isCanceled&&(S(U),A(q.activationDirection))}),O=Fe((U,q)=>{b(W=>{if(W.get(U)===q)return W;const I=new Map(W);return I.set(U,q),I})}),$=Fe((U,q)=>{b(W=>{if(!W.has(U)||W.get(U)!==q)return W;const I=new Map(W);return I.delete(U),I})}),B=C.useCallback(U=>y.get(U),[y]),j=C.useCallback(U=>{for(const q of _.values())if(U===(q==null?void 0:q.value))return q==null?void 0:q.id},[_]),N=C.useCallback(U=>{if(U===void 0)return null;for(const[q,W]of _.entries())if(W!=null&&U===(W.value??W.index))return q;return null},[_]),M=C.useMemo(()=>({direction:h,getTabElementBySelectedValue:N,getTabIdByPanelValue:j,getTabPanelIdByValue:B,onValueChange:D,orientation:a,registerMountedTabPanel:O,setTabMap:k,unregisterMountedTabPanel:$,tabActivationDirection:T,value:v}),[h,N,j,B,D,a,O,k,$,T,v]),z=C.useMemo(()=>{for(const U of _.values())if(U!=null&&U.value===v)return U},[_,v]),G=C.useMemo(()=>{for(const U of _.values())if(U!=null&&!U.disabled)return U.value},[_]);Ve(()=>{if(x||_.size===0)return;const U=z==null?void 0:z.disabled,q=z==null&&v!==null;if(p&&U&&v===i||!U&&!q)return;const I=G??null;v!==I&&(S(I),A("none"))},[i,G,p,x,z,A,S,_,v]);const F=dn("div",t,{state:{orientation:a,tabActivationDirection:T},ref:n,props:f,stateAttributesMapping:ob});return E.jsx(Cz.Provider,{value:M,children:E.jsx(Wy,{elementsRef:m,children:F})})}),Ez=C.createContext(void 0);function kz(){const e=C.useContext(Ez);if(e===void 0)throw new Error(dr(65));return e}const Ble=C.forwardRef(function(t,n){const{className:r,disabled:i=!1,render:o,value:a,id:u,nativeButton:c=!0,...f}=t,{value:h,getTabPanelIdByValue:p,orientation:m}=fh(),{activateOnFocus:y,highlightedTabIndex:b,onTabActivation:v,setHighlightedTabIndex:S,tabsListElement:x}=kz(),_=is(u),k=C.useMemo(()=>({disabled:i,id:_,value:a}),[i,_,a]),{compositeProps:T,compositeRef:A,index:D}=bz({metadata:k}),O=a===h,$=C.useRef(!1);Ve(()=>{if($.current){$.current=!1;return}if(!(O&&D>-1&&b!==D))return;const W=x;if(W!=null){const I=gi(Pt(W));if(I&&ht(W,I))return}i||S(D)},[O,D,b,S,i,x]);const{getButtonProps:B,buttonRef:j}=yf({disabled:i,native:c,focusableWhenDisabled:!0}),N=p(a),M=C.useRef(!1),z=C.useRef(!1);function G(W){O||i||v(a,mt(Gc,W.nativeEvent,void 0,{activationDirection:"none"}))}function L(W){O||(D>-1&&!i&&S(D),!i&&y&&(!M.current||M.current&&z.current)&&v(a,mt(Gc,W.nativeEvent,void 0,{activationDirection:"none"})))}function F(W){if(O||i)return;M.current=!0;function I(){M.current=!1,z.current=!1}(!W.button||W.button===0)&&(z.current=!0,Pt(W.currentTarget).addEventListener("pointerup",I,{once:!0}))}return dn("button",t,{state:{disabled:i,active:O,orientation:m},ref:[n,j,A],props:[T,{role:"tab","aria-controls":N,"aria-selected":O,id:_,onClick:G,onFocus:L,onPointerDown:F,[wz]:O?"":void 0,onKeyDownCapture(){$.current=!0}},f,B]})}),Ule='!function(){const t=document.currentScript.previousElementSibling;if(!t)return;const e=t.closest(\'[role="tablist"]\');if(!e)return;const i=e.querySelector("[data-active]");if(!i)return;if(0===i.offsetWidth||0===e.offsetWidth)return;let o=0,n=0,h=0,l=0,r=0,f=0;function s(t){const e=getComputedStyle(t);let i=parseFloat(e.width)||0,o=parseFloat(e.height)||0;return(Math.round(i)!==t.offsetWidth||Math.round(o)!==t.offsetHeight)&&(i=t.offsetWidth,o=t.offsetHeight),{width:i,height:o}}if(null!=i&&null!=e){const{width:t,height:c}=s(i),{width:u,height:d}=s(e),a=i.getBoundingClientRect(),g=e.getBoundingClientRect(),p=u>0?g.width/u:1,b=d>0?g.height/d:1;if(Math.abs(p)>Number.EPSILON&&Math.abs(b)>Number.EPSILON){const t=a.left-g.left,i=a.top-g.top;o=t/p+e.scrollLeft-e.clientLeft,h=i/b+e.scrollTop-e.clientTop}else o=i.offsetLeft,h=i.offsetTop;r=t,f=c,n=e.scrollWidth-o-r,l=e.scrollHeight-h-f}function c(e,i){t.style.setProperty(`--active-tab-${e}`,`${i}px`)}c("left",o),c("right",n),c("top",h),c("bottom",l),c("width",r),c("height",f),r>0&&f>0&&t.removeAttribute("hidden")}();';let Qu=(function(e){return e.activeTabLeft="--active-tab-left",e.activeTabRight="--active-tab-right",e.activeTabTop="--active-tab-top",e.activeTabBottom="--active-tab-bottom",e.activeTabWidth="--active-tab-width",e.activeTabHeight="--active-tab-height",e})({});const Hle={...ob,activeTabPosition:()=>null,activeTabSize:()=>null},Gle=C.forwardRef(function(t,n){const{className:r,render:i,renderBeforeHydration:o=!1,...a}=t,{nonce:u}=Nle(),{getTabElementBySelectedValue:c,orientation:f,tabActivationDirection:h,value:p}=fh(),{tabsListElement:m}=kz(),[y,b]=C.useState(!1),{value:v}=fh();Yh(()=>b(!0));const S=Sae();C.useEffect(()=>{if(p!=null&&m!=null&&typeof ResizeObserver<"u"){const G=new ResizeObserver(S);return G.observe(m),()=>{G.disconnect()}}},[p,m,S]);let x=0,_=0,k=0,T=0,A=0,D=0,O=!1;if(p!=null&&m!=null){const G=c(p);if(O=!0,G!=null){const{width:L,height:F}=s2(G),{width:U,height:q}=s2(m),W=G.getBoundingClientRect(),I=m.getBoundingClientRect(),Y=U>0?I.width/U:1,J=q>0?I.height/q:1;if(Math.abs(Y)>Number.EPSILON&&Math.abs(J)>Number.EPSILON){const ie=W.left-I.left,re=W.top-I.top;x=ie/Y+m.scrollLeft-m.clientLeft,k=re/J+m.scrollTop-m.clientTop}else x=G.offsetLeft,k=G.offsetTop;A=L,D=F,_=m.scrollWidth-x-A,T=m.scrollHeight-k-D}}const $=C.useMemo(()=>O?{left:x,right:_,top:k,bottom:T}:null,[x,_,k,T,O]),B=C.useMemo(()=>O?{width:A,height:D}:null,[A,D,O]),j=C.useMemo(()=>{if(O)return{[Qu.activeTabLeft]:`${x}px`,[Qu.activeTabRight]:`${_}px`,[Qu.activeTabTop]:`${k}px`,[Qu.activeTabBottom]:`${T}px`,[Qu.activeTabWidth]:`${A}px`,[Qu.activeTabHeight]:`${D}px`}},[x,_,k,T,A,D,O]),N=O&&A>0&&D>0,z=dn("span",t,{state:{orientation:f,activeTabPosition:$,activeTabSize:B,tabActivationDirection:h},ref:n,props:[{role:"presentation",style:j,hidden:!N},a,{suppressHydrationWarning:!0}],stateAttributesMapping:Hle});return v==null?null:E.jsxs(C.Fragment,{children:[z,!y&&o&&E.jsx("script",{nonce:u,dangerouslySetInnerHTML:{__html:Ule},suppressHydrationWarning:!0})]})});let Vle=(function(e){return e.index="data-index",e.activationDirection="data-activation-direction",e.orientation="data-orientation",e.hidden="data-hidden",e})({});const qle={...ob,...Wh},Yle=C.forwardRef(function(t,n){const{className:r,value:i,render:o,keepMounted:a=!1,...u}=t,{value:c,getTabIdByPanelValue:f,orientation:h,tabActivationDirection:p,registerMountedTabPanel:m,unregisterMountedTabPanel:y}=fh(),b=is(),v=C.useMemo(()=>({id:b,value:i}),[b,i]),{ref:S,index:x}=Kh({metadata:v}),_=i===c,{mounted:k,transitionStatus:T,setMounted:A}=kC(_),D=!k,O=f(i),$={hidden:D,orientation:h,tabActivationDirection:p,transitionStatus:T},B=C.useRef(null),j=dn("div",t,{state:$,ref:[n,S,B],props:[{"aria-labelledby":O,hidden:D,id:b,role:"tabpanel",tabIndex:_?0:-1,inert:oz(!_),[Vle.index]:x},u],stateAttributesMapping:qle});return Zh({open:_,ref:B,onComplete(){_||A(!1)}}),Ve(()=>{if(!(D&&!a)&&b!=null)return m(i,b),()=>{y(i,b)}},[D,a,i,b,m,y]),a||k?j:null}),Wle=C.forwardRef(function(t,n){const{activateOnFocus:r=!1,className:i,loopFocus:o=!0,render:a,...u}=t,{getTabElementBySelectedValue:c,onValueChange:f,orientation:h,value:p,setTabMap:m,tabActivationDirection:y}=fh(),[b,v]=C.useState(0),[S,x]=C.useState(null),_=Kle(p,h,S,c),k=Fe((O,$)=>{if(O!==p){const B=_(O);$.activationDirection=B,f(O,$)}}),T={orientation:h,tabActivationDirection:y},A={"aria-orientation":h==="vertical"?"vertical":void 0,role:"tablist"},D=C.useMemo(()=>({activateOnFocus:r,highlightedTabIndex:b,onTabActivation:k,setHighlightedTabIndex:v,tabsListElement:S,value:p}),[r,b,k,v,S,p]);return E.jsx(Ez.Provider,{value:D,children:E.jsx(Sz,{render:a,className:i,state:T,refs:[n,x],props:[A,u],stateAttributesMapping:ob,highlightedIndex:b,enableHomeAndEndKeys:!0,loopFocus:o,orientation:h,onHighlightedIndexChange:v,onMapChange:m,disabledIndices:Hc})})});function a2(e,t){const{left:n,top:r}=e.getBoundingClientRect(),{left:i,top:o}=t.getBoundingClientRect(),a=n-i,u=r-o;return{left:a,top:u}}function Kle(e,t,n,r){const[i,o]=C.useState(null);return Ve(()=>{if(e==null||n==null){o(null);return}const a=r(e);if(a==null){o(null);return}const{left:u,top:c}=a2(a,n);o(t==="horizontal"?u:c)},[t,r,n,e]),C.useCallback(a=>{if(a===e)return"none";if(a==null)return o(null),"none";if(a!=null&&n!=null){const u=r(a);if(u!=null){const{left:c,top:f}=a2(u,n);if(i==null)return o(t==="horizontal"?c:f),"none";if(t==="horizontal"){if(c<i)return o(c),"left";if(c>i)return o(c),"right"}else{if(f<i)return o(f),"up";if(f>i)return o(f),"down"}}}return"none"},[r,t,i,n,e])}const Rz=C.createContext(void 0);function Xle(e=!0){const t=C.useContext(Rz);if(t===void 0&&!e)throw new Error(dr(7));return t}const Cc=C.forwardRef(function(t,n){const{className:r,defaultPressed:i=!1,disabled:o=!1,form:a,onPressedChange:u,pressed:c,render:f,type:h,value:p,nativeButton:m=!0,...y}=t,b=is(p||void 0),v=Xle(),S=(v==null?void 0:v.value)??[],x=v?void 0:i,_=(o||(v==null?void 0:v.disabled))??!1,[k,T]=Vh({controlled:v?b!==void 0&&S.indexOf(b)>-1:c,default:x,name:"Toggle",state:"pressed"}),A=Fe((M,z)=>{var G;b&&((G=v==null?void 0:v.setGroupValue)==null||G.call(v,b,M,z)),u==null||u(M,z)}),{getButtonProps:D,buttonRef:O}=yf({disabled:_,native:m}),$={disabled:_,pressed:k},B=[O,n],j=[{"aria-pressed":k,onClick(M){const z=!k,G=mt(Gc,M.nativeEvent);A(z,G),!G.isCanceled&&T(z)}},y,D],N=dn("button",t,{enabled:!v,state:$,ref:B,props:j});return v?E.jsx(vz,{tag:"button",render:f,className:r,state:$,refs:B,props:j}):N});let Qle=(function(e){return e.disabled="data-disabled",e.orientation="data-orientation",e.multiple="data-multiple",e})({});const l2={multiple(e){return e?{[Qle.multiple]:""}:null}},Zle=C.forwardRef(function(t,n){const{defaultValue:r,disabled:i=!1,loopFocus:o=!0,onValueChange:a,orientation:u="horizontal",multiple:c=!1,value:f,className:h,render:p,...m}=t,y=dz(),b=C.useMemo(()=>{if(f===void 0)return r??[]},[f,r]),v=C.useMemo(()=>f!==void 0||r!==void 0,[f,r]),S=((y==null?void 0:y.disabled)??!1)||i,[x,_]=Vh({controlled:f,default:b,name:"ToggleGroup",state:"value"}),k=Fe(($,B,j)=>{let N;if(c?(N=x.slice(),B?N.push($):N.splice(x.indexOf($),1)):N=B?[$]:[],Array.isArray(N)){if(a==null||a(N,j),j.isCanceled)return;_(N)}}),T={disabled:S,multiple:c,orientation:u},A=C.useMemo(()=>({disabled:S,orientation:u,setGroupValue:k,value:x,isValueInitialized:v}),[S,u,k,x,v]),D={role:"group"},O=dn("div",t,{enabled:!!y,state:T,ref:n,props:[D,m],stateAttributesMapping:l2});return E.jsx(Rz.Provider,{value:A,children:y?O:E.jsx(Sz,{render:p,className:h,state:T,refs:[n],props:[D,m],stateAttributesMapping:l2,loopFocus:o,enableHomeAndEndKeys:!0})})}),_z=({className:e,children:t,...n})=>E.jsx(Ie,{"data-slot":"list-text-label",className:ze(Ho["list-text-label"],e),size:0,...n,children:t});_z.displayName="ListLabel";const Tz=({className:e,children:t,...n})=>E.jsx(Ie,{"data-slot":"list-text-description",className:ze(Ho["list-text-description"],e),size:0,...n,children:t});Tz.displayName="ListDescription";const Az=({label:e,description:t,...n})=>E.jsxs(er,{condition:!!t,render:E.jsx(Ye,{"data-slot":"list-text-block",gap:2,...n}),children:[E.jsx(_z,{children:e}),t&&E.jsx(Tz,{children:t})]});Az.displayName="ListTextBlock";const Dz=()=>E.jsx(Th,{size:Lre,strokeWidth:4,stroke:"var(--shade-foreground)",style:{marginInlineStart:"auto"}});Dz.displayName="ListSelectedIcon";const YC=({disabled:e,selected:t,render:n,className:r,icon:i,label:o,description:a,content:u,action:c,...f})=>E.jsx(Xe,{"data-slot":"list-item",render:n??E.jsx("li",{}),ay:"start",ax:"space-between",gap:8,className:ze(Ho["list-item"],r),tabIndex:e?-1:0,"data-disabled":e?"":void 0,"data-selected":t?"":void 0,...f,children:E.jsxs(er,{condition:!!(i||t),render:E.jsx(Xe,{gap:3,ay:"start",fullwidth:!0,style:{listStyleType:"none"}}),children:[i&&E.jsx(i,{"data-slot":"list-item-icon",size:LL,style:{color:"var(--shade-foreground)"}}),E.jsxs(er,{condition:!!u,render:E.jsx(Ye,{fullwidth:!0,gap:1}),children:[E.jsxs(er,{condition:!!t||!!c,render:E.jsx(Xe,{fullwidth:!0,ay:"center",gap:2,ax:"space-between"}),children:[E.jsx(Az,{"data-slot":"list-item-text",label:o,description:a}),t&&E.jsx(Dz,{}),c]}),u]})]})});YC.displayName="ListItem";const WC=({category:e,collapsible:t,open:n,defaultOpen:r=!0,onOpenChange:i,icon:o,items:a})=>E.jsxs(Ye,{"data-slot":"list-item-group",ax:"stretch",fullwidth:!0,className:Ho["list-item-group"],render:t?E.jsx(cle,{render:E.jsx("li",{}),open:n,defaultOpen:r,onOpenChange:i}):E.jsx("li",{}),children:[e&&E.jsxs(Xe,{"data-slot":"list-item-group-collapsible-trigger",render:t?E.jsx(dle,{}):E.jsx("div",{}),className:Ho["list-item-group-collapsible-trigger"],ay:"center",ax:"start",gap:2,py:2,fullwidth:!0,children:[t&&E.jsx(Ah,{size:14,strokeWidth:3}),o&&E.jsx(o,{"data-slot":"list-item-group-icon",size:LL}),E.jsx(Ie,{"data-slot":"list-item-group-category-text",render:E.jsx("h3",{}),className:Ho["list-item-group-category"],mr:t?8:void 0,weight:"bold",size:0,"data-is-collapsible":t,children:e})]}),E.jsx(of,{condition:!!t,render:{true:E.jsx(hle,{render:E.jsx("ul",{"data-slot":"list-item-panel",className:Ho["list-item-panel"]})}),false:E.jsx("ul",{"data-slot":"list-item-panel",className:Ho["list-item-panel"]})},children:a.map(u=>"items"in u?E.jsx(WC,{...u},u.id??u.category):E.jsx(YC,{...u},u.value))})]});WC.displayName="ListItemGroup";const Jc=({type:e=zre,direction:t=Bre,size:n=Fre,line:r,items:i,children:o,ItemProps:a,...u})=>{const c=e==="ordered"?E.jsx("ol",{}):E.jsx("ul",{}),f={"data-slot":"list","data-type":e,"data-size":n,"data-direction":t,"data-line":r?"true":void 0,className:Ho.list,...u};return E.jsx(of,{condition:t==="row",p:0,m:0,...f,render:{true:E.jsx(Xe,{render:c,ay:"start",gap:4}),false:E.jsx(Ye,{render:c,ax:"stretch"})},children:i?i.map((h,p)=>"items"in h?E.jsx(WC,{"data-line":!0,...h},h.id??`${h.category??"group"}-${p}`):E.jsx(YC,{fullwidth:t==="column",...h,...a},h.value)):o})};Jc.displayName="List";const Jle=C.createContext(void 0);function eue(e=!1){const t=C.useContext(Jle);if(t===void 0&&!e)throw new Error(mf(16));return t}function tue(e){const{focusableWhenDisabled:t,disabled:n,composite:r=!1,tabIndex:i=0,isNativeButton:o}=e,a=r&&t!==!1,u=r&&t===!1;return{props:C.useMemo(()=>{const c={onKeyDown(f){n&&t&&f.key!=="Tab"&&f.preventDefault()}};return r||(c.tabIndex=i,!o&&n&&(c.tabIndex=t?i:-1)),(o&&(t||a)||!o&&n)&&(c["aria-disabled"]=n),o&&(!t||u)&&(c.disabled=n),c},[r,n,t,a,u,o,i])}}function nue(e={}){const{disabled:t=!1,focusableWhenDisabled:n,tabIndex:r=0,native:i=!0}=e,o=C.useRef(null),a=eue(!0)!==void 0,u=lr(()=>{const m=o.current;return!!((m==null?void 0:m.tagName)==="A"&&(m!=null&&m.href))}),{props:c}=tue({focusableWhenDisabled:n,disabled:t,composite:a,tabIndex:r,isNativeButton:i}),f=C.useCallback(()=>{const m=o.current;rue(m)&&a&&t&&c.disabled===void 0&&m.disabled&&(m.disabled=!1)},[t,c.disabled,a]);qn(f,[f]);const h=C.useCallback((m={})=>{const{onClick:y,onMouseDown:b,onKeyUp:v,onKeyDown:S,onPointerDown:x,..._}=m;return Uc({type:i?"button":void 0,onClick(k){if(t){k.preventDefault();return}y==null||y(k)},onMouseDown(k){t||(b==null||b(k))},onKeyDown(k){if(t||(Sw(k),S==null||S(k)),k.baseUIHandlerPrevented)return;const T=k.target===k.currentTarget&&!i&&!u()&&!t,A=k.key==="Enter",D=k.key===" ";T&&((D||A)&&k.preventDefault(),A&&(y==null||y(k)))},onKeyUp(k){t||(Sw(k),v==null||v(k)),!k.baseUIHandlerPrevented&&k.target===k.currentTarget&&!i&&!t&&k.key===" "&&(y==null||y(k))},onPointerDown(k){if(t){k.preventDefault();return}x==null||x(k)}},i?void 0:{role:"button"},c,_)},[t,c,i,u]),p=lr(m=>{o.current=m,f()});return{getButtonProps:h,buttonRef:p}}function rue(e){return SL(e)&&e.tagName==="BUTTON"}const iue="_checkbox_1x4sv_3",Go={checkbox:iue,"checkbox-label":"_checkbox-label_1x4sv_51","checkbox-indicator":"_checkbox-indicator_1x4sv_56","size-small":"_size-small_1x4sv_65","checkbox-icon":"_checkbox-icon_1x4sv_68","size-medium":"_size-medium_1x4sv_73","size-large":"_size-large_1x4sv_81","toggle-bordered":"_toggle-bordered_1x4sv_90","toggle-reversed":"_toggle-reversed_1x4sv_107"},Mz=Dn({variants:{bordered:{true:Go["toggle-bordered"]},reversed:{true:Go["toggle-reversed"]},size:{small:Go["size-small"],medium:Go["size-medium"],large:Go["size-large"]}}}),Oz=({name:e,label:t,description:n,reversed:r,bordered:i,LabelProps:o,DescriptionProps:a,ErrorProps:u,className:c,children:f,...h})=>{const p=!!t,m=p&&!!n;return E.jsxs(er,{condition:p,render:E.jsx(Xe,{render:E.jsx("label",{}),className:ze(Go["checkbox-label"],Mz({reversed:r,bordered:i}),c),ay:m?"start":"center",gap:3,...h}),children:[f,!!(t||n)&&E.jsx(bC,{name:e,children:E.jsxs(er,{condition:m,render:E.jsx(Ye,{gap:3}),children:[t&&E.jsx(vC,{weight:"normal",...o,children:t}),n&&E.jsx(xC,{...a,children:n}),E.jsx(sy,{...u})]})})]})};Oz.displayName="CheckboxField";const oue="small";let u2=(function(e){return e.checked="data-checked",e.unchecked="data-unchecked",e.indeterminate="data-indeterminate",e.disabled="data-disabled",e.readonly="data-readonly",e.required="data-required",e.valid="data-valid",e.invalid="data-invalid",e.touched="data-touched",e.dirty="data-dirty",e.filled="data-filled",e.focused="data-focused",e})({});function $z(e){return C.useMemo(()=>({checked(t){return e.indeterminate?{}:t?{[u2.checked]:""}:{[u2.unchecked]:""}},...ru}),[e.indeterminate])}const sue=C.createContext({disabled:!1});function aue(){return C.useContext(sue)}const lue=C.createContext(void 0);function uue(e=!0){const t=C.useContext(lue);if(t===void 0&&!e)throw new Error(mf(3));return t}const Pz=C.createContext(void 0);function cue(){const e=C.useContext(Pz);if(e===void 0)throw new Error(mf(14));return e}const fue="data-parent",due=C.forwardRef(function(e,t){const{checked:n,className:r,defaultChecked:i=!1,disabled:o=!1,id:a,indeterminate:u=!1,inputRef:c,name:f,onCheckedChange:h,parent:p=!1,readOnly:m=!1,render:y,required:b=!1,uncheckedValue:v,value:S,nativeButton:x=!1,..._}=e,{clearErrors:k}=Gh(),{disabled:T,name:A,setDirty:D,setFilled:O,setFocused:$,setTouched:B,state:j,validationMode:N,validityData:M,shouldValidateOnChange:z,validation:G}=gf(),L=aue(),{labelId:F,controlId:U,registerControlId:q,getDescriptionProps:W}=Oa(),I=uue(),Y=I==null?void 0:I.parent,J=Y&&I.allValues,H=T||L.disabled||(I==null?void 0:I.disabled)||o,ie=A??f,re=S??ie,he=Hl(),ve=Hl();let Re=U;J?Re=p?ve:`${Y.id}-${re}`:a&&(Re=a);let ce={};J&&(p?ce=I.parent.getParentProps():re&&(ce=I.parent.getChildProps(re)));const je=lr(h),{checked:We=n,indeterminate:X=u,onCheckedChange:Z,...ne}=ce,xe=I==null?void 0:I.value,ge=I==null?void 0:I.setValue,Ce=I==null?void 0:I.defaultValue,le=C.useRef(null),oe=Ma(()=>Symbol("checkbox-control")),me=C.useRef(!1),{getButtonProps:ae,buttonRef:Oe}=nue({disabled:H,native:x}),Te=(I==null?void 0:I.validation)??G,[_e,De]=uL({controlled:re&&xe&&!p?xe.includes(re):We,default:re&&Ce&&!p?Ce.includes(re):i,name:"Checkbox",state:"checked"});qn(()=>{q!==Er&&(me.current=!0,q(oe.current,Re))},[Re,I,q,p,oe]),C.useEffect(()=>{const Me=oe.current;return()=>{!me.current||q===Er||(me.current=!1,q(Me,void 0))}},[q,oe]),vL({enabled:!I,id:he,commit:Te.commit,value:_e,controlRef:le,name:ie,getValue:()=>_e});const ue=C.useRef(null),Se=bw(c,ue,Te.inputRef);qn(()=>{ue.current&&(ue.current.indeterminate=X,_e&&O(!0))},[_e,X,O]),ore(_e,()=>{I&&!p||(k(ie),O(_e),D(_e!==M.initialValue),z()?Te.commit(_e):Te.commit(_e,!0))});const ke=Uc({checked:_e,disabled:H,name:p?void 0:ie,id:x?void 0:Re??void 0,required:b,ref:Se,style:ie?Vne:Gne,tabIndex:-1,type:"checkbox","aria-hidden":!0,onChange(Me){if(Me.nativeEvent.defaultPrevented)return;const Qe=Me.target.checked,Ne=hL(RL,Me.nativeEvent);if(Z==null||Z(Qe,Ne),je(Qe,Ne),!Ne.isCanceled&&(De(Qe),re&&xe&&ge&&!p)){const Tt=Qe?[...xe,re]:xe.filter(ft=>ft!==re);ge(Tt,Ne)}},onFocus(){var Me;(Me=le.current)==null||Me.focus()}},S!==void 0?{value:(I?_e&&S:S)||""}:Ni,W,I?Te.getValidationProps:Te.getInputValidationProps),Pe=J?!!We:_e,Le=J&&X||u;C.useEffect(()=>{if(!Y||!re)return;const Me=Y.disabledStatesRef.current;return Me.set(re,H),()=>{Me.delete(re)}},[Y,H,re]);const st=C.useMemo(()=>({...j,checked:Pe,disabled:H,readOnly:m,required:b,indeterminate:Le}),[j,Pe,H,m,b,Le]),Ut=$z(st),Ot=iu("span",e,{state:st,ref:[Oe,le,t,I==null?void 0:I.registerControlRef],props:[{id:x?Re??void 0:he,role:"checkbox","aria-checked":X?"mixed":_e,"aria-readonly":m||void 0,"aria-required":b||void 0,"aria-labelledby":F,[fue]:p?"":void 0,onFocus(){$(!0)},onBlur(){const Me=ue.current;Me&&(B(!0),$(!1),N==="onBlur"&&Te.commit(I?xe:Me.checked))},onClick(Me){var Qe;m||H||(Me.preventDefault(),(Qe=ue.current)==null||Qe.dispatchEvent(new PointerEvent("click",{bubbles:!0,shiftKey:Me.shiftKey,ctrlKey:Me.ctrlKey,altKey:Me.altKey,metaKey:Me.metaKey})))}},W,Te.getValidationProps,_,ne,ae],stateAttributesMapping:Ut});return E.jsxs(Pz.Provider,{value:st,children:[Ot,!_e&&!I&&ie&&!p&&v!==void 0&&E.jsx("input",{type:"hidden",name:ie,value:v}),E.jsx("input",{...ke})]})}),Nz=({size:e=oue,hideIndicator:t,className:n,...r})=>E.jsx(due,{"data-slot":"checkbox","aria-label":"checkbox",className:ze(Go.checkbox,Mz({size:e}),n,{"sr-only":t}),...r});Nz.displayName="CheckboxRoot";const hue=C.forwardRef(function(e,t){const{render:n,className:r,keepMounted:i=!1,...o}=e,a=cue(),u=a.checked||a.indeterminate,{mounted:c,transitionStatus:f,setMounted:h}=EL(u),p=C.useRef(null),m={...a,transitionStatus:f};yL({open:u,ref:p,onComplete(){u||h(!1)}});const y=$z(a),b=C.useMemo(()=>({...y,...gL,...ru}),[y]),v=i||c,S=iu("span",e,{ref:[t,p],state:m,stateAttributesMapping:b,props:o});return v?S:null}),Iz=({indeterminate:e,className:t,...n})=>E.jsx(hue,{"data-slot":"checkbox-indicator",className:ze(Go["checkbox-indicator"],t),...n,children:E.jsx(of,{condition:!!e,className:Go["checkbox-icon"],"data-slot":"checkbox-icon",render:{true:E.jsx(qG,{strokeWidth:3}),false:E.jsx(Th,{strokeWidth:3})}})});Iz.displayName="CheckboxIndicator";const jz=({name:e,label:t,description:n,reversed:r,bordered:i,indeterminate:o,hideIndicator:a,FieldProps:u,IndicatorProps:c,...f})=>E.jsx(Oz,{name:e,label:t,description:n,reversed:r,bordered:i,...u,children:E.jsx(Nz,{name:e,hideIndicator:a,...f,children:E.jsx(Iz,{indeterminate:o,...c})})});jz.displayName="Checkbox";const Ci={"accordion-root":"_accordion-root_w24fh_3","accordion-item":"_accordion-item_w24fh_8","accordion-trigger":"_accordion-trigger_w24fh_20","accordion-panel":"_accordion-panel_w24fh_49","accordion-content":"_accordion-content_w24fh_61","toggle-ghost":"_toggle-ghost_w24fh_73","size-small":"_size-small_w24fh_80","size-medium":"_size-medium_w24fh_89","size-large":"_size-large_w24fh_98","panel-size-small":"_panel-size-small_w24fh_109","panel-size-medium":"_panel-size-medium_w24fh_115","panel-size-large":"_panel-size-large_w24fh_121"},Lz="medium",pue=Dn({variants:{size:{small:Ci["size-small"],medium:Ci["size-medium"],large:Ci["size-large"]}},defaultVariants:{size:Lz}}),mue=Dn({variants:{size:{small:Ci["panel-size-small"],medium:Ci["panel-size-medium"],large:Ci["panel-size-large"]}},defaultVariants:{size:Lz}}),gue=Dn({variants:{ghost:{true:Ci["toggle-ghost"]}}}),Fz=({children:e,className:t,ghost:n,...r})=>E.jsx(Eie,{"data-slot":"accordion-root","data-ghost":n||void 0,render:E.jsx(zt,{gap:0,trimmed:!0,fullwidth:!0,ghost:n}),className:ze(Ci["accordion-root"],gue({ghost:n}),t),...r,children:e});Fz.displayName="AccordionRoot";const zz=({children:e,className:t,...n})=>E.jsx(Iie,{"data-slot":"accordion-item",className:ze(Ci["accordion-item"],t),render:E.jsx(Ye,{ax:"stretch",fullwidth:!0}),...n,children:e});zz.displayName="AccordionItem";const Bz=({children:e,className:t,...n})=>E.jsx(jie,{"data-slot":"accordion-header",className:ze(t),...n,children:e});Bz.displayName="AccordionHeader";const Uz=({icon:e,size:t,className:n,children:r,...i})=>{const o=e;return E.jsxs(Ioe,{"data-slot":"accordion-trigger",className:ze(Ci["accordion-trigger"],pue({size:t}),n),...i,children:[E.jsxs(er,{condition:!!e,render:E.jsx(Xe,{ay:"center",gap:1}),children:[o&&E.jsx(o,{}),E.jsx(Ie,{shade:"muted",size:0,weight:"bold",children:r})]}),E.jsx(Ah,{})]})};Uz.displayName="AccordionTrigger";const Hz=({children:e,size:t,className:n,...r})=>E.jsx(Loe,{"data-slot":"accordion-panel",className:ze(Ci["accordion-panel"],mue({size:t}),n),...r,children:e});Hz.displayName="AccordionPanel";const Gz=({children:e,...t})=>E.jsx(Ye,{"data-slot":"accordion-content",className:Ci["accordion-content"],...t,children:e});Gz.displayName="AccordionContent";const KC=({items:e,defaultValue:t,value:n,onValueChange:r,disabled:i,orientation:o,multiple:a,fullwidth:u,ghost:c,size:f,RootProps:h,ItemProps:p,HeaderProps:m,TriggerProps:y,PanelProps:b,ContentProps:v})=>E.jsx(Fz,{fullwidth:u,ghost:c,defaultValue:t,value:n,onValueChange:r,disabled:i,orientation:o,multiple:a,...h,children:e.map(S=>E.jsxs(zz,{value:S.value,disabled:S.disabled,...p,children:[E.jsx(Bz,{...m,children:E.jsx(Uz,{icon:S.icon,size:f,...y,children:S.trigger})}),E.jsx(Hz,{size:f,...b,children:E.jsx(Gz,{...v,children:S.content})})]},S.value))});KC.displayName="Accordion";const sb=({children:e,...t})=>E.jsx(yz,{...t,children:e});sb.displayName="MenuRoot";const ab=({children:e,...t})=>{const n=C.isValidElement(e),r=!!t.render;return E.jsx(Ale,{"data-slot":"menu-trigger",...!r&&{render:E.jsx("div",{tabIndex:n?-1:0}),nativeButton:!1},...t,children:e})};ab.displayName="MenuTrigger";const dh=({children:e,...t})=>E.jsx(Sle,{"data-slot":"menu-portal",...t,children:e});dh.displayName="MenuPortal";const yue="_positioner_12j95_1",bue="_popup_12j95_5",vue="_item_12j95_23",lb={positioner:yue,popup:bue,item:vue,"submenu-trigger":"_submenu-trigger_12j95_24"},hh=({className:e,children:t,...n})=>E.jsx(Cle,{"data-slot":"menu-positioner",className:ze(lb.positioner,e),sideOffset:4,collisionPadding:16,...n,children:t});hh.displayName="MenuPositioner";const ph=({className:e,children:t,...n})=>E.jsx(xle,{"data-slot":"menu-popup",className:ze(lb.popup,e),...n,children:t});ph.displayName="MenuPopup";const Vz=({children:e,...t})=>E.jsx(_le,{"data-slot":"submenu-root",...t,children:e});Vz.displayName="SubmenuRoot";const qz=({className:e,children:t,...n})=>E.jsx(Ole,{"data-slot":"submenu-trigger",render:E.jsx(Xe,{gap:4,ay:"center",ax:"space-between"}),className:ze(lb["submenu-trigger"],e),...n,children:t});qz.displayName="SubmenuTrigger";const ef=({className:e,children:t,...n})=>E.jsx(yle,{"data-slot":"menu-item",className:ze(lb.item,e),...n,children:t});ef.displayName="MenuItem";const Yz=({items:e,trigger:t,align:n,side:r,RootProps:i,TriggerProps:o,PopupProps:a,PositionerProps:u,ItemProps:c,SubmenuRootProps:f,SubmenuTriggerProps:h})=>E.jsxs(sb,{...i,children:[E.jsx(ab,{...o,children:t}),E.jsx(dh,{children:E.jsx(hh,{side:r,align:n,...u,children:E.jsx(ph,{...a,children:e.map(p=>{const m=p.items;return m?E.jsxs(Vz,{...f,children:[E.jsxs(qz,{...h,children:[p.label,E.jsx(J$,{size:12})]}),E.jsx(dh,{children:E.jsx(hh,{children:E.jsx(ph,{children:m.map(y=>E.jsx(ef,{children:y.label},y.value))})})})]},p.value):E.jsx(ef,{...c,children:p.label},p.value)})})})})]});Yz.displayName="Menu";const Wz=({children:e,...t})=>E.jsx(zle,{"data-slot":"tabs-root",render:E.jsx(Ye,{}),...t,children:e});Wz.displayName="TabsRoot";const xue="_tab_4eh43_3",ub={"tabs-list":"_tabs-list_4eh43_3",tab:xue,"tabs-indicator":"_tabs-indicator_4eh43_65","tabs-panel":"_tabs-panel_4eh43_86"},Kz=({size:e="md",ghost:t,fullwidth:n,className:r,children:i,...o})=>E.jsx(Wle,{"data-slot":"tabs-list","data-size":e,"data-ghost":t||void 0,render:E.jsx(Xe,{gap:4,ay:"center",fullwidth:n}),className:ze(ub["tabs-list"],r),...o,children:i});Kz.displayName="TabsList";const Xz=({className:e,children:t,...n})=>E.jsx(Ble,{"data-slot":"tabs-tab",className:ze(ub.tab,e),...n,children:t});Xz.displayName="TabsTab";const Qz=({className:e,...t})=>E.jsx(Gle,{"data-slot":"tabs-indicator",className:ze(ub["tabs-indicator"],e),...t});Qz.displayName="TabsIndicator";const Zz=({className:e,children:t,...n})=>E.jsx(Yle,{"data-slot":"tabs-panel",render:E.jsx(Ye,{ay:"center",ax:"center",fullwidth:!0}),className:ze(ub["tabs-panel"],e),tabIndex:-1,...n,children:t});Zz.displayName="TabsPanel";const XC=({items:e,defaultValue:t,value:n,onValueChange:r,keepMounted:i,size:o,ghost:a,fullwidth:u,RootProps:c,ListProps:f,TabProps:h,IndicatorProps:p,PanelProps:m,ContainerProps:y})=>E.jsxs(Wz,{defaultValue:t||e[0].value,value:n,onValueChange:r,...c,children:[E.jsxs(Kz,{size:o,ghost:a,fullwidth:u,...f,children:[e.map(b=>E.jsx(Xz,{value:b.value,...h,children:b.label},b.value)),E.jsx(Qz,{...p})]}),E.jsx(yS,{"data-slot":"tabs-container",...y,children:e.map(b=>E.jsx(Zz,{value:b.value,keepMounted:i,...m,children:b.render},b.value))})]});XC.displayName="Tabs";const wue=(e,t,n)=>{const r=C.useRef(null),i=C.useRef(new Map),o=C.useCallback(()=>{const a=(e??t)[0],u=a?i.current.get(String(a)):null,c=r.current;if(u&&c){const f=n==="vertical",h=u.getBoundingClientRect(),p=c.getBoundingClientRect();f?(c.style.setProperty("--active-toggle-top",`${h.top-p.top-1}px`),c.style.setProperty("--active-toggle-height",`${h.height}px`)):(c.style.setProperty("--active-toggle-left",`${h.left-p.left-1}px`),c.style.setProperty("--active-toggle-width",`${h.width}px`))}},[e,t,n]);return C.useEffect(()=>{o();const a=r.current,u=(e??t)[0],c=u?i.current.get(String(u)):null;if(!a)return;const f=new ResizeObserver(()=>{o()});return f.observe(a),c&&f.observe(c),()=>{f.disconnect()}},[e,t,n,o]),{panelRef:r,buttonsRef:i}},zx={"toggle-group-panel":"_toggle-group-panel_al39a_1","toggle-group-indicator":"_toggle-group-indicator_al39a_33","toggle-group-button":"_toggle-group-button_al39a_59"},QC=({size:e="md",ghost:t,orientation:n,value:r,defaultValue:i,onValueChange:o,children:a,...u})=>{const[c,f]=C.useState(i?[...i]:[]),{panelRef:h,buttonsRef:p}=wue(r,c,n),m=b=>{f(b),o==null||o(b)},y=C.Children.map(a,b=>{if(C.isValidElement(b)){const v=b.props.value,S=b.props.className||"";return C.cloneElement(b,{className:`${zx["toggle-group-button"]} ${S}`.trim(),ref:x=>{x&&v&&p.current.set(v,x)}})}return b});return E.jsxs(Zle,{ref:h,value:r,defaultValue:i,onValueChange:m,className:zx["toggle-group-panel"],"data-size":e,"data-ghost":t||void 0,"data-orientation":n,render:n==="vertical"?E.jsx(Ye,{}):E.jsx(Xe,{}),...u,children:[E.jsx("div",{"data-slot":"toggle-group-indicator",className:zx["toggle-group-indicator"]}),y]})};QC.displayName="ToggleGroup";function Sue(e,t){const n=getComputedStyle(e),r=parseFloat(n.fontSize);return t*r}function Cue(e,t){const n=getComputedStyle(e.ownerDocument.body),r=parseFloat(n.fontSize);return t*r}function Eue(e){return e/100*window.innerHeight}function kue(e){return e/100*window.innerWidth}function Rue(e){switch(typeof e){case"number":return[e,"px"];case"string":{const t=parseFloat(e);return e.endsWith("%")?[t,"%"]:e.endsWith("px")?[t,"px"]:e.endsWith("rem")?[t,"rem"]:e.endsWith("em")?[t,"em"]:e.endsWith("vh")?[t,"vh"]:e.endsWith("vw")?[t,"vw"]:[t,"%"]}}}function Km({groupSize:e,panelElement:t,styleProp:n}){let r;const[i,o]=Rue(n);switch(o){case"%":{r=i/100*e;break}case"px":{r=i;break}case"rem":{r=Cue(t,i);break}case"em":{r=Sue(t,i);break}case"vh":{r=Eue(i);break}case"vw":{r=kue(i);break}}return r}function Li(e){return parseFloat(e.toFixed(3))}function tf({group:e}){const{orientation:t,panels:n}=e;return n.reduce((r,i)=>(r+=t==="horizontal"?i.element.offsetWidth:i.element.offsetHeight,r),0)}function Bw(e){const{panels:t}=e,n=tf({group:e});return n===0?t.map(r=>({collapsedSize:0,collapsible:r.panelConstraints.collapsible===!0,defaultSize:void 0,disabled:r.panelConstraints.disabled,minSize:0,maxSize:100,panelId:r.id})):t.map(r=>{const{element:i,panelConstraints:o}=r;let a=0;if(o.collapsedSize!==void 0){const h=Km({groupSize:n,panelElement:i,styleProp:o.collapsedSize});a=Li(h/n*100)}let u;if(o.defaultSize!==void 0){const h=Km({groupSize:n,panelElement:i,styleProp:o.defaultSize});u=Li(h/n*100)}let c=0;if(o.minSize!==void 0){const h=Km({groupSize:n,panelElement:i,styleProp:o.minSize});c=Li(h/n*100)}let f=100;if(o.maxSize!==void 0){const h=Km({groupSize:n,panelElement:i,styleProp:o.maxSize});f=Li(h/n*100)}return{collapsedSize:a,collapsible:o.collapsible===!0,defaultSize:u,disabled:o.disabled,minSize:c,maxSize:f,panelId:r.id}})}function Bt(e,t="Assertion error"){if(!e)throw Error(t)}function Uw(e,t){return Array.from(t).sort(e==="horizontal"?_ue:Tue)}function _ue(e,t){const n=e.element.offsetLeft-t.element.offsetLeft;return n!==0?n:e.element.offsetWidth-t.element.offsetWidth}function Tue(e,t){const n=e.element.offsetTop-t.element.offsetTop;return n!==0?n:e.element.offsetHeight-t.element.offsetHeight}function Jz(e){return e!==null&&typeof e=="object"&&"nodeType"in e&&e.nodeType===Node.ELEMENT_NODE}function e4(e,t){return{x:e.x>=t.left&&e.x<=t.right?0:Math.min(Math.abs(e.x-t.left),Math.abs(e.x-t.right)),y:e.y>=t.top&&e.y<=t.bottom?0:Math.min(Math.abs(e.y-t.top),Math.abs(e.y-t.bottom))}}function Aue({orientation:e,rects:t,targetRect:n}){const r={x:n.x+n.width/2,y:n.y+n.height/2};let i,o=Number.MAX_VALUE;for(const a of t){const{x:u,y:c}=e4(r,a),f=e==="horizontal"?u:c;f<o&&(o=f,i=a)}return Bt(i,"No rect found"),i}let Xm;function Due(){return Xm===void 0&&(typeof matchMedia=="function"?Xm=!!matchMedia("(pointer:coarse)").matches:Xm=!1),Xm}function t4(e){const{element:t,orientation:n,panels:r,separators:i}=e,o=Uw(n,Array.from(t.children).filter(Jz).map(b=>({element:b}))).map(({element:b})=>b),a=[];let u=!1,c=!1,f=-1,h=-1,p=0,m,y=[];{let b=-1;for(const v of o)v.hasAttribute("data-panel")&&(b++,v.ariaDisabled===null&&(p++,f===-1&&(f=b),h=b))}if(p>1){let b=-1;for(const v of o)if(v.hasAttribute("data-panel")){b++;const S=r.find(x=>x.element===v);if(S){if(m){const x=m.element.getBoundingClientRect(),_=v.getBoundingClientRect();let k;if(c){const T=n==="horizontal"?new DOMRect(x.right,x.top,0,x.height):new DOMRect(x.left,x.bottom,x.width,0),A=n==="horizontal"?new DOMRect(_.left,_.top,0,_.height):new DOMRect(_.left,_.top,_.width,0);switch(y.length){case 0:{k=[T,A];break}case 1:{const D=y[0],O=Aue({orientation:n,rects:[x,_],targetRect:D.element.getBoundingClientRect()});k=[D,O===x?A:T];break}default:{k=y;break}}}else y.length?k=y:k=[n==="horizontal"?new DOMRect(x.right,_.top,_.left-x.right,_.height):new DOMRect(_.left,x.bottom,_.width,_.top-x.bottom)];for(const T of k){let A="width"in T?T:T.element.getBoundingClientRect();const D=Due()?e.resizeTargetMinimumSize.coarse:e.resizeTargetMinimumSize.fine;if(A.width<D){const $=D-A.width;A=new DOMRect(A.x-$/2,A.y,A.width+$,A.height)}if(A.height<D){const $=D-A.height;A=new DOMRect(A.x,A.y-$/2,A.width,A.height+$)}const O=b<=f||b>h;!u&&!O&&a.push({group:e,groupSize:tf({group:e}),panels:[m,S],separator:"width"in T?void 0:T,rect:A}),u=!1}}c=!1,m=S,y=[]}}else if(v.hasAttribute("data-separator")){v.ariaDisabled!==null&&(u=!0);const S=i.find(x=>x.element===v);S?y.push(S):(m=void 0,y=[])}else c=!0}return a}var ia;class Mue{constructor(){He(this,ia,{})}addListener(t,n){const r=K(this,ia)[t];return r===void 0?K(this,ia)[t]=[n]:r.includes(n)||r.push(n),()=>{this.removeListener(t,n)}}emit(t,n){const r=K(this,ia)[t];if(r!==void 0)if(r.length===1)r[0].call(null,n);else{let i=!1,o=null;const a=Array.from(r);for(let u=0;u<a.length;u++){const c=a[u];try{c.call(null,n)}catch(f){o===null&&(i=!0,o=f)}}if(i)throw o}}removeAllListeners(){$e(this,ia,{})}removeListener(t,n){const r=K(this,ia)[t];if(r!==void 0){const i=r.indexOf(n);i>=0&&r.splice(i,1)}}}ia=new WeakMap;function or(e,t,n=0){return Math.abs(Li(e)-Li(t))<=n}let di={cursorFlags:0,interactionState:{state:"inactive"},mountedGroups:new Map};const Zo=new Mue;function ur(){return di}function cr(e){const t=typeof e=="function"?e(di):e;if(di===t)return di;const n=di;return di={...di,...t},t.cursorFlags!==void 0&&Zo.emit("cursorFlagsChange",di.cursorFlags),t.interactionState!==void 0&&Zo.emit("interactionStateChange",di.interactionState),t.mountedGroups!==void 0&&(di.mountedGroups.forEach((r,i)=>{r.derivedPanelConstraints.forEach(o=>{if(o.collapsible){const{layout:a}=n.mountedGroups.get(i)??{};if(a){const u=or(o.collapsedSize,r.layout[o.panelId]),c=or(o.collapsedSize,a[o.panelId]);u&&!c&&(i.inMemoryLastExpandedPanelSizes[o.panelId]=a[o.panelId])}}})}),Zo.emit("mountedGroupsChange",di.mountedGroups)),di}function Oue(e,t,n){let r,i={x:1/0,y:1/0};for(const o of t){const a=e4(n,o.rect);switch(e){case"horizontal":{a.x<=i.x&&(r=o,i=a);break}case"vertical":{a.y<=i.y&&(r=o,i=a);break}}}return r?{distance:i,hitRegion:r}:void 0}function $ue(e){return e!==null&&typeof e=="object"&&"nodeType"in e&&e.nodeType===Node.DOCUMENT_FRAGMENT_NODE}function Pue(e,t){if(e===t)throw new Error("Cannot compare node with itself");const n={a:d2(e),b:d2(t)};let r;for(;n.a.at(-1)===n.b.at(-1);)r=n.a.pop(),n.b.pop();Bt(r,"Stacking order can only be calculated for elements with a common ancestor");const i={a:f2(c2(n.a)),b:f2(c2(n.b))};if(i.a===i.b){const o=r.childNodes,a={a:n.a.at(-1),b:n.b.at(-1)};let u=o.length;for(;u--;){const c=o[u];if(c===a.a)return 1;if(c===a.b)return-1}}return Math.sign(i.a-i.b)}const Nue=/\b(?:position|zIndex|opacity|transform|webkitTransform|mixBlendMode|filter|webkitFilter|isolation)\b/;function Iue(e){const t=getComputedStyle(n4(e)??e).display;return t==="flex"||t==="inline-flex"}function jue(e){const t=getComputedStyle(e);return!!(t.position==="fixed"||t.zIndex!=="auto"&&(t.position!=="static"||Iue(e))||+t.opacity<1||"transform"in t&&t.transform!=="none"||"webkitTransform"in t&&t.webkitTransform!=="none"||"mixBlendMode"in t&&t.mixBlendMode!=="normal"||"filter"in t&&t.filter!=="none"||"webkitFilter"in t&&t.webkitFilter!=="none"||"isolation"in t&&t.isolation==="isolate"||Nue.test(t.willChange)||t.webkitOverflowScrolling==="touch")}function c2(e){let t=e.length;for(;t--;){const n=e[t];if(Bt(n,"Missing node"),jue(n))return n}return null}function f2(e){return e&&Number(getComputedStyle(e).zIndex)||0}function d2(e){const t=[];for(;e;)t.push(e),e=n4(e);return t}function n4(e){const{parentNode:t}=e;return $ue(t)?t.host:t}function Lue(e,t){return e.x<t.x+t.width&&e.x+e.width>t.x&&e.y<t.y+t.height&&e.y+e.height>t.y}function Fue({groupElement:e,hitRegion:t,pointerEventTarget:n}){if(!Jz(n)||n.contains(e)||e.contains(n))return!0;if(Pue(n,e)>0){let r=n;for(;r;){if(r.contains(e))return!0;if(Lue(r.getBoundingClientRect(),t))return!1;r=r.parentElement}}return!0}function ZC(e,t){const n=[];return t.forEach((r,i)=>{if(i.disabled)return;const o=t4(i),a=Oue(i.orientation,o,{x:e.clientX,y:e.clientY});a&&a.distance.x<=0&&a.distance.y<=0&&Fue({groupElement:i.element,hitRegion:a.hitRegion.rect,pointerEventTarget:e.target})&&n.push(a.hitRegion)}),n}function zue(e,t){if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!=t[n])return!1;return!0}function Zi(e,t){return or(e,t)?0:e>t?1:-1}function cc({overrideDisabledPanels:e,panelConstraints:t,prevSize:n,size:r}){const{collapsedSize:i=0,collapsible:o,disabled:a,maxSize:u=100,minSize:c=0}=t;if(a&&!e)return n;if(Zi(r,c)<0)if(o){const f=(i+c)/2;Zi(r,f)<0?r=i:r=c}else r=c;return r=Math.min(u,r),r=Li(r),r}function mh({delta:e,initialLayout:t,panelConstraints:n,pivotIndices:r,prevLayout:i,trigger:o}){if(or(e,0))return t;const a=o==="imperative-api",u=Object.values(t),c=Object.values(i),f=[...u],[h,p]=r;Bt(h!=null,"Invalid first pivot index"),Bt(p!=null,"Invalid second pivot index");let m=0;switch(o){case"keyboard":{{const v=e<0?p:h,S=n[v];Bt(S,`Panel constraints not found for index ${v}`);const{collapsedSize:x=0,collapsible:_,minSize:k=0}=S;if(_){const T=u[v];if(Bt(T!=null,`Previous layout not found for panel index ${v}`),or(T,x)){const A=k-T;Zi(A,Math.abs(e))>0&&(e=e<0?0-A:A)}}}{const v=e<0?h:p,S=n[v];Bt(S,`No panel constraints found for index ${v}`);const{collapsedSize:x=0,collapsible:_,minSize:k=0}=S;if(_){const T=u[v];if(Bt(T!=null,`Previous layout not found for panel index ${v}`),or(T,k)){const A=T-x;Zi(A,Math.abs(e))>0&&(e=e<0?0-A:A)}}}break}default:{const v=e<0?p:h,S=n[v];Bt(S,`Panel constraints not found for index ${v}`);const x=u[v],{collapsible:_,collapsedSize:k,minSize:T}=S;if(_&&Zi(x,T)<0)if(e>0){const A=T-k,D=A/2,O=x+e;Zi(O,T)<0&&(e=Zi(e,D)<=0?0:A)}else{const A=T-k,D=100-A/2,O=x-e;Zi(O,T)<0&&(e=Zi(100+e,D)>0?0:-A)}break}}{const v=e<0?1:-1;let S=e<0?p:h,x=0;for(;;){const k=u[S];Bt(k!=null,`Previous layout not found for panel index ${S}`);const T=cc({overrideDisabledPanels:a,panelConstraints:n[S],prevSize:k,size:100})-k;if(x+=T,S+=v,S<0||S>=n.length)break}const _=Math.min(Math.abs(e),Math.abs(x));e=e<0?0-_:_}{let v=e<0?h:p;for(;v>=0&&v<n.length;){const S=Math.abs(e)-Math.abs(m),x=u[v];Bt(x!=null,`Previous layout not found for panel index ${v}`);const _=x-S,k=cc({overrideDisabledPanels:a,panelConstraints:n[v],prevSize:x,size:_});if(!or(x,k)&&(m+=x-k,f[v]=k,m.toFixed(3).localeCompare(Math.abs(e).toFixed(3),void 0,{numeric:!0})>=0))break;e<0?v--:v++}}if(zue(c,f))return i;{const v=e<0?p:h,S=u[v];Bt(S!=null,`Previous layout not found for panel index ${v}`);const x=S+m,_=cc({overrideDisabledPanels:a,panelConstraints:n[v],prevSize:S,size:x});if(f[v]=_,!or(_,x)){let k=x-_,T=e<0?p:h;for(;T>=0&&T<n.length;){const A=f[T];Bt(A!=null,`Previous layout not found for panel index ${T}`);const D=A+k,O=cc({overrideDisabledPanels:a,panelConstraints:n[T],prevSize:A,size:D});if(or(A,O)||(k-=O-A,f[T]=O),or(k,0))break;e>0?T--:T++}}}const y=Object.values(f).reduce((v,S)=>S+v,0);if(!or(y,100,.1))return i;const b=Object.keys(i);return f.reduce((v,S,x)=>(v[b[x]]=S,v),{})}function Yl(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(t[n]===void 0||Zi(e[n],t[n])!==0)return!1;return!0}function Wl({layout:e,panelConstraints:t}){const n=Object.values(e),r=[...n],i=r.reduce((u,c)=>u+c,0);if(r.length!==t.length)throw Error(`Invalid ${t.length} panel layout: ${r.map(u=>`${u}%`).join(", ")}`);if(!or(i,100)&&r.length>0)for(let u=0;u<t.length;u++){const c=r[u];Bt(c!=null,`No layout data found for index ${u}`);const f=100/i*c;r[u]=f}let o=0;for(let u=0;u<t.length;u++){const c=n[u];Bt(c!=null,`No layout data found for index ${u}`);const f=r[u];Bt(f!=null,`No layout data found for index ${u}`);const h=cc({overrideDisabledPanels:!0,panelConstraints:t[u],prevSize:c,size:f});f!=h&&(o+=f-h,r[u]=h)}if(!or(o,0))for(let u=0;u<t.length;u++){const c=r[u];Bt(c!=null,`No layout data found for index ${u}`);const f=c+o,h=cc({overrideDisabledPanels:!0,panelConstraints:t[u],prevSize:c,size:f});if(c!==h&&(o-=h-c,r[u]=h,or(o,0)))break}const a=Object.keys(e);return r.reduce((u,c,f)=>(u[a[f]]=c,u),{})}function r4({groupId:e,panelId:t}){const n=()=>{const{mountedGroups:u}=ur();for(const[c,{defaultLayoutDeferred:f,derivedPanelConstraints:h,layout:p,separatorToPanels:m}]of u)if(c.id===e)return{defaultLayoutDeferred:f,derivedPanelConstraints:h,group:c,layout:p,separatorToPanels:m};throw Error(`Group ${e} not found`)},r=()=>{const u=n().derivedPanelConstraints.find(c=>c.panelId===t);if(u!==void 0)return u;throw Error(`Panel constraints not found for Panel ${t}`)},i=()=>{const u=n().group.panels.find(c=>c.id===t);if(u!==void 0)return u;throw Error(`Layout not found for Panel ${t}`)},o=()=>{const u=n().layout[t];if(u!==void 0)return u;throw Error(`Layout not found for Panel ${t}`)},a=u=>{const c=o();if(u===c)return;const{defaultLayoutDeferred:f,derivedPanelConstraints:h,group:p,layout:m,separatorToPanels:y}=n(),b=p.panels.findIndex(_=>_.id===t),v=b===p.panels.length-1,S=mh({delta:v?c-u:u-c,initialLayout:m,panelConstraints:h,pivotIndices:v?[b-1,b]:[b,b+1],prevLayout:m,trigger:"imperative-api"}),x=Wl({layout:S,panelConstraints:h});Yl(m,x)||cr(_=>({mountedGroups:new Map(_.mountedGroups).set(p,{defaultLayoutDeferred:f,derivedPanelConstraints:h,layout:x,separatorToPanels:y})}))};return{collapse:()=>{const{collapsible:u,collapsedSize:c}=r(),{mutableValues:f}=i(),h=o();u&&h!==c&&(f.expandToSize=h,a(c))},expand:()=>{const{collapsible:u,collapsedSize:c,minSize:f}=r(),{mutableValues:h}=i(),p=o();if(u&&p===c){let m=h.expandToSize??f;m===0&&(m=1),a(m)}},getSize:()=>{const{group:u}=n(),c=o(),{element:f}=i(),h=u.orientation==="horizontal"?f.offsetWidth:f.offsetHeight;return{asPercentage:c,inPixels:h}},isCollapsed:()=>{const{collapsible:u,collapsedSize:c}=r(),f=o();return u&&or(c,f)},resize:u=>{if(o()!==u){let c;switch(typeof u){case"number":{const{group:f}=n(),h=tf({group:f});c=Li(u/h*100);break}case"string":{c=parseFloat(u);break}}a(c)}}}}function h2(e){if(e.defaultPrevented)return;const{mountedGroups:t}=ur();ZC(e,t).forEach(n=>{if(n.separator){const r=n.panels.find(i=>i.panelConstraints.defaultSize!==void 0);if(r){const i=r.panelConstraints.defaultSize,o=r4({groupId:n.group.id,panelId:r.id});o&&i!==void 0&&(o.resize(i),e.preventDefault())}}})}function Cg(e){const{mountedGroups:t}=ur();for(const[n]of t)if(n.separators.some(r=>r.element===e))return n;throw Error("Could not find parent Group for separator element")}function i4({groupId:e}){const t=()=>{const{mountedGroups:n}=ur();for(const[r,i]of n)if(r.id===e)return{group:r,...i};throw Error(`Could not find Group with id "${e}"`)};return{getLayout(){const{defaultLayoutDeferred:n,layout:r}=t();return n?{}:r},setLayout(n){const{defaultLayoutDeferred:r,derivedPanelConstraints:i,group:o,layout:a,separatorToPanels:u}=t(),c=Wl({layout:n,panelConstraints:i});if(r)return a;if(!Yl(a,c)){cr(h=>({mountedGroups:new Map(h.mountedGroups).set(o,{defaultLayoutDeferred:r,derivedPanelConstraints:i,layout:c,separatorToPanels:u})}));const f=o.panels.map(({id:h})=>h).join(",");o.inMemoryLayouts[f]=c}return c}}}function o4(e){const{mountedGroups:t}=ur(),n=t.get(e);return Bt(n,`Mounted Group ${e.id} not found`),n}function fl(e,t){const n=Cg(e),r=o4(n),i=n.separators.find(h=>h.element===e);Bt(i,"Matching separator not found");const o=r.separatorToPanels.get(i);Bt(o,"Matching panels not found");const a=o.map(h=>n.panels.indexOf(h)),u=i4({groupId:n.id}).getLayout(),c=mh({delta:t,initialLayout:u,panelConstraints:r.derivedPanelConstraints,pivotIndices:a,prevLayout:u,trigger:"keyboard"}),f=Wl({layout:c,panelConstraints:r.derivedPanelConstraints});Yl(u,f)||cr(h=>({mountedGroups:new Map(h.mountedGroups).set(n,{defaultLayoutDeferred:r.defaultLayoutDeferred,derivedPanelConstraints:r.derivedPanelConstraints,layout:f,separatorToPanels:r.separatorToPanels})}))}function p2(e){if(e.defaultPrevented)return;const t=e.currentTarget,n=Cg(t);if(!n.disabled)switch(e.key){case"ArrowDown":{e.preventDefault(),n.orientation==="vertical"&&fl(t,5);break}case"ArrowLeft":{e.preventDefault(),n.orientation==="horizontal"&&fl(t,-5);break}case"ArrowRight":{e.preventDefault(),n.orientation==="horizontal"&&fl(t,5);break}case"ArrowUp":{e.preventDefault(),n.orientation==="vertical"&&fl(t,-5);break}case"End":{e.preventDefault(),fl(t,100);break}case"Enter":{e.preventDefault();const r=Cg(t),{derivedPanelConstraints:i,layout:o,separatorToPanels:a}=o4(r),u=r.separators.find(p=>p.element===t);Bt(u,"Matching separator not found");const c=a.get(u);Bt(c,"Matching panels not found");const f=c[0],h=i.find(p=>p.panelId===f.id);if(Bt(h,"Panel metadata not found"),h.collapsible){const p=o[f.id],m=h.collapsedSize===p?r.inMemoryLastExpandedPanelSizes[f.id]??h.minSize:h.collapsedSize;fl(t,m-p)}break}case"F6":{e.preventDefault();const r=Cg(t).separators.map(a=>a.element),i=Array.from(r).findIndex(a=>a===e.currentTarget);Bt(i!==null,"Index not found");const o=e.shiftKey?i>0?i-1:r.length-1:i+1<r.length?i+1:0;r[o].focus();break}case"Home":{e.preventDefault(),fl(t,-100);break}}}function m2(e){if(e.defaultPrevented||e.pointerType==="mouse"&&e.button>0)return;const{mountedGroups:t}=ur(),n=ZC(e,t),r=new Map;let i=!1;n.forEach(o=>{o.separator&&(i||(i=!0,o.separator.element.focus()));const a=t.get(o.group);a&&r.set(o.group,a.layout)}),cr({interactionState:{hitRegions:n,initialLayoutMap:r,pointerDownAtPoint:{x:e.clientX,y:e.clientY},state:"active"}}),n.length&&e.preventDefault()}const Bue=e=>e,Bx=()=>{},s4=1,a4=2,l4=4,u4=8,g2=3,y2=12;let Qm;function b2(){return Qm===void 0&&(Qm=!1,typeof window<"u"&&(window.navigator.userAgent.includes("Chrome")||window.navigator.userAgent.includes("Firefox"))&&(Qm=!0)),Qm}function Uue({cursorFlags:e,groups:t,state:n}){let r=0,i=0;switch(n){case"active":case"hover":t.forEach(o=>{if(!o.disableCursor)switch(o.orientation){case"horizontal":{r++;break}case"vertical":{i++;break}}})}if(!(r===0&&i===0)){switch(n){case"active":{if(e&&b2()){const o=(e&s4)!==0,a=(e&a4)!==0,u=(e&l4)!==0,c=(e&u4)!==0;if(o)return u?"se-resize":c?"ne-resize":"e-resize";if(a)return u?"sw-resize":c?"nw-resize":"w-resize";if(u)return"s-resize";if(c)return"n-resize"}break}}return b2()?r>0&&i>0?"move":r>0?"ew-resize":"ns-resize":r>0&&i>0?"grab":r>0?"col-resize":"row-resize"}}const v2=new WeakMap;function JC(e){if(e.defaultView===null||e.defaultView===void 0)return;let{prevStyle:t,styleSheet:n}=v2.get(e)??{};n===void 0&&(n=new e.defaultView.CSSStyleSheet,e.adoptedStyleSheets.push(n));const{cursorFlags:r,interactionState:i}=ur();switch(i.state){case"active":case"hover":{const o=Uue({cursorFlags:r,groups:i.hitRegions.map(u=>u.group),state:i.state}),a=`*, *:hover {cursor: ${o} !important; }`;if(t===a)return;t=a,o?n.cssRules.length===0?n.insertRule(a):n.replaceSync(a):n.cssRules.length===1&&n.deleteRule(0);break}case"inactive":{t=void 0,n.cssRules.length===1&&n.deleteRule(0);break}}v2.set(e,{prevStyle:t,styleSheet:n})}function c4({document:e,event:t,hitRegions:n,initialLayoutMap:r,mountedGroups:i,pointerDownAtPoint:o,prevCursorFlags:a}){let u=0;const c=new Map(i);n.forEach(h=>{const{group:p,groupSize:m}=h,{disableCursor:y,orientation:b,panels:v}=p;let S=0;o?b==="horizontal"?S=(t.clientX-o.x)/m*100:S=(t.clientY-o.y)/m*100:b==="horizontal"?S=t.clientX<0?-100:100:S=t.clientY<0?-100:100;const x=r.get(p),{defaultLayoutDeferred:_,derivedPanelConstraints:k,layout:T,separatorToPanels:A}=i.get(p)??{defaultLayoutDeferred:!1};if(k&&x&&T&&A){const D=mh({delta:S,initialLayout:x,panelConstraints:k,pivotIndices:h.panels.map(O=>v.indexOf(O)),prevLayout:T,trigger:"mouse-or-touch"});if(Yl(D,T)){if(S!==0&&!y)switch(b){case"horizontal":{u|=S<0?s4:a4;break}case"vertical":{u|=S<0?l4:u4;break}}}else{c.set(h.group,{defaultLayoutDeferred:_,derivedPanelConstraints:k,layout:D,separatorToPanels:A});const O=h.group.panels.map(({id:$})=>$).join(",");h.group.inMemoryLayouts[O]=D}}});let f=0;t.movementX===0?f|=a&g2:f|=u&g2,t.movementY===0?f|=a&y2:f|=u&y2,cr({cursorFlags:f,mountedGroups:c}),JC(e)}function x2(e){const{cursorFlags:t,interactionState:n,mountedGroups:r}=ur();n.state==="active"&&c4({document:e.currentTarget,event:e,hitRegions:n.hitRegions,initialLayoutMap:n.initialLayoutMap,mountedGroups:r,prevCursorFlags:t})}function w2(e){if(e.defaultPrevented)return;const{cursorFlags:t,interactionState:n,mountedGroups:r}=ur();switch(n.state){case"active":{if(e.buttons===0){cr(i=>i.interactionState.state==="inactive"?i:{cursorFlags:0,interactionState:{state:"inactive"}}),cr(i=>({mountedGroups:new Map(i.mountedGroups)}));return}c4({document:e.currentTarget,event:e,hitRegions:n.hitRegions,initialLayoutMap:n.initialLayoutMap,mountedGroups:r,pointerDownAtPoint:n.pointerDownAtPoint,prevCursorFlags:t});break}default:{const i=ZC(e,r);i.length===0?n.state!=="inactive"&&cr({interactionState:{state:"inactive"}}):cr({interactionState:{hitRegions:i,state:"hover"}}),JC(e.currentTarget);break}}}function S2(e){if(e.relatedTarget instanceof HTMLIFrameElement){const{interactionState:t}=ur();t.state==="hover"&&cr({interactionState:{state:"inactive"}})}}function C2(e){if(e.defaultPrevented||e.pointerType==="mouse"&&e.button>0)return;const{interactionState:t}=ur();t.state==="active"&&(cr({cursorFlags:0,interactionState:{state:"inactive"}}),t.hitRegions.length>0&&(JC(e.currentTarget),cr(n=>({mountedGroups:new Map(n.mountedGroups)})),e.preventDefault()))}function E2(e){let t=0,n=0;const r={};for(const o of e)if(o.defaultSize!==void 0){t++;const a=Li(o.defaultSize);n+=a,r[o.panelId]=a}else r[o.panelId]=void 0;const i=e.length-t;if(i!==0){const o=Li((100-n)/i);for(const a of e)a.defaultSize===void 0&&(r[a.panelId]=o)}return r}function Hue(e,t,n){if(!n[0])return;const r=e.panels.find(c=>c.element===t);if(!r||!r.onResize)return;const i=tf({group:e}),o=e.orientation==="horizontal"?r.element.offsetWidth:r.element.offsetHeight,a=r.mutableValues.prevSize,u={asPercentage:Li(o/i*100),inPixels:o};r.mutableValues.prevSize=u,r.onResize(u,r.id,a)}function Gue(e,t){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(e[n]!==t[n])return!1;return!0}function Vue(e,t){const n=e.map(i=>i.id),r=Object.keys(t);if(n.length!==r.length)return!1;for(const i of n)if(!r.includes(i))return!1;return!0}const Zu=new Map;function que(e){let t=!0;Bt(e.element.ownerDocument.defaultView,"Cannot register an unmounted Group");const n=e.element.ownerDocument.defaultView.ResizeObserver,r=new Set,i=new Set,o=new n(b=>{for(const v of b){const{borderBoxSize:S,target:x}=v;if(x===e.element){if(t){if(tf({group:e})===0)return;cr(_=>{const k=_.mountedGroups.get(e);if(k){const T=Bw(e),A=k.defaultLayoutDeferred?E2(T):k.layout,D=Wl({layout:A,panelConstraints:T});return!k.defaultLayoutDeferred&&Yl(A,D)&&Gue(k.derivedPanelConstraints,T)?_:{mountedGroups:new Map(_.mountedGroups).set(e,{defaultLayoutDeferred:!1,derivedPanelConstraints:T,layout:D,separatorToPanels:k.separatorToPanels})}}return _})}}else Hue(e,x,S)}});o.observe(e.element),e.panels.forEach(b=>{Bt(!r.has(b.id),`Panel ids must be unique; id "${b.id}" was used more than once`),r.add(b.id),b.onResize&&o.observe(b.element)});const a=tf({group:e}),u=Bw(e),c=e.panels.map(({id:b})=>b).join(",");let f=e.defaultLayout;f&&(Vue(e.panels,f)||(f=void 0));const h=e.inMemoryLayouts[c]??f??E2(u),p=Wl({layout:h,panelConstraints:u}),m=t4(e),y=e.element.ownerDocument;return cr(b=>{const v=new Map;return Zu.set(y,(Zu.get(y)??0)+1),m.forEach(S=>{S.separator&&v.set(S.separator,S.panels)}),{mountedGroups:new Map(b.mountedGroups).set(e,{defaultLayoutDeferred:a===0,derivedPanelConstraints:u,layout:p,separatorToPanels:v})}}),e.separators.forEach(b=>{Bt(!i.has(b.id),`Separator ids must be unique; id "${b.id}" was used more than once`),i.add(b.id),b.element.addEventListener("keydown",p2)}),Zu.get(y)===1&&(y.addEventListener("dblclick",h2,!0),y.addEventListener("pointerdown",m2,!0),y.addEventListener("pointerleave",x2),y.addEventListener("pointermove",w2),y.addEventListener("pointerout",S2),y.addEventListener("pointerup",C2,!0)),function(){t=!1,Zu.set(y,Math.max(0,(Zu.get(y)??0)-1)),cr(b=>{const v=new Map(b.mountedGroups);return v.delete(e),{mountedGroups:v}}),e.separators.forEach(b=>{b.element.removeEventListener("keydown",p2)}),Zu.get(y)||(y.removeEventListener("dblclick",h2,!0),y.removeEventListener("pointerdown",m2,!0),y.removeEventListener("pointerleave",x2),y.removeEventListener("pointermove",w2),y.removeEventListener("pointerout",S2),y.removeEventListener("pointerup",C2,!0)),o.disconnect()}}function Yue(){const[e,t]=C.useState({}),n=C.useCallback(()=>t({}),[]);return[e,n]}function eE(e){const t=C.useId();return`${e??t}`}const su=typeof window<"u"?C.useLayoutEffect:C.useEffect;function Vd(e){const t=C.useRef(e);return su(()=>{t.current=e},[e]),C.useCallback((...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[t])}function tE(...e){return Vd(t=>{e.forEach(n=>{if(n)switch(typeof n){case"function":{n(t);break}case"object":{n.current=t;break}}})})}function nE(e){const t=C.useRef({...e});return su(()=>{for(const n in e)t.current[n]=e[n]},[e]),t.current}const f4=C.createContext(null);function Wue(e,t){const n=C.useRef({getLayout:()=>({}),setLayout:Bue});C.useImperativeHandle(t,()=>n.current,[]),su(()=>{Object.assign(n.current,i4({groupId:e}))})}function d4({children:e,className:t,defaultLayout:n,disableCursor:r,disabled:i,elementRef:o,groupRef:a,id:u,onLayoutChange:c,onLayoutChanged:f,orientation:h="horizontal",resizeTargetMinimumSize:p={coarse:20,fine:10},style:m,...y}){const b=C.useRef({onLayoutChange:{},onLayoutChanged:{}}),v=Vd(N=>{Yl(b.current.onLayoutChange,N)||(b.current.onLayoutChange=N,c==null||c(N))}),S=Vd(N=>{Yl(b.current.onLayoutChanged,N)||(b.current.onLayoutChanged=N,f==null||f(N))}),x=eE(u),_=C.useRef(null),[k,T]=Yue(),A=C.useRef({lastExpandedPanelSizes:{},layouts:{},panels:[],resizeTargetMinimumSize:p,separators:[]}),D=tE(_,o);Wue(x,a);const O=Vd((N,M)=>{const{interactionState:z,mountedGroups:G}=ur();for(const L of G.keys())if(L.id===N){const F=G.get(L);if(F){let U=!1;return z.state==="active"&&(U=z.hitRegions.some(q=>q.group===L)),{flexGrow:F.layout[M]??1,pointerEvents:U?"none":void 0}}}return{flexGrow:(n==null?void 0:n[M])??1}}),$=nE({defaultLayout:n,disableCursor:r}),B=C.useMemo(()=>({get disableCursor(){return!!$.disableCursor},getPanelStyles:O,id:x,orientation:h,registerPanel:N=>{const M=A.current;return M.panels=Uw(h,[...M.panels,N]),T(),()=>{M.panels=M.panels.filter(z=>z!==N),T()}},registerSeparator:N=>{const M=A.current;return M.separators=Uw(h,[...M.separators,N]),T(),()=>{M.separators=M.separators.filter(z=>z!==N),T()}},togglePanelDisabled:(N,M)=>{const z=A.current.panels.find(L=>L.id===N);z&&(z.panelConstraints.disabled=M);const{mountedGroups:G}=ur();for(const L of G.keys())if(L.id===x){const F=G.get(L);F&&(F.derivedPanelConstraints=Bw(L))}},toggleSeparatorDisabled:(N,M)=>{const z=A.current.separators.find(G=>G.id===N);z&&(z.disabled=M)}}),[O,x,T,h,$]),j=C.useRef(null);return su(()=>{const N=_.current;if(N===null)return;const M=A.current;let z;if($.defaultLayout!==void 0&&Object.keys($.defaultLayout).length===M.panels.length){z={};for(const W of M.panels){const I=$.defaultLayout[W.id];I!==void 0&&(z[W.id]=I)}}const G={defaultLayout:z,disableCursor:!!$.disableCursor,disabled:!!i,element:N,id:x,inMemoryLastExpandedPanelSizes:A.current.lastExpandedPanelSizes,inMemoryLayouts:A.current.layouts,orientation:h,panels:M.panels,resizeTargetMinimumSize:M.resizeTargetMinimumSize,separators:M.separators};j.current=G;const L=que(G),F=ur().mountedGroups.get(G);if(F){const{defaultLayoutDeferred:W,derivedPanelConstraints:I,layout:Y}=F;!W&&I.length>0&&(v(Y),S(Y))}const U=Zo.addListener("interactionStateChange",W=>{W.state}),q=Zo.addListener("mountedGroupsChange",W=>{const I=W.get(G);if(I){const{defaultLayoutDeferred:Y,derivedPanelConstraints:J,layout:H}=I;if(Y||J.length===0)return;const{interactionState:ie}=ur(),re=ie.state!=="active";v(H),re&&S(H)}});return()=>{j.current=null,L(),U(),q()}},[i,x,S,v,h,k,$]),C.useEffect(()=>{const N=j.current;N&&(N.defaultLayout=n,N.disableCursor=!!r)}),E.jsx(f4.Provider,{value:B,children:E.jsx("div",{...y,className:t,"data-group":!0,"data-testid":x,id:x,ref:D,style:{height:"100%",width:"100%",overflow:"hidden",...m,display:"flex",flexDirection:h==="horizontal"?"row":"column",flexWrap:"nowrap",touchAction:h==="horizontal"?"pan-y":"pan-x"},children:e})})}d4.displayName="Group";function rE(){const e=C.useContext(f4);return Bt(e,"Group Context not found; did you render a Panel or Separator outside of a Group?"),e}function Kue(e,t){const{id:n}=rE(),r=C.useRef({collapse:Bx,expand:Bx,getSize:()=>({asPercentage:0,inPixels:0}),isCollapsed:()=>!1,resize:Bx});C.useImperativeHandle(t,()=>r.current,[]),su(()=>{Object.assign(r.current,r4({groupId:n,panelId:e}))})}function h4({children:e,className:t,collapsedSize:n="0%",collapsible:r=!1,defaultSize:i,disabled:o,elementRef:a,id:u,maxSize:c="100%",minSize:f="0%",onResize:h,panelRef:p,style:m,...y}){const b=!!u,v=eE(u),S=nE({disabled:o}),x=C.useRef(null),_=tE(x,a),{getPanelStyles:k,id:T,orientation:A,registerPanel:D,togglePanelDisabled:O}=rE(),$=h!==null,B=Vd((N,M,z)=>{h==null||h(N,u,z)});su(()=>{const N=x.current;if(N!==null){const M={element:N,id:v,idIsStable:b,mutableValues:{expandToSize:void 0,prevSize:void 0},onResize:$?B:void 0,panelConstraints:{collapsedSize:n,collapsible:r,defaultSize:i,disabled:S.disabled,maxSize:c,minSize:f}};return D(M)}},[n,r,i,$,v,b,c,f,B,D,S]),C.useEffect(()=>{O(v,!!o)},[o,v,O]),Kue(v,p);const j=C.useSyncExternalStore(N=>(Zo.addListener("mountedGroupsChange",N),()=>{Zo.removeListener("mountedGroupsChange",N)}),()=>JSON.stringify(k(T,v)),()=>JSON.stringify(k(T,v)));return E.jsx("div",{...y,"aria-disabled":o||void 0,"data-panel":!0,"data-testid":v,id:v,ref:_,style:{...Xue,display:"flex",flexBasis:0,flexShrink:1,overflow:"hidden",...JSON.parse(j)},children:E.jsx("div",{className:t,style:{maxHeight:"100%",maxWidth:"100%",flexGrow:1,...m,touchAction:A==="horizontal"?"pan-y":"pan-x"},children:e})})}h4.displayName="Panel";const Xue={minHeight:0,maxHeight:"100%",height:"auto",minWidth:0,maxWidth:"100%",width:"auto",border:"none",borderWidth:0,padding:0,margin:0};function Que({layout:e,panelConstraints:t,panelId:n,panelIndex:r}){let i,o;const a=e[n],u=t.find(c=>c.panelId===n);if(u){const c=u.maxSize,f=u.collapsible?u.collapsedSize:u.minSize,h=[r,r+1];o=Wl({layout:mh({delta:f-a,initialLayout:e,panelConstraints:t,pivotIndices:h,prevLayout:e}),panelConstraints:t})[n],i=Wl({layout:mh({delta:c-a,initialLayout:e,panelConstraints:t,pivotIndices:h,prevLayout:e}),panelConstraints:t})[n]}return{valueControls:n,valueMax:i,valueMin:o,valueNow:a}}function p4({children:e,className:t,disabled:n,elementRef:r,id:i,style:o,...a}){const u=eE(i),c=nE({disabled:n}),[f,h]=C.useState({}),[p,m]=C.useState("inactive"),y=C.useRef(null),b=tE(y,r),{disableCursor:v,id:S,orientation:x,registerSeparator:_,toggleSeparatorDisabled:k}=rE(),T=x==="horizontal"?"vertical":"horizontal";su(()=>{const D=y.current;if(D!==null){const O={disabled:c.disabled,element:D,id:u},$=_(O),B=Zo.addListener("interactionStateChange",N=>{m(N.state!=="inactive"&&N.hitRegions.some(M=>M.separator===O)?N.state:"inactive")}),j=Zo.addListener("mountedGroupsChange",N=>{N.forEach(({derivedPanelConstraints:M,layout:z,separatorToPanels:G},L)=>{if(L.id===S){const F=G.get(O);if(F){const U=F[0],q=L.panels.indexOf(U);h(Que({layout:z,panelConstraints:M,panelId:U.id,panelIndex:q}))}}})});return()=>{B(),j(),$()}}},[S,u,_,c]),C.useEffect(()=>{k(u,!!n)},[n,u,k]);let A;return n&&!v&&(A="not-allowed"),E.jsx("div",{...a,"aria-controls":f.valueControls,"aria-disabled":n||void 0,"aria-orientation":T,"aria-valuemax":f.valueMax,"aria-valuemin":f.valueMin,"aria-valuenow":f.valueNow,children:e,className:t,"data-separator":n?"disabled":p,"data-testid":u,id:u,ref:b,role:"separator",style:{flexBasis:"auto",cursor:A,...o,flexGrow:0,flexShrink:0,touchAction:"none"},tabIndex:n?void 0:0})}p4.displayName="Separator";const Zue="_resizable_uti8j_1",yy={resizable:Zue,"resizable-panel":"_resizable-panel_uti8j_15","resizable-handle":"_resizable-handle_uti8j_19","resizable-handle-grip":"_resizable-handle-grip_uti8j_48"},m4=({direction:e,className:t,children:n,...r})=>E.jsx(d4,{"data-slot":"resizable","data-direction":e,orientation:e,className:ze(yy.resizable,t),...r,children:n});m4.displayName="Resizable";const g4=({withHandle:e,className:t,children:n,disabled:r,...i})=>E.jsx(p4,{"data-slot":"resizable-handle","data-disabled":r?"":void 0,className:ze(yy["resizable-handle"],t),...i,children:n??(e!==!1&&E.jsx("div",{className:yy["resizable-handle-grip"],children:E.jsx(PG,{size:10})}))});g4.displayName="ResizableHandle";const Hw=({className:e,children:t,...n})=>E.jsx(h4,{"data-slot":"resizable-panel",className:ze(yy["resizable-panel"],e),...n,children:t});Hw.displayName="ResizablePanel";const y4=({children:e,...t})=>E.jsx(Ko,{render:E.jsx("nav",{}),"aria-label":"breadcrumbs","data-slot":"breadcrumbs",...t,children:e});y4.displayName="BreadcrumbsContainer";const Jue={"breadcrumbs-list":"_breadcrumbs-list_j5s62_1"},b4=({className:e,...t})=>E.jsx("ol",{"data-slot":"breadcrumbs-list",className:ze(Jue["breadcrumbs-list"],e),...t});b4.displayName="BreadcrumbsList";const ece={"breadcrumbs-item":"_breadcrumbs-item_fl4mk_1"},v4=({className:e,...t})=>E.jsx("li",{"data-slot":"breadcrumbs-item",className:ze(ece["breadcrumbs-item"],e),...t});v4.displayName="BreadcrumbsItem";const x4=({children:e,...t})=>E.jsx("li",{"data-slot":"breadcrumbs-separator",role:"presentation","aria-hidden":"true",...t,children:e??E.jsx(J$,{size:16})});x4.displayName="BreadcrumbsSeparator";const iE=({items:e,linkAs:t="a",...n})=>E.jsx(y4,{"data-slot":"breadcrumbs",...n,children:E.jsx(b4,{children:e.map((r,i)=>{const o=i===e.length-1,a=r.icon,u=E.jsxs(er,{condition:!!a,render:E.jsx(Xe,{gap:2,ay:"center"}),children:[a&&E.jsx(a,{size:14}),r.label]});return E.jsxs(C.Fragment,{children:[E.jsx(v4,{children:o?u:E.jsx(t,{href:r.value,children:u})}),!o&&E.jsx(x4,{})]},r.value)})})});iE.displayName="Breadcrumbs";const Sf={"table-cell":"_table-cell_1oqmd_3","table-container":"_table-container_1oqmd_12","table-head":"_table-head_1oqmd_18","table-header":"_table-header_1oqmd_29","table-root":"_table-root_1oqmd_34","table-row":"_table-row_1oqmd_43"},oE=({children:e,className:t,...n})=>E.jsx("div",{"data-slot":"table-container",className:ze(Sf["table-container"],t),...n,children:e});oE.displayName="TableContainer";const sE=({striped:e,bordered:t,className:n,children:r,...i})=>E.jsx("table",{"data-slot":"table-root","data-striped":e,"data-bordered":t,className:ze(Sf["table-root"],n),...i,children:r});sE.displayName="TableRoot";const w4=({className:e,...t})=>E.jsx("thead",{"data-slot":"table-header",className:ze(Sf["table-header"],e),...t});w4.displayName="TableHeader";const aE=({className:e,render:t=E.jsx("tr",{}),...n})=>E.jsx(Ko,{"data-slot":"table-row",className:ze(Sf["table-row"],e),render:t,...n});aE.displayName="TableRow";const gh=({className:e,collapse:t,...n})=>E.jsx("td",{"data-slot":"table-cell","data-collapse":t,className:ze(Sf["table-cell"],e),...n});gh.displayName="TableCell";const S4=({className:e,collapse:t,...n})=>E.jsx("th",{"data-slot":"table-head","data-collapse":t,className:ze(Sf["table-head"],e),...n});S4.displayName="TableHead";const lE=({...e})=>E.jsx("tbody",{"data-slot":"table-body",...e});lE.displayName="TableBody";const C4=({icon:e,tooltip:t="More options",items:n})=>E.jsx(Yz,{align:"end",trigger:E.jsx(Ei,{tooltip:t,"aria-label":t,size:"small",variant:"ghost",shape:"square",children:e?E.jsx(e,{}):E.jsx(nP,{size:14})}),items:n});C4.displayName="TableCellDropdown";function tce({wrapper:e,onClick:t,item:n,...r}){const i=E.jsx(Ei,{tooltip:r.tooltip,size:"small",variant:"ghost",shape:"square",onClick:t?()=>t(n):void 0,children:r.icon?E.jsx(r.icon,{}):E.jsx(nP,{size:14})},r.tooltip);return e?e(i,n):i}function E4({actions:e,item:t}){var n;return E.jsx(gh,{collapse:!0,children:E.jsxs(Xe,{ax:"end",children:[(n=e.primary)==null?void 0:n.map(r=>E.jsx(tce,{item:t,...r},r.tooltip)),e.secondary&&E.jsx(C4,{...e.secondary})]})})}E4.displayName="TableCellActions";function nce(e={}){const{immediate:t=!1,onNeedReload:n,onNeedRefresh:r,onOfflineReady:i,onRegistered:o,onRegisteredSW:a,onRegisterError:u}=e;let c,f;const h=async(m=!0)=>{await f};async function p(){if("serviceWorker"in navigator){if(c=await Ur(async()=>{const{Workbox:m}=await import("./workbox-window.prod.es5-BBnX5xw4.js");return{Workbox:m}},[]).then(({Workbox:m})=>new m("/sw.js",{scope:"/",type:"classic"})).catch(m=>{u==null||u(m)}),!c)return;c.addEventListener("activated",m=>{(m.isUpdate||m.isExternal)&&(n?n():window.location.reload())}),c.addEventListener("installed",m=>{m.isUpdate||i==null||i()}),c.register({immediate:t}).then(m=>{a?a("/sw.js",m):o==null||o(m)}).catch(m=>{u==null||u(m)})}}return f=p(),h}const rce="bertrand:apiBase";function ice(){if(typeof window<"u")try{const e=window.localStorage.getItem(rce);if(e)return e.replace(/\/$/,"")}catch{}return""}function cb(e){return`${ice()}${e}`}async function au(e){const t=await fetch(cb(e));if(!t.ok)throw new Error(`${t.status} ${t.statusText}`);return t.json()}class k4 extends Error{constructor(n,r){super(n);te(this,"reason");this.name="ArchiveError",this.reason=r}}async function R4(e,t){const n=await fetch(cb(`/api/sessions/${e}/${t}`),{method:"POST"});if(!n.ok){const r=await n.json().catch(()=>({}));throw new k4(r.error??n.statusText,r.reason??"unknown")}return n.json()}const k2=e=>R4(e,"archive"),R2=e=>R4(e,"unarchive"),Kl=(e={})=>({queryKey:["sessions",{includeArchived:!!e.includeArchived}],queryFn:()=>au(e.includeArchived?"/api/sessions?excludeArchived=false":"/api/sessions"),refetchInterval:2e3,placeholderData:Rh}),oce=(e,t=!1)=>({queryKey:["events",e],queryFn:()=>au(`/api/events/${e}`),enabled:!!e,refetchInterval:t?1e3:!1,placeholderData:Rh}),sce=(e,t=!1)=>({queryKey:["stats",e],queryFn:()=>au(`/api/stats/${e}`),enabled:!!e,refetchInterval:t?2e3:!1,placeholderData:Rh}),ace=(e=!1)=>({queryKey:["stats"],queryFn:()=>au("/api/stats"),refetchInterval:e?2e3:!1,placeholderData:Rh}),lce=(e,t=!1)=>({queryKey:["engagement",e],queryFn:()=>au(`/api/engagement/${e}`),enabled:!!e,refetchInterval:t?2e3:!1,placeholderData:Rh}),uce={queryKey:["recaps"],queryFn:()=>au("/api/recaps")},cce={queryKey:["projects"],queryFn:()=>au("/api/projects"),refetchInterval:5e3};async function fce(e){const t=await fetch(cb("/api/active-project"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({slug:e})});if(!t.ok){const n=await t.json().catch(()=>({}));throw new Error(n.error??`${t.status} ${t.statusText}`)}}const dce={"not-found":"Session not found",active:"End the session before archiving","already-archived":"Session is already archived","not-archived":"Session is not archived",unknown:"Something went wrong"};function Ux(e){return e instanceof k4?dce[e.reason]??e.message:e instanceof Error?e.message:"Something went wrong"}function _4(e){const t=ky(),n=iI(),r=()=>t.invalidateQueries({queryKey:["sessions"]}),i=f=>(f==="archive"?k2:R2)(e.id).then(r).catch(p=>{n.add({description:`Undo failed: ${Ux(p)}`,priority:"high"})}),o=(f,h)=>{let p;const m=()=>{p&&n.close(p),i(h)};p=n.add({priority:"low",description:E.jsxs(Xe,{ay:"center",gap:3,ax:"space-between",fullwidth:!0,children:[E.jsxs(Ie,{children:[f," ",E.jsx("code",{children:e.slug})]}),E.jsx(Ei,{size:"small",onClick:m,children:"Undo"})]})})},a=UT({mutationFn:()=>k2(e.id),onSuccess:()=>{r(),o("Archived","unarchive")},onError:f=>n.add({description:`Could not archive ${e.slug}: ${Ux(f)}`,priority:"high"})}),u=UT({mutationFn:()=>R2(e.id),onSuccess:()=>{r(),o("Unarchived","archive")},onError:f=>n.add({description:`Could not unarchive ${e.slug}: ${Ux(f)}`,priority:"high"})});if(e.status==="archived")return{kind:"unarchive",label:"Unarchive",tooltip:"Unarchive (returns to paused)",Icon:JH,disabled:!1,loading:u.isPending,onClick:()=>u.mutate()};const c=e.status==="active"||e.status==="waiting";return{kind:"archive",label:"Archive",tooltip:c?"End the session before archiving":"Archive this session",Icon:tG,disabled:c,loading:a.isPending,onClick:()=>a.mutate()}}const hce={"session.started":{category:"lifecycle",color:"blue",label:"session started"},"session.resumed":{category:"lifecycle",color:"blue",label:"session resumed"},"session.end":{category:"lifecycle",color:"neutral",label:"session ended"},"claude.started":{category:"lifecycle",color:"blue",label:"session started"},"claude.ended":{category:"lifecycle",color:"blue",label:"ended"},"claude.discarded":{category:"lifecycle",color:"neutral",label:"discarded"},"session.waiting":{category:"interaction",color:"green",label:"waiting"},"session.answered":{category:"interaction",color:"green",label:"Q&A"},"permission.request":{category:"work",color:"orange",label:"permission"},"permission.resolve":{category:"work",color:"orange",label:"approved"},"worktree.entered":{category:"lifecycle",color:"indigo",label:"worktree"},"worktree.exited":{category:"lifecycle",color:"indigo",label:"worktree exited"},"gh.pr.created":{category:"milestone",color:"purple",label:"pull request"},"gh.pr.merged":{category:"milestone",color:"purple",label:"merged"},"linear.issue.read":{category:"integration",color:"purple",label:"Linear"},"notion.page.read":{category:"integration",color:"purple",label:"Notion"},"vercel.deploy":{category:"milestone",color:"purple",label:"deploy"},"user.prompt":{category:"interaction",color:"green",label:"prompt"},"context.snapshot":{category:"context",color:"neutral",label:"context"},"session.recap":{category:"lifecycle",color:"blue",label:"session recap"},"tool.work":{category:"work",color:"yellow",label:"tool work"},"tool.applied":{category:"work",color:"yellow",label:"applied"},"tool.used":{category:"work",color:"yellow",label:"tool"},"assistant.message":{category:"assistant",color:"indigo",label:"assistant"},"assistant.recap":{category:"assistant",color:"indigo",label:"thinking recap"}},pce={category:"lifecycle",color:"neutral",label:"unknown"};function uE(e){return hce[e]??pce}function mce(e){return uE(e).category}function gce(e){return uE(e).color}function yce(e){return uE(e).label}const bce={active:"green",waiting:"yellow",paused:"neutral",archived:"neutral"};function cE(e){return bce[e]}function Hx(e){if(e<1)return"0s";const t=Math.floor(e/86400),n=Math.floor(e%86400/3600),r=Math.floor(e%3600/60),i=Math.floor(e%60);return t>0?`${t}d ${n}h`:n>0?`${n}h ${r}m`:r>0?`${r}m ${i}s`:`${i}s`}function fb(e){if(e)return e.replace(/^claude-/,"").replace(/-\d{8}$/,"")}function Jo(e){return e>=1e6?`${(e/1e6).toFixed(1)}M`:e>=1e3?`${(e/1e3).toFixed(1)}k`:String(e)}function no(e){const t=parseInt(e??"0",10);return Number.isFinite(t)?t:0}function T4(e){return e<=25?"red":e<=50?"yellow":"green"}function Gw(e){const t=(Date.now()-new Date(e).getTime())/1e3;return t<60?"just now":t<3600?`${Math.floor(t/60)}m ago`:t<86400?`${Math.floor(t/3600)}h ago`:t<604800?`${Math.floor(t/86400)}d ago`:new Date(e).toLocaleDateString()}const vce=gce,xce=yce;function wce(e){const t=xce(e.event),n=e.meta;if(!n)return t;switch(e.event){case"session.answered":return n.question??t;case"tool.work":return e.summary??t;case"context.snapshot":{const r=n.remaining_pct;return r?`${r}% remaining`:t}case"claude.started":{const r=n.category_path,i=n.session_name,o=[r,i].filter(Boolean).join("/");return o?`created ${o}`:t}default:return t}}function Sce(e){return new Date(e).toLocaleTimeString([],{hour:"numeric",minute:"2-digit",second:"2-digit"})}const Cce=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Ece=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,kce={};function _2(e,t){return(kce.jsx?Ece:Cce).test(e)}var Ju={},Gx,T2;function Rce(){if(T2)return Gx;T2=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,n=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,i=/^:\s*/,o=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,a=/^[;\s]*/,u=/^\s+|\s+$/g,c=`
|
|
480
|
-
`,f="/",h="*",p="",m="comment",y="declaration";function b(S,x){if(typeof S!="string")throw new TypeError("First argument must be a string");if(!S)return[];x=x||{};var _=1,k=1;function T(G){var L=G.match(t);L&&(_+=L.length);var F=G.lastIndexOf(c);k=~F?G.length-F:k+G.length}function A(){var G={line:_,column:k};return function(L){return L.position=new D(G),B(),L}}function D(G){this.start=G,this.end={line:_,column:k},this.source=x.source}D.prototype.content=S;function O(G){var L=new Error(x.source+":"+_+":"+k+": "+G);if(L.reason=G,L.filename=x.source,L.line=_,L.column=k,L.source=S,!x.silent)throw L}function $(G){var L=G.exec(S);if(L){var F=L[0];return T(F),S=S.slice(F.length),L}}function B(){$(n)}function j(G){var L;for(G=G||[];L=N();)L!==!1&&G.push(L);return G}function N(){var G=A();if(!(f!=S.charAt(0)||h!=S.charAt(1))){for(var L=2;p!=S.charAt(L)&&(h!=S.charAt(L)||f!=S.charAt(L+1));)++L;if(L+=2,p===S.charAt(L-1))return O("End of comment missing");var F=S.slice(2,L-2);return k+=2,T(F),S=S.slice(L),k+=2,G({type:m,comment:F})}}function M(){var G=A(),L=$(r);if(L){if(N(),!$(i))return O("property missing ':'");var F=$(o),U=G({type:y,property:v(L[0].replace(e,p)),value:F?v(F[0].replace(e,p)):p});return $(a),U}}function z(){var G=[];j(G);for(var L;L=M();)L!==!1&&(G.push(L),j(G));return G}return B(),z()}function v(S){return S?S.replace(u,p):p}return Gx=b,Gx}var A2;function _ce(){if(A2)return Ju;A2=1;var e=Ju&&Ju.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Ju,"__esModule",{value:!0}),Ju.default=n;const t=e(Rce());function n(r,i){let o=null;if(!r||typeof r!="string")return o;const a=(0,t.default)(r),u=typeof i=="function";return a.forEach(c=>{if(c.type!=="declaration")return;const{property:f,value:h}=c;u?i(f,h,c):h&&(o=o||{},o[f]=h)}),o}return Ju}var _d={},D2;function Tce(){if(D2)return _d;D2=1,Object.defineProperty(_d,"__esModule",{value:!0}),_d.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,t=/-([a-z])/g,n=/^[^-]+$/,r=/^-(webkit|moz|ms|o|khtml)-/,i=/^-(ms)-/,o=function(f){return!f||n.test(f)||e.test(f)},a=function(f,h){return h.toUpperCase()},u=function(f,h){return"".concat(h,"-")},c=function(f,h){return h===void 0&&(h={}),o(f)?f:(f=f.toLowerCase(),h.reactCompat?f=f.replace(i,u):f=f.replace(r,u),f.replace(t,a))};return _d.camelCase=c,_d}var Td,M2;function Ace(){if(M2)return Td;M2=1;var e=Td&&Td.__importDefault||function(i){return i&&i.__esModule?i:{default:i}},t=e(_ce()),n=Tce();function r(i,o){var a={};return!i||typeof i!="string"||(0,t.default)(i,function(u,c){u&&c&&(a[(0,n.camelCase)(u,o)]=c)}),a}return r.default=r,Td=r,Td}var Dce=Ace();const Mce=nS(Dce),A4=D4("end"),fE=D4("start");function D4(e){return t;function t(n){const r=n&&n.position&&n.position[e]||{};if(typeof r.line=="number"&&r.line>0&&typeof r.column=="number"&&r.column>0)return{line:r.line,column:r.column,offset:typeof r.offset=="number"&&r.offset>-1?r.offset:void 0}}}function Oce(e){const t=fE(e),n=A4(e);if(t&&n)return{start:t,end:n}}function qd(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?O2(e.position):"start"in e||"end"in e?O2(e):"line"in e||"column"in e?Vw(e):""}function Vw(e){return $2(e&&e.line)+":"+$2(e&&e.column)}function O2(e){return Vw(e&&e.start)+"-"+Vw(e&&e.end)}function $2(e){return e&&typeof e=="number"?e:1}class tr extends Error{constructor(t,n,r){super(),typeof n=="string"&&(r=n,n=void 0);let i="",o={},a=!1;if(n&&("line"in n&&"column"in n?o={place:n}:"start"in n&&"end"in n?o={place:n}:"type"in n?o={ancestors:[n],place:n.position}:o={...n}),typeof t=="string"?i=t:!o.cause&&t&&(a=!0,i=t.message,o.cause=t),!o.ruleId&&!o.source&&typeof r=="string"){const c=r.indexOf(":");c===-1?o.ruleId=r:(o.source=r.slice(0,c),o.ruleId=r.slice(c+1))}if(!o.place&&o.ancestors&&o.ancestors){const c=o.ancestors[o.ancestors.length-1];c&&(o.place=c.position)}const u=o.place&&"start"in o.place?o.place.start:o.place;this.ancestors=o.ancestors||void 0,this.cause=o.cause||void 0,this.column=u?u.column:void 0,this.fatal=void 0,this.file="",this.message=i,this.line=u?u.line:void 0,this.name=qd(o.place)||"1:1",this.place=o.place||void 0,this.reason=this.message,this.ruleId=o.ruleId||void 0,this.source=o.source||void 0,this.stack=a&&o.cause&&typeof o.cause.stack=="string"?o.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}tr.prototype.file="";tr.prototype.name="";tr.prototype.reason="";tr.prototype.message="";tr.prototype.stack="";tr.prototype.column=void 0;tr.prototype.line=void 0;tr.prototype.ancestors=void 0;tr.prototype.cause=void 0;tr.prototype.fatal=void 0;tr.prototype.place=void 0;tr.prototype.ruleId=void 0;tr.prototype.source=void 0;const dE={}.hasOwnProperty,$ce=new Map,Pce=/[A-Z]/g,Nce=new Set(["table","tbody","thead","tfoot","tr"]),Ice=new Set(["td","th"]),M4="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function jce(e,t){if(!t||t.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const n=t.filePath||void 0;let r;if(t.development){if(typeof t.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");r=Vce(n,t.jsxDEV)}else{if(typeof t.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof t.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");r=Gce(n,t.jsx,t.jsxs)}const i={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:r,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space==="svg"?Uh:gj,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},o=O4(i,e,void 0);return o&&typeof o!="string"?o:i.create(e,i.Fragment,{children:o||void 0},void 0)}function O4(e,t,n){if(t.type==="element")return Lce(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return Fce(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return Bce(e,t,n);if(t.type==="mdxjsEsm")return zce(e,t);if(t.type==="root")return Uce(e,t,n);if(t.type==="text")return Hce(e,t)}function Lce(e,t,n){const r=e.schema;let i=r;t.tagName.toLowerCase()==="svg"&&r.space==="html"&&(i=Uh,e.schema=i),e.ancestors.push(t);const o=P4(e,t.tagName,!1),a=qce(e,t);let u=pE(e,t);return Nce.has(t.tagName)&&(u=u.filter(function(c){return typeof c=="string"?!zy(c):!0})),$4(e,a,o,t),hE(a,u),e.ancestors.pop(),e.schema=r,e.create(t,o,a,n)}function Fce(e,t){if(t.data&&t.data.estree&&e.evaluater){const r=t.data.estree.body[0];return r.type,e.evaluater.evaluateExpression(r.expression)}yh(e,t.position)}function zce(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);yh(e,t.position)}function Bce(e,t,n){const r=e.schema;let i=r;t.name==="svg"&&r.space==="html"&&(i=Uh,e.schema=i),e.ancestors.push(t);const o=t.name===null?e.Fragment:P4(e,t.name,!0),a=Yce(e,t),u=pE(e,t);return $4(e,a,o,t),hE(a,u),e.ancestors.pop(),e.schema=r,e.create(t,o,a,n)}function Uce(e,t,n){const r={};return hE(r,pE(e,t)),e.create(t,e.Fragment,r,n)}function Hce(e,t){return t.value}function $4(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function hE(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function Gce(e,t,n){return r;function r(i,o,a,u){const f=Array.isArray(a.children)?n:t;return u?f(o,a,u):f(o,a)}}function Vce(e,t){return n;function n(r,i,o,a){const u=Array.isArray(o.children),c=fE(r);return t(i,o,a,u,{columnNumber:c?c.column-1:void 0,fileName:e,lineNumber:c?c.line:void 0},void 0)}}function qce(e,t){const n={};let r,i;for(i in t.properties)if(i!=="children"&&dE.call(t.properties,i)){const o=Wce(e,i,t.properties[i]);if(o){const[a,u]=o;e.tableCellAlignToStyle&&a==="align"&&typeof u=="string"&&Ice.has(t.tagName)?r=u:n[a]=u}}if(r){const o=n.style||(n.style={});o[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return n}function Yce(e,t){const n={};for(const r of t.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&e.evaluater){const o=r.data.estree.body[0];o.type;const a=o.expression;a.type;const u=a.properties[0];u.type,Object.assign(n,e.evaluater.evaluateExpression(u.argument))}else yh(e,t.position);else{const i=r.name;let o;if(r.value&&typeof r.value=="object")if(r.value.data&&r.value.data.estree&&e.evaluater){const u=r.value.data.estree.body[0];u.type,o=e.evaluater.evaluateExpression(u.expression)}else yh(e,t.position);else o=r.value===null?!0:r.value;n[i]=o}return n}function pE(e,t){const n=[];let r=-1;const i=e.passKeys?new Map:$ce;for(;++r<t.children.length;){const o=t.children[r];let a;if(e.passKeys){const c=o.type==="element"?o.tagName:o.type==="mdxJsxFlowElement"||o.type==="mdxJsxTextElement"?o.name:void 0;if(c){const f=i.get(c)||0;a=c+"-"+f,i.set(c,f+1)}}const u=O4(e,o,a);u!==void 0&&n.push(u)}return n}function Wce(e,t,n){const r=mj(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?bj(n):vj(n)),r.property==="style"){let i=typeof n=="object"?n:Kce(e,String(n));return e.stylePropertyNameCase==="css"&&(i=Xce(i)),["style",i]}return[e.elementAttributeNameCase==="react"&&r.space?FZ[r.property]||r.property:r.attribute,n]}}function Kce(e,t){try{return Mce(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const r=n,i=new tr("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:r,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw i.file=e.filePath||void 0,i.url=M4+"#cannot-parse-style-attribute",i}}function P4(e,t,n){let r;if(!n)r={type:"Literal",value:t};else if(t.includes(".")){const i=t.split(".");let o=-1,a;for(;++o<i.length;){const u=_2(i[o])?{type:"Identifier",name:i[o]}:{type:"Literal",value:i[o]};a=a?{type:"MemberExpression",object:a,property:u,computed:!!(o&&u.type==="Literal"),optional:!1}:u}r=a}else r=_2(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(r.type==="Literal"){const i=r.value;return dE.call(e.components,i)?e.components[i]:i}if(e.evaluater)return e.evaluater.evaluateExpression(r);yh(e)}function yh(e,t){const n=new tr("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw n.file=e.filePath||void 0,n.url=M4+"#cannot-handle-mdx-estrees-without-createevaluater",n}function Xce(e){const t={};let n;for(n in e)dE.call(e,n)&&(t[Qce(n)]=e[n]);return t}function Qce(e){let t=e.replace(Pce,Zce);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function Zce(e){return"-"+e.toLowerCase()}const Vx={action:["form"],cite:["blockquote","del","ins","q"],data:["object"],formAction:["button","input"],href:["a","area","base","link"],icon:["menuitem"],itemId:null,manifest:["html"],ping:["a","area"],poster:["video"],src:["audio","embed","iframe","img","input","script","source","track","video"]},Jce={};function mE(e,t){const n=Jce,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,i=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return N4(e,r,i)}function N4(e,t,n){if(efe(e)){if("value"in e)return e.type==="html"&&!n?"":e.value;if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return P2(e.children,t,n)}return Array.isArray(e)?P2(e,t,n):""}function P2(e,t,n){const r=[];let i=-1;for(;++i<e.length;)r[i]=N4(e[i],t,n);return r.join("")}function efe(e){return!!(e&&typeof e=="object")}const N2=document.createElement("i");function gE(e){const t="&"+e+";";N2.innerHTML=t;const n=N2.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function Qr(e,t,n,r){const i=e.length;let o=0,a;if(t<0?t=-t>i?0:i+t:t=t>i?i:t,n=n>0?n:0,r.length<1e4)a=Array.from(r),a.unshift(t,n),e.splice(...a);else for(n&&e.splice(t,n);o<r.length;)a=r.slice(o,o+1e4),a.unshift(t,0),e.splice(...a),o+=1e4,t+=1e4}function yi(e,t){return e.length>0?(Qr(e,e.length,0,t),e):t}const I2={}.hasOwnProperty;function I4(e){const t={};let n=-1;for(;++n<e.length;)tfe(t,e[n]);return t}function tfe(e,t){let n;for(n in t){const i=(I2.call(e,n)?e[n]:void 0)||(e[n]={}),o=t[n];let a;if(o)for(a in o){I2.call(i,a)||(i[a]=[]);const u=o[a];nfe(i[a],Array.isArray(u)?u:u?[u]:[])}}}function nfe(e,t){let n=-1;const r=[];for(;++n<t.length;)(t[n].add==="after"?e:r).push(t[n]);Qr(e,0,0,r)}function j4(e,t){const n=Number.parseInt(e,t);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)===65535||(n&65535)===65534||n>1114111?"�":String.fromCodePoint(n)}function zi(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const ar=ja(/[A-Za-z]/),Zn=ja(/[\dA-Za-z]/),rfe=ja(/[#-'*+\--9=?A-Z^-~]/);function by(e){return e!==null&&(e<32||e===127)}const qw=ja(/\d/),ife=ja(/[\dA-Fa-f]/),ofe=ja(/[!-/:-@[-`{-~]/);function Je(e){return e!==null&&e<-2}function Wt(e){return e!==null&&(e<0||e===32)}function xt(e){return e===-2||e===-1||e===32}const db=ja(new RegExp("\\p{P}|\\p{S}","u")),Xl=ja(/\s/);function ja(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function Cf(e){const t=[];let n=-1,r=0,i=0;for(;++n<e.length;){const o=e.charCodeAt(n);let a="";if(o===37&&Zn(e.charCodeAt(n+1))&&Zn(e.charCodeAt(n+2)))i=2;else if(o<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(o))||(a=String.fromCharCode(o));else if(o>55295&&o<57344){const u=e.charCodeAt(n+1);o<56320&&u>56319&&u<57344?(a=String.fromCharCode(o,u),i=1):a="�"}else a=String.fromCharCode(o);a&&(t.push(e.slice(r,n),encodeURIComponent(a)),r=n+i+1,a=""),i&&(n+=i,i=0)}return t.join("")+e.slice(r)}function _t(e,t,n,r){const i=r?r-1:Number.POSITIVE_INFINITY;let o=0;return a;function a(c){return xt(c)?(e.enter(n),u(c)):t(c)}function u(c){return xt(c)&&o++<i?(e.consume(c),u):(e.exit(n),t(c))}}const sfe={tokenize:afe};function afe(e){const t=e.attempt(this.parser.constructs.contentInitial,r,i);let n;return t;function r(u){if(u===null){e.consume(u);return}return e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),_t(e,t,"linePrefix")}function i(u){return e.enter("paragraph"),o(u)}function o(u){const c=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=c),n=c,a(u)}function a(u){if(u===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(u);return}return Je(u)?(e.consume(u),e.exit("chunkText"),o):(e.consume(u),a)}}const lfe={tokenize:ufe},j2={tokenize:cfe};function ufe(e){const t=this,n=[];let r=0,i,o,a;return u;function u(k){if(r<n.length){const T=n[r];return t.containerState=T[1],e.attempt(T[0].continuation,c,f)(k)}return f(k)}function c(k){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,i&&_();const T=t.events.length;let A=T,D;for(;A--;)if(t.events[A][0]==="exit"&&t.events[A][1].type==="chunkFlow"){D=t.events[A][1].end;break}x(r);let O=T;for(;O<t.events.length;)t.events[O][1].end={...D},O++;return Qr(t.events,A+1,0,t.events.slice(T)),t.events.length=O,f(k)}return u(k)}function f(k){if(r===n.length){if(!i)return m(k);if(i.currentConstruct&&i.currentConstruct.concrete)return b(k);t.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(j2,h,p)(k)}function h(k){return i&&_(),x(r),m(k)}function p(k){return t.parser.lazy[t.now().line]=r!==n.length,a=t.now().offset,b(k)}function m(k){return t.containerState={},e.attempt(j2,y,b)(k)}function y(k){return r++,n.push([t.currentConstruct,t.containerState]),m(k)}function b(k){if(k===null){i&&_(),x(0),e.consume(k);return}return i=i||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:i,contentType:"flow",previous:o}),v(k)}function v(k){if(k===null){S(e.exit("chunkFlow"),!0),x(0),e.consume(k);return}return Je(k)?(e.consume(k),S(e.exit("chunkFlow")),r=0,t.interrupt=void 0,u):(e.consume(k),v)}function S(k,T){const A=t.sliceStream(k);if(T&&A.push(null),k.previous=o,o&&(o.next=k),o=k,i.defineSkip(k.start),i.write(A),t.parser.lazy[k.start.line]){let D=i.events.length;for(;D--;)if(i.events[D][1].start.offset<a&&(!i.events[D][1].end||i.events[D][1].end.offset>a))return;const O=t.events.length;let $=O,B,j;for(;$--;)if(t.events[$][0]==="exit"&&t.events[$][1].type==="chunkFlow"){if(B){j=t.events[$][1].end;break}B=!0}for(x(r),D=O;D<t.events.length;)t.events[D][1].end={...j},D++;Qr(t.events,$+1,0,t.events.slice(O)),t.events.length=D}}function x(k){let T=n.length;for(;T-- >k;){const A=n[T];t.containerState=A[1],A[0].exit.call(t,e)}n.length=k}function _(){i.write([null]),o=void 0,i=void 0,t.containerState._closeFlow=void 0}}function cfe(e,t,n){return _t(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function nf(e){if(e===null||Wt(e)||Xl(e))return 1;if(db(e))return 2}function hb(e,t,n){const r=[];let i=-1;for(;++i<e.length;){const o=e[i].resolveAll;o&&!r.includes(o)&&(t=o(t,n),r.push(o))}return t}const Yw={name:"attention",resolveAll:ffe,tokenize:dfe};function ffe(e,t){let n=-1,r,i,o,a,u,c,f,h;for(;++n<e.length;)if(e[n][0]==="enter"&&e[n][1].type==="attentionSequence"&&e[n][1]._close){for(r=n;r--;)if(e[r][0]==="exit"&&e[r][1].type==="attentionSequence"&&e[r][1]._open&&t.sliceSerialize(e[r][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[r][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;c=e[r][1].end.offset-e[r][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;const p={...e[r][1].end},m={...e[n][1].start};L2(p,-c),L2(m,c),a={type:c>1?"strongSequence":"emphasisSequence",start:p,end:{...e[r][1].end}},u={type:c>1?"strongSequence":"emphasisSequence",start:{...e[n][1].start},end:m},o={type:c>1?"strongText":"emphasisText",start:{...e[r][1].end},end:{...e[n][1].start}},i={type:c>1?"strong":"emphasis",start:{...a.start},end:{...u.end}},e[r][1].end={...a.start},e[n][1].start={...u.end},f=[],e[r][1].end.offset-e[r][1].start.offset&&(f=yi(f,[["enter",e[r][1],t],["exit",e[r][1],t]])),f=yi(f,[["enter",i,t],["enter",a,t],["exit",a,t],["enter",o,t]]),f=yi(f,hb(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),f=yi(f,[["exit",o,t],["enter",u,t],["exit",u,t],["exit",i,t]]),e[n][1].end.offset-e[n][1].start.offset?(h=2,f=yi(f,[["enter",e[n][1],t],["exit",e[n][1],t]])):h=0,Qr(e,r-1,n-r+3,f),n=r+f.length-h-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function dfe(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,i=nf(r);let o;return a;function a(c){return o=c,e.enter("attentionSequence"),u(c)}function u(c){if(c===o)return e.consume(c),u;const f=e.exit("attentionSequence"),h=nf(c),p=!h||h===2&&i||n.includes(c),m=!i||i===2&&h||n.includes(r);return f._open=!!(o===42?p:p&&(i||!m)),f._close=!!(o===42?m:m&&(h||!p)),t(c)}}function L2(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const hfe={name:"autolink",tokenize:pfe};function pfe(e,t,n){let r=0;return i;function i(y){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(y),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),o}function o(y){return ar(y)?(e.consume(y),a):y===64?n(y):f(y)}function a(y){return y===43||y===45||y===46||Zn(y)?(r=1,u(y)):f(y)}function u(y){return y===58?(e.consume(y),r=0,c):(y===43||y===45||y===46||Zn(y))&&r++<32?(e.consume(y),u):(r=0,f(y))}function c(y){return y===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(y),e.exit("autolinkMarker"),e.exit("autolink"),t):y===null||y===32||y===60||by(y)?n(y):(e.consume(y),c)}function f(y){return y===64?(e.consume(y),h):rfe(y)?(e.consume(y),f):n(y)}function h(y){return Zn(y)?p(y):n(y)}function p(y){return y===46?(e.consume(y),r=0,h):y===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(y),e.exit("autolinkMarker"),e.exit("autolink"),t):m(y)}function m(y){if((y===45||Zn(y))&&r++<63){const b=y===45?m:p;return e.consume(y),b}return n(y)}}const Jh={partial:!0,tokenize:mfe};function mfe(e,t,n){return r;function r(o){return xt(o)?_t(e,i,"linePrefix")(o):i(o)}function i(o){return o===null||Je(o)?t(o):n(o)}}const L4={continuation:{tokenize:yfe},exit:bfe,name:"blockQuote",tokenize:gfe};function gfe(e,t,n){const r=this;return i;function i(a){if(a===62){const u=r.containerState;return u.open||(e.enter("blockQuote",{_container:!0}),u.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(a),e.exit("blockQuoteMarker"),o}return n(a)}function o(a){return xt(a)?(e.enter("blockQuotePrefixWhitespace"),e.consume(a),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(a))}}function yfe(e,t,n){const r=this;return i;function i(a){return xt(a)?_t(e,o,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(a):o(a)}function o(a){return e.attempt(L4,t,n)(a)}}function bfe(e){e.exit("blockQuote")}const F4={name:"characterEscape",tokenize:vfe};function vfe(e,t,n){return r;function r(o){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(o),e.exit("escapeMarker"),i}function i(o){return ofe(o)?(e.enter("characterEscapeValue"),e.consume(o),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(o)}}const z4={name:"characterReference",tokenize:xfe};function xfe(e,t,n){const r=this;let i=0,o,a;return u;function u(p){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(p),e.exit("characterReferenceMarker"),c}function c(p){return p===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(p),e.exit("characterReferenceMarkerNumeric"),f):(e.enter("characterReferenceValue"),o=31,a=Zn,h(p))}function f(p){return p===88||p===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(p),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),o=6,a=ife,h):(e.enter("characterReferenceValue"),o=7,a=qw,h(p))}function h(p){if(p===59&&i){const m=e.exit("characterReferenceValue");return a===Zn&&!gE(r.sliceSerialize(m))?n(p):(e.enter("characterReferenceMarker"),e.consume(p),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return a(p)&&i++<o?(e.consume(p),h):n(p)}}const F2={partial:!0,tokenize:Sfe},z2={concrete:!0,name:"codeFenced",tokenize:wfe};function wfe(e,t,n){const r=this,i={partial:!0,tokenize:A};let o=0,a=0,u;return c;function c(D){return f(D)}function f(D){const O=r.events[r.events.length-1];return o=O&&O[1].type==="linePrefix"?O[2].sliceSerialize(O[1],!0).length:0,u=D,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),h(D)}function h(D){return D===u?(a++,e.consume(D),h):a<3?n(D):(e.exit("codeFencedFenceSequence"),xt(D)?_t(e,p,"whitespace")(D):p(D))}function p(D){return D===null||Je(D)?(e.exit("codeFencedFence"),r.interrupt?t(D):e.check(F2,v,T)(D)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),m(D))}function m(D){return D===null||Je(D)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),p(D)):xt(D)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),_t(e,y,"whitespace")(D)):D===96&&D===u?n(D):(e.consume(D),m)}function y(D){return D===null||Je(D)?p(D):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),b(D))}function b(D){return D===null||Je(D)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),p(D)):D===96&&D===u?n(D):(e.consume(D),b)}function v(D){return e.attempt(i,T,S)(D)}function S(D){return e.enter("lineEnding"),e.consume(D),e.exit("lineEnding"),x}function x(D){return o>0&&xt(D)?_t(e,_,"linePrefix",o+1)(D):_(D)}function _(D){return D===null||Je(D)?e.check(F2,v,T)(D):(e.enter("codeFlowValue"),k(D))}function k(D){return D===null||Je(D)?(e.exit("codeFlowValue"),_(D)):(e.consume(D),k)}function T(D){return e.exit("codeFenced"),t(D)}function A(D,O,$){let B=0;return j;function j(L){return D.enter("lineEnding"),D.consume(L),D.exit("lineEnding"),N}function N(L){return D.enter("codeFencedFence"),xt(L)?_t(D,M,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(L):M(L)}function M(L){return L===u?(D.enter("codeFencedFenceSequence"),z(L)):$(L)}function z(L){return L===u?(B++,D.consume(L),z):B>=a?(D.exit("codeFencedFenceSequence"),xt(L)?_t(D,G,"whitespace")(L):G(L)):$(L)}function G(L){return L===null||Je(L)?(D.exit("codeFencedFence"),O(L)):$(L)}}}function Sfe(e,t,n){const r=this;return i;function i(a){return a===null?n(a):(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),o)}function o(a){return r.parser.lazy[r.now().line]?n(a):t(a)}}const qx={name:"codeIndented",tokenize:Efe},Cfe={partial:!0,tokenize:kfe};function Efe(e,t,n){const r=this;return i;function i(f){return e.enter("codeIndented"),_t(e,o,"linePrefix",5)(f)}function o(f){const h=r.events[r.events.length-1];return h&&h[1].type==="linePrefix"&&h[2].sliceSerialize(h[1],!0).length>=4?a(f):n(f)}function a(f){return f===null?c(f):Je(f)?e.attempt(Cfe,a,c)(f):(e.enter("codeFlowValue"),u(f))}function u(f){return f===null||Je(f)?(e.exit("codeFlowValue"),a(f)):(e.consume(f),u)}function c(f){return e.exit("codeIndented"),t(f)}}function kfe(e,t,n){const r=this;return i;function i(a){return r.parser.lazy[r.now().line]?n(a):Je(a)?(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),i):_t(e,o,"linePrefix",5)(a)}function o(a){const u=r.events[r.events.length-1];return u&&u[1].type==="linePrefix"&&u[2].sliceSerialize(u[1],!0).length>=4?t(a):Je(a)?i(a):n(a)}}const Rfe={name:"codeText",previous:Tfe,resolve:_fe,tokenize:Afe};function _fe(e){let t=e.length-4,n=3,r,i;if((e[n][1].type==="lineEnding"||e[n][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(r=n;++r<t;)if(e[r][1].type==="codeTextData"){e[n][1].type="codeTextPadding",e[t][1].type="codeTextPadding",n+=2,t-=2;break}}for(r=n-1,t++;++r<=t;)i===void 0?r!==t&&e[r][1].type!=="lineEnding"&&(i=r):(r===t||e[r][1].type==="lineEnding")&&(e[i][1].type="codeTextData",r!==i+2&&(e[i][1].end=e[r-1][1].end,e.splice(i+2,r-i-2),t-=r-i-2,r=i+2),i=void 0);return e}function Tfe(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function Afe(e,t,n){let r=0,i,o;return a;function a(p){return e.enter("codeText"),e.enter("codeTextSequence"),u(p)}function u(p){return p===96?(e.consume(p),r++,u):(e.exit("codeTextSequence"),c(p))}function c(p){return p===null?n(p):p===32?(e.enter("space"),e.consume(p),e.exit("space"),c):p===96?(o=e.enter("codeTextSequence"),i=0,h(p)):Je(p)?(e.enter("lineEnding"),e.consume(p),e.exit("lineEnding"),c):(e.enter("codeTextData"),f(p))}function f(p){return p===null||p===32||p===96||Je(p)?(e.exit("codeTextData"),c(p)):(e.consume(p),f)}function h(p){return p===96?(e.consume(p),i++,h):i===r?(e.exit("codeTextSequence"),e.exit("codeText"),t(p)):(o.type="codeTextData",f(p))}}class Dfe{constructor(t){this.left=t?[...t]:[],this.right=[]}get(t){if(t<0||t>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+t+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return t<this.left.length?this.left[t]:this.right[this.right.length-t+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(t,n){const r=n??Number.POSITIVE_INFINITY;return r<this.left.length?this.left.slice(t,r):t>this.left.length?this.right.slice(this.right.length-r+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-r+this.left.length).reverse())}splice(t,n,r){const i=n||0;this.setCursor(Math.trunc(t));const o=this.right.splice(this.right.length-i,Number.POSITIVE_INFINITY);return r&&Ad(this.left,r),o.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(t){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(t)}pushMany(t){this.setCursor(Number.POSITIVE_INFINITY),Ad(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),Ad(this.right,t.reverse())}setCursor(t){if(!(t===this.left.length||t>this.left.length&&this.right.length===0||t<0&&this.left.length===0))if(t<this.left.length){const n=this.left.splice(t,Number.POSITIVE_INFINITY);Ad(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);Ad(this.left,n.reverse())}}}function Ad(e,t){let n=0;if(t.length<1e4)e.push(...t);else for(;n<t.length;)e.push(...t.slice(n,n+1e4)),n+=1e4}function B4(e){const t={};let n=-1,r,i,o,a,u,c,f;const h=new Dfe(e);for(;++n<h.length;){for(;n in t;)n=t[n];if(r=h.get(n),n&&r[1].type==="chunkFlow"&&h.get(n-1)[1].type==="listItemPrefix"&&(c=r[1]._tokenizer.events,o=0,o<c.length&&c[o][1].type==="lineEndingBlank"&&(o+=2),o<c.length&&c[o][1].type==="content"))for(;++o<c.length&&c[o][1].type!=="content";)c[o][1].type==="chunkText"&&(c[o][1]._isInFirstContentOfListItem=!0,o++);if(r[0]==="enter")r[1].contentType&&(Object.assign(t,Mfe(h,n)),n=t[n],f=!0);else if(r[1]._container){for(o=n,i=void 0;o--;)if(a=h.get(o),a[1].type==="lineEnding"||a[1].type==="lineEndingBlank")a[0]==="enter"&&(i&&(h.get(i)[1].type="lineEndingBlank"),a[1].type="lineEnding",i=o);else if(!(a[1].type==="linePrefix"||a[1].type==="listItemIndent"))break;i&&(r[1].end={...h.get(i)[1].start},u=h.slice(i,n),u.unshift(r),h.splice(i,n-i+1,u))}}return Qr(e,0,Number.POSITIVE_INFINITY,h.slice(0)),!f}function Mfe(e,t){const n=e.get(t)[1],r=e.get(t)[2];let i=t-1;const o=[];let a=n._tokenizer;a||(a=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(a._contentTypeTextTrailing=!0));const u=a.events,c=[],f={};let h,p,m=-1,y=n,b=0,v=0;const S=[v];for(;y;){for(;e.get(++i)[1]!==y;);o.push(i),y._tokenizer||(h=r.sliceStream(y),y.next||h.push(null),p&&a.defineSkip(y.start),y._isInFirstContentOfListItem&&(a._gfmTasklistFirstContentOfListItem=!0),a.write(h),y._isInFirstContentOfListItem&&(a._gfmTasklistFirstContentOfListItem=void 0)),p=y,y=y.next}for(y=n;++m<u.length;)u[m][0]==="exit"&&u[m-1][0]==="enter"&&u[m][1].type===u[m-1][1].type&&u[m][1].start.line!==u[m][1].end.line&&(v=m+1,S.push(v),y._tokenizer=void 0,y.previous=void 0,y=y.next);for(a.events=[],y?(y._tokenizer=void 0,y.previous=void 0):S.pop(),m=S.length;m--;){const x=u.slice(S[m],S[m+1]),_=o.pop();c.push([_,_+x.length-1]),e.splice(_,2,x)}for(c.reverse(),m=-1;++m<c.length;)f[b+c[m][0]]=b+c[m][1],b+=c[m][1]-c[m][0]-1;return f}const Ofe={resolve:Pfe,tokenize:Nfe},$fe={partial:!0,tokenize:Ife};function Pfe(e){return B4(e),e}function Nfe(e,t){let n;return r;function r(u){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),i(u)}function i(u){return u===null?o(u):Je(u)?e.check($fe,a,o)(u):(e.consume(u),i)}function o(u){return e.exit("chunkContent"),e.exit("content"),t(u)}function a(u){return e.consume(u),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,i}}function Ife(e,t,n){const r=this;return i;function i(a){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),_t(e,o,"linePrefix")}function o(a){if(a===null||Je(a))return n(a);const u=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&u&&u[1].type==="linePrefix"&&u[2].sliceSerialize(u[1],!0).length>=4?t(a):e.interrupt(r.parser.constructs.flow,n,t)(a)}}function U4(e,t,n,r,i,o,a,u,c){const f=c||Number.POSITIVE_INFINITY;let h=0;return p;function p(x){return x===60?(e.enter(r),e.enter(i),e.enter(o),e.consume(x),e.exit(o),m):x===null||x===32||x===41||by(x)?n(x):(e.enter(r),e.enter(a),e.enter(u),e.enter("chunkString",{contentType:"string"}),v(x))}function m(x){return x===62?(e.enter(o),e.consume(x),e.exit(o),e.exit(i),e.exit(r),t):(e.enter(u),e.enter("chunkString",{contentType:"string"}),y(x))}function y(x){return x===62?(e.exit("chunkString"),e.exit(u),m(x)):x===null||x===60||Je(x)?n(x):(e.consume(x),x===92?b:y)}function b(x){return x===60||x===62||x===92?(e.consume(x),y):y(x)}function v(x){return!h&&(x===null||x===41||Wt(x))?(e.exit("chunkString"),e.exit(u),e.exit(a),e.exit(r),t(x)):h<f&&x===40?(e.consume(x),h++,v):x===41?(e.consume(x),h--,v):x===null||x===32||x===40||by(x)?n(x):(e.consume(x),x===92?S:v)}function S(x){return x===40||x===41||x===92?(e.consume(x),v):v(x)}}function H4(e,t,n,r,i,o){const a=this;let u=0,c;return f;function f(y){return e.enter(r),e.enter(i),e.consume(y),e.exit(i),e.enter(o),h}function h(y){return u>999||y===null||y===91||y===93&&!c||y===94&&!u&&"_hiddenFootnoteSupport"in a.parser.constructs?n(y):y===93?(e.exit(o),e.enter(i),e.consume(y),e.exit(i),e.exit(r),t):Je(y)?(e.enter("lineEnding"),e.consume(y),e.exit("lineEnding"),h):(e.enter("chunkString",{contentType:"string"}),p(y))}function p(y){return y===null||y===91||y===93||Je(y)||u++>999?(e.exit("chunkString"),h(y)):(e.consume(y),c||(c=!xt(y)),y===92?m:p)}function m(y){return y===91||y===92||y===93?(e.consume(y),u++,p):p(y)}}function G4(e,t,n,r,i,o){let a;return u;function u(m){return m===34||m===39||m===40?(e.enter(r),e.enter(i),e.consume(m),e.exit(i),a=m===40?41:m,c):n(m)}function c(m){return m===a?(e.enter(i),e.consume(m),e.exit(i),e.exit(r),t):(e.enter(o),f(m))}function f(m){return m===a?(e.exit(o),c(a)):m===null?n(m):Je(m)?(e.enter("lineEnding"),e.consume(m),e.exit("lineEnding"),_t(e,f,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),h(m))}function h(m){return m===a||m===null||Je(m)?(e.exit("chunkString"),f(m)):(e.consume(m),m===92?p:h)}function p(m){return m===a||m===92?(e.consume(m),h):h(m)}}function Yd(e,t){let n;return r;function r(i){return Je(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),n=!0,r):xt(i)?_t(e,r,n?"linePrefix":"lineSuffix")(i):t(i)}}const jfe={name:"definition",tokenize:Ffe},Lfe={partial:!0,tokenize:zfe};function Ffe(e,t,n){const r=this;let i;return o;function o(y){return e.enter("definition"),a(y)}function a(y){return H4.call(r,e,u,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(y)}function u(y){return i=zi(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),y===58?(e.enter("definitionMarker"),e.consume(y),e.exit("definitionMarker"),c):n(y)}function c(y){return Wt(y)?Yd(e,f)(y):f(y)}function f(y){return U4(e,h,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(y)}function h(y){return e.attempt(Lfe,p,p)(y)}function p(y){return xt(y)?_t(e,m,"whitespace")(y):m(y)}function m(y){return y===null||Je(y)?(e.exit("definition"),r.parser.defined.push(i),t(y)):n(y)}}function zfe(e,t,n){return r;function r(u){return Wt(u)?Yd(e,i)(u):n(u)}function i(u){return G4(e,o,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(u)}function o(u){return xt(u)?_t(e,a,"whitespace")(u):a(u)}function a(u){return u===null||Je(u)?t(u):n(u)}}const Bfe={name:"hardBreakEscape",tokenize:Ufe};function Ufe(e,t,n){return r;function r(o){return e.enter("hardBreakEscape"),e.consume(o),i}function i(o){return Je(o)?(e.exit("hardBreakEscape"),t(o)):n(o)}}const Hfe={name:"headingAtx",resolve:Gfe,tokenize:Vfe};function Gfe(e,t){let n=e.length-2,r=3,i,o;return e[r][1].type==="whitespace"&&(r+=2),n-2>r&&e[n][1].type==="whitespace"&&(n-=2),e[n][1].type==="atxHeadingSequence"&&(r===n-1||n-4>r&&e[n-2][1].type==="whitespace")&&(n-=r+1===n?2:4),n>r&&(i={type:"atxHeadingText",start:e[r][1].start,end:e[n][1].end},o={type:"chunkText",start:e[r][1].start,end:e[n][1].end,contentType:"text"},Qr(e,r,n-r+1,[["enter",i,t],["enter",o,t],["exit",o,t],["exit",i,t]])),e}function Vfe(e,t,n){let r=0;return i;function i(h){return e.enter("atxHeading"),o(h)}function o(h){return e.enter("atxHeadingSequence"),a(h)}function a(h){return h===35&&r++<6?(e.consume(h),a):h===null||Wt(h)?(e.exit("atxHeadingSequence"),u(h)):n(h)}function u(h){return h===35?(e.enter("atxHeadingSequence"),c(h)):h===null||Je(h)?(e.exit("atxHeading"),t(h)):xt(h)?_t(e,u,"whitespace")(h):(e.enter("atxHeadingText"),f(h))}function c(h){return h===35?(e.consume(h),c):(e.exit("atxHeadingSequence"),u(h))}function f(h){return h===null||h===35||Wt(h)?(e.exit("atxHeadingText"),u(h)):(e.consume(h),f)}}const qfe=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],B2=["pre","script","style","textarea"],Yfe={concrete:!0,name:"htmlFlow",resolveTo:Xfe,tokenize:Qfe},Wfe={partial:!0,tokenize:Jfe},Kfe={partial:!0,tokenize:Zfe};function Xfe(e){let t=e.length;for(;t--&&!(e[t][0]==="enter"&&e[t][1].type==="htmlFlow"););return t>1&&e[t-2][1].type==="linePrefix"&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function Qfe(e,t,n){const r=this;let i,o,a,u,c;return f;function f(H){return h(H)}function h(H){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(H),p}function p(H){return H===33?(e.consume(H),m):H===47?(e.consume(H),o=!0,v):H===63?(e.consume(H),i=3,r.interrupt?t:I):ar(H)?(e.consume(H),a=String.fromCharCode(H),S):n(H)}function m(H){return H===45?(e.consume(H),i=2,y):H===91?(e.consume(H),i=5,u=0,b):ar(H)?(e.consume(H),i=4,r.interrupt?t:I):n(H)}function y(H){return H===45?(e.consume(H),r.interrupt?t:I):n(H)}function b(H){const ie="CDATA[";return H===ie.charCodeAt(u++)?(e.consume(H),u===ie.length?r.interrupt?t:M:b):n(H)}function v(H){return ar(H)?(e.consume(H),a=String.fromCharCode(H),S):n(H)}function S(H){if(H===null||H===47||H===62||Wt(H)){const ie=H===47,re=a.toLowerCase();return!ie&&!o&&B2.includes(re)?(i=1,r.interrupt?t(H):M(H)):qfe.includes(a.toLowerCase())?(i=6,ie?(e.consume(H),x):r.interrupt?t(H):M(H)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(H):o?_(H):k(H))}return H===45||Zn(H)?(e.consume(H),a+=String.fromCharCode(H),S):n(H)}function x(H){return H===62?(e.consume(H),r.interrupt?t:M):n(H)}function _(H){return xt(H)?(e.consume(H),_):j(H)}function k(H){return H===47?(e.consume(H),j):H===58||H===95||ar(H)?(e.consume(H),T):xt(H)?(e.consume(H),k):j(H)}function T(H){return H===45||H===46||H===58||H===95||Zn(H)?(e.consume(H),T):A(H)}function A(H){return H===61?(e.consume(H),D):xt(H)?(e.consume(H),A):k(H)}function D(H){return H===null||H===60||H===61||H===62||H===96?n(H):H===34||H===39?(e.consume(H),c=H,O):xt(H)?(e.consume(H),D):$(H)}function O(H){return H===c?(e.consume(H),c=null,B):H===null||Je(H)?n(H):(e.consume(H),O)}function $(H){return H===null||H===34||H===39||H===47||H===60||H===61||H===62||H===96||Wt(H)?A(H):(e.consume(H),$)}function B(H){return H===47||H===62||xt(H)?k(H):n(H)}function j(H){return H===62?(e.consume(H),N):n(H)}function N(H){return H===null||Je(H)?M(H):xt(H)?(e.consume(H),N):n(H)}function M(H){return H===45&&i===2?(e.consume(H),F):H===60&&i===1?(e.consume(H),U):H===62&&i===4?(e.consume(H),Y):H===63&&i===3?(e.consume(H),I):H===93&&i===5?(e.consume(H),W):Je(H)&&(i===6||i===7)?(e.exit("htmlFlowData"),e.check(Wfe,J,z)(H)):H===null||Je(H)?(e.exit("htmlFlowData"),z(H)):(e.consume(H),M)}function z(H){return e.check(Kfe,G,J)(H)}function G(H){return e.enter("lineEnding"),e.consume(H),e.exit("lineEnding"),L}function L(H){return H===null||Je(H)?z(H):(e.enter("htmlFlowData"),M(H))}function F(H){return H===45?(e.consume(H),I):M(H)}function U(H){return H===47?(e.consume(H),a="",q):M(H)}function q(H){if(H===62){const ie=a.toLowerCase();return B2.includes(ie)?(e.consume(H),Y):M(H)}return ar(H)&&a.length<8?(e.consume(H),a+=String.fromCharCode(H),q):M(H)}function W(H){return H===93?(e.consume(H),I):M(H)}function I(H){return H===62?(e.consume(H),Y):H===45&&i===2?(e.consume(H),I):M(H)}function Y(H){return H===null||Je(H)?(e.exit("htmlFlowData"),J(H)):(e.consume(H),Y)}function J(H){return e.exit("htmlFlow"),t(H)}}function Zfe(e,t,n){const r=this;return i;function i(a){return Je(a)?(e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),o):n(a)}function o(a){return r.parser.lazy[r.now().line]?n(a):t(a)}}function Jfe(e,t,n){return r;function r(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),e.attempt(Jh,t,n)}}const ede={name:"htmlText",tokenize:tde};function tde(e,t,n){const r=this;let i,o,a;return u;function u(I){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(I),c}function c(I){return I===33?(e.consume(I),f):I===47?(e.consume(I),A):I===63?(e.consume(I),k):ar(I)?(e.consume(I),$):n(I)}function f(I){return I===45?(e.consume(I),h):I===91?(e.consume(I),o=0,b):ar(I)?(e.consume(I),_):n(I)}function h(I){return I===45?(e.consume(I),y):n(I)}function p(I){return I===null?n(I):I===45?(e.consume(I),m):Je(I)?(a=p,U(I)):(e.consume(I),p)}function m(I){return I===45?(e.consume(I),y):p(I)}function y(I){return I===62?F(I):I===45?m(I):p(I)}function b(I){const Y="CDATA[";return I===Y.charCodeAt(o++)?(e.consume(I),o===Y.length?v:b):n(I)}function v(I){return I===null?n(I):I===93?(e.consume(I),S):Je(I)?(a=v,U(I)):(e.consume(I),v)}function S(I){return I===93?(e.consume(I),x):v(I)}function x(I){return I===62?F(I):I===93?(e.consume(I),x):v(I)}function _(I){return I===null||I===62?F(I):Je(I)?(a=_,U(I)):(e.consume(I),_)}function k(I){return I===null?n(I):I===63?(e.consume(I),T):Je(I)?(a=k,U(I)):(e.consume(I),k)}function T(I){return I===62?F(I):k(I)}function A(I){return ar(I)?(e.consume(I),D):n(I)}function D(I){return I===45||Zn(I)?(e.consume(I),D):O(I)}function O(I){return Je(I)?(a=O,U(I)):xt(I)?(e.consume(I),O):F(I)}function $(I){return I===45||Zn(I)?(e.consume(I),$):I===47||I===62||Wt(I)?B(I):n(I)}function B(I){return I===47?(e.consume(I),F):I===58||I===95||ar(I)?(e.consume(I),j):Je(I)?(a=B,U(I)):xt(I)?(e.consume(I),B):F(I)}function j(I){return I===45||I===46||I===58||I===95||Zn(I)?(e.consume(I),j):N(I)}function N(I){return I===61?(e.consume(I),M):Je(I)?(a=N,U(I)):xt(I)?(e.consume(I),N):B(I)}function M(I){return I===null||I===60||I===61||I===62||I===96?n(I):I===34||I===39?(e.consume(I),i=I,z):Je(I)?(a=M,U(I)):xt(I)?(e.consume(I),M):(e.consume(I),G)}function z(I){return I===i?(e.consume(I),i=void 0,L):I===null?n(I):Je(I)?(a=z,U(I)):(e.consume(I),z)}function G(I){return I===null||I===34||I===39||I===60||I===61||I===96?n(I):I===47||I===62||Wt(I)?B(I):(e.consume(I),G)}function L(I){return I===47||I===62||Wt(I)?B(I):n(I)}function F(I){return I===62?(e.consume(I),e.exit("htmlTextData"),e.exit("htmlText"),t):n(I)}function U(I){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(I),e.exit("lineEnding"),q}function q(I){return xt(I)?_t(e,W,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(I):W(I)}function W(I){return e.enter("htmlTextData"),a(I)}}const yE={name:"labelEnd",resolveAll:ode,resolveTo:sde,tokenize:ade},nde={tokenize:lde},rde={tokenize:ude},ide={tokenize:cde};function ode(e){let t=-1;const n=[];for(;++t<e.length;){const r=e[t][1];if(n.push(e[t]),r.type==="labelImage"||r.type==="labelLink"||r.type==="labelEnd"){const i=r.type==="labelImage"?4:2;r.type="data",t+=i}}return e.length!==n.length&&Qr(e,0,e.length,n),e}function sde(e,t){let n=e.length,r=0,i,o,a,u;for(;n--;)if(i=e[n][1],o){if(i.type==="link"||i.type==="labelLink"&&i._inactive)break;e[n][0]==="enter"&&i.type==="labelLink"&&(i._inactive=!0)}else if(a){if(e[n][0]==="enter"&&(i.type==="labelImage"||i.type==="labelLink")&&!i._balanced&&(o=n,i.type!=="labelLink")){r=2;break}}else i.type==="labelEnd"&&(a=n);const c={type:e[o][1].type==="labelLink"?"link":"image",start:{...e[o][1].start},end:{...e[e.length-1][1].end}},f={type:"label",start:{...e[o][1].start},end:{...e[a][1].end}},h={type:"labelText",start:{...e[o+r+2][1].end},end:{...e[a-2][1].start}};return u=[["enter",c,t],["enter",f,t]],u=yi(u,e.slice(o+1,o+r+3)),u=yi(u,[["enter",h,t]]),u=yi(u,hb(t.parser.constructs.insideSpan.null,e.slice(o+r+4,a-3),t)),u=yi(u,[["exit",h,t],e[a-2],e[a-1],["exit",f,t]]),u=yi(u,e.slice(a+1)),u=yi(u,[["exit",c,t]]),Qr(e,o,e.length,u),e}function ade(e,t,n){const r=this;let i=r.events.length,o,a;for(;i--;)if((r.events[i][1].type==="labelImage"||r.events[i][1].type==="labelLink")&&!r.events[i][1]._balanced){o=r.events[i][1];break}return u;function u(m){return o?o._inactive?p(m):(a=r.parser.defined.includes(zi(r.sliceSerialize({start:o.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(m),e.exit("labelMarker"),e.exit("labelEnd"),c):n(m)}function c(m){return m===40?e.attempt(nde,h,a?h:p)(m):m===91?e.attempt(rde,h,a?f:p)(m):a?h(m):p(m)}function f(m){return e.attempt(ide,h,p)(m)}function h(m){return t(m)}function p(m){return o._balanced=!0,n(m)}}function lde(e,t,n){return r;function r(p){return e.enter("resource"),e.enter("resourceMarker"),e.consume(p),e.exit("resourceMarker"),i}function i(p){return Wt(p)?Yd(e,o)(p):o(p)}function o(p){return p===41?h(p):U4(e,a,u,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(p)}function a(p){return Wt(p)?Yd(e,c)(p):h(p)}function u(p){return n(p)}function c(p){return p===34||p===39||p===40?G4(e,f,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(p):h(p)}function f(p){return Wt(p)?Yd(e,h)(p):h(p)}function h(p){return p===41?(e.enter("resourceMarker"),e.consume(p),e.exit("resourceMarker"),e.exit("resource"),t):n(p)}}function ude(e,t,n){const r=this;return i;function i(u){return H4.call(r,e,o,a,"reference","referenceMarker","referenceString")(u)}function o(u){return r.parser.defined.includes(zi(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(u):n(u)}function a(u){return n(u)}}function cde(e,t,n){return r;function r(o){return e.enter("reference"),e.enter("referenceMarker"),e.consume(o),e.exit("referenceMarker"),i}function i(o){return o===93?(e.enter("referenceMarker"),e.consume(o),e.exit("referenceMarker"),e.exit("reference"),t):n(o)}}const fde={name:"labelStartImage",resolveAll:yE.resolveAll,tokenize:dde};function dde(e,t,n){const r=this;return i;function i(u){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(u),e.exit("labelImageMarker"),o}function o(u){return u===91?(e.enter("labelMarker"),e.consume(u),e.exit("labelMarker"),e.exit("labelImage"),a):n(u)}function a(u){return u===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(u):t(u)}}const hde={name:"labelStartLink",resolveAll:yE.resolveAll,tokenize:pde};function pde(e,t,n){const r=this;return i;function i(a){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(a),e.exit("labelMarker"),e.exit("labelLink"),o}function o(a){return a===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(a):t(a)}}const Yx={name:"lineEnding",tokenize:mde};function mde(e,t){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),_t(e,t,"linePrefix")}}const Eg={name:"thematicBreak",tokenize:gde};function gde(e,t,n){let r=0,i;return o;function o(f){return e.enter("thematicBreak"),a(f)}function a(f){return i=f,u(f)}function u(f){return f===i?(e.enter("thematicBreakSequence"),c(f)):r>=3&&(f===null||Je(f))?(e.exit("thematicBreak"),t(f)):n(f)}function c(f){return f===i?(e.consume(f),r++,c):(e.exit("thematicBreakSequence"),xt(f)?_t(e,u,"whitespace")(f):u(f))}}const vr={continuation:{tokenize:xde},exit:Sde,name:"list",tokenize:vde},yde={partial:!0,tokenize:Cde},bde={partial:!0,tokenize:wde};function vde(e,t,n){const r=this,i=r.events[r.events.length-1];let o=i&&i[1].type==="linePrefix"?i[2].sliceSerialize(i[1],!0).length:0,a=0;return u;function u(y){const b=r.containerState.type||(y===42||y===43||y===45?"listUnordered":"listOrdered");if(b==="listUnordered"?!r.containerState.marker||y===r.containerState.marker:qw(y)){if(r.containerState.type||(r.containerState.type=b,e.enter(b,{_container:!0})),b==="listUnordered")return e.enter("listItemPrefix"),y===42||y===45?e.check(Eg,n,f)(y):f(y);if(!r.interrupt||y===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),c(y)}return n(y)}function c(y){return qw(y)&&++a<10?(e.consume(y),c):(!r.interrupt||a<2)&&(r.containerState.marker?y===r.containerState.marker:y===41||y===46)?(e.exit("listItemValue"),f(y)):n(y)}function f(y){return e.enter("listItemMarker"),e.consume(y),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||y,e.check(Jh,r.interrupt?n:h,e.attempt(yde,m,p))}function h(y){return r.containerState.initialBlankLine=!0,o++,m(y)}function p(y){return xt(y)?(e.enter("listItemPrefixWhitespace"),e.consume(y),e.exit("listItemPrefixWhitespace"),m):n(y)}function m(y){return r.containerState.size=o+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(y)}}function xde(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(Jh,i,o);function i(u){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,_t(e,t,"listItemIndent",r.containerState.size+1)(u)}function o(u){return r.containerState.furtherBlankLines||!xt(u)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,a(u)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(bde,t,a)(u))}function a(u){return r.containerState._closeFlow=!0,r.interrupt=void 0,_t(e,e.attempt(vr,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(u)}}function wde(e,t,n){const r=this;return _t(e,i,"listItemIndent",r.containerState.size+1);function i(o){const a=r.events[r.events.length-1];return a&&a[1].type==="listItemIndent"&&a[2].sliceSerialize(a[1],!0).length===r.containerState.size?t(o):n(o)}}function Sde(e){e.exit(this.containerState.type)}function Cde(e,t,n){const r=this;return _t(e,i,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function i(o){const a=r.events[r.events.length-1];return!xt(o)&&a&&a[1].type==="listItemPrefixWhitespace"?t(o):n(o)}}const U2={name:"setextUnderline",resolveTo:Ede,tokenize:kde};function Ede(e,t){let n=e.length,r,i,o;for(;n--;)if(e[n][0]==="enter"){if(e[n][1].type==="content"){r=n;break}e[n][1].type==="paragraph"&&(i=n)}else e[n][1].type==="content"&&e.splice(n,1),!o&&e[n][1].type==="definition"&&(o=n);const a={type:"setextHeading",start:{...e[r][1].start},end:{...e[e.length-1][1].end}};return e[i][1].type="setextHeadingText",o?(e.splice(i,0,["enter",a,t]),e.splice(o+1,0,["exit",e[r][1],t]),e[r][1].end={...e[o][1].end}):e[r][1]=a,e.push(["exit",a,t]),e}function kde(e,t,n){const r=this;let i;return o;function o(f){let h=r.events.length,p;for(;h--;)if(r.events[h][1].type!=="lineEnding"&&r.events[h][1].type!=="linePrefix"&&r.events[h][1].type!=="content"){p=r.events[h][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||p)?(e.enter("setextHeadingLine"),i=f,a(f)):n(f)}function a(f){return e.enter("setextHeadingLineSequence"),u(f)}function u(f){return f===i?(e.consume(f),u):(e.exit("setextHeadingLineSequence"),xt(f)?_t(e,c,"lineSuffix")(f):c(f))}function c(f){return f===null||Je(f)?(e.exit("setextHeadingLine"),t(f)):n(f)}}const Rde={tokenize:_de};function _de(e){const t=this,n=e.attempt(Jh,r,e.attempt(this.parser.constructs.flowInitial,i,_t(e,e.attempt(this.parser.constructs.flow,i,e.attempt(Ofe,i)),"linePrefix")));return n;function r(o){if(o===null){e.consume(o);return}return e.enter("lineEndingBlank"),e.consume(o),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function i(o){if(o===null){e.consume(o);return}return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const Tde={resolveAll:q4()},Ade=V4("string"),Dde=V4("text");function V4(e){return{resolveAll:q4(e==="text"?Mde:void 0),tokenize:t};function t(n){const r=this,i=this.parser.constructs[e],o=n.attempt(i,a,u);return a;function a(h){return f(h)?o(h):u(h)}function u(h){if(h===null){n.consume(h);return}return n.enter("data"),n.consume(h),c}function c(h){return f(h)?(n.exit("data"),o(h)):(n.consume(h),c)}function f(h){if(h===null)return!0;const p=i[h];let m=-1;if(p)for(;++m<p.length;){const y=p[m];if(!y.previous||y.previous.call(r,r.previous))return!0}return!1}}}function q4(e){return t;function t(n,r){let i=-1,o;for(;++i<=n.length;)o===void 0?n[i]&&n[i][1].type==="data"&&(o=i,i++):(!n[i]||n[i][1].type!=="data")&&(i!==o+2&&(n[o][1].end=n[i-1][1].end,n.splice(o+2,i-o-2),i=o+2),o=void 0);return e?e(n,r):n}}function Mde(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||e[n][1].type==="lineEnding")&&e[n-1][1].type==="data"){const r=e[n-1][1],i=t.sliceStream(r);let o=i.length,a=-1,u=0,c;for(;o--;){const f=i[o];if(typeof f=="string"){for(a=f.length;f.charCodeAt(a-1)===32;)u++,a--;if(a)break;a=-1}else if(f===-2)c=!0,u++;else if(f!==-1){o++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(u=0),u){const f={type:n===e.length||c||u<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:o?a:r.start._bufferIndex+a,_index:r.start._index+o,line:r.end.line,column:r.end.column-u,offset:r.end.offset-u},end:{...r.end}};r.end={...f.start},r.start.offset===r.end.offset?Object.assign(r,f):(e.splice(n,0,["enter",f,t],["exit",f,t]),n+=2)}n++}return e}const Ode={42:vr,43:vr,45:vr,48:vr,49:vr,50:vr,51:vr,52:vr,53:vr,54:vr,55:vr,56:vr,57:vr,62:L4},$de={91:jfe},Pde={[-2]:qx,[-1]:qx,32:qx},Nde={35:Hfe,42:Eg,45:[U2,Eg],60:Yfe,61:U2,95:Eg,96:z2,126:z2},Ide={38:z4,92:F4},jde={[-5]:Yx,[-4]:Yx,[-3]:Yx,33:fde,38:z4,42:Yw,60:[hfe,ede],91:hde,92:[Bfe,F4],93:yE,95:Yw,96:Rfe},Lde={null:[Yw,Tde]},Fde={null:[42,95]},zde={null:[]},Bde=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:Fde,contentInitial:$de,disable:zde,document:Ode,flow:Nde,flowInitial:Pde,insideSpan:Lde,string:Ide,text:jde},Symbol.toStringTag,{value:"Module"}));function Ude(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0};const i={},o=[];let a=[],u=[];const c={attempt:O(A),check:O(D),consume:_,enter:k,exit:T,interrupt:O(D,{interrupt:!0})},f={code:null,containerState:{},defineSkip:v,events:[],now:b,parser:e,previous:null,sliceSerialize:m,sliceStream:y,write:p};let h=t.tokenize.call(f,c);return t.resolveAll&&o.push(t),f;function p(N){return a=yi(a,N),S(),a[a.length-1]!==null?[]:($(t,0),f.events=hb(o,f.events,f),f.events)}function m(N,M){return Gde(y(N),M)}function y(N){return Hde(a,N)}function b(){const{_bufferIndex:N,_index:M,line:z,column:G,offset:L}=r;return{_bufferIndex:N,_index:M,line:z,column:G,offset:L}}function v(N){i[N.line]=N.column,j()}function S(){let N;for(;r._index<a.length;){const M=a[r._index];if(typeof M=="string")for(N=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===N&&r._bufferIndex<M.length;)x(M.charCodeAt(r._bufferIndex));else x(M)}}function x(N){h=h(N)}function _(N){Je(N)?(r.line++,r.column=1,r.offset+=N===-3?2:1,j()):N!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===a[r._index].length&&(r._bufferIndex=-1,r._index++)),f.previous=N}function k(N,M){const z=M||{};return z.type=N,z.start=b(),f.events.push(["enter",z,f]),u.push(z),z}function T(N){const M=u.pop();return M.end=b(),f.events.push(["exit",M,f]),M}function A(N,M){$(N,M.from)}function D(N,M){M.restore()}function O(N,M){return z;function z(G,L,F){let U,q,W,I;return Array.isArray(G)?J(G):"tokenize"in G?J([G]):Y(G);function Y(he){return ve;function ve(Re){const ce=Re!==null&&he[Re],je=Re!==null&&he.null,We=[...Array.isArray(ce)?ce:ce?[ce]:[],...Array.isArray(je)?je:je?[je]:[]];return J(We)(Re)}}function J(he){return U=he,q=0,he.length===0?F:H(he[q])}function H(he){return ve;function ve(Re){return I=B(),W=he,he.partial||(f.currentConstruct=he),he.name&&f.parser.constructs.disable.null.includes(he.name)?re():he.tokenize.call(M?Object.assign(Object.create(f),M):f,c,ie,re)(Re)}}function ie(he){return N(W,I),L}function re(he){return I.restore(),++q<U.length?H(U[q]):F}}}function $(N,M){N.resolveAll&&!o.includes(N)&&o.push(N),N.resolve&&Qr(f.events,M,f.events.length-M,N.resolve(f.events.slice(M),f)),N.resolveTo&&(f.events=N.resolveTo(f.events,f))}function B(){const N=b(),M=f.previous,z=f.currentConstruct,G=f.events.length,L=Array.from(u);return{from:G,restore:F};function F(){r=N,f.previous=M,f.currentConstruct=z,f.events.length=G,u=L,j()}}function j(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function Hde(e,t){const n=t.start._index,r=t.start._bufferIndex,i=t.end._index,o=t.end._bufferIndex;let a;if(n===i)a=[e[n].slice(r,o)];else{if(a=e.slice(n,i),r>-1){const u=a[0];typeof u=="string"?a[0]=u.slice(r):a.shift()}o>0&&a.push(e[i].slice(0,o))}return a}function Gde(e,t){let n=-1;const r=[];let i;for(;++n<e.length;){const o=e[n];let a;if(typeof o=="string")a=o;else switch(o){case-5:{a="\r";break}case-4:{a=`
|
|
481
|
-
`;break}case-3:{a=`\r
|
|
482
|
-
`;break}case-2:{a=t?" ":" ";break}case-1:{if(!t&&i)continue;a=" ";break}default:a=String.fromCharCode(o)}i=o===-2,r.push(a)}return r.join("")}function Vde(e){const r={constructs:I4([Bde,...(e||{}).extensions||[]]),content:i(sfe),defined:[],document:i(lfe),flow:i(Rde),lazy:{},string:i(Ade),text:i(Dde)};return r;function i(o){return a;function a(u){return Ude(r,o,u)}}}function qde(e){for(;!B4(e););return e}const H2=/[\0\t\n\r]/g;function Yde(){let e=1,t="",n=!0,r;return i;function i(o,a,u){const c=[];let f,h,p,m,y;for(o=t+(typeof o=="string"?o.toString():new TextDecoder(a||void 0).decode(o)),p=0,t="",n&&(o.charCodeAt(0)===65279&&p++,n=void 0);p<o.length;){if(H2.lastIndex=p,f=H2.exec(o),m=f&&f.index!==void 0?f.index:o.length,y=o.charCodeAt(m),!f){t=o.slice(p);break}if(y===10&&p===m&&r)c.push(-3),r=void 0;else switch(r&&(c.push(-5),r=void 0),p<m&&(c.push(o.slice(p,m)),e+=m-p),y){case 0:{c.push(65533),e++;break}case 9:{for(h=Math.ceil(e/4)*4,c.push(-2);e++<h;)c.push(-1);break}case 10:{c.push(-4),e=1;break}default:r=!0,e=1}p=m+1}return u&&(r&&c.push(-5),t&&c.push(t),c.push(null)),c}}const Wde=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function Kde(e){return e.replace(Wde,Xde)}function Xde(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const i=n.charCodeAt(1),o=i===120||i===88;return j4(n.slice(o?2:1),o?16:10)}return gE(n)||e}const Y4={}.hasOwnProperty;function Qde(e,t,n){return t&&typeof t=="object"&&(n=t,t=void 0),Zde(n)(qde(Vde(n).document().write(Yde()(e,t,!0))))}function Zde(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:o(oe),autolinkProtocol:B,autolinkEmail:B,atxHeading:o(xe),blockQuote:o(je),characterEscape:B,characterReference:B,codeFenced:o(We),codeFencedFenceInfo:a,codeFencedFenceMeta:a,codeIndented:o(We,a),codeText:o(X,a),codeTextData:B,data:B,codeFlowValue:B,definition:o(Z),definitionDestinationString:a,definitionLabelString:a,definitionTitleString:a,emphasis:o(ne),hardBreakEscape:o(ge),hardBreakTrailing:o(ge),htmlFlow:o(Ce,a),htmlFlowData:B,htmlText:o(Ce,a),htmlTextData:B,image:o(le),label:a,link:o(oe),listItem:o(ae),listItemValue:m,listOrdered:o(me,p),listUnordered:o(me),paragraph:o(Oe),reference:H,referenceString:a,resourceDestinationString:a,resourceTitleString:a,setextHeading:o(xe),strong:o(Te),thematicBreak:o(De)},exit:{atxHeading:c(),atxHeadingSequence:A,autolink:c(),autolinkEmail:ce,autolinkProtocol:Re,blockQuote:c(),characterEscapeValue:j,characterReferenceMarkerHexadecimal:re,characterReferenceMarkerNumeric:re,characterReferenceValue:he,characterReference:ve,codeFenced:c(S),codeFencedFence:v,codeFencedFenceInfo:y,codeFencedFenceMeta:b,codeFlowValue:j,codeIndented:c(x),codeText:c(L),codeTextData:j,data:j,definition:c(),definitionDestinationString:T,definitionLabelString:_,definitionTitleString:k,emphasis:c(),hardBreakEscape:c(M),hardBreakTrailing:c(M),htmlFlow:c(z),htmlFlowData:j,htmlText:c(G),htmlTextData:j,image:c(U),label:W,labelText:q,lineEnding:N,link:c(F),listItem:c(),listOrdered:c(),listUnordered:c(),paragraph:c(),referenceString:ie,resourceDestinationString:I,resourceTitleString:Y,resource:J,setextHeading:c($),setextHeadingLineSequence:O,setextHeadingText:D,strong:c(),thematicBreak:c()}};W4(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(ue){let Se={type:"root",children:[]};const ke={stack:[Se],tokenStack:[],config:t,enter:u,exit:f,buffer:a,resume:h,data:n},Pe=[];let Le=-1;for(;++Le<ue.length;)if(ue[Le][1].type==="listOrdered"||ue[Le][1].type==="listUnordered")if(ue[Le][0]==="enter")Pe.push(Le);else{const st=Pe.pop();Le=i(ue,st,Le)}for(Le=-1;++Le<ue.length;){const st=t[ue[Le][0]];Y4.call(st,ue[Le][1].type)&&st[ue[Le][1].type].call(Object.assign({sliceSerialize:ue[Le][2].sliceSerialize},ke),ue[Le][1])}if(ke.tokenStack.length>0){const st=ke.tokenStack[ke.tokenStack.length-1];(st[1]||G2).call(ke,void 0,st[0])}for(Se.position={start:Ls(ue.length>0?ue[0][1].start:{line:1,column:1,offset:0}),end:Ls(ue.length>0?ue[ue.length-2][1].end:{line:1,column:1,offset:0})},Le=-1;++Le<t.transforms.length;)Se=t.transforms[Le](Se)||Se;return Se}function i(ue,Se,ke){let Pe=Se-1,Le=-1,st=!1,Ut,Ot,Me,Qe;for(;++Pe<=ke;){const Ne=ue[Pe];switch(Ne[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{Ne[0]==="enter"?Le++:Le--,Qe=void 0;break}case"lineEndingBlank":{Ne[0]==="enter"&&(Ut&&!Qe&&!Le&&!Me&&(Me=Pe),Qe=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:Qe=void 0}if(!Le&&Ne[0]==="enter"&&Ne[1].type==="listItemPrefix"||Le===-1&&Ne[0]==="exit"&&(Ne[1].type==="listUnordered"||Ne[1].type==="listOrdered")){if(Ut){let Tt=Pe;for(Ot=void 0;Tt--;){const ft=ue[Tt];if(ft[1].type==="lineEnding"||ft[1].type==="lineEndingBlank"){if(ft[0]==="exit")continue;Ot&&(ue[Ot][1].type="lineEndingBlank",st=!0),ft[1].type="lineEnding",Ot=Tt}else if(!(ft[1].type==="linePrefix"||ft[1].type==="blockQuotePrefix"||ft[1].type==="blockQuotePrefixWhitespace"||ft[1].type==="blockQuoteMarker"||ft[1].type==="listItemIndent"))break}Me&&(!Ot||Me<Ot)&&(Ut._spread=!0),Ut.end=Object.assign({},Ot?ue[Ot][1].start:Ne[1].end),ue.splice(Ot||Pe,0,["exit",Ut,Ne[2]]),Pe++,ke++}if(Ne[1].type==="listItemPrefix"){const Tt={type:"listItem",_spread:!1,start:Object.assign({},Ne[1].start),end:void 0};Ut=Tt,ue.splice(Pe,0,["enter",Tt,Ne[2]]),Pe++,ke++,Me=void 0,Qe=!0}}}return ue[Se][1]._spread=st,ke}function o(ue,Se){return ke;function ke(Pe){u.call(this,ue(Pe),Pe),Se&&Se.call(this,Pe)}}function a(){this.stack.push({type:"fragment",children:[]})}function u(ue,Se,ke){this.stack[this.stack.length-1].children.push(ue),this.stack.push(ue),this.tokenStack.push([Se,ke||void 0]),ue.position={start:Ls(Se.start),end:void 0}}function c(ue){return Se;function Se(ke){ue&&ue.call(this,ke),f.call(this,ke)}}function f(ue,Se){const ke=this.stack.pop(),Pe=this.tokenStack.pop();if(Pe)Pe[0].type!==ue.type&&(Se?Se.call(this,ue,Pe[0]):(Pe[1]||G2).call(this,ue,Pe[0]));else throw new Error("Cannot close `"+ue.type+"` ("+qd({start:ue.start,end:ue.end})+"): it’s not open");ke.position.end=Ls(ue.end)}function h(){return mE(this.stack.pop())}function p(){this.data.expectingFirstListItemValue=!0}function m(ue){if(this.data.expectingFirstListItemValue){const Se=this.stack[this.stack.length-2];Se.start=Number.parseInt(this.sliceSerialize(ue),10),this.data.expectingFirstListItemValue=void 0}}function y(){const ue=this.resume(),Se=this.stack[this.stack.length-1];Se.lang=ue}function b(){const ue=this.resume(),Se=this.stack[this.stack.length-1];Se.meta=ue}function v(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function S(){const ue=this.resume(),Se=this.stack[this.stack.length-1];Se.value=ue.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function x(){const ue=this.resume(),Se=this.stack[this.stack.length-1];Se.value=ue.replace(/(\r?\n|\r)$/g,"")}function _(ue){const Se=this.resume(),ke=this.stack[this.stack.length-1];ke.label=Se,ke.identifier=zi(this.sliceSerialize(ue)).toLowerCase()}function k(){const ue=this.resume(),Se=this.stack[this.stack.length-1];Se.title=ue}function T(){const ue=this.resume(),Se=this.stack[this.stack.length-1];Se.url=ue}function A(ue){const Se=this.stack[this.stack.length-1];if(!Se.depth){const ke=this.sliceSerialize(ue).length;Se.depth=ke}}function D(){this.data.setextHeadingSlurpLineEnding=!0}function O(ue){const Se=this.stack[this.stack.length-1];Se.depth=this.sliceSerialize(ue).codePointAt(0)===61?1:2}function $(){this.data.setextHeadingSlurpLineEnding=void 0}function B(ue){const ke=this.stack[this.stack.length-1].children;let Pe=ke[ke.length-1];(!Pe||Pe.type!=="text")&&(Pe=_e(),Pe.position={start:Ls(ue.start),end:void 0},ke.push(Pe)),this.stack.push(Pe)}function j(ue){const Se=this.stack.pop();Se.value+=this.sliceSerialize(ue),Se.position.end=Ls(ue.end)}function N(ue){const Se=this.stack[this.stack.length-1];if(this.data.atHardBreak){const ke=Se.children[Se.children.length-1];ke.position.end=Ls(ue.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(Se.type)&&(B.call(this,ue),j.call(this,ue))}function M(){this.data.atHardBreak=!0}function z(){const ue=this.resume(),Se=this.stack[this.stack.length-1];Se.value=ue}function G(){const ue=this.resume(),Se=this.stack[this.stack.length-1];Se.value=ue}function L(){const ue=this.resume(),Se=this.stack[this.stack.length-1];Se.value=ue}function F(){const ue=this.stack[this.stack.length-1];if(this.data.inReference){const Se=this.data.referenceType||"shortcut";ue.type+="Reference",ue.referenceType=Se,delete ue.url,delete ue.title}else delete ue.identifier,delete ue.label;this.data.referenceType=void 0}function U(){const ue=this.stack[this.stack.length-1];if(this.data.inReference){const Se=this.data.referenceType||"shortcut";ue.type+="Reference",ue.referenceType=Se,delete ue.url,delete ue.title}else delete ue.identifier,delete ue.label;this.data.referenceType=void 0}function q(ue){const Se=this.sliceSerialize(ue),ke=this.stack[this.stack.length-2];ke.label=Kde(Se),ke.identifier=zi(Se).toLowerCase()}function W(){const ue=this.stack[this.stack.length-1],Se=this.resume(),ke=this.stack[this.stack.length-1];if(this.data.inReference=!0,ke.type==="link"){const Pe=ue.children;ke.children=Pe}else ke.alt=Se}function I(){const ue=this.resume(),Se=this.stack[this.stack.length-1];Se.url=ue}function Y(){const ue=this.resume(),Se=this.stack[this.stack.length-1];Se.title=ue}function J(){this.data.inReference=void 0}function H(){this.data.referenceType="collapsed"}function ie(ue){const Se=this.resume(),ke=this.stack[this.stack.length-1];ke.label=Se,ke.identifier=zi(this.sliceSerialize(ue)).toLowerCase(),this.data.referenceType="full"}function re(ue){this.data.characterReferenceType=ue.type}function he(ue){const Se=this.sliceSerialize(ue),ke=this.data.characterReferenceType;let Pe;ke?(Pe=j4(Se,ke==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):Pe=gE(Se);const Le=this.stack[this.stack.length-1];Le.value+=Pe}function ve(ue){const Se=this.stack.pop();Se.position.end=Ls(ue.end)}function Re(ue){j.call(this,ue);const Se=this.stack[this.stack.length-1];Se.url=this.sliceSerialize(ue)}function ce(ue){j.call(this,ue);const Se=this.stack[this.stack.length-1];Se.url="mailto:"+this.sliceSerialize(ue)}function je(){return{type:"blockquote",children:[]}}function We(){return{type:"code",lang:null,meta:null,value:""}}function X(){return{type:"inlineCode",value:""}}function Z(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function ne(){return{type:"emphasis",children:[]}}function xe(){return{type:"heading",depth:0,children:[]}}function ge(){return{type:"break"}}function Ce(){return{type:"html",value:""}}function le(){return{type:"image",title:null,url:"",alt:null}}function oe(){return{type:"link",title:null,url:"",children:[]}}function me(ue){return{type:"list",ordered:ue.type==="listOrdered",start:null,spread:ue._spread,children:[]}}function ae(ue){return{type:"listItem",spread:ue._spread,checked:null,children:[]}}function Oe(){return{type:"paragraph",children:[]}}function Te(){return{type:"strong",children:[]}}function _e(){return{type:"text",value:""}}function De(){return{type:"thematicBreak"}}}function Ls(e){return{line:e.line,column:e.column,offset:e.offset}}function W4(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?W4(e,r):Jde(e,r)}}function Jde(e,t){let n;for(n in t)if(Y4.call(t,n))switch(n){case"canContainEols":{const r=t[n];r&&e[n].push(...r);break}case"transforms":{const r=t[n];r&&e[n].push(...r);break}case"enter":case"exit":{const r=t[n];r&&Object.assign(e[n],r);break}}}function G2(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+qd({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+qd({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+qd({start:t.start,end:t.end})+") is still open")}function ehe(e){const t=this;t.parser=n;function n(r){return Qde(r,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function the(e,t){const n={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)}function nhe(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
|
|
483
|
-
`}]}function rhe(e,t){const n=t.value?t.value+`
|
|
484
|
-
`:"",r={},i=t.lang?t.lang.split(/\s+/):[];i.length>0&&(r.className=["language-"+i[0]]);let o={type:"element",tagName:"code",properties:r,children:[{type:"text",value:n}]};return t.meta&&(o.data={meta:t.meta}),e.patch(t,o),o=e.applyData(t,o),o={type:"element",tagName:"pre",properties:{},children:[o]},e.patch(t,o),o}function ihe(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function ohe(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function she(e,t){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=String(t.identifier).toUpperCase(),i=Cf(r.toLowerCase()),o=e.footnoteOrder.indexOf(r);let a,u=e.footnoteCounts.get(r);u===void 0?(u=0,e.footnoteOrder.push(r),a=e.footnoteOrder.length):a=o+1,u+=1,e.footnoteCounts.set(r,u);const c={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+i,id:n+"fnref-"+i+(u>1?"-"+u:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(a)}]};e.patch(t,c);const f={type:"element",tagName:"sup",properties:{},children:[c]};return e.patch(t,f),e.applyData(t,f)}function ahe(e,t){const n={type:"element",tagName:"h"+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function lhe(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}function K4(e,t){const n=t.referenceType;let r="]";if(n==="collapsed"?r+="[]":n==="full"&&(r+="["+(t.label||t.identifier)+"]"),t.type==="imageReference")return[{type:"text",value:"!["+t.alt+r}];const i=e.all(t),o=i[0];o&&o.type==="text"?o.value="["+o.value:i.unshift({type:"text",value:"["});const a=i[i.length-1];return a&&a.type==="text"?a.value+=r:i.push({type:"text",value:r}),i}function uhe(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return K4(e,t);const i={src:Cf(r.url||""),alt:t.alt};r.title!==null&&r.title!==void 0&&(i.title=r.title);const o={type:"element",tagName:"img",properties:i,children:[]};return e.patch(t,o),e.applyData(t,o)}function che(e,t){const n={src:Cf(t.url)};t.alt!==null&&t.alt!==void 0&&(n.alt=t.alt),t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"img",properties:n,children:[]};return e.patch(t,r),e.applyData(t,r)}function fhe(e,t){const n={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,n);const r={type:"element",tagName:"code",properties:{},children:[n]};return e.patch(t,r),e.applyData(t,r)}function dhe(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return K4(e,t);const i={href:Cf(r.url||"")};r.title!==null&&r.title!==void 0&&(i.title=r.title);const o={type:"element",tagName:"a",properties:i,children:e.all(t)};return e.patch(t,o),e.applyData(t,o)}function hhe(e,t){const n={href:Cf(t.url)};t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"a",properties:n,children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function phe(e,t,n){const r=e.all(t),i=n?mhe(n):X4(t),o={},a=[];if(typeof t.checked=="boolean"){const h=r[0];let p;h&&h.type==="element"&&h.tagName==="p"?p=h:(p={type:"element",tagName:"p",properties:{},children:[]},r.unshift(p)),p.children.length>0&&p.children.unshift({type:"text",value:" "}),p.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),o.className=["task-list-item"]}let u=-1;for(;++u<r.length;){const h=r[u];(i||u!==0||h.type!=="element"||h.tagName!=="p")&&a.push({type:"text",value:`
|
|
485
|
-
`}),h.type==="element"&&h.tagName==="p"&&!i?a.push(...h.children):a.push(h)}const c=r[r.length-1];c&&(i||c.type!=="element"||c.tagName!=="p")&&a.push({type:"text",value:`
|
|
486
|
-
`});const f={type:"element",tagName:"li",properties:o,children:a};return e.patch(t,f),e.applyData(t,f)}function mhe(e){let t=!1;if(e.type==="list"){t=e.spread||!1;const n=e.children;let r=-1;for(;!t&&++r<n.length;)t=X4(n[r])}return t}function X4(e){const t=e.spread;return t??e.children.length>1}function ghe(e,t){const n={},r=e.all(t);let i=-1;for(typeof t.start=="number"&&t.start!==1&&(n.start=t.start);++i<r.length;){const a=r[i];if(a.type==="element"&&a.tagName==="li"&&a.properties&&Array.isArray(a.properties.className)&&a.properties.className.includes("task-list-item")){n.className=["contains-task-list"];break}}const o={type:"element",tagName:t.ordered?"ol":"ul",properties:n,children:e.wrap(r,!0)};return e.patch(t,o),e.applyData(t,o)}function yhe(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function bhe(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function vhe(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function xhe(e,t){const n=e.all(t),r=n.shift(),i=[];if(r){const a={type:"element",tagName:"thead",properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],a),i.push(a)}if(n.length>0){const a={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},u=fE(t.children[1]),c=A4(t.children[t.children.length-1]);u&&c&&(a.position={start:u,end:c}),i.push(a)}const o={type:"element",tagName:"table",properties:{},children:e.wrap(i,!0)};return e.patch(t,o),e.applyData(t,o)}function whe(e,t,n){const r=n?n.children:void 0,o=(r?r.indexOf(t):1)===0?"th":"td",a=n&&n.type==="table"?n.align:void 0,u=a?a.length:t.children.length;let c=-1;const f=[];for(;++c<u;){const p=t.children[c],m={},y=a?a[c]:void 0;y&&(m.align=y);let b={type:"element",tagName:o,properties:m,children:[]};p&&(b.children=e.all(p),e.patch(p,b),b=e.applyData(p,b)),f.push(b)}const h={type:"element",tagName:"tr",properties:{},children:e.wrap(f,!0)};return e.patch(t,h),e.applyData(t,h)}function She(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}const V2=9,q2=32;function Che(e){const t=String(e),n=/\r?\n|\r/g;let r=n.exec(t),i=0;const o=[];for(;r;)o.push(Y2(t.slice(i,r.index),i>0,!0),r[0]),i=r.index+r[0].length,r=n.exec(t);return o.push(Y2(t.slice(i),i>0,!1)),o.join("")}function Y2(e,t,n){let r=0,i=e.length;if(t){let o=e.codePointAt(r);for(;o===V2||o===q2;)r++,o=e.codePointAt(r)}if(n){let o=e.codePointAt(i-1);for(;o===V2||o===q2;)i--,o=e.codePointAt(i-1)}return i>r?e.slice(r,i):""}function Ehe(e,t){const n={type:"text",value:Che(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function khe(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const Rhe={blockquote:the,break:nhe,code:rhe,delete:ihe,emphasis:ohe,footnoteReference:she,heading:ahe,html:lhe,imageReference:uhe,image:che,inlineCode:fhe,linkReference:dhe,link:hhe,listItem:phe,list:ghe,paragraph:yhe,root:bhe,strong:vhe,table:xhe,tableCell:She,tableRow:whe,text:Ehe,thematicBreak:khe,toml:Zm,yaml:Zm,definition:Zm,footnoteDefinition:Zm};function Zm(){}const Q4=-1,pb=0,Wd=1,vy=2,bE=3,vE=4,xE=5,wE=6,Z4=7,J4=8,W2=typeof self=="object"?self:globalThis,_he=(e,t)=>{const n=(i,o)=>(e.set(o,i),i),r=i=>{if(e.has(i))return e.get(i);const[o,a]=t[i];switch(o){case pb:case Q4:return n(a,i);case Wd:{const u=n([],i);for(const c of a)u.push(r(c));return u}case vy:{const u=n({},i);for(const[c,f]of a)u[r(c)]=r(f);return u}case bE:return n(new Date(a),i);case vE:{const{source:u,flags:c}=a;return n(new RegExp(u,c),i)}case xE:{const u=n(new Map,i);for(const[c,f]of a)u.set(r(c),r(f));return u}case wE:{const u=n(new Set,i);for(const c of a)u.add(r(c));return u}case Z4:{const{name:u,message:c}=a;return n(new W2[u](c),i)}case J4:return n(BigInt(a),i);case"BigInt":return n(Object(BigInt(a)),i);case"ArrayBuffer":return n(new Uint8Array(a).buffer,a);case"DataView":{const{buffer:u}=new Uint8Array(a);return n(new DataView(u),a)}}return n(new W2[o](a),i)};return r},K2=e=>_he(new Map,e)(0),ec="",{toString:The}={},{keys:Ahe}=Object,Dd=e=>{const t=typeof e;if(t!=="object"||!e)return[pb,t];const n=The.call(e).slice(8,-1);switch(n){case"Array":return[Wd,ec];case"Object":return[vy,ec];case"Date":return[bE,ec];case"RegExp":return[vE,ec];case"Map":return[xE,ec];case"Set":return[wE,ec];case"DataView":return[Wd,n]}return n.includes("Array")?[Wd,n]:n.includes("Error")?[Z4,n]:[vy,n]},Jm=([e,t])=>e===pb&&(t==="function"||t==="symbol"),Dhe=(e,t,n,r)=>{const i=(a,u)=>{const c=r.push(a)-1;return n.set(u,c),c},o=a=>{if(n.has(a))return n.get(a);let[u,c]=Dd(a);switch(u){case pb:{let h=a;switch(c){case"bigint":u=J4,h=a.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+c);h=null;break;case"undefined":return i([Q4],a)}return i([u,h],a)}case Wd:{if(c){let m=a;return c==="DataView"?m=new Uint8Array(a.buffer):c==="ArrayBuffer"&&(m=new Uint8Array(a)),i([c,[...m]],a)}const h=[],p=i([u,h],a);for(const m of a)h.push(o(m));return p}case vy:{if(c)switch(c){case"BigInt":return i([c,a.toString()],a);case"Boolean":case"Number":case"String":return i([c,a.valueOf()],a)}if(t&&"toJSON"in a)return o(a.toJSON());const h=[],p=i([u,h],a);for(const m of Ahe(a))(e||!Jm(Dd(a[m])))&&h.push([o(m),o(a[m])]);return p}case bE:return i([u,a.toISOString()],a);case vE:{const{source:h,flags:p}=a;return i([u,{source:h,flags:p}],a)}case xE:{const h=[],p=i([u,h],a);for(const[m,y]of a)(e||!(Jm(Dd(m))||Jm(Dd(y))))&&h.push([o(m),o(y)]);return p}case wE:{const h=[],p=i([u,h],a);for(const m of a)(e||!Jm(Dd(m)))&&h.push(o(m));return p}}const{message:f}=a;return i([u,{name:c,message:f}],a)};return o},X2=(e,{json:t,lossy:n}={})=>{const r=[];return Dhe(!(t||n),!!t,new Map,r)(e),r},xy=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?K2(X2(e,t)):structuredClone(e):(e,t)=>K2(X2(e,t));function Mhe(e,t){const n=[{type:"text",value:"↩"}];return t>1&&n.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(t)}]}),n}function Ohe(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function $he(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||Mhe,r=e.options.footnoteBackLabel||Ohe,i=e.options.footnoteLabel||"Footnotes",o=e.options.footnoteLabelTagName||"h2",a=e.options.footnoteLabelProperties||{className:["sr-only"]},u=[];let c=-1;for(;++c<e.footnoteOrder.length;){const f=e.footnoteById.get(e.footnoteOrder[c]);if(!f)continue;const h=e.all(f),p=String(f.identifier).toUpperCase(),m=Cf(p.toLowerCase());let y=0;const b=[],v=e.footnoteCounts.get(p);for(;v!==void 0&&++y<=v;){b.length>0&&b.push({type:"text",value:" "});let _=typeof n=="string"?n:n(c,y);typeof _=="string"&&(_={type:"text",value:_}),b.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+m+(y>1?"-"+y:""),dataFootnoteBackref:"",ariaLabel:typeof r=="string"?r:r(c,y),className:["data-footnote-backref"]},children:Array.isArray(_)?_:[_]})}const S=h[h.length-1];if(S&&S.type==="element"&&S.tagName==="p"){const _=S.children[S.children.length-1];_&&_.type==="text"?_.value+=" ":S.children.push({type:"text",value:" "}),S.children.push(...b)}else h.push(...b);const x={type:"element",tagName:"li",properties:{id:t+"fn-"+m},children:e.wrap(h,!0)};e.patch(f,x),u.push(x)}if(u.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:o,properties:{...xy(a),id:"footnote-label"},children:[{type:"text",value:i}]},{type:"text",value:`
|
|
487
|
-
`},{type:"element",tagName:"ol",properties:{},children:e.wrap(u,!0)},{type:"text",value:`
|
|
488
|
-
`}]}}const mb=(function(e){if(e==null)return jhe;if(typeof e=="function")return gb(e);if(typeof e=="object")return Array.isArray(e)?Phe(e):Nhe(e);if(typeof e=="string")return Ihe(e);throw new Error("Expected function, string, or object as test")});function Phe(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=mb(e[n]);return gb(r);function r(...i){let o=-1;for(;++o<t.length;)if(t[o].apply(this,i))return!0;return!1}}function Nhe(e){const t=e;return gb(n);function n(r){const i=r;let o;for(o in e)if(i[o]!==t[o])return!1;return!0}}function Ihe(e){return gb(t);function t(n){return n&&n.type===e}}function gb(e){return t;function t(n,r,i){return!!(Lhe(n)&&e.call(this,n,typeof r=="number"?r:void 0,i||void 0))}}function jhe(){return!0}function Lhe(e){return e!==null&&typeof e=="object"&&"type"in e}const e3=[],Fhe=!0,Ww=!1,zhe="skip";function t3(e,t,n,r){let i;typeof t=="function"&&typeof n!="function"?(r=n,n=t):i=t;const o=mb(i),a=r?-1:1;u(e,void 0,[])();function u(c,f,h){const p=c&&typeof c=="object"?c:{};if(typeof p.type=="string"){const y=typeof p.tagName=="string"?p.tagName:typeof p.name=="string"?p.name:void 0;Object.defineProperty(m,"name",{value:"node ("+(c.type+(y?"<"+y+">":""))+")"})}return m;function m(){let y=e3,b,v,S;if((!t||o(c,f,h[h.length-1]||void 0))&&(y=Bhe(n(c,h)),y[0]===Ww))return y;if("children"in c&&c.children){const x=c;if(x.children&&y[0]!==zhe)for(v=(r?x.children.length:-1)+a,S=h.concat(x);v>-1&&v<x.children.length;){const _=x.children[v];if(b=u(_,v,S)(),b[0]===Ww)return b;v=typeof b[1]=="number"?b[1]:v+a}}return y}}}function Bhe(e){return Array.isArray(e)?e:typeof e=="number"?[Fhe,e]:e==null?e3:[e]}function yb(e,t,n,r){let i,o,a;typeof t=="function"&&typeof n!="function"?(o=void 0,a=t,i=n):(o=t,a=n,i=r),t3(e,o,u,i);function u(c,f){const h=f[f.length-1],p=h?h.children.indexOf(c):void 0;return a(c,p,h)}}const Kw={}.hasOwnProperty,Uhe={};function Hhe(e,t){const n=t||Uhe,r=new Map,i=new Map,o=new Map,a={...Rhe,...n.handlers},u={all:f,applyData:Vhe,definitionById:r,footnoteById:i,footnoteCounts:o,footnoteOrder:[],handlers:a,one:c,options:n,patch:Ghe,wrap:Yhe};return yb(e,function(h){if(h.type==="definition"||h.type==="footnoteDefinition"){const p=h.type==="definition"?r:i,m=String(h.identifier).toUpperCase();p.has(m)||p.set(m,h)}}),u;function c(h,p){const m=h.type,y=u.handlers[m];if(Kw.call(u.handlers,m)&&y)return y(u,h,p);if(u.options.passThrough&&u.options.passThrough.includes(m)){if("children"in h){const{children:v,...S}=h,x=xy(S);return x.children=u.all(h),x}return xy(h)}return(u.options.unknownHandler||qhe)(u,h,p)}function f(h){const p=[];if("children"in h){const m=h.children;let y=-1;for(;++y<m.length;){const b=u.one(m[y],h);if(b){if(y&&m[y-1].type==="break"&&(!Array.isArray(b)&&b.type==="text"&&(b.value=Q2(b.value)),!Array.isArray(b)&&b.type==="element")){const v=b.children[0];v&&v.type==="text"&&(v.value=Q2(v.value))}Array.isArray(b)?p.push(...b):p.push(b)}}}return p}}function Ghe(e,t){e.position&&(t.position=Oce(e))}function Vhe(e,t){let n=t;if(e&&e.data){const r=e.data.hName,i=e.data.hChildren,o=e.data.hProperties;if(typeof r=="string")if(n.type==="element")n.tagName=r;else{const a="children"in n?n.children:[n];n={type:"element",tagName:r,properties:{},children:a}}n.type==="element"&&o&&Object.assign(n.properties,xy(o)),"children"in n&&n.children&&i!==null&&i!==void 0&&(n.children=i)}return n}function qhe(e,t){const n=t.data||{},r="value"in t&&!(Kw.call(n,"hProperties")||Kw.call(n,"hChildren"))?{type:"text",value:t.value}:{type:"element",tagName:"div",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function Yhe(e,t){const n=[];let r=-1;for(t&&n.push({type:"text",value:`
|
|
489
|
-
`});++r<e.length;)r&&n.push({type:"text",value:`
|
|
490
|
-
`}),n.push(e[r]);return t&&e.length>0&&n.push({type:"text",value:`
|
|
491
|
-
`}),n}function Q2(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function Z2(e,t){const n=Hhe(e,t),r=n.one(e,void 0),i=$he(n),o=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return i&&o.children.push({type:"text",value:`
|
|
492
|
-
`},i),o}function Whe(e,t){return e&&"run"in e?async function(n,r){const i=Z2(n,{file:r,...t});await e.run(i,r)}:function(n,r){return Z2(n,{file:r,...e||t})}}function J2(e){if(e)throw e}var Wx,eO;function Khe(){if(eO)return Wx;eO=1;var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,n=Object.defineProperty,r=Object.getOwnPropertyDescriptor,i=function(f){return typeof Array.isArray=="function"?Array.isArray(f):t.call(f)==="[object Array]"},o=function(f){if(!f||t.call(f)!=="[object Object]")return!1;var h=e.call(f,"constructor"),p=f.constructor&&f.constructor.prototype&&e.call(f.constructor.prototype,"isPrototypeOf");if(f.constructor&&!h&&!p)return!1;var m;for(m in f);return typeof m>"u"||e.call(f,m)},a=function(f,h){n&&h.name==="__proto__"?n(f,h.name,{enumerable:!0,configurable:!0,value:h.newValue,writable:!0}):f[h.name]=h.newValue},u=function(f,h){if(h==="__proto__")if(e.call(f,h)){if(r)return r(f,h).value}else return;return f[h]};return Wx=function c(){var f,h,p,m,y,b,v=arguments[0],S=1,x=arguments.length,_=!1;for(typeof v=="boolean"&&(_=v,v=arguments[1]||{},S=2),(v==null||typeof v!="object"&&typeof v!="function")&&(v={});S<x;++S)if(f=arguments[S],f!=null)for(h in f)p=u(v,h),m=u(f,h),v!==m&&(_&&m&&(o(m)||(y=i(m)))?(y?(y=!1,b=p&&i(p)?p:[]):b=p&&o(p)?p:{},a(v,{name:h,newValue:c(_,b,m)})):typeof m<"u"&&a(v,{name:h,newValue:m}));return v},Wx}var Xhe=Khe();const Kx=nS(Xhe);function Xw(e){if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function Qhe(){const e=[],t={run:n,use:r};return t;function n(...i){let o=-1;const a=i.pop();if(typeof a!="function")throw new TypeError("Expected function as last argument, not "+a);u(null,...i);function u(c,...f){const h=e[++o];let p=-1;if(c){a(c);return}for(;++p<i.length;)(f[p]===null||f[p]===void 0)&&(f[p]=i[p]);i=f,h?Zhe(h,u)(...f):a(null,...f)}}function r(i){if(typeof i!="function")throw new TypeError("Expected `middelware` to be a function, not "+i);return e.push(i),t}}function Zhe(e,t){let n;return r;function r(...a){const u=e.length>a.length;let c;u&&a.push(i);try{c=e.apply(this,a)}catch(f){const h=f;if(u&&n)throw h;return i(h)}u||(c&&c.then&&typeof c.then=="function"?c.then(o,i):c instanceof Error?i(c):o(c))}function i(a,...u){n||(n=!0,t(a,...u))}function o(a){i(null,a)}}const Ki={basename:Jhe,dirname:epe,extname:tpe,join:npe,sep:"/"};function Jhe(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');ep(e);let n=0,r=-1,i=e.length,o;if(t===void 0||t.length===0||t.length>e.length){for(;i--;)if(e.codePointAt(i)===47){if(o){n=i+1;break}}else r<0&&(o=!0,r=i+1);return r<0?"":e.slice(n,r)}if(t===e)return"";let a=-1,u=t.length-1;for(;i--;)if(e.codePointAt(i)===47){if(o){n=i+1;break}}else a<0&&(o=!0,a=i+1),u>-1&&(e.codePointAt(i)===t.codePointAt(u--)?u<0&&(r=i):(u=-1,r=a));return n===r?r=a:r<0&&(r=e.length),e.slice(n,r)}function epe(e){if(ep(e),e.length===0)return".";let t=-1,n=e.length,r;for(;--n;)if(e.codePointAt(n)===47){if(r){t=n;break}}else r||(r=!0);return t<0?e.codePointAt(0)===47?"/":".":t===1&&e.codePointAt(0)===47?"//":e.slice(0,t)}function tpe(e){ep(e);let t=e.length,n=-1,r=0,i=-1,o=0,a;for(;t--;){const u=e.codePointAt(t);if(u===47){if(a){r=t+1;break}continue}n<0&&(a=!0,n=t+1),u===46?i<0?i=t:o!==1&&(o=1):i>-1&&(o=-1)}return i<0||n<0||o===0||o===1&&i===n-1&&i===r+1?"":e.slice(i,n)}function npe(...e){let t=-1,n;for(;++t<e.length;)ep(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":rpe(n)}function rpe(e){ep(e);const t=e.codePointAt(0)===47;let n=ipe(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function ipe(e,t){let n="",r=0,i=-1,o=0,a=-1,u,c;for(;++a<=e.length;){if(a<e.length)u=e.codePointAt(a);else{if(u===47)break;u=47}if(u===47){if(!(i===a-1||o===1))if(i!==a-1&&o===2){if(n.length<2||r!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(c=n.lastIndexOf("/"),c!==n.length-1){c<0?(n="",r=0):(n=n.slice(0,c),r=n.length-1-n.lastIndexOf("/")),i=a,o=0;continue}}else if(n.length>0){n="",r=0,i=a,o=0;continue}}t&&(n=n.length>0?n+"/..":"..",r=2)}else n.length>0?n+="/"+e.slice(i+1,a):n=e.slice(i+1,a),r=a-i-1;i=a,o=0}else u===46&&o>-1?o++:o=-1}return n}function ep(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const ope={cwd:spe};function spe(){return"/"}function Qw(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function ape(e){if(typeof e=="string")e=new URL(e);else if(!Qw(e)){const t=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code="ERR_INVALID_ARG_TYPE",t}if(e.protocol!=="file:"){const t=new TypeError("The URL must be of scheme file");throw t.code="ERR_INVALID_URL_SCHEME",t}return lpe(e)}function lpe(e){if(e.hostname!==""){const r=new TypeError('File URL host must be "localhost" or empty on darwin');throw r.code="ERR_INVALID_FILE_URL_HOST",r}const t=e.pathname;let n=-1;for(;++n<t.length;)if(t.codePointAt(n)===37&&t.codePointAt(n+1)===50){const r=t.codePointAt(n+2);if(r===70||r===102){const i=new TypeError("File URL path must not include encoded / characters");throw i.code="ERR_INVALID_FILE_URL_PATH",i}}return decodeURIComponent(t)}const Xx=["history","path","basename","stem","extname","dirname"];class n3{constructor(t){let n;t?Qw(t)?n={path:t}:typeof t=="string"||upe(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":ope.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<Xx.length;){const o=Xx[r];o in n&&n[o]!==void 0&&n[o]!==null&&(this[o]=o==="history"?[...n[o]]:n[o])}let i;for(i in n)Xx.includes(i)||(this[i]=n[i])}get basename(){return typeof this.path=="string"?Ki.basename(this.path):void 0}set basename(t){Zx(t,"basename"),Qx(t,"basename"),this.path=Ki.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?Ki.dirname(this.path):void 0}set dirname(t){tO(this.basename,"dirname"),this.path=Ki.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?Ki.extname(this.path):void 0}set extname(t){if(Qx(t,"extname"),tO(this.dirname,"extname"),t){if(t.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(t.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=Ki.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){Qw(t)&&(t=ape(t)),Zx(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?Ki.basename(this.path,this.extname):void 0}set stem(t){Zx(t,"stem"),Qx(t,"stem"),this.path=Ki.join(this.dirname||"",t+(this.extname||""))}fail(t,n,r){const i=this.message(t,n,r);throw i.fatal=!0,i}info(t,n,r){const i=this.message(t,n,r);return i.fatal=void 0,i}message(t,n,r){const i=new tr(t,n,r);return this.path&&(i.name=this.path+":"+i.name,i.file=this.path),i.fatal=!1,this.messages.push(i),i}toString(t){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(t||void 0).decode(this.value)}}function Qx(e,t){if(e&&e.includes(Ki.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+Ki.sep+"`")}function Zx(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function tO(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function upe(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const cpe=(function(e){const r=this.constructor.prototype,i=r[e],o=function(){return i.apply(o,arguments)};return Object.setPrototypeOf(o,r),o}),fpe={}.hasOwnProperty;class SE extends cpe{constructor(){super("copy"),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=Qhe()}copy(){const t=new SE;let n=-1;for(;++n<this.attachers.length;){const r=this.attachers[n];t.use(...r)}return t.data(Kx(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(t1("data",this.frozen),this.namespace[t]=n,this):fpe.call(this.namespace,t)&&this.namespace[t]||void 0:t?(t1("data",this.frozen),this.namespace=t,this):this.namespace}freeze(){if(this.frozen)return this;const t=this;for(;++this.freezeIndex<this.attachers.length;){const[n,...r]=this.attachers[this.freezeIndex];if(r[0]===!1)continue;r[0]===!0&&(r[0]=void 0);const i=n.call(t,...r);typeof i=="function"&&this.transformers.use(i)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(t){this.freeze();const n=eg(t),r=this.parser||this.Parser;return Jx("parse",r),r(String(n),n)}process(t,n){const r=this;return this.freeze(),Jx("process",this.parser||this.Parser),e1("process",this.compiler||this.Compiler),n?i(void 0,n):new Promise(i);function i(o,a){const u=eg(t),c=r.parse(u);r.run(c,u,function(h,p,m){if(h||!p||!m)return f(h);const y=p,b=r.stringify(y,m);ppe(b)?m.value=b:m.result=b,f(h,m)});function f(h,p){h||!p?a(h):o?o(p):n(void 0,p)}}}processSync(t){let n=!1,r;return this.freeze(),Jx("processSync",this.parser||this.Parser),e1("processSync",this.compiler||this.Compiler),this.process(t,i),rO("processSync","process",n),r;function i(o,a){n=!0,J2(o),r=a}}run(t,n,r){nO(t),this.freeze();const i=this.transformers;return!r&&typeof n=="function"&&(r=n,n=void 0),r?o(void 0,r):new Promise(o);function o(a,u){const c=eg(n);i.run(t,c,f);function f(h,p,m){const y=p||t;h?u(h):a?a(y):r(void 0,y,m)}}}runSync(t,n){let r=!1,i;return this.run(t,n,o),rO("runSync","run",r),i;function o(a,u){J2(a),i=u,r=!0}}stringify(t,n){this.freeze();const r=eg(n),i=this.compiler||this.Compiler;return e1("stringify",i),nO(t),i(t,r)}use(t,...n){const r=this.attachers,i=this.namespace;if(t1("use",this.frozen),t!=null)if(typeof t=="function")c(t,n);else if(typeof t=="object")Array.isArray(t)?u(t):a(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function o(f){if(typeof f=="function")c(f,[]);else if(typeof f=="object")if(Array.isArray(f)){const[h,...p]=f;c(h,p)}else a(f);else throw new TypeError("Expected usable value, not `"+f+"`")}function a(f){if(!("plugins"in f)&&!("settings"in f))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");u(f.plugins),f.settings&&(i.settings=Kx(!0,i.settings,f.settings))}function u(f){let h=-1;if(f!=null)if(Array.isArray(f))for(;++h<f.length;){const p=f[h];o(p)}else throw new TypeError("Expected a list of plugins, not `"+f+"`")}function c(f,h){let p=-1,m=-1;for(;++p<r.length;)if(r[p][0]===f){m=p;break}if(m===-1)r.push([f,...h]);else if(h.length>0){let[y,...b]=h;const v=r[m][1];Xw(v)&&Xw(y)&&(y=Kx(!0,v,y)),r[m]=[f,y,...b]}}}}const dpe=new SE().freeze();function Jx(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function e1(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function t1(e,t){if(t)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function nO(e){if(!Xw(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function rO(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function eg(e){return hpe(e)?e:new n3(e)}function hpe(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function ppe(e){return typeof e=="string"||mpe(e)}function mpe(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const gpe="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",iO=[],oO={allowDangerousHtml:!0},ype=/^(https?|ircs?|mailto|xmpp)$/i,bpe=[{from:"astPlugins",id:"remove-buggy-html-in-markdown-parser"},{from:"allowDangerousHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"allowNode",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowElement"},{from:"allowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowedElements"},{from:"className",id:"remove-classname"},{from:"disallowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"disallowedElements"},{from:"escapeHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"includeElementIndex",id:"#remove-includeelementindex"},{from:"includeNodeIndex",id:"change-includenodeindex-to-includeelementindex"},{from:"linkTarget",id:"remove-linktarget"},{from:"plugins",id:"change-plugins-to-remarkplugins",to:"remarkPlugins"},{from:"rawSourcePos",id:"#remove-rawsourcepos"},{from:"renderers",id:"change-renderers-to-components",to:"components"},{from:"source",id:"change-source-to-children",to:"children"},{from:"sourcePos",id:"#remove-sourcepos"},{from:"transformImageUri",id:"#add-urltransform",to:"urlTransform"},{from:"transformLinkUri",id:"#add-urltransform",to:"urlTransform"}];function vpe(e){const t=xpe(e),n=wpe(e);return Spe(t.runSync(t.parse(n),n),e)}function xpe(e){const t=e.rehypePlugins||iO,n=e.remarkPlugins||iO,r=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...oO}:oO;return dpe().use(ehe).use(n).use(Whe,r).use(t)}function wpe(e){const t=e.children||"",n=new n3;return typeof t=="string"&&(n.value=t),n}function Spe(e,t){const n=t.allowedElements,r=t.allowElement,i=t.components,o=t.disallowedElements,a=t.skipHtml,u=t.unwrapDisallowed,c=t.urlTransform||Cpe;for(const h of bpe)Object.hasOwn(t,h.from)&&(""+h.from+(h.to?"use `"+h.to+"` instead":"remove it")+gpe+h.id,void 0);return yb(e,f),jce(e,{Fragment:E.Fragment,components:i,ignoreInvalidStyle:!0,jsx:E.jsx,jsxs:E.jsxs,passKeys:!0,passNode:!0});function f(h,p,m){if(h.type==="raw"&&m&&typeof p=="number")return a?m.children.splice(p,1):m.children[p]={type:"text",value:h.value},p;if(h.type==="element"){let y;for(y in Vx)if(Object.hasOwn(Vx,y)&&Object.hasOwn(h.properties,y)){const b=h.properties[y],v=Vx[y];(v===null||v.includes(h.tagName))&&(h.properties[y]=c(String(b||""),y,h))}}if(h.type==="element"){let y=n?!n.includes(h.tagName):o?o.includes(h.tagName):!1;if(!y&&r&&typeof p=="number"&&(y=!r(h,p,m)),y&&m&&typeof p=="number")return u&&h.children?m.children.splice(p,1,...h.children):m.children.splice(p,1),p}}}function Cpe(e){const t=e.indexOf(":"),n=e.indexOf("?"),r=e.indexOf("#"),i=e.indexOf("/");return t===-1||i!==-1&&t>i||n!==-1&&t>n||r!==-1&&t>r||ype.test(e.slice(0,t))?e:""}const Epe=/[\0-\x1F!-,\.\/:-@\[-\^`\{-\xA9\xAB-\xB4\xB6-\xB9\xBB-\xBF\xD7\xF7\u02C2-\u02C5\u02D2-\u02DF\u02E5-\u02EB\u02ED\u02EF-\u02FF\u0375\u0378\u0379\u037E\u0380-\u0385\u0387\u038B\u038D\u03A2\u03F6\u0482\u0530\u0557\u0558\u055A-\u055F\u0589-\u0590\u05BE\u05C0\u05C3\u05C6\u05C8-\u05CF\u05EB-\u05EE\u05F3-\u060F\u061B-\u061F\u066A-\u066D\u06D4\u06DD\u06DE\u06E9\u06FD\u06FE\u0700-\u070F\u074B\u074C\u07B2-\u07BF\u07F6-\u07F9\u07FB\u07FC\u07FE\u07FF\u082E-\u083F\u085C-\u085F\u086B-\u089F\u08B5\u08C8-\u08D2\u08E2\u0964\u0965\u0970\u0984\u098D\u098E\u0991\u0992\u09A9\u09B1\u09B3-\u09B5\u09BA\u09BB\u09C5\u09C6\u09C9\u09CA\u09CF-\u09D6\u09D8-\u09DB\u09DE\u09E4\u09E5\u09F2-\u09FB\u09FD\u09FF\u0A00\u0A04\u0A0B-\u0A0E\u0A11\u0A12\u0A29\u0A31\u0A34\u0A37\u0A3A\u0A3B\u0A3D\u0A43-\u0A46\u0A49\u0A4A\u0A4E-\u0A50\u0A52-\u0A58\u0A5D\u0A5F-\u0A65\u0A76-\u0A80\u0A84\u0A8E\u0A92\u0AA9\u0AB1\u0AB4\u0ABA\u0ABB\u0AC6\u0ACA\u0ACE\u0ACF\u0AD1-\u0ADF\u0AE4\u0AE5\u0AF0-\u0AF8\u0B00\u0B04\u0B0D\u0B0E\u0B11\u0B12\u0B29\u0B31\u0B34\u0B3A\u0B3B\u0B45\u0B46\u0B49\u0B4A\u0B4E-\u0B54\u0B58-\u0B5B\u0B5E\u0B64\u0B65\u0B70\u0B72-\u0B81\u0B84\u0B8B-\u0B8D\u0B91\u0B96-\u0B98\u0B9B\u0B9D\u0BA0-\u0BA2\u0BA5-\u0BA7\u0BAB-\u0BAD\u0BBA-\u0BBD\u0BC3-\u0BC5\u0BC9\u0BCE\u0BCF\u0BD1-\u0BD6\u0BD8-\u0BE5\u0BF0-\u0BFF\u0C0D\u0C11\u0C29\u0C3A-\u0C3C\u0C45\u0C49\u0C4E-\u0C54\u0C57\u0C5B-\u0C5F\u0C64\u0C65\u0C70-\u0C7F\u0C84\u0C8D\u0C91\u0CA9\u0CB4\u0CBA\u0CBB\u0CC5\u0CC9\u0CCE-\u0CD4\u0CD7-\u0CDD\u0CDF\u0CE4\u0CE5\u0CF0\u0CF3-\u0CFF\u0D0D\u0D11\u0D45\u0D49\u0D4F-\u0D53\u0D58-\u0D5E\u0D64\u0D65\u0D70-\u0D79\u0D80\u0D84\u0D97-\u0D99\u0DB2\u0DBC\u0DBE\u0DBF\u0DC7-\u0DC9\u0DCB-\u0DCE\u0DD5\u0DD7\u0DE0-\u0DE5\u0DF0\u0DF1\u0DF4-\u0E00\u0E3B-\u0E3F\u0E4F\u0E5A-\u0E80\u0E83\u0E85\u0E8B\u0EA4\u0EA6\u0EBE\u0EBF\u0EC5\u0EC7\u0ECE\u0ECF\u0EDA\u0EDB\u0EE0-\u0EFF\u0F01-\u0F17\u0F1A-\u0F1F\u0F2A-\u0F34\u0F36\u0F38\u0F3A-\u0F3D\u0F48\u0F6D-\u0F70\u0F85\u0F98\u0FBD-\u0FC5\u0FC7-\u0FFF\u104A-\u104F\u109E\u109F\u10C6\u10C8-\u10CC\u10CE\u10CF\u10FB\u1249\u124E\u124F\u1257\u1259\u125E\u125F\u1289\u128E\u128F\u12B1\u12B6\u12B7\u12BF\u12C1\u12C6\u12C7\u12D7\u1311\u1316\u1317\u135B\u135C\u1360-\u137F\u1390-\u139F\u13F6\u13F7\u13FE-\u1400\u166D\u166E\u1680\u169B-\u169F\u16EB-\u16ED\u16F9-\u16FF\u170D\u1715-\u171F\u1735-\u173F\u1754-\u175F\u176D\u1771\u1774-\u177F\u17D4-\u17D6\u17D8-\u17DB\u17DE\u17DF\u17EA-\u180A\u180E\u180F\u181A-\u181F\u1879-\u187F\u18AB-\u18AF\u18F6-\u18FF\u191F\u192C-\u192F\u193C-\u1945\u196E\u196F\u1975-\u197F\u19AC-\u19AF\u19CA-\u19CF\u19DA-\u19FF\u1A1C-\u1A1F\u1A5F\u1A7D\u1A7E\u1A8A-\u1A8F\u1A9A-\u1AA6\u1AA8-\u1AAF\u1AC1-\u1AFF\u1B4C-\u1B4F\u1B5A-\u1B6A\u1B74-\u1B7F\u1BF4-\u1BFF\u1C38-\u1C3F\u1C4A-\u1C4C\u1C7E\u1C7F\u1C89-\u1C8F\u1CBB\u1CBC\u1CC0-\u1CCF\u1CD3\u1CFB-\u1CFF\u1DFA\u1F16\u1F17\u1F1E\u1F1F\u1F46\u1F47\u1F4E\u1F4F\u1F58\u1F5A\u1F5C\u1F5E\u1F7E\u1F7F\u1FB5\u1FBD\u1FBF-\u1FC1\u1FC5\u1FCD-\u1FCF\u1FD4\u1FD5\u1FDC-\u1FDF\u1FED-\u1FF1\u1FF5\u1FFD-\u203E\u2041-\u2053\u2055-\u2070\u2072-\u207E\u2080-\u208F\u209D-\u20CF\u20F1-\u2101\u2103-\u2106\u2108\u2109\u2114\u2116-\u2118\u211E-\u2123\u2125\u2127\u2129\u212E\u213A\u213B\u2140-\u2144\u214A-\u214D\u214F-\u215F\u2189-\u24B5\u24EA-\u2BFF\u2C2F\u2C5F\u2CE5-\u2CEA\u2CF4-\u2CFF\u2D26\u2D28-\u2D2C\u2D2E\u2D2F\u2D68-\u2D6E\u2D70-\u2D7E\u2D97-\u2D9F\u2DA7\u2DAF\u2DB7\u2DBF\u2DC7\u2DCF\u2DD7\u2DDF\u2E00-\u2E2E\u2E30-\u3004\u3008-\u3020\u3030\u3036\u3037\u303D-\u3040\u3097\u3098\u309B\u309C\u30A0\u30FB\u3100-\u3104\u3130\u318F-\u319F\u31C0-\u31EF\u3200-\u33FF\u4DC0-\u4DFF\u9FFD-\u9FFF\uA48D-\uA4CF\uA4FE\uA4FF\uA60D-\uA60F\uA62C-\uA63F\uA673\uA67E\uA6F2-\uA716\uA720\uA721\uA789\uA78A\uA7C0\uA7C1\uA7CB-\uA7F4\uA828-\uA82B\uA82D-\uA83F\uA874-\uA87F\uA8C6-\uA8CF\uA8DA-\uA8DF\uA8F8-\uA8FA\uA8FC\uA92E\uA92F\uA954-\uA95F\uA97D-\uA97F\uA9C1-\uA9CE\uA9DA-\uA9DF\uA9FF\uAA37-\uAA3F\uAA4E\uAA4F\uAA5A-\uAA5F\uAA77-\uAA79\uAAC3-\uAADA\uAADE\uAADF\uAAF0\uAAF1\uAAF7-\uAB00\uAB07\uAB08\uAB0F\uAB10\uAB17-\uAB1F\uAB27\uAB2F\uAB5B\uAB6A-\uAB6F\uABEB\uABEE\uABEF\uABFA-\uABFF\uD7A4-\uD7AF\uD7C7-\uD7CA\uD7FC-\uD7FF\uE000-\uF8FF\uFA6E\uFA6F\uFADA-\uFAFF\uFB07-\uFB12\uFB18-\uFB1C\uFB29\uFB37\uFB3D\uFB3F\uFB42\uFB45\uFBB2-\uFBD2\uFD3E-\uFD4F\uFD90\uFD91\uFDC8-\uFDEF\uFDFC-\uFDFF\uFE10-\uFE1F\uFE30-\uFE32\uFE35-\uFE4C\uFE50-\uFE6F\uFE75\uFEFD-\uFF0F\uFF1A-\uFF20\uFF3B-\uFF3E\uFF40\uFF5B-\uFF65\uFFBF-\uFFC1\uFFC8\uFFC9\uFFD0\uFFD1\uFFD8\uFFD9\uFFDD-\uFFFF]|\uD800[\uDC0C\uDC27\uDC3B\uDC3E\uDC4E\uDC4F\uDC5E-\uDC7F\uDCFB-\uDD3F\uDD75-\uDDFC\uDDFE-\uDE7F\uDE9D-\uDE9F\uDED1-\uDEDF\uDEE1-\uDEFF\uDF20-\uDF2C\uDF4B-\uDF4F\uDF7B-\uDF7F\uDF9E\uDF9F\uDFC4-\uDFC7\uDFD0\uDFD6-\uDFFF]|\uD801[\uDC9E\uDC9F\uDCAA-\uDCAF\uDCD4-\uDCD7\uDCFC-\uDCFF\uDD28-\uDD2F\uDD64-\uDDFF\uDF37-\uDF3F\uDF56-\uDF5F\uDF68-\uDFFF]|\uD802[\uDC06\uDC07\uDC09\uDC36\uDC39-\uDC3B\uDC3D\uDC3E\uDC56-\uDC5F\uDC77-\uDC7F\uDC9F-\uDCDF\uDCF3\uDCF6-\uDCFF\uDD16-\uDD1F\uDD3A-\uDD7F\uDDB8-\uDDBD\uDDC0-\uDDFF\uDE04\uDE07-\uDE0B\uDE14\uDE18\uDE36\uDE37\uDE3B-\uDE3E\uDE40-\uDE5F\uDE7D-\uDE7F\uDE9D-\uDEBF\uDEC8\uDEE7-\uDEFF\uDF36-\uDF3F\uDF56-\uDF5F\uDF73-\uDF7F\uDF92-\uDFFF]|\uD803[\uDC49-\uDC7F\uDCB3-\uDCBF\uDCF3-\uDCFF\uDD28-\uDD2F\uDD3A-\uDE7F\uDEAA\uDEAD-\uDEAF\uDEB2-\uDEFF\uDF1D-\uDF26\uDF28-\uDF2F\uDF51-\uDFAF\uDFC5-\uDFDF\uDFF7-\uDFFF]|\uD804[\uDC47-\uDC65\uDC70-\uDC7E\uDCBB-\uDCCF\uDCE9-\uDCEF\uDCFA-\uDCFF\uDD35\uDD40-\uDD43\uDD48-\uDD4F\uDD74\uDD75\uDD77-\uDD7F\uDDC5-\uDDC8\uDDCD\uDDDB\uDDDD-\uDDFF\uDE12\uDE38-\uDE3D\uDE3F-\uDE7F\uDE87\uDE89\uDE8E\uDE9E\uDEA9-\uDEAF\uDEEB-\uDEEF\uDEFA-\uDEFF\uDF04\uDF0D\uDF0E\uDF11\uDF12\uDF29\uDF31\uDF34\uDF3A\uDF45\uDF46\uDF49\uDF4A\uDF4E\uDF4F\uDF51-\uDF56\uDF58-\uDF5C\uDF64\uDF65\uDF6D-\uDF6F\uDF75-\uDFFF]|\uD805[\uDC4B-\uDC4F\uDC5A-\uDC5D\uDC62-\uDC7F\uDCC6\uDCC8-\uDCCF\uDCDA-\uDD7F\uDDB6\uDDB7\uDDC1-\uDDD7\uDDDE-\uDDFF\uDE41-\uDE43\uDE45-\uDE4F\uDE5A-\uDE7F\uDEB9-\uDEBF\uDECA-\uDEFF\uDF1B\uDF1C\uDF2C-\uDF2F\uDF3A-\uDFFF]|\uD806[\uDC3B-\uDC9F\uDCEA-\uDCFE\uDD07\uDD08\uDD0A\uDD0B\uDD14\uDD17\uDD36\uDD39\uDD3A\uDD44-\uDD4F\uDD5A-\uDD9F\uDDA8\uDDA9\uDDD8\uDDD9\uDDE2\uDDE5-\uDDFF\uDE3F-\uDE46\uDE48-\uDE4F\uDE9A-\uDE9C\uDE9E-\uDEBF\uDEF9-\uDFFF]|\uD807[\uDC09\uDC37\uDC41-\uDC4F\uDC5A-\uDC71\uDC90\uDC91\uDCA8\uDCB7-\uDCFF\uDD07\uDD0A\uDD37-\uDD39\uDD3B\uDD3E\uDD48-\uDD4F\uDD5A-\uDD5F\uDD66\uDD69\uDD8F\uDD92\uDD99-\uDD9F\uDDAA-\uDEDF\uDEF7-\uDFAF\uDFB1-\uDFFF]|\uD808[\uDF9A-\uDFFF]|\uD809[\uDC6F-\uDC7F\uDD44-\uDFFF]|[\uD80A\uD80B\uD80E-\uD810\uD812-\uD819\uD824-\uD82B\uD82D\uD82E\uD830-\uD833\uD837\uD839\uD83D\uD83F\uD87B-\uD87D\uD87F\uD885-\uDB3F\uDB41-\uDBFF][\uDC00-\uDFFF]|\uD80D[\uDC2F-\uDFFF]|\uD811[\uDE47-\uDFFF]|\uD81A[\uDE39-\uDE3F\uDE5F\uDE6A-\uDECF\uDEEE\uDEEF\uDEF5-\uDEFF\uDF37-\uDF3F\uDF44-\uDF4F\uDF5A-\uDF62\uDF78-\uDF7C\uDF90-\uDFFF]|\uD81B[\uDC00-\uDE3F\uDE80-\uDEFF\uDF4B-\uDF4E\uDF88-\uDF8E\uDFA0-\uDFDF\uDFE2\uDFE5-\uDFEF\uDFF2-\uDFFF]|\uD821[\uDFF8-\uDFFF]|\uD823[\uDCD6-\uDCFF\uDD09-\uDFFF]|\uD82C[\uDD1F-\uDD4F\uDD53-\uDD63\uDD68-\uDD6F\uDEFC-\uDFFF]|\uD82F[\uDC6B-\uDC6F\uDC7D-\uDC7F\uDC89-\uDC8F\uDC9A-\uDC9C\uDC9F-\uDFFF]|\uD834[\uDC00-\uDD64\uDD6A-\uDD6C\uDD73-\uDD7A\uDD83\uDD84\uDD8C-\uDDA9\uDDAE-\uDE41\uDE45-\uDFFF]|\uD835[\uDC55\uDC9D\uDCA0\uDCA1\uDCA3\uDCA4\uDCA7\uDCA8\uDCAD\uDCBA\uDCBC\uDCC4\uDD06\uDD0B\uDD0C\uDD15\uDD1D\uDD3A\uDD3F\uDD45\uDD47-\uDD49\uDD51\uDEA6\uDEA7\uDEC1\uDEDB\uDEFB\uDF15\uDF35\uDF4F\uDF6F\uDF89\uDFA9\uDFC3\uDFCC\uDFCD]|\uD836[\uDC00-\uDDFF\uDE37-\uDE3A\uDE6D-\uDE74\uDE76-\uDE83\uDE85-\uDE9A\uDEA0\uDEB0-\uDFFF]|\uD838[\uDC07\uDC19\uDC1A\uDC22\uDC25\uDC2B-\uDCFF\uDD2D-\uDD2F\uDD3E\uDD3F\uDD4A-\uDD4D\uDD4F-\uDEBF\uDEFA-\uDFFF]|\uD83A[\uDCC5-\uDCCF\uDCD7-\uDCFF\uDD4C-\uDD4F\uDD5A-\uDFFF]|\uD83B[\uDC00-\uDDFF\uDE04\uDE20\uDE23\uDE25\uDE26\uDE28\uDE33\uDE38\uDE3A\uDE3C-\uDE41\uDE43-\uDE46\uDE48\uDE4A\uDE4C\uDE50\uDE53\uDE55\uDE56\uDE58\uDE5A\uDE5C\uDE5E\uDE60\uDE63\uDE65\uDE66\uDE6B\uDE73\uDE78\uDE7D\uDE7F\uDE8A\uDE9C-\uDEA0\uDEA4\uDEAA\uDEBC-\uDFFF]|\uD83C[\uDC00-\uDD2F\uDD4A-\uDD4F\uDD6A-\uDD6F\uDD8A-\uDFFF]|\uD83E[\uDC00-\uDFEF\uDFFA-\uDFFF]|\uD869[\uDEDE-\uDEFF]|\uD86D[\uDF35-\uDF3F]|\uD86E[\uDC1E\uDC1F]|\uD873[\uDEA2-\uDEAF]|\uD87A[\uDFE1-\uDFFF]|\uD87E[\uDE1E-\uDFFF]|\uD884[\uDF4B-\uDFFF]|\uDB40[\uDC00-\uDCFF\uDDF0-\uDFFF]/g,kpe=Object.hasOwnProperty;class Rpe{constructor(){this.occurrences,this.reset()}slug(t,n){const r=this;let i=_pe(t,n===!0);const o=i;for(;kpe.call(r.occurrences,i);)r.occurrences[o]++,i=o+"-"+r.occurrences[o];return r.occurrences[i]=0,i}reset(){this.occurrences=Object.create(null)}}function _pe(e,t){return typeof e!="string"?"":(t||(e=e.toLowerCase()),e.replace(Epe,"").replace(/ /g,"-"))}function Tpe(e){const t=e.type==="element"?e.tagName.toLowerCase():"",n=t.length===2&&t.charCodeAt(0)===104?t.charCodeAt(1):0;return n>48&&n<55?n-48:void 0}function Ape(e){return"children"in e?r3(e):"value"in e?e.value:""}function Dpe(e){return e.type==="text"?e.value:"children"in e?r3(e):""}function r3(e){let t=-1;const n=[];for(;++t<e.children.length;)n[t]=Dpe(e.children[t]);return n.join("")}const Mpe={},sO=new Rpe;function Ope(e){const n=(e||Mpe).prefix||"";return function(r){sO.reset(),yb(r,"element",function(i){Tpe(i)&&!i.properties.id&&(i.properties.id=n+sO.slug(Ape(i)))})}}function $pe(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function Ppe(e,t,n){const i=mb((n||{}).ignore||[]),o=Npe(t);let a=-1;for(;++a<o.length;)t3(e,"text",u);function u(f,h){let p=-1,m;for(;++p<h.length;){const y=h[p],b=m?m.children:void 0;if(i(y,b?b.indexOf(y):void 0,m))return;m=y}if(m)return c(f,h)}function c(f,h){const p=h[h.length-1],m=o[a][0],y=o[a][1];let b=0;const S=p.children.indexOf(f);let x=!1,_=[];m.lastIndex=0;let k=m.exec(f.value);for(;k;){const T=k.index,A={index:k.index,input:k.input,stack:[...h,f]};let D=y(...k,A);if(typeof D=="string"&&(D=D.length>0?{type:"text",value:D}:void 0),D===!1?m.lastIndex=T+1:(b!==T&&_.push({type:"text",value:f.value.slice(b,T)}),Array.isArray(D)?_.push(...D):D&&_.push(D),b=T+k[0].length,x=!0),!m.global)break;k=m.exec(f.value)}return x?(b<f.value.length&&_.push({type:"text",value:f.value.slice(b)}),p.children.splice(S,1,..._)):_=[f],S+_.length}}function Npe(e){const t=[];if(!Array.isArray(e))throw new TypeError("Expected find and replace tuple or list of tuples");const n=!e[0]||Array.isArray(e[0])?e:[e];let r=-1;for(;++r<n.length;){const i=n[r];t.push([Ipe(i[0]),jpe(i[1])])}return t}function Ipe(e){return typeof e=="string"?new RegExp($pe(e),"g"):e}function jpe(e){return typeof e=="function"?e:function(){return e}}const n1="phrasing",r1=["autolink","link","image","label"];function Lpe(){return{transforms:[Vpe],enter:{literalAutolink:zpe,literalAutolinkEmail:i1,literalAutolinkHttp:i1,literalAutolinkWww:i1},exit:{literalAutolink:Gpe,literalAutolinkEmail:Hpe,literalAutolinkHttp:Bpe,literalAutolinkWww:Upe}}}function Fpe(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:n1,notInConstruct:r1},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:n1,notInConstruct:r1},{character:":",before:"[ps]",after:"\\/",inConstruct:n1,notInConstruct:r1}]}}function zpe(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function i1(e){this.config.enter.autolinkProtocol.call(this,e)}function Bpe(e){this.config.exit.autolinkProtocol.call(this,e)}function Upe(e){this.config.exit.data.call(this,e);const t=this.stack[this.stack.length-1];t.type,t.url="http://"+this.sliceSerialize(e)}function Hpe(e){this.config.exit.autolinkEmail.call(this,e)}function Gpe(e){this.exit(e)}function Vpe(e){Ppe(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,qpe],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),Ype]],{ignore:["link","linkReference"]})}function qpe(e,t,n,r,i){let o="";if(!i3(i)||(/^w/i.test(t)&&(n=t+n,t="",o="http://"),!Wpe(n)))return!1;const a=Kpe(n+r);if(!a[0])return!1;const u={type:"link",title:null,url:o+t+a[0],children:[{type:"text",value:t+a[0]}]};return a[1]?[u,{type:"text",value:a[1]}]:u}function Ype(e,t,n,r){return!i3(r,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function Wpe(e){const t=e.split(".");return!(t.length<2||t[t.length-1]&&(/_/.test(t[t.length-1])||!/[a-zA-Z\d]/.test(t[t.length-1]))||t[t.length-2]&&(/_/.test(t[t.length-2])||!/[a-zA-Z\d]/.test(t[t.length-2])))}function Kpe(e){const t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],r=n.indexOf(")");const i=Jg(e,"(");let o=Jg(e,")");for(;r!==-1&&i>o;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(")"),o++;return[e,n]}function i3(e,t){const n=e.input.charCodeAt(e.index-1);return(e.index===0||Xl(n)||db(n))&&(!t||n!==47)}o3.peek=ime;function Xpe(){this.buffer()}function Qpe(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function Zpe(){this.buffer()}function Jpe(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function eme(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=zi(this.sliceSerialize(e)).toLowerCase(),n.label=t}function tme(e){this.exit(e)}function nme(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=zi(this.sliceSerialize(e)).toLowerCase(),n.label=t}function rme(e){this.exit(e)}function ime(){return"["}function o3(e,t,n,r){const i=n.createTracker(r);let o=i.move("[^");const a=n.enter("footnoteReference"),u=n.enter("reference");return o+=i.move(n.safe(n.associationId(e),{after:"]",before:o})),u(),a(),o+=i.move("]"),o}function ome(){return{enter:{gfmFootnoteCallString:Xpe,gfmFootnoteCall:Qpe,gfmFootnoteDefinitionLabelString:Zpe,gfmFootnoteDefinition:Jpe},exit:{gfmFootnoteCallString:eme,gfmFootnoteCall:tme,gfmFootnoteDefinitionLabelString:nme,gfmFootnoteDefinition:rme}}}function sme(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:o3},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function n(r,i,o,a){const u=o.createTracker(a);let c=u.move("[^");const f=o.enter("footnoteDefinition"),h=o.enter("label");return c+=u.move(o.safe(o.associationId(r),{before:c,after:"]"})),h(),c+=u.move("]:"),r.children&&r.children.length>0&&(u.shift(4),c+=u.move((t?`
|
|
493
|
-
`:" ")+o.indentLines(o.containerFlow(r,u.current()),t?s3:ame))),f(),c}}function ame(e,t,n){return t===0?e:s3(e,t,n)}function s3(e,t,n){return(n?"":" ")+e}const lme=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];a3.peek=hme;function ume(){return{canContainEols:["delete"],enter:{strikethrough:fme},exit:{strikethrough:dme}}}function cme(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:lme}],handlers:{delete:a3}}}function fme(e){this.enter({type:"delete",children:[]},e)}function dme(e){this.exit(e)}function a3(e,t,n,r){const i=n.createTracker(r),o=n.enter("strikethrough");let a=i.move("~~");return a+=n.containerPhrasing(e,{...i.current(),before:a,after:"~"}),a+=i.move("~~"),o(),a}function hme(){return"~"}function pme(e){return e.length}function mme(e,t){const n=t||{},r=(n.align||[]).concat(),i=n.stringLength||pme,o=[],a=[],u=[],c=[];let f=0,h=-1;for(;++h<e.length;){const v=[],S=[];let x=-1;for(e[h].length>f&&(f=e[h].length);++x<e[h].length;){const _=gme(e[h][x]);if(n.alignDelimiters!==!1){const k=i(_);S[x]=k,(c[x]===void 0||k>c[x])&&(c[x]=k)}v.push(_)}a[h]=v,u[h]=S}let p=-1;if(typeof r=="object"&&"length"in r)for(;++p<f;)o[p]=aO(r[p]);else{const v=aO(r);for(;++p<f;)o[p]=v}p=-1;const m=[],y=[];for(;++p<f;){const v=o[p];let S="",x="";v===99?(S=":",x=":"):v===108?S=":":v===114&&(x=":");let _=n.alignDelimiters===!1?1:Math.max(1,c[p]-S.length-x.length);const k=S+"-".repeat(_)+x;n.alignDelimiters!==!1&&(_=S.length+_+x.length,_>c[p]&&(c[p]=_),y[p]=_),m[p]=k}a.splice(1,0,m),u.splice(1,0,y),h=-1;const b=[];for(;++h<a.length;){const v=a[h],S=u[h];p=-1;const x=[];for(;++p<f;){const _=v[p]||"";let k="",T="";if(n.alignDelimiters!==!1){const A=c[p]-(S[p]||0),D=o[p];D===114?k=" ".repeat(A):D===99?A%2?(k=" ".repeat(A/2+.5),T=" ".repeat(A/2-.5)):(k=" ".repeat(A/2),T=k):T=" ".repeat(A)}n.delimiterStart!==!1&&!p&&x.push("|"),n.padding!==!1&&!(n.alignDelimiters===!1&&_==="")&&(n.delimiterStart!==!1||p)&&x.push(" "),n.alignDelimiters!==!1&&x.push(k),x.push(_),n.alignDelimiters!==!1&&x.push(T),n.padding!==!1&&x.push(" "),(n.delimiterEnd!==!1||p!==f-1)&&x.push("|")}b.push(n.delimiterEnd===!1?x.join("").replace(/ +$/,""):x.join(""))}return b.join(`
|
|
494
|
-
`)}function gme(e){return e==null?"":String(e)}function aO(e){const t=typeof e=="string"?e.codePointAt(0):0;return t===67||t===99?99:t===76||t===108?108:t===82||t===114?114:0}function yme(e,t,n,r){const i=n.enter("blockquote"),o=n.createTracker(r);o.move("> "),o.shift(2);const a=n.indentLines(n.containerFlow(e,o.current()),bme);return i(),a}function bme(e,t,n){return">"+(n?"":" ")+e}function vme(e,t){return lO(e,t.inConstruct,!0)&&!lO(e,t.notInConstruct,!1)}function lO(e,t,n){if(typeof t=="string"&&(t=[t]),!t||t.length===0)return n;let r=-1;for(;++r<t.length;)if(e.includes(t[r]))return!0;return!1}function uO(e,t,n,r){let i=-1;for(;++i<n.unsafe.length;)if(n.unsafe[i].character===`
|
|
495
|
-
`&&vme(n.stack,n.unsafe[i]))return/[ \t]/.test(r.before)?"":" ";return`\\
|
|
496
|
-
`}function xme(e,t){const n=String(e);let r=n.indexOf(t),i=r,o=0,a=0;if(typeof t!="string")throw new TypeError("Expected substring");for(;r!==-1;)r===i?++o>a&&(a=o):o=1,i=r+t.length,r=n.indexOf(t,i);return a}function wme(e,t){return!!(t.options.fences===!1&&e.value&&!e.lang&&/[^ \r\n]/.test(e.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(e.value))}function Sme(e){const t=e.options.fence||"`";if(t!=="`"&&t!=="~")throw new Error("Cannot serialize code with `"+t+"` for `options.fence`, expected `` ` `` or `~`");return t}function Cme(e,t,n,r){const i=Sme(n),o=e.value||"",a=i==="`"?"GraveAccent":"Tilde";if(wme(e,n)){const p=n.enter("codeIndented"),m=n.indentLines(o,Eme);return p(),m}const u=n.createTracker(r),c=i.repeat(Math.max(xme(o,i)+1,3)),f=n.enter("codeFenced");let h=u.move(c);if(e.lang){const p=n.enter(`codeFencedLang${a}`);h+=u.move(n.safe(e.lang,{before:h,after:" ",encode:["`"],...u.current()})),p()}if(e.lang&&e.meta){const p=n.enter(`codeFencedMeta${a}`);h+=u.move(" "),h+=u.move(n.safe(e.meta,{before:h,after:`
|
|
497
|
-
`,encode:["`"],...u.current()})),p()}return h+=u.move(`
|
|
498
|
-
`),o&&(h+=u.move(o+`
|
|
499
|
-
`)),h+=u.move(c),f(),h}function Eme(e,t,n){return(n?"":" ")+e}function CE(e){const t=e.options.quote||'"';if(t!=='"'&&t!=="'")throw new Error("Cannot serialize title with `"+t+"` for `options.quote`, expected `\"`, or `'`");return t}function kme(e,t,n,r){const i=CE(n),o=i==='"'?"Quote":"Apostrophe",a=n.enter("definition");let u=n.enter("label");const c=n.createTracker(r);let f=c.move("[");return f+=c.move(n.safe(n.associationId(e),{before:f,after:"]",...c.current()})),f+=c.move("]: "),u(),!e.url||/[\0- \u007F]/.test(e.url)?(u=n.enter("destinationLiteral"),f+=c.move("<"),f+=c.move(n.safe(e.url,{before:f,after:">",...c.current()})),f+=c.move(">")):(u=n.enter("destinationRaw"),f+=c.move(n.safe(e.url,{before:f,after:e.title?" ":`
|
|
500
|
-
`,...c.current()}))),u(),e.title&&(u=n.enter(`title${o}`),f+=c.move(" "+i),f+=c.move(n.safe(e.title,{before:f,after:i,...c.current()})),f+=c.move(i),u()),a(),f}function Rme(e){const t=e.options.emphasis||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}function bh(e){return"&#x"+e.toString(16).toUpperCase()+";"}function wy(e,t,n){const r=nf(e),i=nf(t);return r===void 0?i===void 0?n==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:r===1?i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}l3.peek=_me;function l3(e,t,n,r){const i=Rme(n),o=n.enter("emphasis"),a=n.createTracker(r),u=a.move(i);let c=a.move(n.containerPhrasing(e,{after:i,before:u,...a.current()}));const f=c.charCodeAt(0),h=wy(r.before.charCodeAt(r.before.length-1),f,i);h.inside&&(c=bh(f)+c.slice(1));const p=c.charCodeAt(c.length-1),m=wy(r.after.charCodeAt(0),p,i);m.inside&&(c=c.slice(0,-1)+bh(p));const y=a.move(i);return o(),n.attentionEncodeSurroundingInfo={after:m.outside,before:h.outside},u+c+y}function _me(e,t,n){return n.options.emphasis||"*"}function Tme(e,t){let n=!1;return yb(e,function(r){if("value"in r&&/\r?\n|\r/.test(r.value)||r.type==="break")return n=!0,Ww}),!!((!e.depth||e.depth<3)&&mE(e)&&(t.options.setext||n))}function Ame(e,t,n,r){const i=Math.max(Math.min(6,e.depth||1),1),o=n.createTracker(r);if(Tme(e,n)){const h=n.enter("headingSetext"),p=n.enter("phrasing"),m=n.containerPhrasing(e,{...o.current(),before:`
|
|
501
|
-
`,after:`
|
|
502
|
-
`});return p(),h(),m+`
|
|
503
|
-
`+(i===1?"=":"-").repeat(m.length-(Math.max(m.lastIndexOf("\r"),m.lastIndexOf(`
|
|
504
|
-
`))+1))}const a="#".repeat(i),u=n.enter("headingAtx"),c=n.enter("phrasing");o.move(a+" ");let f=n.containerPhrasing(e,{before:"# ",after:`
|
|
505
|
-
`,...o.current()});return/^[\t ]/.test(f)&&(f=bh(f.charCodeAt(0))+f.slice(1)),f=f?a+" "+f:a,n.options.closeAtx&&(f+=" "+a),c(),u(),f}u3.peek=Dme;function u3(e){return e.value||""}function Dme(){return"<"}c3.peek=Mme;function c3(e,t,n,r){const i=CE(n),o=i==='"'?"Quote":"Apostrophe",a=n.enter("image");let u=n.enter("label");const c=n.createTracker(r);let f=c.move("![");return f+=c.move(n.safe(e.alt,{before:f,after:"]",...c.current()})),f+=c.move("]("),u(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(u=n.enter("destinationLiteral"),f+=c.move("<"),f+=c.move(n.safe(e.url,{before:f,after:">",...c.current()})),f+=c.move(">")):(u=n.enter("destinationRaw"),f+=c.move(n.safe(e.url,{before:f,after:e.title?" ":")",...c.current()}))),u(),e.title&&(u=n.enter(`title${o}`),f+=c.move(" "+i),f+=c.move(n.safe(e.title,{before:f,after:i,...c.current()})),f+=c.move(i),u()),f+=c.move(")"),a(),f}function Mme(){return"!"}f3.peek=Ome;function f3(e,t,n,r){const i=e.referenceType,o=n.enter("imageReference");let a=n.enter("label");const u=n.createTracker(r);let c=u.move("![");const f=n.safe(e.alt,{before:c,after:"]",...u.current()});c+=u.move(f+"]["),a();const h=n.stack;n.stack=[],a=n.enter("reference");const p=n.safe(n.associationId(e),{before:c,after:"]",...u.current()});return a(),n.stack=h,o(),i==="full"||!f||f!==p?c+=u.move(p+"]"):i==="shortcut"?c=c.slice(0,-1):c+=u.move("]"),c}function Ome(){return"!"}d3.peek=$me;function d3(e,t,n){let r=e.value||"",i="`",o=-1;for(;new RegExp("(^|[^`])"+i+"([^`]|$)").test(r);)i+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=" "+r+" ");++o<n.unsafe.length;){const a=n.unsafe[o],u=n.compilePattern(a);let c;if(a.atBreak)for(;c=u.exec(r);){let f=c.index;r.charCodeAt(f)===10&&r.charCodeAt(f-1)===13&&f--,r=r.slice(0,f)+" "+r.slice(c.index+1)}}return i+r+i}function $me(){return"`"}function h3(e,t){const n=mE(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))}p3.peek=Pme;function p3(e,t,n,r){const i=CE(n),o=i==='"'?"Quote":"Apostrophe",a=n.createTracker(r);let u,c;if(h3(e,n)){const h=n.stack;n.stack=[],u=n.enter("autolink");let p=a.move("<");return p+=a.move(n.containerPhrasing(e,{before:p,after:">",...a.current()})),p+=a.move(">"),u(),n.stack=h,p}u=n.enter("link"),c=n.enter("label");let f=a.move("[");return f+=a.move(n.containerPhrasing(e,{before:f,after:"](",...a.current()})),f+=a.move("]("),c(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(c=n.enter("destinationLiteral"),f+=a.move("<"),f+=a.move(n.safe(e.url,{before:f,after:">",...a.current()})),f+=a.move(">")):(c=n.enter("destinationRaw"),f+=a.move(n.safe(e.url,{before:f,after:e.title?" ":")",...a.current()}))),c(),e.title&&(c=n.enter(`title${o}`),f+=a.move(" "+i),f+=a.move(n.safe(e.title,{before:f,after:i,...a.current()})),f+=a.move(i),c()),f+=a.move(")"),u(),f}function Pme(e,t,n){return h3(e,n)?"<":"["}m3.peek=Nme;function m3(e,t,n,r){const i=e.referenceType,o=n.enter("linkReference");let a=n.enter("label");const u=n.createTracker(r);let c=u.move("[");const f=n.containerPhrasing(e,{before:c,after:"]",...u.current()});c+=u.move(f+"]["),a();const h=n.stack;n.stack=[],a=n.enter("reference");const p=n.safe(n.associationId(e),{before:c,after:"]",...u.current()});return a(),n.stack=h,o(),i==="full"||!f||f!==p?c+=u.move(p+"]"):i==="shortcut"?c=c.slice(0,-1):c+=u.move("]"),c}function Nme(){return"["}function EE(e){const t=e.options.bullet||"*";if(t!=="*"&&t!=="+"&&t!=="-")throw new Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}function Ime(e){const t=EE(e),n=e.options.bulletOther;if(!n)return t==="*"?"-":"*";if(n!=="*"&&n!=="+"&&n!=="-")throw new Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(n===t)throw new Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+n+"`) to be different");return n}function jme(e){const t=e.options.bulletOrdered||".";if(t!=="."&&t!==")")throw new Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}function g3(e){const t=e.options.rule||"*";if(t!=="*"&&t!=="-"&&t!=="_")throw new Error("Cannot serialize rules with `"+t+"` for `options.rule`, expected `*`, `-`, or `_`");return t}function Lme(e,t,n,r){const i=n.enter("list"),o=n.bulletCurrent;let a=e.ordered?jme(n):EE(n);const u=e.ordered?a==="."?")":".":Ime(n);let c=t&&n.bulletLastUsed?a===n.bulletLastUsed:!1;if(!e.ordered){const h=e.children?e.children[0]:void 0;if((a==="*"||a==="-")&&h&&(!h.children||!h.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),g3(n)===a&&h){let p=-1;for(;++p<e.children.length;){const m=e.children[p];if(m&&m.type==="listItem"&&m.children&&m.children[0]&&m.children[0].type==="thematicBreak"){c=!0;break}}}}c&&(a=u),n.bulletCurrent=a;const f=n.containerFlow(e,r);return n.bulletLastUsed=a,n.bulletCurrent=o,i(),f}function Fme(e){const t=e.options.listItemIndent||"one";if(t!=="tab"&&t!=="one"&&t!=="mixed")throw new Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t}function zme(e,t,n,r){const i=Fme(n);let o=n.bulletCurrent||EE(n);t&&t.type==="list"&&t.ordered&&(o=(typeof t.start=="number"&&t.start>-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+o);let a=o.length+1;(i==="tab"||i==="mixed"&&(t&&t.type==="list"&&t.spread||e.spread))&&(a=Math.ceil(a/4)*4);const u=n.createTracker(r);u.move(o+" ".repeat(a-o.length)),u.shift(a);const c=n.enter("listItem"),f=n.indentLines(n.containerFlow(e,u.current()),h);return c(),f;function h(p,m,y){return m?(y?"":" ".repeat(a))+p:(y?o:o+" ".repeat(a-o.length))+p}}function Bme(e,t,n,r){const i=n.enter("paragraph"),o=n.enter("phrasing"),a=n.containerPhrasing(e,r);return o(),i(),a}const Ume=mb(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function Hme(e,t,n,r){return(e.children.some(function(a){return Ume(a)})?n.containerPhrasing:n.containerFlow).call(n,e,r)}function Gme(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}y3.peek=Vme;function y3(e,t,n,r){const i=Gme(n),o=n.enter("strong"),a=n.createTracker(r),u=a.move(i+i);let c=a.move(n.containerPhrasing(e,{after:i,before:u,...a.current()}));const f=c.charCodeAt(0),h=wy(r.before.charCodeAt(r.before.length-1),f,i);h.inside&&(c=bh(f)+c.slice(1));const p=c.charCodeAt(c.length-1),m=wy(r.after.charCodeAt(0),p,i);m.inside&&(c=c.slice(0,-1)+bh(p));const y=a.move(i+i);return o(),n.attentionEncodeSurroundingInfo={after:m.outside,before:h.outside},u+c+y}function Vme(e,t,n){return n.options.strong||"*"}function qme(e,t,n,r){return n.safe(e.value,r)}function Yme(e){const t=e.options.ruleRepetition||3;if(t<3)throw new Error("Cannot serialize rules with repetition `"+t+"` for `options.ruleRepetition`, expected `3` or more");return t}function Wme(e,t,n){const r=(g3(n)+(n.options.ruleSpaces?" ":"")).repeat(Yme(n));return n.options.ruleSpaces?r.slice(0,-1):r}const b3={blockquote:yme,break:uO,code:Cme,definition:kme,emphasis:l3,hardBreak:uO,heading:Ame,html:u3,image:c3,imageReference:f3,inlineCode:d3,link:p3,linkReference:m3,list:Lme,listItem:zme,paragraph:Bme,root:Hme,strong:y3,text:qme,thematicBreak:Wme};function Kme(){return{enter:{table:Xme,tableData:cO,tableHeader:cO,tableRow:Zme},exit:{codeText:Jme,table:Qme,tableData:o1,tableHeader:o1,tableRow:o1}}}function Xme(e){const t=e._align;this.enter({type:"table",align:t.map(function(n){return n==="none"?null:n}),children:[]},e),this.data.inTable=!0}function Qme(e){this.exit(e),this.data.inTable=void 0}function Zme(e){this.enter({type:"tableRow",children:[]},e)}function o1(e){this.exit(e)}function cO(e){this.enter({type:"tableCell",children:[]},e)}function Jme(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,ege));const n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function ege(e,t){return t==="|"?t:e}function tge(e){const t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,i=t.stringLength,o=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
|
|
506
|
-
`,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:m,table:a,tableCell:c,tableRow:u}};function a(y,b,v,S){return f(h(y,v,S),y.align)}function u(y,b,v,S){const x=p(y,v,S),_=f([x]);return _.slice(0,_.indexOf(`
|
|
507
|
-
`))}function c(y,b,v,S){const x=v.enter("tableCell"),_=v.enter("phrasing"),k=v.containerPhrasing(y,{...S,before:o,after:o});return _(),x(),k}function f(y,b){return mme(y,{align:b,alignDelimiters:r,padding:n,stringLength:i})}function h(y,b,v){const S=y.children;let x=-1;const _=[],k=b.enter("table");for(;++x<S.length;)_[x]=p(S[x],b,v);return k(),_}function p(y,b,v){const S=y.children;let x=-1;const _=[],k=b.enter("tableRow");for(;++x<S.length;)_[x]=c(S[x],y,b,v);return k(),_}function m(y,b,v){let S=b3.inlineCode(y,b,v);return v.stack.includes("tableCell")&&(S=S.replace(/\|/g,"\\$&")),S}}function nge(){return{exit:{taskListCheckValueChecked:fO,taskListCheckValueUnchecked:fO,paragraph:ige}}}function rge(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:oge}}}function fO(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function ige(e){const t=this.stack[this.stack.length-2];if(t&&t.type==="listItem"&&typeof t.checked=="boolean"){const n=this.stack[this.stack.length-1];n.type;const r=n.children[0];if(r&&r.type==="text"){const i=t.children;let o=-1,a;for(;++o<i.length;){const u=i[o];if(u.type==="paragraph"){a=u;break}}a===n&&(r.value=r.value.slice(1),r.value.length===0?n.children.shift():n.position&&r.position&&typeof r.position.start.offset=="number"&&(r.position.start.column++,r.position.start.offset++,n.position.start=Object.assign({},r.position.start)))}}this.exit(e)}function oge(e,t,n,r){const i=e.children[0],o=typeof e.checked=="boolean"&&i&&i.type==="paragraph",a="["+(e.checked?"x":" ")+"] ",u=n.createTracker(r);o&&u.move(a);let c=b3.listItem(e,t,n,{...r,...u.current()});return o&&(c=c.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,f)),c;function f(h){return h+a}}function sge(){return[Lpe(),ome(),ume(),Kme(),nge()]}function age(e){return{extensions:[Fpe(),sme(e),cme(),tge(e),rge()]}}const lge={tokenize:pge,partial:!0},v3={tokenize:mge,partial:!0},x3={tokenize:gge,partial:!0},w3={tokenize:yge,partial:!0},uge={tokenize:bge,partial:!0},S3={name:"wwwAutolink",tokenize:dge,previous:E3},C3={name:"protocolAutolink",tokenize:hge,previous:k3},cs={name:"emailAutolink",tokenize:fge,previous:R3},co={};function cge(){return{text:co}}let dl=48;for(;dl<123;)co[dl]=cs,dl++,dl===58?dl=65:dl===91&&(dl=97);co[43]=cs;co[45]=cs;co[46]=cs;co[95]=cs;co[72]=[cs,C3];co[104]=[cs,C3];co[87]=[cs,S3];co[119]=[cs,S3];function fge(e,t,n){const r=this;let i,o;return a;function a(p){return!Zw(p)||!R3.call(r,r.previous)||kE(r.events)?n(p):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),u(p))}function u(p){return Zw(p)?(e.consume(p),u):p===64?(e.consume(p),c):n(p)}function c(p){return p===46?e.check(uge,h,f)(p):p===45||p===95||Zn(p)?(o=!0,e.consume(p),c):h(p)}function f(p){return e.consume(p),i=!0,c}function h(p){return o&&i&&ar(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(p)):n(p)}}function dge(e,t,n){const r=this;return i;function i(a){return a!==87&&a!==119||!E3.call(r,r.previous)||kE(r.events)?n(a):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(lge,e.attempt(v3,e.attempt(x3,o),n),n)(a))}function o(a){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(a)}}function hge(e,t,n){const r=this;let i="",o=!1;return a;function a(p){return(p===72||p===104)&&k3.call(r,r.previous)&&!kE(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),i+=String.fromCodePoint(p),e.consume(p),u):n(p)}function u(p){if(ar(p)&&i.length<5)return i+=String.fromCodePoint(p),e.consume(p),u;if(p===58){const m=i.toLowerCase();if(m==="http"||m==="https")return e.consume(p),c}return n(p)}function c(p){return p===47?(e.consume(p),o?f:(o=!0,c)):n(p)}function f(p){return p===null||by(p)||Wt(p)||Xl(p)||db(p)?n(p):e.attempt(v3,e.attempt(x3,h),n)(p)}function h(p){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(p)}}function pge(e,t,n){let r=0;return i;function i(a){return(a===87||a===119)&&r<3?(r++,e.consume(a),i):a===46&&r===3?(e.consume(a),o):n(a)}function o(a){return a===null?n(a):t(a)}}function mge(e,t,n){let r,i,o;return a;function a(f){return f===46||f===95?e.check(w3,c,u)(f):f===null||Wt(f)||Xl(f)||f!==45&&db(f)?c(f):(o=!0,e.consume(f),a)}function u(f){return f===95?r=!0:(i=r,r=void 0),e.consume(f),a}function c(f){return i||r||!o?n(f):t(f)}}function gge(e,t){let n=0,r=0;return i;function i(a){return a===40?(n++,e.consume(a),i):a===41&&r<n?o(a):a===33||a===34||a===38||a===39||a===41||a===42||a===44||a===46||a===58||a===59||a===60||a===63||a===93||a===95||a===126?e.check(w3,t,o)(a):a===null||Wt(a)||Xl(a)?t(a):(e.consume(a),i)}function o(a){return a===41&&r++,e.consume(a),i}}function yge(e,t,n){return r;function r(u){return u===33||u===34||u===39||u===41||u===42||u===44||u===46||u===58||u===59||u===63||u===95||u===126?(e.consume(u),r):u===38?(e.consume(u),o):u===93?(e.consume(u),i):u===60||u===null||Wt(u)||Xl(u)?t(u):n(u)}function i(u){return u===null||u===40||u===91||Wt(u)||Xl(u)?t(u):r(u)}function o(u){return ar(u)?a(u):n(u)}function a(u){return u===59?(e.consume(u),r):ar(u)?(e.consume(u),a):n(u)}}function bge(e,t,n){return r;function r(o){return e.consume(o),i}function i(o){return Zn(o)?n(o):t(o)}}function E3(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||Wt(e)}function k3(e){return!ar(e)}function R3(e){return!(e===47||Zw(e))}function Zw(e){return e===43||e===45||e===46||e===95||Zn(e)}function kE(e){let t=e.length,n=!1;for(;t--;){const 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}const vge={tokenize:_ge,partial:!0};function xge(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:Ege,continuation:{tokenize:kge},exit:Rge}},text:{91:{name:"gfmFootnoteCall",tokenize:Cge},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:wge,resolveTo:Sge}}}}function wge(e,t,n){const r=this;let i=r.events.length;const o=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a;for(;i--;){const c=r.events[i][1];if(c.type==="labelImage"){a=c;break}if(c.type==="gfmFootnoteCall"||c.type==="labelLink"||c.type==="label"||c.type==="image"||c.type==="link")break}return u;function u(c){if(!a||!a._balanced)return n(c);const f=zi(r.sliceSerialize({start:a.end,end:r.now()}));return f.codePointAt(0)!==94||!o.includes(f.slice(1))?n(c):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(c),e.exit("gfmFootnoteCallLabelMarker"),t(c))}}function Sge(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";const 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++;const o={type:"gfmFootnoteCallString",start:Object.assign({},i.end),end:Object.assign({},e[e.length-1][1].start)},a={type:"chunkString",contentType:"string",start:Object.assign({},o.start),end:Object.assign({},o.end)},u=[e[n+1],e[n+2],["enter",r,t],e[n+3],e[n+4],["enter",i,t],["exit",i,t],["enter",o,t],["enter",a,t],["exit",a,t],["exit",o,t],e[e.length-2],e[e.length-1],["exit",r,t]];return e.splice(n,e.length-n+1,...u),e}function Cge(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let o=0,a;return u;function u(p){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(p),e.exit("gfmFootnoteCallLabelMarker"),c}function c(p){return p!==94?n(p):(e.enter("gfmFootnoteCallMarker"),e.consume(p),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",f)}function f(p){if(o>999||p===93&&!a||p===null||p===91||Wt(p))return n(p);if(p===93){e.exit("chunkString");const m=e.exit("gfmFootnoteCallString");return i.includes(zi(r.sliceSerialize(m)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(p),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(p)}return Wt(p)||(a=!0),o++,e.consume(p),p===92?h:f}function h(p){return p===91||p===92||p===93?(e.consume(p),o++,f):f(p)}}function Ege(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let o,a=0,u;return c;function c(b){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(b),e.exit("gfmFootnoteDefinitionLabelMarker"),f}function f(b){return b===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(b),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",h):n(b)}function h(b){if(a>999||b===93&&!u||b===null||b===91||Wt(b))return n(b);if(b===93){e.exit("chunkString");const v=e.exit("gfmFootnoteDefinitionLabelString");return o=zi(r.sliceSerialize(v)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(b),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),m}return Wt(b)||(u=!0),a++,e.consume(b),b===92?p:h}function p(b){return b===91||b===92||b===93?(e.consume(b),a++,h):h(b)}function m(b){return b===58?(e.enter("definitionMarker"),e.consume(b),e.exit("definitionMarker"),i.includes(o)||i.push(o),_t(e,y,"gfmFootnoteDefinitionWhitespace")):n(b)}function y(b){return t(b)}}function kge(e,t,n){return e.check(Jh,t,e.attempt(vge,t,n))}function Rge(e){e.exit("gfmFootnoteDefinition")}function _ge(e,t,n){const r=this;return _t(e,i,"gfmFootnoteDefinitionIndent",5);function i(o){const a=r.events[r.events.length-1];return a&&a[1].type==="gfmFootnoteDefinitionIndent"&&a[2].sliceSerialize(a[1],!0).length===4?t(o):n(o)}}function Tge(e){let n=(e||{}).singleTilde;const r={name:"strikethrough",tokenize:o,resolveAll:i};return n==null&&(n=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}};function i(a,u){let c=-1;for(;++c<a.length;)if(a[c][0]==="enter"&&a[c][1].type==="strikethroughSequenceTemporary"&&a[c][1]._close){let f=c;for(;f--;)if(a[f][0]==="exit"&&a[f][1].type==="strikethroughSequenceTemporary"&&a[f][1]._open&&a[c][1].end.offset-a[c][1].start.offset===a[f][1].end.offset-a[f][1].start.offset){a[c][1].type="strikethroughSequence",a[f][1].type="strikethroughSequence";const h={type:"strikethrough",start:Object.assign({},a[f][1].start),end:Object.assign({},a[c][1].end)},p={type:"strikethroughText",start:Object.assign({},a[f][1].end),end:Object.assign({},a[c][1].start)},m=[["enter",h,u],["enter",a[f][1],u],["exit",a[f][1],u],["enter",p,u]],y=u.parser.constructs.insideSpan.null;y&&Qr(m,m.length,0,hb(y,a.slice(f+1,c),u)),Qr(m,m.length,0,[["exit",p,u],["enter",a[c][1],u],["exit",a[c][1],u],["exit",h,u]]),Qr(a,f-1,c-f+3,m),c=f+m.length-2;break}}for(c=-1;++c<a.length;)a[c][1].type==="strikethroughSequenceTemporary"&&(a[c][1].type="data");return a}function o(a,u,c){const f=this.previous,h=this.events;let p=0;return m;function m(b){return f===126&&h[h.length-1][1].type!=="characterEscape"?c(b):(a.enter("strikethroughSequenceTemporary"),y(b))}function y(b){const v=nf(f);if(b===126)return p>1?c(b):(a.consume(b),p++,y);if(p<2&&!n)return c(b);const S=a.exit("strikethroughSequenceTemporary"),x=nf(b);return S._open=!x||x===2&&!!v,S._close=!v||v===2&&!!x,u(b)}}}class Age{constructor(){this.map=[]}add(t,n,r){Dge(this,t,n,r)}consume(t){if(this.map.sort(function(o,a){return o[0]-a[0]}),this.map.length===0)return;let n=this.map.length;const r=[];for(;n>0;)n-=1,r.push(t.slice(this.map[n][0]+this.map[n][1]),this.map[n][2]),t.length=this.map[n][0];r.push(t.slice()),t.length=0;let i=r.pop();for(;i;){for(const o of i)t.push(o);i=r.pop()}this.map.length=0}}function Dge(e,t,n,r){let i=0;if(!(n===0&&r.length===0)){for(;i<e.map.length;){if(e.map[i][0]===t){e.map[i][1]+=n,e.map[i][2].push(...r);return}i+=1}e.map.push([t,n,r])}}function Mge(e,t){let n=!1;const r=[];for(;t<e.length;){const 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"){const o=r.length-1;r[o]=r[o]==="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 Oge(){return{flow:{null:{name:"table",tokenize:$ge,resolveAll:Pge}}}}function $ge(e,t,n){const r=this;let i=0,o=0,a;return u;function u(j){let N=r.events.length-1;for(;N>-1;){const G=r.events[N][1].type;if(G==="lineEnding"||G==="linePrefix")N--;else break}const M=N>-1?r.events[N][1].type:null,z=M==="tableHead"||M==="tableRow"?D:c;return z===D&&r.parser.lazy[r.now().line]?n(j):z(j)}function c(j){return e.enter("tableHead"),e.enter("tableRow"),f(j)}function f(j){return j===124||(a=!0,o+=1),h(j)}function h(j){return j===null?n(j):Je(j)?o>1?(o=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(j),e.exit("lineEnding"),y):n(j):xt(j)?_t(e,h,"whitespace")(j):(o+=1,a&&(a=!1,i+=1),j===124?(e.enter("tableCellDivider"),e.consume(j),e.exit("tableCellDivider"),a=!0,h):(e.enter("data"),p(j)))}function p(j){return j===null||j===124||Wt(j)?(e.exit("data"),h(j)):(e.consume(j),j===92?m:p)}function m(j){return j===92||j===124?(e.consume(j),p):p(j)}function y(j){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(j):(e.enter("tableDelimiterRow"),a=!1,xt(j)?_t(e,b,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(j):b(j))}function b(j){return j===45||j===58?S(j):j===124?(a=!0,e.enter("tableCellDivider"),e.consume(j),e.exit("tableCellDivider"),v):A(j)}function v(j){return xt(j)?_t(e,S,"whitespace")(j):S(j)}function S(j){return j===58?(o+=1,a=!0,e.enter("tableDelimiterMarker"),e.consume(j),e.exit("tableDelimiterMarker"),x):j===45?(o+=1,x(j)):j===null||Je(j)?T(j):A(j)}function x(j){return j===45?(e.enter("tableDelimiterFiller"),_(j)):A(j)}function _(j){return j===45?(e.consume(j),_):j===58?(a=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(j),e.exit("tableDelimiterMarker"),k):(e.exit("tableDelimiterFiller"),k(j))}function k(j){return xt(j)?_t(e,T,"whitespace")(j):T(j)}function T(j){return j===124?b(j):j===null||Je(j)?!a||i!==o?A(j):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(j)):A(j)}function A(j){return n(j)}function D(j){return e.enter("tableRow"),O(j)}function O(j){return j===124?(e.enter("tableCellDivider"),e.consume(j),e.exit("tableCellDivider"),O):j===null||Je(j)?(e.exit("tableRow"),t(j)):xt(j)?_t(e,O,"whitespace")(j):(e.enter("data"),$(j))}function $(j){return j===null||j===124||Wt(j)?(e.exit("data"),O(j)):(e.consume(j),j===92?B:$)}function B(j){return j===92||j===124?(e.consume(j),$):$(j)}}function Pge(e,t){let n=-1,r=!0,i=0,o=[0,0,0,0],a=[0,0,0,0],u=!1,c=0,f,h,p;const m=new Age;for(;++n<e.length;){const y=e[n],b=y[1];y[0]==="enter"?b.type==="tableHead"?(u=!1,c!==0&&(dO(m,t,c,f,h),h=void 0,c=0),f={type:"table",start:Object.assign({},b.start),end:Object.assign({},b.end)},m.add(n,0,[["enter",f,t]])):b.type==="tableRow"||b.type==="tableDelimiterRow"?(r=!0,p=void 0,o=[0,0,0,0],a=[0,n+1,0,0],u&&(u=!1,h={type:"tableBody",start:Object.assign({},b.start),end:Object.assign({},b.end)},m.add(n,0,[["enter",h,t]])),i=b.type==="tableDelimiterRow"?2:h?3:1):i&&(b.type==="data"||b.type==="tableDelimiterMarker"||b.type==="tableDelimiterFiller")?(r=!1,a[2]===0&&(o[1]!==0&&(a[0]=a[1],p=tg(m,t,o,i,void 0,p),o=[0,0,0,0]),a[2]=n)):b.type==="tableCellDivider"&&(r?r=!1:(o[1]!==0&&(a[0]=a[1],p=tg(m,t,o,i,void 0,p)),o=a,a=[o[1],n,0,0])):b.type==="tableHead"?(u=!0,c=n):b.type==="tableRow"||b.type==="tableDelimiterRow"?(c=n,o[1]!==0?(a[0]=a[1],p=tg(m,t,o,i,n,p)):a[1]!==0&&(p=tg(m,t,a,i,n,p)),i=0):i&&(b.type==="data"||b.type==="tableDelimiterMarker"||b.type==="tableDelimiterFiller")&&(a[3]=n)}for(c!==0&&dO(m,t,c,f,h),m.consume(t.events),n=-1;++n<t.events.length;){const y=t.events[n];y[0]==="enter"&&y[1].type==="table"&&(y[1]._align=Mge(t.events,n))}return e}function tg(e,t,n,r,i,o){const a=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",u="tableContent";n[0]!==0&&(o.end=Object.assign({},sc(t.events,n[0])),e.add(n[0],0,[["exit",o,t]]));const c=sc(t.events,n[1]);if(o={type:a,start:Object.assign({},c),end:Object.assign({},c)},e.add(n[1],0,[["enter",o,t]]),n[2]!==0){const f=sc(t.events,n[2]),h=sc(t.events,n[3]),p={type:u,start:Object.assign({},f),end:Object.assign({},h)};if(e.add(n[2],0,[["enter",p,t]]),r!==2){const m=t.events[n[2]],y=t.events[n[3]];if(m[1].end=Object.assign({},y[1].end),m[1].type="chunkText",m[1].contentType="text",n[3]>n[2]+1){const b=n[2]+1,v=n[3]-n[2]-1;e.add(b,v,[])}}e.add(n[3]+1,0,[["exit",p,t]])}return i!==void 0&&(o.end=Object.assign({},sc(t.events,i)),e.add(i,0,[["exit",o,t]]),o=void 0),o}function dO(e,t,n,r,i){const o=[],a=sc(t.events,n);i&&(i.end=Object.assign({},a),o.push(["exit",i,t])),r.end=Object.assign({},a),o.push(["exit",r,t]),e.add(n+1,0,o)}function sc(e,t){const n=e[t],r=n[0]==="enter"?"start":"end";return n[1][r]}const Nge={name:"tasklistCheck",tokenize:jge};function Ige(){return{text:{91:Nge}}}function jge(e,t,n){const r=this;return i;function i(c){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(c):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(c),e.exit("taskListCheckMarker"),o)}function o(c){return Wt(c)?(e.enter("taskListCheckValueUnchecked"),e.consume(c),e.exit("taskListCheckValueUnchecked"),a):c===88||c===120?(e.enter("taskListCheckValueChecked"),e.consume(c),e.exit("taskListCheckValueChecked"),a):n(c)}function a(c){return c===93?(e.enter("taskListCheckMarker"),e.consume(c),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),u):n(c)}function u(c){return Je(c)?t(c):xt(c)?e.check({tokenize:Lge},t,n)(c):n(c)}}function Lge(e,t,n){return _t(e,r,"whitespace");function r(i){return i===null?n(i):t(i)}}function Fge(e){return I4([cge(),xge(),Tge(e),Oge(),Ige()])}const zge={};function Bge(e){const t=this,n=e||zge,r=t.data(),i=r.micromarkExtensions||(r.micromarkExtensions=[]),o=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),a=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);i.push(Fge(n)),o.push(sge()),a.push(age(n))}const Uge=new Set(Object.keys(qI)),hO={js:"javascript",ts:"typescript",py:"python",sh:"bash",shell:"bash",md:"markdown"};function Hge(e){const t=/language-([\w-]+)/.exec(e??"");if(!t)return;const n=t[1].toLowerCase();if(hO[n])return hO[n];if(Uge.has(n))return n}function _3(e){var t;return C.isValidElement(e)&&((t=e.props)==null?void 0:t.type)==="checkbox"}function Gge(e){return C.isValidElement(e)&&e.type===Jc}function Vge(e){return C.Children.toArray(e).some(t=>{if(!C.isValidElement(t))return!1;const n=C.Children.toArray(t.props.children);return _3(n[0])})}function Jw(e){if(e==null||typeof e=="boolean")return"";if(typeof e=="string")return e;if(typeof e=="number")return String(e);if(Array.isArray(e))return e.map(Jw).join("");if(C.isValidElement(e)){const t=e.props.children;return Jw(t)}return""}function pO(e){return C.Children.toArray(e).filter(t=>C.isValidElement(t)).map((t,n)=>{const r=C.Children.toArray(t.props.children),i=r[0];if(_3(i)){const a=!!i.props.checked,u=r.slice(1);return{value:`item-${n}`,label:E.jsxs(Xe,{ay:"center",gap:2,children:[E.jsx(jz,{checked:a,disabled:!0}),E.jsx(Ie,{size:1,children:u})]})}}const o=r.findIndex(Gge);if(o>=0){const a=r[o],u=[...r.slice(0,o),...r.slice(o+1)];return{id:`group-${n}`,category:Jw(u).trim(),items:a.props.items??[]}}return{value:`item-${n}`,label:E.jsx(Ie,{size:1,children:r})}})}const qge={p:({children:e})=>E.jsx(Ie,{my:1,size:1,render:E.jsx("p",{}),children:e}),h1:({children:e,id:t})=>E.jsx(Ie,{weight:"bold",size:4,my:2,render:E.jsx("h1",{id:t}),children:e}),h2:({children:e,id:t})=>E.jsx(Ie,{weight:"bold",size:3,mt:2,render:E.jsx("h2",{id:t}),children:e}),h3:({children:e,id:t})=>E.jsx(Ie,{weight:"bold",size:1,my:1,render:E.jsx("h3",{id:t}),children:e}),h4:({children:e,id:t})=>E.jsx(Ie,{weight:"bold",size:1,render:E.jsx("h4",{id:t}),children:e}),h5:({children:e,id:t})=>E.jsx(Ie,{weight:"bold",size:0,render:E.jsx("h5",{id:t}),children:e}),h6:({children:e,id:t})=>E.jsx(Ie,{weight:"bold",size:-1,render:E.jsx("h6",{id:t}),children:e}),strong:({children:e})=>E.jsx(Ie,{weight:"bold",children:e}),em:({children:e})=>E.jsx(Ie,{render:E.jsx("em",{}),children:e}),del:({children:e})=>E.jsx(Ie,{strikethrough:!0,render:E.jsx("del",{}),children:e}),a:({children:e,href:t})=>E.jsx("a",{href:t,target:"_blank",rel:"noopener noreferrer",children:e}),ul:({children:e})=>E.jsx(Jc,{type:Vge(e)?"none":"unordered",size:"large",items:pO(e),style:{display:"block"},my:2}),ol:({children:e})=>E.jsx(Jc,{type:"ordered",size:"large",items:pO(e),style:{display:"block"},my:2}),blockquote:({children:e})=>E.jsx("blockquote",{children:e}),hr:()=>E.jsx(H$,{}),table:({children:e})=>E.jsx(oE,{children:E.jsx(sE,{bordered:!0,children:e})}),thead:({children:e})=>E.jsx(w4,{children:e}),tbody:({children:e})=>E.jsx(lE,{children:e}),tr:({children:e})=>E.jsx(aE,{children:e}),th:({children:e})=>E.jsx(S4,{children:e}),td:({children:e})=>E.jsx(gh,{children:e}),pre:({children:e})=>E.jsx(E.Fragment,{children:e}),code:({className:e,children:t,...n})=>{const r=String(t??"");return r.includes(`
|
|
508
|
-
`)?E.jsx(gC,{code:r.replace(/\n$/,""),language:Hge(e),copyable:!0,style:{width:"100%",marginBlockEnd:"0.5rem"}}):E.jsx(lL,{...n,children:t})}},Yge=[Bge],Wge=[Ope];function Kge({children:e,components:t}){return E.jsx(Ye,{gap:4,fullwidth:!0,children:E.jsx(vpe,{remarkPlugins:Yge,rehypePlugins:Wge,components:{...qge,...t},children:e})})}const wa=C.memo(Kge),T3=()=>{var i;const e=ky(),{data:t=[]}=Kr(cce),n=t.find(o=>o.active),r=async o=>{if((n==null?void 0:n.slug)!==o){try{await fce(o)}catch(a){console.error("Project switch failed:",a);return}setTimeout(()=>{e.invalidateQueries(),window.location.reload()},600)}};return t.length===0?null:t.length===1?E.jsxs(Xe,{ay:"center",gap:2,px:2,children:[E.jsx(Ie,{size:-1,shade:"muted",children:"project"}),E.jsx(Ie,{size:-1,weight:"bold",children:(n==null?void 0:n.name)??((i=t[0])==null?void 0:i.name)??"default"})]}):E.jsxs(sb,{children:[E.jsx(ab,{render:E.jsx(Ei,{variant:"subtle",size:"small",fullwidth:!0,children:E.jsxs(Xe,{ay:"center",ax:"space-between",gap:2,fullwidth:!0,children:[E.jsxs(Xe,{ay:"center",gap:2,children:[E.jsx(Ie,{size:-1,shade:"muted",children:"project"}),E.jsx(Ie,{size:-1,weight:"bold",children:(n==null?void 0:n.name)??"—"})]}),E.jsx(Ah,{size:14})]})})}),E.jsx(dh,{children:E.jsx(hh,{side:"bottom",align:"start",children:E.jsx(ph,{children:t.map(o=>E.jsx(ef,{onClick:()=>{r(o.slug)},children:E.jsxs(Xe,{ay:"center",gap:2,children:[E.jsx(Ie,{size:-1,weight:o.active?"bold":"normal",children:o.name}),o.active&&E.jsx(Ie,{size:-1,shade:"muted",children:"(active)"})]})},o.slug))})})})]})};T3.displayName="ProjectSwitcher";const RE=({children:e,...t})=>E.jsx(Ye,{"data-slot":"sidebar",render:E.jsx("nav",{}),ax:"stretch",fullwidth:!0,gap:3,p:4,...t,children:e});RE.displayName="SidebarWrapper";const Xge=["active","waiting","paused","archived"],Qge={active:"Active",waiting:"Waiting",paused:"Paused",archived:"Archived"},Zge=["today","yesterday","thisWeek","earlier"],Jge={today:"Today",yesterday:"Yesterday",thisWeek:"This week",earlier:"Earlier"},eye=1440*60*1e3;function tye(e,t){const n=new Date(e),r=new Date(t.getFullYear(),t.getMonth(),t.getDate()),i=new Date(n.getFullYear(),n.getMonth(),n.getDate()),o=Math.floor((r.getTime()-i.getTime())/eye);return o<=0?"today":o===1?"yesterday":o<7?"thisWeek":"earlier"}function s1(e){const t=cE(e.session.status),n=e.session.status==="archived";return{value:e.session.id,label:E.jsx(D3,{session:e}),content:E.jsxs(Xe,{gap:2,ay:"center",mt:1,mb:2,children:[E.jsx(Ly,{color:t}),E.jsx(M3,{session:e})]}),action:E.jsx(O3,{session:e.session,categoryPath:e.categoryPath}),"data-archived":n?"":void 0,style:n?{opacity:.4}:void 0}}function nye(e,t){if(t==="status"){const r=new Map;for(const i of e){const o=i.session.status,a=r.get(o);a?a.push(i):r.set(o,[i])}return Xge.filter(i=>r.has(i)).map(i=>({category:Qge[i],collapsible:!0,items:r.get(i).map(s1)}))}if(t==="recent"){const r=new Date,i=new Map;for(const o of e){const a=tye(o.session.startedAt,r),u=i.get(a);u?u.push(o):i.set(a,[o])}return Zge.filter(o=>i.has(o)).map(o=>({category:Jge[o],collapsible:!0,items:i.get(o).map(s1)}))}const n=new Map;for(const r of e){const i=r.categoryPath,o=n.get(i);o?o.push(r):n.set(i,[r])}return Array.from(n,([r,i])=>({category:r,collapsible:!0,items:i.map(s1)}))}const mO=e=>e.id??e.category??"",A3=({WrapperProps:e})=>{const[t,n]=C.useState(""),[r,i]=C.useState("group"),[o,a]=C.useState(!1),[u,c]=C.useState({}),f=C.useRef(null),{data:h=[]}=Kr(Kl({includeArchived:o})),p=C.useMemo(()=>{const S=t.trim().toLowerCase(),x=S?h.filter(_=>_.session.slug.toLowerCase().includes(S)||_.session.name.toLowerCase().includes(S)||_.categoryPath.toLowerCase().includes(S)):h;return nye(x,r)},[h,t,r]),m=p.map(mO),y=m.length>0&&m.every(S=>u[S]!==!1),b=()=>{const S=!y;c(x=>{const _={...x};for(const k of m)_[k]=S;return _})},v=p.map(S=>{const x=mO(S);return{...S,open:u[x]??!0,onOpenChange:_=>c(k=>({...k,[x]:_}))}});return C.useEffect(()=>{const S=x=>{var _,k;(x.metaKey||x.ctrlKey)&&x.key==="k"&&(x.preventDefault(),(_=f.current)==null||_.focus(),(k=f.current)==null||k.select())};return window.addEventListener("keydown",S),()=>window.removeEventListener("keydown",S)},[]),E.jsxs(RE,{...e,children:[E.jsx(T3,{}),E.jsx(Xe,{ay:"center",gap:2,fullwidth:!0,children:E.jsx(jL,{ref:f,placeholder:"Search for a session",before:E.jsx(eV,{}),after:E.jsx(SI,{hotkey:["meta","k"]}),size:"small",fullwidth:!0,style:{flex:1,minWidth:0},value:t,onChange:S=>n(S.target.value)})}),E.jsxs(Xe,{ay:"center",ax:"space-between",gap:2,children:[E.jsxs(QC,{size:"sm",value:[r],onValueChange:S=>{const x=S[0];x&&i(x)},children:[E.jsx(Cc,{value:"group","aria-label":"Group by group",children:E.jsx(Il,{trigger:E.jsx(IG,{}),children:"Group by group"})}),E.jsx(Cc,{value:"status","aria-label":"Group by status",children:E.jsx(Il,{trigger:E.jsx(sV,{}),children:"Group by status"})}),E.jsx(Cc,{value:"recent","aria-label":"Group by recent",children:E.jsx(Il,{trigger:E.jsx(tP,{}),children:"Group by recent"})})]}),E.jsxs(Xe,{ay:"center",gap:1,children:[E.jsx(ih,{size:"small",shape:"square",variant:"subtle",tooltip:o?"Hide archived":"Show archived",pressed:o,onPressedChange:a,icon:{unpressed:E.jsx(SG,{}),pressed:E.jsx(EG,{})}}),p.length>0&&E.jsx(ih,{size:"small",shape:"square",variant:"subtle",tooltip:y?"Collapse all":"Expand all",pressed:!y,onPressedChange:()=>b(),icon:{unpressed:E.jsx(eP,{}),pressed:E.jsx(Ah,{})}})]})]}),p.length===0?E.jsxs(Ie,{size:-1,shade:"muted",style:{padding:"0.5rem"},children:['No sessions match "',t,'".']}):E.jsx(Jc,{items:v,line:!0,size:"small"})]})};A3.displayName="Sidebar";const D3=({session:e})=>E.jsx(Ql,{to:"/sessions/$slug",params:{slug:e.session.slug},children:e.session.slug});D3.displayName="SessionLabel";const M3=({session:e})=>{const{data:t=[]}=Kr(Kl()),n=t.some(p=>p.session.status==="active"||p.session.status==="waiting"),{data:r}=Kr(ace(n)),{data:i}=Kr(uce),o=r==null?void 0:r[e.session.id],a=i==null?void 0:i[e.session.id],u=(o==null?void 0:o.linesAdded)??0,c=(o==null?void 0:o.linesRemoved)??0,f=(o==null?void 0:o.filesTouched)??0,h=u>0||c>0;return E.jsxs(Xe,{ay:"center",gap:2,children:[E.jsx(Ie,{size:-1,shade:"muted",children:Gw(e.session.startedAt)}),h&&E.jsxs(Xe,{ay:"center",gap:1,children:[E.jsx(Ie,{size:-1,family:"mono",color:"green",children:`+${u}`}),E.jsx(Ie,{size:-1,family:"mono",color:"red",children:`-${c}`})]}),f>0&&E.jsxs(Xe,{ay:"center",gap:1,children:[E.jsx(iP,{size:12}),E.jsx(Ie,{size:-1,family:"mono",shade:"muted",children:f})]}),a&&E.jsx(KN,{TriggerProps:{openOnHover:!0},trigger:E.jsx(GG,{size:12,"aria-label":"Session recap"}),title:"Session recap",description:Gw(a.createdAt),PositionerProps:{sideOffset:8,side:"right"},PopupProps:{style:{maxWidth:420}},children:E.jsx(Ye,{my:2,children:E.jsx(wa,{children:a.recap})})})]})};M3.displayName="SessionContent";const O3=({session:e,categoryPath:t})=>{const n=_4(e),{Icon:r}=n,i=e.status==="paused",o=`bertrand resume ${t}/${e.slug}`;return E.jsxs(sb,{children:[E.jsx(ab,{render:E.jsx(Ei,{variant:"subtle",size:"small",shape:"square","aria-label":"Session actions",children:E.jsx(bG,{})})}),E.jsx(dh,{children:E.jsx(hh,{side:"bottom",align:"end",children:E.jsxs(ph,{children:[E.jsxs(ef,{disabled:n.disabled,onClick:n.onClick,children:[E.jsx(r,{size:14}),n.label]}),E.jsxs(ef,{disabled:!i,onClick:()=>{navigator.clipboard.writeText(o)},children:[E.jsx(Dh,{size:14}),"Copy resume command"]})]})})})]})};O3.displayName="SessionRowActions";const $3=({children:e,...t})=>E.jsx(Xe,{"data-slot":"top-bar-wrapper",fullwidth:!0,ay:"center",p:4,gap:4,bb:1,style:{position:"sticky",top:0,backgroundColor:"var(--shade-background)",zIndex:1,...t.style},...t,children:e});$3.displayName="TopBarWrapper";const Kd="uiid-theme";function rye(){return localStorage.getItem(Kd)??"system"}function iye(e){const t=n=>{n.key===Kd&&e()};return window.addEventListener("storage",t),()=>window.removeEventListener("storage",t)}function oye(e){e==="system"?document.documentElement.removeAttribute("data-theme"):document.documentElement.setAttribute("data-theme",e)}function sye(){const e=C.useSyncExternalStore(iye,rye),t=C.useCallback(n=>{n==="system"?localStorage.removeItem(Kd):localStorage.setItem(Kd,n),oye(n),window.dispatchEvent(new StorageEvent("storage",{key:Kd,newValue:n}))},[]);return{theme:e,setTheme:t}}const P3=()=>{const{theme:e,setTheme:t}=sye();return E.jsxs(QC,{value:[e],onValueChange:n=>{const r=n[0];r&&t(r)},size:"sm",children:[E.jsx(Cc,{value:"light","aria-label":"Light mode",children:E.jsx(iV,{})}),E.jsx(Cc,{value:"dark","aria-label":"Dark mode",children:E.jsx(XG,{})}),E.jsx(Cc,{value:"system","aria-label":"System theme",children:E.jsx(WG,{})})]})};P3.displayName="ThemeToggle";const _E=({sessionCount:e})=>E.jsxs($3,{children:[E.jsx(Ie,{size:2,weight:"bold",children:"bertrand"}),E.jsx(C.Activity,{mode:e?"visible":"hidden",children:E.jsxs(cn,{color:"blue",children:[e," session(s)"]})}),E.jsxs(Xe,{gap:3,ay:"center",ml:"auto",children:[E.jsxs(Xe,{gap:2,ay:"center",children:[E.jsx(a1,{to:"/",tooltip:"Session timeline",icon:E.jsx(aG,{})}),E.jsx(a1,{to:"/dev/markdown",tooltip:"Markdown viewer",icon:E.jsx(oG,{})}),E.jsx(a1,{to:"/dev/diff",tooltip:"Diff viewer",icon:E.jsx(rP,{})})]}),E.jsx(P3,{})]})]});_E.displayName="TopBar";const a1=({to:e,tooltip:t,icon:n})=>E.jsx(Ei,{render:E.jsx(Ql,{to:e}),nativeButton:!1,tooltip:t,variant:"subtle",size:"small",shape:"square",children:n}),Ef=L9({component:aye});function aye(){return eU({select:t=>t.location.pathname}).startsWith("/dev/")?E.jsxs(Ye,{fullwidth:!0,style:{position:"fixed",inset:0,height:"100dvh"},children:[E.jsx(_E,{}),E.jsx(Ye,{render:E.jsx("main",{}),fullwidth:!0,style:{flex:1,overflow:"auto"},children:E.jsx(pS,{})})]}):E.jsx(lye,{})}function lye(){const{data:e=[]}=Kr(Kl());return E.jsxs(Ye,{fullwidth:!0,style:{position:"fixed",height:"100dvh"},children:[E.jsx(_E,{sessionCount:e.length}),E.jsxs(m4,{direction:"horizontal",children:[E.jsx(Hw,{defaultSize:360,minSize:320,maxSize:540,children:E.jsx(A3,{})}),E.jsx(g4,{}),E.jsx(Hw,{children:E.jsx(Ye,{render:E.jsx("main",{}),fullwidth:!0,fullheight:!0,children:E.jsx(pS,{})})})]})]})}const uye=_h("/")({component:()=>E.jsx("div",{style:{opacity:.5,fontSize:13},children:"Select a session"})}),cye=new Set(["session.started","session.resumed","session.end"]),fye=e=>{const t=new Map;for(let r=0;r<e.length-1;r++){const i=e[r],o=e[r+1];i.event==="session.started"&&o.event==="claude.started"&&i.conversationId===o.conversationId&&t.set(r+1,{...i.meta??{},...o.meta??{}})}const n=[];for(let r=0;r<e.length;r++){const i=e[r];if(cye.has(i.event))continue;const o=t.get(r);n.push(o?{...i,meta:o}:i)}return n},dye=e=>{var r;const t=[],n=new Set;for(let i=0;i<e.length;i++){if(n.has(i))continue;const o=e[i];if(o.event==="session.waiting"){let a=i+1;const u=[];for(;a<e.length&&(e[a].event==="context.snapshot"||e[a].event==="assistant.recap");)e[a].event==="assistant.recap"&&u.push(e[a]),a++;if(a<e.length&&e[a].event==="session.answered"){for(const f of u)t.push(f);const c=(r=o.meta)==null?void 0:r.question;t.push({...e[a],meta:{...e[a].meta,question:c}});for(let f=i;f<=a;f++)n.add(f);continue}}t.push(o)}return t};function Sy(e){return e.edits&&e.edits.length>0?e.edits:e.oldStr||e.newStr?[{oldStr:e.oldStr??"",newStr:e.newStr??""}]:[]}function gO(e){const t=e.meta,n=e.event==="permission.resolve"?"approved":e.event==="tool.used"?"auto":"pending";return{tool:(t==null?void 0:t.tool)??"unknown",detail:(t==null?void 0:t.detail)??"",outcome:(t==null?void 0:t.outcome)??n}}const hye={Bash:"ran a command",Edit:"edited a file",Write:"wrote a file",Read:"read a file"};function pye(e){return hye[e.tool]??e.tool}const yO=new Set(["permission.request","permission.resolve","tool.used"]),mye=e=>{const t=[];let n=0;for(;n<e.length;){const r=e[n];if(!yO.has(r.event)){t.push(r),n++;continue}const i=[];for(;n<e.length;){const h=e[n];if(!yO.has(h.event))break;i.push(h),n++}const o=i.filter(h=>h.event==="permission.request"||h.event==="tool.used");if(o.length===0)continue;const a=o.map(gO),u=i.some(h=>h.event==="permission.resolve"),c=new Map;for(const h of a){const p=`${h.tool}::${h.detail}`,m=c.get(p);if(m){m.count++;const y=[...Sy(m),...Sy(h)];y.length>0&&(m.edits=y,m.oldStr=void 0,m.newStr=void 0)}else c.set(p,{...h,count:1})}const f=[...c.values()];if(f.length<=1){const h=f[0]??gO(i[0]),p=pye(h);t.push({...i[i.length-1],event:"tool.work",summary:p,meta:{...i[i.length-1].meta,permissions:f,outcome:u?"approved":"pending"}})}else{const h=new Map;for(const v of f)h.set(v.tool,(h.get(v.tool)??0)+v.count);const m=[...h.entries()].sort((v,S)=>S[1]-v[1]).map(([v,S])=>`${S}× ${v}`).join(", "),y=new Date(i[0].createdAt).getTime(),b=new Date(i[i.length-1].createdAt).getTime();t.push({...i[0],event:"tool.work",summary:m,meta:{permissions:f,outcome:u?"approved":"pending"},createdAt:new Date((y+b)/2).toISOString()})}}return t},gye={Edit:"edited a file",Write:"wrote a file",MultiEdit:"edited a file"},yye=e=>{const t=[];let n=0;for(;n<e.length;){const r=e[n];if(r.event!=="tool.applied"){t.push(r),n++;continue}const i=[];for(;n<e.length&&e[n].event==="tool.applied";)i.push(e[n]),n++;if(i.length===1){t.push(i[0]);continue}const o=[];for(const f of i){const h=f.meta,p=h==null?void 0:h.permissions;if(Array.isArray(p))for(const m of p)o.push(m)}const a=new Map;for(const f of o){const h=`${f.tool}::${f.detail}`,p=a.get(h),m=f.count??1;if(p){p.count+=m;const y=[...Sy(p),...Sy(f)];y.length>0&&(p.edits=y,p.oldStr=void 0,p.newStr=void 0)}else a.set(h,{...f,count:m})}const u=[...a.values()],c=i[i.length-1];t.push({...c,meta:{...c.meta,permissions:u}})}return t},bye=e=>e.map(t=>{var o;if(t.event!=="tool.applied"||t.summary)return t;const n=t.meta,r=(n==null?void 0:n.permissions)??[];if(r.length>1)return{...t,summary:`edited ${r.length} files`};const i=(o=r[0])==null?void 0:o.tool;return i?{...t,summary:gye[i]??`${i} applied`}:t}),vye=e=>{const t=new Set(["claude.started","claude.ended","claude.discarded"]);return e.map((n,r)=>{if(!t.has(n.event))return n;const i=n.meta;if(i!=null&&i.model)return n;const o=(i==null?void 0:i.claude_id)??n.conversationId;if(!o)return n;const u=n.event==="claude.started"?e.slice(r+1):e.slice(0,r).reverse();for(const c of u){if(c.event!=="context.snapshot")continue;const f=c.meta;if(((f==null?void 0:f.claude_id)??c.conversationId)!==o)continue;const p=f==null?void 0:f.model;if(p)return{...n,meta:{...i,model:p}}}return n})},xye=[fye,dye,mye,yye,bye,vye];function wye(e){return xye.reduce((t,n)=>n(t),e)}function Sye(e){return e<1500?"●○○":e<5e3?"●●○":"●●●"}const Cye=/<recap>[\s\S]*?<\/recap>/gi;function N3({event:e}){var a;const t=e.meta;if(e.event==="assistant.recap"){const u=(a=t==null?void 0:t.recap)==null?void 0:a.trim();return u?E.jsx(Ye,{"data-slot":"assistant-recap",py:4,children:E.jsx(zt,{children:E.jsx(wa,{children:u})})}):null}const r=((t==null?void 0:t.text)??"").replace(Cye,"").trim(),i=(t==null?void 0:t.thinkingBlocks)??0,o=(t==null?void 0:t.thinkingBytes)??0;return!r&&i===0?null:E.jsxs(Ye,{"data-slot":"assistant-content",gap:2,children:[i>0&&E.jsx(cn,{color:"indigo",children:`Thought ${Sye(o)}`}),r&&E.jsx(wa,{children:r})]})}N3.displayName="AssistantContent";function I3({event:e}){const t=e.meta;if(!t)return null;const n=no(t.remaining_pct),r=no(t.context_window_tokens),i=no(t.input_tokens),o=no(t.cache_read_tokens),a=no(t.cache_creation_tokens),u=fb(t.model);return r===0?null:E.jsxs(Ye,{"data-slot":"context-content",gap:3,fullwidth:!0,children:[E.jsx(QS,{value:n,size:"small",color:T4(n)}),E.jsxs(Xe,{gap:2,children:[u&&E.jsx(cn,{size:"small",children:u}),i>0&&E.jsx(cn,{size:"small",color:"orange",children:`${Jo(i)} input`}),o>0&&E.jsx(cn,{size:"small",color:"blue",children:`${Jo(o)} cache read`}),a>0&&E.jsx(cn,{size:"small",color:"indigo",children:`${Jo(a)} cache write`})]})]})}I3.displayName="ContextContent";function bO(e,t){return e==null?void 0:e.find(n=>n.question===t)}function Eye(e,t,n){const r=[...t].sort((a,u)=>u.label.length-a.label.length),i=[];let o=e;for(;o;){const a=r.find(u=>o===u.label||o.startsWith(u.label+", "));if(!a)break;if(i.push(a.label),o===a.label){o="";break}if(o=o.slice(a.label.length+2),!n)break}return{selectedLabels:i,note:o||void 0}}function j3({event:e}){const t=e.meta;if(e.event==="session.answered"){const n=t==null?void 0:t.answers;if(!n||Object.keys(n).length===0)return null;const r=t==null?void 0:t.questions,i=Object.entries(n),o=(u,c)=>{const f=bO(r,u),h=(f==null?void 0:f.multiSelect)??!1,p=(f==null?void 0:f.options)??[],{selectedLabels:m,note:y}=Eye(c,p,h),b=m.length>0,v=b?void 0:y??c,S=b?y:void 0;return E.jsxs(Ye,{gap:4,fullwidth:!0,children:[v&&E.jsxs(Ye,{"data-slot":"interaction-content-note",gap:4,m:2,fullwidth:!0,children:[E.jsx(Ie,{color:"yellow",weight:"bold",size:1,children:"Answered manually:"}),E.jsx(wa,{children:v})]}),!b&&!v&&E.jsx(Ie,{color:"red",weight:"bold",size:1,m:2,children:"Didn't answer."}),p.length>0&&E.jsx(Jc,{type:"ordered",items:p.map(x=>({value:x.label,label:E.jsx(Ie,{weight:"bold",color:m.includes(x.label)?"green":void 0,children:x.label}),description:x.description,disabled:!m.includes(x.label)}))}),S&&E.jsxs(Ye,{"data-slot":"interaction-content-note",gap:4,m:2,fullwidth:!0,children:[E.jsx(Ie,{color:"green",weight:"bold",size:1,children:"Additional notes:"}),E.jsx(wa,{children:S})]})]})};if(i.length===1){const[u,c]=i[0];return E.jsx(Ye,{"data-slot":"interaction-content",gap:2,py:4,fullwidth:!0,children:E.jsx(zt,{gap:4,fullwidth:!0,children:o(u,c)})})}const a=i.map(([u,c],f)=>{const h=bO(r,u);return{label:(h==null?void 0:h.header)??`Question ${f+1}`,value:u,render:o(u,c)}});return E.jsx(Ye,{"data-slot":"interaction-content",gap:2,py:4,fullwidth:!0,children:E.jsx(zt,{gap:4,fullwidth:!0,children:E.jsx(XC,{items:a,size:"sm",ContainerProps:{fullwidth:!0,mt:6}})})})}if(e.event==="user.prompt"){const n=t==null?void 0:t.prompt;return n?E.jsx(L3,{children:E.jsx(wa,{children:n})}):null}return null}j3.displayName="InteractionContent";const L3=({children:e})=>E.jsx(Ye,{"data-slot":"interaction-content",py:4,fullwidth:!0,children:E.jsx(zt,{gap:4,fullwidth:!0,children:e})});L3.displayName="CardContainer";function kye(e){if(e)return e.slice(0,8)}function F3({event:e}){if(e.event==="claude.started")return null;const t=e.meta;if(e.event==="session.recap"){const u=t==null?void 0:t.recap;return u?E.jsx(Ye,{py:4,children:E.jsx(zt,{children:E.jsx(wa,{children:u})})}):null}const n=(t==null?void 0:t.claude_id)??e.conversationId??void 0,r=fb(t==null?void 0:t.model),i=kye(n??void 0),o=e.event==="claude.ended"?t==null?void 0:t.exit_code:void 0,a=typeof o=="number"&&o!==0;return!r&&!i&&!a?null:E.jsxs(Xe,{gap:2,ay:"center",children:[r&&E.jsx(cn,{color:"orange",size:"small",children:r}),i&&E.jsx(cn,{color:"neutral",size:"small",children:i}),a&&E.jsx(cn,{color:"red",size:"small",children:`exit ${o}`})]})}F3.displayName="LifecycleContent";function z3({event:e}){const t=e.meta;if(!t)return null;switch(e.event){case"gh.pr.created":{const n=t.pr_title,r=t.pr_url;return E.jsxs(E.Fragment,{children:[n&&E.jsx(Ie,{size:1,children:n}),r&&E.jsx(Ie,{size:-1,family:"mono",color:"neutral",children:r})]})}case"gh.pr.merged":{const n=t.branch;return n?E.jsx(Ie,{size:1,family:"mono",children:n}):null}case"vercel.deploy":{const n=t.project_name;return n?E.jsx(Ie,{size:1,children:n}):null}default:return null}}z3.displayName="MilestoneContent";function Rye({text:e}){const[t,n]=C.useState(!1);return E.jsx(Ei,{size:"small",variant:"ghost",shape:"square",tooltip:t?"Copied!":"Copy path",disabled:t,onClick:()=>{navigator.clipboard.writeText(e),n(!0),setTimeout(()=>n(!1),2e3)},children:t?E.jsx(Th,{color:"green"}):E.jsx(Dh,{})})}function _ye(e){if(e)return e.slice(0,8)}function Tye(e){if(e)return e.slice(0,7)}function B3({event:e}){const t=e.meta;if(!t)return null;const n=t.labels??[],r=t.summary,i=t.claude_id??e.conversationId??void 0,o=fb(t.model),a=t.claude_version,u=_ye(i),c=t.git??void 0,f=c==null?void 0:c.branch,h=Tye(c==null?void 0:c.sha),p=!!(c!=null&&c.dirty),m=t.cwd,y=[];if(n.length>0&&y.push({field:"Labels",value:n.join(", ")}),r&&y.push({field:"Summary",value:r}),o&&y.push({field:"Model",value:E.jsx(cn,{color:"orange",size:"small",children:o})}),a&&y.push({field:"Version",value:E.jsx(cn,{color:"neutral",size:"small",children:a})}),u&&y.push({field:"Claude ID",value:E.jsx(cn,{color:"neutral",size:"small",children:u})}),f&&y.push({field:"Branch",value:E.jsxs(Xe,{gap:2,ay:"center",children:[E.jsx(cn,{color:"neutral",size:"small",children:f}),h&&E.jsx(cn,{color:"neutral",size:"small",children:h}),p&&E.jsx(cn,{color:"red",size:"small",children:"dirty"})]})}),m&&y.push({field:"CWD",value:E.jsx(Ie,{family:"mono",size:-1,color:"neutral",children:m})}),y.length===0)return null;const b=x=>x.field==="CWD",v=(x,_)=>b(_)?x:E.jsx(E.Fragment,{}),S={primary:[{icon:xG,tooltip:"Open in Cursor",onClick:x=>{!b(x)||!m||window.open(`cursor://file/${encodeURI(m)}`,"_blank")},wrapper:v},{icon:TG,tooltip:"Open in Finder",onClick:x=>{!b(x)||!m||fetch(cb("/api/open"),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({path:m})})},wrapper:v},{icon:Dh,tooltip:"Copy path",wrapper:(x,_)=>b(_)&&m?E.jsx(Rye,{text:m}):E.jsx(E.Fragment,{})}]};return E.jsx(Ye,{py:4,fullwidth:!0,children:E.jsx(zt,{trimmed:!0,fullwidth:!0,children:E.jsx(oE,{children:E.jsx(sE,{children:E.jsx(lE,{children:y.map(x=>E.jsxs(aE,{children:[E.jsx(gh,{children:E.jsx(Ie,{weight:"bold",children:x.field})}),E.jsx(gh,{children:x.value}),E.jsx(E4,{actions:S,item:x})]},x.field))})})})})})}B3.displayName="StartedContent";class U3{diff(t,n,r={}){let i;typeof r=="function"?(i=r,r={}):"callback"in r&&(i=r.callback);const o=this.castInput(t,r),a=this.castInput(n,r),u=this.removeEmpty(this.tokenize(o,r)),c=this.removeEmpty(this.tokenize(a,r));return this.diffWithOptionsObj(u,c,r,i)}diffWithOptionsObj(t,n,r,i){var o;const a=_=>{if(_=this.postProcess(_,r),i){setTimeout(function(){i(_)},0);return}else return _},u=n.length,c=t.length;let f=1,h=u+c;r.maxEditLength!=null&&(h=Math.min(h,r.maxEditLength));const p=(o=r.timeout)!==null&&o!==void 0?o:1/0,m=Date.now()+p,y=[{oldPos:-1,lastComponent:void 0}];let b=this.extractCommon(y[0],n,t,0,r);if(y[0].oldPos+1>=c&&b+1>=u)return a(this.buildValues(y[0].lastComponent,n,t));let v=-1/0,S=1/0;const x=()=>{for(let _=Math.max(v,-f);_<=Math.min(S,f);_+=2){let k;const T=y[_-1],A=y[_+1];T&&(y[_-1]=void 0);let D=!1;if(A){const $=A.oldPos-_;D=A&&0<=$&&$<u}const O=T&&T.oldPos+1<c;if(!D&&!O){y[_]=void 0;continue}if(!O||D&&T.oldPos<A.oldPos?k=this.addToPath(A,!0,!1,0,r):k=this.addToPath(T,!1,!0,1,r),b=this.extractCommon(k,n,t,_,r),k.oldPos+1>=c&&b+1>=u)return a(this.buildValues(k.lastComponent,n,t))||!0;y[_]=k,k.oldPos+1>=c&&(S=Math.min(S,_-1)),b+1>=u&&(v=Math.max(v,_+1))}f++};if(i)(function _(){setTimeout(function(){if(f>h||Date.now()>m)return i(void 0);x()||_()},0)})();else for(;f<=h&&Date.now()<=m;){const _=x();if(_)return _}}addToPath(t,n,r,i,o){const a=t.lastComponent;return a&&!o.oneChangePerToken&&a.added===n&&a.removed===r?{oldPos:t.oldPos+i,lastComponent:{count:a.count+1,added:n,removed:r,previousComponent:a.previousComponent}}:{oldPos:t.oldPos+i,lastComponent:{count:1,added:n,removed:r,previousComponent:a}}}extractCommon(t,n,r,i,o){const a=n.length,u=r.length;let c=t.oldPos,f=c-i,h=0;for(;f+1<a&&c+1<u&&this.equals(r[c+1],n[f+1],o);)f++,c++,h++,o.oneChangePerToken&&(t.lastComponent={count:1,previousComponent:t.lastComponent,added:!1,removed:!1});return h&&!o.oneChangePerToken&&(t.lastComponent={count:h,previousComponent:t.lastComponent,added:!1,removed:!1}),t.oldPos=c,f}equals(t,n,r){return r.comparator?r.comparator(t,n):t===n||!!r.ignoreCase&&t.toLowerCase()===n.toLowerCase()}removeEmpty(t){const n=[];for(let r=0;r<t.length;r++)t[r]&&n.push(t[r]);return n}castInput(t,n){return t}tokenize(t,n){return Array.from(t)}join(t){return t.join("")}postProcess(t,n){return t}get useLongestToken(){return!1}buildValues(t,n,r){const i=[];let o;for(;t;)i.push(t),o=t.previousComponent,delete t.previousComponent,t=o;i.reverse();const a=i.length;let u=0,c=0,f=0;for(;u<a;u++){const h=i[u];if(h.removed)h.value=this.join(r.slice(f,f+h.count)),f+=h.count;else{if(!h.added&&this.useLongestToken){let p=n.slice(c,c+h.count);p=p.map(function(m,y){const b=r[f+y];return b.length>m.length?b:m}),h.value=this.join(p)}else h.value=this.join(n.slice(c,c+h.count));c+=h.count,h.added||(f+=h.count)}}return i}}const vO="a-zA-Z0-9_\\u{AD}\\u{C0}-\\u{D6}\\u{D8}-\\u{F6}\\u{F8}-\\u{2C6}\\u{2C8}-\\u{2D7}\\u{2DE}-\\u{2FF}\\u{1E00}-\\u{1EFF}";class Aye extends U3{tokenize(t){const n=new RegExp(`(\\r?\\n)|[${vO}]+|[^\\S\\n\\r]+|[^${vO}]`,"ug");return t.match(n)||[]}}const Dye=new Aye;function Mye(e,t,n){return Dye.diff(e,t,n)}class Oye extends U3{constructor(){super(...arguments),this.tokenize=Nye}equals(t,n,r){return r.ignoreWhitespace?((!r.newlineIsToken||!t.includes(`
|
|
509
|
-
`))&&(t=t.trim()),(!r.newlineIsToken||!n.includes(`
|
|
510
|
-
`))&&(n=n.trim())):r.ignoreNewlineAtEof&&!r.newlineIsToken&&(t.endsWith(`
|
|
511
|
-
`)&&(t=t.slice(0,-1)),n.endsWith(`
|
|
512
|
-
`)&&(n=n.slice(0,-1))),super.equals(t,n,r)}}const $ye=new Oye;function Pye(e,t,n){return $ye.diff(e,t,n)}function Nye(e,t){t.stripTrailingCr&&(e=e.replace(/\r\n/g,`
|
|
513
|
-
`));const n=[],r=e.split(/(\n|\r\n)/);r[r.length-1]||r.pop();for(let i=0;i<r.length;i++){const o=r[i];i%2&&!t.newlineIsToken?n[n.length-1]+=o:n.push(o)}return n}function Iye(e,t){const n=[...e.split(`
|
|
514
|
-
`),...t.split(`
|
|
515
|
-
`)];let r=1/0;for(const o of n){if(o.trim()==="")continue;const a=o.match(/^[ \t]*/),u=a?a[0].length:0;u<r&&(r=u)}if(r===1/0||r===0)return[e,t];const i=o=>o.split(`
|
|
516
|
-
`).map(a=>a.length>=r?a.slice(r):a).join(`
|
|
517
|
-
`);return[i(e),i(t)]}function jye(e,t,n){const[r,i]=Iye(e,t),o=Pye(r,i),a=[],u=[],c=[];function f(v,S){const x=a.length,k=(v.endsWith(`
|
|
518
|
-
`)?v.slice(0,-1):v).split(`
|
|
519
|
-
`);for(const T of k)a.push(T),u.push(S);return{startIdx:x,lns:k}}let h=0;for(;h<o.length;){const v=o[h];if(v.removed&&h+1<o.length&&o[h+1].added){const S=f(v.value,"remove"),x=f(o[h+1].value,"add"),_=n?Math.min(S.lns.length,x.lns.length):0;for(let k=0;k<_;k++){const T=Mye(S.lns[k],x.lns[k]);let A=0,D=0;for(const O of T){const $=O.value.length;O.added?($>0&&c.push({start:{line:x.startIdx+k,character:D},end:{line:x.startIdx+k,character:D+$},properties:{class:"diff-word add"}}),D+=$):O.removed?($>0&&c.push({start:{line:S.startIdx+k,character:A},end:{line:S.startIdx+k,character:A+$},properties:{class:"diff-word remove"}}),A+=$):(A+=$,D+=$)}}h+=2}else v.removed?(f(v.value,"remove"),h+=1):v.added?(f(v.value,"add"),h+=1):(f(v.value,"context"),h+=1)}const p=[];let m=1,y=1;for(const v of u)v==="remove"?p.push({old:m++,new:null}):v==="add"?p.push({old:null,new:y++}):p.push({old:m++,new:y++});const b=Math.max(m-1,y-1,1);return{code:a.join(`
|
|
520
|
-
`),lineKinds:u,lineNums:p,decorations:c,maxLineNum:b}}function xO(e,t){e.properties||(e.properties={});const n=e.properties.class;typeof n=="string"?e.properties.class=n?`${n} ${t}`:t:Array.isArray(n)?e.properties.class=[...n,t]:e.properties.class=t}function l1(e,t){return{type:"element",tagName:"span",properties:{class:e},children:[{type:"text",value:t}]}}function Cy({oldStr:e,newStr:t,language:n="tsx",filename:r,wordDiff:i=!1}){const[o,a]=C.useState(""),[u,c]=C.useState(1);return C.useEffect(()=>{let f=!1;return(async()=>{const{code:h,lineKinds:p,lineNums:m,decorations:y,maxLineNum:b}=jye(e,t,i);await rL(n);const S=(await mC()).codeToHtml(h,{lang:n,themes:{light:"vitesse-light",dark:"vitesse-black"},defaultColor:!1,decorations:y,transformers:[{name:"diff-block:line-marks",pre(x){xO(x,"has-diff")},line(x,_){const k=_-1,T=p[k],A=m[k];(T==="add"||T==="remove")&&xO(x,`diff ${T}`);const D=T==="add"?"diff-marker add":T==="remove"?"diff-marker remove":"diff-marker",O=T==="add"?"+":T==="remove"?"-":" ",$="diff-num diff-num-old"+(A.old==null?" diff-num-blank":""),B="diff-num diff-num-new"+(A.new==null?" diff-num-blank":""),j=[l1($,A.old!=null?String(A.old):" "),l1(B,A.new!=null?String(A.new):" "),l1(D,O)];return x.children.unshift(...j),x}}]});f||(a(S),c(String(b).length))})(),()=>{f=!0}},[e,t,n,i]),E.jsx("div",{className:"bertrand-diff-block",style:{"--diff-num-width":`${u+2}ch`,width:"100%"},children:E.jsx(gC,{code:t,language:n,filename:r,showLineNumbers:!1,copyable:!1,html:o,style:{width:"100%"}})})}Cy.displayName="DiffBlock";function eS(e){return!!(e.oldStr||e.newStr||e.edits&&e.edits.length>0)}function H3({permission:e}){return e.edits&&e.edits.length>0?E.jsx(Ye,{gap:2,fullwidth:!0,children:e.edits.map((t,n)=>E.jsx(Cy,{oldStr:t.oldStr??"",newStr:t.newStr??""},n))}):E.jsx(Cy,{oldStr:e.oldStr??"",newStr:e.newStr??""})}function Ey(e){const t=e.count>1?`${e.count}× `:"";return e.detail?`${t}${e.detail}`:`${t}${e.tool}`}function G3({event:e}){const t=e.meta;if(!(t!=null&&t.permissions))return null;const n=t.permissions;if(n.length===0)return null;if(n.length===1){const r=n[0];return r.detail?eS(r)?E.jsx(KC,{ContentProps:{fullwidth:!0,p:0},items:[{value:"diff",trigger:Ey(r),content:E.jsx(H3,{permission:r})}]}):E.jsx(Ie,{size:-1,family:"mono",shade:"muted",children:Ey(r)}):null}return E.jsx(Lye,{permissions:n})}function Lye({permissions:e}){const t=e.filter(eS),n=e.filter(u=>!eS(u)),r=t.map((u,c)=>`permission-${c}`),[i,o]=C.useState([]),a=r.length>0&&i.length===r.length;return E.jsxs(Ye,{"data-slot":"work-content",gap:2,fullwidth:!0,children:[t.length>0&&E.jsxs(Ye,{gap:1,fullwidth:!0,children:[E.jsx(Xe,{ax:"end",fullwidth:!0,children:E.jsx(ih,{size:"small",variant:"subtle",tooltip:a?"Collapse all":"Expand all",pressed:!a,onPressedChange:()=>o(a?[]:r),icon:{unpressed:E.jsx(eP,{}),pressed:E.jsx(Ah,{})},text:{unpressed:"Collapse all",pressed:"Expand all"}})}),E.jsx(KC,{multiple:!0,value:i,onValueChange:u=>o(u),ContentProps:{fullwidth:!0,p:0},items:t.map((u,c)=>({value:`permission-${c}`,trigger:Ey(u),content:E.jsx(H3,{permission:u})}))})]}),n.length>0&&E.jsx(Ye,{gap:1,fullwidth:!0,children:n.map((u,c)=>E.jsx(Ie,{size:-1,family:"mono",shade:"muted",children:Ey(u)},`info-${c}`))})]})}G3.displayName="WorkContent";function V3({event:e}){if(e.event==="claude.started")return E.jsx(B3,{event:e});switch(mce(e.event)){case"interaction":return E.jsx(j3,{event:e});case"work":return E.jsx(G3,{event:e});case"milestone":return E.jsx(z3,{event:e});case"assistant":return E.jsx(N3,{event:e});case"context":return E.jsx(I3,{event:e});case"lifecycle":return E.jsx(F3,{event:e});default:return null}}V3.displayName="EventContent";const q3=e=>{var f;const t=Ra({from:"/sessions/$slug",shouldThrow:!1}),n=(f=t==null?void 0:t.params)==null?void 0:f.slug,{data:r=[]}=Kr(Kl()),i=r.find(h=>h.session.slug===n),o=(i==null?void 0:i.session.id)??"",a=(i==null?void 0:i.session.status)==="active"||(i==null?void 0:i.session.status)==="waiting",{data:u}=Kr({...sce(o,a),enabled:!!o}),{data:c}=Kr({...lce(o,a),enabled:!!o});return E.jsx(RE,{"data-slot":"secondary-sidebar",...e,p:0,minw:540,children:u&&E.jsx(Y3,{stats:u,engagement:c})})};q3.displayName="SecondarySidebar";function Fye(e){return Object.entries(e).sort(([,t],[,n])=>n-t).slice(0,3).map(([t,n])=>`${t} ${n}`).join(" · ")}const Y3=({stats:e,engagement:t})=>{const n=e.linesAdded>0||e.linesRemoved>0,r=e.filesTouched>0,i=n||r||e.prCount>0,o=t?Object.values(t.toolUsage).reduce((p,m)=>p+m,0):0,a=((t==null?void 0:t.contextTokens.max)??0)>0,u=(t==null?void 0:t.permissionDenials)??0,c=(t==null?void 0:t.discardRate.total)??0,f=!!t&&(o>0||a||u>0||c>0),h=[{label:"Activity",value:"activity",render:E.jsxs(kg,{children:[E.jsx(zt,{title:"Conversations",description:"Distinct conversation threads",icon:UG,action:E.jsx(Br,{value:e.conversationCount})}),E.jsx(zt,{title:"Interactions",description:"User-Claude exchanges",icon:LG,action:E.jsx(Br,{value:e.interactionCount})}),E.jsx(zt,{title:"Events",description:"Total events emitted",icon:rG,action:E.jsx(Br,{value:e.eventCount})}),E.jsx(zt,{title:"Duration",description:"Total session time",icon:tP,action:E.jsx(Br,{label:Hx(e.durationS)})}),E.jsx(zt,{title:"Claude work",description:"Time Claude spent active",icon:mG,action:E.jsx(Br,{label:Hx(e.claudeWorkS)})}),E.jsx(zt,{title:"User wait",description:"Time user spent waiting",icon:zG,action:E.jsx(Br,{label:Hx(e.userWaitS)})})]})}];return i&&h.push({label:"Code",value:"code",render:E.jsxs(kg,{children:[n&&E.jsx(zt,{title:"Lines changed",description:"Across all edits",icon:rP,action:E.jsx(W3,{added:e.linesAdded,removed:e.linesRemoved})}),r&&E.jsx(zt,{title:"Files touched",description:"Distinct files edited",icon:iP,action:E.jsx(Br,{value:e.filesTouched})}),e.prCount>0&&E.jsx(zt,{title:"PRs",description:"Pull requests created",icon:OG,action:E.jsx(Br,{value:e.prCount})})]})}),f&&h.push({label:"Engagement",value:"engagement",render:E.jsxs(kg,{children:[o>0&&E.jsx(zt,{title:"Tracked tool calls",description:Fye(t.toolUsage),icon:dV,action:E.jsx(Br,{value:o})}),a&&E.jsx(zt,{title:"Context tokens",description:`avg ${Jo(t.contextTokens.avg)} · max ${Jo(t.contextTokens.max)}`,icon:DG,action:E.jsx(Br,{label:Jo(t.contextTokens.latest)})}),u>0&&E.jsx(zt,{title:"Permission denials",description:"Tool requests denied",icon:nV,action:E.jsx(Br,{value:u})}),c>0&&E.jsx(zt,{title:"Discarded conversations",description:`${t.discardRate.discarded} of ${c}`,icon:lV,action:E.jsx(Br,{value:t.discardRate.discarded})})]})}),E.jsx(XC,{items:h,fullwidth:!0,ContainerProps:{fullwidth:!0}})};Y3.displayName="SessionStats";const kg=({children:e})=>E.jsx(Ye,{"data-slot":"section-stack",ax:"stretch",pt:4,fullwidth:!0,gap:2,children:e});kg.displayName="SectionStack";const Br=e=>E.jsx(Ie,{"data-slot":"stat",size:3,family:"mono",weight:"bold",children:"label"in e?e.label:e.value});Br.displayName="Stat";const W3=({added:e,removed:t})=>E.jsxs(Ie,{"data-slot":"diff-stat",size:3,family:"mono",weight:"bold",children:[E.jsx(Ie,{color:"green",family:"mono",weight:"bold",children:`+${e}`})," / ",E.jsx(Ie,{color:"red",family:"mono",weight:"bold",children:`-${t}`})]});W3.displayName="DiffStat";const TE=({session:e,categoryPath:t,size:n="small",variant:r="subtle",shape:i="square",...o})=>{const[a,u]=C.useState(!1);if(e.status!=="paused")return null;const c=`bertrand resume ${t}/${e.slug}`;return E.jsx(ih,{tooltip:a?"Copied!":"Copy resume command",size:n,variant:r,shape:i,pressed:a,onPressedChange:f=>{f&&(navigator.clipboard.writeText(c),u(!0),setTimeout(()=>u(!1),2e3))},icon:{unpressed:E.jsx(Dh,{}),pressed:E.jsx(Th,{color:"green"})},onClick:f=>{f.preventDefault(),f.stopPropagation()},...o})};TE.displayName="CopyResumeButton";const K3=_h("/sessions/$slug")({component:Uye}),zye=({href:e,children:t})=>E.jsx(Ql,{to:e,children:t});function Bye(e,t){const n=e.split("/").filter(Boolean),r=n.map((i,o)=>({label:i,value:`/groups/${n.slice(0,o+1).join("/")}`}));return r.push({label:t,value:""}),r}function Uye(){const{slug:e}=K3.useParams(),{data:t=[]}=Kr(Kl()),{data:n=[]}=Kr(Kl({includeArchived:!0})),r=t.find(p=>p.session.slug===e)??n.find(p=>p.session.slug===e),i=(r==null?void 0:r.session.id)??"",o=(r==null?void 0:r.session.status)==="active"||(r==null?void 0:r.session.status)==="waiting",{data:a=[]}=Kr(oce(i,o)),u=C.useMemo(()=>wye(a),[a]),c=C.useMemo(()=>{for(let p=a.length-1;p>=0;p--)if(a[p].event==="context.snapshot")return a[p];return null},[a]),f=C.useMemo(()=>{var p;if((r==null?void 0:r.session.status)!=="waiting")return null;for(let m=a.length-1;m>=0;m--)if(a[m].event==="session.waiting"){const y=(p=a[m].meta)==null?void 0:p.question;return typeof y=="string"?y:null}return null},[a,r==null?void 0:r.session.status]),h=r?Bye(r.categoryPath,r.session.name):[{label:e,value:""}];return E.jsxs(Ye,{ax:"stretch",fullwidth:!0,style:{overflow:"hidden"},children:[E.jsxs(Xe,{bb:1,px:4,py:2,ay:"center",ax:"space-between",fullwidth:!0,children:[E.jsx(iE,{items:h,linkAs:zye}),E.jsxs(Xe,{ay:"center",gap:2,children:[r&&E.jsx(TE,{session:r.session,categoryPath:r.categoryPath}),r&&E.jsx(X3,{session:r.session}),E.jsx(tI,{side:"right",title:"Session stats",trigger:E.jsx(Ei,{tooltip:"Session stats",variant:"subtle",size:"small",shape:"square",children:E.jsx(ZG,{})}),children:E.jsx(q3,{})})]})]}),E.jsx(Ye,{p:8,ax:"stretch",fullwidth:!0,style:{overflowY:"auto"},children:u.length>0&&E.jsx(GI,{activeIndex:u.length,items:u.map(p=>({title:wce(p),time:Sce(p.createdAt),color:vce(p.event),content:E.jsx(V3,{event:p})})),ItemProps:{style:{width:"100%"}},ContentProps:{fullwidth:!0,maxw:860}})}),r&&E.jsx(Q3,{session:r.session,context:c,pendingQuestion:f})]})}function X3({session:e}){const t=_4(e),{Icon:n}=t;return E.jsx(Ei,{tooltip:t.tooltip,variant:"subtle",size:"small",shape:"square",disabled:t.disabled,loading:t.loading,onClick:t.onClick,"aria-label":t.label,children:E.jsx(n,{})})}X3.displayName="ArchiveToggle";function Q3({session:e,context:t,pendingQuestion:n}){const r=cE(e.status),i=e.status==="active"||e.status==="waiting";return E.jsxs(Ye,{bt:1,p:4,gap:3,fullwidth:!0,children:[E.jsxs(Xe,{ay:"center",gap:2,fullwidth:!0,children:[E.jsx(Ly,{color:r,pulse:i}),E.jsx(cn,{color:r,children:e.status}),n&&E.jsx(Ie,{size:1,shade:"muted",children:n})]}),t&&E.jsx(Z3,{event:t})]})}Q3.displayName="SessionFooter";function Z3({event:e}){const t=e.meta;if(!t)return null;const n=no(t.remaining_pct),r=no(t.context_window_tokens),i=no(t.input_tokens),o=no(t.cache_read_tokens),a=no(t.cache_creation_tokens),u=fb(t.model);return r===0?null:E.jsxs(E.Fragment,{children:[E.jsx(QS,{value:n,size:"small",color:T4(n)}),E.jsxs(Xe,{gap:2,children:[u&&E.jsx(cn,{size:"small",children:u}),i>0&&E.jsx(cn,{size:"small",color:"orange",children:`${Jo(i)} input`}),o>0&&E.jsx(cn,{size:"small",color:"blue",children:`${Jo(o)} cache read`}),a>0&&E.jsx(cn,{size:"small",color:"indigo",children:`${Jo(a)} cache write`})]})]})}Z3.displayName="ContextStats";const J3=({session:e,...t})=>{const{categoryPath:n,session:r}=e,i=cE(r.status);return E.jsxs(Xe,{"data-slot":"session-item",ay:"center",gap:2,ml:2,...t,children:[E.jsxs(Xe,{gap:2,ay:"center",children:[E.jsx(Ly,{"data-slot":"session-status",color:i}),E.jsx(Ye,{gap:2,children:E.jsxs(Ie,{"data-slot":"session-link",render:E.jsx(Ql,{to:"/sessions/$slug",params:{slug:r.slug}}),weight:"bold",children:[n," / ",r.slug]})}),E.jsx(Ie,{"data-slot":"session-time",size:-1,shade:"muted",children:Gw(r.startedAt)})]}),E.jsx(cn,{"data-slot":"session-badge",color:i,ml:"auto",children:r.status}),E.jsx(TE,{session:r,categoryPath:n})]})};J3.displayName="SessionItem";const eB=_h("/groups/$")({component:Gye}),Hye=({href:e,children:t})=>E.jsx(Ql,{to:e,children:t});function Gye(){const{_splat:e}=eB.useParams(),{data:t=[]}=Kr(Kl()),n=t.filter(o=>o.categoryPath===e),r=(e??"").split("/").filter(Boolean),i=r.map((o,a)=>({label:o,value:`/groups/${r.slice(0,a+1).join("/")}`}));return E.jsxs(Ye,{gap:4,ax:"stretch",fullwidth:!0,children:[E.jsx(Ye,{bb:1,p:4,style:{position:"sticky",top:0,backgroundColor:"var(--shade-background)",zIndex:1},children:E.jsx(iE,{items:i,linkAs:Hye})}),E.jsx(Ye,{px:8,gap:2,style:{overflow:"auto"},children:n.length>0?n.map(o=>E.jsx(J3,{session:o},o.session.id)):E.jsx(Ie,{shade:"muted",children:"No sessions in this group."})})]})}const Vye=`# Heading 1 — anchored
|
|
521
|
-
|
|
522
|
-
## Heading 2 — anchored
|
|
523
|
-
|
|
524
|
-
### Heading 3
|
|
525
|
-
|
|
526
|
-
#### Heading 4
|
|
527
|
-
|
|
528
|
-
##### Heading 5
|
|
529
|
-
|
|
530
|
-
###### Heading 6
|
|
531
|
-
|
|
532
|
-
A paragraph with **bold**, *italic*, ~~strikethrough~~, an [external link](https://example.com), and \`inline code\`. Hover the headings to see the slug \`id\` attributes injected by rehype-slug.
|
|
533
|
-
|
|
534
|
-
> A blockquote can sit between paragraphs. It should look distinct enough to read as a quotation, not just indented prose.
|
|
535
|
-
|
|
536
|
-
---
|
|
537
|
-
|
|
538
|
-
## Lists
|
|
539
|
-
|
|
540
|
-
- Unordered list item one
|
|
541
|
-
- Unordered list item two with **emphasis** and \`code\`
|
|
542
|
-
- Nested item
|
|
543
|
-
- Another nested item
|
|
544
|
-
- Three levels deep
|
|
545
|
-
|
|
546
|
-
1. Ordered list item one
|
|
547
|
-
2. Ordered list item two
|
|
548
|
-
3. Ordered list item three
|
|
549
|
-
|
|
550
|
-
### Task list
|
|
551
|
-
|
|
552
|
-
- [x] Done item
|
|
553
|
-
- [x] Another done item
|
|
554
|
-
- [ ] Open item
|
|
555
|
-
- [ ] Open item with [a link](https://example.com)
|
|
556
|
-
|
|
557
|
-
---
|
|
558
|
-
|
|
559
|
-
## Tables
|
|
560
|
-
|
|
561
|
-
| Feature | Status | Notes |
|
|
562
|
-
|---|---|---|
|
|
563
|
-
| Headings | ✓ | rehype-slug |
|
|
564
|
-
| Tables | ✓ | mapped to TableRoot/Header/Body/Row/Head/Cell |
|
|
565
|
-
| Code blocks | ✓ | shiki via CodeBlock |
|
|
566
|
-
| Task lists | ✓ | disabled checkbox render |
|
|
567
|
-
|
|
568
|
-
| Left | Center | Right |
|
|
569
|
-
|:---|:---:|---:|
|
|
570
|
-
| 1 | 2 | 3 |
|
|
571
|
-
| left-aligned | center-aligned | right-aligned |
|
|
572
|
-
|
|
573
|
-
---
|
|
574
|
-
|
|
575
|
-
## Code
|
|
576
|
-
|
|
577
|
-
Inline: use \`bun run typecheck\` or \`tsc --noEmit\` to validate.
|
|
578
|
-
|
|
579
|
-
\`\`\`ts
|
|
580
|
-
// known language — should syntax-highlight
|
|
581
|
-
import { Markdown } from "../components/markdown";
|
|
582
|
-
|
|
583
|
-
export function Demo() {
|
|
584
|
-
return <Markdown>{"# hi"}</Markdown>;
|
|
585
|
-
}
|
|
586
|
-
\`\`\`
|
|
587
|
-
|
|
588
|
-
\`\`\`tsx
|
|
589
|
-
const App = () => <div>{"jsx works too"}</div>;
|
|
590
|
-
\`\`\`
|
|
591
|
-
|
|
592
|
-
\`\`\`js
|
|
593
|
-
// alias — js → javascript
|
|
594
|
-
function add(a, b) { return a + b; }
|
|
595
|
-
\`\`\`
|
|
596
|
-
|
|
597
|
-
\`\`\`sh
|
|
598
|
-
# alias — sh → bash
|
|
599
|
-
bun run dev
|
|
600
|
-
\`\`\`
|
|
601
|
-
|
|
602
|
-
\`\`\`json
|
|
603
|
-
{
|
|
604
|
-
"language": "json",
|
|
605
|
-
"ok": true
|
|
606
|
-
}
|
|
607
|
-
\`\`\`
|
|
608
|
-
|
|
609
|
-
\`\`\`unknownlanguage
|
|
610
|
-
// unknown language — should render plaintext, not throw
|
|
611
|
-
some content here
|
|
612
|
-
\`\`\`
|
|
613
|
-
|
|
614
|
-
\`\`\`
|
|
615
|
-
no language tag — also plaintext
|
|
616
|
-
multiple lines
|
|
617
|
-
\`\`\`
|
|
618
|
-
|
|
619
|
-
---
|
|
620
|
-
|
|
621
|
-
## Edge cases
|
|
622
|
-
|
|
623
|
-
A paragraph immediately followed by a fenced block:
|
|
624
|
-
\`\`\`ts
|
|
625
|
-
const ok = true;
|
|
626
|
-
\`\`\`
|
|
627
|
-
|
|
628
|
-
Paragraph after the fence — should render with normal spacing.
|
|
629
|
-
|
|
630
|
-
A line with **bold at the very end**
|
|
631
|
-
|
|
632
|
-
A line ending with \`inline code\`
|
|
633
|
-
|
|
634
|
-
An empty heading below this line:
|
|
635
|
-
|
|
636
|
-
##
|
|
637
|
-
|
|
638
|
-
End of fixture.
|
|
639
|
-
`;function qye(){const[e,t]=C.useState(Vye);return E.jsxs(Ye,{gap:4,p:6,fullwidth:!0,style:{overflow:"auto"},children:[E.jsxs(Ye,{gap:2,children:[E.jsx(Ie,{size:3,weight:"bold",children:"Markdown kitchen sink"}),E.jsx(Ie,{size:2,shade:"muted",children:"Edit the source on the left, see it rendered on the right. Reset by reloading the page."})]}),E.jsxs(Xe,{gap:4,fullwidth:!0,ay:"stretch",evenly:!0,children:[E.jsxs(Ye,{gap:2,ax:"stretch",children:[E.jsx(Ie,{size:0,shade:"muted",children:"source"}),E.jsx("textarea",{value:e,onChange:n=>t(n.target.value),spellCheck:!1,style:{fontFamily:"ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace",fontSize:12,lineHeight:1.5,padding:12,minHeight:600,border:"1px solid var(--color-border)",borderRadius:4,background:"var(--color-surface)",color:"var(--color-text)",resize:"vertical"}})]}),E.jsxs(Ye,{gap:2,children:[E.jsx(Ie,{size:0,shade:"muted",children:"rendered"}),E.jsx(zt,{children:E.jsx(wa,{children:e})})]})]})]})}const Yye=_h("/dev/markdown")({component:qye}),Wye=`import { useState } from "react";
|
|
640
|
-
|
|
641
|
-
export function Counter() {
|
|
642
|
-
const [count, setCount] = useState(0);
|
|
643
|
-
|
|
644
|
-
function increment() {
|
|
645
|
-
setCount(count + 1);
|
|
646
|
-
}
|
|
647
|
-
|
|
648
|
-
return (
|
|
649
|
-
<button onClick={increment}>
|
|
650
|
-
{count}
|
|
651
|
-
</button>
|
|
652
|
-
);
|
|
653
|
-
}
|
|
654
|
-
`,Kye=`import { useCallback, useState } from "react";
|
|
655
|
-
|
|
656
|
-
type CounterProps = {
|
|
657
|
-
step?: number;
|
|
658
|
-
};
|
|
659
|
-
|
|
660
|
-
export function Counter({ step = 1 }: CounterProps) {
|
|
661
|
-
const [count, setCount] = useState(0);
|
|
662
|
-
|
|
663
|
-
const increment = useCallback(() => {
|
|
664
|
-
setCount((c) => c + step);
|
|
665
|
-
}, [step]);
|
|
666
|
-
|
|
667
|
-
return (
|
|
668
|
-
<button type="button" onClick={increment}>
|
|
669
|
-
count: {count}
|
|
670
|
-
</button>
|
|
671
|
-
);
|
|
672
|
-
}
|
|
673
|
-
`,wO={fontFamily:"ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace",fontSize:12,lineHeight:1.5,padding:12,minHeight:280,border:"1px solid var(--color-border)",borderRadius:4,background:"var(--color-surface)",color:"var(--color-text)",resize:"vertical"},Xye=Object.entries(qI);function Qye(){const[e,t]=C.useState(Wye),[n,r]=C.useState(Kye),[i,o]=C.useState("tsx"),[a,u]=C.useState(!1);return E.jsxs(Ye,{gap:4,p:6,fullwidth:!0,style:{overflow:"auto"},children:[E.jsxs(Ye,{gap:2,children:[E.jsx(Ie,{size:3,weight:"bold",children:"Diff kitchen sink"}),E.jsx(Ie,{size:2,shade:"muted",children:"Edit the old and new sources on the left, see the diff on the right. Backed by jsdiff + the existing CodeBlock primitive."})]}),E.jsxs(Xe,{ay:"center",gap:4,children:[E.jsxs(Xe,{ay:"center",gap:2,children:[E.jsx(Ie,{size:0,shade:"muted",children:"language"}),E.jsx("select",{value:i,onChange:c=>o(c.target.value),style:{fontSize:12,padding:"4px 8px",border:"1px solid var(--color-border)",borderRadius:4,background:"var(--color-surface)",color:"var(--color-text)"},children:Xye.map(([c,f])=>E.jsx("option",{value:c,children:f},c))})]}),E.jsxs(Xe,{ay:"center",gap:2,children:[E.jsx("input",{id:"word-diff",type:"checkbox",checked:a,onChange:c=>u(c.target.checked)}),E.jsx(Ie,{size:0,shade:"muted",render:E.jsx("label",{htmlFor:"word-diff"}),children:"word diff"})]})]}),E.jsxs(Xe,{gap:4,fullwidth:!0,ay:"stretch",evenly:!0,children:[E.jsxs(Ye,{gap:3,ax:"stretch",children:[E.jsxs(Ye,{gap:2,ax:"stretch",children:[E.jsx(Ie,{size:0,shade:"muted",children:"old"}),E.jsx(zt,{ax:"stretch",children:E.jsx("textarea",{value:e,onChange:c=>t(c.target.value),spellCheck:!1,style:wO})})]}),E.jsxs(Ye,{gap:2,ax:"stretch",children:[E.jsx(Ie,{size:0,shade:"muted",children:"new"}),E.jsx(zt,{ax:"stretch",children:E.jsx("textarea",{value:n,onChange:c=>r(c.target.value),spellCheck:!1,style:wO})})]})]}),E.jsxs(Ye,{gap:2,ax:"stretch",children:[E.jsx(Ie,{size:0,shade:"muted",children:"diff"}),E.jsx(Cy,{oldStr:e,newStr:n,language:i,wordDiff:a})]})]})]})}const Zye=_h("/dev/diff")({component:Qye}),Jye=uye.update({id:"/",path:"/",getParentRoute:()=>Ef}),ebe=K3.update({id:"/sessions/$slug",path:"/sessions/$slug",getParentRoute:()=>Ef}),tbe=eB.update({id:"/groups/$",path:"/groups/$",getParentRoute:()=>Ef}),nbe=Yye.update({id:"/dev/markdown",path:"/dev/markdown",getParentRoute:()=>Ef}),rbe=Zye.update({id:"/dev/diff",path:"/dev/diff",getParentRoute:()=>Ef}),ibe={IndexRoute:Jye,DevDiffRoute:rbe,DevMarkdownRoute:nbe,GroupsSplatRoute:tbe,SessionsSlugRoute:ebe},obe=Ef._addFileChildren(ibe)._addFileTypes();nce({immediate:!0});const sbe=new X6({defaultOptions:{queries:{staleTime:3e4,refetchOnWindowFocus:!0}}}),abe=X9({routeTree:obe});k6.createRoot(document.getElementById("root")).render(E.jsx(C.StrictMode,{children:E.jsx(Q6,{client:sbe,children:E.jsxs(HK,{children:[E.jsx(J9,{router:abe}),E.jsx(lI,{position:"bottom"})]})})}));
|