kanna-code 0.3.0 → 0.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,419 @@
1
+ var SN=Object.defineProperty;var CN=(e,n,r)=>n in e?SN(e,n,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[n]=r;var Tt=(e,n,r)=>CN(e,typeof n!="symbol"?n+"":n,r);function EN(e,n){for(var r=0;r<n.length;r++){const l=n[r];if(typeof l!="string"&&!Array.isArray(l)){for(const o in l)if(o!=="default"&&!(o in e)){const s=Object.getOwnPropertyDescriptor(l,o);s&&Object.defineProperty(e,o,s.get?s:{enumerable:!0,get:()=>l[o]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const n=document.createElement("link").relList;if(n&&n.supports&&n.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))l(o);new MutationObserver(o=>{for(const s of o)if(s.type==="childList")for(const c of s.addedNodes)c.tagName==="LINK"&&c.rel==="modulepreload"&&l(c)}).observe(document,{childList:!0,subtree:!0});function r(o){const s={};return o.integrity&&(s.integrity=o.integrity),o.referrerPolicy&&(s.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?s.credentials="include":o.crossOrigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function l(o){if(o.ep)return;o.ep=!0;const s=r(o);fetch(o.href,s)}})();function vc(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var ch={exports:{}},xo={};/**
2
+ * @license React
3
+ * react-jsx-runtime.production.js
4
+ *
5
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
6
+ *
7
+ * This source code is licensed under the MIT license found in the
8
+ * LICENSE file in the root directory of this source tree.
9
+ */var Xv;function kN(){if(Xv)return xo;Xv=1;var e=Symbol.for("react.transitional.element"),n=Symbol.for("react.fragment");function r(l,o,s){var c=null;if(s!==void 0&&(c=""+s),o.key!==void 0&&(c=""+o.key),"key"in o){s={};for(var f in o)f!=="key"&&(s[f]=o[f])}else s=o;return o=s.ref,{$$typeof:e,type:l,key:c,ref:o!==void 0?o:null,props:s}}return xo.Fragment=n,xo.jsx=r,xo.jsxs=r,xo}var Kv;function NN(){return Kv||(Kv=1,ch.exports=kN()),ch.exports}var x=NN(),fh={exports:{}},Ae={};/**
10
+ * @license React
11
+ * react.production.js
12
+ *
13
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
14
+ *
15
+ * This source code is licensed under the MIT license found in the
16
+ * LICENSE file in the root directory of this source tree.
17
+ */var Qv;function RN(){if(Qv)return Ae;Qv=1;var e=Symbol.for("react.transitional.element"),n=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),l=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),s=Symbol.for("react.consumer"),c=Symbol.for("react.context"),f=Symbol.for("react.forward_ref"),d=Symbol.for("react.suspense"),h=Symbol.for("react.memo"),g=Symbol.for("react.lazy"),p=Symbol.for("react.activity"),b=Symbol.iterator;function w(O){return O===null||typeof O!="object"?null:(O=b&&O[b]||O["@@iterator"],typeof O=="function"?O:null)}var E={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},C=Object.assign,k={};function N(O,D,A){this.props=O,this.context=D,this.refs=k,this.updater=A||E}N.prototype.isReactComponent={},N.prototype.setState=function(O,D){if(typeof O!="object"&&typeof O!="function"&&O!=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,O,D,"setState")},N.prototype.forceUpdate=function(O){this.updater.enqueueForceUpdate(this,O,"forceUpdate")};function j(){}j.prototype=N.prototype;function M(O,D,A){this.props=O,this.context=D,this.refs=k,this.updater=A||E}var z=M.prototype=new j;z.constructor=M,C(z,N.prototype),z.isPureReactComponent=!0;var U=Array.isArray;function _(){}var P={H:null,A:null,T:null,S:null},F=Object.prototype.hasOwnProperty;function ne(O,D,A){var Z=A.ref;return{$$typeof:e,type:O,key:D,ref:Z!==void 0?Z:null,props:A}}function I(O,D){return ne(O.type,D,O.props)}function J(O){return typeof O=="object"&&O!==null&&O.$$typeof===e}function te(O){var D={"=":"=0",":":"=2"};return"$"+O.replace(/[=:]/g,function(A){return D[A]})}var ce=/\/+/g;function le(O,D){return typeof O=="object"&&O!==null&&O.key!=null?te(""+O.key):D.toString(36)}function ee(O){switch(O.status){case"fulfilled":return O.value;case"rejected":throw O.reason;default:switch(typeof O.status=="string"?O.then(_,_):(O.status="pending",O.then(function(D){O.status==="pending"&&(O.status="fulfilled",O.value=D)},function(D){O.status==="pending"&&(O.status="rejected",O.reason=D)})),O.status){case"fulfilled":return O.value;case"rejected":throw O.reason}}throw O}function B(O,D,A,Z,fe){var ue=typeof O;(ue==="undefined"||ue==="boolean")&&(O=null);var me=!1;if(O===null)me=!0;else switch(ue){case"bigint":case"string":case"number":me=!0;break;case"object":switch(O.$$typeof){case e:case n:me=!0;break;case g:return me=O._init,B(me(O._payload),D,A,Z,fe)}}if(me)return fe=fe(O),me=Z===""?"."+le(O,0):Z,U(fe)?(A="",me!=null&&(A=me.replace(ce,"$&/")+"/"),B(fe,D,A,"",function(Ce){return Ce})):fe!=null&&(J(fe)&&(fe=I(fe,A+(fe.key==null||O&&O.key===fe.key?"":(""+fe.key).replace(ce,"$&/")+"/")+me)),D.push(fe)),1;me=0;var Ne=Z===""?".":Z+":";if(U(O))for(var he=0;he<O.length;he++)Z=O[he],ue=Ne+le(Z,he),me+=B(Z,D,A,ue,fe);else if(he=w(O),typeof he=="function")for(O=he.call(O),he=0;!(Z=O.next()).done;)Z=Z.value,ue=Ne+le(Z,he++),me+=B(Z,D,A,ue,fe);else if(ue==="object"){if(typeof O.then=="function")return B(ee(O),D,A,Z,fe);throw D=String(O),Error("Objects are not valid as a React child (found: "+(D==="[object Object]"?"object with keys {"+Object.keys(O).join(", ")+"}":D)+"). If you meant to render a collection of children, use an array instead.")}return me}function X(O,D,A){if(O==null)return O;var Z=[],fe=0;return B(O,Z,"","",function(ue){return D.call(A,ue,fe++)}),Z}function $(O){if(O._status===-1){var D=O._result;D=D(),D.then(function(A){(O._status===0||O._status===-1)&&(O._status=1,O._result=A)},function(A){(O._status===0||O._status===-1)&&(O._status=2,O._result=A)}),O._status===-1&&(O._status=0,O._result=D)}if(O._status===1)return O._result.default;throw O._result}var Q=typeof reportError=="function"?reportError:function(O){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var D=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof O=="object"&&O!==null&&typeof O.message=="string"?String(O.message):String(O),error:O});if(!window.dispatchEvent(D))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",O);return}console.error(O)},T={map:X,forEach:function(O,D,A){X(O,function(){D.apply(this,arguments)},A)},count:function(O){var D=0;return X(O,function(){D++}),D},toArray:function(O){return X(O,function(D){return D})||[]},only:function(O){if(!J(O))throw Error("React.Children.only expected to receive a single React element child.");return O}};return Ae.Activity=p,Ae.Children=T,Ae.Component=N,Ae.Fragment=r,Ae.Profiler=o,Ae.PureComponent=M,Ae.StrictMode=l,Ae.Suspense=d,Ae.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=P,Ae.__COMPILER_RUNTIME={__proto__:null,c:function(O){return P.H.useMemoCache(O)}},Ae.cache=function(O){return function(){return O.apply(null,arguments)}},Ae.cacheSignal=function(){return null},Ae.cloneElement=function(O,D,A){if(O==null)throw Error("The argument must be a React element, but you passed "+O+".");var Z=C({},O.props),fe=O.key;if(D!=null)for(ue in D.key!==void 0&&(fe=""+D.key),D)!F.call(D,ue)||ue==="key"||ue==="__self"||ue==="__source"||ue==="ref"&&D.ref===void 0||(Z[ue]=D[ue]);var ue=arguments.length-2;if(ue===1)Z.children=A;else if(1<ue){for(var me=Array(ue),Ne=0;Ne<ue;Ne++)me[Ne]=arguments[Ne+2];Z.children=me}return ne(O.type,fe,Z)},Ae.createContext=function(O){return O={$$typeof:c,_currentValue:O,_currentValue2:O,_threadCount:0,Provider:null,Consumer:null},O.Provider=O,O.Consumer={$$typeof:s,_context:O},O},Ae.createElement=function(O,D,A){var Z,fe={},ue=null;if(D!=null)for(Z in D.key!==void 0&&(ue=""+D.key),D)F.call(D,Z)&&Z!=="key"&&Z!=="__self"&&Z!=="__source"&&(fe[Z]=D[Z]);var me=arguments.length-2;if(me===1)fe.children=A;else if(1<me){for(var Ne=Array(me),he=0;he<me;he++)Ne[he]=arguments[he+2];fe.children=Ne}if(O&&O.defaultProps)for(Z in me=O.defaultProps,me)fe[Z]===void 0&&(fe[Z]=me[Z]);return ne(O,ue,fe)},Ae.createRef=function(){return{current:null}},Ae.forwardRef=function(O){return{$$typeof:f,render:O}},Ae.isValidElement=J,Ae.lazy=function(O){return{$$typeof:g,_payload:{_status:-1,_result:O},_init:$}},Ae.memo=function(O,D){return{$$typeof:h,type:O,compare:D===void 0?null:D}},Ae.startTransition=function(O){var D=P.T,A={};P.T=A;try{var Z=O(),fe=P.S;fe!==null&&fe(A,Z),typeof Z=="object"&&Z!==null&&typeof Z.then=="function"&&Z.then(_,Q)}catch(ue){Q(ue)}finally{D!==null&&A.types!==null&&(D.types=A.types),P.T=D}},Ae.unstable_useCacheRefresh=function(){return P.H.useCacheRefresh()},Ae.use=function(O){return P.H.use(O)},Ae.useActionState=function(O,D,A){return P.H.useActionState(O,D,A)},Ae.useCallback=function(O,D){return P.H.useCallback(O,D)},Ae.useContext=function(O){return P.H.useContext(O)},Ae.useDebugValue=function(){},Ae.useDeferredValue=function(O,D){return P.H.useDeferredValue(O,D)},Ae.useEffect=function(O,D){return P.H.useEffect(O,D)},Ae.useEffectEvent=function(O){return P.H.useEffectEvent(O)},Ae.useId=function(){return P.H.useId()},Ae.useImperativeHandle=function(O,D,A){return P.H.useImperativeHandle(O,D,A)},Ae.useInsertionEffect=function(O,D){return P.H.useInsertionEffect(O,D)},Ae.useLayoutEffect=function(O,D){return P.H.useLayoutEffect(O,D)},Ae.useMemo=function(O,D){return P.H.useMemo(O,D)},Ae.useOptimistic=function(O,D){return P.H.useOptimistic(O,D)},Ae.useReducer=function(O,D,A){return P.H.useReducer(O,D,A)},Ae.useRef=function(O){return P.H.useRef(O)},Ae.useState=function(O){return P.H.useState(O)},Ae.useSyncExternalStore=function(O,D,A){return P.H.useSyncExternalStore(O,D,A)},Ae.useTransition=function(){return P.H.useTransition()},Ae.version="19.2.1",Ae}var Zv;function Bm(){return Zv||(Zv=1,fh.exports=RN()),fh.exports}var v=Bm();const it=vc(v),m1=EN({__proto__:null,default:it},[v]);var dh={exports:{}},vo={},hh={exports:{}},mh={};/**
18
+ * @license React
19
+ * scheduler.production.js
20
+ *
21
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
22
+ *
23
+ * This source code is licensed under the MIT license found in the
24
+ * LICENSE file in the root directory of this source tree.
25
+ */var Wv;function TN(){return Wv||(Wv=1,(function(e){function n(B,X){var $=B.length;B.push(X);e:for(;0<$;){var Q=$-1>>>1,T=B[Q];if(0<o(T,X))B[Q]=X,B[$]=T,$=Q;else break e}}function r(B){return B.length===0?null:B[0]}function l(B){if(B.length===0)return null;var X=B[0],$=B.pop();if($!==X){B[0]=$;e:for(var Q=0,T=B.length,O=T>>>1;Q<O;){var D=2*(Q+1)-1,A=B[D],Z=D+1,fe=B[Z];if(0>o(A,$))Z<T&&0>o(fe,A)?(B[Q]=fe,B[Z]=$,Q=Z):(B[Q]=A,B[D]=$,Q=D);else if(Z<T&&0>o(fe,$))B[Q]=fe,B[Z]=$,Q=Z;else break e}}return X}function o(B,X){var $=B.sortIndex-X.sortIndex;return $!==0?$:B.id-X.id}if(e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var s=performance;e.unstable_now=function(){return s.now()}}else{var c=Date,f=c.now();e.unstable_now=function(){return c.now()-f}}var d=[],h=[],g=1,p=null,b=3,w=!1,E=!1,C=!1,k=!1,N=typeof setTimeout=="function"?setTimeout:null,j=typeof clearTimeout=="function"?clearTimeout:null,M=typeof setImmediate<"u"?setImmediate:null;function z(B){for(var X=r(h);X!==null;){if(X.callback===null)l(h);else if(X.startTime<=B)l(h),X.sortIndex=X.expirationTime,n(d,X);else break;X=r(h)}}function U(B){if(C=!1,z(B),!E)if(r(d)!==null)E=!0,_||(_=!0,te());else{var X=r(h);X!==null&&ee(U,X.startTime-B)}}var _=!1,P=-1,F=5,ne=-1;function I(){return k?!0:!(e.unstable_now()-ne<F)}function J(){if(k=!1,_){var B=e.unstable_now();ne=B;var X=!0;try{e:{E=!1,C&&(C=!1,j(P),P=-1),w=!0;var $=b;try{t:{for(z(B),p=r(d);p!==null&&!(p.expirationTime>B&&I());){var Q=p.callback;if(typeof Q=="function"){p.callback=null,b=p.priorityLevel;var T=Q(p.expirationTime<=B);if(B=e.unstable_now(),typeof T=="function"){p.callback=T,z(B),X=!0;break t}p===r(d)&&l(d),z(B)}else l(d);p=r(d)}if(p!==null)X=!0;else{var O=r(h);O!==null&&ee(U,O.startTime-B),X=!1}}break e}finally{p=null,b=$,w=!1}X=void 0}}finally{X?te():_=!1}}}var te;if(typeof M=="function")te=function(){M(J)};else if(typeof MessageChannel<"u"){var ce=new MessageChannel,le=ce.port2;ce.port1.onmessage=J,te=function(){le.postMessage(null)}}else te=function(){N(J,0)};function ee(B,X){P=N(function(){B(e.unstable_now())},X)}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(B){B.callback=null},e.unstable_forceFrameRate=function(B){0>B||125<B?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):F=0<B?Math.floor(1e3/B):5},e.unstable_getCurrentPriorityLevel=function(){return b},e.unstable_next=function(B){switch(b){case 1:case 2:case 3:var X=3;break;default:X=b}var $=b;b=X;try{return B()}finally{b=$}},e.unstable_requestPaint=function(){k=!0},e.unstable_runWithPriority=function(B,X){switch(B){case 1:case 2:case 3:case 4:case 5:break;default:B=3}var $=b;b=B;try{return X()}finally{b=$}},e.unstable_scheduleCallback=function(B,X,$){var Q=e.unstable_now();switch(typeof $=="object"&&$!==null?($=$.delay,$=typeof $=="number"&&0<$?Q+$:Q):$=Q,B){case 1:var T=-1;break;case 2:T=250;break;case 5:T=1073741823;break;case 4:T=1e4;break;default:T=5e3}return T=$+T,B={id:g++,callback:X,priorityLevel:B,startTime:$,expirationTime:T,sortIndex:-1},$>Q?(B.sortIndex=$,n(h,B),r(d)===null&&B===r(h)&&(C?(j(P),P=-1):C=!0,ee(U,$-Q))):(B.sortIndex=T,n(d,B),E||w||(E=!0,_||(_=!0,te()))),B},e.unstable_shouldYield=I,e.unstable_wrapCallback=function(B){var X=b;return function(){var $=b;b=X;try{return B.apply(this,arguments)}finally{b=$}}}})(mh)),mh}var Jv;function AN(){return Jv||(Jv=1,hh.exports=TN()),hh.exports}var ph={exports:{}},Yt={};/**
26
+ * @license React
27
+ * react-dom.production.js
28
+ *
29
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
30
+ *
31
+ * This source code is licensed under the MIT license found in the
32
+ * LICENSE file in the root directory of this source tree.
33
+ */var eb;function MN(){if(eb)return Yt;eb=1;var e=Bm();function n(d){var h="https://react.dev/errors/"+d;if(1<arguments.length){h+="?args[]="+encodeURIComponent(arguments[1]);for(var g=2;g<arguments.length;g++)h+="&args[]="+encodeURIComponent(arguments[g])}return"Minified React error #"+d+"; visit "+h+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function r(){}var l={d:{f:r,r:function(){throw Error(n(522))},D:r,C:r,L:r,m:r,X:r,S:r,M:r},p:0,findDOMNode:null},o=Symbol.for("react.portal");function s(d,h,g){var p=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:o,key:p==null?null:""+p,children:d,containerInfo:h,implementation:g}}var c=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function f(d,h){if(d==="font")return"";if(typeof h=="string")return h==="use-credentials"?h:""}return Yt.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=l,Yt.createPortal=function(d,h){var g=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!h||h.nodeType!==1&&h.nodeType!==9&&h.nodeType!==11)throw Error(n(299));return s(d,h,null,g)},Yt.flushSync=function(d){var h=c.T,g=l.p;try{if(c.T=null,l.p=2,d)return d()}finally{c.T=h,l.p=g,l.d.f()}},Yt.preconnect=function(d,h){typeof d=="string"&&(h?(h=h.crossOrigin,h=typeof h=="string"?h==="use-credentials"?h:"":void 0):h=null,l.d.C(d,h))},Yt.prefetchDNS=function(d){typeof d=="string"&&l.d.D(d)},Yt.preinit=function(d,h){if(typeof d=="string"&&h&&typeof h.as=="string"){var g=h.as,p=f(g,h.crossOrigin),b=typeof h.integrity=="string"?h.integrity:void 0,w=typeof h.fetchPriority=="string"?h.fetchPriority:void 0;g==="style"?l.d.S(d,typeof h.precedence=="string"?h.precedence:void 0,{crossOrigin:p,integrity:b,fetchPriority:w}):g==="script"&&l.d.X(d,{crossOrigin:p,integrity:b,fetchPriority:w,nonce:typeof h.nonce=="string"?h.nonce:void 0})}},Yt.preinitModule=function(d,h){if(typeof d=="string")if(typeof h=="object"&&h!==null){if(h.as==null||h.as==="script"){var g=f(h.as,h.crossOrigin);l.d.M(d,{crossOrigin:g,integrity:typeof h.integrity=="string"?h.integrity:void 0,nonce:typeof h.nonce=="string"?h.nonce:void 0})}}else h==null&&l.d.M(d)},Yt.preload=function(d,h){if(typeof d=="string"&&typeof h=="object"&&h!==null&&typeof h.as=="string"){var g=h.as,p=f(g,h.crossOrigin);l.d.L(d,g,{crossOrigin:p,integrity:typeof h.integrity=="string"?h.integrity:void 0,nonce:typeof h.nonce=="string"?h.nonce:void 0,type:typeof h.type=="string"?h.type:void 0,fetchPriority:typeof h.fetchPriority=="string"?h.fetchPriority:void 0,referrerPolicy:typeof h.referrerPolicy=="string"?h.referrerPolicy:void 0,imageSrcSet:typeof h.imageSrcSet=="string"?h.imageSrcSet:void 0,imageSizes:typeof h.imageSizes=="string"?h.imageSizes:void 0,media:typeof h.media=="string"?h.media:void 0})}},Yt.preloadModule=function(d,h){if(typeof d=="string")if(h){var g=f(h.as,h.crossOrigin);l.d.m(d,{as:typeof h.as=="string"&&h.as!=="script"?h.as:void 0,crossOrigin:g,integrity:typeof h.integrity=="string"?h.integrity:void 0})}else l.d.m(d)},Yt.requestFormReset=function(d){l.d.r(d)},Yt.unstable_batchedUpdates=function(d,h){return d(h)},Yt.useFormState=function(d,h,g){return c.H.useFormState(d,h,g)},Yt.useFormStatus=function(){return c.H.useHostTransitionStatus()},Yt.version="19.2.1",Yt}var tb;function p1(){if(tb)return ph.exports;tb=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(n){console.error(n)}}return e(),ph.exports=MN(),ph.exports}/**
34
+ * @license React
35
+ * react-dom-client.production.js
36
+ *
37
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
38
+ *
39
+ * This source code is licensed under the MIT license found in the
40
+ * LICENSE file in the root directory of this source tree.
41
+ */var nb;function jN(){if(nb)return vo;nb=1;var e=AN(),n=Bm(),r=p1();function l(t){var i="https://react.dev/errors/"+t;if(1<arguments.length){i+="?args[]="+encodeURIComponent(arguments[1]);for(var a=2;a<arguments.length;a++)i+="&args[]="+encodeURIComponent(arguments[a])}return"Minified React error #"+t+"; visit "+i+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function o(t){return!(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)}function s(t){var i=t,a=t;if(t.alternate)for(;i.return;)i=i.return;else{t=i;do i=t,(i.flags&4098)!==0&&(a=i.return),t=i.return;while(t)}return i.tag===3?a:null}function c(t){if(t.tag===13){var i=t.memoizedState;if(i===null&&(t=t.alternate,t!==null&&(i=t.memoizedState)),i!==null)return i.dehydrated}return null}function f(t){if(t.tag===31){var i=t.memoizedState;if(i===null&&(t=t.alternate,t!==null&&(i=t.memoizedState)),i!==null)return i.dehydrated}return null}function d(t){if(s(t)!==t)throw Error(l(188))}function h(t){var i=t.alternate;if(!i){if(i=s(t),i===null)throw Error(l(188));return i!==t?null:t}for(var a=t,u=i;;){var m=a.return;if(m===null)break;var y=m.alternate;if(y===null){if(u=m.return,u!==null){a=u;continue}break}if(m.child===y.child){for(y=m.child;y;){if(y===a)return d(m),t;if(y===u)return d(m),i;y=y.sibling}throw Error(l(188))}if(a.return!==u.return)a=m,u=y;else{for(var S=!1,R=m.child;R;){if(R===a){S=!0,a=m,u=y;break}if(R===u){S=!0,u=m,a=y;break}R=R.sibling}if(!S){for(R=y.child;R;){if(R===a){S=!0,a=y,u=m;break}if(R===u){S=!0,u=y,a=m;break}R=R.sibling}if(!S)throw Error(l(189))}}if(a.alternate!==u)throw Error(l(190))}if(a.tag!==3)throw Error(l(188));return a.stateNode.current===a?t:i}function g(t){var i=t.tag;if(i===5||i===26||i===27||i===6)return t;for(t=t.child;t!==null;){if(i=g(t),i!==null)return i;t=t.sibling}return null}var p=Object.assign,b=Symbol.for("react.element"),w=Symbol.for("react.transitional.element"),E=Symbol.for("react.portal"),C=Symbol.for("react.fragment"),k=Symbol.for("react.strict_mode"),N=Symbol.for("react.profiler"),j=Symbol.for("react.consumer"),M=Symbol.for("react.context"),z=Symbol.for("react.forward_ref"),U=Symbol.for("react.suspense"),_=Symbol.for("react.suspense_list"),P=Symbol.for("react.memo"),F=Symbol.for("react.lazy"),ne=Symbol.for("react.activity"),I=Symbol.for("react.memo_cache_sentinel"),J=Symbol.iterator;function te(t){return t===null||typeof t!="object"?null:(t=J&&t[J]||t["@@iterator"],typeof t=="function"?t:null)}var ce=Symbol.for("react.client.reference");function le(t){if(t==null)return null;if(typeof t=="function")return t.$$typeof===ce?null:t.displayName||t.name||null;if(typeof t=="string")return t;switch(t){case C:return"Fragment";case N:return"Profiler";case k:return"StrictMode";case U:return"Suspense";case _:return"SuspenseList";case ne:return"Activity"}if(typeof t=="object")switch(t.$$typeof){case E:return"Portal";case M:return t.displayName||"Context";case j:return(t._context.displayName||"Context")+".Consumer";case z:var i=t.render;return t=t.displayName,t||(t=i.displayName||i.name||"",t=t!==""?"ForwardRef("+t+")":"ForwardRef"),t;case P:return i=t.displayName||null,i!==null?i:le(t.type)||"Memo";case F:i=t._payload,t=t._init;try{return le(t(i))}catch{}}return null}var ee=Array.isArray,B=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,X=r.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,$={pending:!1,data:null,method:null,action:null},Q=[],T=-1;function O(t){return{current:t}}function D(t){0>T||(t.current=Q[T],Q[T]=null,T--)}function A(t,i){T++,Q[T]=t.current,t.current=i}var Z=O(null),fe=O(null),ue=O(null),me=O(null);function Ne(t,i){switch(A(ue,i),A(fe,t),A(Z,null),i.nodeType){case 9:case 11:t=(t=i.documentElement)&&(t=t.namespaceURI)?yv(t):0;break;default:if(t=i.tagName,i=i.namespaceURI)i=yv(i),t=xv(i,t);else switch(t){case"svg":t=1;break;case"math":t=2;break;default:t=0}}D(Z),A(Z,t)}function he(){D(Z),D(fe),D(ue)}function Ce(t){t.memoizedState!==null&&A(me,t);var i=Z.current,a=xv(i,t.type);i!==a&&(A(fe,t),A(Z,a))}function lt(t){fe.current===t&&(D(Z),D(fe)),me.current===t&&(D(me),mo._currentValue=$)}var nt,st;function Ye(t){if(nt===void 0)try{throw Error()}catch(a){var i=a.stack.trim().match(/\n( *(at )?)/);nt=i&&i[1]||"",st=-1<a.stack.indexOf(`
42
+ at`)?" (<anonymous>)":-1<a.stack.indexOf("@")?"@unknown:0:0":""}return`
43
+ `+nt+t+st}var Lt=!1;function Pt(t,i){if(!t||Lt)return"";Lt=!0;var a=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var u={DetermineComponentFrameRoot:function(){try{if(i){var oe=function(){throw Error()};if(Object.defineProperty(oe.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(oe,[])}catch(W){var K=W}Reflect.construct(t,[],oe)}else{try{oe.call()}catch(W){K=W}t.call(oe.prototype)}}else{try{throw Error()}catch(W){K=W}(oe=t())&&typeof oe.catch=="function"&&oe.catch(function(){})}}catch(W){if(W&&K&&typeof W.stack=="string")return[W.stack,K.stack]}return[null,null]}};u.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var m=Object.getOwnPropertyDescriptor(u.DetermineComponentFrameRoot,"name");m&&m.configurable&&Object.defineProperty(u.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var y=u.DetermineComponentFrameRoot(),S=y[0],R=y[1];if(S&&R){var L=S.split(`
44
+ `),V=R.split(`
45
+ `);for(m=u=0;u<L.length&&!L[u].includes("DetermineComponentFrameRoot");)u++;for(;m<V.length&&!V[m].includes("DetermineComponentFrameRoot");)m++;if(u===L.length||m===V.length)for(u=L.length-1,m=V.length-1;1<=u&&0<=m&&L[u]!==V[m];)m--;for(;1<=u&&0<=m;u--,m--)if(L[u]!==V[m]){if(u!==1||m!==1)do if(u--,m--,0>m||L[u]!==V[m]){var re=`
46
+ `+L[u].replace(" at new "," at ");return t.displayName&&re.includes("<anonymous>")&&(re=re.replace("<anonymous>",t.displayName)),re}while(1<=u&&0<=m);break}}}finally{Lt=!1,Error.prepareStackTrace=a}return(a=t?t.displayName||t.name:"")?Ye(a):""}function Yn(t,i){switch(t.tag){case 26:case 27:case 5:return Ye(t.type);case 16:return Ye("Lazy");case 13:return t.child!==i&&i!==null?Ye("Suspense Fallback"):Ye("Suspense");case 19:return Ye("SuspenseList");case 0:case 15:return Pt(t.type,!1);case 11:return Pt(t.type.render,!1);case 1:return Pt(t.type,!0);case 31:return Ye("Activity");default:return""}}function Xn(t){try{var i="",a=null;do i+=Yn(t,a),a=t,t=t.return;while(t);return i}catch(u){return`
47
+ Error generating stack: `+u.message+`
48
+ `+u.stack}}var Bt=Object.prototype.hasOwnProperty,It=e.unstable_scheduleCallback,Tn=e.unstable_cancelCallback,sr=e.unstable_shouldYield,Wr=e.unstable_requestPaint,mt=e.unstable_now,Jr=e.unstable_getCurrentPriorityLevel,ie=e.unstable_ImmediatePriority,Y=e.unstable_UserBlockingPriority,se=e.unstable_NormalPriority,pe=e.unstable_LowPriority,we=e.unstable_IdlePriority,Oe=e.log,pn=e.unstable_setDisableYieldValue,Ut=null,pt=null;function jt(t){if(typeof Oe=="function"&&pn(t),pt&&typeof pt.setStrictMode=="function")try{pt.setStrictMode(Ut,t)}catch{}}var Xe=Math.clz32?Math.clz32:Jc,ur=Math.log,en=Math.LN2;function Jc(t){return t>>>=0,t===0?32:31-(ur(t)/en|0)|0}var pl=256,gl=262144,gt=4194304;function yt(t){var i=t&42;if(i!==0)return i;switch(t&-t){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 t&261888;case 262144:case 524288:case 1048576:case 2097152:return t&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return t&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return t}}function _t(t,i,a){var u=t.pendingLanes;if(u===0)return 0;var m=0,y=t.suspendedLanes,S=t.pingedLanes;t=t.warmLanes;var R=u&134217727;return R!==0?(u=R&~y,u!==0?m=yt(u):(S&=R,S!==0?m=yt(S):a||(a=R&~t,a!==0&&(m=yt(a))))):(R=u&~y,R!==0?m=yt(R):S!==0?m=yt(S):a||(a=u&~t,a!==0&&(m=yt(a)))),m===0?0:i!==0&&i!==m&&(i&y)===0&&(y=m&-m,a=i&-i,y>=a||y===32&&(a&4194048)!==0)?i:m}function tn(t,i){return(t.pendingLanes&~(t.suspendedLanes&~t.pingedLanes)&i)===0}function nn(t,i){switch(t){case 1:case 2:case 4:case 8:case 64:return i+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 i+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 $t(){var t=gt;return gt<<=1,(gt&62914560)===0&&(gt=4194304),t}function rn(t){for(var i=[],a=0;31>a;a++)i.push(t);return i}function An(t,i){t.pendingLanes|=i,i!==268435456&&(t.suspendedLanes=0,t.pingedLanes=0,t.warmLanes=0)}function Nt(t,i,a,u,m,y){var S=t.pendingLanes;t.pendingLanes=a,t.suspendedLanes=0,t.pingedLanes=0,t.warmLanes=0,t.expiredLanes&=a,t.entangledLanes&=a,t.errorRecoveryDisabledLanes&=a,t.shellSuspendCounter=0;var R=t.entanglements,L=t.expirationTimes,V=t.hiddenUpdates;for(a=S&~a;0<a;){var re=31-Xe(a),oe=1<<re;R[re]=0,L[re]=-1;var K=V[re];if(K!==null)for(V[re]=null,re=0;re<K.length;re++){var W=K[re];W!==null&&(W.lane&=-536870913)}a&=~oe}u!==0&&Kn(t,u,0),y!==0&&m===0&&t.tag!==0&&(t.suspendedLanes|=y&~(S&~i))}function Kn(t,i,a){t.pendingLanes|=i,t.suspendedLanes&=~i;var u=31-Xe(i);t.entangledLanes|=i,t.entanglements[u]=t.entanglements[u]|1073741824|a&261930}function gn(t,i){var a=t.entangledLanes|=i;for(t=t.entanglements;a;){var u=31-Xe(a),m=1<<u;m&i|t[u]&i&&(t[u]|=i),a&=~m}}function Mn(t,i){var a=i&-i;return a=(a&42)!==0?1:kr(a),(a&(t.suspendedLanes|i))!==0?0:a}function kr(t){switch(t){case 2:t=1;break;case 8:t=4;break;case 32:t=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:t=128;break;case 268435456:t=134217728;break;default:t=0}return t}function Nr(t){return t&=-t,2<t?8<t?(t&134217727)!==0?32:268435456:8:2}function Qn(){var t=X.p;return t!==0?t:(t=window.event,t===void 0?32:Hv(t.type))}function ei(t,i){var a=X.p;try{return X.p=t,i()}finally{X.p=a}}var jn=Math.random().toString(36).slice(2),Ht="__reactFiber$"+jn,ln="__reactProps$"+jn,yl="__reactContainer$"+jn,ef="__reactEvents$"+jn,f2="__reactListeners$"+jn,d2="__reactHandles$"+jn,ig="__reactResources$"+jn,Ta="__reactMarker$"+jn;function tf(t){delete t[Ht],delete t[ln],delete t[ef],delete t[f2],delete t[d2]}function xl(t){var i=t[Ht];if(i)return i;for(var a=t.parentNode;a;){if(i=a[yl]||a[Ht]){if(a=i.alternate,i.child!==null||a!==null&&a.child!==null)for(t=kv(t);t!==null;){if(a=t[Ht])return a;t=kv(t)}return i}t=a,a=t.parentNode}return null}function vl(t){if(t=t[Ht]||t[yl]){var i=t.tag;if(i===5||i===6||i===13||i===31||i===26||i===27||i===3)return t}return null}function Aa(t){var i=t.tag;if(i===5||i===26||i===27||i===6)return t.stateNode;throw Error(l(33))}function bl(t){var i=t[ig];return i||(i=t[ig]={hoistableStyles:new Map,hoistableScripts:new Map}),i}function Ot(t){t[Ta]=!0}var lg=new Set,ag={};function Ui(t,i){wl(t,i),wl(t+"Capture",i)}function wl(t,i){for(ag[t]=i,t=0;t<i.length;t++)lg.add(i[t])}var h2=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]*$"),og={},sg={};function m2(t){return Bt.call(sg,t)?!0:Bt.call(og,t)?!1:h2.test(t)?sg[t]=!0:(og[t]=!0,!1)}function cs(t,i,a){if(m2(i))if(a===null)t.removeAttribute(i);else{switch(typeof a){case"undefined":case"function":case"symbol":t.removeAttribute(i);return;case"boolean":var u=i.toLowerCase().slice(0,5);if(u!=="data-"&&u!=="aria-"){t.removeAttribute(i);return}}t.setAttribute(i,""+a)}}function fs(t,i,a){if(a===null)t.removeAttribute(i);else{switch(typeof a){case"undefined":case"function":case"symbol":case"boolean":t.removeAttribute(i);return}t.setAttribute(i,""+a)}}function Rr(t,i,a,u){if(u===null)t.removeAttribute(a);else{switch(typeof u){case"undefined":case"function":case"symbol":case"boolean":t.removeAttribute(a);return}t.setAttributeNS(i,a,""+u)}}function _n(t){switch(typeof t){case"bigint":case"boolean":case"number":case"string":case"undefined":return t;case"object":return t;default:return""}}function ug(t){var i=t.type;return(t=t.nodeName)&&t.toLowerCase()==="input"&&(i==="checkbox"||i==="radio")}function p2(t,i,a){var u=Object.getOwnPropertyDescriptor(t.constructor.prototype,i);if(!t.hasOwnProperty(i)&&typeof u<"u"&&typeof u.get=="function"&&typeof u.set=="function"){var m=u.get,y=u.set;return Object.defineProperty(t,i,{configurable:!0,get:function(){return m.call(this)},set:function(S){a=""+S,y.call(this,S)}}),Object.defineProperty(t,i,{enumerable:u.enumerable}),{getValue:function(){return a},setValue:function(S){a=""+S},stopTracking:function(){t._valueTracker=null,delete t[i]}}}}function nf(t){if(!t._valueTracker){var i=ug(t)?"checked":"value";t._valueTracker=p2(t,i,""+t[i])}}function cg(t){if(!t)return!1;var i=t._valueTracker;if(!i)return!0;var a=i.getValue(),u="";return t&&(u=ug(t)?t.checked?"true":"false":t.value),t=u,t!==a?(i.setValue(t),!0):!1}function ds(t){if(t=t||(typeof document<"u"?document:void 0),typeof t>"u")return null;try{return t.activeElement||t.body}catch{return t.body}}var g2=/[\n"\\]/g;function On(t){return t.replace(g2,function(i){return"\\"+i.charCodeAt(0).toString(16)+" "})}function rf(t,i,a,u,m,y,S,R){t.name="",S!=null&&typeof S!="function"&&typeof S!="symbol"&&typeof S!="boolean"?t.type=S:t.removeAttribute("type"),i!=null?S==="number"?(i===0&&t.value===""||t.value!=i)&&(t.value=""+_n(i)):t.value!==""+_n(i)&&(t.value=""+_n(i)):S!=="submit"&&S!=="reset"||t.removeAttribute("value"),i!=null?lf(t,S,_n(i)):a!=null?lf(t,S,_n(a)):u!=null&&t.removeAttribute("value"),m==null&&y!=null&&(t.defaultChecked=!!y),m!=null&&(t.checked=m&&typeof m!="function"&&typeof m!="symbol"),R!=null&&typeof R!="function"&&typeof R!="symbol"&&typeof R!="boolean"?t.name=""+_n(R):t.removeAttribute("name")}function fg(t,i,a,u,m,y,S,R){if(y!=null&&typeof y!="function"&&typeof y!="symbol"&&typeof y!="boolean"&&(t.type=y),i!=null||a!=null){if(!(y!=="submit"&&y!=="reset"||i!=null)){nf(t);return}a=a!=null?""+_n(a):"",i=i!=null?""+_n(i):a,R||i===t.value||(t.value=i),t.defaultValue=i}u=u??m,u=typeof u!="function"&&typeof u!="symbol"&&!!u,t.checked=R?t.checked:!!u,t.defaultChecked=!!u,S!=null&&typeof S!="function"&&typeof S!="symbol"&&typeof S!="boolean"&&(t.name=S),nf(t)}function lf(t,i,a){i==="number"&&ds(t.ownerDocument)===t||t.defaultValue===""+a||(t.defaultValue=""+a)}function Sl(t,i,a,u){if(t=t.options,i){i={};for(var m=0;m<a.length;m++)i["$"+a[m]]=!0;for(a=0;a<t.length;a++)m=i.hasOwnProperty("$"+t[a].value),t[a].selected!==m&&(t[a].selected=m),m&&u&&(t[a].defaultSelected=!0)}else{for(a=""+_n(a),i=null,m=0;m<t.length;m++){if(t[m].value===a){t[m].selected=!0,u&&(t[m].defaultSelected=!0);return}i!==null||t[m].disabled||(i=t[m])}i!==null&&(i.selected=!0)}}function dg(t,i,a){if(i!=null&&(i=""+_n(i),i!==t.value&&(t.value=i),a==null)){t.defaultValue!==i&&(t.defaultValue=i);return}t.defaultValue=a!=null?""+_n(a):""}function hg(t,i,a,u){if(i==null){if(u!=null){if(a!=null)throw Error(l(92));if(ee(u)){if(1<u.length)throw Error(l(93));u=u[0]}a=u}a==null&&(a=""),i=a}a=_n(i),t.defaultValue=a,u=t.textContent,u===a&&u!==""&&u!==null&&(t.value=u),nf(t)}function Cl(t,i){if(i){var a=t.firstChild;if(a&&a===t.lastChild&&a.nodeType===3){a.nodeValue=i;return}}t.textContent=i}var y2=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 mg(t,i,a){var u=i.indexOf("--")===0;a==null||typeof a=="boolean"||a===""?u?t.setProperty(i,""):i==="float"?t.cssFloat="":t[i]="":u?t.setProperty(i,a):typeof a!="number"||a===0||y2.has(i)?i==="float"?t.cssFloat=a:t[i]=(""+a).trim():t[i]=a+"px"}function pg(t,i,a){if(i!=null&&typeof i!="object")throw Error(l(62));if(t=t.style,a!=null){for(var u in a)!a.hasOwnProperty(u)||i!=null&&i.hasOwnProperty(u)||(u.indexOf("--")===0?t.setProperty(u,""):u==="float"?t.cssFloat="":t[u]="");for(var m in i)u=i[m],i.hasOwnProperty(m)&&a[m]!==u&&mg(t,m,u)}else for(var y in i)i.hasOwnProperty(y)&&mg(t,y,i[y])}function af(t){if(t.indexOf("-")===-1)return!1;switch(t){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 x2=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"]]),v2=/^[\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 hs(t){return v2.test(""+t)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":t}function Tr(){}var of=null;function sf(t){return t=t.target||t.srcElement||window,t.correspondingUseElement&&(t=t.correspondingUseElement),t.nodeType===3?t.parentNode:t}var El=null,kl=null;function gg(t){var i=vl(t);if(i&&(t=i.stateNode)){var a=t[ln]||null;e:switch(t=i.stateNode,i.type){case"input":if(rf(t,a.value,a.defaultValue,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name),i=a.name,a.type==="radio"&&i!=null){for(a=t;a.parentNode;)a=a.parentNode;for(a=a.querySelectorAll('input[name="'+On(""+i)+'"][type="radio"]'),i=0;i<a.length;i++){var u=a[i];if(u!==t&&u.form===t.form){var m=u[ln]||null;if(!m)throw Error(l(90));rf(u,m.value,m.defaultValue,m.defaultValue,m.checked,m.defaultChecked,m.type,m.name)}}for(i=0;i<a.length;i++)u=a[i],u.form===t.form&&cg(u)}break e;case"textarea":dg(t,a.value,a.defaultValue);break e;case"select":i=a.value,i!=null&&Sl(t,!!a.multiple,i,!1)}}}var uf=!1;function yg(t,i,a){if(uf)return t(i,a);uf=!0;try{var u=t(i);return u}finally{if(uf=!1,(El!==null||kl!==null)&&(eu(),El&&(i=El,t=kl,kl=El=null,gg(i),t)))for(i=0;i<t.length;i++)gg(t[i])}}function Ma(t,i){var a=t.stateNode;if(a===null)return null;var u=a[ln]||null;if(u===null)return null;a=u[i];e:switch(i){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(u=!u.disabled)||(t=t.type,u=!(t==="button"||t==="input"||t==="select"||t==="textarea")),t=!u;break e;default:t=!1}if(t)return null;if(a&&typeof a!="function")throw Error(l(231,i,typeof a));return a}var Ar=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),cf=!1;if(Ar)try{var ja={};Object.defineProperty(ja,"passive",{get:function(){cf=!0}}),window.addEventListener("test",ja,ja),window.removeEventListener("test",ja,ja)}catch{cf=!1}var ti=null,ff=null,ms=null;function xg(){if(ms)return ms;var t,i=ff,a=i.length,u,m="value"in ti?ti.value:ti.textContent,y=m.length;for(t=0;t<a&&i[t]===m[t];t++);var S=a-t;for(u=1;u<=S&&i[a-u]===m[y-u];u++);return ms=m.slice(t,1<u?1-u:void 0)}function ps(t){var i=t.keyCode;return"charCode"in t?(t=t.charCode,t===0&&i===13&&(t=13)):t=i,t===10&&(t=13),32<=t||t===13?t:0}function gs(){return!0}function vg(){return!1}function an(t){function i(a,u,m,y,S){this._reactName=a,this._targetInst=m,this.type=u,this.nativeEvent=y,this.target=S,this.currentTarget=null;for(var R in t)t.hasOwnProperty(R)&&(a=t[R],this[R]=a?a(y):y[R]);return this.isDefaultPrevented=(y.defaultPrevented!=null?y.defaultPrevented:y.returnValue===!1)?gs:vg,this.isPropagationStopped=vg,this}return p(i.prototype,{preventDefault:function(){this.defaultPrevented=!0;var a=this.nativeEvent;a&&(a.preventDefault?a.preventDefault():typeof a.returnValue!="unknown"&&(a.returnValue=!1),this.isDefaultPrevented=gs)},stopPropagation:function(){var a=this.nativeEvent;a&&(a.stopPropagation?a.stopPropagation():typeof a.cancelBubble!="unknown"&&(a.cancelBubble=!0),this.isPropagationStopped=gs)},persist:function(){},isPersistent:gs}),i}var Hi={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(t){return t.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},ys=an(Hi),_a=p({},Hi,{view:0,detail:0}),b2=an(_a),df,hf,Oa,xs=p({},_a,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:pf,button:0,buttons:0,relatedTarget:function(t){return t.relatedTarget===void 0?t.fromElement===t.srcElement?t.toElement:t.fromElement:t.relatedTarget},movementX:function(t){return"movementX"in t?t.movementX:(t!==Oa&&(Oa&&t.type==="mousemove"?(df=t.screenX-Oa.screenX,hf=t.screenY-Oa.screenY):hf=df=0,Oa=t),df)},movementY:function(t){return"movementY"in t?t.movementY:hf}}),bg=an(xs),w2=p({},xs,{dataTransfer:0}),S2=an(w2),C2=p({},_a,{relatedTarget:0}),mf=an(C2),E2=p({},Hi,{animationName:0,elapsedTime:0,pseudoElement:0}),k2=an(E2),N2=p({},Hi,{clipboardData:function(t){return"clipboardData"in t?t.clipboardData:window.clipboardData}}),R2=an(N2),T2=p({},Hi,{data:0}),wg=an(T2),A2={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},M2={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"},j2={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function _2(t){var i=this.nativeEvent;return i.getModifierState?i.getModifierState(t):(t=j2[t])?!!i[t]:!1}function pf(){return _2}var O2=p({},_a,{key:function(t){if(t.key){var i=A2[t.key]||t.key;if(i!=="Unidentified")return i}return t.type==="keypress"?(t=ps(t),t===13?"Enter":String.fromCharCode(t)):t.type==="keydown"||t.type==="keyup"?M2[t.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:pf,charCode:function(t){return t.type==="keypress"?ps(t):0},keyCode:function(t){return t.type==="keydown"||t.type==="keyup"?t.keyCode:0},which:function(t){return t.type==="keypress"?ps(t):t.type==="keydown"||t.type==="keyup"?t.keyCode:0}}),D2=an(O2),z2=p({},xs,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Sg=an(z2),L2=p({},_a,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:pf}),P2=an(L2),B2=p({},Hi,{propertyName:0,elapsedTime:0,pseudoElement:0}),I2=an(B2),U2=p({},xs,{deltaX:function(t){return"deltaX"in t?t.deltaX:"wheelDeltaX"in t?-t.wheelDeltaX:0},deltaY:function(t){return"deltaY"in t?t.deltaY:"wheelDeltaY"in t?-t.wheelDeltaY:"wheelDelta"in t?-t.wheelDelta:0},deltaZ:0,deltaMode:0}),H2=an(U2),F2=p({},Hi,{newState:0,oldState:0}),q2=an(F2),G2=[9,13,27,32],gf=Ar&&"CompositionEvent"in window,Da=null;Ar&&"documentMode"in document&&(Da=document.documentMode);var V2=Ar&&"TextEvent"in window&&!Da,Cg=Ar&&(!gf||Da&&8<Da&&11>=Da),Eg=" ",kg=!1;function Ng(t,i){switch(t){case"keyup":return G2.indexOf(i.keyCode)!==-1;case"keydown":return i.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Rg(t){return t=t.detail,typeof t=="object"&&"data"in t?t.data:null}var Nl=!1;function $2(t,i){switch(t){case"compositionend":return Rg(i);case"keypress":return i.which!==32?null:(kg=!0,Eg);case"textInput":return t=i.data,t===Eg&&kg?null:t;default:return null}}function Y2(t,i){if(Nl)return t==="compositionend"||!gf&&Ng(t,i)?(t=xg(),ms=ff=ti=null,Nl=!1,t):null;switch(t){case"paste":return null;case"keypress":if(!(i.ctrlKey||i.altKey||i.metaKey)||i.ctrlKey&&i.altKey){if(i.char&&1<i.char.length)return i.char;if(i.which)return String.fromCharCode(i.which)}return null;case"compositionend":return Cg&&i.locale!=="ko"?null:i.data;default:return null}}var X2={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 Tg(t){var i=t&&t.nodeName&&t.nodeName.toLowerCase();return i==="input"?!!X2[t.type]:i==="textarea"}function Ag(t,i,a,u){El?kl?kl.push(u):kl=[u]:El=u,i=ou(i,"onChange"),0<i.length&&(a=new ys("onChange","change",null,a,u),t.push({event:a,listeners:i}))}var za=null,La=null;function K2(t){fv(t,0)}function vs(t){var i=Aa(t);if(cg(i))return t}function Mg(t,i){if(t==="change")return i}var jg=!1;if(Ar){var yf;if(Ar){var xf="oninput"in document;if(!xf){var _g=document.createElement("div");_g.setAttribute("oninput","return;"),xf=typeof _g.oninput=="function"}yf=xf}else yf=!1;jg=yf&&(!document.documentMode||9<document.documentMode)}function Og(){za&&(za.detachEvent("onpropertychange",Dg),La=za=null)}function Dg(t){if(t.propertyName==="value"&&vs(La)){var i=[];Ag(i,La,t,sf(t)),yg(K2,i)}}function Q2(t,i,a){t==="focusin"?(Og(),za=i,La=a,za.attachEvent("onpropertychange",Dg)):t==="focusout"&&Og()}function Z2(t){if(t==="selectionchange"||t==="keyup"||t==="keydown")return vs(La)}function W2(t,i){if(t==="click")return vs(i)}function J2(t,i){if(t==="input"||t==="change")return vs(i)}function ek(t,i){return t===i&&(t!==0||1/t===1/i)||t!==t&&i!==i}var yn=typeof Object.is=="function"?Object.is:ek;function Pa(t,i){if(yn(t,i))return!0;if(typeof t!="object"||t===null||typeof i!="object"||i===null)return!1;var a=Object.keys(t),u=Object.keys(i);if(a.length!==u.length)return!1;for(u=0;u<a.length;u++){var m=a[u];if(!Bt.call(i,m)||!yn(t[m],i[m]))return!1}return!0}function zg(t){for(;t&&t.firstChild;)t=t.firstChild;return t}function Lg(t,i){var a=zg(t);t=0;for(var u;a;){if(a.nodeType===3){if(u=t+a.textContent.length,t<=i&&u>=i)return{node:a,offset:i-t};t=u}e:{for(;a;){if(a.nextSibling){a=a.nextSibling;break e}a=a.parentNode}a=void 0}a=zg(a)}}function Pg(t,i){return t&&i?t===i?!0:t&&t.nodeType===3?!1:i&&i.nodeType===3?Pg(t,i.parentNode):"contains"in t?t.contains(i):t.compareDocumentPosition?!!(t.compareDocumentPosition(i)&16):!1:!1}function Bg(t){t=t!=null&&t.ownerDocument!=null&&t.ownerDocument.defaultView!=null?t.ownerDocument.defaultView:window;for(var i=ds(t.document);i instanceof t.HTMLIFrameElement;){try{var a=typeof i.contentWindow.location.href=="string"}catch{a=!1}if(a)t=i.contentWindow;else break;i=ds(t.document)}return i}function vf(t){var i=t&&t.nodeName&&t.nodeName.toLowerCase();return i&&(i==="input"&&(t.type==="text"||t.type==="search"||t.type==="tel"||t.type==="url"||t.type==="password")||i==="textarea"||t.contentEditable==="true")}var tk=Ar&&"documentMode"in document&&11>=document.documentMode,Rl=null,bf=null,Ba=null,wf=!1;function Ig(t,i,a){var u=a.window===a?a.document:a.nodeType===9?a:a.ownerDocument;wf||Rl==null||Rl!==ds(u)||(u=Rl,"selectionStart"in u&&vf(u)?u={start:u.selectionStart,end:u.selectionEnd}:(u=(u.ownerDocument&&u.ownerDocument.defaultView||window).getSelection(),u={anchorNode:u.anchorNode,anchorOffset:u.anchorOffset,focusNode:u.focusNode,focusOffset:u.focusOffset}),Ba&&Pa(Ba,u)||(Ba=u,u=ou(bf,"onSelect"),0<u.length&&(i=new ys("onSelect","select",null,i,a),t.push({event:i,listeners:u}),i.target=Rl)))}function Fi(t,i){var a={};return a[t.toLowerCase()]=i.toLowerCase(),a["Webkit"+t]="webkit"+i,a["Moz"+t]="moz"+i,a}var Tl={animationend:Fi("Animation","AnimationEnd"),animationiteration:Fi("Animation","AnimationIteration"),animationstart:Fi("Animation","AnimationStart"),transitionrun:Fi("Transition","TransitionRun"),transitionstart:Fi("Transition","TransitionStart"),transitioncancel:Fi("Transition","TransitionCancel"),transitionend:Fi("Transition","TransitionEnd")},Sf={},Ug={};Ar&&(Ug=document.createElement("div").style,"AnimationEvent"in window||(delete Tl.animationend.animation,delete Tl.animationiteration.animation,delete Tl.animationstart.animation),"TransitionEvent"in window||delete Tl.transitionend.transition);function qi(t){if(Sf[t])return Sf[t];if(!Tl[t])return t;var i=Tl[t],a;for(a in i)if(i.hasOwnProperty(a)&&a in Ug)return Sf[t]=i[a];return t}var Hg=qi("animationend"),Fg=qi("animationiteration"),qg=qi("animationstart"),nk=qi("transitionrun"),rk=qi("transitionstart"),ik=qi("transitioncancel"),Gg=qi("transitionend"),Vg=new Map,Cf="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(" ");Cf.push("scrollEnd");function Zn(t,i){Vg.set(t,i),Ui(i,[t])}var bs=typeof reportError=="function"?reportError:function(t){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var i=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof t=="object"&&t!==null&&typeof t.message=="string"?String(t.message):String(t),error:t});if(!window.dispatchEvent(i))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",t);return}console.error(t)},Dn=[],Al=0,Ef=0;function ws(){for(var t=Al,i=Ef=Al=0;i<t;){var a=Dn[i];Dn[i++]=null;var u=Dn[i];Dn[i++]=null;var m=Dn[i];Dn[i++]=null;var y=Dn[i];if(Dn[i++]=null,u!==null&&m!==null){var S=u.pending;S===null?m.next=m:(m.next=S.next,S.next=m),u.pending=m}y!==0&&$g(a,m,y)}}function Ss(t,i,a,u){Dn[Al++]=t,Dn[Al++]=i,Dn[Al++]=a,Dn[Al++]=u,Ef|=u,t.lanes|=u,t=t.alternate,t!==null&&(t.lanes|=u)}function kf(t,i,a,u){return Ss(t,i,a,u),Cs(t)}function Gi(t,i){return Ss(t,null,null,i),Cs(t)}function $g(t,i,a){t.lanes|=a;var u=t.alternate;u!==null&&(u.lanes|=a);for(var m=!1,y=t.return;y!==null;)y.childLanes|=a,u=y.alternate,u!==null&&(u.childLanes|=a),y.tag===22&&(t=y.stateNode,t===null||t._visibility&1||(m=!0)),t=y,y=y.return;return t.tag===3?(y=t.stateNode,m&&i!==null&&(m=31-Xe(a),t=y.hiddenUpdates,u=t[m],u===null?t[m]=[i]:u.push(i),i.lane=a|536870912),y):null}function Cs(t){if(50<ao)throw ao=0,Dd=null,Error(l(185));for(var i=t.return;i!==null;)t=i,i=t.return;return t.tag===3?t.stateNode:null}var Ml={};function lk(t,i,a,u){this.tag=t,this.key=a,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=i,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=u,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function xn(t,i,a,u){return new lk(t,i,a,u)}function Nf(t){return t=t.prototype,!(!t||!t.isReactComponent)}function Mr(t,i){var a=t.alternate;return a===null?(a=xn(t.tag,i,t.key,t.mode),a.elementType=t.elementType,a.type=t.type,a.stateNode=t.stateNode,a.alternate=t,t.alternate=a):(a.pendingProps=i,a.type=t.type,a.flags=0,a.subtreeFlags=0,a.deletions=null),a.flags=t.flags&65011712,a.childLanes=t.childLanes,a.lanes=t.lanes,a.child=t.child,a.memoizedProps=t.memoizedProps,a.memoizedState=t.memoizedState,a.updateQueue=t.updateQueue,i=t.dependencies,a.dependencies=i===null?null:{lanes:i.lanes,firstContext:i.firstContext},a.sibling=t.sibling,a.index=t.index,a.ref=t.ref,a.refCleanup=t.refCleanup,a}function Yg(t,i){t.flags&=65011714;var a=t.alternate;return a===null?(t.childLanes=0,t.lanes=i,t.child=null,t.subtreeFlags=0,t.memoizedProps=null,t.memoizedState=null,t.updateQueue=null,t.dependencies=null,t.stateNode=null):(t.childLanes=a.childLanes,t.lanes=a.lanes,t.child=a.child,t.subtreeFlags=0,t.deletions=null,t.memoizedProps=a.memoizedProps,t.memoizedState=a.memoizedState,t.updateQueue=a.updateQueue,t.type=a.type,i=a.dependencies,t.dependencies=i===null?null:{lanes:i.lanes,firstContext:i.firstContext}),t}function Es(t,i,a,u,m,y){var S=0;if(u=t,typeof t=="function")Nf(t)&&(S=1);else if(typeof t=="string")S=cN(t,a,Z.current)?26:t==="html"||t==="head"||t==="body"?27:5;else e:switch(t){case ne:return t=xn(31,a,i,m),t.elementType=ne,t.lanes=y,t;case C:return Vi(a.children,m,y,i);case k:S=8,m|=24;break;case N:return t=xn(12,a,i,m|2),t.elementType=N,t.lanes=y,t;case U:return t=xn(13,a,i,m),t.elementType=U,t.lanes=y,t;case _:return t=xn(19,a,i,m),t.elementType=_,t.lanes=y,t;default:if(typeof t=="object"&&t!==null)switch(t.$$typeof){case M:S=10;break e;case j:S=9;break e;case z:S=11;break e;case P:S=14;break e;case F:S=16,u=null;break e}S=29,a=Error(l(130,t===null?"null":typeof t,"")),u=null}return i=xn(S,a,i,m),i.elementType=t,i.type=u,i.lanes=y,i}function Vi(t,i,a,u){return t=xn(7,t,u,i),t.lanes=a,t}function Rf(t,i,a){return t=xn(6,t,null,i),t.lanes=a,t}function Xg(t){var i=xn(18,null,null,0);return i.stateNode=t,i}function Tf(t,i,a){return i=xn(4,t.children!==null?t.children:[],t.key,i),i.lanes=a,i.stateNode={containerInfo:t.containerInfo,pendingChildren:null,implementation:t.implementation},i}var Kg=new WeakMap;function zn(t,i){if(typeof t=="object"&&t!==null){var a=Kg.get(t);return a!==void 0?a:(i={value:t,source:i,stack:Xn(i)},Kg.set(t,i),i)}return{value:t,source:i,stack:Xn(i)}}var jl=[],_l=0,ks=null,Ia=0,Ln=[],Pn=0,ni=null,cr=1,fr="";function jr(t,i){jl[_l++]=Ia,jl[_l++]=ks,ks=t,Ia=i}function Qg(t,i,a){Ln[Pn++]=cr,Ln[Pn++]=fr,Ln[Pn++]=ni,ni=t;var u=cr;t=fr;var m=32-Xe(u)-1;u&=~(1<<m),a+=1;var y=32-Xe(i)+m;if(30<y){var S=m-m%5;y=(u&(1<<S)-1).toString(32),u>>=S,m-=S,cr=1<<32-Xe(i)+m|a<<m|u,fr=y+t}else cr=1<<y|a<<m|u,fr=t}function Af(t){t.return!==null&&(jr(t,1),Qg(t,1,0))}function Mf(t){for(;t===ks;)ks=jl[--_l],jl[_l]=null,Ia=jl[--_l],jl[_l]=null;for(;t===ni;)ni=Ln[--Pn],Ln[Pn]=null,fr=Ln[--Pn],Ln[Pn]=null,cr=Ln[--Pn],Ln[Pn]=null}function Zg(t,i){Ln[Pn++]=cr,Ln[Pn++]=fr,Ln[Pn++]=ni,cr=i.id,fr=i.overflow,ni=t}var Ft=null,at=null,Ue=!1,ri=null,Bn=!1,jf=Error(l(519));function ii(t){var i=Error(l(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Ua(zn(i,t)),jf}function Wg(t){var i=t.stateNode,a=t.type,u=t.memoizedProps;switch(i[Ht]=t,i[ln]=u,a){case"dialog":Le("cancel",i),Le("close",i);break;case"iframe":case"object":case"embed":Le("load",i);break;case"video":case"audio":for(a=0;a<so.length;a++)Le(so[a],i);break;case"source":Le("error",i);break;case"img":case"image":case"link":Le("error",i),Le("load",i);break;case"details":Le("toggle",i);break;case"input":Le("invalid",i),fg(i,u.value,u.defaultValue,u.checked,u.defaultChecked,u.type,u.name,!0);break;case"select":Le("invalid",i);break;case"textarea":Le("invalid",i),hg(i,u.value,u.defaultValue,u.children)}a=u.children,typeof a!="string"&&typeof a!="number"&&typeof a!="bigint"||i.textContent===""+a||u.suppressHydrationWarning===!0||pv(i.textContent,a)?(u.popover!=null&&(Le("beforetoggle",i),Le("toggle",i)),u.onScroll!=null&&Le("scroll",i),u.onScrollEnd!=null&&Le("scrollend",i),u.onClick!=null&&(i.onclick=Tr),i=!0):i=!1,i||ii(t,!0)}function Jg(t){for(Ft=t.return;Ft;)switch(Ft.tag){case 5:case 31:case 13:Bn=!1;return;case 27:case 3:Bn=!0;return;default:Ft=Ft.return}}function Ol(t){if(t!==Ft)return!1;if(!Ue)return Jg(t),Ue=!0,!1;var i=t.tag,a;if((a=i!==3&&i!==27)&&((a=i===5)&&(a=t.type,a=!(a!=="form"&&a!=="button")||Kd(t.type,t.memoizedProps)),a=!a),a&&at&&ii(t),Jg(t),i===13){if(t=t.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(l(317));at=Ev(t)}else if(i===31){if(t=t.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(l(317));at=Ev(t)}else i===27?(i=at,xi(t.type)?(t=eh,eh=null,at=t):at=i):at=Ft?Un(t.stateNode.nextSibling):null;return!0}function $i(){at=Ft=null,Ue=!1}function _f(){var t=ri;return t!==null&&(cn===null?cn=t:cn.push.apply(cn,t),ri=null),t}function Ua(t){ri===null?ri=[t]:ri.push(t)}var Of=O(null),Yi=null,_r=null;function li(t,i,a){A(Of,i._currentValue),i._currentValue=a}function Or(t){t._currentValue=Of.current,D(Of)}function Df(t,i,a){for(;t!==null;){var u=t.alternate;if((t.childLanes&i)!==i?(t.childLanes|=i,u!==null&&(u.childLanes|=i)):u!==null&&(u.childLanes&i)!==i&&(u.childLanes|=i),t===a)break;t=t.return}}function zf(t,i,a,u){var m=t.child;for(m!==null&&(m.return=t);m!==null;){var y=m.dependencies;if(y!==null){var S=m.child;y=y.firstContext;e:for(;y!==null;){var R=y;y=m;for(var L=0;L<i.length;L++)if(R.context===i[L]){y.lanes|=a,R=y.alternate,R!==null&&(R.lanes|=a),Df(y.return,a,t),u||(S=null);break e}y=R.next}}else if(m.tag===18){if(S=m.return,S===null)throw Error(l(341));S.lanes|=a,y=S.alternate,y!==null&&(y.lanes|=a),Df(S,a,t),S=null}else S=m.child;if(S!==null)S.return=m;else for(S=m;S!==null;){if(S===t){S=null;break}if(m=S.sibling,m!==null){m.return=S.return,S=m;break}S=S.return}m=S}}function Dl(t,i,a,u){t=null;for(var m=i,y=!1;m!==null;){if(!y){if((m.flags&524288)!==0)y=!0;else if((m.flags&262144)!==0)break}if(m.tag===10){var S=m.alternate;if(S===null)throw Error(l(387));if(S=S.memoizedProps,S!==null){var R=m.type;yn(m.pendingProps.value,S.value)||(t!==null?t.push(R):t=[R])}}else if(m===me.current){if(S=m.alternate,S===null)throw Error(l(387));S.memoizedState.memoizedState!==m.memoizedState.memoizedState&&(t!==null?t.push(mo):t=[mo])}m=m.return}t!==null&&zf(i,t,a,u),i.flags|=262144}function Ns(t){for(t=t.firstContext;t!==null;){if(!yn(t.context._currentValue,t.memoizedValue))return!0;t=t.next}return!1}function Xi(t){Yi=t,_r=null,t=t.dependencies,t!==null&&(t.firstContext=null)}function qt(t){return ey(Yi,t)}function Rs(t,i){return Yi===null&&Xi(t),ey(t,i)}function ey(t,i){var a=i._currentValue;if(i={context:i,memoizedValue:a,next:null},_r===null){if(t===null)throw Error(l(308));_r=i,t.dependencies={lanes:0,firstContext:i},t.flags|=524288}else _r=_r.next=i;return a}var ak=typeof AbortController<"u"?AbortController:function(){var t=[],i=this.signal={aborted:!1,addEventListener:function(a,u){t.push(u)}};this.abort=function(){i.aborted=!0,t.forEach(function(a){return a()})}},ok=e.unstable_scheduleCallback,sk=e.unstable_NormalPriority,wt={$$typeof:M,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Lf(){return{controller:new ak,data:new Map,refCount:0}}function Ha(t){t.refCount--,t.refCount===0&&ok(sk,function(){t.controller.abort()})}var Fa=null,Pf=0,zl=0,Ll=null;function uk(t,i){if(Fa===null){var a=Fa=[];Pf=0,zl=Ud(),Ll={status:"pending",value:void 0,then:function(u){a.push(u)}}}return Pf++,i.then(ty,ty),i}function ty(){if(--Pf===0&&Fa!==null){Ll!==null&&(Ll.status="fulfilled");var t=Fa;Fa=null,zl=0,Ll=null;for(var i=0;i<t.length;i++)(0,t[i])()}}function ck(t,i){var a=[],u={status:"pending",value:null,reason:null,then:function(m){a.push(m)}};return t.then(function(){u.status="fulfilled",u.value=i;for(var m=0;m<a.length;m++)(0,a[m])(i)},function(m){for(u.status="rejected",u.reason=m,m=0;m<a.length;m++)(0,a[m])(void 0)}),u}var ny=B.S;B.S=function(t,i){Ix=mt(),typeof i=="object"&&i!==null&&typeof i.then=="function"&&uk(t,i),ny!==null&&ny(t,i)};var Ki=O(null);function Bf(){var t=Ki.current;return t!==null?t:et.pooledCache}function Ts(t,i){i===null?A(Ki,Ki.current):A(Ki,i.pool)}function ry(){var t=Bf();return t===null?null:{parent:wt._currentValue,pool:t}}var Pl=Error(l(460)),If=Error(l(474)),As=Error(l(542)),Ms={then:function(){}};function iy(t){return t=t.status,t==="fulfilled"||t==="rejected"}function ly(t,i,a){switch(a=t[a],a===void 0?t.push(i):a!==i&&(i.then(Tr,Tr),i=a),i.status){case"fulfilled":return i.value;case"rejected":throw t=i.reason,oy(t),t;default:if(typeof i.status=="string")i.then(Tr,Tr);else{if(t=et,t!==null&&100<t.shellSuspendCounter)throw Error(l(482));t=i,t.status="pending",t.then(function(u){if(i.status==="pending"){var m=i;m.status="fulfilled",m.value=u}},function(u){if(i.status==="pending"){var m=i;m.status="rejected",m.reason=u}})}switch(i.status){case"fulfilled":return i.value;case"rejected":throw t=i.reason,oy(t),t}throw Zi=i,Pl}}function Qi(t){try{var i=t._init;return i(t._payload)}catch(a){throw a!==null&&typeof a=="object"&&typeof a.then=="function"?(Zi=a,Pl):a}}var Zi=null;function ay(){if(Zi===null)throw Error(l(459));var t=Zi;return Zi=null,t}function oy(t){if(t===Pl||t===As)throw Error(l(483))}var Bl=null,qa=0;function js(t){var i=qa;return qa+=1,Bl===null&&(Bl=[]),ly(Bl,t,i)}function Ga(t,i){i=i.props.ref,t.ref=i!==void 0?i:null}function _s(t,i){throw i.$$typeof===b?Error(l(525)):(t=Object.prototype.toString.call(i),Error(l(31,t==="[object Object]"?"object with keys {"+Object.keys(i).join(", ")+"}":t)))}function sy(t){function i(q,H){if(t){var G=q.deletions;G===null?(q.deletions=[H],q.flags|=16):G.push(H)}}function a(q,H){if(!t)return null;for(;H!==null;)i(q,H),H=H.sibling;return null}function u(q){for(var H=new Map;q!==null;)q.key!==null?H.set(q.key,q):H.set(q.index,q),q=q.sibling;return H}function m(q,H){return q=Mr(q,H),q.index=0,q.sibling=null,q}function y(q,H,G){return q.index=G,t?(G=q.alternate,G!==null?(G=G.index,G<H?(q.flags|=67108866,H):G):(q.flags|=67108866,H)):(q.flags|=1048576,H)}function S(q){return t&&q.alternate===null&&(q.flags|=67108866),q}function R(q,H,G,ae){return H===null||H.tag!==6?(H=Rf(G,q.mode,ae),H.return=q,H):(H=m(H,G),H.return=q,H)}function L(q,H,G,ae){var Se=G.type;return Se===C?re(q,H,G.props.children,ae,G.key):H!==null&&(H.elementType===Se||typeof Se=="object"&&Se!==null&&Se.$$typeof===F&&Qi(Se)===H.type)?(H=m(H,G.props),Ga(H,G),H.return=q,H):(H=Es(G.type,G.key,G.props,null,q.mode,ae),Ga(H,G),H.return=q,H)}function V(q,H,G,ae){return H===null||H.tag!==4||H.stateNode.containerInfo!==G.containerInfo||H.stateNode.implementation!==G.implementation?(H=Tf(G,q.mode,ae),H.return=q,H):(H=m(H,G.children||[]),H.return=q,H)}function re(q,H,G,ae,Se){return H===null||H.tag!==7?(H=Vi(G,q.mode,ae,Se),H.return=q,H):(H=m(H,G),H.return=q,H)}function oe(q,H,G){if(typeof H=="string"&&H!==""||typeof H=="number"||typeof H=="bigint")return H=Rf(""+H,q.mode,G),H.return=q,H;if(typeof H=="object"&&H!==null){switch(H.$$typeof){case w:return G=Es(H.type,H.key,H.props,null,q.mode,G),Ga(G,H),G.return=q,G;case E:return H=Tf(H,q.mode,G),H.return=q,H;case F:return H=Qi(H),oe(q,H,G)}if(ee(H)||te(H))return H=Vi(H,q.mode,G,null),H.return=q,H;if(typeof H.then=="function")return oe(q,js(H),G);if(H.$$typeof===M)return oe(q,Rs(q,H),G);_s(q,H)}return null}function K(q,H,G,ae){var Se=H!==null?H.key:null;if(typeof G=="string"&&G!==""||typeof G=="number"||typeof G=="bigint")return Se!==null?null:R(q,H,""+G,ae);if(typeof G=="object"&&G!==null){switch(G.$$typeof){case w:return G.key===Se?L(q,H,G,ae):null;case E:return G.key===Se?V(q,H,G,ae):null;case F:return G=Qi(G),K(q,H,G,ae)}if(ee(G)||te(G))return Se!==null?null:re(q,H,G,ae,null);if(typeof G.then=="function")return K(q,H,js(G),ae);if(G.$$typeof===M)return K(q,H,Rs(q,G),ae);_s(q,G)}return null}function W(q,H,G,ae,Se){if(typeof ae=="string"&&ae!==""||typeof ae=="number"||typeof ae=="bigint")return q=q.get(G)||null,R(H,q,""+ae,Se);if(typeof ae=="object"&&ae!==null){switch(ae.$$typeof){case w:return q=q.get(ae.key===null?G:ae.key)||null,L(H,q,ae,Se);case E:return q=q.get(ae.key===null?G:ae.key)||null,V(H,q,ae,Se);case F:return ae=Qi(ae),W(q,H,G,ae,Se)}if(ee(ae)||te(ae))return q=q.get(G)||null,re(H,q,ae,Se,null);if(typeof ae.then=="function")return W(q,H,G,js(ae),Se);if(ae.$$typeof===M)return W(q,H,G,Rs(H,ae),Se);_s(H,ae)}return null}function ge(q,H,G,ae){for(var Se=null,Fe=null,be=H,je=H=0,Ie=null;be!==null&&je<G.length;je++){be.index>je?(Ie=be,be=null):Ie=be.sibling;var qe=K(q,be,G[je],ae);if(qe===null){be===null&&(be=Ie);break}t&&be&&qe.alternate===null&&i(q,be),H=y(qe,H,je),Fe===null?Se=qe:Fe.sibling=qe,Fe=qe,be=Ie}if(je===G.length)return a(q,be),Ue&&jr(q,je),Se;if(be===null){for(;je<G.length;je++)be=oe(q,G[je],ae),be!==null&&(H=y(be,H,je),Fe===null?Se=be:Fe.sibling=be,Fe=be);return Ue&&jr(q,je),Se}for(be=u(be);je<G.length;je++)Ie=W(be,q,je,G[je],ae),Ie!==null&&(t&&Ie.alternate!==null&&be.delete(Ie.key===null?je:Ie.key),H=y(Ie,H,je),Fe===null?Se=Ie:Fe.sibling=Ie,Fe=Ie);return t&&be.forEach(function(Ci){return i(q,Ci)}),Ue&&jr(q,je),Se}function Re(q,H,G,ae){if(G==null)throw Error(l(151));for(var Se=null,Fe=null,be=H,je=H=0,Ie=null,qe=G.next();be!==null&&!qe.done;je++,qe=G.next()){be.index>je?(Ie=be,be=null):Ie=be.sibling;var Ci=K(q,be,qe.value,ae);if(Ci===null){be===null&&(be=Ie);break}t&&be&&Ci.alternate===null&&i(q,be),H=y(Ci,H,je),Fe===null?Se=Ci:Fe.sibling=Ci,Fe=Ci,be=Ie}if(qe.done)return a(q,be),Ue&&jr(q,je),Se;if(be===null){for(;!qe.done;je++,qe=G.next())qe=oe(q,qe.value,ae),qe!==null&&(H=y(qe,H,je),Fe===null?Se=qe:Fe.sibling=qe,Fe=qe);return Ue&&jr(q,je),Se}for(be=u(be);!qe.done;je++,qe=G.next())qe=W(be,q,je,qe.value,ae),qe!==null&&(t&&qe.alternate!==null&&be.delete(qe.key===null?je:qe.key),H=y(qe,H,je),Fe===null?Se=qe:Fe.sibling=qe,Fe=qe);return t&&be.forEach(function(wN){return i(q,wN)}),Ue&&jr(q,je),Se}function Je(q,H,G,ae){if(typeof G=="object"&&G!==null&&G.type===C&&G.key===null&&(G=G.props.children),typeof G=="object"&&G!==null){switch(G.$$typeof){case w:e:{for(var Se=G.key;H!==null;){if(H.key===Se){if(Se=G.type,Se===C){if(H.tag===7){a(q,H.sibling),ae=m(H,G.props.children),ae.return=q,q=ae;break e}}else if(H.elementType===Se||typeof Se=="object"&&Se!==null&&Se.$$typeof===F&&Qi(Se)===H.type){a(q,H.sibling),ae=m(H,G.props),Ga(ae,G),ae.return=q,q=ae;break e}a(q,H);break}else i(q,H);H=H.sibling}G.type===C?(ae=Vi(G.props.children,q.mode,ae,G.key),ae.return=q,q=ae):(ae=Es(G.type,G.key,G.props,null,q.mode,ae),Ga(ae,G),ae.return=q,q=ae)}return S(q);case E:e:{for(Se=G.key;H!==null;){if(H.key===Se)if(H.tag===4&&H.stateNode.containerInfo===G.containerInfo&&H.stateNode.implementation===G.implementation){a(q,H.sibling),ae=m(H,G.children||[]),ae.return=q,q=ae;break e}else{a(q,H);break}else i(q,H);H=H.sibling}ae=Tf(G,q.mode,ae),ae.return=q,q=ae}return S(q);case F:return G=Qi(G),Je(q,H,G,ae)}if(ee(G))return ge(q,H,G,ae);if(te(G)){if(Se=te(G),typeof Se!="function")throw Error(l(150));return G=Se.call(G),Re(q,H,G,ae)}if(typeof G.then=="function")return Je(q,H,js(G),ae);if(G.$$typeof===M)return Je(q,H,Rs(q,G),ae);_s(q,G)}return typeof G=="string"&&G!==""||typeof G=="number"||typeof G=="bigint"?(G=""+G,H!==null&&H.tag===6?(a(q,H.sibling),ae=m(H,G),ae.return=q,q=ae):(a(q,H),ae=Rf(G,q.mode,ae),ae.return=q,q=ae),S(q)):a(q,H)}return function(q,H,G,ae){try{qa=0;var Se=Je(q,H,G,ae);return Bl=null,Se}catch(be){if(be===Pl||be===As)throw be;var Fe=xn(29,be,null,q.mode);return Fe.lanes=ae,Fe.return=q,Fe}finally{}}}var Wi=sy(!0),uy=sy(!1),ai=!1;function Uf(t){t.updateQueue={baseState:t.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Hf(t,i){t=t.updateQueue,i.updateQueue===t&&(i.updateQueue={baseState:t.baseState,firstBaseUpdate:t.firstBaseUpdate,lastBaseUpdate:t.lastBaseUpdate,shared:t.shared,callbacks:null})}function oi(t){return{lane:t,tag:0,payload:null,callback:null,next:null}}function si(t,i,a){var u=t.updateQueue;if(u===null)return null;if(u=u.shared,(Ge&2)!==0){var m=u.pending;return m===null?i.next=i:(i.next=m.next,m.next=i),u.pending=i,i=Cs(t),$g(t,null,a),i}return Ss(t,u,i,a),Cs(t)}function Va(t,i,a){if(i=i.updateQueue,i!==null&&(i=i.shared,(a&4194048)!==0)){var u=i.lanes;u&=t.pendingLanes,a|=u,i.lanes=a,gn(t,a)}}function Ff(t,i){var a=t.updateQueue,u=t.alternate;if(u!==null&&(u=u.updateQueue,a===u)){var m=null,y=null;if(a=a.firstBaseUpdate,a!==null){do{var S={lane:a.lane,tag:a.tag,payload:a.payload,callback:null,next:null};y===null?m=y=S:y=y.next=S,a=a.next}while(a!==null);y===null?m=y=i:y=y.next=i}else m=y=i;a={baseState:u.baseState,firstBaseUpdate:m,lastBaseUpdate:y,shared:u.shared,callbacks:u.callbacks},t.updateQueue=a;return}t=a.lastBaseUpdate,t===null?a.firstBaseUpdate=i:t.next=i,a.lastBaseUpdate=i}var qf=!1;function $a(){if(qf){var t=Ll;if(t!==null)throw t}}function Ya(t,i,a,u){qf=!1;var m=t.updateQueue;ai=!1;var y=m.firstBaseUpdate,S=m.lastBaseUpdate,R=m.shared.pending;if(R!==null){m.shared.pending=null;var L=R,V=L.next;L.next=null,S===null?y=V:S.next=V,S=L;var re=t.alternate;re!==null&&(re=re.updateQueue,R=re.lastBaseUpdate,R!==S&&(R===null?re.firstBaseUpdate=V:R.next=V,re.lastBaseUpdate=L))}if(y!==null){var oe=m.baseState;S=0,re=V=L=null,R=y;do{var K=R.lane&-536870913,W=K!==R.lane;if(W?(Be&K)===K:(u&K)===K){K!==0&&K===zl&&(qf=!0),re!==null&&(re=re.next={lane:0,tag:R.tag,payload:R.payload,callback:null,next:null});e:{var ge=t,Re=R;K=i;var Je=a;switch(Re.tag){case 1:if(ge=Re.payload,typeof ge=="function"){oe=ge.call(Je,oe,K);break e}oe=ge;break e;case 3:ge.flags=ge.flags&-65537|128;case 0:if(ge=Re.payload,K=typeof ge=="function"?ge.call(Je,oe,K):ge,K==null)break e;oe=p({},oe,K);break e;case 2:ai=!0}}K=R.callback,K!==null&&(t.flags|=64,W&&(t.flags|=8192),W=m.callbacks,W===null?m.callbacks=[K]:W.push(K))}else W={lane:K,tag:R.tag,payload:R.payload,callback:R.callback,next:null},re===null?(V=re=W,L=oe):re=re.next=W,S|=K;if(R=R.next,R===null){if(R=m.shared.pending,R===null)break;W=R,R=W.next,W.next=null,m.lastBaseUpdate=W,m.shared.pending=null}}while(!0);re===null&&(L=oe),m.baseState=L,m.firstBaseUpdate=V,m.lastBaseUpdate=re,y===null&&(m.shared.lanes=0),hi|=S,t.lanes=S,t.memoizedState=oe}}function cy(t,i){if(typeof t!="function")throw Error(l(191,t));t.call(i)}function fy(t,i){var a=t.callbacks;if(a!==null)for(t.callbacks=null,t=0;t<a.length;t++)cy(a[t],i)}var Il=O(null),Os=O(0);function dy(t,i){t=Fr,A(Os,t),A(Il,i),Fr=t|i.baseLanes}function Gf(){A(Os,Fr),A(Il,Il.current)}function Vf(){Fr=Os.current,D(Il),D(Os)}var vn=O(null),In=null;function ui(t){var i=t.alternate;A(xt,xt.current&1),A(vn,t),In===null&&(i===null||Il.current!==null||i.memoizedState!==null)&&(In=t)}function $f(t){A(xt,xt.current),A(vn,t),In===null&&(In=t)}function hy(t){t.tag===22?(A(xt,xt.current),A(vn,t),In===null&&(In=t)):ci()}function ci(){A(xt,xt.current),A(vn,vn.current)}function bn(t){D(vn),In===t&&(In=null),D(xt)}var xt=O(0);function Ds(t){for(var i=t;i!==null;){if(i.tag===13){var a=i.memoizedState;if(a!==null&&(a=a.dehydrated,a===null||Wd(a)||Jd(a)))return i}else if(i.tag===19&&(i.memoizedProps.revealOrder==="forwards"||i.memoizedProps.revealOrder==="backwards"||i.memoizedProps.revealOrder==="unstable_legacy-backwards"||i.memoizedProps.revealOrder==="together")){if((i.flags&128)!==0)return i}else if(i.child!==null){i.child.return=i,i=i.child;continue}if(i===t)break;for(;i.sibling===null;){if(i.return===null||i.return===t)return null;i=i.return}i.sibling.return=i.return,i=i.sibling}return null}var Dr=0,Me=null,Ze=null,St=null,zs=!1,Ul=!1,Ji=!1,Ls=0,Xa=0,Hl=null,fk=0;function dt(){throw Error(l(321))}function Yf(t,i){if(i===null)return!1;for(var a=0;a<i.length&&a<t.length;a++)if(!yn(t[a],i[a]))return!1;return!0}function Xf(t,i,a,u,m,y){return Dr=y,Me=i,i.memoizedState=null,i.updateQueue=null,i.lanes=0,B.H=t===null||t.memoizedState===null?Qy:ud,Ji=!1,y=a(u,m),Ji=!1,Ul&&(y=py(i,a,u,m)),my(t),y}function my(t){B.H=Za;var i=Ze!==null&&Ze.next!==null;if(Dr=0,St=Ze=Me=null,zs=!1,Xa=0,Hl=null,i)throw Error(l(300));t===null||Ct||(t=t.dependencies,t!==null&&Ns(t)&&(Ct=!0))}function py(t,i,a,u){Me=t;var m=0;do{if(Ul&&(Hl=null),Xa=0,Ul=!1,25<=m)throw Error(l(301));if(m+=1,St=Ze=null,t.updateQueue!=null){var y=t.updateQueue;y.lastEffect=null,y.events=null,y.stores=null,y.memoCache!=null&&(y.memoCache.index=0)}B.H=Zy,y=i(a,u)}while(Ul);return y}function dk(){var t=B.H,i=t.useState()[0];return i=typeof i.then=="function"?Ka(i):i,t=t.useState()[0],(Ze!==null?Ze.memoizedState:null)!==t&&(Me.flags|=1024),i}function Kf(){var t=Ls!==0;return Ls=0,t}function Qf(t,i,a){i.updateQueue=t.updateQueue,i.flags&=-2053,t.lanes&=~a}function Zf(t){if(zs){for(t=t.memoizedState;t!==null;){var i=t.queue;i!==null&&(i.pending=null),t=t.next}zs=!1}Dr=0,St=Ze=Me=null,Ul=!1,Xa=Ls=0,Hl=null}function Qt(){var t={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return St===null?Me.memoizedState=St=t:St=St.next=t,St}function vt(){if(Ze===null){var t=Me.alternate;t=t!==null?t.memoizedState:null}else t=Ze.next;var i=St===null?Me.memoizedState:St.next;if(i!==null)St=i,Ze=t;else{if(t===null)throw Me.alternate===null?Error(l(467)):Error(l(310));Ze=t,t={memoizedState:Ze.memoizedState,baseState:Ze.baseState,baseQueue:Ze.baseQueue,queue:Ze.queue,next:null},St===null?Me.memoizedState=St=t:St=St.next=t}return St}function Ps(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Ka(t){var i=Xa;return Xa+=1,Hl===null&&(Hl=[]),t=ly(Hl,t,i),i=Me,(St===null?i.memoizedState:St.next)===null&&(i=i.alternate,B.H=i===null||i.memoizedState===null?Qy:ud),t}function Bs(t){if(t!==null&&typeof t=="object"){if(typeof t.then=="function")return Ka(t);if(t.$$typeof===M)return qt(t)}throw Error(l(438,String(t)))}function Wf(t){var i=null,a=Me.updateQueue;if(a!==null&&(i=a.memoCache),i==null){var u=Me.alternate;u!==null&&(u=u.updateQueue,u!==null&&(u=u.memoCache,u!=null&&(i={data:u.data.map(function(m){return m.slice()}),index:0})))}if(i==null&&(i={data:[],index:0}),a===null&&(a=Ps(),Me.updateQueue=a),a.memoCache=i,a=i.data[i.index],a===void 0)for(a=i.data[i.index]=Array(t),u=0;u<t;u++)a[u]=I;return i.index++,a}function zr(t,i){return typeof i=="function"?i(t):i}function Is(t){var i=vt();return Jf(i,Ze,t)}function Jf(t,i,a){var u=t.queue;if(u===null)throw Error(l(311));u.lastRenderedReducer=a;var m=t.baseQueue,y=u.pending;if(y!==null){if(m!==null){var S=m.next;m.next=y.next,y.next=S}i.baseQueue=m=y,u.pending=null}if(y=t.baseState,m===null)t.memoizedState=y;else{i=m.next;var R=S=null,L=null,V=i,re=!1;do{var oe=V.lane&-536870913;if(oe!==V.lane?(Be&oe)===oe:(Dr&oe)===oe){var K=V.revertLane;if(K===0)L!==null&&(L=L.next={lane:0,revertLane:0,gesture:null,action:V.action,hasEagerState:V.hasEagerState,eagerState:V.eagerState,next:null}),oe===zl&&(re=!0);else if((Dr&K)===K){V=V.next,K===zl&&(re=!0);continue}else oe={lane:0,revertLane:V.revertLane,gesture:null,action:V.action,hasEagerState:V.hasEagerState,eagerState:V.eagerState,next:null},L===null?(R=L=oe,S=y):L=L.next=oe,Me.lanes|=K,hi|=K;oe=V.action,Ji&&a(y,oe),y=V.hasEagerState?V.eagerState:a(y,oe)}else K={lane:oe,revertLane:V.revertLane,gesture:V.gesture,action:V.action,hasEagerState:V.hasEagerState,eagerState:V.eagerState,next:null},L===null?(R=L=K,S=y):L=L.next=K,Me.lanes|=oe,hi|=oe;V=V.next}while(V!==null&&V!==i);if(L===null?S=y:L.next=R,!yn(y,t.memoizedState)&&(Ct=!0,re&&(a=Ll,a!==null)))throw a;t.memoizedState=y,t.baseState=S,t.baseQueue=L,u.lastRenderedState=y}return m===null&&(u.lanes=0),[t.memoizedState,u.dispatch]}function ed(t){var i=vt(),a=i.queue;if(a===null)throw Error(l(311));a.lastRenderedReducer=t;var u=a.dispatch,m=a.pending,y=i.memoizedState;if(m!==null){a.pending=null;var S=m=m.next;do y=t(y,S.action),S=S.next;while(S!==m);yn(y,i.memoizedState)||(Ct=!0),i.memoizedState=y,i.baseQueue===null&&(i.baseState=y),a.lastRenderedState=y}return[y,u]}function gy(t,i,a){var u=Me,m=vt(),y=Ue;if(y){if(a===void 0)throw Error(l(407));a=a()}else a=i();var S=!yn((Ze||m).memoizedState,a);if(S&&(m.memoizedState=a,Ct=!0),m=m.queue,rd(vy.bind(null,u,m,t),[t]),m.getSnapshot!==i||S||St!==null&&St.memoizedState.tag&1){if(u.flags|=2048,Fl(9,{destroy:void 0},xy.bind(null,u,m,a,i),null),et===null)throw Error(l(349));y||(Dr&127)!==0||yy(u,i,a)}return a}function yy(t,i,a){t.flags|=16384,t={getSnapshot:i,value:a},i=Me.updateQueue,i===null?(i=Ps(),Me.updateQueue=i,i.stores=[t]):(a=i.stores,a===null?i.stores=[t]:a.push(t))}function xy(t,i,a,u){i.value=a,i.getSnapshot=u,by(i)&&wy(t)}function vy(t,i,a){return a(function(){by(i)&&wy(t)})}function by(t){var i=t.getSnapshot;t=t.value;try{var a=i();return!yn(t,a)}catch{return!0}}function wy(t){var i=Gi(t,2);i!==null&&fn(i,t,2)}function td(t){var i=Qt();if(typeof t=="function"){var a=t;if(t=a(),Ji){jt(!0);try{a()}finally{jt(!1)}}}return i.memoizedState=i.baseState=t,i.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:zr,lastRenderedState:t},i}function Sy(t,i,a,u){return t.baseState=a,Jf(t,Ze,typeof u=="function"?u:zr)}function hk(t,i,a,u,m){if(Fs(t))throw Error(l(485));if(t=i.action,t!==null){var y={payload:m,action:t,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(S){y.listeners.push(S)}};B.T!==null?a(!0):y.isTransition=!1,u(y),a=i.pending,a===null?(y.next=i.pending=y,Cy(i,y)):(y.next=a.next,i.pending=a.next=y)}}function Cy(t,i){var a=i.action,u=i.payload,m=t.state;if(i.isTransition){var y=B.T,S={};B.T=S;try{var R=a(m,u),L=B.S;L!==null&&L(S,R),Ey(t,i,R)}catch(V){nd(t,i,V)}finally{y!==null&&S.types!==null&&(y.types=S.types),B.T=y}}else try{y=a(m,u),Ey(t,i,y)}catch(V){nd(t,i,V)}}function Ey(t,i,a){a!==null&&typeof a=="object"&&typeof a.then=="function"?a.then(function(u){ky(t,i,u)},function(u){return nd(t,i,u)}):ky(t,i,a)}function ky(t,i,a){i.status="fulfilled",i.value=a,Ny(i),t.state=a,i=t.pending,i!==null&&(a=i.next,a===i?t.pending=null:(a=a.next,i.next=a,Cy(t,a)))}function nd(t,i,a){var u=t.pending;if(t.pending=null,u!==null){u=u.next;do i.status="rejected",i.reason=a,Ny(i),i=i.next;while(i!==u)}t.action=null}function Ny(t){t=t.listeners;for(var i=0;i<t.length;i++)(0,t[i])()}function Ry(t,i){return i}function Ty(t,i){if(Ue){var a=et.formState;if(a!==null){e:{var u=Me;if(Ue){if(at){t:{for(var m=at,y=Bn;m.nodeType!==8;){if(!y){m=null;break t}if(m=Un(m.nextSibling),m===null){m=null;break t}}y=m.data,m=y==="F!"||y==="F"?m:null}if(m){at=Un(m.nextSibling),u=m.data==="F!";break e}}ii(u)}u=!1}u&&(i=a[0])}}return a=Qt(),a.memoizedState=a.baseState=i,u={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ry,lastRenderedState:i},a.queue=u,a=Yy.bind(null,Me,u),u.dispatch=a,u=td(!1),y=sd.bind(null,Me,!1,u.queue),u=Qt(),m={state:i,dispatch:null,action:t,pending:null},u.queue=m,a=hk.bind(null,Me,m,y,a),m.dispatch=a,u.memoizedState=t,[i,a,!1]}function Ay(t){var i=vt();return My(i,Ze,t)}function My(t,i,a){if(i=Jf(t,i,Ry)[0],t=Is(zr)[0],typeof i=="object"&&i!==null&&typeof i.then=="function")try{var u=Ka(i)}catch(S){throw S===Pl?As:S}else u=i;i=vt();var m=i.queue,y=m.dispatch;return a!==i.memoizedState&&(Me.flags|=2048,Fl(9,{destroy:void 0},mk.bind(null,m,a),null)),[u,y,t]}function mk(t,i){t.action=i}function jy(t){var i=vt(),a=Ze;if(a!==null)return My(i,a,t);vt(),i=i.memoizedState,a=vt();var u=a.queue.dispatch;return a.memoizedState=t,[i,u,!1]}function Fl(t,i,a,u){return t={tag:t,create:a,deps:u,inst:i,next:null},i=Me.updateQueue,i===null&&(i=Ps(),Me.updateQueue=i),a=i.lastEffect,a===null?i.lastEffect=t.next=t:(u=a.next,a.next=t,t.next=u,i.lastEffect=t),t}function _y(){return vt().memoizedState}function Us(t,i,a,u){var m=Qt();Me.flags|=t,m.memoizedState=Fl(1|i,{destroy:void 0},a,u===void 0?null:u)}function Hs(t,i,a,u){var m=vt();u=u===void 0?null:u;var y=m.memoizedState.inst;Ze!==null&&u!==null&&Yf(u,Ze.memoizedState.deps)?m.memoizedState=Fl(i,y,a,u):(Me.flags|=t,m.memoizedState=Fl(1|i,y,a,u))}function Oy(t,i){Us(8390656,8,t,i)}function rd(t,i){Hs(2048,8,t,i)}function pk(t){Me.flags|=4;var i=Me.updateQueue;if(i===null)i=Ps(),Me.updateQueue=i,i.events=[t];else{var a=i.events;a===null?i.events=[t]:a.push(t)}}function Dy(t){var i=vt().memoizedState;return pk({ref:i,nextImpl:t}),function(){if((Ge&2)!==0)throw Error(l(440));return i.impl.apply(void 0,arguments)}}function zy(t,i){return Hs(4,2,t,i)}function Ly(t,i){return Hs(4,4,t,i)}function Py(t,i){if(typeof i=="function"){t=t();var a=i(t);return function(){typeof a=="function"?a():i(null)}}if(i!=null)return t=t(),i.current=t,function(){i.current=null}}function By(t,i,a){a=a!=null?a.concat([t]):null,Hs(4,4,Py.bind(null,i,t),a)}function id(){}function Iy(t,i){var a=vt();i=i===void 0?null:i;var u=a.memoizedState;return i!==null&&Yf(i,u[1])?u[0]:(a.memoizedState=[t,i],t)}function Uy(t,i){var a=vt();i=i===void 0?null:i;var u=a.memoizedState;if(i!==null&&Yf(i,u[1]))return u[0];if(u=t(),Ji){jt(!0);try{t()}finally{jt(!1)}}return a.memoizedState=[u,i],u}function ld(t,i,a){return a===void 0||(Dr&1073741824)!==0&&(Be&261930)===0?t.memoizedState=i:(t.memoizedState=a,t=Hx(),Me.lanes|=t,hi|=t,a)}function Hy(t,i,a,u){return yn(a,i)?a:Il.current!==null?(t=ld(t,a,u),yn(t,i)||(Ct=!0),t):(Dr&42)===0||(Dr&1073741824)!==0&&(Be&261930)===0?(Ct=!0,t.memoizedState=a):(t=Hx(),Me.lanes|=t,hi|=t,i)}function Fy(t,i,a,u,m){var y=X.p;X.p=y!==0&&8>y?y:8;var S=B.T,R={};B.T=R,sd(t,!1,i,a);try{var L=m(),V=B.S;if(V!==null&&V(R,L),L!==null&&typeof L=="object"&&typeof L.then=="function"){var re=ck(L,u);Qa(t,i,re,Cn(t))}else Qa(t,i,u,Cn(t))}catch(oe){Qa(t,i,{then:function(){},status:"rejected",reason:oe},Cn())}finally{X.p=y,S!==null&&R.types!==null&&(S.types=R.types),B.T=S}}function gk(){}function ad(t,i,a,u){if(t.tag!==5)throw Error(l(476));var m=qy(t).queue;Fy(t,m,i,$,a===null?gk:function(){return Gy(t),a(u)})}function qy(t){var i=t.memoizedState;if(i!==null)return i;i={memoizedState:$,baseState:$,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:zr,lastRenderedState:$},next:null};var a={};return i.next={memoizedState:a,baseState:a,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:zr,lastRenderedState:a},next:null},t.memoizedState=i,t=t.alternate,t!==null&&(t.memoizedState=i),i}function Gy(t){var i=qy(t);i.next===null&&(i=t.alternate.memoizedState),Qa(t,i.next.queue,{},Cn())}function od(){return qt(mo)}function Vy(){return vt().memoizedState}function $y(){return vt().memoizedState}function yk(t){for(var i=t.return;i!==null;){switch(i.tag){case 24:case 3:var a=Cn();t=oi(a);var u=si(i,t,a);u!==null&&(fn(u,i,a),Va(u,i,a)),i={cache:Lf()},t.payload=i;return}i=i.return}}function xk(t,i,a){var u=Cn();a={lane:u,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null},Fs(t)?Xy(i,a):(a=kf(t,i,a,u),a!==null&&(fn(a,t,u),Ky(a,i,u)))}function Yy(t,i,a){var u=Cn();Qa(t,i,a,u)}function Qa(t,i,a,u){var m={lane:u,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null};if(Fs(t))Xy(i,m);else{var y=t.alternate;if(t.lanes===0&&(y===null||y.lanes===0)&&(y=i.lastRenderedReducer,y!==null))try{var S=i.lastRenderedState,R=y(S,a);if(m.hasEagerState=!0,m.eagerState=R,yn(R,S))return Ss(t,i,m,0),et===null&&ws(),!1}catch{}finally{}if(a=kf(t,i,m,u),a!==null)return fn(a,t,u),Ky(a,i,u),!0}return!1}function sd(t,i,a,u){if(u={lane:2,revertLane:Ud(),gesture:null,action:u,hasEagerState:!1,eagerState:null,next:null},Fs(t)){if(i)throw Error(l(479))}else i=kf(t,a,u,2),i!==null&&fn(i,t,2)}function Fs(t){var i=t.alternate;return t===Me||i!==null&&i===Me}function Xy(t,i){Ul=zs=!0;var a=t.pending;a===null?i.next=i:(i.next=a.next,a.next=i),t.pending=i}function Ky(t,i,a){if((a&4194048)!==0){var u=i.lanes;u&=t.pendingLanes,a|=u,i.lanes=a,gn(t,a)}}var Za={readContext:qt,use:Bs,useCallback:dt,useContext:dt,useEffect:dt,useImperativeHandle:dt,useLayoutEffect:dt,useInsertionEffect:dt,useMemo:dt,useReducer:dt,useRef:dt,useState:dt,useDebugValue:dt,useDeferredValue:dt,useTransition:dt,useSyncExternalStore:dt,useId:dt,useHostTransitionStatus:dt,useFormState:dt,useActionState:dt,useOptimistic:dt,useMemoCache:dt,useCacheRefresh:dt};Za.useEffectEvent=dt;var Qy={readContext:qt,use:Bs,useCallback:function(t,i){return Qt().memoizedState=[t,i===void 0?null:i],t},useContext:qt,useEffect:Oy,useImperativeHandle:function(t,i,a){a=a!=null?a.concat([t]):null,Us(4194308,4,Py.bind(null,i,t),a)},useLayoutEffect:function(t,i){return Us(4194308,4,t,i)},useInsertionEffect:function(t,i){Us(4,2,t,i)},useMemo:function(t,i){var a=Qt();i=i===void 0?null:i;var u=t();if(Ji){jt(!0);try{t()}finally{jt(!1)}}return a.memoizedState=[u,i],u},useReducer:function(t,i,a){var u=Qt();if(a!==void 0){var m=a(i);if(Ji){jt(!0);try{a(i)}finally{jt(!1)}}}else m=i;return u.memoizedState=u.baseState=m,t={pending:null,lanes:0,dispatch:null,lastRenderedReducer:t,lastRenderedState:m},u.queue=t,t=t.dispatch=xk.bind(null,Me,t),[u.memoizedState,t]},useRef:function(t){var i=Qt();return t={current:t},i.memoizedState=t},useState:function(t){t=td(t);var i=t.queue,a=Yy.bind(null,Me,i);return i.dispatch=a,[t.memoizedState,a]},useDebugValue:id,useDeferredValue:function(t,i){var a=Qt();return ld(a,t,i)},useTransition:function(){var t=td(!1);return t=Fy.bind(null,Me,t.queue,!0,!1),Qt().memoizedState=t,[!1,t]},useSyncExternalStore:function(t,i,a){var u=Me,m=Qt();if(Ue){if(a===void 0)throw Error(l(407));a=a()}else{if(a=i(),et===null)throw Error(l(349));(Be&127)!==0||yy(u,i,a)}m.memoizedState=a;var y={value:a,getSnapshot:i};return m.queue=y,Oy(vy.bind(null,u,y,t),[t]),u.flags|=2048,Fl(9,{destroy:void 0},xy.bind(null,u,y,a,i),null),a},useId:function(){var t=Qt(),i=et.identifierPrefix;if(Ue){var a=fr,u=cr;a=(u&~(1<<32-Xe(u)-1)).toString(32)+a,i="_"+i+"R_"+a,a=Ls++,0<a&&(i+="H"+a.toString(32)),i+="_"}else a=fk++,i="_"+i+"r_"+a.toString(32)+"_";return t.memoizedState=i},useHostTransitionStatus:od,useFormState:Ty,useActionState:Ty,useOptimistic:function(t){var i=Qt();i.memoizedState=i.baseState=t;var a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return i.queue=a,i=sd.bind(null,Me,!0,a),a.dispatch=i,[t,i]},useMemoCache:Wf,useCacheRefresh:function(){return Qt().memoizedState=yk.bind(null,Me)},useEffectEvent:function(t){var i=Qt(),a={impl:t};return i.memoizedState=a,function(){if((Ge&2)!==0)throw Error(l(440));return a.impl.apply(void 0,arguments)}}},ud={readContext:qt,use:Bs,useCallback:Iy,useContext:qt,useEffect:rd,useImperativeHandle:By,useInsertionEffect:zy,useLayoutEffect:Ly,useMemo:Uy,useReducer:Is,useRef:_y,useState:function(){return Is(zr)},useDebugValue:id,useDeferredValue:function(t,i){var a=vt();return Hy(a,Ze.memoizedState,t,i)},useTransition:function(){var t=Is(zr)[0],i=vt().memoizedState;return[typeof t=="boolean"?t:Ka(t),i]},useSyncExternalStore:gy,useId:Vy,useHostTransitionStatus:od,useFormState:Ay,useActionState:Ay,useOptimistic:function(t,i){var a=vt();return Sy(a,Ze,t,i)},useMemoCache:Wf,useCacheRefresh:$y};ud.useEffectEvent=Dy;var Zy={readContext:qt,use:Bs,useCallback:Iy,useContext:qt,useEffect:rd,useImperativeHandle:By,useInsertionEffect:zy,useLayoutEffect:Ly,useMemo:Uy,useReducer:ed,useRef:_y,useState:function(){return ed(zr)},useDebugValue:id,useDeferredValue:function(t,i){var a=vt();return Ze===null?ld(a,t,i):Hy(a,Ze.memoizedState,t,i)},useTransition:function(){var t=ed(zr)[0],i=vt().memoizedState;return[typeof t=="boolean"?t:Ka(t),i]},useSyncExternalStore:gy,useId:Vy,useHostTransitionStatus:od,useFormState:jy,useActionState:jy,useOptimistic:function(t,i){var a=vt();return Ze!==null?Sy(a,Ze,t,i):(a.baseState=t,[t,a.queue.dispatch])},useMemoCache:Wf,useCacheRefresh:$y};Zy.useEffectEvent=Dy;function cd(t,i,a,u){i=t.memoizedState,a=a(u,i),a=a==null?i:p({},i,a),t.memoizedState=a,t.lanes===0&&(t.updateQueue.baseState=a)}var fd={enqueueSetState:function(t,i,a){t=t._reactInternals;var u=Cn(),m=oi(u);m.payload=i,a!=null&&(m.callback=a),i=si(t,m,u),i!==null&&(fn(i,t,u),Va(i,t,u))},enqueueReplaceState:function(t,i,a){t=t._reactInternals;var u=Cn(),m=oi(u);m.tag=1,m.payload=i,a!=null&&(m.callback=a),i=si(t,m,u),i!==null&&(fn(i,t,u),Va(i,t,u))},enqueueForceUpdate:function(t,i){t=t._reactInternals;var a=Cn(),u=oi(a);u.tag=2,i!=null&&(u.callback=i),i=si(t,u,a),i!==null&&(fn(i,t,a),Va(i,t,a))}};function Wy(t,i,a,u,m,y,S){return t=t.stateNode,typeof t.shouldComponentUpdate=="function"?t.shouldComponentUpdate(u,y,S):i.prototype&&i.prototype.isPureReactComponent?!Pa(a,u)||!Pa(m,y):!0}function Jy(t,i,a,u){t=i.state,typeof i.componentWillReceiveProps=="function"&&i.componentWillReceiveProps(a,u),typeof i.UNSAFE_componentWillReceiveProps=="function"&&i.UNSAFE_componentWillReceiveProps(a,u),i.state!==t&&fd.enqueueReplaceState(i,i.state,null)}function el(t,i){var a=i;if("ref"in i){a={};for(var u in i)u!=="ref"&&(a[u]=i[u])}if(t=t.defaultProps){a===i&&(a=p({},a));for(var m in t)a[m]===void 0&&(a[m]=t[m])}return a}function ex(t){bs(t)}function tx(t){console.error(t)}function nx(t){bs(t)}function qs(t,i){try{var a=t.onUncaughtError;a(i.value,{componentStack:i.stack})}catch(u){setTimeout(function(){throw u})}}function rx(t,i,a){try{var u=t.onCaughtError;u(a.value,{componentStack:a.stack,errorBoundary:i.tag===1?i.stateNode:null})}catch(m){setTimeout(function(){throw m})}}function dd(t,i,a){return a=oi(a),a.tag=3,a.payload={element:null},a.callback=function(){qs(t,i)},a}function ix(t){return t=oi(t),t.tag=3,t}function lx(t,i,a,u){var m=a.type.getDerivedStateFromError;if(typeof m=="function"){var y=u.value;t.payload=function(){return m(y)},t.callback=function(){rx(i,a,u)}}var S=a.stateNode;S!==null&&typeof S.componentDidCatch=="function"&&(t.callback=function(){rx(i,a,u),typeof m!="function"&&(mi===null?mi=new Set([this]):mi.add(this));var R=u.stack;this.componentDidCatch(u.value,{componentStack:R!==null?R:""})})}function vk(t,i,a,u,m){if(a.flags|=32768,u!==null&&typeof u=="object"&&typeof u.then=="function"){if(i=a.alternate,i!==null&&Dl(i,a,m,!0),a=vn.current,a!==null){switch(a.tag){case 31:case 13:return In===null?tu():a.alternate===null&&ht===0&&(ht=3),a.flags&=-257,a.flags|=65536,a.lanes=m,u===Ms?a.flags|=16384:(i=a.updateQueue,i===null?a.updateQueue=new Set([u]):i.add(u),Pd(t,u,m)),!1;case 22:return a.flags|=65536,u===Ms?a.flags|=16384:(i=a.updateQueue,i===null?(i={transitions:null,markerInstances:null,retryQueue:new Set([u])},a.updateQueue=i):(a=i.retryQueue,a===null?i.retryQueue=new Set([u]):a.add(u)),Pd(t,u,m)),!1}throw Error(l(435,a.tag))}return Pd(t,u,m),tu(),!1}if(Ue)return i=vn.current,i!==null?((i.flags&65536)===0&&(i.flags|=256),i.flags|=65536,i.lanes=m,u!==jf&&(t=Error(l(422),{cause:u}),Ua(zn(t,a)))):(u!==jf&&(i=Error(l(423),{cause:u}),Ua(zn(i,a))),t=t.current.alternate,t.flags|=65536,m&=-m,t.lanes|=m,u=zn(u,a),m=dd(t.stateNode,u,m),Ff(t,m),ht!==4&&(ht=2)),!1;var y=Error(l(520),{cause:u});if(y=zn(y,a),lo===null?lo=[y]:lo.push(y),ht!==4&&(ht=2),i===null)return!0;u=zn(u,a),a=i;do{switch(a.tag){case 3:return a.flags|=65536,t=m&-m,a.lanes|=t,t=dd(a.stateNode,u,t),Ff(a,t),!1;case 1:if(i=a.type,y=a.stateNode,(a.flags&128)===0&&(typeof i.getDerivedStateFromError=="function"||y!==null&&typeof y.componentDidCatch=="function"&&(mi===null||!mi.has(y))))return a.flags|=65536,m&=-m,a.lanes|=m,m=ix(m),lx(m,t,a,u),Ff(a,m),!1}a=a.return}while(a!==null);return!1}var hd=Error(l(461)),Ct=!1;function Gt(t,i,a,u){i.child=t===null?uy(i,null,a,u):Wi(i,t.child,a,u)}function ax(t,i,a,u,m){a=a.render;var y=i.ref;if("ref"in u){var S={};for(var R in u)R!=="ref"&&(S[R]=u[R])}else S=u;return Xi(i),u=Xf(t,i,a,S,y,m),R=Kf(),t!==null&&!Ct?(Qf(t,i,m),Lr(t,i,m)):(Ue&&R&&Af(i),i.flags|=1,Gt(t,i,u,m),i.child)}function ox(t,i,a,u,m){if(t===null){var y=a.type;return typeof y=="function"&&!Nf(y)&&y.defaultProps===void 0&&a.compare===null?(i.tag=15,i.type=y,sx(t,i,y,u,m)):(t=Es(a.type,null,u,i,i.mode,m),t.ref=i.ref,t.return=i,i.child=t)}if(y=t.child,!wd(t,m)){var S=y.memoizedProps;if(a=a.compare,a=a!==null?a:Pa,a(S,u)&&t.ref===i.ref)return Lr(t,i,m)}return i.flags|=1,t=Mr(y,u),t.ref=i.ref,t.return=i,i.child=t}function sx(t,i,a,u,m){if(t!==null){var y=t.memoizedProps;if(Pa(y,u)&&t.ref===i.ref)if(Ct=!1,i.pendingProps=u=y,wd(t,m))(t.flags&131072)!==0&&(Ct=!0);else return i.lanes=t.lanes,Lr(t,i,m)}return md(t,i,a,u,m)}function ux(t,i,a,u){var m=u.children,y=t!==null?t.memoizedState:null;if(t===null&&i.stateNode===null&&(i.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),u.mode==="hidden"){if((i.flags&128)!==0){if(y=y!==null?y.baseLanes|a:a,t!==null){for(u=i.child=t.child,m=0;u!==null;)m=m|u.lanes|u.childLanes,u=u.sibling;u=m&~y}else u=0,i.child=null;return cx(t,i,y,a,u)}if((a&536870912)!==0)i.memoizedState={baseLanes:0,cachePool:null},t!==null&&Ts(i,y!==null?y.cachePool:null),y!==null?dy(i,y):Gf(),hy(i);else return u=i.lanes=536870912,cx(t,i,y!==null?y.baseLanes|a:a,a,u)}else y!==null?(Ts(i,y.cachePool),dy(i,y),ci(),i.memoizedState=null):(t!==null&&Ts(i,null),Gf(),ci());return Gt(t,i,m,a),i.child}function Wa(t,i){return t!==null&&t.tag===22||i.stateNode!==null||(i.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),i.sibling}function cx(t,i,a,u,m){var y=Bf();return y=y===null?null:{parent:wt._currentValue,pool:y},i.memoizedState={baseLanes:a,cachePool:y},t!==null&&Ts(i,null),Gf(),hy(i),t!==null&&Dl(t,i,u,!0),i.childLanes=m,null}function Gs(t,i){return i=$s({mode:i.mode,children:i.children},t.mode),i.ref=t.ref,t.child=i,i.return=t,i}function fx(t,i,a){return Wi(i,t.child,null,a),t=Gs(i,i.pendingProps),t.flags|=2,bn(i),i.memoizedState=null,t}function bk(t,i,a){var u=i.pendingProps,m=(i.flags&128)!==0;if(i.flags&=-129,t===null){if(Ue){if(u.mode==="hidden")return t=Gs(i,u),i.lanes=536870912,Wa(null,t);if($f(i),(t=at)?(t=Cv(t,Bn),t=t!==null&&t.data==="&"?t:null,t!==null&&(i.memoizedState={dehydrated:t,treeContext:ni!==null?{id:cr,overflow:fr}:null,retryLane:536870912,hydrationErrors:null},a=Xg(t),a.return=i,i.child=a,Ft=i,at=null)):t=null,t===null)throw ii(i);return i.lanes=536870912,null}return Gs(i,u)}var y=t.memoizedState;if(y!==null){var S=y.dehydrated;if($f(i),m)if(i.flags&256)i.flags&=-257,i=fx(t,i,a);else if(i.memoizedState!==null)i.child=t.child,i.flags|=128,i=null;else throw Error(l(558));else if(Ct||Dl(t,i,a,!1),m=(a&t.childLanes)!==0,Ct||m){if(u=et,u!==null&&(S=Mn(u,a),S!==0&&S!==y.retryLane))throw y.retryLane=S,Gi(t,S),fn(u,t,S),hd;tu(),i=fx(t,i,a)}else t=y.treeContext,at=Un(S.nextSibling),Ft=i,Ue=!0,ri=null,Bn=!1,t!==null&&Zg(i,t),i=Gs(i,u),i.flags|=4096;return i}return t=Mr(t.child,{mode:u.mode,children:u.children}),t.ref=i.ref,i.child=t,t.return=i,t}function Vs(t,i){var a=i.ref;if(a===null)t!==null&&t.ref!==null&&(i.flags|=4194816);else{if(typeof a!="function"&&typeof a!="object")throw Error(l(284));(t===null||t.ref!==a)&&(i.flags|=4194816)}}function md(t,i,a,u,m){return Xi(i),a=Xf(t,i,a,u,void 0,m),u=Kf(),t!==null&&!Ct?(Qf(t,i,m),Lr(t,i,m)):(Ue&&u&&Af(i),i.flags|=1,Gt(t,i,a,m),i.child)}function dx(t,i,a,u,m,y){return Xi(i),i.updateQueue=null,a=py(i,u,a,m),my(t),u=Kf(),t!==null&&!Ct?(Qf(t,i,y),Lr(t,i,y)):(Ue&&u&&Af(i),i.flags|=1,Gt(t,i,a,y),i.child)}function hx(t,i,a,u,m){if(Xi(i),i.stateNode===null){var y=Ml,S=a.contextType;typeof S=="object"&&S!==null&&(y=qt(S)),y=new a(u,y),i.memoizedState=y.state!==null&&y.state!==void 0?y.state:null,y.updater=fd,i.stateNode=y,y._reactInternals=i,y=i.stateNode,y.props=u,y.state=i.memoizedState,y.refs={},Uf(i),S=a.contextType,y.context=typeof S=="object"&&S!==null?qt(S):Ml,y.state=i.memoizedState,S=a.getDerivedStateFromProps,typeof S=="function"&&(cd(i,a,S,u),y.state=i.memoizedState),typeof a.getDerivedStateFromProps=="function"||typeof y.getSnapshotBeforeUpdate=="function"||typeof y.UNSAFE_componentWillMount!="function"&&typeof y.componentWillMount!="function"||(S=y.state,typeof y.componentWillMount=="function"&&y.componentWillMount(),typeof y.UNSAFE_componentWillMount=="function"&&y.UNSAFE_componentWillMount(),S!==y.state&&fd.enqueueReplaceState(y,y.state,null),Ya(i,u,y,m),$a(),y.state=i.memoizedState),typeof y.componentDidMount=="function"&&(i.flags|=4194308),u=!0}else if(t===null){y=i.stateNode;var R=i.memoizedProps,L=el(a,R);y.props=L;var V=y.context,re=a.contextType;S=Ml,typeof re=="object"&&re!==null&&(S=qt(re));var oe=a.getDerivedStateFromProps;re=typeof oe=="function"||typeof y.getSnapshotBeforeUpdate=="function",R=i.pendingProps!==R,re||typeof y.UNSAFE_componentWillReceiveProps!="function"&&typeof y.componentWillReceiveProps!="function"||(R||V!==S)&&Jy(i,y,u,S),ai=!1;var K=i.memoizedState;y.state=K,Ya(i,u,y,m),$a(),V=i.memoizedState,R||K!==V||ai?(typeof oe=="function"&&(cd(i,a,oe,u),V=i.memoizedState),(L=ai||Wy(i,a,L,u,K,V,S))?(re||typeof y.UNSAFE_componentWillMount!="function"&&typeof y.componentWillMount!="function"||(typeof y.componentWillMount=="function"&&y.componentWillMount(),typeof y.UNSAFE_componentWillMount=="function"&&y.UNSAFE_componentWillMount()),typeof y.componentDidMount=="function"&&(i.flags|=4194308)):(typeof y.componentDidMount=="function"&&(i.flags|=4194308),i.memoizedProps=u,i.memoizedState=V),y.props=u,y.state=V,y.context=S,u=L):(typeof y.componentDidMount=="function"&&(i.flags|=4194308),u=!1)}else{y=i.stateNode,Hf(t,i),S=i.memoizedProps,re=el(a,S),y.props=re,oe=i.pendingProps,K=y.context,V=a.contextType,L=Ml,typeof V=="object"&&V!==null&&(L=qt(V)),R=a.getDerivedStateFromProps,(V=typeof R=="function"||typeof y.getSnapshotBeforeUpdate=="function")||typeof y.UNSAFE_componentWillReceiveProps!="function"&&typeof y.componentWillReceiveProps!="function"||(S!==oe||K!==L)&&Jy(i,y,u,L),ai=!1,K=i.memoizedState,y.state=K,Ya(i,u,y,m),$a();var W=i.memoizedState;S!==oe||K!==W||ai||t!==null&&t.dependencies!==null&&Ns(t.dependencies)?(typeof R=="function"&&(cd(i,a,R,u),W=i.memoizedState),(re=ai||Wy(i,a,re,u,K,W,L)||t!==null&&t.dependencies!==null&&Ns(t.dependencies))?(V||typeof y.UNSAFE_componentWillUpdate!="function"&&typeof y.componentWillUpdate!="function"||(typeof y.componentWillUpdate=="function"&&y.componentWillUpdate(u,W,L),typeof y.UNSAFE_componentWillUpdate=="function"&&y.UNSAFE_componentWillUpdate(u,W,L)),typeof y.componentDidUpdate=="function"&&(i.flags|=4),typeof y.getSnapshotBeforeUpdate=="function"&&(i.flags|=1024)):(typeof y.componentDidUpdate!="function"||S===t.memoizedProps&&K===t.memoizedState||(i.flags|=4),typeof y.getSnapshotBeforeUpdate!="function"||S===t.memoizedProps&&K===t.memoizedState||(i.flags|=1024),i.memoizedProps=u,i.memoizedState=W),y.props=u,y.state=W,y.context=L,u=re):(typeof y.componentDidUpdate!="function"||S===t.memoizedProps&&K===t.memoizedState||(i.flags|=4),typeof y.getSnapshotBeforeUpdate!="function"||S===t.memoizedProps&&K===t.memoizedState||(i.flags|=1024),u=!1)}return y=u,Vs(t,i),u=(i.flags&128)!==0,y||u?(y=i.stateNode,a=u&&typeof a.getDerivedStateFromError!="function"?null:y.render(),i.flags|=1,t!==null&&u?(i.child=Wi(i,t.child,null,m),i.child=Wi(i,null,a,m)):Gt(t,i,a,m),i.memoizedState=y.state,t=i.child):t=Lr(t,i,m),t}function mx(t,i,a,u){return $i(),i.flags|=256,Gt(t,i,a,u),i.child}var pd={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function gd(t){return{baseLanes:t,cachePool:ry()}}function yd(t,i,a){return t=t!==null?t.childLanes&~a:0,i&&(t|=Sn),t}function px(t,i,a){var u=i.pendingProps,m=!1,y=(i.flags&128)!==0,S;if((S=y)||(S=t!==null&&t.memoizedState===null?!1:(xt.current&2)!==0),S&&(m=!0,i.flags&=-129),S=(i.flags&32)!==0,i.flags&=-33,t===null){if(Ue){if(m?ui(i):ci(),(t=at)?(t=Cv(t,Bn),t=t!==null&&t.data!=="&"?t:null,t!==null&&(i.memoizedState={dehydrated:t,treeContext:ni!==null?{id:cr,overflow:fr}:null,retryLane:536870912,hydrationErrors:null},a=Xg(t),a.return=i,i.child=a,Ft=i,at=null)):t=null,t===null)throw ii(i);return Jd(t)?i.lanes=32:i.lanes=536870912,null}var R=u.children;return u=u.fallback,m?(ci(),m=i.mode,R=$s({mode:"hidden",children:R},m),u=Vi(u,m,a,null),R.return=i,u.return=i,R.sibling=u,i.child=R,u=i.child,u.memoizedState=gd(a),u.childLanes=yd(t,S,a),i.memoizedState=pd,Wa(null,u)):(ui(i),xd(i,R))}var L=t.memoizedState;if(L!==null&&(R=L.dehydrated,R!==null)){if(y)i.flags&256?(ui(i),i.flags&=-257,i=vd(t,i,a)):i.memoizedState!==null?(ci(),i.child=t.child,i.flags|=128,i=null):(ci(),R=u.fallback,m=i.mode,u=$s({mode:"visible",children:u.children},m),R=Vi(R,m,a,null),R.flags|=2,u.return=i,R.return=i,u.sibling=R,i.child=u,Wi(i,t.child,null,a),u=i.child,u.memoizedState=gd(a),u.childLanes=yd(t,S,a),i.memoizedState=pd,i=Wa(null,u));else if(ui(i),Jd(R)){if(S=R.nextSibling&&R.nextSibling.dataset,S)var V=S.dgst;S=V,u=Error(l(419)),u.stack="",u.digest=S,Ua({value:u,source:null,stack:null}),i=vd(t,i,a)}else if(Ct||Dl(t,i,a,!1),S=(a&t.childLanes)!==0,Ct||S){if(S=et,S!==null&&(u=Mn(S,a),u!==0&&u!==L.retryLane))throw L.retryLane=u,Gi(t,u),fn(S,t,u),hd;Wd(R)||tu(),i=vd(t,i,a)}else Wd(R)?(i.flags|=192,i.child=t.child,i=null):(t=L.treeContext,at=Un(R.nextSibling),Ft=i,Ue=!0,ri=null,Bn=!1,t!==null&&Zg(i,t),i=xd(i,u.children),i.flags|=4096);return i}return m?(ci(),R=u.fallback,m=i.mode,L=t.child,V=L.sibling,u=Mr(L,{mode:"hidden",children:u.children}),u.subtreeFlags=L.subtreeFlags&65011712,V!==null?R=Mr(V,R):(R=Vi(R,m,a,null),R.flags|=2),R.return=i,u.return=i,u.sibling=R,i.child=u,Wa(null,u),u=i.child,R=t.child.memoizedState,R===null?R=gd(a):(m=R.cachePool,m!==null?(L=wt._currentValue,m=m.parent!==L?{parent:L,pool:L}:m):m=ry(),R={baseLanes:R.baseLanes|a,cachePool:m}),u.memoizedState=R,u.childLanes=yd(t,S,a),i.memoizedState=pd,Wa(t.child,u)):(ui(i),a=t.child,t=a.sibling,a=Mr(a,{mode:"visible",children:u.children}),a.return=i,a.sibling=null,t!==null&&(S=i.deletions,S===null?(i.deletions=[t],i.flags|=16):S.push(t)),i.child=a,i.memoizedState=null,a)}function xd(t,i){return i=$s({mode:"visible",children:i},t.mode),i.return=t,t.child=i}function $s(t,i){return t=xn(22,t,null,i),t.lanes=0,t}function vd(t,i,a){return Wi(i,t.child,null,a),t=xd(i,i.pendingProps.children),t.flags|=2,i.memoizedState=null,t}function gx(t,i,a){t.lanes|=i;var u=t.alternate;u!==null&&(u.lanes|=i),Df(t.return,i,a)}function bd(t,i,a,u,m,y){var S=t.memoizedState;S===null?t.memoizedState={isBackwards:i,rendering:null,renderingStartTime:0,last:u,tail:a,tailMode:m,treeForkCount:y}:(S.isBackwards=i,S.rendering=null,S.renderingStartTime=0,S.last=u,S.tail=a,S.tailMode=m,S.treeForkCount=y)}function yx(t,i,a){var u=i.pendingProps,m=u.revealOrder,y=u.tail;u=u.children;var S=xt.current,R=(S&2)!==0;if(R?(S=S&1|2,i.flags|=128):S&=1,A(xt,S),Gt(t,i,u,a),u=Ue?Ia:0,!R&&t!==null&&(t.flags&128)!==0)e:for(t=i.child;t!==null;){if(t.tag===13)t.memoizedState!==null&&gx(t,a,i);else if(t.tag===19)gx(t,a,i);else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===i)break e;for(;t.sibling===null;){if(t.return===null||t.return===i)break e;t=t.return}t.sibling.return=t.return,t=t.sibling}switch(m){case"forwards":for(a=i.child,m=null;a!==null;)t=a.alternate,t!==null&&Ds(t)===null&&(m=a),a=a.sibling;a=m,a===null?(m=i.child,i.child=null):(m=a.sibling,a.sibling=null),bd(i,!1,m,a,y,u);break;case"backwards":case"unstable_legacy-backwards":for(a=null,m=i.child,i.child=null;m!==null;){if(t=m.alternate,t!==null&&Ds(t)===null){i.child=m;break}t=m.sibling,m.sibling=a,a=m,m=t}bd(i,!0,a,null,y,u);break;case"together":bd(i,!1,null,null,void 0,u);break;default:i.memoizedState=null}return i.child}function Lr(t,i,a){if(t!==null&&(i.dependencies=t.dependencies),hi|=i.lanes,(a&i.childLanes)===0)if(t!==null){if(Dl(t,i,a,!1),(a&i.childLanes)===0)return null}else return null;if(t!==null&&i.child!==t.child)throw Error(l(153));if(i.child!==null){for(t=i.child,a=Mr(t,t.pendingProps),i.child=a,a.return=i;t.sibling!==null;)t=t.sibling,a=a.sibling=Mr(t,t.pendingProps),a.return=i;a.sibling=null}return i.child}function wd(t,i){return(t.lanes&i)!==0?!0:(t=t.dependencies,!!(t!==null&&Ns(t)))}function wk(t,i,a){switch(i.tag){case 3:Ne(i,i.stateNode.containerInfo),li(i,wt,t.memoizedState.cache),$i();break;case 27:case 5:Ce(i);break;case 4:Ne(i,i.stateNode.containerInfo);break;case 10:li(i,i.type,i.memoizedProps.value);break;case 31:if(i.memoizedState!==null)return i.flags|=128,$f(i),null;break;case 13:var u=i.memoizedState;if(u!==null)return u.dehydrated!==null?(ui(i),i.flags|=128,null):(a&i.child.childLanes)!==0?px(t,i,a):(ui(i),t=Lr(t,i,a),t!==null?t.sibling:null);ui(i);break;case 19:var m=(t.flags&128)!==0;if(u=(a&i.childLanes)!==0,u||(Dl(t,i,a,!1),u=(a&i.childLanes)!==0),m){if(u)return yx(t,i,a);i.flags|=128}if(m=i.memoizedState,m!==null&&(m.rendering=null,m.tail=null,m.lastEffect=null),A(xt,xt.current),u)break;return null;case 22:return i.lanes=0,ux(t,i,a,i.pendingProps);case 24:li(i,wt,t.memoizedState.cache)}return Lr(t,i,a)}function xx(t,i,a){if(t!==null)if(t.memoizedProps!==i.pendingProps)Ct=!0;else{if(!wd(t,a)&&(i.flags&128)===0)return Ct=!1,wk(t,i,a);Ct=(t.flags&131072)!==0}else Ct=!1,Ue&&(i.flags&1048576)!==0&&Qg(i,Ia,i.index);switch(i.lanes=0,i.tag){case 16:e:{var u=i.pendingProps;if(t=Qi(i.elementType),i.type=t,typeof t=="function")Nf(t)?(u=el(t,u),i.tag=1,i=hx(null,i,t,u,a)):(i.tag=0,i=md(null,i,t,u,a));else{if(t!=null){var m=t.$$typeof;if(m===z){i.tag=11,i=ax(null,i,t,u,a);break e}else if(m===P){i.tag=14,i=ox(null,i,t,u,a);break e}}throw i=le(t)||t,Error(l(306,i,""))}}return i;case 0:return md(t,i,i.type,i.pendingProps,a);case 1:return u=i.type,m=el(u,i.pendingProps),hx(t,i,u,m,a);case 3:e:{if(Ne(i,i.stateNode.containerInfo),t===null)throw Error(l(387));u=i.pendingProps;var y=i.memoizedState;m=y.element,Hf(t,i),Ya(i,u,null,a);var S=i.memoizedState;if(u=S.cache,li(i,wt,u),u!==y.cache&&zf(i,[wt],a,!0),$a(),u=S.element,y.isDehydrated)if(y={element:u,isDehydrated:!1,cache:S.cache},i.updateQueue.baseState=y,i.memoizedState=y,i.flags&256){i=mx(t,i,u,a);break e}else if(u!==m){m=zn(Error(l(424)),i),Ua(m),i=mx(t,i,u,a);break e}else{switch(t=i.stateNode.containerInfo,t.nodeType){case 9:t=t.body;break;default:t=t.nodeName==="HTML"?t.ownerDocument.body:t}for(at=Un(t.firstChild),Ft=i,Ue=!0,ri=null,Bn=!0,a=uy(i,null,u,a),i.child=a;a;)a.flags=a.flags&-3|4096,a=a.sibling}else{if($i(),u===m){i=Lr(t,i,a);break e}Gt(t,i,u,a)}i=i.child}return i;case 26:return Vs(t,i),t===null?(a=Av(i.type,null,i.pendingProps,null))?i.memoizedState=a:Ue||(a=i.type,t=i.pendingProps,u=su(ue.current).createElement(a),u[Ht]=i,u[ln]=t,Vt(u,a,t),Ot(u),i.stateNode=u):i.memoizedState=Av(i.type,t.memoizedProps,i.pendingProps,t.memoizedState),null;case 27:return Ce(i),t===null&&Ue&&(u=i.stateNode=Nv(i.type,i.pendingProps,ue.current),Ft=i,Bn=!0,m=at,xi(i.type)?(eh=m,at=Un(u.firstChild)):at=m),Gt(t,i,i.pendingProps.children,a),Vs(t,i),t===null&&(i.flags|=4194304),i.child;case 5:return t===null&&Ue&&((m=u=at)&&(u=Zk(u,i.type,i.pendingProps,Bn),u!==null?(i.stateNode=u,Ft=i,at=Un(u.firstChild),Bn=!1,m=!0):m=!1),m||ii(i)),Ce(i),m=i.type,y=i.pendingProps,S=t!==null?t.memoizedProps:null,u=y.children,Kd(m,y)?u=null:S!==null&&Kd(m,S)&&(i.flags|=32),i.memoizedState!==null&&(m=Xf(t,i,dk,null,null,a),mo._currentValue=m),Vs(t,i),Gt(t,i,u,a),i.child;case 6:return t===null&&Ue&&((t=a=at)&&(a=Wk(a,i.pendingProps,Bn),a!==null?(i.stateNode=a,Ft=i,at=null,t=!0):t=!1),t||ii(i)),null;case 13:return px(t,i,a);case 4:return Ne(i,i.stateNode.containerInfo),u=i.pendingProps,t===null?i.child=Wi(i,null,u,a):Gt(t,i,u,a),i.child;case 11:return ax(t,i,i.type,i.pendingProps,a);case 7:return Gt(t,i,i.pendingProps,a),i.child;case 8:return Gt(t,i,i.pendingProps.children,a),i.child;case 12:return Gt(t,i,i.pendingProps.children,a),i.child;case 10:return u=i.pendingProps,li(i,i.type,u.value),Gt(t,i,u.children,a),i.child;case 9:return m=i.type._context,u=i.pendingProps.children,Xi(i),m=qt(m),u=u(m),i.flags|=1,Gt(t,i,u,a),i.child;case 14:return ox(t,i,i.type,i.pendingProps,a);case 15:return sx(t,i,i.type,i.pendingProps,a);case 19:return yx(t,i,a);case 31:return bk(t,i,a);case 22:return ux(t,i,a,i.pendingProps);case 24:return Xi(i),u=qt(wt),t===null?(m=Bf(),m===null&&(m=et,y=Lf(),m.pooledCache=y,y.refCount++,y!==null&&(m.pooledCacheLanes|=a),m=y),i.memoizedState={parent:u,cache:m},Uf(i),li(i,wt,m)):((t.lanes&a)!==0&&(Hf(t,i),Ya(i,null,null,a),$a()),m=t.memoizedState,y=i.memoizedState,m.parent!==u?(m={parent:u,cache:u},i.memoizedState=m,i.lanes===0&&(i.memoizedState=i.updateQueue.baseState=m),li(i,wt,u)):(u=y.cache,li(i,wt,u),u!==m.cache&&zf(i,[wt],a,!0))),Gt(t,i,i.pendingProps.children,a),i.child;case 29:throw i.pendingProps}throw Error(l(156,i.tag))}function Pr(t){t.flags|=4}function Sd(t,i,a,u,m){if((i=(t.mode&32)!==0)&&(i=!1),i){if(t.flags|=16777216,(m&335544128)===m)if(t.stateNode.complete)t.flags|=8192;else if(Vx())t.flags|=8192;else throw Zi=Ms,If}else t.flags&=-16777217}function vx(t,i){if(i.type!=="stylesheet"||(i.state.loading&4)!==0)t.flags&=-16777217;else if(t.flags|=16777216,!Dv(i))if(Vx())t.flags|=8192;else throw Zi=Ms,If}function Ys(t,i){i!==null&&(t.flags|=4),t.flags&16384&&(i=t.tag!==22?$t():536870912,t.lanes|=i,$l|=i)}function Ja(t,i){if(!Ue)switch(t.tailMode){case"hidden":i=t.tail;for(var a=null;i!==null;)i.alternate!==null&&(a=i),i=i.sibling;a===null?t.tail=null:a.sibling=null;break;case"collapsed":a=t.tail;for(var u=null;a!==null;)a.alternate!==null&&(u=a),a=a.sibling;u===null?i||t.tail===null?t.tail=null:t.tail.sibling=null:u.sibling=null}}function ot(t){var i=t.alternate!==null&&t.alternate.child===t.child,a=0,u=0;if(i)for(var m=t.child;m!==null;)a|=m.lanes|m.childLanes,u|=m.subtreeFlags&65011712,u|=m.flags&65011712,m.return=t,m=m.sibling;else for(m=t.child;m!==null;)a|=m.lanes|m.childLanes,u|=m.subtreeFlags,u|=m.flags,m.return=t,m=m.sibling;return t.subtreeFlags|=u,t.childLanes=a,i}function Sk(t,i,a){var u=i.pendingProps;switch(Mf(i),i.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return ot(i),null;case 1:return ot(i),null;case 3:return a=i.stateNode,u=null,t!==null&&(u=t.memoizedState.cache),i.memoizedState.cache!==u&&(i.flags|=2048),Or(wt),he(),a.pendingContext&&(a.context=a.pendingContext,a.pendingContext=null),(t===null||t.child===null)&&(Ol(i)?Pr(i):t===null||t.memoizedState.isDehydrated&&(i.flags&256)===0||(i.flags|=1024,_f())),ot(i),null;case 26:var m=i.type,y=i.memoizedState;return t===null?(Pr(i),y!==null?(ot(i),vx(i,y)):(ot(i),Sd(i,m,null,u,a))):y?y!==t.memoizedState?(Pr(i),ot(i),vx(i,y)):(ot(i),i.flags&=-16777217):(t=t.memoizedProps,t!==u&&Pr(i),ot(i),Sd(i,m,t,u,a)),null;case 27:if(lt(i),a=ue.current,m=i.type,t!==null&&i.stateNode!=null)t.memoizedProps!==u&&Pr(i);else{if(!u){if(i.stateNode===null)throw Error(l(166));return ot(i),null}t=Z.current,Ol(i)?Wg(i):(t=Nv(m,u,a),i.stateNode=t,Pr(i))}return ot(i),null;case 5:if(lt(i),m=i.type,t!==null&&i.stateNode!=null)t.memoizedProps!==u&&Pr(i);else{if(!u){if(i.stateNode===null)throw Error(l(166));return ot(i),null}if(y=Z.current,Ol(i))Wg(i);else{var S=su(ue.current);switch(y){case 1:y=S.createElementNS("http://www.w3.org/2000/svg",m);break;case 2:y=S.createElementNS("http://www.w3.org/1998/Math/MathML",m);break;default:switch(m){case"svg":y=S.createElementNS("http://www.w3.org/2000/svg",m);break;case"math":y=S.createElementNS("http://www.w3.org/1998/Math/MathML",m);break;case"script":y=S.createElement("div"),y.innerHTML="<script><\/script>",y=y.removeChild(y.firstChild);break;case"select":y=typeof u.is=="string"?S.createElement("select",{is:u.is}):S.createElement("select"),u.multiple?y.multiple=!0:u.size&&(y.size=u.size);break;default:y=typeof u.is=="string"?S.createElement(m,{is:u.is}):S.createElement(m)}}y[Ht]=i,y[ln]=u;e:for(S=i.child;S!==null;){if(S.tag===5||S.tag===6)y.appendChild(S.stateNode);else if(S.tag!==4&&S.tag!==27&&S.child!==null){S.child.return=S,S=S.child;continue}if(S===i)break e;for(;S.sibling===null;){if(S.return===null||S.return===i)break e;S=S.return}S.sibling.return=S.return,S=S.sibling}i.stateNode=y;e:switch(Vt(y,m,u),m){case"button":case"input":case"select":case"textarea":u=!!u.autoFocus;break e;case"img":u=!0;break e;default:u=!1}u&&Pr(i)}}return ot(i),Sd(i,i.type,t===null?null:t.memoizedProps,i.pendingProps,a),null;case 6:if(t&&i.stateNode!=null)t.memoizedProps!==u&&Pr(i);else{if(typeof u!="string"&&i.stateNode===null)throw Error(l(166));if(t=ue.current,Ol(i)){if(t=i.stateNode,a=i.memoizedProps,u=null,m=Ft,m!==null)switch(m.tag){case 27:case 5:u=m.memoizedProps}t[Ht]=i,t=!!(t.nodeValue===a||u!==null&&u.suppressHydrationWarning===!0||pv(t.nodeValue,a)),t||ii(i,!0)}else t=su(t).createTextNode(u),t[Ht]=i,i.stateNode=t}return ot(i),null;case 31:if(a=i.memoizedState,t===null||t.memoizedState!==null){if(u=Ol(i),a!==null){if(t===null){if(!u)throw Error(l(318));if(t=i.memoizedState,t=t!==null?t.dehydrated:null,!t)throw Error(l(557));t[Ht]=i}else $i(),(i.flags&128)===0&&(i.memoizedState=null),i.flags|=4;ot(i),t=!1}else a=_f(),t!==null&&t.memoizedState!==null&&(t.memoizedState.hydrationErrors=a),t=!0;if(!t)return i.flags&256?(bn(i),i):(bn(i),null);if((i.flags&128)!==0)throw Error(l(558))}return ot(i),null;case 13:if(u=i.memoizedState,t===null||t.memoizedState!==null&&t.memoizedState.dehydrated!==null){if(m=Ol(i),u!==null&&u.dehydrated!==null){if(t===null){if(!m)throw Error(l(318));if(m=i.memoizedState,m=m!==null?m.dehydrated:null,!m)throw Error(l(317));m[Ht]=i}else $i(),(i.flags&128)===0&&(i.memoizedState=null),i.flags|=4;ot(i),m=!1}else m=_f(),t!==null&&t.memoizedState!==null&&(t.memoizedState.hydrationErrors=m),m=!0;if(!m)return i.flags&256?(bn(i),i):(bn(i),null)}return bn(i),(i.flags&128)!==0?(i.lanes=a,i):(a=u!==null,t=t!==null&&t.memoizedState!==null,a&&(u=i.child,m=null,u.alternate!==null&&u.alternate.memoizedState!==null&&u.alternate.memoizedState.cachePool!==null&&(m=u.alternate.memoizedState.cachePool.pool),y=null,u.memoizedState!==null&&u.memoizedState.cachePool!==null&&(y=u.memoizedState.cachePool.pool),y!==m&&(u.flags|=2048)),a!==t&&a&&(i.child.flags|=8192),Ys(i,i.updateQueue),ot(i),null);case 4:return he(),t===null&&Gd(i.stateNode.containerInfo),ot(i),null;case 10:return Or(i.type),ot(i),null;case 19:if(D(xt),u=i.memoizedState,u===null)return ot(i),null;if(m=(i.flags&128)!==0,y=u.rendering,y===null)if(m)Ja(u,!1);else{if(ht!==0||t!==null&&(t.flags&128)!==0)for(t=i.child;t!==null;){if(y=Ds(t),y!==null){for(i.flags|=128,Ja(u,!1),t=y.updateQueue,i.updateQueue=t,Ys(i,t),i.subtreeFlags=0,t=a,a=i.child;a!==null;)Yg(a,t),a=a.sibling;return A(xt,xt.current&1|2),Ue&&jr(i,u.treeForkCount),i.child}t=t.sibling}u.tail!==null&&mt()>Ws&&(i.flags|=128,m=!0,Ja(u,!1),i.lanes=4194304)}else{if(!m)if(t=Ds(y),t!==null){if(i.flags|=128,m=!0,t=t.updateQueue,i.updateQueue=t,Ys(i,t),Ja(u,!0),u.tail===null&&u.tailMode==="hidden"&&!y.alternate&&!Ue)return ot(i),null}else 2*mt()-u.renderingStartTime>Ws&&a!==536870912&&(i.flags|=128,m=!0,Ja(u,!1),i.lanes=4194304);u.isBackwards?(y.sibling=i.child,i.child=y):(t=u.last,t!==null?t.sibling=y:i.child=y,u.last=y)}return u.tail!==null?(t=u.tail,u.rendering=t,u.tail=t.sibling,u.renderingStartTime=mt(),t.sibling=null,a=xt.current,A(xt,m?a&1|2:a&1),Ue&&jr(i,u.treeForkCount),t):(ot(i),null);case 22:case 23:return bn(i),Vf(),u=i.memoizedState!==null,t!==null?t.memoizedState!==null!==u&&(i.flags|=8192):u&&(i.flags|=8192),u?(a&536870912)!==0&&(i.flags&128)===0&&(ot(i),i.subtreeFlags&6&&(i.flags|=8192)):ot(i),a=i.updateQueue,a!==null&&Ys(i,a.retryQueue),a=null,t!==null&&t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(a=t.memoizedState.cachePool.pool),u=null,i.memoizedState!==null&&i.memoizedState.cachePool!==null&&(u=i.memoizedState.cachePool.pool),u!==a&&(i.flags|=2048),t!==null&&D(Ki),null;case 24:return a=null,t!==null&&(a=t.memoizedState.cache),i.memoizedState.cache!==a&&(i.flags|=2048),Or(wt),ot(i),null;case 25:return null;case 30:return null}throw Error(l(156,i.tag))}function Ck(t,i){switch(Mf(i),i.tag){case 1:return t=i.flags,t&65536?(i.flags=t&-65537|128,i):null;case 3:return Or(wt),he(),t=i.flags,(t&65536)!==0&&(t&128)===0?(i.flags=t&-65537|128,i):null;case 26:case 27:case 5:return lt(i),null;case 31:if(i.memoizedState!==null){if(bn(i),i.alternate===null)throw Error(l(340));$i()}return t=i.flags,t&65536?(i.flags=t&-65537|128,i):null;case 13:if(bn(i),t=i.memoizedState,t!==null&&t.dehydrated!==null){if(i.alternate===null)throw Error(l(340));$i()}return t=i.flags,t&65536?(i.flags=t&-65537|128,i):null;case 19:return D(xt),null;case 4:return he(),null;case 10:return Or(i.type),null;case 22:case 23:return bn(i),Vf(),t!==null&&D(Ki),t=i.flags,t&65536?(i.flags=t&-65537|128,i):null;case 24:return Or(wt),null;case 25:return null;default:return null}}function bx(t,i){switch(Mf(i),i.tag){case 3:Or(wt),he();break;case 26:case 27:case 5:lt(i);break;case 4:he();break;case 31:i.memoizedState!==null&&bn(i);break;case 13:bn(i);break;case 19:D(xt);break;case 10:Or(i.type);break;case 22:case 23:bn(i),Vf(),t!==null&&D(Ki);break;case 24:Or(wt)}}function eo(t,i){try{var a=i.updateQueue,u=a!==null?a.lastEffect:null;if(u!==null){var m=u.next;a=m;do{if((a.tag&t)===t){u=void 0;var y=a.create,S=a.inst;u=y(),S.destroy=u}a=a.next}while(a!==m)}}catch(R){Qe(i,i.return,R)}}function fi(t,i,a){try{var u=i.updateQueue,m=u!==null?u.lastEffect:null;if(m!==null){var y=m.next;u=y;do{if((u.tag&t)===t){var S=u.inst,R=S.destroy;if(R!==void 0){S.destroy=void 0,m=i;var L=a,V=R;try{V()}catch(re){Qe(m,L,re)}}}u=u.next}while(u!==y)}}catch(re){Qe(i,i.return,re)}}function wx(t){var i=t.updateQueue;if(i!==null){var a=t.stateNode;try{fy(i,a)}catch(u){Qe(t,t.return,u)}}}function Sx(t,i,a){a.props=el(t.type,t.memoizedProps),a.state=t.memoizedState;try{a.componentWillUnmount()}catch(u){Qe(t,i,u)}}function to(t,i){try{var a=t.ref;if(a!==null){switch(t.tag){case 26:case 27:case 5:var u=t.stateNode;break;case 30:u=t.stateNode;break;default:u=t.stateNode}typeof a=="function"?t.refCleanup=a(u):a.current=u}}catch(m){Qe(t,i,m)}}function dr(t,i){var a=t.ref,u=t.refCleanup;if(a!==null)if(typeof u=="function")try{u()}catch(m){Qe(t,i,m)}finally{t.refCleanup=null,t=t.alternate,t!=null&&(t.refCleanup=null)}else if(typeof a=="function")try{a(null)}catch(m){Qe(t,i,m)}else a.current=null}function Cx(t){var i=t.type,a=t.memoizedProps,u=t.stateNode;try{e:switch(i){case"button":case"input":case"select":case"textarea":a.autoFocus&&u.focus();break e;case"img":a.src?u.src=a.src:a.srcSet&&(u.srcset=a.srcSet)}}catch(m){Qe(t,t.return,m)}}function Cd(t,i,a){try{var u=t.stateNode;Vk(u,t.type,a,i),u[ln]=i}catch(m){Qe(t,t.return,m)}}function Ex(t){return t.tag===5||t.tag===3||t.tag===26||t.tag===27&&xi(t.type)||t.tag===4}function Ed(t){e:for(;;){for(;t.sibling===null;){if(t.return===null||Ex(t.return))return null;t=t.return}for(t.sibling.return=t.return,t=t.sibling;t.tag!==5&&t.tag!==6&&t.tag!==18;){if(t.tag===27&&xi(t.type)||t.flags&2||t.child===null||t.tag===4)continue e;t.child.return=t,t=t.child}if(!(t.flags&2))return t.stateNode}}function kd(t,i,a){var u=t.tag;if(u===5||u===6)t=t.stateNode,i?(a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a).insertBefore(t,i):(i=a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a,i.appendChild(t),a=a._reactRootContainer,a!=null||i.onclick!==null||(i.onclick=Tr));else if(u!==4&&(u===27&&xi(t.type)&&(a=t.stateNode,i=null),t=t.child,t!==null))for(kd(t,i,a),t=t.sibling;t!==null;)kd(t,i,a),t=t.sibling}function Xs(t,i,a){var u=t.tag;if(u===5||u===6)t=t.stateNode,i?a.insertBefore(t,i):a.appendChild(t);else if(u!==4&&(u===27&&xi(t.type)&&(a=t.stateNode),t=t.child,t!==null))for(Xs(t,i,a),t=t.sibling;t!==null;)Xs(t,i,a),t=t.sibling}function kx(t){var i=t.stateNode,a=t.memoizedProps;try{for(var u=t.type,m=i.attributes;m.length;)i.removeAttributeNode(m[0]);Vt(i,u,a),i[Ht]=t,i[ln]=a}catch(y){Qe(t,t.return,y)}}var Br=!1,Et=!1,Nd=!1,Nx=typeof WeakSet=="function"?WeakSet:Set,Dt=null;function Ek(t,i){if(t=t.containerInfo,Yd=pu,t=Bg(t),vf(t)){if("selectionStart"in t)var a={start:t.selectionStart,end:t.selectionEnd};else e:{a=(a=t.ownerDocument)&&a.defaultView||window;var u=a.getSelection&&a.getSelection();if(u&&u.rangeCount!==0){a=u.anchorNode;var m=u.anchorOffset,y=u.focusNode;u=u.focusOffset;try{a.nodeType,y.nodeType}catch{a=null;break e}var S=0,R=-1,L=-1,V=0,re=0,oe=t,K=null;t:for(;;){for(var W;oe!==a||m!==0&&oe.nodeType!==3||(R=S+m),oe!==y||u!==0&&oe.nodeType!==3||(L=S+u),oe.nodeType===3&&(S+=oe.nodeValue.length),(W=oe.firstChild)!==null;)K=oe,oe=W;for(;;){if(oe===t)break t;if(K===a&&++V===m&&(R=S),K===y&&++re===u&&(L=S),(W=oe.nextSibling)!==null)break;oe=K,K=oe.parentNode}oe=W}a=R===-1||L===-1?null:{start:R,end:L}}else a=null}a=a||{start:0,end:0}}else a=null;for(Xd={focusedElem:t,selectionRange:a},pu=!1,Dt=i;Dt!==null;)if(i=Dt,t=i.child,(i.subtreeFlags&1028)!==0&&t!==null)t.return=i,Dt=t;else for(;Dt!==null;){switch(i=Dt,y=i.alternate,t=i.flags,i.tag){case 0:if((t&4)!==0&&(t=i.updateQueue,t=t!==null?t.events:null,t!==null))for(a=0;a<t.length;a++)m=t[a],m.ref.impl=m.nextImpl;break;case 11:case 15:break;case 1:if((t&1024)!==0&&y!==null){t=void 0,a=i,m=y.memoizedProps,y=y.memoizedState,u=a.stateNode;try{var ge=el(a.type,m);t=u.getSnapshotBeforeUpdate(ge,y),u.__reactInternalSnapshotBeforeUpdate=t}catch(Re){Qe(a,a.return,Re)}}break;case 3:if((t&1024)!==0){if(t=i.stateNode.containerInfo,a=t.nodeType,a===9)Zd(t);else if(a===1)switch(t.nodeName){case"HEAD":case"HTML":case"BODY":Zd(t);break;default:t.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((t&1024)!==0)throw Error(l(163))}if(t=i.sibling,t!==null){t.return=i.return,Dt=t;break}Dt=i.return}}function Rx(t,i,a){var u=a.flags;switch(a.tag){case 0:case 11:case 15:Ur(t,a),u&4&&eo(5,a);break;case 1:if(Ur(t,a),u&4)if(t=a.stateNode,i===null)try{t.componentDidMount()}catch(S){Qe(a,a.return,S)}else{var m=el(a.type,i.memoizedProps);i=i.memoizedState;try{t.componentDidUpdate(m,i,t.__reactInternalSnapshotBeforeUpdate)}catch(S){Qe(a,a.return,S)}}u&64&&wx(a),u&512&&to(a,a.return);break;case 3:if(Ur(t,a),u&64&&(t=a.updateQueue,t!==null)){if(i=null,a.child!==null)switch(a.child.tag){case 27:case 5:i=a.child.stateNode;break;case 1:i=a.child.stateNode}try{fy(t,i)}catch(S){Qe(a,a.return,S)}}break;case 27:i===null&&u&4&&kx(a);case 26:case 5:Ur(t,a),i===null&&u&4&&Cx(a),u&512&&to(a,a.return);break;case 12:Ur(t,a);break;case 31:Ur(t,a),u&4&&Mx(t,a);break;case 13:Ur(t,a),u&4&&jx(t,a),u&64&&(t=a.memoizedState,t!==null&&(t=t.dehydrated,t!==null&&(a=Ok.bind(null,a),Jk(t,a))));break;case 22:if(u=a.memoizedState!==null||Br,!u){i=i!==null&&i.memoizedState!==null||Et,m=Br;var y=Et;Br=u,(Et=i)&&!y?Hr(t,a,(a.subtreeFlags&8772)!==0):Ur(t,a),Br=m,Et=y}break;case 30:break;default:Ur(t,a)}}function Tx(t){var i=t.alternate;i!==null&&(t.alternate=null,Tx(i)),t.child=null,t.deletions=null,t.sibling=null,t.tag===5&&(i=t.stateNode,i!==null&&tf(i)),t.stateNode=null,t.return=null,t.dependencies=null,t.memoizedProps=null,t.memoizedState=null,t.pendingProps=null,t.stateNode=null,t.updateQueue=null}var ut=null,on=!1;function Ir(t,i,a){for(a=a.child;a!==null;)Ax(t,i,a),a=a.sibling}function Ax(t,i,a){if(pt&&typeof pt.onCommitFiberUnmount=="function")try{pt.onCommitFiberUnmount(Ut,a)}catch{}switch(a.tag){case 26:Et||dr(a,i),Ir(t,i,a),a.memoizedState?a.memoizedState.count--:a.stateNode&&(a=a.stateNode,a.parentNode.removeChild(a));break;case 27:Et||dr(a,i);var u=ut,m=on;xi(a.type)&&(ut=a.stateNode,on=!1),Ir(t,i,a),co(a.stateNode),ut=u,on=m;break;case 5:Et||dr(a,i);case 6:if(u=ut,m=on,ut=null,Ir(t,i,a),ut=u,on=m,ut!==null)if(on)try{(ut.nodeType===9?ut.body:ut.nodeName==="HTML"?ut.ownerDocument.body:ut).removeChild(a.stateNode)}catch(y){Qe(a,i,y)}else try{ut.removeChild(a.stateNode)}catch(y){Qe(a,i,y)}break;case 18:ut!==null&&(on?(t=ut,wv(t.nodeType===9?t.body:t.nodeName==="HTML"?t.ownerDocument.body:t,a.stateNode),ea(t)):wv(ut,a.stateNode));break;case 4:u=ut,m=on,ut=a.stateNode.containerInfo,on=!0,Ir(t,i,a),ut=u,on=m;break;case 0:case 11:case 14:case 15:fi(2,a,i),Et||fi(4,a,i),Ir(t,i,a);break;case 1:Et||(dr(a,i),u=a.stateNode,typeof u.componentWillUnmount=="function"&&Sx(a,i,u)),Ir(t,i,a);break;case 21:Ir(t,i,a);break;case 22:Et=(u=Et)||a.memoizedState!==null,Ir(t,i,a),Et=u;break;default:Ir(t,i,a)}}function Mx(t,i){if(i.memoizedState===null&&(t=i.alternate,t!==null&&(t=t.memoizedState,t!==null))){t=t.dehydrated;try{ea(t)}catch(a){Qe(i,i.return,a)}}}function jx(t,i){if(i.memoizedState===null&&(t=i.alternate,t!==null&&(t=t.memoizedState,t!==null&&(t=t.dehydrated,t!==null))))try{ea(t)}catch(a){Qe(i,i.return,a)}}function kk(t){switch(t.tag){case 31:case 13:case 19:var i=t.stateNode;return i===null&&(i=t.stateNode=new Nx),i;case 22:return t=t.stateNode,i=t._retryCache,i===null&&(i=t._retryCache=new Nx),i;default:throw Error(l(435,t.tag))}}function Ks(t,i){var a=kk(t);i.forEach(function(u){if(!a.has(u)){a.add(u);var m=Dk.bind(null,t,u);u.then(m,m)}})}function sn(t,i){var a=i.deletions;if(a!==null)for(var u=0;u<a.length;u++){var m=a[u],y=t,S=i,R=S;e:for(;R!==null;){switch(R.tag){case 27:if(xi(R.type)){ut=R.stateNode,on=!1;break e}break;case 5:ut=R.stateNode,on=!1;break e;case 3:case 4:ut=R.stateNode.containerInfo,on=!0;break e}R=R.return}if(ut===null)throw Error(l(160));Ax(y,S,m),ut=null,on=!1,y=m.alternate,y!==null&&(y.return=null),m.return=null}if(i.subtreeFlags&13886)for(i=i.child;i!==null;)_x(i,t),i=i.sibling}var Wn=null;function _x(t,i){var a=t.alternate,u=t.flags;switch(t.tag){case 0:case 11:case 14:case 15:sn(i,t),un(t),u&4&&(fi(3,t,t.return),eo(3,t),fi(5,t,t.return));break;case 1:sn(i,t),un(t),u&512&&(Et||a===null||dr(a,a.return)),u&64&&Br&&(t=t.updateQueue,t!==null&&(u=t.callbacks,u!==null&&(a=t.shared.hiddenCallbacks,t.shared.hiddenCallbacks=a===null?u:a.concat(u))));break;case 26:var m=Wn;if(sn(i,t),un(t),u&512&&(Et||a===null||dr(a,a.return)),u&4){var y=a!==null?a.memoizedState:null;if(u=t.memoizedState,a===null)if(u===null)if(t.stateNode===null){e:{u=t.type,a=t.memoizedProps,m=m.ownerDocument||m;t:switch(u){case"title":y=m.getElementsByTagName("title")[0],(!y||y[Ta]||y[Ht]||y.namespaceURI==="http://www.w3.org/2000/svg"||y.hasAttribute("itemprop"))&&(y=m.createElement(u),m.head.insertBefore(y,m.querySelector("head > title"))),Vt(y,u,a),y[Ht]=t,Ot(y),u=y;break e;case"link":var S=_v("link","href",m).get(u+(a.href||""));if(S){for(var R=0;R<S.length;R++)if(y=S[R],y.getAttribute("href")===(a.href==null||a.href===""?null:a.href)&&y.getAttribute("rel")===(a.rel==null?null:a.rel)&&y.getAttribute("title")===(a.title==null?null:a.title)&&y.getAttribute("crossorigin")===(a.crossOrigin==null?null:a.crossOrigin)){S.splice(R,1);break t}}y=m.createElement(u),Vt(y,u,a),m.head.appendChild(y);break;case"meta":if(S=_v("meta","content",m).get(u+(a.content||""))){for(R=0;R<S.length;R++)if(y=S[R],y.getAttribute("content")===(a.content==null?null:""+a.content)&&y.getAttribute("name")===(a.name==null?null:a.name)&&y.getAttribute("property")===(a.property==null?null:a.property)&&y.getAttribute("http-equiv")===(a.httpEquiv==null?null:a.httpEquiv)&&y.getAttribute("charset")===(a.charSet==null?null:a.charSet)){S.splice(R,1);break t}}y=m.createElement(u),Vt(y,u,a),m.head.appendChild(y);break;default:throw Error(l(468,u))}y[Ht]=t,Ot(y),u=y}t.stateNode=u}else Ov(m,t.type,t.stateNode);else t.stateNode=jv(m,u,t.memoizedProps);else y!==u?(y===null?a.stateNode!==null&&(a=a.stateNode,a.parentNode.removeChild(a)):y.count--,u===null?Ov(m,t.type,t.stateNode):jv(m,u,t.memoizedProps)):u===null&&t.stateNode!==null&&Cd(t,t.memoizedProps,a.memoizedProps)}break;case 27:sn(i,t),un(t),u&512&&(Et||a===null||dr(a,a.return)),a!==null&&u&4&&Cd(t,t.memoizedProps,a.memoizedProps);break;case 5:if(sn(i,t),un(t),u&512&&(Et||a===null||dr(a,a.return)),t.flags&32){m=t.stateNode;try{Cl(m,"")}catch(ge){Qe(t,t.return,ge)}}u&4&&t.stateNode!=null&&(m=t.memoizedProps,Cd(t,m,a!==null?a.memoizedProps:m)),u&1024&&(Nd=!0);break;case 6:if(sn(i,t),un(t),u&4){if(t.stateNode===null)throw Error(l(162));u=t.memoizedProps,a=t.stateNode;try{a.nodeValue=u}catch(ge){Qe(t,t.return,ge)}}break;case 3:if(fu=null,m=Wn,Wn=uu(i.containerInfo),sn(i,t),Wn=m,un(t),u&4&&a!==null&&a.memoizedState.isDehydrated)try{ea(i.containerInfo)}catch(ge){Qe(t,t.return,ge)}Nd&&(Nd=!1,Ox(t));break;case 4:u=Wn,Wn=uu(t.stateNode.containerInfo),sn(i,t),un(t),Wn=u;break;case 12:sn(i,t),un(t);break;case 31:sn(i,t),un(t),u&4&&(u=t.updateQueue,u!==null&&(t.updateQueue=null,Ks(t,u)));break;case 13:sn(i,t),un(t),t.child.flags&8192&&t.memoizedState!==null!=(a!==null&&a.memoizedState!==null)&&(Zs=mt()),u&4&&(u=t.updateQueue,u!==null&&(t.updateQueue=null,Ks(t,u)));break;case 22:m=t.memoizedState!==null;var L=a!==null&&a.memoizedState!==null,V=Br,re=Et;if(Br=V||m,Et=re||L,sn(i,t),Et=re,Br=V,un(t),u&8192)e:for(i=t.stateNode,i._visibility=m?i._visibility&-2:i._visibility|1,m&&(a===null||L||Br||Et||tl(t)),a=null,i=t;;){if(i.tag===5||i.tag===26){if(a===null){L=a=i;try{if(y=L.stateNode,m)S=y.style,typeof S.setProperty=="function"?S.setProperty("display","none","important"):S.display="none";else{R=L.stateNode;var oe=L.memoizedProps.style,K=oe!=null&&oe.hasOwnProperty("display")?oe.display:null;R.style.display=K==null||typeof K=="boolean"?"":(""+K).trim()}}catch(ge){Qe(L,L.return,ge)}}}else if(i.tag===6){if(a===null){L=i;try{L.stateNode.nodeValue=m?"":L.memoizedProps}catch(ge){Qe(L,L.return,ge)}}}else if(i.tag===18){if(a===null){L=i;try{var W=L.stateNode;m?Sv(W,!0):Sv(L.stateNode,!1)}catch(ge){Qe(L,L.return,ge)}}}else if((i.tag!==22&&i.tag!==23||i.memoizedState===null||i===t)&&i.child!==null){i.child.return=i,i=i.child;continue}if(i===t)break e;for(;i.sibling===null;){if(i.return===null||i.return===t)break e;a===i&&(a=null),i=i.return}a===i&&(a=null),i.sibling.return=i.return,i=i.sibling}u&4&&(u=t.updateQueue,u!==null&&(a=u.retryQueue,a!==null&&(u.retryQueue=null,Ks(t,a))));break;case 19:sn(i,t),un(t),u&4&&(u=t.updateQueue,u!==null&&(t.updateQueue=null,Ks(t,u)));break;case 30:break;case 21:break;default:sn(i,t),un(t)}}function un(t){var i=t.flags;if(i&2){try{for(var a,u=t.return;u!==null;){if(Ex(u)){a=u;break}u=u.return}if(a==null)throw Error(l(160));switch(a.tag){case 27:var m=a.stateNode,y=Ed(t);Xs(t,y,m);break;case 5:var S=a.stateNode;a.flags&32&&(Cl(S,""),a.flags&=-33);var R=Ed(t);Xs(t,R,S);break;case 3:case 4:var L=a.stateNode.containerInfo,V=Ed(t);kd(t,V,L);break;default:throw Error(l(161))}}catch(re){Qe(t,t.return,re)}t.flags&=-3}i&4096&&(t.flags&=-4097)}function Ox(t){if(t.subtreeFlags&1024)for(t=t.child;t!==null;){var i=t;Ox(i),i.tag===5&&i.flags&1024&&i.stateNode.reset(),t=t.sibling}}function Ur(t,i){if(i.subtreeFlags&8772)for(i=i.child;i!==null;)Rx(t,i.alternate,i),i=i.sibling}function tl(t){for(t=t.child;t!==null;){var i=t;switch(i.tag){case 0:case 11:case 14:case 15:fi(4,i,i.return),tl(i);break;case 1:dr(i,i.return);var a=i.stateNode;typeof a.componentWillUnmount=="function"&&Sx(i,i.return,a),tl(i);break;case 27:co(i.stateNode);case 26:case 5:dr(i,i.return),tl(i);break;case 22:i.memoizedState===null&&tl(i);break;case 30:tl(i);break;default:tl(i)}t=t.sibling}}function Hr(t,i,a){for(a=a&&(i.subtreeFlags&8772)!==0,i=i.child;i!==null;){var u=i.alternate,m=t,y=i,S=y.flags;switch(y.tag){case 0:case 11:case 15:Hr(m,y,a),eo(4,y);break;case 1:if(Hr(m,y,a),u=y,m=u.stateNode,typeof m.componentDidMount=="function")try{m.componentDidMount()}catch(V){Qe(u,u.return,V)}if(u=y,m=u.updateQueue,m!==null){var R=u.stateNode;try{var L=m.shared.hiddenCallbacks;if(L!==null)for(m.shared.hiddenCallbacks=null,m=0;m<L.length;m++)cy(L[m],R)}catch(V){Qe(u,u.return,V)}}a&&S&64&&wx(y),to(y,y.return);break;case 27:kx(y);case 26:case 5:Hr(m,y,a),a&&u===null&&S&4&&Cx(y),to(y,y.return);break;case 12:Hr(m,y,a);break;case 31:Hr(m,y,a),a&&S&4&&Mx(m,y);break;case 13:Hr(m,y,a),a&&S&4&&jx(m,y);break;case 22:y.memoizedState===null&&Hr(m,y,a),to(y,y.return);break;case 30:break;default:Hr(m,y,a)}i=i.sibling}}function Rd(t,i){var a=null;t!==null&&t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(a=t.memoizedState.cachePool.pool),t=null,i.memoizedState!==null&&i.memoizedState.cachePool!==null&&(t=i.memoizedState.cachePool.pool),t!==a&&(t!=null&&t.refCount++,a!=null&&Ha(a))}function Td(t,i){t=null,i.alternate!==null&&(t=i.alternate.memoizedState.cache),i=i.memoizedState.cache,i!==t&&(i.refCount++,t!=null&&Ha(t))}function Jn(t,i,a,u){if(i.subtreeFlags&10256)for(i=i.child;i!==null;)Dx(t,i,a,u),i=i.sibling}function Dx(t,i,a,u){var m=i.flags;switch(i.tag){case 0:case 11:case 15:Jn(t,i,a,u),m&2048&&eo(9,i);break;case 1:Jn(t,i,a,u);break;case 3:Jn(t,i,a,u),m&2048&&(t=null,i.alternate!==null&&(t=i.alternate.memoizedState.cache),i=i.memoizedState.cache,i!==t&&(i.refCount++,t!=null&&Ha(t)));break;case 12:if(m&2048){Jn(t,i,a,u),t=i.stateNode;try{var y=i.memoizedProps,S=y.id,R=y.onPostCommit;typeof R=="function"&&R(S,i.alternate===null?"mount":"update",t.passiveEffectDuration,-0)}catch(L){Qe(i,i.return,L)}}else Jn(t,i,a,u);break;case 31:Jn(t,i,a,u);break;case 13:Jn(t,i,a,u);break;case 23:break;case 22:y=i.stateNode,S=i.alternate,i.memoizedState!==null?y._visibility&2?Jn(t,i,a,u):no(t,i):y._visibility&2?Jn(t,i,a,u):(y._visibility|=2,ql(t,i,a,u,(i.subtreeFlags&10256)!==0||!1)),m&2048&&Rd(S,i);break;case 24:Jn(t,i,a,u),m&2048&&Td(i.alternate,i);break;default:Jn(t,i,a,u)}}function ql(t,i,a,u,m){for(m=m&&((i.subtreeFlags&10256)!==0||!1),i=i.child;i!==null;){var y=t,S=i,R=a,L=u,V=S.flags;switch(S.tag){case 0:case 11:case 15:ql(y,S,R,L,m),eo(8,S);break;case 23:break;case 22:var re=S.stateNode;S.memoizedState!==null?re._visibility&2?ql(y,S,R,L,m):no(y,S):(re._visibility|=2,ql(y,S,R,L,m)),m&&V&2048&&Rd(S.alternate,S);break;case 24:ql(y,S,R,L,m),m&&V&2048&&Td(S.alternate,S);break;default:ql(y,S,R,L,m)}i=i.sibling}}function no(t,i){if(i.subtreeFlags&10256)for(i=i.child;i!==null;){var a=t,u=i,m=u.flags;switch(u.tag){case 22:no(a,u),m&2048&&Rd(u.alternate,u);break;case 24:no(a,u),m&2048&&Td(u.alternate,u);break;default:no(a,u)}i=i.sibling}}var ro=8192;function Gl(t,i,a){if(t.subtreeFlags&ro)for(t=t.child;t!==null;)zx(t,i,a),t=t.sibling}function zx(t,i,a){switch(t.tag){case 26:Gl(t,i,a),t.flags&ro&&t.memoizedState!==null&&fN(a,Wn,t.memoizedState,t.memoizedProps);break;case 5:Gl(t,i,a);break;case 3:case 4:var u=Wn;Wn=uu(t.stateNode.containerInfo),Gl(t,i,a),Wn=u;break;case 22:t.memoizedState===null&&(u=t.alternate,u!==null&&u.memoizedState!==null?(u=ro,ro=16777216,Gl(t,i,a),ro=u):Gl(t,i,a));break;default:Gl(t,i,a)}}function Lx(t){var i=t.alternate;if(i!==null&&(t=i.child,t!==null)){i.child=null;do i=t.sibling,t.sibling=null,t=i;while(t!==null)}}function io(t){var i=t.deletions;if((t.flags&16)!==0){if(i!==null)for(var a=0;a<i.length;a++){var u=i[a];Dt=u,Bx(u,t)}Lx(t)}if(t.subtreeFlags&10256)for(t=t.child;t!==null;)Px(t),t=t.sibling}function Px(t){switch(t.tag){case 0:case 11:case 15:io(t),t.flags&2048&&fi(9,t,t.return);break;case 3:io(t);break;case 12:io(t);break;case 22:var i=t.stateNode;t.memoizedState!==null&&i._visibility&2&&(t.return===null||t.return.tag!==13)?(i._visibility&=-3,Qs(t)):io(t);break;default:io(t)}}function Qs(t){var i=t.deletions;if((t.flags&16)!==0){if(i!==null)for(var a=0;a<i.length;a++){var u=i[a];Dt=u,Bx(u,t)}Lx(t)}for(t=t.child;t!==null;){switch(i=t,i.tag){case 0:case 11:case 15:fi(8,i,i.return),Qs(i);break;case 22:a=i.stateNode,a._visibility&2&&(a._visibility&=-3,Qs(i));break;default:Qs(i)}t=t.sibling}}function Bx(t,i){for(;Dt!==null;){var a=Dt;switch(a.tag){case 0:case 11:case 15:fi(8,a,i);break;case 23:case 22:if(a.memoizedState!==null&&a.memoizedState.cachePool!==null){var u=a.memoizedState.cachePool.pool;u!=null&&u.refCount++}break;case 24:Ha(a.memoizedState.cache)}if(u=a.child,u!==null)u.return=a,Dt=u;else e:for(a=t;Dt!==null;){u=Dt;var m=u.sibling,y=u.return;if(Tx(u),u===a){Dt=null;break e}if(m!==null){m.return=y,Dt=m;break e}Dt=y}}}var Nk={getCacheForType:function(t){var i=qt(wt),a=i.data.get(t);return a===void 0&&(a=t(),i.data.set(t,a)),a},cacheSignal:function(){return qt(wt).controller.signal}},Rk=typeof WeakMap=="function"?WeakMap:Map,Ge=0,et=null,ze=null,Be=0,Ke=0,wn=null,di=!1,Vl=!1,Ad=!1,Fr=0,ht=0,hi=0,nl=0,Md=0,Sn=0,$l=0,lo=null,cn=null,jd=!1,Zs=0,Ix=0,Ws=1/0,Js=null,mi=null,Rt=0,pi=null,Yl=null,qr=0,_d=0,Od=null,Ux=null,ao=0,Dd=null;function Cn(){return(Ge&2)!==0&&Be!==0?Be&-Be:B.T!==null?Ud():Qn()}function Hx(){if(Sn===0)if((Be&536870912)===0||Ue){var t=gl;gl<<=1,(gl&3932160)===0&&(gl=262144),Sn=t}else Sn=536870912;return t=vn.current,t!==null&&(t.flags|=32),Sn}function fn(t,i,a){(t===et&&(Ke===2||Ke===9)||t.cancelPendingCommit!==null)&&(Xl(t,0),gi(t,Be,Sn,!1)),An(t,a),((Ge&2)===0||t!==et)&&(t===et&&((Ge&2)===0&&(nl|=a),ht===4&&gi(t,Be,Sn,!1)),hr(t))}function Fx(t,i,a){if((Ge&6)!==0)throw Error(l(327));var u=!a&&(i&127)===0&&(i&t.expiredLanes)===0||tn(t,i),m=u?Mk(t,i):Ld(t,i,!0),y=u;do{if(m===0){Vl&&!u&&gi(t,i,0,!1);break}else{if(a=t.current.alternate,y&&!Tk(a)){m=Ld(t,i,!1),y=!1;continue}if(m===2){if(y=i,t.errorRecoveryDisabledLanes&y)var S=0;else S=t.pendingLanes&-536870913,S=S!==0?S:S&536870912?536870912:0;if(S!==0){i=S;e:{var R=t;m=lo;var L=R.current.memoizedState.isDehydrated;if(L&&(Xl(R,S).flags|=256),S=Ld(R,S,!1),S!==2){if(Ad&&!L){R.errorRecoveryDisabledLanes|=y,nl|=y,m=4;break e}y=cn,cn=m,y!==null&&(cn===null?cn=y:cn.push.apply(cn,y))}m=S}if(y=!1,m!==2)continue}}if(m===1){Xl(t,0),gi(t,i,0,!0);break}e:{switch(u=t,y=m,y){case 0:case 1:throw Error(l(345));case 4:if((i&4194048)!==i)break;case 6:gi(u,i,Sn,!di);break e;case 2:cn=null;break;case 3:case 5:break;default:throw Error(l(329))}if((i&62914560)===i&&(m=Zs+300-mt(),10<m)){if(gi(u,i,Sn,!di),_t(u,0,!0)!==0)break e;qr=i,u.timeoutHandle=vv(qx.bind(null,u,a,cn,Js,jd,i,Sn,nl,$l,di,y,"Throttled",-0,0),m);break e}qx(u,a,cn,Js,jd,i,Sn,nl,$l,di,y,null,-0,0)}}break}while(!0);hr(t)}function qx(t,i,a,u,m,y,S,R,L,V,re,oe,K,W){if(t.timeoutHandle=-1,oe=i.subtreeFlags,oe&8192||(oe&16785408)===16785408){oe={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Tr},zx(i,y,oe);var ge=(y&62914560)===y?Zs-mt():(y&4194048)===y?Ix-mt():0;if(ge=dN(oe,ge),ge!==null){qr=y,t.cancelPendingCommit=ge(Zx.bind(null,t,i,y,a,u,m,S,R,L,re,oe,null,K,W)),gi(t,y,S,!V);return}}Zx(t,i,y,a,u,m,S,R,L)}function Tk(t){for(var i=t;;){var a=i.tag;if((a===0||a===11||a===15)&&i.flags&16384&&(a=i.updateQueue,a!==null&&(a=a.stores,a!==null)))for(var u=0;u<a.length;u++){var m=a[u],y=m.getSnapshot;m=m.value;try{if(!yn(y(),m))return!1}catch{return!1}}if(a=i.child,i.subtreeFlags&16384&&a!==null)a.return=i,i=a;else{if(i===t)break;for(;i.sibling===null;){if(i.return===null||i.return===t)return!0;i=i.return}i.sibling.return=i.return,i=i.sibling}}return!0}function gi(t,i,a,u){i&=~Md,i&=~nl,t.suspendedLanes|=i,t.pingedLanes&=~i,u&&(t.warmLanes|=i),u=t.expirationTimes;for(var m=i;0<m;){var y=31-Xe(m),S=1<<y;u[y]=-1,m&=~S}a!==0&&Kn(t,a,i)}function eu(){return(Ge&6)===0?(oo(0),!1):!0}function zd(){if(ze!==null){if(Ke===0)var t=ze.return;else t=ze,_r=Yi=null,Zf(t),Bl=null,qa=0,t=ze;for(;t!==null;)bx(t.alternate,t),t=t.return;ze=null}}function Xl(t,i){var a=t.timeoutHandle;a!==-1&&(t.timeoutHandle=-1,Xk(a)),a=t.cancelPendingCommit,a!==null&&(t.cancelPendingCommit=null,a()),qr=0,zd(),et=t,ze=a=Mr(t.current,null),Be=i,Ke=0,wn=null,di=!1,Vl=tn(t,i),Ad=!1,$l=Sn=Md=nl=hi=ht=0,cn=lo=null,jd=!1,(i&8)!==0&&(i|=i&32);var u=t.entangledLanes;if(u!==0)for(t=t.entanglements,u&=i;0<u;){var m=31-Xe(u),y=1<<m;i|=t[m],u&=~y}return Fr=i,ws(),a}function Gx(t,i){Me=null,B.H=Za,i===Pl||i===As?(i=ay(),Ke=3):i===If?(i=ay(),Ke=4):Ke=i===hd?8:i!==null&&typeof i=="object"&&typeof i.then=="function"?6:1,wn=i,ze===null&&(ht=1,qs(t,zn(i,t.current)))}function Vx(){var t=vn.current;return t===null?!0:(Be&4194048)===Be?In===null:(Be&62914560)===Be||(Be&536870912)!==0?t===In:!1}function $x(){var t=B.H;return B.H=Za,t===null?Za:t}function Yx(){var t=B.A;return B.A=Nk,t}function tu(){ht=4,di||(Be&4194048)!==Be&&vn.current!==null||(Vl=!0),(hi&134217727)===0&&(nl&134217727)===0||et===null||gi(et,Be,Sn,!1)}function Ld(t,i,a){var u=Ge;Ge|=2;var m=$x(),y=Yx();(et!==t||Be!==i)&&(Js=null,Xl(t,i)),i=!1;var S=ht;e:do try{if(Ke!==0&&ze!==null){var R=ze,L=wn;switch(Ke){case 8:zd(),S=6;break e;case 3:case 2:case 9:case 6:vn.current===null&&(i=!0);var V=Ke;if(Ke=0,wn=null,Kl(t,R,L,V),a&&Vl){S=0;break e}break;default:V=Ke,Ke=0,wn=null,Kl(t,R,L,V)}}Ak(),S=ht;break}catch(re){Gx(t,re)}while(!0);return i&&t.shellSuspendCounter++,_r=Yi=null,Ge=u,B.H=m,B.A=y,ze===null&&(et=null,Be=0,ws()),S}function Ak(){for(;ze!==null;)Xx(ze)}function Mk(t,i){var a=Ge;Ge|=2;var u=$x(),m=Yx();et!==t||Be!==i?(Js=null,Ws=mt()+500,Xl(t,i)):Vl=tn(t,i);e:do try{if(Ke!==0&&ze!==null){i=ze;var y=wn;t:switch(Ke){case 1:Ke=0,wn=null,Kl(t,i,y,1);break;case 2:case 9:if(iy(y)){Ke=0,wn=null,Kx(i);break}i=function(){Ke!==2&&Ke!==9||et!==t||(Ke=7),hr(t)},y.then(i,i);break e;case 3:Ke=7;break e;case 4:Ke=5;break e;case 7:iy(y)?(Ke=0,wn=null,Kx(i)):(Ke=0,wn=null,Kl(t,i,y,7));break;case 5:var S=null;switch(ze.tag){case 26:S=ze.memoizedState;case 5:case 27:var R=ze;if(S?Dv(S):R.stateNode.complete){Ke=0,wn=null;var L=R.sibling;if(L!==null)ze=L;else{var V=R.return;V!==null?(ze=V,nu(V)):ze=null}break t}}Ke=0,wn=null,Kl(t,i,y,5);break;case 6:Ke=0,wn=null,Kl(t,i,y,6);break;case 8:zd(),ht=6;break e;default:throw Error(l(462))}}jk();break}catch(re){Gx(t,re)}while(!0);return _r=Yi=null,B.H=u,B.A=m,Ge=a,ze!==null?0:(et=null,Be=0,ws(),ht)}function jk(){for(;ze!==null&&!sr();)Xx(ze)}function Xx(t){var i=xx(t.alternate,t,Fr);t.memoizedProps=t.pendingProps,i===null?nu(t):ze=i}function Kx(t){var i=t,a=i.alternate;switch(i.tag){case 15:case 0:i=dx(a,i,i.pendingProps,i.type,void 0,Be);break;case 11:i=dx(a,i,i.pendingProps,i.type.render,i.ref,Be);break;case 5:Zf(i);default:bx(a,i),i=ze=Yg(i,Fr),i=xx(a,i,Fr)}t.memoizedProps=t.pendingProps,i===null?nu(t):ze=i}function Kl(t,i,a,u){_r=Yi=null,Zf(i),Bl=null,qa=0;var m=i.return;try{if(vk(t,m,i,a,Be)){ht=1,qs(t,zn(a,t.current)),ze=null;return}}catch(y){if(m!==null)throw ze=m,y;ht=1,qs(t,zn(a,t.current)),ze=null;return}i.flags&32768?(Ue||u===1?t=!0:Vl||(Be&536870912)!==0?t=!1:(di=t=!0,(u===2||u===9||u===3||u===6)&&(u=vn.current,u!==null&&u.tag===13&&(u.flags|=16384))),Qx(i,t)):nu(i)}function nu(t){var i=t;do{if((i.flags&32768)!==0){Qx(i,di);return}t=i.return;var a=Sk(i.alternate,i,Fr);if(a!==null){ze=a;return}if(i=i.sibling,i!==null){ze=i;return}ze=i=t}while(i!==null);ht===0&&(ht=5)}function Qx(t,i){do{var a=Ck(t.alternate,t);if(a!==null){a.flags&=32767,ze=a;return}if(a=t.return,a!==null&&(a.flags|=32768,a.subtreeFlags=0,a.deletions=null),!i&&(t=t.sibling,t!==null)){ze=t;return}ze=t=a}while(t!==null);ht=6,ze=null}function Zx(t,i,a,u,m,y,S,R,L){t.cancelPendingCommit=null;do ru();while(Rt!==0);if((Ge&6)!==0)throw Error(l(327));if(i!==null){if(i===t.current)throw Error(l(177));if(y=i.lanes|i.childLanes,y|=Ef,Nt(t,a,y,S,R,L),t===et&&(ze=et=null,Be=0),Yl=i,pi=t,qr=a,_d=y,Od=m,Ux=u,(i.subtreeFlags&10256)!==0||(i.flags&10256)!==0?(t.callbackNode=null,t.callbackPriority=0,zk(se,function(){return nv(),null})):(t.callbackNode=null,t.callbackPriority=0),u=(i.flags&13878)!==0,(i.subtreeFlags&13878)!==0||u){u=B.T,B.T=null,m=X.p,X.p=2,S=Ge,Ge|=4;try{Ek(t,i,a)}finally{Ge=S,X.p=m,B.T=u}}Rt=1,Wx(),Jx(),ev()}}function Wx(){if(Rt===1){Rt=0;var t=pi,i=Yl,a=(i.flags&13878)!==0;if((i.subtreeFlags&13878)!==0||a){a=B.T,B.T=null;var u=X.p;X.p=2;var m=Ge;Ge|=4;try{_x(i,t);var y=Xd,S=Bg(t.containerInfo),R=y.focusedElem,L=y.selectionRange;if(S!==R&&R&&R.ownerDocument&&Pg(R.ownerDocument.documentElement,R)){if(L!==null&&vf(R)){var V=L.start,re=L.end;if(re===void 0&&(re=V),"selectionStart"in R)R.selectionStart=V,R.selectionEnd=Math.min(re,R.value.length);else{var oe=R.ownerDocument||document,K=oe&&oe.defaultView||window;if(K.getSelection){var W=K.getSelection(),ge=R.textContent.length,Re=Math.min(L.start,ge),Je=L.end===void 0?Re:Math.min(L.end,ge);!W.extend&&Re>Je&&(S=Je,Je=Re,Re=S);var q=Lg(R,Re),H=Lg(R,Je);if(q&&H&&(W.rangeCount!==1||W.anchorNode!==q.node||W.anchorOffset!==q.offset||W.focusNode!==H.node||W.focusOffset!==H.offset)){var G=oe.createRange();G.setStart(q.node,q.offset),W.removeAllRanges(),Re>Je?(W.addRange(G),W.extend(H.node,H.offset)):(G.setEnd(H.node,H.offset),W.addRange(G))}}}}for(oe=[],W=R;W=W.parentNode;)W.nodeType===1&&oe.push({element:W,left:W.scrollLeft,top:W.scrollTop});for(typeof R.focus=="function"&&R.focus(),R=0;R<oe.length;R++){var ae=oe[R];ae.element.scrollLeft=ae.left,ae.element.scrollTop=ae.top}}pu=!!Yd,Xd=Yd=null}finally{Ge=m,X.p=u,B.T=a}}t.current=i,Rt=2}}function Jx(){if(Rt===2){Rt=0;var t=pi,i=Yl,a=(i.flags&8772)!==0;if((i.subtreeFlags&8772)!==0||a){a=B.T,B.T=null;var u=X.p;X.p=2;var m=Ge;Ge|=4;try{Rx(t,i.alternate,i)}finally{Ge=m,X.p=u,B.T=a}}Rt=3}}function ev(){if(Rt===4||Rt===3){Rt=0,Wr();var t=pi,i=Yl,a=qr,u=Ux;(i.subtreeFlags&10256)!==0||(i.flags&10256)!==0?Rt=5:(Rt=0,Yl=pi=null,tv(t,t.pendingLanes));var m=t.pendingLanes;if(m===0&&(mi=null),Nr(a),i=i.stateNode,pt&&typeof pt.onCommitFiberRoot=="function")try{pt.onCommitFiberRoot(Ut,i,void 0,(i.current.flags&128)===128)}catch{}if(u!==null){i=B.T,m=X.p,X.p=2,B.T=null;try{for(var y=t.onRecoverableError,S=0;S<u.length;S++){var R=u[S];y(R.value,{componentStack:R.stack})}}finally{B.T=i,X.p=m}}(qr&3)!==0&&ru(),hr(t),m=t.pendingLanes,(a&261930)!==0&&(m&42)!==0?t===Dd?ao++:(ao=0,Dd=t):ao=0,oo(0)}}function tv(t,i){(t.pooledCacheLanes&=i)===0&&(i=t.pooledCache,i!=null&&(t.pooledCache=null,Ha(i)))}function ru(){return Wx(),Jx(),ev(),nv()}function nv(){if(Rt!==5)return!1;var t=pi,i=_d;_d=0;var a=Nr(qr),u=B.T,m=X.p;try{X.p=32>a?32:a,B.T=null,a=Od,Od=null;var y=pi,S=qr;if(Rt=0,Yl=pi=null,qr=0,(Ge&6)!==0)throw Error(l(331));var R=Ge;if(Ge|=4,Px(y.current),Dx(y,y.current,S,a),Ge=R,oo(0,!1),pt&&typeof pt.onPostCommitFiberRoot=="function")try{pt.onPostCommitFiberRoot(Ut,y)}catch{}return!0}finally{X.p=m,B.T=u,tv(t,i)}}function rv(t,i,a){i=zn(a,i),i=dd(t.stateNode,i,2),t=si(t,i,2),t!==null&&(An(t,2),hr(t))}function Qe(t,i,a){if(t.tag===3)rv(t,t,a);else for(;i!==null;){if(i.tag===3){rv(i,t,a);break}else if(i.tag===1){var u=i.stateNode;if(typeof i.type.getDerivedStateFromError=="function"||typeof u.componentDidCatch=="function"&&(mi===null||!mi.has(u))){t=zn(a,t),a=ix(2),u=si(i,a,2),u!==null&&(lx(a,u,i,t),An(u,2),hr(u));break}}i=i.return}}function Pd(t,i,a){var u=t.pingCache;if(u===null){u=t.pingCache=new Rk;var m=new Set;u.set(i,m)}else m=u.get(i),m===void 0&&(m=new Set,u.set(i,m));m.has(a)||(Ad=!0,m.add(a),t=_k.bind(null,t,i,a),i.then(t,t))}function _k(t,i,a){var u=t.pingCache;u!==null&&u.delete(i),t.pingedLanes|=t.suspendedLanes&a,t.warmLanes&=~a,et===t&&(Be&a)===a&&(ht===4||ht===3&&(Be&62914560)===Be&&300>mt()-Zs?(Ge&2)===0&&Xl(t,0):Md|=a,$l===Be&&($l=0)),hr(t)}function iv(t,i){i===0&&(i=$t()),t=Gi(t,i),t!==null&&(An(t,i),hr(t))}function Ok(t){var i=t.memoizedState,a=0;i!==null&&(a=i.retryLane),iv(t,a)}function Dk(t,i){var a=0;switch(t.tag){case 31:case 13:var u=t.stateNode,m=t.memoizedState;m!==null&&(a=m.retryLane);break;case 19:u=t.stateNode;break;case 22:u=t.stateNode._retryCache;break;default:throw Error(l(314))}u!==null&&u.delete(i),iv(t,a)}function zk(t,i){return It(t,i)}var iu=null,Ql=null,Bd=!1,lu=!1,Id=!1,yi=0;function hr(t){t!==Ql&&t.next===null&&(Ql===null?iu=Ql=t:Ql=Ql.next=t),lu=!0,Bd||(Bd=!0,Pk())}function oo(t,i){if(!Id&&lu){Id=!0;do for(var a=!1,u=iu;u!==null;){if(t!==0){var m=u.pendingLanes;if(m===0)var y=0;else{var S=u.suspendedLanes,R=u.pingedLanes;y=(1<<31-Xe(42|t)+1)-1,y&=m&~(S&~R),y=y&201326741?y&201326741|1:y?y|2:0}y!==0&&(a=!0,sv(u,y))}else y=Be,y=_t(u,u===et?y:0,u.cancelPendingCommit!==null||u.timeoutHandle!==-1),(y&3)===0||tn(u,y)||(a=!0,sv(u,y));u=u.next}while(a);Id=!1}}function Lk(){lv()}function lv(){lu=Bd=!1;var t=0;yi!==0&&Yk()&&(t=yi);for(var i=mt(),a=null,u=iu;u!==null;){var m=u.next,y=av(u,i);y===0?(u.next=null,a===null?iu=m:a.next=m,m===null&&(Ql=a)):(a=u,(t!==0||(y&3)!==0)&&(lu=!0)),u=m}Rt!==0&&Rt!==5||oo(t),yi!==0&&(yi=0)}function av(t,i){for(var a=t.suspendedLanes,u=t.pingedLanes,m=t.expirationTimes,y=t.pendingLanes&-62914561;0<y;){var S=31-Xe(y),R=1<<S,L=m[S];L===-1?((R&a)===0||(R&u)!==0)&&(m[S]=nn(R,i)):L<=i&&(t.expiredLanes|=R),y&=~R}if(i=et,a=Be,a=_t(t,t===i?a:0,t.cancelPendingCommit!==null||t.timeoutHandle!==-1),u=t.callbackNode,a===0||t===i&&(Ke===2||Ke===9)||t.cancelPendingCommit!==null)return u!==null&&u!==null&&Tn(u),t.callbackNode=null,t.callbackPriority=0;if((a&3)===0||tn(t,a)){if(i=a&-a,i===t.callbackPriority)return i;switch(u!==null&&Tn(u),Nr(a)){case 2:case 8:a=Y;break;case 32:a=se;break;case 268435456:a=we;break;default:a=se}return u=ov.bind(null,t),a=It(a,u),t.callbackPriority=i,t.callbackNode=a,i}return u!==null&&u!==null&&Tn(u),t.callbackPriority=2,t.callbackNode=null,2}function ov(t,i){if(Rt!==0&&Rt!==5)return t.callbackNode=null,t.callbackPriority=0,null;var a=t.callbackNode;if(ru()&&t.callbackNode!==a)return null;var u=Be;return u=_t(t,t===et?u:0,t.cancelPendingCommit!==null||t.timeoutHandle!==-1),u===0?null:(Fx(t,u,i),av(t,mt()),t.callbackNode!=null&&t.callbackNode===a?ov.bind(null,t):null)}function sv(t,i){if(ru())return null;Fx(t,i,!0)}function Pk(){Kk(function(){(Ge&6)!==0?It(ie,Lk):lv()})}function Ud(){if(yi===0){var t=zl;t===0&&(t=pl,pl<<=1,(pl&261888)===0&&(pl=256)),yi=t}return yi}function uv(t){return t==null||typeof t=="symbol"||typeof t=="boolean"?null:typeof t=="function"?t:hs(""+t)}function cv(t,i){var a=i.ownerDocument.createElement("input");return a.name=i.name,a.value=i.value,t.id&&a.setAttribute("form",t.id),i.parentNode.insertBefore(a,i),t=new FormData(t),a.parentNode.removeChild(a),t}function Bk(t,i,a,u,m){if(i==="submit"&&a&&a.stateNode===m){var y=uv((m[ln]||null).action),S=u.submitter;S&&(i=(i=S[ln]||null)?uv(i.formAction):S.getAttribute("formAction"),i!==null&&(y=i,S=null));var R=new ys("action","action",null,u,m);t.push({event:R,listeners:[{instance:null,listener:function(){if(u.defaultPrevented){if(yi!==0){var L=S?cv(m,S):new FormData(m);ad(a,{pending:!0,data:L,method:m.method,action:y},null,L)}}else typeof y=="function"&&(R.preventDefault(),L=S?cv(m,S):new FormData(m),ad(a,{pending:!0,data:L,method:m.method,action:y},y,L))},currentTarget:m}]})}}for(var Hd=0;Hd<Cf.length;Hd++){var Fd=Cf[Hd],Ik=Fd.toLowerCase(),Uk=Fd[0].toUpperCase()+Fd.slice(1);Zn(Ik,"on"+Uk)}Zn(Hg,"onAnimationEnd"),Zn(Fg,"onAnimationIteration"),Zn(qg,"onAnimationStart"),Zn("dblclick","onDoubleClick"),Zn("focusin","onFocus"),Zn("focusout","onBlur"),Zn(nk,"onTransitionRun"),Zn(rk,"onTransitionStart"),Zn(ik,"onTransitionCancel"),Zn(Gg,"onTransitionEnd"),wl("onMouseEnter",["mouseout","mouseover"]),wl("onMouseLeave",["mouseout","mouseover"]),wl("onPointerEnter",["pointerout","pointerover"]),wl("onPointerLeave",["pointerout","pointerover"]),Ui("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Ui("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Ui("onBeforeInput",["compositionend","keypress","textInput","paste"]),Ui("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Ui("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Ui("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var so="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(" "),Hk=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(so));function fv(t,i){i=(i&4)!==0;for(var a=0;a<t.length;a++){var u=t[a],m=u.event;u=u.listeners;e:{var y=void 0;if(i)for(var S=u.length-1;0<=S;S--){var R=u[S],L=R.instance,V=R.currentTarget;if(R=R.listener,L!==y&&m.isPropagationStopped())break e;y=R,m.currentTarget=V;try{y(m)}catch(re){bs(re)}m.currentTarget=null,y=L}else for(S=0;S<u.length;S++){if(R=u[S],L=R.instance,V=R.currentTarget,R=R.listener,L!==y&&m.isPropagationStopped())break e;y=R,m.currentTarget=V;try{y(m)}catch(re){bs(re)}m.currentTarget=null,y=L}}}}function Le(t,i){var a=i[ef];a===void 0&&(a=i[ef]=new Set);var u=t+"__bubble";a.has(u)||(dv(i,t,2,!1),a.add(u))}function qd(t,i,a){var u=0;i&&(u|=4),dv(a,t,u,i)}var au="_reactListening"+Math.random().toString(36).slice(2);function Gd(t){if(!t[au]){t[au]=!0,lg.forEach(function(a){a!=="selectionchange"&&(Hk.has(a)||qd(a,!1,t),qd(a,!0,t))});var i=t.nodeType===9?t:t.ownerDocument;i===null||i[au]||(i[au]=!0,qd("selectionchange",!1,i))}}function dv(t,i,a,u){switch(Hv(i)){case 2:var m=pN;break;case 8:m=gN;break;default:m=lh}a=m.bind(null,i,a,t),m=void 0,!cf||i!=="touchstart"&&i!=="touchmove"&&i!=="wheel"||(m=!0),u?m!==void 0?t.addEventListener(i,a,{capture:!0,passive:m}):t.addEventListener(i,a,!0):m!==void 0?t.addEventListener(i,a,{passive:m}):t.addEventListener(i,a,!1)}function Vd(t,i,a,u,m){var y=u;if((i&1)===0&&(i&2)===0&&u!==null)e:for(;;){if(u===null)return;var S=u.tag;if(S===3||S===4){var R=u.stateNode.containerInfo;if(R===m)break;if(S===4)for(S=u.return;S!==null;){var L=S.tag;if((L===3||L===4)&&S.stateNode.containerInfo===m)return;S=S.return}for(;R!==null;){if(S=xl(R),S===null)return;if(L=S.tag,L===5||L===6||L===26||L===27){u=y=S;continue e}R=R.parentNode}}u=u.return}yg(function(){var V=y,re=sf(a),oe=[];e:{var K=Vg.get(t);if(K!==void 0){var W=ys,ge=t;switch(t){case"keypress":if(ps(a)===0)break e;case"keydown":case"keyup":W=D2;break;case"focusin":ge="focus",W=mf;break;case"focusout":ge="blur",W=mf;break;case"beforeblur":case"afterblur":W=mf;break;case"click":if(a.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":W=bg;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":W=S2;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":W=P2;break;case Hg:case Fg:case qg:W=k2;break;case Gg:W=I2;break;case"scroll":case"scrollend":W=b2;break;case"wheel":W=H2;break;case"copy":case"cut":case"paste":W=R2;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":W=Sg;break;case"toggle":case"beforetoggle":W=q2}var Re=(i&4)!==0,Je=!Re&&(t==="scroll"||t==="scrollend"),q=Re?K!==null?K+"Capture":null:K;Re=[];for(var H=V,G;H!==null;){var ae=H;if(G=ae.stateNode,ae=ae.tag,ae!==5&&ae!==26&&ae!==27||G===null||q===null||(ae=Ma(H,q),ae!=null&&Re.push(uo(H,ae,G))),Je)break;H=H.return}0<Re.length&&(K=new W(K,ge,null,a,re),oe.push({event:K,listeners:Re}))}}if((i&7)===0){e:{if(K=t==="mouseover"||t==="pointerover",W=t==="mouseout"||t==="pointerout",K&&a!==of&&(ge=a.relatedTarget||a.fromElement)&&(xl(ge)||ge[yl]))break e;if((W||K)&&(K=re.window===re?re:(K=re.ownerDocument)?K.defaultView||K.parentWindow:window,W?(ge=a.relatedTarget||a.toElement,W=V,ge=ge?xl(ge):null,ge!==null&&(Je=s(ge),Re=ge.tag,ge!==Je||Re!==5&&Re!==27&&Re!==6)&&(ge=null)):(W=null,ge=V),W!==ge)){if(Re=bg,ae="onMouseLeave",q="onMouseEnter",H="mouse",(t==="pointerout"||t==="pointerover")&&(Re=Sg,ae="onPointerLeave",q="onPointerEnter",H="pointer"),Je=W==null?K:Aa(W),G=ge==null?K:Aa(ge),K=new Re(ae,H+"leave",W,a,re),K.target=Je,K.relatedTarget=G,ae=null,xl(re)===V&&(Re=new Re(q,H+"enter",ge,a,re),Re.target=G,Re.relatedTarget=Je,ae=Re),Je=ae,W&&ge)t:{for(Re=Fk,q=W,H=ge,G=0,ae=q;ae;ae=Re(ae))G++;ae=0;for(var Se=H;Se;Se=Re(Se))ae++;for(;0<G-ae;)q=Re(q),G--;for(;0<ae-G;)H=Re(H),ae--;for(;G--;){if(q===H||H!==null&&q===H.alternate){Re=q;break t}q=Re(q),H=Re(H)}Re=null}else Re=null;W!==null&&hv(oe,K,W,Re,!1),ge!==null&&Je!==null&&hv(oe,Je,ge,Re,!0)}}e:{if(K=V?Aa(V):window,W=K.nodeName&&K.nodeName.toLowerCase(),W==="select"||W==="input"&&K.type==="file")var Fe=Mg;else if(Tg(K))if(jg)Fe=J2;else{Fe=Z2;var be=Q2}else W=K.nodeName,!W||W.toLowerCase()!=="input"||K.type!=="checkbox"&&K.type!=="radio"?V&&af(V.elementType)&&(Fe=Mg):Fe=W2;if(Fe&&(Fe=Fe(t,V))){Ag(oe,Fe,a,re);break e}be&&be(t,K,V),t==="focusout"&&V&&K.type==="number"&&V.memoizedProps.value!=null&&lf(K,"number",K.value)}switch(be=V?Aa(V):window,t){case"focusin":(Tg(be)||be.contentEditable==="true")&&(Rl=be,bf=V,Ba=null);break;case"focusout":Ba=bf=Rl=null;break;case"mousedown":wf=!0;break;case"contextmenu":case"mouseup":case"dragend":wf=!1,Ig(oe,a,re);break;case"selectionchange":if(tk)break;case"keydown":case"keyup":Ig(oe,a,re)}var je;if(gf)e:{switch(t){case"compositionstart":var Ie="onCompositionStart";break e;case"compositionend":Ie="onCompositionEnd";break e;case"compositionupdate":Ie="onCompositionUpdate";break e}Ie=void 0}else Nl?Ng(t,a)&&(Ie="onCompositionEnd"):t==="keydown"&&a.keyCode===229&&(Ie="onCompositionStart");Ie&&(Cg&&a.locale!=="ko"&&(Nl||Ie!=="onCompositionStart"?Ie==="onCompositionEnd"&&Nl&&(je=xg()):(ti=re,ff="value"in ti?ti.value:ti.textContent,Nl=!0)),be=ou(V,Ie),0<be.length&&(Ie=new wg(Ie,t,null,a,re),oe.push({event:Ie,listeners:be}),je?Ie.data=je:(je=Rg(a),je!==null&&(Ie.data=je)))),(je=V2?$2(t,a):Y2(t,a))&&(Ie=ou(V,"onBeforeInput"),0<Ie.length&&(be=new wg("onBeforeInput","beforeinput",null,a,re),oe.push({event:be,listeners:Ie}),be.data=je)),Bk(oe,t,V,a,re)}fv(oe,i)})}function uo(t,i,a){return{instance:t,listener:i,currentTarget:a}}function ou(t,i){for(var a=i+"Capture",u=[];t!==null;){var m=t,y=m.stateNode;if(m=m.tag,m!==5&&m!==26&&m!==27||y===null||(m=Ma(t,a),m!=null&&u.unshift(uo(t,m,y)),m=Ma(t,i),m!=null&&u.push(uo(t,m,y))),t.tag===3)return u;t=t.return}return[]}function Fk(t){if(t===null)return null;do t=t.return;while(t&&t.tag!==5&&t.tag!==27);return t||null}function hv(t,i,a,u,m){for(var y=i._reactName,S=[];a!==null&&a!==u;){var R=a,L=R.alternate,V=R.stateNode;if(R=R.tag,L!==null&&L===u)break;R!==5&&R!==26&&R!==27||V===null||(L=V,m?(V=Ma(a,y),V!=null&&S.unshift(uo(a,V,L))):m||(V=Ma(a,y),V!=null&&S.push(uo(a,V,L)))),a=a.return}S.length!==0&&t.push({event:i,listeners:S})}var qk=/\r\n?/g,Gk=/\u0000|\uFFFD/g;function mv(t){return(typeof t=="string"?t:""+t).replace(qk,`
49
+ `).replace(Gk,"")}function pv(t,i){return i=mv(i),mv(t)===i}function We(t,i,a,u,m,y){switch(a){case"children":typeof u=="string"?i==="body"||i==="textarea"&&u===""||Cl(t,u):(typeof u=="number"||typeof u=="bigint")&&i!=="body"&&Cl(t,""+u);break;case"className":fs(t,"class",u);break;case"tabIndex":fs(t,"tabindex",u);break;case"dir":case"role":case"viewBox":case"width":case"height":fs(t,a,u);break;case"style":pg(t,u,y);break;case"data":if(i!=="object"){fs(t,"data",u);break}case"src":case"href":if(u===""&&(i!=="a"||a!=="href")){t.removeAttribute(a);break}if(u==null||typeof u=="function"||typeof u=="symbol"||typeof u=="boolean"){t.removeAttribute(a);break}u=hs(""+u),t.setAttribute(a,u);break;case"action":case"formAction":if(typeof u=="function"){t.setAttribute(a,"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 y=="function"&&(a==="formAction"?(i!=="input"&&We(t,i,"name",m.name,m,null),We(t,i,"formEncType",m.formEncType,m,null),We(t,i,"formMethod",m.formMethod,m,null),We(t,i,"formTarget",m.formTarget,m,null)):(We(t,i,"encType",m.encType,m,null),We(t,i,"method",m.method,m,null),We(t,i,"target",m.target,m,null)));if(u==null||typeof u=="symbol"||typeof u=="boolean"){t.removeAttribute(a);break}u=hs(""+u),t.setAttribute(a,u);break;case"onClick":u!=null&&(t.onclick=Tr);break;case"onScroll":u!=null&&Le("scroll",t);break;case"onScrollEnd":u!=null&&Le("scrollend",t);break;case"dangerouslySetInnerHTML":if(u!=null){if(typeof u!="object"||!("__html"in u))throw Error(l(61));if(a=u.__html,a!=null){if(m.children!=null)throw Error(l(60));t.innerHTML=a}}break;case"multiple":t.multiple=u&&typeof u!="function"&&typeof u!="symbol";break;case"muted":t.muted=u&&typeof u!="function"&&typeof u!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(u==null||typeof u=="function"||typeof u=="boolean"||typeof u=="symbol"){t.removeAttribute("xlink:href");break}a=hs(""+u),t.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",a);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":u!=null&&typeof u!="function"&&typeof u!="symbol"?t.setAttribute(a,""+u):t.removeAttribute(a);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":u&&typeof u!="function"&&typeof u!="symbol"?t.setAttribute(a,""):t.removeAttribute(a);break;case"capture":case"download":u===!0?t.setAttribute(a,""):u!==!1&&u!=null&&typeof u!="function"&&typeof u!="symbol"?t.setAttribute(a,u):t.removeAttribute(a);break;case"cols":case"rows":case"size":case"span":u!=null&&typeof u!="function"&&typeof u!="symbol"&&!isNaN(u)&&1<=u?t.setAttribute(a,u):t.removeAttribute(a);break;case"rowSpan":case"start":u==null||typeof u=="function"||typeof u=="symbol"||isNaN(u)?t.removeAttribute(a):t.setAttribute(a,u);break;case"popover":Le("beforetoggle",t),Le("toggle",t),cs(t,"popover",u);break;case"xlinkActuate":Rr(t,"http://www.w3.org/1999/xlink","xlink:actuate",u);break;case"xlinkArcrole":Rr(t,"http://www.w3.org/1999/xlink","xlink:arcrole",u);break;case"xlinkRole":Rr(t,"http://www.w3.org/1999/xlink","xlink:role",u);break;case"xlinkShow":Rr(t,"http://www.w3.org/1999/xlink","xlink:show",u);break;case"xlinkTitle":Rr(t,"http://www.w3.org/1999/xlink","xlink:title",u);break;case"xlinkType":Rr(t,"http://www.w3.org/1999/xlink","xlink:type",u);break;case"xmlBase":Rr(t,"http://www.w3.org/XML/1998/namespace","xml:base",u);break;case"xmlLang":Rr(t,"http://www.w3.org/XML/1998/namespace","xml:lang",u);break;case"xmlSpace":Rr(t,"http://www.w3.org/XML/1998/namespace","xml:space",u);break;case"is":cs(t,"is",u);break;case"innerText":case"textContent":break;default:(!(2<a.length)||a[0]!=="o"&&a[0]!=="O"||a[1]!=="n"&&a[1]!=="N")&&(a=x2.get(a)||a,cs(t,a,u))}}function $d(t,i,a,u,m,y){switch(a){case"style":pg(t,u,y);break;case"dangerouslySetInnerHTML":if(u!=null){if(typeof u!="object"||!("__html"in u))throw Error(l(61));if(a=u.__html,a!=null){if(m.children!=null)throw Error(l(60));t.innerHTML=a}}break;case"children":typeof u=="string"?Cl(t,u):(typeof u=="number"||typeof u=="bigint")&&Cl(t,""+u);break;case"onScroll":u!=null&&Le("scroll",t);break;case"onScrollEnd":u!=null&&Le("scrollend",t);break;case"onClick":u!=null&&(t.onclick=Tr);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!ag.hasOwnProperty(a))e:{if(a[0]==="o"&&a[1]==="n"&&(m=a.endsWith("Capture"),i=a.slice(2,m?a.length-7:void 0),y=t[ln]||null,y=y!=null?y[a]:null,typeof y=="function"&&t.removeEventListener(i,y,m),typeof u=="function")){typeof y!="function"&&y!==null&&(a in t?t[a]=null:t.hasAttribute(a)&&t.removeAttribute(a)),t.addEventListener(i,u,m);break e}a in t?t[a]=u:u===!0?t.setAttribute(a,""):cs(t,a,u)}}}function Vt(t,i,a){switch(i){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Le("error",t),Le("load",t);var u=!1,m=!1,y;for(y in a)if(a.hasOwnProperty(y)){var S=a[y];if(S!=null)switch(y){case"src":u=!0;break;case"srcSet":m=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(l(137,i));default:We(t,i,y,S,a,null)}}m&&We(t,i,"srcSet",a.srcSet,a,null),u&&We(t,i,"src",a.src,a,null);return;case"input":Le("invalid",t);var R=y=S=m=null,L=null,V=null;for(u in a)if(a.hasOwnProperty(u)){var re=a[u];if(re!=null)switch(u){case"name":m=re;break;case"type":S=re;break;case"checked":L=re;break;case"defaultChecked":V=re;break;case"value":y=re;break;case"defaultValue":R=re;break;case"children":case"dangerouslySetInnerHTML":if(re!=null)throw Error(l(137,i));break;default:We(t,i,u,re,a,null)}}fg(t,y,R,L,V,S,m,!1);return;case"select":Le("invalid",t),u=S=y=null;for(m in a)if(a.hasOwnProperty(m)&&(R=a[m],R!=null))switch(m){case"value":y=R;break;case"defaultValue":S=R;break;case"multiple":u=R;default:We(t,i,m,R,a,null)}i=y,a=S,t.multiple=!!u,i!=null?Sl(t,!!u,i,!1):a!=null&&Sl(t,!!u,a,!0);return;case"textarea":Le("invalid",t),y=m=u=null;for(S in a)if(a.hasOwnProperty(S)&&(R=a[S],R!=null))switch(S){case"value":u=R;break;case"defaultValue":m=R;break;case"children":y=R;break;case"dangerouslySetInnerHTML":if(R!=null)throw Error(l(91));break;default:We(t,i,S,R,a,null)}hg(t,u,m,y);return;case"option":for(L in a)if(a.hasOwnProperty(L)&&(u=a[L],u!=null))switch(L){case"selected":t.selected=u&&typeof u!="function"&&typeof u!="symbol";break;default:We(t,i,L,u,a,null)}return;case"dialog":Le("beforetoggle",t),Le("toggle",t),Le("cancel",t),Le("close",t);break;case"iframe":case"object":Le("load",t);break;case"video":case"audio":for(u=0;u<so.length;u++)Le(so[u],t);break;case"image":Le("error",t),Le("load",t);break;case"details":Le("toggle",t);break;case"embed":case"source":case"link":Le("error",t),Le("load",t);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(V in a)if(a.hasOwnProperty(V)&&(u=a[V],u!=null))switch(V){case"children":case"dangerouslySetInnerHTML":throw Error(l(137,i));default:We(t,i,V,u,a,null)}return;default:if(af(i)){for(re in a)a.hasOwnProperty(re)&&(u=a[re],u!==void 0&&$d(t,i,re,u,a,void 0));return}}for(R in a)a.hasOwnProperty(R)&&(u=a[R],u!=null&&We(t,i,R,u,a,null))}function Vk(t,i,a,u){switch(i){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var m=null,y=null,S=null,R=null,L=null,V=null,re=null;for(W in a){var oe=a[W];if(a.hasOwnProperty(W)&&oe!=null)switch(W){case"checked":break;case"value":break;case"defaultValue":L=oe;default:u.hasOwnProperty(W)||We(t,i,W,null,u,oe)}}for(var K in u){var W=u[K];if(oe=a[K],u.hasOwnProperty(K)&&(W!=null||oe!=null))switch(K){case"type":y=W;break;case"name":m=W;break;case"checked":V=W;break;case"defaultChecked":re=W;break;case"value":S=W;break;case"defaultValue":R=W;break;case"children":case"dangerouslySetInnerHTML":if(W!=null)throw Error(l(137,i));break;default:W!==oe&&We(t,i,K,W,u,oe)}}rf(t,S,R,L,V,re,y,m);return;case"select":W=S=R=K=null;for(y in a)if(L=a[y],a.hasOwnProperty(y)&&L!=null)switch(y){case"value":break;case"multiple":W=L;default:u.hasOwnProperty(y)||We(t,i,y,null,u,L)}for(m in u)if(y=u[m],L=a[m],u.hasOwnProperty(m)&&(y!=null||L!=null))switch(m){case"value":K=y;break;case"defaultValue":R=y;break;case"multiple":S=y;default:y!==L&&We(t,i,m,y,u,L)}i=R,a=S,u=W,K!=null?Sl(t,!!a,K,!1):!!u!=!!a&&(i!=null?Sl(t,!!a,i,!0):Sl(t,!!a,a?[]:"",!1));return;case"textarea":W=K=null;for(R in a)if(m=a[R],a.hasOwnProperty(R)&&m!=null&&!u.hasOwnProperty(R))switch(R){case"value":break;case"children":break;default:We(t,i,R,null,u,m)}for(S in u)if(m=u[S],y=a[S],u.hasOwnProperty(S)&&(m!=null||y!=null))switch(S){case"value":K=m;break;case"defaultValue":W=m;break;case"children":break;case"dangerouslySetInnerHTML":if(m!=null)throw Error(l(91));break;default:m!==y&&We(t,i,S,m,u,y)}dg(t,K,W);return;case"option":for(var ge in a)if(K=a[ge],a.hasOwnProperty(ge)&&K!=null&&!u.hasOwnProperty(ge))switch(ge){case"selected":t.selected=!1;break;default:We(t,i,ge,null,u,K)}for(L in u)if(K=u[L],W=a[L],u.hasOwnProperty(L)&&K!==W&&(K!=null||W!=null))switch(L){case"selected":t.selected=K&&typeof K!="function"&&typeof K!="symbol";break;default:We(t,i,L,K,u,W)}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 Re in a)K=a[Re],a.hasOwnProperty(Re)&&K!=null&&!u.hasOwnProperty(Re)&&We(t,i,Re,null,u,K);for(V in u)if(K=u[V],W=a[V],u.hasOwnProperty(V)&&K!==W&&(K!=null||W!=null))switch(V){case"children":case"dangerouslySetInnerHTML":if(K!=null)throw Error(l(137,i));break;default:We(t,i,V,K,u,W)}return;default:if(af(i)){for(var Je in a)K=a[Je],a.hasOwnProperty(Je)&&K!==void 0&&!u.hasOwnProperty(Je)&&$d(t,i,Je,void 0,u,K);for(re in u)K=u[re],W=a[re],!u.hasOwnProperty(re)||K===W||K===void 0&&W===void 0||$d(t,i,re,K,u,W);return}}for(var q in a)K=a[q],a.hasOwnProperty(q)&&K!=null&&!u.hasOwnProperty(q)&&We(t,i,q,null,u,K);for(oe in u)K=u[oe],W=a[oe],!u.hasOwnProperty(oe)||K===W||K==null&&W==null||We(t,i,oe,K,u,W)}function gv(t){switch(t){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function $k(){if(typeof performance.getEntriesByType=="function"){for(var t=0,i=0,a=performance.getEntriesByType("resource"),u=0;u<a.length;u++){var m=a[u],y=m.transferSize,S=m.initiatorType,R=m.duration;if(y&&R&&gv(S)){for(S=0,R=m.responseEnd,u+=1;u<a.length;u++){var L=a[u],V=L.startTime;if(V>R)break;var re=L.transferSize,oe=L.initiatorType;re&&gv(oe)&&(L=L.responseEnd,S+=re*(L<R?1:(R-V)/(L-V)))}if(--u,i+=8*(y+S)/(m.duration/1e3),t++,10<t)break}}if(0<t)return i/t/1e6}return navigator.connection&&(t=navigator.connection.downlink,typeof t=="number")?t:5}var Yd=null,Xd=null;function su(t){return t.nodeType===9?t:t.ownerDocument}function yv(t){switch(t){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function xv(t,i){if(t===0)switch(i){case"svg":return 1;case"math":return 2;default:return 0}return t===1&&i==="foreignObject"?0:t}function Kd(t,i){return t==="textarea"||t==="noscript"||typeof i.children=="string"||typeof i.children=="number"||typeof i.children=="bigint"||typeof i.dangerouslySetInnerHTML=="object"&&i.dangerouslySetInnerHTML!==null&&i.dangerouslySetInnerHTML.__html!=null}var Qd=null;function Yk(){var t=window.event;return t&&t.type==="popstate"?t===Qd?!1:(Qd=t,!0):(Qd=null,!1)}var vv=typeof setTimeout=="function"?setTimeout:void 0,Xk=typeof clearTimeout=="function"?clearTimeout:void 0,bv=typeof Promise=="function"?Promise:void 0,Kk=typeof queueMicrotask=="function"?queueMicrotask:typeof bv<"u"?function(t){return bv.resolve(null).then(t).catch(Qk)}:vv;function Qk(t){setTimeout(function(){throw t})}function xi(t){return t==="head"}function wv(t,i){var a=i,u=0;do{var m=a.nextSibling;if(t.removeChild(a),m&&m.nodeType===8)if(a=m.data,a==="/$"||a==="/&"){if(u===0){t.removeChild(m),ea(i);return}u--}else if(a==="$"||a==="$?"||a==="$~"||a==="$!"||a==="&")u++;else if(a==="html")co(t.ownerDocument.documentElement);else if(a==="head"){a=t.ownerDocument.head,co(a);for(var y=a.firstChild;y;){var S=y.nextSibling,R=y.nodeName;y[Ta]||R==="SCRIPT"||R==="STYLE"||R==="LINK"&&y.rel.toLowerCase()==="stylesheet"||a.removeChild(y),y=S}}else a==="body"&&co(t.ownerDocument.body);a=m}while(a);ea(i)}function Sv(t,i){var a=t;t=0;do{var u=a.nextSibling;if(a.nodeType===1?i?(a._stashedDisplay=a.style.display,a.style.display="none"):(a.style.display=a._stashedDisplay||"",a.getAttribute("style")===""&&a.removeAttribute("style")):a.nodeType===3&&(i?(a._stashedText=a.nodeValue,a.nodeValue=""):a.nodeValue=a._stashedText||""),u&&u.nodeType===8)if(a=u.data,a==="/$"){if(t===0)break;t--}else a!=="$"&&a!=="$?"&&a!=="$~"&&a!=="$!"||t++;a=u}while(a)}function Zd(t){var i=t.firstChild;for(i&&i.nodeType===10&&(i=i.nextSibling);i;){var a=i;switch(i=i.nextSibling,a.nodeName){case"HTML":case"HEAD":case"BODY":Zd(a),tf(a);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(a.rel.toLowerCase()==="stylesheet")continue}t.removeChild(a)}}function Zk(t,i,a,u){for(;t.nodeType===1;){var m=a;if(t.nodeName.toLowerCase()!==i.toLowerCase()){if(!u&&(t.nodeName!=="INPUT"||t.type!=="hidden"))break}else if(u){if(!t[Ta])switch(i){case"meta":if(!t.hasAttribute("itemprop"))break;return t;case"link":if(y=t.getAttribute("rel"),y==="stylesheet"&&t.hasAttribute("data-precedence"))break;if(y!==m.rel||t.getAttribute("href")!==(m.href==null||m.href===""?null:m.href)||t.getAttribute("crossorigin")!==(m.crossOrigin==null?null:m.crossOrigin)||t.getAttribute("title")!==(m.title==null?null:m.title))break;return t;case"style":if(t.hasAttribute("data-precedence"))break;return t;case"script":if(y=t.getAttribute("src"),(y!==(m.src==null?null:m.src)||t.getAttribute("type")!==(m.type==null?null:m.type)||t.getAttribute("crossorigin")!==(m.crossOrigin==null?null:m.crossOrigin))&&y&&t.hasAttribute("async")&&!t.hasAttribute("itemprop"))break;return t;default:return t}}else if(i==="input"&&t.type==="hidden"){var y=m.name==null?null:""+m.name;if(m.type==="hidden"&&t.getAttribute("name")===y)return t}else return t;if(t=Un(t.nextSibling),t===null)break}return null}function Wk(t,i,a){if(i==="")return null;for(;t.nodeType!==3;)if((t.nodeType!==1||t.nodeName!=="INPUT"||t.type!=="hidden")&&!a||(t=Un(t.nextSibling),t===null))return null;return t}function Cv(t,i){for(;t.nodeType!==8;)if((t.nodeType!==1||t.nodeName!=="INPUT"||t.type!=="hidden")&&!i||(t=Un(t.nextSibling),t===null))return null;return t}function Wd(t){return t.data==="$?"||t.data==="$~"}function Jd(t){return t.data==="$!"||t.data==="$?"&&t.ownerDocument.readyState!=="loading"}function Jk(t,i){var a=t.ownerDocument;if(t.data==="$~")t._reactRetry=i;else if(t.data!=="$?"||a.readyState!=="loading")i();else{var u=function(){i(),a.removeEventListener("DOMContentLoaded",u)};a.addEventListener("DOMContentLoaded",u),t._reactRetry=u}}function Un(t){for(;t!=null;t=t.nextSibling){var i=t.nodeType;if(i===1||i===3)break;if(i===8){if(i=t.data,i==="$"||i==="$!"||i==="$?"||i==="$~"||i==="&"||i==="F!"||i==="F")break;if(i==="/$"||i==="/&")return null}}return t}var eh=null;function Ev(t){t=t.nextSibling;for(var i=0;t;){if(t.nodeType===8){var a=t.data;if(a==="/$"||a==="/&"){if(i===0)return Un(t.nextSibling);i--}else a!=="$"&&a!=="$!"&&a!=="$?"&&a!=="$~"&&a!=="&"||i++}t=t.nextSibling}return null}function kv(t){t=t.previousSibling;for(var i=0;t;){if(t.nodeType===8){var a=t.data;if(a==="$"||a==="$!"||a==="$?"||a==="$~"||a==="&"){if(i===0)return t;i--}else a!=="/$"&&a!=="/&"||i++}t=t.previousSibling}return null}function Nv(t,i,a){switch(i=su(a),t){case"html":if(t=i.documentElement,!t)throw Error(l(452));return t;case"head":if(t=i.head,!t)throw Error(l(453));return t;case"body":if(t=i.body,!t)throw Error(l(454));return t;default:throw Error(l(451))}}function co(t){for(var i=t.attributes;i.length;)t.removeAttributeNode(i[0]);tf(t)}var Hn=new Map,Rv=new Set;function uu(t){return typeof t.getRootNode=="function"?t.getRootNode():t.nodeType===9?t:t.ownerDocument}var Gr=X.d;X.d={f:eN,r:tN,D:nN,C:rN,L:iN,m:lN,X:oN,S:aN,M:sN};function eN(){var t=Gr.f(),i=eu();return t||i}function tN(t){var i=vl(t);i!==null&&i.tag===5&&i.type==="form"?Gy(i):Gr.r(t)}var Zl=typeof document>"u"?null:document;function Tv(t,i,a){var u=Zl;if(u&&typeof i=="string"&&i){var m=On(i);m='link[rel="'+t+'"][href="'+m+'"]',typeof a=="string"&&(m+='[crossorigin="'+a+'"]'),Rv.has(m)||(Rv.add(m),t={rel:t,crossOrigin:a,href:i},u.querySelector(m)===null&&(i=u.createElement("link"),Vt(i,"link",t),Ot(i),u.head.appendChild(i)))}}function nN(t){Gr.D(t),Tv("dns-prefetch",t,null)}function rN(t,i){Gr.C(t,i),Tv("preconnect",t,i)}function iN(t,i,a){Gr.L(t,i,a);var u=Zl;if(u&&t&&i){var m='link[rel="preload"][as="'+On(i)+'"]';i==="image"&&a&&a.imageSrcSet?(m+='[imagesrcset="'+On(a.imageSrcSet)+'"]',typeof a.imageSizes=="string"&&(m+='[imagesizes="'+On(a.imageSizes)+'"]')):m+='[href="'+On(t)+'"]';var y=m;switch(i){case"style":y=Wl(t);break;case"script":y=Jl(t)}Hn.has(y)||(t=p({rel:"preload",href:i==="image"&&a&&a.imageSrcSet?void 0:t,as:i},a),Hn.set(y,t),u.querySelector(m)!==null||i==="style"&&u.querySelector(fo(y))||i==="script"&&u.querySelector(ho(y))||(i=u.createElement("link"),Vt(i,"link",t),Ot(i),u.head.appendChild(i)))}}function lN(t,i){Gr.m(t,i);var a=Zl;if(a&&t){var u=i&&typeof i.as=="string"?i.as:"script",m='link[rel="modulepreload"][as="'+On(u)+'"][href="'+On(t)+'"]',y=m;switch(u){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":y=Jl(t)}if(!Hn.has(y)&&(t=p({rel:"modulepreload",href:t},i),Hn.set(y,t),a.querySelector(m)===null)){switch(u){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(a.querySelector(ho(y)))return}u=a.createElement("link"),Vt(u,"link",t),Ot(u),a.head.appendChild(u)}}}function aN(t,i,a){Gr.S(t,i,a);var u=Zl;if(u&&t){var m=bl(u).hoistableStyles,y=Wl(t);i=i||"default";var S=m.get(y);if(!S){var R={loading:0,preload:null};if(S=u.querySelector(fo(y)))R.loading=5;else{t=p({rel:"stylesheet",href:t,"data-precedence":i},a),(a=Hn.get(y))&&th(t,a);var L=S=u.createElement("link");Ot(L),Vt(L,"link",t),L._p=new Promise(function(V,re){L.onload=V,L.onerror=re}),L.addEventListener("load",function(){R.loading|=1}),L.addEventListener("error",function(){R.loading|=2}),R.loading|=4,cu(S,i,u)}S={type:"stylesheet",instance:S,count:1,state:R},m.set(y,S)}}}function oN(t,i){Gr.X(t,i);var a=Zl;if(a&&t){var u=bl(a).hoistableScripts,m=Jl(t),y=u.get(m);y||(y=a.querySelector(ho(m)),y||(t=p({src:t,async:!0},i),(i=Hn.get(m))&&nh(t,i),y=a.createElement("script"),Ot(y),Vt(y,"link",t),a.head.appendChild(y)),y={type:"script",instance:y,count:1,state:null},u.set(m,y))}}function sN(t,i){Gr.M(t,i);var a=Zl;if(a&&t){var u=bl(a).hoistableScripts,m=Jl(t),y=u.get(m);y||(y=a.querySelector(ho(m)),y||(t=p({src:t,async:!0,type:"module"},i),(i=Hn.get(m))&&nh(t,i),y=a.createElement("script"),Ot(y),Vt(y,"link",t),a.head.appendChild(y)),y={type:"script",instance:y,count:1,state:null},u.set(m,y))}}function Av(t,i,a,u){var m=(m=ue.current)?uu(m):null;if(!m)throw Error(l(446));switch(t){case"meta":case"title":return null;case"style":return typeof a.precedence=="string"&&typeof a.href=="string"?(i=Wl(a.href),a=bl(m).hoistableStyles,u=a.get(i),u||(u={type:"style",instance:null,count:0,state:null},a.set(i,u)),u):{type:"void",instance:null,count:0,state:null};case"link":if(a.rel==="stylesheet"&&typeof a.href=="string"&&typeof a.precedence=="string"){t=Wl(a.href);var y=bl(m).hoistableStyles,S=y.get(t);if(S||(m=m.ownerDocument||m,S={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},y.set(t,S),(y=m.querySelector(fo(t)))&&!y._p&&(S.instance=y,S.state.loading=5),Hn.has(t)||(a={rel:"preload",as:"style",href:a.href,crossOrigin:a.crossOrigin,integrity:a.integrity,media:a.media,hrefLang:a.hrefLang,referrerPolicy:a.referrerPolicy},Hn.set(t,a),y||uN(m,t,a,S.state))),i&&u===null)throw Error(l(528,""));return S}if(i&&u!==null)throw Error(l(529,""));return null;case"script":return i=a.async,a=a.src,typeof a=="string"&&i&&typeof i!="function"&&typeof i!="symbol"?(i=Jl(a),a=bl(m).hoistableScripts,u=a.get(i),u||(u={type:"script",instance:null,count:0,state:null},a.set(i,u)),u):{type:"void",instance:null,count:0,state:null};default:throw Error(l(444,t))}}function Wl(t){return'href="'+On(t)+'"'}function fo(t){return'link[rel="stylesheet"]['+t+"]"}function Mv(t){return p({},t,{"data-precedence":t.precedence,precedence:null})}function uN(t,i,a,u){t.querySelector('link[rel="preload"][as="style"]['+i+"]")?u.loading=1:(i=t.createElement("link"),u.preload=i,i.addEventListener("load",function(){return u.loading|=1}),i.addEventListener("error",function(){return u.loading|=2}),Vt(i,"link",a),Ot(i),t.head.appendChild(i))}function Jl(t){return'[src="'+On(t)+'"]'}function ho(t){return"script[async]"+t}function jv(t,i,a){if(i.count++,i.instance===null)switch(i.type){case"style":var u=t.querySelector('style[data-href~="'+On(a.href)+'"]');if(u)return i.instance=u,Ot(u),u;var m=p({},a,{"data-href":a.href,"data-precedence":a.precedence,href:null,precedence:null});return u=(t.ownerDocument||t).createElement("style"),Ot(u),Vt(u,"style",m),cu(u,a.precedence,t),i.instance=u;case"stylesheet":m=Wl(a.href);var y=t.querySelector(fo(m));if(y)return i.state.loading|=4,i.instance=y,Ot(y),y;u=Mv(a),(m=Hn.get(m))&&th(u,m),y=(t.ownerDocument||t).createElement("link"),Ot(y);var S=y;return S._p=new Promise(function(R,L){S.onload=R,S.onerror=L}),Vt(y,"link",u),i.state.loading|=4,cu(y,a.precedence,t),i.instance=y;case"script":return y=Jl(a.src),(m=t.querySelector(ho(y)))?(i.instance=m,Ot(m),m):(u=a,(m=Hn.get(y))&&(u=p({},a),nh(u,m)),t=t.ownerDocument||t,m=t.createElement("script"),Ot(m),Vt(m,"link",u),t.head.appendChild(m),i.instance=m);case"void":return null;default:throw Error(l(443,i.type))}else i.type==="stylesheet"&&(i.state.loading&4)===0&&(u=i.instance,i.state.loading|=4,cu(u,a.precedence,t));return i.instance}function cu(t,i,a){for(var u=a.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),m=u.length?u[u.length-1]:null,y=m,S=0;S<u.length;S++){var R=u[S];if(R.dataset.precedence===i)y=R;else if(y!==m)break}y?y.parentNode.insertBefore(t,y.nextSibling):(i=a.nodeType===9?a.head:a,i.insertBefore(t,i.firstChild))}function th(t,i){t.crossOrigin==null&&(t.crossOrigin=i.crossOrigin),t.referrerPolicy==null&&(t.referrerPolicy=i.referrerPolicy),t.title==null&&(t.title=i.title)}function nh(t,i){t.crossOrigin==null&&(t.crossOrigin=i.crossOrigin),t.referrerPolicy==null&&(t.referrerPolicy=i.referrerPolicy),t.integrity==null&&(t.integrity=i.integrity)}var fu=null;function _v(t,i,a){if(fu===null){var u=new Map,m=fu=new Map;m.set(a,u)}else m=fu,u=m.get(a),u||(u=new Map,m.set(a,u));if(u.has(t))return u;for(u.set(t,null),a=a.getElementsByTagName(t),m=0;m<a.length;m++){var y=a[m];if(!(y[Ta]||y[Ht]||t==="link"&&y.getAttribute("rel")==="stylesheet")&&y.namespaceURI!=="http://www.w3.org/2000/svg"){var S=y.getAttribute(i)||"";S=t+S;var R=u.get(S);R?R.push(y):u.set(S,[y])}}return u}function Ov(t,i,a){t=t.ownerDocument||t,t.head.insertBefore(a,i==="title"?t.querySelector("head > title"):null)}function cN(t,i,a){if(a===1||i.itemProp!=null)return!1;switch(t){case"meta":case"title":return!0;case"style":if(typeof i.precedence!="string"||typeof i.href!="string"||i.href==="")break;return!0;case"link":if(typeof i.rel!="string"||typeof i.href!="string"||i.href===""||i.onLoad||i.onError)break;switch(i.rel){case"stylesheet":return t=i.disabled,typeof i.precedence=="string"&&t==null;default:return!0}case"script":if(i.async&&typeof i.async!="function"&&typeof i.async!="symbol"&&!i.onLoad&&!i.onError&&i.src&&typeof i.src=="string")return!0}return!1}function Dv(t){return!(t.type==="stylesheet"&&(t.state.loading&3)===0)}function fN(t,i,a,u){if(a.type==="stylesheet"&&(typeof u.media!="string"||matchMedia(u.media).matches!==!1)&&(a.state.loading&4)===0){if(a.instance===null){var m=Wl(u.href),y=i.querySelector(fo(m));if(y){i=y._p,i!==null&&typeof i=="object"&&typeof i.then=="function"&&(t.count++,t=du.bind(t),i.then(t,t)),a.state.loading|=4,a.instance=y,Ot(y);return}y=i.ownerDocument||i,u=Mv(u),(m=Hn.get(m))&&th(u,m),y=y.createElement("link"),Ot(y);var S=y;S._p=new Promise(function(R,L){S.onload=R,S.onerror=L}),Vt(y,"link",u),a.instance=y}t.stylesheets===null&&(t.stylesheets=new Map),t.stylesheets.set(a,i),(i=a.state.preload)&&(a.state.loading&3)===0&&(t.count++,a=du.bind(t),i.addEventListener("load",a),i.addEventListener("error",a))}}var rh=0;function dN(t,i){return t.stylesheets&&t.count===0&&mu(t,t.stylesheets),0<t.count||0<t.imgCount?function(a){var u=setTimeout(function(){if(t.stylesheets&&mu(t,t.stylesheets),t.unsuspend){var y=t.unsuspend;t.unsuspend=null,y()}},6e4+i);0<t.imgBytes&&rh===0&&(rh=62500*$k());var m=setTimeout(function(){if(t.waitingForImages=!1,t.count===0&&(t.stylesheets&&mu(t,t.stylesheets),t.unsuspend)){var y=t.unsuspend;t.unsuspend=null,y()}},(t.imgBytes>rh?50:800)+i);return t.unsuspend=a,function(){t.unsuspend=null,clearTimeout(u),clearTimeout(m)}}:null}function du(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)mu(this,this.stylesheets);else if(this.unsuspend){var t=this.unsuspend;this.unsuspend=null,t()}}}var hu=null;function mu(t,i){t.stylesheets=null,t.unsuspend!==null&&(t.count++,hu=new Map,i.forEach(hN,t),hu=null,du.call(t))}function hN(t,i){if(!(i.state.loading&4)){var a=hu.get(t);if(a)var u=a.get(null);else{a=new Map,hu.set(t,a);for(var m=t.querySelectorAll("link[data-precedence],style[data-precedence]"),y=0;y<m.length;y++){var S=m[y];(S.nodeName==="LINK"||S.getAttribute("media")!=="not all")&&(a.set(S.dataset.precedence,S),u=S)}u&&a.set(null,u)}m=i.instance,S=m.getAttribute("data-precedence"),y=a.get(S)||u,y===u&&a.set(null,m),a.set(S,m),this.count++,u=du.bind(this),m.addEventListener("load",u),m.addEventListener("error",u),y?y.parentNode.insertBefore(m,y.nextSibling):(t=t.nodeType===9?t.head:t,t.insertBefore(m,t.firstChild)),i.state.loading|=4}}var mo={$$typeof:M,Provider:null,Consumer:null,_currentValue:$,_currentValue2:$,_threadCount:0};function mN(t,i,a,u,m,y,S,R,L){this.tag=1,this.containerInfo=t,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=rn(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=rn(0),this.hiddenUpdates=rn(null),this.identifierPrefix=u,this.onUncaughtError=m,this.onCaughtError=y,this.onRecoverableError=S,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=L,this.incompleteTransitions=new Map}function zv(t,i,a,u,m,y,S,R,L,V,re,oe){return t=new mN(t,i,a,S,L,V,re,oe,R),i=1,y===!0&&(i|=24),y=xn(3,null,null,i),t.current=y,y.stateNode=t,i=Lf(),i.refCount++,t.pooledCache=i,i.refCount++,y.memoizedState={element:u,isDehydrated:a,cache:i},Uf(y),t}function Lv(t){return t?(t=Ml,t):Ml}function Pv(t,i,a,u,m,y){m=Lv(m),u.context===null?u.context=m:u.pendingContext=m,u=oi(i),u.payload={element:a},y=y===void 0?null:y,y!==null&&(u.callback=y),a=si(t,u,i),a!==null&&(fn(a,t,i),Va(a,t,i))}function Bv(t,i){if(t=t.memoizedState,t!==null&&t.dehydrated!==null){var a=t.retryLane;t.retryLane=a!==0&&a<i?a:i}}function ih(t,i){Bv(t,i),(t=t.alternate)&&Bv(t,i)}function Iv(t){if(t.tag===13||t.tag===31){var i=Gi(t,67108864);i!==null&&fn(i,t,67108864),ih(t,67108864)}}function Uv(t){if(t.tag===13||t.tag===31){var i=Cn();i=kr(i);var a=Gi(t,i);a!==null&&fn(a,t,i),ih(t,i)}}var pu=!0;function pN(t,i,a,u){var m=B.T;B.T=null;var y=X.p;try{X.p=2,lh(t,i,a,u)}finally{X.p=y,B.T=m}}function gN(t,i,a,u){var m=B.T;B.T=null;var y=X.p;try{X.p=8,lh(t,i,a,u)}finally{X.p=y,B.T=m}}function lh(t,i,a,u){if(pu){var m=ah(u);if(m===null)Vd(t,i,u,gu,a),Fv(t,u);else if(xN(m,t,i,a,u))u.stopPropagation();else if(Fv(t,u),i&4&&-1<yN.indexOf(t)){for(;m!==null;){var y=vl(m);if(y!==null)switch(y.tag){case 3:if(y=y.stateNode,y.current.memoizedState.isDehydrated){var S=yt(y.pendingLanes);if(S!==0){var R=y;for(R.pendingLanes|=2,R.entangledLanes|=2;S;){var L=1<<31-Xe(S);R.entanglements[1]|=L,S&=~L}hr(y),(Ge&6)===0&&(Ws=mt()+500,oo(0))}}break;case 31:case 13:R=Gi(y,2),R!==null&&fn(R,y,2),eu(),ih(y,2)}if(y=ah(u),y===null&&Vd(t,i,u,gu,a),y===m)break;m=y}m!==null&&u.stopPropagation()}else Vd(t,i,u,null,a)}}function ah(t){return t=sf(t),oh(t)}var gu=null;function oh(t){if(gu=null,t=xl(t),t!==null){var i=s(t);if(i===null)t=null;else{var a=i.tag;if(a===13){if(t=c(i),t!==null)return t;t=null}else if(a===31){if(t=f(i),t!==null)return t;t=null}else if(a===3){if(i.stateNode.current.memoizedState.isDehydrated)return i.tag===3?i.stateNode.containerInfo:null;t=null}else i!==t&&(t=null)}}return gu=t,null}function Hv(t){switch(t){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(Jr()){case ie:return 2;case Y:return 8;case se:case pe:return 32;case we:return 268435456;default:return 32}default:return 32}}var sh=!1,vi=null,bi=null,wi=null,po=new Map,go=new Map,Si=[],yN="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 Fv(t,i){switch(t){case"focusin":case"focusout":vi=null;break;case"dragenter":case"dragleave":bi=null;break;case"mouseover":case"mouseout":wi=null;break;case"pointerover":case"pointerout":po.delete(i.pointerId);break;case"gotpointercapture":case"lostpointercapture":go.delete(i.pointerId)}}function yo(t,i,a,u,m,y){return t===null||t.nativeEvent!==y?(t={blockedOn:i,domEventName:a,eventSystemFlags:u,nativeEvent:y,targetContainers:[m]},i!==null&&(i=vl(i),i!==null&&Iv(i)),t):(t.eventSystemFlags|=u,i=t.targetContainers,m!==null&&i.indexOf(m)===-1&&i.push(m),t)}function xN(t,i,a,u,m){switch(i){case"focusin":return vi=yo(vi,t,i,a,u,m),!0;case"dragenter":return bi=yo(bi,t,i,a,u,m),!0;case"mouseover":return wi=yo(wi,t,i,a,u,m),!0;case"pointerover":var y=m.pointerId;return po.set(y,yo(po.get(y)||null,t,i,a,u,m)),!0;case"gotpointercapture":return y=m.pointerId,go.set(y,yo(go.get(y)||null,t,i,a,u,m)),!0}return!1}function qv(t){var i=xl(t.target);if(i!==null){var a=s(i);if(a!==null){if(i=a.tag,i===13){if(i=c(a),i!==null){t.blockedOn=i,ei(t.priority,function(){Uv(a)});return}}else if(i===31){if(i=f(a),i!==null){t.blockedOn=i,ei(t.priority,function(){Uv(a)});return}}else if(i===3&&a.stateNode.current.memoizedState.isDehydrated){t.blockedOn=a.tag===3?a.stateNode.containerInfo:null;return}}}t.blockedOn=null}function yu(t){if(t.blockedOn!==null)return!1;for(var i=t.targetContainers;0<i.length;){var a=ah(t.nativeEvent);if(a===null){a=t.nativeEvent;var u=new a.constructor(a.type,a);of=u,a.target.dispatchEvent(u),of=null}else return i=vl(a),i!==null&&Iv(i),t.blockedOn=a,!1;i.shift()}return!0}function Gv(t,i,a){yu(t)&&a.delete(i)}function vN(){sh=!1,vi!==null&&yu(vi)&&(vi=null),bi!==null&&yu(bi)&&(bi=null),wi!==null&&yu(wi)&&(wi=null),po.forEach(Gv),go.forEach(Gv)}function xu(t,i){t.blockedOn===i&&(t.blockedOn=null,sh||(sh=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,vN)))}var vu=null;function Vv(t){vu!==t&&(vu=t,e.unstable_scheduleCallback(e.unstable_NormalPriority,function(){vu===t&&(vu=null);for(var i=0;i<t.length;i+=3){var a=t[i],u=t[i+1],m=t[i+2];if(typeof u!="function"){if(oh(u||a)===null)continue;break}var y=vl(a);y!==null&&(t.splice(i,3),i-=3,ad(y,{pending:!0,data:m,method:a.method,action:u},u,m))}}))}function ea(t){function i(L){return xu(L,t)}vi!==null&&xu(vi,t),bi!==null&&xu(bi,t),wi!==null&&xu(wi,t),po.forEach(i),go.forEach(i);for(var a=0;a<Si.length;a++){var u=Si[a];u.blockedOn===t&&(u.blockedOn=null)}for(;0<Si.length&&(a=Si[0],a.blockedOn===null);)qv(a),a.blockedOn===null&&Si.shift();if(a=(t.ownerDocument||t).$$reactFormReplay,a!=null)for(u=0;u<a.length;u+=3){var m=a[u],y=a[u+1],S=m[ln]||null;if(typeof y=="function")S||Vv(a);else if(S){var R=null;if(y&&y.hasAttribute("formAction")){if(m=y,S=y[ln]||null)R=S.formAction;else if(oh(m)!==null)continue}else R=S.action;typeof R=="function"?a[u+1]=R:(a.splice(u,3),u-=3),Vv(a)}}}function $v(){function t(y){y.canIntercept&&y.info==="react-transition"&&y.intercept({handler:function(){return new Promise(function(S){return m=S})},focusReset:"manual",scroll:"manual"})}function i(){m!==null&&(m(),m=null),u||setTimeout(a,20)}function a(){if(!u&&!navigation.transition){var y=navigation.currentEntry;y&&y.url!=null&&navigation.navigate(y.url,{state:y.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var u=!1,m=null;return navigation.addEventListener("navigate",t),navigation.addEventListener("navigatesuccess",i),navigation.addEventListener("navigateerror",i),setTimeout(a,100),function(){u=!0,navigation.removeEventListener("navigate",t),navigation.removeEventListener("navigatesuccess",i),navigation.removeEventListener("navigateerror",i),m!==null&&(m(),m=null)}}}function uh(t){this._internalRoot=t}bu.prototype.render=uh.prototype.render=function(t){var i=this._internalRoot;if(i===null)throw Error(l(409));var a=i.current,u=Cn();Pv(a,u,t,i,null,null)},bu.prototype.unmount=uh.prototype.unmount=function(){var t=this._internalRoot;if(t!==null){this._internalRoot=null;var i=t.containerInfo;Pv(t.current,2,null,t,null,null),eu(),i[yl]=null}};function bu(t){this._internalRoot=t}bu.prototype.unstable_scheduleHydration=function(t){if(t){var i=Qn();t={blockedOn:null,target:t,priority:i};for(var a=0;a<Si.length&&i!==0&&i<Si[a].priority;a++);Si.splice(a,0,t),a===0&&qv(t)}};var Yv=n.version;if(Yv!=="19.2.1")throw Error(l(527,Yv,"19.2.1"));X.findDOMNode=function(t){var i=t._reactInternals;if(i===void 0)throw typeof t.render=="function"?Error(l(188)):(t=Object.keys(t).join(","),Error(l(268,t)));return t=h(i),t=t!==null?g(t):null,t=t===null?null:t.stateNode,t};var bN={bundleType:0,version:"19.2.1",rendererPackageName:"react-dom",currentDispatcherRef:B,reconcilerVersion:"19.2.1"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var wu=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!wu.isDisabled&&wu.supportsFiber)try{Ut=wu.inject(bN),pt=wu}catch{}}return vo.createRoot=function(t,i){if(!o(t))throw Error(l(299));var a=!1,u="",m=ex,y=tx,S=nx;return i!=null&&(i.unstable_strictMode===!0&&(a=!0),i.identifierPrefix!==void 0&&(u=i.identifierPrefix),i.onUncaughtError!==void 0&&(m=i.onUncaughtError),i.onCaughtError!==void 0&&(y=i.onCaughtError),i.onRecoverableError!==void 0&&(S=i.onRecoverableError)),i=zv(t,1,!1,null,null,a,u,null,m,y,S,$v),t[yl]=i.current,Gd(t),new uh(i)},vo.hydrateRoot=function(t,i,a){if(!o(t))throw Error(l(299));var u=!1,m="",y=ex,S=tx,R=nx,L=null;return a!=null&&(a.unstable_strictMode===!0&&(u=!0),a.identifierPrefix!==void 0&&(m=a.identifierPrefix),a.onUncaughtError!==void 0&&(y=a.onUncaughtError),a.onCaughtError!==void 0&&(S=a.onCaughtError),a.onRecoverableError!==void 0&&(R=a.onRecoverableError),a.formState!==void 0&&(L=a.formState)),i=zv(t,1,!0,i,a??null,u,m,L,y,S,R,$v),i.context=Lv(null),a=i.current,u=Cn(),u=kr(u),m=oi(u),m.callback=null,si(a,m,u),a=u,i.current.lanes=a,An(i,a),hr(i),t[yl]=i.current,Gd(t),new bu(i)},vo.version="19.2.1",vo}var rb;function _N(){if(rb)return dh.exports;rb=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(n){console.error(n)}}return e(),dh.exports=jN(),dh.exports}var ON=_N();/**
50
+ * react-router v7.13.1
51
+ *
52
+ * Copyright (c) Remix Software Inc.
53
+ *
54
+ * This source code is licensed under the MIT license found in the
55
+ * LICENSE.md file in the root directory of this source tree.
56
+ *
57
+ * @license MIT
58
+ */var ib="popstate";function lb(e){return typeof e=="object"&&e!=null&&"pathname"in e&&"search"in e&&"hash"in e&&"state"in e&&"key"in e}function DN(e={}){function n(l,o){var h;let s=(h=o.state)==null?void 0:h.masked,{pathname:c,search:f,hash:d}=s||l.location;return im("",{pathname:c,search:f,hash:d},o.state&&o.state.usr||null,o.state&&o.state.key||"default",s?{pathname:l.location.pathname,search:l.location.search,hash:l.location.hash}:void 0)}function r(l,o){return typeof o=="string"?o:zo(o)}return LN(n,r,null,e)}function ft(e,n){if(e===!1||e===null||typeof e>"u")throw new Error(n)}function vr(e,n){if(!e){typeof console<"u"&&console.warn(n);try{throw new Error(n)}catch{}}}function zN(){return Math.random().toString(36).substring(2,10)}function ab(e,n){return{usr:e.state,key:e.key,idx:n,masked:e.unstable_mask?{pathname:e.pathname,search:e.search,hash:e.hash}:void 0}}function im(e,n,r=null,l,o){return{pathname:typeof e=="string"?e:e.pathname,search:"",hash:"",...typeof n=="string"?xa(n):n,state:r,key:n&&n.key||l||zN(),unstable_mask:o}}function zo({pathname:e="/",search:n="",hash:r=""}){return n&&n!=="?"&&(e+=n.charAt(0)==="?"?n:"?"+n),r&&r!=="#"&&(e+=r.charAt(0)==="#"?r:"#"+r),e}function xa(e){let n={};if(e){let r=e.indexOf("#");r>=0&&(n.hash=e.substring(r),e=e.substring(0,r));let l=e.indexOf("?");l>=0&&(n.search=e.substring(l),e=e.substring(0,l)),e&&(n.pathname=e)}return n}function LN(e,n,r,l={}){let{window:o=document.defaultView,v5Compat:s=!1}=l,c=o.history,f="POP",d=null,h=g();h==null&&(h=0,c.replaceState({...c.state,idx:h},""));function g(){return(c.state||{idx:null}).idx}function p(){f="POP";let k=g(),N=k==null?null:k-h;h=k,d&&d({action:f,location:C.location,delta:N})}function b(k,N){f="PUSH";let j=lb(k)?k:im(C.location,k,N);h=g()+1;let M=ab(j,h),z=C.createHref(j.unstable_mask||j);try{c.pushState(M,"",z)}catch(U){if(U instanceof DOMException&&U.name==="DataCloneError")throw U;o.location.assign(z)}s&&d&&d({action:f,location:C.location,delta:1})}function w(k,N){f="REPLACE";let j=lb(k)?k:im(C.location,k,N);h=g();let M=ab(j,h),z=C.createHref(j.unstable_mask||j);c.replaceState(M,"",z),s&&d&&d({action:f,location:C.location,delta:0})}function E(k){return PN(k)}let C={get action(){return f},get location(){return e(o,c)},listen(k){if(d)throw new Error("A history only accepts one active listener");return o.addEventListener(ib,p),d=k,()=>{o.removeEventListener(ib,p),d=null}},createHref(k){return n(o,k)},createURL:E,encodeLocation(k){let N=E(k);return{pathname:N.pathname,search:N.search,hash:N.hash}},push:b,replace:w,go(k){return c.go(k)}};return C}function PN(e,n=!1){let r="http://localhost";typeof window<"u"&&(r=window.location.origin!=="null"?window.location.origin:window.location.href),ft(r,"No window.location.(origin|href) available to create URL");let l=typeof e=="string"?e:zo(e);return l=l.replace(/ $/,"%20"),!n&&l.startsWith("//")&&(l=r+l),new URL(l,r)}function g1(e,n,r="/"){return BN(e,n,r,!1)}function BN(e,n,r,l){let o=typeof n=="string"?xa(n):n,s=$r(o.pathname||"/",r);if(s==null)return null;let c=y1(e);IN(c);let f=null;for(let d=0;f==null&&d<c.length;++d){let h=QN(s);f=XN(c[d],h,l)}return f}function y1(e,n=[],r=[],l="",o=!1){let s=(c,f,d=o,h)=>{let g={relativePath:h===void 0?c.path||"":h,caseSensitive:c.caseSensitive===!0,childrenIndex:f,route:c};if(g.relativePath.startsWith("/")){if(!g.relativePath.startsWith(l)&&d)return;ft(g.relativePath.startsWith(l),`Absolute route path "${g.relativePath}" nested under path "${l}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),g.relativePath=g.relativePath.slice(l.length)}let p=yr([l,g.relativePath]),b=r.concat(g);c.children&&c.children.length>0&&(ft(c.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${p}".`),y1(c.children,n,b,p,d)),!(c.path==null&&!c.index)&&n.push({path:p,score:$N(p,c.index),routesMeta:b})};return e.forEach((c,f)=>{var d;if(c.path===""||!((d=c.path)!=null&&d.includes("?")))s(c,f);else for(let h of x1(c.path))s(c,f,!0,h)}),n}function x1(e){let n=e.split("/");if(n.length===0)return[];let[r,...l]=n,o=r.endsWith("?"),s=r.replace(/\?$/,"");if(l.length===0)return o?[s,""]:[s];let c=x1(l.join("/")),f=[];return f.push(...c.map(d=>d===""?s:[s,d].join("/"))),o&&f.push(...c),f.map(d=>e.startsWith("/")&&d===""?"/":d)}function IN(e){e.sort((n,r)=>n.score!==r.score?r.score-n.score:YN(n.routesMeta.map(l=>l.childrenIndex),r.routesMeta.map(l=>l.childrenIndex)))}var UN=/^:[\w-]+$/,HN=3,FN=2,qN=1,GN=10,VN=-2,ob=e=>e==="*";function $N(e,n){let r=e.split("/"),l=r.length;return r.some(ob)&&(l+=VN),n&&(l+=FN),r.filter(o=>!ob(o)).reduce((o,s)=>o+(UN.test(s)?HN:s===""?qN:GN),l)}function YN(e,n){return e.length===n.length&&e.slice(0,-1).every((l,o)=>l===n[o])?e[e.length-1]-n[n.length-1]:0}function XN(e,n,r=!1){let{routesMeta:l}=e,o={},s="/",c=[];for(let f=0;f<l.length;++f){let d=l[f],h=f===l.length-1,g=s==="/"?n:n.slice(s.length)||"/",p=Qu({path:d.relativePath,caseSensitive:d.caseSensitive,end:h},g),b=d.route;if(!p&&h&&r&&!l[l.length-1].route.index&&(p=Qu({path:d.relativePath,caseSensitive:d.caseSensitive,end:!1},g)),!p)return null;Object.assign(o,p.params),c.push({params:o,pathname:yr([s,p.pathname]),pathnameBase:eR(yr([s,p.pathnameBase])),route:b}),p.pathnameBase!=="/"&&(s=yr([s,p.pathnameBase]))}return c}function Qu(e,n){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[r,l]=KN(e.path,e.caseSensitive,e.end),o=n.match(r);if(!o)return null;let s=o[0],c=s.replace(/(.)\/+$/,"$1"),f=o.slice(1);return{params:l.reduce((h,{paramName:g,isOptional:p},b)=>{if(g==="*"){let E=f[b]||"";c=s.slice(0,s.length-E.length).replace(/(.)\/+$/,"$1")}const w=f[b];return p&&!w?h[g]=void 0:h[g]=(w||"").replace(/%2F/g,"/"),h},{}),pathname:s,pathnameBase:c,pattern:e}}function KN(e,n=!1,r=!0){vr(e==="*"||!e.endsWith("*")||e.endsWith("/*"),`Route path "${e}" will be treated as if it were "${e.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${e.replace(/\*$/,"/*")}".`);let l=[],o="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(c,f,d,h,g)=>{if(l.push({paramName:f,isOptional:d!=null}),d){let p=g.charAt(h+c.length);return p&&p!=="/"?"/([^\\/]*)":"(?:/([^\\/]*))?"}return"/([^\\/]+)"}).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return e.endsWith("*")?(l.push({paramName:"*"}),o+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):r?o+="\\/*$":e!==""&&e!=="/"&&(o+="(?:(?=\\/|$))"),[new RegExp(o,n?void 0:"i"),l]}function QN(e){try{return e.split("/").map(n=>decodeURIComponent(n).replace(/\//g,"%2F")).join("/")}catch(n){return vr(!1,`The URL path "${e}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${n}).`),e}}function $r(e,n){if(n==="/")return e;if(!e.toLowerCase().startsWith(n.toLowerCase()))return null;let r=n.endsWith("/")?n.length-1:n.length,l=e.charAt(r);return l&&l!=="/"?null:e.slice(r)||"/"}var ZN=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i;function WN(e,n="/"){let{pathname:r,search:l="",hash:o=""}=typeof e=="string"?xa(e):e,s;return r?(r=r.replace(/\/\/+/g,"/"),r.startsWith("/")?s=sb(r.substring(1),"/"):s=sb(r,n)):s=n,{pathname:s,search:tR(l),hash:nR(o)}}function sb(e,n){let r=n.replace(/\/+$/,"").split("/");return e.split("/").forEach(o=>{o===".."?r.length>1&&r.pop():o!=="."&&r.push(o)}),r.length>1?r.join("/"):"/"}function gh(e,n,r,l){return`Cannot include a '${e}' character in a manually specified \`to.${n}\` field [${JSON.stringify(l)}]. Please separate it out to the \`to.${r}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function JN(e){return e.filter((n,r)=>r===0||n.route.path&&n.route.path.length>0)}function v1(e){let n=JN(e);return n.map((r,l)=>l===n.length-1?r.pathname:r.pathnameBase)}function Im(e,n,r,l=!1){let o;typeof e=="string"?o=xa(e):(o={...e},ft(!o.pathname||!o.pathname.includes("?"),gh("?","pathname","search",o)),ft(!o.pathname||!o.pathname.includes("#"),gh("#","pathname","hash",o)),ft(!o.search||!o.search.includes("#"),gh("#","search","hash",o)));let s=e===""||o.pathname==="",c=s?"/":o.pathname,f;if(c==null)f=r;else{let p=n.length-1;if(!l&&c.startsWith("..")){let b=c.split("/");for(;b[0]==="..";)b.shift(),p-=1;o.pathname=b.join("/")}f=p>=0?n[p]:"/"}let d=WN(o,f),h=c&&c!=="/"&&c.endsWith("/"),g=(s||c===".")&&r.endsWith("/");return!d.pathname.endsWith("/")&&(h||g)&&(d.pathname+="/"),d}var yr=e=>e.join("/").replace(/\/\/+/g,"/"),eR=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),tR=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,nR=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e,rR=class{constructor(e,n,r,l=!1){this.status=e,this.statusText=n||"",this.internal=l,r instanceof Error?(this.data=r.toString(),this.error=r):this.data=r}};function iR(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}function lR(e){return e.map(n=>n.route.path).filter(Boolean).join("/").replace(/\/\/*/g,"/")||"/"}var b1=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function w1(e,n){let r=e;if(typeof r!="string"||!ZN.test(r))return{absoluteURL:void 0,isExternal:!1,to:r};let l=r,o=!1;if(b1)try{let s=new URL(window.location.href),c=r.startsWith("//")?new URL(s.protocol+r):new URL(r),f=$r(c.pathname,n);c.origin===s.origin&&f!=null?r=f+c.search+c.hash:o=!0}catch{vr(!1,`<Link to="${r}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:l,isExternal:o,to:r}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var S1=["POST","PUT","PATCH","DELETE"];new Set(S1);var aR=["GET",...S1];new Set(aR);var va=v.createContext(null);va.displayName="DataRouter";var bc=v.createContext(null);bc.displayName="DataRouterState";var oR=v.createContext(!1),C1=v.createContext({isTransitioning:!1});C1.displayName="ViewTransition";var sR=v.createContext(new Map);sR.displayName="Fetchers";var uR=v.createContext(null);uR.displayName="Await";var Vn=v.createContext(null);Vn.displayName="Navigation";var Yo=v.createContext(null);Yo.displayName="Location";var ar=v.createContext({outlet:null,matches:[],isDataRoute:!1});ar.displayName="Route";var Um=v.createContext(null);Um.displayName="RouteError";var E1="REACT_ROUTER_ERROR",cR="REDIRECT",fR="ROUTE_ERROR_RESPONSE";function dR(e){if(e.startsWith(`${E1}:${cR}:{`))try{let n=JSON.parse(e.slice(28));if(typeof n=="object"&&n&&typeof n.status=="number"&&typeof n.statusText=="string"&&typeof n.location=="string"&&typeof n.reloadDocument=="boolean"&&typeof n.replace=="boolean")return n}catch{}}function hR(e){if(e.startsWith(`${E1}:${fR}:{`))try{let n=JSON.parse(e.slice(40));if(typeof n=="object"&&n&&typeof n.status=="number"&&typeof n.statusText=="string")return new rR(n.status,n.statusText,n.data)}catch{}}function mR(e,{relative:n}={}){ft(Xo(),"useHref() may be used only in the context of a <Router> component.");let{basename:r,navigator:l}=v.useContext(Vn),{hash:o,pathname:s,search:c}=Ko(e,{relative:n}),f=s;return r!=="/"&&(f=s==="/"?r:yr([r,s])),l.createHref({pathname:f,search:c,hash:o})}function Xo(){return v.useContext(Yo)!=null}function Sr(){return ft(Xo(),"useLocation() may be used only in the context of a <Router> component."),v.useContext(Yo).location}var k1="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function N1(e){v.useContext(Vn).static||v.useLayoutEffect(e)}function Hm(){let{isDataRoute:e}=v.useContext(ar);return e?AR():pR()}function pR(){ft(Xo(),"useNavigate() may be used only in the context of a <Router> component.");let e=v.useContext(va),{basename:n,navigator:r}=v.useContext(Vn),{matches:l}=v.useContext(ar),{pathname:o}=Sr(),s=JSON.stringify(v1(l)),c=v.useRef(!1);return N1(()=>{c.current=!0}),v.useCallback((d,h={})=>{if(vr(c.current,k1),!c.current)return;if(typeof d=="number"){r.go(d);return}let g=Im(d,JSON.parse(s),o,h.relative==="path");e==null&&n!=="/"&&(g.pathname=g.pathname==="/"?n:yr([n,g.pathname])),(h.replace?r.replace:r.push)(g,h.state,h)},[n,r,s,o,e])}var R1=v.createContext(null);function Fm(){return v.useContext(R1)}function gR(e){let n=v.useContext(ar).outlet;return v.useMemo(()=>n&&v.createElement(R1.Provider,{value:e},n),[n,e])}function yR(){let{matches:e}=v.useContext(ar),n=e[e.length-1];return n?n.params:{}}function Ko(e,{relative:n}={}){let{matches:r}=v.useContext(ar),{pathname:l}=Sr(),o=JSON.stringify(v1(r));return v.useMemo(()=>Im(e,JSON.parse(o),l,n==="path"),[e,o,l,n])}function xR(e,n){return T1(e,n)}function T1(e,n,r){var k;ft(Xo(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:l}=v.useContext(Vn),{matches:o}=v.useContext(ar),s=o[o.length-1],c=s?s.params:{},f=s?s.pathname:"/",d=s?s.pathnameBase:"/",h=s&&s.route;{let N=h&&h.path||"";M1(f,!h||N.endsWith("*")||N.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${f}" (under <Route path="${N}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
59
+
60
+ Please change the parent <Route path="${N}"> to <Route path="${N==="/"?"*":`${N}/*`}">.`)}let g=Sr(),p;if(n){let N=typeof n=="string"?xa(n):n;ft(d==="/"||((k=N.pathname)==null?void 0:k.startsWith(d)),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${d}" but pathname "${N.pathname}" was given in the \`location\` prop.`),p=N}else p=g;let b=p.pathname||"/",w=b;if(d!=="/"){let N=d.replace(/^\//,"").split("/");w="/"+b.replace(/^\//,"").split("/").slice(N.length).join("/")}let E=g1(e,{pathname:w});vr(h||E!=null,`No routes matched location "${p.pathname}${p.search}${p.hash}" `),vr(E==null||E[E.length-1].route.element!==void 0||E[E.length-1].route.Component!==void 0||E[E.length-1].route.lazy!==void 0,`Matched leaf route at location "${p.pathname}${p.search}${p.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);let C=CR(E&&E.map(N=>Object.assign({},N,{params:Object.assign({},c,N.params),pathname:yr([d,l.encodeLocation?l.encodeLocation(N.pathname.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:N.pathname]),pathnameBase:N.pathnameBase==="/"?d:yr([d,l.encodeLocation?l.encodeLocation(N.pathnameBase.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:N.pathnameBase])})),o,r);return n&&C?v.createElement(Yo.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",unstable_mask:void 0,...p},navigationType:"POP"}},C):C}function vR(){let e=TR(),n=iR(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),r=e instanceof Error?e.stack:null,l="rgba(200,200,200, 0.5)",o={padding:"0.5rem",backgroundColor:l},s={padding:"2px 4px",backgroundColor:l},c=null;return console.error("Error handled by React Router default ErrorBoundary:",e),c=v.createElement(v.Fragment,null,v.createElement("p",null,"💿 Hey developer 👋"),v.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",v.createElement("code",{style:s},"ErrorBoundary")," or"," ",v.createElement("code",{style:s},"errorElement")," prop on your route.")),v.createElement(v.Fragment,null,v.createElement("h2",null,"Unexpected Application Error!"),v.createElement("h3",{style:{fontStyle:"italic"}},n),r?v.createElement("pre",{style:o},r):null,c)}var bR=v.createElement(vR,null),A1=class extends v.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,n){return n.location!==e.location||n.revalidation!=="idle"&&e.revalidation==="idle"?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error!==void 0?e.error:n.error,location:n.location,revalidation:e.revalidation||n.revalidation}}componentDidCatch(e,n){this.props.onError?this.props.onError(e,n):console.error("React Router caught the following error during render",e)}render(){let e=this.state.error;if(this.context&&typeof e=="object"&&e&&"digest"in e&&typeof e.digest=="string"){const r=hR(e.digest);r&&(e=r)}let n=e!==void 0?v.createElement(ar.Provider,{value:this.props.routeContext},v.createElement(Um.Provider,{value:e,children:this.props.component})):this.props.children;return this.context?v.createElement(wR,{error:e},n):n}};A1.contextType=oR;var yh=new WeakMap;function wR({children:e,error:n}){let{basename:r}=v.useContext(Vn);if(typeof n=="object"&&n&&"digest"in n&&typeof n.digest=="string"){let l=dR(n.digest);if(l){let o=yh.get(n);if(o)throw o;let s=w1(l.location,r);if(b1&&!yh.get(n))if(s.isExternal||l.reloadDocument)window.location.href=s.absoluteURL||s.to;else{const c=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(s.to,{replace:l.replace}));throw yh.set(n,c),c}return v.createElement("meta",{httpEquiv:"refresh",content:`0;url=${s.absoluteURL||s.to}`})}}return e}function SR({routeContext:e,match:n,children:r}){let l=v.useContext(va);return l&&l.static&&l.staticContext&&(n.route.errorElement||n.route.ErrorBoundary)&&(l.staticContext._deepestRenderedBoundaryId=n.route.id),v.createElement(ar.Provider,{value:e},r)}function CR(e,n=[],r){let l=r==null?void 0:r.state;if(e==null){if(!l)return null;if(l.errors)e=l.matches;else if(n.length===0&&!l.initialized&&l.matches.length>0)e=l.matches;else return null}let o=e,s=l==null?void 0:l.errors;if(s!=null){let g=o.findIndex(p=>p.route.id&&(s==null?void 0:s[p.route.id])!==void 0);ft(g>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(s).join(",")}`),o=o.slice(0,Math.min(o.length,g+1))}let c=!1,f=-1;if(r&&l){c=l.renderFallback;for(let g=0;g<o.length;g++){let p=o[g];if((p.route.HydrateFallback||p.route.hydrateFallbackElement)&&(f=g),p.route.id){let{loaderData:b,errors:w}=l,E=p.route.loader&&!b.hasOwnProperty(p.route.id)&&(!w||w[p.route.id]===void 0);if(p.route.lazy||E){r.isStatic&&(c=!0),f>=0?o=o.slice(0,f+1):o=[o[0]];break}}}}let d=r==null?void 0:r.onError,h=l&&d?(g,p)=>{var b,w;d(g,{location:l.location,params:((w=(b=l.matches)==null?void 0:b[0])==null?void 0:w.params)??{},unstable_pattern:lR(l.matches),errorInfo:p})}:void 0;return o.reduceRight((g,p,b)=>{let w,E=!1,C=null,k=null;l&&(w=s&&p.route.id?s[p.route.id]:void 0,C=p.route.errorElement||bR,c&&(f<0&&b===0?(M1("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),E=!0,k=null):f===b&&(E=!0,k=p.route.hydrateFallbackElement||null)));let N=n.concat(o.slice(0,b+1)),j=()=>{let M;return w?M=C:E?M=k:p.route.Component?M=v.createElement(p.route.Component,null):p.route.element?M=p.route.element:M=g,v.createElement(SR,{match:p,routeContext:{outlet:g,matches:N,isDataRoute:l!=null},children:M})};return l&&(p.route.ErrorBoundary||p.route.errorElement||b===0)?v.createElement(A1,{location:l.location,revalidation:l.revalidation,component:C,error:w,children:j(),routeContext:{outlet:null,matches:N,isDataRoute:!0},onError:h}):j()},null)}function qm(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function ER(e){let n=v.useContext(va);return ft(n,qm(e)),n}function kR(e){let n=v.useContext(bc);return ft(n,qm(e)),n}function NR(e){let n=v.useContext(ar);return ft(n,qm(e)),n}function Gm(e){let n=NR(e),r=n.matches[n.matches.length-1];return ft(r.route.id,`${e} can only be used on routes that contain a unique "id"`),r.route.id}function RR(){return Gm("useRouteId")}function TR(){var l;let e=v.useContext(Um),n=kR("useRouteError"),r=Gm("useRouteError");return e!==void 0?e:(l=n.errors)==null?void 0:l[r]}function AR(){let{router:e}=ER("useNavigate"),n=Gm("useNavigate"),r=v.useRef(!1);return N1(()=>{r.current=!0}),v.useCallback(async(o,s={})=>{vr(r.current,k1),r.current&&(typeof o=="number"?await e.navigate(o):await e.navigate(o,{fromRouteId:n,...s}))},[e,n])}var ub={};function M1(e,n,r){!n&&!ub[e]&&(ub[e]=!0,vr(!1,r))}v.memo(MR);function MR({routes:e,future:n,state:r,isStatic:l,onError:o}){return T1(e,void 0,{state:r,isStatic:l,onError:o})}function jR(e){return gR(e.context)}function aa(e){ft(!1,"A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. Please wrap your <Route> in a <Routes>.")}function _R({basename:e="/",children:n=null,location:r,navigationType:l="POP",navigator:o,static:s=!1,unstable_useTransitions:c}){ft(!Xo(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let f=e.replace(/^\/*/,"/"),d=v.useMemo(()=>({basename:f,navigator:o,static:s,unstable_useTransitions:c,future:{}}),[f,o,s,c]);typeof r=="string"&&(r=xa(r));let{pathname:h="/",search:g="",hash:p="",state:b=null,key:w="default",unstable_mask:E}=r,C=v.useMemo(()=>{let k=$r(h,f);return k==null?null:{location:{pathname:k,search:g,hash:p,state:b,key:w,unstable_mask:E},navigationType:l}},[f,h,g,p,b,w,l,E]);return vr(C!=null,`<Router basename="${f}"> is not able to match the URL "${h}${g}${p}" because it does not start with the basename, so the <Router> won't render anything.`),C==null?null:v.createElement(Vn.Provider,{value:d},v.createElement(Yo.Provider,{children:n,value:C}))}function OR({children:e,location:n}){return xR(lm(e),n)}function lm(e,n=[]){let r=[];return v.Children.forEach(e,(l,o)=>{if(!v.isValidElement(l))return;let s=[...n,o];if(l.type===v.Fragment){r.push.apply(r,lm(l.props.children,s));return}ft(l.type===aa,`[${typeof l.type=="string"?l.type:l.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),ft(!l.props.index||!l.props.children,"An index route cannot have child routes.");let c={id:l.props.id||s.join("-"),caseSensitive:l.props.caseSensitive,element:l.props.element,Component:l.props.Component,index:l.props.index,path:l.props.path,middleware:l.props.middleware,loader:l.props.loader,action:l.props.action,hydrateFallbackElement:l.props.hydrateFallbackElement,HydrateFallback:l.props.HydrateFallback,errorElement:l.props.errorElement,ErrorBoundary:l.props.ErrorBoundary,hasErrorBoundary:l.props.hasErrorBoundary===!0||l.props.ErrorBoundary!=null||l.props.errorElement!=null,shouldRevalidate:l.props.shouldRevalidate,handle:l.props.handle,lazy:l.props.lazy};l.props.children&&(c.children=lm(l.props.children,s)),r.push(c)}),r}var qu="get",Gu="application/x-www-form-urlencoded";function wc(e){return typeof HTMLElement<"u"&&e instanceof HTMLElement}function DR(e){return wc(e)&&e.tagName.toLowerCase()==="button"}function zR(e){return wc(e)&&e.tagName.toLowerCase()==="form"}function LR(e){return wc(e)&&e.tagName.toLowerCase()==="input"}function PR(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function BR(e,n){return e.button===0&&(!n||n==="_self")&&!PR(e)}var Su=null;function IR(){if(Su===null)try{new FormData(document.createElement("form"),0),Su=!1}catch{Su=!0}return Su}var UR=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function xh(e){return e!=null&&!UR.has(e)?(vr(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${Gu}"`),null):e}function HR(e,n){let r,l,o,s,c;if(zR(e)){let f=e.getAttribute("action");l=f?$r(f,n):null,r=e.getAttribute("method")||qu,o=xh(e.getAttribute("enctype"))||Gu,s=new FormData(e)}else if(DR(e)||LR(e)&&(e.type==="submit"||e.type==="image")){let f=e.form;if(f==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let d=e.getAttribute("formaction")||f.getAttribute("action");if(l=d?$r(d,n):null,r=e.getAttribute("formmethod")||f.getAttribute("method")||qu,o=xh(e.getAttribute("formenctype"))||xh(f.getAttribute("enctype"))||Gu,s=new FormData(f,e),!IR()){let{name:h,type:g,value:p}=e;if(g==="image"){let b=h?`${h}.`:"";s.append(`${b}x`,"0"),s.append(`${b}y`,"0")}else h&&s.append(h,p)}}else{if(wc(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');r=qu,l=null,o=Gu,c=e}return s&&o==="text/plain"&&(c=s,s=void 0),{action:l,method:r.toLowerCase(),encType:o,formData:s,body:c}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function Vm(e,n){if(e===!1||e===null||typeof e>"u")throw new Error(n)}function FR(e,n,r,l){let o=typeof e=="string"?new URL(e,typeof window>"u"?"server://singlefetch/":window.location.origin):e;return r?o.pathname.endsWith("/")?o.pathname=`${o.pathname}_.${l}`:o.pathname=`${o.pathname}.${l}`:o.pathname==="/"?o.pathname=`_root.${l}`:n&&$r(o.pathname,n)==="/"?o.pathname=`${n.replace(/\/$/,"")}/_root.${l}`:o.pathname=`${o.pathname.replace(/\/$/,"")}.${l}`,o}async function qR(e,n){if(e.id in n)return n[e.id];try{let r=await import(e.module);return n[e.id]=r,r}catch(r){return console.error(`Error loading route module \`${e.module}\`, reloading page...`),console.error(r),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function GR(e){return e==null?!1:e.href==null?e.rel==="preload"&&typeof e.imageSrcSet=="string"&&typeof e.imageSizes=="string":typeof e.rel=="string"&&typeof e.href=="string"}async function VR(e,n,r){let l=await Promise.all(e.map(async o=>{let s=n.routes[o.route.id];if(s){let c=await qR(s,r);return c.links?c.links():[]}return[]}));return KR(l.flat(1).filter(GR).filter(o=>o.rel==="stylesheet"||o.rel==="preload").map(o=>o.rel==="stylesheet"?{...o,rel:"prefetch",as:"style"}:{...o,rel:"prefetch"}))}function cb(e,n,r,l,o,s){let c=(d,h)=>r[h]?d.route.id!==r[h].route.id:!0,f=(d,h)=>{var g;return r[h].pathname!==d.pathname||((g=r[h].route.path)==null?void 0:g.endsWith("*"))&&r[h].params["*"]!==d.params["*"]};return s==="assets"?n.filter((d,h)=>c(d,h)||f(d,h)):s==="data"?n.filter((d,h)=>{var p;let g=l.routes[d.route.id];if(!g||!g.hasLoader)return!1;if(c(d,h)||f(d,h))return!0;if(d.route.shouldRevalidate){let b=d.route.shouldRevalidate({currentUrl:new URL(o.pathname+o.search+o.hash,window.origin),currentParams:((p=r[0])==null?void 0:p.params)||{},nextUrl:new URL(e,window.origin),nextParams:d.params,defaultShouldRevalidate:!0});if(typeof b=="boolean")return b}return!0}):[]}function $R(e,n,{includeHydrateFallback:r}={}){return YR(e.map(l=>{let o=n.routes[l.route.id];if(!o)return[];let s=[o.module];return o.clientActionModule&&(s=s.concat(o.clientActionModule)),o.clientLoaderModule&&(s=s.concat(o.clientLoaderModule)),r&&o.hydrateFallbackModule&&(s=s.concat(o.hydrateFallbackModule)),o.imports&&(s=s.concat(o.imports)),s}).flat(1))}function YR(e){return[...new Set(e)]}function XR(e){let n={},r=Object.keys(e).sort();for(let l of r)n[l]=e[l];return n}function KR(e,n){let r=new Set;return new Set(n),e.reduce((l,o)=>{let s=JSON.stringify(XR(o));return r.has(s)||(r.add(s),l.push({key:s,link:o})),l},[])}function j1(){let e=v.useContext(va);return Vm(e,"You must render this element inside a <DataRouterContext.Provider> element"),e}function QR(){let e=v.useContext(bc);return Vm(e,"You must render this element inside a <DataRouterStateContext.Provider> element"),e}var $m=v.createContext(void 0);$m.displayName="FrameworkContext";function _1(){let e=v.useContext($m);return Vm(e,"You must render this element inside a <HydratedRouter> element"),e}function ZR(e,n){let r=v.useContext($m),[l,o]=v.useState(!1),[s,c]=v.useState(!1),{onFocus:f,onBlur:d,onMouseEnter:h,onMouseLeave:g,onTouchStart:p}=n,b=v.useRef(null);v.useEffect(()=>{if(e==="render"&&c(!0),e==="viewport"){let C=N=>{N.forEach(j=>{c(j.isIntersecting)})},k=new IntersectionObserver(C,{threshold:.5});return b.current&&k.observe(b.current),()=>{k.disconnect()}}},[e]),v.useEffect(()=>{if(l){let C=setTimeout(()=>{c(!0)},100);return()=>{clearTimeout(C)}}},[l]);let w=()=>{o(!0)},E=()=>{o(!1),c(!1)};return r?e!=="intent"?[s,b,{}]:[s,b,{onFocus:bo(f,w),onBlur:bo(d,E),onMouseEnter:bo(h,w),onMouseLeave:bo(g,E),onTouchStart:bo(p,w)}]:[!1,b,{}]}function bo(e,n){return r=>{e&&e(r),r.defaultPrevented||n(r)}}function WR({page:e,...n}){let{router:r}=j1(),l=v.useMemo(()=>g1(r.routes,e,r.basename),[r.routes,e,r.basename]);return l?v.createElement(eT,{page:e,matches:l,...n}):null}function JR(e){let{manifest:n,routeModules:r}=_1(),[l,o]=v.useState([]);return v.useEffect(()=>{let s=!1;return VR(e,n,r).then(c=>{s||o(c)}),()=>{s=!0}},[e,n,r]),l}function eT({page:e,matches:n,...r}){let l=Sr(),{future:o,manifest:s,routeModules:c}=_1(),{basename:f}=j1(),{loaderData:d,matches:h}=QR(),g=v.useMemo(()=>cb(e,n,h,s,l,"data"),[e,n,h,s,l]),p=v.useMemo(()=>cb(e,n,h,s,l,"assets"),[e,n,h,s,l]),b=v.useMemo(()=>{if(e===l.pathname+l.search+l.hash)return[];let C=new Set,k=!1;if(n.forEach(j=>{var z;let M=s.routes[j.route.id];!M||!M.hasLoader||(!g.some(U=>U.route.id===j.route.id)&&j.route.id in d&&((z=c[j.route.id])!=null&&z.shouldRevalidate)||M.hasClientLoader?k=!0:C.add(j.route.id))}),C.size===0)return[];let N=FR(e,f,o.unstable_trailingSlashAwareDataRequests,"data");return k&&C.size>0&&N.searchParams.set("_routes",n.filter(j=>C.has(j.route.id)).map(j=>j.route.id).join(",")),[N.pathname+N.search]},[f,o.unstable_trailingSlashAwareDataRequests,d,l,s,g,n,e,c]),w=v.useMemo(()=>$R(p,s),[p,s]),E=JR(p);return v.createElement(v.Fragment,null,b.map(C=>v.createElement("link",{key:C,rel:"prefetch",as:"fetch",href:C,...r})),w.map(C=>v.createElement("link",{key:C,rel:"modulepreload",href:C,...r})),E.map(({key:C,link:k})=>v.createElement("link",{key:C,nonce:r.nonce,...k,crossOrigin:k.crossOrigin??r.crossOrigin})))}function tT(...e){return n=>{e.forEach(r=>{typeof r=="function"?r(n):r!=null&&(r.current=n)})}}var nT=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{nT&&(window.__reactRouterVersion="7.13.1")}catch{}function rT({basename:e,children:n,unstable_useTransitions:r,window:l}){let o=v.useRef();o.current==null&&(o.current=DN({window:l,v5Compat:!0}));let s=o.current,[c,f]=v.useState({action:s.action,location:s.location}),d=v.useCallback(h=>{r===!1?f(h):v.startTransition(()=>f(h))},[r]);return v.useLayoutEffect(()=>s.listen(d),[s,d]),v.createElement(_R,{basename:e,children:n,location:c.location,navigationType:c.action,navigator:s,unstable_useTransitions:r})}var O1=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,D1=v.forwardRef(function({onClick:n,discover:r="render",prefetch:l="none",relative:o,reloadDocument:s,replace:c,unstable_mask:f,state:d,target:h,to:g,preventScrollReset:p,viewTransition:b,unstable_defaultShouldRevalidate:w,...E},C){let{basename:k,navigator:N,unstable_useTransitions:j}=v.useContext(Vn),M=typeof g=="string"&&O1.test(g),z=w1(g,k);g=z.to;let U=mR(g,{relative:o}),_=Sr(),P=null;if(f){let ee=Im(f,[],_.unstable_mask?_.unstable_mask.pathname:"/",!0);k!=="/"&&(ee.pathname=ee.pathname==="/"?k:yr([k,ee.pathname])),P=N.createHref(ee)}let[F,ne,I]=ZR(l,E),J=oT(g,{replace:c,unstable_mask:f,state:d,target:h,preventScrollReset:p,relative:o,viewTransition:b,unstable_defaultShouldRevalidate:w,unstable_useTransitions:j});function te(ee){n&&n(ee),ee.defaultPrevented||J(ee)}let ce=!(z.isExternal||s),le=v.createElement("a",{...E,...I,href:(ce?P:void 0)||z.absoluteURL||U,onClick:ce?te:n,ref:tT(C,ne),target:h,"data-discover":!M&&r==="render"?"true":void 0});return F&&!M?v.createElement(v.Fragment,null,le,v.createElement(WR,{page:U})):le});D1.displayName="Link";var iT=v.forwardRef(function({"aria-current":n="page",caseSensitive:r=!1,className:l="",end:o=!1,style:s,to:c,viewTransition:f,children:d,...h},g){let p=Ko(c,{relative:h.relative}),b=Sr(),w=v.useContext(bc),{navigator:E,basename:C}=v.useContext(Vn),k=w!=null&&dT(p)&&f===!0,N=E.encodeLocation?E.encodeLocation(p).pathname:p.pathname,j=b.pathname,M=w&&w.navigation&&w.navigation.location?w.navigation.location.pathname:null;r||(j=j.toLowerCase(),M=M?M.toLowerCase():null,N=N.toLowerCase()),M&&C&&(M=$r(M,C)||M);const z=N!=="/"&&N.endsWith("/")?N.length-1:N.length;let U=j===N||!o&&j.startsWith(N)&&j.charAt(z)==="/",_=M!=null&&(M===N||!o&&M.startsWith(N)&&M.charAt(N.length)==="/"),P={isActive:U,isPending:_,isTransitioning:k},F=U?n:void 0,ne;typeof l=="function"?ne=l(P):ne=[l,U?"active":null,_?"pending":null,k?"transitioning":null].filter(Boolean).join(" ");let I=typeof s=="function"?s(P):s;return v.createElement(D1,{...h,"aria-current":F,className:ne,ref:g,style:I,to:c,viewTransition:f},typeof d=="function"?d(P):d)});iT.displayName="NavLink";var lT=v.forwardRef(({discover:e="render",fetcherKey:n,navigate:r,reloadDocument:l,replace:o,state:s,method:c=qu,action:f,onSubmit:d,relative:h,preventScrollReset:g,viewTransition:p,unstable_defaultShouldRevalidate:b,...w},E)=>{let{unstable_useTransitions:C}=v.useContext(Vn),k=cT(),N=fT(f,{relative:h}),j=c.toLowerCase()==="get"?"get":"post",M=typeof f=="string"&&O1.test(f),z=U=>{if(d&&d(U),U.defaultPrevented)return;U.preventDefault();let _=U.nativeEvent.submitter,P=(_==null?void 0:_.getAttribute("formmethod"))||c,F=()=>k(_||U.currentTarget,{fetcherKey:n,method:P,navigate:r,replace:o,state:s,relative:h,preventScrollReset:g,viewTransition:p,unstable_defaultShouldRevalidate:b});C&&r!==!1?v.startTransition(()=>F()):F()};return v.createElement("form",{ref:E,method:j,action:N,onSubmit:l?d:z,...w,"data-discover":!M&&e==="render"?"true":void 0})});lT.displayName="Form";function aT(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function z1(e){let n=v.useContext(va);return ft(n,aT(e)),n}function oT(e,{target:n,replace:r,unstable_mask:l,state:o,preventScrollReset:s,relative:c,viewTransition:f,unstable_defaultShouldRevalidate:d,unstable_useTransitions:h}={}){let g=Hm(),p=Sr(),b=Ko(e,{relative:c});return v.useCallback(w=>{if(BR(w,n)){w.preventDefault();let E=r!==void 0?r:zo(p)===zo(b),C=()=>g(e,{replace:E,unstable_mask:l,state:o,preventScrollReset:s,relative:c,viewTransition:f,unstable_defaultShouldRevalidate:d});h?v.startTransition(()=>C()):C()}},[p,g,b,r,l,o,n,e,s,c,f,d,h])}var sT=0,uT=()=>`__${String(++sT)}__`;function cT(){let{router:e}=z1("useSubmit"),{basename:n}=v.useContext(Vn),r=RR(),l=e.fetch,o=e.navigate;return v.useCallback(async(s,c={})=>{let{action:f,method:d,encType:h,formData:g,body:p}=HR(s,n);if(c.navigate===!1){let b=c.fetcherKey||uT();await l(b,r,c.action||f,{unstable_defaultShouldRevalidate:c.unstable_defaultShouldRevalidate,preventScrollReset:c.preventScrollReset,formData:g,body:p,formMethod:c.method||d,formEncType:c.encType||h,flushSync:c.flushSync})}else await o(c.action||f,{unstable_defaultShouldRevalidate:c.unstable_defaultShouldRevalidate,preventScrollReset:c.preventScrollReset,formData:g,body:p,formMethod:c.method||d,formEncType:c.encType||h,replace:c.replace,state:c.state,fromRouteId:r,flushSync:c.flushSync,viewTransition:c.viewTransition})},[l,o,n,r])}function fT(e,{relative:n}={}){let{basename:r}=v.useContext(Vn),l=v.useContext(ar);ft(l,"useFormAction must be used inside a RouteContext");let[o]=l.matches.slice(-1),s={...Ko(e||".",{relative:n})},c=Sr();if(e==null){s.search=c.search;let f=new URLSearchParams(s.search),d=f.getAll("index");if(d.some(g=>g==="")){f.delete("index"),d.filter(p=>p).forEach(p=>f.append("index",p));let g=f.toString();s.search=g?`?${g}`:""}}return(!e||e===".")&&o.route.index&&(s.search=s.search?s.search.replace(/^\?/,"?index&"):"?index"),r!=="/"&&(s.pathname=s.pathname==="/"?r:yr([r,s.pathname])),zo(s)}function dT(e,{relative:n}={}){let r=v.useContext(C1);ft(r!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:l}=z1("useViewTransitionState"),o=Ko(e,{relative:n});if(!r.isTransitioning)return!1;let s=$r(r.currentLocation.pathname,l)||r.currentLocation.pathname,c=$r(r.nextLocation.pathname,l)||r.nextLocation.pathname;return Qu(o.pathname,c)!=null||Qu(o.pathname,s)!=null}var Ai=p1();const hT=vc(Ai);function L1(e){var n,r,l="";if(typeof e=="string"||typeof e=="number")l+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(n=0;n<o;n++)e[n]&&(r=L1(e[n]))&&(l&&(l+=" "),l+=r)}else for(r in e)e[r]&&(l&&(l+=" "),l+=r);return l}function P1(){for(var e,n,r=0,l="",o=arguments.length;r<o;r++)(e=arguments[r])&&(n=L1(e))&&(l&&(l+=" "),l+=n);return l}const fb=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,db=P1,mT=(e,n)=>r=>{var l;if((n==null?void 0:n.variants)==null)return db(e,r==null?void 0:r.class,r==null?void 0:r.className);const{variants:o,defaultVariants:s}=n,c=Object.keys(o).map(h=>{const g=r==null?void 0:r[h],p=s==null?void 0:s[h];if(g===null)return null;const b=fb(g)||fb(p);return o[h][b]}),f=r&&Object.entries(r).reduce((h,g)=>{let[p,b]=g;return b===void 0||(h[p]=b),h},{}),d=n==null||(l=n.compoundVariants)===null||l===void 0?void 0:l.reduce((h,g)=>{let{class:p,className:b,...w}=g;return Object.entries(w).every(E=>{let[C,k]=E;return Array.isArray(k)?k.includes({...s,...f}[C]):{...s,...f}[C]===k})?[...h,p,b]:h},[]);return db(e,c,d,r==null?void 0:r.class,r==null?void 0:r.className)},pT=(e,n)=>{const r=new Array(e.length+n.length);for(let l=0;l<e.length;l++)r[l]=e[l];for(let l=0;l<n.length;l++)r[e.length+l]=n[l];return r},gT=(e,n)=>({classGroupId:e,validator:n}),B1=(e=new Map,n=null,r)=>({nextPart:e,validators:n,classGroupId:r}),Zu="-",hb=[],yT="arbitrary..",xT=e=>{const n=bT(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:l}=e;return{getClassGroupId:c=>{if(c.startsWith("[")&&c.endsWith("]"))return vT(c);const f=c.split(Zu),d=f[0]===""&&f.length>1?1:0;return I1(f,d,n)},getConflictingClassGroupIds:(c,f)=>{if(f){const d=l[c],h=r[c];return d?h?pT(h,d):d:h||hb}return r[c]||hb}}},I1=(e,n,r)=>{if(e.length-n===0)return r.classGroupId;const o=e[n],s=r.nextPart.get(o);if(s){const h=I1(e,n+1,s);if(h)return h}const c=r.validators;if(c===null)return;const f=n===0?e.join(Zu):e.slice(n).join(Zu),d=c.length;for(let h=0;h<d;h++){const g=c[h];if(g.validator(f))return g.classGroupId}},vT=e=>e.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const n=e.slice(1,-1),r=n.indexOf(":"),l=n.slice(0,r);return l?yT+l:void 0})(),bT=e=>{const{theme:n,classGroups:r}=e;return wT(r,n)},wT=(e,n)=>{const r=B1();for(const l in e){const o=e[l];Ym(o,r,l,n)}return r},Ym=(e,n,r,l)=>{const o=e.length;for(let s=0;s<o;s++){const c=e[s];ST(c,n,r,l)}},ST=(e,n,r,l)=>{if(typeof e=="string"){CT(e,n,r);return}if(typeof e=="function"){ET(e,n,r,l);return}kT(e,n,r,l)},CT=(e,n,r)=>{const l=e===""?n:U1(n,e);l.classGroupId=r},ET=(e,n,r,l)=>{if(NT(e)){Ym(e(l),n,r,l);return}n.validators===null&&(n.validators=[]),n.validators.push(gT(r,e))},kT=(e,n,r,l)=>{const o=Object.entries(e),s=o.length;for(let c=0;c<s;c++){const[f,d]=o[c];Ym(d,U1(n,f),r,l)}},U1=(e,n)=>{let r=e;const l=n.split(Zu),o=l.length;for(let s=0;s<o;s++){const c=l[s];let f=r.nextPart.get(c);f||(f=B1(),r.nextPart.set(c,f)),r=f}return r},NT=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,RT=e=>{if(e<1)return{get:()=>{},set:()=>{}};let n=0,r=Object.create(null),l=Object.create(null);const o=(s,c)=>{r[s]=c,n++,n>e&&(n=0,l=r,r=Object.create(null))};return{get(s){let c=r[s];if(c!==void 0)return c;if((c=l[s])!==void 0)return o(s,c),c},set(s,c){s in r?r[s]=c:o(s,c)}}},am="!",mb=":",TT=[],pb=(e,n,r,l,o)=>({modifiers:e,hasImportantModifier:n,baseClassName:r,maybePostfixModifierPosition:l,isExternal:o}),AT=e=>{const{prefix:n,experimentalParseClassName:r}=e;let l=o=>{const s=[];let c=0,f=0,d=0,h;const g=o.length;for(let C=0;C<g;C++){const k=o[C];if(c===0&&f===0){if(k===mb){s.push(o.slice(d,C)),d=C+1;continue}if(k==="/"){h=C;continue}}k==="["?c++:k==="]"?c--:k==="("?f++:k===")"&&f--}const p=s.length===0?o:o.slice(d);let b=p,w=!1;p.endsWith(am)?(b=p.slice(0,-1),w=!0):p.startsWith(am)&&(b=p.slice(1),w=!0);const E=h&&h>d?h-d:void 0;return pb(s,w,b,E)};if(n){const o=n+mb,s=l;l=c=>c.startsWith(o)?s(c.slice(o.length)):pb(TT,!1,c,void 0,!0)}if(r){const o=l;l=s=>r({className:s,parseClassName:o})}return l},MT=e=>{const n=new Map;return e.orderSensitiveModifiers.forEach((r,l)=>{n.set(r,1e6+l)}),r=>{const l=[];let o=[];for(let s=0;s<r.length;s++){const c=r[s],f=c[0]==="[",d=n.has(c);f||d?(o.length>0&&(o.sort(),l.push(...o),o=[]),l.push(c)):o.push(c)}return o.length>0&&(o.sort(),l.push(...o)),l}},jT=e=>({cache:RT(e.cacheSize),parseClassName:AT(e),sortModifiers:MT(e),...xT(e)}),_T=/\s+/,OT=(e,n)=>{const{parseClassName:r,getClassGroupId:l,getConflictingClassGroupIds:o,sortModifiers:s}=n,c=[],f=e.trim().split(_T);let d="";for(let h=f.length-1;h>=0;h-=1){const g=f[h],{isExternal:p,modifiers:b,hasImportantModifier:w,baseClassName:E,maybePostfixModifierPosition:C}=r(g);if(p){d=g+(d.length>0?" "+d:d);continue}let k=!!C,N=l(k?E.substring(0,C):E);if(!N){if(!k){d=g+(d.length>0?" "+d:d);continue}if(N=l(E),!N){d=g+(d.length>0?" "+d:d);continue}k=!1}const j=b.length===0?"":b.length===1?b[0]:s(b).join(":"),M=w?j+am:j,z=M+N;if(c.indexOf(z)>-1)continue;c.push(z);const U=o(N,k);for(let _=0;_<U.length;++_){const P=U[_];c.push(M+P)}d=g+(d.length>0?" "+d:d)}return d},DT=(...e)=>{let n=0,r,l,o="";for(;n<e.length;)(r=e[n++])&&(l=H1(r))&&(o&&(o+=" "),o+=l);return o},H1=e=>{if(typeof e=="string")return e;let n,r="";for(let l=0;l<e.length;l++)e[l]&&(n=H1(e[l]))&&(r&&(r+=" "),r+=n);return r},zT=(e,...n)=>{let r,l,o,s;const c=d=>{const h=n.reduce((g,p)=>p(g),e());return r=jT(h),l=r.cache.get,o=r.cache.set,s=f,f(d)},f=d=>{const h=l(d);if(h)return h;const g=OT(d,r);return o(d,g),g};return s=c,(...d)=>s(DT(...d))},LT=[],At=e=>{const n=r=>r[e]||LT;return n.isThemeGetter=!0,n},F1=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,q1=/^\((?:(\w[\w-]*):)?(.+)\)$/i,PT=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,BT=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,IT=/\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$/,UT=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,HT=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,FT=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Ei=e=>PT.test(e),De=e=>!!e&&!Number.isNaN(Number(e)),ki=e=>!!e&&Number.isInteger(Number(e)),vh=e=>e.endsWith("%")&&De(e.slice(0,-1)),Vr=e=>BT.test(e),G1=()=>!0,qT=e=>IT.test(e)&&!UT.test(e),Xm=()=>!1,GT=e=>HT.test(e),VT=e=>FT.test(e),$T=e=>!xe(e)&&!ve(e),YT=e=>Di(e,Y1,Xm),xe=e=>F1.test(e),rl=e=>Di(e,X1,qT),gb=e=>Di(e,tA,De),XT=e=>Di(e,Q1,G1),KT=e=>Di(e,K1,Xm),yb=e=>Di(e,V1,Xm),QT=e=>Di(e,$1,VT),Cu=e=>Di(e,Z1,GT),ve=e=>q1.test(e),wo=e=>fl(e,X1),ZT=e=>fl(e,K1),xb=e=>fl(e,V1),WT=e=>fl(e,Y1),JT=e=>fl(e,$1),Eu=e=>fl(e,Z1,!0),eA=e=>fl(e,Q1,!0),Di=(e,n,r)=>{const l=F1.exec(e);return l?l[1]?n(l[1]):r(l[2]):!1},fl=(e,n,r=!1)=>{const l=q1.exec(e);return l?l[1]?n(l[1]):r:!1},V1=e=>e==="position"||e==="percentage",$1=e=>e==="image"||e==="url",Y1=e=>e==="length"||e==="size"||e==="bg-size",X1=e=>e==="length",tA=e=>e==="number",K1=e=>e==="family-name",Q1=e=>e==="number"||e==="weight",Z1=e=>e==="shadow",nA=()=>{const e=At("color"),n=At("font"),r=At("text"),l=At("font-weight"),o=At("tracking"),s=At("leading"),c=At("breakpoint"),f=At("container"),d=At("spacing"),h=At("radius"),g=At("shadow"),p=At("inset-shadow"),b=At("text-shadow"),w=At("drop-shadow"),E=At("blur"),C=At("perspective"),k=At("aspect"),N=At("ease"),j=At("animate"),M=()=>["auto","avoid","all","avoid-page","page","left","right","column"],z=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],U=()=>[...z(),ve,xe],_=()=>["auto","hidden","clip","visible","scroll"],P=()=>["auto","contain","none"],F=()=>[ve,xe,d],ne=()=>[Ei,"full","auto",...F()],I=()=>[ki,"none","subgrid",ve,xe],J=()=>["auto",{span:["full",ki,ve,xe]},ki,ve,xe],te=()=>[ki,"auto",ve,xe],ce=()=>["auto","min","max","fr",ve,xe],le=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],ee=()=>["start","end","center","stretch","center-safe","end-safe"],B=()=>["auto",...F()],X=()=>[Ei,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...F()],$=()=>[Ei,"screen","full","dvw","lvw","svw","min","max","fit",...F()],Q=()=>[Ei,"screen","full","lh","dvh","lvh","svh","min","max","fit",...F()],T=()=>[e,ve,xe],O=()=>[...z(),xb,yb,{position:[ve,xe]}],D=()=>["no-repeat",{repeat:["","x","y","space","round"]}],A=()=>["auto","cover","contain",WT,YT,{size:[ve,xe]}],Z=()=>[vh,wo,rl],fe=()=>["","none","full",h,ve,xe],ue=()=>["",De,wo,rl],me=()=>["solid","dashed","dotted","double"],Ne=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],he=()=>[De,vh,xb,yb],Ce=()=>["","none",E,ve,xe],lt=()=>["none",De,ve,xe],nt=()=>["none",De,ve,xe],st=()=>[De,ve,xe],Ye=()=>[Ei,"full",...F()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Vr],breakpoint:[Vr],color:[G1],container:[Vr],"drop-shadow":[Vr],ease:["in","out","in-out"],font:[$T],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Vr],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Vr],shadow:[Vr],spacing:["px",De],text:[Vr],"text-shadow":[Vr],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Ei,xe,ve,k]}],container:["container"],columns:[{columns:[De,xe,ve,f]}],"break-after":[{"break-after":M()}],"break-before":[{"break-before":M()}],"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:U()}],overflow:[{overflow:_()}],"overflow-x":[{"overflow-x":_()}],"overflow-y":[{"overflow-y":_()}],overscroll:[{overscroll:P()}],"overscroll-x":[{"overscroll-x":P()}],"overscroll-y":[{"overscroll-y":P()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:ne()}],"inset-x":[{"inset-x":ne()}],"inset-y":[{"inset-y":ne()}],start:[{"inset-s":ne(),start:ne()}],end:[{"inset-e":ne(),end:ne()}],"inset-bs":[{"inset-bs":ne()}],"inset-be":[{"inset-be":ne()}],top:[{top:ne()}],right:[{right:ne()}],bottom:[{bottom:ne()}],left:[{left:ne()}],visibility:["visible","invisible","collapse"],z:[{z:[ki,"auto",ve,xe]}],basis:[{basis:[Ei,"full","auto",f,...F()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[De,Ei,"auto","initial","none",xe]}],grow:[{grow:["",De,ve,xe]}],shrink:[{shrink:["",De,ve,xe]}],order:[{order:[ki,"first","last","none",ve,xe]}],"grid-cols":[{"grid-cols":I()}],"col-start-end":[{col:J()}],"col-start":[{"col-start":te()}],"col-end":[{"col-end":te()}],"grid-rows":[{"grid-rows":I()}],"row-start-end":[{row:J()}],"row-start":[{"row-start":te()}],"row-end":[{"row-end":te()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":ce()}],"auto-rows":[{"auto-rows":ce()}],gap:[{gap:F()}],"gap-x":[{"gap-x":F()}],"gap-y":[{"gap-y":F()}],"justify-content":[{justify:[...le(),"normal"]}],"justify-items":[{"justify-items":[...ee(),"normal"]}],"justify-self":[{"justify-self":["auto",...ee()]}],"align-content":[{content:["normal",...le()]}],"align-items":[{items:[...ee(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...ee(),{baseline:["","last"]}]}],"place-content":[{"place-content":le()}],"place-items":[{"place-items":[...ee(),"baseline"]}],"place-self":[{"place-self":["auto",...ee()]}],p:[{p:F()}],px:[{px:F()}],py:[{py:F()}],ps:[{ps:F()}],pe:[{pe:F()}],pbs:[{pbs:F()}],pbe:[{pbe:F()}],pt:[{pt:F()}],pr:[{pr:F()}],pb:[{pb:F()}],pl:[{pl:F()}],m:[{m:B()}],mx:[{mx:B()}],my:[{my:B()}],ms:[{ms:B()}],me:[{me:B()}],mbs:[{mbs:B()}],mbe:[{mbe:B()}],mt:[{mt:B()}],mr:[{mr:B()}],mb:[{mb:B()}],ml:[{ml:B()}],"space-x":[{"space-x":F()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":F()}],"space-y-reverse":["space-y-reverse"],size:[{size:X()}],"inline-size":[{inline:["auto",...$()]}],"min-inline-size":[{"min-inline":["auto",...$()]}],"max-inline-size":[{"max-inline":["none",...$()]}],"block-size":[{block:["auto",...Q()]}],"min-block-size":[{"min-block":["auto",...Q()]}],"max-block-size":[{"max-block":["none",...Q()]}],w:[{w:[f,"screen",...X()]}],"min-w":[{"min-w":[f,"screen","none",...X()]}],"max-w":[{"max-w":[f,"screen","none","prose",{screen:[c]},...X()]}],h:[{h:["screen","lh",...X()]}],"min-h":[{"min-h":["screen","lh","none",...X()]}],"max-h":[{"max-h":["screen","lh",...X()]}],"font-size":[{text:["base",r,wo,rl]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[l,eA,XT]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",vh,xe]}],"font-family":[{font:[ZT,KT,n]}],"font-features":[{"font-features":[xe]}],"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:[o,ve,xe]}],"line-clamp":[{"line-clamp":[De,"none",ve,gb]}],leading:[{leading:[s,...F()]}],"list-image":[{"list-image":["none",ve,xe]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",ve,xe]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:T()}],"text-color":[{text:T()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...me(),"wavy"]}],"text-decoration-thickness":[{decoration:[De,"from-font","auto",ve,rl]}],"text-decoration-color":[{decoration:T()}],"underline-offset":[{"underline-offset":[De,"auto",ve,xe]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:F()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",ve,xe]}],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",ve,xe]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:O()}],"bg-repeat":[{bg:D()}],"bg-size":[{bg:A()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},ki,ve,xe],radial:["",ve,xe],conic:[ki,ve,xe]},JT,QT]}],"bg-color":[{bg:T()}],"gradient-from-pos":[{from:Z()}],"gradient-via-pos":[{via:Z()}],"gradient-to-pos":[{to:Z()}],"gradient-from":[{from:T()}],"gradient-via":[{via:T()}],"gradient-to":[{to:T()}],rounded:[{rounded:fe()}],"rounded-s":[{"rounded-s":fe()}],"rounded-e":[{"rounded-e":fe()}],"rounded-t":[{"rounded-t":fe()}],"rounded-r":[{"rounded-r":fe()}],"rounded-b":[{"rounded-b":fe()}],"rounded-l":[{"rounded-l":fe()}],"rounded-ss":[{"rounded-ss":fe()}],"rounded-se":[{"rounded-se":fe()}],"rounded-ee":[{"rounded-ee":fe()}],"rounded-es":[{"rounded-es":fe()}],"rounded-tl":[{"rounded-tl":fe()}],"rounded-tr":[{"rounded-tr":fe()}],"rounded-br":[{"rounded-br":fe()}],"rounded-bl":[{"rounded-bl":fe()}],"border-w":[{border:ue()}],"border-w-x":[{"border-x":ue()}],"border-w-y":[{"border-y":ue()}],"border-w-s":[{"border-s":ue()}],"border-w-e":[{"border-e":ue()}],"border-w-bs":[{"border-bs":ue()}],"border-w-be":[{"border-be":ue()}],"border-w-t":[{"border-t":ue()}],"border-w-r":[{"border-r":ue()}],"border-w-b":[{"border-b":ue()}],"border-w-l":[{"border-l":ue()}],"divide-x":[{"divide-x":ue()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":ue()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...me(),"hidden","none"]}],"divide-style":[{divide:[...me(),"hidden","none"]}],"border-color":[{border:T()}],"border-color-x":[{"border-x":T()}],"border-color-y":[{"border-y":T()}],"border-color-s":[{"border-s":T()}],"border-color-e":[{"border-e":T()}],"border-color-bs":[{"border-bs":T()}],"border-color-be":[{"border-be":T()}],"border-color-t":[{"border-t":T()}],"border-color-r":[{"border-r":T()}],"border-color-b":[{"border-b":T()}],"border-color-l":[{"border-l":T()}],"divide-color":[{divide:T()}],"outline-style":[{outline:[...me(),"none","hidden"]}],"outline-offset":[{"outline-offset":[De,ve,xe]}],"outline-w":[{outline:["",De,wo,rl]}],"outline-color":[{outline:T()}],shadow:[{shadow:["","none",g,Eu,Cu]}],"shadow-color":[{shadow:T()}],"inset-shadow":[{"inset-shadow":["none",p,Eu,Cu]}],"inset-shadow-color":[{"inset-shadow":T()}],"ring-w":[{ring:ue()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:T()}],"ring-offset-w":[{"ring-offset":[De,rl]}],"ring-offset-color":[{"ring-offset":T()}],"inset-ring-w":[{"inset-ring":ue()}],"inset-ring-color":[{"inset-ring":T()}],"text-shadow":[{"text-shadow":["none",b,Eu,Cu]}],"text-shadow-color":[{"text-shadow":T()}],opacity:[{opacity:[De,ve,xe]}],"mix-blend":[{"mix-blend":[...Ne(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":Ne()}],"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":[De]}],"mask-image-linear-from-pos":[{"mask-linear-from":he()}],"mask-image-linear-to-pos":[{"mask-linear-to":he()}],"mask-image-linear-from-color":[{"mask-linear-from":T()}],"mask-image-linear-to-color":[{"mask-linear-to":T()}],"mask-image-t-from-pos":[{"mask-t-from":he()}],"mask-image-t-to-pos":[{"mask-t-to":he()}],"mask-image-t-from-color":[{"mask-t-from":T()}],"mask-image-t-to-color":[{"mask-t-to":T()}],"mask-image-r-from-pos":[{"mask-r-from":he()}],"mask-image-r-to-pos":[{"mask-r-to":he()}],"mask-image-r-from-color":[{"mask-r-from":T()}],"mask-image-r-to-color":[{"mask-r-to":T()}],"mask-image-b-from-pos":[{"mask-b-from":he()}],"mask-image-b-to-pos":[{"mask-b-to":he()}],"mask-image-b-from-color":[{"mask-b-from":T()}],"mask-image-b-to-color":[{"mask-b-to":T()}],"mask-image-l-from-pos":[{"mask-l-from":he()}],"mask-image-l-to-pos":[{"mask-l-to":he()}],"mask-image-l-from-color":[{"mask-l-from":T()}],"mask-image-l-to-color":[{"mask-l-to":T()}],"mask-image-x-from-pos":[{"mask-x-from":he()}],"mask-image-x-to-pos":[{"mask-x-to":he()}],"mask-image-x-from-color":[{"mask-x-from":T()}],"mask-image-x-to-color":[{"mask-x-to":T()}],"mask-image-y-from-pos":[{"mask-y-from":he()}],"mask-image-y-to-pos":[{"mask-y-to":he()}],"mask-image-y-from-color":[{"mask-y-from":T()}],"mask-image-y-to-color":[{"mask-y-to":T()}],"mask-image-radial":[{"mask-radial":[ve,xe]}],"mask-image-radial-from-pos":[{"mask-radial-from":he()}],"mask-image-radial-to-pos":[{"mask-radial-to":he()}],"mask-image-radial-from-color":[{"mask-radial-from":T()}],"mask-image-radial-to-color":[{"mask-radial-to":T()}],"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":z()}],"mask-image-conic-pos":[{"mask-conic":[De]}],"mask-image-conic-from-pos":[{"mask-conic-from":he()}],"mask-image-conic-to-pos":[{"mask-conic-to":he()}],"mask-image-conic-from-color":[{"mask-conic-from":T()}],"mask-image-conic-to-color":[{"mask-conic-to":T()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:O()}],"mask-repeat":[{mask:D()}],"mask-size":[{mask:A()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",ve,xe]}],filter:[{filter:["","none",ve,xe]}],blur:[{blur:Ce()}],brightness:[{brightness:[De,ve,xe]}],contrast:[{contrast:[De,ve,xe]}],"drop-shadow":[{"drop-shadow":["","none",w,Eu,Cu]}],"drop-shadow-color":[{"drop-shadow":T()}],grayscale:[{grayscale:["",De,ve,xe]}],"hue-rotate":[{"hue-rotate":[De,ve,xe]}],invert:[{invert:["",De,ve,xe]}],saturate:[{saturate:[De,ve,xe]}],sepia:[{sepia:["",De,ve,xe]}],"backdrop-filter":[{"backdrop-filter":["","none",ve,xe]}],"backdrop-blur":[{"backdrop-blur":Ce()}],"backdrop-brightness":[{"backdrop-brightness":[De,ve,xe]}],"backdrop-contrast":[{"backdrop-contrast":[De,ve,xe]}],"backdrop-grayscale":[{"backdrop-grayscale":["",De,ve,xe]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[De,ve,xe]}],"backdrop-invert":[{"backdrop-invert":["",De,ve,xe]}],"backdrop-opacity":[{"backdrop-opacity":[De,ve,xe]}],"backdrop-saturate":[{"backdrop-saturate":[De,ve,xe]}],"backdrop-sepia":[{"backdrop-sepia":["",De,ve,xe]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":F()}],"border-spacing-x":[{"border-spacing-x":F()}],"border-spacing-y":[{"border-spacing-y":F()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",ve,xe]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[De,"initial",ve,xe]}],ease:[{ease:["linear","initial",N,ve,xe]}],delay:[{delay:[De,ve,xe]}],animate:[{animate:["none",j,ve,xe]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[C,ve,xe]}],"perspective-origin":[{"perspective-origin":U()}],rotate:[{rotate:lt()}],"rotate-x":[{"rotate-x":lt()}],"rotate-y":[{"rotate-y":lt()}],"rotate-z":[{"rotate-z":lt()}],scale:[{scale:nt()}],"scale-x":[{"scale-x":nt()}],"scale-y":[{"scale-y":nt()}],"scale-z":[{"scale-z":nt()}],"scale-3d":["scale-3d"],skew:[{skew:st()}],"skew-x":[{"skew-x":st()}],"skew-y":[{"skew-y":st()}],transform:[{transform:[ve,xe,"","none","gpu","cpu"]}],"transform-origin":[{origin:U()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:Ye()}],"translate-x":[{"translate-x":Ye()}],"translate-y":[{"translate-y":Ye()}],"translate-z":[{"translate-z":Ye()}],"translate-none":["translate-none"],accent:[{accent:T()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:T()}],"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",ve,xe]}],"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":F()}],"scroll-mx":[{"scroll-mx":F()}],"scroll-my":[{"scroll-my":F()}],"scroll-ms":[{"scroll-ms":F()}],"scroll-me":[{"scroll-me":F()}],"scroll-mbs":[{"scroll-mbs":F()}],"scroll-mbe":[{"scroll-mbe":F()}],"scroll-mt":[{"scroll-mt":F()}],"scroll-mr":[{"scroll-mr":F()}],"scroll-mb":[{"scroll-mb":F()}],"scroll-ml":[{"scroll-ml":F()}],"scroll-p":[{"scroll-p":F()}],"scroll-px":[{"scroll-px":F()}],"scroll-py":[{"scroll-py":F()}],"scroll-ps":[{"scroll-ps":F()}],"scroll-pe":[{"scroll-pe":F()}],"scroll-pbs":[{"scroll-pbs":F()}],"scroll-pbe":[{"scroll-pbe":F()}],"scroll-pt":[{"scroll-pt":F()}],"scroll-pr":[{"scroll-pr":F()}],"scroll-pb":[{"scroll-pb":F()}],"scroll-pl":[{"scroll-pl":F()}],"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",ve,xe]}],fill:[{fill:["none",...T()]}],"stroke-w":[{stroke:[De,wo,rl,gb]}],stroke:[{stroke:["none",...T()]}],"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"]}},rA=zT(nA);function ye(...e){return rA(P1(e))}function vb(e){return e.startsWith("chatId:")?e.slice(7):e}const iA=mT("touch-manipulation inline-flex items-center justify-center whitespace-nowrap cursor-pointer rounded-md text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none",{variants:{variant:{default:"bg-primary text-primary-foreground disabled:bg-primary/50 disabled:text-primary-foreground/90 hover:bg-primary/90",juicy:"bg-logo text-primary-foreground disabled:text-primary-foreground/50 hover:bg-logo/90",destructive:"bg-destructive/80 dark:text-white",outline:"border disabled:bg-transparent disabled:text-foreground/50 border-inpu disabled:border-input/90 bg-card hover:bg-muted hover:text-accent-foreground",secondary:"bg-transparent border border-border text-secondary-foreground hover:text-secondary-foreground/60 disabled:text-secondary-foreground/50",ghost:"hover:bg-accent dark:hover:bg-card hover:text-accent-foreground text-muted-foreground disabled:text-muted-foreground/50 border border-border/0 hover:border-border",link:"text-primary disabled:text-primary/50 underline-offset-4 hover:underline",none:""},size:{default:"h-10 px-4 rounded-full py-2",sm:"h-9 rounded-full px-3",lg:"h-11 rounded-full px-8",icon:"h-10 w-10 rounded-lg","icon-sm":"h-5.5 w-5.5 rounded-lg"}},defaultVariants:{variant:"default",size:"default"}}),$e=v.forwardRef(({className:e,variant:n,size:r,...l},o)=>x.jsx("button",{className:ye(iA({variant:n,size:r,className:e})),ref:o,...l}));$e.displayName="Button";function Te(e,n,{checkForDefaultPrevented:r=!0}={}){return function(o){if(e==null||e(o),r===!1||!o.defaultPrevented)return n==null?void 0:n(o)}}function bb(e,n){if(typeof e=="function")return e(n);e!=null&&(e.current=n)}function Km(...e){return n=>{let r=!1;const l=e.map(o=>{const s=bb(o,n);return!r&&typeof s=="function"&&(r=!0),s});if(r)return()=>{for(let o=0;o<l.length;o++){const s=l[o];typeof s=="function"?s():bb(e[o],null)}}}}function bt(...e){return v.useCallback(Km(...e),e)}function lA(e,n){const r=v.createContext(n),l=s=>{const{children:c,...f}=s,d=v.useMemo(()=>f,Object.values(f));return x.jsx(r.Provider,{value:d,children:c})};l.displayName=e+"Provider";function o(s){const c=v.useContext(r);if(c)return c;if(n!==void 0)return n;throw new Error(`\`${s}\` must be used within \`${e}\``)}return[l,o]}function zi(e,n=[]){let r=[];function l(s,c){const f=v.createContext(c),d=r.length;r=[...r,c];const h=p=>{var N;const{scope:b,children:w,...E}=p,C=((N=b==null?void 0:b[e])==null?void 0:N[d])||f,k=v.useMemo(()=>E,Object.values(E));return x.jsx(C.Provider,{value:k,children:w})};h.displayName=s+"Provider";function g(p,b){var C;const w=((C=b==null?void 0:b[e])==null?void 0:C[d])||f,E=v.useContext(w);if(E)return E;if(c!==void 0)return c;throw new Error(`\`${p}\` must be used within \`${s}\``)}return[h,g]}const o=()=>{const s=r.map(c=>v.createContext(c));return function(f){const d=(f==null?void 0:f[e])||s;return v.useMemo(()=>({[`__scope${e}`]:{...f,[e]:d}}),[f,d])}};return o.scopeName=e,[l,aA(o,...n)]}function aA(...e){const n=e[0];if(e.length===1)return n;const r=()=>{const l=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(s){const c=l.reduce((f,{useScope:d,scopeName:h})=>{const p=d(s)[`__scope${h}`];return{...f,...p}},{});return v.useMemo(()=>({[`__scope${n.scopeName}`]:c}),[c])}};return r.scopeName=n.scopeName,r}var Mi=globalThis!=null&&globalThis.document?v.useLayoutEffect:()=>{},oA=m1[" useId ".trim().toString()]||(()=>{}),sA=0;function sa(e){const[n,r]=v.useState(oA());return Mi(()=>{r(l=>l??String(sA++))},[e]),n?`radix-${n}`:""}var uA=m1[" useInsertionEffect ".trim().toString()]||Mi;function Sc({prop:e,defaultProp:n,onChange:r=()=>{},caller:l}){const[o,s,c]=cA({defaultProp:n,onChange:r}),f=e!==void 0,d=f?e:o;{const g=v.useRef(e!==void 0);v.useEffect(()=>{const p=g.current;p!==f&&console.warn(`${l} is changing from ${p?"controlled":"uncontrolled"} to ${f?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),g.current=f},[f,l])}const h=v.useCallback(g=>{var p;if(f){const b=fA(g)?g(e):g;b!==e&&((p=c.current)==null||p.call(c,b))}else s(g)},[f,e,s,c]);return[d,h]}function cA({defaultProp:e,onChange:n}){const[r,l]=v.useState(e),o=v.useRef(r),s=v.useRef(n);return uA(()=>{s.current=n},[n]),v.useEffect(()=>{var c;o.current!==r&&((c=s.current)==null||c.call(s,r),o.current=r)},[r,o]),[r,l,s]}function fA(e){return typeof e=="function"}function ha(e){const n=dA(e),r=v.forwardRef((l,o)=>{const{children:s,...c}=l,f=v.Children.toArray(s),d=f.find(mA);if(d){const h=d.props.children,g=f.map(p=>p===d?v.Children.count(h)>1?v.Children.only(null):v.isValidElement(h)?h.props.children:null:p);return x.jsx(n,{...c,ref:o,children:v.isValidElement(h)?v.cloneElement(h,void 0,g):null})}return x.jsx(n,{...c,ref:o,children:s})});return r.displayName=`${e}.Slot`,r}function dA(e){const n=v.forwardRef((r,l)=>{const{children:o,...s}=r;if(v.isValidElement(o)){const c=gA(o),f=pA(s,o.props);return o.type!==v.Fragment&&(f.ref=l?Km(l,c):c),v.cloneElement(o,f)}return v.Children.count(o)>1?v.Children.only(null):null});return n.displayName=`${e}.SlotClone`,n}var W1=Symbol("radix.slottable");function hA(e){const n=({children:r})=>x.jsx(x.Fragment,{children:r});return n.displayName=`${e}.Slottable`,n.__radixId=W1,n}function mA(e){return v.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===W1}function pA(e,n){const r={...n};for(const l in n){const o=e[l],s=n[l];/^on[A-Z]/.test(l)?o&&s?r[l]=(...f)=>{const d=s(...f);return o(...f),d}:o&&(r[l]=o):l==="style"?r[l]={...o,...s}:l==="className"&&(r[l]=[o,s].filter(Boolean).join(" "))}return{...e,...r}}function gA(e){var l,o;let n=(l=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:l.get,r=n&&"isReactWarning"in n&&n.isReactWarning;return r?e.ref:(n=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,r=n&&"isReactWarning"in n&&n.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var yA=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],ct=yA.reduce((e,n)=>{const r=ha(`Primitive.${n}`),l=v.forwardRef((o,s)=>{const{asChild:c,...f}=o,d=c?r:n;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),x.jsx(d,{...f,ref:s})});return l.displayName=`Primitive.${n}`,{...e,[n]:l}},{});function J1(e,n){e&&Ai.flushSync(()=>e.dispatchEvent(n))}function br(e){const n=v.useRef(e);return v.useEffect(()=>{n.current=e}),v.useMemo(()=>(...r)=>{var l;return(l=n.current)==null?void 0:l.call(n,...r)},[])}function xA(e,n=globalThis==null?void 0:globalThis.document){const r=br(e);v.useEffect(()=>{const l=o=>{o.key==="Escape"&&r(o)};return n.addEventListener("keydown",l,{capture:!0}),()=>n.removeEventListener("keydown",l,{capture:!0})},[r,n])}var vA="DismissableLayer",om="dismissableLayer.update",bA="dismissableLayer.pointerDownOutside",wA="dismissableLayer.focusOutside",wb,ew=v.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Qo=v.forwardRef((e,n)=>{const{disableOutsidePointerEvents:r=!1,onEscapeKeyDown:l,onPointerDownOutside:o,onFocusOutside:s,onInteractOutside:c,onDismiss:f,...d}=e,h=v.useContext(ew),[g,p]=v.useState(null),b=(g==null?void 0:g.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,w]=v.useState({}),E=bt(n,P=>p(P)),C=Array.from(h.layers),[k]=[...h.layersWithOutsidePointerEventsDisabled].slice(-1),N=C.indexOf(k),j=g?C.indexOf(g):-1,M=h.layersWithOutsidePointerEventsDisabled.size>0,z=j>=N,U=EA(P=>{const F=P.target,ne=[...h.branches].some(I=>I.contains(F));!z||ne||(o==null||o(P),c==null||c(P),P.defaultPrevented||f==null||f())},b),_=kA(P=>{const F=P.target;[...h.branches].some(I=>I.contains(F))||(s==null||s(P),c==null||c(P),P.defaultPrevented||f==null||f())},b);return xA(P=>{j===h.layers.size-1&&(l==null||l(P),!P.defaultPrevented&&f&&(P.preventDefault(),f()))},b),v.useEffect(()=>{if(g)return r&&(h.layersWithOutsidePointerEventsDisabled.size===0&&(wb=b.body.style.pointerEvents,b.body.style.pointerEvents="none"),h.layersWithOutsidePointerEventsDisabled.add(g)),h.layers.add(g),Sb(),()=>{r&&h.layersWithOutsidePointerEventsDisabled.size===1&&(b.body.style.pointerEvents=wb)}},[g,b,r,h]),v.useEffect(()=>()=>{g&&(h.layers.delete(g),h.layersWithOutsidePointerEventsDisabled.delete(g),Sb())},[g,h]),v.useEffect(()=>{const P=()=>w({});return document.addEventListener(om,P),()=>document.removeEventListener(om,P)},[]),x.jsx(ct.div,{...d,ref:E,style:{pointerEvents:M?z?"auto":"none":void 0,...e.style},onFocusCapture:Te(e.onFocusCapture,_.onFocusCapture),onBlurCapture:Te(e.onBlurCapture,_.onBlurCapture),onPointerDownCapture:Te(e.onPointerDownCapture,U.onPointerDownCapture)})});Qo.displayName=vA;var SA="DismissableLayerBranch",CA=v.forwardRef((e,n)=>{const r=v.useContext(ew),l=v.useRef(null),o=bt(n,l);return v.useEffect(()=>{const s=l.current;if(s)return r.branches.add(s),()=>{r.branches.delete(s)}},[r.branches]),x.jsx(ct.div,{...e,ref:o})});CA.displayName=SA;function EA(e,n=globalThis==null?void 0:globalThis.document){const r=br(e),l=v.useRef(!1),o=v.useRef(()=>{});return v.useEffect(()=>{const s=f=>{if(f.target&&!l.current){let d=function(){tw(bA,r,h,{discrete:!0})};const h={originalEvent:f};f.pointerType==="touch"?(n.removeEventListener("click",o.current),o.current=d,n.addEventListener("click",o.current,{once:!0})):d()}else n.removeEventListener("click",o.current);l.current=!1},c=window.setTimeout(()=>{n.addEventListener("pointerdown",s)},0);return()=>{window.clearTimeout(c),n.removeEventListener("pointerdown",s),n.removeEventListener("click",o.current)}},[n,r]),{onPointerDownCapture:()=>l.current=!0}}function kA(e,n=globalThis==null?void 0:globalThis.document){const r=br(e),l=v.useRef(!1);return v.useEffect(()=>{const o=s=>{s.target&&!l.current&&tw(wA,r,{originalEvent:s},{discrete:!1})};return n.addEventListener("focusin",o),()=>n.removeEventListener("focusin",o)},[n,r]),{onFocusCapture:()=>l.current=!0,onBlurCapture:()=>l.current=!1}}function Sb(){const e=new CustomEvent(om);document.dispatchEvent(e)}function tw(e,n,r,{discrete:l}){const o=r.originalEvent.target,s=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:r});n&&o.addEventListener(e,n,{once:!0}),l?J1(o,s):o.dispatchEvent(s)}var bh="focusScope.autoFocusOnMount",wh="focusScope.autoFocusOnUnmount",Cb={bubbles:!1,cancelable:!0},NA="FocusScope",Cc=v.forwardRef((e,n)=>{const{loop:r=!1,trapped:l=!1,onMountAutoFocus:o,onUnmountAutoFocus:s,...c}=e,[f,d]=v.useState(null),h=br(o),g=br(s),p=v.useRef(null),b=bt(n,C=>d(C)),w=v.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;v.useEffect(()=>{if(l){let C=function(M){if(w.paused||!f)return;const z=M.target;f.contains(z)?p.current=z:Ri(p.current,{select:!0})},k=function(M){if(w.paused||!f)return;const z=M.relatedTarget;z!==null&&(f.contains(z)||Ri(p.current,{select:!0}))},N=function(M){if(document.activeElement===document.body)for(const U of M)U.removedNodes.length>0&&Ri(f)};document.addEventListener("focusin",C),document.addEventListener("focusout",k);const j=new MutationObserver(N);return f&&j.observe(f,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",C),document.removeEventListener("focusout",k),j.disconnect()}}},[l,f,w.paused]),v.useEffect(()=>{if(f){kb.add(w);const C=document.activeElement;if(!f.contains(C)){const N=new CustomEvent(bh,Cb);f.addEventListener(bh,h),f.dispatchEvent(N),N.defaultPrevented||(RA(_A(nw(f)),{select:!0}),document.activeElement===C&&Ri(f))}return()=>{f.removeEventListener(bh,h),setTimeout(()=>{const N=new CustomEvent(wh,Cb);f.addEventListener(wh,g),f.dispatchEvent(N),N.defaultPrevented||Ri(C??document.body,{select:!0}),f.removeEventListener(wh,g),kb.remove(w)},0)}}},[f,h,g,w]);const E=v.useCallback(C=>{if(!r&&!l||w.paused)return;const k=C.key==="Tab"&&!C.altKey&&!C.ctrlKey&&!C.metaKey,N=document.activeElement;if(k&&N){const j=C.currentTarget,[M,z]=TA(j);M&&z?!C.shiftKey&&N===z?(C.preventDefault(),r&&Ri(M,{select:!0})):C.shiftKey&&N===M&&(C.preventDefault(),r&&Ri(z,{select:!0})):N===j&&C.preventDefault()}},[r,l,w.paused]);return x.jsx(ct.div,{tabIndex:-1,...c,ref:b,onKeyDown:E})});Cc.displayName=NA;function RA(e,{select:n=!1}={}){const r=document.activeElement;for(const l of e)if(Ri(l,{select:n}),document.activeElement!==r)return}function TA(e){const n=nw(e),r=Eb(n,e),l=Eb(n.reverse(),e);return[r,l]}function nw(e){const n=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:l=>{const o=l.tagName==="INPUT"&&l.type==="hidden";return l.disabled||l.hidden||o?NodeFilter.FILTER_SKIP:l.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)n.push(r.currentNode);return n}function Eb(e,n){for(const r of e)if(!AA(r,{upTo:n}))return r}function AA(e,{upTo:n}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(n!==void 0&&e===n)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function MA(e){return e instanceof HTMLInputElement&&"select"in e}function Ri(e,{select:n=!1}={}){if(e&&e.focus){const r=document.activeElement;e.focus({preventScroll:!0}),e!==r&&MA(e)&&n&&e.select()}}var kb=jA();function jA(){let e=[];return{add(n){const r=e[0];n!==r&&(r==null||r.pause()),e=Nb(e,n),e.unshift(n)},remove(n){var r;e=Nb(e,n),(r=e[0])==null||r.resume()}}}function Nb(e,n){const r=[...e],l=r.indexOf(n);return l!==-1&&r.splice(l,1),r}function _A(e){return e.filter(n=>n.tagName!=="A")}var OA="Portal",Zo=v.forwardRef((e,n)=>{var f;const{container:r,...l}=e,[o,s]=v.useState(!1);Mi(()=>s(!0),[]);const c=r||o&&((f=globalThis==null?void 0:globalThis.document)==null?void 0:f.body);return c?hT.createPortal(x.jsx(ct.div,{...l,ref:n}),c):null});Zo.displayName=OA;function DA(e,n){return v.useReducer((r,l)=>n[r][l]??r,e)}var $n=e=>{const{present:n,children:r}=e,l=zA(n),o=typeof r=="function"?r({present:l.isPresent}):v.Children.only(r),s=bt(l.ref,LA(o));return typeof r=="function"||l.isPresent?v.cloneElement(o,{ref:s}):null};$n.displayName="Presence";function zA(e){const[n,r]=v.useState(),l=v.useRef(null),o=v.useRef(e),s=v.useRef("none"),c=e?"mounted":"unmounted",[f,d]=DA(c,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return v.useEffect(()=>{const h=ku(l.current);s.current=f==="mounted"?h:"none"},[f]),Mi(()=>{const h=l.current,g=o.current;if(g!==e){const b=s.current,w=ku(h);e?d("MOUNT"):w==="none"||(h==null?void 0:h.display)==="none"?d("UNMOUNT"):d(g&&b!==w?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,d]),Mi(()=>{if(n){let h;const g=n.ownerDocument.defaultView??window,p=w=>{const C=ku(l.current).includes(CSS.escape(w.animationName));if(w.target===n&&C&&(d("ANIMATION_END"),!o.current)){const k=n.style.animationFillMode;n.style.animationFillMode="forwards",h=g.setTimeout(()=>{n.style.animationFillMode==="forwards"&&(n.style.animationFillMode=k)})}},b=w=>{w.target===n&&(s.current=ku(l.current))};return n.addEventListener("animationstart",b),n.addEventListener("animationcancel",p),n.addEventListener("animationend",p),()=>{g.clearTimeout(h),n.removeEventListener("animationstart",b),n.removeEventListener("animationcancel",p),n.removeEventListener("animationend",p)}}else d("ANIMATION_END")},[n,d]),{isPresent:["mounted","unmountSuspended"].includes(f),ref:v.useCallback(h=>{l.current=h?getComputedStyle(h):null,r(h)},[])}}function ku(e){return(e==null?void 0:e.animationName)||"none"}function LA(e){var l,o;let n=(l=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:l.get,r=n&&"isReactWarning"in n&&n.isReactWarning;return r?e.ref:(n=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,r=n&&"isReactWarning"in n&&n.isReactWarning,r?e.props.ref:e.props.ref||e.ref)}var Sh=0;function Qm(){v.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??Rb()),document.body.insertAdjacentElement("beforeend",e[1]??Rb()),Sh++,()=>{Sh===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(n=>n.remove()),Sh--}},[])}function Rb(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var pr=function(){return pr=Object.assign||function(n){for(var r,l=1,o=arguments.length;l<o;l++){r=arguments[l];for(var s in r)Object.prototype.hasOwnProperty.call(r,s)&&(n[s]=r[s])}return n},pr.apply(this,arguments)};function rw(e,n){var r={};for(var l in e)Object.prototype.hasOwnProperty.call(e,l)&&n.indexOf(l)<0&&(r[l]=e[l]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,l=Object.getOwnPropertySymbols(e);o<l.length;o++)n.indexOf(l[o])<0&&Object.prototype.propertyIsEnumerable.call(e,l[o])&&(r[l[o]]=e[l[o]]);return r}function PA(e,n,r){if(r||arguments.length===2)for(var l=0,o=n.length,s;l<o;l++)(s||!(l in n))&&(s||(s=Array.prototype.slice.call(n,0,l)),s[l]=n[l]);return e.concat(s||Array.prototype.slice.call(n))}var Vu="right-scroll-bar-position",$u="width-before-scroll-bar",BA="with-scroll-bars-hidden",IA="--removed-body-scroll-bar-size";function Ch(e,n){return typeof e=="function"?e(n):e&&(e.current=n),e}function UA(e,n){var r=v.useState(function(){return{value:e,callback:n,facade:{get current(){return r.value},set current(l){var o=r.value;o!==l&&(r.value=l,r.callback(l,o))}}}})[0];return r.callback=n,r.facade}var HA=typeof window<"u"?v.useLayoutEffect:v.useEffect,Tb=new WeakMap;function FA(e,n){var r=UA(null,function(l){return e.forEach(function(o){return Ch(o,l)})});return HA(function(){var l=Tb.get(r);if(l){var o=new Set(l),s=new Set(e),c=r.current;o.forEach(function(f){s.has(f)||Ch(f,null)}),s.forEach(function(f){o.has(f)||Ch(f,c)})}Tb.set(r,e)},[e]),r}function qA(e){return e}function GA(e,n){n===void 0&&(n=qA);var r=[],l=!1,o={read:function(){if(l)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return r.length?r[r.length-1]:e},useMedium:function(s){var c=n(s,l);return r.push(c),function(){r=r.filter(function(f){return f!==c})}},assignSyncMedium:function(s){for(l=!0;r.length;){var c=r;r=[],c.forEach(s)}r={push:function(f){return s(f)},filter:function(){return r}}},assignMedium:function(s){l=!0;var c=[];if(r.length){var f=r;r=[],f.forEach(s),c=r}var d=function(){var g=c;c=[],g.forEach(s)},h=function(){return Promise.resolve().then(d)};h(),r={push:function(g){c.push(g),h()},filter:function(g){return c=c.filter(g),r}}}};return o}function VA(e){e===void 0&&(e={});var n=GA(null);return n.options=pr({async:!0,ssr:!1},e),n}var iw=function(e){var n=e.sideCar,r=rw(e,["sideCar"]);if(!n)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var l=n.read();if(!l)throw new Error("Sidecar medium not found");return v.createElement(l,pr({},r))};iw.isSideCarExport=!0;function $A(e,n){return e.useMedium(n),iw}var lw=VA(),Eh=function(){},Ec=v.forwardRef(function(e,n){var r=v.useRef(null),l=v.useState({onScrollCapture:Eh,onWheelCapture:Eh,onTouchMoveCapture:Eh}),o=l[0],s=l[1],c=e.forwardProps,f=e.children,d=e.className,h=e.removeScrollBar,g=e.enabled,p=e.shards,b=e.sideCar,w=e.noRelative,E=e.noIsolation,C=e.inert,k=e.allowPinchZoom,N=e.as,j=N===void 0?"div":N,M=e.gapMode,z=rw(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),U=b,_=FA([r,n]),P=pr(pr({},z),o);return v.createElement(v.Fragment,null,g&&v.createElement(U,{sideCar:lw,removeScrollBar:h,shards:p,noRelative:w,noIsolation:E,inert:C,setCallbacks:s,allowPinchZoom:!!k,lockRef:r,gapMode:M}),c?v.cloneElement(v.Children.only(f),pr(pr({},P),{ref:_})):v.createElement(j,pr({},P,{className:d,ref:_}),f))});Ec.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};Ec.classNames={fullWidth:$u,zeroRight:Vu};var YA=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function XA(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var n=YA();return n&&e.setAttribute("nonce",n),e}function KA(e,n){e.styleSheet?e.styleSheet.cssText=n:e.appendChild(document.createTextNode(n))}function QA(e){var n=document.head||document.getElementsByTagName("head")[0];n.appendChild(e)}var ZA=function(){var e=0,n=null;return{add:function(r){e==0&&(n=XA())&&(KA(n,r),QA(n)),e++},remove:function(){e--,!e&&n&&(n.parentNode&&n.parentNode.removeChild(n),n=null)}}},WA=function(){var e=ZA();return function(n,r){v.useEffect(function(){return e.add(n),function(){e.remove()}},[n&&r])}},aw=function(){var e=WA(),n=function(r){var l=r.styles,o=r.dynamic;return e(l,o),null};return n},JA={left:0,top:0,right:0,gap:0},kh=function(e){return parseInt(e||"",10)||0},eM=function(e){var n=window.getComputedStyle(document.body),r=n[e==="padding"?"paddingLeft":"marginLeft"],l=n[e==="padding"?"paddingTop":"marginTop"],o=n[e==="padding"?"paddingRight":"marginRight"];return[kh(r),kh(l),kh(o)]},tM=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return JA;var n=eM(e),r=document.documentElement.clientWidth,l=window.innerWidth;return{left:n[0],top:n[1],right:n[2],gap:Math.max(0,l-r+n[2]-n[0])}},nM=aw(),ua="data-scroll-locked",rM=function(e,n,r,l){var o=e.left,s=e.top,c=e.right,f=e.gap;return r===void 0&&(r="margin"),`
61
+ .`.concat(BA,` {
62
+ overflow: hidden `).concat(l,`;
63
+ padding-right: `).concat(f,"px ").concat(l,`;
64
+ }
65
+ body[`).concat(ua,`] {
66
+ overflow: hidden `).concat(l,`;
67
+ overscroll-behavior: contain;
68
+ `).concat([n&&"position: relative ".concat(l,";"),r==="margin"&&`
69
+ padding-left: `.concat(o,`px;
70
+ padding-top: `).concat(s,`px;
71
+ padding-right: `).concat(c,`px;
72
+ margin-left:0;
73
+ margin-top:0;
74
+ margin-right: `).concat(f,"px ").concat(l,`;
75
+ `),r==="padding"&&"padding-right: ".concat(f,"px ").concat(l,";")].filter(Boolean).join(""),`
76
+ }
77
+
78
+ .`).concat(Vu,` {
79
+ right: `).concat(f,"px ").concat(l,`;
80
+ }
81
+
82
+ .`).concat($u,` {
83
+ margin-right: `).concat(f,"px ").concat(l,`;
84
+ }
85
+
86
+ .`).concat(Vu," .").concat(Vu,` {
87
+ right: 0 `).concat(l,`;
88
+ }
89
+
90
+ .`).concat($u," .").concat($u,` {
91
+ margin-right: 0 `).concat(l,`;
92
+ }
93
+
94
+ body[`).concat(ua,`] {
95
+ `).concat(IA,": ").concat(f,`px;
96
+ }
97
+ `)},Ab=function(){var e=parseInt(document.body.getAttribute(ua)||"0",10);return isFinite(e)?e:0},iM=function(){v.useEffect(function(){return document.body.setAttribute(ua,(Ab()+1).toString()),function(){var e=Ab()-1;e<=0?document.body.removeAttribute(ua):document.body.setAttribute(ua,e.toString())}},[])},lM=function(e){var n=e.noRelative,r=e.noImportant,l=e.gapMode,o=l===void 0?"margin":l;iM();var s=v.useMemo(function(){return tM(o)},[o]);return v.createElement(nM,{styles:rM(s,!n,o,r?"":"!important")})},sm=!1;if(typeof window<"u")try{var Nu=Object.defineProperty({},"passive",{get:function(){return sm=!0,!0}});window.addEventListener("test",Nu,Nu),window.removeEventListener("test",Nu,Nu)}catch{sm=!1}var ta=sm?{passive:!1}:!1,aM=function(e){return e.tagName==="TEXTAREA"},ow=function(e,n){if(!(e instanceof Element))return!1;var r=window.getComputedStyle(e);return r[n]!=="hidden"&&!(r.overflowY===r.overflowX&&!aM(e)&&r[n]==="visible")},oM=function(e){return ow(e,"overflowY")},sM=function(e){return ow(e,"overflowX")},Mb=function(e,n){var r=n.ownerDocument,l=n;do{typeof ShadowRoot<"u"&&l instanceof ShadowRoot&&(l=l.host);var o=sw(e,l);if(o){var s=uw(e,l),c=s[1],f=s[2];if(c>f)return!0}l=l.parentNode}while(l&&l!==r.body);return!1},uM=function(e){var n=e.scrollTop,r=e.scrollHeight,l=e.clientHeight;return[n,r,l]},cM=function(e){var n=e.scrollLeft,r=e.scrollWidth,l=e.clientWidth;return[n,r,l]},sw=function(e,n){return e==="v"?oM(n):sM(n)},uw=function(e,n){return e==="v"?uM(n):cM(n)},fM=function(e,n){return e==="h"&&n==="rtl"?-1:1},dM=function(e,n,r,l,o){var s=fM(e,window.getComputedStyle(n).direction),c=s*l,f=r.target,d=n.contains(f),h=!1,g=c>0,p=0,b=0;do{if(!f)break;var w=uw(e,f),E=w[0],C=w[1],k=w[2],N=C-k-s*E;(E||N)&&sw(e,f)&&(p+=N,b+=E);var j=f.parentNode;f=j&&j.nodeType===Node.DOCUMENT_FRAGMENT_NODE?j.host:j}while(!d&&f!==document.body||d&&(n.contains(f)||n===f));return(g&&Math.abs(p)<1||!g&&Math.abs(b)<1)&&(h=!0),h},Ru=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},jb=function(e){return[e.deltaX,e.deltaY]},_b=function(e){return e&&"current"in e?e.current:e},hM=function(e,n){return e[0]===n[0]&&e[1]===n[1]},mM=function(e){return`
98
+ .block-interactivity-`.concat(e,` {pointer-events: none;}
99
+ .allow-interactivity-`).concat(e,` {pointer-events: all;}
100
+ `)},pM=0,na=[];function gM(e){var n=v.useRef([]),r=v.useRef([0,0]),l=v.useRef(),o=v.useState(pM++)[0],s=v.useState(aw)[0],c=v.useRef(e);v.useEffect(function(){c.current=e},[e]),v.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var C=PA([e.lockRef.current],(e.shards||[]).map(_b),!0).filter(Boolean);return C.forEach(function(k){return k.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),C.forEach(function(k){return k.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var f=v.useCallback(function(C,k){if("touches"in C&&C.touches.length===2||C.type==="wheel"&&C.ctrlKey)return!c.current.allowPinchZoom;var N=Ru(C),j=r.current,M="deltaX"in C?C.deltaX:j[0]-N[0],z="deltaY"in C?C.deltaY:j[1]-N[1],U,_=C.target,P=Math.abs(M)>Math.abs(z)?"h":"v";if("touches"in C&&P==="h"&&_.type==="range")return!1;var F=window.getSelection(),ne=F&&F.anchorNode,I=ne?ne===_||ne.contains(_):!1;if(I)return!1;var J=Mb(P,_);if(!J)return!0;if(J?U=P:(U=P==="v"?"h":"v",J=Mb(P,_)),!J)return!1;if(!l.current&&"changedTouches"in C&&(M||z)&&(l.current=U),!U)return!0;var te=l.current||U;return dM(te,k,C,te==="h"?M:z)},[]),d=v.useCallback(function(C){var k=C;if(!(!na.length||na[na.length-1]!==s)){var N="deltaY"in k?jb(k):Ru(k),j=n.current.filter(function(U){return U.name===k.type&&(U.target===k.target||k.target===U.shadowParent)&&hM(U.delta,N)})[0];if(j&&j.should){k.cancelable&&k.preventDefault();return}if(!j){var M=(c.current.shards||[]).map(_b).filter(Boolean).filter(function(U){return U.contains(k.target)}),z=M.length>0?f(k,M[0]):!c.current.noIsolation;z&&k.cancelable&&k.preventDefault()}}},[]),h=v.useCallback(function(C,k,N,j){var M={name:C,delta:k,target:N,should:j,shadowParent:yM(N)};n.current.push(M),setTimeout(function(){n.current=n.current.filter(function(z){return z!==M})},1)},[]),g=v.useCallback(function(C){r.current=Ru(C),l.current=void 0},[]),p=v.useCallback(function(C){h(C.type,jb(C),C.target,f(C,e.lockRef.current))},[]),b=v.useCallback(function(C){h(C.type,Ru(C),C.target,f(C,e.lockRef.current))},[]);v.useEffect(function(){return na.push(s),e.setCallbacks({onScrollCapture:p,onWheelCapture:p,onTouchMoveCapture:b}),document.addEventListener("wheel",d,ta),document.addEventListener("touchmove",d,ta),document.addEventListener("touchstart",g,ta),function(){na=na.filter(function(C){return C!==s}),document.removeEventListener("wheel",d,ta),document.removeEventListener("touchmove",d,ta),document.removeEventListener("touchstart",g,ta)}},[]);var w=e.removeScrollBar,E=e.inert;return v.createElement(v.Fragment,null,E?v.createElement(s,{styles:mM(o)}):null,w?v.createElement(lM,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function yM(e){for(var n=null;e!==null;)e instanceof ShadowRoot&&(n=e.host,e=e.host),e=e.parentNode;return n}const xM=$A(lw,gM);var kc=v.forwardRef(function(e,n){return v.createElement(Ec,pr({},e,{ref:n,sideCar:xM}))});kc.classNames=Ec.classNames;var vM=function(e){if(typeof document>"u")return null;var n=Array.isArray(e)?e[0]:e;return n.ownerDocument.body},ra=new WeakMap,Tu=new WeakMap,Au={},Nh=0,cw=function(e){return e&&(e.host||cw(e.parentNode))},bM=function(e,n){return n.map(function(r){if(e.contains(r))return r;var l=cw(r);return l&&e.contains(l)?l:(console.error("aria-hidden",r,"in not contained inside",e,". Doing nothing"),null)}).filter(function(r){return!!r})},wM=function(e,n,r,l){var o=bM(n,Array.isArray(e)?e:[e]);Au[r]||(Au[r]=new WeakMap);var s=Au[r],c=[],f=new Set,d=new Set(o),h=function(p){!p||f.has(p)||(f.add(p),h(p.parentNode))};o.forEach(h);var g=function(p){!p||d.has(p)||Array.prototype.forEach.call(p.children,function(b){if(f.has(b))g(b);else try{var w=b.getAttribute(l),E=w!==null&&w!=="false",C=(ra.get(b)||0)+1,k=(s.get(b)||0)+1;ra.set(b,C),s.set(b,k),c.push(b),C===1&&E&&Tu.set(b,!0),k===1&&b.setAttribute(r,"true"),E||b.setAttribute(l,"true")}catch(N){console.error("aria-hidden: cannot operate on ",b,N)}})};return g(n),f.clear(),Nh++,function(){c.forEach(function(p){var b=ra.get(p)-1,w=s.get(p)-1;ra.set(p,b),s.set(p,w),b||(Tu.has(p)||p.removeAttribute(l),Tu.delete(p)),w||p.removeAttribute(r)}),Nh--,Nh||(ra=new WeakMap,ra=new WeakMap,Tu=new WeakMap,Au={})}},Zm=function(e,n,r){r===void 0&&(r="data-aria-hidden");var l=Array.from(Array.isArray(e)?e:[e]),o=vM(e);return o?(l.push.apply(l,Array.from(o.querySelectorAll("[aria-live], script"))),wM(l,o,r,"aria-hidden")):function(){return null}},Nc="Dialog",[fw]=zi(Nc),[SM,or]=fw(Nc),dw=e=>{const{__scopeDialog:n,children:r,open:l,defaultOpen:o,onOpenChange:s,modal:c=!0}=e,f=v.useRef(null),d=v.useRef(null),[h,g]=Sc({prop:l,defaultProp:o??!1,onChange:s,caller:Nc});return x.jsx(SM,{scope:n,triggerRef:f,contentRef:d,contentId:sa(),titleId:sa(),descriptionId:sa(),open:h,onOpenChange:g,onOpenToggle:v.useCallback(()=>g(p=>!p),[g]),modal:c,children:r})};dw.displayName=Nc;var hw="DialogTrigger",CM=v.forwardRef((e,n)=>{const{__scopeDialog:r,...l}=e,o=or(hw,r),s=bt(n,o.triggerRef);return x.jsx(ct.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":ep(o.open),...l,ref:s,onClick:Te(e.onClick,o.onOpenToggle)})});CM.displayName=hw;var Wm="DialogPortal",[EM,mw]=fw(Wm,{forceMount:void 0}),pw=e=>{const{__scopeDialog:n,forceMount:r,children:l,container:o}=e,s=or(Wm,n);return x.jsx(EM,{scope:n,forceMount:r,children:v.Children.map(l,c=>x.jsx($n,{present:r||s.open,children:x.jsx(Zo,{asChild:!0,container:o,children:c})}))})};pw.displayName=Wm;var Wu="DialogOverlay",gw=v.forwardRef((e,n)=>{const r=mw(Wu,e.__scopeDialog),{forceMount:l=r.forceMount,...o}=e,s=or(Wu,e.__scopeDialog);return s.modal?x.jsx($n,{present:l||s.open,children:x.jsx(NM,{...o,ref:n})}):null});gw.displayName=Wu;var kM=ha("DialogOverlay.RemoveScroll"),NM=v.forwardRef((e,n)=>{const{__scopeDialog:r,...l}=e,o=or(Wu,r);return x.jsx(kc,{as:kM,allowPinchZoom:!0,shards:[o.contentRef],children:x.jsx(ct.div,{"data-state":ep(o.open),...l,ref:n,style:{pointerEvents:"auto",...l.style}})})}),ol="DialogContent",yw=v.forwardRef((e,n)=>{const r=mw(ol,e.__scopeDialog),{forceMount:l=r.forceMount,...o}=e,s=or(ol,e.__scopeDialog);return x.jsx($n,{present:l||s.open,children:s.modal?x.jsx(RM,{...o,ref:n}):x.jsx(TM,{...o,ref:n})})});yw.displayName=ol;var RM=v.forwardRef((e,n)=>{const r=or(ol,e.__scopeDialog),l=v.useRef(null),o=bt(n,r.contentRef,l);return v.useEffect(()=>{const s=l.current;if(s)return Zm(s)},[]),x.jsx(xw,{...e,ref:o,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Te(e.onCloseAutoFocus,s=>{var c;s.preventDefault(),(c=r.triggerRef.current)==null||c.focus()}),onPointerDownOutside:Te(e.onPointerDownOutside,s=>{const c=s.detail.originalEvent,f=c.button===0&&c.ctrlKey===!0;(c.button===2||f)&&s.preventDefault()}),onFocusOutside:Te(e.onFocusOutside,s=>s.preventDefault())})}),TM=v.forwardRef((e,n)=>{const r=or(ol,e.__scopeDialog),l=v.useRef(!1),o=v.useRef(!1);return x.jsx(xw,{...e,ref:n,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:s=>{var c,f;(c=e.onCloseAutoFocus)==null||c.call(e,s),s.defaultPrevented||(l.current||(f=r.triggerRef.current)==null||f.focus(),s.preventDefault()),l.current=!1,o.current=!1},onInteractOutside:s=>{var d,h;(d=e.onInteractOutside)==null||d.call(e,s),s.defaultPrevented||(l.current=!0,s.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const c=s.target;((h=r.triggerRef.current)==null?void 0:h.contains(c))&&s.preventDefault(),s.detail.originalEvent.type==="focusin"&&o.current&&s.preventDefault()}})}),xw=v.forwardRef((e,n)=>{const{__scopeDialog:r,trapFocus:l,onOpenAutoFocus:o,onCloseAutoFocus:s,...c}=e,f=or(ol,r),d=v.useRef(null),h=bt(n,d);return Qm(),x.jsxs(x.Fragment,{children:[x.jsx(Cc,{asChild:!0,loop:!0,trapped:l,onMountAutoFocus:o,onUnmountAutoFocus:s,children:x.jsx(Qo,{role:"dialog",id:f.contentId,"aria-describedby":f.descriptionId,"aria-labelledby":f.titleId,"data-state":ep(f.open),...c,ref:h,onDismiss:()=>f.onOpenChange(!1)})}),x.jsxs(x.Fragment,{children:[x.jsx(AM,{titleId:f.titleId}),x.jsx(jM,{contentRef:d,descriptionId:f.descriptionId})]})]})}),Jm="DialogTitle",vw=v.forwardRef((e,n)=>{const{__scopeDialog:r,...l}=e,o=or(Jm,r);return x.jsx(ct.h2,{id:o.titleId,...l,ref:n})});vw.displayName=Jm;var bw="DialogDescription",ww=v.forwardRef((e,n)=>{const{__scopeDialog:r,...l}=e,o=or(bw,r);return x.jsx(ct.p,{id:o.descriptionId,...l,ref:n})});ww.displayName=bw;var Sw="DialogClose",Cw=v.forwardRef((e,n)=>{const{__scopeDialog:r,...l}=e,o=or(Sw,r);return x.jsx(ct.button,{type:"button",...l,ref:n,onClick:Te(e.onClick,()=>o.onOpenChange(!1))})});Cw.displayName=Sw;function ep(e){return e?"open":"closed"}var Ew="DialogTitleWarning",[eI,kw]=lA(Ew,{contentName:ol,titleName:Jm,docsSlug:"dialog"}),AM=({titleId:e})=>{const n=kw(Ew),r=`\`${n.contentName}\` requires a \`${n.titleName}\` for the component to be accessible for screen reader users.
101
+
102
+ If you want to hide the \`${n.titleName}\`, you can wrap it with our VisuallyHidden component.
103
+
104
+ For more information, see https://radix-ui.com/primitives/docs/components/${n.docsSlug}`;return v.useEffect(()=>{e&&(document.getElementById(e)||console.error(r))},[r,e]),null},MM="DialogDescriptionWarning",jM=({contentRef:e,descriptionId:n})=>{const l=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${kw(MM).contentName}}.`;return v.useEffect(()=>{var s;const o=(s=e.current)==null?void 0:s.getAttribute("aria-describedby");n&&o&&(document.getElementById(n)||console.warn(l))},[l,e,n]),null},_M=dw,OM=pw,Nw=gw,Rw=yw,DM=vw,zM=ww,LM=Cw;/**
105
+ * @license lucide-react v0.562.0 - ISC
106
+ *
107
+ * This source code is licensed under the ISC license.
108
+ * See the LICENSE file in the root directory of this source tree.
109
+ */const PM=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),BM=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(n,r,l)=>l?l.toUpperCase():r.toLowerCase()),Ob=e=>{const n=BM(e);return n.charAt(0).toUpperCase()+n.slice(1)},Tw=(...e)=>e.filter((n,r,l)=>!!n&&n.trim()!==""&&l.indexOf(n)===r).join(" ").trim(),IM=e=>{for(const n in e)if(n.startsWith("aria-")||n==="role"||n==="title")return!0};/**
110
+ * @license lucide-react v0.562.0 - ISC
111
+ *
112
+ * This source code is licensed under the ISC license.
113
+ * See the LICENSE file in the root directory of this source tree.
114
+ */var UM={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"};/**
115
+ * @license lucide-react v0.562.0 - ISC
116
+ *
117
+ * This source code is licensed under the ISC license.
118
+ * See the LICENSE file in the root directory of this source tree.
119
+ */const HM=v.forwardRef(({color:e="currentColor",size:n=24,strokeWidth:r=2,absoluteStrokeWidth:l,className:o="",children:s,iconNode:c,...f},d)=>v.createElement("svg",{ref:d,...UM,width:n,height:n,stroke:e,strokeWidth:l?Number(r)*24/Number(n):r,className:Tw("lucide",o),...!s&&!IM(f)&&{"aria-hidden":"true"},...f},[...c.map(([h,g])=>v.createElement(h,g)),...Array.isArray(s)?s:[s]]));/**
120
+ * @license lucide-react v0.562.0 - ISC
121
+ *
122
+ * This source code is licensed under the ISC license.
123
+ * See the LICENSE file in the root directory of this source tree.
124
+ */const ke=(e,n)=>{const r=v.forwardRef(({className:l,...o},s)=>v.createElement(HM,{ref:s,iconNode:n,className:Tw(`lucide-${PM(Ob(e))}`,`lucide-${e}`,l),...o}));return r.displayName=Ob(e),r};/**
125
+ * @license lucide-react v0.562.0 - ISC
126
+ *
127
+ * This source code is licensed under the ISC license.
128
+ * See the LICENSE file in the root directory of this source tree.
129
+ */const FM=[["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"}]],qM=ke("archive",FM);/**
130
+ * @license lucide-react v0.562.0 - ISC
131
+ *
132
+ * This source code is licensed under the ISC license.
133
+ * See the LICENSE file in the root directory of this source tree.
134
+ */const GM=[["path",{d:"M12 17V3",key:"1cwfxf"}],["path",{d:"m6 11 6 6 6-6",key:"12ii2o"}],["path",{d:"M19 21H5",key:"150jfl"}]],VM=ke("arrow-down-to-line",GM);/**
135
+ * @license lucide-react v0.562.0 - ISC
136
+ *
137
+ * This source code is licensed under the ISC license.
138
+ * See the LICENSE file in the root directory of this source tree.
139
+ */const $M=[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]],YM=ke("arrow-down",$M);/**
140
+ * @license lucide-react v0.562.0 - ISC
141
+ *
142
+ * This source code is licensed under the ISC license.
143
+ * See the LICENSE file in the root directory of this source tree.
144
+ */const XM=[["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"}]],KM=ke("arrow-left-right",XM);/**
145
+ * @license lucide-react v0.562.0 - ISC
146
+ *
147
+ * This source code is licensed under the ISC license.
148
+ * See the LICENSE file in the root directory of this source tree.
149
+ */const QM=[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]],ZM=ke("arrow-up",QM);/**
150
+ * @license lucide-react v0.562.0 - ISC
151
+ *
152
+ * This source code is licensed under the ISC license.
153
+ * See the LICENSE file in the root directory of this source tree.
154
+ */const WM=[["path",{d:"M12 6v12",key:"1vza4d"}],["path",{d:"M17.196 9 6.804 15",key:"1ah31z"}],["path",{d:"m6.804 9 10.392 6",key:"1b6pxd"}]],JM=ke("asterisk",WM);/**
155
+ * @license lucide-react v0.562.0 - ISC
156
+ *
157
+ * This source code is licensed under the ISC license.
158
+ * See the LICENSE file in the root directory of this source tree.
159
+ */const ej=[["path",{d:"M12 18V5",key:"adv99a"}],["path",{d:"M15 13a4.17 4.17 0 0 1-3-4 4.17 4.17 0 0 1-3 4",key:"1e3is1"}],["path",{d:"M17.598 6.5A3 3 0 1 0 12 5a3 3 0 1 0-5.598 1.5",key:"1gqd8o"}],["path",{d:"M17.997 5.125a4 4 0 0 1 2.526 5.77",key:"iwvgf7"}],["path",{d:"M18 18a4 4 0 0 0 2-7.464",key:"efp6ie"}],["path",{d:"M19.967 17.483A4 4 0 1 1 12 18a4 4 0 1 1-7.967-.517",key:"1gq6am"}],["path",{d:"M6 18a4 4 0 0 1-2-7.464",key:"k1g0md"}],["path",{d:"M6.003 5.125a4 4 0 0 0-2.526 5.77",key:"q97ue3"}]],Db=ke("brain",ej);/**
160
+ * @license lucide-react v0.562.0 - ISC
161
+ *
162
+ * This source code is licensed under the ISC license.
163
+ * See the LICENSE file in the root directory of this source tree.
164
+ */const tj=[["path",{d:"M18 6 7 17l-5-5",key:"116fxf"}],["path",{d:"m22 10-7.5 7.5L13 16",key:"ke71qq"}]],nj=ke("check-check",tj);/**
165
+ * @license lucide-react v0.562.0 - ISC
166
+ *
167
+ * This source code is licensed under the ISC license.
168
+ * See the LICENSE file in the root directory of this source tree.
169
+ */const rj=[["path",{d:"M20 4L9 15",key:"1qkx8z"}],["path",{d:"M21 19L3 19",key:"100sma"}],["path",{d:"M9 15L4 10",key:"9zxff7"}]],ij=ke("check-line",rj);/**
170
+ * @license lucide-react v0.562.0 - ISC
171
+ *
172
+ * This source code is licensed under the ISC license.
173
+ * See the LICENSE file in the root directory of this source tree.
174
+ */const lj=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],sl=ke("check",lj);/**
175
+ * @license lucide-react v0.562.0 - ISC
176
+ *
177
+ * This source code is licensed under the ISC license.
178
+ * See the LICENSE file in the root directory of this source tree.
179
+ */const aj=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],oj=ke("chevron-down",aj);/**
180
+ * @license lucide-react v0.562.0 - ISC
181
+ *
182
+ * This source code is licensed under the ISC license.
183
+ * See the LICENSE file in the root directory of this source tree.
184
+ */const sj=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],uj=ke("chevron-left",sj);/**
185
+ * @license lucide-react v0.562.0 - ISC
186
+ *
187
+ * This source code is licensed under the ISC license.
188
+ * See the LICENSE file in the root directory of this source tree.
189
+ */const cj=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],Yr=ke("chevron-right",cj);/**
190
+ * @license lucide-react v0.562.0 - ISC
191
+ *
192
+ * This source code is licensed under the ISC license.
193
+ * See the LICENSE file in the root directory of this source tree.
194
+ */const fj=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"9",x2:"15",y1:"15",y2:"9",key:"1dfufj"}]],dj=ke("circle-slash",fj);/**
195
+ * @license lucide-react v0.562.0 - ISC
196
+ *
197
+ * This source code is licensed under the ISC license.
198
+ * See the LICENSE file in the root directory of this source tree.
199
+ */const hj=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],mj=ke("circle",hj);/**
200
+ * @license lucide-react v0.562.0 - ISC
201
+ *
202
+ * This source code is licensed under the ISC license.
203
+ * See the LICENSE file in the root directory of this source tree.
204
+ */const pj=[["path",{d:"m18 16 4-4-4-4",key:"1inbqp"}],["path",{d:"m6 8-4 4 4 4",key:"15zrgr"}],["path",{d:"m14.5 4-5 16",key:"e7oirm"}]],zb=ke("code-xml",pj);/**
205
+ * @license lucide-react v0.562.0 - ISC
206
+ *
207
+ * This source code is licensed under the ISC license.
208
+ * See the LICENSE file in the root directory of this source tree.
209
+ */const gj=[["path",{d:"m16 18 6-6-6-6",key:"eg8j8"}],["path",{d:"m8 6-6 6 6 6",key:"ppft3o"}]],yj=ke("code",gj);/**
210
+ * @license lucide-react v0.562.0 - ISC
211
+ *
212
+ * This source code is licensed under the ISC license.
213
+ * See the LICENSE file in the root directory of this source tree.
214
+ */const xj=[["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"}]],Rc=ke("copy",xj);/**
215
+ * @license lucide-react v0.562.0 - ISC
216
+ *
217
+ * This source code is licensed under the ISC license.
218
+ * See the LICENSE file in the root directory of this source tree.
219
+ */const vj=[["path",{d:"M20 4v7a4 4 0 0 1-4 4H4",key:"6o5b7l"}],["path",{d:"m9 10-5 5 5 5",key:"1kshq7"}]],bj=ke("corner-down-left",vj);/**
220
+ * @license lucide-react v0.562.0 - ISC
221
+ *
222
+ * This source code is licensed under the ISC license.
223
+ * See the LICENSE file in the root directory of this source tree.
224
+ */const wj=[["path",{d:"M12.659 22H18a2 2 0 0 0 2-2V8a2.4 2.4 0 0 0-.706-1.706l-3.588-3.588A2.4 2.4 0 0 0 14 2H6a2 2 0 0 0-2 2v9.34",key:"o6klzx"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10.378 12.622a1 1 0 0 1 3 3.003L8.36 20.637a2 2 0 0 1-.854.506l-2.867.837a.5.5 0 0 1-.62-.62l.836-2.869a2 2 0 0 1 .506-.853z",key:"zhnas1"}]],Sj=ke("file-pen",wj);/**
225
+ * @license lucide-react v0.562.0 - ISC
226
+ *
227
+ * This source code is licensed under the ISC license.
228
+ * See the LICENSE file in the root directory of this source tree.
229
+ */const Cj=[["path",{d:"M11.35 22H6a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.706.706l3.588 3.588A2.4 2.4 0 0 1 20 8v5.35",key:"17jvcc"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M14 19h6",key:"bvotb8"}],["path",{d:"M17 16v6",key:"18yu1i"}]],Ej=ke("file-plus-corner",Cj);/**
230
+ * @license lucide-react v0.562.0 - ISC
231
+ *
232
+ * This source code is licensed under the ISC license.
233
+ * See the LICENSE file in the root directory of this source tree.
234
+ */const kj=[["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:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}]],Nj=ke("file",kj);/**
235
+ * @license lucide-react v0.562.0 - ISC
236
+ *
237
+ * This source code is licensed under the ISC license.
238
+ * See the LICENSE file in the root directory of this source tree.
239
+ */const Rj=[["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}],["path",{d:"M12 16.5A4.5 4.5 0 1 1 7.5 12 4.5 4.5 0 1 1 12 7.5a4.5 4.5 0 1 1 4.5 4.5 4.5 4.5 0 1 1-4.5 4.5",key:"14wa3c"}],["path",{d:"M12 7.5V9",key:"1oy5b0"}],["path",{d:"M7.5 12H9",key:"eltsq1"}],["path",{d:"M16.5 12H15",key:"vk5kw4"}],["path",{d:"M12 16.5V15",key:"k7eayi"}],["path",{d:"m8 8 1.88 1.88",key:"nxy4qf"}],["path",{d:"M14.12 9.88 16 8",key:"1lst6k"}],["path",{d:"m8 16 1.88-1.88",key:"h2eex1"}],["path",{d:"M14.12 14.12 16 16",key:"uqkrx3"}]],To=ke("flower",Rj);/**
240
+ * @license lucide-react v0.562.0 - ISC
241
+ *
242
+ * This source code is licensed under the ISC license.
243
+ * See the LICENSE file in the root directory of this source tree.
244
+ */const Tj=[["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"}]],Aw=ke("folder-open",Tj);/**
245
+ * @license lucide-react v0.562.0 - ISC
246
+ *
247
+ * This source code is licensed under the ISC license.
248
+ * See the LICENSE file in the root directory of this source tree.
249
+ */const Aj=[["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]],Mj=ke("folder",Aj);/**
250
+ * @license lucide-react v0.562.0 - ISC
251
+ *
252
+ * This source code is licensed under the ISC license.
253
+ * See the LICENSE file in the root directory of this source tree.
254
+ */const jj=[["path",{d:"m12 14 4-4",key:"9kzdfg"}],["path",{d:"M3.34 19a10 10 0 1 1 17.32 0",key:"19p75a"}]],Mu=ke("gauge",jj);/**
255
+ * @license lucide-react v0.562.0 - ISC
256
+ *
257
+ * This source code is licensed under the ISC license.
258
+ * See the LICENSE file in the root directory of this source tree.
259
+ */const _j=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]],Oj=ke("info",_j);/**
260
+ * @license lucide-react v0.562.0 - ISC
261
+ *
262
+ * This source code is licensed under the ISC license.
263
+ * See the LICENSE file in the root directory of this source tree.
264
+ */const Dj=[["path",{d:"M13 5h8",key:"a7qcls"}],["path",{d:"M13 12h8",key:"h98zly"}],["path",{d:"M13 19h8",key:"c3s6r1"}],["path",{d:"m3 17 2 2 4-4",key:"1jhpwq"}],["path",{d:"m3 7 2 2 4-4",key:"1obspn"}]],zj=ke("list-checks",Dj);/**
265
+ * @license lucide-react v0.562.0 - ISC
266
+ *
267
+ * This source code is licensed under the ISC license.
268
+ * See the LICENSE file in the root directory of this source tree.
269
+ */const Lj=[["path",{d:"M13 5h8",key:"a7qcls"}],["path",{d:"M13 12h8",key:"h98zly"}],["path",{d:"M13 19h8",key:"c3s6r1"}],["path",{d:"m3 17 2 2 4-4",key:"1jhpwq"}],["rect",{x:"3",y:"4",width:"6",height:"6",rx:"1",key:"cif1o7"}]],Ju=ke("list-todo",Lj);/**
270
+ * @license lucide-react v0.562.0 - ISC
271
+ *
272
+ * This source code is licensed under the ISC license.
273
+ * See the LICENSE file in the root directory of this source tree.
274
+ */const Pj=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],Li=ke("loader-circle",Pj);/**
275
+ * @license lucide-react v0.562.0 - ISC
276
+ *
277
+ * This source code is licensed under the ISC license.
278
+ * See the LICENSE file in the root directory of this source tree.
279
+ */const Bj=[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 9.9-1",key:"1mm8w8"}]],Lb=ke("lock-open",Bj);/**
280
+ * @license lucide-react v0.562.0 - ISC
281
+ *
282
+ * This source code is licensed under the ISC license.
283
+ * See the LICENSE file in the root directory of this source tree.
284
+ */const Ij=[["path",{d:"M14.106 5.553a2 2 0 0 0 1.788 0l3.659-1.83A1 1 0 0 1 21 4.619v12.764a1 1 0 0 1-.553.894l-4.553 2.277a2 2 0 0 1-1.788 0l-4.212-2.106a2 2 0 0 0-1.788 0l-3.659 1.83A1 1 0 0 1 3 19.381V6.618a1 1 0 0 1 .553-.894l4.553-2.277a2 2 0 0 1 1.788 0z",key:"169xi5"}],["path",{d:"M15 5.764v15",key:"1pn4in"}],["path",{d:"M9 3.236v15",key:"1uimfh"}]],Pb=ke("map",Ij);/**
285
+ * @license lucide-react v0.562.0 - ISC
286
+ *
287
+ * This source code is licensed under the ISC license.
288
+ * See the LICENSE file in the root directory of this source tree.
289
+ */const Uj=[["path",{d:"M4 5h16",key:"1tepv9"}],["path",{d:"M4 12h16",key:"1lakjw"}],["path",{d:"M4 19h16",key:"1djgab"}]],Mw=ke("menu",Uj);/**
290
+ * @license lucide-react v0.562.0 - ISC
291
+ *
292
+ * This source code is licensed under the ISC license.
293
+ * See the LICENSE file in the root directory of this source tree.
294
+ */const Hj=[["path",{d:"M2.992 16.342a2 2 0 0 1 .094 1.167l-1.065 3.29a1 1 0 0 0 1.236 1.168l3.413-.998a2 2 0 0 1 1.099.092 10 10 0 1 0-4.777-4.719",key:"1sd12s"}],["path",{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3",key:"1u773s"}],["path",{d:"M12 17h.01",key:"p32p05"}]],jw=ke("message-circle-question-mark",Hj);/**
295
+ * @license lucide-react v0.562.0 - ISC
296
+ *
297
+ * This source code is licensed under the ISC license.
298
+ * See the LICENSE file in the root directory of this source tree.
299
+ */const Fj=[["path",{d:"M8 3v3a2 2 0 0 1-2 2H3",key:"hohbtr"}],["path",{d:"M21 8h-3a2 2 0 0 1-2-2V3",key:"5jw1f3"}],["path",{d:"M3 16h3a2 2 0 0 1 2 2v3",key:"198tvr"}],["path",{d:"M16 21v-3a2 2 0 0 1 2-2h3",key:"ph8mxp"}]],_w=ke("minimize",Fj);/**
300
+ * @license lucide-react v0.562.0 - ISC
301
+ *
302
+ * This source code is licensed under the ISC license.
303
+ * See the LICENSE file in the root directory of this source tree.
304
+ */const qj=[["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"}]],Ow=ke("monitor",qj);/**
305
+ * @license lucide-react v0.562.0 - ISC
306
+ *
307
+ * This source code is licensed under the ISC license.
308
+ * See the LICENSE file in the root directory of this source tree.
309
+ */const Gj=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}]],um=ke("panel-left",Gj);/**
310
+ * @license lucide-react v0.562.0 - ISC
311
+ *
312
+ * This source code is licensed under the ISC license.
313
+ * See the LICENSE file in the root directory of this source tree.
314
+ */const Vj=[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]],Dw=ke("pencil",Vj);/**
315
+ * @license lucide-react v0.562.0 - ISC
316
+ *
317
+ * This source code is licensed under the ISC license.
318
+ * See the LICENSE file in the root directory of this source tree.
319
+ */const $j=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],zw=ke("plus",$j);/**
320
+ * @license lucide-react v0.562.0 - ISC
321
+ *
322
+ * This source code is licensed under the ISC license.
323
+ * See the LICENSE file in the root directory of this source tree.
324
+ */const Yj=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],Rh=ke("search",Yj);/**
325
+ * @license lucide-react v0.562.0 - ISC
326
+ *
327
+ * This source code is licensed under the ISC license.
328
+ * See the LICENSE file in the root directory of this source tree.
329
+ */const Xj=[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]],Kj=ke("send",Xj);/**
330
+ * @license lucide-react v0.562.0 - ISC
331
+ *
332
+ * This source code is licensed under the ISC license.
333
+ * See the LICENSE file in the root directory of this source tree.
334
+ */const Qj=[["path",{d:"M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915",key:"1i5ecw"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],Lw=ke("settings",Qj);/**
335
+ * @license lucide-react v0.562.0 - ISC
336
+ *
337
+ * This source code is licensed under the ISC license.
338
+ * See the LICENSE file in the root directory of this source tree.
339
+ */const Zj=[["path",{d:"M22 2 2 22",key:"y4kqgn"}]],Wj=ke("slash",Zj);/**
340
+ * @license lucide-react v0.562.0 - ISC
341
+ *
342
+ * This source code is licensed under the ISC license.
343
+ * See the LICENSE file in the root directory of this source tree.
344
+ */const Jj=[["path",{d:"M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z",key:"1s2grr"}],["path",{d:"M20 2v4",key:"1rf3ol"}],["path",{d:"M22 4h-4",key:"gwowj6"}],["circle",{cx:"4",cy:"20",r:"2",key:"6kqj1y"}]],Lo=ke("sparkles",Jj);/**
345
+ * @license lucide-react v0.562.0 - ISC
346
+ *
347
+ * This source code is licensed under the ISC license.
348
+ * See the LICENSE file in the root directory of this source tree.
349
+ */const e_=[["path",{d:"M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7",key:"1m0v6g"}],["path",{d:"M18.375 2.625a1 1 0 0 1 3 3l-9.013 9.014a2 2 0 0 1-.853.505l-2.873.84a.5.5 0 0 1-.62-.62l.84-2.873a2 2 0 0 1 .506-.852z",key:"ohrbg2"}]],tp=ke("square-pen",e_);/**
350
+ * @license lucide-react v0.562.0 - ISC
351
+ *
352
+ * This source code is licensed under the ISC license.
353
+ * See the LICENSE file in the root directory of this source tree.
354
+ */const t_=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]],n_=ke("square-x",t_);/**
355
+ * @license lucide-react v0.562.0 - ISC
356
+ *
357
+ * This source code is licensed under the ISC license.
358
+ * See the LICENSE file in the root directory of this source tree.
359
+ */const r_=[["path",{d:"M12 19h8",key:"baeox8"}],["path",{d:"m4 17 6-6-6-6",key:"1yngyt"}]],np=ke("terminal",r_);/**
360
+ * @license lucide-react v0.562.0 - ISC
361
+ *
362
+ * This source code is licensed under the ISC license.
363
+ * See the LICENSE file in the root directory of this source tree.
364
+ */const i_=[["rect",{width:"18",height:"12",x:"3",y:"8",rx:"1",key:"158fvp"}],["path",{d:"M10 8V5c0-.6-.4-1-1-1H6a1 1 0 0 0-1 1v3",key:"s0042v"}],["path",{d:"M19 8V5c0-.6-.4-1-1-1h-3a1 1 0 0 0-1 1v3",key:"9wmeh2"}]],l_=ke("toy-brick",i_);/**
365
+ * @license lucide-react v0.562.0 - ISC
366
+ *
367
+ * This source code is licensed under the ISC license.
368
+ * See the LICENSE file in the root directory of this source tree.
369
+ */const a_=[["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"}]],o_=ke("trash-2",a_);/**
370
+ * @license lucide-react v0.562.0 - ISC
371
+ *
372
+ * This source code is licensed under the ISC license.
373
+ * See the LICENSE file in the root directory of this source tree.
374
+ */const s_=[["circle",{cx:"12",cy:"8",r:"5",key:"1hypcn"}],["path",{d:"M20 21a8 8 0 0 0-16 0",key:"rfgkzh"}]],rp=ke("user-round",s_);/**
375
+ * @license lucide-react v0.562.0 - ISC
376
+ *
377
+ * This source code is licensed under the ISC license.
378
+ * See the LICENSE file in the root directory of this source tree.
379
+ */const u_=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],Tc=ke("x",u_);/**
380
+ * @license lucide-react v0.562.0 - ISC
381
+ *
382
+ * This source code is licensed under the ISC license.
383
+ * See the LICENSE file in the root directory of this source tree.
384
+ */const c_=[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]],ec=ke("zap",c_),Pw=_M,f_=OM,Bw=v.forwardRef(({className:e,...n},r)=>x.jsx(Nw,{ref:r,className:ye("fixed inset-0 z-50 bg-black/50 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...n}));Bw.displayName=Nw.displayName;const d_={sm:"max-w-sm",md:"max-w-md",lg:"max-w-lg"},ip=v.forwardRef(({className:e,children:n,size:r="md",...l},o)=>x.jsxs(f_,{children:[x.jsx(Bw,{}),x.jsxs(Rw,{ref:o,className:ye("fixed left-1/2 top-1/2 z-50 w-full -translate-x-1/2 -translate-y-1/2 rounded-xl border border-border bg-background shadow-xl duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%]","max-h-[85vh] flex flex-col",d_[r],e),...l,children:[n,x.jsxs(LM,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground",children:[x.jsx(Tc,{className:"h-4 w-4"}),x.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));ip.displayName=Rw.displayName;function Iw({className:e,...n}){return x.jsx(DM,{className:ye("text-lg font-medium leading-none tracking-tight",e),...n})}function h_({className:e,...n}){return x.jsx(zM,{className:ye("text-sm text-muted-foreground",e),...n})}function Uw({className:e,...n}){return x.jsx("div",{className:ye("flex-1 min-h-0 overflow-y-auto px-4 pb-4 pt-3.5",e),...n})}function Hw({className:e,...n}){return x.jsx("div",{className:ye("shrink-0 flex justify-end gap-2 border-t border-border bg-background p-2 rounded-b-xl",e),...n})}const Fw=v.createContext(null);function m_({children:e}){const[n,r]=v.useState(null),[l,o]=v.useState(""),s=v.useRef(null);v.useEffect(()=>{(n==null?void 0:n.kind)==="prompt"&&(o(n.options.initialValue??""),setTimeout(()=>{var g,p;(g=s.current)==null||g.focus(),(p=s.current)==null||p.select()},0))},[n]);const c=v.useCallback(()=>{r(null),o("")},[]),f=v.useCallback(g=>new Promise(p=>{r({kind:"confirm",options:g,resolve:p})}),[]),d=v.useCallback(g=>new Promise(p=>{r({kind:"prompt",options:g,resolve:p})}),[]),h=v.useMemo(()=>({confirm:f,prompt:d}),[f,d]);return x.jsxs(Fw.Provider,{value:h,children:[e,x.jsx(Pw,{open:n!==null,onOpenChange:g=>{g||!n||(n.kind==="confirm"?n.resolve(!1):n.resolve(null),c())},children:x.jsx(ip,{size:"sm",children:n?x.jsxs(x.Fragment,{children:[x.jsxs(Uw,{className:"space-y-4",children:[x.jsx(Iw,{children:n.options.title}),n.options.description?x.jsx(h_,{children:n.options.description}):null,n.kind==="prompt"?x.jsx("input",{ref:s,type:"text",value:l,onChange:g=>o(g.target.value),onKeyDown:g=>{g.key==="Enter"&&(g.preventDefault(),n.resolve(l.trim()||null),c())},className:"w-full px-3 py-2 text-sm border border-border rounded-md bg-background outline-none",placeholder:n.options.placeholder}):null]}),x.jsxs(Hw,{children:[x.jsx($e,{variant:"ghost",size:"sm",onClick:()=>{n.kind==="confirm"?n.resolve(!1):n.resolve(null),c()},children:n.options.cancelLabel??"Cancel"}),x.jsx($e,{variant:n.kind==="confirm"?n.options.confirmVariant??"default":"secondary",size:"sm",onClick:()=>{n.kind==="confirm"?n.resolve(!0):n.resolve(l.trim()||null),c()},disabled:n.kind==="prompt"&&!l.trim(),children:n.options.confirmLabel??"Confirm"})]})]}):null})})]})}function p_(){const e=v.useContext(Fw);if(!e)throw new Error("useAppDialog must be used within AppDialogProvider");return e}const g_=["top","right","bottom","left"],ji=Math.min,kn=Math.max,tc=Math.round,ju=Math.floor,xr=e=>({x:e,y:e}),y_={left:"right",right:"left",bottom:"top",top:"bottom"};function cm(e,n,r){return kn(e,ji(n,r))}function Xr(e,n){return typeof e=="function"?e(n):e}function Kr(e){return e.split("-")[0]}function ba(e){return e.split("-")[1]}function lp(e){return e==="x"?"y":"x"}function ap(e){return e==="y"?"height":"width"}function gr(e){const n=e[0];return n==="t"||n==="b"?"y":"x"}function op(e){return lp(gr(e))}function x_(e,n,r){r===void 0&&(r=!1);const l=ba(e),o=op(e),s=ap(o);let c=o==="x"?l===(r?"end":"start")?"right":"left":l==="start"?"bottom":"top";return n.reference[s]>n.floating[s]&&(c=nc(c)),[c,nc(c)]}function v_(e){const n=nc(e);return[fm(e),n,fm(n)]}function fm(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const Bb=["left","right"],Ib=["right","left"],b_=["top","bottom"],w_=["bottom","top"];function S_(e,n,r){switch(e){case"top":case"bottom":return r?n?Ib:Bb:n?Bb:Ib;case"left":case"right":return n?b_:w_;default:return[]}}function C_(e,n,r,l){const o=ba(e);let s=S_(Kr(e),r==="start",l);return o&&(s=s.map(c=>c+"-"+o),n&&(s=s.concat(s.map(fm)))),s}function nc(e){const n=Kr(e);return y_[n]+e.slice(n.length)}function E_(e){return{top:0,right:0,bottom:0,left:0,...e}}function qw(e){return typeof e!="number"?E_(e):{top:e,right:e,bottom:e,left:e}}function rc(e){const{x:n,y:r,width:l,height:o}=e;return{width:l,height:o,top:r,left:n,right:n+l,bottom:r+o,x:n,y:r}}function Ub(e,n,r){let{reference:l,floating:o}=e;const s=gr(n),c=op(n),f=ap(c),d=Kr(n),h=s==="y",g=l.x+l.width/2-o.width/2,p=l.y+l.height/2-o.height/2,b=l[f]/2-o[f]/2;let w;switch(d){case"top":w={x:g,y:l.y-o.height};break;case"bottom":w={x:g,y:l.y+l.height};break;case"right":w={x:l.x+l.width,y:p};break;case"left":w={x:l.x-o.width,y:p};break;default:w={x:l.x,y:l.y}}switch(ba(n)){case"start":w[c]-=b*(r&&h?-1:1);break;case"end":w[c]+=b*(r&&h?-1:1);break}return w}async function k_(e,n){var r;n===void 0&&(n={});const{x:l,y:o,platform:s,rects:c,elements:f,strategy:d}=e,{boundary:h="clippingAncestors",rootBoundary:g="viewport",elementContext:p="floating",altBoundary:b=!1,padding:w=0}=Xr(n,e),E=qw(w),k=f[b?p==="floating"?"reference":"floating":p],N=rc(await s.getClippingRect({element:(r=await(s.isElement==null?void 0:s.isElement(k)))==null||r?k:k.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(f.floating)),boundary:h,rootBoundary:g,strategy:d})),j=p==="floating"?{x:l,y:o,width:c.floating.width,height:c.floating.height}:c.reference,M=await(s.getOffsetParent==null?void 0:s.getOffsetParent(f.floating)),z=await(s.isElement==null?void 0:s.isElement(M))?await(s.getScale==null?void 0:s.getScale(M))||{x:1,y:1}:{x:1,y:1},U=rc(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:f,rect:j,offsetParent:M,strategy:d}):j);return{top:(N.top-U.top+E.top)/z.y,bottom:(U.bottom-N.bottom+E.bottom)/z.y,left:(N.left-U.left+E.left)/z.x,right:(U.right-N.right+E.right)/z.x}}const N_=50,R_=async(e,n,r)=>{const{placement:l="bottom",strategy:o="absolute",middleware:s=[],platform:c}=r,f=c.detectOverflow?c:{...c,detectOverflow:k_},d=await(c.isRTL==null?void 0:c.isRTL(n));let h=await c.getElementRects({reference:e,floating:n,strategy:o}),{x:g,y:p}=Ub(h,l,d),b=l,w=0;const E={};for(let C=0;C<s.length;C++){const k=s[C];if(!k)continue;const{name:N,fn:j}=k,{x:M,y:z,data:U,reset:_}=await j({x:g,y:p,initialPlacement:l,placement:b,strategy:o,middlewareData:E,rects:h,platform:f,elements:{reference:e,floating:n}});g=M??g,p=z??p,E[N]={...E[N],...U},_&&w<N_&&(w++,typeof _=="object"&&(_.placement&&(b=_.placement),_.rects&&(h=_.rects===!0?await c.getElementRects({reference:e,floating:n,strategy:o}):_.rects),{x:g,y:p}=Ub(h,b,d)),C=-1)}return{x:g,y:p,placement:b,strategy:o,middlewareData:E}},T_=e=>({name:"arrow",options:e,async fn(n){const{x:r,y:l,placement:o,rects:s,platform:c,elements:f,middlewareData:d}=n,{element:h,padding:g=0}=Xr(e,n)||{};if(h==null)return{};const p=qw(g),b={x:r,y:l},w=op(o),E=ap(w),C=await c.getDimensions(h),k=w==="y",N=k?"top":"left",j=k?"bottom":"right",M=k?"clientHeight":"clientWidth",z=s.reference[E]+s.reference[w]-b[w]-s.floating[E],U=b[w]-s.reference[w],_=await(c.getOffsetParent==null?void 0:c.getOffsetParent(h));let P=_?_[M]:0;(!P||!await(c.isElement==null?void 0:c.isElement(_)))&&(P=f.floating[M]||s.floating[E]);const F=z/2-U/2,ne=P/2-C[E]/2-1,I=ji(p[N],ne),J=ji(p[j],ne),te=I,ce=P-C[E]-J,le=P/2-C[E]/2+F,ee=cm(te,le,ce),B=!d.arrow&&ba(o)!=null&&le!==ee&&s.reference[E]/2-(le<te?I:J)-C[E]/2<0,X=B?le<te?le-te:le-ce:0;return{[w]:b[w]+X,data:{[w]:ee,centerOffset:le-ee-X,...B&&{alignmentOffset:X}},reset:B}}}),A_=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(n){var r,l;const{placement:o,middlewareData:s,rects:c,initialPlacement:f,platform:d,elements:h}=n,{mainAxis:g=!0,crossAxis:p=!0,fallbackPlacements:b,fallbackStrategy:w="bestFit",fallbackAxisSideDirection:E="none",flipAlignment:C=!0,...k}=Xr(e,n);if((r=s.arrow)!=null&&r.alignmentOffset)return{};const N=Kr(o),j=gr(f),M=Kr(f)===f,z=await(d.isRTL==null?void 0:d.isRTL(h.floating)),U=b||(M||!C?[nc(f)]:v_(f)),_=E!=="none";!b&&_&&U.push(...C_(f,C,E,z));const P=[f,...U],F=await d.detectOverflow(n,k),ne=[];let I=((l=s.flip)==null?void 0:l.overflows)||[];if(g&&ne.push(F[N]),p){const le=x_(o,c,z);ne.push(F[le[0]],F[le[1]])}if(I=[...I,{placement:o,overflows:ne}],!ne.every(le=>le<=0)){var J,te;const le=(((J=s.flip)==null?void 0:J.index)||0)+1,ee=P[le];if(ee&&(!(p==="alignment"?j!==gr(ee):!1)||I.every($=>gr($.placement)===j?$.overflows[0]>0:!0)))return{data:{index:le,overflows:I},reset:{placement:ee}};let B=(te=I.filter(X=>X.overflows[0]<=0).sort((X,$)=>X.overflows[1]-$.overflows[1])[0])==null?void 0:te.placement;if(!B)switch(w){case"bestFit":{var ce;const X=(ce=I.filter($=>{if(_){const Q=gr($.placement);return Q===j||Q==="y"}return!0}).map($=>[$.placement,$.overflows.filter(Q=>Q>0).reduce((Q,T)=>Q+T,0)]).sort(($,Q)=>$[1]-Q[1])[0])==null?void 0:ce[0];X&&(B=X);break}case"initialPlacement":B=f;break}if(o!==B)return{reset:{placement:B}}}return{}}}};function Hb(e,n){return{top:e.top-n.height,right:e.right-n.width,bottom:e.bottom-n.height,left:e.left-n.width}}function Fb(e){return g_.some(n=>e[n]>=0)}const M_=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(n){const{rects:r,platform:l}=n,{strategy:o="referenceHidden",...s}=Xr(e,n);switch(o){case"referenceHidden":{const c=await l.detectOverflow(n,{...s,elementContext:"reference"}),f=Hb(c,r.reference);return{data:{referenceHiddenOffsets:f,referenceHidden:Fb(f)}}}case"escaped":{const c=await l.detectOverflow(n,{...s,altBoundary:!0}),f=Hb(c,r.floating);return{data:{escapedOffsets:f,escaped:Fb(f)}}}default:return{}}}}},Gw=new Set(["left","top"]);async function j_(e,n){const{placement:r,platform:l,elements:o}=e,s=await(l.isRTL==null?void 0:l.isRTL(o.floating)),c=Kr(r),f=ba(r),d=gr(r)==="y",h=Gw.has(c)?-1:1,g=s&&d?-1:1,p=Xr(n,e);let{mainAxis:b,crossAxis:w,alignmentAxis:E}=typeof p=="number"?{mainAxis:p,crossAxis:0,alignmentAxis:null}:{mainAxis:p.mainAxis||0,crossAxis:p.crossAxis||0,alignmentAxis:p.alignmentAxis};return f&&typeof E=="number"&&(w=f==="end"?E*-1:E),d?{x:w*g,y:b*h}:{x:b*h,y:w*g}}const __=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(n){var r,l;const{x:o,y:s,placement:c,middlewareData:f}=n,d=await j_(n,e);return c===((r=f.offset)==null?void 0:r.placement)&&(l=f.arrow)!=null&&l.alignmentOffset?{}:{x:o+d.x,y:s+d.y,data:{...d,placement:c}}}}},O_=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(n){const{x:r,y:l,placement:o,platform:s}=n,{mainAxis:c=!0,crossAxis:f=!1,limiter:d={fn:N=>{let{x:j,y:M}=N;return{x:j,y:M}}},...h}=Xr(e,n),g={x:r,y:l},p=await s.detectOverflow(n,h),b=gr(Kr(o)),w=lp(b);let E=g[w],C=g[b];if(c){const N=w==="y"?"top":"left",j=w==="y"?"bottom":"right",M=E+p[N],z=E-p[j];E=cm(M,E,z)}if(f){const N=b==="y"?"top":"left",j=b==="y"?"bottom":"right",M=C+p[N],z=C-p[j];C=cm(M,C,z)}const k=d.fn({...n,[w]:E,[b]:C});return{...k,data:{x:k.x-r,y:k.y-l,enabled:{[w]:c,[b]:f}}}}}},D_=function(e){return e===void 0&&(e={}),{options:e,fn(n){const{x:r,y:l,placement:o,rects:s,middlewareData:c}=n,{offset:f=0,mainAxis:d=!0,crossAxis:h=!0}=Xr(e,n),g={x:r,y:l},p=gr(o),b=lp(p);let w=g[b],E=g[p];const C=Xr(f,n),k=typeof C=="number"?{mainAxis:C,crossAxis:0}:{mainAxis:0,crossAxis:0,...C};if(d){const M=b==="y"?"height":"width",z=s.reference[b]-s.floating[M]+k.mainAxis,U=s.reference[b]+s.reference[M]-k.mainAxis;w<z?w=z:w>U&&(w=U)}if(h){var N,j;const M=b==="y"?"width":"height",z=Gw.has(Kr(o)),U=s.reference[p]-s.floating[M]+(z&&((N=c.offset)==null?void 0:N[p])||0)+(z?0:k.crossAxis),_=s.reference[p]+s.reference[M]+(z?0:((j=c.offset)==null?void 0:j[p])||0)-(z?k.crossAxis:0);E<U?E=U:E>_&&(E=_)}return{[b]:w,[p]:E}}}},z_=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(n){var r,l;const{placement:o,rects:s,platform:c,elements:f}=n,{apply:d=()=>{},...h}=Xr(e,n),g=await c.detectOverflow(n,h),p=Kr(o),b=ba(o),w=gr(o)==="y",{width:E,height:C}=s.floating;let k,N;p==="top"||p==="bottom"?(k=p,N=b===(await(c.isRTL==null?void 0:c.isRTL(f.floating))?"start":"end")?"left":"right"):(N=p,k=b==="end"?"top":"bottom");const j=C-g.top-g.bottom,M=E-g.left-g.right,z=ji(C-g[k],j),U=ji(E-g[N],M),_=!n.middlewareData.shift;let P=z,F=U;if((r=n.middlewareData.shift)!=null&&r.enabled.x&&(F=M),(l=n.middlewareData.shift)!=null&&l.enabled.y&&(P=j),_&&!b){const I=kn(g.left,0),J=kn(g.right,0),te=kn(g.top,0),ce=kn(g.bottom,0);w?F=E-2*(I!==0||J!==0?I+J:kn(g.left,g.right)):P=C-2*(te!==0||ce!==0?te+ce:kn(g.top,g.bottom))}await d({...n,availableWidth:F,availableHeight:P});const ne=await c.getDimensions(f.floating);return E!==ne.width||C!==ne.height?{reset:{rects:!0}}:{}}}};function Ac(){return typeof window<"u"}function wa(e){return Vw(e)?(e.nodeName||"").toLowerCase():"#document"}function Nn(e){var n;return(e==null||(n=e.ownerDocument)==null?void 0:n.defaultView)||window}function Cr(e){var n;return(n=(Vw(e)?e.ownerDocument:e.document)||window.document)==null?void 0:n.documentElement}function Vw(e){return Ac()?e instanceof Node||e instanceof Nn(e).Node:!1}function rr(e){return Ac()?e instanceof Element||e instanceof Nn(e).Element:!1}function Qr(e){return Ac()?e instanceof HTMLElement||e instanceof Nn(e).HTMLElement:!1}function qb(e){return!Ac()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Nn(e).ShadowRoot}function Wo(e){const{overflow:n,overflowX:r,overflowY:l,display:o}=ir(e);return/auto|scroll|overlay|hidden|clip/.test(n+l+r)&&o!=="inline"&&o!=="contents"}function L_(e){return/^(table|td|th)$/.test(wa(e))}function Mc(e){try{if(e.matches(":popover-open"))return!0}catch{}try{return e.matches(":modal")}catch{return!1}}const P_=/transform|translate|scale|rotate|perspective|filter/,B_=/paint|layout|strict|content/,il=e=>!!e&&e!=="none";let Th;function sp(e){const n=rr(e)?ir(e):e;return il(n.transform)||il(n.translate)||il(n.scale)||il(n.rotate)||il(n.perspective)||!up()&&(il(n.backdropFilter)||il(n.filter))||P_.test(n.willChange||"")||B_.test(n.contain||"")}function I_(e){let n=_i(e);for(;Qr(n)&&!ma(n);){if(sp(n))return n;if(Mc(n))return null;n=_i(n)}return null}function up(){return Th==null&&(Th=typeof CSS<"u"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),Th}function ma(e){return/^(html|body|#document)$/.test(wa(e))}function ir(e){return Nn(e).getComputedStyle(e)}function jc(e){return rr(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function _i(e){if(wa(e)==="html")return e;const n=e.assignedSlot||e.parentNode||qb(e)&&e.host||Cr(e);return qb(n)?n.host:n}function $w(e){const n=_i(e);return ma(n)?e.ownerDocument?e.ownerDocument.body:e.body:Qr(n)&&Wo(n)?n:$w(n)}function Po(e,n,r){var l;n===void 0&&(n=[]),r===void 0&&(r=!0);const o=$w(e),s=o===((l=e.ownerDocument)==null?void 0:l.body),c=Nn(o);if(s){const f=dm(c);return n.concat(c,c.visualViewport||[],Wo(o)?o:[],f&&r?Po(f):[])}else return n.concat(o,Po(o,[],r))}function dm(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Yw(e){const n=ir(e);let r=parseFloat(n.width)||0,l=parseFloat(n.height)||0;const o=Qr(e),s=o?e.offsetWidth:r,c=o?e.offsetHeight:l,f=tc(r)!==s||tc(l)!==c;return f&&(r=s,l=c),{width:r,height:l,$:f}}function cp(e){return rr(e)?e:e.contextElement}function ca(e){const n=cp(e);if(!Qr(n))return xr(1);const r=n.getBoundingClientRect(),{width:l,height:o,$:s}=Yw(n);let c=(s?tc(r.width):r.width)/l,f=(s?tc(r.height):r.height)/o;return(!c||!Number.isFinite(c))&&(c=1),(!f||!Number.isFinite(f))&&(f=1),{x:c,y:f}}const U_=xr(0);function Xw(e){const n=Nn(e);return!up()||!n.visualViewport?U_:{x:n.visualViewport.offsetLeft,y:n.visualViewport.offsetTop}}function H_(e,n,r){return n===void 0&&(n=!1),!r||n&&r!==Nn(e)?!1:n}function ul(e,n,r,l){n===void 0&&(n=!1),r===void 0&&(r=!1);const o=e.getBoundingClientRect(),s=cp(e);let c=xr(1);n&&(l?rr(l)&&(c=ca(l)):c=ca(e));const f=H_(s,r,l)?Xw(s):xr(0);let d=(o.left+f.x)/c.x,h=(o.top+f.y)/c.y,g=o.width/c.x,p=o.height/c.y;if(s){const b=Nn(s),w=l&&rr(l)?Nn(l):l;let E=b,C=dm(E);for(;C&&l&&w!==E;){const k=ca(C),N=C.getBoundingClientRect(),j=ir(C),M=N.left+(C.clientLeft+parseFloat(j.paddingLeft))*k.x,z=N.top+(C.clientTop+parseFloat(j.paddingTop))*k.y;d*=k.x,h*=k.y,g*=k.x,p*=k.y,d+=M,h+=z,E=Nn(C),C=dm(E)}}return rc({width:g,height:p,x:d,y:h})}function _c(e,n){const r=jc(e).scrollLeft;return n?n.left+r:ul(Cr(e)).left+r}function Kw(e,n){const r=e.getBoundingClientRect(),l=r.left+n.scrollLeft-_c(e,r),o=r.top+n.scrollTop;return{x:l,y:o}}function F_(e){let{elements:n,rect:r,offsetParent:l,strategy:o}=e;const s=o==="fixed",c=Cr(l),f=n?Mc(n.floating):!1;if(l===c||f&&s)return r;let d={scrollLeft:0,scrollTop:0},h=xr(1);const g=xr(0),p=Qr(l);if((p||!p&&!s)&&((wa(l)!=="body"||Wo(c))&&(d=jc(l)),p)){const w=ul(l);h=ca(l),g.x=w.x+l.clientLeft,g.y=w.y+l.clientTop}const b=c&&!p&&!s?Kw(c,d):xr(0);return{width:r.width*h.x,height:r.height*h.y,x:r.x*h.x-d.scrollLeft*h.x+g.x+b.x,y:r.y*h.y-d.scrollTop*h.y+g.y+b.y}}function q_(e){return Array.from(e.getClientRects())}function G_(e){const n=Cr(e),r=jc(e),l=e.ownerDocument.body,o=kn(n.scrollWidth,n.clientWidth,l.scrollWidth,l.clientWidth),s=kn(n.scrollHeight,n.clientHeight,l.scrollHeight,l.clientHeight);let c=-r.scrollLeft+_c(e);const f=-r.scrollTop;return ir(l).direction==="rtl"&&(c+=kn(n.clientWidth,l.clientWidth)-o),{width:o,height:s,x:c,y:f}}const Gb=25;function V_(e,n){const r=Nn(e),l=Cr(e),o=r.visualViewport;let s=l.clientWidth,c=l.clientHeight,f=0,d=0;if(o){s=o.width,c=o.height;const g=up();(!g||g&&n==="fixed")&&(f=o.offsetLeft,d=o.offsetTop)}const h=_c(l);if(h<=0){const g=l.ownerDocument,p=g.body,b=getComputedStyle(p),w=g.compatMode==="CSS1Compat"&&parseFloat(b.marginLeft)+parseFloat(b.marginRight)||0,E=Math.abs(l.clientWidth-p.clientWidth-w);E<=Gb&&(s-=E)}else h<=Gb&&(s+=h);return{width:s,height:c,x:f,y:d}}function $_(e,n){const r=ul(e,!0,n==="fixed"),l=r.top+e.clientTop,o=r.left+e.clientLeft,s=Qr(e)?ca(e):xr(1),c=e.clientWidth*s.x,f=e.clientHeight*s.y,d=o*s.x,h=l*s.y;return{width:c,height:f,x:d,y:h}}function Vb(e,n,r){let l;if(n==="viewport")l=V_(e,r);else if(n==="document")l=G_(Cr(e));else if(rr(n))l=$_(n,r);else{const o=Xw(e);l={x:n.x-o.x,y:n.y-o.y,width:n.width,height:n.height}}return rc(l)}function Qw(e,n){const r=_i(e);return r===n||!rr(r)||ma(r)?!1:ir(r).position==="fixed"||Qw(r,n)}function Y_(e,n){const r=n.get(e);if(r)return r;let l=Po(e,[],!1).filter(f=>rr(f)&&wa(f)!=="body"),o=null;const s=ir(e).position==="fixed";let c=s?_i(e):e;for(;rr(c)&&!ma(c);){const f=ir(c),d=sp(c);!d&&f.position==="fixed"&&(o=null),(s?!d&&!o:!d&&f.position==="static"&&!!o&&(o.position==="absolute"||o.position==="fixed")||Wo(c)&&!d&&Qw(e,c))?l=l.filter(g=>g!==c):o=f,c=_i(c)}return n.set(e,l),l}function X_(e){let{element:n,boundary:r,rootBoundary:l,strategy:o}=e;const c=[...r==="clippingAncestors"?Mc(n)?[]:Y_(n,this._c):[].concat(r),l],f=Vb(n,c[0],o);let d=f.top,h=f.right,g=f.bottom,p=f.left;for(let b=1;b<c.length;b++){const w=Vb(n,c[b],o);d=kn(w.top,d),h=ji(w.right,h),g=ji(w.bottom,g),p=kn(w.left,p)}return{width:h-p,height:g-d,x:p,y:d}}function K_(e){const{width:n,height:r}=Yw(e);return{width:n,height:r}}function Q_(e,n,r){const l=Qr(n),o=Cr(n),s=r==="fixed",c=ul(e,!0,s,n);let f={scrollLeft:0,scrollTop:0};const d=xr(0);function h(){d.x=_c(o)}if(l||!l&&!s)if((wa(n)!=="body"||Wo(o))&&(f=jc(n)),l){const w=ul(n,!0,s,n);d.x=w.x+n.clientLeft,d.y=w.y+n.clientTop}else o&&h();s&&!l&&o&&h();const g=o&&!l&&!s?Kw(o,f):xr(0),p=c.left+f.scrollLeft-d.x-g.x,b=c.top+f.scrollTop-d.y-g.y;return{x:p,y:b,width:c.width,height:c.height}}function Ah(e){return ir(e).position==="static"}function $b(e,n){if(!Qr(e)||ir(e).position==="fixed")return null;if(n)return n(e);let r=e.offsetParent;return Cr(e)===r&&(r=r.ownerDocument.body),r}function Zw(e,n){const r=Nn(e);if(Mc(e))return r;if(!Qr(e)){let o=_i(e);for(;o&&!ma(o);){if(rr(o)&&!Ah(o))return o;o=_i(o)}return r}let l=$b(e,n);for(;l&&L_(l)&&Ah(l);)l=$b(l,n);return l&&ma(l)&&Ah(l)&&!sp(l)?r:l||I_(e)||r}const Z_=async function(e){const n=this.getOffsetParent||Zw,r=this.getDimensions,l=await r(e.floating);return{reference:Q_(e.reference,await n(e.floating),e.strategy),floating:{x:0,y:0,width:l.width,height:l.height}}};function W_(e){return ir(e).direction==="rtl"}const J_={convertOffsetParentRelativeRectToViewportRelativeRect:F_,getDocumentElement:Cr,getClippingRect:X_,getOffsetParent:Zw,getElementRects:Z_,getClientRects:q_,getDimensions:K_,getScale:ca,isElement:rr,isRTL:W_};function Ww(e,n){return e.x===n.x&&e.y===n.y&&e.width===n.width&&e.height===n.height}function e3(e,n){let r=null,l;const o=Cr(e);function s(){var f;clearTimeout(l),(f=r)==null||f.disconnect(),r=null}function c(f,d){f===void 0&&(f=!1),d===void 0&&(d=1),s();const h=e.getBoundingClientRect(),{left:g,top:p,width:b,height:w}=h;if(f||n(),!b||!w)return;const E=ju(p),C=ju(o.clientWidth-(g+b)),k=ju(o.clientHeight-(p+w)),N=ju(g),M={rootMargin:-E+"px "+-C+"px "+-k+"px "+-N+"px",threshold:kn(0,ji(1,d))||1};let z=!0;function U(_){const P=_[0].intersectionRatio;if(P!==d){if(!z)return c();P?c(!1,P):l=setTimeout(()=>{c(!1,1e-7)},1e3)}P===1&&!Ww(h,e.getBoundingClientRect())&&c(),z=!1}try{r=new IntersectionObserver(U,{...M,root:o.ownerDocument})}catch{r=new IntersectionObserver(U,M)}r.observe(e)}return c(!0),s}function t3(e,n,r,l){l===void 0&&(l={});const{ancestorScroll:o=!0,ancestorResize:s=!0,elementResize:c=typeof ResizeObserver=="function",layoutShift:f=typeof IntersectionObserver=="function",animationFrame:d=!1}=l,h=cp(e),g=o||s?[...h?Po(h):[],...n?Po(n):[]]:[];g.forEach(N=>{o&&N.addEventListener("scroll",r,{passive:!0}),s&&N.addEventListener("resize",r)});const p=h&&f?e3(h,r):null;let b=-1,w=null;c&&(w=new ResizeObserver(N=>{let[j]=N;j&&j.target===h&&w&&n&&(w.unobserve(n),cancelAnimationFrame(b),b=requestAnimationFrame(()=>{var M;(M=w)==null||M.observe(n)})),r()}),h&&!d&&w.observe(h),n&&w.observe(n));let E,C=d?ul(e):null;d&&k();function k(){const N=ul(e);C&&!Ww(C,N)&&r(),C=N,E=requestAnimationFrame(k)}return r(),()=>{var N;g.forEach(j=>{o&&j.removeEventListener("scroll",r),s&&j.removeEventListener("resize",r)}),p==null||p(),(N=w)==null||N.disconnect(),w=null,d&&cancelAnimationFrame(E)}}const n3=__,r3=O_,i3=A_,l3=z_,a3=M_,Yb=T_,o3=D_,s3=(e,n,r)=>{const l=new Map,o={platform:J_,...r},s={...o.platform,_c:l};return R_(e,n,{...o,platform:s})};var u3=typeof document<"u",c3=function(){},Yu=u3?v.useLayoutEffect:c3;function ic(e,n){if(e===n)return!0;if(typeof e!=typeof n)return!1;if(typeof e=="function"&&e.toString()===n.toString())return!0;let r,l,o;if(e&&n&&typeof e=="object"){if(Array.isArray(e)){if(r=e.length,r!==n.length)return!1;for(l=r;l--!==0;)if(!ic(e[l],n[l]))return!1;return!0}if(o=Object.keys(e),r=o.length,r!==Object.keys(n).length)return!1;for(l=r;l--!==0;)if(!{}.hasOwnProperty.call(n,o[l]))return!1;for(l=r;l--!==0;){const s=o[l];if(!(s==="_owner"&&e.$$typeof)&&!ic(e[s],n[s]))return!1}return!0}return e!==e&&n!==n}function Jw(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Xb(e,n){const r=Jw(e);return Math.round(n*r)/r}function Mh(e){const n=v.useRef(e);return Yu(()=>{n.current=e}),n}function f3(e){e===void 0&&(e={});const{placement:n="bottom",strategy:r="absolute",middleware:l=[],platform:o,elements:{reference:s,floating:c}={},transform:f=!0,whileElementsMounted:d,open:h}=e,[g,p]=v.useState({x:0,y:0,strategy:r,placement:n,middlewareData:{},isPositioned:!1}),[b,w]=v.useState(l);ic(b,l)||w(l);const[E,C]=v.useState(null),[k,N]=v.useState(null),j=v.useCallback($=>{$!==_.current&&(_.current=$,C($))},[]),M=v.useCallback($=>{$!==P.current&&(P.current=$,N($))},[]),z=s||E,U=c||k,_=v.useRef(null),P=v.useRef(null),F=v.useRef(g),ne=d!=null,I=Mh(d),J=Mh(o),te=Mh(h),ce=v.useCallback(()=>{if(!_.current||!P.current)return;const $={placement:n,strategy:r,middleware:b};J.current&&($.platform=J.current),s3(_.current,P.current,$).then(Q=>{const T={...Q,isPositioned:te.current!==!1};le.current&&!ic(F.current,T)&&(F.current=T,Ai.flushSync(()=>{p(T)}))})},[b,n,r,J,te]);Yu(()=>{h===!1&&F.current.isPositioned&&(F.current.isPositioned=!1,p($=>({...$,isPositioned:!1})))},[h]);const le=v.useRef(!1);Yu(()=>(le.current=!0,()=>{le.current=!1}),[]),Yu(()=>{if(z&&(_.current=z),U&&(P.current=U),z&&U){if(I.current)return I.current(z,U,ce);ce()}},[z,U,ce,I,ne]);const ee=v.useMemo(()=>({reference:_,floating:P,setReference:j,setFloating:M}),[j,M]),B=v.useMemo(()=>({reference:z,floating:U}),[z,U]),X=v.useMemo(()=>{const $={position:r,left:0,top:0};if(!B.floating)return $;const Q=Xb(B.floating,g.x),T=Xb(B.floating,g.y);return f?{...$,transform:"translate("+Q+"px, "+T+"px)",...Jw(B.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:Q,top:T}},[r,f,B.floating,g.x,g.y]);return v.useMemo(()=>({...g,update:ce,refs:ee,elements:B,floatingStyles:X}),[g,ce,ee,B,X])}const d3=e=>{function n(r){return{}.hasOwnProperty.call(r,"current")}return{name:"arrow",options:e,fn(r){const{element:l,padding:o}=typeof e=="function"?e(r):e;return l&&n(l)?l.current!=null?Yb({element:l.current,padding:o}).fn(r):{}:l?Yb({element:l,padding:o}).fn(r):{}}}},h3=(e,n)=>{const r=n3(e);return{name:r.name,fn:r.fn,options:[e,n]}},m3=(e,n)=>{const r=r3(e);return{name:r.name,fn:r.fn,options:[e,n]}},p3=(e,n)=>({fn:o3(e).fn,options:[e,n]}),g3=(e,n)=>{const r=i3(e);return{name:r.name,fn:r.fn,options:[e,n]}},y3=(e,n)=>{const r=l3(e);return{name:r.name,fn:r.fn,options:[e,n]}},x3=(e,n)=>{const r=a3(e);return{name:r.name,fn:r.fn,options:[e,n]}},v3=(e,n)=>{const r=d3(e);return{name:r.name,fn:r.fn,options:[e,n]}};var b3="Arrow",eS=v.forwardRef((e,n)=>{const{children:r,width:l=10,height:o=5,...s}=e;return x.jsx(ct.svg,{...s,ref:n,width:l,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?r:x.jsx("polygon",{points:"0,0 30,0 15,10"})})});eS.displayName=b3;var w3=eS;function S3(e){const[n,r]=v.useState(void 0);return Mi(()=>{if(e){r({width:e.offsetWidth,height:e.offsetHeight});const l=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const s=o[0];let c,f;if("borderBoxSize"in s){const d=s.borderBoxSize,h=Array.isArray(d)?d[0]:d;c=h.inlineSize,f=h.blockSize}else c=e.offsetWidth,f=e.offsetHeight;r({width:c,height:f})});return l.observe(e,{box:"border-box"}),()=>l.unobserve(e)}else r(void 0)},[e]),n}var fp="Popper",[tS,Sa]=zi(fp),[C3,nS]=tS(fp),rS=e=>{const{__scopePopper:n,children:r}=e,[l,o]=v.useState(null);return x.jsx(C3,{scope:n,anchor:l,onAnchorChange:o,children:r})};rS.displayName=fp;var iS="PopperAnchor",lS=v.forwardRef((e,n)=>{const{__scopePopper:r,virtualRef:l,...o}=e,s=nS(iS,r),c=v.useRef(null),f=bt(n,c),d=v.useRef(null);return v.useEffect(()=>{const h=d.current;d.current=(l==null?void 0:l.current)||c.current,h!==d.current&&s.onAnchorChange(d.current)}),l?null:x.jsx(ct.div,{...o,ref:f})});lS.displayName=iS;var dp="PopperContent",[E3,k3]=tS(dp),aS=v.forwardRef((e,n)=>{var me,Ne,he,Ce,lt,nt;const{__scopePopper:r,side:l="bottom",sideOffset:o=0,align:s="center",alignOffset:c=0,arrowPadding:f=0,avoidCollisions:d=!0,collisionBoundary:h=[],collisionPadding:g=0,sticky:p="partial",hideWhenDetached:b=!1,updatePositionStrategy:w="optimized",onPlaced:E,...C}=e,k=nS(dp,r),[N,j]=v.useState(null),M=bt(n,st=>j(st)),[z,U]=v.useState(null),_=S3(z),P=(_==null?void 0:_.width)??0,F=(_==null?void 0:_.height)??0,ne=l+(s!=="center"?"-"+s:""),I=typeof g=="number"?g:{top:0,right:0,bottom:0,left:0,...g},J=Array.isArray(h)?h:[h],te=J.length>0,ce={padding:I,boundary:J.filter(R3),altBoundary:te},{refs:le,floatingStyles:ee,placement:B,isPositioned:X,middlewareData:$}=f3({strategy:"fixed",placement:ne,whileElementsMounted:(...st)=>t3(...st,{animationFrame:w==="always"}),elements:{reference:k.anchor},middleware:[h3({mainAxis:o+F,alignmentAxis:c}),d&&m3({mainAxis:!0,crossAxis:!1,limiter:p==="partial"?p3():void 0,...ce}),d&&g3({...ce}),y3({...ce,apply:({elements:st,rects:Ye,availableWidth:Lt,availableHeight:Pt})=>{const{width:Yn,height:Xn}=Ye.reference,Bt=st.floating.style;Bt.setProperty("--radix-popper-available-width",`${Lt}px`),Bt.setProperty("--radix-popper-available-height",`${Pt}px`),Bt.setProperty("--radix-popper-anchor-width",`${Yn}px`),Bt.setProperty("--radix-popper-anchor-height",`${Xn}px`)}}),z&&v3({element:z,padding:f}),T3({arrowWidth:P,arrowHeight:F}),b&&x3({strategy:"referenceHidden",...ce})]}),[Q,T]=uS(B),O=br(E);Mi(()=>{X&&(O==null||O())},[X,O]);const D=(me=$.arrow)==null?void 0:me.x,A=(Ne=$.arrow)==null?void 0:Ne.y,Z=((he=$.arrow)==null?void 0:he.centerOffset)!==0,[fe,ue]=v.useState();return Mi(()=>{N&&ue(window.getComputedStyle(N).zIndex)},[N]),x.jsx("div",{ref:le.setFloating,"data-radix-popper-content-wrapper":"",style:{...ee,transform:X?ee.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:fe,"--radix-popper-transform-origin":[(Ce=$.transformOrigin)==null?void 0:Ce.x,(lt=$.transformOrigin)==null?void 0:lt.y].join(" "),...((nt=$.hide)==null?void 0:nt.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:x.jsx(E3,{scope:r,placedSide:Q,onArrowChange:U,arrowX:D,arrowY:A,shouldHideArrow:Z,children:x.jsx(ct.div,{"data-side":Q,"data-align":T,...C,ref:M,style:{...C.style,animation:X?void 0:"none"}})})})});aS.displayName=dp;var oS="PopperArrow",N3={top:"bottom",right:"left",bottom:"top",left:"right"},sS=v.forwardRef(function(n,r){const{__scopePopper:l,...o}=n,s=k3(oS,l),c=N3[s.placedSide];return x.jsx("span",{ref:s.onArrowChange,style:{position:"absolute",left:s.arrowX,top:s.arrowY,[c]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[s.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[s.placedSide],visibility:s.shouldHideArrow?"hidden":void 0},children:x.jsx(w3,{...o,ref:r,style:{...o.style,display:"block"}})})});sS.displayName=oS;function R3(e){return e!==null}var T3=e=>({name:"transformOrigin",options:e,fn(n){var k,N,j;const{placement:r,rects:l,middlewareData:o}=n,c=((k=o.arrow)==null?void 0:k.centerOffset)!==0,f=c?0:e.arrowWidth,d=c?0:e.arrowHeight,[h,g]=uS(r),p={start:"0%",center:"50%",end:"100%"}[g],b=(((N=o.arrow)==null?void 0:N.x)??0)+f/2,w=(((j=o.arrow)==null?void 0:j.y)??0)+d/2;let E="",C="";return h==="bottom"?(E=c?p:`${b}px`,C=`${-d}px`):h==="top"?(E=c?p:`${b}px`,C=`${l.floating.height+d}px`):h==="right"?(E=`${-d}px`,C=c?p:`${w}px`):h==="left"&&(E=`${l.floating.width+d}px`,C=c?p:`${w}px`),{data:{x:E,y:C}}}});function uS(e){const[n,r="center"]=e.split("-");return[n,r]}var hp=rS,Oc=lS,mp=aS,pp=sS,A3=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),M3="VisuallyHidden",cS=v.forwardRef((e,n)=>x.jsx(ct.span,{...e,ref:n,style:{...A3,...e.style}}));cS.displayName=M3;var j3=cS,[Dc]=zi("Tooltip",[Sa]),zc=Sa(),fS="TooltipProvider",_3=700,hm="tooltip.open",[O3,gp]=Dc(fS),dS=e=>{const{__scopeTooltip:n,delayDuration:r=_3,skipDelayDuration:l=300,disableHoverableContent:o=!1,children:s}=e,c=v.useRef(!0),f=v.useRef(!1),d=v.useRef(0);return v.useEffect(()=>{const h=d.current;return()=>window.clearTimeout(h)},[]),x.jsx(O3,{scope:n,isOpenDelayedRef:c,delayDuration:r,onOpen:v.useCallback(()=>{window.clearTimeout(d.current),c.current=!1},[]),onClose:v.useCallback(()=>{window.clearTimeout(d.current),d.current=window.setTimeout(()=>c.current=!0,l)},[l]),isPointerInTransitRef:f,onPointerInTransitChange:v.useCallback(h=>{f.current=h},[]),disableHoverableContent:o,children:s})};dS.displayName=fS;var Bo="Tooltip",[D3,Jo]=Dc(Bo),hS=e=>{const{__scopeTooltip:n,children:r,open:l,defaultOpen:o,onOpenChange:s,disableHoverableContent:c,delayDuration:f}=e,d=gp(Bo,e.__scopeTooltip),h=zc(n),[g,p]=v.useState(null),b=sa(),w=v.useRef(0),E=c??d.disableHoverableContent,C=f??d.delayDuration,k=v.useRef(!1),[N,j]=Sc({prop:l,defaultProp:o??!1,onChange:P=>{P?(d.onOpen(),document.dispatchEvent(new CustomEvent(hm))):d.onClose(),s==null||s(P)},caller:Bo}),M=v.useMemo(()=>N?k.current?"delayed-open":"instant-open":"closed",[N]),z=v.useCallback(()=>{window.clearTimeout(w.current),w.current=0,k.current=!1,j(!0)},[j]),U=v.useCallback(()=>{window.clearTimeout(w.current),w.current=0,j(!1)},[j]),_=v.useCallback(()=>{window.clearTimeout(w.current),w.current=window.setTimeout(()=>{k.current=!0,j(!0),w.current=0},C)},[C,j]);return v.useEffect(()=>()=>{w.current&&(window.clearTimeout(w.current),w.current=0)},[]),x.jsx(hp,{...h,children:x.jsx(D3,{scope:n,contentId:b,open:N,stateAttribute:M,trigger:g,onTriggerChange:p,onTriggerEnter:v.useCallback(()=>{d.isOpenDelayedRef.current?_():z()},[d.isOpenDelayedRef,_,z]),onTriggerLeave:v.useCallback(()=>{E?U():(window.clearTimeout(w.current),w.current=0)},[U,E]),onOpen:z,onClose:U,disableHoverableContent:E,children:r})})};hS.displayName=Bo;var mm="TooltipTrigger",mS=v.forwardRef((e,n)=>{const{__scopeTooltip:r,...l}=e,o=Jo(mm,r),s=gp(mm,r),c=zc(r),f=v.useRef(null),d=bt(n,f,o.onTriggerChange),h=v.useRef(!1),g=v.useRef(!1),p=v.useCallback(()=>h.current=!1,[]);return v.useEffect(()=>()=>document.removeEventListener("pointerup",p),[p]),x.jsx(Oc,{asChild:!0,...c,children:x.jsx(ct.button,{"aria-describedby":o.open?o.contentId:void 0,"data-state":o.stateAttribute,...l,ref:d,onPointerMove:Te(e.onPointerMove,b=>{b.pointerType!=="touch"&&!g.current&&!s.isPointerInTransitRef.current&&(o.onTriggerEnter(),g.current=!0)}),onPointerLeave:Te(e.onPointerLeave,()=>{o.onTriggerLeave(),g.current=!1}),onPointerDown:Te(e.onPointerDown,()=>{o.open&&o.onClose(),h.current=!0,document.addEventListener("pointerup",p,{once:!0})}),onFocus:Te(e.onFocus,()=>{h.current||o.onOpen()}),onBlur:Te(e.onBlur,o.onClose),onClick:Te(e.onClick,o.onClose)})})});mS.displayName=mm;var yp="TooltipPortal",[z3,L3]=Dc(yp,{forceMount:void 0}),pS=e=>{const{__scopeTooltip:n,forceMount:r,children:l,container:o}=e,s=Jo(yp,n);return x.jsx(z3,{scope:n,forceMount:r,children:x.jsx($n,{present:r||s.open,children:x.jsx(Zo,{asChild:!0,container:o,children:l})})})};pS.displayName=yp;var pa="TooltipContent",gS=v.forwardRef((e,n)=>{const r=L3(pa,e.__scopeTooltip),{forceMount:l=r.forceMount,side:o="top",...s}=e,c=Jo(pa,e.__scopeTooltip);return x.jsx($n,{present:l||c.open,children:c.disableHoverableContent?x.jsx(yS,{side:o,...s,ref:n}):x.jsx(P3,{side:o,...s,ref:n})})}),P3=v.forwardRef((e,n)=>{const r=Jo(pa,e.__scopeTooltip),l=gp(pa,e.__scopeTooltip),o=v.useRef(null),s=bt(n,o),[c,f]=v.useState(null),{trigger:d,onClose:h}=r,g=o.current,{onPointerInTransitChange:p}=l,b=v.useCallback(()=>{f(null),p(!1)},[p]),w=v.useCallback((E,C)=>{const k=E.currentTarget,N={x:E.clientX,y:E.clientY},j=F3(N,k.getBoundingClientRect()),M=q3(N,j),z=G3(C.getBoundingClientRect()),U=$3([...M,...z]);f(U),p(!0)},[p]);return v.useEffect(()=>()=>b(),[b]),v.useEffect(()=>{if(d&&g){const E=k=>w(k,g),C=k=>w(k,d);return d.addEventListener("pointerleave",E),g.addEventListener("pointerleave",C),()=>{d.removeEventListener("pointerleave",E),g.removeEventListener("pointerleave",C)}}},[d,g,w,b]),v.useEffect(()=>{if(c){const E=C=>{const k=C.target,N={x:C.clientX,y:C.clientY},j=(d==null?void 0:d.contains(k))||(g==null?void 0:g.contains(k)),M=!V3(N,c);j?b():M&&(b(),h())};return document.addEventListener("pointermove",E),()=>document.removeEventListener("pointermove",E)}},[d,g,c,h,b]),x.jsx(yS,{...e,ref:s})}),[B3,I3]=Dc(Bo,{isInside:!1}),U3=hA("TooltipContent"),yS=v.forwardRef((e,n)=>{const{__scopeTooltip:r,children:l,"aria-label":o,onEscapeKeyDown:s,onPointerDownOutside:c,...f}=e,d=Jo(pa,r),h=zc(r),{onClose:g}=d;return v.useEffect(()=>(document.addEventListener(hm,g),()=>document.removeEventListener(hm,g)),[g]),v.useEffect(()=>{if(d.trigger){const p=b=>{const w=b.target;w!=null&&w.contains(d.trigger)&&g()};return window.addEventListener("scroll",p,{capture:!0}),()=>window.removeEventListener("scroll",p,{capture:!0})}},[d.trigger,g]),x.jsx(Qo,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:s,onPointerDownOutside:c,onFocusOutside:p=>p.preventDefault(),onDismiss:g,children:x.jsxs(mp,{"data-state":d.stateAttribute,...h,...f,ref:n,style:{...f.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[x.jsx(U3,{children:l}),x.jsx(B3,{scope:r,isInside:!0,children:x.jsx(j3,{id:d.contentId,role:"tooltip",children:o||l})})]})})});gS.displayName=pa;var xS="TooltipArrow",H3=v.forwardRef((e,n)=>{const{__scopeTooltip:r,...l}=e,o=zc(r);return I3(xS,r).isInside?null:x.jsx(pp,{...o,...l,ref:n})});H3.displayName=xS;function F3(e,n){const r=Math.abs(n.top-e.y),l=Math.abs(n.bottom-e.y),o=Math.abs(n.right-e.x),s=Math.abs(n.left-e.x);switch(Math.min(r,l,o,s)){case s:return"left";case o:return"right";case r:return"top";case l:return"bottom";default:throw new Error("unreachable")}}function q3(e,n,r=5){const l=[];switch(n){case"top":l.push({x:e.x-r,y:e.y+r},{x:e.x+r,y:e.y+r});break;case"bottom":l.push({x:e.x-r,y:e.y-r},{x:e.x+r,y:e.y-r});break;case"left":l.push({x:e.x+r,y:e.y-r},{x:e.x+r,y:e.y+r});break;case"right":l.push({x:e.x-r,y:e.y-r},{x:e.x-r,y:e.y+r});break}return l}function G3(e){const{top:n,right:r,bottom:l,left:o}=e;return[{x:o,y:n},{x:r,y:n},{x:r,y:l},{x:o,y:l}]}function V3(e,n){const{x:r,y:l}=e;let o=!1;for(let s=0,c=n.length-1;s<n.length;c=s++){const f=n[s],d=n[c],h=f.x,g=f.y,p=d.x,b=d.y;g>l!=b>l&&r<(p-h)*(l-g)/(b-g)+h&&(o=!o)}return o}function $3(e){const n=e.slice();return n.sort((r,l)=>r.x<l.x?-1:r.x>l.x?1:r.y<l.y?-1:r.y>l.y?1:0),Y3(n)}function Y3(e){if(e.length<=1)return e.slice();const n=[];for(let l=0;l<e.length;l++){const o=e[l];for(;n.length>=2;){const s=n[n.length-1],c=n[n.length-2];if((s.x-c.x)*(o.y-c.y)>=(s.y-c.y)*(o.x-c.x))n.pop();else break}n.push(o)}n.pop();const r=[];for(let l=e.length-1;l>=0;l--){const o=e[l];for(;r.length>=2;){const s=r[r.length-1],c=r[r.length-2];if((s.x-c.x)*(o.y-c.y)>=(s.y-c.y)*(o.x-c.x))r.pop();else break}r.push(o)}return r.pop(),n.length===1&&r.length===1&&n[0].x===r[0].x&&n[0].y===r[0].y?n:n.concat(r)}var X3=dS,K3=hS,Q3=mS,Z3=pS,vS=gS;const W3=X3,lc=K3,ac=Q3,Io=v.forwardRef(({className:e,sideOffset:n=4,...r},l)=>x.jsx(Z3,{children:x.jsx(vS,{ref:l,sideOffset:n,className:ye("z-50 overflow-hidden rounded-md bg-card text-card-foreground border border-border px-3 py-1.5 text-xs animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...r})}));Io.displayName=vS.displayName;const J3="0.4.0",e4={version:J3},Zt="Kanna",Kb="kanna",bS=`kanna/${e4.version}`,t4="[kanna]",n4=`~/${Zt}`;function _u(e){return e?`${Kb} ${e}`:Kb}const Lc=({children:e,className:n,shimmerWidth:r=100,animate:l=!0,...o})=>x.jsx("span",{style:{"--shiny-width":`${Math.min(r,100)}px`},className:ye("mx-auto max-w-md text-foreground/50",l?["animate-shiny-text [background-size:var(--shiny-width)_100%] bg-clip-text [background-position:0_0] bg-no-repeat [transition:background-position_1s_cubic-bezier(.6,.6,0,1)_infinite]","bg-gradient-to-r from-transparent via-black/80 via-50% to-transparent dark:via-white/80"]:["text-neutral"],n),...o,children:e});function pm(e){return e.split(/[\s_-]+/).filter(Boolean).map(n=>n.charAt(0).toUpperCase()+n.slice(1).toLowerCase()).join(" ")}const r4=[/^(?:\/usr\/bin\/env\s+)?(?:\/bin\/)?(?:bash|zsh|sh)\s+(?:-[a-zA-Z]*c|-c)\s+(['"])([\s\S]*)\1$/,/^(?:\/usr\/bin\/env\s+)?(?:\/bin\/)?(?:bash|zsh|sh)\s+(?:-[a-zA-Z]*c|-c)\s+(.+)$/,/^(?:\/usr\/bin\/env\s+)?(?:cmd(?:\.exe)?)\s+\/c\s+(['"])([\s\S]*)\1$/i,/^(?:\/usr\/bin\/env\s+)?(?:cmd(?:\.exe)?)\s+\/c\s+(.+)$/i,/^(?:\/usr\/bin\/env\s+)?(?:powershell(?:\.exe)?|pwsh)\s+(?:-NoProfile\s+)?-Command\s+(['"])([\s\S]*)\1$/i,/^(?:\/usr\/bin\/env\s+)?(?:powershell(?:\.exe)?|pwsh)\s+(?:-NoProfile\s+)?-Command\s+(.+)$/i];function i4(e){const n=e.trim();for(const r of r4){const l=n.match(r);if(!l)continue;const o=(l[2]??l[1]??"").trim();if(o)return o}return n}function wS(e){return e.split("/").pop()||e}function l4(e,n){if(e===void 0)return null;const r=Math.max(0,n-e),l=6e4,o=60*l,s=24*o,c=7*s;return r<l?"now":r<o?`${Math.floor(r/l)}m`:r<s?`${Math.floor(r/o)}h`:r<c?`${Math.floor(r/s)}d`:`${Math.floor(r/c)}w`}const a4=new Set(["starting","running"]);function o4({chat:e,activeChatId:n,nowMs:r,onSelectChat:l,onDeleteChat:o}){const s=l4(e.lastMessageAt,r);return x.jsxs("div",{"data-chat-id":vb(e.chatId),className:ye("group flex items-center gap-2 pl-2.5 pr-0.5 py-0.5 rounded-lg cursor-pointer border-border/0 hover:border-border hover:bg-muted/20 active:scale-[0.985] border transition-all",n===vb(e.chatId)?"bg-muted hover:bg-muted border-border":"border-border/0 dark:hover:border-slate-400/10 "),onClick:()=>l(e.chatId),children:[a4.has(e.status)?x.jsx(Li,{className:"size-3.5 flex-shrink-0 animate-spin text-muted-foreground"}):e.status==="waiting_for_user"?x.jsx("div",{className:"relative ",children:x.jsxs("div",{className:" rounded-full z-0 size-3.5 flex items-center justify-center ",children:[x.jsx("div",{className:"absolute rounded-full z-0 size-2.5 bg-blue-400/80 animate-ping"}),x.jsx("div",{className:" rounded-full z-0 size-2.5 bg-blue-400 ring-2 ring-muted/20 dark:ring-muted/50"})]})}):null,x.jsx("span",{className:"text-sm truncate flex-1 translate-y-[-0.5px]",children:e.status!=="idle"&&e.status!=="waiting_for_user"?x.jsx(Lc,{animate:e.status==="running",shimmerWidth:Math.max(20,e.title.length*3),children:e.title}):e.title}),x.jsxs("div",{className:"relative h-7 w-7 mr-[2px] shrink-0",children:[s?x.jsx("span",{className:"hidden md:flex absolute inset-0 items-center justify-end pr-1 text-[11px] text-muted-foreground opacity-50 transition-opacity group-hover:opacity-0",children:s}):null,x.jsx($e,{variant:"ghost",size:"icon",className:ye("absolute inset-0 h-7 w-7 opacity-100 cursor-pointer rounded-sm hover:!bg-transparent !border-0",s?"md:opacity-0 md:group-hover:opacity-100":"opacity-100 md:opacity-0 md:group-hover:opacity-100"),onClick:c=>{c.stopPropagation(),o(e.chatId)},title:"Delete chat",children:x.jsx(qM,{className:"size-3.5"})})]})]},e._id)}function s4(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return v.useMemo(()=>l=>{n.forEach(o=>o(l))},n)}const Pc=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function Ca(e){const n=Object.prototype.toString.call(e);return n==="[object Window]"||n==="[object global]"}function xp(e){return"nodeType"in e}function hn(e){var n,r;return e?Ca(e)?e:xp(e)&&(n=(r=e.ownerDocument)==null?void 0:r.defaultView)!=null?n:window:window}function vp(e){const{Document:n}=hn(e);return e instanceof n}function es(e){return Ca(e)?!1:e instanceof hn(e).HTMLElement}function SS(e){return e instanceof hn(e).SVGElement}function Ea(e){return e?Ca(e)?e.document:xp(e)?vp(e)?e:es(e)||SS(e)?e.ownerDocument:document:document:document}const wr=Pc?v.useLayoutEffect:v.useEffect;function bp(e){const n=v.useRef(e);return wr(()=>{n.current=e}),v.useCallback(function(){for(var r=arguments.length,l=new Array(r),o=0;o<r;o++)l[o]=arguments[o];return n.current==null?void 0:n.current(...l)},[])}function u4(){const e=v.useRef(null),n=v.useCallback((l,o)=>{e.current=setInterval(l,o)},[]),r=v.useCallback(()=>{e.current!==null&&(clearInterval(e.current),e.current=null)},[]);return[n,r]}function Uo(e,n){n===void 0&&(n=[e]);const r=v.useRef(e);return wr(()=>{r.current!==e&&(r.current=e)},n),r}function ts(e,n){const r=v.useRef();return v.useMemo(()=>{const l=e(r.current);return r.current=l,l},[...n])}function oc(e){const n=bp(e),r=v.useRef(null),l=v.useCallback(o=>{o!==r.current&&(n==null||n(o,r.current)),r.current=o},[]);return[r,l]}function gm(e){const n=v.useRef();return v.useEffect(()=>{n.current=e},[e]),n.current}let jh={};function ns(e,n){return v.useMemo(()=>{if(n)return n;const r=jh[e]==null?0:jh[e]+1;return jh[e]=r,e+"-"+r},[e,n])}function CS(e){return function(n){for(var r=arguments.length,l=new Array(r>1?r-1:0),o=1;o<r;o++)l[o-1]=arguments[o];return l.reduce((s,c)=>{const f=Object.entries(c);for(const[d,h]of f){const g=s[d];g!=null&&(s[d]=g+e*h)}return s},{...n})}}const fa=CS(1),sc=CS(-1);function c4(e){return"clientX"in e&&"clientY"in e}function wp(e){if(!e)return!1;const{KeyboardEvent:n}=hn(e.target);return n&&e instanceof n}function f4(e){if(!e)return!1;const{TouchEvent:n}=hn(e.target);return n&&e instanceof n}function ym(e){if(f4(e)){if(e.touches&&e.touches.length){const{clientX:n,clientY:r}=e.touches[0];return{x:n,y:r}}else if(e.changedTouches&&e.changedTouches.length){const{clientX:n,clientY:r}=e.changedTouches[0];return{x:n,y:r}}}return c4(e)?{x:e.clientX,y:e.clientY}:null}const Ho=Object.freeze({Translate:{toString(e){if(!e)return;const{x:n,y:r}=e;return"translate3d("+(n?Math.round(n):0)+"px, "+(r?Math.round(r):0)+"px, 0)"}},Scale:{toString(e){if(!e)return;const{scaleX:n,scaleY:r}=e;return"scaleX("+n+") scaleY("+r+")"}},Transform:{toString(e){if(e)return[Ho.Translate.toString(e),Ho.Scale.toString(e)].join(" ")}},Transition:{toString(e){let{property:n,duration:r,easing:l}=e;return n+" "+r+"ms "+l}}}),Qb="a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";function d4(e){return e.matches(Qb)?e:e.querySelector(Qb)}const h4={display:"none"};function m4(e){let{id:n,value:r}=e;return it.createElement("div",{id:n,style:h4},r)}function p4(e){let{id:n,announcement:r,ariaLiveType:l="assertive"}=e;const o={position:"fixed",top:0,left:0,width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0 0 0 0)",clipPath:"inset(100%)",whiteSpace:"nowrap"};return it.createElement("div",{id:n,style:o,role:"status","aria-live":l,"aria-atomic":!0},r)}function g4(){const[e,n]=v.useState("");return{announce:v.useCallback(l=>{l!=null&&n(l)},[]),announcement:e}}const ES=v.createContext(null);function y4(e){const n=v.useContext(ES);v.useEffect(()=>{if(!n)throw new Error("useDndMonitor must be used within a children of <DndContext>");return n(e)},[e,n])}function x4(){const[e]=v.useState(()=>new Set),n=v.useCallback(l=>(e.add(l),()=>e.delete(l)),[e]);return[v.useCallback(l=>{let{type:o,event:s}=l;e.forEach(c=>{var f;return(f=c[o])==null?void 0:f.call(c,s)})},[e]),n]}const v4={draggable:`
385
+ To pick up a draggable item, press the space bar.
386
+ While dragging, use the arrow keys to move the item.
387
+ Press space again to drop the item in its new position, or press escape to cancel.
388
+ `},b4={onDragStart(e){let{active:n}=e;return"Picked up draggable item "+n.id+"."},onDragOver(e){let{active:n,over:r}=e;return r?"Draggable item "+n.id+" was moved over droppable area "+r.id+".":"Draggable item "+n.id+" is no longer over a droppable area."},onDragEnd(e){let{active:n,over:r}=e;return r?"Draggable item "+n.id+" was dropped over droppable area "+r.id:"Draggable item "+n.id+" was dropped."},onDragCancel(e){let{active:n}=e;return"Dragging was cancelled. Draggable item "+n.id+" was dropped."}};function w4(e){let{announcements:n=b4,container:r,hiddenTextDescribedById:l,screenReaderInstructions:o=v4}=e;const{announce:s,announcement:c}=g4(),f=ns("DndLiveRegion"),[d,h]=v.useState(!1);if(v.useEffect(()=>{h(!0)},[]),y4(v.useMemo(()=>({onDragStart(p){let{active:b}=p;s(n.onDragStart({active:b}))},onDragMove(p){let{active:b,over:w}=p;n.onDragMove&&s(n.onDragMove({active:b,over:w}))},onDragOver(p){let{active:b,over:w}=p;s(n.onDragOver({active:b,over:w}))},onDragEnd(p){let{active:b,over:w}=p;s(n.onDragEnd({active:b,over:w}))},onDragCancel(p){let{active:b,over:w}=p;s(n.onDragCancel({active:b,over:w}))}}),[s,n])),!d)return null;const g=it.createElement(it.Fragment,null,it.createElement(m4,{id:l,value:o.draggable}),it.createElement(p4,{id:f,announcement:c}));return r?Ai.createPortal(g,r):g}var Mt;(function(e){e.DragStart="dragStart",e.DragMove="dragMove",e.DragEnd="dragEnd",e.DragCancel="dragCancel",e.DragOver="dragOver",e.RegisterDroppable="registerDroppable",e.SetDroppableDisabled="setDroppableDisabled",e.UnregisterDroppable="unregisterDroppable"})(Mt||(Mt={}));function uc(){}function Zb(e,n){return v.useMemo(()=>({sensor:e,options:n??{}}),[e,n])}function S4(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return v.useMemo(()=>[...n].filter(l=>l!=null),[...n])}const lr=Object.freeze({x:0,y:0});function C4(e,n){return Math.sqrt(Math.pow(e.x-n.x,2)+Math.pow(e.y-n.y,2))}function E4(e,n){let{data:{value:r}}=e,{data:{value:l}}=n;return r-l}function k4(e,n){let{data:{value:r}}=e,{data:{value:l}}=n;return l-r}function N4(e,n){if(!e||e.length===0)return null;const[r]=e;return r[n]}function Wb(e,n,r){return n===void 0&&(n=e.left),r===void 0&&(r=e.top),{x:n+e.width*.5,y:r+e.height*.5}}const R4=e=>{let{collisionRect:n,droppableRects:r,droppableContainers:l}=e;const o=Wb(n,n.left,n.top),s=[];for(const c of l){const{id:f}=c,d=r.get(f);if(d){const h=C4(Wb(d),o);s.push({id:f,data:{droppableContainer:c,value:h}})}}return s.sort(E4)};function T4(e,n){const r=Math.max(n.top,e.top),l=Math.max(n.left,e.left),o=Math.min(n.left+n.width,e.left+e.width),s=Math.min(n.top+n.height,e.top+e.height),c=o-l,f=s-r;if(l<o&&r<s){const d=n.width*n.height,h=e.width*e.height,g=c*f,p=g/(d+h-g);return Number(p.toFixed(4))}return 0}const A4=e=>{let{collisionRect:n,droppableRects:r,droppableContainers:l}=e;const o=[];for(const s of l){const{id:c}=s,f=r.get(c);if(f){const d=T4(f,n);d>0&&o.push({id:c,data:{droppableContainer:s,value:d}})}}return o.sort(k4)};function M4(e,n,r){return{...e,scaleX:n&&r?n.width/r.width:1,scaleY:n&&r?n.height/r.height:1}}function kS(e,n){return e&&n?{x:e.left-n.left,y:e.top-n.top}:lr}function j4(e){return function(r){for(var l=arguments.length,o=new Array(l>1?l-1:0),s=1;s<l;s++)o[s-1]=arguments[s];return o.reduce((c,f)=>({...c,top:c.top+e*f.y,bottom:c.bottom+e*f.y,left:c.left+e*f.x,right:c.right+e*f.x}),{...r})}}const _4=j4(1);function O4(e){if(e.startsWith("matrix3d(")){const n=e.slice(9,-1).split(/, /);return{x:+n[12],y:+n[13],scaleX:+n[0],scaleY:+n[5]}}else if(e.startsWith("matrix(")){const n=e.slice(7,-1).split(/, /);return{x:+n[4],y:+n[5],scaleX:+n[0],scaleY:+n[3]}}return null}function D4(e,n,r){const l=O4(n);if(!l)return e;const{scaleX:o,scaleY:s,x:c,y:f}=l,d=e.left-c-(1-o)*parseFloat(r),h=e.top-f-(1-s)*parseFloat(r.slice(r.indexOf(" ")+1)),g=o?e.width/o:e.width,p=s?e.height/s:e.height;return{width:g,height:p,top:h,right:d+g,bottom:h+p,left:d}}const z4={ignoreTransform:!1};function ka(e,n){n===void 0&&(n=z4);let r=e.getBoundingClientRect();if(n.ignoreTransform){const{transform:h,transformOrigin:g}=hn(e).getComputedStyle(e);h&&(r=D4(r,h,g))}const{top:l,left:o,width:s,height:c,bottom:f,right:d}=r;return{top:l,left:o,width:s,height:c,bottom:f,right:d}}function Jb(e){return ka(e,{ignoreTransform:!0})}function L4(e){const n=e.innerWidth,r=e.innerHeight;return{top:0,left:0,right:n,bottom:r,width:n,height:r}}function P4(e,n){return n===void 0&&(n=hn(e).getComputedStyle(e)),n.position==="fixed"}function B4(e,n){n===void 0&&(n=hn(e).getComputedStyle(e));const r=/(auto|scroll|overlay)/;return["overflow","overflowX","overflowY"].some(o=>{const s=n[o];return typeof s=="string"?r.test(s):!1})}function Sp(e,n){const r=[];function l(o){if(n!=null&&r.length>=n||!o)return r;if(vp(o)&&o.scrollingElement!=null&&!r.includes(o.scrollingElement))return r.push(o.scrollingElement),r;if(!es(o)||SS(o)||r.includes(o))return r;const s=hn(e).getComputedStyle(o);return o!==e&&B4(o,s)&&r.push(o),P4(o,s)?r:l(o.parentNode)}return e?l(e):r}function NS(e){const[n]=Sp(e,1);return n??null}function _h(e){return!Pc||!e?null:Ca(e)?e:xp(e)?vp(e)||e===Ea(e).scrollingElement?window:es(e)?e:null:null}function RS(e){return Ca(e)?e.scrollX:e.scrollLeft}function TS(e){return Ca(e)?e.scrollY:e.scrollTop}function xm(e){return{x:RS(e),y:TS(e)}}var zt;(function(e){e[e.Forward=1]="Forward",e[e.Backward=-1]="Backward"})(zt||(zt={}));function AS(e){return!Pc||!e?!1:e===document.scrollingElement}function MS(e){const n={x:0,y:0},r=AS(e)?{height:window.innerHeight,width:window.innerWidth}:{height:e.clientHeight,width:e.clientWidth},l={x:e.scrollWidth-r.width,y:e.scrollHeight-r.height},o=e.scrollTop<=n.y,s=e.scrollLeft<=n.x,c=e.scrollTop>=l.y,f=e.scrollLeft>=l.x;return{isTop:o,isLeft:s,isBottom:c,isRight:f,maxScroll:l,minScroll:n}}const I4={x:.2,y:.2};function U4(e,n,r,l,o){let{top:s,left:c,right:f,bottom:d}=r;l===void 0&&(l=10),o===void 0&&(o=I4);const{isTop:h,isBottom:g,isLeft:p,isRight:b}=MS(e),w={x:0,y:0},E={x:0,y:0},C={height:n.height*o.y,width:n.width*o.x};return!h&&s<=n.top+C.height?(w.y=zt.Backward,E.y=l*Math.abs((n.top+C.height-s)/C.height)):!g&&d>=n.bottom-C.height&&(w.y=zt.Forward,E.y=l*Math.abs((n.bottom-C.height-d)/C.height)),!b&&f>=n.right-C.width?(w.x=zt.Forward,E.x=l*Math.abs((n.right-C.width-f)/C.width)):!p&&c<=n.left+C.width&&(w.x=zt.Backward,E.x=l*Math.abs((n.left+C.width-c)/C.width)),{direction:w,speed:E}}function H4(e){if(e===document.scrollingElement){const{innerWidth:s,innerHeight:c}=window;return{top:0,left:0,right:s,bottom:c,width:s,height:c}}const{top:n,left:r,right:l,bottom:o}=e.getBoundingClientRect();return{top:n,left:r,right:l,bottom:o,width:e.clientWidth,height:e.clientHeight}}function jS(e){return e.reduce((n,r)=>fa(n,xm(r)),lr)}function F4(e){return e.reduce((n,r)=>n+RS(r),0)}function q4(e){return e.reduce((n,r)=>n+TS(r),0)}function G4(e,n){if(n===void 0&&(n=ka),!e)return;const{top:r,left:l,bottom:o,right:s}=n(e);NS(e)&&(o<=0||s<=0||r>=window.innerHeight||l>=window.innerWidth)&&e.scrollIntoView({block:"center",inline:"center"})}const V4=[["x",["left","right"],F4],["y",["top","bottom"],q4]];class Cp{constructor(n,r){this.rect=void 0,this.width=void 0,this.height=void 0,this.top=void 0,this.bottom=void 0,this.right=void 0,this.left=void 0;const l=Sp(r),o=jS(l);this.rect={...n},this.width=n.width,this.height=n.height;for(const[s,c,f]of V4)for(const d of c)Object.defineProperty(this,d,{get:()=>{const h=f(l),g=o[s]-h;return this.rect[d]+g},enumerable:!0});Object.defineProperty(this,"rect",{enumerable:!1})}}class Ao{constructor(n){this.target=void 0,this.listeners=[],this.removeAll=()=>{this.listeners.forEach(r=>{var l;return(l=this.target)==null?void 0:l.removeEventListener(...r)})},this.target=n}add(n,r,l){var o;(o=this.target)==null||o.addEventListener(n,r,l),this.listeners.push([n,r,l])}}function $4(e){const{EventTarget:n}=hn(e);return e instanceof n?e:Ea(e)}function Oh(e,n){const r=Math.abs(e.x),l=Math.abs(e.y);return typeof n=="number"?Math.sqrt(r**2+l**2)>n:"x"in n&&"y"in n?r>n.x&&l>n.y:"x"in n?r>n.x:"y"in n?l>n.y:!1}var Fn;(function(e){e.Click="click",e.DragStart="dragstart",e.Keydown="keydown",e.ContextMenu="contextmenu",e.Resize="resize",e.SelectionChange="selectionchange",e.VisibilityChange="visibilitychange"})(Fn||(Fn={}));function e0(e){e.preventDefault()}function Y4(e){e.stopPropagation()}var Ve;(function(e){e.Space="Space",e.Down="ArrowDown",e.Right="ArrowRight",e.Left="ArrowLeft",e.Up="ArrowUp",e.Esc="Escape",e.Enter="Enter",e.Tab="Tab"})(Ve||(Ve={}));const _S={start:[Ve.Space,Ve.Enter],cancel:[Ve.Esc],end:[Ve.Space,Ve.Enter,Ve.Tab]},X4=(e,n)=>{let{currentCoordinates:r}=n;switch(e.code){case Ve.Right:return{...r,x:r.x+25};case Ve.Left:return{...r,x:r.x-25};case Ve.Down:return{...r,y:r.y+25};case Ve.Up:return{...r,y:r.y-25}}};class Ep{constructor(n){this.props=void 0,this.autoScrollEnabled=!1,this.referenceCoordinates=void 0,this.listeners=void 0,this.windowListeners=void 0,this.props=n;const{event:{target:r}}=n;this.props=n,this.listeners=new Ao(Ea(r)),this.windowListeners=new Ao(hn(r)),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleCancel=this.handleCancel.bind(this),this.attach()}attach(){this.handleStart(),this.windowListeners.add(Fn.Resize,this.handleCancel),this.windowListeners.add(Fn.VisibilityChange,this.handleCancel),setTimeout(()=>this.listeners.add(Fn.Keydown,this.handleKeyDown))}handleStart(){const{activeNode:n,onStart:r}=this.props,l=n.node.current;l&&G4(l),r(lr)}handleKeyDown(n){if(wp(n)){const{active:r,context:l,options:o}=this.props,{keyboardCodes:s=_S,coordinateGetter:c=X4,scrollBehavior:f="smooth"}=o,{code:d}=n;if(s.end.includes(d)){this.handleEnd(n);return}if(s.cancel.includes(d)){this.handleCancel(n);return}const{collisionRect:h}=l.current,g=h?{x:h.left,y:h.top}:lr;this.referenceCoordinates||(this.referenceCoordinates=g);const p=c(n,{active:r,context:l.current,currentCoordinates:g});if(p){const b=sc(p,g),w={x:0,y:0},{scrollableAncestors:E}=l.current;for(const C of E){const k=n.code,{isTop:N,isRight:j,isLeft:M,isBottom:z,maxScroll:U,minScroll:_}=MS(C),P=H4(C),F={x:Math.min(k===Ve.Right?P.right-P.width/2:P.right,Math.max(k===Ve.Right?P.left:P.left+P.width/2,p.x)),y:Math.min(k===Ve.Down?P.bottom-P.height/2:P.bottom,Math.max(k===Ve.Down?P.top:P.top+P.height/2,p.y))},ne=k===Ve.Right&&!j||k===Ve.Left&&!M,I=k===Ve.Down&&!z||k===Ve.Up&&!N;if(ne&&F.x!==p.x){const J=C.scrollLeft+b.x,te=k===Ve.Right&&J<=U.x||k===Ve.Left&&J>=_.x;if(te&&!b.y){C.scrollTo({left:J,behavior:f});return}te?w.x=C.scrollLeft-J:w.x=k===Ve.Right?C.scrollLeft-U.x:C.scrollLeft-_.x,w.x&&C.scrollBy({left:-w.x,behavior:f});break}else if(I&&F.y!==p.y){const J=C.scrollTop+b.y,te=k===Ve.Down&&J<=U.y||k===Ve.Up&&J>=_.y;if(te&&!b.x){C.scrollTo({top:J,behavior:f});return}te?w.y=C.scrollTop-J:w.y=k===Ve.Down?C.scrollTop-U.y:C.scrollTop-_.y,w.y&&C.scrollBy({top:-w.y,behavior:f});break}}this.handleMove(n,fa(sc(p,this.referenceCoordinates),w))}}}handleMove(n,r){const{onMove:l}=this.props;n.preventDefault(),l(r)}handleEnd(n){const{onEnd:r}=this.props;n.preventDefault(),this.detach(),r()}handleCancel(n){const{onCancel:r}=this.props;n.preventDefault(),this.detach(),r()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll()}}Ep.activators=[{eventName:"onKeyDown",handler:(e,n,r)=>{let{keyboardCodes:l=_S,onActivation:o}=n,{active:s}=r;const{code:c}=e.nativeEvent;if(l.start.includes(c)){const f=s.activatorNode.current;return f&&e.target!==f?!1:(e.preventDefault(),o==null||o({event:e.nativeEvent}),!0)}return!1}}];function t0(e){return!!(e&&"distance"in e)}function n0(e){return!!(e&&"delay"in e)}class kp{constructor(n,r,l){var o;l===void 0&&(l=$4(n.event.target)),this.props=void 0,this.events=void 0,this.autoScrollEnabled=!0,this.document=void 0,this.activated=!1,this.initialCoordinates=void 0,this.timeoutId=null,this.listeners=void 0,this.documentListeners=void 0,this.windowListeners=void 0,this.props=n,this.events=r;const{event:s}=n,{target:c}=s;this.props=n,this.events=r,this.document=Ea(c),this.documentListeners=new Ao(this.document),this.listeners=new Ao(l),this.windowListeners=new Ao(hn(c)),this.initialCoordinates=(o=ym(s))!=null?o:lr,this.handleStart=this.handleStart.bind(this),this.handleMove=this.handleMove.bind(this),this.handleEnd=this.handleEnd.bind(this),this.handleCancel=this.handleCancel.bind(this),this.handleKeydown=this.handleKeydown.bind(this),this.removeTextSelection=this.removeTextSelection.bind(this),this.attach()}attach(){const{events:n,props:{options:{activationConstraint:r,bypassActivationConstraint:l}}}=this;if(this.listeners.add(n.move.name,this.handleMove,{passive:!1}),this.listeners.add(n.end.name,this.handleEnd),n.cancel&&this.listeners.add(n.cancel.name,this.handleCancel),this.windowListeners.add(Fn.Resize,this.handleCancel),this.windowListeners.add(Fn.DragStart,e0),this.windowListeners.add(Fn.VisibilityChange,this.handleCancel),this.windowListeners.add(Fn.ContextMenu,e0),this.documentListeners.add(Fn.Keydown,this.handleKeydown),r){if(l!=null&&l({event:this.props.event,activeNode:this.props.activeNode,options:this.props.options}))return this.handleStart();if(n0(r)){this.timeoutId=setTimeout(this.handleStart,r.delay),this.handlePending(r);return}if(t0(r)){this.handlePending(r);return}}this.handleStart()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll(),setTimeout(this.documentListeners.removeAll,50),this.timeoutId!==null&&(clearTimeout(this.timeoutId),this.timeoutId=null)}handlePending(n,r){const{active:l,onPending:o}=this.props;o(l,n,this.initialCoordinates,r)}handleStart(){const{initialCoordinates:n}=this,{onStart:r}=this.props;n&&(this.activated=!0,this.documentListeners.add(Fn.Click,Y4,{capture:!0}),this.removeTextSelection(),this.documentListeners.add(Fn.SelectionChange,this.removeTextSelection),r(n))}handleMove(n){var r;const{activated:l,initialCoordinates:o,props:s}=this,{onMove:c,options:{activationConstraint:f}}=s;if(!o)return;const d=(r=ym(n))!=null?r:lr,h=sc(o,d);if(!l&&f){if(t0(f)){if(f.tolerance!=null&&Oh(h,f.tolerance))return this.handleCancel();if(Oh(h,f.distance))return this.handleStart()}if(n0(f)&&Oh(h,f.tolerance))return this.handleCancel();this.handlePending(f,h);return}n.cancelable&&n.preventDefault(),c(d)}handleEnd(){const{onAbort:n,onEnd:r}=this.props;this.detach(),this.activated||n(this.props.active),r()}handleCancel(){const{onAbort:n,onCancel:r}=this.props;this.detach(),this.activated||n(this.props.active),r()}handleKeydown(n){n.code===Ve.Esc&&this.handleCancel()}removeTextSelection(){var n;(n=this.document.getSelection())==null||n.removeAllRanges()}}const K4={cancel:{name:"pointercancel"},move:{name:"pointermove"},end:{name:"pointerup"}};class Np extends kp{constructor(n){const{event:r}=n,l=Ea(r.target);super(n,K4,l)}}Np.activators=[{eventName:"onPointerDown",handler:(e,n)=>{let{nativeEvent:r}=e,{onActivation:l}=n;return!r.isPrimary||r.button!==0?!1:(l==null||l({event:r}),!0)}}];const Q4={move:{name:"mousemove"},end:{name:"mouseup"}};var vm;(function(e){e[e.RightClick=2]="RightClick"})(vm||(vm={}));class Z4 extends kp{constructor(n){super(n,Q4,Ea(n.event.target))}}Z4.activators=[{eventName:"onMouseDown",handler:(e,n)=>{let{nativeEvent:r}=e,{onActivation:l}=n;return r.button===vm.RightClick?!1:(l==null||l({event:r}),!0)}}];const Dh={cancel:{name:"touchcancel"},move:{name:"touchmove"},end:{name:"touchend"}};class W4 extends kp{constructor(n){super(n,Dh)}static setup(){return window.addEventListener(Dh.move.name,n,{capture:!1,passive:!1}),function(){window.removeEventListener(Dh.move.name,n)};function n(){}}}W4.activators=[{eventName:"onTouchStart",handler:(e,n)=>{let{nativeEvent:r}=e,{onActivation:l}=n;const{touches:o}=r;return o.length>1?!1:(l==null||l({event:r}),!0)}}];var Mo;(function(e){e[e.Pointer=0]="Pointer",e[e.DraggableRect=1]="DraggableRect"})(Mo||(Mo={}));var cc;(function(e){e[e.TreeOrder=0]="TreeOrder",e[e.ReversedTreeOrder=1]="ReversedTreeOrder"})(cc||(cc={}));function J4(e){let{acceleration:n,activator:r=Mo.Pointer,canScroll:l,draggingRect:o,enabled:s,interval:c=5,order:f=cc.TreeOrder,pointerCoordinates:d,scrollableAncestors:h,scrollableAncestorRects:g,delta:p,threshold:b}=e;const w=tO({delta:p,disabled:!s}),[E,C]=u4(),k=v.useRef({x:0,y:0}),N=v.useRef({x:0,y:0}),j=v.useMemo(()=>{switch(r){case Mo.Pointer:return d?{top:d.y,bottom:d.y,left:d.x,right:d.x}:null;case Mo.DraggableRect:return o}},[r,o,d]),M=v.useRef(null),z=v.useCallback(()=>{const _=M.current;if(!_)return;const P=k.current.x*N.current.x,F=k.current.y*N.current.y;_.scrollBy(P,F)},[]),U=v.useMemo(()=>f===cc.TreeOrder?[...h].reverse():h,[f,h]);v.useEffect(()=>{if(!s||!h.length||!j){C();return}for(const _ of U){if((l==null?void 0:l(_))===!1)continue;const P=h.indexOf(_),F=g[P];if(!F)continue;const{direction:ne,speed:I}=U4(_,F,j,n,b);for(const J of["x","y"])w[J][ne[J]]||(I[J]=0,ne[J]=0);if(I.x>0||I.y>0){C(),M.current=_,E(z,c),k.current=I,N.current=ne;return}}k.current={x:0,y:0},N.current={x:0,y:0},C()},[n,z,l,C,s,c,JSON.stringify(j),JSON.stringify(w),E,h,U,g,JSON.stringify(b)])}const eO={x:{[zt.Backward]:!1,[zt.Forward]:!1},y:{[zt.Backward]:!1,[zt.Forward]:!1}};function tO(e){let{delta:n,disabled:r}=e;const l=gm(n);return ts(o=>{if(r||!l||!o)return eO;const s={x:Math.sign(n.x-l.x),y:Math.sign(n.y-l.y)};return{x:{[zt.Backward]:o.x[zt.Backward]||s.x===-1,[zt.Forward]:o.x[zt.Forward]||s.x===1},y:{[zt.Backward]:o.y[zt.Backward]||s.y===-1,[zt.Forward]:o.y[zt.Forward]||s.y===1}}},[r,n,l])}function nO(e,n){const r=n!=null?e.get(n):void 0,l=r?r.node.current:null;return ts(o=>{var s;return n==null?null:(s=l??o)!=null?s:null},[l,n])}function rO(e,n){return v.useMemo(()=>e.reduce((r,l)=>{const{sensor:o}=l,s=o.activators.map(c=>({eventName:c.eventName,handler:n(c.handler,l)}));return[...r,...s]},[]),[e,n])}var Fo;(function(e){e[e.Always=0]="Always",e[e.BeforeDragging=1]="BeforeDragging",e[e.WhileDragging=2]="WhileDragging"})(Fo||(Fo={}));var bm;(function(e){e.Optimized="optimized"})(bm||(bm={}));const r0=new Map;function iO(e,n){let{dragging:r,dependencies:l,config:o}=n;const[s,c]=v.useState(null),{frequency:f,measure:d,strategy:h}=o,g=v.useRef(e),p=k(),b=Uo(p),w=v.useCallback(function(N){N===void 0&&(N=[]),!b.current&&c(j=>j===null?N:j.concat(N.filter(M=>!j.includes(M))))},[b]),E=v.useRef(null),C=ts(N=>{if(p&&!r)return r0;if(!N||N===r0||g.current!==e||s!=null){const j=new Map;for(let M of e){if(!M)continue;if(s&&s.length>0&&!s.includes(M.id)&&M.rect.current){j.set(M.id,M.rect.current);continue}const z=M.node.current,U=z?new Cp(d(z),z):null;M.rect.current=U,U&&j.set(M.id,U)}return j}return N},[e,s,r,p,d]);return v.useEffect(()=>{g.current=e},[e]),v.useEffect(()=>{p||w()},[r,p]),v.useEffect(()=>{s&&s.length>0&&c(null)},[JSON.stringify(s)]),v.useEffect(()=>{p||typeof f!="number"||E.current!==null||(E.current=setTimeout(()=>{w(),E.current=null},f))},[f,p,w,...l]),{droppableRects:C,measureDroppableContainers:w,measuringScheduled:s!=null};function k(){switch(h){case Fo.Always:return!1;case Fo.BeforeDragging:return r;default:return!r}}}function OS(e,n){return ts(r=>e?r||(typeof n=="function"?n(e):e):null,[n,e])}function lO(e,n){return OS(e,n)}function aO(e){let{callback:n,disabled:r}=e;const l=bp(n),o=v.useMemo(()=>{if(r||typeof window>"u"||typeof window.MutationObserver>"u")return;const{MutationObserver:s}=window;return new s(l)},[l,r]);return v.useEffect(()=>()=>o==null?void 0:o.disconnect(),[o]),o}function Bc(e){let{callback:n,disabled:r}=e;const l=bp(n),o=v.useMemo(()=>{if(r||typeof window>"u"||typeof window.ResizeObserver>"u")return;const{ResizeObserver:s}=window;return new s(l)},[r]);return v.useEffect(()=>()=>o==null?void 0:o.disconnect(),[o]),o}function oO(e){return new Cp(ka(e),e)}function i0(e,n,r){n===void 0&&(n=oO);const[l,o]=v.useState(null);function s(){o(d=>{if(!e)return null;if(e.isConnected===!1){var h;return(h=d??r)!=null?h:null}const g=n(e);return JSON.stringify(d)===JSON.stringify(g)?d:g})}const c=aO({callback(d){if(e)for(const h of d){const{type:g,target:p}=h;if(g==="childList"&&p instanceof HTMLElement&&p.contains(e)){s();break}}}}),f=Bc({callback:s});return wr(()=>{s(),e?(f==null||f.observe(e),c==null||c.observe(document.body,{childList:!0,subtree:!0})):(f==null||f.disconnect(),c==null||c.disconnect())},[e]),l}function sO(e){const n=OS(e);return kS(e,n)}const l0=[];function uO(e){const n=v.useRef(e),r=ts(l=>e?l&&l!==l0&&e&&n.current&&e.parentNode===n.current.parentNode?l:Sp(e):l0,[e]);return v.useEffect(()=>{n.current=e},[e]),r}function cO(e){const[n,r]=v.useState(null),l=v.useRef(e),o=v.useCallback(s=>{const c=_h(s.target);c&&r(f=>f?(f.set(c,xm(c)),new Map(f)):null)},[]);return v.useEffect(()=>{const s=l.current;if(e!==s){c(s);const f=e.map(d=>{const h=_h(d);return h?(h.addEventListener("scroll",o,{passive:!0}),[h,xm(h)]):null}).filter(d=>d!=null);r(f.length?new Map(f):null),l.current=e}return()=>{c(e),c(s)};function c(f){f.forEach(d=>{const h=_h(d);h==null||h.removeEventListener("scroll",o)})}},[o,e]),v.useMemo(()=>e.length?n?Array.from(n.values()).reduce((s,c)=>fa(s,c),lr):jS(e):lr,[e,n])}function a0(e,n){n===void 0&&(n=[]);const r=v.useRef(null);return v.useEffect(()=>{r.current=null},n),v.useEffect(()=>{const l=e!==lr;l&&!r.current&&(r.current=e),!l&&r.current&&(r.current=null)},[e]),r.current?sc(e,r.current):lr}function fO(e){v.useEffect(()=>{if(!Pc)return;const n=e.map(r=>{let{sensor:l}=r;return l.setup==null?void 0:l.setup()});return()=>{for(const r of n)r==null||r()}},e.map(n=>{let{sensor:r}=n;return r}))}function dO(e,n){return v.useMemo(()=>e.reduce((r,l)=>{let{eventName:o,handler:s}=l;return r[o]=c=>{s(c,n)},r},{}),[e,n])}function DS(e){return v.useMemo(()=>e?L4(e):null,[e])}const o0=[];function hO(e,n){n===void 0&&(n=ka);const[r]=e,l=DS(r?hn(r):null),[o,s]=v.useState(o0);function c(){s(()=>e.length?e.map(d=>AS(d)?l:new Cp(n(d),d)):o0)}const f=Bc({callback:c});return wr(()=>{f==null||f.disconnect(),c(),e.forEach(d=>f==null?void 0:f.observe(d))},[e]),o}function mO(e){if(!e)return null;if(e.children.length>1)return e;const n=e.children[0];return es(n)?n:e}function pO(e){let{measure:n}=e;const[r,l]=v.useState(null),o=v.useCallback(h=>{for(const{target:g}of h)if(es(g)){l(p=>{const b=n(g);return p?{...p,width:b.width,height:b.height}:b});break}},[n]),s=Bc({callback:o}),c=v.useCallback(h=>{const g=mO(h);s==null||s.disconnect(),g&&(s==null||s.observe(g)),l(g?n(g):null)},[n,s]),[f,d]=oc(c);return v.useMemo(()=>({nodeRef:f,rect:r,setRef:d}),[r,f,d])}const gO=[{sensor:Np,options:{}},{sensor:Ep,options:{}}],yO={current:{}},Xu={draggable:{measure:Jb},droppable:{measure:Jb,strategy:Fo.WhileDragging,frequency:bm.Optimized},dragOverlay:{measure:ka}};class jo extends Map{get(n){var r;return n!=null&&(r=super.get(n))!=null?r:void 0}toArray(){return Array.from(this.values())}getEnabled(){return this.toArray().filter(n=>{let{disabled:r}=n;return!r})}getNodeFor(n){var r,l;return(r=(l=this.get(n))==null?void 0:l.node.current)!=null?r:void 0}}const xO={activatorEvent:null,active:null,activeNode:null,activeNodeRect:null,collisions:null,containerNodeRect:null,draggableNodes:new Map,droppableRects:new Map,droppableContainers:new jo,over:null,dragOverlay:{nodeRef:{current:null},rect:null,setRef:uc},scrollableAncestors:[],scrollableAncestorRects:[],measuringConfiguration:Xu,measureDroppableContainers:uc,windowRect:null,measuringScheduled:!1},vO={activatorEvent:null,activators:[],active:null,activeNodeRect:null,ariaDescribedById:{draggable:""},dispatch:uc,draggableNodes:new Map,over:null,measureDroppableContainers:uc},Ic=v.createContext(vO),zS=v.createContext(xO);function bO(){return{draggable:{active:null,initialCoordinates:{x:0,y:0},nodes:new Map,translate:{x:0,y:0}},droppable:{containers:new jo}}}function wO(e,n){switch(n.type){case Mt.DragStart:return{...e,draggable:{...e.draggable,initialCoordinates:n.initialCoordinates,active:n.active}};case Mt.DragMove:return e.draggable.active==null?e:{...e,draggable:{...e.draggable,translate:{x:n.coordinates.x-e.draggable.initialCoordinates.x,y:n.coordinates.y-e.draggable.initialCoordinates.y}}};case Mt.DragEnd:case Mt.DragCancel:return{...e,draggable:{...e.draggable,active:null,initialCoordinates:{x:0,y:0},translate:{x:0,y:0}}};case Mt.RegisterDroppable:{const{element:r}=n,{id:l}=r,o=new jo(e.droppable.containers);return o.set(l,r),{...e,droppable:{...e.droppable,containers:o}}}case Mt.SetDroppableDisabled:{const{id:r,key:l,disabled:o}=n,s=e.droppable.containers.get(r);if(!s||l!==s.key)return e;const c=new jo(e.droppable.containers);return c.set(r,{...s,disabled:o}),{...e,droppable:{...e.droppable,containers:c}}}case Mt.UnregisterDroppable:{const{id:r,key:l}=n,o=e.droppable.containers.get(r);if(!o||l!==o.key)return e;const s=new jo(e.droppable.containers);return s.delete(r),{...e,droppable:{...e.droppable,containers:s}}}default:return e}}function SO(e){let{disabled:n}=e;const{active:r,activatorEvent:l,draggableNodes:o}=v.useContext(Ic),s=gm(l),c=gm(r==null?void 0:r.id);return v.useEffect(()=>{if(!n&&!l&&s&&c!=null){if(!wp(s)||document.activeElement===s.target)return;const f=o.get(c);if(!f)return;const{activatorNode:d,node:h}=f;if(!d.current&&!h.current)return;requestAnimationFrame(()=>{for(const g of[d.current,h.current]){if(!g)continue;const p=d4(g);if(p){p.focus();break}}})}},[l,n,o,c,s]),null}function CO(e,n){let{transform:r,...l}=n;return e!=null&&e.length?e.reduce((o,s)=>s({transform:o,...l}),r):r}function EO(e){return v.useMemo(()=>({draggable:{...Xu.draggable,...e==null?void 0:e.draggable},droppable:{...Xu.droppable,...e==null?void 0:e.droppable},dragOverlay:{...Xu.dragOverlay,...e==null?void 0:e.dragOverlay}}),[e==null?void 0:e.draggable,e==null?void 0:e.droppable,e==null?void 0:e.dragOverlay])}function kO(e){let{activeNode:n,measure:r,initialRect:l,config:o=!0}=e;const s=v.useRef(!1),{x:c,y:f}=typeof o=="boolean"?{x:o,y:o}:o;wr(()=>{if(!c&&!f||!n){s.current=!1;return}if(s.current||!l)return;const h=n==null?void 0:n.node.current;if(!h||h.isConnected===!1)return;const g=r(h),p=kS(g,l);if(c||(p.x=0),f||(p.y=0),s.current=!0,Math.abs(p.x)>0||Math.abs(p.y)>0){const b=NS(h);b&&b.scrollBy({top:p.y,left:p.x})}},[n,c,f,l,r])}const LS=v.createContext({...lr,scaleX:1,scaleY:1});var Ti;(function(e){e[e.Uninitialized=0]="Uninitialized",e[e.Initializing=1]="Initializing",e[e.Initialized=2]="Initialized"})(Ti||(Ti={}));const NO=v.memo(function(n){var r,l,o,s;let{id:c,accessibility:f,autoScroll:d=!0,children:h,sensors:g=gO,collisionDetection:p=A4,measuring:b,modifiers:w,...E}=n;const C=v.useReducer(wO,void 0,bO),[k,N]=C,[j,M]=x4(),[z,U]=v.useState(Ti.Uninitialized),_=z===Ti.Initialized,{draggable:{active:P,nodes:F,translate:ne},droppable:{containers:I}}=k,J=P!=null?F.get(P):null,te=v.useRef({initial:null,translated:null}),ce=v.useMemo(()=>{var gt;return P!=null?{id:P,data:(gt=J==null?void 0:J.data)!=null?gt:yO,rect:te}:null},[P,J]),le=v.useRef(null),[ee,B]=v.useState(null),[X,$]=v.useState(null),Q=Uo(E,Object.values(E)),T=ns("DndDescribedBy",c),O=v.useMemo(()=>I.getEnabled(),[I]),D=EO(b),{droppableRects:A,measureDroppableContainers:Z,measuringScheduled:fe}=iO(O,{dragging:_,dependencies:[ne.x,ne.y],config:D.droppable}),ue=nO(F,P),me=v.useMemo(()=>X?ym(X):null,[X]),Ne=gl(),he=lO(ue,D.draggable.measure);kO({activeNode:P!=null?F.get(P):null,config:Ne.layoutShiftCompensation,initialRect:he,measure:D.draggable.measure});const Ce=i0(ue,D.draggable.measure,he),lt=i0(ue?ue.parentElement:null),nt=v.useRef({activatorEvent:null,active:null,activeNode:ue,collisionRect:null,collisions:null,droppableRects:A,draggableNodes:F,draggingNode:null,draggingNodeRect:null,droppableContainers:I,over:null,scrollableAncestors:[],scrollAdjustedTranslate:null}),st=I.getNodeFor((r=nt.current.over)==null?void 0:r.id),Ye=pO({measure:D.dragOverlay.measure}),Lt=(l=Ye.nodeRef.current)!=null?l:ue,Pt=_?(o=Ye.rect)!=null?o:Ce:null,Yn=!!(Ye.nodeRef.current&&Ye.rect),Xn=sO(Yn?null:Ce),Bt=DS(Lt?hn(Lt):null),It=uO(_?st??ue:null),Tn=hO(It),sr=CO(w,{transform:{x:ne.x-Xn.x,y:ne.y-Xn.y,scaleX:1,scaleY:1},activatorEvent:X,active:ce,activeNodeRect:Ce,containerNodeRect:lt,draggingNodeRect:Pt,over:nt.current.over,overlayNodeRect:Ye.rect,scrollableAncestors:It,scrollableAncestorRects:Tn,windowRect:Bt}),Wr=me?fa(me,ne):null,mt=cO(It),Jr=a0(mt),ie=a0(mt,[Ce]),Y=fa(sr,Jr),se=Pt?_4(Pt,sr):null,pe=ce&&se?p({active:ce,collisionRect:se,droppableRects:A,droppableContainers:O,pointerCoordinates:Wr}):null,we=N4(pe,"id"),[Oe,pn]=v.useState(null),Ut=Yn?sr:fa(sr,ie),pt=M4(Ut,(s=Oe==null?void 0:Oe.rect)!=null?s:null,Ce),jt=v.useRef(null),Xe=v.useCallback((gt,yt)=>{let{sensor:_t,options:tn}=yt;if(le.current==null)return;const nn=F.get(le.current);if(!nn)return;const $t=gt.nativeEvent,rn=new _t({active:le.current,activeNode:nn,event:$t,options:tn,context:nt,onAbort(Nt){if(!F.get(Nt))return;const{onDragAbort:gn}=Q.current,Mn={id:Nt};gn==null||gn(Mn),j({type:"onDragAbort",event:Mn})},onPending(Nt,Kn,gn,Mn){if(!F.get(Nt))return;const{onDragPending:Nr}=Q.current,Qn={id:Nt,constraint:Kn,initialCoordinates:gn,offset:Mn};Nr==null||Nr(Qn),j({type:"onDragPending",event:Qn})},onStart(Nt){const Kn=le.current;if(Kn==null)return;const gn=F.get(Kn);if(!gn)return;const{onDragStart:Mn}=Q.current,kr={activatorEvent:$t,active:{id:Kn,data:gn.data,rect:te}};Ai.unstable_batchedUpdates(()=>{Mn==null||Mn(kr),U(Ti.Initializing),N({type:Mt.DragStart,initialCoordinates:Nt,active:Kn}),j({type:"onDragStart",event:kr}),B(jt.current),$($t)})},onMove(Nt){N({type:Mt.DragMove,coordinates:Nt})},onEnd:An(Mt.DragEnd),onCancel:An(Mt.DragCancel)});jt.current=rn;function An(Nt){return async function(){const{active:gn,collisions:Mn,over:kr,scrollAdjustedTranslate:Nr}=nt.current;let Qn=null;if(gn&&Nr){const{cancelDrop:ei}=Q.current;Qn={activatorEvent:$t,active:gn,collisions:Mn,delta:Nr,over:kr},Nt===Mt.DragEnd&&typeof ei=="function"&&await Promise.resolve(ei(Qn))&&(Nt=Mt.DragCancel)}le.current=null,Ai.unstable_batchedUpdates(()=>{N({type:Nt}),U(Ti.Uninitialized),pn(null),B(null),$(null),jt.current=null;const ei=Nt===Mt.DragEnd?"onDragEnd":"onDragCancel";if(Qn){const jn=Q.current[ei];jn==null||jn(Qn),j({type:ei,event:Qn})}})}}},[F]),ur=v.useCallback((gt,yt)=>(_t,tn)=>{const nn=_t.nativeEvent,$t=F.get(tn);if(le.current!==null||!$t||nn.dndKit||nn.defaultPrevented)return;const rn={active:$t};gt(_t,yt.options,rn)===!0&&(nn.dndKit={capturedBy:yt.sensor},le.current=tn,Xe(_t,yt))},[F,Xe]),en=rO(g,ur);fO(g),wr(()=>{Ce&&z===Ti.Initializing&&U(Ti.Initialized)},[Ce,z]),v.useEffect(()=>{const{onDragMove:gt}=Q.current,{active:yt,activatorEvent:_t,collisions:tn,over:nn}=nt.current;if(!yt||!_t)return;const $t={active:yt,activatorEvent:_t,collisions:tn,delta:{x:Y.x,y:Y.y},over:nn};Ai.unstable_batchedUpdates(()=>{gt==null||gt($t),j({type:"onDragMove",event:$t})})},[Y.x,Y.y]),v.useEffect(()=>{const{active:gt,activatorEvent:yt,collisions:_t,droppableContainers:tn,scrollAdjustedTranslate:nn}=nt.current;if(!gt||le.current==null||!yt||!nn)return;const{onDragOver:$t}=Q.current,rn=tn.get(we),An=rn&&rn.rect.current?{id:rn.id,rect:rn.rect.current,data:rn.data,disabled:rn.disabled}:null,Nt={active:gt,activatorEvent:yt,collisions:_t,delta:{x:nn.x,y:nn.y},over:An};Ai.unstable_batchedUpdates(()=>{pn(An),$t==null||$t(Nt),j({type:"onDragOver",event:Nt})})},[we]),wr(()=>{nt.current={activatorEvent:X,active:ce,activeNode:ue,collisionRect:se,collisions:pe,droppableRects:A,draggableNodes:F,draggingNode:Lt,draggingNodeRect:Pt,droppableContainers:I,over:Oe,scrollableAncestors:It,scrollAdjustedTranslate:Y},te.current={initial:Pt,translated:se}},[ce,ue,pe,se,F,Lt,Pt,A,I,Oe,It,Y]),J4({...Ne,delta:ne,draggingRect:se,pointerCoordinates:Wr,scrollableAncestors:It,scrollableAncestorRects:Tn});const Jc=v.useMemo(()=>({active:ce,activeNode:ue,activeNodeRect:Ce,activatorEvent:X,collisions:pe,containerNodeRect:lt,dragOverlay:Ye,draggableNodes:F,droppableContainers:I,droppableRects:A,over:Oe,measureDroppableContainers:Z,scrollableAncestors:It,scrollableAncestorRects:Tn,measuringConfiguration:D,measuringScheduled:fe,windowRect:Bt}),[ce,ue,Ce,X,pe,lt,Ye,F,I,A,Oe,Z,It,Tn,D,fe,Bt]),pl=v.useMemo(()=>({activatorEvent:X,activators:en,active:ce,activeNodeRect:Ce,ariaDescribedById:{draggable:T},dispatch:N,draggableNodes:F,over:Oe,measureDroppableContainers:Z}),[X,en,ce,Ce,N,T,F,Oe,Z]);return it.createElement(ES.Provider,{value:M},it.createElement(Ic.Provider,{value:pl},it.createElement(zS.Provider,{value:Jc},it.createElement(LS.Provider,{value:pt},h)),it.createElement(SO,{disabled:(f==null?void 0:f.restoreFocus)===!1})),it.createElement(w4,{...f,hiddenTextDescribedById:T}));function gl(){const gt=(ee==null?void 0:ee.autoScrollEnabled)===!1,yt=typeof d=="object"?d.enabled===!1:d===!1,_t=_&&!gt&&!yt;return typeof d=="object"?{...d,enabled:_t}:{enabled:_t}}}),RO=v.createContext(null),s0="button",TO="Draggable";function AO(e){let{id:n,data:r,disabled:l=!1,attributes:o}=e;const s=ns(TO),{activators:c,activatorEvent:f,active:d,activeNodeRect:h,ariaDescribedById:g,draggableNodes:p,over:b}=v.useContext(Ic),{role:w=s0,roleDescription:E="draggable",tabIndex:C=0}=o??{},k=(d==null?void 0:d.id)===n,N=v.useContext(k?LS:RO),[j,M]=oc(),[z,U]=oc(),_=dO(c,n),P=Uo(r);wr(()=>(p.set(n,{id:n,key:s,node:j,activatorNode:z,data:P}),()=>{const ne=p.get(n);ne&&ne.key===s&&p.delete(n)}),[p,n]);const F=v.useMemo(()=>({role:w,tabIndex:C,"aria-disabled":l,"aria-pressed":k&&w===s0?!0:void 0,"aria-roledescription":E,"aria-describedby":g.draggable}),[l,w,C,k,E,g.draggable]);return{active:d,activatorEvent:f,activeNodeRect:h,attributes:F,isDragging:k,listeners:l?void 0:_,node:j,over:b,setNodeRef:M,setActivatorNodeRef:U,transform:N}}function MO(){return v.useContext(zS)}const jO="Droppable",_O={timeout:25};function OO(e){let{data:n,disabled:r=!1,id:l,resizeObserverConfig:o}=e;const s=ns(jO),{active:c,dispatch:f,over:d,measureDroppableContainers:h}=v.useContext(Ic),g=v.useRef({disabled:r}),p=v.useRef(!1),b=v.useRef(null),w=v.useRef(null),{disabled:E,updateMeasurementsFor:C,timeout:k}={..._O,...o},N=Uo(C??l),j=v.useCallback(()=>{if(!p.current){p.current=!0;return}w.current!=null&&clearTimeout(w.current),w.current=setTimeout(()=>{h(Array.isArray(N.current)?N.current:[N.current]),w.current=null},k)},[k]),M=Bc({callback:j,disabled:E||!c}),z=v.useCallback((F,ne)=>{M&&(ne&&(M.unobserve(ne),p.current=!1),F&&M.observe(F))},[M]),[U,_]=oc(z),P=Uo(n);return v.useEffect(()=>{!M||!U.current||(M.disconnect(),p.current=!1,M.observe(U.current))},[U,M]),v.useEffect(()=>(f({type:Mt.RegisterDroppable,element:{id:l,key:s,disabled:r,node:U,rect:b,data:P}}),()=>f({type:Mt.UnregisterDroppable,key:s,id:l})),[l]),v.useEffect(()=>{r!==g.current.disabled&&(f({type:Mt.SetDroppableDisabled,id:l,key:s,disabled:r}),g.current.disabled=r)},[l,s,r,f]),{active:c,rect:b,isOver:(d==null?void 0:d.id)===l,node:U,over:d,setNodeRef:_}}function Rp(e,n,r){const l=e.slice();return l.splice(r<0?l.length+r:r,0,l.splice(n,1)[0]),l}function DO(e,n){return e.reduce((r,l,o)=>{const s=n.get(l);return s&&(r[o]=s),r},Array(e.length))}function Ou(e){return e!==null&&e>=0}function zO(e,n){if(e===n)return!0;if(e.length!==n.length)return!1;for(let r=0;r<e.length;r++)if(e[r]!==n[r])return!1;return!0}function LO(e){return typeof e=="boolean"?{draggable:e,droppable:e}:e}const PS=e=>{let{rects:n,activeIndex:r,overIndex:l,index:o}=e;const s=Rp(n,l,r),c=n[o],f=s[o];return!f||!c?null:{x:f.left-c.left,y:f.top-c.top,scaleX:f.width/c.width,scaleY:f.height/c.height}},Du={scaleX:1,scaleY:1},PO=e=>{var n;let{activeIndex:r,activeNodeRect:l,index:o,rects:s,overIndex:c}=e;const f=(n=s[r])!=null?n:l;if(!f)return null;if(o===r){const h=s[c];return h?{x:0,y:r<c?h.top+h.height-(f.top+f.height):h.top-f.top,...Du}:null}const d=BO(s,o,r);return o>r&&o<=c?{x:0,y:-f.height-d,...Du}:o<r&&o>=c?{x:0,y:f.height+d,...Du}:{x:0,y:0,...Du}};function BO(e,n,r){const l=e[n],o=e[n-1],s=e[n+1];return l?r<n?o?l.top-(o.top+o.height):s?s.top-(l.top+l.height):0:s?s.top-(l.top+l.height):o?l.top-(o.top+o.height):0:0}const BS="Sortable",IS=it.createContext({activeIndex:-1,containerId:BS,disableTransforms:!1,items:[],overIndex:-1,useDragOverlay:!1,sortedRects:[],strategy:PS,disabled:{draggable:!1,droppable:!1}});function IO(e){let{children:n,id:r,items:l,strategy:o=PS,disabled:s=!1}=e;const{active:c,dragOverlay:f,droppableRects:d,over:h,measureDroppableContainers:g}=MO(),p=ns(BS,r),b=f.rect!==null,w=v.useMemo(()=>l.map(_=>typeof _=="object"&&"id"in _?_.id:_),[l]),E=c!=null,C=c?w.indexOf(c.id):-1,k=h?w.indexOf(h.id):-1,N=v.useRef(w),j=!zO(w,N.current),M=k!==-1&&C===-1||j,z=LO(s);wr(()=>{j&&E&&g(w)},[j,w,E,g]),v.useEffect(()=>{N.current=w},[w]);const U=v.useMemo(()=>({activeIndex:C,containerId:p,disabled:z,disableTransforms:M,items:w,overIndex:k,useDragOverlay:b,sortedRects:DO(w,d),strategy:o}),[C,p,z.draggable,z.droppable,M,w,k,d,b,o]);return it.createElement(IS.Provider,{value:U},n)}const UO=e=>{let{id:n,items:r,activeIndex:l,overIndex:o}=e;return Rp(r,l,o).indexOf(n)},HO=e=>{let{containerId:n,isSorting:r,wasDragging:l,index:o,items:s,newIndex:c,previousItems:f,previousContainerId:d,transition:h}=e;return!h||!l||f!==s&&o===c?!1:r?!0:c!==o&&n===d},FO={duration:200,easing:"ease"},US="transform",qO=Ho.Transition.toString({property:US,duration:0,easing:"linear"}),GO={roleDescription:"sortable"};function VO(e){let{disabled:n,index:r,node:l,rect:o}=e;const[s,c]=v.useState(null),f=v.useRef(r);return wr(()=>{if(!n&&r!==f.current&&l.current){const d=o.current;if(d){const h=ka(l.current,{ignoreTransform:!0}),g={x:d.left-h.left,y:d.top-h.top,scaleX:d.width/h.width,scaleY:d.height/h.height};(g.x||g.y)&&c(g)}}r!==f.current&&(f.current=r)},[n,r,l,o]),v.useEffect(()=>{s&&c(null)},[s]),s}function $O(e){let{animateLayoutChanges:n=HO,attributes:r,disabled:l,data:o,getNewIndex:s=UO,id:c,strategy:f,resizeObserverConfig:d,transition:h=FO}=e;const{items:g,containerId:p,activeIndex:b,disabled:w,disableTransforms:E,sortedRects:C,overIndex:k,useDragOverlay:N,strategy:j}=v.useContext(IS),M=YO(l,w),z=g.indexOf(c),U=v.useMemo(()=>({sortable:{containerId:p,index:z,items:g},...o}),[p,o,z,g]),_=v.useMemo(()=>g.slice(g.indexOf(c)),[g,c]),{rect:P,node:F,isOver:ne,setNodeRef:I}=OO({id:c,data:U,disabled:M.droppable,resizeObserverConfig:{updateMeasurementsFor:_,...d}}),{active:J,activatorEvent:te,activeNodeRect:ce,attributes:le,setNodeRef:ee,listeners:B,isDragging:X,over:$,setActivatorNodeRef:Q,transform:T}=AO({id:c,data:U,attributes:{...GO,...r},disabled:M.draggable}),O=s4(I,ee),D=!!J,A=D&&!E&&Ou(b)&&Ou(k),Z=!N&&X,fe=Z&&A?T:null,me=A?fe??(f??j)({rects:C,activeNodeRect:ce,activeIndex:b,overIndex:k,index:z}):null,Ne=Ou(b)&&Ou(k)?s({id:c,items:g,activeIndex:b,overIndex:k}):z,he=J==null?void 0:J.id,Ce=v.useRef({activeId:he,items:g,newIndex:Ne,containerId:p}),lt=g!==Ce.current.items,nt=n({active:J,containerId:p,isDragging:X,isSorting:D,id:c,index:z,items:g,newIndex:Ce.current.newIndex,previousItems:Ce.current.items,previousContainerId:Ce.current.containerId,transition:h,wasDragging:Ce.current.activeId!=null}),st=VO({disabled:!nt,index:z,node:F,rect:P});return v.useEffect(()=>{D&&Ce.current.newIndex!==Ne&&(Ce.current.newIndex=Ne),p!==Ce.current.containerId&&(Ce.current.containerId=p),g!==Ce.current.items&&(Ce.current.items=g)},[D,Ne,p,g]),v.useEffect(()=>{if(he===Ce.current.activeId)return;if(he!=null&&Ce.current.activeId==null){Ce.current.activeId=he;return}const Lt=setTimeout(()=>{Ce.current.activeId=he},50);return()=>clearTimeout(Lt)},[he]),{active:J,activeIndex:b,attributes:le,data:U,rect:P,index:z,newIndex:Ne,items:g,isOver:ne,isSorting:D,isDragging:X,listeners:B,node:F,overIndex:k,over:$,setNodeRef:O,setActivatorNodeRef:Q,setDroppableNodeRef:I,setDraggableNodeRef:ee,transform:st??me,transition:Ye()};function Ye(){if(st||lt&&Ce.current.newIndex===z)return qO;if(!(Z&&!wp(te)||!h)&&(D||nt))return Ho.Transition.toString({...h,property:US})}}function YO(e,n){var r,l;return typeof e=="boolean"?{draggable:e,droppable:!1}:{draggable:(r=e==null?void 0:e.draggable)!=null?r:n.draggable,droppable:(l=e==null?void 0:e.droppable)!=null?l:n.droppable}}Ve.Down,Ve.Right,Ve.Up,Ve.Left;function HS(e){const n=e+"CollectionProvider",[r,l]=zi(n),[o,s]=r(n,{collectionRef:{current:null},itemMap:new Map}),c=C=>{const{scope:k,children:N}=C,j=it.useRef(null),M=it.useRef(new Map).current;return x.jsx(o,{scope:k,itemMap:M,collectionRef:j,children:N})};c.displayName=n;const f=e+"CollectionSlot",d=ha(f),h=it.forwardRef((C,k)=>{const{scope:N,children:j}=C,M=s(f,N),z=bt(k,M.collectionRef);return x.jsx(d,{ref:z,children:j})});h.displayName=f;const g=e+"CollectionItemSlot",p="data-radix-collection-item",b=ha(g),w=it.forwardRef((C,k)=>{const{scope:N,children:j,...M}=C,z=it.useRef(null),U=bt(k,z),_=s(g,N);return it.useEffect(()=>(_.itemMap.set(z,{ref:z,...M}),()=>void _.itemMap.delete(z))),x.jsx(b,{[p]:"",ref:U,children:j})});w.displayName=g;function E(C){const k=s(e+"CollectionConsumer",C);return it.useCallback(()=>{const j=k.collectionRef.current;if(!j)return[];const M=Array.from(j.querySelectorAll(`[${p}]`));return Array.from(k.itemMap.values()).sort((_,P)=>M.indexOf(_.ref.current)-M.indexOf(P.ref.current))},[k.collectionRef,k.itemMap])}return[{Provider:c,Slot:h,ItemSlot:w},E,l]}var XO=v.createContext(void 0);function FS(e){const n=v.useContext(XO);return e||n||"ltr"}var zh="rovingFocusGroup.onEntryFocus",KO={bubbles:!1,cancelable:!0},rs="RovingFocusGroup",[wm,qS,QO]=HS(rs),[ZO,GS]=zi(rs,[QO]),[WO,JO]=ZO(rs),VS=v.forwardRef((e,n)=>x.jsx(wm.Provider,{scope:e.__scopeRovingFocusGroup,children:x.jsx(wm.Slot,{scope:e.__scopeRovingFocusGroup,children:x.jsx(eD,{...e,ref:n})})}));VS.displayName=rs;var eD=v.forwardRef((e,n)=>{const{__scopeRovingFocusGroup:r,orientation:l,loop:o=!1,dir:s,currentTabStopId:c,defaultCurrentTabStopId:f,onCurrentTabStopIdChange:d,onEntryFocus:h,preventScrollOnEntryFocus:g=!1,...p}=e,b=v.useRef(null),w=bt(n,b),E=FS(s),[C,k]=Sc({prop:c,defaultProp:f??null,onChange:d,caller:rs}),[N,j]=v.useState(!1),M=br(h),z=qS(r),U=v.useRef(!1),[_,P]=v.useState(0);return v.useEffect(()=>{const F=b.current;if(F)return F.addEventListener(zh,M),()=>F.removeEventListener(zh,M)},[M]),x.jsx(WO,{scope:r,orientation:l,dir:E,loop:o,currentTabStopId:C,onItemFocus:v.useCallback(F=>k(F),[k]),onItemShiftTab:v.useCallback(()=>j(!0),[]),onFocusableItemAdd:v.useCallback(()=>P(F=>F+1),[]),onFocusableItemRemove:v.useCallback(()=>P(F=>F-1),[]),children:x.jsx(ct.div,{tabIndex:N||_===0?-1:0,"data-orientation":l,...p,ref:w,style:{outline:"none",...e.style},onMouseDown:Te(e.onMouseDown,()=>{U.current=!0}),onFocus:Te(e.onFocus,F=>{const ne=!U.current;if(F.target===F.currentTarget&&ne&&!N){const I=new CustomEvent(zh,KO);if(F.currentTarget.dispatchEvent(I),!I.defaultPrevented){const J=z().filter(B=>B.focusable),te=J.find(B=>B.active),ce=J.find(B=>B.id===C),ee=[te,ce,...J].filter(Boolean).map(B=>B.ref.current);XS(ee,g)}}U.current=!1}),onBlur:Te(e.onBlur,()=>j(!1))})})}),$S="RovingFocusGroupItem",YS=v.forwardRef((e,n)=>{const{__scopeRovingFocusGroup:r,focusable:l=!0,active:o=!1,tabStopId:s,children:c,...f}=e,d=sa(),h=s||d,g=JO($S,r),p=g.currentTabStopId===h,b=qS(r),{onFocusableItemAdd:w,onFocusableItemRemove:E,currentTabStopId:C}=g;return v.useEffect(()=>{if(l)return w(),()=>E()},[l,w,E]),x.jsx(wm.ItemSlot,{scope:r,id:h,focusable:l,active:o,children:x.jsx(ct.span,{tabIndex:p?0:-1,"data-orientation":g.orientation,...f,ref:n,onMouseDown:Te(e.onMouseDown,k=>{l?g.onItemFocus(h):k.preventDefault()}),onFocus:Te(e.onFocus,()=>g.onItemFocus(h)),onKeyDown:Te(e.onKeyDown,k=>{if(k.key==="Tab"&&k.shiftKey){g.onItemShiftTab();return}if(k.target!==k.currentTarget)return;const N=rD(k,g.orientation,g.dir);if(N!==void 0){if(k.metaKey||k.ctrlKey||k.altKey||k.shiftKey)return;k.preventDefault();let M=b().filter(z=>z.focusable).map(z=>z.ref.current);if(N==="last")M.reverse();else if(N==="prev"||N==="next"){N==="prev"&&M.reverse();const z=M.indexOf(k.currentTarget);M=g.loop?iD(M,z+1):M.slice(z+1)}setTimeout(()=>XS(M))}}),children:typeof c=="function"?c({isCurrentTabStop:p,hasTabStop:C!=null}):c})})});YS.displayName=$S;var tD={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function nD(e,n){return n!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function rD(e,n,r){const l=nD(e.key,r);if(!(n==="vertical"&&["ArrowLeft","ArrowRight"].includes(l))&&!(n==="horizontal"&&["ArrowUp","ArrowDown"].includes(l)))return tD[l]}function XS(e,n=!1){const r=document.activeElement;for(const l of e)if(l===r||(l.focus({preventScroll:n}),document.activeElement!==r))return}function iD(e,n){return e.map((r,l)=>e[(n+l)%e.length])}var lD=VS,aD=YS,Sm=["Enter"," "],oD=["ArrowDown","PageUp","Home"],KS=["ArrowUp","PageDown","End"],sD=[...oD,...KS],uD={ltr:[...Sm,"ArrowRight"],rtl:[...Sm,"ArrowLeft"]},cD={ltr:["ArrowLeft"],rtl:["ArrowRight"]},is="Menu",[qo,fD,dD]=HS(is),[dl,QS]=zi(is,[dD,Sa,GS]),Uc=Sa(),ZS=GS(),[hD,hl]=dl(is),[mD,ls]=dl(is),WS=e=>{const{__scopeMenu:n,open:r=!1,children:l,dir:o,onOpenChange:s,modal:c=!0}=e,f=Uc(n),[d,h]=v.useState(null),g=v.useRef(!1),p=br(s),b=FS(o);return v.useEffect(()=>{const w=()=>{g.current=!0,document.addEventListener("pointerdown",E,{capture:!0,once:!0}),document.addEventListener("pointermove",E,{capture:!0,once:!0})},E=()=>g.current=!1;return document.addEventListener("keydown",w,{capture:!0}),()=>{document.removeEventListener("keydown",w,{capture:!0}),document.removeEventListener("pointerdown",E,{capture:!0}),document.removeEventListener("pointermove",E,{capture:!0})}},[]),x.jsx(hp,{...f,children:x.jsx(hD,{scope:n,open:r,onOpenChange:p,content:d,onContentChange:h,children:x.jsx(mD,{scope:n,onClose:v.useCallback(()=>p(!1),[p]),isUsingKeyboardRef:g,dir:b,modal:c,children:l})})})};WS.displayName=is;var pD="MenuAnchor",Tp=v.forwardRef((e,n)=>{const{__scopeMenu:r,...l}=e,o=Uc(r);return x.jsx(Oc,{...o,...l,ref:n})});Tp.displayName=pD;var Ap="MenuPortal",[gD,JS]=dl(Ap,{forceMount:void 0}),eC=e=>{const{__scopeMenu:n,forceMount:r,children:l,container:o}=e,s=hl(Ap,n);return x.jsx(gD,{scope:n,forceMount:r,children:x.jsx($n,{present:r||s.open,children:x.jsx(Zo,{asChild:!0,container:o,children:l})})})};eC.displayName=Ap;var Gn="MenuContent",[yD,Mp]=dl(Gn),tC=v.forwardRef((e,n)=>{const r=JS(Gn,e.__scopeMenu),{forceMount:l=r.forceMount,...o}=e,s=hl(Gn,e.__scopeMenu),c=ls(Gn,e.__scopeMenu);return x.jsx(qo.Provider,{scope:e.__scopeMenu,children:x.jsx($n,{present:l||s.open,children:x.jsx(qo.Slot,{scope:e.__scopeMenu,children:c.modal?x.jsx(xD,{...o,ref:n}):x.jsx(vD,{...o,ref:n})})})})}),xD=v.forwardRef((e,n)=>{const r=hl(Gn,e.__scopeMenu),l=v.useRef(null),o=bt(n,l);return v.useEffect(()=>{const s=l.current;if(s)return Zm(s)},[]),x.jsx(jp,{...e,ref:o,trapFocus:r.open,disableOutsidePointerEvents:r.open,disableOutsideScroll:!0,onFocusOutside:Te(e.onFocusOutside,s=>s.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>r.onOpenChange(!1)})}),vD=v.forwardRef((e,n)=>{const r=hl(Gn,e.__scopeMenu);return x.jsx(jp,{...e,ref:n,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>r.onOpenChange(!1)})}),bD=ha("MenuContent.ScrollLock"),jp=v.forwardRef((e,n)=>{const{__scopeMenu:r,loop:l=!1,trapFocus:o,onOpenAutoFocus:s,onCloseAutoFocus:c,disableOutsidePointerEvents:f,onEntryFocus:d,onEscapeKeyDown:h,onPointerDownOutside:g,onFocusOutside:p,onInteractOutside:b,onDismiss:w,disableOutsideScroll:E,...C}=e,k=hl(Gn,r),N=ls(Gn,r),j=Uc(r),M=ZS(r),z=fD(r),[U,_]=v.useState(null),P=v.useRef(null),F=bt(n,P,k.onContentChange),ne=v.useRef(0),I=v.useRef(""),J=v.useRef(0),te=v.useRef(null),ce=v.useRef("right"),le=v.useRef(0),ee=E?kc:v.Fragment,B=E?{as:bD,allowPinchZoom:!0}:void 0,X=Q=>{var me,Ne;const T=I.current+Q,O=z().filter(he=>!he.disabled),D=document.activeElement,A=(me=O.find(he=>he.ref.current===D))==null?void 0:me.textValue,Z=O.map(he=>he.textValue),fe=_D(Z,T,A),ue=(Ne=O.find(he=>he.textValue===fe))==null?void 0:Ne.ref.current;(function he(Ce){I.current=Ce,window.clearTimeout(ne.current),Ce!==""&&(ne.current=window.setTimeout(()=>he(""),1e3))})(T),ue&&setTimeout(()=>ue.focus())};v.useEffect(()=>()=>window.clearTimeout(ne.current),[]),Qm();const $=v.useCallback(Q=>{var O,D;return ce.current===((O=te.current)==null?void 0:O.side)&&DD(Q,(D=te.current)==null?void 0:D.area)},[]);return x.jsx(yD,{scope:r,searchRef:I,onItemEnter:v.useCallback(Q=>{$(Q)&&Q.preventDefault()},[$]),onItemLeave:v.useCallback(Q=>{var T;$(Q)||((T=P.current)==null||T.focus(),_(null))},[$]),onTriggerLeave:v.useCallback(Q=>{$(Q)&&Q.preventDefault()},[$]),pointerGraceTimerRef:J,onPointerGraceIntentChange:v.useCallback(Q=>{te.current=Q},[]),children:x.jsx(ee,{...B,children:x.jsx(Cc,{asChild:!0,trapped:o,onMountAutoFocus:Te(s,Q=>{var T;Q.preventDefault(),(T=P.current)==null||T.focus({preventScroll:!0})}),onUnmountAutoFocus:c,children:x.jsx(Qo,{asChild:!0,disableOutsidePointerEvents:f,onEscapeKeyDown:h,onPointerDownOutside:g,onFocusOutside:p,onInteractOutside:b,onDismiss:w,children:x.jsx(lD,{asChild:!0,...M,dir:N.dir,orientation:"vertical",loop:l,currentTabStopId:U,onCurrentTabStopIdChange:_,onEntryFocus:Te(d,Q=>{N.isUsingKeyboardRef.current||Q.preventDefault()}),preventScrollOnEntryFocus:!0,children:x.jsx(mp,{role:"menu","aria-orientation":"vertical","data-state":yC(k.open),"data-radix-menu-content":"",dir:N.dir,...j,...C,ref:F,style:{outline:"none",...C.style},onKeyDown:Te(C.onKeyDown,Q=>{const O=Q.target.closest("[data-radix-menu-content]")===Q.currentTarget,D=Q.ctrlKey||Q.altKey||Q.metaKey,A=Q.key.length===1;O&&(Q.key==="Tab"&&Q.preventDefault(),!D&&A&&X(Q.key));const Z=P.current;if(Q.target!==Z||!sD.includes(Q.key))return;Q.preventDefault();const ue=z().filter(me=>!me.disabled).map(me=>me.ref.current);KS.includes(Q.key)&&ue.reverse(),MD(ue)}),onBlur:Te(e.onBlur,Q=>{Q.currentTarget.contains(Q.target)||(window.clearTimeout(ne.current),I.current="")}),onPointerMove:Te(e.onPointerMove,Go(Q=>{const T=Q.target,O=le.current!==Q.clientX;if(Q.currentTarget.contains(T)&&O){const D=Q.clientX>le.current?"right":"left";ce.current=D,le.current=Q.clientX}}))})})})})})})});tC.displayName=Gn;var wD="MenuGroup",_p=v.forwardRef((e,n)=>{const{__scopeMenu:r,...l}=e;return x.jsx(ct.div,{role:"group",...l,ref:n})});_p.displayName=wD;var SD="MenuLabel",nC=v.forwardRef((e,n)=>{const{__scopeMenu:r,...l}=e;return x.jsx(ct.div,{...l,ref:n})});nC.displayName=SD;var fc="MenuItem",u0="menu.itemSelect",Hc=v.forwardRef((e,n)=>{const{disabled:r=!1,onSelect:l,...o}=e,s=v.useRef(null),c=ls(fc,e.__scopeMenu),f=Mp(fc,e.__scopeMenu),d=bt(n,s),h=v.useRef(!1),g=()=>{const p=s.current;if(!r&&p){const b=new CustomEvent(u0,{bubbles:!0,cancelable:!0});p.addEventListener(u0,w=>l==null?void 0:l(w),{once:!0}),J1(p,b),b.defaultPrevented?h.current=!1:c.onClose()}};return x.jsx(rC,{...o,ref:d,disabled:r,onClick:Te(e.onClick,g),onPointerDown:p=>{var b;(b=e.onPointerDown)==null||b.call(e,p),h.current=!0},onPointerUp:Te(e.onPointerUp,p=>{var b;h.current||(b=p.currentTarget)==null||b.click()}),onKeyDown:Te(e.onKeyDown,p=>{const b=f.searchRef.current!=="";r||b&&p.key===" "||Sm.includes(p.key)&&(p.currentTarget.click(),p.preventDefault())})})});Hc.displayName=fc;var rC=v.forwardRef((e,n)=>{const{__scopeMenu:r,disabled:l=!1,textValue:o,...s}=e,c=Mp(fc,r),f=ZS(r),d=v.useRef(null),h=bt(n,d),[g,p]=v.useState(!1),[b,w]=v.useState("");return v.useEffect(()=>{const E=d.current;E&&w((E.textContent??"").trim())},[s.children]),x.jsx(qo.ItemSlot,{scope:r,disabled:l,textValue:o??b,children:x.jsx(aD,{asChild:!0,...f,focusable:!l,children:x.jsx(ct.div,{role:"menuitem","data-highlighted":g?"":void 0,"aria-disabled":l||void 0,"data-disabled":l?"":void 0,...s,ref:h,onPointerMove:Te(e.onPointerMove,Go(E=>{l?c.onItemLeave(E):(c.onItemEnter(E),E.defaultPrevented||E.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:Te(e.onPointerLeave,Go(E=>c.onItemLeave(E))),onFocus:Te(e.onFocus,()=>p(!0)),onBlur:Te(e.onBlur,()=>p(!1))})})})}),CD="MenuCheckboxItem",iC=v.forwardRef((e,n)=>{const{checked:r=!1,onCheckedChange:l,...o}=e;return x.jsx(uC,{scope:e.__scopeMenu,checked:r,children:x.jsx(Hc,{role:"menuitemcheckbox","aria-checked":dc(r)?"mixed":r,...o,ref:n,"data-state":Dp(r),onSelect:Te(o.onSelect,()=>l==null?void 0:l(dc(r)?!0:!r),{checkForDefaultPrevented:!1})})})});iC.displayName=CD;var lC="MenuRadioGroup",[ED,kD]=dl(lC,{value:void 0,onValueChange:()=>{}}),aC=v.forwardRef((e,n)=>{const{value:r,onValueChange:l,...o}=e,s=br(l);return x.jsx(ED,{scope:e.__scopeMenu,value:r,onValueChange:s,children:x.jsx(_p,{...o,ref:n})})});aC.displayName=lC;var oC="MenuRadioItem",sC=v.forwardRef((e,n)=>{const{value:r,...l}=e,o=kD(oC,e.__scopeMenu),s=r===o.value;return x.jsx(uC,{scope:e.__scopeMenu,checked:s,children:x.jsx(Hc,{role:"menuitemradio","aria-checked":s,...l,ref:n,"data-state":Dp(s),onSelect:Te(l.onSelect,()=>{var c;return(c=o.onValueChange)==null?void 0:c.call(o,r)},{checkForDefaultPrevented:!1})})})});sC.displayName=oC;var Op="MenuItemIndicator",[uC,ND]=dl(Op,{checked:!1}),cC=v.forwardRef((e,n)=>{const{__scopeMenu:r,forceMount:l,...o}=e,s=ND(Op,r);return x.jsx($n,{present:l||dc(s.checked)||s.checked===!0,children:x.jsx(ct.span,{...o,ref:n,"data-state":Dp(s.checked)})})});cC.displayName=Op;var RD="MenuSeparator",fC=v.forwardRef((e,n)=>{const{__scopeMenu:r,...l}=e;return x.jsx(ct.div,{role:"separator","aria-orientation":"horizontal",...l,ref:n})});fC.displayName=RD;var TD="MenuArrow",dC=v.forwardRef((e,n)=>{const{__scopeMenu:r,...l}=e,o=Uc(r);return x.jsx(pp,{...o,...l,ref:n})});dC.displayName=TD;var AD="MenuSub",[tI,hC]=dl(AD),Ro="MenuSubTrigger",mC=v.forwardRef((e,n)=>{const r=hl(Ro,e.__scopeMenu),l=ls(Ro,e.__scopeMenu),o=hC(Ro,e.__scopeMenu),s=Mp(Ro,e.__scopeMenu),c=v.useRef(null),{pointerGraceTimerRef:f,onPointerGraceIntentChange:d}=s,h={__scopeMenu:e.__scopeMenu},g=v.useCallback(()=>{c.current&&window.clearTimeout(c.current),c.current=null},[]);return v.useEffect(()=>g,[g]),v.useEffect(()=>{const p=f.current;return()=>{window.clearTimeout(p),d(null)}},[f,d]),x.jsx(Tp,{asChild:!0,...h,children:x.jsx(rC,{id:o.triggerId,"aria-haspopup":"menu","aria-expanded":r.open,"aria-controls":o.contentId,"data-state":yC(r.open),...e,ref:Km(n,o.onTriggerChange),onClick:p=>{var b;(b=e.onClick)==null||b.call(e,p),!(e.disabled||p.defaultPrevented)&&(p.currentTarget.focus(),r.open||r.onOpenChange(!0))},onPointerMove:Te(e.onPointerMove,Go(p=>{s.onItemEnter(p),!p.defaultPrevented&&!e.disabled&&!r.open&&!c.current&&(s.onPointerGraceIntentChange(null),c.current=window.setTimeout(()=>{r.onOpenChange(!0),g()},100))})),onPointerLeave:Te(e.onPointerLeave,Go(p=>{var w,E;g();const b=(w=r.content)==null?void 0:w.getBoundingClientRect();if(b){const C=(E=r.content)==null?void 0:E.dataset.side,k=C==="right",N=k?-5:5,j=b[k?"left":"right"],M=b[k?"right":"left"];s.onPointerGraceIntentChange({area:[{x:p.clientX+N,y:p.clientY},{x:j,y:b.top},{x:M,y:b.top},{x:M,y:b.bottom},{x:j,y:b.bottom}],side:C}),window.clearTimeout(f.current),f.current=window.setTimeout(()=>s.onPointerGraceIntentChange(null),300)}else{if(s.onTriggerLeave(p),p.defaultPrevented)return;s.onPointerGraceIntentChange(null)}})),onKeyDown:Te(e.onKeyDown,p=>{var w;const b=s.searchRef.current!=="";e.disabled||b&&p.key===" "||uD[l.dir].includes(p.key)&&(r.onOpenChange(!0),(w=r.content)==null||w.focus(),p.preventDefault())})})})});mC.displayName=Ro;var pC="MenuSubContent",gC=v.forwardRef((e,n)=>{const r=JS(Gn,e.__scopeMenu),{forceMount:l=r.forceMount,...o}=e,s=hl(Gn,e.__scopeMenu),c=ls(Gn,e.__scopeMenu),f=hC(pC,e.__scopeMenu),d=v.useRef(null),h=bt(n,d);return x.jsx(qo.Provider,{scope:e.__scopeMenu,children:x.jsx($n,{present:l||s.open,children:x.jsx(qo.Slot,{scope:e.__scopeMenu,children:x.jsx(jp,{id:f.contentId,"aria-labelledby":f.triggerId,...o,ref:h,align:"start",side:c.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:g=>{var p;c.isUsingKeyboardRef.current&&((p=d.current)==null||p.focus()),g.preventDefault()},onCloseAutoFocus:g=>g.preventDefault(),onFocusOutside:Te(e.onFocusOutside,g=>{g.target!==f.trigger&&s.onOpenChange(!1)}),onEscapeKeyDown:Te(e.onEscapeKeyDown,g=>{c.onClose(),g.preventDefault()}),onKeyDown:Te(e.onKeyDown,g=>{var w;const p=g.currentTarget.contains(g.target),b=cD[c.dir].includes(g.key);p&&b&&(s.onOpenChange(!1),(w=f.trigger)==null||w.focus(),g.preventDefault())})})})})})});gC.displayName=pC;function yC(e){return e?"open":"closed"}function dc(e){return e==="indeterminate"}function Dp(e){return dc(e)?"indeterminate":e?"checked":"unchecked"}function MD(e){const n=document.activeElement;for(const r of e)if(r===n||(r.focus(),document.activeElement!==n))return}function jD(e,n){return e.map((r,l)=>e[(n+l)%e.length])}function _D(e,n,r){const o=n.length>1&&Array.from(n).every(h=>h===n[0])?n[0]:n,s=r?e.indexOf(r):-1;let c=jD(e,Math.max(s,0));o.length===1&&(c=c.filter(h=>h!==r));const d=c.find(h=>h.toLowerCase().startsWith(o.toLowerCase()));return d!==r?d:void 0}function OD(e,n){const{x:r,y:l}=e;let o=!1;for(let s=0,c=n.length-1;s<n.length;c=s++){const f=n[s],d=n[c],h=f.x,g=f.y,p=d.x,b=d.y;g>l!=b>l&&r<(p-h)*(l-g)/(b-g)+h&&(o=!o)}return o}function DD(e,n){if(!n)return!1;const r={x:e.clientX,y:e.clientY};return OD(r,n)}function Go(e){return n=>n.pointerType==="mouse"?e(n):void 0}var zD=WS,LD=Tp,PD=eC,BD=tC,ID=_p,UD=nC,HD=Hc,FD=iC,qD=aC,GD=sC,VD=cC,$D=fC,YD=dC,XD=mC,KD=gC,zp="ContextMenu",[QD]=zi(zp,[QS]),Jt=QS(),[ZD,xC]=QD(zp),vC=e=>{const{__scopeContextMenu:n,children:r,onOpenChange:l,dir:o,modal:s=!0}=e,[c,f]=v.useState(!1),d=Jt(n),h=br(l),g=v.useCallback(p=>{f(p),h(p)},[h]);return x.jsx(ZD,{scope:n,open:c,onOpenChange:g,modal:s,children:x.jsx(zD,{...d,dir:o,open:c,onOpenChange:g,modal:s,children:r})})};vC.displayName=zp;var bC="ContextMenuTrigger",wC=v.forwardRef((e,n)=>{const{__scopeContextMenu:r,disabled:l=!1,...o}=e,s=xC(bC,r),c=Jt(r),f=v.useRef({x:0,y:0}),d=v.useRef({getBoundingClientRect:()=>DOMRect.fromRect({width:0,height:0,...f.current})}),h=v.useRef(0),g=v.useCallback(()=>window.clearTimeout(h.current),[]),p=b=>{f.current={x:b.clientX,y:b.clientY},s.onOpenChange(!0)};return v.useEffect(()=>g,[g]),v.useEffect(()=>void(l&&g()),[l,g]),x.jsxs(x.Fragment,{children:[x.jsx(LD,{...c,virtualRef:d}),x.jsx(ct.span,{"data-state":s.open?"open":"closed","data-disabled":l?"":void 0,...o,ref:n,style:{WebkitTouchCallout:"none",...e.style},onContextMenu:l?e.onContextMenu:Te(e.onContextMenu,b=>{g(),p(b),b.preventDefault()}),onPointerDown:l?e.onPointerDown:Te(e.onPointerDown,zu(b=>{g(),h.current=window.setTimeout(()=>p(b),700)})),onPointerMove:l?e.onPointerMove:Te(e.onPointerMove,zu(g)),onPointerCancel:l?e.onPointerCancel:Te(e.onPointerCancel,zu(g)),onPointerUp:l?e.onPointerUp:Te(e.onPointerUp,zu(g))})]})});wC.displayName=bC;var WD="ContextMenuPortal",SC=e=>{const{__scopeContextMenu:n,...r}=e,l=Jt(n);return x.jsx(PD,{...l,...r})};SC.displayName=WD;var CC="ContextMenuContent",EC=v.forwardRef((e,n)=>{const{__scopeContextMenu:r,...l}=e,o=xC(CC,r),s=Jt(r),c=v.useRef(!1);return x.jsx(BD,{...s,...l,ref:n,side:"right",sideOffset:2,align:"start",onCloseAutoFocus:f=>{var d;(d=e.onCloseAutoFocus)==null||d.call(e,f),!f.defaultPrevented&&c.current&&f.preventDefault(),c.current=!1},onInteractOutside:f=>{var d;(d=e.onInteractOutside)==null||d.call(e,f),!f.defaultPrevented&&!o.modal&&(c.current=!0)},style:{...e.style,"--radix-context-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-context-menu-content-available-width":"var(--radix-popper-available-width)","--radix-context-menu-content-available-height":"var(--radix-popper-available-height)","--radix-context-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-context-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});EC.displayName=CC;var JD="ContextMenuGroup",e5=v.forwardRef((e,n)=>{const{__scopeContextMenu:r,...l}=e,o=Jt(r);return x.jsx(ID,{...o,...l,ref:n})});e5.displayName=JD;var t5="ContextMenuLabel",n5=v.forwardRef((e,n)=>{const{__scopeContextMenu:r,...l}=e,o=Jt(r);return x.jsx(UD,{...o,...l,ref:n})});n5.displayName=t5;var r5="ContextMenuItem",kC=v.forwardRef((e,n)=>{const{__scopeContextMenu:r,...l}=e,o=Jt(r);return x.jsx(HD,{...o,...l,ref:n})});kC.displayName=r5;var i5="ContextMenuCheckboxItem",l5=v.forwardRef((e,n)=>{const{__scopeContextMenu:r,...l}=e,o=Jt(r);return x.jsx(FD,{...o,...l,ref:n})});l5.displayName=i5;var a5="ContextMenuRadioGroup",o5=v.forwardRef((e,n)=>{const{__scopeContextMenu:r,...l}=e,o=Jt(r);return x.jsx(qD,{...o,...l,ref:n})});o5.displayName=a5;var s5="ContextMenuRadioItem",u5=v.forwardRef((e,n)=>{const{__scopeContextMenu:r,...l}=e,o=Jt(r);return x.jsx(GD,{...o,...l,ref:n})});u5.displayName=s5;var c5="ContextMenuItemIndicator",f5=v.forwardRef((e,n)=>{const{__scopeContextMenu:r,...l}=e,o=Jt(r);return x.jsx(VD,{...o,...l,ref:n})});f5.displayName=c5;var d5="ContextMenuSeparator",h5=v.forwardRef((e,n)=>{const{__scopeContextMenu:r,...l}=e,o=Jt(r);return x.jsx($D,{...o,...l,ref:n})});h5.displayName=d5;var m5="ContextMenuArrow",p5=v.forwardRef((e,n)=>{const{__scopeContextMenu:r,...l}=e,o=Jt(r);return x.jsx(YD,{...o,...l,ref:n})});p5.displayName=m5;var g5="ContextMenuSubTrigger",y5=v.forwardRef((e,n)=>{const{__scopeContextMenu:r,...l}=e,o=Jt(r);return x.jsx(XD,{...o,...l,ref:n})});y5.displayName=g5;var x5="ContextMenuSubContent",v5=v.forwardRef((e,n)=>{const{__scopeContextMenu:r,...l}=e,o=Jt(r);return x.jsx(KD,{...o,...l,ref:n,style:{...e.style,"--radix-context-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-context-menu-content-available-width":"var(--radix-popper-available-width)","--radix-context-menu-content-available-height":"var(--radix-popper-available-height)","--radix-context-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-context-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});v5.displayName=x5;function zu(e){return n=>n.pointerType!=="mouse"?e(n):void 0}var b5=vC,w5=wC,S5=SC,NC=EC,RC=kC;const C5=b5,E5=w5,TC=v.forwardRef(({className:e,...n},r)=>x.jsx(S5,{children:x.jsx(NC,{ref:r,className:ye("z-50 min-w-[170px] overflow-hidden rounded-xl border border-border bg-background p-1 shadow-lg outline-hidden animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95",e),...n})}));TC.displayName=NC.displayName;const AC=v.forwardRef(({className:e,...n},r)=>x.jsx(RC,{ref:r,className:ye("relative flex cursor-default select-none items-center gap-2.5 rounded-lg px-3 py-2 text-xs font-medium outline-hidden transition-colors data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...n}));AC.displayName=RC.displayName;function k5({onRemove:e,children:n}){return x.jsxs(C5,{children:[x.jsx(E5,{asChild:!0,children:n}),x.jsx(TC,{children:x.jsxs(AC,{onSelect:r=>{r.stopPropagation(),e()},className:"text-destructive dark:text-red-400 hover:bg-destructive/10 focus:bg-destructive/10 dark:hover:bg-red-500/20 dark:focus:bg-red-500/20",children:[x.jsx(o_,{className:"h-4 w-4"}),x.jsx("span",{className:"text-xs font-medium",children:"Remove"})]})})]})}function N5({group:e,collapsedSections:n,expandedGroups:r,onToggleSection:l,onToggleExpandedGroup:o,renderChatRow:s,chatsPerProject:c,onNewLocalChat:f,onRemoveProject:d,isConnected:h,startingLocalPath:g}){const{groupKey:p,localPath:b,chats:w}=e,E=r.has(p),C=E?w:w.slice(0,c),k=w.length>c,{attributes:N,listeners:j,setNodeRef:M,setActivatorNodeRef:z,transform:U,transition:_,isDragging:P}=$O({id:p}),F={transform:Ho.Translate.toString(U),transition:_},ne=x.jsxs("div",{ref:z,className:ye("sticky top-0 bg-background dark:bg-card z-10 relative p-[10px] flex items-center justify-between","cursor-grab active:cursor-grabbing",P&&"cursor-grabbing"),onClick:()=>l(p),...j,children:[x.jsxs("div",{className:"flex items-center gap-2",children:[x.jsx("span",{className:"relative size-3.5 shrink-0 cursor-pointer",children:n.has(p)?x.jsx(Yr,{className:"translate-y-[1px] size-3.5 shrink-0 text-slate-400 transition-all duration-200"}):x.jsxs(x.Fragment,{children:[x.jsx(Aw,{className:"absolute inset-0 translate-y-[1px] size-3.5 shrink-0 text-slate-400 dark:text-slate-500 transition-all duration-200 group-hover/section:opacity-0"}),x.jsx(Yr,{className:"absolute inset-0 translate-y-[1px] size-3.5 shrink-0 rotate-90 text-slate-400 opacity-0 transition-all duration-200 group-hover/section:opacity-100"})]})}),x.jsxs(lc,{children:[x.jsx(ac,{asChild:!0,children:x.jsx("span",{className:"truncate max-w-[150px] whitespace-nowrap text-sm text-slate-500 dark:text-slate-400",children:wS(b)})}),x.jsx(Io,{side:"right",sideOffset:4,children:b})]})]}),f&&x.jsxs(lc,{children:[x.jsx(ac,{asChild:!0,children:x.jsx($e,{variant:"ghost",size:"icon",className:ye("h-5.5 w-5.5 absolute right-2 !rounded opacity-100 md:opacity-0 md:group-hover/section:opacity-100",(!h||g===b)&&"opacity-50 cursor-not-allowed"),disabled:!h||g===b,onClick:I=>{I.stopPropagation(),f(b)},children:g===b?x.jsx(Li,{className:"size-4 text-slate-500 dark:text-slate-400 animate-spin"}):x.jsx(tp,{className:"size-3.5 text-slate-500 dark:text-slate-400"})})}),x.jsx(Io,{side:"right",sideOffset:4,children:h?"New chat":`Start ${Zt} to connect`})]})]});return x.jsxs("div",{ref:M,style:F,className:ye("group/section",P&&"opacity-50 shadow-lg z-50 relative"),...N,children:[d?x.jsx(k5,{onRemove:()=>d(p),children:ne}):ne,!n.has(p)&&x.jsxs("div",{className:"space-y-[2px] mb-2 ",children:[C.map(s),k&&x.jsx("button",{onClick:()=>o(p),className:"pl-3 py-1 text-xs text-muted-foreground hover:text-foreground transition-colors",children:E?"Show less":`Show more (${w.length-c})`})]})]})}function R5({projectGroups:e,collapsedSections:n,expandedGroups:r,onToggleSection:l,onToggleExpandedGroup:o,renderChatRow:s,chatsPerProject:c,onNewLocalChat:f,onRemoveProject:d,onReorderGroups:h,isConnected:g,startingLocalPath:p}){const b=S4(Zb(Np,{activationConstraint:{distance:8}}),Zb(Ep)),w=v.useMemo(()=>e.map(N=>N.groupKey),[e]),E=v.useRef(null);function C(N){const j=N.active.id;n.has(j)?E.current=null:(E.current=j,l(j))}function k(N){const{active:j,over:M}=N;if(M&&j.id!==M.id&&h){const z=w.indexOf(j.id),U=w.indexOf(M.id);if(z!==-1&&U!==-1){const _=Rp(w,z,U);h(_)}}if(E.current){const z=E.current;E.current=null,requestAnimationFrame(()=>l(z))}}return x.jsx(NO,{sensors:b,collisionDetection:R4,onDragStart:C,onDragEnd:k,children:x.jsx(IO,{items:w,strategy:PO,children:e.map(N=>x.jsx(N5,{group:N,collapsedSections:n,expandedGroups:r,onToggleSection:l,onToggleExpandedGroup:o,renderChatRow:s,chatsPerProject:c,onNewLocalChat:f,onRemoveProject:d,isConnected:g,startingLocalPath:p},N.groupKey))})})}const c0=e=>{let n;const r=new Set,l=(h,g)=>{const p=typeof h=="function"?h(n):h;if(!Object.is(p,n)){const b=n;n=g??(typeof p!="object"||p===null)?p:Object.assign({},n,p),r.forEach(w=>w(n,b))}},o=()=>n,f={setState:l,getState:o,getInitialState:()=>d,subscribe:h=>(r.add(h),()=>r.delete(h))},d=n=e(l,o,f);return f},T5=(e=>e?c0(e):c0),A5=e=>e;function M5(e,n=A5){const r=it.useSyncExternalStore(e.subscribe,it.useCallback(()=>n(e.getState()),[e,n]),it.useCallback(()=>n(e.getInitialState()),[e,n]));return it.useDebugValue(r),r}const j5=e=>{const n=T5(e),r=l=>M5(n,l);return Object.assign(r,n),r},Lp=(e=>j5);function _5(e,n){let r;try{r=e()}catch{return}return{getItem:o=>{var s;const c=d=>d===null?null:JSON.parse(d,void 0),f=(s=r.getItem(o))!=null?s:null;return f instanceof Promise?f.then(c):c(f)},setItem:(o,s)=>r.setItem(o,JSON.stringify(s,void 0)),removeItem:o=>r.removeItem(o)}}const Cm=e=>n=>{try{const r=e(n);return r instanceof Promise?r:{then(l){return Cm(l)(r)},catch(l){return this}}}catch(r){return{then(l){return this},catch(l){return Cm(l)(r)}}}},O5=(e,n)=>(r,l,o)=>{let s={storage:_5(()=>window.localStorage),partialize:k=>k,version:0,merge:(k,N)=>({...N,...k}),...n},c=!1,f=0;const d=new Set,h=new Set;let g=s.storage;if(!g)return e((...k)=>{console.warn(`[zustand persist middleware] Unable to update item '${s.name}', the given storage is currently unavailable.`),r(...k)},l,o);const p=()=>{const k=s.partialize({...l()});return g.setItem(s.name,{state:k,version:s.version})},b=o.setState;o.setState=(k,N)=>(b(k,N),p());const w=e((...k)=>(r(...k),p()),l,o);o.getInitialState=()=>w;let E;const C=()=>{var k,N;if(!g)return;const j=++f;c=!1,d.forEach(z=>{var U;return z((U=l())!=null?U:w)});const M=((N=s.onRehydrateStorage)==null?void 0:N.call(s,(k=l())!=null?k:w))||void 0;return Cm(g.getItem.bind(g))(s.name).then(z=>{if(z)if(typeof z.version=="number"&&z.version!==s.version){if(s.migrate){const U=s.migrate(z.state,z.version);return U instanceof Promise?U.then(_=>[!0,_]):[!0,U]}console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}else return[!1,z.state];return[!1,void 0]}).then(z=>{var U;if(j!==f)return;const[_,P]=z;if(E=s.merge(P,(U=l())!=null?U:w),r(E,!0),_)return p()}).then(()=>{j===f&&(M==null||M(E,void 0),E=l(),c=!0,h.forEach(z=>z(E)))}).catch(z=>{j===f&&(M==null||M(void 0,z))})};return o.persist={setOptions:k=>{s={...s,...k},k.storage&&(g=k.storage)},clearStorage:()=>{g==null||g.removeItem(s.name)},getOptions:()=>s,rehydrate:()=>C(),hasHydrated:()=>c,onHydrate:k=>(d.add(k),()=>{d.delete(k)}),onFinishHydration:k=>(h.add(k),()=>{h.delete(k)})},s.skipHydration||C(),E||w},Pp=O5,f0=Lp()(Pp(e=>({order:[],setOrder:n=>e({order:n})}),{name:"project-group-order"}));function D5({data:e,activeChatId:n,connectionStatus:r,ready:l,open:o,collapsed:s,showMobileOpenButton:c,onOpen:f,onClose:d,onCollapse:h,onExpand:g,onCreateChat:p,onDeleteChat:b,onRemoveProject:w}){const E=Sr(),C=Hm(),k=v.useRef(null),[N,j]=v.useState(new Set),[M,z]=v.useState(new Set),[U,_]=v.useState(()=>Date.now()),P=10,F=f0(Z=>Z.order),ne=f0(Z=>Z.setOrder),I=v.useMemo(()=>{if(F.length===0)return e.projectGroups;const Z=new Map(e.projectGroups.map(me=>[me.groupKey,me])),fe=F.filter(me=>Z.has(me)).map(me=>Z.get(me)),ue=new Set(F);for(const me of e.projectGroups)ue.has(me.groupKey)||fe.push(me);return fe},[e.projectGroups,F]),J=v.useCallback(Z=>ne(Z),[ne]),te=v.useMemo(()=>new Map(e.projectGroups.map(Z=>[Z.localPath,Z.groupKey])),[e.projectGroups]),ce=v.useMemo(()=>e.projectGroups.reduce((Z,fe)=>Z+fe.chats.length,0),[e.projectGroups]),le=v.useCallback(Z=>{j(fe=>{const ue=new Set(fe);return ue.has(Z)?ue.delete(Z):ue.add(Z),ue})},[]),ee=v.useCallback(Z=>{z(fe=>{const ue=new Set(fe);return ue.has(Z)?ue.delete(Z):ue.add(Z),ue})},[]),B=v.useCallback(Z=>x.jsx(o4,{chat:Z,activeChatId:n,nowMs:U,onSelectChat:fe=>C(`/chat/${fe}`),onDeleteChat:()=>b(Z)},Z._id),[n,C,U,b]);v.useEffect(()=>{const Z=window.setInterval(()=>{_(Date.now())},3e4);return()=>window.clearInterval(Z)},[]),v.useEffect(()=>{!n||!k.current||requestAnimationFrame(()=>{const Z=k.current,fe=Z==null?void 0:Z.querySelector(`[data-chat-id="${n}"]`);if(!fe||!Z)return;const ue=fe.getBoundingClientRect(),me=Z.getBoundingClientRect();if(ue.top<me.top+38){const Ne=ue.top-me.top+Z.scrollTop;Z.scrollTo({top:Ne-38,behavior:"smooth"})}else if(ue.bottom>me.bottom){const Ne=ue.top+ue.height/2-me.top+Z.scrollTop,he=Z.clientHeight/2;Z.scrollTo({top:Ne-he,behavior:"smooth"})}})},[n,ce]);const X=ce>0,$=E.pathname==="/projects",Q=E.pathname==="/settings",T=$||Q,O=r==="connecting"||!l,D=O?"Connecting":r==="connected"?"Connected":"Disconnected",A=r==="connected"?"bg-emerald-500":"bg-amber-500";return x.jsxs(x.Fragment,{children:[!o&&c&&x.jsx($e,{variant:"ghost",size:"icon",className:"fixed top-3 left-3 z-50 md:hidden",onClick:f,children:x.jsx(Mw,{className:"h-5 w-5"})}),s&&T&&x.jsx("div",{className:"hidden md:flex fixed left-0 top-0 h-full z-40 items-start pt-4 pl-5 border-l border-border/0",children:x.jsxs("div",{className:"flex items-center gap-1",children:[x.jsx(To,{className:"size-6 text-logo"}),x.jsx($e,{variant:"ghost",size:"icon",onClick:g,title:"Expand sidebar",children:x.jsx(um,{className:"h-5 w-5"})})]})}),x.jsxs("div",{"data-sidebar":"open",className:ye("fixed inset-0 z-50 bg-background dark:bg-card flex flex-col h-[100dvh] select-none","md:relative md:inset-auto md:w-[275px] md:mr-2 md:h-[calc(100dvh-16px)] md:my-2 md:ml-2 md:border md:border-border md:rounded-2xl",o?"flex":"hidden md:flex",s&&"md:hidden"),children:[x.jsxs("div",{className:" pl-3 pr-[7px] h-[64px] max-h-[64px] md:h-[55px] md:max-h-[55px] border-b flex items-center justify-between",children:[x.jsxs("div",{className:"group/sidebar-header flex items-center gap-2",children:[x.jsxs("button",{type:"button",onClick:h,title:"Collapse sidebar",className:"hidden md:flex relative items-center justify-center h-5 w-5 sm:h-6 sm:w-6",children:[x.jsx(To,{className:"absolute inset-0.5 h-4 w-4 sm:h-5 sm:w-5 text-logo transition-all duration-200 ease-out opacity-100 scale-100 group-hover/sidebar-header:opacity-0 group-hover/sidebar-header:scale-0"}),x.jsx(um,{className:"absolute inset-0 h-4 w-4 sm:h-6 sm:w-6 text-slate-500 dark:text-slate-400 transition-all duration-200 ease-out opacity-0 scale-0 group-hover/sidebar-header:opacity-100 group-hover/sidebar-header:scale-80 hover:opacity-50"})]}),x.jsx(To,{className:"h-5 w-5 sm:h-6 sm:w-6 text-logo md:hidden"}),x.jsx("span",{className:"font-logo text-base uppercase sm:text-md text-slate-600 dark:text-slate-100",children:Zt})]}),x.jsxs("div",{className:"flex items-center",children:[x.jsx($e,{variant:"ghost",size:"icon",onClick:()=>{C("/projects"),d()},title:"New project",children:x.jsx(zw,{className:"size-4"})}),x.jsx($e,{variant:"ghost",size:"icon",className:"md:hidden",onClick:d,children:x.jsx(Tc,{className:"h-5 w-5"})})]})]}),x.jsx("div",{ref:k,className:"flex-1 min-h-0 overflow-y-auto scrollbar-hide",style:{WebkitOverflowScrolling:"touch"},children:x.jsxs("div",{className:"p-[7px]",children:[!X&&O?x.jsx("div",{className:"space-y-5 px-1 pt-3",children:[0,1,2].map(Z=>x.jsxs("div",{className:"space-y-2 animate-pulse",children:[x.jsx("div",{className:"h-4 w-28 rounded bg-muted"}),x.jsx("div",{className:"space-y-1",children:[0,1,2].map(fe=>x.jsxs("div",{className:"flex items-center gap-2 rounded-md px-3 py-2",children:[x.jsx("div",{className:"h-3.5 w-3.5 rounded-full bg-muted"}),x.jsx("div",{className:ye("h-3.5 rounded bg-muted",fe===0?"w-32":fe===1?"w-40":"w-28")})]},fe))})]},Z))}):null,!X&&!O&&e.projectGroups.length===0?x.jsx("p",{className:"text-sm text-slate-400 p-2 mt-6 text-center",children:"No conversations yet"}):null,x.jsx(R5,{projectGroups:I,onReorderGroups:J,collapsedSections:N,expandedGroups:M,onToggleSection:le,onToggleExpandedGroup:ee,renderChatRow:B,chatsPerProject:P,onNewLocalChat:Z=>{const fe=te.get(Z);fe&&p(fe)},onRemoveProject:w,isConnected:r==="connected"})]})}),x.jsx("div",{className:"border-t border-border p-2",children:x.jsx("button",{type:"button",onClick:()=>{C("/settings"),d()},className:ye("w-full rounded-xl rounded-t-md border px-3 py-2 text-left transition-colors",Q?"bg-muted border-border":"border-border/0 hover:bg-muted hover:border-border active:bg-muted/80"),children:x.jsxs("div",{className:"flex items- justify-between gap-2",children:[x.jsxs("div",{className:"flex items-center gap-2",children:[x.jsx(Lw,{className:"h-4 w-4 text-muted-foreground"}),x.jsx("span",{className:"text-sm",children:"Settings"})]}),x.jsxs("div",{className:"flex items-center gap-2 text-xs text-muted-foreground",children:[x.jsx("span",{children:D}),O?x.jsx(Li,{className:"h-2 w-2 animate-spin"}):x.jsx("span",{className:ye("h-2 w-2 rounded-full",A)})]})]})})})]}),o?x.jsx("div",{className:"fixed inset-0 bg-black/40 z-40 md:hidden",onClick:d}):null]})}const Bp=[{id:"low",label:"Low"},{id:"medium",label:"Medium"},{id:"high",label:"High"},{id:"max",label:"Max"}],MC=[{id:"minimal",label:"Minimal"},{id:"low",label:"Low"},{id:"medium",label:"Medium"},{id:"high",label:"High"},{id:"xhigh",label:"XHigh"}],jC={reasoningEffort:"high"},Em={reasoningEffort:"high",fastMode:!1};function d0(e){return Bp.some(n=>n.id===e)}function h0(e){return MC.some(n=>n.id===e)}const z5=[{id:"claude",label:"Claude",defaultModel:"opus",defaultEffort:"high",supportsPlanMode:!0,models:[{id:"opus",label:"Opus",supportsEffort:!0},{id:"sonnet",label:"Sonnet",supportsEffort:!0},{id:"haiku",label:"Haiku",supportsEffort:!0}],efforts:[...Bp]},{id:"codex",label:"Codex",defaultModel:"gpt-5.4",supportsPlanMode:!0,models:[{id:"gpt-5.4",label:"GPT-5.4",supportsEffort:!1},{id:"gpt-5.3-codex",label:"GPT-5.3 Codex",supportsEffort:!1},{id:"gpt-5.3-codex-spark",label:"GPT-5.3 Codex Spark",supportsEffort:!1}],efforts:[]}];var Fc="Popover",[_C]=zi(Fc,[Sa]),as=Sa(),[L5,Pi]=_C(Fc),OC=e=>{const{__scopePopover:n,children:r,open:l,defaultOpen:o,onOpenChange:s,modal:c=!1}=e,f=as(n),d=v.useRef(null),[h,g]=v.useState(!1),[p,b]=Sc({prop:l,defaultProp:o??!1,onChange:s,caller:Fc});return x.jsx(hp,{...f,children:x.jsx(L5,{scope:n,contentId:sa(),triggerRef:d,open:p,onOpenChange:b,onOpenToggle:v.useCallback(()=>b(w=>!w),[b]),hasCustomAnchor:h,onCustomAnchorAdd:v.useCallback(()=>g(!0),[]),onCustomAnchorRemove:v.useCallback(()=>g(!1),[]),modal:c,children:r})})};OC.displayName=Fc;var DC="PopoverAnchor",P5=v.forwardRef((e,n)=>{const{__scopePopover:r,...l}=e,o=Pi(DC,r),s=as(r),{onCustomAnchorAdd:c,onCustomAnchorRemove:f}=o;return v.useEffect(()=>(c(),()=>f()),[c,f]),x.jsx(Oc,{...s,...l,ref:n})});P5.displayName=DC;var zC="PopoverTrigger",LC=v.forwardRef((e,n)=>{const{__scopePopover:r,...l}=e,o=Pi(zC,r),s=as(r),c=bt(n,o.triggerRef),f=x.jsx(ct.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":HC(o.open),...l,ref:c,onClick:Te(e.onClick,o.onOpenToggle)});return o.hasCustomAnchor?f:x.jsx(Oc,{asChild:!0,...s,children:f})});LC.displayName=zC;var Ip="PopoverPortal",[B5,I5]=_C(Ip,{forceMount:void 0}),PC=e=>{const{__scopePopover:n,forceMount:r,children:l,container:o}=e,s=Pi(Ip,n);return x.jsx(B5,{scope:n,forceMount:r,children:x.jsx($n,{present:r||s.open,children:x.jsx(Zo,{asChild:!0,container:o,children:l})})})};PC.displayName=Ip;var ga="PopoverContent",BC=v.forwardRef((e,n)=>{const r=I5(ga,e.__scopePopover),{forceMount:l=r.forceMount,...o}=e,s=Pi(ga,e.__scopePopover);return x.jsx($n,{present:l||s.open,children:s.modal?x.jsx(H5,{...o,ref:n}):x.jsx(F5,{...o,ref:n})})});BC.displayName=ga;var U5=ha("PopoverContent.RemoveScroll"),H5=v.forwardRef((e,n)=>{const r=Pi(ga,e.__scopePopover),l=v.useRef(null),o=bt(n,l),s=v.useRef(!1);return v.useEffect(()=>{const c=l.current;if(c)return Zm(c)},[]),x.jsx(kc,{as:U5,allowPinchZoom:!0,children:x.jsx(IC,{...e,ref:o,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Te(e.onCloseAutoFocus,c=>{var f;c.preventDefault(),s.current||(f=r.triggerRef.current)==null||f.focus()}),onPointerDownOutside:Te(e.onPointerDownOutside,c=>{const f=c.detail.originalEvent,d=f.button===0&&f.ctrlKey===!0,h=f.button===2||d;s.current=h},{checkForDefaultPrevented:!1}),onFocusOutside:Te(e.onFocusOutside,c=>c.preventDefault(),{checkForDefaultPrevented:!1})})})}),F5=v.forwardRef((e,n)=>{const r=Pi(ga,e.__scopePopover),l=v.useRef(!1),o=v.useRef(!1);return x.jsx(IC,{...e,ref:n,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:s=>{var c,f;(c=e.onCloseAutoFocus)==null||c.call(e,s),s.defaultPrevented||(l.current||(f=r.triggerRef.current)==null||f.focus(),s.preventDefault()),l.current=!1,o.current=!1},onInteractOutside:s=>{var d,h;(d=e.onInteractOutside)==null||d.call(e,s),s.defaultPrevented||(l.current=!0,s.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const c=s.target;((h=r.triggerRef.current)==null?void 0:h.contains(c))&&s.preventDefault(),s.detail.originalEvent.type==="focusin"&&o.current&&s.preventDefault()}})}),IC=v.forwardRef((e,n)=>{const{__scopePopover:r,trapFocus:l,onOpenAutoFocus:o,onCloseAutoFocus:s,disableOutsidePointerEvents:c,onEscapeKeyDown:f,onPointerDownOutside:d,onFocusOutside:h,onInteractOutside:g,...p}=e,b=Pi(ga,r),w=as(r);return Qm(),x.jsx(Cc,{asChild:!0,loop:!0,trapped:l,onMountAutoFocus:o,onUnmountAutoFocus:s,children:x.jsx(Qo,{asChild:!0,disableOutsidePointerEvents:c,onInteractOutside:g,onEscapeKeyDown:f,onPointerDownOutside:d,onFocusOutside:h,onDismiss:()=>b.onOpenChange(!1),children:x.jsx(mp,{"data-state":HC(b.open),role:"dialog",id:b.contentId,...w,...p,ref:n,style:{...p.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})}),UC="PopoverClose",q5=v.forwardRef((e,n)=>{const{__scopePopover:r,...l}=e,o=Pi(UC,r);return x.jsx(ct.button,{type:"button",...l,ref:n,onClick:Te(e.onClick,()=>o.onOpenChange(!1))})});q5.displayName=UC;var G5="PopoverArrow",V5=v.forwardRef((e,n)=>{const{__scopePopover:r,...l}=e,o=as(r);return x.jsx(pp,{...o,...l,ref:n})});V5.displayName=G5;function HC(e){return e?"open":"closed"}var $5=OC,Y5=LC,X5=PC,FC=BC;const K5=$5,Q5=Y5,qC=v.forwardRef(({className:e,align:n="center",sideOffset:r=4,...l},o)=>x.jsx(X5,{children:x.jsx(FC,{ref:o,align:n,sideOffset:r,className:ye("z-50 w-72 rounded-xl border border-border bg-background p-4 shadow-lg outline-hidden animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...l})}));qC.displayName=FC.displayName;const GC=v.forwardRef(({className:e,...n},r)=>x.jsx("textarea",{"data-gramm":"false","data-gramm_editor":"false","data-enable-grammarly":"false","data-1p-ignore":!0,autoComplete:"off",className:ye("flex w-full rounded-lg border border-border bg-background px-2.5 py-2 text-sm placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50",e),ref:r,...n}));GC.displayName="Textarea";function Z5(){const[e,n]=v.useState(()=>{if(typeof window>"u")return!1;const r=navigator.standalone===!0,l=window.matchMedia("(display-mode: standalone)").matches;return r||l});return v.useEffect(()=>{const r=window.matchMedia("(display-mode: standalone)"),l=o=>{n(o.matches||navigator.standalone===!0)};return r.addEventListener("change",l),()=>r.removeEventListener("change",l)},[]),e}const W5=Lp()(Pp((e,n)=>({drafts:{},setDraft:(r,l)=>e(o=>{if(!l){const{[r]:s,...c}=o.drafts;return{drafts:c}}return{drafts:{...o.drafts,[r]:l}}}),clearDraft:r=>e(l=>{const{[r]:o,...s}=l.drafts;return{drafts:s}}),getDraft:r=>n().drafts[r]??""}),{name:"chat-input-drafts"}));function J5(e){return e==="gpt-5-codex"?"gpt-5.3-codex":e??"gpt-5.4"}function ez(e){var r;const n=(r=e==null?void 0:e.modelOptions)==null?void 0:r.reasoningEffort;return{model:(e==null?void 0:e.model)??"opus",modelOptions:{reasoningEffort:d0(n)?n:d0(e==null?void 0:e.effort)?e.effort:jC.reasoningEffort}}}function tz(e){var r,l;const n=(r=e==null?void 0:e.modelOptions)==null?void 0:r.reasoningEffort;return{model:J5(e==null?void 0:e.model),modelOptions:{reasoningEffort:h0(n)?n:h0(e==null?void 0:e.effort)?e.effort:Em.reasoningEffort,fastMode:typeof((l=e==null?void 0:e.modelOptions)==null?void 0:l.fastMode)=="boolean"?e.modelOptions.fastMode:Em.fastMode}}}const VC=Lp()(Pp(e=>({provider:"claude",planMode:!1,preferences:{claude:{model:"opus",modelOptions:{...jC}},codex:{model:"gpt-5.4",modelOptions:{...Em}}},setProvider:n=>e({provider:n}),setModel:(n,r)=>e(l=>({preferences:{...l.preferences,[n]:{...l.preferences[n],model:r,modelOptions:n==="claude"&&r!=="opus"&&l.preferences.claude.modelOptions.reasoningEffort==="max"?{reasoningEffort:"high"}:l.preferences[n].modelOptions}}})),setModelOptions:(n,r)=>e(l=>({preferences:{...l.preferences,[n]:{...l.preferences[n],modelOptions:{...l.preferences[n].modelOptions,...r}}}})),setPlanMode:n=>e({planMode:n})}),{name:"chat-preferences",version:2,migrate:e=>{var r,l;const n=e;return{provider:(n==null?void 0:n.provider)??"claude",planMode:(n==null?void 0:n.planMode)??!1,preferences:{claude:ez((r=n==null?void 0:n.preferences)==null?void 0:r.claude),codex:tz((l=n==null?void 0:n.preferences)==null?void 0:l.codex)}}}}));function ll({onClick:e,selected:n,icon:r,label:l,description:o,disabled:s}){return x.jsxs("button",{onClick:e,disabled:s,className:ye("w-full flex items-center gap-2 p-2 border border-border/0 rounded-lg text-left transition-opacity",n?"bg-muted border-border":"hover:opacity-60",s&&"opacity-40 cursor-not-allowed"),children:[r,x.jsxs("div",{children:[x.jsx("div",{className:"text-sm font-medium",children:l}),o?x.jsx("div",{className:"text-xs text-muted-foreground",children:o}):null]})]})}function So({trigger:e,triggerClassName:n,disabled:r=!1,children:l}){return r?x.jsx("button",{disabled:!0,className:ye("flex items-center gap-1.5 px-2 py-1 text-sm rounded-md text-muted-foreground [&>svg]:shrink-0 opacity-70 cursor-default",n),children:e}):x.jsxs(K5,{children:[x.jsx(Q5,{asChild:!0,children:x.jsx("button",{className:ye("flex items-center gap-1.5 px-2 py-1 text-sm rounded-md transition-colors text-muted-foreground [&>svg]:shrink-0","hover:bg-muted/50",n),children:e})}),x.jsx(qC,{align:"center",className:"w-64 p-1",children:x.jsx("div",{className:"space-y-1",children:l})})]})}function nz({className:e,...n}){return x.jsx("svg",{viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true",className:ye("shrink-0",e),...n,children:x.jsx("path",{d:"M17.3041 3.541h-3.6718l6.696 16.918H24Zm-10.6082 0L0 20.459h3.7442l1.3693-3.5527h7.0052l1.3693 3.5528h3.7442L10.5363 3.5409Zm-.3712 10.2232 2.2914-5.9456 2.2914 5.9456Z"})})}function rz({className:e,...n}){return x.jsx("svg",{viewBox:"0 0 158.7128 157.296",fill:"currentColor","aria-hidden":"true",className:ye("shrink-0",e),...n,children:x.jsx("path",{d:"M60.8734 57.2556V42.3124c0-1.2586.4722-2.2029 1.5728-2.8314l30.0443-17.3023c4.0899-2.3593 8.9662-3.4599 13.9988-3.4599 18.8759 0 30.8307 14.6289 30.8307 30.2006 0 1.1007 0 2.3593-.158 3.6178l-31.1446-18.2467c-1.8872-1.1006-3.7754-1.1006-5.6629 0L60.8734 57.2556Zm70.1542 58.2005V79.7487c0-2.2028-.9446-3.7756-2.8318-4.8763l-39.481-22.9651 12.8982-7.3934c1.1007-.6285 2.0453-.6285 3.1458 0l30.0441 17.3024c8.6523 5.0341 14.4708 15.7296 14.4708 26.1107 0 11.9539-7.0769 22.965-18.2461 27.527ZM51.593 83.9964l-12.8982-7.5497c-1.1007-.6285-1.5728-1.5728-1.5728-2.8314V39.0105c0-16.8303 12.8982-29.5722 30.3585-29.5722 6.607 0 12.7403 2.2029 17.9324 6.1349l-30.987 17.9324c-1.8871 1.1007-2.8314 2.6735-2.8314 4.8764v45.6159ZM79.3562 100.0403 60.8733 89.6592V67.6383l18.4829-10.3811 18.4812 10.3811v22.0209l-18.4812 10.3811Zm11.8757 47.8188c-6.607 0-12.7403-2.2031-17.9324-6.1344l30.9866-17.9333c1.8872-1.1005 2.8318-2.6728 2.8318-4.8759v-45.616l13.0564 7.5498c1.1005.6285 1.5723 1.5728 1.5723 2.8314v34.6051c0 16.8297-13.0564 29.5723-30.5147 29.5723ZM53.9522 112.7822 23.9079 95.4798c-8.652-5.0343-14.471-15.7296-14.471-26.1107 0-12.1119 7.2356-22.9652 18.403-27.5272v35.8634c0 2.2028.9443 3.7756 2.8314 4.8763l39.3248 22.8068-12.8982 7.3938c-1.1007.6287-2.045.6287-3.1456 0ZM52.2229 138.5791c-17.7745 0-30.8306-13.3713-30.8306-29.8871 0-1.2585.1578-2.5169.3143-3.7754l30.987 17.9323c1.8871 1.1005 3.7757 1.1005 5.6628 0l39.4811-22.807v14.9435c0 1.2585-.4721 2.2021-1.5728 2.8308l-30.0443 17.3025c-4.0898 2.359-8.9662 3.4605-13.9989 3.4605h.0014ZM91.2319 157.296c19.0327 0 34.9188-13.5272 38.5383-31.4594 17.6164-4.562 28.9425-21.0779 28.9425-37.908 0-11.0112-4.719-21.7066-13.2133-29.4143.7867-3.3035 1.2595-6.607 1.2595-9.909 0-22.4929-18.2471-39.3247-39.3251-39.3247-4.2461 0-8.3363.6285-12.4262 2.045-7.0792-6.9213-16.8318-11.3254-27.5271-11.3254-19.0331 0-34.9191 13.5268-38.5384 31.4591C11.3255 36.0212 0 52.5373 0 69.3675c0 11.0112 4.7184 21.7065 13.2125 29.4142-.7865 3.3035-1.2586 6.6067-1.2586 9.9092 0 22.4923 18.2466 39.3241 39.3248 39.3241 4.2462 0 8.3362-.6277 12.426-2.0441 7.0776 6.921 16.8302 11.3251 27.5271 11.3251Z"})})}const m0={claude:nz,codex:rz},p0={opus:Db,sonnet:Lo,haiku:ec,"gpt-5.4":Db,"gpt-5.3-codex":Lo,"gpt-5.3-codex-spark":ec},iz=v.memo(function({onSubmit:n,onCancel:r,disabled:l,canCancel:o,chatId:s,activeProvider:c,availableProviders:f}){var T,O;const{getDraft:d,setDraft:h,clearDraft:g}=W5(),{provider:p,preferences:b,planMode:w,setProvider:E,setModel:C,setModelOptions:k,setPlanMode:N}=VC(),[j,M]=v.useState(()=>s?d(s):""),z=v.useRef(null),U=Z5(),_=c??p,P=f.find(D=>D.id===_)??f[0],F=b[_],ne=c!==null,I=(P==null?void 0:P.supportsPlanMode)??!1,J=_==="claude"?b.claude.modelOptions.reasoningEffort:b.codex.modelOptions.reasoningEffort,te=b.codex.modelOptions.fastMode,ce=_==="claude"?Bp:MC,le=v.useCallback(()=>{const D=z.current;D&&(D.style.height="auto",D.style.height=`${D.scrollHeight}px`)},[]);v.useEffect(()=>{le()},[j,le]),v.useEffect(()=>(window.addEventListener("resize",le),()=>window.removeEventListener("resize",le)),[le]),v.useEffect(()=>{var D;(D=z.current)==null||D.focus()},[s]);function ee(D){if(_==="claude"){k("claude",{reasoningEffort:D});return}k("codex",{reasoningEffort:D})}async function B(){if(!j.trim())return;const D=j;M(""),s&&g(s),z.current&&(z.current.style.height="auto");try{await n(D,{provider:_,model:F.model,modelOptions:_==="claude"?{claude:{...b.claude.modelOptions}}:{codex:{...b.codex.modelOptions}},planMode:I?w:!1})}catch(A){console.error("[ChatInput] Submit failed:",A),M(D),s&&h(s,D)}}function X(D){if(D.key==="Tab"&&D.shiftKey&&I){D.preventDefault(),N(!w);return}if(D.key==="Escape"&&o){D.preventDefault(),r==null||r();return}const A="ontouchstart"in window||navigator.maxTouchPoints>0;D.key==="Enter"&&!D.shiftKey&&!o&&!A&&(D.preventDefault(),B())}const $=m0[_],Q=p0[F.model]??Lo;return x.jsxs("div",{className:ye("p-3 pt-0 md:pb-2",U&&"px-5 pb-5"),children:[x.jsxs("div",{className:"flex items-end gap-2 max-w-[840px] mx-auto border dark:bg-card/40 backdrop-blur-lg border-border rounded-[29px] pr-1.5",children:[x.jsx(GC,{ref:z,placeholder:"Ask something...",value:j,autoFocus:!0,rows:1,onChange:D=>{M(D.target.value),s&&h(s,D.target.value),le()},onKeyDown:X,disabled:l,className:"flex-1 text-base p-3 md:p-4 pl-4.5 md:pl-6 resize-none max-h-[200px] outline-none bg-transparent border-0 shadow-none"}),x.jsx($e,{type:"button",onPointerDown:D=>{D.preventDefault(),o?r==null||r():!l&&j.trim()&&B()},disabled:!o&&(l||!j.trim()),size:"icon",className:"flex-shrink-0 bg-slate-600 text-white dark:bg-white dark:text-slate-900 rounded-full cursor-pointer h-10 w-10 md:h-11 md:w-11 mb-1 -mr-0.5 md:mr-0 md:mb-1.5 touch-manipulation disabled:bg-white/60 disabled:text-slate-700",children:o?x.jsx("div",{className:"w-3 h-3 md:w-4 md:h-4 rounded-xs bg-current"}):x.jsx(ZM,{className:"h-5 w-5 md:h-6 md:w-6"})})]}),x.jsxs("div",{className:"flex justify-center items-center gap-0.5 max-w-[840px] mx-auto mt-2 animate-fade-in",children:[x.jsx(So,{disabled:ne,trigger:x.jsxs(x.Fragment,{children:[x.jsx($,{className:"h-3.5 w-3.5"}),x.jsx("span",{children:(P==null?void 0:P.label)??_})]}),children:f.map(D=>{const A=m0[D.id];return x.jsx(ll,{onClick:()=>E(D.id),selected:_===D.id,icon:x.jsx(A,{className:"h-4 w-4 text-muted-foreground"}),label:D.label},D.id)})}),x.jsx(So,{trigger:x.jsxs(x.Fragment,{children:[x.jsx(Q,{className:"h-3.5 w-3.5"}),x.jsx("span",{children:((T=P.models.find(D=>D.id===F.model))==null?void 0:T.label)??F.model})]}),children:P.models.map(D=>{const A=p0[D.id]??Lo;return x.jsx(ll,{onClick:()=>C(_,D.id),selected:F.model===D.id,icon:x.jsx(A,{className:"h-4 w-4 text-muted-foreground"}),label:D.label},D.id)})}),x.jsx(So,{trigger:x.jsxs(x.Fragment,{children:[x.jsx(Mu,{className:"h-3.5 w-3.5"}),x.jsx("span",{children:((O=ce.find(D=>D.id===J))==null?void 0:O.label)??J})]}),children:ce.map(D=>x.jsx(ll,{onClick:()=>ee(D.id),selected:J===D.id,icon:x.jsx(Mu,{className:"h-4 w-4 text-muted-foreground"}),label:D.label,disabled:_==="claude"&&D.id==="max"&&F.model!=="opus"},D.id))}),_==="codex"?x.jsxs(So,{trigger:x.jsxs(x.Fragment,{children:[te?x.jsx(ec,{className:"h-3.5 w-3.5"}):x.jsx(Mu,{className:"h-3.5 w-3.5"}),x.jsx("span",{children:te?"Fast Mode":"Standard"})]}),triggerClassName:te?"text-emerald-500 dark:text-emerald-400":void 0,children:[x.jsx(ll,{onClick:()=>k("codex",{fastMode:!1}),selected:!te,icon:x.jsx(Mu,{className:"h-4 w-4 text-muted-foreground"}),label:"Standard"}),x.jsx(ll,{onClick:()=>k("codex",{fastMode:!0}),selected:te,icon:x.jsx(ec,{className:"h-4 w-4 text-muted-foreground"}),label:"Fast Mode"})]}):null,I?x.jsxs(So,{trigger:x.jsxs(x.Fragment,{children:[w?x.jsx(Ju,{className:"h-3.5 w-3.5"}):x.jsx(Lb,{className:"h-3.5 w-3.5"}),x.jsx("span",{children:w?"Plan Mode":"Full Access"})]}),triggerClassName:w?"text-blue-400 dark:text-blue-300":void 0,children:[x.jsx(ll,{onClick:()=>N(!1),selected:!w,icon:x.jsx(Lb,{className:"h-4 w-4 text-muted-foreground"}),label:"Full Access",description:"Execute immediately without plan approval"}),x.jsx(ll,{onClick:()=>N(!0),selected:w,icon:x.jsx(Ju,{className:"h-4 w-4 text-muted-foreground"}),label:"Plan Mode",description:"Review a plan before execution"})]}):null]})]})}),$C=v.forwardRef(({className:e,...n},r)=>x.jsx("div",{ref:r,className:ye("bg-card text-card-foreground",e),...n}));$C.displayName="Card";const YC=v.forwardRef(({className:e,...n},r)=>x.jsx("div",{ref:r,className:ye("flex flex-col space-y-1.5 p-2",e),...n}));YC.displayName="CardHeader";const lz=v.forwardRef(({className:e,...n},r)=>x.jsx("h3",{ref:r,className:ye("text-2xl font-semibold leading-none tracking-tight",e),...n}));lz.displayName="CardTitle";const az=v.forwardRef(({className:e,...n},r)=>x.jsx("p",{ref:r,className:ye("text-sm text-muted-foreground",e),...n}));az.displayName="CardDescription";const XC=v.forwardRef(({className:e,...n},r)=>x.jsx("div",{ref:r,className:ye("p-6 pt-0",e),...n}));XC.displayName="CardContent";const oz=v.forwardRef(({className:e,...n},r)=>x.jsx("div",{ref:r,className:ye("flex items-center p-6 pt-0",e),...n}));oz.displayName="CardFooter";function sz({sidebarCollapsed:e,onOpenSidebar:n,onExpandSidebar:r,onNewChat:l,localPath:o,onOpenExternal:s}){return x.jsx(YC,{className:ye("absolute top-0 md:top-2 left-0 right-0 z-10 px-2.5 pr-4 border-border/0 md:pb-0 flex items-center justify-center","backdrop-blur-lg md:backdrop-blur-none bg-gradient-to-b from-background md:from-transparent border-b border-x-0 md:border-x border-border md:border-none"),children:x.jsxs("div",{className:"relative flex items-center gap-2 w-full",children:[x.jsxs("div",{className:"flex items-center gap-1 flex-shrink-0 border-l border-border/0",children:[x.jsx($e,{variant:"ghost",size:"icon",className:"md:hidden",onClick:n,children:x.jsx(Mw,{className:"h-5 w-5"})}),e&&x.jsxs(x.Fragment,{children:[x.jsx("div",{className:"flex items-center justify-center w-[40px] h-[40px]",children:x.jsx(To,{className:"h-4 w-4 sm:h-5 sm:w-5 text-logo ml-1 hidden md:block"})}),x.jsx($e,{variant:"ghost",size:"icon",className:"hidden md:flex",onClick:r,title:"Expand sidebar",children:x.jsx(um,{className:"h-5 w-5"})})]}),x.jsx($e,{variant:"ghost",size:"icon",onClick:l,title:"Compose",children:x.jsx(tp,{className:"h-5 w-5"})})]}),x.jsx("div",{className:"flex-1 min-w-0"}),x.jsx("div",{className:"flex items-center gap-1 flex-shrink-0",children:o&&s&&x.jsxs(x.Fragment,{children:[x.jsx($e,{variant:"ghost",size:"icon",onClick:()=>s("open_finder"),title:"Open in Finder",className:"border border-border/0",children:x.jsx(Aw,{className:"h-4.5 w-4.5"})}),x.jsx($e,{variant:"ghost",size:"icon",onClick:()=>s("open_terminal"),title:"Open in Terminal",className:"border border-border/0",children:x.jsx(np,{className:"h-4.5 w-4.5"})}),x.jsx($e,{variant:"ghost",size:"icon",onClick:()=>s("open_editor"),title:"Open in Cursor",className:"border border-border/0",children:x.jsx(yj,{className:"h-4.5 w-4.5"})})]})})]})})}const km={Task:Ju,TaskOutput:Ju,Bash:np,Glob:Rh,Grep:Rh,ExitPlanMode:Pb,Read:Nj,Edit:Sj,Write:Ej,NotebookEdit:Dw,WebFetch:VM,TodoWrite:ij,WebSearch:Rh,KillShell:n_,AskUserQuestion:jw,Skill:Lo,EnterPlanMode:Pb},KC=l_;function QC(e){return km[e]?km[e]:KC}function Bi({children:e,className:n}){return x.jsx("div",{className:ye("flex gap-3 justify-start items-center",n),children:e})}function uz({children:e,className:n}){return x.jsx("div",{className:ye("flex items-center gap-1.5 text-xs",n),children:e})}function Oi({children:e,className:n}){return x.jsx("span",{className:ye("font-medium text-foreground/80",n),children:e})}function cz({children:e}){return x.jsx("span",{className:"text-muted-foreground",children:e})}function qc({children:e,expandedContent:n,defaultExpanded:r=!1}){const[l,o]=v.useState(r);return x.jsxs("div",{className:"flex flex-col w-full",children:[x.jsxs("button",{onClick:()=>o(!l),className:`group/expandable-row cursor-pointer grid grid-cols-[auto_1fr] items-center gap-1 text-sm ${l?"":"hover:opacity-60 transition-opacity"}`,children:[x.jsx("div",{className:"grid grid-cols-[auto_1fr] items-center gap-1.5",children:e}),x.jsx(Yr,{className:`h-4.5 w-4.5 text-muted-icon translate-y-[0.5px] transition-all duration-200 opacity-0 group-hover/expandable-row:opacity-100 ${l?"rotate-90 opacity-100":""}`})]}),l&&n]})}function g0({label:e,children:n,copyText:r}){const[l,o]=v.useState(!1),s=r??hc(n),c=v.useCallback(async()=>{await navigator.clipboard.writeText(s),o(!0),setTimeout(()=>o(!1),2e3)},[s]);return x.jsxs("div",{children:[x.jsx("span",{className:"font-medium text-muted-foreground",children:e}),x.jsxs("div",{className:"relative group/codeblock",children:[x.jsx("pre",{className:"my-1 text-xs font-mono whitespace-no-wrap break-all bg-muted border border-border rounded-lg p-2 max-h-64 overflow-auto w-full",children:n}),x.jsx($e,{variant:"ghost",size:"icon",className:ye("absolute top-[4px] right-[4px] z-10 h-6.5 w-6.5 rounded-sm text-muted-foreground opacity-0 group-hover/codeblock:opacity-100 transition-opacity",!l&&"hover:text-foreground",l&&"hover:!bg-transparent hover:!border-transparent"),onClick:c,children:l?x.jsx(sl,{className:"h-3.5 w-3.5 text-green-400"}):x.jsx(Rc,{className:"h-4 w-4"})})]})]})}function ZC({children:e,icon:n,className:r}){return x.jsxs("span",{className:ye("inline-flex items-center gap-1 px-2 py-1 bg-muted border border-border rounded-full",r),children:[n&&x.jsx(n,{className:"h-3 w-3 text-muted-foreground"}),e]})}function Gc({children:e,className:n}){return x.jsxs("div",{className:ye("grid grid-cols-[auto_1fr] gap-2 min-w-0",n),children:[x.jsx("div",{className:" min-w-5 flex flex-col relative items-center justify-center",children:x.jsx("div",{className:"min-h-full w-[1px] bg-muted-foreground/20"})}),x.jsx("div",{className:"-ml-[1px] min-w-0 overflow-hidden",children:e})]})}function hc(e){if(typeof e=="string")return e;if(typeof e=="number")return String(e);if(Array.isArray(e))return e.map(hc).join("");if(e&&typeof e=="object"&&"props"in e){const n=e.props;return hc(n.children)}return""}const Vc={pre:({children:e,...n})=>{const[r,l]=v.useState(!1),o=hc(e),s=async()=>{await navigator.clipboard.writeText(o),l(!0),setTimeout(()=>l(!1),2e3)};return x.jsxs("div",{className:"relative overflow-x-auto max-w-full min-w-0 no-code-highlight group/pre",children:[x.jsx("pre",{className:"min-w-0 rounded-xl py-2.5 px-3.5 [.no-pre-highlight_&]:bg-background",...n,children:e}),x.jsx($e,{variant:"ghost",size:"icon",className:ye("absolute top-[35px] -translate-y-[50%] -translate-x-[1px] rounded-md right-1.5 h-8 w-8 text-muted-foreground opacity-0 group-hover/pre:opacity-100 transition-opacity",!r&&"hover:text-foreground",r&&"hover:!bg-transparent hover:!border-transparent"),onClick:s,children:r?x.jsx(sl,{className:"h-4 w-4 text-green-400"}):x.jsx(Rc,{className:"h-4 w-4"})})]})},code:({children:e,className:n,...r})=>n?x.jsx("code",{className:"block text-xs whitespace-pre",...r,children:e}):x.jsx("code",{className:"break-all px-1 bg-border/60 dark:[.no-pre-highlight_&]:bg-background dark:[.text-pretty_&]:bg-neutral [.no-code-highlight_&]:!bg-transparent py-0.5 rounded text-sm whitespace-wrap",...r,children:e}),table:({children:e,...n})=>x.jsx("div",{className:"border border-border rounded-xl overflow-x-auto",children:x.jsx("table",{className:"table-auto min-w-full divide-y divide-border bg-background",...n,children:e})}),tbody:({children:e,...n})=>x.jsx("tbody",{className:"divide-y divide-border",...n,children:e}),th:({children:e,...n})=>x.jsx("th",{className:"text-left text-xs uppercase text-muted-foreground tracking-wider p-2 pl-0 first:pl-3 bg-muted dark:bg-card [&_*]:font-semibold",...n,children:e}),td:({children:e,...n})=>x.jsx("td",{className:"text-left p-2 pl-0 first:pl-3 [&_*]:font-normal ",...n,children:e}),p:({children:e,...n})=>x.jsx("p",{className:"break-words",...n,children:e}),a:({children:e,...n})=>x.jsx("a",{className:"transition-all underline decoration-2 text-orange-500 decoration-orange-500/50 hover:text-orange-500/70 dark:text-logo dark:decoration-logo/70 dark:hover:text-logo/60 dark:hover:decoration-logo/40 ",target:"_blank",rel:"noopener noreferrer",...n,children:e})},fz={...Vc,h1:({children:e})=>x.jsx("h1",{className:"text-2xl font-bold mt-6 mb-4 first:mt-0",children:e}),h2:({children:e})=>x.jsx("h2",{className:"text-xl font-semibold mt-5 mb-3 first:mt-0",children:e}),h3:({children:e})=>x.jsx("h3",{className:"text-lg font-semibold mt-4 mb-2 first:mt-0",children:e}),h4:({children:e})=>x.jsx("h4",{className:"text-base font-semibold mt-3 mb-2 first:mt-0",children:e}),h5:({children:e})=>x.jsx("h5",{className:"text-sm font-semibold mt-3 mb-1 first:mt-0",children:e}),h6:({children:e})=>x.jsx("h6",{className:"text-sm font-medium mt-3 mb-1 first:mt-0",children:e})},dz={connecting:"Connecting...",acquiring_sandbox:"Booting...",initializing:"Initializing...",starting:"Starting...",running:"Running...",waiting_for_user:"Waiting...",failed:"Failed"};function hz({status:e}){const n=(e?dz[e]:void 0)||"Processing...",r=e==="failed";return x.jsx(Bi,{className:"ml-[1px]",children:x.jsxs(uz,{children:[r?x.jsx(Tc,{className:"size-4.5 text-red-500"}):x.jsx(Li,{className:"size-4.5 animate-spin text-muted-icon"}),x.jsx(Lc,{className:"ml-[1px] text-sm",shimmerWidth:44,children:n})]})})}const WC=v.forwardRef(({className:e,children:n,...r},l)=>x.jsx("div",{ref:l,className:ye("relative overflow-y-auto overscroll-contain touch-pan-y scrollbar-hide",e),style:{WebkitOverflowScrolling:"touch"},...r,children:n}));WC.displayName="ScrollArea";function mz(e,n){const r={};return(e[e.length-1]===""?[...e,""]:e).join((r.padRight?" ":"")+","+(r.padLeft===!1?"":" ")).trim()}const pz=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,gz=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,yz={};function y0(e,n){return(yz.jsx?gz:pz).test(e)}const xz=/[ \t\n\f\r]/g;function vz(e){return typeof e=="object"?e.type==="text"?x0(e.value):!1:x0(e)}function x0(e){return e.replace(xz,"")===""}class os{constructor(n,r,l){this.normal=r,this.property=n,l&&(this.space=l)}}os.prototype.normal={};os.prototype.property={};os.prototype.space=void 0;function JC(e,n){const r={},l={};for(const o of e)Object.assign(r,o.property),Object.assign(l,o.normal);return new os(r,l,n)}function Nm(e){return e.toLowerCase()}class mn{constructor(n,r){this.attribute=r,this.property=n}}mn.prototype.attribute="";mn.prototype.booleanish=!1;mn.prototype.boolean=!1;mn.prototype.commaOrSpaceSeparated=!1;mn.prototype.commaSeparated=!1;mn.prototype.defined=!1;mn.prototype.mustUseProperty=!1;mn.prototype.number=!1;mn.prototype.overloadedBoolean=!1;mn.prototype.property="";mn.prototype.spaceSeparated=!1;mn.prototype.space=void 0;let bz=0;const _e=ml(),kt=ml(),Rm=ml(),de=ml(),rt=ml(),da=ml(),En=ml();function ml(){return 2**++bz}const Tm=Object.freeze(Object.defineProperty({__proto__:null,boolean:_e,booleanish:kt,commaOrSpaceSeparated:En,commaSeparated:da,number:de,overloadedBoolean:Rm,spaceSeparated:rt},Symbol.toStringTag,{value:"Module"})),Lh=Object.keys(Tm);class Up extends mn{constructor(n,r,l,o){let s=-1;if(super(n,r),v0(this,"space",o),typeof l=="number")for(;++s<Lh.length;){const c=Lh[s];v0(this,Lh[s],(l&Tm[c])===Tm[c])}}}Up.prototype.defined=!0;function v0(e,n,r){r&&(e[n]=r)}function Na(e){const n={},r={};for(const[l,o]of Object.entries(e.properties)){const s=new Up(l,e.transform(e.attributes||{},l),o,e.space);e.mustUseProperty&&e.mustUseProperty.includes(l)&&(s.mustUseProperty=!0),n[l]=s,r[Nm(l)]=l,r[Nm(s.attribute)]=l}return new os(n,r,e.space)}const eE=Na({properties:{ariaActiveDescendant:null,ariaAtomic:kt,ariaAutoComplete:null,ariaBusy:kt,ariaChecked:kt,ariaColCount:de,ariaColIndex:de,ariaColSpan:de,ariaControls:rt,ariaCurrent:null,ariaDescribedBy:rt,ariaDetails:null,ariaDisabled:kt,ariaDropEffect:rt,ariaErrorMessage:null,ariaExpanded:kt,ariaFlowTo:rt,ariaGrabbed:kt,ariaHasPopup:null,ariaHidden:kt,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:rt,ariaLevel:de,ariaLive:null,ariaModal:kt,ariaMultiLine:kt,ariaMultiSelectable:kt,ariaOrientation:null,ariaOwns:rt,ariaPlaceholder:null,ariaPosInSet:de,ariaPressed:kt,ariaReadOnly:kt,ariaRelevant:null,ariaRequired:kt,ariaRoleDescription:rt,ariaRowCount:de,ariaRowIndex:de,ariaRowSpan:de,ariaSelected:kt,ariaSetSize:de,ariaSort:null,ariaValueMax:de,ariaValueMin:de,ariaValueNow:de,ariaValueText:null,role:null},transform(e,n){return n==="role"?n:"aria-"+n.slice(4).toLowerCase()}});function tE(e,n){return n in e?e[n]:n}function nE(e,n){return tE(e,n.toLowerCase())}const wz=Na({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:da,acceptCharset:rt,accessKey:rt,action:null,allow:null,allowFullScreen:_e,allowPaymentRequest:_e,allowUserMedia:_e,alt:null,as:null,async:_e,autoCapitalize:null,autoComplete:rt,autoFocus:_e,autoPlay:_e,blocking:rt,capture:null,charSet:null,checked:_e,cite:null,className:rt,cols:de,colSpan:null,content:null,contentEditable:kt,controls:_e,controlsList:rt,coords:de|da,crossOrigin:null,data:null,dateTime:null,decoding:null,default:_e,defer:_e,dir:null,dirName:null,disabled:_e,download:Rm,draggable:kt,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:_e,formTarget:null,headers:rt,height:de,hidden:Rm,high:de,href:null,hrefLang:null,htmlFor:rt,httpEquiv:rt,id:null,imageSizes:null,imageSrcSet:null,inert:_e,inputMode:null,integrity:null,is:null,isMap:_e,itemId:null,itemProp:rt,itemRef:rt,itemScope:_e,itemType:rt,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:_e,low:de,manifest:null,max:null,maxLength:de,media:null,method:null,min:null,minLength:de,multiple:_e,muted:_e,name:null,nonce:null,noModule:_e,noValidate:_e,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:_e,optimum:de,pattern:null,ping:rt,placeholder:null,playsInline:_e,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:_e,referrerPolicy:null,rel:rt,required:_e,reversed:_e,rows:de,rowSpan:de,sandbox:rt,scope:null,scoped:_e,seamless:_e,selected:_e,shadowRootClonable:_e,shadowRootDelegatesFocus:_e,shadowRootMode:null,shape:null,size:de,sizes:null,slot:null,span:de,spellCheck:kt,src:null,srcDoc:null,srcLang:null,srcSet:null,start:de,step:null,style:null,tabIndex:de,target:null,title:null,translate:null,type:null,typeMustMatch:_e,useMap:null,value:kt,width:de,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:rt,axis:null,background:null,bgColor:null,border:de,borderColor:null,bottomMargin:de,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:_e,declare:_e,event:null,face:null,frame:null,frameBorder:null,hSpace:de,leftMargin:de,link:null,longDesc:null,lowSrc:null,marginHeight:de,marginWidth:de,noResize:_e,noHref:_e,noShade:_e,noWrap:_e,object:null,profile:null,prompt:null,rev:null,rightMargin:de,rules:null,scheme:null,scrolling:kt,standby:null,summary:null,text:null,topMargin:de,valueType:null,version:null,vAlign:null,vLink:null,vSpace:de,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:_e,disableRemotePlayback:_e,prefix:null,property:null,results:de,security:null,unselectable:null},space:"html",transform:nE}),Sz=Na({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:En,accentHeight:de,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:de,amplitude:de,arabicForm:null,ascent:de,attributeName:null,attributeType:null,azimuth:de,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:de,by:null,calcMode:null,capHeight:de,className:rt,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:de,diffuseConstant:de,direction:null,display:null,dur:null,divisor:de,dominantBaseline:null,download:_e,dx:null,dy:null,edgeMode:null,editable:null,elevation:de,enableBackground:null,end:null,event:null,exponent:de,externalResourcesRequired:null,fill:null,fillOpacity:de,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:da,g2:da,glyphName:da,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:de,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:de,horizOriginX:de,horizOriginY:de,id:null,ideographic:de,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:de,k:de,k1:de,k2:de,k3:de,k4:de,kernelMatrix:En,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:de,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:de,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:de,overlineThickness:de,paintOrder:null,panose1:null,path:null,pathLength:de,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:rt,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:de,pointsAtY:de,pointsAtZ:de,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:En,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:En,rev:En,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:En,requiredFeatures:En,requiredFonts:En,requiredFormats:En,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:de,specularExponent:de,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:de,strikethroughThickness:de,string:null,stroke:null,strokeDashArray:En,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:de,strokeOpacity:de,strokeWidth:null,style:null,surfaceScale:de,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:En,tabIndex:de,tableValues:null,target:null,targetX:de,targetY:de,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:En,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:de,underlineThickness:de,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:de,values:null,vAlphabetic:de,vMathematical:de,vectorEffect:null,vHanging:de,vIdeographic:de,version:null,vertAdvY:de,vertOriginX:de,vertOriginY:de,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:de,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:tE}),rE=Na({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(e,n){return"xlink:"+n.slice(5).toLowerCase()}}),iE=Na({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:nE}),lE=Na({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,n){return"xml:"+n.slice(3).toLowerCase()}}),Cz={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"},Ez=/[A-Z]/g,b0=/-[a-z]/g,kz=/^data[-\w.:]+$/i;function Nz(e,n){const r=Nm(n);let l=n,o=mn;if(r in e.normal)return e.property[e.normal[r]];if(r.length>4&&r.slice(0,4)==="data"&&kz.test(n)){if(n.charAt(4)==="-"){const s=n.slice(5).replace(b0,Tz);l="data"+s.charAt(0).toUpperCase()+s.slice(1)}else{const s=n.slice(4);if(!b0.test(s)){let c=s.replace(Ez,Rz);c.charAt(0)!=="-"&&(c="-"+c),n="data"+c}}o=Up}return new o(l,n)}function Rz(e){return"-"+e.toLowerCase()}function Tz(e){return e.charAt(1).toUpperCase()}const Az=JC([eE,wz,rE,iE,lE],"html"),Hp=JC([eE,Sz,rE,iE,lE],"svg");function Mz(e){return e.join(" ").trim()}var ia={},Ph,w0;function jz(){if(w0)return Ph;w0=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,n=/\n/g,r=/^\s*/,l=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,o=/^:\s*/,s=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,c=/^[;\s]*/,f=/^\s+|\s+$/g,d=`
389
+ `,h="/",g="*",p="",b="comment",w="declaration";function E(k,N){if(typeof k!="string")throw new TypeError("First argument must be a string");if(!k)return[];N=N||{};var j=1,M=1;function z(le){var ee=le.match(n);ee&&(j+=ee.length);var B=le.lastIndexOf(d);M=~B?le.length-B:M+le.length}function U(){var le={line:j,column:M};return function(ee){return ee.position=new _(le),ne(),ee}}function _(le){this.start=le,this.end={line:j,column:M},this.source=N.source}_.prototype.content=k;function P(le){var ee=new Error(N.source+":"+j+":"+M+": "+le);if(ee.reason=le,ee.filename=N.source,ee.line=j,ee.column=M,ee.source=k,!N.silent)throw ee}function F(le){var ee=le.exec(k);if(ee){var B=ee[0];return z(B),k=k.slice(B.length),ee}}function ne(){F(r)}function I(le){var ee;for(le=le||[];ee=J();)ee!==!1&&le.push(ee);return le}function J(){var le=U();if(!(h!=k.charAt(0)||g!=k.charAt(1))){for(var ee=2;p!=k.charAt(ee)&&(g!=k.charAt(ee)||h!=k.charAt(ee+1));)++ee;if(ee+=2,p===k.charAt(ee-1))return P("End of comment missing");var B=k.slice(2,ee-2);return M+=2,z(B),k=k.slice(ee),M+=2,le({type:b,comment:B})}}function te(){var le=U(),ee=F(l);if(ee){if(J(),!F(o))return P("property missing ':'");var B=F(s),X=le({type:w,property:C(ee[0].replace(e,p)),value:B?C(B[0].replace(e,p)):p});return F(c),X}}function ce(){var le=[];I(le);for(var ee;ee=te();)ee!==!1&&(le.push(ee),I(le));return le}return ne(),ce()}function C(k){return k?k.replace(f,p):p}return Ph=E,Ph}var S0;function _z(){if(S0)return ia;S0=1;var e=ia&&ia.__importDefault||function(l){return l&&l.__esModule?l:{default:l}};Object.defineProperty(ia,"__esModule",{value:!0}),ia.default=r;const n=e(jz());function r(l,o){let s=null;if(!l||typeof l!="string")return s;const c=(0,n.default)(l),f=typeof o=="function";return c.forEach(d=>{if(d.type!=="declaration")return;const{property:h,value:g}=d;f?o(h,g,d):g&&(s=s||{},s[h]=g)}),s}return ia}var Co={},C0;function Oz(){if(C0)return Co;C0=1,Object.defineProperty(Co,"__esModule",{value:!0}),Co.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,n=/-([a-z])/g,r=/^[^-]+$/,l=/^-(webkit|moz|ms|o|khtml)-/,o=/^-(ms)-/,s=function(h){return!h||r.test(h)||e.test(h)},c=function(h,g){return g.toUpperCase()},f=function(h,g){return"".concat(g,"-")},d=function(h,g){return g===void 0&&(g={}),s(h)?h:(h=h.toLowerCase(),g.reactCompat?h=h.replace(o,f):h=h.replace(l,f),h.replace(n,c))};return Co.camelCase=d,Co}var Eo,E0;function Dz(){if(E0)return Eo;E0=1;var e=Eo&&Eo.__importDefault||function(o){return o&&o.__esModule?o:{default:o}},n=e(_z()),r=Oz();function l(o,s){var c={};return!o||typeof o!="string"||(0,n.default)(o,function(f,d){f&&d&&(c[(0,r.camelCase)(f,s)]=d)}),c}return l.default=l,Eo=l,Eo}var zz=Dz();const Lz=vc(zz),aE=oE("end"),Fp=oE("start");function oE(e){return n;function n(r){const l=r&&r.position&&r.position[e]||{};if(typeof l.line=="number"&&l.line>0&&typeof l.column=="number"&&l.column>0)return{line:l.line,column:l.column,offset:typeof l.offset=="number"&&l.offset>-1?l.offset:void 0}}}function Pz(e){const n=Fp(e),r=aE(e);if(n&&r)return{start:n,end:r}}function _o(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?k0(e.position):"start"in e||"end"in e?k0(e):"line"in e||"column"in e?Am(e):""}function Am(e){return N0(e&&e.line)+":"+N0(e&&e.column)}function k0(e){return Am(e&&e.start)+"-"+Am(e&&e.end)}function N0(e){return e&&typeof e=="number"?e:1}class Kt extends Error{constructor(n,r,l){super(),typeof r=="string"&&(l=r,r=void 0);let o="",s={},c=!1;if(r&&("line"in r&&"column"in r?s={place:r}:"start"in r&&"end"in r?s={place:r}:"type"in r?s={ancestors:[r],place:r.position}:s={...r}),typeof n=="string"?o=n:!s.cause&&n&&(c=!0,o=n.message,s.cause=n),!s.ruleId&&!s.source&&typeof l=="string"){const d=l.indexOf(":");d===-1?s.ruleId=l:(s.source=l.slice(0,d),s.ruleId=l.slice(d+1))}if(!s.place&&s.ancestors&&s.ancestors){const d=s.ancestors[s.ancestors.length-1];d&&(s.place=d.position)}const f=s.place&&"start"in s.place?s.place.start:s.place;this.ancestors=s.ancestors||void 0,this.cause=s.cause||void 0,this.column=f?f.column:void 0,this.fatal=void 0,this.file="",this.message=o,this.line=f?f.line:void 0,this.name=_o(s.place)||"1:1",this.place=s.place||void 0,this.reason=this.message,this.ruleId=s.ruleId||void 0,this.source=s.source||void 0,this.stack=c&&s.cause&&typeof s.cause.stack=="string"?s.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}Kt.prototype.file="";Kt.prototype.name="";Kt.prototype.reason="";Kt.prototype.message="";Kt.prototype.stack="";Kt.prototype.column=void 0;Kt.prototype.line=void 0;Kt.prototype.ancestors=void 0;Kt.prototype.cause=void 0;Kt.prototype.fatal=void 0;Kt.prototype.place=void 0;Kt.prototype.ruleId=void 0;Kt.prototype.source=void 0;const qp={}.hasOwnProperty,Bz=new Map,Iz=/[A-Z]/g,Uz=new Set(["table","tbody","thead","tfoot","tr"]),Hz=new Set(["td","th"]),sE="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function Fz(e,n){if(!n||n.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const r=n.filePath||void 0;let l;if(n.development){if(typeof n.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");l=Qz(r,n.jsxDEV)}else{if(typeof n.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof n.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");l=Kz(r,n.jsx,n.jsxs)}const o={Fragment:n.Fragment,ancestors:[],components:n.components||{},create:l,elementAttributeNameCase:n.elementAttributeNameCase||"react",evaluater:n.createEvaluater?n.createEvaluater():void 0,filePath:r,ignoreInvalidStyle:n.ignoreInvalidStyle||!1,passKeys:n.passKeys!==!1,passNode:n.passNode||!1,schema:n.space==="svg"?Hp:Az,stylePropertyNameCase:n.stylePropertyNameCase||"dom",tableCellAlignToStyle:n.tableCellAlignToStyle!==!1},s=uE(o,e,void 0);return s&&typeof s!="string"?s:o.create(e,o.Fragment,{children:s||void 0},void 0)}function uE(e,n,r){if(n.type==="element")return qz(e,n,r);if(n.type==="mdxFlowExpression"||n.type==="mdxTextExpression")return Gz(e,n);if(n.type==="mdxJsxFlowElement"||n.type==="mdxJsxTextElement")return $z(e,n,r);if(n.type==="mdxjsEsm")return Vz(e,n);if(n.type==="root")return Yz(e,n,r);if(n.type==="text")return Xz(e,n)}function qz(e,n,r){const l=e.schema;let o=l;n.tagName.toLowerCase()==="svg"&&l.space==="html"&&(o=Hp,e.schema=o),e.ancestors.push(n);const s=fE(e,n.tagName,!1),c=Zz(e,n);let f=Vp(e,n);return Uz.has(n.tagName)&&(f=f.filter(function(d){return typeof d=="string"?!vz(d):!0})),cE(e,c,s,n),Gp(c,f),e.ancestors.pop(),e.schema=l,e.create(n,s,c,r)}function Gz(e,n){if(n.data&&n.data.estree&&e.evaluater){const l=n.data.estree.body[0];return l.type,e.evaluater.evaluateExpression(l.expression)}Vo(e,n.position)}function Vz(e,n){if(n.data&&n.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(n.data.estree);Vo(e,n.position)}function $z(e,n,r){const l=e.schema;let o=l;n.name==="svg"&&l.space==="html"&&(o=Hp,e.schema=o),e.ancestors.push(n);const s=n.name===null?e.Fragment:fE(e,n.name,!0),c=Wz(e,n),f=Vp(e,n);return cE(e,c,s,n),Gp(c,f),e.ancestors.pop(),e.schema=l,e.create(n,s,c,r)}function Yz(e,n,r){const l={};return Gp(l,Vp(e,n)),e.create(n,e.Fragment,l,r)}function Xz(e,n){return n.value}function cE(e,n,r,l){typeof r!="string"&&r!==e.Fragment&&e.passNode&&(n.node=l)}function Gp(e,n){if(n.length>0){const r=n.length>1?n:n[0];r&&(e.children=r)}}function Kz(e,n,r){return l;function l(o,s,c,f){const h=Array.isArray(c.children)?r:n;return f?h(s,c,f):h(s,c)}}function Qz(e,n){return r;function r(l,o,s,c){const f=Array.isArray(s.children),d=Fp(l);return n(o,s,c,f,{columnNumber:d?d.column-1:void 0,fileName:e,lineNumber:d?d.line:void 0},void 0)}}function Zz(e,n){const r={};let l,o;for(o in n.properties)if(o!=="children"&&qp.call(n.properties,o)){const s=Jz(e,o,n.properties[o]);if(s){const[c,f]=s;e.tableCellAlignToStyle&&c==="align"&&typeof f=="string"&&Hz.has(n.tagName)?l=f:r[c]=f}}if(l){const s=r.style||(r.style={});s[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=l}return r}function Wz(e,n){const r={};for(const l of n.attributes)if(l.type==="mdxJsxExpressionAttribute")if(l.data&&l.data.estree&&e.evaluater){const s=l.data.estree.body[0];s.type;const c=s.expression;c.type;const f=c.properties[0];f.type,Object.assign(r,e.evaluater.evaluateExpression(f.argument))}else Vo(e,n.position);else{const o=l.name;let s;if(l.value&&typeof l.value=="object")if(l.value.data&&l.value.data.estree&&e.evaluater){const f=l.value.data.estree.body[0];f.type,s=e.evaluater.evaluateExpression(f.expression)}else Vo(e,n.position);else s=l.value===null?!0:l.value;r[o]=s}return r}function Vp(e,n){const r=[];let l=-1;const o=e.passKeys?new Map:Bz;for(;++l<n.children.length;){const s=n.children[l];let c;if(e.passKeys){const d=s.type==="element"?s.tagName:s.type==="mdxJsxFlowElement"||s.type==="mdxJsxTextElement"?s.name:void 0;if(d){const h=o.get(d)||0;c=d+"-"+h,o.set(d,h+1)}}const f=uE(e,s,c);f!==void 0&&r.push(f)}return r}function Jz(e,n,r){const l=Nz(e.schema,n);if(!(r==null||typeof r=="number"&&Number.isNaN(r))){if(Array.isArray(r)&&(r=l.commaSeparated?mz(r):Mz(r)),l.property==="style"){let o=typeof r=="object"?r:e6(e,String(r));return e.stylePropertyNameCase==="css"&&(o=t6(o)),["style",o]}return[e.elementAttributeNameCase==="react"&&l.space?Cz[l.property]||l.property:l.attribute,r]}}function e6(e,n){try{return Lz(n,{reactCompat:!0})}catch(r){if(e.ignoreInvalidStyle)return{};const l=r,o=new Kt("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:l,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw o.file=e.filePath||void 0,o.url=sE+"#cannot-parse-style-attribute",o}}function fE(e,n,r){let l;if(!r)l={type:"Literal",value:n};else if(n.includes(".")){const o=n.split(".");let s=-1,c;for(;++s<o.length;){const f=y0(o[s])?{type:"Identifier",name:o[s]}:{type:"Literal",value:o[s]};c=c?{type:"MemberExpression",object:c,property:f,computed:!!(s&&f.type==="Literal"),optional:!1}:f}l=c}else l=y0(n)&&!/^[a-z]/.test(n)?{type:"Identifier",name:n}:{type:"Literal",value:n};if(l.type==="Literal"){const o=l.value;return qp.call(e.components,o)?e.components[o]:o}if(e.evaluater)return e.evaluater.evaluateExpression(l);Vo(e)}function Vo(e,n){const r=new Kt("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:n,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw r.file=e.filePath||void 0,r.url=sE+"#cannot-handle-mdx-estrees-without-createevaluater",r}function t6(e){const n={};let r;for(r in e)qp.call(e,r)&&(n[n6(r)]=e[r]);return n}function n6(e){let n=e.replace(Iz,r6);return n.slice(0,3)==="ms-"&&(n="-"+n),n}function r6(e){return"-"+e.toLowerCase()}const Bh={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"]},i6={};function $p(e,n){const r=i6,l=typeof r.includeImageAlt=="boolean"?r.includeImageAlt:!0,o=typeof r.includeHtml=="boolean"?r.includeHtml:!0;return dE(e,l,o)}function dE(e,n,r){if(l6(e)){if("value"in e)return e.type==="html"&&!r?"":e.value;if(n&&"alt"in e&&e.alt)return e.alt;if("children"in e)return R0(e.children,n,r)}return Array.isArray(e)?R0(e,n,r):""}function R0(e,n,r){const l=[];let o=-1;for(;++o<e.length;)l[o]=dE(e[o],n,r);return l.join("")}function l6(e){return!!(e&&typeof e=="object")}const T0=document.createElement("i");function Yp(e){const n="&"+e+";";T0.innerHTML=n;const r=T0.textContent;return r.charCodeAt(r.length-1)===59&&e!=="semi"||r===n?!1:r}function Rn(e,n,r,l){const o=e.length;let s=0,c;if(n<0?n=-n>o?0:o+n:n=n>o?o:n,r=r>0?r:0,l.length<1e4)c=Array.from(l),c.unshift(n,r),e.splice(...c);else for(r&&e.splice(n,r);s<l.length;)c=l.slice(s,s+1e4),c.unshift(n,0),e.splice(...c),s+=1e4,n+=1e4}function qn(e,n){return e.length>0?(Rn(e,e.length,0,n),e):n}const A0={}.hasOwnProperty;function hE(e){const n={};let r=-1;for(;++r<e.length;)a6(n,e[r]);return n}function a6(e,n){let r;for(r in n){const o=(A0.call(e,r)?e[r]:void 0)||(e[r]={}),s=n[r];let c;if(s)for(c in s){A0.call(o,c)||(o[c]=[]);const f=s[c];o6(o[c],Array.isArray(f)?f:f?[f]:[])}}}function o6(e,n){let r=-1;const l=[];for(;++r<n.length;)(n[r].add==="after"?e:l).push(n[r]);Rn(e,0,0,l)}function mE(e,n){const r=Number.parseInt(e,n);return r<9||r===11||r>13&&r<32||r>126&&r<160||r>55295&&r<57344||r>64975&&r<65008||(r&65535)===65535||(r&65535)===65534||r>1114111?"�":String.fromCodePoint(r)}function nr(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const Wt=Ii(/[A-Za-z]/),Xt=Ii(/[\dA-Za-z]/),s6=Ii(/[#-'*+\--9=?A-Z^-~]/);function mc(e){return e!==null&&(e<32||e===127)}const Mm=Ii(/\d/),u6=Ii(/[\dA-Fa-f]/),c6=Ii(/[!-/:-@[-`{-~]/);function Ee(e){return e!==null&&e<-2}function tt(e){return e!==null&&(e<0||e===32)}function Pe(e){return e===-2||e===-1||e===32}const $c=Ii(new RegExp("\\p{P}|\\p{S}","u")),cl=Ii(/\s/);function Ii(e){return n;function n(r){return r!==null&&r>-1&&e.test(String.fromCharCode(r))}}function Ra(e){const n=[];let r=-1,l=0,o=0;for(;++r<e.length;){const s=e.charCodeAt(r);let c="";if(s===37&&Xt(e.charCodeAt(r+1))&&Xt(e.charCodeAt(r+2)))o=2;else if(s<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(s))||(c=String.fromCharCode(s));else if(s>55295&&s<57344){const f=e.charCodeAt(r+1);s<56320&&f>56319&&f<57344?(c=String.fromCharCode(s,f),o=1):c="�"}else c=String.fromCharCode(s);c&&(n.push(e.slice(l,r),encodeURIComponent(c)),l=r+o+1,c=""),o&&(r+=o,o=0)}return n.join("")+e.slice(l)}function He(e,n,r,l){const o=l?l-1:Number.POSITIVE_INFINITY;let s=0;return c;function c(d){return Pe(d)?(e.enter(r),f(d)):n(d)}function f(d){return Pe(d)&&s++<o?(e.consume(d),f):(e.exit(r),n(d))}}const f6={tokenize:d6};function d6(e){const n=e.attempt(this.parser.constructs.contentInitial,l,o);let r;return n;function l(f){if(f===null){e.consume(f);return}return e.enter("lineEnding"),e.consume(f),e.exit("lineEnding"),He(e,n,"linePrefix")}function o(f){return e.enter("paragraph"),s(f)}function s(f){const d=e.enter("chunkText",{contentType:"text",previous:r});return r&&(r.next=d),r=d,c(f)}function c(f){if(f===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(f);return}return Ee(f)?(e.consume(f),e.exit("chunkText"),s):(e.consume(f),c)}}const h6={tokenize:m6},M0={tokenize:p6};function m6(e){const n=this,r=[];let l=0,o,s,c;return f;function f(M){if(l<r.length){const z=r[l];return n.containerState=z[1],e.attempt(z[0].continuation,d,h)(M)}return h(M)}function d(M){if(l++,n.containerState._closeFlow){n.containerState._closeFlow=void 0,o&&j();const z=n.events.length;let U=z,_;for(;U--;)if(n.events[U][0]==="exit"&&n.events[U][1].type==="chunkFlow"){_=n.events[U][1].end;break}N(l);let P=z;for(;P<n.events.length;)n.events[P][1].end={..._},P++;return Rn(n.events,U+1,0,n.events.slice(z)),n.events.length=P,h(M)}return f(M)}function h(M){if(l===r.length){if(!o)return b(M);if(o.currentConstruct&&o.currentConstruct.concrete)return E(M);n.interrupt=!!(o.currentConstruct&&!o._gfmTableDynamicInterruptHack)}return n.containerState={},e.check(M0,g,p)(M)}function g(M){return o&&j(),N(l),b(M)}function p(M){return n.parser.lazy[n.now().line]=l!==r.length,c=n.now().offset,E(M)}function b(M){return n.containerState={},e.attempt(M0,w,E)(M)}function w(M){return l++,r.push([n.currentConstruct,n.containerState]),b(M)}function E(M){if(M===null){o&&j(),N(0),e.consume(M);return}return o=o||n.parser.flow(n.now()),e.enter("chunkFlow",{_tokenizer:o,contentType:"flow",previous:s}),C(M)}function C(M){if(M===null){k(e.exit("chunkFlow"),!0),N(0),e.consume(M);return}return Ee(M)?(e.consume(M),k(e.exit("chunkFlow")),l=0,n.interrupt=void 0,f):(e.consume(M),C)}function k(M,z){const U=n.sliceStream(M);if(z&&U.push(null),M.previous=s,s&&(s.next=M),s=M,o.defineSkip(M.start),o.write(U),n.parser.lazy[M.start.line]){let _=o.events.length;for(;_--;)if(o.events[_][1].start.offset<c&&(!o.events[_][1].end||o.events[_][1].end.offset>c))return;const P=n.events.length;let F=P,ne,I;for(;F--;)if(n.events[F][0]==="exit"&&n.events[F][1].type==="chunkFlow"){if(ne){I=n.events[F][1].end;break}ne=!0}for(N(l),_=P;_<n.events.length;)n.events[_][1].end={...I},_++;Rn(n.events,F+1,0,n.events.slice(P)),n.events.length=_}}function N(M){let z=r.length;for(;z-- >M;){const U=r[z];n.containerState=U[1],U[0].exit.call(n,e)}r.length=M}function j(){o.write([null]),s=void 0,o=void 0,n.containerState._closeFlow=void 0}}function p6(e,n,r){return He(e,e.attempt(this.parser.constructs.document,n,r),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function ya(e){if(e===null||tt(e)||cl(e))return 1;if($c(e))return 2}function Yc(e,n,r){const l=[];let o=-1;for(;++o<e.length;){const s=e[o].resolveAll;s&&!l.includes(s)&&(n=s(n,r),l.push(s))}return n}const jm={name:"attention",resolveAll:g6,tokenize:y6};function g6(e,n){let r=-1,l,o,s,c,f,d,h,g;for(;++r<e.length;)if(e[r][0]==="enter"&&e[r][1].type==="attentionSequence"&&e[r][1]._close){for(l=r;l--;)if(e[l][0]==="exit"&&e[l][1].type==="attentionSequence"&&e[l][1]._open&&n.sliceSerialize(e[l][1]).charCodeAt(0)===n.sliceSerialize(e[r][1]).charCodeAt(0)){if((e[l][1]._close||e[r][1]._open)&&(e[r][1].end.offset-e[r][1].start.offset)%3&&!((e[l][1].end.offset-e[l][1].start.offset+e[r][1].end.offset-e[r][1].start.offset)%3))continue;d=e[l][1].end.offset-e[l][1].start.offset>1&&e[r][1].end.offset-e[r][1].start.offset>1?2:1;const p={...e[l][1].end},b={...e[r][1].start};j0(p,-d),j0(b,d),c={type:d>1?"strongSequence":"emphasisSequence",start:p,end:{...e[l][1].end}},f={type:d>1?"strongSequence":"emphasisSequence",start:{...e[r][1].start},end:b},s={type:d>1?"strongText":"emphasisText",start:{...e[l][1].end},end:{...e[r][1].start}},o={type:d>1?"strong":"emphasis",start:{...c.start},end:{...f.end}},e[l][1].end={...c.start},e[r][1].start={...f.end},h=[],e[l][1].end.offset-e[l][1].start.offset&&(h=qn(h,[["enter",e[l][1],n],["exit",e[l][1],n]])),h=qn(h,[["enter",o,n],["enter",c,n],["exit",c,n],["enter",s,n]]),h=qn(h,Yc(n.parser.constructs.insideSpan.null,e.slice(l+1,r),n)),h=qn(h,[["exit",s,n],["enter",f,n],["exit",f,n],["exit",o,n]]),e[r][1].end.offset-e[r][1].start.offset?(g=2,h=qn(h,[["enter",e[r][1],n],["exit",e[r][1],n]])):g=0,Rn(e,l-1,r-l+3,h),r=l+h.length-g-2;break}}for(r=-1;++r<e.length;)e[r][1].type==="attentionSequence"&&(e[r][1].type="data");return e}function y6(e,n){const r=this.parser.constructs.attentionMarkers.null,l=this.previous,o=ya(l);let s;return c;function c(d){return s=d,e.enter("attentionSequence"),f(d)}function f(d){if(d===s)return e.consume(d),f;const h=e.exit("attentionSequence"),g=ya(d),p=!g||g===2&&o||r.includes(d),b=!o||o===2&&g||r.includes(l);return h._open=!!(s===42?p:p&&(o||!b)),h._close=!!(s===42?b:b&&(g||!p)),n(d)}}function j0(e,n){e.column+=n,e.offset+=n,e._bufferIndex+=n}const x6={name:"autolink",tokenize:v6};function v6(e,n,r){let l=0;return o;function o(w){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(w),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),s}function s(w){return Wt(w)?(e.consume(w),c):w===64?r(w):h(w)}function c(w){return w===43||w===45||w===46||Xt(w)?(l=1,f(w)):h(w)}function f(w){return w===58?(e.consume(w),l=0,d):(w===43||w===45||w===46||Xt(w))&&l++<32?(e.consume(w),f):(l=0,h(w))}function d(w){return w===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(w),e.exit("autolinkMarker"),e.exit("autolink"),n):w===null||w===32||w===60||mc(w)?r(w):(e.consume(w),d)}function h(w){return w===64?(e.consume(w),g):s6(w)?(e.consume(w),h):r(w)}function g(w){return Xt(w)?p(w):r(w)}function p(w){return w===46?(e.consume(w),l=0,g):w===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(w),e.exit("autolinkMarker"),e.exit("autolink"),n):b(w)}function b(w){if((w===45||Xt(w))&&l++<63){const E=w===45?b:p;return e.consume(w),E}return r(w)}}const ss={partial:!0,tokenize:b6};function b6(e,n,r){return l;function l(s){return Pe(s)?He(e,o,"linePrefix")(s):o(s)}function o(s){return s===null||Ee(s)?n(s):r(s)}}const pE={continuation:{tokenize:S6},exit:C6,name:"blockQuote",tokenize:w6};function w6(e,n,r){const l=this;return o;function o(c){if(c===62){const f=l.containerState;return f.open||(e.enter("blockQuote",{_container:!0}),f.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(c),e.exit("blockQuoteMarker"),s}return r(c)}function s(c){return Pe(c)?(e.enter("blockQuotePrefixWhitespace"),e.consume(c),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),n):(e.exit("blockQuotePrefix"),n(c))}}function S6(e,n,r){const l=this;return o;function o(c){return Pe(c)?He(e,s,"linePrefix",l.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(c):s(c)}function s(c){return e.attempt(pE,n,r)(c)}}function C6(e){e.exit("blockQuote")}const gE={name:"characterEscape",tokenize:E6};function E6(e,n,r){return l;function l(s){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(s),e.exit("escapeMarker"),o}function o(s){return c6(s)?(e.enter("characterEscapeValue"),e.consume(s),e.exit("characterEscapeValue"),e.exit("characterEscape"),n):r(s)}}const yE={name:"characterReference",tokenize:k6};function k6(e,n,r){const l=this;let o=0,s,c;return f;function f(p){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(p),e.exit("characterReferenceMarker"),d}function d(p){return p===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(p),e.exit("characterReferenceMarkerNumeric"),h):(e.enter("characterReferenceValue"),s=31,c=Xt,g(p))}function h(p){return p===88||p===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(p),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),s=6,c=u6,g):(e.enter("characterReferenceValue"),s=7,c=Mm,g(p))}function g(p){if(p===59&&o){const b=e.exit("characterReferenceValue");return c===Xt&&!Yp(l.sliceSerialize(b))?r(p):(e.enter("characterReferenceMarker"),e.consume(p),e.exit("characterReferenceMarker"),e.exit("characterReference"),n)}return c(p)&&o++<s?(e.consume(p),g):r(p)}}const _0={partial:!0,tokenize:R6},O0={concrete:!0,name:"codeFenced",tokenize:N6};function N6(e,n,r){const l=this,o={partial:!0,tokenize:U};let s=0,c=0,f;return d;function d(_){return h(_)}function h(_){const P=l.events[l.events.length-1];return s=P&&P[1].type==="linePrefix"?P[2].sliceSerialize(P[1],!0).length:0,f=_,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),g(_)}function g(_){return _===f?(c++,e.consume(_),g):c<3?r(_):(e.exit("codeFencedFenceSequence"),Pe(_)?He(e,p,"whitespace")(_):p(_))}function p(_){return _===null||Ee(_)?(e.exit("codeFencedFence"),l.interrupt?n(_):e.check(_0,C,z)(_)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),b(_))}function b(_){return _===null||Ee(_)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),p(_)):Pe(_)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),He(e,w,"whitespace")(_)):_===96&&_===f?r(_):(e.consume(_),b)}function w(_){return _===null||Ee(_)?p(_):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),E(_))}function E(_){return _===null||Ee(_)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),p(_)):_===96&&_===f?r(_):(e.consume(_),E)}function C(_){return e.attempt(o,z,k)(_)}function k(_){return e.enter("lineEnding"),e.consume(_),e.exit("lineEnding"),N}function N(_){return s>0&&Pe(_)?He(e,j,"linePrefix",s+1)(_):j(_)}function j(_){return _===null||Ee(_)?e.check(_0,C,z)(_):(e.enter("codeFlowValue"),M(_))}function M(_){return _===null||Ee(_)?(e.exit("codeFlowValue"),j(_)):(e.consume(_),M)}function z(_){return e.exit("codeFenced"),n(_)}function U(_,P,F){let ne=0;return I;function I(ee){return _.enter("lineEnding"),_.consume(ee),_.exit("lineEnding"),J}function J(ee){return _.enter("codeFencedFence"),Pe(ee)?He(_,te,"linePrefix",l.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(ee):te(ee)}function te(ee){return ee===f?(_.enter("codeFencedFenceSequence"),ce(ee)):F(ee)}function ce(ee){return ee===f?(ne++,_.consume(ee),ce):ne>=c?(_.exit("codeFencedFenceSequence"),Pe(ee)?He(_,le,"whitespace")(ee):le(ee)):F(ee)}function le(ee){return ee===null||Ee(ee)?(_.exit("codeFencedFence"),P(ee)):F(ee)}}}function R6(e,n,r){const l=this;return o;function o(c){return c===null?r(c):(e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),s)}function s(c){return l.parser.lazy[l.now().line]?r(c):n(c)}}const Ih={name:"codeIndented",tokenize:A6},T6={partial:!0,tokenize:M6};function A6(e,n,r){const l=this;return o;function o(h){return e.enter("codeIndented"),He(e,s,"linePrefix",5)(h)}function s(h){const g=l.events[l.events.length-1];return g&&g[1].type==="linePrefix"&&g[2].sliceSerialize(g[1],!0).length>=4?c(h):r(h)}function c(h){return h===null?d(h):Ee(h)?e.attempt(T6,c,d)(h):(e.enter("codeFlowValue"),f(h))}function f(h){return h===null||Ee(h)?(e.exit("codeFlowValue"),c(h)):(e.consume(h),f)}function d(h){return e.exit("codeIndented"),n(h)}}function M6(e,n,r){const l=this;return o;function o(c){return l.parser.lazy[l.now().line]?r(c):Ee(c)?(e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),o):He(e,s,"linePrefix",5)(c)}function s(c){const f=l.events[l.events.length-1];return f&&f[1].type==="linePrefix"&&f[2].sliceSerialize(f[1],!0).length>=4?n(c):Ee(c)?o(c):r(c)}}const j6={name:"codeText",previous:O6,resolve:_6,tokenize:D6};function _6(e){let n=e.length-4,r=3,l,o;if((e[r][1].type==="lineEnding"||e[r][1].type==="space")&&(e[n][1].type==="lineEnding"||e[n][1].type==="space")){for(l=r;++l<n;)if(e[l][1].type==="codeTextData"){e[r][1].type="codeTextPadding",e[n][1].type="codeTextPadding",r+=2,n-=2;break}}for(l=r-1,n++;++l<=n;)o===void 0?l!==n&&e[l][1].type!=="lineEnding"&&(o=l):(l===n||e[l][1].type==="lineEnding")&&(e[o][1].type="codeTextData",l!==o+2&&(e[o][1].end=e[l-1][1].end,e.splice(o+2,l-o-2),n-=l-o-2,l=o+2),o=void 0);return e}function O6(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function D6(e,n,r){let l=0,o,s;return c;function c(p){return e.enter("codeText"),e.enter("codeTextSequence"),f(p)}function f(p){return p===96?(e.consume(p),l++,f):(e.exit("codeTextSequence"),d(p))}function d(p){return p===null?r(p):p===32?(e.enter("space"),e.consume(p),e.exit("space"),d):p===96?(s=e.enter("codeTextSequence"),o=0,g(p)):Ee(p)?(e.enter("lineEnding"),e.consume(p),e.exit("lineEnding"),d):(e.enter("codeTextData"),h(p))}function h(p){return p===null||p===32||p===96||Ee(p)?(e.exit("codeTextData"),d(p)):(e.consume(p),h)}function g(p){return p===96?(e.consume(p),o++,g):o===l?(e.exit("codeTextSequence"),e.exit("codeText"),n(p)):(s.type="codeTextData",h(p))}}class z6{constructor(n){this.left=n?[...n]:[],this.right=[]}get(n){if(n<0||n>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+n+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return n<this.left.length?this.left[n]:this.right[this.right.length-n+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(n,r){const l=r??Number.POSITIVE_INFINITY;return l<this.left.length?this.left.slice(n,l):n>this.left.length?this.right.slice(this.right.length-l+this.left.length,this.right.length-n+this.left.length).reverse():this.left.slice(n).concat(this.right.slice(this.right.length-l+this.left.length).reverse())}splice(n,r,l){const o=r||0;this.setCursor(Math.trunc(n));const s=this.right.splice(this.right.length-o,Number.POSITIVE_INFINITY);return l&&ko(this.left,l),s.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(n){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(n)}pushMany(n){this.setCursor(Number.POSITIVE_INFINITY),ko(this.left,n)}unshift(n){this.setCursor(0),this.right.push(n)}unshiftMany(n){this.setCursor(0),ko(this.right,n.reverse())}setCursor(n){if(!(n===this.left.length||n>this.left.length&&this.right.length===0||n<0&&this.left.length===0))if(n<this.left.length){const r=this.left.splice(n,Number.POSITIVE_INFINITY);ko(this.right,r.reverse())}else{const r=this.right.splice(this.left.length+this.right.length-n,Number.POSITIVE_INFINITY);ko(this.left,r.reverse())}}}function ko(e,n){let r=0;if(n.length<1e4)e.push(...n);else for(;r<n.length;)e.push(...n.slice(r,r+1e4)),r+=1e4}function xE(e){const n={};let r=-1,l,o,s,c,f,d,h;const g=new z6(e);for(;++r<g.length;){for(;r in n;)r=n[r];if(l=g.get(r),r&&l[1].type==="chunkFlow"&&g.get(r-1)[1].type==="listItemPrefix"&&(d=l[1]._tokenizer.events,s=0,s<d.length&&d[s][1].type==="lineEndingBlank"&&(s+=2),s<d.length&&d[s][1].type==="content"))for(;++s<d.length&&d[s][1].type!=="content";)d[s][1].type==="chunkText"&&(d[s][1]._isInFirstContentOfListItem=!0,s++);if(l[0]==="enter")l[1].contentType&&(Object.assign(n,L6(g,r)),r=n[r],h=!0);else if(l[1]._container){for(s=r,o=void 0;s--;)if(c=g.get(s),c[1].type==="lineEnding"||c[1].type==="lineEndingBlank")c[0]==="enter"&&(o&&(g.get(o)[1].type="lineEndingBlank"),c[1].type="lineEnding",o=s);else if(!(c[1].type==="linePrefix"||c[1].type==="listItemIndent"))break;o&&(l[1].end={...g.get(o)[1].start},f=g.slice(o,r),f.unshift(l),g.splice(o,r-o+1,f))}}return Rn(e,0,Number.POSITIVE_INFINITY,g.slice(0)),!h}function L6(e,n){const r=e.get(n)[1],l=e.get(n)[2];let o=n-1;const s=[];let c=r._tokenizer;c||(c=l.parser[r.contentType](r.start),r._contentTypeTextTrailing&&(c._contentTypeTextTrailing=!0));const f=c.events,d=[],h={};let g,p,b=-1,w=r,E=0,C=0;const k=[C];for(;w;){for(;e.get(++o)[1]!==w;);s.push(o),w._tokenizer||(g=l.sliceStream(w),w.next||g.push(null),p&&c.defineSkip(w.start),w._isInFirstContentOfListItem&&(c._gfmTasklistFirstContentOfListItem=!0),c.write(g),w._isInFirstContentOfListItem&&(c._gfmTasklistFirstContentOfListItem=void 0)),p=w,w=w.next}for(w=r;++b<f.length;)f[b][0]==="exit"&&f[b-1][0]==="enter"&&f[b][1].type===f[b-1][1].type&&f[b][1].start.line!==f[b][1].end.line&&(C=b+1,k.push(C),w._tokenizer=void 0,w.previous=void 0,w=w.next);for(c.events=[],w?(w._tokenizer=void 0,w.previous=void 0):k.pop(),b=k.length;b--;){const N=f.slice(k[b],k[b+1]),j=s.pop();d.push([j,j+N.length-1]),e.splice(j,2,N)}for(d.reverse(),b=-1;++b<d.length;)h[E+d[b][0]]=E+d[b][1],E+=d[b][1]-d[b][0]-1;return h}const P6={resolve:I6,tokenize:U6},B6={partial:!0,tokenize:H6};function I6(e){return xE(e),e}function U6(e,n){let r;return l;function l(f){return e.enter("content"),r=e.enter("chunkContent",{contentType:"content"}),o(f)}function o(f){return f===null?s(f):Ee(f)?e.check(B6,c,s)(f):(e.consume(f),o)}function s(f){return e.exit("chunkContent"),e.exit("content"),n(f)}function c(f){return e.consume(f),e.exit("chunkContent"),r.next=e.enter("chunkContent",{contentType:"content",previous:r}),r=r.next,o}}function H6(e,n,r){const l=this;return o;function o(c){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),He(e,s,"linePrefix")}function s(c){if(c===null||Ee(c))return r(c);const f=l.events[l.events.length-1];return!l.parser.constructs.disable.null.includes("codeIndented")&&f&&f[1].type==="linePrefix"&&f[2].sliceSerialize(f[1],!0).length>=4?n(c):e.interrupt(l.parser.constructs.flow,r,n)(c)}}function vE(e,n,r,l,o,s,c,f,d){const h=d||Number.POSITIVE_INFINITY;let g=0;return p;function p(N){return N===60?(e.enter(l),e.enter(o),e.enter(s),e.consume(N),e.exit(s),b):N===null||N===32||N===41||mc(N)?r(N):(e.enter(l),e.enter(c),e.enter(f),e.enter("chunkString",{contentType:"string"}),C(N))}function b(N){return N===62?(e.enter(s),e.consume(N),e.exit(s),e.exit(o),e.exit(l),n):(e.enter(f),e.enter("chunkString",{contentType:"string"}),w(N))}function w(N){return N===62?(e.exit("chunkString"),e.exit(f),b(N)):N===null||N===60||Ee(N)?r(N):(e.consume(N),N===92?E:w)}function E(N){return N===60||N===62||N===92?(e.consume(N),w):w(N)}function C(N){return!g&&(N===null||N===41||tt(N))?(e.exit("chunkString"),e.exit(f),e.exit(c),e.exit(l),n(N)):g<h&&N===40?(e.consume(N),g++,C):N===41?(e.consume(N),g--,C):N===null||N===32||N===40||mc(N)?r(N):(e.consume(N),N===92?k:C)}function k(N){return N===40||N===41||N===92?(e.consume(N),C):C(N)}}function bE(e,n,r,l,o,s){const c=this;let f=0,d;return h;function h(w){return e.enter(l),e.enter(o),e.consume(w),e.exit(o),e.enter(s),g}function g(w){return f>999||w===null||w===91||w===93&&!d||w===94&&!f&&"_hiddenFootnoteSupport"in c.parser.constructs?r(w):w===93?(e.exit(s),e.enter(o),e.consume(w),e.exit(o),e.exit(l),n):Ee(w)?(e.enter("lineEnding"),e.consume(w),e.exit("lineEnding"),g):(e.enter("chunkString",{contentType:"string"}),p(w))}function p(w){return w===null||w===91||w===93||Ee(w)||f++>999?(e.exit("chunkString"),g(w)):(e.consume(w),d||(d=!Pe(w)),w===92?b:p)}function b(w){return w===91||w===92||w===93?(e.consume(w),f++,p):p(w)}}function wE(e,n,r,l,o,s){let c;return f;function f(b){return b===34||b===39||b===40?(e.enter(l),e.enter(o),e.consume(b),e.exit(o),c=b===40?41:b,d):r(b)}function d(b){return b===c?(e.enter(o),e.consume(b),e.exit(o),e.exit(l),n):(e.enter(s),h(b))}function h(b){return b===c?(e.exit(s),d(c)):b===null?r(b):Ee(b)?(e.enter("lineEnding"),e.consume(b),e.exit("lineEnding"),He(e,h,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),g(b))}function g(b){return b===c||b===null||Ee(b)?(e.exit("chunkString"),h(b)):(e.consume(b),b===92?p:g)}function p(b){return b===c||b===92?(e.consume(b),g):g(b)}}function Oo(e,n){let r;return l;function l(o){return Ee(o)?(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),r=!0,l):Pe(o)?He(e,l,r?"linePrefix":"lineSuffix")(o):n(o)}}const F6={name:"definition",tokenize:G6},q6={partial:!0,tokenize:V6};function G6(e,n,r){const l=this;let o;return s;function s(w){return e.enter("definition"),c(w)}function c(w){return bE.call(l,e,f,r,"definitionLabel","definitionLabelMarker","definitionLabelString")(w)}function f(w){return o=nr(l.sliceSerialize(l.events[l.events.length-1][1]).slice(1,-1)),w===58?(e.enter("definitionMarker"),e.consume(w),e.exit("definitionMarker"),d):r(w)}function d(w){return tt(w)?Oo(e,h)(w):h(w)}function h(w){return vE(e,g,r,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(w)}function g(w){return e.attempt(q6,p,p)(w)}function p(w){return Pe(w)?He(e,b,"whitespace")(w):b(w)}function b(w){return w===null||Ee(w)?(e.exit("definition"),l.parser.defined.push(o),n(w)):r(w)}}function V6(e,n,r){return l;function l(f){return tt(f)?Oo(e,o)(f):r(f)}function o(f){return wE(e,s,r,"definitionTitle","definitionTitleMarker","definitionTitleString")(f)}function s(f){return Pe(f)?He(e,c,"whitespace")(f):c(f)}function c(f){return f===null||Ee(f)?n(f):r(f)}}const $6={name:"hardBreakEscape",tokenize:Y6};function Y6(e,n,r){return l;function l(s){return e.enter("hardBreakEscape"),e.consume(s),o}function o(s){return Ee(s)?(e.exit("hardBreakEscape"),n(s)):r(s)}}const X6={name:"headingAtx",resolve:K6,tokenize:Q6};function K6(e,n){let r=e.length-2,l=3,o,s;return e[l][1].type==="whitespace"&&(l+=2),r-2>l&&e[r][1].type==="whitespace"&&(r-=2),e[r][1].type==="atxHeadingSequence"&&(l===r-1||r-4>l&&e[r-2][1].type==="whitespace")&&(r-=l+1===r?2:4),r>l&&(o={type:"atxHeadingText",start:e[l][1].start,end:e[r][1].end},s={type:"chunkText",start:e[l][1].start,end:e[r][1].end,contentType:"text"},Rn(e,l,r-l+1,[["enter",o,n],["enter",s,n],["exit",s,n],["exit",o,n]])),e}function Q6(e,n,r){let l=0;return o;function o(g){return e.enter("atxHeading"),s(g)}function s(g){return e.enter("atxHeadingSequence"),c(g)}function c(g){return g===35&&l++<6?(e.consume(g),c):g===null||tt(g)?(e.exit("atxHeadingSequence"),f(g)):r(g)}function f(g){return g===35?(e.enter("atxHeadingSequence"),d(g)):g===null||Ee(g)?(e.exit("atxHeading"),n(g)):Pe(g)?He(e,f,"whitespace")(g):(e.enter("atxHeadingText"),h(g))}function d(g){return g===35?(e.consume(g),d):(e.exit("atxHeadingSequence"),f(g))}function h(g){return g===null||g===35||tt(g)?(e.exit("atxHeadingText"),f(g)):(e.consume(g),h)}}const Z6=["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"],D0=["pre","script","style","textarea"],W6={concrete:!0,name:"htmlFlow",resolveTo:tL,tokenize:nL},J6={partial:!0,tokenize:iL},eL={partial:!0,tokenize:rL};function tL(e){let n=e.length;for(;n--&&!(e[n][0]==="enter"&&e[n][1].type==="htmlFlow"););return n>1&&e[n-2][1].type==="linePrefix"&&(e[n][1].start=e[n-2][1].start,e[n+1][1].start=e[n-2][1].start,e.splice(n-2,2)),e}function nL(e,n,r){const l=this;let o,s,c,f,d;return h;function h(A){return g(A)}function g(A){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(A),p}function p(A){return A===33?(e.consume(A),b):A===47?(e.consume(A),s=!0,C):A===63?(e.consume(A),o=3,l.interrupt?n:T):Wt(A)?(e.consume(A),c=String.fromCharCode(A),k):r(A)}function b(A){return A===45?(e.consume(A),o=2,w):A===91?(e.consume(A),o=5,f=0,E):Wt(A)?(e.consume(A),o=4,l.interrupt?n:T):r(A)}function w(A){return A===45?(e.consume(A),l.interrupt?n:T):r(A)}function E(A){const Z="CDATA[";return A===Z.charCodeAt(f++)?(e.consume(A),f===Z.length?l.interrupt?n:te:E):r(A)}function C(A){return Wt(A)?(e.consume(A),c=String.fromCharCode(A),k):r(A)}function k(A){if(A===null||A===47||A===62||tt(A)){const Z=A===47,fe=c.toLowerCase();return!Z&&!s&&D0.includes(fe)?(o=1,l.interrupt?n(A):te(A)):Z6.includes(c.toLowerCase())?(o=6,Z?(e.consume(A),N):l.interrupt?n(A):te(A)):(o=7,l.interrupt&&!l.parser.lazy[l.now().line]?r(A):s?j(A):M(A))}return A===45||Xt(A)?(e.consume(A),c+=String.fromCharCode(A),k):r(A)}function N(A){return A===62?(e.consume(A),l.interrupt?n:te):r(A)}function j(A){return Pe(A)?(e.consume(A),j):I(A)}function M(A){return A===47?(e.consume(A),I):A===58||A===95||Wt(A)?(e.consume(A),z):Pe(A)?(e.consume(A),M):I(A)}function z(A){return A===45||A===46||A===58||A===95||Xt(A)?(e.consume(A),z):U(A)}function U(A){return A===61?(e.consume(A),_):Pe(A)?(e.consume(A),U):M(A)}function _(A){return A===null||A===60||A===61||A===62||A===96?r(A):A===34||A===39?(e.consume(A),d=A,P):Pe(A)?(e.consume(A),_):F(A)}function P(A){return A===d?(e.consume(A),d=null,ne):A===null||Ee(A)?r(A):(e.consume(A),P)}function F(A){return A===null||A===34||A===39||A===47||A===60||A===61||A===62||A===96||tt(A)?U(A):(e.consume(A),F)}function ne(A){return A===47||A===62||Pe(A)?M(A):r(A)}function I(A){return A===62?(e.consume(A),J):r(A)}function J(A){return A===null||Ee(A)?te(A):Pe(A)?(e.consume(A),J):r(A)}function te(A){return A===45&&o===2?(e.consume(A),B):A===60&&o===1?(e.consume(A),X):A===62&&o===4?(e.consume(A),O):A===63&&o===3?(e.consume(A),T):A===93&&o===5?(e.consume(A),Q):Ee(A)&&(o===6||o===7)?(e.exit("htmlFlowData"),e.check(J6,D,ce)(A)):A===null||Ee(A)?(e.exit("htmlFlowData"),ce(A)):(e.consume(A),te)}function ce(A){return e.check(eL,le,D)(A)}function le(A){return e.enter("lineEnding"),e.consume(A),e.exit("lineEnding"),ee}function ee(A){return A===null||Ee(A)?ce(A):(e.enter("htmlFlowData"),te(A))}function B(A){return A===45?(e.consume(A),T):te(A)}function X(A){return A===47?(e.consume(A),c="",$):te(A)}function $(A){if(A===62){const Z=c.toLowerCase();return D0.includes(Z)?(e.consume(A),O):te(A)}return Wt(A)&&c.length<8?(e.consume(A),c+=String.fromCharCode(A),$):te(A)}function Q(A){return A===93?(e.consume(A),T):te(A)}function T(A){return A===62?(e.consume(A),O):A===45&&o===2?(e.consume(A),T):te(A)}function O(A){return A===null||Ee(A)?(e.exit("htmlFlowData"),D(A)):(e.consume(A),O)}function D(A){return e.exit("htmlFlow"),n(A)}}function rL(e,n,r){const l=this;return o;function o(c){return Ee(c)?(e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),s):r(c)}function s(c){return l.parser.lazy[l.now().line]?r(c):n(c)}}function iL(e,n,r){return l;function l(o){return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),e.attempt(ss,n,r)}}const lL={name:"htmlText",tokenize:aL};function aL(e,n,r){const l=this;let o,s,c;return f;function f(T){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(T),d}function d(T){return T===33?(e.consume(T),h):T===47?(e.consume(T),U):T===63?(e.consume(T),M):Wt(T)?(e.consume(T),F):r(T)}function h(T){return T===45?(e.consume(T),g):T===91?(e.consume(T),s=0,E):Wt(T)?(e.consume(T),j):r(T)}function g(T){return T===45?(e.consume(T),w):r(T)}function p(T){return T===null?r(T):T===45?(e.consume(T),b):Ee(T)?(c=p,X(T)):(e.consume(T),p)}function b(T){return T===45?(e.consume(T),w):p(T)}function w(T){return T===62?B(T):T===45?b(T):p(T)}function E(T){const O="CDATA[";return T===O.charCodeAt(s++)?(e.consume(T),s===O.length?C:E):r(T)}function C(T){return T===null?r(T):T===93?(e.consume(T),k):Ee(T)?(c=C,X(T)):(e.consume(T),C)}function k(T){return T===93?(e.consume(T),N):C(T)}function N(T){return T===62?B(T):T===93?(e.consume(T),N):C(T)}function j(T){return T===null||T===62?B(T):Ee(T)?(c=j,X(T)):(e.consume(T),j)}function M(T){return T===null?r(T):T===63?(e.consume(T),z):Ee(T)?(c=M,X(T)):(e.consume(T),M)}function z(T){return T===62?B(T):M(T)}function U(T){return Wt(T)?(e.consume(T),_):r(T)}function _(T){return T===45||Xt(T)?(e.consume(T),_):P(T)}function P(T){return Ee(T)?(c=P,X(T)):Pe(T)?(e.consume(T),P):B(T)}function F(T){return T===45||Xt(T)?(e.consume(T),F):T===47||T===62||tt(T)?ne(T):r(T)}function ne(T){return T===47?(e.consume(T),B):T===58||T===95||Wt(T)?(e.consume(T),I):Ee(T)?(c=ne,X(T)):Pe(T)?(e.consume(T),ne):B(T)}function I(T){return T===45||T===46||T===58||T===95||Xt(T)?(e.consume(T),I):J(T)}function J(T){return T===61?(e.consume(T),te):Ee(T)?(c=J,X(T)):Pe(T)?(e.consume(T),J):ne(T)}function te(T){return T===null||T===60||T===61||T===62||T===96?r(T):T===34||T===39?(e.consume(T),o=T,ce):Ee(T)?(c=te,X(T)):Pe(T)?(e.consume(T),te):(e.consume(T),le)}function ce(T){return T===o?(e.consume(T),o=void 0,ee):T===null?r(T):Ee(T)?(c=ce,X(T)):(e.consume(T),ce)}function le(T){return T===null||T===34||T===39||T===60||T===61||T===96?r(T):T===47||T===62||tt(T)?ne(T):(e.consume(T),le)}function ee(T){return T===47||T===62||tt(T)?ne(T):r(T)}function B(T){return T===62?(e.consume(T),e.exit("htmlTextData"),e.exit("htmlText"),n):r(T)}function X(T){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(T),e.exit("lineEnding"),$}function $(T){return Pe(T)?He(e,Q,"linePrefix",l.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(T):Q(T)}function Q(T){return e.enter("htmlTextData"),c(T)}}const Xp={name:"labelEnd",resolveAll:cL,resolveTo:fL,tokenize:dL},oL={tokenize:hL},sL={tokenize:mL},uL={tokenize:pL};function cL(e){let n=-1;const r=[];for(;++n<e.length;){const l=e[n][1];if(r.push(e[n]),l.type==="labelImage"||l.type==="labelLink"||l.type==="labelEnd"){const o=l.type==="labelImage"?4:2;l.type="data",n+=o}}return e.length!==r.length&&Rn(e,0,e.length,r),e}function fL(e,n){let r=e.length,l=0,o,s,c,f;for(;r--;)if(o=e[r][1],s){if(o.type==="link"||o.type==="labelLink"&&o._inactive)break;e[r][0]==="enter"&&o.type==="labelLink"&&(o._inactive=!0)}else if(c){if(e[r][0]==="enter"&&(o.type==="labelImage"||o.type==="labelLink")&&!o._balanced&&(s=r,o.type!=="labelLink")){l=2;break}}else o.type==="labelEnd"&&(c=r);const d={type:e[s][1].type==="labelLink"?"link":"image",start:{...e[s][1].start},end:{...e[e.length-1][1].end}},h={type:"label",start:{...e[s][1].start},end:{...e[c][1].end}},g={type:"labelText",start:{...e[s+l+2][1].end},end:{...e[c-2][1].start}};return f=[["enter",d,n],["enter",h,n]],f=qn(f,e.slice(s+1,s+l+3)),f=qn(f,[["enter",g,n]]),f=qn(f,Yc(n.parser.constructs.insideSpan.null,e.slice(s+l+4,c-3),n)),f=qn(f,[["exit",g,n],e[c-2],e[c-1],["exit",h,n]]),f=qn(f,e.slice(c+1)),f=qn(f,[["exit",d,n]]),Rn(e,s,e.length,f),e}function dL(e,n,r){const l=this;let o=l.events.length,s,c;for(;o--;)if((l.events[o][1].type==="labelImage"||l.events[o][1].type==="labelLink")&&!l.events[o][1]._balanced){s=l.events[o][1];break}return f;function f(b){return s?s._inactive?p(b):(c=l.parser.defined.includes(nr(l.sliceSerialize({start:s.end,end:l.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(b),e.exit("labelMarker"),e.exit("labelEnd"),d):r(b)}function d(b){return b===40?e.attempt(oL,g,c?g:p)(b):b===91?e.attempt(sL,g,c?h:p)(b):c?g(b):p(b)}function h(b){return e.attempt(uL,g,p)(b)}function g(b){return n(b)}function p(b){return s._balanced=!0,r(b)}}function hL(e,n,r){return l;function l(p){return e.enter("resource"),e.enter("resourceMarker"),e.consume(p),e.exit("resourceMarker"),o}function o(p){return tt(p)?Oo(e,s)(p):s(p)}function s(p){return p===41?g(p):vE(e,c,f,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(p)}function c(p){return tt(p)?Oo(e,d)(p):g(p)}function f(p){return r(p)}function d(p){return p===34||p===39||p===40?wE(e,h,r,"resourceTitle","resourceTitleMarker","resourceTitleString")(p):g(p)}function h(p){return tt(p)?Oo(e,g)(p):g(p)}function g(p){return p===41?(e.enter("resourceMarker"),e.consume(p),e.exit("resourceMarker"),e.exit("resource"),n):r(p)}}function mL(e,n,r){const l=this;return o;function o(f){return bE.call(l,e,s,c,"reference","referenceMarker","referenceString")(f)}function s(f){return l.parser.defined.includes(nr(l.sliceSerialize(l.events[l.events.length-1][1]).slice(1,-1)))?n(f):r(f)}function c(f){return r(f)}}function pL(e,n,r){return l;function l(s){return e.enter("reference"),e.enter("referenceMarker"),e.consume(s),e.exit("referenceMarker"),o}function o(s){return s===93?(e.enter("referenceMarker"),e.consume(s),e.exit("referenceMarker"),e.exit("reference"),n):r(s)}}const gL={name:"labelStartImage",resolveAll:Xp.resolveAll,tokenize:yL};function yL(e,n,r){const l=this;return o;function o(f){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(f),e.exit("labelImageMarker"),s}function s(f){return f===91?(e.enter("labelMarker"),e.consume(f),e.exit("labelMarker"),e.exit("labelImage"),c):r(f)}function c(f){return f===94&&"_hiddenFootnoteSupport"in l.parser.constructs?r(f):n(f)}}const xL={name:"labelStartLink",resolveAll:Xp.resolveAll,tokenize:vL};function vL(e,n,r){const l=this;return o;function o(c){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(c),e.exit("labelMarker"),e.exit("labelLink"),s}function s(c){return c===94&&"_hiddenFootnoteSupport"in l.parser.constructs?r(c):n(c)}}const Uh={name:"lineEnding",tokenize:bL};function bL(e,n){return r;function r(l){return e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),He(e,n,"linePrefix")}}const Ku={name:"thematicBreak",tokenize:wL};function wL(e,n,r){let l=0,o;return s;function s(h){return e.enter("thematicBreak"),c(h)}function c(h){return o=h,f(h)}function f(h){return h===o?(e.enter("thematicBreakSequence"),d(h)):l>=3&&(h===null||Ee(h))?(e.exit("thematicBreak"),n(h)):r(h)}function d(h){return h===o?(e.consume(h),l++,d):(e.exit("thematicBreakSequence"),Pe(h)?He(e,f,"whitespace")(h):f(h))}}const dn={continuation:{tokenize:kL},exit:RL,name:"list",tokenize:EL},SL={partial:!0,tokenize:TL},CL={partial:!0,tokenize:NL};function EL(e,n,r){const l=this,o=l.events[l.events.length-1];let s=o&&o[1].type==="linePrefix"?o[2].sliceSerialize(o[1],!0).length:0,c=0;return f;function f(w){const E=l.containerState.type||(w===42||w===43||w===45?"listUnordered":"listOrdered");if(E==="listUnordered"?!l.containerState.marker||w===l.containerState.marker:Mm(w)){if(l.containerState.type||(l.containerState.type=E,e.enter(E,{_container:!0})),E==="listUnordered")return e.enter("listItemPrefix"),w===42||w===45?e.check(Ku,r,h)(w):h(w);if(!l.interrupt||w===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),d(w)}return r(w)}function d(w){return Mm(w)&&++c<10?(e.consume(w),d):(!l.interrupt||c<2)&&(l.containerState.marker?w===l.containerState.marker:w===41||w===46)?(e.exit("listItemValue"),h(w)):r(w)}function h(w){return e.enter("listItemMarker"),e.consume(w),e.exit("listItemMarker"),l.containerState.marker=l.containerState.marker||w,e.check(ss,l.interrupt?r:g,e.attempt(SL,b,p))}function g(w){return l.containerState.initialBlankLine=!0,s++,b(w)}function p(w){return Pe(w)?(e.enter("listItemPrefixWhitespace"),e.consume(w),e.exit("listItemPrefixWhitespace"),b):r(w)}function b(w){return l.containerState.size=s+l.sliceSerialize(e.exit("listItemPrefix"),!0).length,n(w)}}function kL(e,n,r){const l=this;return l.containerState._closeFlow=void 0,e.check(ss,o,s);function o(f){return l.containerState.furtherBlankLines=l.containerState.furtherBlankLines||l.containerState.initialBlankLine,He(e,n,"listItemIndent",l.containerState.size+1)(f)}function s(f){return l.containerState.furtherBlankLines||!Pe(f)?(l.containerState.furtherBlankLines=void 0,l.containerState.initialBlankLine=void 0,c(f)):(l.containerState.furtherBlankLines=void 0,l.containerState.initialBlankLine=void 0,e.attempt(CL,n,c)(f))}function c(f){return l.containerState._closeFlow=!0,l.interrupt=void 0,He(e,e.attempt(dn,n,r),"linePrefix",l.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(f)}}function NL(e,n,r){const l=this;return He(e,o,"listItemIndent",l.containerState.size+1);function o(s){const c=l.events[l.events.length-1];return c&&c[1].type==="listItemIndent"&&c[2].sliceSerialize(c[1],!0).length===l.containerState.size?n(s):r(s)}}function RL(e){e.exit(this.containerState.type)}function TL(e,n,r){const l=this;return He(e,o,"listItemPrefixWhitespace",l.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function o(s){const c=l.events[l.events.length-1];return!Pe(s)&&c&&c[1].type==="listItemPrefixWhitespace"?n(s):r(s)}}const z0={name:"setextUnderline",resolveTo:AL,tokenize:ML};function AL(e,n){let r=e.length,l,o,s;for(;r--;)if(e[r][0]==="enter"){if(e[r][1].type==="content"){l=r;break}e[r][1].type==="paragraph"&&(o=r)}else e[r][1].type==="content"&&e.splice(r,1),!s&&e[r][1].type==="definition"&&(s=r);const c={type:"setextHeading",start:{...e[l][1].start},end:{...e[e.length-1][1].end}};return e[o][1].type="setextHeadingText",s?(e.splice(o,0,["enter",c,n]),e.splice(s+1,0,["exit",e[l][1],n]),e[l][1].end={...e[s][1].end}):e[l][1]=c,e.push(["exit",c,n]),e}function ML(e,n,r){const l=this;let o;return s;function s(h){let g=l.events.length,p;for(;g--;)if(l.events[g][1].type!=="lineEnding"&&l.events[g][1].type!=="linePrefix"&&l.events[g][1].type!=="content"){p=l.events[g][1].type==="paragraph";break}return!l.parser.lazy[l.now().line]&&(l.interrupt||p)?(e.enter("setextHeadingLine"),o=h,c(h)):r(h)}function c(h){return e.enter("setextHeadingLineSequence"),f(h)}function f(h){return h===o?(e.consume(h),f):(e.exit("setextHeadingLineSequence"),Pe(h)?He(e,d,"lineSuffix")(h):d(h))}function d(h){return h===null||Ee(h)?(e.exit("setextHeadingLine"),n(h)):r(h)}}const jL={tokenize:_L};function _L(e){const n=this,r=e.attempt(ss,l,e.attempt(this.parser.constructs.flowInitial,o,He(e,e.attempt(this.parser.constructs.flow,o,e.attempt(P6,o)),"linePrefix")));return r;function l(s){if(s===null){e.consume(s);return}return e.enter("lineEndingBlank"),e.consume(s),e.exit("lineEndingBlank"),n.currentConstruct=void 0,r}function o(s){if(s===null){e.consume(s);return}return e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),n.currentConstruct=void 0,r}}const OL={resolveAll:CE()},DL=SE("string"),zL=SE("text");function SE(e){return{resolveAll:CE(e==="text"?LL:void 0),tokenize:n};function n(r){const l=this,o=this.parser.constructs[e],s=r.attempt(o,c,f);return c;function c(g){return h(g)?s(g):f(g)}function f(g){if(g===null){r.consume(g);return}return r.enter("data"),r.consume(g),d}function d(g){return h(g)?(r.exit("data"),s(g)):(r.consume(g),d)}function h(g){if(g===null)return!0;const p=o[g];let b=-1;if(p)for(;++b<p.length;){const w=p[b];if(!w.previous||w.previous.call(l,l.previous))return!0}return!1}}}function CE(e){return n;function n(r,l){let o=-1,s;for(;++o<=r.length;)s===void 0?r[o]&&r[o][1].type==="data"&&(s=o,o++):(!r[o]||r[o][1].type!=="data")&&(o!==s+2&&(r[s][1].end=r[o-1][1].end,r.splice(s+2,o-s-2),o=s+2),s=void 0);return e?e(r,l):r}}function LL(e,n){let r=0;for(;++r<=e.length;)if((r===e.length||e[r][1].type==="lineEnding")&&e[r-1][1].type==="data"){const l=e[r-1][1],o=n.sliceStream(l);let s=o.length,c=-1,f=0,d;for(;s--;){const h=o[s];if(typeof h=="string"){for(c=h.length;h.charCodeAt(c-1)===32;)f++,c--;if(c)break;c=-1}else if(h===-2)d=!0,f++;else if(h!==-1){s++;break}}if(n._contentTypeTextTrailing&&r===e.length&&(f=0),f){const h={type:r===e.length||d||f<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:s?c:l.start._bufferIndex+c,_index:l.start._index+s,line:l.end.line,column:l.end.column-f,offset:l.end.offset-f},end:{...l.end}};l.end={...h.start},l.start.offset===l.end.offset?Object.assign(l,h):(e.splice(r,0,["enter",h,n],["exit",h,n]),r+=2)}r++}return e}const PL={42:dn,43:dn,45:dn,48:dn,49:dn,50:dn,51:dn,52:dn,53:dn,54:dn,55:dn,56:dn,57:dn,62:pE},BL={91:F6},IL={[-2]:Ih,[-1]:Ih,32:Ih},UL={35:X6,42:Ku,45:[z0,Ku],60:W6,61:z0,95:Ku,96:O0,126:O0},HL={38:yE,92:gE},FL={[-5]:Uh,[-4]:Uh,[-3]:Uh,33:gL,38:yE,42:jm,60:[x6,lL],91:xL,92:[$6,gE],93:Xp,95:jm,96:j6},qL={null:[jm,OL]},GL={null:[42,95]},VL={null:[]},$L=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:GL,contentInitial:BL,disable:VL,document:PL,flow:UL,flowInitial:IL,insideSpan:qL,string:HL,text:FL},Symbol.toStringTag,{value:"Module"}));function YL(e,n,r){let l={_bufferIndex:-1,_index:0,line:r&&r.line||1,column:r&&r.column||1,offset:r&&r.offset||0};const o={},s=[];let c=[],f=[];const d={attempt:P(U),check:P(_),consume:j,enter:M,exit:z,interrupt:P(_,{interrupt:!0})},h={code:null,containerState:{},defineSkip:C,events:[],now:E,parser:e,previous:null,sliceSerialize:b,sliceStream:w,write:p};let g=n.tokenize.call(h,d);return n.resolveAll&&s.push(n),h;function p(J){return c=qn(c,J),k(),c[c.length-1]!==null?[]:(F(n,0),h.events=Yc(s,h.events,h),h.events)}function b(J,te){return KL(w(J),te)}function w(J){return XL(c,J)}function E(){const{_bufferIndex:J,_index:te,line:ce,column:le,offset:ee}=l;return{_bufferIndex:J,_index:te,line:ce,column:le,offset:ee}}function C(J){o[J.line]=J.column,I()}function k(){let J;for(;l._index<c.length;){const te=c[l._index];if(typeof te=="string")for(J=l._index,l._bufferIndex<0&&(l._bufferIndex=0);l._index===J&&l._bufferIndex<te.length;)N(te.charCodeAt(l._bufferIndex));else N(te)}}function N(J){g=g(J)}function j(J){Ee(J)?(l.line++,l.column=1,l.offset+=J===-3?2:1,I()):J!==-1&&(l.column++,l.offset++),l._bufferIndex<0?l._index++:(l._bufferIndex++,l._bufferIndex===c[l._index].length&&(l._bufferIndex=-1,l._index++)),h.previous=J}function M(J,te){const ce=te||{};return ce.type=J,ce.start=E(),h.events.push(["enter",ce,h]),f.push(ce),ce}function z(J){const te=f.pop();return te.end=E(),h.events.push(["exit",te,h]),te}function U(J,te){F(J,te.from)}function _(J,te){te.restore()}function P(J,te){return ce;function ce(le,ee,B){let X,$,Q,T;return Array.isArray(le)?D(le):"tokenize"in le?D([le]):O(le);function O(ue){return me;function me(Ne){const he=Ne!==null&&ue[Ne],Ce=Ne!==null&&ue.null,lt=[...Array.isArray(he)?he:he?[he]:[],...Array.isArray(Ce)?Ce:Ce?[Ce]:[]];return D(lt)(Ne)}}function D(ue){return X=ue,$=0,ue.length===0?B:A(ue[$])}function A(ue){return me;function me(Ne){return T=ne(),Q=ue,ue.partial||(h.currentConstruct=ue),ue.name&&h.parser.constructs.disable.null.includes(ue.name)?fe():ue.tokenize.call(te?Object.assign(Object.create(h),te):h,d,Z,fe)(Ne)}}function Z(ue){return J(Q,T),ee}function fe(ue){return T.restore(),++$<X.length?A(X[$]):B}}}function F(J,te){J.resolveAll&&!s.includes(J)&&s.push(J),J.resolve&&Rn(h.events,te,h.events.length-te,J.resolve(h.events.slice(te),h)),J.resolveTo&&(h.events=J.resolveTo(h.events,h))}function ne(){const J=E(),te=h.previous,ce=h.currentConstruct,le=h.events.length,ee=Array.from(f);return{from:le,restore:B};function B(){l=J,h.previous=te,h.currentConstruct=ce,h.events.length=le,f=ee,I()}}function I(){l.line in o&&l.column<2&&(l.column=o[l.line],l.offset+=o[l.line]-1)}}function XL(e,n){const r=n.start._index,l=n.start._bufferIndex,o=n.end._index,s=n.end._bufferIndex;let c;if(r===o)c=[e[r].slice(l,s)];else{if(c=e.slice(r,o),l>-1){const f=c[0];typeof f=="string"?c[0]=f.slice(l):c.shift()}s>0&&c.push(e[o].slice(0,s))}return c}function KL(e,n){let r=-1;const l=[];let o;for(;++r<e.length;){const s=e[r];let c;if(typeof s=="string")c=s;else switch(s){case-5:{c="\r";break}case-4:{c=`
390
+ `;break}case-3:{c=`\r
391
+ `;break}case-2:{c=n?" ":" ";break}case-1:{if(!n&&o)continue;c=" ";break}default:c=String.fromCharCode(s)}o=s===-2,l.push(c)}return l.join("")}function QL(e){const l={constructs:hE([$L,...(e||{}).extensions||[]]),content:o(f6),defined:[],document:o(h6),flow:o(jL),lazy:{},string:o(DL),text:o(zL)};return l;function o(s){return c;function c(f){return YL(l,s,f)}}}function ZL(e){for(;!xE(e););return e}const L0=/[\0\t\n\r]/g;function WL(){let e=1,n="",r=!0,l;return o;function o(s,c,f){const d=[];let h,g,p,b,w;for(s=n+(typeof s=="string"?s.toString():new TextDecoder(c||void 0).decode(s)),p=0,n="",r&&(s.charCodeAt(0)===65279&&p++,r=void 0);p<s.length;){if(L0.lastIndex=p,h=L0.exec(s),b=h&&h.index!==void 0?h.index:s.length,w=s.charCodeAt(b),!h){n=s.slice(p);break}if(w===10&&p===b&&l)d.push(-3),l=void 0;else switch(l&&(d.push(-5),l=void 0),p<b&&(d.push(s.slice(p,b)),e+=b-p),w){case 0:{d.push(65533),e++;break}case 9:{for(g=Math.ceil(e/4)*4,d.push(-2);e++<g;)d.push(-1);break}case 10:{d.push(-4),e=1;break}default:l=!0,e=1}p=b+1}return f&&(l&&d.push(-5),n&&d.push(n),d.push(null)),d}}const JL=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function e8(e){return e.replace(JL,t8)}function t8(e,n,r){if(n)return n;if(r.charCodeAt(0)===35){const o=r.charCodeAt(1),s=o===120||o===88;return mE(r.slice(s?2:1),s?16:10)}return Yp(r)||e}const EE={}.hasOwnProperty;function n8(e,n,r){return n&&typeof n=="object"&&(r=n,n=void 0),r8(r)(ZL(QL(r).document().write(WL()(e,n,!0))))}function r8(e){const n={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:s(Bt),autolinkProtocol:ne,autolinkEmail:ne,atxHeading:s(Lt),blockQuote:s(Ce),characterEscape:ne,characterReference:ne,codeFenced:s(lt),codeFencedFenceInfo:c,codeFencedFenceMeta:c,codeIndented:s(lt,c),codeText:s(nt,c),codeTextData:ne,data:ne,codeFlowValue:ne,definition:s(st),definitionDestinationString:c,definitionLabelString:c,definitionTitleString:c,emphasis:s(Ye),hardBreakEscape:s(Pt),hardBreakTrailing:s(Pt),htmlFlow:s(Yn,c),htmlFlowData:ne,htmlText:s(Yn,c),htmlTextData:ne,image:s(Xn),label:c,link:s(Bt),listItem:s(Tn),listItemValue:b,listOrdered:s(It,p),listUnordered:s(It),paragraph:s(sr),reference:A,referenceString:c,resourceDestinationString:c,resourceTitleString:c,setextHeading:s(Lt),strong:s(Wr),thematicBreak:s(Jr)},exit:{atxHeading:d(),atxHeadingSequence:U,autolink:d(),autolinkEmail:he,autolinkProtocol:Ne,blockQuote:d(),characterEscapeValue:I,characterReferenceMarkerHexadecimal:fe,characterReferenceMarkerNumeric:fe,characterReferenceValue:ue,characterReference:me,codeFenced:d(k),codeFencedFence:C,codeFencedFenceInfo:w,codeFencedFenceMeta:E,codeFlowValue:I,codeIndented:d(N),codeText:d(ee),codeTextData:I,data:I,definition:d(),definitionDestinationString:z,definitionLabelString:j,definitionTitleString:M,emphasis:d(),hardBreakEscape:d(te),hardBreakTrailing:d(te),htmlFlow:d(ce),htmlFlowData:I,htmlText:d(le),htmlTextData:I,image:d(X),label:Q,labelText:$,lineEnding:J,link:d(B),listItem:d(),listOrdered:d(),listUnordered:d(),paragraph:d(),referenceString:Z,resourceDestinationString:T,resourceTitleString:O,resource:D,setextHeading:d(F),setextHeadingLineSequence:P,setextHeadingText:_,strong:d(),thematicBreak:d()}};kE(n,(e||{}).mdastExtensions||[]);const r={};return l;function l(ie){let Y={type:"root",children:[]};const se={stack:[Y],tokenStack:[],config:n,enter:f,exit:h,buffer:c,resume:g,data:r},pe=[];let we=-1;for(;++we<ie.length;)if(ie[we][1].type==="listOrdered"||ie[we][1].type==="listUnordered")if(ie[we][0]==="enter")pe.push(we);else{const Oe=pe.pop();we=o(ie,Oe,we)}for(we=-1;++we<ie.length;){const Oe=n[ie[we][0]];EE.call(Oe,ie[we][1].type)&&Oe[ie[we][1].type].call(Object.assign({sliceSerialize:ie[we][2].sliceSerialize},se),ie[we][1])}if(se.tokenStack.length>0){const Oe=se.tokenStack[se.tokenStack.length-1];(Oe[1]||P0).call(se,void 0,Oe[0])}for(Y.position={start:Ni(ie.length>0?ie[0][1].start:{line:1,column:1,offset:0}),end:Ni(ie.length>0?ie[ie.length-2][1].end:{line:1,column:1,offset:0})},we=-1;++we<n.transforms.length;)Y=n.transforms[we](Y)||Y;return Y}function o(ie,Y,se){let pe=Y-1,we=-1,Oe=!1,pn,Ut,pt,jt;for(;++pe<=se;){const Xe=ie[pe];switch(Xe[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{Xe[0]==="enter"?we++:we--,jt=void 0;break}case"lineEndingBlank":{Xe[0]==="enter"&&(pn&&!jt&&!we&&!pt&&(pt=pe),jt=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:jt=void 0}if(!we&&Xe[0]==="enter"&&Xe[1].type==="listItemPrefix"||we===-1&&Xe[0]==="exit"&&(Xe[1].type==="listUnordered"||Xe[1].type==="listOrdered")){if(pn){let ur=pe;for(Ut=void 0;ur--;){const en=ie[ur];if(en[1].type==="lineEnding"||en[1].type==="lineEndingBlank"){if(en[0]==="exit")continue;Ut&&(ie[Ut][1].type="lineEndingBlank",Oe=!0),en[1].type="lineEnding",Ut=ur}else if(!(en[1].type==="linePrefix"||en[1].type==="blockQuotePrefix"||en[1].type==="blockQuotePrefixWhitespace"||en[1].type==="blockQuoteMarker"||en[1].type==="listItemIndent"))break}pt&&(!Ut||pt<Ut)&&(pn._spread=!0),pn.end=Object.assign({},Ut?ie[Ut][1].start:Xe[1].end),ie.splice(Ut||pe,0,["exit",pn,Xe[2]]),pe++,se++}if(Xe[1].type==="listItemPrefix"){const ur={type:"listItem",_spread:!1,start:Object.assign({},Xe[1].start),end:void 0};pn=ur,ie.splice(pe,0,["enter",ur,Xe[2]]),pe++,se++,pt=void 0,jt=!0}}}return ie[Y][1]._spread=Oe,se}function s(ie,Y){return se;function se(pe){f.call(this,ie(pe),pe),Y&&Y.call(this,pe)}}function c(){this.stack.push({type:"fragment",children:[]})}function f(ie,Y,se){this.stack[this.stack.length-1].children.push(ie),this.stack.push(ie),this.tokenStack.push([Y,se||void 0]),ie.position={start:Ni(Y.start),end:void 0}}function d(ie){return Y;function Y(se){ie&&ie.call(this,se),h.call(this,se)}}function h(ie,Y){const se=this.stack.pop(),pe=this.tokenStack.pop();if(pe)pe[0].type!==ie.type&&(Y?Y.call(this,ie,pe[0]):(pe[1]||P0).call(this,ie,pe[0]));else throw new Error("Cannot close `"+ie.type+"` ("+_o({start:ie.start,end:ie.end})+"): it’s not open");se.position.end=Ni(ie.end)}function g(){return $p(this.stack.pop())}function p(){this.data.expectingFirstListItemValue=!0}function b(ie){if(this.data.expectingFirstListItemValue){const Y=this.stack[this.stack.length-2];Y.start=Number.parseInt(this.sliceSerialize(ie),10),this.data.expectingFirstListItemValue=void 0}}function w(){const ie=this.resume(),Y=this.stack[this.stack.length-1];Y.lang=ie}function E(){const ie=this.resume(),Y=this.stack[this.stack.length-1];Y.meta=ie}function C(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function k(){const ie=this.resume(),Y=this.stack[this.stack.length-1];Y.value=ie.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function N(){const ie=this.resume(),Y=this.stack[this.stack.length-1];Y.value=ie.replace(/(\r?\n|\r)$/g,"")}function j(ie){const Y=this.resume(),se=this.stack[this.stack.length-1];se.label=Y,se.identifier=nr(this.sliceSerialize(ie)).toLowerCase()}function M(){const ie=this.resume(),Y=this.stack[this.stack.length-1];Y.title=ie}function z(){const ie=this.resume(),Y=this.stack[this.stack.length-1];Y.url=ie}function U(ie){const Y=this.stack[this.stack.length-1];if(!Y.depth){const se=this.sliceSerialize(ie).length;Y.depth=se}}function _(){this.data.setextHeadingSlurpLineEnding=!0}function P(ie){const Y=this.stack[this.stack.length-1];Y.depth=this.sliceSerialize(ie).codePointAt(0)===61?1:2}function F(){this.data.setextHeadingSlurpLineEnding=void 0}function ne(ie){const se=this.stack[this.stack.length-1].children;let pe=se[se.length-1];(!pe||pe.type!=="text")&&(pe=mt(),pe.position={start:Ni(ie.start),end:void 0},se.push(pe)),this.stack.push(pe)}function I(ie){const Y=this.stack.pop();Y.value+=this.sliceSerialize(ie),Y.position.end=Ni(ie.end)}function J(ie){const Y=this.stack[this.stack.length-1];if(this.data.atHardBreak){const se=Y.children[Y.children.length-1];se.position.end=Ni(ie.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&n.canContainEols.includes(Y.type)&&(ne.call(this,ie),I.call(this,ie))}function te(){this.data.atHardBreak=!0}function ce(){const ie=this.resume(),Y=this.stack[this.stack.length-1];Y.value=ie}function le(){const ie=this.resume(),Y=this.stack[this.stack.length-1];Y.value=ie}function ee(){const ie=this.resume(),Y=this.stack[this.stack.length-1];Y.value=ie}function B(){const ie=this.stack[this.stack.length-1];if(this.data.inReference){const Y=this.data.referenceType||"shortcut";ie.type+="Reference",ie.referenceType=Y,delete ie.url,delete ie.title}else delete ie.identifier,delete ie.label;this.data.referenceType=void 0}function X(){const ie=this.stack[this.stack.length-1];if(this.data.inReference){const Y=this.data.referenceType||"shortcut";ie.type+="Reference",ie.referenceType=Y,delete ie.url,delete ie.title}else delete ie.identifier,delete ie.label;this.data.referenceType=void 0}function $(ie){const Y=this.sliceSerialize(ie),se=this.stack[this.stack.length-2];se.label=e8(Y),se.identifier=nr(Y).toLowerCase()}function Q(){const ie=this.stack[this.stack.length-1],Y=this.resume(),se=this.stack[this.stack.length-1];if(this.data.inReference=!0,se.type==="link"){const pe=ie.children;se.children=pe}else se.alt=Y}function T(){const ie=this.resume(),Y=this.stack[this.stack.length-1];Y.url=ie}function O(){const ie=this.resume(),Y=this.stack[this.stack.length-1];Y.title=ie}function D(){this.data.inReference=void 0}function A(){this.data.referenceType="collapsed"}function Z(ie){const Y=this.resume(),se=this.stack[this.stack.length-1];se.label=Y,se.identifier=nr(this.sliceSerialize(ie)).toLowerCase(),this.data.referenceType="full"}function fe(ie){this.data.characterReferenceType=ie.type}function ue(ie){const Y=this.sliceSerialize(ie),se=this.data.characterReferenceType;let pe;se?(pe=mE(Y,se==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):pe=Yp(Y);const we=this.stack[this.stack.length-1];we.value+=pe}function me(ie){const Y=this.stack.pop();Y.position.end=Ni(ie.end)}function Ne(ie){I.call(this,ie);const Y=this.stack[this.stack.length-1];Y.url=this.sliceSerialize(ie)}function he(ie){I.call(this,ie);const Y=this.stack[this.stack.length-1];Y.url="mailto:"+this.sliceSerialize(ie)}function Ce(){return{type:"blockquote",children:[]}}function lt(){return{type:"code",lang:null,meta:null,value:""}}function nt(){return{type:"inlineCode",value:""}}function st(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function Ye(){return{type:"emphasis",children:[]}}function Lt(){return{type:"heading",depth:0,children:[]}}function Pt(){return{type:"break"}}function Yn(){return{type:"html",value:""}}function Xn(){return{type:"image",title:null,url:"",alt:null}}function Bt(){return{type:"link",title:null,url:"",children:[]}}function It(ie){return{type:"list",ordered:ie.type==="listOrdered",start:null,spread:ie._spread,children:[]}}function Tn(ie){return{type:"listItem",spread:ie._spread,checked:null,children:[]}}function sr(){return{type:"paragraph",children:[]}}function Wr(){return{type:"strong",children:[]}}function mt(){return{type:"text",value:""}}function Jr(){return{type:"thematicBreak"}}}function Ni(e){return{line:e.line,column:e.column,offset:e.offset}}function kE(e,n){let r=-1;for(;++r<n.length;){const l=n[r];Array.isArray(l)?kE(e,l):i8(e,l)}}function i8(e,n){let r;for(r in n)if(EE.call(n,r))switch(r){case"canContainEols":{const l=n[r];l&&e[r].push(...l);break}case"transforms":{const l=n[r];l&&e[r].push(...l);break}case"enter":case"exit":{const l=n[r];l&&Object.assign(e[r],l);break}}}function P0(e,n){throw e?new Error("Cannot close `"+e.type+"` ("+_o({start:e.start,end:e.end})+"): a different token (`"+n.type+"`, "+_o({start:n.start,end:n.end})+") is open"):new Error("Cannot close document, a token (`"+n.type+"`, "+_o({start:n.start,end:n.end})+") is still open")}function l8(e){const n=this;n.parser=r;function r(l){return n8(l,{...n.data("settings"),...e,extensions:n.data("micromarkExtensions")||[],mdastExtensions:n.data("fromMarkdownExtensions")||[]})}}function a8(e,n){const r={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(n),!0)};return e.patch(n,r),e.applyData(n,r)}function o8(e,n){const r={type:"element",tagName:"br",properties:{},children:[]};return e.patch(n,r),[e.applyData(n,r),{type:"text",value:`
392
+ `}]}function s8(e,n){const r=n.value?n.value+`
393
+ `:"",l={},o=n.lang?n.lang.split(/\s+/):[];o.length>0&&(l.className=["language-"+o[0]]);let s={type:"element",tagName:"code",properties:l,children:[{type:"text",value:r}]};return n.meta&&(s.data={meta:n.meta}),e.patch(n,s),s=e.applyData(n,s),s={type:"element",tagName:"pre",properties:{},children:[s]},e.patch(n,s),s}function u8(e,n){const r={type:"element",tagName:"del",properties:{},children:e.all(n)};return e.patch(n,r),e.applyData(n,r)}function c8(e,n){const r={type:"element",tagName:"em",properties:{},children:e.all(n)};return e.patch(n,r),e.applyData(n,r)}function f8(e,n){const r=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",l=String(n.identifier).toUpperCase(),o=Ra(l.toLowerCase()),s=e.footnoteOrder.indexOf(l);let c,f=e.footnoteCounts.get(l);f===void 0?(f=0,e.footnoteOrder.push(l),c=e.footnoteOrder.length):c=s+1,f+=1,e.footnoteCounts.set(l,f);const d={type:"element",tagName:"a",properties:{href:"#"+r+"fn-"+o,id:r+"fnref-"+o+(f>1?"-"+f:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(c)}]};e.patch(n,d);const h={type:"element",tagName:"sup",properties:{},children:[d]};return e.patch(n,h),e.applyData(n,h)}function d8(e,n){const r={type:"element",tagName:"h"+n.depth,properties:{},children:e.all(n)};return e.patch(n,r),e.applyData(n,r)}function h8(e,n){if(e.options.allowDangerousHtml){const r={type:"raw",value:n.value};return e.patch(n,r),e.applyData(n,r)}}function NE(e,n){const r=n.referenceType;let l="]";if(r==="collapsed"?l+="[]":r==="full"&&(l+="["+(n.label||n.identifier)+"]"),n.type==="imageReference")return[{type:"text",value:"!["+n.alt+l}];const o=e.all(n),s=o[0];s&&s.type==="text"?s.value="["+s.value:o.unshift({type:"text",value:"["});const c=o[o.length-1];return c&&c.type==="text"?c.value+=l:o.push({type:"text",value:l}),o}function m8(e,n){const r=String(n.identifier).toUpperCase(),l=e.definitionById.get(r);if(!l)return NE(e,n);const o={src:Ra(l.url||""),alt:n.alt};l.title!==null&&l.title!==void 0&&(o.title=l.title);const s={type:"element",tagName:"img",properties:o,children:[]};return e.patch(n,s),e.applyData(n,s)}function p8(e,n){const r={src:Ra(n.url)};n.alt!==null&&n.alt!==void 0&&(r.alt=n.alt),n.title!==null&&n.title!==void 0&&(r.title=n.title);const l={type:"element",tagName:"img",properties:r,children:[]};return e.patch(n,l),e.applyData(n,l)}function g8(e,n){const r={type:"text",value:n.value.replace(/\r?\n|\r/g," ")};e.patch(n,r);const l={type:"element",tagName:"code",properties:{},children:[r]};return e.patch(n,l),e.applyData(n,l)}function y8(e,n){const r=String(n.identifier).toUpperCase(),l=e.definitionById.get(r);if(!l)return NE(e,n);const o={href:Ra(l.url||"")};l.title!==null&&l.title!==void 0&&(o.title=l.title);const s={type:"element",tagName:"a",properties:o,children:e.all(n)};return e.patch(n,s),e.applyData(n,s)}function x8(e,n){const r={href:Ra(n.url)};n.title!==null&&n.title!==void 0&&(r.title=n.title);const l={type:"element",tagName:"a",properties:r,children:e.all(n)};return e.patch(n,l),e.applyData(n,l)}function v8(e,n,r){const l=e.all(n),o=r?b8(r):RE(n),s={},c=[];if(typeof n.checked=="boolean"){const g=l[0];let p;g&&g.type==="element"&&g.tagName==="p"?p=g:(p={type:"element",tagName:"p",properties:{},children:[]},l.unshift(p)),p.children.length>0&&p.children.unshift({type:"text",value:" "}),p.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:n.checked,disabled:!0},children:[]}),s.className=["task-list-item"]}let f=-1;for(;++f<l.length;){const g=l[f];(o||f!==0||g.type!=="element"||g.tagName!=="p")&&c.push({type:"text",value:`
394
+ `}),g.type==="element"&&g.tagName==="p"&&!o?c.push(...g.children):c.push(g)}const d=l[l.length-1];d&&(o||d.type!=="element"||d.tagName!=="p")&&c.push({type:"text",value:`
395
+ `});const h={type:"element",tagName:"li",properties:s,children:c};return e.patch(n,h),e.applyData(n,h)}function b8(e){let n=!1;if(e.type==="list"){n=e.spread||!1;const r=e.children;let l=-1;for(;!n&&++l<r.length;)n=RE(r[l])}return n}function RE(e){const n=e.spread;return n??e.children.length>1}function w8(e,n){const r={},l=e.all(n);let o=-1;for(typeof n.start=="number"&&n.start!==1&&(r.start=n.start);++o<l.length;){const c=l[o];if(c.type==="element"&&c.tagName==="li"&&c.properties&&Array.isArray(c.properties.className)&&c.properties.className.includes("task-list-item")){r.className=["contains-task-list"];break}}const s={type:"element",tagName:n.ordered?"ol":"ul",properties:r,children:e.wrap(l,!0)};return e.patch(n,s),e.applyData(n,s)}function S8(e,n){const r={type:"element",tagName:"p",properties:{},children:e.all(n)};return e.patch(n,r),e.applyData(n,r)}function C8(e,n){const r={type:"root",children:e.wrap(e.all(n))};return e.patch(n,r),e.applyData(n,r)}function E8(e,n){const r={type:"element",tagName:"strong",properties:{},children:e.all(n)};return e.patch(n,r),e.applyData(n,r)}function k8(e,n){const r=e.all(n),l=r.shift(),o=[];if(l){const c={type:"element",tagName:"thead",properties:{},children:e.wrap([l],!0)};e.patch(n.children[0],c),o.push(c)}if(r.length>0){const c={type:"element",tagName:"tbody",properties:{},children:e.wrap(r,!0)},f=Fp(n.children[1]),d=aE(n.children[n.children.length-1]);f&&d&&(c.position={start:f,end:d}),o.push(c)}const s={type:"element",tagName:"table",properties:{},children:e.wrap(o,!0)};return e.patch(n,s),e.applyData(n,s)}function N8(e,n,r){const l=r?r.children:void 0,s=(l?l.indexOf(n):1)===0?"th":"td",c=r&&r.type==="table"?r.align:void 0,f=c?c.length:n.children.length;let d=-1;const h=[];for(;++d<f;){const p=n.children[d],b={},w=c?c[d]:void 0;w&&(b.align=w);let E={type:"element",tagName:s,properties:b,children:[]};p&&(E.children=e.all(p),e.patch(p,E),E=e.applyData(p,E)),h.push(E)}const g={type:"element",tagName:"tr",properties:{},children:e.wrap(h,!0)};return e.patch(n,g),e.applyData(n,g)}function R8(e,n){const r={type:"element",tagName:"td",properties:{},children:e.all(n)};return e.patch(n,r),e.applyData(n,r)}const B0=9,I0=32;function T8(e){const n=String(e),r=/\r?\n|\r/g;let l=r.exec(n),o=0;const s=[];for(;l;)s.push(U0(n.slice(o,l.index),o>0,!0),l[0]),o=l.index+l[0].length,l=r.exec(n);return s.push(U0(n.slice(o),o>0,!1)),s.join("")}function U0(e,n,r){let l=0,o=e.length;if(n){let s=e.codePointAt(l);for(;s===B0||s===I0;)l++,s=e.codePointAt(l)}if(r){let s=e.codePointAt(o-1);for(;s===B0||s===I0;)o--,s=e.codePointAt(o-1)}return o>l?e.slice(l,o):""}function A8(e,n){const r={type:"text",value:T8(String(n.value))};return e.patch(n,r),e.applyData(n,r)}function M8(e,n){const r={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(n,r),e.applyData(n,r)}const j8={blockquote:a8,break:o8,code:s8,delete:u8,emphasis:c8,footnoteReference:f8,heading:d8,html:h8,imageReference:m8,image:p8,inlineCode:g8,linkReference:y8,link:x8,listItem:v8,list:w8,paragraph:S8,root:C8,strong:E8,table:k8,tableCell:R8,tableRow:N8,text:A8,thematicBreak:M8,toml:Lu,yaml:Lu,definition:Lu,footnoteDefinition:Lu};function Lu(){}const TE=-1,Xc=0,Do=1,pc=2,Kp=3,Qp=4,Zp=5,Wp=6,AE=7,ME=8,H0=typeof self=="object"?self:globalThis,_8=(e,n)=>{const r=(o,s)=>(e.set(s,o),o),l=o=>{if(e.has(o))return e.get(o);const[s,c]=n[o];switch(s){case Xc:case TE:return r(c,o);case Do:{const f=r([],o);for(const d of c)f.push(l(d));return f}case pc:{const f=r({},o);for(const[d,h]of c)f[l(d)]=l(h);return f}case Kp:return r(new Date(c),o);case Qp:{const{source:f,flags:d}=c;return r(new RegExp(f,d),o)}case Zp:{const f=r(new Map,o);for(const[d,h]of c)f.set(l(d),l(h));return f}case Wp:{const f=r(new Set,o);for(const d of c)f.add(l(d));return f}case AE:{const{name:f,message:d}=c;return r(new H0[f](d),o)}case ME:return r(BigInt(c),o);case"BigInt":return r(Object(BigInt(c)),o);case"ArrayBuffer":return r(new Uint8Array(c).buffer,c);case"DataView":{const{buffer:f}=new Uint8Array(c);return r(new DataView(f),c)}}return r(new H0[s](c),o)};return l},F0=e=>_8(new Map,e)(0),la="",{toString:O8}={},{keys:D8}=Object,No=e=>{const n=typeof e;if(n!=="object"||!e)return[Xc,n];const r=O8.call(e).slice(8,-1);switch(r){case"Array":return[Do,la];case"Object":return[pc,la];case"Date":return[Kp,la];case"RegExp":return[Qp,la];case"Map":return[Zp,la];case"Set":return[Wp,la];case"DataView":return[Do,r]}return r.includes("Array")?[Do,r]:r.includes("Error")?[AE,r]:[pc,r]},Pu=([e,n])=>e===Xc&&(n==="function"||n==="symbol"),z8=(e,n,r,l)=>{const o=(c,f)=>{const d=l.push(c)-1;return r.set(f,d),d},s=c=>{if(r.has(c))return r.get(c);let[f,d]=No(c);switch(f){case Xc:{let g=c;switch(d){case"bigint":f=ME,g=c.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+d);g=null;break;case"undefined":return o([TE],c)}return o([f,g],c)}case Do:{if(d){let b=c;return d==="DataView"?b=new Uint8Array(c.buffer):d==="ArrayBuffer"&&(b=new Uint8Array(c)),o([d,[...b]],c)}const g=[],p=o([f,g],c);for(const b of c)g.push(s(b));return p}case pc:{if(d)switch(d){case"BigInt":return o([d,c.toString()],c);case"Boolean":case"Number":case"String":return o([d,c.valueOf()],c)}if(n&&"toJSON"in c)return s(c.toJSON());const g=[],p=o([f,g],c);for(const b of D8(c))(e||!Pu(No(c[b])))&&g.push([s(b),s(c[b])]);return p}case Kp:return o([f,c.toISOString()],c);case Qp:{const{source:g,flags:p}=c;return o([f,{source:g,flags:p}],c)}case Zp:{const g=[],p=o([f,g],c);for(const[b,w]of c)(e||!(Pu(No(b))||Pu(No(w))))&&g.push([s(b),s(w)]);return p}case Wp:{const g=[],p=o([f,g],c);for(const b of c)(e||!Pu(No(b)))&&g.push(s(b));return p}}const{message:h}=c;return o([f,{name:d,message:h}],c)};return s},q0=(e,{json:n,lossy:r}={})=>{const l=[];return z8(!(n||r),!!n,new Map,l)(e),l},gc=typeof structuredClone=="function"?(e,n)=>n&&("json"in n||"lossy"in n)?F0(q0(e,n)):structuredClone(e):(e,n)=>F0(q0(e,n));function L8(e,n){const r=[{type:"text",value:"↩"}];return n>1&&r.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(n)}]}),r}function P8(e,n){return"Back to reference "+(e+1)+(n>1?"-"+n:"")}function B8(e){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=e.options.footnoteBackContent||L8,l=e.options.footnoteBackLabel||P8,o=e.options.footnoteLabel||"Footnotes",s=e.options.footnoteLabelTagName||"h2",c=e.options.footnoteLabelProperties||{className:["sr-only"]},f=[];let d=-1;for(;++d<e.footnoteOrder.length;){const h=e.footnoteById.get(e.footnoteOrder[d]);if(!h)continue;const g=e.all(h),p=String(h.identifier).toUpperCase(),b=Ra(p.toLowerCase());let w=0;const E=[],C=e.footnoteCounts.get(p);for(;C!==void 0&&++w<=C;){E.length>0&&E.push({type:"text",value:" "});let j=typeof r=="string"?r:r(d,w);typeof j=="string"&&(j={type:"text",value:j}),E.push({type:"element",tagName:"a",properties:{href:"#"+n+"fnref-"+b+(w>1?"-"+w:""),dataFootnoteBackref:"",ariaLabel:typeof l=="string"?l:l(d,w),className:["data-footnote-backref"]},children:Array.isArray(j)?j:[j]})}const k=g[g.length-1];if(k&&k.type==="element"&&k.tagName==="p"){const j=k.children[k.children.length-1];j&&j.type==="text"?j.value+=" ":k.children.push({type:"text",value:" "}),k.children.push(...E)}else g.push(...E);const N={type:"element",tagName:"li",properties:{id:n+"fn-"+b},children:e.wrap(g,!0)};e.patch(h,N),f.push(N)}if(f.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:s,properties:{...gc(c),id:"footnote-label"},children:[{type:"text",value:o}]},{type:"text",value:`
396
+ `},{type:"element",tagName:"ol",properties:{},children:e.wrap(f,!0)},{type:"text",value:`
397
+ `}]}}const Kc=(function(e){if(e==null)return F8;if(typeof e=="function")return Qc(e);if(typeof e=="object")return Array.isArray(e)?I8(e):U8(e);if(typeof e=="string")return H8(e);throw new Error("Expected function, string, or object as test")});function I8(e){const n=[];let r=-1;for(;++r<e.length;)n[r]=Kc(e[r]);return Qc(l);function l(...o){let s=-1;for(;++s<n.length;)if(n[s].apply(this,o))return!0;return!1}}function U8(e){const n=e;return Qc(r);function r(l){const o=l;let s;for(s in e)if(o[s]!==n[s])return!1;return!0}}function H8(e){return Qc(n);function n(r){return r&&r.type===e}}function Qc(e){return n;function n(r,l,o){return!!(q8(r)&&e.call(this,r,typeof l=="number"?l:void 0,o||void 0))}}function F8(){return!0}function q8(e){return e!==null&&typeof e=="object"&&"type"in e}const jE=[],G8=!0,_m=!1,V8="skip";function _E(e,n,r,l){let o;typeof n=="function"&&typeof r!="function"?(l=r,r=n):o=n;const s=Kc(o),c=l?-1:1;f(e,void 0,[])();function f(d,h,g){const p=d&&typeof d=="object"?d:{};if(typeof p.type=="string"){const w=typeof p.tagName=="string"?p.tagName:typeof p.name=="string"?p.name:void 0;Object.defineProperty(b,"name",{value:"node ("+(d.type+(w?"<"+w+">":""))+")"})}return b;function b(){let w=jE,E,C,k;if((!n||s(d,h,g[g.length-1]||void 0))&&(w=$8(r(d,g)),w[0]===_m))return w;if("children"in d&&d.children){const N=d;if(N.children&&w[0]!==V8)for(C=(l?N.children.length:-1)+c,k=g.concat(N);C>-1&&C<N.children.length;){const j=N.children[C];if(E=f(j,C,k)(),E[0]===_m)return E;C=typeof E[1]=="number"?E[1]:C+c}}return w}}}function $8(e){return Array.isArray(e)?e:typeof e=="number"?[G8,e]:e==null?jE:[e]}function Jp(e,n,r,l){let o,s,c;typeof n=="function"&&typeof r!="function"?(s=void 0,c=n,o=r):(s=n,c=r,o=l),_E(e,s,f,o);function f(d,h){const g=h[h.length-1],p=g?g.children.indexOf(d):void 0;return c(d,p,g)}}const Om={}.hasOwnProperty,Y8={};function X8(e,n){const r=n||Y8,l=new Map,o=new Map,s=new Map,c={...j8,...r.handlers},f={all:h,applyData:Q8,definitionById:l,footnoteById:o,footnoteCounts:s,footnoteOrder:[],handlers:c,one:d,options:r,patch:K8,wrap:W8};return Jp(e,function(g){if(g.type==="definition"||g.type==="footnoteDefinition"){const p=g.type==="definition"?l:o,b=String(g.identifier).toUpperCase();p.has(b)||p.set(b,g)}}),f;function d(g,p){const b=g.type,w=f.handlers[b];if(Om.call(f.handlers,b)&&w)return w(f,g,p);if(f.options.passThrough&&f.options.passThrough.includes(b)){if("children"in g){const{children:C,...k}=g,N=gc(k);return N.children=f.all(g),N}return gc(g)}return(f.options.unknownHandler||Z8)(f,g,p)}function h(g){const p=[];if("children"in g){const b=g.children;let w=-1;for(;++w<b.length;){const E=f.one(b[w],g);if(E){if(w&&b[w-1].type==="break"&&(!Array.isArray(E)&&E.type==="text"&&(E.value=G0(E.value)),!Array.isArray(E)&&E.type==="element")){const C=E.children[0];C&&C.type==="text"&&(C.value=G0(C.value))}Array.isArray(E)?p.push(...E):p.push(E)}}}return p}}function K8(e,n){e.position&&(n.position=Pz(e))}function Q8(e,n){let r=n;if(e&&e.data){const l=e.data.hName,o=e.data.hChildren,s=e.data.hProperties;if(typeof l=="string")if(r.type==="element")r.tagName=l;else{const c="children"in r?r.children:[r];r={type:"element",tagName:l,properties:{},children:c}}r.type==="element"&&s&&Object.assign(r.properties,gc(s)),"children"in r&&r.children&&o!==null&&o!==void 0&&(r.children=o)}return r}function Z8(e,n){const r=n.data||{},l="value"in n&&!(Om.call(r,"hProperties")||Om.call(r,"hChildren"))?{type:"text",value:n.value}:{type:"element",tagName:"div",properties:{},children:e.all(n)};return e.patch(n,l),e.applyData(n,l)}function W8(e,n){const r=[];let l=-1;for(n&&r.push({type:"text",value:`
398
+ `});++l<e.length;)l&&r.push({type:"text",value:`
399
+ `}),r.push(e[l]);return n&&e.length>0&&r.push({type:"text",value:`
400
+ `}),r}function G0(e){let n=0,r=e.charCodeAt(n);for(;r===9||r===32;)n++,r=e.charCodeAt(n);return e.slice(n)}function V0(e,n){const r=X8(e,n),l=r.one(e,void 0),o=B8(r),s=Array.isArray(l)?{type:"root",children:l}:l||{type:"root",children:[]};return o&&s.children.push({type:"text",value:`
401
+ `},o),s}function J8(e,n){return e&&"run"in e?async function(r,l){const o=V0(r,{file:l,...n});await e.run(o,l)}:function(r,l){return V0(r,{file:l,...e||n})}}function $0(e){if(e)throw e}var Hh,Y0;function e9(){if(Y0)return Hh;Y0=1;var e=Object.prototype.hasOwnProperty,n=Object.prototype.toString,r=Object.defineProperty,l=Object.getOwnPropertyDescriptor,o=function(h){return typeof Array.isArray=="function"?Array.isArray(h):n.call(h)==="[object Array]"},s=function(h){if(!h||n.call(h)!=="[object Object]")return!1;var g=e.call(h,"constructor"),p=h.constructor&&h.constructor.prototype&&e.call(h.constructor.prototype,"isPrototypeOf");if(h.constructor&&!g&&!p)return!1;var b;for(b in h);return typeof b>"u"||e.call(h,b)},c=function(h,g){r&&g.name==="__proto__"?r(h,g.name,{enumerable:!0,configurable:!0,value:g.newValue,writable:!0}):h[g.name]=g.newValue},f=function(h,g){if(g==="__proto__")if(e.call(h,g)){if(l)return l(h,g).value}else return;return h[g]};return Hh=function d(){var h,g,p,b,w,E,C=arguments[0],k=1,N=arguments.length,j=!1;for(typeof C=="boolean"&&(j=C,C=arguments[1]||{},k=2),(C==null||typeof C!="object"&&typeof C!="function")&&(C={});k<N;++k)if(h=arguments[k],h!=null)for(g in h)p=f(C,g),b=f(h,g),C!==b&&(j&&b&&(s(b)||(w=o(b)))?(w?(w=!1,E=p&&o(p)?p:[]):E=p&&s(p)?p:{},c(C,{name:g,newValue:d(j,E,b)})):typeof b<"u"&&c(C,{name:g,newValue:b}));return C},Hh}var t9=e9();const Fh=vc(t9);function Dm(e){if(typeof e!="object"||e===null)return!1;const n=Object.getPrototypeOf(e);return(n===null||n===Object.prototype||Object.getPrototypeOf(n)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function n9(){const e=[],n={run:r,use:l};return n;function r(...o){let s=-1;const c=o.pop();if(typeof c!="function")throw new TypeError("Expected function as last argument, not "+c);f(null,...o);function f(d,...h){const g=e[++s];let p=-1;if(d){c(d);return}for(;++p<o.length;)(h[p]===null||h[p]===void 0)&&(h[p]=o[p]);o=h,g?r9(g,f)(...h):c(null,...h)}}function l(o){if(typeof o!="function")throw new TypeError("Expected `middelware` to be a function, not "+o);return e.push(o),n}}function r9(e,n){let r;return l;function l(...c){const f=e.length>c.length;let d;f&&c.push(o);try{d=e.apply(this,c)}catch(h){const g=h;if(f&&r)throw g;return o(g)}f||(d&&d.then&&typeof d.then=="function"?d.then(s,o):d instanceof Error?o(d):s(d))}function o(c,...f){r||(r=!0,n(c,...f))}function s(c){o(null,c)}}const mr={basename:i9,dirname:l9,extname:a9,join:o9,sep:"/"};function i9(e,n){if(n!==void 0&&typeof n!="string")throw new TypeError('"ext" argument must be a string');us(e);let r=0,l=-1,o=e.length,s;if(n===void 0||n.length===0||n.length>e.length){for(;o--;)if(e.codePointAt(o)===47){if(s){r=o+1;break}}else l<0&&(s=!0,l=o+1);return l<0?"":e.slice(r,l)}if(n===e)return"";let c=-1,f=n.length-1;for(;o--;)if(e.codePointAt(o)===47){if(s){r=o+1;break}}else c<0&&(s=!0,c=o+1),f>-1&&(e.codePointAt(o)===n.codePointAt(f--)?f<0&&(l=o):(f=-1,l=c));return r===l?l=c:l<0&&(l=e.length),e.slice(r,l)}function l9(e){if(us(e),e.length===0)return".";let n=-1,r=e.length,l;for(;--r;)if(e.codePointAt(r)===47){if(l){n=r;break}}else l||(l=!0);return n<0?e.codePointAt(0)===47?"/":".":n===1&&e.codePointAt(0)===47?"//":e.slice(0,n)}function a9(e){us(e);let n=e.length,r=-1,l=0,o=-1,s=0,c;for(;n--;){const f=e.codePointAt(n);if(f===47){if(c){l=n+1;break}continue}r<0&&(c=!0,r=n+1),f===46?o<0?o=n:s!==1&&(s=1):o>-1&&(s=-1)}return o<0||r<0||s===0||s===1&&o===r-1&&o===l+1?"":e.slice(o,r)}function o9(...e){let n=-1,r;for(;++n<e.length;)us(e[n]),e[n]&&(r=r===void 0?e[n]:r+"/"+e[n]);return r===void 0?".":s9(r)}function s9(e){us(e);const n=e.codePointAt(0)===47;let r=u9(e,!n);return r.length===0&&!n&&(r="."),r.length>0&&e.codePointAt(e.length-1)===47&&(r+="/"),n?"/"+r:r}function u9(e,n){let r="",l=0,o=-1,s=0,c=-1,f,d;for(;++c<=e.length;){if(c<e.length)f=e.codePointAt(c);else{if(f===47)break;f=47}if(f===47){if(!(o===c-1||s===1))if(o!==c-1&&s===2){if(r.length<2||l!==2||r.codePointAt(r.length-1)!==46||r.codePointAt(r.length-2)!==46){if(r.length>2){if(d=r.lastIndexOf("/"),d!==r.length-1){d<0?(r="",l=0):(r=r.slice(0,d),l=r.length-1-r.lastIndexOf("/")),o=c,s=0;continue}}else if(r.length>0){r="",l=0,o=c,s=0;continue}}n&&(r=r.length>0?r+"/..":"..",l=2)}else r.length>0?r+="/"+e.slice(o+1,c):r=e.slice(o+1,c),l=c-o-1;o=c,s=0}else f===46&&s>-1?s++:s=-1}return r}function us(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const c9={cwd:f9};function f9(){return"/"}function zm(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function d9(e){if(typeof e=="string")e=new URL(e);else if(!zm(e)){const n=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw n.code="ERR_INVALID_ARG_TYPE",n}if(e.protocol!=="file:"){const n=new TypeError("The URL must be of scheme file");throw n.code="ERR_INVALID_URL_SCHEME",n}return h9(e)}function h9(e){if(e.hostname!==""){const l=new TypeError('File URL host must be "localhost" or empty on darwin');throw l.code="ERR_INVALID_FILE_URL_HOST",l}const n=e.pathname;let r=-1;for(;++r<n.length;)if(n.codePointAt(r)===37&&n.codePointAt(r+1)===50){const l=n.codePointAt(r+2);if(l===70||l===102){const o=new TypeError("File URL path must not include encoded / characters");throw o.code="ERR_INVALID_FILE_URL_PATH",o}}return decodeURIComponent(n)}const qh=["history","path","basename","stem","extname","dirname"];class OE{constructor(n){let r;n?zm(n)?r={path:n}:typeof n=="string"||m9(n)?r={value:n}:r=n:r={},this.cwd="cwd"in r?"":c9.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let l=-1;for(;++l<qh.length;){const s=qh[l];s in r&&r[s]!==void 0&&r[s]!==null&&(this[s]=s==="history"?[...r[s]]:r[s])}let o;for(o in r)qh.includes(o)||(this[o]=r[o])}get basename(){return typeof this.path=="string"?mr.basename(this.path):void 0}set basename(n){Vh(n,"basename"),Gh(n,"basename"),this.path=mr.join(this.dirname||"",n)}get dirname(){return typeof this.path=="string"?mr.dirname(this.path):void 0}set dirname(n){X0(this.basename,"dirname"),this.path=mr.join(n||"",this.basename)}get extname(){return typeof this.path=="string"?mr.extname(this.path):void 0}set extname(n){if(Gh(n,"extname"),X0(this.dirname,"extname"),n){if(n.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(n.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=mr.join(this.dirname,this.stem+(n||""))}get path(){return this.history[this.history.length-1]}set path(n){zm(n)&&(n=d9(n)),Vh(n,"path"),this.path!==n&&this.history.push(n)}get stem(){return typeof this.path=="string"?mr.basename(this.path,this.extname):void 0}set stem(n){Vh(n,"stem"),Gh(n,"stem"),this.path=mr.join(this.dirname||"",n+(this.extname||""))}fail(n,r,l){const o=this.message(n,r,l);throw o.fatal=!0,o}info(n,r,l){const o=this.message(n,r,l);return o.fatal=void 0,o}message(n,r,l){const o=new Kt(n,r,l);return this.path&&(o.name=this.path+":"+o.name,o.file=this.path),o.fatal=!1,this.messages.push(o),o}toString(n){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(n||void 0).decode(this.value)}}function Gh(e,n){if(e&&e.includes(mr.sep))throw new Error("`"+n+"` cannot be a path: did not expect `"+mr.sep+"`")}function Vh(e,n){if(!e)throw new Error("`"+n+"` cannot be empty")}function X0(e,n){if(!e)throw new Error("Setting `"+n+"` requires `path` to be set too")}function m9(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const p9=(function(e){const l=this.constructor.prototype,o=l[e],s=function(){return o.apply(s,arguments)};return Object.setPrototypeOf(s,l),s}),g9={}.hasOwnProperty;class eg extends p9{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=n9()}copy(){const n=new eg;let r=-1;for(;++r<this.attachers.length;){const l=this.attachers[r];n.use(...l)}return n.data(Fh(!0,{},this.namespace)),n}data(n,r){return typeof n=="string"?arguments.length===2?(Xh("data",this.frozen),this.namespace[n]=r,this):g9.call(this.namespace,n)&&this.namespace[n]||void 0:n?(Xh("data",this.frozen),this.namespace=n,this):this.namespace}freeze(){if(this.frozen)return this;const n=this;for(;++this.freezeIndex<this.attachers.length;){const[r,...l]=this.attachers[this.freezeIndex];if(l[0]===!1)continue;l[0]===!0&&(l[0]=void 0);const o=r.call(n,...l);typeof o=="function"&&this.transformers.use(o)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(n){this.freeze();const r=Bu(n),l=this.parser||this.Parser;return $h("parse",l),l(String(r),r)}process(n,r){const l=this;return this.freeze(),$h("process",this.parser||this.Parser),Yh("process",this.compiler||this.Compiler),r?o(void 0,r):new Promise(o);function o(s,c){const f=Bu(n),d=l.parse(f);l.run(d,f,function(g,p,b){if(g||!p||!b)return h(g);const w=p,E=l.stringify(w,b);v9(E)?b.value=E:b.result=E,h(g,b)});function h(g,p){g||!p?c(g):s?s(p):r(void 0,p)}}}processSync(n){let r=!1,l;return this.freeze(),$h("processSync",this.parser||this.Parser),Yh("processSync",this.compiler||this.Compiler),this.process(n,o),Q0("processSync","process",r),l;function o(s,c){r=!0,$0(s),l=c}}run(n,r,l){K0(n),this.freeze();const o=this.transformers;return!l&&typeof r=="function"&&(l=r,r=void 0),l?s(void 0,l):new Promise(s);function s(c,f){const d=Bu(r);o.run(n,d,h);function h(g,p,b){const w=p||n;g?f(g):c?c(w):l(void 0,w,b)}}}runSync(n,r){let l=!1,o;return this.run(n,r,s),Q0("runSync","run",l),o;function s(c,f){$0(c),o=f,l=!0}}stringify(n,r){this.freeze();const l=Bu(r),o=this.compiler||this.Compiler;return Yh("stringify",o),K0(n),o(n,l)}use(n,...r){const l=this.attachers,o=this.namespace;if(Xh("use",this.frozen),n!=null)if(typeof n=="function")d(n,r);else if(typeof n=="object")Array.isArray(n)?f(n):c(n);else throw new TypeError("Expected usable value, not `"+n+"`");return this;function s(h){if(typeof h=="function")d(h,[]);else if(typeof h=="object")if(Array.isArray(h)){const[g,...p]=h;d(g,p)}else c(h);else throw new TypeError("Expected usable value, not `"+h+"`")}function c(h){if(!("plugins"in h)&&!("settings"in h))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");f(h.plugins),h.settings&&(o.settings=Fh(!0,o.settings,h.settings))}function f(h){let g=-1;if(h!=null)if(Array.isArray(h))for(;++g<h.length;){const p=h[g];s(p)}else throw new TypeError("Expected a list of plugins, not `"+h+"`")}function d(h,g){let p=-1,b=-1;for(;++p<l.length;)if(l[p][0]===h){b=p;break}if(b===-1)l.push([h,...g]);else if(g.length>0){let[w,...E]=g;const C=l[b][1];Dm(C)&&Dm(w)&&(w=Fh(!0,C,w)),l[b]=[h,w,...E]}}}}const y9=new eg().freeze();function $h(e,n){if(typeof n!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function Yh(e,n){if(typeof n!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function Xh(e,n){if(n)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function K0(e){if(!Dm(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function Q0(e,n,r){if(!r)throw new Error("`"+e+"` finished async. Use `"+n+"` instead")}function Bu(e){return x9(e)?e:new OE(e)}function x9(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function v9(e){return typeof e=="string"||b9(e)}function b9(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const w9="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",Z0=[],W0={allowDangerousHtml:!0},S9=/^(https?|ircs?|mailto|xmpp)$/i,C9=[{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 Zc(e){const n=E9(e),r=k9(e);return N9(n.runSync(n.parse(r),r),e)}function E9(e){const n=e.rehypePlugins||Z0,r=e.remarkPlugins||Z0,l=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...W0}:W0;return y9().use(l8).use(r).use(J8,l).use(n)}function k9(e){const n=e.children||"",r=new OE;return typeof n=="string"&&(r.value=n),r}function N9(e,n){const r=n.allowedElements,l=n.allowElement,o=n.components,s=n.disallowedElements,c=n.skipHtml,f=n.unwrapDisallowed,d=n.urlTransform||R9;for(const g of C9)Object.hasOwn(n,g.from)&&(""+g.from+(g.to?"use `"+g.to+"` instead":"remove it")+w9+g.id,void 0);return Jp(e,h),Fz(e,{Fragment:x.Fragment,components:o,ignoreInvalidStyle:!0,jsx:x.jsx,jsxs:x.jsxs,passKeys:!0,passNode:!0});function h(g,p,b){if(g.type==="raw"&&b&&typeof p=="number")return c?b.children.splice(p,1):b.children[p]={type:"text",value:g.value},p;if(g.type==="element"){let w;for(w in Bh)if(Object.hasOwn(Bh,w)&&Object.hasOwn(g.properties,w)){const E=g.properties[w],C=Bh[w];(C===null||C.includes(g.tagName))&&(g.properties[w]=d(String(E||""),w,g))}}if(g.type==="element"){let w=r?!r.includes(g.tagName):s?s.includes(g.tagName):!1;if(!w&&l&&typeof p=="number"&&(w=!l(g,p,b)),w&&b&&typeof p=="number")return f&&g.children?b.children.splice(p,1,...g.children):b.children.splice(p,1),p}}}function R9(e){const n=e.indexOf(":"),r=e.indexOf("?"),l=e.indexOf("#"),o=e.indexOf("/");return n===-1||o!==-1&&n>o||r!==-1&&n>r||l!==-1&&n>l||S9.test(e.slice(0,n))?e:""}function J0(e,n){const r=String(e);if(typeof n!="string")throw new TypeError("Expected character");let l=0,o=r.indexOf(n);for(;o!==-1;)l++,o=r.indexOf(n,o+n.length);return l}function T9(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function A9(e,n,r){const o=Kc((r||{}).ignore||[]),s=M9(n);let c=-1;for(;++c<s.length;)_E(e,"text",f);function f(h,g){let p=-1,b;for(;++p<g.length;){const w=g[p],E=b?b.children:void 0;if(o(w,E?E.indexOf(w):void 0,b))return;b=w}if(b)return d(h,g)}function d(h,g){const p=g[g.length-1],b=s[c][0],w=s[c][1];let E=0;const k=p.children.indexOf(h);let N=!1,j=[];b.lastIndex=0;let M=b.exec(h.value);for(;M;){const z=M.index,U={index:M.index,input:M.input,stack:[...g,h]};let _=w(...M,U);if(typeof _=="string"&&(_=_.length>0?{type:"text",value:_}:void 0),_===!1?b.lastIndex=z+1:(E!==z&&j.push({type:"text",value:h.value.slice(E,z)}),Array.isArray(_)?j.push(..._):_&&j.push(_),E=z+M[0].length,N=!0),!b.global)break;M=b.exec(h.value)}return N?(E<h.value.length&&j.push({type:"text",value:h.value.slice(E)}),p.children.splice(k,1,...j)):j=[h],k+j.length}}function M9(e){const n=[];if(!Array.isArray(e))throw new TypeError("Expected find and replace tuple or list of tuples");const r=!e[0]||Array.isArray(e[0])?e:[e];let l=-1;for(;++l<r.length;){const o=r[l];n.push([j9(o[0]),_9(o[1])])}return n}function j9(e){return typeof e=="string"?new RegExp(T9(e),"g"):e}function _9(e){return typeof e=="function"?e:function(){return e}}const Kh="phrasing",Qh=["autolink","link","image","label"];function O9(){return{transforms:[U9],enter:{literalAutolink:z9,literalAutolinkEmail:Zh,literalAutolinkHttp:Zh,literalAutolinkWww:Zh},exit:{literalAutolink:I9,literalAutolinkEmail:B9,literalAutolinkHttp:L9,literalAutolinkWww:P9}}}function D9(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:Kh,notInConstruct:Qh},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:Kh,notInConstruct:Qh},{character:":",before:"[ps]",after:"\\/",inConstruct:Kh,notInConstruct:Qh}]}}function z9(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function Zh(e){this.config.enter.autolinkProtocol.call(this,e)}function L9(e){this.config.exit.autolinkProtocol.call(this,e)}function P9(e){this.config.exit.data.call(this,e);const n=this.stack[this.stack.length-1];n.type,n.url="http://"+this.sliceSerialize(e)}function B9(e){this.config.exit.autolinkEmail.call(this,e)}function I9(e){this.exit(e)}function U9(e){A9(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,H9],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),F9]],{ignore:["link","linkReference"]})}function H9(e,n,r,l,o){let s="";if(!DE(o)||(/^w/i.test(n)&&(r=n+r,n="",s="http://"),!q9(r)))return!1;const c=G9(r+l);if(!c[0])return!1;const f={type:"link",title:null,url:s+n+c[0],children:[{type:"text",value:n+c[0]}]};return c[1]?[f,{type:"text",value:c[1]}]:f}function F9(e,n,r,l){return!DE(l,!0)||/[-\d_]$/.test(r)?!1:{type:"link",title:null,url:"mailto:"+n+"@"+r,children:[{type:"text",value:n+"@"+r}]}}function q9(e){const n=e.split(".");return!(n.length<2||n[n.length-1]&&(/_/.test(n[n.length-1])||!/[a-zA-Z\d]/.test(n[n.length-1]))||n[n.length-2]&&(/_/.test(n[n.length-2])||!/[a-zA-Z\d]/.test(n[n.length-2])))}function G9(e){const n=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!n)return[e,void 0];e=e.slice(0,n.index);let r=n[0],l=r.indexOf(")");const o=J0(e,"(");let s=J0(e,")");for(;l!==-1&&o>s;)e+=r.slice(0,l+1),r=r.slice(l+1),l=r.indexOf(")"),s++;return[e,r]}function DE(e,n){const r=e.input.charCodeAt(e.index-1);return(e.index===0||cl(r)||$c(r))&&(!n||r!==47)}zE.peek=J9;function V9(){this.buffer()}function $9(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function Y9(){this.buffer()}function X9(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function K9(e){const n=this.resume(),r=this.stack[this.stack.length-1];r.type,r.identifier=nr(this.sliceSerialize(e)).toLowerCase(),r.label=n}function Q9(e){this.exit(e)}function Z9(e){const n=this.resume(),r=this.stack[this.stack.length-1];r.type,r.identifier=nr(this.sliceSerialize(e)).toLowerCase(),r.label=n}function W9(e){this.exit(e)}function J9(){return"["}function zE(e,n,r,l){const o=r.createTracker(l);let s=o.move("[^");const c=r.enter("footnoteReference"),f=r.enter("reference");return s+=o.move(r.safe(r.associationId(e),{after:"]",before:s})),f(),c(),s+=o.move("]"),s}function e7(){return{enter:{gfmFootnoteCallString:V9,gfmFootnoteCall:$9,gfmFootnoteDefinitionLabelString:Y9,gfmFootnoteDefinition:X9},exit:{gfmFootnoteCallString:K9,gfmFootnoteCall:Q9,gfmFootnoteDefinitionLabelString:Z9,gfmFootnoteDefinition:W9}}}function t7(e){let n=!1;return e&&e.firstLineBlank&&(n=!0),{handlers:{footnoteDefinition:r,footnoteReference:zE},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function r(l,o,s,c){const f=s.createTracker(c);let d=f.move("[^");const h=s.enter("footnoteDefinition"),g=s.enter("label");return d+=f.move(s.safe(s.associationId(l),{before:d,after:"]"})),g(),d+=f.move("]:"),l.children&&l.children.length>0&&(f.shift(4),d+=f.move((n?`
402
+ `:" ")+s.indentLines(s.containerFlow(l,f.current()),n?LE:n7))),h(),d}}function n7(e,n,r){return n===0?e:LE(e,n,r)}function LE(e,n,r){return(r?"":" ")+e}const r7=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];PE.peek=s7;function i7(){return{canContainEols:["delete"],enter:{strikethrough:a7},exit:{strikethrough:o7}}}function l7(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:r7}],handlers:{delete:PE}}}function a7(e){this.enter({type:"delete",children:[]},e)}function o7(e){this.exit(e)}function PE(e,n,r,l){const o=r.createTracker(l),s=r.enter("strikethrough");let c=o.move("~~");return c+=r.containerPhrasing(e,{...o.current(),before:c,after:"~"}),c+=o.move("~~"),s(),c}function s7(){return"~"}function u7(e){return e.length}function c7(e,n){const r=n||{},l=(r.align||[]).concat(),o=r.stringLength||u7,s=[],c=[],f=[],d=[];let h=0,g=-1;for(;++g<e.length;){const C=[],k=[];let N=-1;for(e[g].length>h&&(h=e[g].length);++N<e[g].length;){const j=f7(e[g][N]);if(r.alignDelimiters!==!1){const M=o(j);k[N]=M,(d[N]===void 0||M>d[N])&&(d[N]=M)}C.push(j)}c[g]=C,f[g]=k}let p=-1;if(typeof l=="object"&&"length"in l)for(;++p<h;)s[p]=e1(l[p]);else{const C=e1(l);for(;++p<h;)s[p]=C}p=-1;const b=[],w=[];for(;++p<h;){const C=s[p];let k="",N="";C===99?(k=":",N=":"):C===108?k=":":C===114&&(N=":");let j=r.alignDelimiters===!1?1:Math.max(1,d[p]-k.length-N.length);const M=k+"-".repeat(j)+N;r.alignDelimiters!==!1&&(j=k.length+j+N.length,j>d[p]&&(d[p]=j),w[p]=j),b[p]=M}c.splice(1,0,b),f.splice(1,0,w),g=-1;const E=[];for(;++g<c.length;){const C=c[g],k=f[g];p=-1;const N=[];for(;++p<h;){const j=C[p]||"";let M="",z="";if(r.alignDelimiters!==!1){const U=d[p]-(k[p]||0),_=s[p];_===114?M=" ".repeat(U):_===99?U%2?(M=" ".repeat(U/2+.5),z=" ".repeat(U/2-.5)):(M=" ".repeat(U/2),z=M):z=" ".repeat(U)}r.delimiterStart!==!1&&!p&&N.push("|"),r.padding!==!1&&!(r.alignDelimiters===!1&&j==="")&&(r.delimiterStart!==!1||p)&&N.push(" "),r.alignDelimiters!==!1&&N.push(M),N.push(j),r.alignDelimiters!==!1&&N.push(z),r.padding!==!1&&N.push(" "),(r.delimiterEnd!==!1||p!==h-1)&&N.push("|")}E.push(r.delimiterEnd===!1?N.join("").replace(/ +$/,""):N.join(""))}return E.join(`
403
+ `)}function f7(e){return e==null?"":String(e)}function e1(e){const n=typeof e=="string"?e.codePointAt(0):0;return n===67||n===99?99:n===76||n===108?108:n===82||n===114?114:0}function d7(e,n,r,l){const o=r.enter("blockquote"),s=r.createTracker(l);s.move("> "),s.shift(2);const c=r.indentLines(r.containerFlow(e,s.current()),h7);return o(),c}function h7(e,n,r){return">"+(r?"":" ")+e}function m7(e,n){return t1(e,n.inConstruct,!0)&&!t1(e,n.notInConstruct,!1)}function t1(e,n,r){if(typeof n=="string"&&(n=[n]),!n||n.length===0)return r;let l=-1;for(;++l<n.length;)if(e.includes(n[l]))return!0;return!1}function n1(e,n,r,l){let o=-1;for(;++o<r.unsafe.length;)if(r.unsafe[o].character===`
404
+ `&&m7(r.stack,r.unsafe[o]))return/[ \t]/.test(l.before)?"":" ";return`\\
405
+ `}function p7(e,n){const r=String(e);let l=r.indexOf(n),o=l,s=0,c=0;if(typeof n!="string")throw new TypeError("Expected substring");for(;l!==-1;)l===o?++s>c&&(c=s):s=1,o=l+n.length,l=r.indexOf(n,o);return c}function g7(e,n){return!!(n.options.fences===!1&&e.value&&!e.lang&&/[^ \r\n]/.test(e.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(e.value))}function y7(e){const n=e.options.fence||"`";if(n!=="`"&&n!=="~")throw new Error("Cannot serialize code with `"+n+"` for `options.fence`, expected `` ` `` or `~`");return n}function x7(e,n,r,l){const o=y7(r),s=e.value||"",c=o==="`"?"GraveAccent":"Tilde";if(g7(e,r)){const p=r.enter("codeIndented"),b=r.indentLines(s,v7);return p(),b}const f=r.createTracker(l),d=o.repeat(Math.max(p7(s,o)+1,3)),h=r.enter("codeFenced");let g=f.move(d);if(e.lang){const p=r.enter(`codeFencedLang${c}`);g+=f.move(r.safe(e.lang,{before:g,after:" ",encode:["`"],...f.current()})),p()}if(e.lang&&e.meta){const p=r.enter(`codeFencedMeta${c}`);g+=f.move(" "),g+=f.move(r.safe(e.meta,{before:g,after:`
406
+ `,encode:["`"],...f.current()})),p()}return g+=f.move(`
407
+ `),s&&(g+=f.move(s+`
408
+ `)),g+=f.move(d),h(),g}function v7(e,n,r){return(r?"":" ")+e}function tg(e){const n=e.options.quote||'"';if(n!=='"'&&n!=="'")throw new Error("Cannot serialize title with `"+n+"` for `options.quote`, expected `\"`, or `'`");return n}function b7(e,n,r,l){const o=tg(r),s=o==='"'?"Quote":"Apostrophe",c=r.enter("definition");let f=r.enter("label");const d=r.createTracker(l);let h=d.move("[");return h+=d.move(r.safe(r.associationId(e),{before:h,after:"]",...d.current()})),h+=d.move("]: "),f(),!e.url||/[\0- \u007F]/.test(e.url)?(f=r.enter("destinationLiteral"),h+=d.move("<"),h+=d.move(r.safe(e.url,{before:h,after:">",...d.current()})),h+=d.move(">")):(f=r.enter("destinationRaw"),h+=d.move(r.safe(e.url,{before:h,after:e.title?" ":`
409
+ `,...d.current()}))),f(),e.title&&(f=r.enter(`title${s}`),h+=d.move(" "+o),h+=d.move(r.safe(e.title,{before:h,after:o,...d.current()})),h+=d.move(o),f()),c(),h}function w7(e){const n=e.options.emphasis||"*";if(n!=="*"&&n!=="_")throw new Error("Cannot serialize emphasis with `"+n+"` for `options.emphasis`, expected `*`, or `_`");return n}function $o(e){return"&#x"+e.toString(16).toUpperCase()+";"}function yc(e,n,r){const l=ya(e),o=ya(n);return l===void 0?o===void 0?r==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:o===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:l===1?o===void 0?{inside:!1,outside:!1}:o===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:o===void 0?{inside:!1,outside:!1}:o===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}BE.peek=S7;function BE(e,n,r,l){const o=w7(r),s=r.enter("emphasis"),c=r.createTracker(l),f=c.move(o);let d=c.move(r.containerPhrasing(e,{after:o,before:f,...c.current()}));const h=d.charCodeAt(0),g=yc(l.before.charCodeAt(l.before.length-1),h,o);g.inside&&(d=$o(h)+d.slice(1));const p=d.charCodeAt(d.length-1),b=yc(l.after.charCodeAt(0),p,o);b.inside&&(d=d.slice(0,-1)+$o(p));const w=c.move(o);return s(),r.attentionEncodeSurroundingInfo={after:b.outside,before:g.outside},f+d+w}function S7(e,n,r){return r.options.emphasis||"*"}function C7(e,n){let r=!1;return Jp(e,function(l){if("value"in l&&/\r?\n|\r/.test(l.value)||l.type==="break")return r=!0,_m}),!!((!e.depth||e.depth<3)&&$p(e)&&(n.options.setext||r))}function E7(e,n,r,l){const o=Math.max(Math.min(6,e.depth||1),1),s=r.createTracker(l);if(C7(e,r)){const g=r.enter("headingSetext"),p=r.enter("phrasing"),b=r.containerPhrasing(e,{...s.current(),before:`
410
+ `,after:`
411
+ `});return p(),g(),b+`
412
+ `+(o===1?"=":"-").repeat(b.length-(Math.max(b.lastIndexOf("\r"),b.lastIndexOf(`
413
+ `))+1))}const c="#".repeat(o),f=r.enter("headingAtx"),d=r.enter("phrasing");s.move(c+" ");let h=r.containerPhrasing(e,{before:"# ",after:`
414
+ `,...s.current()});return/^[\t ]/.test(h)&&(h=$o(h.charCodeAt(0))+h.slice(1)),h=h?c+" "+h:c,r.options.closeAtx&&(h+=" "+c),d(),f(),h}IE.peek=k7;function IE(e){return e.value||""}function k7(){return"<"}UE.peek=N7;function UE(e,n,r,l){const o=tg(r),s=o==='"'?"Quote":"Apostrophe",c=r.enter("image");let f=r.enter("label");const d=r.createTracker(l);let h=d.move("![");return h+=d.move(r.safe(e.alt,{before:h,after:"]",...d.current()})),h+=d.move("]("),f(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(f=r.enter("destinationLiteral"),h+=d.move("<"),h+=d.move(r.safe(e.url,{before:h,after:">",...d.current()})),h+=d.move(">")):(f=r.enter("destinationRaw"),h+=d.move(r.safe(e.url,{before:h,after:e.title?" ":")",...d.current()}))),f(),e.title&&(f=r.enter(`title${s}`),h+=d.move(" "+o),h+=d.move(r.safe(e.title,{before:h,after:o,...d.current()})),h+=d.move(o),f()),h+=d.move(")"),c(),h}function N7(){return"!"}HE.peek=R7;function HE(e,n,r,l){const o=e.referenceType,s=r.enter("imageReference");let c=r.enter("label");const f=r.createTracker(l);let d=f.move("![");const h=r.safe(e.alt,{before:d,after:"]",...f.current()});d+=f.move(h+"]["),c();const g=r.stack;r.stack=[],c=r.enter("reference");const p=r.safe(r.associationId(e),{before:d,after:"]",...f.current()});return c(),r.stack=g,s(),o==="full"||!h||h!==p?d+=f.move(p+"]"):o==="shortcut"?d=d.slice(0,-1):d+=f.move("]"),d}function R7(){return"!"}FE.peek=T7;function FE(e,n,r){let l=e.value||"",o="`",s=-1;for(;new RegExp("(^|[^`])"+o+"([^`]|$)").test(l);)o+="`";for(/[^ \r\n]/.test(l)&&(/^[ \r\n]/.test(l)&&/[ \r\n]$/.test(l)||/^`|`$/.test(l))&&(l=" "+l+" ");++s<r.unsafe.length;){const c=r.unsafe[s],f=r.compilePattern(c);let d;if(c.atBreak)for(;d=f.exec(l);){let h=d.index;l.charCodeAt(h)===10&&l.charCodeAt(h-1)===13&&h--,l=l.slice(0,h)+" "+l.slice(d.index+1)}}return o+l+o}function T7(){return"`"}function qE(e,n){const r=$p(e);return!!(!n.options.resourceLink&&e.url&&!e.title&&e.children&&e.children.length===1&&e.children[0].type==="text"&&(r===e.url||"mailto:"+r===e.url)&&/^[a-z][a-z+.-]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))}GE.peek=A7;function GE(e,n,r,l){const o=tg(r),s=o==='"'?"Quote":"Apostrophe",c=r.createTracker(l);let f,d;if(qE(e,r)){const g=r.stack;r.stack=[],f=r.enter("autolink");let p=c.move("<");return p+=c.move(r.containerPhrasing(e,{before:p,after:">",...c.current()})),p+=c.move(">"),f(),r.stack=g,p}f=r.enter("link"),d=r.enter("label");let h=c.move("[");return h+=c.move(r.containerPhrasing(e,{before:h,after:"](",...c.current()})),h+=c.move("]("),d(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(d=r.enter("destinationLiteral"),h+=c.move("<"),h+=c.move(r.safe(e.url,{before:h,after:">",...c.current()})),h+=c.move(">")):(d=r.enter("destinationRaw"),h+=c.move(r.safe(e.url,{before:h,after:e.title?" ":")",...c.current()}))),d(),e.title&&(d=r.enter(`title${s}`),h+=c.move(" "+o),h+=c.move(r.safe(e.title,{before:h,after:o,...c.current()})),h+=c.move(o),d()),h+=c.move(")"),f(),h}function A7(e,n,r){return qE(e,r)?"<":"["}VE.peek=M7;function VE(e,n,r,l){const o=e.referenceType,s=r.enter("linkReference");let c=r.enter("label");const f=r.createTracker(l);let d=f.move("[");const h=r.containerPhrasing(e,{before:d,after:"]",...f.current()});d+=f.move(h+"]["),c();const g=r.stack;r.stack=[],c=r.enter("reference");const p=r.safe(r.associationId(e),{before:d,after:"]",...f.current()});return c(),r.stack=g,s(),o==="full"||!h||h!==p?d+=f.move(p+"]"):o==="shortcut"?d=d.slice(0,-1):d+=f.move("]"),d}function M7(){return"["}function ng(e){const n=e.options.bullet||"*";if(n!=="*"&&n!=="+"&&n!=="-")throw new Error("Cannot serialize items with `"+n+"` for `options.bullet`, expected `*`, `+`, or `-`");return n}function j7(e){const n=ng(e),r=e.options.bulletOther;if(!r)return n==="*"?"-":"*";if(r!=="*"&&r!=="+"&&r!=="-")throw new Error("Cannot serialize items with `"+r+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(r===n)throw new Error("Expected `bullet` (`"+n+"`) and `bulletOther` (`"+r+"`) to be different");return r}function _7(e){const n=e.options.bulletOrdered||".";if(n!=="."&&n!==")")throw new Error("Cannot serialize items with `"+n+"` for `options.bulletOrdered`, expected `.` or `)`");return n}function $E(e){const n=e.options.rule||"*";if(n!=="*"&&n!=="-"&&n!=="_")throw new Error("Cannot serialize rules with `"+n+"` for `options.rule`, expected `*`, `-`, or `_`");return n}function O7(e,n,r,l){const o=r.enter("list"),s=r.bulletCurrent;let c=e.ordered?_7(r):ng(r);const f=e.ordered?c==="."?")":".":j7(r);let d=n&&r.bulletLastUsed?c===r.bulletLastUsed:!1;if(!e.ordered){const g=e.children?e.children[0]:void 0;if((c==="*"||c==="-")&&g&&(!g.children||!g.children[0])&&r.stack[r.stack.length-1]==="list"&&r.stack[r.stack.length-2]==="listItem"&&r.stack[r.stack.length-3]==="list"&&r.stack[r.stack.length-4]==="listItem"&&r.indexStack[r.indexStack.length-1]===0&&r.indexStack[r.indexStack.length-2]===0&&r.indexStack[r.indexStack.length-3]===0&&(d=!0),$E(r)===c&&g){let p=-1;for(;++p<e.children.length;){const b=e.children[p];if(b&&b.type==="listItem"&&b.children&&b.children[0]&&b.children[0].type==="thematicBreak"){d=!0;break}}}}d&&(c=f),r.bulletCurrent=c;const h=r.containerFlow(e,l);return r.bulletLastUsed=c,r.bulletCurrent=s,o(),h}function D7(e){const n=e.options.listItemIndent||"one";if(n!=="tab"&&n!=="one"&&n!=="mixed")throw new Error("Cannot serialize items with `"+n+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return n}function z7(e,n,r,l){const o=D7(r);let s=r.bulletCurrent||ng(r);n&&n.type==="list"&&n.ordered&&(s=(typeof n.start=="number"&&n.start>-1?n.start:1)+(r.options.incrementListMarker===!1?0:n.children.indexOf(e))+s);let c=s.length+1;(o==="tab"||o==="mixed"&&(n&&n.type==="list"&&n.spread||e.spread))&&(c=Math.ceil(c/4)*4);const f=r.createTracker(l);f.move(s+" ".repeat(c-s.length)),f.shift(c);const d=r.enter("listItem"),h=r.indentLines(r.containerFlow(e,f.current()),g);return d(),h;function g(p,b,w){return b?(w?"":" ".repeat(c))+p:(w?s:s+" ".repeat(c-s.length))+p}}function L7(e,n,r,l){const o=r.enter("paragraph"),s=r.enter("phrasing"),c=r.containerPhrasing(e,l);return s(),o(),c}const P7=Kc(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function B7(e,n,r,l){return(e.children.some(function(c){return P7(c)})?r.containerPhrasing:r.containerFlow).call(r,e,l)}function I7(e){const n=e.options.strong||"*";if(n!=="*"&&n!=="_")throw new Error("Cannot serialize strong with `"+n+"` for `options.strong`, expected `*`, or `_`");return n}YE.peek=U7;function YE(e,n,r,l){const o=I7(r),s=r.enter("strong"),c=r.createTracker(l),f=c.move(o+o);let d=c.move(r.containerPhrasing(e,{after:o,before:f,...c.current()}));const h=d.charCodeAt(0),g=yc(l.before.charCodeAt(l.before.length-1),h,o);g.inside&&(d=$o(h)+d.slice(1));const p=d.charCodeAt(d.length-1),b=yc(l.after.charCodeAt(0),p,o);b.inside&&(d=d.slice(0,-1)+$o(p));const w=c.move(o+o);return s(),r.attentionEncodeSurroundingInfo={after:b.outside,before:g.outside},f+d+w}function U7(e,n,r){return r.options.strong||"*"}function H7(e,n,r,l){return r.safe(e.value,l)}function F7(e){const n=e.options.ruleRepetition||3;if(n<3)throw new Error("Cannot serialize rules with repetition `"+n+"` for `options.ruleRepetition`, expected `3` or more");return n}function q7(e,n,r){const l=($E(r)+(r.options.ruleSpaces?" ":"")).repeat(F7(r));return r.options.ruleSpaces?l.slice(0,-1):l}const XE={blockquote:d7,break:n1,code:x7,definition:b7,emphasis:BE,hardBreak:n1,heading:E7,html:IE,image:UE,imageReference:HE,inlineCode:FE,link:GE,linkReference:VE,list:O7,listItem:z7,paragraph:L7,root:B7,strong:YE,text:H7,thematicBreak:q7};function G7(){return{enter:{table:V7,tableData:r1,tableHeader:r1,tableRow:Y7},exit:{codeText:X7,table:$7,tableData:Wh,tableHeader:Wh,tableRow:Wh}}}function V7(e){const n=e._align;this.enter({type:"table",align:n.map(function(r){return r==="none"?null:r}),children:[]},e),this.data.inTable=!0}function $7(e){this.exit(e),this.data.inTable=void 0}function Y7(e){this.enter({type:"tableRow",children:[]},e)}function Wh(e){this.exit(e)}function r1(e){this.enter({type:"tableCell",children:[]},e)}function X7(e){let n=this.resume();this.data.inTable&&(n=n.replace(/\\([\\|])/g,K7));const r=this.stack[this.stack.length-1];r.type,r.value=n,this.exit(e)}function K7(e,n){return n==="|"?n:e}function Q7(e){const n=e||{},r=n.tableCellPadding,l=n.tablePipeAlign,o=n.stringLength,s=r?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
415
+ `,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:b,table:c,tableCell:d,tableRow:f}};function c(w,E,C,k){return h(g(w,C,k),w.align)}function f(w,E,C,k){const N=p(w,C,k),j=h([N]);return j.slice(0,j.indexOf(`
416
+ `))}function d(w,E,C,k){const N=C.enter("tableCell"),j=C.enter("phrasing"),M=C.containerPhrasing(w,{...k,before:s,after:s});return j(),N(),M}function h(w,E){return c7(w,{align:E,alignDelimiters:l,padding:r,stringLength:o})}function g(w,E,C){const k=w.children;let N=-1;const j=[],M=E.enter("table");for(;++N<k.length;)j[N]=p(k[N],E,C);return M(),j}function p(w,E,C){const k=w.children;let N=-1;const j=[],M=E.enter("tableRow");for(;++N<k.length;)j[N]=d(k[N],w,E,C);return M(),j}function b(w,E,C){let k=XE.inlineCode(w,E,C);return C.stack.includes("tableCell")&&(k=k.replace(/\|/g,"\\$&")),k}}function Z7(){return{exit:{taskListCheckValueChecked:i1,taskListCheckValueUnchecked:i1,paragraph:J7}}}function W7(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:eP}}}function i1(e){const n=this.stack[this.stack.length-2];n.type,n.checked=e.type==="taskListCheckValueChecked"}function J7(e){const n=this.stack[this.stack.length-2];if(n&&n.type==="listItem"&&typeof n.checked=="boolean"){const r=this.stack[this.stack.length-1];r.type;const l=r.children[0];if(l&&l.type==="text"){const o=n.children;let s=-1,c;for(;++s<o.length;){const f=o[s];if(f.type==="paragraph"){c=f;break}}c===r&&(l.value=l.value.slice(1),l.value.length===0?r.children.shift():r.position&&l.position&&typeof l.position.start.offset=="number"&&(l.position.start.column++,l.position.start.offset++,r.position.start=Object.assign({},l.position.start)))}}this.exit(e)}function eP(e,n,r,l){const o=e.children[0],s=typeof e.checked=="boolean"&&o&&o.type==="paragraph",c="["+(e.checked?"x":" ")+"] ",f=r.createTracker(l);s&&f.move(c);let d=XE.listItem(e,n,r,{...l,...f.current()});return s&&(d=d.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,h)),d;function h(g){return g+c}}function tP(){return[O9(),e7(),i7(),G7(),Z7()]}function nP(e){return{extensions:[D9(),t7(e),l7(),Q7(e),W7()]}}const rP={tokenize:uP,partial:!0},KE={tokenize:cP,partial:!0},QE={tokenize:fP,partial:!0},ZE={tokenize:dP,partial:!0},iP={tokenize:hP,partial:!0},WE={name:"wwwAutolink",tokenize:oP,previous:e2},JE={name:"protocolAutolink",tokenize:sP,previous:t2},Zr={name:"emailAutolink",tokenize:aP,previous:n2},Er={};function lP(){return{text:Er}}let al=48;for(;al<123;)Er[al]=Zr,al++,al===58?al=65:al===91&&(al=97);Er[43]=Zr;Er[45]=Zr;Er[46]=Zr;Er[95]=Zr;Er[72]=[Zr,JE];Er[104]=[Zr,JE];Er[87]=[Zr,WE];Er[119]=[Zr,WE];function aP(e,n,r){const l=this;let o,s;return c;function c(p){return!Lm(p)||!n2.call(l,l.previous)||rg(l.events)?r(p):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),f(p))}function f(p){return Lm(p)?(e.consume(p),f):p===64?(e.consume(p),d):r(p)}function d(p){return p===46?e.check(iP,g,h)(p):p===45||p===95||Xt(p)?(s=!0,e.consume(p),d):g(p)}function h(p){return e.consume(p),o=!0,d}function g(p){return s&&o&&Wt(l.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),n(p)):r(p)}}function oP(e,n,r){const l=this;return o;function o(c){return c!==87&&c!==119||!e2.call(l,l.previous)||rg(l.events)?r(c):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(rP,e.attempt(KE,e.attempt(QE,s),r),r)(c))}function s(c){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),n(c)}}function sP(e,n,r){const l=this;let o="",s=!1;return c;function c(p){return(p===72||p===104)&&t2.call(l,l.previous)&&!rg(l.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),o+=String.fromCodePoint(p),e.consume(p),f):r(p)}function f(p){if(Wt(p)&&o.length<5)return o+=String.fromCodePoint(p),e.consume(p),f;if(p===58){const b=o.toLowerCase();if(b==="http"||b==="https")return e.consume(p),d}return r(p)}function d(p){return p===47?(e.consume(p),s?h:(s=!0,d)):r(p)}function h(p){return p===null||mc(p)||tt(p)||cl(p)||$c(p)?r(p):e.attempt(KE,e.attempt(QE,g),r)(p)}function g(p){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),n(p)}}function uP(e,n,r){let l=0;return o;function o(c){return(c===87||c===119)&&l<3?(l++,e.consume(c),o):c===46&&l===3?(e.consume(c),s):r(c)}function s(c){return c===null?r(c):n(c)}}function cP(e,n,r){let l,o,s;return c;function c(h){return h===46||h===95?e.check(ZE,d,f)(h):h===null||tt(h)||cl(h)||h!==45&&$c(h)?d(h):(s=!0,e.consume(h),c)}function f(h){return h===95?l=!0:(o=l,l=void 0),e.consume(h),c}function d(h){return o||l||!s?r(h):n(h)}}function fP(e,n){let r=0,l=0;return o;function o(c){return c===40?(r++,e.consume(c),o):c===41&&l<r?s(c):c===33||c===34||c===38||c===39||c===41||c===42||c===44||c===46||c===58||c===59||c===60||c===63||c===93||c===95||c===126?e.check(ZE,n,s)(c):c===null||tt(c)||cl(c)?n(c):(e.consume(c),o)}function s(c){return c===41&&l++,e.consume(c),o}}function dP(e,n,r){return l;function l(f){return f===33||f===34||f===39||f===41||f===42||f===44||f===46||f===58||f===59||f===63||f===95||f===126?(e.consume(f),l):f===38?(e.consume(f),s):f===93?(e.consume(f),o):f===60||f===null||tt(f)||cl(f)?n(f):r(f)}function o(f){return f===null||f===40||f===91||tt(f)||cl(f)?n(f):l(f)}function s(f){return Wt(f)?c(f):r(f)}function c(f){return f===59?(e.consume(f),l):Wt(f)?(e.consume(f),c):r(f)}}function hP(e,n,r){return l;function l(s){return e.consume(s),o}function o(s){return Xt(s)?r(s):n(s)}}function e2(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||tt(e)}function t2(e){return!Wt(e)}function n2(e){return!(e===47||Lm(e))}function Lm(e){return e===43||e===45||e===46||e===95||Xt(e)}function rg(e){let n=e.length,r=!1;for(;n--;){const l=e[n][1];if((l.type==="labelLink"||l.type==="labelImage")&&!l._balanced){r=!0;break}if(l._gfmAutolinkLiteralWalkedInto){r=!1;break}}return e.length>0&&!r&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),r}const mP={tokenize:SP,partial:!0};function pP(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:vP,continuation:{tokenize:bP},exit:wP}},text:{91:{name:"gfmFootnoteCall",tokenize:xP},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:gP,resolveTo:yP}}}}function gP(e,n,r){const l=this;let o=l.events.length;const s=l.parser.gfmFootnotes||(l.parser.gfmFootnotes=[]);let c;for(;o--;){const d=l.events[o][1];if(d.type==="labelImage"){c=d;break}if(d.type==="gfmFootnoteCall"||d.type==="labelLink"||d.type==="label"||d.type==="image"||d.type==="link")break}return f;function f(d){if(!c||!c._balanced)return r(d);const h=nr(l.sliceSerialize({start:c.end,end:l.now()}));return h.codePointAt(0)!==94||!s.includes(h.slice(1))?r(d):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(d),e.exit("gfmFootnoteCallLabelMarker"),n(d))}}function yP(e,n){let r=e.length;for(;r--;)if(e[r][1].type==="labelImage"&&e[r][0]==="enter"){e[r][1];break}e[r+1][1].type="data",e[r+3][1].type="gfmFootnoteCallLabelMarker";const l={type:"gfmFootnoteCall",start:Object.assign({},e[r+3][1].start),end:Object.assign({},e[e.length-1][1].end)},o={type:"gfmFootnoteCallMarker",start:Object.assign({},e[r+3][1].end),end:Object.assign({},e[r+3][1].end)};o.end.column++,o.end.offset++,o.end._bufferIndex++;const s={type:"gfmFootnoteCallString",start:Object.assign({},o.end),end:Object.assign({},e[e.length-1][1].start)},c={type:"chunkString",contentType:"string",start:Object.assign({},s.start),end:Object.assign({},s.end)},f=[e[r+1],e[r+2],["enter",l,n],e[r+3],e[r+4],["enter",o,n],["exit",o,n],["enter",s,n],["enter",c,n],["exit",c,n],["exit",s,n],e[e.length-2],e[e.length-1],["exit",l,n]];return e.splice(r,e.length-r+1,...f),e}function xP(e,n,r){const l=this,o=l.parser.gfmFootnotes||(l.parser.gfmFootnotes=[]);let s=0,c;return f;function f(p){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(p),e.exit("gfmFootnoteCallLabelMarker"),d}function d(p){return p!==94?r(p):(e.enter("gfmFootnoteCallMarker"),e.consume(p),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",h)}function h(p){if(s>999||p===93&&!c||p===null||p===91||tt(p))return r(p);if(p===93){e.exit("chunkString");const b=e.exit("gfmFootnoteCallString");return o.includes(nr(l.sliceSerialize(b)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(p),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),n):r(p)}return tt(p)||(c=!0),s++,e.consume(p),p===92?g:h}function g(p){return p===91||p===92||p===93?(e.consume(p),s++,h):h(p)}}function vP(e,n,r){const l=this,o=l.parser.gfmFootnotes||(l.parser.gfmFootnotes=[]);let s,c=0,f;return d;function d(E){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(E),e.exit("gfmFootnoteDefinitionLabelMarker"),h}function h(E){return E===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(E),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",g):r(E)}function g(E){if(c>999||E===93&&!f||E===null||E===91||tt(E))return r(E);if(E===93){e.exit("chunkString");const C=e.exit("gfmFootnoteDefinitionLabelString");return s=nr(l.sliceSerialize(C)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(E),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),b}return tt(E)||(f=!0),c++,e.consume(E),E===92?p:g}function p(E){return E===91||E===92||E===93?(e.consume(E),c++,g):g(E)}function b(E){return E===58?(e.enter("definitionMarker"),e.consume(E),e.exit("definitionMarker"),o.includes(s)||o.push(s),He(e,w,"gfmFootnoteDefinitionWhitespace")):r(E)}function w(E){return n(E)}}function bP(e,n,r){return e.check(ss,n,e.attempt(mP,n,r))}function wP(e){e.exit("gfmFootnoteDefinition")}function SP(e,n,r){const l=this;return He(e,o,"gfmFootnoteDefinitionIndent",5);function o(s){const c=l.events[l.events.length-1];return c&&c[1].type==="gfmFootnoteDefinitionIndent"&&c[2].sliceSerialize(c[1],!0).length===4?n(s):r(s)}}function CP(e){let r=(e||{}).singleTilde;const l={name:"strikethrough",tokenize:s,resolveAll:o};return r==null&&(r=!0),{text:{126:l},insideSpan:{null:[l]},attentionMarkers:{null:[126]}};function o(c,f){let d=-1;for(;++d<c.length;)if(c[d][0]==="enter"&&c[d][1].type==="strikethroughSequenceTemporary"&&c[d][1]._close){let h=d;for(;h--;)if(c[h][0]==="exit"&&c[h][1].type==="strikethroughSequenceTemporary"&&c[h][1]._open&&c[d][1].end.offset-c[d][1].start.offset===c[h][1].end.offset-c[h][1].start.offset){c[d][1].type="strikethroughSequence",c[h][1].type="strikethroughSequence";const g={type:"strikethrough",start:Object.assign({},c[h][1].start),end:Object.assign({},c[d][1].end)},p={type:"strikethroughText",start:Object.assign({},c[h][1].end),end:Object.assign({},c[d][1].start)},b=[["enter",g,f],["enter",c[h][1],f],["exit",c[h][1],f],["enter",p,f]],w=f.parser.constructs.insideSpan.null;w&&Rn(b,b.length,0,Yc(w,c.slice(h+1,d),f)),Rn(b,b.length,0,[["exit",p,f],["enter",c[d][1],f],["exit",c[d][1],f],["exit",g,f]]),Rn(c,h-1,d-h+3,b),d=h+b.length-2;break}}for(d=-1;++d<c.length;)c[d][1].type==="strikethroughSequenceTemporary"&&(c[d][1].type="data");return c}function s(c,f,d){const h=this.previous,g=this.events;let p=0;return b;function b(E){return h===126&&g[g.length-1][1].type!=="characterEscape"?d(E):(c.enter("strikethroughSequenceTemporary"),w(E))}function w(E){const C=ya(h);if(E===126)return p>1?d(E):(c.consume(E),p++,w);if(p<2&&!r)return d(E);const k=c.exit("strikethroughSequenceTemporary"),N=ya(E);return k._open=!N||N===2&&!!C,k._close=!C||C===2&&!!N,f(E)}}}class EP{constructor(){this.map=[]}add(n,r,l){kP(this,n,r,l)}consume(n){if(this.map.sort(function(s,c){return s[0]-c[0]}),this.map.length===0)return;let r=this.map.length;const l=[];for(;r>0;)r-=1,l.push(n.slice(this.map[r][0]+this.map[r][1]),this.map[r][2]),n.length=this.map[r][0];l.push(n.slice()),n.length=0;let o=l.pop();for(;o;){for(const s of o)n.push(s);o=l.pop()}this.map.length=0}}function kP(e,n,r,l){let o=0;if(!(r===0&&l.length===0)){for(;o<e.map.length;){if(e.map[o][0]===n){e.map[o][1]+=r,e.map[o][2].push(...l);return}o+=1}e.map.push([n,r,l])}}function NP(e,n){let r=!1;const l=[];for(;n<e.length;){const o=e[n];if(r){if(o[0]==="enter")o[1].type==="tableContent"&&l.push(e[n+1][1].type==="tableDelimiterMarker"?"left":"none");else if(o[1].type==="tableContent"){if(e[n-1][1].type==="tableDelimiterMarker"){const s=l.length-1;l[s]=l[s]==="left"?"center":"right"}}else if(o[1].type==="tableDelimiterRow")break}else o[0]==="enter"&&o[1].type==="tableDelimiterRow"&&(r=!0);n+=1}return l}function RP(){return{flow:{null:{name:"table",tokenize:TP,resolveAll:AP}}}}function TP(e,n,r){const l=this;let o=0,s=0,c;return f;function f(I){let J=l.events.length-1;for(;J>-1;){const le=l.events[J][1].type;if(le==="lineEnding"||le==="linePrefix")J--;else break}const te=J>-1?l.events[J][1].type:null,ce=te==="tableHead"||te==="tableRow"?_:d;return ce===_&&l.parser.lazy[l.now().line]?r(I):ce(I)}function d(I){return e.enter("tableHead"),e.enter("tableRow"),h(I)}function h(I){return I===124||(c=!0,s+=1),g(I)}function g(I){return I===null?r(I):Ee(I)?s>1?(s=0,l.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(I),e.exit("lineEnding"),w):r(I):Pe(I)?He(e,g,"whitespace")(I):(s+=1,c&&(c=!1,o+=1),I===124?(e.enter("tableCellDivider"),e.consume(I),e.exit("tableCellDivider"),c=!0,g):(e.enter("data"),p(I)))}function p(I){return I===null||I===124||tt(I)?(e.exit("data"),g(I)):(e.consume(I),I===92?b:p)}function b(I){return I===92||I===124?(e.consume(I),p):p(I)}function w(I){return l.interrupt=!1,l.parser.lazy[l.now().line]?r(I):(e.enter("tableDelimiterRow"),c=!1,Pe(I)?He(e,E,"linePrefix",l.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(I):E(I))}function E(I){return I===45||I===58?k(I):I===124?(c=!0,e.enter("tableCellDivider"),e.consume(I),e.exit("tableCellDivider"),C):U(I)}function C(I){return Pe(I)?He(e,k,"whitespace")(I):k(I)}function k(I){return I===58?(s+=1,c=!0,e.enter("tableDelimiterMarker"),e.consume(I),e.exit("tableDelimiterMarker"),N):I===45?(s+=1,N(I)):I===null||Ee(I)?z(I):U(I)}function N(I){return I===45?(e.enter("tableDelimiterFiller"),j(I)):U(I)}function j(I){return I===45?(e.consume(I),j):I===58?(c=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(I),e.exit("tableDelimiterMarker"),M):(e.exit("tableDelimiterFiller"),M(I))}function M(I){return Pe(I)?He(e,z,"whitespace")(I):z(I)}function z(I){return I===124?E(I):I===null||Ee(I)?!c||o!==s?U(I):(e.exit("tableDelimiterRow"),e.exit("tableHead"),n(I)):U(I)}function U(I){return r(I)}function _(I){return e.enter("tableRow"),P(I)}function P(I){return I===124?(e.enter("tableCellDivider"),e.consume(I),e.exit("tableCellDivider"),P):I===null||Ee(I)?(e.exit("tableRow"),n(I)):Pe(I)?He(e,P,"whitespace")(I):(e.enter("data"),F(I))}function F(I){return I===null||I===124||tt(I)?(e.exit("data"),P(I)):(e.consume(I),I===92?ne:F)}function ne(I){return I===92||I===124?(e.consume(I),F):F(I)}}function AP(e,n){let r=-1,l=!0,o=0,s=[0,0,0,0],c=[0,0,0,0],f=!1,d=0,h,g,p;const b=new EP;for(;++r<e.length;){const w=e[r],E=w[1];w[0]==="enter"?E.type==="tableHead"?(f=!1,d!==0&&(l1(b,n,d,h,g),g=void 0,d=0),h={type:"table",start:Object.assign({},E.start),end:Object.assign({},E.end)},b.add(r,0,[["enter",h,n]])):E.type==="tableRow"||E.type==="tableDelimiterRow"?(l=!0,p=void 0,s=[0,0,0,0],c=[0,r+1,0,0],f&&(f=!1,g={type:"tableBody",start:Object.assign({},E.start),end:Object.assign({},E.end)},b.add(r,0,[["enter",g,n]])),o=E.type==="tableDelimiterRow"?2:g?3:1):o&&(E.type==="data"||E.type==="tableDelimiterMarker"||E.type==="tableDelimiterFiller")?(l=!1,c[2]===0&&(s[1]!==0&&(c[0]=c[1],p=Iu(b,n,s,o,void 0,p),s=[0,0,0,0]),c[2]=r)):E.type==="tableCellDivider"&&(l?l=!1:(s[1]!==0&&(c[0]=c[1],p=Iu(b,n,s,o,void 0,p)),s=c,c=[s[1],r,0,0])):E.type==="tableHead"?(f=!0,d=r):E.type==="tableRow"||E.type==="tableDelimiterRow"?(d=r,s[1]!==0?(c[0]=c[1],p=Iu(b,n,s,o,r,p)):c[1]!==0&&(p=Iu(b,n,c,o,r,p)),o=0):o&&(E.type==="data"||E.type==="tableDelimiterMarker"||E.type==="tableDelimiterFiller")&&(c[3]=r)}for(d!==0&&l1(b,n,d,h,g),b.consume(n.events),r=-1;++r<n.events.length;){const w=n.events[r];w[0]==="enter"&&w[1].type==="table"&&(w[1]._align=NP(n.events,r))}return e}function Iu(e,n,r,l,o,s){const c=l===1?"tableHeader":l===2?"tableDelimiter":"tableData",f="tableContent";r[0]!==0&&(s.end=Object.assign({},oa(n.events,r[0])),e.add(r[0],0,[["exit",s,n]]));const d=oa(n.events,r[1]);if(s={type:c,start:Object.assign({},d),end:Object.assign({},d)},e.add(r[1],0,[["enter",s,n]]),r[2]!==0){const h=oa(n.events,r[2]),g=oa(n.events,r[3]),p={type:f,start:Object.assign({},h),end:Object.assign({},g)};if(e.add(r[2],0,[["enter",p,n]]),l!==2){const b=n.events[r[2]],w=n.events[r[3]];if(b[1].end=Object.assign({},w[1].end),b[1].type="chunkText",b[1].contentType="text",r[3]>r[2]+1){const E=r[2]+1,C=r[3]-r[2]-1;e.add(E,C,[])}}e.add(r[3]+1,0,[["exit",p,n]])}return o!==void 0&&(s.end=Object.assign({},oa(n.events,o)),e.add(o,0,[["exit",s,n]]),s=void 0),s}function l1(e,n,r,l,o){const s=[],c=oa(n.events,r);o&&(o.end=Object.assign({},c),s.push(["exit",o,n])),l.end=Object.assign({},c),s.push(["exit",l,n]),e.add(r+1,0,s)}function oa(e,n){const r=e[n],l=r[0]==="enter"?"start":"end";return r[1][l]}const MP={name:"tasklistCheck",tokenize:_P};function jP(){return{text:{91:MP}}}function _P(e,n,r){const l=this;return o;function o(d){return l.previous!==null||!l._gfmTasklistFirstContentOfListItem?r(d):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(d),e.exit("taskListCheckMarker"),s)}function s(d){return tt(d)?(e.enter("taskListCheckValueUnchecked"),e.consume(d),e.exit("taskListCheckValueUnchecked"),c):d===88||d===120?(e.enter("taskListCheckValueChecked"),e.consume(d),e.exit("taskListCheckValueChecked"),c):r(d)}function c(d){return d===93?(e.enter("taskListCheckMarker"),e.consume(d),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),f):r(d)}function f(d){return Ee(d)?n(d):Pe(d)?e.check({tokenize:OP},n,r)(d):r(d)}}function OP(e,n,r){return He(e,l,"whitespace");function l(o){return o===null?r(o):n(o)}}function DP(e){return hE([lP(),pP(),CP(e),RP(),jP()])}const zP={};function Wc(e){const n=this,r=e||zP,l=n.data(),o=l.micromarkExtensions||(l.micromarkExtensions=[]),s=l.fromMarkdownExtensions||(l.fromMarkdownExtensions=[]),c=l.toMarkdownExtensions||(l.toMarkdownExtensions=[]);o.push(DP(r)),s.push(tP()),c.push(nP(r))}function LP({content:e}){return x.jsx("div",{className:"flex gap-2 justify-end",children:x.jsx("div",{className:"max-w-[85%] sm:max-w-[80%] rounded-[20px] py-1.5 px-3.5 bg-muted text-primary border border-border prose prose-sm prose-invert [&_p]:whitespace-pre-line",children:x.jsx(Zc,{remarkPlugins:[Wc],components:Vc,children:e})})})}function PP({json:e}){return x.jsx("div",{className:"flex gap-3 justify-start",children:x.jsx("div",{className:"flex-1 max-w-[90%]",children:x.jsx("pre",{className:"text-xs font-mono whitespace-pre-wrap break-words bg-muted rounded-lg p-3 overflow-auto max-h-96",children:e})})})}function r2({title:e,count:n,children:r,badge:l}){const[o,s]=v.useState(!1);return n===0?null:x.jsxs("div",{className:"flex flex-col gap-1.5",children:[x.jsxs("button",{onClick:()=>s(!o),className:"flex items-center gap-1 cursor-pointer group/section hover:opacity-60 transition-opacity",children:[x.jsx(Yr,{className:ye("h-3.5 w-3.5 text-muted-foreground transition-transform duration-200",o&&"rotate-90")}),x.jsx("span",{className:"text-muted-foreground font-medium",children:e}),x.jsx("span",{className:"text-muted-foreground/60",children:n}),l]}),o&&x.jsx("div",{className:"ml-5",children:r})]})}function Jh({title:e,items:n,icon:r,getIcon:l}){return n.length===0?null:x.jsx(r2,{title:e,count:n.length,children:x.jsx("div",{className:"flex flex-wrap gap-1.5",children:n.map(o=>x.jsx(ZC,{icon:l?l(o):r,children:o},o))})})}function BP(e){const n=e.match(/^mcp__([^_]+)__(.+)$/);return n?{server:n[1],tool:n[2]}:null}function i2({status:e}){const n=e==="connected"?"bg-emerald-500":e==="pending"?"bg-yellow-500":"bg-red-500";return x.jsx("span",{className:ye("inline-block h-2 w-2 rounded-full shrink-0",n)})}function IP(e){switch(e){case"connected":return"Connected";case"failed":return"Failed";case"needs-auth":return"Needs auth";case"pending":return"Connecting...";case"disabled":return"Disabled";default:return e}}function a1({server:e}){const[n,r]=v.useState(!1),l=e.status==="connected";return x.jsxs("div",{className:"flex flex-col gap-1.5",children:[x.jsxs("button",{onClick:()=>l&&e.tools.length>0&&r(!n),className:ye("flex items-center gap-1.5",l&&e.tools.length>0&&"cursor-pointer hover:opacity-60 transition-opacity"),children:[l&&e.tools.length>0&&x.jsx(Yr,{className:ye("h-3 w-3 text-muted-foreground transition-transform duration-200",n&&"rotate-90")}),x.jsx(i2,{status:e.status}),x.jsx("span",{className:"text-muted-foreground font-medium",children:pm(e.name)}),l?x.jsxs("span",{className:"text-muted-foreground/50",children:[e.tools.length," tools"]}):x.jsx("span",{className:"text-muted-foreground/50",children:IP(e.status)})]}),!l&&e.error&&x.jsx("span",{className:"text-destructive ml-5",children:e.error}),n&&e.tools.length>0&&x.jsx("div",{className:"flex flex-wrap gap-1.5 ml-5",children:e.tools.map(o=>x.jsx(ZC,{icon:QC(`mcp__${e.name}__${o}`),children:o},o))})]})}function UP({servers:e}){if(e.length===0)return null;const n=e.filter(o=>o.status==="connected"),r=e.filter(o=>o.status!=="connected"),l=r.length>0?x.jsxs("span",{className:"flex items-center gap-1 ml-1",children:[x.jsx(i2,{status:"failed"}),x.jsxs("span",{className:"text-muted-foreground/60",children:[r.length," disconnected"]})]}):null;return x.jsx(r2,{title:"MCP Servers",count:e.length,badge:l,children:x.jsxs("div",{className:"flex flex-col gap-2",children:[n.map(o=>x.jsx(a1,{server:o},o.name)),r.map(o=>x.jsx(a1,{server:o},o.name))]})})}function HP({rawJson:e}){const[n,r]=v.useState(!1);return x.jsxs("div",{className:"flex flex-col gap-1.5",children:[x.jsxs("button",{onClick:()=>r(!n),className:"flex items-center gap-1 cursor-pointer group/section hover:opacity-60 transition-opacity",children:[x.jsx(Yr,{className:ye("h-3.5 w-3.5 text-muted-foreground transition-transform duration-200",n&&"rotate-90")}),x.jsx("span",{className:"text-muted-foreground font-medium",children:"Raw Message"})]}),n&&x.jsx("pre",{className:"ml-5 text-xs whitespace-pre-wrap break-all border border-border rounded-md p-3 overflow-x-auto max-h-96 overflow-y-auto",children:e})]})}function FP({message:e,rawJson:n}){const{coreTools:r,mcpServersWithTools:l}=v.useMemo(()=>{const o=new Map,s=[];for(const f of e.tools){const d=BP(f);if(d){const h=o.get(d.server)||[];h.push(d.tool),o.set(d.server,h)}else s.push(f)}const c=e.mcpServers.map(f=>({name:f.name,status:f.status,error:f.error,tools:o.get(f.name)||[]}));return{coreTools:s,mcpServersWithTools:c}},[e.tools,e.mcpServers]);return x.jsx(Bi,{children:x.jsxs(qc,{expandedContent:x.jsx(Gc,{className:"my-4 text-xs",children:x.jsxs("div",{className:"flex flex-col gap-3",children:[x.jsx(cz,{children:e.model}),x.jsx(Jh,{title:"Tools",items:r,getIcon:o=>km[o]??KC}),x.jsx(Jh,{title:"Agents",items:e.agents,icon:rp}),x.jsx(Jh,{title:"Commands",items:e.slashCommands,icon:Wj}),x.jsx(UP,{servers:l}),n&&x.jsx(HP,{rawJson:n})]})}),children:[x.jsx(JM,{className:"h-5 w-5 text-logo"}),x.jsx(Oi,{children:"Session Started"})]})})}function qP({message:e}){return x.jsx(Bi,{className:"hidden",children:x.jsxs(qc,{expandedContent:x.jsx(Gc,{className:"my-4 text-xs",children:x.jsx("pre",{className:"font-mono whitespace-pre-wrap break-all bg-muted border border-border rounded-lg p-2 max-h-64 overflow-auto",children:JSON.stringify(e.accountInfo,null,2)})}),children:[x.jsx("div",{className:"size-5 flex justify-center items-center ",children:x.jsx(rp,{className:"h-4 w-4 text-muted-foreground"})}),x.jsx(Oi,{children:"Account"})]})})}function GP({message:e}){return x.jsx("div",{className:"text-pretty prose prose-sm dark:prose-invert px-0.5 w-full max-w-full space-y-4",children:x.jsx(Zc,{remarkPlugins:[Wc],components:Vc,children:e.text})})}function VP({question:e,currentIndex:n,totalQuestions:r,onBack:l,children:o}){const s=l&&n>0;return x.jsxs("div",{className:"rounded-2xl border border-border overflow-hidden",children:[x.jsxs("div",{className:"relative",children:[x.jsxs("h3",{className:"font-medium text-foreground text-sm p-3 px-4 bg-card border-b border-border text-foreground flex flex-row items-center gap-2",children:[s?x.jsx("button",{onClick:l,className:" text-muted-foreground hover:opacity-60 transition-all flex items-center",children:x.jsx(uj,{className:"h-4 w-4 -ml-0.5",strokeWidth:3})}):r>1?x.jsxs("span",{className:"font-bold text-muted-foreground whitespace-nowrap",children:[n+1," of ",r]}):null,e]}),r>1&&x.jsx("div",{className:"absolute bottom-0 left-0 right-0 h-0.5 bg-border",children:x.jsx("div",{className:"h-full bg-muted-foreground/40 transition-all duration-300",style:{width:`${n/r*100}%`}})})]}),o]})}function o1({label:e,description:n}){return x.jsxs(x.Fragment,{children:[x.jsx("span",{className:"text-foreground text-sm",children:e}),n&&x.jsx("p",{className:"text-xs text-muted-foreground mt-0.5",children:n})]})}function l2({selected:e,multiSelect:n,onClick:r}){return x.jsx("button",{type:"button",onClick:r,className:ye("flex-shrink-0 w-5 h-5 border-1 flex items-center justify-center",n?"rounded":"rounded-full",e?"border-slate-500/0 bg-foreground":"border-muted-foreground/50 bg-background",r&&e&&"cursor-pointer"),children:e&&x.jsx(sl,{strokeWidth:3,className:"translate-y-[0.5px] h-3 w-3 text-white dark:text-background"})})}function $P({option:e,selected:n,multiSelect:r,onClick:l,isLast:o}){const s="w-full text-left p-3 pt-2.5 pl-4 pr-5 bg-background",c=o?"":"border-b border-border";return l?x.jsx("button",{onClick:l,className:ye(s,c,"transition-all cursor-pointer"),children:x.jsxs("div",{className:"flex items-center justify-between gap-3",children:[x.jsx("div",{className:"flex-1 min-w-0",children:x.jsx(o1,{label:e.label,description:e.description})}),x.jsx(l2,{selected:n,multiSelect:r})]})}):x.jsx("div",{className:ye(s,c),children:x.jsx(o1,{label:e.label,description:e.description})})}function YP(e){return e==null?void 0:e.answers}function er(e){return e.id||e.question}function XP({message:e,onSubmit:n,isLatest:r}){var B,X;const l=e.input.questions,o=!!e.result,s=YP(e.result),c=((B=e.result)==null?void 0:B.discarded)===!0,[f,d]=v.useState(0),[h,g]=v.useState({}),[p,b]=v.useState({}),[w,E]=v.useState(s??null),[C,k]=v.useState(o),N=($,Q)=>{var Z;const T=(Z=p[$])==null?void 0:Z.trim(),O=h[$]||"",D=Q||l.find(fe=>er(fe)===$);if(D!=null&&D.multiSelect)return[O,T].filter(Boolean).flatMap(fe=>fe.split(", ").filter(Boolean));const A=T||O;return A?[A]:[]},j=$=>{const Q=h[er($)]||"";return $.multiSelect?Q.split(", ").filter(Boolean):[Q]},M=($,Q)=>{const T=er($);if($.multiSelect){const O=h[T]?h[T].split(", ").filter(Boolean):[],D=O.includes(Q)?O.filter(A=>A!==Q):[...O,Q];g({...h,[T]:D.join(", ")})}else g({...h,[T]:Q}),b({...p,[T]:""}),f<l.length-1&&setTimeout(()=>d(f+1),150)},z=($,Q)=>{const T=er($);b({...p,[T]:Q}),Q&&!$.multiSelect&&g({...h,[T]:""})},U=$=>{const Q=er($);$.multiSelect&&p[Q]&&b({...p,[Q]:""})},_=l.every($=>N(er($),$).length>0),P=l[f],F=f===l.length-1,ne=P&&N(er(P),P).length>0,I=()=>{f<l.length-1&&d(f+1)},J=()=>{f>0&&d(f-1)},te=()=>{if(!_)return;const $={};for(const Q of l){const T=er(Q);$[T]=N(T,Q)}E($),k(!0),n(e.toolId,l,$)},ce=$=>{if($.key==="Enter"&&!(!P||!ne)){if($.preventDefault(),F){te();return}I()}};if(C||o){const $=s||w||{};return x.jsx("div",{className:"w-full",children:x.jsxs("div",{className:"rounded-2xl border border-border overflow-hidden",children:[x.jsxs("div",{className:"font-medium text-sm p-3 px-4 pr-5 bg-muted border-b border-border flex flex-row items-center justify-between",children:[x.jsxs("p",{children:["Question",l.length!==1?"s":""]}),x.jsx("p",{className:"",children:c?"Discarded":"Answers"})]}),l.map((Q,T)=>{const O=$[er(Q)]||$[Q.question]||[],D=T===l.length-1;return x.jsxs("div",{className:ye("w-full p-3 pt-2.5 pl-4 pr-5 bg-background flex items-center justify-between gap-3",!D&&"border-b border-border"),children:[x.jsx("span",{className:"text-sm",children:Q.question}),O.length>0&&x.jsx("span",{className:"text-sm font-medium text-right",children:O.join(", ")}),O.length===0&&x.jsx("span",{className:"text-sm font-medium text-right italic",children:c?"Discarded":"No Response"})]},er(Q))})]})})}if(!r)return x.jsx("div",{className:"w-full py-2",children:x.jsxs("div",{className:"flex items-center gap-2",children:[x.jsx(jw,{className:"h-4 w-4 text-muted-foreground"}),x.jsx("span",{className:"text-sm text-muted-foreground",children:"Questions pending (newer question active)"})]})});if(!P)return null;const le=j(P),ee=p[er(P)]||"";return x.jsxs("div",{className:"w-full space-y-3",children:[x.jsxs(VP,{question:P.question,currentIndex:f,totalQuestions:l.length,onBack:f>0?J:void 0,children:[(X=P.options)==null?void 0:X.map($=>x.jsx($P,{option:$,selected:le.includes($.label),multiSelect:P.multiSelect,onClick:()=>M(P,$.label)},$.label)),x.jsx("div",{className:"transition-all bg-background",children:x.jsxs("div",{className:"flex pr-5 items-center justify-between gap-3",children:[x.jsx("input",{type:"text",value:ee,onChange:$=>z(P,$.target.value),onKeyDown:ce,placeholder:"Other...",className:"flex-1 px-3 !py-1 pl-4 min-h-[55px] min-w-0 text-sm bg-transparent outline-none text-foreground placeholder:text-muted-foreground"}),x.jsx(l2,{selected:!!ee,multiSelect:P.multiSelect,onClick:P.multiSelect&&ee?()=>U(P):void 0})]})})]}),x.jsxs("div",{className:"flex justify-end gap-2 mx-2",children:[!F&&ne&&(P.multiSelect||!!ee)&&x.jsx($e,{size:"sm",onClick:I,children:"Next"}),F&&x.jsx($e,{size:"sm",onClick:te,disabled:!_,className:ye(!_&&"opacity-50 cursor-not-allowed","rounded-full"),children:"Submit"})]})]})}function KP({message:e,onConfirm:n,isLatest:r}){const l=!!e.result,[o,s]=v.useState(!1),[c,f]=v.useState(!1),[d,h]=v.useState(!1),[g,p]=v.useState(""),b=v.useRef(null),w=e.input;v.useEffect(()=>{d&&b.current&&b.current.focus()},[d]);const E=async()=>{w!=null&&w.plan&&(await navigator.clipboard.writeText(w.plan),f(!0),setTimeout(()=>f(!1),2e3))},C=l?e.result:null,k=(C==null?void 0:C.discarded)===!0;return x.jsxs("div",{className:"flex flex-col gap-3",children:[x.jsxs("div",{className:"relative rounded-2xl border border-border overflow-hidden group/plan",children:[(w==null?void 0:w.plan)&&x.jsx($e,{variant:"ghost",size:"icon",className:ye("absolute top-2 right-2 z-10 h-8 w-8 rounded-md text-muted-foreground opacity-0 group-hover/plan:opacity-100 transition-opacity",!c&&"hover:text-foreground",c&&"hover:!bg-transparent hover:!border-transparent"),onClick:E,children:c?x.jsx(sl,{className:"h-4 w-4 text-green-400"}):x.jsx(Rc,{className:"h-4 w-4"})}),x.jsxs("div",{className:ye("!pt-5 !pb-0 px-4 md:py-4.5 md:px-5.5 bg-muted dark:bg-card overflow-scroll no-pre-highlight transition-all",l&&!o?"max-h-[min(400px,40vh)] ":"",l?"hover:!pb-[32px]":""),children:[l&&x.jsxs($e,{variant:"ghost",className:"absolute z-10 bottom-2 pr-2.5 !pl-3.5 h-[34px] inline-flex gap-1 text-sm left-[50%] -translate-x-[50%] text-muted-foreground backdrop-blur-sm hover:text-foreground opacity-0 group-hover/plan:opacity-100 transition-all rounded-full border border-border",onClick:()=>s(!o),children:[o?"Show Less":"Show More",x.jsx(oj,{className:`size-3.5 transition-transform ${o?"rotate-180":""}`})]}),w!=null&&w.plan?x.jsxs("div",{className:"prose prose-sm dark:prose-invert max-w-none",children:[x.jsx(Zc,{remarkPlugins:[Wc],components:fz,children:w.plan}),x.jsx("div",{className:"mt-5"})]}):x.jsx("p",{className:"text-sm text-muted-foreground",children:"No plan provided"})]})]}),l?x.jsx("div",{className:"flex justify-end mx-2",children:x.jsxs("span",{className:"pl-4 inline text-sm font-medium bg-background text-foreground/60 border border-border py-1.5 px-3 rounded-[20px] leading-relaxed max-w-[85%] sm:max-w-[80%]",children:[x.jsx("em",{children:k?"Discarded":C!=null&&C.clearContext?"Approved & Cleared Context":C!=null&&C.confirmed?"Approved":C!=null&&C.message?`Adjusted: "${C.message}"`:"Adjusted Plan"}),x.jsx(bj,{className:"inline h-4 w-4 ml-1.5 -mt-0.5"})]})}):r?x.jsxs("div",{className:"flex flex-col gap-3",children:[!d&&x.jsxs("div",{className:"flex flex-col md:flex-row items-stretch md:items-center justify-end gap-2 mx-2",children:[x.jsxs($e,{size:"sm",onClick:()=>n(e.toolId,!0,!0),className:"rounded-full bg-primary text-background pr-4 md:order-last",children:[x.jsx(nj,{className:"h-4 w-4 mr-1.5"}),"Approve & Clear"]}),x.jsxs("div",{className:"flex items-stretch md:items-center gap-2 md:contents",children:[x.jsxs($e,{size:"sm",variant:"outline",onClick:()=>h(!0),className:"rounded-full border-border flex-1 md:flex-initial md:order-first",children:[x.jsx(Dw,{className:"h-4 w-4 mr-1.5"}),"Suggest Edits"]}),x.jsxs($e,{size:"sm",variant:"outline",onClick:()=>n(e.toolId,!0),className:"rounded-full border-border flex-1 md:flex-initial",children:[x.jsx(sl,{className:"h-4 w-4 mr-1.5"}),"Approve"]})]})]}),d&&x.jsxs("div",{className:"flex flex-col gap-2",children:[x.jsx("textarea",{ref:b,value:g,onChange:N=>p(N.target.value),onKeyDown:N=>{N.key==="Enter"&&!N.shiftKey&&g.trim()&&(N.preventDefault(),n(e.toolId,!1,void 0,g.trim())),N.key==="Escape"&&(h(!1),p(""))},placeholder:"Describe what you'd like to change...",rows:3,className:"w-full rounded-2xl border border-border bg-muted dark:bg-card px-4 py-3 text-sm text-foreground placeholder:text-muted-foreground resize-none outline-none"}),x.jsxs("div",{className:"flex items-center justify-end gap-2 mx-2",children:[x.jsx($e,{size:"sm",variant:"ghost",onClick:()=>{h(!1),p("")},className:"rounded-full text-muted-foreground",children:"Cancel"}),x.jsxs($e,{size:"sm",disabled:!g.trim(),onClick:()=>n(e.toolId,!1,void 0,g.trim()),className:"rounded-full bg-primary text-background disabled:opacity-50 disabled:pointer-events-none",children:[x.jsx(Kj,{className:"h-4 w-4 mr-1.5"}),"Adjust Plan"]})]})]})]}):x.jsx("div",{className:"flex justify-end mx-2",children:x.jsx("span",{className:"inline text-sm text-muted-foreground italic",children:"Plan pending (newer prompt active)"})})]})}const QP={completed:{Icon:sl,iconClass:"text-emerald-500",textClass:"text-muted-foreground"},in_progress:{Icon:Li,iconClass:"text-foreground animate-spin",textClass:"text-foreground font-medium"},pending:{Icon:mj,iconClass:"text-muted-foreground",textClass:"text-muted-foreground"}};function ZP({message:e}){const n=e.input.todos;return n.length?x.jsx("div",{className:"w-full",children:x.jsxs("div",{className:"rounded-2xl border border-border overflow-hidden",children:[x.jsxs("h3",{className:"font-medium text-foreground text-sm p-3 px-4 bg-card border-b border-border flex items-center gap-2",children:[x.jsx(zj,{className:"h-4 w-4 text-muted-foreground"}),"Progress"]}),x.jsx("div",{children:n.map((r,l)=>{const o=l===n.length-1,{Icon:s,iconClass:c,textClass:f}=QP[r.status];return x.jsxs("div",{className:ye("flex items-center gap-3 px-4 py-2.5 bg-background",!o&&"border-b border-border"),children:[x.jsx(s,{className:ye("h-4 w-4 flex-shrink-0",c)}),x.jsx("span",{className:ye("text-sm",f),children:r.status==="in_progress"?r.activeForm:r.content})]},l)})})]})}):null}function em(e,n){if(!e)return"";if(n){const r=n.endsWith("/")?n:`${n}/`;if(e.startsWith(r))return e.slice(r.length);if(e===n)return""}return e.replace(/^\/home\/user\/workspace\//,"")}function WP(e){const n=e.split(`
417
+ `),r=/^\s*(\d+)→(.*)$/;return n.map(l=>{const o=l.match(r);return o?{lineNumber:parseInt(o[1],10),content:o[2]}:{lineNumber:null,content:l}})}function JP(e){return e.replace(/<[^>]+>/g,"")}function eB(e,n){const r=e.split(`
418
+ `),l=n.split(`
419
+ `),o=tB(r,l),s=nB(r,l,o);return rB(s)}function tB(e,n){const r=e.length,l=n.length,o=Array.from({length:r+1},()=>Array(l+1).fill(0));for(let s=1;s<=r;s++)for(let c=1;c<=l;c++)o[s][c]=e[s-1]===n[c-1]?o[s-1][c-1]+1:Math.max(o[s-1][c],o[s][c-1]);return o}function nB(e,n,r){const l=[];let o=e.length,s=n.length;for(;o>0||s>0;)o>0&&s>0&&e[o-1]===n[s-1]?(l.push({type:"context",text:e[o-1],oldIdx:o,newIdx:s}),o--,s--):s>0&&(o===0||r[o][s-1]>=r[o-1][s])?(l.push({type:"added",text:n[s-1],oldIdx:o,newIdx:s}),s--):(l.push({type:"removed",text:e[o-1],oldIdx:o,newIdx:s}),o--);return l.reverse()}function rB(e){return e.map(n=>{const r=n.type==="removed"?"-":n.type==="added"?"+":" ";return{type:n.type,content:`${r}${n.text}`}})}function tm({content:e,isDiff:n=!1,oldString:r,newString:l}){const o=v.useMemo(()=>n&&r!==void 0&&l!==void 0?eB(r,l):[],[n,r,l]),s=v.useMemo(()=>n?[]:WP(e),[e,n]),c=v.useMemo(()=>s.some(f=>f.lineNumber!==null),[s]);return n&&o.length>0?x.jsx("div",{className:"my-1 rounded-lg border border-border overflow-hidden",children:x.jsx("div",{className:"overflow-auto max-h-64 md:max-h-[50vh]",children:x.jsx("table",{className:"w-full border-collapse text-xs font-mono",children:x.jsx("tbody",{children:o.map((f,d)=>{const h=f.type==="removed"?"bg-red-500/10 dark:bg-red-500/15":f.type==="added"?"bg-green-500/10 dark:bg-green-500/15":"",g=f.type==="removed"?"text-red-700 dark:text-red-400":f.type==="added"?"text-green-700 dark:text-green-400":"text-foreground";return x.jsxs("tr",{className:h,children:[x.jsx("td",{className:`px-2 py-0 select-none w-0 whitespace-nowrap ${f.type==="removed"?"text-red-500/50":f.type==="added"?"text-green-500/50":"text-muted-foreground/50"}`,children:f.type==="removed"?"-":f.type==="added"?"+":" "}),x.jsx("td",{className:`px-2 py-0 whitespace-pre select-all ${g}`,children:f.content.slice(1)})]},d)})})})})}):x.jsx("div",{className:"my-1 rounded-lg border border-border overflow-hidden",children:x.jsx("div",{className:"overflow-auto max-h-64 md:max-h-[50vh]",children:x.jsx("table",{className:"w-full border-collapse text-xs font-mono",children:x.jsx("tbody",{children:s.map((f,d)=>x.jsxs("tr",{children:[c&&x.jsx("td",{className:"px-2 py-0 select-none w-0 whitespace-nowrap text-muted-foreground/50 text-right",children:f.lineNumber!==null?f.lineNumber:""}),x.jsx("td",{className:"px-2 py-0 whitespace-pre select-all text-foreground",children:JP(f.content)})]},d))})})})})}function a2({message:e,isLoading:n=!1,localPath:r}){var E;const l=e.result!==void 0,o=!l&&n,s=v.useMemo(()=>{if(e.toolKind==="skill")return e.input.skill;if(e.toolKind==="glob")return`Search files ${e.input.pattern==="**/*"?"in all directories":`matching ${e.input.pattern}`}`;if(e.toolKind==="grep"){const C=e.input.pattern,k=e.input.outputMode;return k==="count"?`Count \`${C}\` occurrences`:k==="content"?`Find \`${C}\` in text`:`Find \`${C}\` in files`}return e.toolKind==="bash"?e.input.description||(e.input.command?i4(e.input.command):"Bash"):e.toolKind==="web_search"?e.input.query||"Web Search":e.toolKind==="read_file"?`Read ${em(e.input.filePath,r)}`:e.toolKind==="write_file"?`Write ${em(e.input.filePath,r)}`:e.toolKind==="edit_file"?`Edit ${em(e.input.filePath,r)}`:e.toolKind==="mcp_generic"?`${pm(e.input.tool)} from ${pm(e.input.server)}`:e.toolKind==="subagent_task"&&e.input.subagentType||e.toolName},[e.input,e.toolName,r]),c=v.useMemo(()=>e.toolKind==="subagent_task",[e.toolKind]),f=v.useMemo(()=>{if(e.toolKind==="skill")return e.input.skill},[e.input,e.toolKind]),d=e.toolKind==="bash",h=e.toolKind==="write_file",g=e.toolKind==="edit_file",p=e.toolKind==="read_file",b=v.useMemo(()=>{if(typeof e.result=="string")return e.result;if(!e.result)return"";if(typeof e.result=="object"&&e.result!==null&&"content"in e.result){const C=e.result.content;if(typeof C=="string")return C}return JSON.stringify(e.result,null,2)},[e.result]),w=v.useMemo(()=>{switch(e.toolKind){case"bash":return e.input.command;case"write_file":return e.input.content;default:return JSON.stringify(e.input,null,2)}},[e]);return x.jsx(Bi,{className:"w-full",children:x.jsxs(qc,{expandedContent:x.jsx(Gc,{className:"my-4 text-sm",children:x.jsxs("div",{className:"flex flex-col gap-2",children:[g?x.jsx(tm,{content:"",isDiff:!0,oldString:e.input.oldString,newString:e.input.newString}):!p&&!h&&x.jsx(g0,{label:d?x.jsxs("span",{className:"flex items-center gap-2 w-full",children:[x.jsx("span",{children:"Command"}),!!e.input.timeoutMs&&x.jsxs("span",{className:"text-muted-foreground",children:["timeout: ",String(e.input.timeoutMs),"ms"]}),!!e.input.runInBackground&&x.jsx("span",{className:"text-muted-foreground",children:"background"})]}):h?"Contents":"Input",copyText:w,children:w}),l&&p&&!e.isError&&x.jsx(tm,{content:b}),h&&!e.isError&&x.jsx(tm,{content:e.input.content}),l&&!p&&!(h&&!e.isError)&&!(g&&!e.isError)&&x.jsx(g0,{label:e.isError?"Error":"Result",copyText:b,children:b})]})}),children:[x.jsx("div",{className:"w-5 h-5 relative flex items-center justify-center",children:(()=>{if(e.isError)return x.jsx(Tc,{className:"size-4 text-destructive"});if(c)return x.jsx(rp,{className:"size-4 text-muted-icon"});const C=QC(e.toolName);return x.jsx(C,{className:"size-4 text-muted-icon"})})()}),x.jsx(Oi,{className:"text-left transition-opacity duration-200 truncate",children:x.jsx(Lc,{animate:o,shimmerWidth:Math.max(20,(((E=f||s)==null?void 0:E.length)??33)*3),children:f||s})})]})})}function iB({message:e}){const n=r=>{if(r<1e3)return`${r}ms`;const l=Math.floor(r/1e3),o=Math.floor(l/3600),s=Math.floor(l%3600/60),c=l%60;return o>0?`${o}h${s>0?` ${s}m`:""}`:s>0?`${s}m${c>0?` ${c}s`:""}`:`${c}s`};return x.jsxs(Bi,{className:`px-0.5 text-xs tracking-wide ${e.durationMs>6e4?"":"hidden"}`,children:[x.jsx("div",{className:"w-full h-[1px] bg-border"}),x.jsxs(Oi,{className:"whitespace-nowrap text-[11px] tracking-widest text-muted-foreground/60 uppercase flex-shrink-0",children:["Worked for ",n(e.durationMs)]}),x.jsx("div",{className:"w-full h-[1px] bg-border"})]})}function lB({message:e}){return x.jsx("div",{className:"flex items-center justify-end gap-2 text-sm text-muted-foreground my-3",children:x.jsxs("div",{className:"inline-flex gap-1.5 items-center justify-center whitespace-nowrap text-sm font-medium bg-background text-foreground/60 border border-border h-9 pl-1 pr-4 rounded-full",children:[x.jsx(dj,{className:"h-4 w-4 ml-1.5"}),x.jsx("em",{children:"Interrupted"})]})})}function xc({size:e=4}){return x.jsxs("svg",{className:"flex-1",viewBox:`0 0 100 ${e}`,preserveAspectRatio:"none",style:{height:`${e}px`},children:[x.jsx("pattern",{id:"zigzag",width:e,height:e,patternUnits:"userSpaceOnUse",children:x.jsx("path",{d:`M0 ${e} L${e/2} 0 L${e} ${e}`,fill:"none",stroke:"currentColor",strokeWidth:"0.5",className:"text-muted-foreground/30",style:{stroke:"currentColor"}})}),x.jsx("rect",{width:"100%",height:e,fill:"url(#zigzag)",className:"text-muted-foreground/30"})]})}function aB(){return x.jsxs("div",{className:"flex items-center gap-3",children:[x.jsx(xc,{}),x.jsx("span",{className:"text-[11px] tracking-widest text-muted-foreground uppercase flex-shrink-0",children:"Compacted"}),x.jsx(xc,{})]})}function oB(){return x.jsxs("div",{className:"flex items-center gap-3",children:[x.jsx(xc,{}),x.jsx("span",{className:"text-[11px] tracking-widest text-muted-foreground uppercase flex-shrink-0",children:"Context Cleared"}),x.jsx(xc,{})]})}function sB({message:e}){return x.jsx(Bi,{children:x.jsxs(qc,{expandedContent:x.jsx(Gc,{className:"my-4 text-xs",children:x.jsx("div",{className:"prose prose-sm dark:prose-invert max-w-none",children:x.jsx(Zc,{remarkPlugins:[Wc],components:Vc,children:e.summary})})}),children:[x.jsx("div",{className:"w-5 h-5 relative flex items-center justify-center",children:x.jsx(_w,{className:"h-4.5 w-4.5 text-muted-foreground"})}),x.jsx(Oi,{children:"Summarized"})]})})}const uB={compacting:"Compacting..."};function cB({message:e}){const n=uB[e.status]||e.status;return x.jsxs(Bi,{className:"grid grid-cols-[auto_1fr] items-center gap-1.5 text-sm animate-pulse",children:[x.jsx("div",{className:"w-5 h-5 relative flex items-center justify-center",children:x.jsx(_w,{className:"h-4.5 w-4.5 text-muted-foreground"})}),x.jsx(Oi,{className:"text-left transition-opacity duration-200 truncate",children:n})]})}const fB={read_file:{key:"read",singular:"read",plural:"reads"},edit_file:{key:"edit",singular:"edit",plural:"edits"},write_file:{key:"write",singular:"write",plural:"writes"},bash:{key:"bash",singular:"command",plural:"commands"},grep:{key:"grep",singular:"search",plural:"searches"},glob:{key:"glob",singular:"glob",plural:"globs"},subagent_task:{key:"task",singular:"agent",plural:"agents"},web_search:{key:"websearch",singular:"web search",plural:"web searches"},skill:{key:"skill",singular:"skill",plural:"skills"},todo_write:{key:"todo",singular:"todo update",plural:"todo updates"}},dB={key:"other",singular:"tool call",plural:"tool calls"};function hB(e){return fB[e]??dB}function mB(e){const n=new Map,r=[];for(const l of e){const o=l.toolKind,s=hB(o),c=n.get(s.key);c?c.count++:(n.set(s.key,{category:s,count:1}),r.push(s.key))}return r.map(l=>{const{category:o,count:s}=n.get(l);return`${s} ${s===1?o.singular:o.plural}`}).join(", ")}function pB({messages:e,isLoading:n,localPath:r}){const[l,o]=v.useState(!1),s=v.useMemo(()=>mB(e),[e]),f=e.some(d=>d.result===void 0)&&n;return x.jsx(Bi,{className:"w-full",children:x.jsxs("div",{className:"flex flex-col w-full",children:[x.jsx("button",{onClick:()=>o(!l),className:`group cursor-pointer grid grid-cols-[auto_1fr] items-center gap-1 text-sm ${!l&&!f?"hover:opacity-60 transition-opacity":""}`,children:x.jsxs("div",{className:"grid grid-cols-[auto_1fr] items-center gap-1.5",children:[x.jsx("div",{className:"w-5 h-5 relative flex items-center justify-center",children:x.jsx(Yr,{className:`h-4.5 w-4.5 text-muted-icon transition-all duration-200 ${l?"rotate-90":""}`})}),x.jsx(Oi,{className:"text-left",children:x.jsx(Lc,{animate:f,children:s})})]})}),l&&x.jsxs("div",{className:"my-4 flex flex-col gap-3",children:[e.map(d=>x.jsx(a2,{message:d,isLoading:n,localPath:r},d.id)),e.length>5&&x.jsx("button",{onClick:()=>o(!1),className:"cursor-pointer grid grid-cols-[auto_1fr] items-center gap-1 text-xs hover:opacity-80 transition-opacity",children:x.jsxs("div",{className:"grid grid-cols-[auto_1fr] items-center gap-1.5",children:[x.jsx("div",{className:"w-5 h-5 relative flex items-center justify-center",children:x.jsx(Yr,{className:"h-4.5 w-4.5 text-muted-icon -rotate-90"})}),x.jsx(Oi,{className:"text-left",children:"Collapse"})]})})]})]})})}const gB=new Set(["AskUserQuestion","ExitPlanMode","TodoWrite"]);function s1(e){if(e.kind!=="tool")return!1;const n=e.toolName;return!gB.has(n)}function yB(e){const n=[];let r=0;for(;r<e.length;){const l=e[r];if(s1(l)){const o=[l],s=r;for(r+=1;r<e.length&&s1(e[r]);)o.push(e[r]),r+=1;o.length>=2?n.push({type:"tool-group",messages:o,startIndex:s}):n.push({type:"single",message:l,index:s});continue}n.push({type:"single",message:l,index:r}),r+=1}return n}function xB({messages:e,isLoading:n,localPath:r,latestToolIds:l,onAskUserQuestionSubmit:o,onExitPlanModeConfirm:s}){const c=v.useMemo(()=>yB(e),[e]);function f(d,h){if(d.kind==="user_prompt")return x.jsx(LP,{content:d.content},d.id);switch(d.kind){case"unknown":return x.jsx(PP,{json:d.json},d.id);case"system_init":return e.findIndex(p=>p.kind==="system_init")===h?x.jsx(FP,{message:d,rawJson:d.debugRaw},d.id):null;case"account_info":return e.findIndex(p=>p.kind==="account_info")===h?x.jsx(qP,{message:d},d.id):null;case"assistant_text":return x.jsx(GP,{message:d},d.id);case"tool":return d.toolKind==="ask_user_question"?x.jsx(XP,{message:d,onSubmit:o,isLatest:d.id===l.AskUserQuestion},d.id):d.toolKind==="exit_plan_mode"?x.jsx(KP,{message:d,onConfirm:s,isLatest:d.id===l.ExitPlanMode},d.id):d.toolKind==="todo_write"?d.id!==l.TodoWrite?null:x.jsx(ZP,{message:d},d.id):x.jsx(a2,{message:d,isLoading:n,localPath:r},d.id);case"result":{const g=e[h+1],p=e[h-1];return(g==null?void 0:g.kind)==="context_cleared"||(p==null?void 0:p.kind)==="context_cleared"?null:x.jsx(iB,{message:d},d.id)}case"interrupted":return x.jsx(lB,{message:d},d.id);case"compact_boundary":return x.jsx(aB,{},d.id);case"context_cleared":return x.jsx(oB,{},d.id);case"compact_summary":return x.jsx(sB,{message:d},d.id);case"status":return h===e.length-1?x.jsx(cB,{message:d},d.id):null}}return x.jsx(x.Fragment,{children:c.map(d=>{if(d.type==="tool-group")return x.jsx("div",{className:"group relative",children:x.jsx(pB,{messages:d.messages,isLoading:n,localPath:r})},`group-${d.startIndex}`);const h=f(d.message,d.index);return h?x.jsx("div",{id:`msg-${d.message.id}`,className:"group relative",children:h},d.message.id):null})})}function u1(){var n,r,l,o;const e=Fm();return x.jsx("div",{className:"flex-1 flex flex-col min-w-0 relative",children:x.jsxs($C,{className:"bg-background flex-1 flex flex-col overflow-hidden border-0 rounded-none relative",children:[x.jsxs(XC,{className:"flex-1 p-0 overflow-hidden relative",children:[x.jsx(sz,{sidebarCollapsed:e.sidebarCollapsed,onOpenSidebar:e.openSidebar,onExpandSidebar:e.expandSidebar,onNewChat:e.handleCompose,localPath:e.navbarLocalPath,onOpenExternal:s=>{e.handleOpenExternal(s)}}),x.jsx(WC,{ref:e.scrollRef,onScroll:e.updateScrollState,className:"h-full px-4 scroll-pt-[72px]",children:x.jsxs("div",{className:"animate-fade-in space-y-5 pt-[72px] max-w-[800px] mx-auto",style:{paddingBottom:e.transcriptPaddingBottom},children:[e.messages.length===0?x.jsxs("div",{className:"flex flex-col items-center justify-center min-h-[40vh] text-muted-foreground gap-4",children:[x.jsx(To,{strokeWidth:1.5,className:"size-8 text-muted-foreground"}),x.jsx("div",{className:"text-base font-normal text-muted-foreground text-center max-w-xs",children:"What are we making?"})]}):x.jsx(xB,{messages:e.messages,isLoading:e.isProcessing,localPath:(n=e.runtime)==null?void 0:n.localPath,latestToolIds:e.latestToolIds,onAskUserQuestionSubmit:e.handleAskUserQuestion,onExitPlanModeConfirm:e.handleExitPlanMode}),e.isProcessing?x.jsx(hz,{status:(r=e.runtime)==null?void 0:r.status}):null,e.commandError?x.jsx("div",{className:"text-sm text-destructive border border-destructive/20 bg-destructive/5 rounded-xl px-4 py-3",children:e.commandError}):null,x.jsx("div",{className:"flex-1 min-h-[10vh]","aria-hidden":"true"})]})}),x.jsx("div",{style:{bottom:e.transcriptPaddingBottom-36},className:ye("absolute left-1/2 -translate-x-1/2 z-10 transition-all",e.showScrollButton?"scale-100 duration-300 ease-[cubic-bezier(0.34,1.56,0.64,1)]":"scale-60 duration-300 ease-out pointer-events-none blur-sm opacity-0"),children:x.jsx("button",{onClick:e.scrollToBottom,className:"flex items-center transition-colors gap-1.5 px-2 bg-white hover:bg-muted border border-border rounded-full aspect-square cursor-pointer text-sm text-primary hover:text-foreground dark:bg-slate-700 dark:hover:bg-slate-600 dark:text-slate-100 dark:border-slate-600",children:x.jsx(YM,{className:"h-5 w-5"})})})]}),x.jsx("div",{className:"absolute bottom-0 left-0 right-0 z-20 pointer-events-none",children:x.jsx("div",{className:"bg-gradient-to-t from-background via-background pointer-events-auto",ref:e.inputRef,children:x.jsx(iz,{onSubmit:e.handleSend,onCancel:()=>{e.handleCancel()},disabled:!e.hasSelectedProject||((l=e.runtime)==null?void 0:l.status)==="waiting_for_user",canCancel:e.canCancel,chatId:e.activeChatId,activeProvider:((o=e.runtime)==null?void 0:o.provider)??null,availableProviders:e.availableProviders},e.activeChatId??"new-chat")})})]})})}function Pm({narrow:e=!1,title:n,subtitle:r,icon:l=Ow}){return x.jsxs("div",{className:ye("w-full",e?"max-w-2xl px-6 pt-16 mx-auto":"px-6 pt-16 mb-10"),children:[x.jsxs("div",{className:ye("flex items-center gap-1 mb-2",e&&"justify-center"),children:[x.jsx("div",{className:"p-2 pl-0 rounded-lg",children:x.jsx(l,{className:"h-6 w-6 text-muted-foreground"})}),x.jsx("h1",{className:"text-2xl font-semibold text-foreground",children:n})]}),r&&x.jsx("p",{className:ye("text-muted-foreground",e&&"mb-10 text-center"),children:r})]})}const vB={sm:"text-sm px-2.5 py-1",md:"text-sm px-3 py-1.5"};function bB({value:e,onValueChange:n,options:r,size:l="md",className:o,optionClassName:s}){return x.jsx("div",{className:ye("inline-flex items-center rounded-full border border-border p-0.5 ",o),children:r.map(c=>{const f=c.value===e,d=c.icon,h=d?v.isValidElement(d)?d:(()=>{const p=d;return x.jsx(p,{className:l==="sm"?"h-3.5 w-3.5":"h-4 w-4"})})():null,g=x.jsxs("button",{type:"button",onClick:()=>n(c.value),disabled:c.disabled,"aria-pressed":f,className:ye("rounded-full border transition-colors",d?"grid grid-cols-[auto_auto] items-center gap-2":"inline-flex items-center gap-1.5",vB[l],f?"bg-white dark:bg-muted text-slate-900 dark:text-slate-200 border-slate-300 dark:border-white/10 bg-slate-200 ":"border-transparent text-slate-800 hover:text-slate-900 dark:text-muted-foreground dark:hover:text-foreground",c.disabled&&"opacity-50 pointer-events-none",s),children:[h,x.jsx("span",{children:c.label})]},c.value);return c.tooltip?x.jsxs(lc,{children:[x.jsx(ac,{asChild:!0,children:g}),x.jsx(Io,{children:c.tooltip})]},c.value):g})})}function wB(e){return e.toLowerCase().replace(/[\s_]+/g,"-").replace(/[^a-z0-9-]/g,"").replace(/-+/g,"-").replace(/^-|-$/g,"")}function SB({open:e,onOpenChange:n,onConfirm:r}){const[l,o]=v.useState("new"),[s,c]=v.useState(""),[f,d]=v.useState(""),h=v.useRef(null),g=v.useRef(null);v.useEffect(()=>{e&&(o("new"),c(""),d(""),setTimeout(()=>{var k;return(k=h.current)==null?void 0:k.focus()},0))},[e]),v.useEffect(()=>{e&&setTimeout(()=>{var k,N;l==="new"?(k=h.current)==null||k.focus():(N=g.current)==null||N.focus()},0)},[l,e]);const p=wB(s),b=p?`${n4}/${p}`:"",w=f.trim(),E=l==="new"?!!p:!!w,C=()=>{if(E){if(l==="new")r({mode:"new",localPath:b,title:s.trim()});else{const k=w.split("/").pop()||w;r({mode:"existing",localPath:w,title:k})}n(!1)}};return x.jsx(Pw,{open:e,onOpenChange:n,children:x.jsxs(ip,{size:"sm",children:[x.jsxs(Uw,{className:"space-y-4",children:[x.jsx(Iw,{children:"Add Project"}),x.jsx(bB,{value:l,onValueChange:o,options:[{value:"new",label:"New Folder"},{value:"existing",label:"Existing Path"}],className:"w-full",optionClassName:"flex-1 justify-center"}),l==="new"?x.jsxs("div",{className:"space-y-2",children:[x.jsx("input",{ref:h,type:"text",value:s,onChange:k=>c(k.target.value),onKeyDown:k=>{k.key==="Enter"&&C(),k.key==="Escape"&&n(!1)},className:"w-full px-3 py-2 text-sm border border-border rounded-md bg-background outline-none",placeholder:"Project name"}),b&&x.jsx("p",{className:"text-xs text-muted-foreground font-mono",children:b})]}):x.jsxs("div",{className:"space-y-2",children:[x.jsx("input",{ref:g,type:"text",value:f,onChange:k=>d(k.target.value),onKeyDown:k=>{k.key==="Enter"&&C(),k.key==="Escape"&&n(!1)},className:"w-full px-3 py-2 text-sm border border-border rounded-md bg-background outline-none",placeholder:"~/Projects/my-app"}),x.jsx("p",{className:"text-xs text-muted-foreground",children:"The folder will be created if it doesn't exist."})]})]}),x.jsxs(Hw,{children:[x.jsx($e,{variant:"ghost",size:"sm",onClick:()=>n(!1),children:"Cancel"}),x.jsx($e,{variant:"secondary",size:"sm",onClick:C,disabled:!E,children:"Create"})]})]})})}function CB({text:e}){const[n,r]=v.useState(!1);async function l(){await navigator.clipboard.writeText(e),r(!0),setTimeout(()=>r(!1),2e3)}return x.jsx($e,{variant:"ghost",size:"icon",className:"h-8 w-8 text-muted-foreground hover:text-foreground",onClick:()=>void l(),children:n?x.jsx(sl,{className:"h-4 w-4 text-green-400"}):x.jsx(Rc,{className:"h-4 w-4"})})}function c1({children:e}){return x.jsxs("div",{className:"grid grid-cols-[1fr_auto] items-center group bg-background border border-border text-foreground rounded-xl p-1.5 pl-3 font-mono text-sm",children:[x.jsxs("pre",{className:"inline-flex items-center gap-2 overflow-x-auto",children:[x.jsx(Yr,{className:"inline h-4 w-4 opacity-40"}),x.jsx("code",{children:e})]}),x.jsx(CB,{text:e})]})}function Uu({children:e}){return x.jsx("div",{className:"bg-card border border-border rounded-2xl p-4",children:e})}function nm({children:e}){return x.jsx("h2",{className:"text-[13px] font-medium text-muted-foreground uppercase tracking-wider mb-3",children:e})}function rm({icon:e,title:n,subtitle:r,iconClassName:l}){return x.jsxs("div",{className:"flex flex-col items-center gap-0",children:[x.jsx("div",{className:"p-3 mb-2 rounded-xl bg-background border border-border",children:x.jsx(e,{className:l||"h-8 w-8 text-muted-foreground"})}),x.jsx("span",{className:"text-sm font-medium",children:n}),x.jsx("span",{className:"text-xs text-muted-foreground",children:r})]})}function f1(){return x.jsx(KM,{className:"h-4 w-4 text-muted-foreground"})}function d1({number:e,title:n,children:r}){return x.jsx("div",{className:"flex gap-4",children:x.jsxs("div",{className:"flex-1 min-w-0",children:[x.jsxs("div",{className:"grid grid-cols-[auto_1fr] items-baseline gap-3",children:[x.jsxs("div",{className:"flex-shrink-0 flex items-center justify-center font-medium text-logo",children:[e,"."]}),x.jsx("h3",{className:"font-medium text-foreground mb-2",children:n})]}),x.jsx("div",{className:"text-muted-foreground text-sm space-y-3",children:r})]})})}function EB({localPath:e,loading:n,onClick:r}){return x.jsxs(lc,{children:[x.jsx(ac,{asChild:!0,children:x.jsxs("button",{className:ye("border border-border hover:border-primary/30 group rounded-lg bg-card px-4 py-3 flex items-center gap-3 w-full text-left hover:bg-muted/50 transition-colors",n&&"opacity-50 cursor-not-allowed"),disabled:n,onClick:r,children:[x.jsx(Mj,{className:"h-4 w-4 text-muted-foreground flex-shrink-0"}),x.jsx("span",{className:"font-medium text-foreground truncate flex-1",children:wS(e)}),n?x.jsx(Li,{className:"h-4 w-4 text-muted-foreground group-hover:text-primary animate-spin flex-shrink-0"}):x.jsx(tp,{className:"h-4 w-4 text-muted-foreground opacity-0 group-hover:opacity-100 transition-opacity flex-shrink-0"})]})}),x.jsx(Io,{children:x.jsx("p",{children:e})})]})}function kB({connectionStatus:e,ready:n,snapshot:r,startingLocalPath:l,commandError:o,onOpenProject:s,onCreateProject:c}){const[f,d]=v.useState(!1),h=v.useMemo(()=>(r==null?void 0:r.projects)??[],[r==null?void 0:r.projects]),g=e==="connecting"||!n,p=e==="connected"&&n;return x.jsxs("div",{className:"flex-1 flex flex-col min-w-0 bg-background overflow-y-auto",children:[p?x.jsxs(x.Fragment,{children:[x.jsx(Pm,{title:(r==null?void 0:r.machine.displayName)??"Local Projects",subtitle:`${Zt} is connected, choose a project below to get started.`}),x.jsxs("div",{className:"w-full px-6 mb-10",children:[x.jsxs("div",{className:"flex items-baseline justify-between mb-3",children:[x.jsx("h2",{className:"text-[13px] font-medium text-muted-foreground uppercase tracking-wider",children:"Projects"}),x.jsxs($e,{variant:"default",size:"sm",onClick:()=>d(!0),children:[x.jsx(zw,{className:"h-4 w-4 mr-1.5"}),"Add Project"]})]}),h.length>0?x.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4 2xl:grid-cols-4 3xl:grid-cols-5 gap-2",children:h.map(b=>x.jsx(EB,{localPath:b.localPath,loading:l===b.localPath,onClick:()=>{s(b.localPath)}},b.localPath))}):x.jsx(Uu,{children:x.jsx("p",{className:"text-sm text-muted-foreground",children:"No local projects discovered yet. Open one with Claude or Codex, or create a new project here."})}),o?x.jsx("div",{className:"text-sm text-destructive border border-destructive/20 bg-destructive/5 rounded-xl px-4 py-3 mt-4",children:o}):null]})]}):x.jsxs(x.Fragment,{children:[x.jsx(Pm,{narrow:!0,icon:zb,title:g?`Connecting ${Zt}`:`Connect ${Zt}`,subtitle:g?`${Zt} is starting up and loading your local projects.`:`Run ${Zt} directly on your machine with full access to your local files and agent project history.`}),x.jsxs("div",{className:"max-w-2xl w-full mx-auto pb-12 px-6",children:[x.jsx(nm,{children:"Status"}),x.jsx("div",{className:"mb-8",children:x.jsx(Uu,{children:x.jsxs("div",{className:"flex items-center gap-3",children:[x.jsx(Li,{className:"h-4 w-4 text-muted-foreground animate-spin"}),x.jsx("span",{className:"text-sm text-muted-foreground",children:g?`Connecting to your local ${Zt} server...`:x.jsxs(x.Fragment,{children:["Not connected. Run ",x.jsx("code",{className:"bg-background border border-border rounded-md mx-0.5 p-1 font-mono text-xs text-foreground",children:_u()})," from any terminal on this machine."]})})]})})}),g?null:x.jsxs("div",{className:"mb-10",children:[x.jsx(nm,{children:"How it works"}),x.jsx(Uu,{children:x.jsxs("div",{className:"flex items-center justify-around gap-6 py-4 px-2",children:[x.jsx(rm,{icon:np,title:`${Zt} CLI`,subtitle:"On Your Machine"}),x.jsx(f1,{}),x.jsx(rm,{icon:Ow,title:`${Zt} Server`,subtitle:"Local WebSocket"}),x.jsx(f1,{}),x.jsx(rm,{icon:zb,title:`${Zt} UI`,subtitle:"Project Chat"})]})})]}),g?null:x.jsxs("div",{className:"mb-10",children:[x.jsx(nm,{children:"Setup"}),x.jsx(Uu,{children:x.jsxs("div",{className:"space-y-4",children:[x.jsxs(d1,{number:1,title:`Start ${Zt}`,children:[x.jsx("p",{children:"Run this command in your terminal:"}),x.jsx(c1,{children:_u()})]}),x.jsxs(d1,{number:2,title:"Open the local UI",children:[x.jsxs("p",{children:[Zt," serves the app locally and opens the Local Projects page in an app-style browser window."]}),x.jsx(c1,{children:"http://localhost:3210/local"})]}),x.jsxs("div",{className:"mt-8",children:[x.jsx("h3",{className:"text-sm font-medium text-muted-foreground uppercase tracking-wider mb-4",children:"Notes"}),x.jsxs("div",{className:"space-y-3 text-sm",children:[x.jsxs("div",{className:"flex gap-4",children:[x.jsx("code",{className:"font-mono text-foreground whitespace-nowrap",children:_u("").trim()}),x.jsx("span",{className:"text-muted-foreground",children:"Start in the current directory"})]}),x.jsxs("div",{className:"flex gap-4",children:[x.jsx("code",{className:"font-mono text-foreground whitespace-nowrap",children:_u("--no-open")}),x.jsx("span",{className:"text-muted-foreground",children:"Start the server without opening the browser"})]})]})]})]})})]})]})]}),x.jsx(SB,{open:f,onOpenChange:d,onConfirm:b=>{c(b)}}),x.jsx("div",{className:"py-4 text-center",children:x.jsxs("span",{className:"text-xs text-muted-foreground/50",children:["v",bS.split("/")[1]]})})]})}function NB(){const e=Fm();return x.jsx("div",{className:"flex-1 flex flex-col min-w-0 relative",children:x.jsx(kB,{connectionStatus:e.connectionStatus,ready:e.localProjectsReady,snapshot:e.localProjects,startingLocalPath:e.startingLocalPath,commandError:e.commandError,onOpenProject:e.handleOpenLocalProject,onCreateProject:e.handleCreateProject})})}function Hu({title:e,description:n,value:r}){return x.jsxs("div",{className:"rounded-2xl border border-border bg-card p-4",children:[x.jsx("div",{className:"mb-1 text-sm font-medium text-foreground",children:e}),x.jsx("div",{className:"mb-3 text-sm text-muted-foreground",children:n}),x.jsx("div",{className:"rounded-xl border border-border bg-background px-3 py-2 font-mono text-sm text-foreground",children:r})]})}function RB(){var l,o,s;const e=Fm(),n=e.connectionStatus==="connecting"||!e.localProjectsReady,r=((l=e.localProjects)==null?void 0:l.machine.displayName)??"Settings";return x.jsxs("div",{className:"flex-1 min-w-0 overflow-y-auto bg-background",children:[x.jsx(Pm,{icon:Lw,title:r,subtitle:n?"Kanna is starting up and loading your local environment settings.":"Kanna is connected. Configure app details and review your local environment."}),x.jsxs("div",{className:"w-full px-6 pb-10",children:[x.jsx("div",{className:"mb-3 flex items-baseline justify-between",children:x.jsx("h2",{className:"text-[13px] font-medium uppercase tracking-wider text-muted-foreground",children:"Settings"})}),n?x.jsxs("div",{className:"flex items-center gap-3 rounded-2xl border border-border bg-card px-4 py-4 text-sm text-muted-foreground",children:[x.jsx(Li,{className:"h-4 w-4 animate-spin"}),x.jsx("span",{children:"Loading machine settings…"})]}):x.jsxs("div",{className:"grid grid-cols-1 gap-3 lg:grid-cols-2",children:[x.jsx(Hu,{title:"Machine",description:"The local machine currently connected to Kanna.",value:((o=e.localProjects)==null?void 0:o.machine.displayName)??"Unavailable"}),x.jsx(Hu,{title:"Connection",description:"Current connection state for the local Kanna runtime.",value:e.connectionStatus}),x.jsx(Hu,{title:"Projects Indexed",description:"Number of local projects currently available in the app.",value:String(((s=e.localProjects)==null?void 0:s.projects.length)??0)}),x.jsx(Hu,{title:"App Version",description:"Current Kanna desktop client build.",value:bS.split("/")[1]??"unknown"})]}),e.commandError?x.jsxs("div",{className:"mt-4 flex items-start gap-3 rounded-2xl border border-destructive/20 bg-destructive/5 px-4 py-3 text-sm text-destructive",children:[x.jsx(Oj,{className:"mt-0.5 h-4 w-4 flex-shrink-0"}),x.jsx("span",{children:e.commandError})]}):null]})]})}function Fu(e){return!e||typeof e!="object"||Array.isArray(e)?null:e}function TB(e){if(typeof e!="string")return e;try{return JSON.parse(e)}catch{return e}}function AB(e,n){const r=TB(n);switch(e.toolKind){case"ask_user_question":{const o=Fu(r),s=Fu(o==null?void 0:o.answers)??(o||{});return{answers:Object.fromEntries(Object.entries(s).map(([c,f])=>Array.isArray(f)?[c,f.map(d=>String(d))]:f&&typeof f=="object"&&Array.isArray(f.answers)?[c,f.answers.map(d=>String(d))]:f==null||f===""?[c,[]]:[c,[String(f)]])),...(o==null?void 0:o.discarded)===!0?{discarded:!0}:{}}}case"exit_plan_mode":{const o=Fu(r);return{confirmed:typeof(o==null?void 0:o.confirmed)=="boolean"?o.confirmed:void 0,clearContext:typeof(o==null?void 0:o.clearContext)=="boolean"?o.clearContext:void 0,message:typeof(o==null?void 0:o.message)=="string"?o.message:void 0,...(o==null?void 0:o.discarded)===!0?{discarded:!0}:{}}}case"read_file":if(typeof r=="string")return r;const l=Fu(r);return{content:typeof(l==null?void 0:l.content)=="string"?l.content:JSON.stringify(r,null,2)};default:return r}}function o2(e){return new Date(e).toISOString()}function tr(e){return{id:e._id,messageId:e.messageId,timestamp:o2(e.createdAt),hidden:e.hidden}}function MB(e){return{id:e._id,messageId:e.messageId,hidden:e.hidden,kind:"tool",toolKind:e.tool.toolKind,toolName:e.tool.toolName,toolId:e.tool.toolId,input:e.tool.input,timestamp:o2(e.createdAt)}}function jB(e){if(e.debugRaw)try{return JSON.parse(e.debugRaw).tool_use_result}catch{return}}function _B(e){const n=new Map,r=[];for(const l of e)switch(l.kind){case"user_prompt":r.push({...tr(l),kind:"user_prompt",content:l.content});break;case"system_init":r.push({...tr(l),kind:"system_init",provider:l.provider,model:l.model,tools:l.tools,agents:l.agents,slashCommands:l.slashCommands,mcpServers:l.mcpServers,debugRaw:l.debugRaw});break;case"account_info":r.push({...tr(l),kind:"account_info",accountInfo:l.accountInfo});break;case"assistant_text":r.push({...tr(l),kind:"assistant_text",text:l.text});break;case"tool_call":{const o=MB(l);n.set(l.tool.toolId,{hydrated:o,normalized:l.tool}),r.push(o);break}case"tool_result":{const o=n.get(l.toolId);if(o){const s=o.normalized.toolKind==="ask_user_question"||o.normalized.toolKind==="exit_plan_mode"?jB(l)??l.content:l.content;o.hydrated.result=AB(o.normalized,s),o.hydrated.rawResult=s,o.hydrated.isError=l.isError}break}case"result":r.push({...tr(l),kind:"result",success:!l.isError,cancelled:l.subtype==="cancelled",result:l.result,durationMs:l.durationMs,costUsd:l.costUsd});break;case"status":r.push({...tr(l),kind:"status",status:l.status});break;case"compact_boundary":r.push({...tr(l),kind:"compact_boundary"});break;case"compact_summary":r.push({...tr(l),kind:"compact_summary",summary:l.summary});break;case"context_cleared":r.push({...tr(l),kind:"context_cleared"});break;case"interrupted":r.push({...tr(l),kind:"interrupted"});break;default:r.push({...tr(l),kind:"unknown",json:JSON.stringify(l,null,2)});break}return r}const OB=["AskUserQuestion","ExitPlanMode","TodoWrite"],DB=new Set(["TodoWrite"]);function zB(e,n){for(let r=e.length-1;r>=0;r-=1){const l=e[r];if(l.kind!=="tool")continue;const o=l;if(o.toolName===n&&!o.result)return o.id}return null}function LB(e,n){for(let r=e.length-1;r>=0;r-=1){const l=e[r];if(l.kind!=="tool")continue;const o=l;if(o.toolName===n)return o.id}return null}function PB(e){const n={};for(const r of OB)n[r]=DB.has(r)?LB(e,r):zB(e,r);return n}function BB(e){return e==="starting"||e==="running"||e==="waiting_for_user"}function IB(e){return e==="starting"||e==="running"||e==="waiting_for_user"}const UB=25e3,HB=15e3,FB=4e3;class qB{constructor(n){Tt(this,"url");Tt(this,"ws",null);Tt(this,"started",!1);Tt(this,"reconnectTimer",null);Tt(this,"reconnectDelayMs",750);Tt(this,"subscriptions",new Map);Tt(this,"pending",new Map);Tt(this,"outboundQueue",[]);Tt(this,"statusListeners",new Set);Tt(this,"heartbeatTimer",null);Tt(this,"pingTimeoutTimer",null);Tt(this,"pingPromise",null);Tt(this,"lastOpenAt",0);Tt(this,"lastMessageAt",0);Tt(this,"reconnectImmediatelyOnClose",!1);Tt(this,"handleWindowFocus",()=>{this.ensureHealthyConnection()});Tt(this,"handleVisibilityChange",()=>{if(document.visibilityState==="visible"){this.startHeartbeat(),this.ensureHealthyConnection();return}this.stopHeartbeat()});Tt(this,"handleOnline",()=>{this.ensureHealthyConnection()});this.url=n}start(){this.started||(this.started=!0,window.addEventListener("focus",this.handleWindowFocus),window.addEventListener("online",this.handleOnline),document.addEventListener("visibilitychange",this.handleVisibilityChange),this.connect())}dispose(){var n;this.started=!1,this.reconnectTimer&&(window.clearTimeout(this.reconnectTimer),this.reconnectTimer=null),this.stopHeartbeat(),this.clearPingState(),window.removeEventListener("focus",this.handleWindowFocus),window.removeEventListener("online",this.handleOnline),document.removeEventListener("visibilitychange",this.handleVisibilityChange),(n=this.ws)==null||n.close(),this.ws=null;for(const r of this.pending.values())r.reject(new Error("Socket disposed"));this.pending.clear()}onStatus(n){return this.statusListeners.add(n),n(this.getStatus()),()=>{this.statusListeners.delete(n)}}subscribe(n,r){const l=crypto.randomUUID();return this.subscriptions.set(l,{topic:n,listener:r}),this.enqueue({v:1,type:"subscribe",id:l,topic:n}),()=>{this.subscriptions.delete(l),this.enqueue({v:1,type:"unsubscribe",id:l})}}command(n){const r=crypto.randomUUID(),l={v:1,type:"command",id:r,command:n};return new Promise((o,s)=>{this.pending.set(r,{resolve:o,reject:s}),this.enqueue(l)})}ensureHealthyConnection(){return!this.ws||this.ws.readyState===WebSocket.CLOSED||this.ws.readyState===WebSocket.CLOSING?(this.reconnectNow(),Promise.resolve()):this.ws.readyState===WebSocket.CONNECTING||!this.isConnectionStale()?Promise.resolve():this.sendPing()}connect(){this.started&&(this.emitStatus("connecting"),this.ws=new WebSocket(this.url),this.ws.addEventListener("open",()=>{this.reconnectDelayMs=750,this.reconnectImmediatelyOnClose=!1,this.lastOpenAt=Date.now(),this.lastMessageAt=this.lastOpenAt,this.emitStatus("connected"),this.startHeartbeat();for(const[n,r]of this.subscriptions.entries())this.sendNow({v:1,type:"subscribe",id:n,topic:r.topic});for(;this.outboundQueue.length>0;){const n=this.outboundQueue.shift();n&&this.sendNow(n)}}),this.ws.addEventListener("message",n=>{this.lastMessageAt=Date.now();let r;try{r=JSON.parse(String(n.data))}catch{return}if(r.type==="snapshot"){const l=this.subscriptions.get(r.id);l==null||l.listener(r.snapshot.data);return}if(r.type==="ack"){const l=this.pending.get(r.id);if(!l)return;this.pending.delete(r.id),l.resolve(r.result);return}if(r.type==="error"){if(!r.id){console.error(t4,r.message);return}const l=this.pending.get(r.id);if(!l)return;this.pending.delete(r.id),l.reject(new Error(r.message))}}),this.ws.addEventListener("close",()=>{if(!this.started)return;const n=this.reconnectImmediatelyOnClose;this.reconnectImmediatelyOnClose=!1,this.stopHeartbeat(),this.clearPingState(),this.emitStatus("disconnected");for(const r of this.pending.values())r.reject(new Error("Disconnected"));if(this.pending.clear(),n){this.connect();return}this.scheduleReconnect()}))}scheduleReconnect(){this.reconnectTimer===null&&(this.reconnectTimer=window.setTimeout(()=>{this.reconnectTimer=null,this.connect(),this.reconnectDelayMs=Math.min(this.reconnectDelayMs*2,5e3)},this.reconnectDelayMs))}getStatus(){var n,r;return((n=this.ws)==null?void 0:n.readyState)===WebSocket.OPEN?"connected":((r=this.ws)==null?void 0:r.readyState)===WebSocket.CONNECTING?"connecting":"disconnected"}emitStatus(n){for(const r of this.statusListeners)r(n)}isConnectionStale(){const n=Math.max(this.lastMessageAt,this.lastOpenAt);return n>0&&Date.now()-n>=UB}sendPing(){if(this.pingPromise)return this.pingPromise;const n=this.command({type:"system.ping"}).then(()=>{this.clearPingState()}).catch(r=>{throw this.clearPingState(),this.reconnectNow(),r});return this.pingTimeoutTimer=window.setTimeout(()=>{this.clearPingState(),this.reconnectNow()},FB),this.pingPromise=n,n}reconnectNow(){if(this.reconnectTimer!==null&&(window.clearTimeout(this.reconnectTimer),this.reconnectTimer=null),!this.ws||this.ws.readyState===WebSocket.CLOSED){this.connect();return}this.ws.readyState!==WebSocket.CONNECTING&&(this.reconnectImmediatelyOnClose=!0,this.ws.close())}startHeartbeat(){document.visibilityState==="visible"&&this.heartbeatTimer===null&&(this.heartbeatTimer=window.setInterval(()=>{var n;if(document.visibilityState!=="visible"){this.stopHeartbeat();return}((n=this.ws)==null?void 0:n.readyState)===WebSocket.OPEN&&this.ensureHealthyConnection()},HB))}stopHeartbeat(){this.heartbeatTimer!==null&&(window.clearInterval(this.heartbeatTimer),this.heartbeatTimer=null)}clearPingState(){this.pingTimeoutTimer!==null&&(window.clearTimeout(this.pingTimeoutTimer),this.pingTimeoutTimer=null),this.pingPromise=null}enqueue(n){var r;if(((r=this.ws)==null?void 0:r.readyState)===WebSocket.OPEN){this.sendNow(n);return}this.outboundQueue.push(n)}sendNow(n){var r;(r=this.ws)==null||r.send(JSON.stringify(n))}}function GB(){return`${window.location.protocol==="https:"?"wss:":"ws:"}//${window.location.host}/ws`}function VB(){const e=v.useRef(null);return e.current||(e.current=new qB(GB())),v.useEffect(()=>{const n=e.current;return n==null||n.start(),()=>{n==null||n.dispose()}},[]),e.current}function $B(e){var mt,Jr,ie;const n=Hm(),r=VB(),l=p_(),[o,s]=v.useState({projectGroups:[]}),[c,f]=v.useState(null),[d,h]=v.useState(null),[g,p]=v.useState("connecting"),[b,w]=v.useState(!1),[E,C]=v.useState(!1),[k,N]=v.useState(!1),[j,M]=v.useState(null),[z,U]=v.useState(!1),[_,P]=v.useState(!1),[F,ne]=v.useState(148),[I,J]=v.useState(!0),[te,ce]=v.useState(null),[le,ee]=v.useState(null),[B,X]=v.useState(null),$=v.useRef(null),Q=v.useRef(null);v.useEffect(()=>r.onStatus(p),[r]),v.useEffect(()=>r.subscribe({type:"sidebar"},Y=>{s(Y),w(!0),ce(null)}),[r]),v.useEffect(()=>r.subscribe({type:"local-projects"},Y=>{f(Y),C(!0),ce(null)}),[r]),v.useEffect(()=>{if(!e){h(null),N(!0);return}return N(!1),r.subscribe({type:"chat",chatId:e},Y=>{h(Y),N(!0),ce(null)})},[e,r]),v.useEffect(()=>{if(j)return;const Y=o.projectGroups[0];Y&&M(Y.groupKey)},[j,o.projectGroups]),v.useEffect(()=>{if(!e||!b||!k)return;if(o.projectGroups.some(se=>se.chats.some(pe=>pe.chatId===e))){B===e&&X(null);return}B!==e&&n("/")},[e,k,n,B,o.projectGroups,b]),v.useEffect(()=>{d&&(M(d.runtime.projectId),B===d.runtime.chatId&&X(null))},[d,B]),v.useLayoutEffect(()=>{const Y=Q.current;if(!Y)return;const se=new ResizeObserver(()=>{ne(Y.getBoundingClientRect().height)});return se.observe(Y),ne(Y.getBoundingClientRect().height),()=>se.disconnect()},[]);const T=v.useMemo(()=>_B((d==null?void 0:d.messages)??[]),[d==null?void 0:d.messages]),O=v.useMemo(()=>PB(T),[T]),D=(d==null?void 0:d.runtime)??null,A=(d==null?void 0:d.availableProviders)??z5,Z=IB(D==null?void 0:D.status),fe=BB(D==null?void 0:D.status),ue=F+48,me=!I&&T.length>0,Ne=((mt=c==null?void 0:c.projects[0])==null?void 0:mt.localPath)??null,he=(D==null?void 0:D.localPath)??Ne??((Jr=o.projectGroups[0])==null?void 0:Jr.localPath),Ce=!!(j??(D==null?void 0:D.projectId)??((ie=o.projectGroups[0])==null?void 0:ie.groupKey)??Ne);v.useEffect(()=>{const Y=$.current;if(!Y)return;Y.scrollHeight-Y.scrollTop-Y.clientHeight<120&&Y.scrollTo({top:Y.scrollHeight,behavior:"smooth"})},[e,T.length,D==null?void 0:D.status]);function lt(){const Y=$.current;if(!Y)return;const se=Y.scrollHeight-Y.scrollTop-Y.clientHeight;J(se<24)}function nt(){const Y=$.current;Y&&Y.scrollTo({top:Y.scrollHeight,behavior:"smooth"})}async function st(Y){try{const se=await r.command({type:"chat.create",projectId:Y});M(Y),X(se.chatId),n(`/chat/${se.chatId}`),U(!1)}catch(se){ce(se instanceof Error?se.message:String(se))}}async function Ye(Y){try{ee(Y);const se=await r.command({type:"project.open",localPath:Y});M(se.projectId);const pe=await r.command({type:"chat.create",projectId:se.projectId});X(pe.chatId),n(`/chat/${pe.chatId}`),U(!1),ce(null)}catch(se){ce(se instanceof Error?se.message:String(se))}finally{ee(null)}}async function Lt(Y){try{ee(Y.localPath);const se=await r.command(Y.mode==="new"?{type:"project.create",localPath:Y.localPath,title:Y.title}:{type:"project.open",localPath:Y.localPath});M(se.projectId);const pe=await r.command({type:"chat.create",projectId:se.projectId});X(pe.chatId),n(`/chat/${pe.chatId}`),U(!1),ce(null)}catch(se){ce(se instanceof Error?se.message:String(se))}finally{ee(null)}}async function Pt(Y,se){var pe;try{let we=j??((pe=o.projectGroups[0])==null?void 0:pe.groupKey)??null;if(!e&&!we&&Ne&&(we=(await r.command({type:"project.open",localPath:Ne})).projectId,M(we)),!e&&!we)throw new Error("Open a project first");const Oe=await r.command({type:"chat.send",chatId:e??void 0,projectId:e?void 0:we??void 0,provider:se==null?void 0:se.provider,content:Y,model:se==null?void 0:se.model,modelOptions:se==null?void 0:se.modelOptions,planMode:se==null?void 0:se.planMode});!e&&Oe.chatId&&(X(Oe.chatId),n(`/chat/${Oe.chatId}`)),ce(null)}catch(we){throw ce(we instanceof Error?we.message:String(we)),we}}async function Yn(){if(e)try{await r.command({type:"chat.cancel",chatId:e})}catch(Y){ce(Y instanceof Error?Y.message:String(Y))}}async function Xn(Y){if(await l.confirm({title:"Delete Chat",description:`Delete "${Y.title}"? This cannot be undone.`,confirmLabel:"Delete",confirmVariant:"destructive"}))try{await r.command({type:"chat.delete",chatId:Y.chatId}),Y.chatId===e&&n("/")}catch(pe){ce(pe instanceof Error?pe.message:String(pe))}}async function Bt(Y){const se=o.projectGroups.find(Oe=>Oe.groupKey===Y);if(!se)return;const pe=se.localPath.split("/").filter(Boolean).pop()??se.localPath;if(await l.confirm({title:"Remove",description:`Remove "${pe}" from the sidebar? Existing chats will be removed from ${Zt}.`,confirmLabel:"Remove",confirmVariant:"destructive"}))try{await r.command({type:"project.remove",projectId:Y}),(D==null?void 0:D.projectId)===Y&&n("/projects"),ce(null)}catch(Oe){ce(Oe instanceof Error?Oe.message:String(Oe))}}async function It(Y){var pe,we;const se=(D==null?void 0:D.localPath)??((pe=c==null?void 0:c.projects[0])==null?void 0:pe.localPath)??((we=o.projectGroups[0])==null?void 0:we.localPath);if(se)try{await r.command({type:"system.openExternal",action:Y,localPath:se})}catch(Oe){ce(Oe instanceof Error?Oe.message:String(Oe))}}function Tn(){var pe,we;const Y=j??((pe=o.projectGroups[0])==null?void 0:pe.groupKey);if(Y){st(Y);return}const se=(we=c==null?void 0:c.projects[0])==null?void 0:we.localPath;if(se){Ye(se);return}n("/projects")}async function sr(Y,se,pe){if(e)try{await r.command({type:"chat.respondTool",chatId:e,toolUseId:Y,result:{questions:se,answers:pe}})}catch(we){ce(we instanceof Error?we.message:String(we))}}async function Wr(Y,se,pe,we){if(e){se&&VC.getState().setPlanMode(!1);try{await r.command({type:"chat.respondTool",chatId:e,toolUseId:Y,result:{confirmed:se,...pe?{clearContext:!0}:{},...we?{message:we}:{}}})}catch(Oe){ce(Oe instanceof Error?Oe.message:String(Oe))}}}return{activeChatId:e,sidebarData:o,localProjects:c,chatSnapshot:d,connectionStatus:g,sidebarReady:b,localProjectsReady:E,commandError:te,startingLocalPath:le,sidebarOpen:z,sidebarCollapsed:_,scrollRef:$,inputRef:Q,messages:T,latestToolIds:O,runtime:D,availableProviders:A,isProcessing:Z,canCancel:fe,transcriptPaddingBottom:ue,showScrollButton:me,navbarLocalPath:he,hasSelectedProject:Ce,openSidebar:()=>U(!0),closeSidebar:()=>U(!1),collapseSidebar:()=>P(!0),expandSidebar:()=>P(!1),updateScrollState:lt,scrollToBottom:nt,handleCreateChat:st,handleOpenLocalProject:Ye,handleCreateProject:Lt,handleSend:Pt,handleCancel:Yn,handleDeleteChat:Xn,handleRemoveProject:Bt,handleOpenExternal:It,handleCompose:Tn,handleAskUserQuestion:sr,handleExitPlanMode:Wr}}function YB(){const e=Sr(),n=yR(),r=$B(n.chatId??null),l=e.pathname==="/projects"||e.pathname==="/settings";return x.jsxs("div",{className:"flex h-[100dvh] min-h-[100dvh] overflow-hidden",children:[x.jsx(D5,{data:r.sidebarData,activeChatId:r.activeChatId,connectionStatus:r.connectionStatus,ready:r.sidebarReady,open:r.sidebarOpen,collapsed:r.sidebarCollapsed,showMobileOpenButton:l,onOpen:r.openSidebar,onClose:r.closeSidebar,onCollapse:r.collapseSidebar,onExpand:r.expandSidebar,onCreateChat:o=>{r.handleCreateChat(o)},onDeleteChat:o=>{r.handleDeleteChat(o)},onRemoveProject:o=>{r.handleRemoveProject(o)}}),x.jsx(jR,{context:r})]})}function XB(){return x.jsx(W3,{children:x.jsx(m_,{children:x.jsx(OR,{children:x.jsxs(aa,{element:x.jsx(YB,{}),children:[x.jsx(aa,{path:"/",element:x.jsx(u1,{})}),x.jsx(aa,{path:"/projects",element:x.jsx(NB,{})}),x.jsx(aa,{path:"/settings",element:x.jsx(RB,{})}),x.jsx(aa,{path:"/chat/:chatId",element:x.jsx(u1,{})})]})})})})}const s2="lever-theme",KB=v.createContext(void 0),QB=e=>e==="light"||e==="dark"||e==="system",u2=()=>typeof window>"u"?"light":window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light",h1=e=>{if(typeof document>"u")return;const n=e==="system"?u2():e;document.documentElement.classList.toggle("dark",n==="dark")},ZB=()=>{if(typeof window>"u")return"system";const e=window.localStorage.getItem(s2);return QB(e)?e:"system"};function WB({children:e}){const[n,r]=v.useState(ZB);v.useEffect(()=>{h1(n),typeof window<"u"&&window.localStorage.setItem(s2,n)},[n]),v.useEffect(()=>{if(n!=="system")return;const o=window.matchMedia("(prefers-color-scheme: dark)"),s=()=>h1("system");return o.addEventListener?(o.addEventListener("change",s),()=>o.removeEventListener("change",s)):(o.addListener(s),()=>o.removeListener(s))},[n]);const l=v.useMemo(()=>{const o=n==="system"?u2():n;return{theme:n,resolvedTheme:o,setTheme:r}},[n]);return x.jsx(KB.Provider,{value:l,children:e})}const c2=document.getElementById("root");if(!c2)throw new Error("Missing #root");ON.createRoot(c2).render(x.jsx(v.StrictMode,{children:x.jsx(rT,{children:x.jsx(WB,{children:x.jsx(XB,{})})})}));