voicecc 1.2.13 → 1.3.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,28 @@
1
+ (function(){const i=document.createElement("link").relList;if(i&&i.supports&&i.supports("modulepreload"))return;for(const c of document.querySelectorAll('link[rel="modulepreload"]'))u(c);new MutationObserver(c=>{for(const f of c)if(f.type==="childList")for(const d of f.addedNodes)d.tagName==="LINK"&&d.rel==="modulepreload"&&u(d)}).observe(document,{childList:!0,subtree:!0});function r(c){const f={};return c.integrity&&(f.integrity=c.integrity),c.referrerPolicy&&(f.referrerPolicy=c.referrerPolicy),c.crossOrigin==="use-credentials"?f.credentials="include":c.crossOrigin==="anonymous"?f.credentials="omit":f.credentials="same-origin",f}function u(c){if(c.ep)return;c.ep=!0;const f=r(c);fetch(c.href,f)}})();function Hc(l){return l&&l.__esModule&&Object.prototype.hasOwnProperty.call(l,"default")?l.default:l}var Js={exports:{}},Ni={};var am;function Zx(){if(am)return Ni;am=1;var l=Symbol.for("react.transitional.element"),i=Symbol.for("react.fragment");function r(u,c,f){var d=null;if(f!==void 0&&(d=""+f),c.key!==void 0&&(d=""+c.key),"key"in c){f={};for(var y in c)y!=="key"&&(f[y]=c[y])}else f=c;return c=f.ref,{$$typeof:l,type:u,key:d,ref:c!==void 0?c:null,props:f}}return Ni.Fragment=i,Ni.jsx=r,Ni.jsxs=r,Ni}var im;function Kx(){return im||(im=1,Js.exports=Zx()),Js.exports}var p=Kx(),Ps={exports:{}},ve={};var rm;function Fx(){if(rm)return ve;rm=1;var l=Symbol.for("react.transitional.element"),i=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),u=Symbol.for("react.strict_mode"),c=Symbol.for("react.profiler"),f=Symbol.for("react.consumer"),d=Symbol.for("react.context"),y=Symbol.for("react.forward_ref"),m=Symbol.for("react.suspense"),h=Symbol.for("react.memo"),g=Symbol.for("react.lazy"),v=Symbol.for("react.activity"),S=Symbol.iterator;function b(z){return z===null||typeof z!="object"?null:(z=S&&z[S]||z["@@iterator"],typeof z=="function"?z:null)}var R={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},j=Object.assign,A={};function k(z,V,w){this.props=z,this.context=V,this.refs=A,this.updater=w||R}k.prototype.isReactComponent={},k.prototype.setState=function(z,V){if(typeof z!="object"&&typeof z!="function"&&z!=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,z,V,"setState")},k.prototype.forceUpdate=function(z){this.updater.enqueueForceUpdate(this,z,"forceUpdate")};function O(){}O.prototype=k.prototype;function _(z,V,w){this.props=z,this.context=V,this.refs=A,this.updater=w||R}var G=_.prototype=new O;G.constructor=_,j(G,k.prototype),G.isPureReactComponent=!0;var ne=Array.isArray;function L(){}var Q={H:null,A:null,T:null,S:null},q=Object.prototype.hasOwnProperty;function te(z,V,w){var ie=w.ref;return{$$typeof:l,type:z,key:V,ref:ie!==void 0?ie:null,props:w}}function se(z,V){return te(z.type,V,z.props)}function ae(z){return typeof z=="object"&&z!==null&&z.$$typeof===l}function ue(z){var V={"=":"=0",":":"=2"};return"$"+z.replace(/[=:]/g,function(w){return V[w]})}var pe=/\/+/g;function W(z,V){return typeof z=="object"&&z!==null&&z.key!=null?ue(""+z.key):V.toString(36)}function P(z){switch(z.status){case"fulfilled":return z.value;case"rejected":throw z.reason;default:switch(typeof z.status=="string"?z.then(L,L):(z.status="pending",z.then(function(V){z.status==="pending"&&(z.status="fulfilled",z.value=V)},function(V){z.status==="pending"&&(z.status="rejected",z.reason=V)})),z.status){case"fulfilled":return z.value;case"rejected":throw z.reason}}throw z}function B(z,V,w,ie,de){var fe=typeof z;(fe==="undefined"||fe==="boolean")&&(z=null);var Ee=!1;if(z===null)Ee=!0;else switch(fe){case"bigint":case"string":case"number":Ee=!0;break;case"object":switch(z.$$typeof){case l:case i:Ee=!0;break;case g:return Ee=z._init,B(Ee(z._payload),V,w,ie,de)}}if(Ee)return de=de(z),Ee=ie===""?"."+W(z,0):ie,ne(de)?(w="",Ee!=null&&(w=Ee.replace(pe,"$&/")+"/"),B(de,V,w,"",function(Xt){return Xt})):de!=null&&(ae(de)&&(de=se(de,w+(de.key==null||z&&z.key===de.key?"":(""+de.key).replace(pe,"$&/")+"/")+Ee)),V.push(de)),1;Ee=0;var Fe=ie===""?".":ie+":";if(ne(z))for(var He=0;He<z.length;He++)ie=z[He],fe=Fe+W(ie,He),Ee+=B(ie,V,w,fe,de);else if(He=b(z),typeof He=="function")for(z=He.call(z),He=0;!(ie=z.next()).done;)ie=ie.value,fe=Fe+W(ie,He++),Ee+=B(ie,V,w,fe,de);else if(fe==="object"){if(typeof z.then=="function")return B(P(z),V,w,ie,de);throw V=String(z),Error("Objects are not valid as a React child (found: "+(V==="[object Object]"?"object with keys {"+Object.keys(z).join(", ")+"}":V)+"). If you meant to render a collection of children, use an array instead.")}return Ee}function ee(z,V,w){if(z==null)return z;var ie=[],de=0;return B(z,ie,"","",function(fe){return V.call(w,fe,de++)}),ie}function K(z){if(z._status===-1){var V=z._result;V=V(),V.then(function(w){(z._status===0||z._status===-1)&&(z._status=1,z._result=w)},function(w){(z._status===0||z._status===-1)&&(z._status=2,z._result=w)}),z._status===-1&&(z._status=0,z._result=V)}if(z._status===1)return z._result.default;throw z._result}var X=typeof reportError=="function"?reportError:function(z){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var V=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof z=="object"&&z!==null&&typeof z.message=="string"?String(z.message):String(z),error:z});if(!window.dispatchEvent(V))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",z);return}console.error(z)},T={map:ee,forEach:function(z,V,w){ee(z,function(){V.apply(this,arguments)},w)},count:function(z){var V=0;return ee(z,function(){V++}),V},toArray:function(z){return ee(z,function(V){return V})||[]},only:function(z){if(!ae(z))throw Error("React.Children.only expected to receive a single React element child.");return z}};return ve.Activity=v,ve.Children=T,ve.Component=k,ve.Fragment=r,ve.Profiler=c,ve.PureComponent=_,ve.StrictMode=u,ve.Suspense=m,ve.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=Q,ve.__COMPILER_RUNTIME={__proto__:null,c:function(z){return Q.H.useMemoCache(z)}},ve.cache=function(z){return function(){return z.apply(null,arguments)}},ve.cacheSignal=function(){return null},ve.cloneElement=function(z,V,w){if(z==null)throw Error("The argument must be a React element, but you passed "+z+".");var ie=j({},z.props),de=z.key;if(V!=null)for(fe in V.key!==void 0&&(de=""+V.key),V)!q.call(V,fe)||fe==="key"||fe==="__self"||fe==="__source"||fe==="ref"&&V.ref===void 0||(ie[fe]=V[fe]);var fe=arguments.length-2;if(fe===1)ie.children=w;else if(1<fe){for(var Ee=Array(fe),Fe=0;Fe<fe;Fe++)Ee[Fe]=arguments[Fe+2];ie.children=Ee}return te(z.type,de,ie)},ve.createContext=function(z){return z={$$typeof:d,_currentValue:z,_currentValue2:z,_threadCount:0,Provider:null,Consumer:null},z.Provider=z,z.Consumer={$$typeof:f,_context:z},z},ve.createElement=function(z,V,w){var ie,de={},fe=null;if(V!=null)for(ie in V.key!==void 0&&(fe=""+V.key),V)q.call(V,ie)&&ie!=="key"&&ie!=="__self"&&ie!=="__source"&&(de[ie]=V[ie]);var Ee=arguments.length-2;if(Ee===1)de.children=w;else if(1<Ee){for(var Fe=Array(Ee),He=0;He<Ee;He++)Fe[He]=arguments[He+2];de.children=Fe}if(z&&z.defaultProps)for(ie in Ee=z.defaultProps,Ee)de[ie]===void 0&&(de[ie]=Ee[ie]);return te(z,fe,de)},ve.createRef=function(){return{current:null}},ve.forwardRef=function(z){return{$$typeof:y,render:z}},ve.isValidElement=ae,ve.lazy=function(z){return{$$typeof:g,_payload:{_status:-1,_result:z},_init:K}},ve.memo=function(z,V){return{$$typeof:h,type:z,compare:V===void 0?null:V}},ve.startTransition=function(z){var V=Q.T,w={};Q.T=w;try{var ie=z(),de=Q.S;de!==null&&de(w,ie),typeof ie=="object"&&ie!==null&&typeof ie.then=="function"&&ie.then(L,X)}catch(fe){X(fe)}finally{V!==null&&w.types!==null&&(V.types=w.types),Q.T=V}},ve.unstable_useCacheRefresh=function(){return Q.H.useCacheRefresh()},ve.use=function(z){return Q.H.use(z)},ve.useActionState=function(z,V,w){return Q.H.useActionState(z,V,w)},ve.useCallback=function(z,V){return Q.H.useCallback(z,V)},ve.useContext=function(z){return Q.H.useContext(z)},ve.useDebugValue=function(){},ve.useDeferredValue=function(z,V){return Q.H.useDeferredValue(z,V)},ve.useEffect=function(z,V){return Q.H.useEffect(z,V)},ve.useEffectEvent=function(z){return Q.H.useEffectEvent(z)},ve.useId=function(){return Q.H.useId()},ve.useImperativeHandle=function(z,V,w){return Q.H.useImperativeHandle(z,V,w)},ve.useInsertionEffect=function(z,V){return Q.H.useInsertionEffect(z,V)},ve.useLayoutEffect=function(z,V){return Q.H.useLayoutEffect(z,V)},ve.useMemo=function(z,V){return Q.H.useMemo(z,V)},ve.useOptimistic=function(z,V){return Q.H.useOptimistic(z,V)},ve.useReducer=function(z,V,w){return Q.H.useReducer(z,V,w)},ve.useRef=function(z){return Q.H.useRef(z)},ve.useState=function(z){return Q.H.useState(z)},ve.useSyncExternalStore=function(z,V,w){return Q.H.useSyncExternalStore(z,V,w)},ve.useTransition=function(){return Q.H.useTransition()},ve.version="19.2.4",ve}var um;function qc(){return um||(um=1,Ps.exports=Fx()),Ps.exports}var C=qc();const ft=Hc(C);var $s={exports:{}},ki={},Ws={exports:{}},ec={};var om;function Jx(){return om||(om=1,(function(l){function i(B,ee){var K=B.length;B.push(ee);e:for(;0<K;){var X=K-1>>>1,T=B[X];if(0<c(T,ee))B[X]=ee,B[K]=T,K=X;else break e}}function r(B){return B.length===0?null:B[0]}function u(B){if(B.length===0)return null;var ee=B[0],K=B.pop();if(K!==ee){B[0]=K;e:for(var X=0,T=B.length,z=T>>>1;X<z;){var V=2*(X+1)-1,w=B[V],ie=V+1,de=B[ie];if(0>c(w,K))ie<T&&0>c(de,w)?(B[X]=de,B[ie]=K,X=ie):(B[X]=w,B[V]=K,X=V);else if(ie<T&&0>c(de,K))B[X]=de,B[ie]=K,X=ie;else break e}}return ee}function c(B,ee){var K=B.sortIndex-ee.sortIndex;return K!==0?K:B.id-ee.id}if(l.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var f=performance;l.unstable_now=function(){return f.now()}}else{var d=Date,y=d.now();l.unstable_now=function(){return d.now()-y}}var m=[],h=[],g=1,v=null,S=3,b=!1,R=!1,j=!1,A=!1,k=typeof setTimeout=="function"?setTimeout:null,O=typeof clearTimeout=="function"?clearTimeout:null,_=typeof setImmediate<"u"?setImmediate:null;function G(B){for(var ee=r(h);ee!==null;){if(ee.callback===null)u(h);else if(ee.startTime<=B)u(h),ee.sortIndex=ee.expirationTime,i(m,ee);else break;ee=r(h)}}function ne(B){if(j=!1,G(B),!R)if(r(m)!==null)R=!0,L||(L=!0,ue());else{var ee=r(h);ee!==null&&P(ne,ee.startTime-B)}}var L=!1,Q=-1,q=5,te=-1;function se(){return A?!0:!(l.unstable_now()-te<q)}function ae(){if(A=!1,L){var B=l.unstable_now();te=B;var ee=!0;try{e:{R=!1,j&&(j=!1,O(Q),Q=-1),b=!0;var K=S;try{t:{for(G(B),v=r(m);v!==null&&!(v.expirationTime>B&&se());){var X=v.callback;if(typeof X=="function"){v.callback=null,S=v.priorityLevel;var T=X(v.expirationTime<=B);if(B=l.unstable_now(),typeof T=="function"){v.callback=T,G(B),ee=!0;break t}v===r(m)&&u(m),G(B)}else u(m);v=r(m)}if(v!==null)ee=!0;else{var z=r(h);z!==null&&P(ne,z.startTime-B),ee=!1}}break e}finally{v=null,S=K,b=!1}ee=void 0}}finally{ee?ue():L=!1}}}var ue;if(typeof _=="function")ue=function(){_(ae)};else if(typeof MessageChannel<"u"){var pe=new MessageChannel,W=pe.port2;pe.port1.onmessage=ae,ue=function(){W.postMessage(null)}}else ue=function(){k(ae,0)};function P(B,ee){Q=k(function(){B(l.unstable_now())},ee)}l.unstable_IdlePriority=5,l.unstable_ImmediatePriority=1,l.unstable_LowPriority=4,l.unstable_NormalPriority=3,l.unstable_Profiling=null,l.unstable_UserBlockingPriority=2,l.unstable_cancelCallback=function(B){B.callback=null},l.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"):q=0<B?Math.floor(1e3/B):5},l.unstable_getCurrentPriorityLevel=function(){return S},l.unstable_next=function(B){switch(S){case 1:case 2:case 3:var ee=3;break;default:ee=S}var K=S;S=ee;try{return B()}finally{S=K}},l.unstable_requestPaint=function(){A=!0},l.unstable_runWithPriority=function(B,ee){switch(B){case 1:case 2:case 3:case 4:case 5:break;default:B=3}var K=S;S=B;try{return ee()}finally{S=K}},l.unstable_scheduleCallback=function(B,ee,K){var X=l.unstable_now();switch(typeof K=="object"&&K!==null?(K=K.delay,K=typeof K=="number"&&0<K?X+K:X):K=X,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=K+T,B={id:g++,callback:ee,priorityLevel:B,startTime:K,expirationTime:T,sortIndex:-1},K>X?(B.sortIndex=K,i(h,B),r(m)===null&&B===r(h)&&(j?(O(Q),Q=-1):j=!0,P(ne,K-X))):(B.sortIndex=T,i(m,B),R||b||(R=!0,L||(L=!0,ue()))),B},l.unstable_shouldYield=se,l.unstable_wrapCallback=function(B){var ee=S;return function(){var K=S;S=ee;try{return B.apply(this,arguments)}finally{S=K}}}})(ec)),ec}var sm;function Px(){return sm||(sm=1,Ws.exports=Jx()),Ws.exports}var tc={exports:{}},xt={};var cm;function $x(){if(cm)return xt;cm=1;var l=qc();function i(m){var h="https://react.dev/errors/"+m;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 #"+m+"; visit "+h+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function r(){}var u={d:{f:r,r:function(){throw Error(i(522))},D:r,C:r,L:r,m:r,X:r,S:r,M:r},p:0,findDOMNode:null},c=Symbol.for("react.portal");function f(m,h,g){var v=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:c,key:v==null?null:""+v,children:m,containerInfo:h,implementation:g}}var d=l.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function y(m,h){if(m==="font")return"";if(typeof h=="string")return h==="use-credentials"?h:""}return xt.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=u,xt.createPortal=function(m,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(i(299));return f(m,h,null,g)},xt.flushSync=function(m){var h=d.T,g=u.p;try{if(d.T=null,u.p=2,m)return m()}finally{d.T=h,u.p=g,u.d.f()}},xt.preconnect=function(m,h){typeof m=="string"&&(h?(h=h.crossOrigin,h=typeof h=="string"?h==="use-credentials"?h:"":void 0):h=null,u.d.C(m,h))},xt.prefetchDNS=function(m){typeof m=="string"&&u.d.D(m)},xt.preinit=function(m,h){if(typeof m=="string"&&h&&typeof h.as=="string"){var g=h.as,v=y(g,h.crossOrigin),S=typeof h.integrity=="string"?h.integrity:void 0,b=typeof h.fetchPriority=="string"?h.fetchPriority:void 0;g==="style"?u.d.S(m,typeof h.precedence=="string"?h.precedence:void 0,{crossOrigin:v,integrity:S,fetchPriority:b}):g==="script"&&u.d.X(m,{crossOrigin:v,integrity:S,fetchPriority:b,nonce:typeof h.nonce=="string"?h.nonce:void 0})}},xt.preinitModule=function(m,h){if(typeof m=="string")if(typeof h=="object"&&h!==null){if(h.as==null||h.as==="script"){var g=y(h.as,h.crossOrigin);u.d.M(m,{crossOrigin:g,integrity:typeof h.integrity=="string"?h.integrity:void 0,nonce:typeof h.nonce=="string"?h.nonce:void 0})}}else h==null&&u.d.M(m)},xt.preload=function(m,h){if(typeof m=="string"&&typeof h=="object"&&h!==null&&typeof h.as=="string"){var g=h.as,v=y(g,h.crossOrigin);u.d.L(m,g,{crossOrigin:v,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})}},xt.preloadModule=function(m,h){if(typeof m=="string")if(h){var g=y(h.as,h.crossOrigin);u.d.m(m,{as:typeof h.as=="string"&&h.as!=="script"?h.as:void 0,crossOrigin:g,integrity:typeof h.integrity=="string"?h.integrity:void 0})}else u.d.m(m)},xt.requestFormReset=function(m){u.d.r(m)},xt.unstable_batchedUpdates=function(m,h){return m(h)},xt.useFormState=function(m,h,g){return d.H.useFormState(m,h,g)},xt.useFormStatus=function(){return d.H.useHostTransitionStatus()},xt.version="19.2.4",xt}var fm;function Wx(){if(fm)return tc.exports;fm=1;function l(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(l)}catch(i){console.error(i)}}return l(),tc.exports=$x(),tc.exports}var dm;function e1(){if(dm)return ki;dm=1;var l=Px(),i=qc(),r=Wx();function u(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n])}return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function c(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function f(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,(t.flags&4098)!==0&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function d(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function y(e){if(e.tag===31){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function m(e){if(f(e)!==e)throw Error(u(188))}function h(e){var t=e.alternate;if(!t){if(t=f(e),t===null)throw Error(u(188));return t!==e?null:e}for(var n=e,a=t;;){var o=n.return;if(o===null)break;var s=o.alternate;if(s===null){if(a=o.return,a!==null){n=a;continue}break}if(o.child===s.child){for(s=o.child;s;){if(s===n)return m(o),e;if(s===a)return m(o),t;s=s.sibling}throw Error(u(188))}if(n.return!==a.return)n=o,a=s;else{for(var x=!1,E=o.child;E;){if(E===n){x=!0,n=o,a=s;break}if(E===a){x=!0,a=o,n=s;break}E=E.sibling}if(!x){for(E=s.child;E;){if(E===n){x=!0,n=s,a=o;break}if(E===a){x=!0,a=s,n=o;break}E=E.sibling}if(!x)throw Error(u(189))}}if(n.alternate!==a)throw Error(u(190))}if(n.tag!==3)throw Error(u(188));return n.stateNode.current===n?e:t}function g(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=g(e),t!==null)return t;e=e.sibling}return null}var v=Object.assign,S=Symbol.for("react.element"),b=Symbol.for("react.transitional.element"),R=Symbol.for("react.portal"),j=Symbol.for("react.fragment"),A=Symbol.for("react.strict_mode"),k=Symbol.for("react.profiler"),O=Symbol.for("react.consumer"),_=Symbol.for("react.context"),G=Symbol.for("react.forward_ref"),ne=Symbol.for("react.suspense"),L=Symbol.for("react.suspense_list"),Q=Symbol.for("react.memo"),q=Symbol.for("react.lazy"),te=Symbol.for("react.activity"),se=Symbol.for("react.memo_cache_sentinel"),ae=Symbol.iterator;function ue(e){return e===null||typeof e!="object"?null:(e=ae&&e[ae]||e["@@iterator"],typeof e=="function"?e:null)}var pe=Symbol.for("react.client.reference");function W(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===pe?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case j:return"Fragment";case k:return"Profiler";case A:return"StrictMode";case ne:return"Suspense";case L:return"SuspenseList";case te:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case R:return"Portal";case _:return e.displayName||"Context";case O:return(e._context.displayName||"Context")+".Consumer";case G:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Q:return t=e.displayName||null,t!==null?t:W(e.type)||"Memo";case q:t=e._payload,e=e._init;try{return W(e(t))}catch{}}return null}var P=Array.isArray,B=i.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ee=r.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,K={pending:!1,data:null,method:null,action:null},X=[],T=-1;function z(e){return{current:e}}function V(e){0>T||(e.current=X[T],X[T]=null,T--)}function w(e,t){T++,X[T]=e.current,e.current=t}var ie=z(null),de=z(null),fe=z(null),Ee=z(null);function Fe(e,t){switch(w(fe,t),w(de,e),w(ie,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?Ap(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=Ap(t),e=zp(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}V(ie),w(ie,e)}function He(){V(ie),V(de),V(fe)}function Xt(e){e.memoizedState!==null&&w(Ee,e);var t=ie.current,n=zp(t,e.type);t!==n&&(w(de,e),w(ie,n))}function xn(e){de.current===e&&(V(ie),V(de)),Ee.current===e&&(V(Ee),ji._currentValue=K)}var Ba,Zi;function bn(e){if(Ba===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);Ba=t&&t[1]||"",Zi=-1<n.stack.indexOf(`
2
+ at`)?" (<anonymous>)":-1<n.stack.indexOf("@")?"@unknown:0:0":""}return`
3
+ `+Ba+e+Zi}var Hl=!1;function ql(e,t){if(!e||Hl)return"";Hl=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var a={DetermineComponentFrameRoot:function(){try{if(t){var $=function(){throw Error()};if(Object.defineProperty($.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct($,[])}catch(I){var Y=I}Reflect.construct(e,[],$)}else{try{$.call()}catch(I){Y=I}e.call($.prototype)}}else{try{throw Error()}catch(I){Y=I}($=e())&&typeof $.catch=="function"&&$.catch(function(){})}}catch(I){if(I&&Y&&typeof I.stack=="string")return[I.stack,Y.stack]}return[null,null]}};a.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var o=Object.getOwnPropertyDescriptor(a.DetermineComponentFrameRoot,"name");o&&o.configurable&&Object.defineProperty(a.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var s=a.DetermineComponentFrameRoot(),x=s[0],E=s[1];if(x&&E){var N=x.split(`
4
+ `),H=E.split(`
5
+ `);for(o=a=0;a<N.length&&!N[a].includes("DetermineComponentFrameRoot");)a++;for(;o<H.length&&!H[o].includes("DetermineComponentFrameRoot");)o++;if(a===N.length||o===H.length)for(a=N.length-1,o=H.length-1;1<=a&&0<=o&&N[a]!==H[o];)o--;for(;1<=a&&0<=o;a--,o--)if(N[a]!==H[o]){if(a!==1||o!==1)do if(a--,o--,0>o||N[a]!==H[o]){var Z=`
6
+ `+N[a].replace(" at new "," at ");return e.displayName&&Z.includes("<anonymous>")&&(Z=Z.replace("<anonymous>",e.displayName)),Z}while(1<=a&&0<=o);break}}}finally{Hl=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:"")?bn(n):""}function Ki(e,t){switch(e.tag){case 26:case 27:case 5:return bn(e.type);case 16:return bn("Lazy");case 13:return e.child!==t&&t!==null?bn("Suspense Fallback"):bn("Suspense");case 19:return bn("SuspenseList");case 0:case 15:return ql(e.type,!1);case 11:return ql(e.type.render,!1);case 1:return ql(e.type,!0);case 31:return bn("Activity");default:return""}}function Fi(e){try{var t="",n=null;do t+=Ki(e,n),n=e,e=e.return;while(e);return t}catch(a){return`
7
+ Error generating stack: `+a.message+`
8
+ `+a.stack}}var Yl=Object.prototype.hasOwnProperty,Vl=l.unstable_scheduleCallback,Ua=l.unstable_cancelCallback,Ou=l.unstable_shouldYield,Du=l.unstable_requestPaint,St=l.unstable_now,Lu=l.unstable_getCurrentPriorityLevel,F=l.unstable_ImmediatePriority,re=l.unstable_UserBlockingPriority,ge=l.unstable_NormalPriority,Te=l.unstable_LowPriority,Le=l.unstable_IdlePriority,Lt=l.log,Sn=l.unstable_setDisableYieldValue,Et=null,st=null;function Tt(e){if(typeof Lt=="function"&&Sn(e),st&&typeof st.setStrictMode=="function")try{st.setStrictMode(Et,e)}catch{}}var Ge=Math.clz32?Math.clz32:_y,Xn=Math.log,rn=Math.LN2;function _y(e){return e>>>=0,e===0?32:31-(Xn(e)/rn|0)|0}var Ji=256,Pi=262144,$i=4194304;function xl(e){var t=e&42;if(t!==0)return t;switch(e&-e){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 e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function Wi(e,t,n){var a=e.pendingLanes;if(a===0)return 0;var o=0,s=e.suspendedLanes,x=e.pingedLanes;e=e.warmLanes;var E=a&134217727;return E!==0?(a=E&~s,a!==0?o=xl(a):(x&=E,x!==0?o=xl(x):n||(n=E&~e,n!==0&&(o=xl(n))))):(E=a&~s,E!==0?o=xl(E):x!==0?o=xl(x):n||(n=a&~e,n!==0&&(o=xl(n)))),o===0?0:t!==0&&t!==o&&(t&s)===0&&(s=o&-o,n=t&-t,s>=n||s===32&&(n&4194048)!==0)?t:o}function Ha(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function Oy(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+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 t+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 of(){var e=$i;return $i<<=1,($i&62914560)===0&&($i=4194304),e}function Bu(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function qa(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function Dy(e,t,n,a,o,s){var x=e.pendingLanes;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=n,e.entangledLanes&=n,e.errorRecoveryDisabledLanes&=n,e.shellSuspendCounter=0;var E=e.entanglements,N=e.expirationTimes,H=e.hiddenUpdates;for(n=x&~n;0<n;){var Z=31-Ge(n),$=1<<Z;E[Z]=0,N[Z]=-1;var Y=H[Z];if(Y!==null)for(H[Z]=null,Z=0;Z<Y.length;Z++){var I=Y[Z];I!==null&&(I.lane&=-536870913)}n&=~$}a!==0&&sf(e,a,0),s!==0&&o===0&&e.tag!==0&&(e.suspendedLanes|=s&~(x&~t))}function sf(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var a=31-Ge(t);e.entangledLanes|=t,e.entanglements[a]=e.entanglements[a]|1073741824|n&261930}function cf(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var a=31-Ge(n),o=1<<a;o&t|e[a]&t&&(e[a]|=t),n&=~o}}function ff(e,t){var n=t&-t;return n=(n&42)!==0?1:Uu(n),(n&(e.suspendedLanes|t))!==0?0:n}function Uu(e){switch(e){case 2:e=1;break;case 8:e=4;break;case 32:e=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:e=128;break;case 268435456:e=134217728;break;default:e=0}return e}function Hu(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function df(){var e=ee.p;return e!==0?e:(e=window.event,e===void 0?32:Pp(e.type))}function hf(e,t){var n=ee.p;try{return ee.p=e,t()}finally{ee.p=n}}var Zn=Math.random().toString(36).slice(2),pt="__reactFiber$"+Zn,wt="__reactProps$"+Zn,Gl="__reactContainer$"+Zn,qu="__reactEvents$"+Zn,Ly="__reactListeners$"+Zn,By="__reactHandles$"+Zn,pf="__reactResources$"+Zn,Ya="__reactMarker$"+Zn;function Yu(e){delete e[pt],delete e[wt],delete e[qu],delete e[Ly],delete e[By]}function Il(e){var t=e[pt];if(t)return t;for(var n=e.parentNode;n;){if(t=n[Gl]||n[pt]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=Dp(e);e!==null;){if(n=e[pt])return n;e=Dp(e)}return t}e=n,n=e.parentNode}return null}function Ql(e){if(e=e[pt]||e[Gl]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function Va(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(u(33))}function Xl(e){var t=e[pf];return t||(t=e[pf]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function dt(e){e[Ya]=!0}var mf=new Set,gf={};function bl(e,t){Zl(e,t),Zl(e+"Capture",t)}function Zl(e,t){for(gf[e]=t,e=0;e<t.length;e++)mf.add(t[e])}var Uy=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]*$"),yf={},vf={};function Hy(e){return Yl.call(vf,e)?!0:Yl.call(yf,e)?!1:Uy.test(e)?vf[e]=!0:(yf[e]=!0,!1)}function er(e,t,n){if(Hy(t))if(n===null)e.removeAttribute(t);else{switch(typeof n){case"undefined":case"function":case"symbol":e.removeAttribute(t);return;case"boolean":var a=t.toLowerCase().slice(0,5);if(a!=="data-"&&a!=="aria-"){e.removeAttribute(t);return}}e.setAttribute(t,""+n)}}function tr(e,t,n){if(n===null)e.removeAttribute(t);else{switch(typeof n){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(t);return}e.setAttribute(t,""+n)}}function En(e,t,n,a){if(a===null)e.removeAttribute(n);else{switch(typeof a){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(n);return}e.setAttributeNS(t,n,""+a)}}function Zt(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function xf(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function qy(e,t,n){var a=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&typeof a<"u"&&typeof a.get=="function"&&typeof a.set=="function"){var o=a.get,s=a.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return o.call(this)},set:function(x){n=""+x,s.call(this,x)}}),Object.defineProperty(e,t,{enumerable:a.enumerable}),{getValue:function(){return n},setValue:function(x){n=""+x},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Vu(e){if(!e._valueTracker){var t=xf(e)?"checked":"value";e._valueTracker=qy(e,t,""+e[t])}}function bf(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),a="";return e&&(a=xf(e)?e.checked?"true":"false":e.value),e=a,e!==n?(t.setValue(e),!0):!1}function nr(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}var Yy=/[\n"\\]/g;function Kt(e){return e.replace(Yy,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function Gu(e,t,n,a,o,s,x,E){e.name="",x!=null&&typeof x!="function"&&typeof x!="symbol"&&typeof x!="boolean"?e.type=x:e.removeAttribute("type"),t!=null?x==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+Zt(t)):e.value!==""+Zt(t)&&(e.value=""+Zt(t)):x!=="submit"&&x!=="reset"||e.removeAttribute("value"),t!=null?Iu(e,x,Zt(t)):n!=null?Iu(e,x,Zt(n)):a!=null&&e.removeAttribute("value"),o==null&&s!=null&&(e.defaultChecked=!!s),o!=null&&(e.checked=o&&typeof o!="function"&&typeof o!="symbol"),E!=null&&typeof E!="function"&&typeof E!="symbol"&&typeof E!="boolean"?e.name=""+Zt(E):e.removeAttribute("name")}function Sf(e,t,n,a,o,s,x,E){if(s!=null&&typeof s!="function"&&typeof s!="symbol"&&typeof s!="boolean"&&(e.type=s),t!=null||n!=null){if(!(s!=="submit"&&s!=="reset"||t!=null)){Vu(e);return}n=n!=null?""+Zt(n):"",t=t!=null?""+Zt(t):n,E||t===e.value||(e.value=t),e.defaultValue=t}a=a??o,a=typeof a!="function"&&typeof a!="symbol"&&!!a,e.checked=E?e.checked:!!a,e.defaultChecked=!!a,x!=null&&typeof x!="function"&&typeof x!="symbol"&&typeof x!="boolean"&&(e.name=x),Vu(e)}function Iu(e,t,n){t==="number"&&nr(e.ownerDocument)===e||e.defaultValue===""+n||(e.defaultValue=""+n)}function Kl(e,t,n,a){if(e=e.options,t){t={};for(var o=0;o<n.length;o++)t["$"+n[o]]=!0;for(n=0;n<e.length;n++)o=t.hasOwnProperty("$"+e[n].value),e[n].selected!==o&&(e[n].selected=o),o&&a&&(e[n].defaultSelected=!0)}else{for(n=""+Zt(n),t=null,o=0;o<e.length;o++){if(e[o].value===n){e[o].selected=!0,a&&(e[o].defaultSelected=!0);return}t!==null||e[o].disabled||(t=e[o])}t!==null&&(t.selected=!0)}}function Ef(e,t,n){if(t!=null&&(t=""+Zt(t),t!==e.value&&(e.value=t),n==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=n!=null?""+Zt(n):""}function Cf(e,t,n,a){if(t==null){if(a!=null){if(n!=null)throw Error(u(92));if(P(a)){if(1<a.length)throw Error(u(93));a=a[0]}n=a}n==null&&(n=""),t=n}n=Zt(t),e.defaultValue=n,a=e.textContent,a===n&&a!==""&&a!==null&&(e.value=a),Vu(e)}function Fl(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Vy=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 Tf(e,t,n){var a=t.indexOf("--")===0;n==null||typeof n=="boolean"||n===""?a?e.setProperty(t,""):t==="float"?e.cssFloat="":e[t]="":a?e.setProperty(t,n):typeof n!="number"||n===0||Vy.has(t)?t==="float"?e.cssFloat=n:e[t]=(""+n).trim():e[t]=n+"px"}function wf(e,t,n){if(t!=null&&typeof t!="object")throw Error(u(62));if(e=e.style,n!=null){for(var a in n)!n.hasOwnProperty(a)||t!=null&&t.hasOwnProperty(a)||(a.indexOf("--")===0?e.setProperty(a,""):a==="float"?e.cssFloat="":e[a]="");for(var o in t)a=t[o],t.hasOwnProperty(o)&&n[o]!==a&&Tf(e,o,a)}else for(var s in t)t.hasOwnProperty(s)&&Tf(e,s,t[s])}function Qu(e){if(e.indexOf("-")===-1)return!1;switch(e){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 Gy=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"]]),Iy=/^[\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 lr(e){return Iy.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function Cn(){}var Xu=null;function Zu(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Jl=null,Pl=null;function jf(e){var t=Ql(e);if(t&&(e=t.stateNode)){var n=e[wt]||null;e:switch(e=t.stateNode,t.type){case"input":if(Gu(e,n.value,n.defaultValue,n.defaultValue,n.checked,n.defaultChecked,n.type,n.name),t=n.name,n.type==="radio"&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll('input[name="'+Kt(""+t)+'"][type="radio"]'),t=0;t<n.length;t++){var a=n[t];if(a!==e&&a.form===e.form){var o=a[wt]||null;if(!o)throw Error(u(90));Gu(a,o.value,o.defaultValue,o.defaultValue,o.checked,o.defaultChecked,o.type,o.name)}}for(t=0;t<n.length;t++)a=n[t],a.form===e.form&&bf(a)}break e;case"textarea":Ef(e,n.value,n.defaultValue);break e;case"select":t=n.value,t!=null&&Kl(e,!!n.multiple,t,!1)}}}var Ku=!1;function Af(e,t,n){if(Ku)return e(t,n);Ku=!0;try{var a=e(t);return a}finally{if(Ku=!1,(Jl!==null||Pl!==null)&&(Ir(),Jl&&(t=Jl,e=Pl,Pl=Jl=null,jf(t),e)))for(t=0;t<e.length;t++)jf(e[t])}}function Ga(e,t){var n=e.stateNode;if(n===null)return null;var a=n[wt]||null;if(a===null)return null;n=a[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(a=!a.disabled)||(e=e.type,a=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!a;break e;default:e=!1}if(e)return null;if(n&&typeof n!="function")throw Error(u(231,t,typeof n));return n}var Tn=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Fu=!1;if(Tn)try{var Ia={};Object.defineProperty(Ia,"passive",{get:function(){Fu=!0}}),window.addEventListener("test",Ia,Ia),window.removeEventListener("test",Ia,Ia)}catch{Fu=!1}var Kn=null,Ju=null,ar=null;function zf(){if(ar)return ar;var e,t=Ju,n=t.length,a,o="value"in Kn?Kn.value:Kn.textContent,s=o.length;for(e=0;e<n&&t[e]===o[e];e++);var x=n-e;for(a=1;a<=x&&t[n-a]===o[s-a];a++);return ar=o.slice(e,1<a?1-a:void 0)}function ir(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function rr(){return!0}function Rf(){return!1}function jt(e){function t(n,a,o,s,x){this._reactName=n,this._targetInst=o,this.type=a,this.nativeEvent=s,this.target=x,this.currentTarget=null;for(var E in e)e.hasOwnProperty(E)&&(n=e[E],this[E]=n?n(s):s[E]);return this.isDefaultPrevented=(s.defaultPrevented!=null?s.defaultPrevented:s.returnValue===!1)?rr:Rf,this.isPropagationStopped=Rf,this}return v(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var n=this.nativeEvent;n&&(n.preventDefault?n.preventDefault():typeof n.returnValue!="unknown"&&(n.returnValue=!1),this.isDefaultPrevented=rr)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=rr)},persist:function(){},isPersistent:rr}),t}var Sl={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},ur=jt(Sl),Qa=v({},Sl,{view:0,detail:0}),Qy=jt(Qa),Pu,$u,Xa,or=v({},Qa,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:eo,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==Xa&&(Xa&&e.type==="mousemove"?(Pu=e.screenX-Xa.screenX,$u=e.screenY-Xa.screenY):$u=Pu=0,Xa=e),Pu)},movementY:function(e){return"movementY"in e?e.movementY:$u}}),Nf=jt(or),Xy=v({},or,{dataTransfer:0}),Zy=jt(Xy),Ky=v({},Qa,{relatedTarget:0}),Wu=jt(Ky),Fy=v({},Sl,{animationName:0,elapsedTime:0,pseudoElement:0}),Jy=jt(Fy),Py=v({},Sl,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),$y=jt(Py),Wy=v({},Sl,{data:0}),kf=jt(Wy),ev={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},tv={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"},nv={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function lv(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=nv[e])?!!t[e]:!1}function eo(){return lv}var av=v({},Qa,{key:function(e){if(e.key){var t=ev[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=ir(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?tv[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:eo,charCode:function(e){return e.type==="keypress"?ir(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?ir(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),iv=jt(av),rv=v({},or,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Mf=jt(rv),uv=v({},Qa,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:eo}),ov=jt(uv),sv=v({},Sl,{propertyName:0,elapsedTime:0,pseudoElement:0}),cv=jt(sv),fv=v({},or,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),dv=jt(fv),hv=v({},Sl,{newState:0,oldState:0}),pv=jt(hv),mv=[9,13,27,32],to=Tn&&"CompositionEvent"in window,Za=null;Tn&&"documentMode"in document&&(Za=document.documentMode);var gv=Tn&&"TextEvent"in window&&!Za,_f=Tn&&(!to||Za&&8<Za&&11>=Za),Of=" ",Df=!1;function Lf(e,t){switch(e){case"keyup":return mv.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Bf(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var $l=!1;function yv(e,t){switch(e){case"compositionend":return Bf(t);case"keypress":return t.which!==32?null:(Df=!0,Of);case"textInput":return e=t.data,e===Of&&Df?null:e;default:return null}}function vv(e,t){if($l)return e==="compositionend"||!to&&Lf(e,t)?(e=zf(),ar=Ju=Kn=null,$l=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return _f&&t.locale!=="ko"?null:t.data;default:return null}}var xv={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 Uf(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!xv[e.type]:t==="textarea"}function Hf(e,t,n,a){Jl?Pl?Pl.push(a):Pl=[a]:Jl=a,t=Pr(t,"onChange"),0<t.length&&(n=new ur("onChange","change",null,n,a),e.push({event:n,listeners:t}))}var Ka=null,Fa=null;function bv(e){Sp(e,0)}function sr(e){var t=Va(e);if(bf(t))return e}function qf(e,t){if(e==="change")return t}var Yf=!1;if(Tn){var no;if(Tn){var lo="oninput"in document;if(!lo){var Vf=document.createElement("div");Vf.setAttribute("oninput","return;"),lo=typeof Vf.oninput=="function"}no=lo}else no=!1;Yf=no&&(!document.documentMode||9<document.documentMode)}function Gf(){Ka&&(Ka.detachEvent("onpropertychange",If),Fa=Ka=null)}function If(e){if(e.propertyName==="value"&&sr(Fa)){var t=[];Hf(t,Fa,e,Zu(e)),Af(bv,t)}}function Sv(e,t,n){e==="focusin"?(Gf(),Ka=t,Fa=n,Ka.attachEvent("onpropertychange",If)):e==="focusout"&&Gf()}function Ev(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return sr(Fa)}function Cv(e,t){if(e==="click")return sr(t)}function Tv(e,t){if(e==="input"||e==="change")return sr(t)}function wv(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Bt=typeof Object.is=="function"?Object.is:wv;function Ja(e,t){if(Bt(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var n=Object.keys(e),a=Object.keys(t);if(n.length!==a.length)return!1;for(a=0;a<n.length;a++){var o=n[a];if(!Yl.call(t,o)||!Bt(e[o],t[o]))return!1}return!0}function Qf(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Xf(e,t){var n=Qf(e);e=0;for(var a;n;){if(n.nodeType===3){if(a=e+n.textContent.length,e<=t&&a>=t)return{node:n,offset:t-e};e=a}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=Qf(n)}}function Zf(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Zf(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Kf(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=nr(e.document);t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=nr(e.document)}return t}function ao(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}var jv=Tn&&"documentMode"in document&&11>=document.documentMode,Wl=null,io=null,Pa=null,ro=!1;function Ff(e,t,n){var a=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;ro||Wl==null||Wl!==nr(a)||(a=Wl,"selectionStart"in a&&ao(a)?a={start:a.selectionStart,end:a.selectionEnd}:(a=(a.ownerDocument&&a.ownerDocument.defaultView||window).getSelection(),a={anchorNode:a.anchorNode,anchorOffset:a.anchorOffset,focusNode:a.focusNode,focusOffset:a.focusOffset}),Pa&&Ja(Pa,a)||(Pa=a,a=Pr(io,"onSelect"),0<a.length&&(t=new ur("onSelect","select",null,t,n),e.push({event:t,listeners:a}),t.target=Wl)))}function El(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var ea={animationend:El("Animation","AnimationEnd"),animationiteration:El("Animation","AnimationIteration"),animationstart:El("Animation","AnimationStart"),transitionrun:El("Transition","TransitionRun"),transitionstart:El("Transition","TransitionStart"),transitioncancel:El("Transition","TransitionCancel"),transitionend:El("Transition","TransitionEnd")},uo={},Jf={};Tn&&(Jf=document.createElement("div").style,"AnimationEvent"in window||(delete ea.animationend.animation,delete ea.animationiteration.animation,delete ea.animationstart.animation),"TransitionEvent"in window||delete ea.transitionend.transition);function Cl(e){if(uo[e])return uo[e];if(!ea[e])return e;var t=ea[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in Jf)return uo[e]=t[n];return e}var Pf=Cl("animationend"),$f=Cl("animationiteration"),Wf=Cl("animationstart"),Av=Cl("transitionrun"),zv=Cl("transitionstart"),Rv=Cl("transitioncancel"),ed=Cl("transitionend"),td=new Map,oo="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(" ");oo.push("scrollEnd");function un(e,t){td.set(e,t),bl(t,[e])}var cr=typeof reportError=="function"?reportError:function(e){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var t=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof e=="object"&&e!==null&&typeof e.message=="string"?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",e);return}console.error(e)},Ft=[],ta=0,so=0;function fr(){for(var e=ta,t=so=ta=0;t<e;){var n=Ft[t];Ft[t++]=null;var a=Ft[t];Ft[t++]=null;var o=Ft[t];Ft[t++]=null;var s=Ft[t];if(Ft[t++]=null,a!==null&&o!==null){var x=a.pending;x===null?o.next=o:(o.next=x.next,x.next=o),a.pending=o}s!==0&&nd(n,o,s)}}function dr(e,t,n,a){Ft[ta++]=e,Ft[ta++]=t,Ft[ta++]=n,Ft[ta++]=a,so|=a,e.lanes|=a,e=e.alternate,e!==null&&(e.lanes|=a)}function co(e,t,n,a){return dr(e,t,n,a),hr(e)}function Tl(e,t){return dr(e,null,null,t),hr(e)}function nd(e,t,n){e.lanes|=n;var a=e.alternate;a!==null&&(a.lanes|=n);for(var o=!1,s=e.return;s!==null;)s.childLanes|=n,a=s.alternate,a!==null&&(a.childLanes|=n),s.tag===22&&(e=s.stateNode,e===null||e._visibility&1||(o=!0)),e=s,s=s.return;return e.tag===3?(s=e.stateNode,o&&t!==null&&(o=31-Ge(n),e=s.hiddenUpdates,a=e[o],a===null?e[o]=[t]:a.push(t),t.lane=n|536870912),s):null}function hr(e){if(50<xi)throw xi=0,bs=null,Error(u(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var na={};function Nv(e,t,n,a){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=a,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Ut(e,t,n,a){return new Nv(e,t,n,a)}function fo(e){return e=e.prototype,!(!e||!e.isReactComponent)}function wn(e,t){var n=e.alternate;return n===null?(n=Ut(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&65011712,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n.refCleanup=e.refCleanup,n}function ld(e,t){e.flags&=65011714;var n=e.alternate;return n===null?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=n.childLanes,e.lanes=n.lanes,e.child=n.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=n.memoizedProps,e.memoizedState=n.memoizedState,e.updateQueue=n.updateQueue,e.type=n.type,t=n.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function pr(e,t,n,a,o,s){var x=0;if(a=e,typeof e=="function")fo(e)&&(x=1);else if(typeof e=="string")x=Dx(e,n,ie.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case te:return e=Ut(31,n,t,o),e.elementType=te,e.lanes=s,e;case j:return wl(n.children,o,s,t);case A:x=8,o|=24;break;case k:return e=Ut(12,n,t,o|2),e.elementType=k,e.lanes=s,e;case ne:return e=Ut(13,n,t,o),e.elementType=ne,e.lanes=s,e;case L:return e=Ut(19,n,t,o),e.elementType=L,e.lanes=s,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case _:x=10;break e;case O:x=9;break e;case G:x=11;break e;case Q:x=14;break e;case q:x=16,a=null;break e}x=29,n=Error(u(130,e===null?"null":typeof e,"")),a=null}return t=Ut(x,n,t,o),t.elementType=e,t.type=a,t.lanes=s,t}function wl(e,t,n,a){return e=Ut(7,e,a,t),e.lanes=n,e}function ho(e,t,n){return e=Ut(6,e,null,t),e.lanes=n,e}function ad(e){var t=Ut(18,null,null,0);return t.stateNode=e,t}function po(e,t,n){return t=Ut(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var id=new WeakMap;function Jt(e,t){if(typeof e=="object"&&e!==null){var n=id.get(e);return n!==void 0?n:(t={value:e,source:t,stack:Fi(t)},id.set(e,t),t)}return{value:e,source:t,stack:Fi(t)}}var la=[],aa=0,mr=null,$a=0,Pt=[],$t=0,Fn=null,dn=1,hn="";function jn(e,t){la[aa++]=$a,la[aa++]=mr,mr=e,$a=t}function rd(e,t,n){Pt[$t++]=dn,Pt[$t++]=hn,Pt[$t++]=Fn,Fn=e;var a=dn;e=hn;var o=32-Ge(a)-1;a&=~(1<<o),n+=1;var s=32-Ge(t)+o;if(30<s){var x=o-o%5;s=(a&(1<<x)-1).toString(32),a>>=x,o-=x,dn=1<<32-Ge(t)+o|n<<o|a,hn=s+e}else dn=1<<s|n<<o|a,hn=e}function mo(e){e.return!==null&&(jn(e,1),rd(e,1,0))}function go(e){for(;e===mr;)mr=la[--aa],la[aa]=null,$a=la[--aa],la[aa]=null;for(;e===Fn;)Fn=Pt[--$t],Pt[$t]=null,hn=Pt[--$t],Pt[$t]=null,dn=Pt[--$t],Pt[$t]=null}function ud(e,t){Pt[$t++]=dn,Pt[$t++]=hn,Pt[$t++]=Fn,dn=t.id,hn=t.overflow,Fn=e}var mt=null,Ze=null,Ne=!1,Jn=null,Wt=!1,yo=Error(u(519));function Pn(e){var t=Error(u(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Wa(Jt(t,e)),yo}function od(e){var t=e.stateNode,n=e.type,a=e.memoizedProps;switch(t[pt]=e,t[wt]=a,n){case"dialog":je("cancel",t),je("close",t);break;case"iframe":case"object":case"embed":je("load",t);break;case"video":case"audio":for(n=0;n<Si.length;n++)je(Si[n],t);break;case"source":je("error",t);break;case"img":case"image":case"link":je("error",t),je("load",t);break;case"details":je("toggle",t);break;case"input":je("invalid",t),Sf(t,a.value,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name,!0);break;case"select":je("invalid",t);break;case"textarea":je("invalid",t),Cf(t,a.value,a.defaultValue,a.children)}n=a.children,typeof n!="string"&&typeof n!="number"&&typeof n!="bigint"||t.textContent===""+n||a.suppressHydrationWarning===!0||wp(t.textContent,n)?(a.popover!=null&&(je("beforetoggle",t),je("toggle",t)),a.onScroll!=null&&je("scroll",t),a.onScrollEnd!=null&&je("scrollend",t),a.onClick!=null&&(t.onclick=Cn),t=!0):t=!1,t||Pn(e,!0)}function sd(e){for(mt=e.return;mt;)switch(mt.tag){case 5:case 31:case 13:Wt=!1;return;case 27:case 3:Wt=!0;return;default:mt=mt.return}}function ia(e){if(e!==mt)return!1;if(!Ne)return sd(e),Ne=!0,!1;var t=e.tag,n;if((n=t!==3&&t!==27)&&((n=t===5)&&(n=e.type,n=!(n!=="form"&&n!=="button")||Ds(e.type,e.memoizedProps)),n=!n),n&&Ze&&Pn(e),sd(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(u(317));Ze=Op(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(u(317));Ze=Op(e)}else t===27?(t=Ze,fl(e.type)?(e=qs,qs=null,Ze=e):Ze=t):Ze=mt?tn(e.stateNode.nextSibling):null;return!0}function jl(){Ze=mt=null,Ne=!1}function vo(){var e=Jn;return e!==null&&(Nt===null?Nt=e:Nt.push.apply(Nt,e),Jn=null),e}function Wa(e){Jn===null?Jn=[e]:Jn.push(e)}var xo=z(null),Al=null,An=null;function $n(e,t,n){w(xo,t._currentValue),t._currentValue=n}function zn(e){e._currentValue=xo.current,V(xo)}function bo(e,t,n){for(;e!==null;){var a=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,a!==null&&(a.childLanes|=t)):a!==null&&(a.childLanes&t)!==t&&(a.childLanes|=t),e===n)break;e=e.return}}function So(e,t,n,a){var o=e.child;for(o!==null&&(o.return=e);o!==null;){var s=o.dependencies;if(s!==null){var x=o.child;s=s.firstContext;e:for(;s!==null;){var E=s;s=o;for(var N=0;N<t.length;N++)if(E.context===t[N]){s.lanes|=n,E=s.alternate,E!==null&&(E.lanes|=n),bo(s.return,n,e),a||(x=null);break e}s=E.next}}else if(o.tag===18){if(x=o.return,x===null)throw Error(u(341));x.lanes|=n,s=x.alternate,s!==null&&(s.lanes|=n),bo(x,n,e),x=null}else x=o.child;if(x!==null)x.return=o;else for(x=o;x!==null;){if(x===e){x=null;break}if(o=x.sibling,o!==null){o.return=x.return,x=o;break}x=x.return}o=x}}function ra(e,t,n,a){e=null;for(var o=t,s=!1;o!==null;){if(!s){if((o.flags&524288)!==0)s=!0;else if((o.flags&262144)!==0)break}if(o.tag===10){var x=o.alternate;if(x===null)throw Error(u(387));if(x=x.memoizedProps,x!==null){var E=o.type;Bt(o.pendingProps.value,x.value)||(e!==null?e.push(E):e=[E])}}else if(o===Ee.current){if(x=o.alternate,x===null)throw Error(u(387));x.memoizedState.memoizedState!==o.memoizedState.memoizedState&&(e!==null?e.push(ji):e=[ji])}o=o.return}e!==null&&So(t,e,n,a),t.flags|=262144}function gr(e){for(e=e.firstContext;e!==null;){if(!Bt(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function zl(e){Al=e,An=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function gt(e){return cd(Al,e)}function yr(e,t){return Al===null&&zl(e),cd(e,t)}function cd(e,t){var n=t._currentValue;if(t={context:t,memoizedValue:n,next:null},An===null){if(e===null)throw Error(u(308));An=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else An=An.next=t;return n}var kv=typeof AbortController<"u"?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(n,a){e.push(a)}};this.abort=function(){t.aborted=!0,e.forEach(function(n){return n()})}},Mv=l.unstable_scheduleCallback,_v=l.unstable_NormalPriority,at={$$typeof:_,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Eo(){return{controller:new kv,data:new Map,refCount:0}}function ei(e){e.refCount--,e.refCount===0&&Mv(_v,function(){e.controller.abort()})}var ti=null,Co=0,ua=0,oa=null;function Ov(e,t){if(ti===null){var n=ti=[];Co=0,ua=js(),oa={status:"pending",value:void 0,then:function(a){n.push(a)}}}return Co++,t.then(fd,fd),t}function fd(){if(--Co===0&&ti!==null){oa!==null&&(oa.status="fulfilled");var e=ti;ti=null,ua=0,oa=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function Dv(e,t){var n=[],a={status:"pending",value:null,reason:null,then:function(o){n.push(o)}};return e.then(function(){a.status="fulfilled",a.value=t;for(var o=0;o<n.length;o++)(0,n[o])(t)},function(o){for(a.status="rejected",a.reason=o,o=0;o<n.length;o++)(0,n[o])(void 0)}),a}var dd=B.S;B.S=function(e,t){Fh=St(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&Ov(e,t),dd!==null&&dd(e,t)};var Rl=z(null);function To(){var e=Rl.current;return e!==null?e:Ie.pooledCache}function vr(e,t){t===null?w(Rl,Rl.current):w(Rl,t.pool)}function hd(){var e=To();return e===null?null:{parent:at._currentValue,pool:e}}var sa=Error(u(460)),wo=Error(u(474)),xr=Error(u(542)),br={then:function(){}};function pd(e){return e=e.status,e==="fulfilled"||e==="rejected"}function md(e,t,n){switch(n=e[n],n===void 0?e.push(t):n!==t&&(t.then(Cn,Cn),t=n),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,yd(e),e;default:if(typeof t.status=="string")t.then(Cn,Cn);else{if(e=Ie,e!==null&&100<e.shellSuspendCounter)throw Error(u(482));e=t,e.status="pending",e.then(function(a){if(t.status==="pending"){var o=t;o.status="fulfilled",o.value=a}},function(a){if(t.status==="pending"){var o=t;o.status="rejected",o.reason=a}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,yd(e),e}throw kl=t,sa}}function Nl(e){try{var t=e._init;return t(e._payload)}catch(n){throw n!==null&&typeof n=="object"&&typeof n.then=="function"?(kl=n,sa):n}}var kl=null;function gd(){if(kl===null)throw Error(u(459));var e=kl;return kl=null,e}function yd(e){if(e===sa||e===xr)throw Error(u(483))}var ca=null,ni=0;function Sr(e){var t=ni;return ni+=1,ca===null&&(ca=[]),md(ca,e,t)}function li(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function Er(e,t){throw t.$$typeof===S?Error(u(525)):(e=Object.prototype.toString.call(t),Error(u(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function vd(e){function t(D,M){if(e){var U=D.deletions;U===null?(D.deletions=[M],D.flags|=16):U.push(M)}}function n(D,M){if(!e)return null;for(;M!==null;)t(D,M),M=M.sibling;return null}function a(D){for(var M=new Map;D!==null;)D.key!==null?M.set(D.key,D):M.set(D.index,D),D=D.sibling;return M}function o(D,M){return D=wn(D,M),D.index=0,D.sibling=null,D}function s(D,M,U){return D.index=U,e?(U=D.alternate,U!==null?(U=U.index,U<M?(D.flags|=67108866,M):U):(D.flags|=67108866,M)):(D.flags|=1048576,M)}function x(D){return e&&D.alternate===null&&(D.flags|=67108866),D}function E(D,M,U,J){return M===null||M.tag!==6?(M=ho(U,D.mode,J),M.return=D,M):(M=o(M,U),M.return=D,M)}function N(D,M,U,J){var he=U.type;return he===j?Z(D,M,U.props.children,J,U.key):M!==null&&(M.elementType===he||typeof he=="object"&&he!==null&&he.$$typeof===q&&Nl(he)===M.type)?(M=o(M,U.props),li(M,U),M.return=D,M):(M=pr(U.type,U.key,U.props,null,D.mode,J),li(M,U),M.return=D,M)}function H(D,M,U,J){return M===null||M.tag!==4||M.stateNode.containerInfo!==U.containerInfo||M.stateNode.implementation!==U.implementation?(M=po(U,D.mode,J),M.return=D,M):(M=o(M,U.children||[]),M.return=D,M)}function Z(D,M,U,J,he){return M===null||M.tag!==7?(M=wl(U,D.mode,J,he),M.return=D,M):(M=o(M,U),M.return=D,M)}function $(D,M,U){if(typeof M=="string"&&M!==""||typeof M=="number"||typeof M=="bigint")return M=ho(""+M,D.mode,U),M.return=D,M;if(typeof M=="object"&&M!==null){switch(M.$$typeof){case b:return U=pr(M.type,M.key,M.props,null,D.mode,U),li(U,M),U.return=D,U;case R:return M=po(M,D.mode,U),M.return=D,M;case q:return M=Nl(M),$(D,M,U)}if(P(M)||ue(M))return M=wl(M,D.mode,U,null),M.return=D,M;if(typeof M.then=="function")return $(D,Sr(M),U);if(M.$$typeof===_)return $(D,yr(D,M),U);Er(D,M)}return null}function Y(D,M,U,J){var he=M!==null?M.key:null;if(typeof U=="string"&&U!==""||typeof U=="number"||typeof U=="bigint")return he!==null?null:E(D,M,""+U,J);if(typeof U=="object"&&U!==null){switch(U.$$typeof){case b:return U.key===he?N(D,M,U,J):null;case R:return U.key===he?H(D,M,U,J):null;case q:return U=Nl(U),Y(D,M,U,J)}if(P(U)||ue(U))return he!==null?null:Z(D,M,U,J,null);if(typeof U.then=="function")return Y(D,M,Sr(U),J);if(U.$$typeof===_)return Y(D,M,yr(D,U),J);Er(D,U)}return null}function I(D,M,U,J,he){if(typeof J=="string"&&J!==""||typeof J=="number"||typeof J=="bigint")return D=D.get(U)||null,E(M,D,""+J,he);if(typeof J=="object"&&J!==null){switch(J.$$typeof){case b:return D=D.get(J.key===null?U:J.key)||null,N(M,D,J,he);case R:return D=D.get(J.key===null?U:J.key)||null,H(M,D,J,he);case q:return J=Nl(J),I(D,M,U,J,he)}if(P(J)||ue(J))return D=D.get(U)||null,Z(M,D,J,he,null);if(typeof J.then=="function")return I(D,M,U,Sr(J),he);if(J.$$typeof===_)return I(D,M,U,yr(M,J),he);Er(M,J)}return null}function oe(D,M,U,J){for(var he=null,ke=null,ce=M,be=M=0,Re=null;ce!==null&&be<U.length;be++){ce.index>be?(Re=ce,ce=null):Re=ce.sibling;var Me=Y(D,ce,U[be],J);if(Me===null){ce===null&&(ce=Re);break}e&&ce&&Me.alternate===null&&t(D,ce),M=s(Me,M,be),ke===null?he=Me:ke.sibling=Me,ke=Me,ce=Re}if(be===U.length)return n(D,ce),Ne&&jn(D,be),he;if(ce===null){for(;be<U.length;be++)ce=$(D,U[be],J),ce!==null&&(M=s(ce,M,be),ke===null?he=ce:ke.sibling=ce,ke=ce);return Ne&&jn(D,be),he}for(ce=a(ce);be<U.length;be++)Re=I(ce,D,be,U[be],J),Re!==null&&(e&&Re.alternate!==null&&ce.delete(Re.key===null?be:Re.key),M=s(Re,M,be),ke===null?he=Re:ke.sibling=Re,ke=Re);return e&&ce.forEach(function(gl){return t(D,gl)}),Ne&&jn(D,be),he}function me(D,M,U,J){if(U==null)throw Error(u(151));for(var he=null,ke=null,ce=M,be=M=0,Re=null,Me=U.next();ce!==null&&!Me.done;be++,Me=U.next()){ce.index>be?(Re=ce,ce=null):Re=ce.sibling;var gl=Y(D,ce,Me.value,J);if(gl===null){ce===null&&(ce=Re);break}e&&ce&&gl.alternate===null&&t(D,ce),M=s(gl,M,be),ke===null?he=gl:ke.sibling=gl,ke=gl,ce=Re}if(Me.done)return n(D,ce),Ne&&jn(D,be),he;if(ce===null){for(;!Me.done;be++,Me=U.next())Me=$(D,Me.value,J),Me!==null&&(M=s(Me,M,be),ke===null?he=Me:ke.sibling=Me,ke=Me);return Ne&&jn(D,be),he}for(ce=a(ce);!Me.done;be++,Me=U.next())Me=I(ce,D,be,Me.value,J),Me!==null&&(e&&Me.alternate!==null&&ce.delete(Me.key===null?be:Me.key),M=s(Me,M,be),ke===null?he=Me:ke.sibling=Me,ke=Me);return e&&ce.forEach(function(Xx){return t(D,Xx)}),Ne&&jn(D,be),he}function Ve(D,M,U,J){if(typeof U=="object"&&U!==null&&U.type===j&&U.key===null&&(U=U.props.children),typeof U=="object"&&U!==null){switch(U.$$typeof){case b:e:{for(var he=U.key;M!==null;){if(M.key===he){if(he=U.type,he===j){if(M.tag===7){n(D,M.sibling),J=o(M,U.props.children),J.return=D,D=J;break e}}else if(M.elementType===he||typeof he=="object"&&he!==null&&he.$$typeof===q&&Nl(he)===M.type){n(D,M.sibling),J=o(M,U.props),li(J,U),J.return=D,D=J;break e}n(D,M);break}else t(D,M);M=M.sibling}U.type===j?(J=wl(U.props.children,D.mode,J,U.key),J.return=D,D=J):(J=pr(U.type,U.key,U.props,null,D.mode,J),li(J,U),J.return=D,D=J)}return x(D);case R:e:{for(he=U.key;M!==null;){if(M.key===he)if(M.tag===4&&M.stateNode.containerInfo===U.containerInfo&&M.stateNode.implementation===U.implementation){n(D,M.sibling),J=o(M,U.children||[]),J.return=D,D=J;break e}else{n(D,M);break}else t(D,M);M=M.sibling}J=po(U,D.mode,J),J.return=D,D=J}return x(D);case q:return U=Nl(U),Ve(D,M,U,J)}if(P(U))return oe(D,M,U,J);if(ue(U)){if(he=ue(U),typeof he!="function")throw Error(u(150));return U=he.call(U),me(D,M,U,J)}if(typeof U.then=="function")return Ve(D,M,Sr(U),J);if(U.$$typeof===_)return Ve(D,M,yr(D,U),J);Er(D,U)}return typeof U=="string"&&U!==""||typeof U=="number"||typeof U=="bigint"?(U=""+U,M!==null&&M.tag===6?(n(D,M.sibling),J=o(M,U),J.return=D,D=J):(n(D,M),J=ho(U,D.mode,J),J.return=D,D=J),x(D)):n(D,M)}return function(D,M,U,J){try{ni=0;var he=Ve(D,M,U,J);return ca=null,he}catch(ce){if(ce===sa||ce===xr)throw ce;var ke=Ut(29,ce,null,D.mode);return ke.lanes=J,ke.return=D,ke}}}var Ml=vd(!0),xd=vd(!1),Wn=!1;function jo(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Ao(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function el(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function tl(e,t,n){var a=e.updateQueue;if(a===null)return null;if(a=a.shared,(_e&2)!==0){var o=a.pending;return o===null?t.next=t:(t.next=o.next,o.next=t),a.pending=t,t=hr(e),nd(e,null,n),t}return dr(e,a,t,n),hr(e)}function ai(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194048)!==0)){var a=t.lanes;a&=e.pendingLanes,n|=a,t.lanes=n,cf(e,n)}}function zo(e,t){var n=e.updateQueue,a=e.alternate;if(a!==null&&(a=a.updateQueue,n===a)){var o=null,s=null;if(n=n.firstBaseUpdate,n!==null){do{var x={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};s===null?o=s=x:s=s.next=x,n=n.next}while(n!==null);s===null?o=s=t:s=s.next=t}else o=s=t;n={baseState:a.baseState,firstBaseUpdate:o,lastBaseUpdate:s,shared:a.shared,callbacks:a.callbacks},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}var Ro=!1;function ii(){if(Ro){var e=oa;if(e!==null)throw e}}function ri(e,t,n,a){Ro=!1;var o=e.updateQueue;Wn=!1;var s=o.firstBaseUpdate,x=o.lastBaseUpdate,E=o.shared.pending;if(E!==null){o.shared.pending=null;var N=E,H=N.next;N.next=null,x===null?s=H:x.next=H,x=N;var Z=e.alternate;Z!==null&&(Z=Z.updateQueue,E=Z.lastBaseUpdate,E!==x&&(E===null?Z.firstBaseUpdate=H:E.next=H,Z.lastBaseUpdate=N))}if(s!==null){var $=o.baseState;x=0,Z=H=N=null,E=s;do{var Y=E.lane&-536870913,I=Y!==E.lane;if(I?(ze&Y)===Y:(a&Y)===Y){Y!==0&&Y===ua&&(Ro=!0),Z!==null&&(Z=Z.next={lane:0,tag:E.tag,payload:E.payload,callback:null,next:null});e:{var oe=e,me=E;Y=t;var Ve=n;switch(me.tag){case 1:if(oe=me.payload,typeof oe=="function"){$=oe.call(Ve,$,Y);break e}$=oe;break e;case 3:oe.flags=oe.flags&-65537|128;case 0:if(oe=me.payload,Y=typeof oe=="function"?oe.call(Ve,$,Y):oe,Y==null)break e;$=v({},$,Y);break e;case 2:Wn=!0}}Y=E.callback,Y!==null&&(e.flags|=64,I&&(e.flags|=8192),I=o.callbacks,I===null?o.callbacks=[Y]:I.push(Y))}else I={lane:Y,tag:E.tag,payload:E.payload,callback:E.callback,next:null},Z===null?(H=Z=I,N=$):Z=Z.next=I,x|=Y;if(E=E.next,E===null){if(E=o.shared.pending,E===null)break;I=E,E=I.next,I.next=null,o.lastBaseUpdate=I,o.shared.pending=null}}while(!0);Z===null&&(N=$),o.baseState=N,o.firstBaseUpdate=H,o.lastBaseUpdate=Z,s===null&&(o.shared.lanes=0),rl|=x,e.lanes=x,e.memoizedState=$}}function bd(e,t){if(typeof e!="function")throw Error(u(191,e));e.call(t)}function Sd(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;e<n.length;e++)bd(n[e],t)}var fa=z(null),Cr=z(0);function Ed(e,t){e=Bn,w(Cr,e),w(fa,t),Bn=e|t.baseLanes}function No(){w(Cr,Bn),w(fa,fa.current)}function ko(){Bn=Cr.current,V(fa),V(Cr)}var Ht=z(null),en=null;function nl(e){var t=e.alternate;w(tt,tt.current&1),w(Ht,e),en===null&&(t===null||fa.current!==null||t.memoizedState!==null)&&(en=e)}function Mo(e){w(tt,tt.current),w(Ht,e),en===null&&(en=e)}function Cd(e){e.tag===22?(w(tt,tt.current),w(Ht,e),en===null&&(en=e)):ll()}function ll(){w(tt,tt.current),w(Ht,Ht.current)}function qt(e){V(Ht),en===e&&(en=null),V(tt)}var tt=z(0);function Tr(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||Us(n)||Hs(n)))return t}else if(t.tag===19&&(t.memoizedProps.revealOrder==="forwards"||t.memoizedProps.revealOrder==="backwards"||t.memoizedProps.revealOrder==="unstable_legacy-backwards"||t.memoizedProps.revealOrder==="together")){if((t.flags&128)!==0)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var Rn=0,xe=null,qe=null,it=null,wr=!1,da=!1,_l=!1,jr=0,ui=0,ha=null,Lv=0;function $e(){throw Error(u(321))}function _o(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!Bt(e[n],t[n]))return!1;return!0}function Oo(e,t,n,a,o,s){return Rn=s,xe=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,B.H=e===null||e.memoizedState===null?rh:Fo,_l=!1,s=n(a,o),_l=!1,da&&(s=wd(t,n,a,o)),Td(e),s}function Td(e){B.H=ci;var t=qe!==null&&qe.next!==null;if(Rn=0,it=qe=xe=null,wr=!1,ui=0,ha=null,t)throw Error(u(300));e===null||rt||(e=e.dependencies,e!==null&&gr(e)&&(rt=!0))}function wd(e,t,n,a){xe=e;var o=0;do{if(da&&(ha=null),ui=0,da=!1,25<=o)throw Error(u(301));if(o+=1,it=qe=null,e.updateQueue!=null){var s=e.updateQueue;s.lastEffect=null,s.events=null,s.stores=null,s.memoCache!=null&&(s.memoCache.index=0)}B.H=uh,s=t(n,a)}while(da);return s}function Bv(){var e=B.H,t=e.useState()[0];return t=typeof t.then=="function"?oi(t):t,e=e.useState()[0],(qe!==null?qe.memoizedState:null)!==e&&(xe.flags|=1024),t}function Do(){var e=jr!==0;return jr=0,e}function Lo(e,t,n){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n}function Bo(e){if(wr){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}wr=!1}Rn=0,it=qe=xe=null,da=!1,ui=jr=0,ha=null}function Ct(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return it===null?xe.memoizedState=it=e:it=it.next=e,it}function nt(){if(qe===null){var e=xe.alternate;e=e!==null?e.memoizedState:null}else e=qe.next;var t=it===null?xe.memoizedState:it.next;if(t!==null)it=t,qe=e;else{if(e===null)throw xe.alternate===null?Error(u(467)):Error(u(310));qe=e,e={memoizedState:qe.memoizedState,baseState:qe.baseState,baseQueue:qe.baseQueue,queue:qe.queue,next:null},it===null?xe.memoizedState=it=e:it=it.next=e}return it}function Ar(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function oi(e){var t=ui;return ui+=1,ha===null&&(ha=[]),e=md(ha,e,t),t=xe,(it===null?t.memoizedState:it.next)===null&&(t=t.alternate,B.H=t===null||t.memoizedState===null?rh:Fo),e}function zr(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return oi(e);if(e.$$typeof===_)return gt(e)}throw Error(u(438,String(e)))}function Uo(e){var t=null,n=xe.updateQueue;if(n!==null&&(t=n.memoCache),t==null){var a=xe.alternate;a!==null&&(a=a.updateQueue,a!==null&&(a=a.memoCache,a!=null&&(t={data:a.data.map(function(o){return o.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),n===null&&(n=Ar(),xe.updateQueue=n),n.memoCache=t,n=t.data[t.index],n===void 0)for(n=t.data[t.index]=Array(e),a=0;a<e;a++)n[a]=se;return t.index++,n}function Nn(e,t){return typeof t=="function"?t(e):t}function Rr(e){var t=nt();return Ho(t,qe,e)}function Ho(e,t,n){var a=e.queue;if(a===null)throw Error(u(311));a.lastRenderedReducer=n;var o=e.baseQueue,s=a.pending;if(s!==null){if(o!==null){var x=o.next;o.next=s.next,s.next=x}t.baseQueue=o=s,a.pending=null}if(s=e.baseState,o===null)e.memoizedState=s;else{t=o.next;var E=x=null,N=null,H=t,Z=!1;do{var $=H.lane&-536870913;if($!==H.lane?(ze&$)===$:(Rn&$)===$){var Y=H.revertLane;if(Y===0)N!==null&&(N=N.next={lane:0,revertLane:0,gesture:null,action:H.action,hasEagerState:H.hasEagerState,eagerState:H.eagerState,next:null}),$===ua&&(Z=!0);else if((Rn&Y)===Y){H=H.next,Y===ua&&(Z=!0);continue}else $={lane:0,revertLane:H.revertLane,gesture:null,action:H.action,hasEagerState:H.hasEagerState,eagerState:H.eagerState,next:null},N===null?(E=N=$,x=s):N=N.next=$,xe.lanes|=Y,rl|=Y;$=H.action,_l&&n(s,$),s=H.hasEagerState?H.eagerState:n(s,$)}else Y={lane:$,revertLane:H.revertLane,gesture:H.gesture,action:H.action,hasEagerState:H.hasEagerState,eagerState:H.eagerState,next:null},N===null?(E=N=Y,x=s):N=N.next=Y,xe.lanes|=$,rl|=$;H=H.next}while(H!==null&&H!==t);if(N===null?x=s:N.next=E,!Bt(s,e.memoizedState)&&(rt=!0,Z&&(n=oa,n!==null)))throw n;e.memoizedState=s,e.baseState=x,e.baseQueue=N,a.lastRenderedState=s}return o===null&&(a.lanes=0),[e.memoizedState,a.dispatch]}function qo(e){var t=nt(),n=t.queue;if(n===null)throw Error(u(311));n.lastRenderedReducer=e;var a=n.dispatch,o=n.pending,s=t.memoizedState;if(o!==null){n.pending=null;var x=o=o.next;do s=e(s,x.action),x=x.next;while(x!==o);Bt(s,t.memoizedState)||(rt=!0),t.memoizedState=s,t.baseQueue===null&&(t.baseState=s),n.lastRenderedState=s}return[s,a]}function jd(e,t,n){var a=xe,o=nt(),s=Ne;if(s){if(n===void 0)throw Error(u(407));n=n()}else n=t();var x=!Bt((qe||o).memoizedState,n);if(x&&(o.memoizedState=n,rt=!0),o=o.queue,Go(Rd.bind(null,a,o,e),[e]),o.getSnapshot!==t||x||it!==null&&it.memoizedState.tag&1){if(a.flags|=2048,pa(9,{destroy:void 0},zd.bind(null,a,o,n,t),null),Ie===null)throw Error(u(349));s||(Rn&127)!==0||Ad(a,t,n)}return n}function Ad(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=xe.updateQueue,t===null?(t=Ar(),xe.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function zd(e,t,n,a){t.value=n,t.getSnapshot=a,Nd(t)&&kd(e)}function Rd(e,t,n){return n(function(){Nd(t)&&kd(e)})}function Nd(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Bt(e,n)}catch{return!0}}function kd(e){var t=Tl(e,2);t!==null&&kt(t,e,2)}function Yo(e){var t=Ct();if(typeof e=="function"){var n=e;if(e=n(),_l){Tt(!0);try{n()}finally{Tt(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Nn,lastRenderedState:e},t}function Md(e,t,n,a){return e.baseState=n,Ho(e,qe,typeof a=="function"?a:Nn)}function Uv(e,t,n,a,o){if(Mr(e))throw Error(u(485));if(e=t.action,e!==null){var s={payload:o,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(x){s.listeners.push(x)}};B.T!==null?n(!0):s.isTransition=!1,a(s),n=t.pending,n===null?(s.next=t.pending=s,_d(t,s)):(s.next=n.next,t.pending=n.next=s)}}function _d(e,t){var n=t.action,a=t.payload,o=e.state;if(t.isTransition){var s=B.T,x={};B.T=x;try{var E=n(o,a),N=B.S;N!==null&&N(x,E),Od(e,t,E)}catch(H){Vo(e,t,H)}finally{s!==null&&x.types!==null&&(s.types=x.types),B.T=s}}else try{s=n(o,a),Od(e,t,s)}catch(H){Vo(e,t,H)}}function Od(e,t,n){n!==null&&typeof n=="object"&&typeof n.then=="function"?n.then(function(a){Dd(e,t,a)},function(a){return Vo(e,t,a)}):Dd(e,t,n)}function Dd(e,t,n){t.status="fulfilled",t.value=n,Ld(t),e.state=n,t=e.pending,t!==null&&(n=t.next,n===t?e.pending=null:(n=n.next,t.next=n,_d(e,n)))}function Vo(e,t,n){var a=e.pending;if(e.pending=null,a!==null){a=a.next;do t.status="rejected",t.reason=n,Ld(t),t=t.next;while(t!==a)}e.action=null}function Ld(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function Bd(e,t){return t}function Ud(e,t){if(Ne){var n=Ie.formState;if(n!==null){e:{var a=xe;if(Ne){if(Ze){t:{for(var o=Ze,s=Wt;o.nodeType!==8;){if(!s){o=null;break t}if(o=tn(o.nextSibling),o===null){o=null;break t}}s=o.data,o=s==="F!"||s==="F"?o:null}if(o){Ze=tn(o.nextSibling),a=o.data==="F!";break e}}Pn(a)}a=!1}a&&(t=n[0])}}return n=Ct(),n.memoizedState=n.baseState=t,a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Bd,lastRenderedState:t},n.queue=a,n=lh.bind(null,xe,a),a.dispatch=n,a=Yo(!1),s=Ko.bind(null,xe,!1,a.queue),a=Ct(),o={state:t,dispatch:null,action:e,pending:null},a.queue=o,n=Uv.bind(null,xe,o,s,n),o.dispatch=n,a.memoizedState=e,[t,n,!1]}function Hd(e){var t=nt();return qd(t,qe,e)}function qd(e,t,n){if(t=Ho(e,t,Bd)[0],e=Rr(Nn)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var a=oi(t)}catch(x){throw x===sa?xr:x}else a=t;t=nt();var o=t.queue,s=o.dispatch;return n!==t.memoizedState&&(xe.flags|=2048,pa(9,{destroy:void 0},Hv.bind(null,o,n),null)),[a,s,e]}function Hv(e,t){e.action=t}function Yd(e){var t=nt(),n=qe;if(n!==null)return qd(t,n,e);nt(),t=t.memoizedState,n=nt();var a=n.queue.dispatch;return n.memoizedState=e,[t,a,!1]}function pa(e,t,n,a){return e={tag:e,create:n,deps:a,inst:t,next:null},t=xe.updateQueue,t===null&&(t=Ar(),xe.updateQueue=t),n=t.lastEffect,n===null?t.lastEffect=e.next=e:(a=n.next,n.next=e,e.next=a,t.lastEffect=e),e}function Vd(){return nt().memoizedState}function Nr(e,t,n,a){var o=Ct();xe.flags|=e,o.memoizedState=pa(1|t,{destroy:void 0},n,a===void 0?null:a)}function kr(e,t,n,a){var o=nt();a=a===void 0?null:a;var s=o.memoizedState.inst;qe!==null&&a!==null&&_o(a,qe.memoizedState.deps)?o.memoizedState=pa(t,s,n,a):(xe.flags|=e,o.memoizedState=pa(1|t,s,n,a))}function Gd(e,t){Nr(8390656,8,e,t)}function Go(e,t){kr(2048,8,e,t)}function qv(e){xe.flags|=4;var t=xe.updateQueue;if(t===null)t=Ar(),xe.updateQueue=t,t.events=[e];else{var n=t.events;n===null?t.events=[e]:n.push(e)}}function Id(e){var t=nt().memoizedState;return qv({ref:t,nextImpl:e}),function(){if((_e&2)!==0)throw Error(u(440));return t.impl.apply(void 0,arguments)}}function Qd(e,t){return kr(4,2,e,t)}function Xd(e,t){return kr(4,4,e,t)}function Zd(e,t){if(typeof t=="function"){e=e();var n=t(e);return function(){typeof n=="function"?n():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function Kd(e,t,n){n=n!=null?n.concat([e]):null,kr(4,4,Zd.bind(null,t,e),n)}function Io(){}function Fd(e,t){var n=nt();t=t===void 0?null:t;var a=n.memoizedState;return t!==null&&_o(t,a[1])?a[0]:(n.memoizedState=[e,t],e)}function Jd(e,t){var n=nt();t=t===void 0?null:t;var a=n.memoizedState;if(t!==null&&_o(t,a[1]))return a[0];if(a=e(),_l){Tt(!0);try{e()}finally{Tt(!1)}}return n.memoizedState=[a,t],a}function Qo(e,t,n){return n===void 0||(Rn&1073741824)!==0&&(ze&261930)===0?e.memoizedState=t:(e.memoizedState=n,e=Ph(),xe.lanes|=e,rl|=e,n)}function Pd(e,t,n,a){return Bt(n,t)?n:fa.current!==null?(e=Qo(e,n,a),Bt(e,t)||(rt=!0),e):(Rn&42)===0||(Rn&1073741824)!==0&&(ze&261930)===0?(rt=!0,e.memoizedState=n):(e=Ph(),xe.lanes|=e,rl|=e,t)}function $d(e,t,n,a,o){var s=ee.p;ee.p=s!==0&&8>s?s:8;var x=B.T,E={};B.T=E,Ko(e,!1,t,n);try{var N=o(),H=B.S;if(H!==null&&H(E,N),N!==null&&typeof N=="object"&&typeof N.then=="function"){var Z=Dv(N,a);si(e,t,Z,Gt(e))}else si(e,t,a,Gt(e))}catch($){si(e,t,{then:function(){},status:"rejected",reason:$},Gt())}finally{ee.p=s,x!==null&&E.types!==null&&(x.types=E.types),B.T=x}}function Yv(){}function Xo(e,t,n,a){if(e.tag!==5)throw Error(u(476));var o=Wd(e).queue;$d(e,o,t,K,n===null?Yv:function(){return eh(e),n(a)})}function Wd(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:K,baseState:K,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Nn,lastRenderedState:K},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Nn,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function eh(e){var t=Wd(e);t.next===null&&(t=e.alternate.memoizedState),si(e,t.next.queue,{},Gt())}function Zo(){return gt(ji)}function th(){return nt().memoizedState}function nh(){return nt().memoizedState}function Vv(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=Gt();e=el(n);var a=tl(t,e,n);a!==null&&(kt(a,t,n),ai(a,t,n)),t={cache:Eo()},e.payload=t;return}t=t.return}}function Gv(e,t,n){var a=Gt();n={lane:a,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},Mr(e)?ah(t,n):(n=co(e,t,n,a),n!==null&&(kt(n,e,a),ih(n,t,a)))}function lh(e,t,n){var a=Gt();si(e,t,n,a)}function si(e,t,n,a){var o={lane:a,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(Mr(e))ah(t,o);else{var s=e.alternate;if(e.lanes===0&&(s===null||s.lanes===0)&&(s=t.lastRenderedReducer,s!==null))try{var x=t.lastRenderedState,E=s(x,n);if(o.hasEagerState=!0,o.eagerState=E,Bt(E,x))return dr(e,t,o,0),Ie===null&&fr(),!1}catch{}if(n=co(e,t,o,a),n!==null)return kt(n,e,a),ih(n,t,a),!0}return!1}function Ko(e,t,n,a){if(a={lane:2,revertLane:js(),gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null},Mr(e)){if(t)throw Error(u(479))}else t=co(e,n,a,2),t!==null&&kt(t,e,2)}function Mr(e){var t=e.alternate;return e===xe||t!==null&&t===xe}function ah(e,t){da=wr=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function ih(e,t,n){if((n&4194048)!==0){var a=t.lanes;a&=e.pendingLanes,n|=a,t.lanes=n,cf(e,n)}}var ci={readContext:gt,use:zr,useCallback:$e,useContext:$e,useEffect:$e,useImperativeHandle:$e,useLayoutEffect:$e,useInsertionEffect:$e,useMemo:$e,useReducer:$e,useRef:$e,useState:$e,useDebugValue:$e,useDeferredValue:$e,useTransition:$e,useSyncExternalStore:$e,useId:$e,useHostTransitionStatus:$e,useFormState:$e,useActionState:$e,useOptimistic:$e,useMemoCache:$e,useCacheRefresh:$e};ci.useEffectEvent=$e;var rh={readContext:gt,use:zr,useCallback:function(e,t){return Ct().memoizedState=[e,t===void 0?null:t],e},useContext:gt,useEffect:Gd,useImperativeHandle:function(e,t,n){n=n!=null?n.concat([e]):null,Nr(4194308,4,Zd.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Nr(4194308,4,e,t)},useInsertionEffect:function(e,t){Nr(4,2,e,t)},useMemo:function(e,t){var n=Ct();t=t===void 0?null:t;var a=e();if(_l){Tt(!0);try{e()}finally{Tt(!1)}}return n.memoizedState=[a,t],a},useReducer:function(e,t,n){var a=Ct();if(n!==void 0){var o=n(t);if(_l){Tt(!0);try{n(t)}finally{Tt(!1)}}}else o=t;return a.memoizedState=a.baseState=o,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:o},a.queue=e,e=e.dispatch=Gv.bind(null,xe,e),[a.memoizedState,e]},useRef:function(e){var t=Ct();return e={current:e},t.memoizedState=e},useState:function(e){e=Yo(e);var t=e.queue,n=lh.bind(null,xe,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:Io,useDeferredValue:function(e,t){var n=Ct();return Qo(n,e,t)},useTransition:function(){var e=Yo(!1);return e=$d.bind(null,xe,e.queue,!0,!1),Ct().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var a=xe,o=Ct();if(Ne){if(n===void 0)throw Error(u(407));n=n()}else{if(n=t(),Ie===null)throw Error(u(349));(ze&127)!==0||Ad(a,t,n)}o.memoizedState=n;var s={value:n,getSnapshot:t};return o.queue=s,Gd(Rd.bind(null,a,s,e),[e]),a.flags|=2048,pa(9,{destroy:void 0},zd.bind(null,a,s,n,t),null),n},useId:function(){var e=Ct(),t=Ie.identifierPrefix;if(Ne){var n=hn,a=dn;n=(a&~(1<<32-Ge(a)-1)).toString(32)+n,t="_"+t+"R_"+n,n=jr++,0<n&&(t+="H"+n.toString(32)),t+="_"}else n=Lv++,t="_"+t+"r_"+n.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:Zo,useFormState:Ud,useActionState:Ud,useOptimistic:function(e){var t=Ct();t.memoizedState=t.baseState=e;var n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=n,t=Ko.bind(null,xe,!0,n),n.dispatch=t,[e,t]},useMemoCache:Uo,useCacheRefresh:function(){return Ct().memoizedState=Vv.bind(null,xe)},useEffectEvent:function(e){var t=Ct(),n={impl:e};return t.memoizedState=n,function(){if((_e&2)!==0)throw Error(u(440));return n.impl.apply(void 0,arguments)}}},Fo={readContext:gt,use:zr,useCallback:Fd,useContext:gt,useEffect:Go,useImperativeHandle:Kd,useInsertionEffect:Qd,useLayoutEffect:Xd,useMemo:Jd,useReducer:Rr,useRef:Vd,useState:function(){return Rr(Nn)},useDebugValue:Io,useDeferredValue:function(e,t){var n=nt();return Pd(n,qe.memoizedState,e,t)},useTransition:function(){var e=Rr(Nn)[0],t=nt().memoizedState;return[typeof e=="boolean"?e:oi(e),t]},useSyncExternalStore:jd,useId:th,useHostTransitionStatus:Zo,useFormState:Hd,useActionState:Hd,useOptimistic:function(e,t){var n=nt();return Md(n,qe,e,t)},useMemoCache:Uo,useCacheRefresh:nh};Fo.useEffectEvent=Id;var uh={readContext:gt,use:zr,useCallback:Fd,useContext:gt,useEffect:Go,useImperativeHandle:Kd,useInsertionEffect:Qd,useLayoutEffect:Xd,useMemo:Jd,useReducer:qo,useRef:Vd,useState:function(){return qo(Nn)},useDebugValue:Io,useDeferredValue:function(e,t){var n=nt();return qe===null?Qo(n,e,t):Pd(n,qe.memoizedState,e,t)},useTransition:function(){var e=qo(Nn)[0],t=nt().memoizedState;return[typeof e=="boolean"?e:oi(e),t]},useSyncExternalStore:jd,useId:th,useHostTransitionStatus:Zo,useFormState:Yd,useActionState:Yd,useOptimistic:function(e,t){var n=nt();return qe!==null?Md(n,qe,e,t):(n.baseState=e,[e,n.queue.dispatch])},useMemoCache:Uo,useCacheRefresh:nh};uh.useEffectEvent=Id;function Jo(e,t,n,a){t=e.memoizedState,n=n(a,t),n=n==null?t:v({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var Po={enqueueSetState:function(e,t,n){e=e._reactInternals;var a=Gt(),o=el(a);o.payload=t,n!=null&&(o.callback=n),t=tl(e,o,a),t!==null&&(kt(t,e,a),ai(t,e,a))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var a=Gt(),o=el(a);o.tag=1,o.payload=t,n!=null&&(o.callback=n),t=tl(e,o,a),t!==null&&(kt(t,e,a),ai(t,e,a))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=Gt(),a=el(n);a.tag=2,t!=null&&(a.callback=t),t=tl(e,a,n),t!==null&&(kt(t,e,n),ai(t,e,n))}};function oh(e,t,n,a,o,s,x){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(a,s,x):t.prototype&&t.prototype.isPureReactComponent?!Ja(n,a)||!Ja(o,s):!0}function sh(e,t,n,a){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(n,a),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(n,a),t.state!==e&&Po.enqueueReplaceState(t,t.state,null)}function Ol(e,t){var n=t;if("ref"in t){n={};for(var a in t)a!=="ref"&&(n[a]=t[a])}if(e=e.defaultProps){n===t&&(n=v({},n));for(var o in e)n[o]===void 0&&(n[o]=e[o])}return n}function ch(e){cr(e)}function fh(e){console.error(e)}function dh(e){cr(e)}function _r(e,t){try{var n=e.onUncaughtError;n(t.value,{componentStack:t.stack})}catch(a){setTimeout(function(){throw a})}}function hh(e,t,n){try{var a=e.onCaughtError;a(n.value,{componentStack:n.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(o){setTimeout(function(){throw o})}}function $o(e,t,n){return n=el(n),n.tag=3,n.payload={element:null},n.callback=function(){_r(e,t)},n}function ph(e){return e=el(e),e.tag=3,e}function mh(e,t,n,a){var o=n.type.getDerivedStateFromError;if(typeof o=="function"){var s=a.value;e.payload=function(){return o(s)},e.callback=function(){hh(t,n,a)}}var x=n.stateNode;x!==null&&typeof x.componentDidCatch=="function"&&(e.callback=function(){hh(t,n,a),typeof o!="function"&&(ul===null?ul=new Set([this]):ul.add(this));var E=a.stack;this.componentDidCatch(a.value,{componentStack:E!==null?E:""})})}function Iv(e,t,n,a,o){if(n.flags|=32768,a!==null&&typeof a=="object"&&typeof a.then=="function"){if(t=n.alternate,t!==null&&ra(t,n,o,!0),n=Ht.current,n!==null){switch(n.tag){case 31:case 13:return en===null?Qr():n.alternate===null&&We===0&&(We=3),n.flags&=-257,n.flags|=65536,n.lanes=o,a===br?n.flags|=16384:(t=n.updateQueue,t===null?n.updateQueue=new Set([a]):t.add(a),Cs(e,a,o)),!1;case 22:return n.flags|=65536,a===br?n.flags|=16384:(t=n.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([a])},n.updateQueue=t):(n=t.retryQueue,n===null?t.retryQueue=new Set([a]):n.add(a)),Cs(e,a,o)),!1}throw Error(u(435,n.tag))}return Cs(e,a,o),Qr(),!1}if(Ne)return t=Ht.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=o,a!==yo&&(e=Error(u(422),{cause:a}),Wa(Jt(e,n)))):(a!==yo&&(t=Error(u(423),{cause:a}),Wa(Jt(t,n))),e=e.current.alternate,e.flags|=65536,o&=-o,e.lanes|=o,a=Jt(a,n),o=$o(e.stateNode,a,o),zo(e,o),We!==4&&(We=2)),!1;var s=Error(u(520),{cause:a});if(s=Jt(s,n),vi===null?vi=[s]:vi.push(s),We!==4&&(We=2),t===null)return!0;a=Jt(a,n),n=t;do{switch(n.tag){case 3:return n.flags|=65536,e=o&-o,n.lanes|=e,e=$o(n.stateNode,a,e),zo(n,e),!1;case 1:if(t=n.type,s=n.stateNode,(n.flags&128)===0&&(typeof t.getDerivedStateFromError=="function"||s!==null&&typeof s.componentDidCatch=="function"&&(ul===null||!ul.has(s))))return n.flags|=65536,o&=-o,n.lanes|=o,o=ph(o),mh(o,e,n,a),zo(n,o),!1}n=n.return}while(n!==null);return!1}var Wo=Error(u(461)),rt=!1;function yt(e,t,n,a){t.child=e===null?xd(t,null,n,a):Ml(t,e.child,n,a)}function gh(e,t,n,a,o){n=n.render;var s=t.ref;if("ref"in a){var x={};for(var E in a)E!=="ref"&&(x[E]=a[E])}else x=a;return zl(t),a=Oo(e,t,n,x,s,o),E=Do(),e!==null&&!rt?(Lo(e,t,o),kn(e,t,o)):(Ne&&E&&mo(t),t.flags|=1,yt(e,t,a,o),t.child)}function yh(e,t,n,a,o){if(e===null){var s=n.type;return typeof s=="function"&&!fo(s)&&s.defaultProps===void 0&&n.compare===null?(t.tag=15,t.type=s,vh(e,t,s,a,o)):(e=pr(n.type,null,a,t,t.mode,o),e.ref=t.ref,e.return=t,t.child=e)}if(s=e.child,!us(e,o)){var x=s.memoizedProps;if(n=n.compare,n=n!==null?n:Ja,n(x,a)&&e.ref===t.ref)return kn(e,t,o)}return t.flags|=1,e=wn(s,a),e.ref=t.ref,e.return=t,t.child=e}function vh(e,t,n,a,o){if(e!==null){var s=e.memoizedProps;if(Ja(s,a)&&e.ref===t.ref)if(rt=!1,t.pendingProps=a=s,us(e,o))(e.flags&131072)!==0&&(rt=!0);else return t.lanes=e.lanes,kn(e,t,o)}return es(e,t,n,a,o)}function xh(e,t,n,a){var o=a.children,s=e!==null?e.memoizedState:null;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),a.mode==="hidden"){if((t.flags&128)!==0){if(s=s!==null?s.baseLanes|n:n,e!==null){for(a=t.child=e.child,o=0;a!==null;)o=o|a.lanes|a.childLanes,a=a.sibling;a=o&~s}else a=0,t.child=null;return bh(e,t,s,n,a)}if((n&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&vr(t,s!==null?s.cachePool:null),s!==null?Ed(t,s):No(),Cd(t);else return a=t.lanes=536870912,bh(e,t,s!==null?s.baseLanes|n:n,n,a)}else s!==null?(vr(t,s.cachePool),Ed(t,s),ll(),t.memoizedState=null):(e!==null&&vr(t,null),No(),ll());return yt(e,t,o,n),t.child}function fi(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function bh(e,t,n,a,o){var s=To();return s=s===null?null:{parent:at._currentValue,pool:s},t.memoizedState={baseLanes:n,cachePool:s},e!==null&&vr(t,null),No(),Cd(t),e!==null&&ra(e,t,a,!0),t.childLanes=o,null}function Or(e,t){return t=Lr({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function Sh(e,t,n){return Ml(t,e.child,null,n),e=Or(t,t.pendingProps),e.flags|=2,qt(t),t.memoizedState=null,e}function Qv(e,t,n){var a=t.pendingProps,o=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(Ne){if(a.mode==="hidden")return e=Or(t,a),t.lanes=536870912,fi(null,e);if(Mo(t),(e=Ze)?(e=_p(e,Wt),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Fn!==null?{id:dn,overflow:hn}:null,retryLane:536870912,hydrationErrors:null},n=ad(e),n.return=t,t.child=n,mt=t,Ze=null)):e=null,e===null)throw Pn(t);return t.lanes=536870912,null}return Or(t,a)}var s=e.memoizedState;if(s!==null){var x=s.dehydrated;if(Mo(t),o)if(t.flags&256)t.flags&=-257,t=Sh(e,t,n);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(u(558));else if(rt||ra(e,t,n,!1),o=(n&e.childLanes)!==0,rt||o){if(a=Ie,a!==null&&(x=ff(a,n),x!==0&&x!==s.retryLane))throw s.retryLane=x,Tl(e,x),kt(a,e,x),Wo;Qr(),t=Sh(e,t,n)}else e=s.treeContext,Ze=tn(x.nextSibling),mt=t,Ne=!0,Jn=null,Wt=!1,e!==null&&ud(t,e),t=Or(t,a),t.flags|=4096;return t}return e=wn(e.child,{mode:a.mode,children:a.children}),e.ref=t.ref,t.child=e,e.return=t,e}function Dr(e,t){var n=t.ref;if(n===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof n!="function"&&typeof n!="object")throw Error(u(284));(e===null||e.ref!==n)&&(t.flags|=4194816)}}function es(e,t,n,a,o){return zl(t),n=Oo(e,t,n,a,void 0,o),a=Do(),e!==null&&!rt?(Lo(e,t,o),kn(e,t,o)):(Ne&&a&&mo(t),t.flags|=1,yt(e,t,n,o),t.child)}function Eh(e,t,n,a,o,s){return zl(t),t.updateQueue=null,n=wd(t,a,n,o),Td(e),a=Do(),e!==null&&!rt?(Lo(e,t,s),kn(e,t,s)):(Ne&&a&&mo(t),t.flags|=1,yt(e,t,n,s),t.child)}function Ch(e,t,n,a,o){if(zl(t),t.stateNode===null){var s=na,x=n.contextType;typeof x=="object"&&x!==null&&(s=gt(x)),s=new n(a,s),t.memoizedState=s.state!==null&&s.state!==void 0?s.state:null,s.updater=Po,t.stateNode=s,s._reactInternals=t,s=t.stateNode,s.props=a,s.state=t.memoizedState,s.refs={},jo(t),x=n.contextType,s.context=typeof x=="object"&&x!==null?gt(x):na,s.state=t.memoizedState,x=n.getDerivedStateFromProps,typeof x=="function"&&(Jo(t,n,x,a),s.state=t.memoizedState),typeof n.getDerivedStateFromProps=="function"||typeof s.getSnapshotBeforeUpdate=="function"||typeof s.UNSAFE_componentWillMount!="function"&&typeof s.componentWillMount!="function"||(x=s.state,typeof s.componentWillMount=="function"&&s.componentWillMount(),typeof s.UNSAFE_componentWillMount=="function"&&s.UNSAFE_componentWillMount(),x!==s.state&&Po.enqueueReplaceState(s,s.state,null),ri(t,a,s,o),ii(),s.state=t.memoizedState),typeof s.componentDidMount=="function"&&(t.flags|=4194308),a=!0}else if(e===null){s=t.stateNode;var E=t.memoizedProps,N=Ol(n,E);s.props=N;var H=s.context,Z=n.contextType;x=na,typeof Z=="object"&&Z!==null&&(x=gt(Z));var $=n.getDerivedStateFromProps;Z=typeof $=="function"||typeof s.getSnapshotBeforeUpdate=="function",E=t.pendingProps!==E,Z||typeof s.UNSAFE_componentWillReceiveProps!="function"&&typeof s.componentWillReceiveProps!="function"||(E||H!==x)&&sh(t,s,a,x),Wn=!1;var Y=t.memoizedState;s.state=Y,ri(t,a,s,o),ii(),H=t.memoizedState,E||Y!==H||Wn?(typeof $=="function"&&(Jo(t,n,$,a),H=t.memoizedState),(N=Wn||oh(t,n,N,a,Y,H,x))?(Z||typeof s.UNSAFE_componentWillMount!="function"&&typeof s.componentWillMount!="function"||(typeof s.componentWillMount=="function"&&s.componentWillMount(),typeof s.UNSAFE_componentWillMount=="function"&&s.UNSAFE_componentWillMount()),typeof s.componentDidMount=="function"&&(t.flags|=4194308)):(typeof s.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=a,t.memoizedState=H),s.props=a,s.state=H,s.context=x,a=N):(typeof s.componentDidMount=="function"&&(t.flags|=4194308),a=!1)}else{s=t.stateNode,Ao(e,t),x=t.memoizedProps,Z=Ol(n,x),s.props=Z,$=t.pendingProps,Y=s.context,H=n.contextType,N=na,typeof H=="object"&&H!==null&&(N=gt(H)),E=n.getDerivedStateFromProps,(H=typeof E=="function"||typeof s.getSnapshotBeforeUpdate=="function")||typeof s.UNSAFE_componentWillReceiveProps!="function"&&typeof s.componentWillReceiveProps!="function"||(x!==$||Y!==N)&&sh(t,s,a,N),Wn=!1,Y=t.memoizedState,s.state=Y,ri(t,a,s,o),ii();var I=t.memoizedState;x!==$||Y!==I||Wn||e!==null&&e.dependencies!==null&&gr(e.dependencies)?(typeof E=="function"&&(Jo(t,n,E,a),I=t.memoizedState),(Z=Wn||oh(t,n,Z,a,Y,I,N)||e!==null&&e.dependencies!==null&&gr(e.dependencies))?(H||typeof s.UNSAFE_componentWillUpdate!="function"&&typeof s.componentWillUpdate!="function"||(typeof s.componentWillUpdate=="function"&&s.componentWillUpdate(a,I,N),typeof s.UNSAFE_componentWillUpdate=="function"&&s.UNSAFE_componentWillUpdate(a,I,N)),typeof s.componentDidUpdate=="function"&&(t.flags|=4),typeof s.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof s.componentDidUpdate!="function"||x===e.memoizedProps&&Y===e.memoizedState||(t.flags|=4),typeof s.getSnapshotBeforeUpdate!="function"||x===e.memoizedProps&&Y===e.memoizedState||(t.flags|=1024),t.memoizedProps=a,t.memoizedState=I),s.props=a,s.state=I,s.context=N,a=Z):(typeof s.componentDidUpdate!="function"||x===e.memoizedProps&&Y===e.memoizedState||(t.flags|=4),typeof s.getSnapshotBeforeUpdate!="function"||x===e.memoizedProps&&Y===e.memoizedState||(t.flags|=1024),a=!1)}return s=a,Dr(e,t),a=(t.flags&128)!==0,s||a?(s=t.stateNode,n=a&&typeof n.getDerivedStateFromError!="function"?null:s.render(),t.flags|=1,e!==null&&a?(t.child=Ml(t,e.child,null,o),t.child=Ml(t,null,n,o)):yt(e,t,n,o),t.memoizedState=s.state,e=t.child):e=kn(e,t,o),e}function Th(e,t,n,a){return jl(),t.flags|=256,yt(e,t,n,a),t.child}var ts={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function ns(e){return{baseLanes:e,cachePool:hd()}}function ls(e,t,n){return e=e!==null?e.childLanes&~n:0,t&&(e|=Vt),e}function wh(e,t,n){var a=t.pendingProps,o=!1,s=(t.flags&128)!==0,x;if((x=s)||(x=e!==null&&e.memoizedState===null?!1:(tt.current&2)!==0),x&&(o=!0,t.flags&=-129),x=(t.flags&32)!==0,t.flags&=-33,e===null){if(Ne){if(o?nl(t):ll(),(e=Ze)?(e=_p(e,Wt),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Fn!==null?{id:dn,overflow:hn}:null,retryLane:536870912,hydrationErrors:null},n=ad(e),n.return=t,t.child=n,mt=t,Ze=null)):e=null,e===null)throw Pn(t);return Hs(e)?t.lanes=32:t.lanes=536870912,null}var E=a.children;return a=a.fallback,o?(ll(),o=t.mode,E=Lr({mode:"hidden",children:E},o),a=wl(a,o,n,null),E.return=t,a.return=t,E.sibling=a,t.child=E,a=t.child,a.memoizedState=ns(n),a.childLanes=ls(e,x,n),t.memoizedState=ts,fi(null,a)):(nl(t),as(t,E))}var N=e.memoizedState;if(N!==null&&(E=N.dehydrated,E!==null)){if(s)t.flags&256?(nl(t),t.flags&=-257,t=is(e,t,n)):t.memoizedState!==null?(ll(),t.child=e.child,t.flags|=128,t=null):(ll(),E=a.fallback,o=t.mode,a=Lr({mode:"visible",children:a.children},o),E=wl(E,o,n,null),E.flags|=2,a.return=t,E.return=t,a.sibling=E,t.child=a,Ml(t,e.child,null,n),a=t.child,a.memoizedState=ns(n),a.childLanes=ls(e,x,n),t.memoizedState=ts,t=fi(null,a));else if(nl(t),Hs(E)){if(x=E.nextSibling&&E.nextSibling.dataset,x)var H=x.dgst;x=H,a=Error(u(419)),a.stack="",a.digest=x,Wa({value:a,source:null,stack:null}),t=is(e,t,n)}else if(rt||ra(e,t,n,!1),x=(n&e.childLanes)!==0,rt||x){if(x=Ie,x!==null&&(a=ff(x,n),a!==0&&a!==N.retryLane))throw N.retryLane=a,Tl(e,a),kt(x,e,a),Wo;Us(E)||Qr(),t=is(e,t,n)}else Us(E)?(t.flags|=192,t.child=e.child,t=null):(e=N.treeContext,Ze=tn(E.nextSibling),mt=t,Ne=!0,Jn=null,Wt=!1,e!==null&&ud(t,e),t=as(t,a.children),t.flags|=4096);return t}return o?(ll(),E=a.fallback,o=t.mode,N=e.child,H=N.sibling,a=wn(N,{mode:"hidden",children:a.children}),a.subtreeFlags=N.subtreeFlags&65011712,H!==null?E=wn(H,E):(E=wl(E,o,n,null),E.flags|=2),E.return=t,a.return=t,a.sibling=E,t.child=a,fi(null,a),a=t.child,E=e.child.memoizedState,E===null?E=ns(n):(o=E.cachePool,o!==null?(N=at._currentValue,o=o.parent!==N?{parent:N,pool:N}:o):o=hd(),E={baseLanes:E.baseLanes|n,cachePool:o}),a.memoizedState=E,a.childLanes=ls(e,x,n),t.memoizedState=ts,fi(e.child,a)):(nl(t),n=e.child,e=n.sibling,n=wn(n,{mode:"visible",children:a.children}),n.return=t,n.sibling=null,e!==null&&(x=t.deletions,x===null?(t.deletions=[e],t.flags|=16):x.push(e)),t.child=n,t.memoizedState=null,n)}function as(e,t){return t=Lr({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function Lr(e,t){return e=Ut(22,e,null,t),e.lanes=0,e}function is(e,t,n){return Ml(t,e.child,null,n),e=as(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function jh(e,t,n){e.lanes|=t;var a=e.alternate;a!==null&&(a.lanes|=t),bo(e.return,t,n)}function rs(e,t,n,a,o,s){var x=e.memoizedState;x===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:a,tail:n,tailMode:o,treeForkCount:s}:(x.isBackwards=t,x.rendering=null,x.renderingStartTime=0,x.last=a,x.tail=n,x.tailMode=o,x.treeForkCount=s)}function Ah(e,t,n){var a=t.pendingProps,o=a.revealOrder,s=a.tail;a=a.children;var x=tt.current,E=(x&2)!==0;if(E?(x=x&1|2,t.flags|=128):x&=1,w(tt,x),yt(e,t,a,n),a=Ne?$a:0,!E&&e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&jh(e,n,t);else if(e.tag===19)jh(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(o){case"forwards":for(n=t.child,o=null;n!==null;)e=n.alternate,e!==null&&Tr(e)===null&&(o=n),n=n.sibling;n=o,n===null?(o=t.child,t.child=null):(o=n.sibling,n.sibling=null),rs(t,!1,o,n,s,a);break;case"backwards":case"unstable_legacy-backwards":for(n=null,o=t.child,t.child=null;o!==null;){if(e=o.alternate,e!==null&&Tr(e)===null){t.child=o;break}e=o.sibling,o.sibling=n,n=o,o=e}rs(t,!0,n,null,s,a);break;case"together":rs(t,!1,null,null,void 0,a);break;default:t.memoizedState=null}return t.child}function kn(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),rl|=t.lanes,(n&t.childLanes)===0)if(e!==null){if(ra(e,t,n,!1),(n&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(u(153));if(t.child!==null){for(e=t.child,n=wn(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=wn(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function us(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&gr(e)))}function Xv(e,t,n){switch(t.tag){case 3:Fe(t,t.stateNode.containerInfo),$n(t,at,e.memoizedState.cache),jl();break;case 27:case 5:Xt(t);break;case 4:Fe(t,t.stateNode.containerInfo);break;case 10:$n(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,Mo(t),null;break;case 13:var a=t.memoizedState;if(a!==null)return a.dehydrated!==null?(nl(t),t.flags|=128,null):(n&t.child.childLanes)!==0?wh(e,t,n):(nl(t),e=kn(e,t,n),e!==null?e.sibling:null);nl(t);break;case 19:var o=(e.flags&128)!==0;if(a=(n&t.childLanes)!==0,a||(ra(e,t,n,!1),a=(n&t.childLanes)!==0),o){if(a)return Ah(e,t,n);t.flags|=128}if(o=t.memoizedState,o!==null&&(o.rendering=null,o.tail=null,o.lastEffect=null),w(tt,tt.current),a)break;return null;case 22:return t.lanes=0,xh(e,t,n,t.pendingProps);case 24:$n(t,at,e.memoizedState.cache)}return kn(e,t,n)}function zh(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps)rt=!0;else{if(!us(e,n)&&(t.flags&128)===0)return rt=!1,Xv(e,t,n);rt=(e.flags&131072)!==0}else rt=!1,Ne&&(t.flags&1048576)!==0&&rd(t,$a,t.index);switch(t.lanes=0,t.tag){case 16:e:{var a=t.pendingProps;if(e=Nl(t.elementType),t.type=e,typeof e=="function")fo(e)?(a=Ol(e,a),t.tag=1,t=Ch(null,t,e,a,n)):(t.tag=0,t=es(null,t,e,a,n));else{if(e!=null){var o=e.$$typeof;if(o===G){t.tag=11,t=gh(null,t,e,a,n);break e}else if(o===Q){t.tag=14,t=yh(null,t,e,a,n);break e}}throw t=W(e)||e,Error(u(306,t,""))}}return t;case 0:return es(e,t,t.type,t.pendingProps,n);case 1:return a=t.type,o=Ol(a,t.pendingProps),Ch(e,t,a,o,n);case 3:e:{if(Fe(t,t.stateNode.containerInfo),e===null)throw Error(u(387));a=t.pendingProps;var s=t.memoizedState;o=s.element,Ao(e,t),ri(t,a,null,n);var x=t.memoizedState;if(a=x.cache,$n(t,at,a),a!==s.cache&&So(t,[at],n,!0),ii(),a=x.element,s.isDehydrated)if(s={element:a,isDehydrated:!1,cache:x.cache},t.updateQueue.baseState=s,t.memoizedState=s,t.flags&256){t=Th(e,t,a,n);break e}else if(a!==o){o=Jt(Error(u(424)),t),Wa(o),t=Th(e,t,a,n);break e}else for(e=t.stateNode.containerInfo,e.nodeType===9?e=e.body:e=e.nodeName==="HTML"?e.ownerDocument.body:e,Ze=tn(e.firstChild),mt=t,Ne=!0,Jn=null,Wt=!0,n=xd(t,null,a,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(jl(),a===o){t=kn(e,t,n);break e}yt(e,t,a,n)}t=t.child}return t;case 26:return Dr(e,t),e===null?(n=Hp(t.type,null,t.pendingProps,null))?t.memoizedState=n:Ne||(n=t.type,e=t.pendingProps,a=$r(fe.current).createElement(n),a[pt]=t,a[wt]=e,vt(a,n,e),dt(a),t.stateNode=a):t.memoizedState=Hp(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return Xt(t),e===null&&Ne&&(a=t.stateNode=Lp(t.type,t.pendingProps,fe.current),mt=t,Wt=!0,o=Ze,fl(t.type)?(qs=o,Ze=tn(a.firstChild)):Ze=o),yt(e,t,t.pendingProps.children,n),Dr(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&Ne&&((o=a=Ze)&&(a=Ex(a,t.type,t.pendingProps,Wt),a!==null?(t.stateNode=a,mt=t,Ze=tn(a.firstChild),Wt=!1,o=!0):o=!1),o||Pn(t)),Xt(t),o=t.type,s=t.pendingProps,x=e!==null?e.memoizedProps:null,a=s.children,Ds(o,s)?a=null:x!==null&&Ds(o,x)&&(t.flags|=32),t.memoizedState!==null&&(o=Oo(e,t,Bv,null,null,n),ji._currentValue=o),Dr(e,t),yt(e,t,a,n),t.child;case 6:return e===null&&Ne&&((e=n=Ze)&&(n=Cx(n,t.pendingProps,Wt),n!==null?(t.stateNode=n,mt=t,Ze=null,e=!0):e=!1),e||Pn(t)),null;case 13:return wh(e,t,n);case 4:return Fe(t,t.stateNode.containerInfo),a=t.pendingProps,e===null?t.child=Ml(t,null,a,n):yt(e,t,a,n),t.child;case 11:return gh(e,t,t.type,t.pendingProps,n);case 7:return yt(e,t,t.pendingProps,n),t.child;case 8:return yt(e,t,t.pendingProps.children,n),t.child;case 12:return yt(e,t,t.pendingProps.children,n),t.child;case 10:return a=t.pendingProps,$n(t,t.type,a.value),yt(e,t,a.children,n),t.child;case 9:return o=t.type._context,a=t.pendingProps.children,zl(t),o=gt(o),a=a(o),t.flags|=1,yt(e,t,a,n),t.child;case 14:return yh(e,t,t.type,t.pendingProps,n);case 15:return vh(e,t,t.type,t.pendingProps,n);case 19:return Ah(e,t,n);case 31:return Qv(e,t,n);case 22:return xh(e,t,n,t.pendingProps);case 24:return zl(t),a=gt(at),e===null?(o=To(),o===null&&(o=Ie,s=Eo(),o.pooledCache=s,s.refCount++,s!==null&&(o.pooledCacheLanes|=n),o=s),t.memoizedState={parent:a,cache:o},jo(t),$n(t,at,o)):((e.lanes&n)!==0&&(Ao(e,t),ri(t,null,null,n),ii()),o=e.memoizedState,s=t.memoizedState,o.parent!==a?(o={parent:a,cache:a},t.memoizedState=o,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=o),$n(t,at,a)):(a=s.cache,$n(t,at,a),a!==o.cache&&So(t,[at],n,!0))),yt(e,t,t.pendingProps.children,n),t.child;case 29:throw t.pendingProps}throw Error(u(156,t.tag))}function Mn(e){e.flags|=4}function os(e,t,n,a,o){if((t=(e.mode&32)!==0)&&(t=!1),t){if(e.flags|=16777216,(o&335544128)===o)if(e.stateNode.complete)e.flags|=8192;else if(tp())e.flags|=8192;else throw kl=br,wo}else e.flags&=-16777217}function Rh(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!Ip(t))if(tp())e.flags|=8192;else throw kl=br,wo}function Br(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?of():536870912,e.lanes|=t,va|=t)}function di(e,t){if(!Ne)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var a=null;n!==null;)n.alternate!==null&&(a=n),n=n.sibling;a===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:a.sibling=null}}function Ke(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,a=0;if(t)for(var o=e.child;o!==null;)n|=o.lanes|o.childLanes,a|=o.subtreeFlags&65011712,a|=o.flags&65011712,o.return=e,o=o.sibling;else for(o=e.child;o!==null;)n|=o.lanes|o.childLanes,a|=o.subtreeFlags,a|=o.flags,o.return=e,o=o.sibling;return e.subtreeFlags|=a,e.childLanes=n,t}function Zv(e,t,n){var a=t.pendingProps;switch(go(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Ke(t),null;case 1:return Ke(t),null;case 3:return n=t.stateNode,a=null,e!==null&&(a=e.memoizedState.cache),t.memoizedState.cache!==a&&(t.flags|=2048),zn(at),He(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(ia(t)?Mn(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,vo())),Ke(t),null;case 26:var o=t.type,s=t.memoizedState;return e===null?(Mn(t),s!==null?(Ke(t),Rh(t,s)):(Ke(t),os(t,o,null,a,n))):s?s!==e.memoizedState?(Mn(t),Ke(t),Rh(t,s)):(Ke(t),t.flags&=-16777217):(e=e.memoizedProps,e!==a&&Mn(t),Ke(t),os(t,o,e,a,n)),null;case 27:if(xn(t),n=fe.current,o=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==a&&Mn(t);else{if(!a){if(t.stateNode===null)throw Error(u(166));return Ke(t),null}e=ie.current,ia(t)?od(t):(e=Lp(o,a,n),t.stateNode=e,Mn(t))}return Ke(t),null;case 5:if(xn(t),o=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==a&&Mn(t);else{if(!a){if(t.stateNode===null)throw Error(u(166));return Ke(t),null}if(s=ie.current,ia(t))od(t);else{var x=$r(fe.current);switch(s){case 1:s=x.createElementNS("http://www.w3.org/2000/svg",o);break;case 2:s=x.createElementNS("http://www.w3.org/1998/Math/MathML",o);break;default:switch(o){case"svg":s=x.createElementNS("http://www.w3.org/2000/svg",o);break;case"math":s=x.createElementNS("http://www.w3.org/1998/Math/MathML",o);break;case"script":s=x.createElement("div"),s.innerHTML="<script><\/script>",s=s.removeChild(s.firstChild);break;case"select":s=typeof a.is=="string"?x.createElement("select",{is:a.is}):x.createElement("select"),a.multiple?s.multiple=!0:a.size&&(s.size=a.size);break;default:s=typeof a.is=="string"?x.createElement(o,{is:a.is}):x.createElement(o)}}s[pt]=t,s[wt]=a;e:for(x=t.child;x!==null;){if(x.tag===5||x.tag===6)s.appendChild(x.stateNode);else if(x.tag!==4&&x.tag!==27&&x.child!==null){x.child.return=x,x=x.child;continue}if(x===t)break e;for(;x.sibling===null;){if(x.return===null||x.return===t)break e;x=x.return}x.sibling.return=x.return,x=x.sibling}t.stateNode=s;e:switch(vt(s,o,a),o){case"button":case"input":case"select":case"textarea":a=!!a.autoFocus;break e;case"img":a=!0;break e;default:a=!1}a&&Mn(t)}}return Ke(t),os(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==a&&Mn(t);else{if(typeof a!="string"&&t.stateNode===null)throw Error(u(166));if(e=fe.current,ia(t)){if(e=t.stateNode,n=t.memoizedProps,a=null,o=mt,o!==null)switch(o.tag){case 27:case 5:a=o.memoizedProps}e[pt]=t,e=!!(e.nodeValue===n||a!==null&&a.suppressHydrationWarning===!0||wp(e.nodeValue,n)),e||Pn(t,!0)}else e=$r(e).createTextNode(a),e[pt]=t,t.stateNode=e}return Ke(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(a=ia(t),n!==null){if(e===null){if(!a)throw Error(u(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(u(557));e[pt]=t}else jl(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Ke(t),e=!1}else n=vo(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?(qt(t),t):(qt(t),null);if((t.flags&128)!==0)throw Error(u(558))}return Ke(t),null;case 13:if(a=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(o=ia(t),a!==null&&a.dehydrated!==null){if(e===null){if(!o)throw Error(u(318));if(o=t.memoizedState,o=o!==null?o.dehydrated:null,!o)throw Error(u(317));o[pt]=t}else jl(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;Ke(t),o=!1}else o=vo(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=o),o=!0;if(!o)return t.flags&256?(qt(t),t):(qt(t),null)}return qt(t),(t.flags&128)!==0?(t.lanes=n,t):(n=a!==null,e=e!==null&&e.memoizedState!==null,n&&(a=t.child,o=null,a.alternate!==null&&a.alternate.memoizedState!==null&&a.alternate.memoizedState.cachePool!==null&&(o=a.alternate.memoizedState.cachePool.pool),s=null,a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(s=a.memoizedState.cachePool.pool),s!==o&&(a.flags|=2048)),n!==e&&n&&(t.child.flags|=8192),Br(t,t.updateQueue),Ke(t),null);case 4:return He(),e===null&&Ns(t.stateNode.containerInfo),Ke(t),null;case 10:return zn(t.type),Ke(t),null;case 19:if(V(tt),a=t.memoizedState,a===null)return Ke(t),null;if(o=(t.flags&128)!==0,s=a.rendering,s===null)if(o)di(a,!1);else{if(We!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(s=Tr(e),s!==null){for(t.flags|=128,di(a,!1),e=s.updateQueue,t.updateQueue=e,Br(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)ld(n,e),n=n.sibling;return w(tt,tt.current&1|2),Ne&&jn(t,a.treeForkCount),t.child}e=e.sibling}a.tail!==null&&St()>Vr&&(t.flags|=128,o=!0,di(a,!1),t.lanes=4194304)}else{if(!o)if(e=Tr(s),e!==null){if(t.flags|=128,o=!0,e=e.updateQueue,t.updateQueue=e,Br(t,e),di(a,!0),a.tail===null&&a.tailMode==="hidden"&&!s.alternate&&!Ne)return Ke(t),null}else 2*St()-a.renderingStartTime>Vr&&n!==536870912&&(t.flags|=128,o=!0,di(a,!1),t.lanes=4194304);a.isBackwards?(s.sibling=t.child,t.child=s):(e=a.last,e!==null?e.sibling=s:t.child=s,a.last=s)}return a.tail!==null?(e=a.tail,a.rendering=e,a.tail=e.sibling,a.renderingStartTime=St(),e.sibling=null,n=tt.current,w(tt,o?n&1|2:n&1),Ne&&jn(t,a.treeForkCount),e):(Ke(t),null);case 22:case 23:return qt(t),ko(),a=t.memoizedState!==null,e!==null?e.memoizedState!==null!==a&&(t.flags|=8192):a&&(t.flags|=8192),a?(n&536870912)!==0&&(t.flags&128)===0&&(Ke(t),t.subtreeFlags&6&&(t.flags|=8192)):Ke(t),n=t.updateQueue,n!==null&&Br(t,n.retryQueue),n=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),a=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(a=t.memoizedState.cachePool.pool),a!==n&&(t.flags|=2048),e!==null&&V(Rl),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),zn(at),Ke(t),null;case 25:return null;case 30:return null}throw Error(u(156,t.tag))}function Kv(e,t){switch(go(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return zn(at),He(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return xn(t),null;case 31:if(t.memoizedState!==null){if(qt(t),t.alternate===null)throw Error(u(340));jl()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(qt(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(u(340));jl()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return V(tt),null;case 4:return He(),null;case 10:return zn(t.type),null;case 22:case 23:return qt(t),ko(),e!==null&&V(Rl),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return zn(at),null;case 25:return null;default:return null}}function Nh(e,t){switch(go(t),t.tag){case 3:zn(at),He();break;case 26:case 27:case 5:xn(t);break;case 4:He();break;case 31:t.memoizedState!==null&&qt(t);break;case 13:qt(t);break;case 19:V(tt);break;case 10:zn(t.type);break;case 22:case 23:qt(t),ko(),e!==null&&V(Rl);break;case 24:zn(at)}}function hi(e,t){try{var n=t.updateQueue,a=n!==null?n.lastEffect:null;if(a!==null){var o=a.next;n=o;do{if((n.tag&e)===e){a=void 0;var s=n.create,x=n.inst;a=s(),x.destroy=a}n=n.next}while(n!==o)}}catch(E){Ue(t,t.return,E)}}function al(e,t,n){try{var a=t.updateQueue,o=a!==null?a.lastEffect:null;if(o!==null){var s=o.next;a=s;do{if((a.tag&e)===e){var x=a.inst,E=x.destroy;if(E!==void 0){x.destroy=void 0,o=t;var N=n,H=E;try{H()}catch(Z){Ue(o,N,Z)}}}a=a.next}while(a!==s)}}catch(Z){Ue(t,t.return,Z)}}function kh(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{Sd(t,n)}catch(a){Ue(e,e.return,a)}}}function Mh(e,t,n){n.props=Ol(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(a){Ue(e,t,a)}}function pi(e,t){try{var n=e.ref;if(n!==null){switch(e.tag){case 26:case 27:case 5:var a=e.stateNode;break;case 30:a=e.stateNode;break;default:a=e.stateNode}typeof n=="function"?e.refCleanup=n(a):n.current=a}}catch(o){Ue(e,t,o)}}function pn(e,t){var n=e.ref,a=e.refCleanup;if(n!==null)if(typeof a=="function")try{a()}catch(o){Ue(e,t,o)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof n=="function")try{n(null)}catch(o){Ue(e,t,o)}else n.current=null}function _h(e){var t=e.type,n=e.memoizedProps,a=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":n.autoFocus&&a.focus();break e;case"img":n.src?a.src=n.src:n.srcSet&&(a.srcset=n.srcSet)}}catch(o){Ue(e,e.return,o)}}function ss(e,t,n){try{var a=e.stateNode;gx(a,e.type,n,t),a[wt]=t}catch(o){Ue(e,e.return,o)}}function Oh(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&fl(e.type)||e.tag===4}function cs(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Oh(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&fl(e.type)||e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function fs(e,t,n){var a=e.tag;if(a===5||a===6)e=e.stateNode,t?(n.nodeType===9?n.body:n.nodeName==="HTML"?n.ownerDocument.body:n).insertBefore(e,t):(t=n.nodeType===9?n.body:n.nodeName==="HTML"?n.ownerDocument.body:n,t.appendChild(e),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=Cn));else if(a!==4&&(a===27&&fl(e.type)&&(n=e.stateNode,t=null),e=e.child,e!==null))for(fs(e,t,n),e=e.sibling;e!==null;)fs(e,t,n),e=e.sibling}function Ur(e,t,n){var a=e.tag;if(a===5||a===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(a!==4&&(a===27&&fl(e.type)&&(n=e.stateNode),e=e.child,e!==null))for(Ur(e,t,n),e=e.sibling;e!==null;)Ur(e,t,n),e=e.sibling}function Dh(e){var t=e.stateNode,n=e.memoizedProps;try{for(var a=e.type,o=t.attributes;o.length;)t.removeAttributeNode(o[0]);vt(t,a,n),t[pt]=e,t[wt]=n}catch(s){Ue(e,e.return,s)}}var _n=!1,ut=!1,ds=!1,Lh=typeof WeakSet=="function"?WeakSet:Set,ht=null;function Fv(e,t){if(e=e.containerInfo,_s=iu,e=Kf(e),ao(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var a=n.getSelection&&n.getSelection();if(a&&a.rangeCount!==0){n=a.anchorNode;var o=a.anchorOffset,s=a.focusNode;a=a.focusOffset;try{n.nodeType,s.nodeType}catch{n=null;break e}var x=0,E=-1,N=-1,H=0,Z=0,$=e,Y=null;t:for(;;){for(var I;$!==n||o!==0&&$.nodeType!==3||(E=x+o),$!==s||a!==0&&$.nodeType!==3||(N=x+a),$.nodeType===3&&(x+=$.nodeValue.length),(I=$.firstChild)!==null;)Y=$,$=I;for(;;){if($===e)break t;if(Y===n&&++H===o&&(E=x),Y===s&&++Z===a&&(N=x),(I=$.nextSibling)!==null)break;$=Y,Y=$.parentNode}$=I}n=E===-1||N===-1?null:{start:E,end:N}}else n=null}n=n||{start:0,end:0}}else n=null;for(Os={focusedElem:e,selectionRange:n},iu=!1,ht=t;ht!==null;)if(t=ht,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,ht=e;else for(;ht!==null;){switch(t=ht,s=t.alternate,e=t.flags,t.tag){case 0:if((e&4)!==0&&(e=t.updateQueue,e=e!==null?e.events:null,e!==null))for(n=0;n<e.length;n++)o=e[n],o.ref.impl=o.nextImpl;break;case 11:case 15:break;case 1:if((e&1024)!==0&&s!==null){e=void 0,n=t,o=s.memoizedProps,s=s.memoizedState,a=n.stateNode;try{var oe=Ol(n.type,o);e=a.getSnapshotBeforeUpdate(oe,s),a.__reactInternalSnapshotBeforeUpdate=e}catch(me){Ue(n,n.return,me)}}break;case 3:if((e&1024)!==0){if(e=t.stateNode.containerInfo,n=e.nodeType,n===9)Bs(e);else if(n===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":Bs(e);break;default:e.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((e&1024)!==0)throw Error(u(163))}if(e=t.sibling,e!==null){e.return=t.return,ht=e;break}ht=t.return}}function Bh(e,t,n){var a=n.flags;switch(n.tag){case 0:case 11:case 15:Dn(e,n),a&4&&hi(5,n);break;case 1:if(Dn(e,n),a&4)if(e=n.stateNode,t===null)try{e.componentDidMount()}catch(x){Ue(n,n.return,x)}else{var o=Ol(n.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(o,t,e.__reactInternalSnapshotBeforeUpdate)}catch(x){Ue(n,n.return,x)}}a&64&&kh(n),a&512&&pi(n,n.return);break;case 3:if(Dn(e,n),a&64&&(e=n.updateQueue,e!==null)){if(t=null,n.child!==null)switch(n.child.tag){case 27:case 5:t=n.child.stateNode;break;case 1:t=n.child.stateNode}try{Sd(e,t)}catch(x){Ue(n,n.return,x)}}break;case 27:t===null&&a&4&&Dh(n);case 26:case 5:Dn(e,n),t===null&&a&4&&_h(n),a&512&&pi(n,n.return);break;case 12:Dn(e,n);break;case 31:Dn(e,n),a&4&&qh(e,n);break;case 13:Dn(e,n),a&4&&Yh(e,n),a&64&&(e=n.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(n=ax.bind(null,n),Tx(e,n))));break;case 22:if(a=n.memoizedState!==null||_n,!a){t=t!==null&&t.memoizedState!==null||ut,o=_n;var s=ut;_n=a,(ut=t)&&!s?Ln(e,n,(n.subtreeFlags&8772)!==0):Dn(e,n),_n=o,ut=s}break;case 30:break;default:Dn(e,n)}}function Uh(e){var t=e.alternate;t!==null&&(e.alternate=null,Uh(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&Yu(t)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var Je=null,At=!1;function On(e,t,n){for(n=n.child;n!==null;)Hh(e,t,n),n=n.sibling}function Hh(e,t,n){if(st&&typeof st.onCommitFiberUnmount=="function")try{st.onCommitFiberUnmount(Et,n)}catch{}switch(n.tag){case 26:ut||pn(n,t),On(e,t,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&(n=n.stateNode,n.parentNode.removeChild(n));break;case 27:ut||pn(n,t);var a=Je,o=At;fl(n.type)&&(Je=n.stateNode,At=!1),On(e,t,n),Ci(n.stateNode),Je=a,At=o;break;case 5:ut||pn(n,t);case 6:if(a=Je,o=At,Je=null,On(e,t,n),Je=a,At=o,Je!==null)if(At)try{(Je.nodeType===9?Je.body:Je.nodeName==="HTML"?Je.ownerDocument.body:Je).removeChild(n.stateNode)}catch(s){Ue(n,t,s)}else try{Je.removeChild(n.stateNode)}catch(s){Ue(n,t,s)}break;case 18:Je!==null&&(At?(e=Je,kp(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,n.stateNode),ja(e)):kp(Je,n.stateNode));break;case 4:a=Je,o=At,Je=n.stateNode.containerInfo,At=!0,On(e,t,n),Je=a,At=o;break;case 0:case 11:case 14:case 15:al(2,n,t),ut||al(4,n,t),On(e,t,n);break;case 1:ut||(pn(n,t),a=n.stateNode,typeof a.componentWillUnmount=="function"&&Mh(n,t,a)),On(e,t,n);break;case 21:On(e,t,n);break;case 22:ut=(a=ut)||n.memoizedState!==null,On(e,t,n),ut=a;break;default:On(e,t,n)}}function qh(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{ja(e)}catch(n){Ue(t,t.return,n)}}}function Yh(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{ja(e)}catch(n){Ue(t,t.return,n)}}function Jv(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new Lh),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new Lh),t;default:throw Error(u(435,e.tag))}}function Hr(e,t){var n=Jv(e);t.forEach(function(a){if(!n.has(a)){n.add(a);var o=ix.bind(null,e,a);a.then(o,o)}})}function zt(e,t){var n=t.deletions;if(n!==null)for(var a=0;a<n.length;a++){var o=n[a],s=e,x=t,E=x;e:for(;E!==null;){switch(E.tag){case 27:if(fl(E.type)){Je=E.stateNode,At=!1;break e}break;case 5:Je=E.stateNode,At=!1;break e;case 3:case 4:Je=E.stateNode.containerInfo,At=!0;break e}E=E.return}if(Je===null)throw Error(u(160));Hh(s,x,o),Je=null,At=!1,s=o.alternate,s!==null&&(s.return=null),o.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)Vh(t,e),t=t.sibling}var on=null;function Vh(e,t){var n=e.alternate,a=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:zt(t,e),Rt(e),a&4&&(al(3,e,e.return),hi(3,e),al(5,e,e.return));break;case 1:zt(t,e),Rt(e),a&512&&(ut||n===null||pn(n,n.return)),a&64&&_n&&(e=e.updateQueue,e!==null&&(a=e.callbacks,a!==null&&(n=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=n===null?a:n.concat(a))));break;case 26:var o=on;if(zt(t,e),Rt(e),a&512&&(ut||n===null||pn(n,n.return)),a&4){var s=n!==null?n.memoizedState:null;if(a=e.memoizedState,n===null)if(a===null)if(e.stateNode===null){e:{a=e.type,n=e.memoizedProps,o=o.ownerDocument||o;t:switch(a){case"title":s=o.getElementsByTagName("title")[0],(!s||s[Ya]||s[pt]||s.namespaceURI==="http://www.w3.org/2000/svg"||s.hasAttribute("itemprop"))&&(s=o.createElement(a),o.head.insertBefore(s,o.querySelector("head > title"))),vt(s,a,n),s[pt]=e,dt(s),a=s;break e;case"link":var x=Vp("link","href",o).get(a+(n.href||""));if(x){for(var E=0;E<x.length;E++)if(s=x[E],s.getAttribute("href")===(n.href==null||n.href===""?null:n.href)&&s.getAttribute("rel")===(n.rel==null?null:n.rel)&&s.getAttribute("title")===(n.title==null?null:n.title)&&s.getAttribute("crossorigin")===(n.crossOrigin==null?null:n.crossOrigin)){x.splice(E,1);break t}}s=o.createElement(a),vt(s,a,n),o.head.appendChild(s);break;case"meta":if(x=Vp("meta","content",o).get(a+(n.content||""))){for(E=0;E<x.length;E++)if(s=x[E],s.getAttribute("content")===(n.content==null?null:""+n.content)&&s.getAttribute("name")===(n.name==null?null:n.name)&&s.getAttribute("property")===(n.property==null?null:n.property)&&s.getAttribute("http-equiv")===(n.httpEquiv==null?null:n.httpEquiv)&&s.getAttribute("charset")===(n.charSet==null?null:n.charSet)){x.splice(E,1);break t}}s=o.createElement(a),vt(s,a,n),o.head.appendChild(s);break;default:throw Error(u(468,a))}s[pt]=e,dt(s),a=s}e.stateNode=a}else Gp(o,e.type,e.stateNode);else e.stateNode=Yp(o,a,e.memoizedProps);else s!==a?(s===null?n.stateNode!==null&&(n=n.stateNode,n.parentNode.removeChild(n)):s.count--,a===null?Gp(o,e.type,e.stateNode):Yp(o,a,e.memoizedProps)):a===null&&e.stateNode!==null&&ss(e,e.memoizedProps,n.memoizedProps)}break;case 27:zt(t,e),Rt(e),a&512&&(ut||n===null||pn(n,n.return)),n!==null&&a&4&&ss(e,e.memoizedProps,n.memoizedProps);break;case 5:if(zt(t,e),Rt(e),a&512&&(ut||n===null||pn(n,n.return)),e.flags&32){o=e.stateNode;try{Fl(o,"")}catch(oe){Ue(e,e.return,oe)}}a&4&&e.stateNode!=null&&(o=e.memoizedProps,ss(e,o,n!==null?n.memoizedProps:o)),a&1024&&(ds=!0);break;case 6:if(zt(t,e),Rt(e),a&4){if(e.stateNode===null)throw Error(u(162));a=e.memoizedProps,n=e.stateNode;try{n.nodeValue=a}catch(oe){Ue(e,e.return,oe)}}break;case 3:if(tu=null,o=on,on=Wr(t.containerInfo),zt(t,e),on=o,Rt(e),a&4&&n!==null&&n.memoizedState.isDehydrated)try{ja(t.containerInfo)}catch(oe){Ue(e,e.return,oe)}ds&&(ds=!1,Gh(e));break;case 4:a=on,on=Wr(e.stateNode.containerInfo),zt(t,e),Rt(e),on=a;break;case 12:zt(t,e),Rt(e);break;case 31:zt(t,e),Rt(e),a&4&&(a=e.updateQueue,a!==null&&(e.updateQueue=null,Hr(e,a)));break;case 13:zt(t,e),Rt(e),e.child.flags&8192&&e.memoizedState!==null!=(n!==null&&n.memoizedState!==null)&&(Yr=St()),a&4&&(a=e.updateQueue,a!==null&&(e.updateQueue=null,Hr(e,a)));break;case 22:o=e.memoizedState!==null;var N=n!==null&&n.memoizedState!==null,H=_n,Z=ut;if(_n=H||o,ut=Z||N,zt(t,e),ut=Z,_n=H,Rt(e),a&8192)e:for(t=e.stateNode,t._visibility=o?t._visibility&-2:t._visibility|1,o&&(n===null||N||_n||ut||Dl(e)),n=null,t=e;;){if(t.tag===5||t.tag===26){if(n===null){N=n=t;try{if(s=N.stateNode,o)x=s.style,typeof x.setProperty=="function"?x.setProperty("display","none","important"):x.display="none";else{E=N.stateNode;var $=N.memoizedProps.style,Y=$!=null&&$.hasOwnProperty("display")?$.display:null;E.style.display=Y==null||typeof Y=="boolean"?"":(""+Y).trim()}}catch(oe){Ue(N,N.return,oe)}}}else if(t.tag===6){if(n===null){N=t;try{N.stateNode.nodeValue=o?"":N.memoizedProps}catch(oe){Ue(N,N.return,oe)}}}else if(t.tag===18){if(n===null){N=t;try{var I=N.stateNode;o?Mp(I,!0):Mp(N.stateNode,!1)}catch(oe){Ue(N,N.return,oe)}}}else if((t.tag!==22&&t.tag!==23||t.memoizedState===null||t===e)&&t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break e;for(;t.sibling===null;){if(t.return===null||t.return===e)break e;n===t&&(n=null),t=t.return}n===t&&(n=null),t.sibling.return=t.return,t=t.sibling}a&4&&(a=e.updateQueue,a!==null&&(n=a.retryQueue,n!==null&&(a.retryQueue=null,Hr(e,n))));break;case 19:zt(t,e),Rt(e),a&4&&(a=e.updateQueue,a!==null&&(e.updateQueue=null,Hr(e,a)));break;case 30:break;case 21:break;default:zt(t,e),Rt(e)}}function Rt(e){var t=e.flags;if(t&2){try{for(var n,a=e.return;a!==null;){if(Oh(a)){n=a;break}a=a.return}if(n==null)throw Error(u(160));switch(n.tag){case 27:var o=n.stateNode,s=cs(e);Ur(e,s,o);break;case 5:var x=n.stateNode;n.flags&32&&(Fl(x,""),n.flags&=-33);var E=cs(e);Ur(e,E,x);break;case 3:case 4:var N=n.stateNode.containerInfo,H=cs(e);fs(e,H,N);break;default:throw Error(u(161))}}catch(Z){Ue(e,e.return,Z)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Gh(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;Gh(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function Dn(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)Bh(e,t.alternate,t),t=t.sibling}function Dl(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:al(4,t,t.return),Dl(t);break;case 1:pn(t,t.return);var n=t.stateNode;typeof n.componentWillUnmount=="function"&&Mh(t,t.return,n),Dl(t);break;case 27:Ci(t.stateNode);case 26:case 5:pn(t,t.return),Dl(t);break;case 22:t.memoizedState===null&&Dl(t);break;case 30:Dl(t);break;default:Dl(t)}e=e.sibling}}function Ln(e,t,n){for(n=n&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var a=t.alternate,o=e,s=t,x=s.flags;switch(s.tag){case 0:case 11:case 15:Ln(o,s,n),hi(4,s);break;case 1:if(Ln(o,s,n),a=s,o=a.stateNode,typeof o.componentDidMount=="function")try{o.componentDidMount()}catch(H){Ue(a,a.return,H)}if(a=s,o=a.updateQueue,o!==null){var E=a.stateNode;try{var N=o.shared.hiddenCallbacks;if(N!==null)for(o.shared.hiddenCallbacks=null,o=0;o<N.length;o++)bd(N[o],E)}catch(H){Ue(a,a.return,H)}}n&&x&64&&kh(s),pi(s,s.return);break;case 27:Dh(s);case 26:case 5:Ln(o,s,n),n&&a===null&&x&4&&_h(s),pi(s,s.return);break;case 12:Ln(o,s,n);break;case 31:Ln(o,s,n),n&&x&4&&qh(o,s);break;case 13:Ln(o,s,n),n&&x&4&&Yh(o,s);break;case 22:s.memoizedState===null&&Ln(o,s,n),pi(s,s.return);break;case 30:break;default:Ln(o,s,n)}t=t.sibling}}function hs(e,t){var n=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==n&&(e!=null&&e.refCount++,n!=null&&ei(n))}function ps(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&ei(e))}function sn(e,t,n,a){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)Ih(e,t,n,a),t=t.sibling}function Ih(e,t,n,a){var o=t.flags;switch(t.tag){case 0:case 11:case 15:sn(e,t,n,a),o&2048&&hi(9,t);break;case 1:sn(e,t,n,a);break;case 3:sn(e,t,n,a),o&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&ei(e)));break;case 12:if(o&2048){sn(e,t,n,a),e=t.stateNode;try{var s=t.memoizedProps,x=s.id,E=s.onPostCommit;typeof E=="function"&&E(x,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(N){Ue(t,t.return,N)}}else sn(e,t,n,a);break;case 31:sn(e,t,n,a);break;case 13:sn(e,t,n,a);break;case 23:break;case 22:s=t.stateNode,x=t.alternate,t.memoizedState!==null?s._visibility&2?sn(e,t,n,a):mi(e,t):s._visibility&2?sn(e,t,n,a):(s._visibility|=2,ma(e,t,n,a,(t.subtreeFlags&10256)!==0||!1)),o&2048&&hs(x,t);break;case 24:sn(e,t,n,a),o&2048&&ps(t.alternate,t);break;default:sn(e,t,n,a)}}function ma(e,t,n,a,o){for(o=o&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var s=e,x=t,E=n,N=a,H=x.flags;switch(x.tag){case 0:case 11:case 15:ma(s,x,E,N,o),hi(8,x);break;case 23:break;case 22:var Z=x.stateNode;x.memoizedState!==null?Z._visibility&2?ma(s,x,E,N,o):mi(s,x):(Z._visibility|=2,ma(s,x,E,N,o)),o&&H&2048&&hs(x.alternate,x);break;case 24:ma(s,x,E,N,o),o&&H&2048&&ps(x.alternate,x);break;default:ma(s,x,E,N,o)}t=t.sibling}}function mi(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var n=e,a=t,o=a.flags;switch(a.tag){case 22:mi(n,a),o&2048&&hs(a.alternate,a);break;case 24:mi(n,a),o&2048&&ps(a.alternate,a);break;default:mi(n,a)}t=t.sibling}}var gi=8192;function ga(e,t,n){if(e.subtreeFlags&gi)for(e=e.child;e!==null;)Qh(e,t,n),e=e.sibling}function Qh(e,t,n){switch(e.tag){case 26:ga(e,t,n),e.flags&gi&&e.memoizedState!==null&&Lx(n,on,e.memoizedState,e.memoizedProps);break;case 5:ga(e,t,n);break;case 3:case 4:var a=on;on=Wr(e.stateNode.containerInfo),ga(e,t,n),on=a;break;case 22:e.memoizedState===null&&(a=e.alternate,a!==null&&a.memoizedState!==null?(a=gi,gi=16777216,ga(e,t,n),gi=a):ga(e,t,n));break;default:ga(e,t,n)}}function Xh(e){var t=e.alternate;if(t!==null&&(e=t.child,e!==null)){t.child=null;do t=e.sibling,e.sibling=null,e=t;while(e!==null)}}function yi(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var n=0;n<t.length;n++){var a=t[n];ht=a,Kh(a,e)}Xh(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Zh(e),e=e.sibling}function Zh(e){switch(e.tag){case 0:case 11:case 15:yi(e),e.flags&2048&&al(9,e,e.return);break;case 3:yi(e);break;case 12:yi(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,qr(e)):yi(e);break;default:yi(e)}}function qr(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var n=0;n<t.length;n++){var a=t[n];ht=a,Kh(a,e)}Xh(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:al(8,t,t.return),qr(t);break;case 22:n=t.stateNode,n._visibility&2&&(n._visibility&=-3,qr(t));break;default:qr(t)}e=e.sibling}}function Kh(e,t){for(;ht!==null;){var n=ht;switch(n.tag){case 0:case 11:case 15:al(8,n,t);break;case 23:case 22:if(n.memoizedState!==null&&n.memoizedState.cachePool!==null){var a=n.memoizedState.cachePool.pool;a!=null&&a.refCount++}break;case 24:ei(n.memoizedState.cache)}if(a=n.child,a!==null)a.return=n,ht=a;else e:for(n=e;ht!==null;){a=ht;var o=a.sibling,s=a.return;if(Uh(a),a===n){ht=null;break e}if(o!==null){o.return=s,ht=o;break e}ht=s}}}var Pv={getCacheForType:function(e){var t=gt(at),n=t.data.get(e);return n===void 0&&(n=e(),t.data.set(e,n)),n},cacheSignal:function(){return gt(at).controller.signal}},$v=typeof WeakMap=="function"?WeakMap:Map,_e=0,Ie=null,we=null,ze=0,Be=0,Yt=null,il=!1,ya=!1,ms=!1,Bn=0,We=0,rl=0,Ll=0,gs=0,Vt=0,va=0,vi=null,Nt=null,ys=!1,Yr=0,Fh=0,Vr=1/0,Gr=null,ul=null,ct=0,ol=null,xa=null,Un=0,vs=0,xs=null,Jh=null,xi=0,bs=null;function Gt(){return(_e&2)!==0&&ze!==0?ze&-ze:B.T!==null?js():df()}function Ph(){if(Vt===0)if((ze&536870912)===0||Ne){var e=Pi;Pi<<=1,(Pi&3932160)===0&&(Pi=262144),Vt=e}else Vt=536870912;return e=Ht.current,e!==null&&(e.flags|=32),Vt}function kt(e,t,n){(e===Ie&&(Be===2||Be===9)||e.cancelPendingCommit!==null)&&(ba(e,0),sl(e,ze,Vt,!1)),qa(e,n),((_e&2)===0||e!==Ie)&&(e===Ie&&((_e&2)===0&&(Ll|=n),We===4&&sl(e,ze,Vt,!1)),mn(e))}function $h(e,t,n){if((_e&6)!==0)throw Error(u(327));var a=!n&&(t&127)===0&&(t&e.expiredLanes)===0||Ha(e,t),o=a?tx(e,t):Es(e,t,!0),s=a;do{if(o===0){ya&&!a&&sl(e,t,0,!1);break}else{if(n=e.current.alternate,s&&!Wv(n)){o=Es(e,t,!1),s=!1;continue}if(o===2){if(s=t,e.errorRecoveryDisabledLanes&s)var x=0;else x=e.pendingLanes&-536870913,x=x!==0?x:x&536870912?536870912:0;if(x!==0){t=x;e:{var E=e;o=vi;var N=E.current.memoizedState.isDehydrated;if(N&&(ba(E,x).flags|=256),x=Es(E,x,!1),x!==2){if(ms&&!N){E.errorRecoveryDisabledLanes|=s,Ll|=s,o=4;break e}s=Nt,Nt=o,s!==null&&(Nt===null?Nt=s:Nt.push.apply(Nt,s))}o=x}if(s=!1,o!==2)continue}}if(o===1){ba(e,0),sl(e,t,0,!0);break}e:{switch(a=e,s=o,s){case 0:case 1:throw Error(u(345));case 4:if((t&4194048)!==t)break;case 6:sl(a,t,Vt,!il);break e;case 2:Nt=null;break;case 3:case 5:break;default:throw Error(u(329))}if((t&62914560)===t&&(o=Yr+300-St(),10<o)){if(sl(a,t,Vt,!il),Wi(a,0,!0)!==0)break e;Un=t,a.timeoutHandle=Rp(Wh.bind(null,a,n,Nt,Gr,ys,t,Vt,Ll,va,il,s,"Throttled",-0,0),o);break e}Wh(a,n,Nt,Gr,ys,t,Vt,Ll,va,il,s,null,-0,0)}}break}while(!0);mn(e)}function Wh(e,t,n,a,o,s,x,E,N,H,Z,$,Y,I){if(e.timeoutHandle=-1,$=t.subtreeFlags,$&8192||($&16785408)===16785408){$={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Cn},Qh(t,s,$);var oe=(s&62914560)===s?Yr-St():(s&4194048)===s?Fh-St():0;if(oe=Bx($,oe),oe!==null){Un=s,e.cancelPendingCommit=oe(up.bind(null,e,t,s,n,a,o,x,E,N,Z,$,null,Y,I)),sl(e,s,x,!H);return}}up(e,t,s,n,a,o,x,E,N)}function Wv(e){for(var t=e;;){var n=t.tag;if((n===0||n===11||n===15)&&t.flags&16384&&(n=t.updateQueue,n!==null&&(n=n.stores,n!==null)))for(var a=0;a<n.length;a++){var o=n[a],s=o.getSnapshot;o=o.value;try{if(!Bt(s(),o))return!1}catch{return!1}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function sl(e,t,n,a){t&=~gs,t&=~Ll,e.suspendedLanes|=t,e.pingedLanes&=~t,a&&(e.warmLanes|=t),a=e.expirationTimes;for(var o=t;0<o;){var s=31-Ge(o),x=1<<s;a[s]=-1,o&=~x}n!==0&&sf(e,n,t)}function Ir(){return(_e&6)===0?(bi(0),!1):!0}function Ss(){if(we!==null){if(Be===0)var e=we.return;else e=we,An=Al=null,Bo(e),ca=null,ni=0,e=we;for(;e!==null;)Nh(e.alternate,e),e=e.return;we=null}}function ba(e,t){var n=e.timeoutHandle;n!==-1&&(e.timeoutHandle=-1,xx(n)),n=e.cancelPendingCommit,n!==null&&(e.cancelPendingCommit=null,n()),Un=0,Ss(),Ie=e,we=n=wn(e.current,null),ze=t,Be=0,Yt=null,il=!1,ya=Ha(e,t),ms=!1,va=Vt=gs=Ll=rl=We=0,Nt=vi=null,ys=!1,(t&8)!==0&&(t|=t&32);var a=e.entangledLanes;if(a!==0)for(e=e.entanglements,a&=t;0<a;){var o=31-Ge(a),s=1<<o;t|=e[o],a&=~s}return Bn=t,fr(),n}function ep(e,t){xe=null,B.H=ci,t===sa||t===xr?(t=gd(),Be=3):t===wo?(t=gd(),Be=4):Be=t===Wo?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,Yt=t,we===null&&(We=1,_r(e,Jt(t,e.current)))}function tp(){var e=Ht.current;return e===null?!0:(ze&4194048)===ze?en===null:(ze&62914560)===ze||(ze&536870912)!==0?e===en:!1}function np(){var e=B.H;return B.H=ci,e===null?ci:e}function lp(){var e=B.A;return B.A=Pv,e}function Qr(){We=4,il||(ze&4194048)!==ze&&Ht.current!==null||(ya=!0),(rl&134217727)===0&&(Ll&134217727)===0||Ie===null||sl(Ie,ze,Vt,!1)}function Es(e,t,n){var a=_e;_e|=2;var o=np(),s=lp();(Ie!==e||ze!==t)&&(Gr=null,ba(e,t)),t=!1;var x=We;e:do try{if(Be!==0&&we!==null){var E=we,N=Yt;switch(Be){case 8:Ss(),x=6;break e;case 3:case 2:case 9:case 6:Ht.current===null&&(t=!0);var H=Be;if(Be=0,Yt=null,Sa(e,E,N,H),n&&ya){x=0;break e}break;default:H=Be,Be=0,Yt=null,Sa(e,E,N,H)}}ex(),x=We;break}catch(Z){ep(e,Z)}while(!0);return t&&e.shellSuspendCounter++,An=Al=null,_e=a,B.H=o,B.A=s,we===null&&(Ie=null,ze=0,fr()),x}function ex(){for(;we!==null;)ap(we)}function tx(e,t){var n=_e;_e|=2;var a=np(),o=lp();Ie!==e||ze!==t?(Gr=null,Vr=St()+500,ba(e,t)):ya=Ha(e,t);e:do try{if(Be!==0&&we!==null){t=we;var s=Yt;t:switch(Be){case 1:Be=0,Yt=null,Sa(e,t,s,1);break;case 2:case 9:if(pd(s)){Be=0,Yt=null,ip(t);break}t=function(){Be!==2&&Be!==9||Ie!==e||(Be=7),mn(e)},s.then(t,t);break e;case 3:Be=7;break e;case 4:Be=5;break e;case 7:pd(s)?(Be=0,Yt=null,ip(t)):(Be=0,Yt=null,Sa(e,t,s,7));break;case 5:var x=null;switch(we.tag){case 26:x=we.memoizedState;case 5:case 27:var E=we;if(x?Ip(x):E.stateNode.complete){Be=0,Yt=null;var N=E.sibling;if(N!==null)we=N;else{var H=E.return;H!==null?(we=H,Xr(H)):we=null}break t}}Be=0,Yt=null,Sa(e,t,s,5);break;case 6:Be=0,Yt=null,Sa(e,t,s,6);break;case 8:Ss(),We=6;break e;default:throw Error(u(462))}}nx();break}catch(Z){ep(e,Z)}while(!0);return An=Al=null,B.H=a,B.A=o,_e=n,we!==null?0:(Ie=null,ze=0,fr(),We)}function nx(){for(;we!==null&&!Ou();)ap(we)}function ap(e){var t=zh(e.alternate,e,Bn);e.memoizedProps=e.pendingProps,t===null?Xr(e):we=t}function ip(e){var t=e,n=t.alternate;switch(t.tag){case 15:case 0:t=Eh(n,t,t.pendingProps,t.type,void 0,ze);break;case 11:t=Eh(n,t,t.pendingProps,t.type.render,t.ref,ze);break;case 5:Bo(t);default:Nh(n,t),t=we=ld(t,Bn),t=zh(n,t,Bn)}e.memoizedProps=e.pendingProps,t===null?Xr(e):we=t}function Sa(e,t,n,a){An=Al=null,Bo(t),ca=null,ni=0;var o=t.return;try{if(Iv(e,o,t,n,ze)){We=1,_r(e,Jt(n,e.current)),we=null;return}}catch(s){if(o!==null)throw we=o,s;We=1,_r(e,Jt(n,e.current)),we=null;return}t.flags&32768?(Ne||a===1?e=!0:ya||(ze&536870912)!==0?e=!1:(il=e=!0,(a===2||a===9||a===3||a===6)&&(a=Ht.current,a!==null&&a.tag===13&&(a.flags|=16384))),rp(t,e)):Xr(t)}function Xr(e){var t=e;do{if((t.flags&32768)!==0){rp(t,il);return}e=t.return;var n=Zv(t.alternate,t,Bn);if(n!==null){we=n;return}if(t=t.sibling,t!==null){we=t;return}we=t=e}while(t!==null);We===0&&(We=5)}function rp(e,t){do{var n=Kv(e.alternate,e);if(n!==null){n.flags&=32767,we=n;return}if(n=e.return,n!==null&&(n.flags|=32768,n.subtreeFlags=0,n.deletions=null),!t&&(e=e.sibling,e!==null)){we=e;return}we=e=n}while(e!==null);We=6,we=null}function up(e,t,n,a,o,s,x,E,N){e.cancelPendingCommit=null;do Zr();while(ct!==0);if((_e&6)!==0)throw Error(u(327));if(t!==null){if(t===e.current)throw Error(u(177));if(s=t.lanes|t.childLanes,s|=so,Dy(e,n,s,x,E,N),e===Ie&&(we=Ie=null,ze=0),xa=t,ol=e,Un=n,vs=s,xs=o,Jh=a,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,rx(ge,function(){return dp(),null})):(e.callbackNode=null,e.callbackPriority=0),a=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||a){a=B.T,B.T=null,o=ee.p,ee.p=2,x=_e,_e|=4;try{Fv(e,t,n)}finally{_e=x,ee.p=o,B.T=a}}ct=1,op(),sp(),cp()}}function op(){if(ct===1){ct=0;var e=ol,t=xa,n=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||n){n=B.T,B.T=null;var a=ee.p;ee.p=2;var o=_e;_e|=4;try{Vh(t,e);var s=Os,x=Kf(e.containerInfo),E=s.focusedElem,N=s.selectionRange;if(x!==E&&E&&E.ownerDocument&&Zf(E.ownerDocument.documentElement,E)){if(N!==null&&ao(E)){var H=N.start,Z=N.end;if(Z===void 0&&(Z=H),"selectionStart"in E)E.selectionStart=H,E.selectionEnd=Math.min(Z,E.value.length);else{var $=E.ownerDocument||document,Y=$&&$.defaultView||window;if(Y.getSelection){var I=Y.getSelection(),oe=E.textContent.length,me=Math.min(N.start,oe),Ve=N.end===void 0?me:Math.min(N.end,oe);!I.extend&&me>Ve&&(x=Ve,Ve=me,me=x);var D=Xf(E,me),M=Xf(E,Ve);if(D&&M&&(I.rangeCount!==1||I.anchorNode!==D.node||I.anchorOffset!==D.offset||I.focusNode!==M.node||I.focusOffset!==M.offset)){var U=$.createRange();U.setStart(D.node,D.offset),I.removeAllRanges(),me>Ve?(I.addRange(U),I.extend(M.node,M.offset)):(U.setEnd(M.node,M.offset),I.addRange(U))}}}}for($=[],I=E;I=I.parentNode;)I.nodeType===1&&$.push({element:I,left:I.scrollLeft,top:I.scrollTop});for(typeof E.focus=="function"&&E.focus(),E=0;E<$.length;E++){var J=$[E];J.element.scrollLeft=J.left,J.element.scrollTop=J.top}}iu=!!_s,Os=_s=null}finally{_e=o,ee.p=a,B.T=n}}e.current=t,ct=2}}function sp(){if(ct===2){ct=0;var e=ol,t=xa,n=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||n){n=B.T,B.T=null;var a=ee.p;ee.p=2;var o=_e;_e|=4;try{Bh(e,t.alternate,t)}finally{_e=o,ee.p=a,B.T=n}}ct=3}}function cp(){if(ct===4||ct===3){ct=0,Du();var e=ol,t=xa,n=Un,a=Jh;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?ct=5:(ct=0,xa=ol=null,fp(e,e.pendingLanes));var o=e.pendingLanes;if(o===0&&(ul=null),Hu(n),t=t.stateNode,st&&typeof st.onCommitFiberRoot=="function")try{st.onCommitFiberRoot(Et,t,void 0,(t.current.flags&128)===128)}catch{}if(a!==null){t=B.T,o=ee.p,ee.p=2,B.T=null;try{for(var s=e.onRecoverableError,x=0;x<a.length;x++){var E=a[x];s(E.value,{componentStack:E.stack})}}finally{B.T=t,ee.p=o}}(Un&3)!==0&&Zr(),mn(e),o=e.pendingLanes,(n&261930)!==0&&(o&42)!==0?e===bs?xi++:(xi=0,bs=e):xi=0,bi(0)}}function fp(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,ei(t)))}function Zr(){return op(),sp(),cp(),dp()}function dp(){if(ct!==5)return!1;var e=ol,t=vs;vs=0;var n=Hu(Un),a=B.T,o=ee.p;try{ee.p=32>n?32:n,B.T=null,n=xs,xs=null;var s=ol,x=Un;if(ct=0,xa=ol=null,Un=0,(_e&6)!==0)throw Error(u(331));var E=_e;if(_e|=4,Zh(s.current),Ih(s,s.current,x,n),_e=E,bi(0,!1),st&&typeof st.onPostCommitFiberRoot=="function")try{st.onPostCommitFiberRoot(Et,s)}catch{}return!0}finally{ee.p=o,B.T=a,fp(e,t)}}function hp(e,t,n){t=Jt(n,t),t=$o(e.stateNode,t,2),e=tl(e,t,2),e!==null&&(qa(e,2),mn(e))}function Ue(e,t,n){if(e.tag===3)hp(e,e,n);else for(;t!==null;){if(t.tag===3){hp(t,e,n);break}else if(t.tag===1){var a=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof a.componentDidCatch=="function"&&(ul===null||!ul.has(a))){e=Jt(n,e),n=ph(2),a=tl(t,n,2),a!==null&&(mh(n,a,t,e),qa(a,2),mn(a));break}}t=t.return}}function Cs(e,t,n){var a=e.pingCache;if(a===null){a=e.pingCache=new $v;var o=new Set;a.set(t,o)}else o=a.get(t),o===void 0&&(o=new Set,a.set(t,o));o.has(n)||(ms=!0,o.add(n),e=lx.bind(null,e,t,n),t.then(e,e))}function lx(e,t,n){var a=e.pingCache;a!==null&&a.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,Ie===e&&(ze&n)===n&&(We===4||We===3&&(ze&62914560)===ze&&300>St()-Yr?(_e&2)===0&&ba(e,0):gs|=n,va===ze&&(va=0)),mn(e)}function pp(e,t){t===0&&(t=of()),e=Tl(e,t),e!==null&&(qa(e,t),mn(e))}function ax(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),pp(e,n)}function ix(e,t){var n=0;switch(e.tag){case 31:case 13:var a=e.stateNode,o=e.memoizedState;o!==null&&(n=o.retryLane);break;case 19:a=e.stateNode;break;case 22:a=e.stateNode._retryCache;break;default:throw Error(u(314))}a!==null&&a.delete(t),pp(e,n)}function rx(e,t){return Vl(e,t)}var Kr=null,Ea=null,Ts=!1,Fr=!1,ws=!1,cl=0;function mn(e){e!==Ea&&e.next===null&&(Ea===null?Kr=Ea=e:Ea=Ea.next=e),Fr=!0,Ts||(Ts=!0,ox())}function bi(e,t){if(!ws&&Fr){ws=!0;do for(var n=!1,a=Kr;a!==null;){if(e!==0){var o=a.pendingLanes;if(o===0)var s=0;else{var x=a.suspendedLanes,E=a.pingedLanes;s=(1<<31-Ge(42|e)+1)-1,s&=o&~(x&~E),s=s&201326741?s&201326741|1:s?s|2:0}s!==0&&(n=!0,vp(a,s))}else s=ze,s=Wi(a,a===Ie?s:0,a.cancelPendingCommit!==null||a.timeoutHandle!==-1),(s&3)===0||Ha(a,s)||(n=!0,vp(a,s));a=a.next}while(n);ws=!1}}function ux(){mp()}function mp(){Fr=Ts=!1;var e=0;cl!==0&&vx()&&(e=cl);for(var t=St(),n=null,a=Kr;a!==null;){var o=a.next,s=gp(a,t);s===0?(a.next=null,n===null?Kr=o:n.next=o,o===null&&(Ea=n)):(n=a,(e!==0||(s&3)!==0)&&(Fr=!0)),a=o}ct!==0&&ct!==5||bi(e),cl!==0&&(cl=0)}function gp(e,t){for(var n=e.suspendedLanes,a=e.pingedLanes,o=e.expirationTimes,s=e.pendingLanes&-62914561;0<s;){var x=31-Ge(s),E=1<<x,N=o[x];N===-1?((E&n)===0||(E&a)!==0)&&(o[x]=Oy(E,t)):N<=t&&(e.expiredLanes|=E),s&=~E}if(t=Ie,n=ze,n=Wi(e,e===t?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),a=e.callbackNode,n===0||e===t&&(Be===2||Be===9)||e.cancelPendingCommit!==null)return a!==null&&a!==null&&Ua(a),e.callbackNode=null,e.callbackPriority=0;if((n&3)===0||Ha(e,n)){if(t=n&-n,t===e.callbackPriority)return t;switch(a!==null&&Ua(a),Hu(n)){case 2:case 8:n=re;break;case 32:n=ge;break;case 268435456:n=Le;break;default:n=ge}return a=yp.bind(null,e),n=Vl(n,a),e.callbackPriority=t,e.callbackNode=n,t}return a!==null&&a!==null&&Ua(a),e.callbackPriority=2,e.callbackNode=null,2}function yp(e,t){if(ct!==0&&ct!==5)return e.callbackNode=null,e.callbackPriority=0,null;var n=e.callbackNode;if(Zr()&&e.callbackNode!==n)return null;var a=ze;return a=Wi(e,e===Ie?a:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),a===0?null:($h(e,a,t),gp(e,St()),e.callbackNode!=null&&e.callbackNode===n?yp.bind(null,e):null)}function vp(e,t){if(Zr())return null;$h(e,t,!0)}function ox(){bx(function(){(_e&6)!==0?Vl(F,ux):mp()})}function js(){if(cl===0){var e=ua;e===0&&(e=Ji,Ji<<=1,(Ji&261888)===0&&(Ji=256)),cl=e}return cl}function xp(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:lr(""+e)}function bp(e,t){var n=t.ownerDocument.createElement("input");return n.name=t.name,n.value=t.value,e.id&&n.setAttribute("form",e.id),t.parentNode.insertBefore(n,t),e=new FormData(e),n.parentNode.removeChild(n),e}function sx(e,t,n,a,o){if(t==="submit"&&n&&n.stateNode===o){var s=xp((o[wt]||null).action),x=a.submitter;x&&(t=(t=x[wt]||null)?xp(t.formAction):x.getAttribute("formAction"),t!==null&&(s=t,x=null));var E=new ur("action","action",null,a,o);e.push({event:E,listeners:[{instance:null,listener:function(){if(a.defaultPrevented){if(cl!==0){var N=x?bp(o,x):new FormData(o);Xo(n,{pending:!0,data:N,method:o.method,action:s},null,N)}}else typeof s=="function"&&(E.preventDefault(),N=x?bp(o,x):new FormData(o),Xo(n,{pending:!0,data:N,method:o.method,action:s},s,N))},currentTarget:o}]})}}for(var As=0;As<oo.length;As++){var zs=oo[As],cx=zs.toLowerCase(),fx=zs[0].toUpperCase()+zs.slice(1);un(cx,"on"+fx)}un(Pf,"onAnimationEnd"),un($f,"onAnimationIteration"),un(Wf,"onAnimationStart"),un("dblclick","onDoubleClick"),un("focusin","onFocus"),un("focusout","onBlur"),un(Av,"onTransitionRun"),un(zv,"onTransitionStart"),un(Rv,"onTransitionCancel"),un(ed,"onTransitionEnd"),Zl("onMouseEnter",["mouseout","mouseover"]),Zl("onMouseLeave",["mouseout","mouseover"]),Zl("onPointerEnter",["pointerout","pointerover"]),Zl("onPointerLeave",["pointerout","pointerover"]),bl("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),bl("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),bl("onBeforeInput",["compositionend","keypress","textInput","paste"]),bl("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),bl("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),bl("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Si="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(" "),dx=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Si));function Sp(e,t){t=(t&4)!==0;for(var n=0;n<e.length;n++){var a=e[n],o=a.event;a=a.listeners;e:{var s=void 0;if(t)for(var x=a.length-1;0<=x;x--){var E=a[x],N=E.instance,H=E.currentTarget;if(E=E.listener,N!==s&&o.isPropagationStopped())break e;s=E,o.currentTarget=H;try{s(o)}catch(Z){cr(Z)}o.currentTarget=null,s=N}else for(x=0;x<a.length;x++){if(E=a[x],N=E.instance,H=E.currentTarget,E=E.listener,N!==s&&o.isPropagationStopped())break e;s=E,o.currentTarget=H;try{s(o)}catch(Z){cr(Z)}o.currentTarget=null,s=N}}}}function je(e,t){var n=t[qu];n===void 0&&(n=t[qu]=new Set);var a=e+"__bubble";n.has(a)||(Ep(t,e,2,!1),n.add(a))}function Rs(e,t,n){var a=0;t&&(a|=4),Ep(n,e,a,t)}var Jr="_reactListening"+Math.random().toString(36).slice(2);function Ns(e){if(!e[Jr]){e[Jr]=!0,mf.forEach(function(n){n!=="selectionchange"&&(dx.has(n)||Rs(n,!1,e),Rs(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Jr]||(t[Jr]=!0,Rs("selectionchange",!1,t))}}function Ep(e,t,n,a){switch(Pp(t)){case 2:var o=qx;break;case 8:o=Yx;break;default:o=Qs}n=o.bind(null,t,n,e),o=void 0,!Fu||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(o=!0),a?o!==void 0?e.addEventListener(t,n,{capture:!0,passive:o}):e.addEventListener(t,n,!0):o!==void 0?e.addEventListener(t,n,{passive:o}):e.addEventListener(t,n,!1)}function ks(e,t,n,a,o){var s=a;if((t&1)===0&&(t&2)===0&&a!==null)e:for(;;){if(a===null)return;var x=a.tag;if(x===3||x===4){var E=a.stateNode.containerInfo;if(E===o)break;if(x===4)for(x=a.return;x!==null;){var N=x.tag;if((N===3||N===4)&&x.stateNode.containerInfo===o)return;x=x.return}for(;E!==null;){if(x=Il(E),x===null)return;if(N=x.tag,N===5||N===6||N===26||N===27){a=s=x;continue e}E=E.parentNode}}a=a.return}Af(function(){var H=s,Z=Zu(n),$=[];e:{var Y=td.get(e);if(Y!==void 0){var I=ur,oe=e;switch(e){case"keypress":if(ir(n)===0)break e;case"keydown":case"keyup":I=iv;break;case"focusin":oe="focus",I=Wu;break;case"focusout":oe="blur",I=Wu;break;case"beforeblur":case"afterblur":I=Wu;break;case"click":if(n.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":I=Nf;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":I=Zy;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":I=ov;break;case Pf:case $f:case Wf:I=Jy;break;case ed:I=cv;break;case"scroll":case"scrollend":I=Qy;break;case"wheel":I=dv;break;case"copy":case"cut":case"paste":I=$y;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":I=Mf;break;case"toggle":case"beforetoggle":I=pv}var me=(t&4)!==0,Ve=!me&&(e==="scroll"||e==="scrollend"),D=me?Y!==null?Y+"Capture":null:Y;me=[];for(var M=H,U;M!==null;){var J=M;if(U=J.stateNode,J=J.tag,J!==5&&J!==26&&J!==27||U===null||D===null||(J=Ga(M,D),J!=null&&me.push(Ei(M,J,U))),Ve)break;M=M.return}0<me.length&&(Y=new I(Y,oe,null,n,Z),$.push({event:Y,listeners:me}))}}if((t&7)===0){e:{if(Y=e==="mouseover"||e==="pointerover",I=e==="mouseout"||e==="pointerout",Y&&n!==Xu&&(oe=n.relatedTarget||n.fromElement)&&(Il(oe)||oe[Gl]))break e;if((I||Y)&&(Y=Z.window===Z?Z:(Y=Z.ownerDocument)?Y.defaultView||Y.parentWindow:window,I?(oe=n.relatedTarget||n.toElement,I=H,oe=oe?Il(oe):null,oe!==null&&(Ve=f(oe),me=oe.tag,oe!==Ve||me!==5&&me!==27&&me!==6)&&(oe=null)):(I=null,oe=H),I!==oe)){if(me=Nf,J="onMouseLeave",D="onMouseEnter",M="mouse",(e==="pointerout"||e==="pointerover")&&(me=Mf,J="onPointerLeave",D="onPointerEnter",M="pointer"),Ve=I==null?Y:Va(I),U=oe==null?Y:Va(oe),Y=new me(J,M+"leave",I,n,Z),Y.target=Ve,Y.relatedTarget=U,J=null,Il(Z)===H&&(me=new me(D,M+"enter",oe,n,Z),me.target=U,me.relatedTarget=Ve,J=me),Ve=J,I&&oe)t:{for(me=hx,D=I,M=oe,U=0,J=D;J;J=me(J))U++;J=0;for(var he=M;he;he=me(he))J++;for(;0<U-J;)D=me(D),U--;for(;0<J-U;)M=me(M),J--;for(;U--;){if(D===M||M!==null&&D===M.alternate){me=D;break t}D=me(D),M=me(M)}me=null}else me=null;I!==null&&Cp($,Y,I,me,!1),oe!==null&&Ve!==null&&Cp($,Ve,oe,me,!0)}}e:{if(Y=H?Va(H):window,I=Y.nodeName&&Y.nodeName.toLowerCase(),I==="select"||I==="input"&&Y.type==="file")var ke=qf;else if(Uf(Y))if(Yf)ke=Tv;else{ke=Ev;var ce=Sv}else I=Y.nodeName,!I||I.toLowerCase()!=="input"||Y.type!=="checkbox"&&Y.type!=="radio"?H&&Qu(H.elementType)&&(ke=qf):ke=Cv;if(ke&&(ke=ke(e,H))){Hf($,ke,n,Z);break e}ce&&ce(e,Y,H),e==="focusout"&&H&&Y.type==="number"&&H.memoizedProps.value!=null&&Iu(Y,"number",Y.value)}switch(ce=H?Va(H):window,e){case"focusin":(Uf(ce)||ce.contentEditable==="true")&&(Wl=ce,io=H,Pa=null);break;case"focusout":Pa=io=Wl=null;break;case"mousedown":ro=!0;break;case"contextmenu":case"mouseup":case"dragend":ro=!1,Ff($,n,Z);break;case"selectionchange":if(jv)break;case"keydown":case"keyup":Ff($,n,Z)}var be;if(to)e:{switch(e){case"compositionstart":var Re="onCompositionStart";break e;case"compositionend":Re="onCompositionEnd";break e;case"compositionupdate":Re="onCompositionUpdate";break e}Re=void 0}else $l?Lf(e,n)&&(Re="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(Re="onCompositionStart");Re&&(_f&&n.locale!=="ko"&&($l||Re!=="onCompositionStart"?Re==="onCompositionEnd"&&$l&&(be=zf()):(Kn=Z,Ju="value"in Kn?Kn.value:Kn.textContent,$l=!0)),ce=Pr(H,Re),0<ce.length&&(Re=new kf(Re,e,null,n,Z),$.push({event:Re,listeners:ce}),be?Re.data=be:(be=Bf(n),be!==null&&(Re.data=be)))),(be=gv?yv(e,n):vv(e,n))&&(Re=Pr(H,"onBeforeInput"),0<Re.length&&(ce=new kf("onBeforeInput","beforeinput",null,n,Z),$.push({event:ce,listeners:Re}),ce.data=be)),sx($,e,H,n,Z)}Sp($,t)})}function Ei(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Pr(e,t){for(var n=t+"Capture",a=[];e!==null;){var o=e,s=o.stateNode;if(o=o.tag,o!==5&&o!==26&&o!==27||s===null||(o=Ga(e,n),o!=null&&a.unshift(Ei(e,o,s)),o=Ga(e,t),o!=null&&a.push(Ei(e,o,s))),e.tag===3)return a;e=e.return}return[]}function hx(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function Cp(e,t,n,a,o){for(var s=t._reactName,x=[];n!==null&&n!==a;){var E=n,N=E.alternate,H=E.stateNode;if(E=E.tag,N!==null&&N===a)break;E!==5&&E!==26&&E!==27||H===null||(N=H,o?(H=Ga(n,s),H!=null&&x.unshift(Ei(n,H,N))):o||(H=Ga(n,s),H!=null&&x.push(Ei(n,H,N)))),n=n.return}x.length!==0&&e.push({event:t,listeners:x})}var px=/\r\n?/g,mx=/\u0000|\uFFFD/g;function Tp(e){return(typeof e=="string"?e:""+e).replace(px,`
9
+ `).replace(mx,"")}function wp(e,t){return t=Tp(t),Tp(e)===t}function Ye(e,t,n,a,o,s){switch(n){case"children":typeof a=="string"?t==="body"||t==="textarea"&&a===""||Fl(e,a):(typeof a=="number"||typeof a=="bigint")&&t!=="body"&&Fl(e,""+a);break;case"className":tr(e,"class",a);break;case"tabIndex":tr(e,"tabindex",a);break;case"dir":case"role":case"viewBox":case"width":case"height":tr(e,n,a);break;case"style":wf(e,a,s);break;case"data":if(t!=="object"){tr(e,"data",a);break}case"src":case"href":if(a===""&&(t!=="a"||n!=="href")){e.removeAttribute(n);break}if(a==null||typeof a=="function"||typeof a=="symbol"||typeof a=="boolean"){e.removeAttribute(n);break}a=lr(""+a),e.setAttribute(n,a);break;case"action":case"formAction":if(typeof a=="function"){e.setAttribute(n,"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 s=="function"&&(n==="formAction"?(t!=="input"&&Ye(e,t,"name",o.name,o,null),Ye(e,t,"formEncType",o.formEncType,o,null),Ye(e,t,"formMethod",o.formMethod,o,null),Ye(e,t,"formTarget",o.formTarget,o,null)):(Ye(e,t,"encType",o.encType,o,null),Ye(e,t,"method",o.method,o,null),Ye(e,t,"target",o.target,o,null)));if(a==null||typeof a=="symbol"||typeof a=="boolean"){e.removeAttribute(n);break}a=lr(""+a),e.setAttribute(n,a);break;case"onClick":a!=null&&(e.onclick=Cn);break;case"onScroll":a!=null&&je("scroll",e);break;case"onScrollEnd":a!=null&&je("scrollend",e);break;case"dangerouslySetInnerHTML":if(a!=null){if(typeof a!="object"||!("__html"in a))throw Error(u(61));if(n=a.__html,n!=null){if(o.children!=null)throw Error(u(60));e.innerHTML=n}}break;case"multiple":e.multiple=a&&typeof a!="function"&&typeof a!="symbol";break;case"muted":e.muted=a&&typeof a!="function"&&typeof a!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(a==null||typeof a=="function"||typeof a=="boolean"||typeof a=="symbol"){e.removeAttribute("xlink:href");break}n=lr(""+a),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",n);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":a!=null&&typeof a!="function"&&typeof a!="symbol"?e.setAttribute(n,""+a):e.removeAttribute(n);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":a&&typeof a!="function"&&typeof a!="symbol"?e.setAttribute(n,""):e.removeAttribute(n);break;case"capture":case"download":a===!0?e.setAttribute(n,""):a!==!1&&a!=null&&typeof a!="function"&&typeof a!="symbol"?e.setAttribute(n,a):e.removeAttribute(n);break;case"cols":case"rows":case"size":case"span":a!=null&&typeof a!="function"&&typeof a!="symbol"&&!isNaN(a)&&1<=a?e.setAttribute(n,a):e.removeAttribute(n);break;case"rowSpan":case"start":a==null||typeof a=="function"||typeof a=="symbol"||isNaN(a)?e.removeAttribute(n):e.setAttribute(n,a);break;case"popover":je("beforetoggle",e),je("toggle",e),er(e,"popover",a);break;case"xlinkActuate":En(e,"http://www.w3.org/1999/xlink","xlink:actuate",a);break;case"xlinkArcrole":En(e,"http://www.w3.org/1999/xlink","xlink:arcrole",a);break;case"xlinkRole":En(e,"http://www.w3.org/1999/xlink","xlink:role",a);break;case"xlinkShow":En(e,"http://www.w3.org/1999/xlink","xlink:show",a);break;case"xlinkTitle":En(e,"http://www.w3.org/1999/xlink","xlink:title",a);break;case"xlinkType":En(e,"http://www.w3.org/1999/xlink","xlink:type",a);break;case"xmlBase":En(e,"http://www.w3.org/XML/1998/namespace","xml:base",a);break;case"xmlLang":En(e,"http://www.w3.org/XML/1998/namespace","xml:lang",a);break;case"xmlSpace":En(e,"http://www.w3.org/XML/1998/namespace","xml:space",a);break;case"is":er(e,"is",a);break;case"innerText":case"textContent":break;default:(!(2<n.length)||n[0]!=="o"&&n[0]!=="O"||n[1]!=="n"&&n[1]!=="N")&&(n=Gy.get(n)||n,er(e,n,a))}}function Ms(e,t,n,a,o,s){switch(n){case"style":wf(e,a,s);break;case"dangerouslySetInnerHTML":if(a!=null){if(typeof a!="object"||!("__html"in a))throw Error(u(61));if(n=a.__html,n!=null){if(o.children!=null)throw Error(u(60));e.innerHTML=n}}break;case"children":typeof a=="string"?Fl(e,a):(typeof a=="number"||typeof a=="bigint")&&Fl(e,""+a);break;case"onScroll":a!=null&&je("scroll",e);break;case"onScrollEnd":a!=null&&je("scrollend",e);break;case"onClick":a!=null&&(e.onclick=Cn);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!gf.hasOwnProperty(n))e:{if(n[0]==="o"&&n[1]==="n"&&(o=n.endsWith("Capture"),t=n.slice(2,o?n.length-7:void 0),s=e[wt]||null,s=s!=null?s[n]:null,typeof s=="function"&&e.removeEventListener(t,s,o),typeof a=="function")){typeof s!="function"&&s!==null&&(n in e?e[n]=null:e.hasAttribute(n)&&e.removeAttribute(n)),e.addEventListener(t,a,o);break e}n in e?e[n]=a:a===!0?e.setAttribute(n,""):er(e,n,a)}}}function vt(e,t,n){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":je("error",e),je("load",e);var a=!1,o=!1,s;for(s in n)if(n.hasOwnProperty(s)){var x=n[s];if(x!=null)switch(s){case"src":a=!0;break;case"srcSet":o=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(u(137,t));default:Ye(e,t,s,x,n,null)}}o&&Ye(e,t,"srcSet",n.srcSet,n,null),a&&Ye(e,t,"src",n.src,n,null);return;case"input":je("invalid",e);var E=s=x=o=null,N=null,H=null;for(a in n)if(n.hasOwnProperty(a)){var Z=n[a];if(Z!=null)switch(a){case"name":o=Z;break;case"type":x=Z;break;case"checked":N=Z;break;case"defaultChecked":H=Z;break;case"value":s=Z;break;case"defaultValue":E=Z;break;case"children":case"dangerouslySetInnerHTML":if(Z!=null)throw Error(u(137,t));break;default:Ye(e,t,a,Z,n,null)}}Sf(e,s,E,N,H,x,o,!1);return;case"select":je("invalid",e),a=x=s=null;for(o in n)if(n.hasOwnProperty(o)&&(E=n[o],E!=null))switch(o){case"value":s=E;break;case"defaultValue":x=E;break;case"multiple":a=E;default:Ye(e,t,o,E,n,null)}t=s,n=x,e.multiple=!!a,t!=null?Kl(e,!!a,t,!1):n!=null&&Kl(e,!!a,n,!0);return;case"textarea":je("invalid",e),s=o=a=null;for(x in n)if(n.hasOwnProperty(x)&&(E=n[x],E!=null))switch(x){case"value":a=E;break;case"defaultValue":o=E;break;case"children":s=E;break;case"dangerouslySetInnerHTML":if(E!=null)throw Error(u(91));break;default:Ye(e,t,x,E,n,null)}Cf(e,a,o,s);return;case"option":for(N in n)n.hasOwnProperty(N)&&(a=n[N],a!=null)&&(N==="selected"?e.selected=a&&typeof a!="function"&&typeof a!="symbol":Ye(e,t,N,a,n,null));return;case"dialog":je("beforetoggle",e),je("toggle",e),je("cancel",e),je("close",e);break;case"iframe":case"object":je("load",e);break;case"video":case"audio":for(a=0;a<Si.length;a++)je(Si[a],e);break;case"image":je("error",e),je("load",e);break;case"details":je("toggle",e);break;case"embed":case"source":case"link":je("error",e),je("load",e);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(H in n)if(n.hasOwnProperty(H)&&(a=n[H],a!=null))switch(H){case"children":case"dangerouslySetInnerHTML":throw Error(u(137,t));default:Ye(e,t,H,a,n,null)}return;default:if(Qu(t)){for(Z in n)n.hasOwnProperty(Z)&&(a=n[Z],a!==void 0&&Ms(e,t,Z,a,n,void 0));return}}for(E in n)n.hasOwnProperty(E)&&(a=n[E],a!=null&&Ye(e,t,E,a,n,null))}function gx(e,t,n,a){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var o=null,s=null,x=null,E=null,N=null,H=null,Z=null;for(I in n){var $=n[I];if(n.hasOwnProperty(I)&&$!=null)switch(I){case"checked":break;case"value":break;case"defaultValue":N=$;default:a.hasOwnProperty(I)||Ye(e,t,I,null,a,$)}}for(var Y in a){var I=a[Y];if($=n[Y],a.hasOwnProperty(Y)&&(I!=null||$!=null))switch(Y){case"type":s=I;break;case"name":o=I;break;case"checked":H=I;break;case"defaultChecked":Z=I;break;case"value":x=I;break;case"defaultValue":E=I;break;case"children":case"dangerouslySetInnerHTML":if(I!=null)throw Error(u(137,t));break;default:I!==$&&Ye(e,t,Y,I,a,$)}}Gu(e,x,E,N,H,Z,s,o);return;case"select":I=x=E=Y=null;for(s in n)if(N=n[s],n.hasOwnProperty(s)&&N!=null)switch(s){case"value":break;case"multiple":I=N;default:a.hasOwnProperty(s)||Ye(e,t,s,null,a,N)}for(o in a)if(s=a[o],N=n[o],a.hasOwnProperty(o)&&(s!=null||N!=null))switch(o){case"value":Y=s;break;case"defaultValue":E=s;break;case"multiple":x=s;default:s!==N&&Ye(e,t,o,s,a,N)}t=E,n=x,a=I,Y!=null?Kl(e,!!n,Y,!1):!!a!=!!n&&(t!=null?Kl(e,!!n,t,!0):Kl(e,!!n,n?[]:"",!1));return;case"textarea":I=Y=null;for(E in n)if(o=n[E],n.hasOwnProperty(E)&&o!=null&&!a.hasOwnProperty(E))switch(E){case"value":break;case"children":break;default:Ye(e,t,E,null,a,o)}for(x in a)if(o=a[x],s=n[x],a.hasOwnProperty(x)&&(o!=null||s!=null))switch(x){case"value":Y=o;break;case"defaultValue":I=o;break;case"children":break;case"dangerouslySetInnerHTML":if(o!=null)throw Error(u(91));break;default:o!==s&&Ye(e,t,x,o,a,s)}Ef(e,Y,I);return;case"option":for(var oe in n)Y=n[oe],n.hasOwnProperty(oe)&&Y!=null&&!a.hasOwnProperty(oe)&&(oe==="selected"?e.selected=!1:Ye(e,t,oe,null,a,Y));for(N in a)Y=a[N],I=n[N],a.hasOwnProperty(N)&&Y!==I&&(Y!=null||I!=null)&&(N==="selected"?e.selected=Y&&typeof Y!="function"&&typeof Y!="symbol":Ye(e,t,N,Y,a,I));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 me in n)Y=n[me],n.hasOwnProperty(me)&&Y!=null&&!a.hasOwnProperty(me)&&Ye(e,t,me,null,a,Y);for(H in a)if(Y=a[H],I=n[H],a.hasOwnProperty(H)&&Y!==I&&(Y!=null||I!=null))switch(H){case"children":case"dangerouslySetInnerHTML":if(Y!=null)throw Error(u(137,t));break;default:Ye(e,t,H,Y,a,I)}return;default:if(Qu(t)){for(var Ve in n)Y=n[Ve],n.hasOwnProperty(Ve)&&Y!==void 0&&!a.hasOwnProperty(Ve)&&Ms(e,t,Ve,void 0,a,Y);for(Z in a)Y=a[Z],I=n[Z],!a.hasOwnProperty(Z)||Y===I||Y===void 0&&I===void 0||Ms(e,t,Z,Y,a,I);return}}for(var D in n)Y=n[D],n.hasOwnProperty(D)&&Y!=null&&!a.hasOwnProperty(D)&&Ye(e,t,D,null,a,Y);for($ in a)Y=a[$],I=n[$],!a.hasOwnProperty($)||Y===I||Y==null&&I==null||Ye(e,t,$,Y,a,I)}function jp(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function yx(){if(typeof performance.getEntriesByType=="function"){for(var e=0,t=0,n=performance.getEntriesByType("resource"),a=0;a<n.length;a++){var o=n[a],s=o.transferSize,x=o.initiatorType,E=o.duration;if(s&&E&&jp(x)){for(x=0,E=o.responseEnd,a+=1;a<n.length;a++){var N=n[a],H=N.startTime;if(H>E)break;var Z=N.transferSize,$=N.initiatorType;Z&&jp($)&&(N=N.responseEnd,x+=Z*(N<E?1:(E-H)/(N-H)))}if(--a,t+=8*(s+x)/(o.duration/1e3),e++,10<e)break}}if(0<e)return t/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e=="number")?e:5}var _s=null,Os=null;function $r(e){return e.nodeType===9?e:e.ownerDocument}function Ap(e){switch(e){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function zp(e,t){if(e===0)switch(t){case"svg":return 1;case"math":return 2;default:return 0}return e===1&&t==="foreignObject"?0:e}function Ds(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.children=="bigint"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var Ls=null;function vx(){var e=window.event;return e&&e.type==="popstate"?e===Ls?!1:(Ls=e,!0):(Ls=null,!1)}var Rp=typeof setTimeout=="function"?setTimeout:void 0,xx=typeof clearTimeout=="function"?clearTimeout:void 0,Np=typeof Promise=="function"?Promise:void 0,bx=typeof queueMicrotask=="function"?queueMicrotask:typeof Np<"u"?function(e){return Np.resolve(null).then(e).catch(Sx)}:Rp;function Sx(e){setTimeout(function(){throw e})}function fl(e){return e==="head"}function kp(e,t){var n=t,a=0;do{var o=n.nextSibling;if(e.removeChild(n),o&&o.nodeType===8)if(n=o.data,n==="/$"||n==="/&"){if(a===0){e.removeChild(o),ja(t);return}a--}else if(n==="$"||n==="$?"||n==="$~"||n==="$!"||n==="&")a++;else if(n==="html")Ci(e.ownerDocument.documentElement);else if(n==="head"){n=e.ownerDocument.head,Ci(n);for(var s=n.firstChild;s;){var x=s.nextSibling,E=s.nodeName;s[Ya]||E==="SCRIPT"||E==="STYLE"||E==="LINK"&&s.rel.toLowerCase()==="stylesheet"||n.removeChild(s),s=x}}else n==="body"&&Ci(e.ownerDocument.body);n=o}while(n);ja(t)}function Mp(e,t){var n=e;e=0;do{var a=n.nextSibling;if(n.nodeType===1?t?(n._stashedDisplay=n.style.display,n.style.display="none"):(n.style.display=n._stashedDisplay||"",n.getAttribute("style")===""&&n.removeAttribute("style")):n.nodeType===3&&(t?(n._stashedText=n.nodeValue,n.nodeValue=""):n.nodeValue=n._stashedText||""),a&&a.nodeType===8)if(n=a.data,n==="/$"){if(e===0)break;e--}else n!=="$"&&n!=="$?"&&n!=="$~"&&n!=="$!"||e++;n=a}while(n)}function Bs(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var n=t;switch(t=t.nextSibling,n.nodeName){case"HTML":case"HEAD":case"BODY":Bs(n),Yu(n);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(n.rel.toLowerCase()==="stylesheet")continue}e.removeChild(n)}}function Ex(e,t,n,a){for(;e.nodeType===1;){var o=n;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!a&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(a){if(!e[Ya])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(s=e.getAttribute("rel"),s==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(s!==o.rel||e.getAttribute("href")!==(o.href==null||o.href===""?null:o.href)||e.getAttribute("crossorigin")!==(o.crossOrigin==null?null:o.crossOrigin)||e.getAttribute("title")!==(o.title==null?null:o.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(s=e.getAttribute("src"),(s!==(o.src==null?null:o.src)||e.getAttribute("type")!==(o.type==null?null:o.type)||e.getAttribute("crossorigin")!==(o.crossOrigin==null?null:o.crossOrigin))&&s&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var s=o.name==null?null:""+o.name;if(o.type==="hidden"&&e.getAttribute("name")===s)return e}else return e;if(e=tn(e.nextSibling),e===null)break}return null}function Cx(e,t,n){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!n||(e=tn(e.nextSibling),e===null))return null;return e}function _p(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=tn(e.nextSibling),e===null))return null;return e}function Us(e){return e.data==="$?"||e.data==="$~"}function Hs(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function Tx(e,t){var n=e.ownerDocument;if(e.data==="$~")e._reactRetry=t;else if(e.data!=="$?"||n.readyState!=="loading")t();else{var a=function(){t(),n.removeEventListener("DOMContentLoaded",a)};n.addEventListener("DOMContentLoaded",a),e._reactRetry=a}}function tn(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?"||t==="$~"||t==="&"||t==="F!"||t==="F")break;if(t==="/$"||t==="/&")return null}}return e}var qs=null;function Op(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"||n==="/&"){if(t===0)return tn(e.nextSibling);t--}else n!=="$"&&n!=="$!"&&n!=="$?"&&n!=="$~"&&n!=="&"||t++}e=e.nextSibling}return null}function Dp(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="$"||n==="$!"||n==="$?"||n==="$~"||n==="&"){if(t===0)return e;t--}else n!=="/$"&&n!=="/&"||t++}e=e.previousSibling}return null}function Lp(e,t,n){switch(t=$r(n),e){case"html":if(e=t.documentElement,!e)throw Error(u(452));return e;case"head":if(e=t.head,!e)throw Error(u(453));return e;case"body":if(e=t.body,!e)throw Error(u(454));return e;default:throw Error(u(451))}}function Ci(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);Yu(e)}var nn=new Map,Bp=new Set;function Wr(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var Hn=ee.d;ee.d={f:wx,r:jx,D:Ax,C:zx,L:Rx,m:Nx,X:Mx,S:kx,M:_x};function wx(){var e=Hn.f(),t=Ir();return e||t}function jx(e){var t=Ql(e);t!==null&&t.tag===5&&t.type==="form"?eh(t):Hn.r(e)}var Ca=typeof document>"u"?null:document;function Up(e,t,n){var a=Ca;if(a&&typeof t=="string"&&t){var o=Kt(t);o='link[rel="'+e+'"][href="'+o+'"]',typeof n=="string"&&(o+='[crossorigin="'+n+'"]'),Bp.has(o)||(Bp.add(o),e={rel:e,crossOrigin:n,href:t},a.querySelector(o)===null&&(t=a.createElement("link"),vt(t,"link",e),dt(t),a.head.appendChild(t)))}}function Ax(e){Hn.D(e),Up("dns-prefetch",e,null)}function zx(e,t){Hn.C(e,t),Up("preconnect",e,t)}function Rx(e,t,n){Hn.L(e,t,n);var a=Ca;if(a&&e&&t){var o='link[rel="preload"][as="'+Kt(t)+'"]';t==="image"&&n&&n.imageSrcSet?(o+='[imagesrcset="'+Kt(n.imageSrcSet)+'"]',typeof n.imageSizes=="string"&&(o+='[imagesizes="'+Kt(n.imageSizes)+'"]')):o+='[href="'+Kt(e)+'"]';var s=o;switch(t){case"style":s=Ta(e);break;case"script":s=wa(e)}nn.has(s)||(e=v({rel:"preload",href:t==="image"&&n&&n.imageSrcSet?void 0:e,as:t},n),nn.set(s,e),a.querySelector(o)!==null||t==="style"&&a.querySelector(Ti(s))||t==="script"&&a.querySelector(wi(s))||(t=a.createElement("link"),vt(t,"link",e),dt(t),a.head.appendChild(t)))}}function Nx(e,t){Hn.m(e,t);var n=Ca;if(n&&e){var a=t&&typeof t.as=="string"?t.as:"script",o='link[rel="modulepreload"][as="'+Kt(a)+'"][href="'+Kt(e)+'"]',s=o;switch(a){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":s=wa(e)}if(!nn.has(s)&&(e=v({rel:"modulepreload",href:e},t),nn.set(s,e),n.querySelector(o)===null)){switch(a){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(n.querySelector(wi(s)))return}a=n.createElement("link"),vt(a,"link",e),dt(a),n.head.appendChild(a)}}}function kx(e,t,n){Hn.S(e,t,n);var a=Ca;if(a&&e){var o=Xl(a).hoistableStyles,s=Ta(e);t=t||"default";var x=o.get(s);if(!x){var E={loading:0,preload:null};if(x=a.querySelector(Ti(s)))E.loading=5;else{e=v({rel:"stylesheet",href:e,"data-precedence":t},n),(n=nn.get(s))&&Ys(e,n);var N=x=a.createElement("link");dt(N),vt(N,"link",e),N._p=new Promise(function(H,Z){N.onload=H,N.onerror=Z}),N.addEventListener("load",function(){E.loading|=1}),N.addEventListener("error",function(){E.loading|=2}),E.loading|=4,eu(x,t,a)}x={type:"stylesheet",instance:x,count:1,state:E},o.set(s,x)}}}function Mx(e,t){Hn.X(e,t);var n=Ca;if(n&&e){var a=Xl(n).hoistableScripts,o=wa(e),s=a.get(o);s||(s=n.querySelector(wi(o)),s||(e=v({src:e,async:!0},t),(t=nn.get(o))&&Vs(e,t),s=n.createElement("script"),dt(s),vt(s,"link",e),n.head.appendChild(s)),s={type:"script",instance:s,count:1,state:null},a.set(o,s))}}function _x(e,t){Hn.M(e,t);var n=Ca;if(n&&e){var a=Xl(n).hoistableScripts,o=wa(e),s=a.get(o);s||(s=n.querySelector(wi(o)),s||(e=v({src:e,async:!0,type:"module"},t),(t=nn.get(o))&&Vs(e,t),s=n.createElement("script"),dt(s),vt(s,"link",e),n.head.appendChild(s)),s={type:"script",instance:s,count:1,state:null},a.set(o,s))}}function Hp(e,t,n,a){var o=(o=fe.current)?Wr(o):null;if(!o)throw Error(u(446));switch(e){case"meta":case"title":return null;case"style":return typeof n.precedence=="string"&&typeof n.href=="string"?(t=Ta(n.href),n=Xl(o).hoistableStyles,a=n.get(t),a||(a={type:"style",instance:null,count:0,state:null},n.set(t,a)),a):{type:"void",instance:null,count:0,state:null};case"link":if(n.rel==="stylesheet"&&typeof n.href=="string"&&typeof n.precedence=="string"){e=Ta(n.href);var s=Xl(o).hoistableStyles,x=s.get(e);if(x||(o=o.ownerDocument||o,x={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},s.set(e,x),(s=o.querySelector(Ti(e)))&&!s._p&&(x.instance=s,x.state.loading=5),nn.has(e)||(n={rel:"preload",as:"style",href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},nn.set(e,n),s||Ox(o,e,n,x.state))),t&&a===null)throw Error(u(528,""));return x}if(t&&a!==null)throw Error(u(529,""));return null;case"script":return t=n.async,n=n.src,typeof n=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=wa(n),n=Xl(o).hoistableScripts,a=n.get(t),a||(a={type:"script",instance:null,count:0,state:null},n.set(t,a)),a):{type:"void",instance:null,count:0,state:null};default:throw Error(u(444,e))}}function Ta(e){return'href="'+Kt(e)+'"'}function Ti(e){return'link[rel="stylesheet"]['+e+"]"}function qp(e){return v({},e,{"data-precedence":e.precedence,precedence:null})}function Ox(e,t,n,a){e.querySelector('link[rel="preload"][as="style"]['+t+"]")?a.loading=1:(t=e.createElement("link"),a.preload=t,t.addEventListener("load",function(){return a.loading|=1}),t.addEventListener("error",function(){return a.loading|=2}),vt(t,"link",n),dt(t),e.head.appendChild(t))}function wa(e){return'[src="'+Kt(e)+'"]'}function wi(e){return"script[async]"+e}function Yp(e,t,n){if(t.count++,t.instance===null)switch(t.type){case"style":var a=e.querySelector('style[data-href~="'+Kt(n.href)+'"]');if(a)return t.instance=a,dt(a),a;var o=v({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return a=(e.ownerDocument||e).createElement("style"),dt(a),vt(a,"style",o),eu(a,n.precedence,e),t.instance=a;case"stylesheet":o=Ta(n.href);var s=e.querySelector(Ti(o));if(s)return t.state.loading|=4,t.instance=s,dt(s),s;a=qp(n),(o=nn.get(o))&&Ys(a,o),s=(e.ownerDocument||e).createElement("link"),dt(s);var x=s;return x._p=new Promise(function(E,N){x.onload=E,x.onerror=N}),vt(s,"link",a),t.state.loading|=4,eu(s,n.precedence,e),t.instance=s;case"script":return s=wa(n.src),(o=e.querySelector(wi(s)))?(t.instance=o,dt(o),o):(a=n,(o=nn.get(s))&&(a=v({},n),Vs(a,o)),e=e.ownerDocument||e,o=e.createElement("script"),dt(o),vt(o,"link",a),e.head.appendChild(o),t.instance=o);case"void":return null;default:throw Error(u(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(a=t.instance,t.state.loading|=4,eu(a,n.precedence,e));return t.instance}function eu(e,t,n){for(var a=n.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),o=a.length?a[a.length-1]:null,s=o,x=0;x<a.length;x++){var E=a[x];if(E.dataset.precedence===t)s=E;else if(s!==o)break}s?s.parentNode.insertBefore(e,s.nextSibling):(t=n.nodeType===9?n.head:n,t.insertBefore(e,t.firstChild))}function Ys(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function Vs(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var tu=null;function Vp(e,t,n){if(tu===null){var a=new Map,o=tu=new Map;o.set(n,a)}else o=tu,a=o.get(n),a||(a=new Map,o.set(n,a));if(a.has(e))return a;for(a.set(e,null),n=n.getElementsByTagName(e),o=0;o<n.length;o++){var s=n[o];if(!(s[Ya]||s[pt]||e==="link"&&s.getAttribute("rel")==="stylesheet")&&s.namespaceURI!=="http://www.w3.org/2000/svg"){var x=s.getAttribute(t)||"";x=e+x;var E=a.get(x);E?E.push(s):a.set(x,[s])}}return a}function Gp(e,t,n){e=e.ownerDocument||e,e.head.insertBefore(n,t==="title"?e.querySelector("head > title"):null)}function Dx(e,t,n){if(n===1||t.itemProp!=null)return!1;switch(e){case"meta":case"title":return!0;case"style":if(typeof t.precedence!="string"||typeof t.href!="string"||t.href==="")break;return!0;case"link":if(typeof t.rel!="string"||typeof t.href!="string"||t.href===""||t.onLoad||t.onError)break;return t.rel==="stylesheet"?(e=t.disabled,typeof t.precedence=="string"&&e==null):!0;case"script":if(t.async&&typeof t.async!="function"&&typeof t.async!="symbol"&&!t.onLoad&&!t.onError&&t.src&&typeof t.src=="string")return!0}return!1}function Ip(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function Lx(e,t,n,a){if(n.type==="stylesheet"&&(typeof a.media!="string"||matchMedia(a.media).matches!==!1)&&(n.state.loading&4)===0){if(n.instance===null){var o=Ta(a.href),s=t.querySelector(Ti(o));if(s){t=s._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=nu.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=s,dt(s);return}s=t.ownerDocument||t,a=qp(a),(o=nn.get(o))&&Ys(a,o),s=s.createElement("link"),dt(s);var x=s;x._p=new Promise(function(E,N){x.onload=E,x.onerror=N}),vt(s,"link",a),n.instance=s}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(n,t),(t=n.state.preload)&&(n.state.loading&3)===0&&(e.count++,n=nu.bind(e),t.addEventListener("load",n),t.addEventListener("error",n))}}var Gs=0;function Bx(e,t){return e.stylesheets&&e.count===0&&au(e,e.stylesheets),0<e.count||0<e.imgCount?function(n){var a=setTimeout(function(){if(e.stylesheets&&au(e,e.stylesheets),e.unsuspend){var s=e.unsuspend;e.unsuspend=null,s()}},6e4+t);0<e.imgBytes&&Gs===0&&(Gs=62500*yx());var o=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&au(e,e.stylesheets),e.unsuspend)){var s=e.unsuspend;e.unsuspend=null,s()}},(e.imgBytes>Gs?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(a),clearTimeout(o)}}:null}function nu(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)au(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var lu=null;function au(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,lu=new Map,t.forEach(Ux,e),lu=null,nu.call(e))}function Ux(e,t){if(!(t.state.loading&4)){var n=lu.get(e);if(n)var a=n.get(null);else{n=new Map,lu.set(e,n);for(var o=e.querySelectorAll("link[data-precedence],style[data-precedence]"),s=0;s<o.length;s++){var x=o[s];(x.nodeName==="LINK"||x.getAttribute("media")!=="not all")&&(n.set(x.dataset.precedence,x),a=x)}a&&n.set(null,a)}o=t.instance,x=o.getAttribute("data-precedence"),s=n.get(x)||a,s===a&&n.set(null,o),n.set(x,o),this.count++,a=nu.bind(this),o.addEventListener("load",a),o.addEventListener("error",a),s?s.parentNode.insertBefore(o,s.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(o,e.firstChild)),t.state.loading|=4}}var ji={$$typeof:_,Provider:null,Consumer:null,_currentValue:K,_currentValue2:K,_threadCount:0};function Hx(e,t,n,a,o,s,x,E,N){this.tag=1,this.containerInfo=e,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=Bu(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Bu(0),this.hiddenUpdates=Bu(null),this.identifierPrefix=a,this.onUncaughtError=o,this.onCaughtError=s,this.onRecoverableError=x,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=N,this.incompleteTransitions=new Map}function Qp(e,t,n,a,o,s,x,E,N,H,Z,$){return e=new Hx(e,t,n,x,N,H,Z,$,E),t=1,s===!0&&(t|=24),s=Ut(3,null,null,t),e.current=s,s.stateNode=e,t=Eo(),t.refCount++,e.pooledCache=t,t.refCount++,s.memoizedState={element:a,isDehydrated:n,cache:t},jo(s),e}function Xp(e){return e?(e=na,e):na}function Zp(e,t,n,a,o,s){o=Xp(o),a.context===null?a.context=o:a.pendingContext=o,a=el(t),a.payload={element:n},s=s===void 0?null:s,s!==null&&(a.callback=s),n=tl(e,a,t),n!==null&&(kt(n,e,t),ai(n,e,t))}function Kp(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function Is(e,t){Kp(e,t),(e=e.alternate)&&Kp(e,t)}function Fp(e){if(e.tag===13||e.tag===31){var t=Tl(e,67108864);t!==null&&kt(t,e,67108864),Is(e,67108864)}}function Jp(e){if(e.tag===13||e.tag===31){var t=Gt();t=Uu(t);var n=Tl(e,t);n!==null&&kt(n,e,t),Is(e,t)}}var iu=!0;function qx(e,t,n,a){var o=B.T;B.T=null;var s=ee.p;try{ee.p=2,Qs(e,t,n,a)}finally{ee.p=s,B.T=o}}function Yx(e,t,n,a){var o=B.T;B.T=null;var s=ee.p;try{ee.p=8,Qs(e,t,n,a)}finally{ee.p=s,B.T=o}}function Qs(e,t,n,a){if(iu){var o=Xs(a);if(o===null)ks(e,t,a,ru,n),$p(e,a);else if(Gx(o,e,t,n,a))a.stopPropagation();else if($p(e,a),t&4&&-1<Vx.indexOf(e)){for(;o!==null;){var s=Ql(o);if(s!==null)switch(s.tag){case 3:if(s=s.stateNode,s.current.memoizedState.isDehydrated){var x=xl(s.pendingLanes);if(x!==0){var E=s;for(E.pendingLanes|=2,E.entangledLanes|=2;x;){var N=1<<31-Ge(x);E.entanglements[1]|=N,x&=~N}mn(s),(_e&6)===0&&(Vr=St()+500,bi(0))}}break;case 31:case 13:E=Tl(s,2),E!==null&&kt(E,s,2),Ir(),Is(s,2)}if(s=Xs(a),s===null&&ks(e,t,a,ru,n),s===o)break;o=s}o!==null&&a.stopPropagation()}else ks(e,t,a,null,n)}}function Xs(e){return e=Zu(e),Zs(e)}var ru=null;function Zs(e){if(ru=null,e=Il(e),e!==null){var t=f(e);if(t===null)e=null;else{var n=t.tag;if(n===13){if(e=d(t),e!==null)return e;e=null}else if(n===31){if(e=y(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return ru=e,null}function Pp(e){switch(e){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(Lu()){case F:return 2;case re:return 8;case ge:case Te:return 32;case Le:return 268435456;default:return 32}default:return 32}}var Ks=!1,dl=null,hl=null,pl=null,Ai=new Map,zi=new Map,ml=[],Vx="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 $p(e,t){switch(e){case"focusin":case"focusout":dl=null;break;case"dragenter":case"dragleave":hl=null;break;case"mouseover":case"mouseout":pl=null;break;case"pointerover":case"pointerout":Ai.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":zi.delete(t.pointerId)}}function Ri(e,t,n,a,o,s){return e===null||e.nativeEvent!==s?(e={blockedOn:t,domEventName:n,eventSystemFlags:a,nativeEvent:s,targetContainers:[o]},t!==null&&(t=Ql(t),t!==null&&Fp(t)),e):(e.eventSystemFlags|=a,t=e.targetContainers,o!==null&&t.indexOf(o)===-1&&t.push(o),e)}function Gx(e,t,n,a,o){switch(t){case"focusin":return dl=Ri(dl,e,t,n,a,o),!0;case"dragenter":return hl=Ri(hl,e,t,n,a,o),!0;case"mouseover":return pl=Ri(pl,e,t,n,a,o),!0;case"pointerover":var s=o.pointerId;return Ai.set(s,Ri(Ai.get(s)||null,e,t,n,a,o)),!0;case"gotpointercapture":return s=o.pointerId,zi.set(s,Ri(zi.get(s)||null,e,t,n,a,o)),!0}return!1}function Wp(e){var t=Il(e.target);if(t!==null){var n=f(t);if(n!==null){if(t=n.tag,t===13){if(t=d(n),t!==null){e.blockedOn=t,hf(e.priority,function(){Jp(n)});return}}else if(t===31){if(t=y(n),t!==null){e.blockedOn=t,hf(e.priority,function(){Jp(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function uu(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=Xs(e.nativeEvent);if(n===null){n=e.nativeEvent;var a=new n.constructor(n.type,n);Xu=a,n.target.dispatchEvent(a),Xu=null}else return t=Ql(n),t!==null&&Fp(t),e.blockedOn=n,!1;t.shift()}return!0}function em(e,t,n){uu(e)&&n.delete(t)}function Ix(){Ks=!1,dl!==null&&uu(dl)&&(dl=null),hl!==null&&uu(hl)&&(hl=null),pl!==null&&uu(pl)&&(pl=null),Ai.forEach(em),zi.forEach(em)}function ou(e,t){e.blockedOn===t&&(e.blockedOn=null,Ks||(Ks=!0,l.unstable_scheduleCallback(l.unstable_NormalPriority,Ix)))}var su=null;function tm(e){su!==e&&(su=e,l.unstable_scheduleCallback(l.unstable_NormalPriority,function(){su===e&&(su=null);for(var t=0;t<e.length;t+=3){var n=e[t],a=e[t+1],o=e[t+2];if(typeof a!="function"){if(Zs(a||n)===null)continue;break}var s=Ql(n);s!==null&&(e.splice(t,3),t-=3,Xo(s,{pending:!0,data:o,method:n.method,action:a},a,o))}}))}function ja(e){function t(N){return ou(N,e)}dl!==null&&ou(dl,e),hl!==null&&ou(hl,e),pl!==null&&ou(pl,e),Ai.forEach(t),zi.forEach(t);for(var n=0;n<ml.length;n++){var a=ml[n];a.blockedOn===e&&(a.blockedOn=null)}for(;0<ml.length&&(n=ml[0],n.blockedOn===null);)Wp(n),n.blockedOn===null&&ml.shift();if(n=(e.ownerDocument||e).$$reactFormReplay,n!=null)for(a=0;a<n.length;a+=3){var o=n[a],s=n[a+1],x=o[wt]||null;if(typeof s=="function")x||tm(n);else if(x){var E=null;if(s&&s.hasAttribute("formAction")){if(o=s,x=s[wt]||null)E=x.formAction;else if(Zs(o)!==null)continue}else E=x.action;typeof E=="function"?n[a+1]=E:(n.splice(a,3),a-=3),tm(n)}}}function nm(){function e(s){s.canIntercept&&s.info==="react-transition"&&s.intercept({handler:function(){return new Promise(function(x){return o=x})},focusReset:"manual",scroll:"manual"})}function t(){o!==null&&(o(),o=null),a||setTimeout(n,20)}function n(){if(!a&&!navigation.transition){var s=navigation.currentEntry;s&&s.url!=null&&navigation.navigate(s.url,{state:s.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var a=!1,o=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",t),navigation.addEventListener("navigateerror",t),setTimeout(n,100),function(){a=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",t),navigation.removeEventListener("navigateerror",t),o!==null&&(o(),o=null)}}}function Fs(e){this._internalRoot=e}cu.prototype.render=Fs.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(u(409));var n=t.current,a=Gt();Zp(n,a,e,t,null,null)},cu.prototype.unmount=Fs.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Zp(e.current,2,null,e,null,null),Ir(),t[Gl]=null}};function cu(e){this._internalRoot=e}cu.prototype.unstable_scheduleHydration=function(e){if(e){var t=df();e={blockedOn:null,target:e,priority:t};for(var n=0;n<ml.length&&t!==0&&t<ml[n].priority;n++);ml.splice(n,0,e),n===0&&Wp(e)}};var lm=i.version;if(lm!=="19.2.4")throw Error(u(527,lm,"19.2.4"));ee.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(u(188)):(e=Object.keys(e).join(","),Error(u(268,e)));return e=h(t),e=e!==null?g(e):null,e=e===null?null:e.stateNode,e};var Qx={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:B,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var fu=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!fu.isDisabled&&fu.supportsFiber)try{Et=fu.inject(Qx),st=fu}catch{}}return ki.createRoot=function(e,t){if(!c(e))throw Error(u(299));var n=!1,a="",o=ch,s=fh,x=dh;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(a=t.identifierPrefix),t.onUncaughtError!==void 0&&(o=t.onUncaughtError),t.onCaughtError!==void 0&&(s=t.onCaughtError),t.onRecoverableError!==void 0&&(x=t.onRecoverableError)),t=Qp(e,1,!1,null,null,n,a,null,o,s,x,nm),e[Gl]=t.current,Ns(e),new Fs(t)},ki.hydrateRoot=function(e,t,n){if(!c(e))throw Error(u(299));var a=!1,o="",s=ch,x=fh,E=dh,N=null;return n!=null&&(n.unstable_strictMode===!0&&(a=!0),n.identifierPrefix!==void 0&&(o=n.identifierPrefix),n.onUncaughtError!==void 0&&(s=n.onUncaughtError),n.onCaughtError!==void 0&&(x=n.onCaughtError),n.onRecoverableError!==void 0&&(E=n.onRecoverableError),n.formState!==void 0&&(N=n.formState)),t=Qp(e,1,!0,t,n??null,a,o,N,s,x,E,nm),t.context=Xp(null),n=t.current,a=Gt(),a=Uu(a),o=el(a),o.callback=null,tl(n,o,a),n=a,t.current.lanes=n,qa(t,n),mn(t),e[Gl]=t.current,Ns(e),new cu(t)},ki.version="19.2.4",ki}var hm;function t1(){if(hm)return $s.exports;hm=1;function l(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(l)}catch(i){console.error(i)}}return l(),$s.exports=e1(),$s.exports}var n1=t1();var pm="popstate";function l1(l={}){function i(u,c){let{pathname:f,search:d,hash:y}=u.location;return Tc("",{pathname:f,search:d,hash:y},c.state&&c.state.usr||null,c.state&&c.state.key||"default")}function r(u,c){return typeof c=="string"?c:qi(c)}return i1(i,r,null,l)}function Pe(l,i){if(l===!1||l===null||typeof l>"u")throw new Error(i)}function cn(l,i){if(!l){typeof console<"u"&&console.warn(i);try{throw new Error(i)}catch{}}}function a1(){return Math.random().toString(36).substring(2,10)}function mm(l,i){return{usr:l.state,key:l.key,idx:i}}function Tc(l,i,r=null,u){return{pathname:typeof l=="string"?l:l.pathname,search:"",hash:"",...typeof i=="string"?_a(i):i,state:r,key:i&&i.key||u||a1()}}function qi({pathname:l="/",search:i="",hash:r=""}){return i&&i!=="?"&&(l+=i.charAt(0)==="?"?i:"?"+i),r&&r!=="#"&&(l+=r.charAt(0)==="#"?r:"#"+r),l}function _a(l){let i={};if(l){let r=l.indexOf("#");r>=0&&(i.hash=l.substring(r),l=l.substring(0,r));let u=l.indexOf("?");u>=0&&(i.search=l.substring(u),l=l.substring(0,u)),l&&(i.pathname=l)}return i}function i1(l,i,r,u={}){let{window:c=document.defaultView,v5Compat:f=!1}=u,d=c.history,y="POP",m=null,h=g();h==null&&(h=0,d.replaceState({...d.state,idx:h},""));function g(){return(d.state||{idx:null}).idx}function v(){y="POP";let A=g(),k=A==null?null:A-h;h=A,m&&m({action:y,location:j.location,delta:k})}function S(A,k){y="PUSH";let O=Tc(j.location,A,k);h=g()+1;let _=mm(O,h),G=j.createHref(O);try{d.pushState(_,"",G)}catch(ne){if(ne instanceof DOMException&&ne.name==="DataCloneError")throw ne;c.location.assign(G)}f&&m&&m({action:y,location:j.location,delta:1})}function b(A,k){y="REPLACE";let O=Tc(j.location,A,k);h=g();let _=mm(O,h),G=j.createHref(O);d.replaceState(_,"",G),f&&m&&m({action:y,location:j.location,delta:0})}function R(A){return r1(A)}let j={get action(){return y},get location(){return l(c,d)},listen(A){if(m)throw new Error("A history only accepts one active listener");return c.addEventListener(pm,v),m=A,()=>{c.removeEventListener(pm,v),m=null}},createHref(A){return i(c,A)},createURL:R,encodeLocation(A){let k=R(A);return{pathname:k.pathname,search:k.search,hash:k.hash}},push:S,replace:b,go(A){return d.go(A)}};return j}function r1(l,i=!1){let r="http://localhost";typeof window<"u"&&(r=window.location.origin!=="null"?window.location.origin:window.location.href),Pe(r,"No window.location.(origin|href) available to create URL");let u=typeof l=="string"?l:qi(l);return u=u.replace(/ $/,"%20"),!i&&u.startsWith("//")&&(u=r+u),new URL(u,r)}function fg(l,i,r="/"){return u1(l,i,r,!1)}function u1(l,i,r,u){let c=typeof i=="string"?_a(i):i,f=In(c.pathname||"/",r);if(f==null)return null;let d=dg(l);o1(d);let y=null;for(let m=0;y==null&&m<d.length;++m){let h=x1(f);y=y1(d[m],h,u)}return y}function dg(l,i=[],r=[],u="",c=!1){let f=(d,y,m=c,h)=>{let g={relativePath:h===void 0?d.path||"":h,caseSensitive:d.caseSensitive===!0,childrenIndex:y,route:d};if(g.relativePath.startsWith("/")){if(!g.relativePath.startsWith(u)&&m)return;Pe(g.relativePath.startsWith(u),`Absolute route path "${g.relativePath}" nested under path "${u}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),g.relativePath=g.relativePath.slice(u.length)}let v=Gn([u,g.relativePath]),S=r.concat(g);d.children&&d.children.length>0&&(Pe(d.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${v}".`),dg(d.children,i,S,v,m)),!(d.path==null&&!d.index)&&i.push({path:v,score:m1(v,d.index),routesMeta:S})};return l.forEach((d,y)=>{if(d.path===""||!d.path?.includes("?"))f(d,y);else for(let m of hg(d.path))f(d,y,!0,m)}),i}function hg(l){let i=l.split("/");if(i.length===0)return[];let[r,...u]=i,c=r.endsWith("?"),f=r.replace(/\?$/,"");if(u.length===0)return c?[f,""]:[f];let d=hg(u.join("/")),y=[];return y.push(...d.map(m=>m===""?f:[f,m].join("/"))),c&&y.push(...d),y.map(m=>l.startsWith("/")&&m===""?"/":m)}function o1(l){l.sort((i,r)=>i.score!==r.score?r.score-i.score:g1(i.routesMeta.map(u=>u.childrenIndex),r.routesMeta.map(u=>u.childrenIndex)))}var s1=/^:[\w-]+$/,c1=3,f1=2,d1=1,h1=10,p1=-2,gm=l=>l==="*";function m1(l,i){let r=l.split("/"),u=r.length;return r.some(gm)&&(u+=p1),i&&(u+=f1),r.filter(c=>!gm(c)).reduce((c,f)=>c+(s1.test(f)?c1:f===""?d1:h1),u)}function g1(l,i){return l.length===i.length&&l.slice(0,-1).every((u,c)=>u===i[c])?l[l.length-1]-i[i.length-1]:0}function y1(l,i,r=!1){let{routesMeta:u}=l,c={},f="/",d=[];for(let y=0;y<u.length;++y){let m=u[y],h=y===u.length-1,g=f==="/"?i:i.slice(f.length)||"/",v=Su({path:m.relativePath,caseSensitive:m.caseSensitive,end:h},g),S=m.route;if(!v&&h&&r&&!u[u.length-1].route.index&&(v=Su({path:m.relativePath,caseSensitive:m.caseSensitive,end:!1},g)),!v)return null;Object.assign(c,v.params),d.push({params:c,pathname:Gn([f,v.pathname]),pathnameBase:C1(Gn([f,v.pathnameBase])),route:S}),v.pathnameBase!=="/"&&(f=Gn([f,v.pathnameBase]))}return d}function Su(l,i){typeof l=="string"&&(l={path:l,caseSensitive:!1,end:!0});let[r,u]=v1(l.path,l.caseSensitive,l.end),c=i.match(r);if(!c)return null;let f=c[0],d=f.replace(/(.)\/+$/,"$1"),y=c.slice(1);return{params:u.reduce((h,{paramName:g,isOptional:v},S)=>{if(g==="*"){let R=y[S]||"";d=f.slice(0,f.length-R.length).replace(/(.)\/+$/,"$1")}const b=y[S];return v&&!b?h[g]=void 0:h[g]=(b||"").replace(/%2F/g,"/"),h},{}),pathname:f,pathnameBase:d,pattern:l}}function v1(l,i=!1,r=!0){cn(l==="*"||!l.endsWith("*")||l.endsWith("/*"),`Route path "${l}" will be treated as if it were "${l.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${l.replace(/\*$/,"/*")}".`);let u=[],c="^"+l.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(d,y,m)=>(u.push({paramName:y,isOptional:m!=null}),m?"/?([^\\/]+)?":"/([^\\/]+)")).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return l.endsWith("*")?(u.push({paramName:"*"}),c+=l==="*"||l==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):r?c+="\\/*$":l!==""&&l!=="/"&&(c+="(?:(?=\\/|$))"),[new RegExp(c,i?void 0:"i"),u]}function x1(l){try{return l.split("/").map(i=>decodeURIComponent(i).replace(/\//g,"%2F")).join("/")}catch(i){return cn(!1,`The URL path "${l}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${i}).`),l}}function In(l,i){if(i==="/")return l;if(!l.toLowerCase().startsWith(i.toLowerCase()))return null;let r=i.endsWith("/")?i.length-1:i.length,u=l.charAt(r);return u&&u!=="/"?null:l.slice(r)||"/"}var b1=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i;function S1(l,i="/"){let{pathname:r,search:u="",hash:c=""}=typeof l=="string"?_a(l):l,f;return r?(r=r.replace(/\/\/+/g,"/"),r.startsWith("/")?f=ym(r.substring(1),"/"):f=ym(r,i)):f=i,{pathname:f,search:T1(u),hash:w1(c)}}function ym(l,i){let r=i.replace(/\/+$/,"").split("/");return l.split("/").forEach(c=>{c===".."?r.length>1&&r.pop():c!=="."&&r.push(c)}),r.length>1?r.join("/"):"/"}function nc(l,i,r,u){return`Cannot include a '${l}' character in a manually specified \`to.${i}\` field [${JSON.stringify(u)}]. 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 E1(l){return l.filter((i,r)=>r===0||i.route.path&&i.route.path.length>0)}function pg(l){let i=E1(l);return i.map((r,u)=>u===i.length-1?r.pathname:r.pathnameBase)}function mg(l,i,r,u=!1){let c;typeof l=="string"?c=_a(l):(c={...l},Pe(!c.pathname||!c.pathname.includes("?"),nc("?","pathname","search",c)),Pe(!c.pathname||!c.pathname.includes("#"),nc("#","pathname","hash",c)),Pe(!c.search||!c.search.includes("#"),nc("#","search","hash",c)));let f=l===""||c.pathname==="",d=f?"/":c.pathname,y;if(d==null)y=r;else{let v=i.length-1;if(!u&&d.startsWith("..")){let S=d.split("/");for(;S[0]==="..";)S.shift(),v-=1;c.pathname=S.join("/")}y=v>=0?i[v]:"/"}let m=S1(c,y),h=d&&d!=="/"&&d.endsWith("/"),g=(f||d===".")&&r.endsWith("/");return!m.pathname.endsWith("/")&&(h||g)&&(m.pathname+="/"),m}var Gn=l=>l.join("/").replace(/\/\/+/g,"/"),C1=l=>l.replace(/\/+$/,"").replace(/^\/*/,"/"),T1=l=>!l||l==="?"?"":l.startsWith("?")?l:"?"+l,w1=l=>!l||l==="#"?"":l.startsWith("#")?l:"#"+l,j1=class{constructor(l,i,r,u=!1){this.status=l,this.statusText=i||"",this.internal=u,r instanceof Error?(this.data=r.toString(),this.error=r):this.data=r}};function A1(l){return l!=null&&typeof l.status=="number"&&typeof l.statusText=="string"&&typeof l.internal=="boolean"&&"data"in l}function z1(l){return l.map(i=>i.route.path).filter(Boolean).join("/").replace(/\/\/*/g,"/")||"/"}var gg=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function yg(l,i){let r=l;if(typeof r!="string"||!b1.test(r))return{absoluteURL:void 0,isExternal:!1,to:r};let u=r,c=!1;if(gg)try{let f=new URL(window.location.href),d=r.startsWith("//")?new URL(f.protocol+r):new URL(r),y=In(d.pathname,i);d.origin===f.origin&&y!=null?r=y+d.search+d.hash:c=!0}catch{cn(!1,`<Link to="${r}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:u,isExternal:c,to:r}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var vg=["POST","PUT","PATCH","DELETE"];new Set(vg);var R1=["GET",...vg];new Set(R1);var Oa=C.createContext(null);Oa.displayName="DataRouter";var zu=C.createContext(null);zu.displayName="DataRouterState";var N1=C.createContext(!1),xg=C.createContext({isTransitioning:!1});xg.displayName="ViewTransition";var k1=C.createContext(new Map);k1.displayName="Fetchers";var M1=C.createContext(null);M1.displayName="Await";var an=C.createContext(null);an.displayName="Navigation";var Vi=C.createContext(null);Vi.displayName="Location";var fn=C.createContext({outlet:null,matches:[],isDataRoute:!1});fn.displayName="Route";var Yc=C.createContext(null);Yc.displayName="RouteError";var bg="REACT_ROUTER_ERROR",_1="REDIRECT",O1="ROUTE_ERROR_RESPONSE";function D1(l){if(l.startsWith(`${bg}:${_1}:{`))try{let i=JSON.parse(l.slice(28));if(typeof i=="object"&&i&&typeof i.status=="number"&&typeof i.statusText=="string"&&typeof i.location=="string"&&typeof i.reloadDocument=="boolean"&&typeof i.replace=="boolean")return i}catch{}}function L1(l){if(l.startsWith(`${bg}:${O1}:{`))try{let i=JSON.parse(l.slice(40));if(typeof i=="object"&&i&&typeof i.status=="number"&&typeof i.statusText=="string")return new j1(i.status,i.statusText,i.data)}catch{}}function B1(l,{relative:i}={}){Pe(Gi(),"useHref() may be used only in the context of a <Router> component.");let{basename:r,navigator:u}=C.useContext(an),{hash:c,pathname:f,search:d}=Ii(l,{relative:i}),y=f;return r!=="/"&&(y=f==="/"?r:Gn([r,f])),u.createHref({pathname:y,search:d,hash:c})}function Gi(){return C.useContext(Vi)!=null}function Qn(){return Pe(Gi(),"useLocation() may be used only in the context of a <Router> component."),C.useContext(Vi).location}var Sg="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function Eg(l){C.useContext(an).static||C.useLayoutEffect(l)}function Ru(){let{isDataRoute:l}=C.useContext(fn);return l?P1():U1()}function U1(){Pe(Gi(),"useNavigate() may be used only in the context of a <Router> component.");let l=C.useContext(Oa),{basename:i,navigator:r}=C.useContext(an),{matches:u}=C.useContext(fn),{pathname:c}=Qn(),f=JSON.stringify(pg(u)),d=C.useRef(!1);return Eg(()=>{d.current=!0}),C.useCallback((m,h={})=>{if(cn(d.current,Sg),!d.current)return;if(typeof m=="number"){r.go(m);return}let g=mg(m,JSON.parse(f),c,h.relative==="path");l==null&&i!=="/"&&(g.pathname=g.pathname==="/"?i:Gn([i,g.pathname])),(h.replace?r.replace:r.push)(g,h.state,h)},[i,r,f,c,l])}var Cg=C.createContext(null);function Tg(){return C.useContext(Cg)}function H1(l){let i=C.useContext(fn).outlet;return C.useMemo(()=>i&&C.createElement(Cg.Provider,{value:l},i),[i,l])}function wg(){let{matches:l}=C.useContext(fn),i=l[l.length-1];return i?i.params:{}}function Ii(l,{relative:i}={}){let{matches:r}=C.useContext(fn),{pathname:u}=Qn(),c=JSON.stringify(pg(r));return C.useMemo(()=>mg(l,JSON.parse(c),u,i==="path"),[l,c,u,i])}function q1(l,i){return jg(l,i)}function jg(l,i,r,u,c){Pe(Gi(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:f}=C.useContext(an),{matches:d}=C.useContext(fn),y=d[d.length-1],m=y?y.params:{},h=y?y.pathname:"/",g=y?y.pathnameBase:"/",v=y&&y.route;{let O=v&&v.path||"";zg(h,!v||O.endsWith("*")||O.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${h}" (under <Route path="${O}">) 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.
10
+
11
+ Please change the parent <Route path="${O}"> to <Route path="${O==="/"?"*":`${O}/*`}">.`)}let S=Qn(),b;if(i){let O=typeof i=="string"?_a(i):i;Pe(g==="/"||O.pathname?.startsWith(g),`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 "${g}" but pathname "${O.pathname}" was given in the \`location\` prop.`),b=O}else b=S;let R=b.pathname||"/",j=R;if(g!=="/"){let O=g.replace(/^\//,"").split("/");j="/"+R.replace(/^\//,"").split("/").slice(O.length).join("/")}let A=fg(l,{pathname:j});cn(v||A!=null,`No routes matched location "${b.pathname}${b.search}${b.hash}" `),cn(A==null||A[A.length-1].route.element!==void 0||A[A.length-1].route.Component!==void 0||A[A.length-1].route.lazy!==void 0,`Matched leaf route at location "${b.pathname}${b.search}${b.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 k=Q1(A&&A.map(O=>Object.assign({},O,{params:Object.assign({},m,O.params),pathname:Gn([g,f.encodeLocation?f.encodeLocation(O.pathname.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:O.pathname]),pathnameBase:O.pathnameBase==="/"?g:Gn([g,f.encodeLocation?f.encodeLocation(O.pathnameBase.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:O.pathnameBase])})),d,r,u,c);return i&&k?C.createElement(Vi.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",...b},navigationType:"POP"}},k):k}function Y1(){let l=J1(),i=A1(l)?`${l.status} ${l.statusText}`:l instanceof Error?l.message:JSON.stringify(l),r=l instanceof Error?l.stack:null,u="rgba(200,200,200, 0.5)",c={padding:"0.5rem",backgroundColor:u},f={padding:"2px 4px",backgroundColor:u},d=null;return console.error("Error handled by React Router default ErrorBoundary:",l),d=C.createElement(C.Fragment,null,C.createElement("p",null,"💿 Hey developer 👋"),C.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",C.createElement("code",{style:f},"ErrorBoundary")," or"," ",C.createElement("code",{style:f},"errorElement")," prop on your route.")),C.createElement(C.Fragment,null,C.createElement("h2",null,"Unexpected Application Error!"),C.createElement("h3",{style:{fontStyle:"italic"}},i),r?C.createElement("pre",{style:c},r):null,d)}var V1=C.createElement(Y1,null),Ag=class extends C.Component{constructor(l){super(l),this.state={location:l.location,revalidation:l.revalidation,error:l.error}}static getDerivedStateFromError(l){return{error:l}}static getDerivedStateFromProps(l,i){return i.location!==l.location||i.revalidation!=="idle"&&l.revalidation==="idle"?{error:l.error,location:l.location,revalidation:l.revalidation}:{error:l.error!==void 0?l.error:i.error,location:i.location,revalidation:l.revalidation||i.revalidation}}componentDidCatch(l,i){this.props.onError?this.props.onError(l,i):console.error("React Router caught the following error during render",l)}render(){let l=this.state.error;if(this.context&&typeof l=="object"&&l&&"digest"in l&&typeof l.digest=="string"){const r=L1(l.digest);r&&(l=r)}let i=l!==void 0?C.createElement(fn.Provider,{value:this.props.routeContext},C.createElement(Yc.Provider,{value:l,children:this.props.component})):this.props.children;return this.context?C.createElement(G1,{error:l},i):i}};Ag.contextType=N1;var lc=new WeakMap;function G1({children:l,error:i}){let{basename:r}=C.useContext(an);if(typeof i=="object"&&i&&"digest"in i&&typeof i.digest=="string"){let u=D1(i.digest);if(u){let c=lc.get(i);if(c)throw c;let f=yg(u.location,r);if(gg&&!lc.get(i))if(f.isExternal||u.reloadDocument)window.location.href=f.absoluteURL||f.to;else{const d=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(f.to,{replace:u.replace}));throw lc.set(i,d),d}return C.createElement("meta",{httpEquiv:"refresh",content:`0;url=${f.absoluteURL||f.to}`})}}return l}function I1({routeContext:l,match:i,children:r}){let u=C.useContext(Oa);return u&&u.static&&u.staticContext&&(i.route.errorElement||i.route.ErrorBoundary)&&(u.staticContext._deepestRenderedBoundaryId=i.route.id),C.createElement(fn.Provider,{value:l},r)}function Q1(l,i=[],r=null,u=null,c=null){if(l==null){if(!r)return null;if(r.errors)l=r.matches;else if(i.length===0&&!r.initialized&&r.matches.length>0)l=r.matches;else return null}let f=l,d=r?.errors;if(d!=null){let g=f.findIndex(v=>v.route.id&&d?.[v.route.id]!==void 0);Pe(g>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(d).join(",")}`),f=f.slice(0,Math.min(f.length,g+1))}let y=!1,m=-1;if(r)for(let g=0;g<f.length;g++){let v=f[g];if((v.route.HydrateFallback||v.route.hydrateFallbackElement)&&(m=g),v.route.id){let{loaderData:S,errors:b}=r,R=v.route.loader&&!S.hasOwnProperty(v.route.id)&&(!b||b[v.route.id]===void 0);if(v.route.lazy||R){y=!0,m>=0?f=f.slice(0,m+1):f=[f[0]];break}}}let h=r&&u?(g,v)=>{u(g,{location:r.location,params:r.matches?.[0]?.params??{},unstable_pattern:z1(r.matches),errorInfo:v})}:void 0;return f.reduceRight((g,v,S)=>{let b,R=!1,j=null,A=null;r&&(b=d&&v.route.id?d[v.route.id]:void 0,j=v.route.errorElement||V1,y&&(m<0&&S===0?(zg("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),R=!0,A=null):m===S&&(R=!0,A=v.route.hydrateFallbackElement||null)));let k=i.concat(f.slice(0,S+1)),O=()=>{let _;return b?_=j:R?_=A:v.route.Component?_=C.createElement(v.route.Component,null):v.route.element?_=v.route.element:_=g,C.createElement(I1,{match:v,routeContext:{outlet:g,matches:k,isDataRoute:r!=null},children:_})};return r&&(v.route.ErrorBoundary||v.route.errorElement||S===0)?C.createElement(Ag,{location:r.location,revalidation:r.revalidation,component:j,error:b,children:O(),routeContext:{outlet:null,matches:k,isDataRoute:!0},onError:h}):O()},null)}function Vc(l){return`${l} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function X1(l){let i=C.useContext(Oa);return Pe(i,Vc(l)),i}function Z1(l){let i=C.useContext(zu);return Pe(i,Vc(l)),i}function K1(l){let i=C.useContext(fn);return Pe(i,Vc(l)),i}function Gc(l){let i=K1(l),r=i.matches[i.matches.length-1];return Pe(r.route.id,`${l} can only be used on routes that contain a unique "id"`),r.route.id}function F1(){return Gc("useRouteId")}function J1(){let l=C.useContext(Yc),i=Z1("useRouteError"),r=Gc("useRouteError");return l!==void 0?l:i.errors?.[r]}function P1(){let{router:l}=X1("useNavigate"),i=Gc("useNavigate"),r=C.useRef(!1);return Eg(()=>{r.current=!0}),C.useCallback(async(c,f={})=>{cn(r.current,Sg),r.current&&(typeof c=="number"?await l.navigate(c):await l.navigate(c,{fromRouteId:i,...f}))},[l,i])}var vm={};function zg(l,i,r){!i&&!vm[l]&&(vm[l]=!0,cn(!1,r))}C.memo($1);function $1({routes:l,future:i,state:r,onError:u}){return jg(l,void 0,r,u,i)}function W1(l){return H1(l.context)}function Vn(l){Pe(!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 e0({basename:l="/",children:i=null,location:r,navigationType:u="POP",navigator:c,static:f=!1,unstable_useTransitions:d}){Pe(!Gi(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let y=l.replace(/^\/*/,"/"),m=C.useMemo(()=>({basename:y,navigator:c,static:f,unstable_useTransitions:d,future:{}}),[y,c,f,d]);typeof r=="string"&&(r=_a(r));let{pathname:h="/",search:g="",hash:v="",state:S=null,key:b="default"}=r,R=C.useMemo(()=>{let j=In(h,y);return j==null?null:{location:{pathname:j,search:g,hash:v,state:S,key:b},navigationType:u}},[y,h,g,v,S,b,u]);return cn(R!=null,`<Router basename="${y}"> is not able to match the URL "${h}${g}${v}" because it does not start with the basename, so the <Router> won't render anything.`),R==null?null:C.createElement(an.Provider,{value:m},C.createElement(Vi.Provider,{children:i,value:R}))}function t0({children:l,location:i}){return q1(wc(l),i)}function wc(l,i=[]){let r=[];return C.Children.forEach(l,(u,c)=>{if(!C.isValidElement(u))return;let f=[...i,c];if(u.type===C.Fragment){r.push.apply(r,wc(u.props.children,f));return}Pe(u.type===Vn,`[${typeof u.type=="string"?u.type:u.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),Pe(!u.props.index||!u.props.children,"An index route cannot have child routes.");let d={id:u.props.id||f.join("-"),caseSensitive:u.props.caseSensitive,element:u.props.element,Component:u.props.Component,index:u.props.index,path:u.props.path,middleware:u.props.middleware,loader:u.props.loader,action:u.props.action,hydrateFallbackElement:u.props.hydrateFallbackElement,HydrateFallback:u.props.HydrateFallback,errorElement:u.props.errorElement,ErrorBoundary:u.props.ErrorBoundary,hasErrorBoundary:u.props.hasErrorBoundary===!0||u.props.ErrorBoundary!=null||u.props.errorElement!=null,shouldRevalidate:u.props.shouldRevalidate,handle:u.props.handle,lazy:u.props.lazy};u.props.children&&(d.children=wc(u.props.children,f)),r.push(d)}),r}var vu="get",xu="application/x-www-form-urlencoded";function Nu(l){return typeof HTMLElement<"u"&&l instanceof HTMLElement}function n0(l){return Nu(l)&&l.tagName.toLowerCase()==="button"}function l0(l){return Nu(l)&&l.tagName.toLowerCase()==="form"}function a0(l){return Nu(l)&&l.tagName.toLowerCase()==="input"}function i0(l){return!!(l.metaKey||l.altKey||l.ctrlKey||l.shiftKey)}function r0(l,i){return l.button===0&&(!i||i==="_self")&&!i0(l)}function jc(l=""){return new URLSearchParams(typeof l=="string"||Array.isArray(l)||l instanceof URLSearchParams?l:Object.keys(l).reduce((i,r)=>{let u=l[r];return i.concat(Array.isArray(u)?u.map(c=>[r,c]):[[r,u]])},[]))}function u0(l,i){let r=jc(l);return i&&i.forEach((u,c)=>{r.has(c)||i.getAll(c).forEach(f=>{r.append(c,f)})}),r}var du=null;function o0(){if(du===null)try{new FormData(document.createElement("form"),0),du=!1}catch{du=!0}return du}var s0=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function ac(l){return l!=null&&!s0.has(l)?(cn(!1,`"${l}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${xu}"`),null):l}function c0(l,i){let r,u,c,f,d;if(l0(l)){let y=l.getAttribute("action");u=y?In(y,i):null,r=l.getAttribute("method")||vu,c=ac(l.getAttribute("enctype"))||xu,f=new FormData(l)}else if(n0(l)||a0(l)&&(l.type==="submit"||l.type==="image")){let y=l.form;if(y==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let m=l.getAttribute("formaction")||y.getAttribute("action");if(u=m?In(m,i):null,r=l.getAttribute("formmethod")||y.getAttribute("method")||vu,c=ac(l.getAttribute("formenctype"))||ac(y.getAttribute("enctype"))||xu,f=new FormData(y,l),!o0()){let{name:h,type:g,value:v}=l;if(g==="image"){let S=h?`${h}.`:"";f.append(`${S}x`,"0"),f.append(`${S}y`,"0")}else h&&f.append(h,v)}}else{if(Nu(l))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');r=vu,u=null,c=xu,d=l}return f&&c==="text/plain"&&(d=f,f=void 0),{action:u,method:r.toLowerCase(),encType:c,formData:f,body:d}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function Ic(l,i){if(l===!1||l===null||typeof l>"u")throw new Error(i)}function f0(l,i,r,u){let c=typeof l=="string"?new URL(l,typeof window>"u"?"server://singlefetch/":window.location.origin):l;return r?c.pathname.endsWith("/")?c.pathname=`${c.pathname}_.${u}`:c.pathname=`${c.pathname}.${u}`:c.pathname==="/"?c.pathname=`_root.${u}`:i&&In(c.pathname,i)==="/"?c.pathname=`${i.replace(/\/$/,"")}/_root.${u}`:c.pathname=`${c.pathname.replace(/\/$/,"")}.${u}`,c}async function d0(l,i){if(l.id in i)return i[l.id];try{let r=await import(l.module);return i[l.id]=r,r}catch(r){return console.error(`Error loading route module \`${l.module}\`, reloading page...`),console.error(r),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function h0(l){return l==null?!1:l.href==null?l.rel==="preload"&&typeof l.imageSrcSet=="string"&&typeof l.imageSizes=="string":typeof l.rel=="string"&&typeof l.href=="string"}async function p0(l,i,r){let u=await Promise.all(l.map(async c=>{let f=i.routes[c.route.id];if(f){let d=await d0(f,r);return d.links?d.links():[]}return[]}));return v0(u.flat(1).filter(h0).filter(c=>c.rel==="stylesheet"||c.rel==="preload").map(c=>c.rel==="stylesheet"?{...c,rel:"prefetch",as:"style"}:{...c,rel:"prefetch"}))}function xm(l,i,r,u,c,f){let d=(m,h)=>r[h]?m.route.id!==r[h].route.id:!0,y=(m,h)=>r[h].pathname!==m.pathname||r[h].route.path?.endsWith("*")&&r[h].params["*"]!==m.params["*"];return f==="assets"?i.filter((m,h)=>d(m,h)||y(m,h)):f==="data"?i.filter((m,h)=>{let g=u.routes[m.route.id];if(!g||!g.hasLoader)return!1;if(d(m,h)||y(m,h))return!0;if(m.route.shouldRevalidate){let v=m.route.shouldRevalidate({currentUrl:new URL(c.pathname+c.search+c.hash,window.origin),currentParams:r[0]?.params||{},nextUrl:new URL(l,window.origin),nextParams:m.params,defaultShouldRevalidate:!0});if(typeof v=="boolean")return v}return!0}):[]}function m0(l,i,{includeHydrateFallback:r}={}){return g0(l.map(u=>{let c=i.routes[u.route.id];if(!c)return[];let f=[c.module];return c.clientActionModule&&(f=f.concat(c.clientActionModule)),c.clientLoaderModule&&(f=f.concat(c.clientLoaderModule)),r&&c.hydrateFallbackModule&&(f=f.concat(c.hydrateFallbackModule)),c.imports&&(f=f.concat(c.imports)),f}).flat(1))}function g0(l){return[...new Set(l)]}function y0(l){let i={},r=Object.keys(l).sort();for(let u of r)i[u]=l[u];return i}function v0(l,i){let r=new Set;return new Set(i),l.reduce((u,c)=>{let f=JSON.stringify(y0(c));return r.has(f)||(r.add(f),u.push({key:f,link:c})),u},[])}function Rg(){let l=C.useContext(Oa);return Ic(l,"You must render this element inside a <DataRouterContext.Provider> element"),l}function x0(){let l=C.useContext(zu);return Ic(l,"You must render this element inside a <DataRouterStateContext.Provider> element"),l}var Qc=C.createContext(void 0);Qc.displayName="FrameworkContext";function Ng(){let l=C.useContext(Qc);return Ic(l,"You must render this element inside a <HydratedRouter> element"),l}function b0(l,i){let r=C.useContext(Qc),[u,c]=C.useState(!1),[f,d]=C.useState(!1),{onFocus:y,onBlur:m,onMouseEnter:h,onMouseLeave:g,onTouchStart:v}=i,S=C.useRef(null);C.useEffect(()=>{if(l==="render"&&d(!0),l==="viewport"){let j=k=>{k.forEach(O=>{d(O.isIntersecting)})},A=new IntersectionObserver(j,{threshold:.5});return S.current&&A.observe(S.current),()=>{A.disconnect()}}},[l]),C.useEffect(()=>{if(u){let j=setTimeout(()=>{d(!0)},100);return()=>{clearTimeout(j)}}},[u]);let b=()=>{c(!0)},R=()=>{c(!1),d(!1)};return r?l!=="intent"?[f,S,{}]:[f,S,{onFocus:Mi(y,b),onBlur:Mi(m,R),onMouseEnter:Mi(h,b),onMouseLeave:Mi(g,R),onTouchStart:Mi(v,b)}]:[!1,S,{}]}function Mi(l,i){return r=>{l&&l(r),r.defaultPrevented||i(r)}}function S0({page:l,...i}){let{router:r}=Rg(),u=C.useMemo(()=>fg(r.routes,l,r.basename),[r.routes,l,r.basename]);return u?C.createElement(C0,{page:l,matches:u,...i}):null}function E0(l){let{manifest:i,routeModules:r}=Ng(),[u,c]=C.useState([]);return C.useEffect(()=>{let f=!1;return p0(l,i,r).then(d=>{f||c(d)}),()=>{f=!0}},[l,i,r]),u}function C0({page:l,matches:i,...r}){let u=Qn(),{future:c,manifest:f,routeModules:d}=Ng(),{basename:y}=Rg(),{loaderData:m,matches:h}=x0(),g=C.useMemo(()=>xm(l,i,h,f,u,"data"),[l,i,h,f,u]),v=C.useMemo(()=>xm(l,i,h,f,u,"assets"),[l,i,h,f,u]),S=C.useMemo(()=>{if(l===u.pathname+u.search+u.hash)return[];let j=new Set,A=!1;if(i.forEach(O=>{let _=f.routes[O.route.id];!_||!_.hasLoader||(!g.some(G=>G.route.id===O.route.id)&&O.route.id in m&&d[O.route.id]?.shouldRevalidate||_.hasClientLoader?A=!0:j.add(O.route.id))}),j.size===0)return[];let k=f0(l,y,c.unstable_trailingSlashAwareDataRequests,"data");return A&&j.size>0&&k.searchParams.set("_routes",i.filter(O=>j.has(O.route.id)).map(O=>O.route.id).join(",")),[k.pathname+k.search]},[y,c.unstable_trailingSlashAwareDataRequests,m,u,f,g,i,l,d]),b=C.useMemo(()=>m0(v,f),[v,f]),R=E0(v);return C.createElement(C.Fragment,null,S.map(j=>C.createElement("link",{key:j,rel:"prefetch",as:"fetch",href:j,...r})),b.map(j=>C.createElement("link",{key:j,rel:"modulepreload",href:j,...r})),R.map(({key:j,link:A})=>C.createElement("link",{key:j,nonce:r.nonce,...A,crossOrigin:A.crossOrigin??r.crossOrigin})))}function T0(...l){return i=>{l.forEach(r=>{typeof r=="function"?r(i):r!=null&&(r.current=i)})}}var w0=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{w0&&(window.__reactRouterVersion="7.13.0")}catch{}function j0({basename:l,children:i,unstable_useTransitions:r,window:u}){let c=C.useRef();c.current==null&&(c.current=l1({window:u,v5Compat:!0}));let f=c.current,[d,y]=C.useState({action:f.action,location:f.location}),m=C.useCallback(h=>{r===!1?y(h):C.startTransition(()=>y(h))},[r]);return C.useLayoutEffect(()=>f.listen(m),[f,m]),C.createElement(e0,{basename:l,children:i,location:d.location,navigationType:d.action,navigator:f,unstable_useTransitions:r})}var kg=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,_t=C.forwardRef(function({onClick:i,discover:r="render",prefetch:u="none",relative:c,reloadDocument:f,replace:d,state:y,target:m,to:h,preventScrollReset:g,viewTransition:v,unstable_defaultShouldRevalidate:S,...b},R){let{basename:j,unstable_useTransitions:A}=C.useContext(an),k=typeof h=="string"&&kg.test(h),O=yg(h,j);h=O.to;let _=B1(h,{relative:c}),[G,ne,L]=b0(u,b),Q=N0(h,{replace:d,state:y,target:m,preventScrollReset:g,relative:c,viewTransition:v,unstable_defaultShouldRevalidate:S,unstable_useTransitions:A});function q(se){i&&i(se),se.defaultPrevented||Q(se)}let te=C.createElement("a",{...b,...L,href:O.absoluteURL||_,onClick:O.isExternal||f?i:q,ref:T0(R,ne),target:m,"data-discover":!k&&r==="render"?"true":void 0});return G&&!k?C.createElement(C.Fragment,null,te,C.createElement(S0,{page:_})):te});_t.displayName="Link";var A0=C.forwardRef(function({"aria-current":i="page",caseSensitive:r=!1,className:u="",end:c=!1,style:f,to:d,viewTransition:y,children:m,...h},g){let v=Ii(d,{relative:h.relative}),S=Qn(),b=C.useContext(zu),{navigator:R,basename:j}=C.useContext(an),A=b!=null&&D0(v)&&y===!0,k=R.encodeLocation?R.encodeLocation(v).pathname:v.pathname,O=S.pathname,_=b&&b.navigation&&b.navigation.location?b.navigation.location.pathname:null;r||(O=O.toLowerCase(),_=_?_.toLowerCase():null,k=k.toLowerCase()),_&&j&&(_=In(_,j)||_);const G=k!=="/"&&k.endsWith("/")?k.length-1:k.length;let ne=O===k||!c&&O.startsWith(k)&&O.charAt(G)==="/",L=_!=null&&(_===k||!c&&_.startsWith(k)&&_.charAt(k.length)==="/"),Q={isActive:ne,isPending:L,isTransitioning:A},q=ne?i:void 0,te;typeof u=="function"?te=u(Q):te=[u,ne?"active":null,L?"pending":null,A?"transitioning":null].filter(Boolean).join(" ");let se=typeof f=="function"?f(Q):f;return C.createElement(_t,{...h,"aria-current":q,className:te,ref:g,style:se,to:d,viewTransition:y},typeof m=="function"?m(Q):m)});A0.displayName="NavLink";var z0=C.forwardRef(({discover:l="render",fetcherKey:i,navigate:r,reloadDocument:u,replace:c,state:f,method:d=vu,action:y,onSubmit:m,relative:h,preventScrollReset:g,viewTransition:v,unstable_defaultShouldRevalidate:S,...b},R)=>{let{unstable_useTransitions:j}=C.useContext(an),A=_0(),k=O0(y,{relative:h}),O=d.toLowerCase()==="get"?"get":"post",_=typeof y=="string"&&kg.test(y),G=ne=>{if(m&&m(ne),ne.defaultPrevented)return;ne.preventDefault();let L=ne.nativeEvent.submitter,Q=L?.getAttribute("formmethod")||d,q=()=>A(L||ne.currentTarget,{fetcherKey:i,method:Q,navigate:r,replace:c,state:f,relative:h,preventScrollReset:g,viewTransition:v,unstable_defaultShouldRevalidate:S});j&&r!==!1?C.startTransition(()=>q()):q()};return C.createElement("form",{ref:R,method:O,action:k,onSubmit:u?m:G,...b,"data-discover":!_&&l==="render"?"true":void 0})});z0.displayName="Form";function R0(l){return`${l} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Mg(l){let i=C.useContext(Oa);return Pe(i,R0(l)),i}function N0(l,{target:i,replace:r,state:u,preventScrollReset:c,relative:f,viewTransition:d,unstable_defaultShouldRevalidate:y,unstable_useTransitions:m}={}){let h=Ru(),g=Qn(),v=Ii(l,{relative:f});return C.useCallback(S=>{if(r0(S,i)){S.preventDefault();let b=r!==void 0?r:qi(g)===qi(v),R=()=>h(l,{replace:b,state:u,preventScrollReset:c,relative:f,viewTransition:d,unstable_defaultShouldRevalidate:y});m?C.startTransition(()=>R()):R()}},[g,h,v,r,u,i,l,c,f,d,y,m])}function _g(l){cn(typeof URLSearchParams<"u","You cannot use the `useSearchParams` hook in a browser that does not support the URLSearchParams API. If you need to support Internet Explorer 11, we recommend you load a polyfill such as https://github.com/ungap/url-search-params.");let i=C.useRef(jc(l)),r=C.useRef(!1),u=Qn(),c=C.useMemo(()=>u0(u.search,r.current?null:i.current),[u.search]),f=Ru(),d=C.useCallback((y,m)=>{const h=jc(typeof y=="function"?y(new URLSearchParams(c)):y);r.current=!0,f("?"+h,m)},[f,c]);return[c,d]}var k0=0,M0=()=>`__${String(++k0)}__`;function _0(){let{router:l}=Mg("useSubmit"),{basename:i}=C.useContext(an),r=F1(),u=l.fetch,c=l.navigate;return C.useCallback(async(f,d={})=>{let{action:y,method:m,encType:h,formData:g,body:v}=c0(f,i);if(d.navigate===!1){let S=d.fetcherKey||M0();await u(S,r,d.action||y,{unstable_defaultShouldRevalidate:d.unstable_defaultShouldRevalidate,preventScrollReset:d.preventScrollReset,formData:g,body:v,formMethod:d.method||m,formEncType:d.encType||h,flushSync:d.flushSync})}else await c(d.action||y,{unstable_defaultShouldRevalidate:d.unstable_defaultShouldRevalidate,preventScrollReset:d.preventScrollReset,formData:g,body:v,formMethod:d.method||m,formEncType:d.encType||h,replace:d.replace,state:d.state,fromRouteId:r,flushSync:d.flushSync,viewTransition:d.viewTransition})},[u,c,i,r])}function O0(l,{relative:i}={}){let{basename:r}=C.useContext(an),u=C.useContext(fn);Pe(u,"useFormAction must be used inside a RouteContext");let[c]=u.matches.slice(-1),f={...Ii(l||".",{relative:i})},d=Qn();if(l==null){f.search=d.search;let y=new URLSearchParams(f.search),m=y.getAll("index");if(m.some(g=>g==="")){y.delete("index"),m.filter(v=>v).forEach(v=>y.append("index",v));let g=y.toString();f.search=g?`?${g}`:""}}return(!l||l===".")&&c.route.index&&(f.search=f.search?f.search.replace(/^\?/,"?index&"):"?index"),r!=="/"&&(f.pathname=f.pathname==="/"?r:Gn([r,f.pathname])),qi(f)}function D0(l,{relative:i}={}){let r=C.useContext(xg);Pe(r!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:u}=Mg("useViewTransitionState"),c=Ii(l,{relative:i});if(!r.isTransitioning)return!1;let f=In(r.currentLocation.pathname,u)||r.currentLocation.pathname,d=In(r.nextLocation.pathname,u)||r.nextLocation.pathname;return Su(c.pathname,d)!=null||Su(c.pathname,f)!=null}async function Ce(l){const i=await fetch(l);if(!i.ok){const r=await i.json().catch(()=>({error:"Request failed"}));throw{status:i.status,message:r.error||"Request failed"}}return i.json()}async function lt(l,i){const r=await fetch(l,{method:"POST",headers:i!==void 0?{"Content-Type":"application/json"}:{},body:i!==void 0?JSON.stringify(i):void 0});if(!r.ok){const u=await r.json().catch(()=>({error:"Request failed"}));throw{status:r.status,message:u.error||"Request failed"}}return r.json()}async function bm(l,i){const r=await fetch(l,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify(i)});if(!r.ok){const u=await r.json().catch(()=>({error:"Request failed"}));throw{status:r.status,message:u.error||"Request failed"}}return r.json()}async function Og(l){const i=await fetch(l,{method:"DELETE"});if(!i.ok){const r=await i.json().catch(()=>({error:"Request failed"}));throw{status:i.status,message:r.error||"Request failed"}}return i.json()}function L0({twilioStatus:l,authStatus:i}){const[r,u]=C.useState([]),c=Qn(),[f,d]=C.useState(()=>localStorage.getItem("theme")==="dark"||!localStorage.getItem("theme")&&window.matchMedia("(prefers-color-scheme: dark)").matches);C.useEffect(()=>{Ce("/api/conversations").then(u).catch(()=>{})},[]),C.useEffect(()=>{f?(document.body.classList.add("dark"),document.body.classList.remove("light"),localStorage.setItem("theme","dark")):(document.body.classList.remove("dark"),document.body.classList.add("light"),localStorage.setItem("theme","light"))},[f]);const y=h=>{const g=Math.floor((Date.now()-new Date(h).getTime())/1e3);if(g<60)return"just now";const v=Math.floor(g/60);if(v<60)return`${v}m ago`;const S=Math.floor(v/60);if(S<24)return`${S}h ago`;const b=Math.floor(S/24);if(b<30)return`${b}d ago`;const R=Math.floor(b/30);return R<12?`${R}m ago`:`${Math.floor(R/12)}y ago`},m=h=>h.firstMessage.slice(0,40);return p.jsxs("div",{className:"sidebar",children:[p.jsx("div",{style:{padding:"24px 16px 8px 24px",display:"flex",alignItems:"center",gap:10},children:p.jsx("span",{style:{fontSize:"28px",fontWeight:"400",fontFamily:"'IBM Plex Serif', serif",letterSpacing:"-0.5px",color:"var(--text-primary)"},children:"VoiceCC"})}),p.jsxs("div",{className:"sidebar-nav",children:[p.jsxs(_t,{to:"/",className:`sidebar-item ${c.pathname==="/"?"active":""}`,style:{textDecoration:"none",display:"flex",alignItems:"center"},children:[p.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[p.jsx("path",{d:"M3 9l9-7 9 7v11a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z"}),p.jsx("polyline",{points:"9 22 9 12 15 12 15 22"})]}),"Home"]}),p.jsxs(_t,{to:"/agents",className:`sidebar-item ${c.pathname.startsWith("/agents")?"active":""}`,style:{textDecoration:"none",display:"flex",alignItems:"center"},children:[p.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[p.jsx("path",{d:"M17 21v-2a4 4 0 0 0-4-4H5a4 4 0 0 0-4 4v2"}),p.jsx("circle",{cx:"9",cy:"7",r:"4"}),p.jsx("path",{d:"M23 21v-2a4 4 0 0 0-3-3.87"}),p.jsx("path",{d:"M16 3.13a4 4 0 0 1 0 7.75"})]}),"Agents"]}),p.jsxs(_t,{to:"/settings",className:`sidebar-item ${c.pathname.startsWith("/settings")?"active":""}`,style:{textDecoration:"none",display:"flex",alignItems:"center"},children:[p.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[p.jsx("circle",{cx:"12",cy:"12",r:"3"}),p.jsx("path",{d:"M19.4 15a1.65 1.65 0 0 0 .33 1.82l.06.06a2 2 0 0 1 0 2.83 2 2 0 0 1-2.83 0l-.06-.06a1.65 1.65 0 0 0-1.82-.33 1.65 1.65 0 0 0-1 1.51V21a2 2 0 0 1-2 2 2 2 0 0 1-2-2v-.09A1.65 1.65 0 0 0 9 19.4a1.65 1.65 0 0 0-1.82.33l-.06.06a2 2 0 0 1-2.83 0 2 2 0 0 1 0-2.83l.06-.06a1.65 1.65 0 0 0 .33-1.82 1.65 1.65 0 0 0-1.51-1H3a2 2 0 0 1-2-2 2 2 0 0 1 2-2h.09A1.65 1.65 0 0 0 4.6 9a1.65 1.65 0 0 0-.33-1.82l-.06-.06a2 2 0 0 1 0-2.83 2 2 0 0 1 2.83 0l.06.06a1.65 1.65 0 0 0 1.82.33H9a1.65 1.65 0 0 0 1-1.51V3a2 2 0 0 1 2-2 2 2 0 0 1 2 2v.09a1.65 1.65 0 0 0 1 1.51 1.65 1.65 0 0 0 1.82-.33l.06-.06a2 2 0 0 1 2.83 0 2 2 0 0 1 0 2.83l-.06.06a1.65 1.65 0 0 0-.33 1.82V9a1.65 1.65 0 0 0 1.51 1H21a2 2 0 0 1 2 2 2 2 0 0 1-2 2h-.09a1.65 1.65 0 0 0-1.51 1z"})]}),"Settings"]}),p.jsx("div",{className:"sidebar-section-label",style:{marginTop:16,flexShrink:0},children:"History"}),p.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:4,flex:1,overflowY:"auto"},children:[r.length===0&&p.jsx("div",{style:{padding:"8px 12px",fontSize:13,color:"var(--text-secondary)"},children:"No history yet."}),r.map(h=>{const g=h.agentId?`/c/${h.sessionId}?agentId=${h.agentId}`:`/c/${h.sessionId}`;return p.jsxs(_t,{to:g,className:`sidebar-conversation ${c.pathname===`/c/${h.sessionId}`?"active":""}`,title:h.firstMessage,style:{textDecoration:"none",display:"flex",flexDirection:"column",gap:2},children:[p.jsxs("div",{style:{display:"flex",alignItems:"center",gap:6},children:[p.jsx("span",{style:{flex:1,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:m(h)}),p.jsx("span",{style:{fontSize:10,padding:"1px 6px",borderRadius:9999,background:"var(--bg-tertiary)",color:"var(--text-secondary)",whiteSpace:"nowrap",flexShrink:0},children:y(h.timestamp)})]}),h.agentId&&p.jsx("span",{style:{fontSize:11,color:"var(--text-secondary)"},children:h.agentId})]},`${h.agentId??"main"}-${h.sessionId}`)})]})]}),p.jsxs("div",{className:"sidebar-footer",children:[i===!1&&p.jsx("div",{style:{margin:"0 12px 8px",padding:"8px 10px",fontSize:12,color:"#d73a49",background:"var(--bg-tertiary)",borderRadius:6,border:"1px solid #d73a49"},children:"Claude not authenticated"}),p.jsxs("button",{className:"sidebar-item",onClick:()=>d(!f),children:[f?p.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[p.jsx("circle",{cx:"12",cy:"12",r:"5"}),p.jsx("line",{x1:"12",y1:"1",x2:"12",y2:"3"}),p.jsx("line",{x1:"12",y1:"21",x2:"12",y2:"23"}),p.jsx("line",{x1:"4.22",y1:"4.22",x2:"5.64",y2:"5.64"}),p.jsx("line",{x1:"18.36",y1:"18.36",x2:"19.78",y2:"19.78"}),p.jsx("line",{x1:"1",y1:"12",x2:"3",y2:"12"}),p.jsx("line",{x1:"21",y1:"12",x2:"23",y2:"12"}),p.jsx("line",{x1:"4.22",y1:"19.78",x2:"5.64",y2:"18.36"}),p.jsx("line",{x1:"18.36",y1:"5.64",x2:"19.78",y2:"4.22"})]}):p.jsx("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:p.jsx("path",{d:"M21 12.79A9 9 0 1 1 11.21 3 7 7 0 0 0 21 12.79z"})}),f?"Light Mode":"Dark Mode"]}),p.jsxs("button",{className:"sidebar-item",onClick:()=>{},children:[p.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[p.jsx("circle",{cx:"12",cy:"12",r:"10"}),p.jsx("line",{x1:"12",y1:"16",x2:"12",y2:"12"}),p.jsx("line",{x1:"12",y1:"8",x2:"12.01",y2:"8"})]}),"Support"]})]})]})}function B0(){const[l,i]=C.useState({running:!1,tunnelUrl:null}),[r,u]=C.useState({callBaseUrl:""}),[c,f]=C.useState(null),[d,y]=C.useState(null),[m,h]=C.useState(!1);C.useEffect(()=>{const v=()=>{Ce("/api/twilio/status").then(i).catch(()=>{}),Ce("/api/browser-call/status").then(u).catch(()=>{})};v();const S=setInterval(v,5e3);return()=>clearInterval(S)},[]),C.useEffect(()=>{Ce("/api/auth").then(v=>f(v.authenticated)).catch(()=>f(!1))},[]),C.useEffect(()=>{Ce("/api/version").then(y).catch(()=>{})},[]);const g=d?.updateAvailable&&!m;return p.jsxs("div",{style:{display:"flex",height:"100vh"},children:[p.jsx(L0,{twilioStatus:l,authStatus:c}),p.jsxs("div",{className:"main",style:{display:"flex",flexDirection:"column",height:"100vh",overflow:"hidden"},children:[g&&p.jsxs("div",{style:{padding:"8px 16px",background:"var(--bg-surface)",borderBottom:"1px solid var(--border-color)",fontSize:12,color:"var(--text-secondary)",display:"flex",alignItems:"center",justifyContent:"space-between",flexShrink:0},children:[p.jsxs("span",{children:["Update available: ",p.jsxs("strong",{style:{color:"var(--text-primary)"},children:["v",d.latest]})," (current: v",d.current,"). Run ",p.jsx("code",{style:{background:"var(--bg-main)",padding:"1px 5px",fontFamily:'"SF Mono", "Fira Code", monospace',fontSize:11,color:"var(--accent-color)"},children:"npm update -g voicecc"})," to update."]}),p.jsx("button",{onClick:()=>h(!0),style:{background:"none",border:"none",color:"var(--text-secondary)",cursor:"pointer",fontSize:14,padding:"0 4px",lineHeight:1},children:"x"})]}),p.jsx(W1,{context:{authStatus:c,setAuthStatus:f,browserCallStatus:r}})]})]})}const U0={display:"flex",gap:0,marginBottom:20,borderBottom:"1px solid var(--border-color)"},Sm=l=>({padding:"8px 16px",fontSize:13,fontWeight:l?600:400,color:l?"var(--text-primary)":"var(--text-secondary)",background:"none",border:"none",borderBottom:l?"2px solid var(--accent-color)":"2px solid transparent",cursor:"pointer",marginBottom:-1}),H0={fontSize:12,color:"var(--text-secondary)",background:"color-mix(in srgb, var(--warning-color, #f59e0b) 8%, transparent)",border:"1px solid color-mix(in srgb, var(--warning-color, #f59e0b) 20%, transparent)",padding:"8px 12px",borderRadius:6,marginTop:12,lineHeight:1.5},Em={width:"100%",padding:"8px 10px",fontSize:13,fontFamily:'"SF Mono", "Fira Code", monospace',background:"var(--bg-main)",border:"1px solid var(--border-color)",color:"var(--text-primary)",boxSizing:"border-box"},ic={display:"flex",justifyContent:"flex-end",gap:8,marginTop:16},rc={background:"var(--btn-primary-bg)",color:"var(--btn-primary-text)",border:"none",borderRadius:0,padding:"8px 16px",fontSize:13,fontWeight:500,fontFamily:"inherit",cursor:"pointer",transition:"all 0.2s"},uc={background:"var(--btn-secondary-bg)",color:"var(--btn-secondary-text)",border:"1px solid var(--btn-secondary-border)",borderRadius:0,padding:"8px 16px",fontSize:13,fontWeight:500,fontFamily:"inherit",cursor:"pointer",transition:"all 0.2s"},q0={fontSize:10,fontWeight:600,color:"var(--accent-color)",background:"color-mix(in srgb, var(--accent-color) 12%, transparent)",padding:"2px 6px",borderRadius:4,marginLeft:6,verticalAlign:"middle"};function Dg({onClose:l,onAuthenticated:i}){const[r,u]=C.useState("oauth"),[c,f]=C.useState(null),[d,y]=C.useState(""),[m,h]=C.useState(!1),[g,v]=C.useState(!1),[S,b]=C.useState(null),[R,j]=C.useState(""),[A,k]=C.useState(!1),[O,_]=C.useState(null),G=q=>{q.target===q.currentTarget&&l()},ne=async()=>{h(!0),b(null),f(null),y("");try{const q=await lt("/api/auth/oauth/start");f(q.url)}catch(q){b(q?.message||"Failed to start login")}h(!1)},L=async()=>{const q=d.trim();if(q){v(!0),b(null);try{(await lt("/api/auth/oauth/code",{code:q})).authenticated?(i(),l()):b("Login completed but authentication check failed. Try again.")}catch(te){b(te?.message||"Failed to complete login")}v(!1)}},Q=async()=>{const q=R.trim();if(q){k(!0),_(null);try{(await lt("/api/auth/token",{token:q})).authenticated?(i(),l()):_("Token was saved but authentication failed. Check that the token is valid.")}catch(te){_(te?.message||"Failed to save token")}k(!1)}};return p.jsx("div",{className:"modal-overlay visible",onClick:G,children:p.jsxs("div",{className:"modal",style:{width:520},children:[p.jsx("button",{className:"modal-close",onClick:l,children:"×"}),p.jsx("h2",{children:"Authenticate with Claude"}),p.jsxs("div",{style:U0,children:[p.jsxs("button",{style:Sm(r==="oauth"),onClick:()=>u("oauth"),children:["Login with Claude",p.jsx("span",{style:q0,children:"recommended"})]}),p.jsx("button",{style:Sm(r==="token"),onClick:()=>u("token"),children:"Setup Token"})]}),r==="oauth"&&p.jsxs("div",{children:[!c&&!m&&p.jsxs("div",{children:[p.jsx("div",{style:{fontSize:13,color:"var(--text-secondary)",lineHeight:1.6},children:p.jsx("p",{style:{marginBottom:12},children:"Sign in with your Claude account. This authenticates the CLI directly, enabling all features including cloud integrations like Gmail, Google Calendar, and Slack."})}),p.jsxs("div",{style:ic,children:[p.jsx("button",{style:uc,onClick:l,children:"Cancel"}),p.jsx("button",{style:rc,onClick:ne,children:"Start login"})]})]}),!c&&m&&p.jsxs("div",{style:{textAlign:"center",padding:"24px 0"},children:[p.jsx("div",{style:{display:"inline-block",width:20,height:20,border:"2px solid var(--border-color)",borderTopColor:"var(--accent-color)",borderRadius:"50%",animation:"spin 0.8s linear infinite",marginBottom:12}}),p.jsx("style",{children:"@keyframes spin { to { transform: rotate(360deg); } }"}),p.jsx("p",{style:{fontSize:13,color:"var(--text-secondary)"},children:"Preparing login session..."}),p.jsx("p",{style:{fontSize:11,color:"var(--text-secondary)",marginTop:4,opacity:.7},children:"Starting CLI, accepting prompts, navigating to login"})]}),c&&p.jsxs("div",{children:[p.jsxs("div",{style:{fontSize:13,color:"var(--text-secondary)",lineHeight:1.6},children:[p.jsx("p",{style:{marginBottom:12},children:"Open this URL in your browser and sign in:"}),p.jsx("a",{href:c,target:"_blank",rel:"noopener noreferrer",style:{display:"block",background:"var(--bg-main)",border:"1px solid var(--border-color)",padding:"8px 12px",fontFamily:'"SF Mono", "Fira Code", monospace',fontSize:11,color:"var(--accent-color)",marginBottom:12,wordBreak:"break-all",textDecoration:"none"},children:c}),p.jsx("p",{style:{fontSize:11,color:"var(--text-secondary)",marginBottom:16},children:"Click the link to open it in your browser. After signing in, paste the code below."})]}),p.jsx("input",{type:"text",placeholder:"Paste the code here...",value:d,onChange:q=>y(q.target.value),onKeyDown:q=>{q.key==="Enter"&&L()},style:Em,autoFocus:!0}),p.jsxs("div",{style:ic,children:[p.jsx("button",{style:uc,onClick:l,children:"Cancel"}),p.jsx("button",{style:rc,onClick:L,disabled:g||!d.trim(),children:g?p.jsxs("span",{style:{display:"inline-flex",alignItems:"center",gap:6},children:[p.jsx("span",{style:{display:"inline-block",width:12,height:12,border:"2px solid rgba(255,255,255,0.3)",borderTopColor:"#fff",borderRadius:"50%",animation:"spin 0.8s linear infinite"}}),"Authenticating..."]}):"Submit code"})]})]}),S&&p.jsx("p",{style:{fontSize:12,color:"#d73a49",marginTop:8},children:S})]}),r==="token"&&p.jsxs("div",{children:[p.jsxs("div",{style:{fontSize:13,color:"var(--text-secondary)",marginBottom:16,lineHeight:1.5},children:[p.jsx("p",{style:{marginBottom:12},children:"Run the following command in your terminal to generate a token:"}),p.jsx("code",{style:{display:"block",background:"var(--bg-main)",border:"1px solid var(--border-color)",padding:"8px 12px",fontFamily:'"SF Mono", "Fira Code", monospace',fontSize:12,color:"var(--accent-color)",marginBottom:12},children:"claude setup-token"}),p.jsx("p",{children:"Complete the sign-in in your browser, then paste the token below."})]}),p.jsx("input",{type:"password",placeholder:"sk-ant-oat01-...",value:R,onChange:q=>j(q.target.value),onKeyDown:q=>{q.key==="Enter"&&Q()},style:Em}),p.jsx("div",{style:H0,children:'Cloud MCP servers (Gmail, Google Calendar, Slack, etc.) will not be available with this method. Use "Login with Claude" for full integration support.'}),O&&p.jsx("p",{style:{fontSize:12,color:"#d73a49",marginTop:8},children:O}),p.jsxs("div",{style:ic,children:[p.jsx("button",{style:uc,onClick:l,children:"Cancel"}),p.jsx("button",{style:rc,onClick:Q,disabled:A||!R.trim(),children:A?"Saving...":"Save token"})]})]})]})})}function Y0(){const{authStatus:l,setAuthStatus:i}=Tg(),[r,u]=C.useState(null),[c,f]=C.useState(null),[d,y]=C.useState(null),[m,h]=C.useState(!1),[g,v]=C.useState(null);return C.useEffect(()=>{Ce("/api/agents").then(u).catch(()=>u([])),Ce("/api/twilio/status").then(f).catch(()=>f({running:!1,tunnelUrl:null})),Ce("/api/mcp-servers").then(S=>y(S.servers)).catch(()=>y([])),Ce("/api/providers/elevenlabs/validate").then(S=>v(S.status)).catch(()=>v("missing"))},[]),p.jsxs("div",{className:"page active",style:{display:"flex",flexDirection:"column"},children:[p.jsx("div",{className:"page-header",style:{padding:"48px 64px 24px"},children:p.jsxs("div",{children:[p.jsx("h1",{children:"Getting started"}),p.jsx("p",{style:{fontSize:13,color:"var(--text-secondary)",marginTop:4},children:"Set up your environment to get started."})]})}),p.jsxs("div",{style:{flex:1,overflowY:"auto",padding:"0 64px 48px"},children:[l!==!0&&p.jsxs("div",{className:"settings-panel",children:[p.jsx("h2",{style:{fontSize:16,fontWeight:600,color:"var(--text-primary)",marginBottom:4},children:"Connect your Claude Code"}),p.jsx("p",{style:{fontSize:13,color:"var(--text-secondary)",marginBottom:20},children:"VoiceCC needs an authenticated Claude Code session to work. The check below verifies your local CLI is logged in."}),p.jsxs("div",{style:{display:"flex",alignItems:"center",gap:10},children:[p.jsx("span",{style:{width:8,height:8,borderRadius:"50%",background:l===null?"#666":"#d73a49",flexShrink:0}}),p.jsx("span",{style:{fontSize:13,color:l===null?"var(--text-secondary)":"#d73a49"},children:l===null?"Checking authentication...":"Claude Code is not authenticated"})]}),l===!1&&p.jsx("div",{className:"settings-actions",children:p.jsx("button",{onClick:()=>h(!0),children:"Set up authentication"})})]}),m&&p.jsx(Dg,{onClose:()=>h(!1),onAuthenticated:()=>i(!0)}),g!=="valid"&&p.jsxs("div",{className:"settings-panel",children:[p.jsx("h2",{style:{fontSize:16,fontWeight:600,color:"var(--text-primary)",marginBottom:4},children:"Set up ElevenLabs"}),p.jsx("p",{style:{fontSize:13,color:"var(--text-secondary)",marginBottom:20},children:"An ElevenLabs API key is required for text-to-speech and speech-to-text. Add your key in the Voice settings."}),p.jsxs("div",{style:{display:"flex",alignItems:"center",gap:10},children:[p.jsx("span",{style:{width:8,height:8,borderRadius:"50%",background:g===null?"#666":"#d73a49",flexShrink:0}}),p.jsx("span",{style:{fontSize:13,color:g===null?"var(--text-secondary)":"#d73a49"},children:g===null?"Checking ElevenLabs API key...":"ElevenLabs API key is not configured"})]}),p.jsx("div",{className:"settings-actions",children:p.jsx(_t,{to:"/settings?tab=voice",style:{textDecoration:"none"},children:p.jsx("button",{children:"Configure in Voice Settings"})})})]}),p.jsxs("div",{className:"settings-panel",children:[p.jsx("h2",{style:{fontSize:16,fontWeight:600,color:"var(--text-primary)",marginBottom:4},children:"Your Voice Agents"}),p.jsx("p",{style:{fontSize:13,color:"var(--text-secondary)",marginBottom:20},children:"Create and manage your voice agents."}),r===null&&p.jsxs("div",{style:{display:"flex",alignItems:"center",gap:10},children:[p.jsx("span",{style:{width:8,height:8,borderRadius:"50%",background:"#666",flexShrink:0}}),p.jsx("span",{style:{fontSize:13,color:"var(--text-secondary)"},children:"Checking..."})]}),r!==null&&r.length===0&&p.jsx("div",{className:"settings-actions",children:p.jsx(_t,{to:"/agents",style:{textDecoration:"none"},children:p.jsx("button",{children:"Create Agent"})})}),r!==null&&r.length>0&&p.jsxs(p.Fragment,{children:[p.jsx("div",{style:{display:"flex",flexDirection:"column",gap:6},children:r.map(S=>p.jsxs("div",{style:{display:"flex",alignItems:"center",gap:10},children:[p.jsx("span",{style:{width:8,height:8,borderRadius:"50%",background:S.enabled?"var(--accent-color)":"#666",flexShrink:0}}),p.jsx(_t,{to:`/agents/${S.id}`,style:{fontSize:13,color:"var(--text-primary)",textDecoration:"none"},children:S.id})]},S.id))}),p.jsx("div",{className:"settings-actions",children:p.jsx(_t,{to:"/agents",style:{textDecoration:"none"},children:p.jsx("button",{children:"Manage Agents"})})})]})]}),c!==null&&!c.running&&p.jsxs("div",{className:"settings-panel",children:[p.jsx("h2",{style:{fontSize:16,fontWeight:600,color:"var(--text-primary)",marginBottom:4},children:"Call your agents over the phone"}),p.jsx("p",{style:{fontSize:13,color:"var(--text-secondary)",marginBottom:20},children:"Connect a Twilio phone number to call your voice agents from any phone. Requires a Twilio account and a purchased phone number."}),p.jsx("div",{className:"settings-actions",children:p.jsx(_t,{to:"/settings?tab=integrations",style:{textDecoration:"none"},children:p.jsx("button",{children:"Set up Twilio"})})})]}),p.jsxs("div",{className:"settings-panel",children:[p.jsx("h2",{style:{fontSize:16,fontWeight:600,color:"var(--text-primary)",marginBottom:4},children:"MCP Integrations"}),p.jsx("p",{style:{fontSize:13,color:"var(--text-secondary)",marginBottom:20},children:"Connect external tools and services via MCP servers."}),d===null&&p.jsxs("div",{style:{display:"flex",alignItems:"center",gap:10},children:[p.jsx("span",{style:{width:8,height:8,borderRadius:"50%",background:"#666",flexShrink:0}}),p.jsx("span",{style:{fontSize:13,color:"var(--text-secondary)"},children:"Checking..."})]}),d!==null&&d.length===0&&p.jsx("div",{className:"settings-actions",children:p.jsx(_t,{to:"/settings?tab=integrations",style:{textDecoration:"none"},children:p.jsx("button",{children:"Set up in Settings"})})}),d!==null&&d.length>0&&p.jsxs(p.Fragment,{children:[p.jsx("div",{style:{display:"flex",flexDirection:"column",gap:6},children:d.map(S=>p.jsxs("div",{style:{display:"flex",alignItems:"center",gap:10},children:[p.jsx("span",{style:{width:8,height:8,borderRadius:"50%",background:S.status==="connected"?"var(--accent-color)":S.status==="needs_auth"?"#d29922":"#d73a49",flexShrink:0}}),p.jsx("span",{style:{fontSize:13,color:"var(--text-primary)"},children:S.name})]},S.name))}),p.jsx("div",{className:"settings-actions",children:p.jsx(_t,{to:"/settings?tab=integrations",style:{textDecoration:"none"},children:p.jsx("button",{children:"Add more in Settings"})})})]})]})]})]})}const V0=5e3;function G0({twilioRunning:l}){const[i,r]=C.useState(""),[u,c]=C.useState(""),[f,d]=C.useState(""),[y,m]=C.useState(!1),[h,g]=C.useState({running:!1,url:null}),[v,S]=C.useState(!1),[b,R]=C.useState(""),[j,A]=C.useState(null),[k,O]=C.useState(!1),[_,G]=C.useState(!1),ne=C.useCallback(()=>{Ce("/api/auth").then(A).catch(()=>A(null))},[]);C.useEffect(()=>{Ce("/api/settings").then(q=>{r(q.MAX_CONCURRENT_SESSIONS||""),c(q.USER_PHONE_NUMBER||"")}).catch(()=>d("Error loading settings")),ne()},[ne]),C.useEffect(()=>{const q=()=>{Ce("/api/tunnel/status").then(g).catch(()=>{})};q();const te=setInterval(q,V0);return()=>clearInterval(te)},[]);const L=C.useCallback(async()=>{m(!0),d("Saving...");try{await lt("/api/settings",{MAX_CONCURRENT_SESSIONS:i,USER_PHONE_NUMBER:u}),d("Saved!"),setTimeout(()=>d(q=>q==="Saved!"?"":q),2e3)}catch{d("Error saving settings")}m(!1)},[i,u]),Q=C.useCallback(async()=>{S(!0),R("");try{h.running?await lt("/api/tunnel/stop"):await lt("/api/tunnel/start");const q=await Ce("/api/tunnel/status");g(q)}catch(q){const te=q instanceof Error?q.message:q?.message||"Failed";R(te),setTimeout(()=>R(""),5e3)}finally{S(!1)}},[h.running]);return p.jsxs(p.Fragment,{children:[p.jsx("div",{className:"page-header",style:{borderBottom:"none",padding:0,marginBottom:24},children:p.jsxs("div",{children:[p.jsx("h1",{children:"General Settings"}),p.jsx("p",{style:{fontSize:13,color:"var(--text-secondary)",marginTop:4},children:"Manage your workspace settings and core behavior."})]})}),p.jsxs("div",{className:"settings-panel",children:[p.jsx("h2",{style:{fontSize:16,fontWeight:600,color:"var(--text-primary)",marginBottom:4},children:"Authentication"}),p.jsx("p",{style:{fontSize:13,color:"var(--text-secondary)",marginBottom:20},children:"Claude Code authentication status for this server."}),j===null&&p.jsx("div",{style:{fontSize:13,color:"var(--text-secondary)"},children:"Checking..."}),j&&!j.authenticated&&p.jsxs("div",{children:[p.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8,marginBottom:12},children:[p.jsx("span",{style:{width:8,height:8,borderRadius:"50%",background:"#d73a49",flexShrink:0}}),p.jsx("span",{style:{fontSize:14,fontWeight:500,color:"var(--text-primary)"},children:"Not authenticated"})]}),p.jsx("p",{style:{fontSize:13,color:"var(--text-secondary)",marginBottom:16},children:"Claude Code is not logged in. Sign in to enable voice sessions."}),p.jsx("button",{onClick:()=>O(!0),style:{background:"var(--btn-primary-bg)",color:"var(--btn-primary-text)",border:"none",borderRadius:0,padding:"8px 16px",fontSize:13,fontWeight:500,fontFamily:"inherit",cursor:"pointer",transition:"all 0.2s"},children:"Sign in"})]}),j&&j.authenticated&&p.jsxs("div",{children:[p.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8,marginBottom:12},children:[p.jsx("span",{style:{width:8,height:8,borderRadius:"50%",background:"#22c55e",flexShrink:0}}),p.jsxs("span",{style:{fontSize:14,fontWeight:500,color:"var(--text-primary)"},children:["Authenticated",j.authMethod==="claude.ai"&&p.jsx("span",{style:{fontSize:11,fontWeight:600,color:"var(--accent-color)",background:"color-mix(in srgb, var(--accent-color) 12%, transparent)",padding:"2px 6px",borderRadius:4,marginLeft:8},children:"Claude.ai OAuth"}),j.authMethod!=="claude.ai"&&j.authMethod!=="none"&&p.jsx("span",{style:{fontSize:11,fontWeight:600,color:"var(--text-secondary)",background:"color-mix(in srgb, var(--text-secondary) 12%, transparent)",padding:"2px 6px",borderRadius:4,marginLeft:8},children:j.authMethod})]})]}),j.email&&p.jsx("p",{style:{fontSize:13,color:"var(--text-secondary)",marginBottom:8},children:j.email}),j.authMethod!=="claude.ai"&&p.jsxs("div",{style:{fontSize:12,color:"var(--text-secondary)",background:"color-mix(in srgb, var(--warning-color, #f59e0b) 8%, transparent)",border:"1px solid color-mix(in srgb, var(--warning-color, #f59e0b) 20%, transparent)",padding:"8px 12px",borderRadius:6,marginTop:8,lineHeight:1.5},children:["Authenticated via token. Cloud MCP servers (Gmail, Google Calendar, Slack, etc.) are not available with this method."," ",p.jsx("button",{onClick:()=>O(!0),style:{background:"none",border:"none",color:"var(--accent-color)",cursor:"pointer",padding:0,fontSize:12,fontWeight:600,textDecoration:"underline"},children:"Switch to Claude.ai login"})]}),p.jsx("button",{disabled:_,onClick:async()=>{G(!0);try{const q=await lt("/api/auth/logout");A(q)}catch{ne()}finally{G(!1)}},style:{marginTop:16,background:"none",border:"1px solid var(--border-color)",color:"var(--text-secondary)",cursor:_?"wait":"pointer",padding:"6px 14px",fontSize:13},children:_?"Logging out...":"Log out"})]})]}),k&&p.jsx(Dg,{onClose:()=>O(!1),onAuthenticated:()=>{O(!1),ne()}}),p.jsxs("div",{className:"settings-panel",children:[p.jsx("h2",{style:{fontSize:16,fontWeight:600,color:"var(--text-primary)",marginBottom:4},children:"Public Tunnel"}),p.jsx("p",{style:{fontSize:13,color:"var(--text-secondary)",marginBottom:20},children:"Exposes your voice server via a Cloudflare tunnel. Required if you want to access VoiceCC on a remote server, and/or want to make use of phone calling."}),p.jsx("div",{style:{display:"flex",alignItems:"center",gap:10,marginBottom:12},children:p.jsxs("label",{style:{display:"flex",alignItems:"center",gap:8,cursor:v?"wait":"pointer"},children:[p.jsx("input",{type:"checkbox",checked:h.running,disabled:v,onChange:Q,style:{width:16,height:16,cursor:v?"wait":"pointer"}}),p.jsx("span",{style:{fontSize:14,fontWeight:500,color:"var(--text-primary)"},children:v?h.running?"Stopping...":"Starting...":h.running?"Enabled":"Disabled"})]})}),h.running&&h.url&&p.jsxs("div",{style:{fontSize:13,color:"var(--text-secondary)"},children:["URL: ",p.jsx("code",{style:{userSelect:"all",cursor:"text"},children:h.url})]}),b&&p.jsx("div",{style:{color:"#d73a49",marginTop:8,fontSize:12},children:b})]}),p.jsxs("div",{className:"settings-panel",children:[p.jsx("h2",{style:{fontSize:16,fontWeight:600,color:"var(--text-primary)",marginBottom:4},children:"General Options"}),p.jsx("p",{style:{fontSize:13,color:"var(--text-secondary)",marginBottom:20},children:"Configure the core behavior of your voice assistant instance."}),p.jsxs("div",{className:"settings-row",children:[p.jsx("label",{htmlFor:"setting-max-sessions",style:{fontWeight:500,color:"var(--text-primary)"},children:"Max Concurrent Sessions"}),p.jsx("input",{type:"text",id:"setting-max-sessions",placeholder:"2",value:i,onChange:q=>r(q.target.value)})]}),p.jsxs("div",{className:"settings-row",children:[p.jsx("label",{htmlFor:"setting-user-phone",style:{fontWeight:500,color:"var(--text-primary)"},children:"Your Phone Number"}),p.jsx("input",{type:"text",id:"setting-user-phone",placeholder:"+15551234567",value:u,onChange:q=>c(q.target.value)})]}),p.jsxs("div",{className:"settings-actions",style:{marginTop:20},children:[p.jsx("button",{disabled:y,onClick:L,children:"Save changes"}),p.jsx("span",{className:"settings-status",children:f})]})]})]})}const I0="eleven_turbo_v2_5",Q0="scribe_v1";async function X0(){return Ce("/api/providers/tts")}async function Z0(){return Ce("/api/providers/stt")}async function K0(){return Ce("/api/settings")}function F0({status:l}){let i,r,u;return l.ready?(i="Ready",r="rgba(34, 197, 94, 0.15)",u="#22c55e"):l.reason==="missing_api_key"?(i="Missing API Key",r="rgba(239, 68, 68, 0.15)",u="#ef4444"):(i="Unknown",r="rgba(156, 163, 175, 0.15)",u="#9ca3af"),p.jsx("span",{style:{display:"inline-block",padding:"2px 8px",borderRadius:"4px",fontSize:"11px",fontWeight:600,background:r,color:u},children:i})}function Cm({provider:l,selected:i,onSelect:r,onAction:u,actionLabel:c,actionDisabled:f}){const d=!l.status.ready;return p.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"10px",padding:"10px 12px",border:i?"1px solid var(--btn-primary-bg)":"1px solid var(--border-color)",borderRadius:"4px",background:i?"rgba(59, 130, 246, 0.05)":"var(--bg-main)",cursor:d?"default":"pointer",transition:"all 0.15s ease"},onClick:d?void 0:r,children:[p.jsx("input",{type:"radio",checked:i,disabled:d,onChange:d?void 0:r,style:{margin:0,cursor:d?"default":"pointer"}}),p.jsxs("div",{style:{flex:1,minWidth:0},children:[p.jsxs("div",{style:{display:"flex",alignItems:"center",gap:"8px"},children:[p.jsx("span",{style:{fontSize:"13px",fontWeight:600,color:"var(--text-primary)"},children:l.name}),p.jsx(F0,{status:l.status})]}),p.jsx("div",{style:{fontSize:"12px",color:"var(--text-secondary)",marginTop:"2px"},children:l.description})]}),u&&c&&p.jsx("button",{disabled:f,onClick:y=>{y.stopPropagation(),u()},style:{padding:"4px 12px",fontSize:"12px",background:"var(--btn-primary-bg)",color:"var(--btn-primary-text)",border:"none",borderRadius:"4px",cursor:f?"default":"pointer",opacity:f?.6:1},children:c})]})}const Eu={marginBottom:14},Cu={display:"block",fontSize:12,fontWeight:500,color:"var(--text-primary)",marginBottom:4},Tu={width:"100%",boxSizing:"border-box"},Lg={display:"flex",justifyContent:"flex-end",gap:8,marginTop:8},Bg={padding:"6px 16px",fontSize:"13px",background:"var(--bg-main)",color:"var(--text-primary)",border:"1px solid var(--border-color)",borderRadius:"4px",cursor:"pointer"},Ug={padding:"6px 16px",fontSize:"13px",background:"var(--btn-primary-bg)",color:"var(--btn-primary-text)",border:"none",borderRadius:"4px",cursor:"pointer"};function J0({apiKey:l,modelId:i,onSave:r,onClose:u}){const[c,f]=C.useState(l),d=()=>{r({apiKey:c}),u()};return p.jsx("div",{className:"modal-overlay visible",onClick:y=>{y.target===y.currentTarget&&u()},children:p.jsxs("div",{className:"modal",style:{width:480},children:[p.jsx("button",{className:"modal-close",onClick:u,children:"×"}),p.jsx("h2",{children:"ElevenLabs TTS"}),p.jsx("p",{style:{fontSize:12,color:"var(--text-secondary)",marginBottom:16},children:"Configure API key for ElevenLabs text-to-speech."}),p.jsxs("div",{style:Eu,children:[p.jsx("label",{style:Cu,children:"API Key"}),p.jsx("input",{type:"password",value:c,onChange:y=>f(y.target.value),placeholder:"Enter your ElevenLabs API key",style:Tu})]}),p.jsxs("div",{style:Eu,children:[p.jsx("label",{style:Cu,children:"TTS Model ID"}),p.jsx("input",{type:"text",value:i,disabled:!0,style:{...Tu,opacity:.5,cursor:"not-allowed"}})]}),p.jsxs("div",{style:Lg,children:[p.jsx("button",{onClick:u,style:Bg,children:"Cancel"}),p.jsx("button",{onClick:d,style:Ug,children:"Apply"})]})]})})}function P0({apiKey:l,sttModelId:i,onSave:r,onClose:u}){const[c,f]=C.useState(l),d=()=>{r({apiKey:c}),u()};return p.jsx("div",{className:"modal-overlay visible",onClick:y=>{y.target===y.currentTarget&&u()},children:p.jsxs("div",{className:"modal",style:{width:480},children:[p.jsx("button",{className:"modal-close",onClick:u,children:"×"}),p.jsx("h2",{children:"ElevenLabs STT"}),p.jsx("p",{style:{fontSize:12,color:"var(--text-secondary)",marginBottom:16},children:"Configure API key for ElevenLabs speech-to-text."}),p.jsxs("div",{style:Eu,children:[p.jsx("label",{style:Cu,children:"API Key"}),p.jsx("input",{type:"password",value:c,onChange:y=>f(y.target.value),placeholder:"Enter your ElevenLabs API key",style:Tu})]}),p.jsxs("div",{style:Eu,children:[p.jsx("label",{style:Cu,children:"STT Model ID"}),p.jsx("input",{type:"text",value:i,disabled:!0,style:{...Tu,opacity:.5,cursor:"not-allowed"}})]}),p.jsxs("div",{style:Lg,children:[p.jsx("button",{onClick:u,style:Bg,children:"Cancel"}),p.jsx("button",{onClick:d,style:Ug,children:"Apply"})]})]})})}function $0(){const[l,i]=C.useState([]),[r,u]=C.useState([]),[c,f]=C.useState("elevenlabs"),[d,y]=C.useState("elevenlabs"),[m,h]=C.useState(""),[g,v]=C.useState(I0),[S,b]=C.useState(Q0),[R,j]=C.useState(null),A=C.useCallback(async G=>{try{await lt("/api/settings",G)}catch{}},[]);C.useEffect(()=>{X0().then(G=>{i(G.providers),f(G.active)}).catch(()=>{}),Z0().then(G=>{u(G.providers),y(G.active)}).catch(()=>{}),K0().then(G=>{G.ELEVENLABS_API_KEY&&h(G.ELEVENLABS_API_KEY),G.ELEVENLABS_MODEL_ID&&v(G.ELEVENLABS_MODEL_ID),G.ELEVENLABS_STT_MODEL_ID&&b(G.ELEVENLABS_STT_MODEL_ID)}).catch(()=>{})},[]);const k=C.useCallback(G=>{f(G),A({TTS_PROVIDER:G})},[A]),O=C.useCallback(G=>{y(G),A({STT_PROVIDER:G})},[A]),_=(G,ne,L)=>{const Q=L==="tts"?"elevenlabs-tts":"elevenlabs-stt";return{label:"Configure",onAction:()=>j({kind:Q})}};return p.jsxs(p.Fragment,{children:[p.jsx("div",{className:"page-header",style:{borderBottom:"none",padding:0,marginBottom:24},children:p.jsxs("div",{children:[p.jsx("h1",{children:"Voice Providers"}),p.jsx("p",{style:{fontSize:13,color:"var(--text-secondary)",marginTop:4},children:"Select and configure TTS and STT providers. Changes take effect on the next voice session."})]})}),p.jsxs("div",{className:"settings-panel",style:{marginBottom:24},children:[p.jsx("h2",{style:{fontSize:16,fontWeight:600,color:"var(--text-primary)",marginBottom:4},children:"TTS Provider"}),p.jsx("p",{style:{fontSize:13,color:"var(--text-secondary)",marginBottom:16},children:"Choose which text-to-speech engine to use."}),p.jsx("div",{style:{display:"flex",flexDirection:"column",gap:"8px"},children:l.map(G=>{const ne=_(G.type,G.status,"tts");return p.jsx(Cm,{provider:G,selected:c===G.type,onSelect:()=>k(G.type),onAction:ne.onAction,actionLabel:ne.label},G.type)})})]}),p.jsxs("div",{className:"settings-panel",style:{marginBottom:24},children:[p.jsx("h2",{style:{fontSize:16,fontWeight:600,color:"var(--text-primary)",marginBottom:4},children:"STT Provider"}),p.jsx("p",{style:{fontSize:13,color:"var(--text-secondary)",marginBottom:16},children:"Choose which speech-to-text engine to use."}),p.jsx("div",{style:{display:"flex",flexDirection:"column",gap:"8px"},children:r.map(G=>{const ne=_(G.type,G.status,"stt");return p.jsx(Cm,{provider:G,selected:d===G.type,onSelect:()=>O(G.type),onAction:ne.onAction,actionLabel:ne.label},G.type)})})]}),R?.kind==="elevenlabs-tts"&&p.jsx(J0,{apiKey:m,modelId:g,onSave:G=>{h(G.apiKey),A({ELEVENLABS_API_KEY:G.apiKey})},onClose:()=>j(null)}),R?.kind==="elevenlabs-stt"&&p.jsx(P0,{apiKey:m,sttModelId:S,onSave:G=>{h(G.apiKey),A({ELEVENLABS_API_KEY:G.apiKey})},onClose:()=>j(null)})]})}function W0({onClose:l}){const[i,r]=C.useState(""),[u,c]=C.useState(""),[f,d]=C.useState(null),[y,m]=C.useState(""),[h,g]=C.useState(!1),[v,S]=C.useState(!1),[b,R]=C.useState(""),[j,A]=C.useState(""),[k,O]=C.useState([]),[_,G]=C.useState(""),[ne,L]=C.useState(!1),Q=C.useCallback(async()=>{L(!0);try{const W=await Ce("/api/twilio/phone-numbers");O(W.numbers)}catch{O([])}finally{L(!1)}},[]);C.useEffect(()=>{Ce("/api/settings").then(P=>{P.TWILIO_ACCOUNT_SID&&r(P.TWILIO_ACCOUNT_SID),P.TWILIO_AUTH_TOKEN&&c(P.TWILIO_AUTH_TOKEN),P.USER_PHONE_NUMBER&&R(P.USER_PHONE_NUMBER),P.TWILIO_PHONE_NUMBER&&G(P.TWILIO_PHONE_NUMBER)}).catch(()=>{}),Ce("/api/integrations").then(P=>g(P.twilio.enabled)).catch(()=>{}),q();const W=setInterval(q,5e3);return()=>clearInterval(W)},[]),C.useEffect(()=>{i.trim()&&u.trim()&&Q()},[i,u,Q]);const q=()=>{Ce("/api/twilio/status").then(d).catch(()=>{})},te=C.useCallback(async(W,P)=>{try{return await lt("/api/settings",{[W]:P}),h&&(await lt("/api/integrations/twilio",{enabled:!1}),await lt("/api/integrations/twilio",{enabled:!0}),q()),!0}catch{return!1}},[h]),se=C.useCallback(async()=>{const W=!h;S(!0);try{await lt("/api/integrations/twilio",{enabled:W}),g(W),q()}catch(P){const B=P instanceof Error?P.message:P?.message||"Failed";m(B),setTimeout(()=>m(""),4e3)}finally{S(!1)}},[h]),ae=W=>{W.target===W.currentTarget&&l()},ue=f?.running??!1,pe=!!(i.trim()&&u.trim()&&b.trim()&&_.trim());return p.jsx("div",{className:"modal-overlay visible",onClick:ae,children:p.jsxs("div",{className:"modal",children:[p.jsx("button",{className:"modal-close",onClick:l,children:"×"}),p.jsx("h2",{children:"Twilio Voice Setup"}),p.jsx("div",{className:"setup-warning-banner",children:"For now, only Twilio Trial Accounts are supported. Non-trial accounts might work but have not been tested."}),p.jsx("div",{className:"setup-warning-banner",children:"Read thoroughly! Twilio requires many steps and it is easy to miss something."}),p.jsxs("div",{className:"setup-step",children:[p.jsxs("div",{className:"setup-step-title",children:[p.jsx("span",{className:"setup-step-number",children:"1"}),"Create a Twilio account"]}),p.jsxs("div",{className:"setup-step-desc",children:["Sign up at ",p.jsx("a",{href:"https://www.twilio.com/try-twilio",target:"_blank",rel:"noreferrer",children:"twilio.com/try-twilio"}),". Copy your Account SID and Auth Token from the ",p.jsx("a",{href:"https://console.twilio.com/",target:"_blank",rel:"noreferrer",children:"console dashboard"}),"."]}),p.jsxs("div",{className:"setup-paste-row",children:[p.jsx("input",{type:"text",placeholder:"Account SID (ACxxxxxxxx...)",value:i,onChange:W=>r(W.target.value)}),p.jsx(hu,{onClick:()=>te("TWILIO_ACCOUNT_SID",i.trim())})]}),p.jsxs("div",{className:"setup-paste-row",children:[p.jsx("input",{type:"text",placeholder:"Auth Token",value:u,onChange:W=>c(W.target.value)}),p.jsx(hu,{onClick:()=>te("TWILIO_AUTH_TOKEN",u.trim())})]})]}),p.jsxs("div",{className:"setup-step",children:[p.jsxs("div",{className:"setup-step-title",children:[p.jsx("span",{className:"setup-step-number",children:"2"}),"Get a phone number"]}),p.jsxs("div",{className:"setup-step-desc",children:["In the Twilio console, go to ",p.jsx("strong",{children:"Phone Numbers"})," → ",p.jsx("strong",{children:"Buy a Number"}),". Pick any number with voice capability. Then select it below."]}),p.jsxs("div",{className:"setup-paste-row",children:[p.jsxs("select",{value:_,onChange:W=>G(W.target.value),disabled:!i.trim()||!u.trim(),style:{flex:1},children:[p.jsx("option",{value:"",children:!i.trim()||!u.trim()?"Enter credentials first":ne?"Loading...":k.length===0?"No numbers found":"Select a phone number"}),k.map(W=>p.jsxs("option",{value:W.phoneNumber,children:[W.phoneNumber," (",W.friendlyName,")"]},W.phoneNumber))]}),p.jsx("button",{onClick:Q,disabled:!i.trim()||!u.trim()||ne,title:"Refresh phone numbers",style:{minWidth:"auto",padding:"6px 10px"},children:ne?"...":"Refresh"}),p.jsx(hu,{onClick:()=>te("TWILIO_PHONE_NUMBER",_)})]})]}),p.jsx("hr",{className:"setup-divider"}),p.jsxs("div",{className:"setup-step",children:[p.jsxs("div",{className:"setup-step-title",children:[p.jsx("span",{className:"setup-step-number",children:"3"}),"Add your personal phone number to Twilio"]}),p.jsxs("div",{className:"setup-step-desc",children:["Add your personal phone number as a verified caller in the Twilio console at"," ",p.jsx("a",{href:"https://console.twilio.com/us1/develop/phone-numbers/manage/verified",target:"_blank",rel:"noreferrer",children:"Verified Caller IDs"}),". This is required for Twilio to be able to call your phone."]})]}),p.jsx("hr",{className:"setup-divider"}),p.jsxs("div",{className:"setup-step",children:[p.jsxs("div",{className:"setup-step-title",children:[p.jsx("span",{className:"setup-step-number",children:"4"}),"Enter your personal phone number"]}),p.jsx("div",{className:"setup-step-desc",children:"Enter the same phone number you verified on Twilio in the previous step."}),p.jsxs("div",{className:"setup-paste-row",children:[p.jsx("input",{type:"tel",placeholder:"+1234567890",value:b,onChange:W=>R(W.target.value)}),p.jsx(hu,{onClick:()=>te("USER_PHONE_NUMBER",b.trim())})]})]}),p.jsx("hr",{className:"setup-divider"}),p.jsxs("div",{className:"setup-step",children:[p.jsxs("div",{className:"setup-step-title",children:[p.jsx("span",{className:"setup-step-number",children:"5"}),ue?"Server running":"Enable integration"]}),p.jsxs("div",{className:"setup-step-desc",children:[ue?p.jsxs(p.Fragment,{children:["Server is running.",f?.tunnelUrl&&p.jsxs(p.Fragment,{children:[" Tunnel URL: ",p.jsx("code",{children:f.tunnelUrl})]})]}):pe?"Enable to start the Twilio server and auto-start on boot.":"Complete all previous steps before enabling.",y&&p.jsx("div",{style:{color:"#d73a49",marginTop:4,fontSize:12},children:y})]}),p.jsx("div",{className:"setup-paste-row",children:p.jsxs("label",{style:{display:"flex",alignItems:"center",gap:8,cursor:v||!pe?"not-allowed":"pointer"},children:[p.jsx("input",{type:"checkbox",checked:h,disabled:v||!h&&!pe,onChange:se,style:{width:16,height:16,cursor:v||!pe?"not-allowed":"pointer"}}),p.jsx("span",{style:{fontSize:14,fontWeight:500,color:"var(--text-primary)"},children:v?h?"Stopping...":"Starting...":"Enabled"})]})})]}),p.jsx("hr",{className:"setup-divider"}),p.jsxs("div",{className:"setup-step",children:[p.jsxs("div",{className:"setup-step-title",children:[p.jsx("span",{className:"setup-step-number",children:"6"}),"Test your setup"]}),p.jsxs("div",{className:"setup-step-desc",children:["We'll call your personal phone number with a test message.",j&&p.jsx("div",{style:{color:j.startsWith("Error")?"#d73a49":"#2ea043",marginTop:4,fontSize:12},children:j})]}),p.jsx("div",{className:"setup-paste-row",children:p.jsx("button",{disabled:!h||!b.trim()||j==="Calling...",onClick:async()=>{A("Calling...");try{await lt("/api/twilio/test-call",{to:b.trim()}),A('Success! Go to an agent and click "Call via Phone"!')}catch(W){const P=W instanceof Error?W.message:W?.message||"Failed";A(`Error: ${P}`)}setTimeout(()=>A(""),6e3)},children:"Test Call"})})]})]})})}function hu({onClick:l}){const[i,r]=C.useState("Apply"),[u,c]=C.useState(!1),f=async()=>{r("Saving...");const d=await l();r(d?"Saved":"Error"),c(d),setTimeout(()=>{r("Apply"),c(!1)},1500)};return p.jsx("button",{className:u?"applied":"",onClick:f,children:i})}var eb=Object.defineProperty,wu=Object.getOwnPropertySymbols,Hg=Object.prototype.hasOwnProperty,qg=Object.prototype.propertyIsEnumerable,Tm=(l,i,r)=>i in l?eb(l,i,{enumerable:!0,configurable:!0,writable:!0,value:r}):l[i]=r,Ac=(l,i)=>{for(var r in i||(i={}))Hg.call(i,r)&&Tm(l,r,i[r]);if(wu)for(var r of wu(i))qg.call(i,r)&&Tm(l,r,i[r]);return l},zc=(l,i)=>{var r={};for(var u in l)Hg.call(l,u)&&i.indexOf(u)<0&&(r[u]=l[u]);if(l!=null&&wu)for(var u of wu(l))i.indexOf(u)<0&&qg.call(l,u)&&(r[u]=l[u]);return r};var Bl;(l=>{const i=class Ae{constructor(m,h,g,v){if(this.version=m,this.errorCorrectionLevel=h,this.modules=[],this.isFunction=[],m<Ae.MIN_VERSION||m>Ae.MAX_VERSION)throw new RangeError("Version value out of range");if(v<-1||v>7)throw new RangeError("Mask value out of range");this.size=m*4+17;let S=[];for(let R=0;R<this.size;R++)S.push(!1);for(let R=0;R<this.size;R++)this.modules.push(S.slice()),this.isFunction.push(S.slice());this.drawFunctionPatterns();const b=this.addEccAndInterleave(g);if(this.drawCodewords(b),v==-1){let R=1e9;for(let j=0;j<8;j++){this.applyMask(j),this.drawFormatBits(j);const A=this.getPenaltyScore();A<R&&(v=j,R=A),this.applyMask(j)}}c(0<=v&&v<=7),this.mask=v,this.applyMask(v),this.drawFormatBits(v),this.isFunction=[]}static encodeText(m,h){const g=l.QrSegment.makeSegments(m);return Ae.encodeSegments(g,h)}static encodeBinary(m,h){const g=l.QrSegment.makeBytes(m);return Ae.encodeSegments([g],h)}static encodeSegments(m,h,g=1,v=40,S=-1,b=!0){if(!(Ae.MIN_VERSION<=g&&g<=v&&v<=Ae.MAX_VERSION)||S<-1||S>7)throw new RangeError("Invalid value");let R,j;for(R=g;;R++){const _=Ae.getNumDataCodewords(R,h)*8,G=d.getTotalBits(m,R);if(G<=_){j=G;break}if(R>=v)throw new RangeError("Data too long")}for(const _ of[Ae.Ecc.MEDIUM,Ae.Ecc.QUARTILE,Ae.Ecc.HIGH])b&&j<=Ae.getNumDataCodewords(R,_)*8&&(h=_);let A=[];for(const _ of m){r(_.mode.modeBits,4,A),r(_.numChars,_.mode.numCharCountBits(R),A);for(const G of _.getData())A.push(G)}c(A.length==j);const k=Ae.getNumDataCodewords(R,h)*8;c(A.length<=k),r(0,Math.min(4,k-A.length),A),r(0,(8-A.length%8)%8,A),c(A.length%8==0);for(let _=236;A.length<k;_^=253)r(_,8,A);let O=[];for(;O.length*8<A.length;)O.push(0);return A.forEach((_,G)=>O[G>>>3]|=_<<7-(G&7)),new Ae(R,h,O,S)}getModule(m,h){return 0<=m&&m<this.size&&0<=h&&h<this.size&&this.modules[h][m]}getModules(){return this.modules}drawFunctionPatterns(){for(let g=0;g<this.size;g++)this.setFunctionModule(6,g,g%2==0),this.setFunctionModule(g,6,g%2==0);this.drawFinderPattern(3,3),this.drawFinderPattern(this.size-4,3),this.drawFinderPattern(3,this.size-4);const m=this.getAlignmentPatternPositions(),h=m.length;for(let g=0;g<h;g++)for(let v=0;v<h;v++)g==0&&v==0||g==0&&v==h-1||g==h-1&&v==0||this.drawAlignmentPattern(m[g],m[v]);this.drawFormatBits(0),this.drawVersion()}drawFormatBits(m){const h=this.errorCorrectionLevel.formatBits<<3|m;let g=h;for(let S=0;S<10;S++)g=g<<1^(g>>>9)*1335;const v=(h<<10|g)^21522;c(v>>>15==0);for(let S=0;S<=5;S++)this.setFunctionModule(8,S,u(v,S));this.setFunctionModule(8,7,u(v,6)),this.setFunctionModule(8,8,u(v,7)),this.setFunctionModule(7,8,u(v,8));for(let S=9;S<15;S++)this.setFunctionModule(14-S,8,u(v,S));for(let S=0;S<8;S++)this.setFunctionModule(this.size-1-S,8,u(v,S));for(let S=8;S<15;S++)this.setFunctionModule(8,this.size-15+S,u(v,S));this.setFunctionModule(8,this.size-8,!0)}drawVersion(){if(this.version<7)return;let m=this.version;for(let g=0;g<12;g++)m=m<<1^(m>>>11)*7973;const h=this.version<<12|m;c(h>>>18==0);for(let g=0;g<18;g++){const v=u(h,g),S=this.size-11+g%3,b=Math.floor(g/3);this.setFunctionModule(S,b,v),this.setFunctionModule(b,S,v)}}drawFinderPattern(m,h){for(let g=-4;g<=4;g++)for(let v=-4;v<=4;v++){const S=Math.max(Math.abs(v),Math.abs(g)),b=m+v,R=h+g;0<=b&&b<this.size&&0<=R&&R<this.size&&this.setFunctionModule(b,R,S!=2&&S!=4)}}drawAlignmentPattern(m,h){for(let g=-2;g<=2;g++)for(let v=-2;v<=2;v++)this.setFunctionModule(m+v,h+g,Math.max(Math.abs(v),Math.abs(g))!=1)}setFunctionModule(m,h,g){this.modules[h][m]=g,this.isFunction[h][m]=!0}addEccAndInterleave(m){const h=this.version,g=this.errorCorrectionLevel;if(m.length!=Ae.getNumDataCodewords(h,g))throw new RangeError("Invalid argument");const v=Ae.NUM_ERROR_CORRECTION_BLOCKS[g.ordinal][h],S=Ae.ECC_CODEWORDS_PER_BLOCK[g.ordinal][h],b=Math.floor(Ae.getNumRawDataModules(h)/8),R=v-b%v,j=Math.floor(b/v);let A=[];const k=Ae.reedSolomonComputeDivisor(S);for(let _=0,G=0;_<v;_++){let ne=m.slice(G,G+j-S+(_<R?0:1));G+=ne.length;const L=Ae.reedSolomonComputeRemainder(ne,k);_<R&&ne.push(0),A.push(ne.concat(L))}let O=[];for(let _=0;_<A[0].length;_++)A.forEach((G,ne)=>{(_!=j-S||ne>=R)&&O.push(G[_])});return c(O.length==b),O}drawCodewords(m){if(m.length!=Math.floor(Ae.getNumRawDataModules(this.version)/8))throw new RangeError("Invalid argument");let h=0;for(let g=this.size-1;g>=1;g-=2){g==6&&(g=5);for(let v=0;v<this.size;v++)for(let S=0;S<2;S++){const b=g-S,j=(g+1&2)==0?this.size-1-v:v;!this.isFunction[j][b]&&h<m.length*8&&(this.modules[j][b]=u(m[h>>>3],7-(h&7)),h++)}}c(h==m.length*8)}applyMask(m){if(m<0||m>7)throw new RangeError("Mask value out of range");for(let h=0;h<this.size;h++)for(let g=0;g<this.size;g++){let v;switch(m){case 0:v=(g+h)%2==0;break;case 1:v=h%2==0;break;case 2:v=g%3==0;break;case 3:v=(g+h)%3==0;break;case 4:v=(Math.floor(g/3)+Math.floor(h/2))%2==0;break;case 5:v=g*h%2+g*h%3==0;break;case 6:v=(g*h%2+g*h%3)%2==0;break;case 7:v=((g+h)%2+g*h%3)%2==0;break;default:throw new Error("Unreachable")}!this.isFunction[h][g]&&v&&(this.modules[h][g]=!this.modules[h][g])}}getPenaltyScore(){let m=0;for(let S=0;S<this.size;S++){let b=!1,R=0,j=[0,0,0,0,0,0,0];for(let A=0;A<this.size;A++)this.modules[S][A]==b?(R++,R==5?m+=Ae.PENALTY_N1:R>5&&m++):(this.finderPenaltyAddHistory(R,j),b||(m+=this.finderPenaltyCountPatterns(j)*Ae.PENALTY_N3),b=this.modules[S][A],R=1);m+=this.finderPenaltyTerminateAndCount(b,R,j)*Ae.PENALTY_N3}for(let S=0;S<this.size;S++){let b=!1,R=0,j=[0,0,0,0,0,0,0];for(let A=0;A<this.size;A++)this.modules[A][S]==b?(R++,R==5?m+=Ae.PENALTY_N1:R>5&&m++):(this.finderPenaltyAddHistory(R,j),b||(m+=this.finderPenaltyCountPatterns(j)*Ae.PENALTY_N3),b=this.modules[A][S],R=1);m+=this.finderPenaltyTerminateAndCount(b,R,j)*Ae.PENALTY_N3}for(let S=0;S<this.size-1;S++)for(let b=0;b<this.size-1;b++){const R=this.modules[S][b];R==this.modules[S][b+1]&&R==this.modules[S+1][b]&&R==this.modules[S+1][b+1]&&(m+=Ae.PENALTY_N2)}let h=0;for(const S of this.modules)h=S.reduce((b,R)=>b+(R?1:0),h);const g=this.size*this.size,v=Math.ceil(Math.abs(h*20-g*10)/g)-1;return c(0<=v&&v<=9),m+=v*Ae.PENALTY_N4,c(0<=m&&m<=2568888),m}getAlignmentPatternPositions(){if(this.version==1)return[];{const m=Math.floor(this.version/7)+2,h=this.version==32?26:Math.ceil((this.version*4+4)/(m*2-2))*2;let g=[6];for(let v=this.size-7;g.length<m;v-=h)g.splice(1,0,v);return g}}static getNumRawDataModules(m){if(m<Ae.MIN_VERSION||m>Ae.MAX_VERSION)throw new RangeError("Version number out of range");let h=(16*m+128)*m+64;if(m>=2){const g=Math.floor(m/7)+2;h-=(25*g-10)*g-55,m>=7&&(h-=36)}return c(208<=h&&h<=29648),h}static getNumDataCodewords(m,h){return Math.floor(Ae.getNumRawDataModules(m)/8)-Ae.ECC_CODEWORDS_PER_BLOCK[h.ordinal][m]*Ae.NUM_ERROR_CORRECTION_BLOCKS[h.ordinal][m]}static reedSolomonComputeDivisor(m){if(m<1||m>255)throw new RangeError("Degree out of range");let h=[];for(let v=0;v<m-1;v++)h.push(0);h.push(1);let g=1;for(let v=0;v<m;v++){for(let S=0;S<h.length;S++)h[S]=Ae.reedSolomonMultiply(h[S],g),S+1<h.length&&(h[S]^=h[S+1]);g=Ae.reedSolomonMultiply(g,2)}return h}static reedSolomonComputeRemainder(m,h){let g=h.map(v=>0);for(const v of m){const S=v^g.shift();g.push(0),h.forEach((b,R)=>g[R]^=Ae.reedSolomonMultiply(b,S))}return g}static reedSolomonMultiply(m,h){if(m>>>8||h>>>8)throw new RangeError("Byte out of range");let g=0;for(let v=7;v>=0;v--)g=g<<1^(g>>>7)*285,g^=(h>>>v&1)*m;return c(g>>>8==0),g}finderPenaltyCountPatterns(m){const h=m[1];c(h<=this.size*3);const g=h>0&&m[2]==h&&m[3]==h*3&&m[4]==h&&m[5]==h;return(g&&m[0]>=h*4&&m[6]>=h?1:0)+(g&&m[6]>=h*4&&m[0]>=h?1:0)}finderPenaltyTerminateAndCount(m,h,g){return m&&(this.finderPenaltyAddHistory(h,g),h=0),h+=this.size,this.finderPenaltyAddHistory(h,g),this.finderPenaltyCountPatterns(g)}finderPenaltyAddHistory(m,h){h[0]==0&&(m+=this.size),h.pop(),h.unshift(m)}};i.MIN_VERSION=1,i.MAX_VERSION=40,i.PENALTY_N1=3,i.PENALTY_N2=3,i.PENALTY_N3=40,i.PENALTY_N4=10,i.ECC_CODEWORDS_PER_BLOCK=[[-1,7,10,15,20,26,18,20,24,30,18,20,24,26,30,22,24,28,30,28,28,28,28,30,30,26,28,30,30,30,30,30,30,30,30,30,30,30,30,30,30],[-1,10,16,26,18,24,16,18,22,22,26,30,22,22,24,24,28,28,26,26,26,26,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28,28],[-1,13,22,18,26,18,24,18,22,20,24,28,26,24,20,30,24,28,28,26,30,28,30,30,30,30,28,30,30,30,30,30,30,30,30,30,30,30,30,30,30],[-1,17,28,22,16,22,28,26,26,24,28,24,28,22,24,24,30,28,28,26,28,30,24,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30,30]],i.NUM_ERROR_CORRECTION_BLOCKS=[[-1,1,1,1,1,1,2,2,2,2,4,4,4,4,4,6,6,6,6,7,8,8,9,9,10,12,12,12,13,14,15,16,17,18,19,19,20,21,22,24,25],[-1,1,1,1,2,2,4,4,4,5,5,5,8,9,9,10,10,11,13,14,16,17,17,18,20,21,23,25,26,28,29,31,33,35,37,38,40,43,45,47,49],[-1,1,1,2,2,4,4,6,6,8,8,8,10,12,16,12,17,16,18,21,20,23,23,25,27,29,34,34,35,38,40,43,45,48,51,53,56,59,62,65,68],[-1,1,1,2,4,4,4,5,6,8,8,11,11,16,16,18,16,19,21,25,25,25,34,30,32,35,37,40,42,45,48,51,54,57,60,63,66,70,74,77,81]],l.QrCode=i;function r(y,m,h){if(m<0||m>31||y>>>m)throw new RangeError("Value out of range");for(let g=m-1;g>=0;g--)h.push(y>>>g&1)}function u(y,m){return(y>>>m&1)!=0}function c(y){if(!y)throw new Error("Assertion error")}const f=class et{constructor(m,h,g){if(this.mode=m,this.numChars=h,this.bitData=g,h<0)throw new RangeError("Invalid argument");this.bitData=g.slice()}static makeBytes(m){let h=[];for(const g of m)r(g,8,h);return new et(et.Mode.BYTE,m.length,h)}static makeNumeric(m){if(!et.isNumeric(m))throw new RangeError("String contains non-numeric characters");let h=[];for(let g=0;g<m.length;){const v=Math.min(m.length-g,3);r(parseInt(m.substring(g,g+v),10),v*3+1,h),g+=v}return new et(et.Mode.NUMERIC,m.length,h)}static makeAlphanumeric(m){if(!et.isAlphanumeric(m))throw new RangeError("String contains unencodable characters in alphanumeric mode");let h=[],g;for(g=0;g+2<=m.length;g+=2){let v=et.ALPHANUMERIC_CHARSET.indexOf(m.charAt(g))*45;v+=et.ALPHANUMERIC_CHARSET.indexOf(m.charAt(g+1)),r(v,11,h)}return g<m.length&&r(et.ALPHANUMERIC_CHARSET.indexOf(m.charAt(g)),6,h),new et(et.Mode.ALPHANUMERIC,m.length,h)}static makeSegments(m){return m==""?[]:et.isNumeric(m)?[et.makeNumeric(m)]:et.isAlphanumeric(m)?[et.makeAlphanumeric(m)]:[et.makeBytes(et.toUtf8ByteArray(m))]}static makeEci(m){let h=[];if(m<0)throw new RangeError("ECI assignment value out of range");if(m<128)r(m,8,h);else if(m<16384)r(2,2,h),r(m,14,h);else if(m<1e6)r(6,3,h),r(m,21,h);else throw new RangeError("ECI assignment value out of range");return new et(et.Mode.ECI,0,h)}static isNumeric(m){return et.NUMERIC_REGEX.test(m)}static isAlphanumeric(m){return et.ALPHANUMERIC_REGEX.test(m)}getData(){return this.bitData.slice()}static getTotalBits(m,h){let g=0;for(const v of m){const S=v.mode.numCharCountBits(h);if(v.numChars>=1<<S)return 1/0;g+=4+S+v.bitData.length}return g}static toUtf8ByteArray(m){m=encodeURI(m);let h=[];for(let g=0;g<m.length;g++)m.charAt(g)!="%"?h.push(m.charCodeAt(g)):(h.push(parseInt(m.substring(g+1,g+3),16)),g+=2);return h}};f.NUMERIC_REGEX=/^[0-9]*$/,f.ALPHANUMERIC_REGEX=/^[A-Z0-9 $%*+.\/:-]*$/,f.ALPHANUMERIC_CHARSET="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ $%*+-./:";let d=f;l.QrSegment=f})(Bl||(Bl={}));(l=>{(i=>{const r=class{constructor(c,f){this.ordinal=c,this.formatBits=f}};r.LOW=new r(0,1),r.MEDIUM=new r(1,0),r.QUARTILE=new r(2,3),r.HIGH=new r(3,2),i.Ecc=r})(l.QrCode||(l.QrCode={}))})(Bl||(Bl={}));(l=>{(i=>{const r=class{constructor(c,f){this.modeBits=c,this.numBitsCharCount=f}numCharCountBits(c){return this.numBitsCharCount[Math.floor((c+7)/17)]}};r.NUMERIC=new r(1,[10,12,14]),r.ALPHANUMERIC=new r(2,[9,11,13]),r.BYTE=new r(4,[8,16,16]),r.KANJI=new r(8,[8,10,12]),r.ECI=new r(7,[0,0,0]),i.Mode=r})(l.QrSegment||(l.QrSegment={}))})(Bl||(Bl={}));var Na=Bl;var tb={L:Na.QrCode.Ecc.LOW,M:Na.QrCode.Ecc.MEDIUM,Q:Na.QrCode.Ecc.QUARTILE,H:Na.QrCode.Ecc.HIGH},Yg=128,Vg="L",Gg="#FFFFFF",Ig="#000000",Qg=!1,Xg=1,nb=4,lb=0,ab=.1;function Zg(l,i=0){const r=[];return l.forEach(function(u,c){let f=null;u.forEach(function(d,y){if(!d&&f!==null){r.push(`M${f+i} ${c+i}h${y-f}v1H${f+i}z`),f=null;return}if(y===u.length-1){if(!d)return;f===null?r.push(`M${y+i},${c+i} h1v1H${y+i}z`):r.push(`M${f+i},${c+i} h${y+1-f}v1H${f+i}z`);return}d&&f===null&&(f=y)})}),r.join("")}function Kg(l,i){return l.slice().map((r,u)=>u<i.y||u>=i.y+i.h?r:r.map((c,f)=>f<i.x||f>=i.x+i.w?c:!1))}function ib(l,i,r,u){if(u==null)return null;const c=l.length+r*2,f=Math.floor(i*ab),d=c/i,y=(u.width||f)*d,m=(u.height||f)*d,h=u.x==null?l.length/2-y/2:u.x*d,g=u.y==null?l.length/2-m/2:u.y*d,v=u.opacity==null?1:u.opacity;let S=null;if(u.excavate){let R=Math.floor(h),j=Math.floor(g),A=Math.ceil(y+h-R),k=Math.ceil(m+g-j);S={x:R,y:j,w:A,h:k}}const b=u.crossOrigin;return{x:h,y:g,h:m,w:y,excavation:S,opacity:v,crossOrigin:b}}function rb(l,i){return i!=null?Math.max(Math.floor(i),0):l?nb:lb}function Fg({value:l,level:i,minVersion:r,includeMargin:u,marginSize:c,imageSettings:f,size:d,boostLevel:y}){let m=ft.useMemo(()=>{const R=(Array.isArray(l)?l:[l]).reduce((j,A)=>(j.push(...Na.QrSegment.makeSegments(A)),j),[]);return Na.QrCode.encodeSegments(R,tb[i],r,void 0,void 0,y)},[l,i,r,y]);const{cells:h,margin:g,numCells:v,calculatedImageSettings:S}=ft.useMemo(()=>{let b=m.getModules();const R=rb(u,c),j=b.length+R*2,A=ib(b,d,R,f);return{cells:b,margin:R,numCells:j,calculatedImageSettings:A}},[m,d,f,u,c]);return{qrcode:m,margin:g,cells:h,numCells:v,calculatedImageSettings:S}}var ub=(function(){try{new Path2D().addPath(new Path2D)}catch{return!1}return!0})(),ob=ft.forwardRef(function(i,r){const u=i,{value:c,size:f=Yg,level:d=Vg,bgColor:y=Gg,fgColor:m=Ig,includeMargin:h=Qg,minVersion:g=Xg,boostLevel:v,marginSize:S,imageSettings:b}=u,j=zc(u,["value","size","level","bgColor","fgColor","includeMargin","minVersion","boostLevel","marginSize","imageSettings"]),{style:A}=j,k=zc(j,["style"]),O=b?.src,_=ft.useRef(null),G=ft.useRef(null),ne=ft.useCallback(W=>{_.current=W,typeof r=="function"?r(W):r&&(r.current=W)},[r]),[L,Q]=ft.useState(!1),{margin:q,cells:te,numCells:se,calculatedImageSettings:ae}=Fg({value:c,level:d,minVersion:g,boostLevel:v,includeMargin:h,marginSize:S,imageSettings:b,size:f});ft.useEffect(()=>{if(_.current!=null){const W=_.current,P=W.getContext("2d");if(!P)return;let B=te;const ee=G.current,K=ae!=null&&ee!==null&&ee.complete&&ee.naturalHeight!==0&&ee.naturalWidth!==0;K&&ae.excavation!=null&&(B=Kg(te,ae.excavation));const X=window.devicePixelRatio||1;W.height=W.width=f*X;const T=f/se*X;P.scale(T,T),P.fillStyle=y,P.fillRect(0,0,se,se),P.fillStyle=m,ub?P.fill(new Path2D(Zg(B,q))):te.forEach(function(z,V){z.forEach(function(w,ie){w&&P.fillRect(ie+q,V+q,1,1)})}),ae&&(P.globalAlpha=ae.opacity),K&&P.drawImage(ee,ae.x+q,ae.y+q,ae.w,ae.h)}}),ft.useEffect(()=>{Q(!1)},[O]);const ue=Ac({height:f,width:f},A);let pe=null;return O!=null&&(pe=ft.createElement("img",{src:O,key:O,style:{display:"none"},onLoad:()=>{Q(!0)},ref:G,crossOrigin:ae?.crossOrigin})),ft.createElement(ft.Fragment,null,ft.createElement("canvas",Ac({style:ue,height:f,width:f,ref:ne,role:"img"},k)),pe)});ob.displayName="QRCodeCanvas";var Xc=ft.forwardRef(function(i,r){const u=i,{value:c,size:f=Yg,level:d=Vg,bgColor:y=Gg,fgColor:m=Ig,includeMargin:h=Qg,minVersion:g=Xg,boostLevel:v,title:S,marginSize:b,imageSettings:R}=u,j=zc(u,["value","size","level","bgColor","fgColor","includeMargin","minVersion","boostLevel","title","marginSize","imageSettings"]),{margin:A,cells:k,numCells:O,calculatedImageSettings:_}=Fg({value:c,level:d,minVersion:g,boostLevel:v,includeMargin:h,marginSize:b,imageSettings:R,size:f});let G=k,ne=null;R!=null&&_!=null&&(_.excavation!=null&&(G=Kg(k,_.excavation)),ne=ft.createElement("image",{href:R.src,height:_.h,width:_.w,x:_.x+A,y:_.y+A,preserveAspectRatio:"none",opacity:_.opacity,crossOrigin:_.crossOrigin}));const L=Zg(G,A);return ft.createElement("svg",Ac({height:f,width:f,viewBox:`0 0 ${O} ${O}`,ref:r,role:"img"},j),!!S&&ft.createElement("title",null,S),ft.createElement("path",{fill:y,d:`M0,0 h${O}v${O}H0z`,shapeRendering:"crispEdges"}),ft.createElement("path",{fill:m,d:L,shapeRendering:"crispEdges"}),ne)});Xc.displayName="QRCodeSVG";const sb=2e3,cb=5e3;function fb({onClose:l}){const[i,r]=C.useState(null),[u,c]=C.useState(!1),[f,d]=C.useState(!1),[y,m]=C.useState(""),[h,g]=C.useState([]),v=C.useCallback(()=>{Ce("/api/whatsapp/status").then(r).catch(()=>{})},[]),S=C.useCallback(()=>{Ce("/api/whatsapp/groups").then(A=>g(A.groups)).catch(()=>{})},[]),b=C.useCallback(async()=>{const A=!u;d(!0);try{await lt("/api/integrations/whatsapp",{enabled:A}),c(A),v()}catch(k){const O=k instanceof Error?k.message:k?.message||"Failed";m(O),setTimeout(()=>m(""),4e3)}finally{d(!1)}},[u,v]),R=A=>{A.target===A.currentTarget&&l()};C.useEffect(()=>{Ce("/api/integrations").then(A=>c(A.whatsapp.enabled)).catch(()=>{}),v(),S()},[v,S]),C.useEffect(()=>{const A=i?.status==="qr_pending"?sb:cb,k=setInterval(()=>{v(),S()},A);return()=>clearInterval(k)},[i?.status,v,S]);const j=i?.status==="connected";return p.jsx("div",{className:"modal-overlay visible",onClick:R,children:p.jsxs("div",{className:"modal",children:[p.jsx("button",{className:"modal-close",onClick:l,children:"×"}),p.jsx("h2",{children:"WhatsApp Setup"}),p.jsxs("div",{className:"setup-step",children:[p.jsxs("div",{className:"setup-step-title",children:[p.jsx("span",{className:"setup-step-number",children:"1"}),"Enable integration"]}),p.jsxs("div",{className:"setup-step-desc",children:[u?"WhatsApp integration is enabled. It will auto-start on boot.":"Enable to start the WhatsApp connection.",y&&p.jsx("div",{style:{color:"#d73a49",marginTop:4,fontSize:12},children:y})]}),p.jsx("div",{className:"setup-paste-row",children:p.jsxs("label",{style:{display:"flex",alignItems:"center",gap:8,cursor:f?"not-allowed":"pointer"},children:[p.jsx("input",{type:"checkbox",checked:u,disabled:f,onChange:b,style:{width:16,height:16,cursor:f?"not-allowed":"pointer"}}),p.jsx("span",{style:{fontSize:14,fontWeight:500,color:"var(--text-primary)"},children:f?u?"Stopping...":"Starting...":"Enabled"})]})})]}),p.jsx("hr",{className:"setup-divider"}),p.jsxs("div",{className:"setup-step",children:[p.jsxs("div",{className:"setup-step-title",children:[p.jsx("span",{className:"setup-step-number",children:"2"}),"Link WhatsApp"]}),p.jsxs("div",{className:"setup-step-desc",children:[!u&&"Enable the integration above to get started.",u&&i?.status==="disconnected"&&"Waiting for connection...",u&&i?.status==="connecting"&&"Connecting to WhatsApp...",u&&i?.status==="qr_pending"&&"Scan this QR code with WhatsApp on your phone (Settings > Linked Devices > Link a Device).",u&&j&&"WhatsApp is connected."]}),u&&i?.status==="qr_pending"&&i.qrCode&&p.jsx("div",{style:{display:"flex",justifyContent:"center",padding:"16px 0"},children:p.jsx(Xc,{value:i.qrCode,size:256})}),u&&p.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8,marginTop:8},children:[p.jsx("span",{className:`integration-dot${j?" running":""}`}),p.jsxs("span",{style:{fontSize:13,color:"var(--text-secondary)"},children:[i?.status==="connected"&&"Connected",i?.status==="qr_pending"&&"Waiting for QR scan",i?.status==="connecting"&&"Connecting...",i?.status==="disconnected"&&"Disconnected",!i&&"Loading..."]})]})]}),p.jsx("hr",{className:"setup-divider"}),p.jsxs("div",{className:"setup-step",children:[p.jsxs("div",{className:"setup-step-title",children:[p.jsx("span",{className:"setup-step-number",children:"3"}),"Agent groups"]}),p.jsx("div",{className:"setup-step-desc",children:"Each agent gets a WhatsApp group named [VoiceCC] <agentId>. Groups are created automatically when WhatsApp connects. Send messages in a group to chat with that agent."}),h.length===0&&p.jsx("div",{style:{fontSize:13,color:"var(--text-secondary)",marginTop:8},children:j?"No groups created yet. Groups sync automatically when agents exist.":"Connect WhatsApp to see agent groups."}),h.length>0&&p.jsx("div",{style:{marginTop:8},children:h.map(A=>p.jsxs("div",{style:{display:"flex",alignItems:"center",gap:8,padding:"6px 0",borderBottom:"1px solid var(--border-color)"},children:[p.jsxs("span",{style:{fontSize:13,fontWeight:500,color:"var(--text-primary)"},children:["[VoiceCC] ",A.agentId]}),p.jsx("span",{style:{fontSize:12,color:"var(--text-secondary)",marginLeft:"auto"},children:A.groupJid})]},A.groupJid))})]}),p.jsx("div",{style:{marginTop:16,padding:"10px 12px",background:"var(--bg-tertiary)",borderRadius:6,fontSize:12,color:"var(--text-secondary)",lineHeight:1.5},children:"Baileys is a reverse-engineered WhatsApp Web protocol. Use a separate phone number -- WhatsApp may throttle or block accounts used for automated messaging."})]})})}const db=[{name:"notion",description:"Connect to Notion workspaces, pages, and databases.",url:"https://mcp.notion.com/mcp",transport:"http"},{name:"figma",description:"Read Figma designs, components, and design tokens.",url:"https://mcp.figma.com/mcp",transport:"http"},{name:"sentry",description:"Access Sentry issues, events, and project data.",url:"https://mcp.sentry.dev/mcp",transport:"http"},{name:"context7",description:"Fetch up-to-date library docs and code examples.",url:"https://mcp.context7.com/mcp",transport:"http"},{name:"langfuse",description:"Search Langfuse documentation and API references.",url:"https://langfuse.com/api/mcp",transport:"http"},{name:"slack",description:"Send messages, create canvases, and fetch Slack data.",url:"https://mcp.slack.com/mcp",transport:"http"},{name:"atlassian",description:"Access Jira & Confluence from Claude.",url:"https://mcp.atlassian.com/v1/mcp",transport:"http"},{name:"linear",description:"Manage issues, projects & team workflows in Linear.",url:"https://mcp.linear.app/mcp",transport:"http"},{name:"gamma",description:"Create presentations, docs, socials, and sites with AI.",url:"https://mcp.gamma.app/mcp",transport:"http"},{name:"granola",description:"The AI notepad for meetings.",url:"https://mcp.granola.ai/mcp",transport:"http"}];function Jg({message:l,onDismiss:i,timeout:r=4e3}){return C.useEffect(()=>{if(!l)return;const u=setTimeout(i,r);return()=>clearTimeout(u)},[l,i,r]),l?p.jsxs("div",{className:"toast",children:[p.jsx("span",{children:l}),p.jsx("button",{className:"toast-close",onClick:i,children:"×"})]}):null}function hb({servers:l,onClose:i,onAdded:r}){const[u,c]=C.useState("claudeai"),[f,d]=C.useState(null),[y,m]=C.useState(null),h=l===null,g=b=>l?.find(R=>R.url===b),v=b=>{b.target===b.currentTarget&&i()},S=async b=>{d(b.name);try{await lt("/api/mcp-servers/add",{name:b.name,url:b.url,transport:b.transport,scope:"user"}),await r()}catch(R){const j=R?.message||"Failed to add server";m(j)}d(null)};return p.jsxs("div",{className:"modal-overlay visible",onClick:v,children:[p.jsxs("div",{className:"modal",style:{width:620},children:[p.jsx("button",{className:"modal-close",onClick:i,children:"×"}),p.jsx("h2",{children:"Add MCP Server"}),p.jsxs("div",{className:"mcp-add-tabs",children:[p.jsxs("button",{className:`mcp-add-tab${u==="claudeai"?" active":""}`,onClick:()=>c("claudeai"),children:["claude.ai",p.jsx("span",{className:"mcp-tab-rec",children:"Recommended"})]}),p.jsx("button",{className:`mcp-add-tab${u==="local"?" active":""}`,onClick:()=>c("local"),children:"Local"})]}),u==="claudeai"&&p.jsxs("div",{className:"mcp-add-claudeai",children:[p.jsx("p",{children:"Add MCP servers through your claude.ai account. Servers added there automatically sync to Claude Code -- no local configuration needed."}),p.jsx("a",{className:"mcp-add-claudeai-link",href:"https://claude.ai/settings/connectors",target:"_blank",rel:"noopener noreferrer",children:"Open claude.ai Connectors ↗"})]}),u==="local"&&p.jsxs(p.Fragment,{children:[p.jsx("p",{style:{fontSize:12,color:"var(--text-secondary)",marginBottom:16},children:"Select a server to add locally. Authentication is handled automatically via your browser."}),p.jsx("div",{className:"mcp-add-grid",children:db.map(b=>{const R=g(b.url),j=R?.status==="needs_auth",A=R?.status==="connected",k=f===b.name;return p.jsxs("div",{className:`mcp-add-card${A?" installed":""}`,children:[p.jsxs("div",{className:"mcp-add-card-header",children:[p.jsx("span",{className:"mcp-add-card-name",children:b.name}),A&&p.jsx("span",{className:"mcp-add-card-badge",children:"Installed"}),j&&p.jsx("span",{className:"mcp-add-card-badge needs-auth",children:"Needs authentication"})]}),p.jsx("p",{className:"mcp-add-card-desc",children:b.description}),p.jsxs("div",{className:"mcp-add-card-footer",children:[p.jsx("span",{className:"mcp-add-card-url",children:b.url}),h?p.jsx("span",{style:{fontSize:11,color:"var(--text-secondary)"},children:"Loading..."}):!R&&p.jsx("button",{className:"mcp-add-card-btn",disabled:k,onClick:()=>S(b),children:k?"Adding...":"Add"})]})]},b.url)})})]})]}),p.jsx(Jg,{message:y,onDismiss:()=>m(null)})]})}function pb({twilioRunning:l,whatsappStatus:i}){const[r,u]=C.useState(null),[c,f]=C.useState(!1),[d,y]=C.useState(!1),[m,h]=C.useState(!1),[g,v]=C.useState(!1),[S,b]=C.useState(null),R=C.useCallback(async()=>{try{const O=await Ce("/api/mcp-servers");u(O.servers)}catch{f(!0)}},[]);C.useEffect(()=>{R()},[R]);const j=O=>O==="connected"?"connected":O==="needs_auth"?"needs-auth":"failed",A=O=>O==="connected"?"Connected":O==="needs_auth"?"Needs auth":O==="pending"?"Pending":O==="disabled"?"Disabled":"Failed",k=O=>O==="claudeai"?{label:"claude.ai",className:"scope-claudeai"}:O==="managed"?{label:"Managed",className:"scope-managed"}:O==="user"?{label:"Local (user)",className:"scope-local"}:O==="project"?{label:"Local (project)",className:"scope-local"}:{label:"Local (local)",className:"scope-local"};return p.jsxs("div",{style:{display:"flex",flexDirection:"column"},children:[p.jsx("div",{className:"page-header",style:{borderBottom:"none",padding:0,marginBottom:24},children:p.jsxs("div",{children:[p.jsx("h1",{children:"Integrations & MCP"}),p.jsx("p",{style:{fontSize:13,color:"var(--text-secondary)",marginTop:4},children:"Connect external services and configure MCP servers."})]})}),p.jsxs("div",{className:"integrations-panel",children:[p.jsx("h2",{style:{fontSize:16,fontWeight:600,color:"var(--text-primary)",marginBottom:4},children:"Integrations"}),p.jsx("p",{style:{fontSize:13,color:"var(--text-secondary)",marginBottom:20},children:"Connect external services to enable voice calling capabilities."}),p.jsxs("div",{style:{display:"flex",gap:12},children:[p.jsxs("button",{className:"btn-integration",onClick:()=>y(!0),children:[p.jsx("span",{className:`integration-dot${l?" running":""}`}),"Twilio"]}),p.jsxs("button",{className:"btn-integration",onClick:()=>h(!0),children:[p.jsx("span",{className:`integration-dot${i==="connected"?" running":""}`}),"WhatsApp"]})]})]}),p.jsxs("div",{className:"mcp-panel",children:[p.jsxs("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"flex-start",marginBottom:4},children:[p.jsxs("div",{children:[p.jsx("h2",{style:{fontSize:16,fontWeight:600,color:"var(--text-primary)",marginBottom:4},children:"MCP Servers"}),p.jsx("p",{style:{fontSize:13,color:"var(--text-secondary)",marginBottom:20},children:"Configure Model Context Protocol servers to provide external tools to Claude."})]}),p.jsx("button",{className:"mcp-add-btn",onClick:()=>v(!0),children:"+ Add MCP Server"})]}),p.jsxs("div",{className:"mcp-server-list",children:[!r&&!c&&p.jsx("div",{className:"mcp-loading",children:"Loading..."}),c&&p.jsx("div",{className:"mcp-error",children:"Failed to load MCP servers."}),r&&r.length===0&&p.jsx("div",{className:"mcp-loading",style:{color:"var(--text-secondary)",fontSize:13},children:"No MCP servers configured."}),r?.map(O=>{const _=O.scope==="claudeai"||O.scope==="managed"||O.scope==="user",G=k(O.scope),ne=O.scope==="claudeai"?"Managed by claude.ai":O.scope==="user"?"Globally installed, please delete through Claude Code":`Remove ${O.name}`;return p.jsxs("div",{className:"mcp-server-row",children:[p.jsx("span",{className:`mcp-dot ${j(O.status)}`}),p.jsx("span",{className:"mcp-server-name",children:O.name}),p.jsx("span",{className:"mcp-server-url",title:O.url,children:O.url}),p.jsx("span",{className:`mcp-scope-badge ${G.className}`,children:G.label}),p.jsx("span",{className:"mcp-server-badge",children:O.type.toUpperCase()}),p.jsx("span",{className:`mcp-server-status ${j(O.status)}`,children:A(O.status)}),p.jsxs("span",{className:"mcp-delete-wrap",children:[p.jsx("button",{className:`mcp-delete-btn${_?" disabled":""}`,onClick:()=>{_||Og(`/api/mcp-servers/${O.name}`).then(R).catch(L=>{b(L?.message||"Failed to remove server")})},children:"×"}),p.jsx("span",{className:"mcp-delete-tooltip",children:ne})]})]},O.name)})]})]}),d&&p.jsx(W0,{onClose:()=>y(!1)}),m&&p.jsx(fb,{onClose:()=>h(!1)}),g&&p.jsx(hb,{servers:r,onClose:()=>v(!1),onAdded:R}),p.jsx(Jg,{message:S,onDismiss:()=>b(null)})]})}function mb(){const[l]=_g(),i=l.get("tab"),[r,u]=C.useState(i==="voice"||i==="integrations"?i:"general"),[c,f]=C.useState({running:!1,url:null}),[d,y]=C.useState({running:!1,tunnelUrl:null}),[m,h]=C.useState({status:"disconnected",qrCode:null});C.useEffect(()=>{const v=()=>{Ce("/api/tunnel/status").then(f).catch(()=>{}),Ce("/api/twilio/status").then(y).catch(()=>{}),Ce("/api/whatsapp/status").then(h).catch(()=>{})};v();const S=setInterval(v,5e3);return()=>clearInterval(S)},[]);const g=v=>({padding:"6px 14px",background:r===v?"var(--btn-primary-bg)":"var(--bg-main)",border:"1px solid "+(r===v?"transparent":"var(--border-color)"),borderRadius:"0",color:r===v?"var(--btn-primary-text)":"var(--text-primary)",fontWeight:500,cursor:"pointer",fontSize:"13px",transition:"all 0.1s ease"});return p.jsxs("div",{className:"page active",style:{display:"flex",flexDirection:"column",padding:0},children:[p.jsxs("div",{style:{display:"flex",gap:"8px",padding:"24px 32px 16px",borderBottom:"1px solid var(--border-color)",flexShrink:0},children:[p.jsx("button",{style:g("general"),onClick:()=>u("general"),children:"General"}),p.jsx("button",{style:g("voice"),onClick:()=>u("voice"),children:"Voice"}),p.jsx("button",{style:g("integrations"),onClick:()=>u("integrations"),children:"Integrations & MCP"})]}),p.jsxs("div",{style:{flex:1,overflowY:"auto",padding:"48px 64px"},children:[r==="general"&&p.jsx(G0,{twilioRunning:d.running}),r==="voice"&&p.jsx($0,{}),r==="integrations"&&p.jsx(pb,{twilioRunning:d.running,whatsappStatus:m.status})]})]})}const oc={id:""};function gb(){const l=Ru(),[i,r]=C.useState([]),[u,c]=C.useState(!1),[f,d]=C.useState(oc),[y,m]=C.useState(!1),[h,g]=C.useState(null),[v,S]=C.useState(!1);C.useEffect(()=>{Ce("/api/agents").then(r).catch(()=>{})},[]);const b=async()=>{g(null),m(!0);try{await lt("/api/agents",{id:f.id});const A=await Ce("/api/agents");r(A),d(oc),c(!1)}catch(A){const k=A?.message||"Failed to create agent";g(k)}finally{m(!1)}},R=()=>{d(oc),c(!1),g(null)},j=async A=>{const k=window.prompt("Enter an ID for the imported agent:",A.name.replace(/\.zip$/i,""));if(k){S(!0),g(null);try{const O=new FormData;O.append("file",A),O.append("id",k);const _=await fetch("/api/agents/import",{method:"POST",body:O});if(!_.ok){const ne=await _.json().catch(()=>({error:"Import failed"}));throw new Error(ne.error||"Import failed")}const G=await Ce("/api/agents");r(G)}catch(O){const _=O?.message||"Failed to import agent";g(_)}finally{S(!1)}}};return p.jsxs("div",{className:"page active",style:{display:"flex",flexDirection:"column",padding:0},children:[p.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",padding:"24px 32px 16px",borderBottom:"1px solid var(--border-color)",flexShrink:0},children:[p.jsx("h2",{style:{margin:0,fontSize:18,fontWeight:600,color:"var(--text-primary)"},children:"Agents"}),!u&&p.jsxs("div",{style:{display:"flex",gap:8},children:[p.jsxs("label",{style:{padding:"6px 14px",background:"var(--bg-main)",color:"var(--text-primary)",border:"1px solid var(--border-color)",borderRadius:0,fontWeight:500,fontSize:13,cursor:v?"not-allowed":"pointer",opacity:v?.6:1},children:[v?"Importing...":"Import",p.jsx("input",{type:"file",accept:".zip",style:{display:"none"},onChange:A=>{const k=A.target.files?.[0];k&&j(k),A.target.value=""},disabled:v})]}),p.jsx("button",{onClick:()=>c(!0),style:{padding:"6px 14px",background:"var(--btn-primary-bg)",color:"var(--btn-primary-text)",border:"none",borderRadius:0,fontWeight:500,fontSize:13,cursor:"pointer"},children:"Create Agent"})]})]}),h&&!u&&p.jsx("div",{style:{margin:"16px 32px 0",padding:"8px 10px",fontSize:12,color:"#d73a49",background:"var(--bg-tertiary)",borderRadius:6,border:"1px solid #d73a49"},children:h}),p.jsxs("div",{style:{flex:1,overflowY:"auto",padding:"48px 64px"},children:[u&&p.jsxs("div",{className:"settings-panel",style:{marginBottom:24,padding:20},children:[p.jsx("h3",{style:{margin:"0 0 16px",fontSize:14,fontWeight:600,color:"var(--text-primary)"},children:"New Agent"}),h&&p.jsx("div",{style:{marginBottom:12,padding:"8px 10px",fontSize:12,color:"#d73a49",background:"var(--bg-tertiary)",borderRadius:6,border:"1px solid #d73a49"},children:h}),p.jsxs("div",{style:{marginBottom:16},children:[p.jsx("label",{style:{display:"block",marginBottom:4,fontSize:13,fontWeight:500,color:"var(--text-primary)"},children:"ID"}),p.jsx("input",{type:"text",value:f.id,onChange:A=>d({...f,id:A.target.value}),placeholder:"my-agent",style:{width:"100%",padding:"6px 10px",fontSize:13,background:"var(--bg-main)",color:"var(--text-primary)",border:"1px solid var(--border-color)",borderRadius:0,boxSizing:"border-box"}})]}),p.jsxs("div",{style:{display:"flex",gap:8},children:[p.jsx("button",{onClick:b,disabled:y||!f.id.trim(),style:{padding:"6px 14px",background:"var(--btn-primary-bg)",color:"var(--btn-primary-text)",border:"none",borderRadius:0,fontWeight:500,fontSize:13,cursor:y?"not-allowed":"pointer",opacity:y||!f.id.trim()?.6:1},children:y?"Creating...":"Create"}),p.jsx("button",{onClick:R,style:{padding:"6px 14px",background:"var(--bg-main)",color:"var(--text-primary)",border:"1px solid var(--border-color)",borderRadius:0,fontWeight:500,fontSize:13,cursor:"pointer"},children:"Cancel"})]})]}),p.jsxs("div",{className:"settings-panel",style:{padding:0},children:[i.length===0&&!u&&p.jsx("div",{style:{padding:20,fontSize:13,color:"var(--text-secondary)"},children:'No agents yet. Click "Create Agent" to get started.'}),i.map(A=>p.jsxs("div",{onClick:()=>l(`/agents/${A.id}`),style:{display:"flex",alignItems:"center",justifyContent:"space-between",padding:"14px 20px",borderBottom:"1px solid var(--border-color)",cursor:"pointer",transition:"background 0.1s ease"},onMouseEnter:k=>k.currentTarget.style.background="var(--bg-tertiary)",onMouseLeave:k=>k.currentTarget.style.background="transparent",children:[p.jsxs("div",{style:{display:"flex",alignItems:"center",gap:10},children:[p.jsx("span",{style:{width:8,height:8,borderRadius:"50%",background:A.enabled?"#2ea043":"#8b949e",flexShrink:0}}),p.jsx("span",{style:{fontSize:14,fontWeight:500,color:"var(--text-primary)"},children:A.id})]}),p.jsxs("div",{style:{fontSize:13,color:"var(--text-secondary)"},children:["every ",A.heartbeatIntervalMinutes,"m"]})]},A.id))]})]})]})}function yb({callBaseUrl:l,agentId:i,onClose:r}){const[u,c]=C.useState(null),[f,d]=C.useState(0),[y,m]=C.useState(""),[h,g]=C.useState(null),[v,S]=C.useState(!1),[b,R]=C.useState(!1),j=C.useRef(null),A=C.useRef(null),k=C.useRef(null),O=l.includes("localhost")||l.includes("127.0.0.1"),_=u?`${l}/call?code=${u}&agentId=${i}`:`${l}/call`,G=C.useCallback(async()=>{c(null),m(""),g(null),S(!1);try{const q=await lt("/api/webrtc/generate-code",{agentId:i});c(q.code),d(q.expiresAt)}catch(q){const te=q instanceof Error?q.message:q?.message||"Failed to generate code";g(te)}},[i]);C.useEffect(()=>(G(),O||Ce("/api/tunnel/status").then(q=>{if(q.startedAt){const te=Date.now()-q.startedAt;te<6e4&&(R(!0),k.current=setTimeout(()=>R(!1),6e4-te))}}).catch(()=>{}),()=>{j.current&&clearInterval(j.current),A.current&&clearInterval(A.current),k.current&&clearTimeout(k.current)}),[G]),C.useEffect(()=>{if(!f||v)return;const q=()=>{const te=Math.max(0,Math.floor((f-Date.now())/1e3));if(te<=0){m("Code expired"),j.current&&(clearInterval(j.current),j.current=null);return}const se=Math.floor(te/60),ae=te%60;m(`Expires in ${se}:${String(ae).padStart(2,"0")}`)};return q(),j.current=setInterval(q,1e3),()=>{j.current&&clearInterval(j.current)}},[f,v]),C.useEffect(()=>{if(!(!u||v))return A.current=setInterval(async()=>{try{!(await Ce(`/api/webrtc/code-status?code=${u}`)).active&&Date.now()<f&&(S(!0),j.current&&(clearInterval(j.current),j.current=null),A.current&&(clearInterval(A.current),A.current=null))}catch{}},2e3),()=>{A.current&&clearInterval(A.current)}},[u,f,v]);const ne=q=>{q.target===q.currentTarget&&r()},L=u?`${u.slice(0,3)} ${u.slice(3)}`:"------",Q=y==="Code expired";return p.jsx("div",{className:"modal-overlay visible",onClick:ne,children:p.jsxs("div",{className:"modal",style:{textAlign:"center"},children:[p.jsx("button",{className:"modal-close",onClick:r,children:"×"}),p.jsx("h2",{children:"Call via Browser"}),p.jsx("p",{style:{fontSize:12,color:"#999",marginBottom:12},children:"Scan the QR code or open the link on any device, then enter the pairing code."}),p.jsx("div",{className:"qr-container",children:_&&p.jsx(Xc,{value:_,size:160,level:"M"})}),p.jsx("div",{className:"call-url",children:p.jsx("a",{href:_,target:"_blank",rel:"noreferrer",children:_})}),b&&p.jsx("div",{style:{fontSize:11,color:"#d29922",marginBottom:8},children:"Tunnel is warming up -- link may take a moment to become reachable"}),O&&p.jsx("div",{style:{fontSize:11,color:"#d29922",marginBottom:8},children:"No tunnel active -- this link only works on this machine. Enable the tunnel in Settings to call from other devices."}),v?p.jsxs(p.Fragment,{children:[p.jsx("div",{className:"pairing-code",style:{color:"#2ea043"},children:"Paired"}),p.jsx("div",{className:"pairing-countdown",style:{color:"#2ea043"},children:"Device connected successfully"})]}):p.jsxs(p.Fragment,{children:[p.jsx("div",{className:"pairing-code",style:{opacity:Q?.4:1},children:h?"Error":L}),p.jsx("div",{className:"pairing-countdown",children:h||y})]}),p.jsx("button",{className:"btn-regenerate",onClick:G,children:v?"New Code":"Regenerate Code"})]})})}const pu={margin:0,padding:12,fontSize:13,fontFamily:"monospace",whiteSpace:"pre-wrap",wordWrap:"break-word",background:"var(--bg-main)",color:"var(--text-primary)",border:"1px solid var(--border-color)",borderRadius:0},Aa={margin:"0 0 8px",fontSize:14,fontWeight:600,color:"var(--text-primary)"};function vb(){const{id:l}=wg(),i=Ru(),{browserCallStatus:r}=Tg(),[u,c]=C.useState(null),[f,d]=C.useState(!1),[y,m]=C.useState(null),[h,g]=C.useState(!1),[v,S]=C.useState(null),[b,R]=C.useState([]),[j,A]=C.useState(null),[k,O]=C.useState(!1),[_,G]=C.useState(!1),[ne,L]=C.useState(!1),[Q,q]=C.useState(!1),[te,se]=C.useState(!1),[ae,ue]=C.useState(!1);C.useEffect(()=>{l&&Ce(`/api/agents/${l}`).then(c).catch(()=>{})},[l]),C.useEffect(()=>{Ce("/api/twilio/status").then(X=>q(X.running)).catch(()=>{}),Ce("/api/whatsapp/status").then(X=>se(X.status==="connected")).catch(()=>{})},[]),C.useEffect(()=>{Ce("/api/providers/tts").then(X=>(S(X.active),Ce(`/api/providers/tts/${X.active}/voices`))).then(X=>R(X.voices)).catch(X=>A(X?.message||"Failed to load voices"))},[]);const pe=async X=>{if(!(!l||!u||!v)){O(!0);try{const T=v,V={...u.config.voice??{},[T]:{id:X,name:b.find(w=>w.id===X)?.name??""}};await bm(`/api/agents/${l}`,{config:{voice:V}}),c({...u,config:{...u.config,voice:V}})}finally{O(!1)}}},W=async X=>{if(!(!l||!u)){ue(!0);try{await bm(`/api/agents/${l}`,{config:{outboundChannel:X}}),c({...u,config:{...u.config,outboundChannel:X}})}finally{ue(!1)}}},P=async()=>{if(l){d(!0),m(null);try{await lt(`/api/agents/${l}/call`)}catch(X){const T=X?.message||"Failed to initiate call";m(T)}finally{d(!1)}}},B=async()=>{if(l)try{console.log(`[export-ui] Fetching /api/agents/${l}/export`);const X=await fetch(`/api/agents/${l}/export`);if(console.log(`[export-ui] Response status: ${X.status}, content-type: ${X.headers.get("content-type")}`),!X.ok){const w=await X.text();console.error(`[export-ui] Export failed: ${X.status} - ${w}`),alert(`Export failed: ${w}`);return}const T=await X.blob();console.log(`[export-ui] Blob size: ${T.size}, type: ${T.type}`);const z=URL.createObjectURL(T),V=document.createElement("a");V.href=z,V.download=`${l}.zip`,V.click(),URL.revokeObjectURL(z),console.log(`[export-ui] Download triggered for ${l}.zip`)}catch(X){console.error("[export-ui] Export error:",X),alert(`Export failed: ${X}`)}},ee=async()=>{if(l&&window.confirm(`Delete agent "${l}"? This cannot be undone.`)){g(!0);try{await Og(`/api/agents/${l}`),i("/agents")}catch{g(!1)}}},K=async()=>{if(l){L(!0);try{const X=await lt("/api/webrtc/generate-code",{agentId:l});window.open(`/chat?code=${X.code}&agentId=${encodeURIComponent(l)}`,"_blank")}catch(X){const T=X?.message||"Failed to generate pairing code";m(T)}finally{L(!1)}}};return u?p.jsxs("div",{className:"page active",style:{display:"flex",flexDirection:"column",padding:0},children:[p.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",padding:"24px 32px 16px",borderBottom:"1px solid var(--border-color)",flexShrink:0},children:[p.jsxs("div",{style:{display:"flex",alignItems:"center",gap:12},children:[p.jsx(_t,{to:"/agents",style:{fontSize:13,color:"var(--text-secondary)",textDecoration:"none"},children:"Agents"}),p.jsx("span",{style:{color:"var(--text-secondary)",fontSize:13},children:"/"}),p.jsx("h2",{style:{margin:0,fontSize:18,fontWeight:600,color:"var(--text-primary)"},children:u.id})]}),p.jsxs("div",{style:{display:"flex",gap:8},children:[p.jsx("button",{onClick:B,style:{padding:"6px 14px",background:"var(--bg-main)",color:"var(--text-primary)",border:"1px solid var(--border-color)",borderRadius:0,fontWeight:500,fontSize:13,cursor:"pointer",display:"inline-flex",alignItems:"center"},children:"Export"}),p.jsx("button",{onClick:P,disabled:f,style:{padding:"6px 14px",background:"var(--btn-primary-bg)",color:"var(--btn-primary-text)",border:"none",borderRadius:0,fontWeight:500,fontSize:13,cursor:f?"not-allowed":"pointer",opacity:f?.6:1},children:f?"Calling...":"Call via Phone"}),p.jsx("button",{onClick:()=>G(!0),style:{padding:"6px 14px",background:"var(--btn-primary-bg)",color:"var(--btn-primary-text)",border:"none",borderRadius:0,fontWeight:500,fontSize:13,cursor:"pointer"},children:"Call via Browser"}),p.jsx("button",{onClick:K,disabled:ne,style:{padding:"6px 14px",background:"var(--btn-primary-bg)",color:"var(--btn-primary-text)",border:"none",borderRadius:0,fontWeight:500,fontSize:13,cursor:ne?"not-allowed":"pointer",opacity:ne?.6:1},children:ne?"Opening...":"Chat via Text"}),p.jsx("button",{onClick:ee,disabled:h,style:{padding:"6px 14px",background:"transparent",color:"#d73a49",border:"1px solid #d73a49",borderRadius:0,fontWeight:500,fontSize:13,cursor:h?"not-allowed":"pointer",opacity:h?.6:1},children:h?"Deleting...":"Delete"})]})]}),y&&p.jsx("div",{style:{margin:"16px 32px 0",padding:"8px 10px",fontSize:12,color:"#d73a49",background:"var(--bg-tertiary)",borderRadius:6,border:"1px solid #d73a49"},children:y}),p.jsxs("div",{style:{flex:1,overflowY:"auto",padding:"48px 64px"},children:[p.jsxs("div",{className:"settings-panel",style:{marginBottom:24,padding:20},children:[p.jsx("h3",{style:Aa,children:"SOUL.md"}),p.jsx("pre",{style:pu,children:u.soulMd||"(empty)"})]}),p.jsxs("div",{className:"settings-panel",style:{marginBottom:24,padding:20},children:[p.jsx("h3",{style:Aa,children:"MEMORY.md"}),p.jsx("pre",{style:pu,children:u.memoryMd||"(empty)"})]}),p.jsxs("div",{className:"settings-panel",style:{marginBottom:24,padding:20},children:[p.jsx("h3",{style:Aa,children:"HEARTBEAT.md"}),p.jsx("pre",{style:pu,children:u.heartbeatMd||"(empty)"})]}),p.jsxs("div",{className:"settings-panel",style:{marginBottom:24,padding:20},children:[p.jsx("h3",{style:Aa,children:"Voice"}),v&&b.length>0?p.jsxs("div",{children:[p.jsx("label",{style:{display:"block",fontSize:13,color:"var(--text-secondary)",marginBottom:6},children:"ElevenLabs voice"}),p.jsx("select",{value:u.config.voice?.[v]?.id??"",onChange:X=>pe(X.target.value),disabled:k,style:{padding:"6px 10px",fontSize:13,background:"var(--bg-main)",color:"var(--text-primary)",border:"1px solid var(--border-color)",borderRadius:0,cursor:k?"not-allowed":"pointer",opacity:k?.6:1,minWidth:200},children:b.map(X=>p.jsx("option",{value:X.id,children:X.name},X.id))})]}):j?p.jsx("p",{style:{margin:0,fontSize:13,color:"#d73a49"},children:j}):p.jsx("p",{style:{margin:0,fontSize:13,color:"var(--text-secondary)"},children:"Loading voices..."})]}),p.jsxs("div",{className:"settings-panel",style:{marginBottom:24,padding:20},children:[p.jsx("h3",{style:Aa,children:"Outbound Channel"}),p.jsx("p",{style:{margin:"0 0 8px",fontSize:13,color:"var(--text-secondary)"},children:"When a heartbeat decides to reach out, use this channel."}),p.jsxs("select",{value:u.config.outboundChannel??"call",onChange:X=>W(X.target.value),disabled:ae,style:{padding:"6px 10px",fontSize:13,background:"var(--bg-main)",color:"var(--text-primary)",border:"1px solid var(--border-color)",borderRadius:0,cursor:ae?"not-allowed":"pointer",opacity:ae?.6:1,minWidth:200},children:[p.jsxs("option",{value:"call",disabled:!Q,children:["Phone Call",Q?"":" (Twilio not running)"]}),p.jsxs("option",{value:"whatsapp",disabled:!te,children:["WhatsApp",te?"":" (not connected)"]})]})]}),p.jsxs("div",{className:"settings-panel",style:{marginBottom:24,padding:20},children:[p.jsx("h3",{style:Aa,children:"Config"}),p.jsx("pre",{style:pu,children:JSON.stringify(u.config,null,2)})]})]}),_&&r.callBaseUrl&&l&&p.jsx(yb,{agentId:l,callBaseUrl:r.callBaseUrl,onClose:()=>G(!1)})]}):p.jsx("div",{className:"page active",style:{display:"flex",flexDirection:"column",padding:0},children:p.jsx("div",{style:{padding:"24px 32px",color:"var(--text-secondary)",fontSize:14},children:"Loading..."})})}const xb={Read:"Read",Edit:"Edit",Write:"Write",Bash:"Bash",Glob:"Glob",Grep:"Grep",WebSearch:"WebSearch",WebFetch:"WebFetch"};function bb(l,i){const r=xb[l]||l;try{const u=JSON.parse(i);if(l==="Read"&&u.file_path)return`${r} ${u.file_path}`;if(l==="Bash"&&u.description)return`${r}: ${u.description}`;if(l==="Bash"&&u.command){const c=u.command.length>60?u.command.slice(0,60)+"...":u.command;return`${r}: ${c}`}if(l==="Edit"&&u.file_path)return`${r} ${u.file_path}`;if(l==="Write"&&u.file_path)return`${r} ${u.file_path}`;if(l==="Grep"&&u.pattern)return`${r}: ${u.pattern}`;if(l==="Glob"&&u.pattern)return`${r}: ${u.pattern}`}catch{}return r}function Sb({data:l,onClose:i}){return p.jsx("div",{className:"tool-modal-overlay",onClick:i,children:p.jsxs("div",{className:"tool-modal",onClick:r=>r.stopPropagation(),children:[p.jsxs("div",{className:"tool-modal-header",children:[p.jsx("span",{className:"tool-modal-title",children:l.toolName}),p.jsx("button",{className:"tool-modal-close",onClick:i,children:"x"})]}),p.jsxs("div",{className:"tool-modal-section",children:[p.jsx("div",{className:"tool-modal-label",children:"Input"}),p.jsx("pre",{className:"tool-modal-code",children:l.toolInput})]}),l.toolResult!==void 0&&p.jsxs("div",{className:"tool-modal-section",children:[p.jsxs("div",{className:"tool-modal-label",children:["Output",l.toolIsError?" (error)":""]}),p.jsx("pre",{className:`tool-modal-code${l.toolIsError?" tool-modal-error":""}`,children:l.toolResult})]})]})})}function Eb({data:l,onClose:i}){return p.jsx("div",{className:"tool-modal-overlay",onClick:i,children:p.jsxs("div",{className:"tool-modal",onClick:r=>r.stopPropagation(),children:[p.jsxs("div",{className:"tool-modal-header",children:[p.jsxs("span",{className:"tool-modal-title",children:["Subagent",l.type?` (${l.type})`:""]}),p.jsx("button",{className:"tool-modal-close",onClick:i,children:"x"})]}),l.prompt&&p.jsxs("div",{className:"tool-modal-section",children:[p.jsx("div",{className:"tool-modal-label",children:"Prompt"}),p.jsx("pre",{className:"tool-modal-code",children:l.prompt})]}),l.result&&p.jsxs("div",{className:"tool-modal-section",children:[p.jsx("div",{className:"tool-modal-label",children:"Response"}),p.jsx("pre",{className:"tool-modal-code",children:l.result})]})]})})}function Cb({sessionId:l,agentId:i}){const[r,u]=C.useState([]),[c,f]=C.useState("Loading..."),[d,y]=C.useState(null),[m,h]=C.useState(null),[g,v]=C.useState(null),S=C.useRef(null);C.useEffect(()=>{f("Loading..."),y(null),u([]);const j=i?`?agentId=${i}`:"";Ce(`/api/conversations/${l}${j}`).then(A=>{u(A);const k=i?`[${i}] `:"";f(`${k}Conversation (${A.length} messages)`)}).catch(()=>{y("Error loading conversation."),f("Conversation")})},[l,i]),C.useEffect(()=>{S.current&&(S.current.scrollTop=S.current.scrollHeight)},[r]);function b(j){j.toolName&&j.toolInput&&h({toolName:j.toolName,toolInput:j.toolInput,toolResult:j.toolResult,toolIsError:j.toolIsError})}function R(j){v({description:j.subagentDescription||"Subagent",type:j.subagentType,prompt:j.subagentPrompt,result:j.subagentResult})}return p.jsxs(p.Fragment,{children:[p.jsx("div",{className:"page-header",style:{padding:"48px 64px 24px"},children:p.jsx("div",{children:p.jsx("h1",{children:c})})}),p.jsxs("div",{className:"conversation-messages",ref:S,style:{padding:"0 64px 48px"},children:[d&&p.jsx("div",{className:"conversation-empty",children:d}),!d&&r.length===0&&!c.includes("Loading")&&p.jsx("div",{className:"conversation-empty",children:"No messages in this session."}),r.map((j,A)=>j.role==="tool_use"?p.jsxs("div",{className:"tool-call-line",onClick:()=>b(j),title:"Click to view details",children:[p.jsx("span",{className:"tool-call-icon",children:">"}),p.jsx("span",{className:"tool-call-summary",children:bb(j.toolName||"",j.toolInput||"{}")}),j.toolIsError&&p.jsx("span",{className:"tool-call-error-badge",children:"err"})]},A):j.role==="subagent"?p.jsxs("div",{className:"subagent-line",onClick:()=>R(j),title:"Click to view subagent details",children:[p.jsx("span",{className:"subagent-icon",children:"</>"}),p.jsxs("span",{className:"subagent-summary",children:[j.subagentType?`${j.subagentType}: `:"",j.subagentDescription||"Subagent"]}),!j.subagentResult&&p.jsx("span",{className:"subagent-pending-badge",children:"pending"})]},A):p.jsxs("div",{className:`msg msg-${j.role}`,children:[p.jsxs("div",{className:"msg-header",children:[p.jsx("span",{className:"msg-role",children:j.role==="user"?"User":"VoiceCC"}),p.jsx("span",{className:"msg-time",children:new Date(j.timestamp).toLocaleTimeString()})]}),p.jsx("div",{className:"msg-content",children:j.content})]},A))]}),m&&p.jsx(Sb,{data:m,onClose:()=>h(null)}),g&&p.jsx(Eb,{data:g,onClose:()=>v(null)})]})}function Tb(){const{id:l}=wg(),[i]=_g(),r=i.get("agentId")??void 0;return l?p.jsx("div",{className:"page active",children:p.jsx(Cb,{sessionId:l,agentId:r})}):p.jsxs("div",{className:"page active",style:{display:"flex",flexDirection:"column"},children:[p.jsx("div",{className:"page-header",style:{padding:"48px 64px 24px"},children:p.jsx("div",{children:p.jsx("h1",{children:"Error"})})}),p.jsx("div",{className:"conversation-messages",style:{padding:"0 64px 48px"},children:p.jsx("div",{className:"conversation-empty",children:"No conversation ID provided."})})]})}const qn=6,sc="claude-voice-device-token",wm="claude-voice-agent-";function wb(){const[l,i]=C.useState("pairing"),[r,u]=C.useState(""),[c,f]=C.useState(""),[d,y]=C.useState(Array(qn).fill("")),m=C.useRef([]),h=C.useRef(localStorage.getItem(sc)||""),g=C.useRef(""),v=C.useRef(null),S=C.useRef(null),b=C.useCallback(()=>d.join(""),[d]),R=()=>{y(Array(qn).fill("")),m.current[0]?.focus()},j=C.useCallback(async L=>{const Q=L||b();if(Q.length!==qn){u("Enter all 6 digits");return}u("");try{const q=await lt("/api/webrtc/pair",{code:Q});h.current=q.token,localStorage.setItem(sc,q.token),g.current&&localStorage.setItem(`${wm}${q.token}`,g.current),i("ready")}catch(q){const te=q?.message||"Pairing failed";u(te),R()}},[b]);C.useEffect(()=>{const L=h.current,Q=new URLSearchParams(window.location.search),q=Q.get("code"),te=Q.get("agentId");if(te&&(g.current=te),q&&q.length===qn&&!L){j(q);return}if(!L){m.current[0]?.focus();return}if(!te){const se=localStorage.getItem(`${wm}${L}`);se&&(g.current=se)}fetch("/api/webrtc/validate",{headers:{Authorization:`Bearer ${L}`}}).then(se=>se.json()).then(se=>{se.valid?i("ready"):(localStorage.removeItem(sc),h.current="",q&&q.length===qn?j(q):m.current[0]?.focus())}).catch(()=>{m.current[0]?.focus()})},[]);const A=(L,Q)=>{const q=Q.replace(/\D/g,"").slice(0,1),te=[...d];te[L]=q,y(te),q&&L<qn-1&&m.current[L+1]?.focus(),q&&te.every(se=>se!=="")&&j(te.join(""))},k=(L,Q)=>{Q.key==="Backspace"&&!d[L]&&L>0&&m.current[L-1]?.focus()},O=L=>{L.preventDefault();const Q=(L.clipboardData.getData("text")||"").replace(/\D/g,"").slice(0,qn),q=[...d];for(let te=0;te<Q.length;te++)q[te]=Q[te];y(q),Q.length===qn?j(Q):Q.length>0&&m.current[Math.min(Q.length,qn-1)]?.focus()},_=C.useCallback(()=>{v.current&&(v.current.close(),v.current=null),S.current&&(S.current.getTracks().forEach(L=>L.stop()),S.current=null)},[]),G=C.useCallback(async()=>{f(""),i("connecting");try{let L;try{L=await navigator.mediaDevices.getUserMedia({audio:!0})}catch{f("Microphone access denied. Please allow microphone access and try again."),i("ready");return}S.current=L;const Q=new RTCPeerConnection({iceServers:[{urls:"stun:stun.l.google.com:19302"}]});v.current=Q,L.getTracks().forEach(pe=>{Q.addTrack(pe,L)}),Q.ontrack=pe=>{const W=new Audio;W.srcObject=pe.streams[0],W.play().catch(()=>{})},Q.oniceconnectionstatechange=()=>{(Q.iceConnectionState==="disconnected"||Q.iceConnectionState==="failed")&&(console.log("[Call] ICE connection state:",Q.iceConnectionState),_(),i("ready"))};const q=await Q.createOffer();await Q.setLocalDescription(q),await new Promise(pe=>{if(Q.iceGatheringState==="complete"){pe();return}const W=()=>{Q.iceGatheringState==="complete"&&(Q.removeEventListener("icegatheringstatechange",W),pe())};Q.addEventListener("icegatheringstatechange",W),setTimeout(pe,5e3)});const te=g.current?`&agentId=${encodeURIComponent(g.current)}`:"",se=`/api/voice/offer?token=${encodeURIComponent(h.current)}${te}`,ae=await fetch(se,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({sdp:Q.localDescription?.sdp,type:Q.localDescription?.type})});if(!ae.ok)throw new Error(`Signaling failed: ${ae.status}`);const ue=await ae.json();await Q.setRemoteDescription(new RTCSessionDescription(ue)),i("active")}catch(L){const Q=L instanceof Error?L.message:"Connection failed";f(`Connection failed: ${Q}`),_(),i("ready")}},[_]),ne=C.useCallback(()=>{_(),i("ready")},[_]);return p.jsxs("div",{className:"call-container",children:[p.jsx("h1",{children:"Claude Voice"}),p.jsx("p",{className:"subtitle",children:"Enter the pairing code shown on the dashboard"}),l==="pairing"&&p.jsxs("div",{className:"call-state",children:[p.jsx("div",{className:"pin-inputs",children:d.map((L,Q)=>p.jsx("input",{ref:q=>{m.current[Q]=q},type:"text",inputMode:"numeric",maxLength:1,value:L,onChange:q=>A(Q,q.target.value),onKeyDown:q=>k(Q,q),onPaste:Q===0?O:void 0},Q))}),p.jsx("button",{className:"btn btn-pair",onClick:()=>j(),children:"Pair Device"}),p.jsx("div",{className:"error-msg",children:r})]}),l==="ready"&&p.jsxs("div",{className:"call-state",children:[p.jsx("p",{className:"status-msg",style:{marginBottom:24},children:"Device paired. Ready to call."}),p.jsx("button",{className:"btn btn-call",onClick:G,children:"Start Call"}),p.jsx("div",{className:"error-msg",children:c})]}),l==="connecting"&&p.jsx("div",{className:"call-state",children:p.jsx("p",{className:"status-msg",children:"Connecting..."})}),l==="active"&&p.jsxs("div",{className:"call-state",children:[p.jsx("div",{className:"pulse-ring"}),p.jsx("div",{className:"call-label",children:"Call in progress"}),p.jsx("button",{className:"btn btn-hangup",onClick:ne,children:"Hang Up"})]})]})}function jb(l,i){const r={};return(l[l.length-1]===""?[...l,""]:l).join((r.padRight?" ":"")+","+(r.padLeft===!1?"":" ")).trim()}const Ab=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,zb=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Rb={};function jm(l,i){return(Rb.jsx?zb:Ab).test(l)}const Nb=/[ \t\n\f\r]/g;function kb(l){return typeof l=="object"?l.type==="text"?Am(l.value):!1:Am(l)}function Am(l){return l.replace(Nb,"")===""}class Qi{constructor(i,r,u){this.normal=r,this.property=i,u&&(this.space=u)}}Qi.prototype.normal={};Qi.prototype.property={};Qi.prototype.space=void 0;function Pg(l,i){const r={},u={};for(const c of l)Object.assign(r,c.property),Object.assign(u,c.normal);return new Qi(r,u,i)}function Rc(l){return l.toLowerCase()}class Dt{constructor(i,r){this.attribute=r,this.property=i}}Dt.prototype.attribute="";Dt.prototype.booleanish=!1;Dt.prototype.boolean=!1;Dt.prototype.commaOrSpaceSeparated=!1;Dt.prototype.commaSeparated=!1;Dt.prototype.defined=!1;Dt.prototype.mustUseProperty=!1;Dt.prototype.number=!1;Dt.prototype.overloadedBoolean=!1;Dt.prototype.property="";Dt.prototype.spaceSeparated=!1;Dt.prototype.space=void 0;let Mb=0;const Se=Ul(),ot=Ul(),Nc=Ul(),le=Ul(),Qe=Ul(),ka=Ul(),It=Ul();function Ul(){return 2**++Mb}const kc=Object.freeze(Object.defineProperty({__proto__:null,boolean:Se,booleanish:ot,commaOrSpaceSeparated:It,commaSeparated:ka,number:le,overloadedBoolean:Nc,spaceSeparated:Qe},Symbol.toStringTag,{value:"Module"})),cc=Object.keys(kc);class Zc extends Dt{constructor(i,r,u,c){let f=-1;if(super(i,r),zm(this,"space",c),typeof u=="number")for(;++f<cc.length;){const d=cc[f];zm(this,cc[f],(u&kc[d])===kc[d])}}}Zc.prototype.defined=!0;function zm(l,i,r){r&&(l[i]=r)}function Da(l){const i={},r={};for(const[u,c]of Object.entries(l.properties)){const f=new Zc(u,l.transform(l.attributes||{},u),c,l.space);l.mustUseProperty&&l.mustUseProperty.includes(u)&&(f.mustUseProperty=!0),i[u]=f,r[Rc(u)]=u,r[Rc(f.attribute)]=u}return new Qi(i,r,l.space)}const $g=Da({properties:{ariaActiveDescendant:null,ariaAtomic:ot,ariaAutoComplete:null,ariaBusy:ot,ariaChecked:ot,ariaColCount:le,ariaColIndex:le,ariaColSpan:le,ariaControls:Qe,ariaCurrent:null,ariaDescribedBy:Qe,ariaDetails:null,ariaDisabled:ot,ariaDropEffect:Qe,ariaErrorMessage:null,ariaExpanded:ot,ariaFlowTo:Qe,ariaGrabbed:ot,ariaHasPopup:null,ariaHidden:ot,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:Qe,ariaLevel:le,ariaLive:null,ariaModal:ot,ariaMultiLine:ot,ariaMultiSelectable:ot,ariaOrientation:null,ariaOwns:Qe,ariaPlaceholder:null,ariaPosInSet:le,ariaPressed:ot,ariaReadOnly:ot,ariaRelevant:null,ariaRequired:ot,ariaRoleDescription:Qe,ariaRowCount:le,ariaRowIndex:le,ariaRowSpan:le,ariaSelected:ot,ariaSetSize:le,ariaSort:null,ariaValueMax:le,ariaValueMin:le,ariaValueNow:le,ariaValueText:null,role:null},transform(l,i){return i==="role"?i:"aria-"+i.slice(4).toLowerCase()}});function Wg(l,i){return i in l?l[i]:i}function ey(l,i){return Wg(l,i.toLowerCase())}const _b=Da({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:ka,acceptCharset:Qe,accessKey:Qe,action:null,allow:null,allowFullScreen:Se,allowPaymentRequest:Se,allowUserMedia:Se,alt:null,as:null,async:Se,autoCapitalize:null,autoComplete:Qe,autoFocus:Se,autoPlay:Se,blocking:Qe,capture:null,charSet:null,checked:Se,cite:null,className:Qe,cols:le,colSpan:null,content:null,contentEditable:ot,controls:Se,controlsList:Qe,coords:le|ka,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Se,defer:Se,dir:null,dirName:null,disabled:Se,download:Nc,draggable:ot,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Se,formTarget:null,headers:Qe,height:le,hidden:Nc,high:le,href:null,hrefLang:null,htmlFor:Qe,httpEquiv:Qe,id:null,imageSizes:null,imageSrcSet:null,inert:Se,inputMode:null,integrity:null,is:null,isMap:Se,itemId:null,itemProp:Qe,itemRef:Qe,itemScope:Se,itemType:Qe,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Se,low:le,manifest:null,max:null,maxLength:le,media:null,method:null,min:null,minLength:le,multiple:Se,muted:Se,name:null,nonce:null,noModule:Se,noValidate:Se,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:Se,optimum:le,pattern:null,ping:Qe,placeholder:null,playsInline:Se,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Se,referrerPolicy:null,rel:Qe,required:Se,reversed:Se,rows:le,rowSpan:le,sandbox:Qe,scope:null,scoped:Se,seamless:Se,selected:Se,shadowRootClonable:Se,shadowRootDelegatesFocus:Se,shadowRootMode:null,shape:null,size:le,sizes:null,slot:null,span:le,spellCheck:ot,src:null,srcDoc:null,srcLang:null,srcSet:null,start:le,step:null,style:null,tabIndex:le,target:null,title:null,translate:null,type:null,typeMustMatch:Se,useMap:null,value:ot,width:le,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:Qe,axis:null,background:null,bgColor:null,border:le,borderColor:null,bottomMargin:le,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:Se,declare:Se,event:null,face:null,frame:null,frameBorder:null,hSpace:le,leftMargin:le,link:null,longDesc:null,lowSrc:null,marginHeight:le,marginWidth:le,noResize:Se,noHref:Se,noShade:Se,noWrap:Se,object:null,profile:null,prompt:null,rev:null,rightMargin:le,rules:null,scheme:null,scrolling:ot,standby:null,summary:null,text:null,topMargin:le,valueType:null,version:null,vAlign:null,vLink:null,vSpace:le,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:Se,disableRemotePlayback:Se,prefix:null,property:null,results:le,security:null,unselectable:null},space:"html",transform:ey}),Ob=Da({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:It,accentHeight:le,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:le,amplitude:le,arabicForm:null,ascent:le,attributeName:null,attributeType:null,azimuth:le,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:le,by:null,calcMode:null,capHeight:le,className:Qe,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:le,diffuseConstant:le,direction:null,display:null,dur:null,divisor:le,dominantBaseline:null,download:Se,dx:null,dy:null,edgeMode:null,editable:null,elevation:le,enableBackground:null,end:null,event:null,exponent:le,externalResourcesRequired:null,fill:null,fillOpacity:le,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:ka,g2:ka,glyphName:ka,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:le,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:le,horizOriginX:le,horizOriginY:le,id:null,ideographic:le,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:le,k:le,k1:le,k2:le,k3:le,k4:le,kernelMatrix:It,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:le,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:le,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:le,overlineThickness:le,paintOrder:null,panose1:null,path:null,pathLength:le,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:Qe,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:le,pointsAtY:le,pointsAtZ:le,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:It,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:It,rev:It,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:It,requiredFeatures:It,requiredFonts:It,requiredFormats:It,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:le,specularExponent:le,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:le,strikethroughThickness:le,string:null,stroke:null,strokeDashArray:It,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:le,strokeOpacity:le,strokeWidth:null,style:null,surfaceScale:le,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:It,tabIndex:le,tableValues:null,target:null,targetX:le,targetY:le,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:It,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:le,underlineThickness:le,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:le,values:null,vAlphabetic:le,vMathematical:le,vectorEffect:null,vHanging:le,vIdeographic:le,version:null,vertAdvY:le,vertOriginX:le,vertOriginY:le,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:le,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:Wg}),ty=Da({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(l,i){return"xlink:"+i.slice(5).toLowerCase()}}),ny=Da({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:ey}),ly=Da({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(l,i){return"xml:"+i.slice(3).toLowerCase()}}),Db={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"},Lb=/[A-Z]/g,Rm=/-[a-z]/g,Bb=/^data[-\w.:]+$/i;function Ub(l,i){const r=Rc(i);let u=i,c=Dt;if(r in l.normal)return l.property[l.normal[r]];if(r.length>4&&r.slice(0,4)==="data"&&Bb.test(i)){if(i.charAt(4)==="-"){const f=i.slice(5).replace(Rm,qb);u="data"+f.charAt(0).toUpperCase()+f.slice(1)}else{const f=i.slice(4);if(!Rm.test(f)){let d=f.replace(Lb,Hb);d.charAt(0)!=="-"&&(d="-"+d),i="data"+d}}c=Zc}return new c(u,i)}function Hb(l){return"-"+l.toLowerCase()}function qb(l){return l.charAt(1).toUpperCase()}const Yb=Pg([$g,_b,ty,ny,ly],"html"),Kc=Pg([$g,Ob,ty,ny,ly],"svg");function Vb(l){return l.join(" ").trim()}var za={},fc,Nm;function Gb(){if(Nm)return fc;Nm=1;var l=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,i=/\n/g,r=/^\s*/,u=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,c=/^:\s*/,f=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,d=/^[;\s]*/,y=/^\s+|\s+$/g,m=`
12
+ `,h="/",g="*",v="",S="comment",b="declaration";function R(A,k){if(typeof A!="string")throw new TypeError("First argument must be a string");if(!A)return[];k=k||{};var O=1,_=1;function G(W){var P=W.match(i);P&&(O+=P.length);var B=W.lastIndexOf(m);_=~B?W.length-B:_+W.length}function ne(){var W={line:O,column:_};return function(P){return P.position=new L(W),te(),P}}function L(W){this.start=W,this.end={line:O,column:_},this.source=k.source}L.prototype.content=A;function Q(W){var P=new Error(k.source+":"+O+":"+_+": "+W);if(P.reason=W,P.filename=k.source,P.line=O,P.column=_,P.source=A,!k.silent)throw P}function q(W){var P=W.exec(A);if(P){var B=P[0];return G(B),A=A.slice(B.length),P}}function te(){q(r)}function se(W){var P;for(W=W||[];P=ae();)P!==!1&&W.push(P);return W}function ae(){var W=ne();if(!(h!=A.charAt(0)||g!=A.charAt(1))){for(var P=2;v!=A.charAt(P)&&(g!=A.charAt(P)||h!=A.charAt(P+1));)++P;if(P+=2,v===A.charAt(P-1))return Q("End of comment missing");var B=A.slice(2,P-2);return _+=2,G(B),A=A.slice(P),_+=2,W({type:S,comment:B})}}function ue(){var W=ne(),P=q(u);if(P){if(ae(),!q(c))return Q("property missing ':'");var B=q(f),ee=W({type:b,property:j(P[0].replace(l,v)),value:B?j(B[0].replace(l,v)):v});return q(d),ee}}function pe(){var W=[];se(W);for(var P;P=ue();)P!==!1&&(W.push(P),se(W));return W}return te(),pe()}function j(A){return A?A.replace(y,v):v}return fc=R,fc}var km;function Ib(){if(km)return za;km=1;var l=za&&za.__importDefault||function(u){return u&&u.__esModule?u:{default:u}};Object.defineProperty(za,"__esModule",{value:!0}),za.default=r;const i=l(Gb());function r(u,c){let f=null;if(!u||typeof u!="string")return f;const d=(0,i.default)(u),y=typeof c=="function";return d.forEach(m=>{if(m.type!=="declaration")return;const{property:h,value:g}=m;y?c(h,g,m):g&&(f=f||{},f[h]=g)}),f}return za}var _i={},Mm;function Qb(){if(Mm)return _i;Mm=1,Object.defineProperty(_i,"__esModule",{value:!0}),_i.camelCase=void 0;var l=/^--[a-zA-Z0-9_-]+$/,i=/-([a-z])/g,r=/^[^-]+$/,u=/^-(webkit|moz|ms|o|khtml)-/,c=/^-(ms)-/,f=function(h){return!h||r.test(h)||l.test(h)},d=function(h,g){return g.toUpperCase()},y=function(h,g){return"".concat(g,"-")},m=function(h,g){return g===void 0&&(g={}),f(h)?h:(h=h.toLowerCase(),g.reactCompat?h=h.replace(c,y):h=h.replace(u,y),h.replace(i,d))};return _i.camelCase=m,_i}var Oi,_m;function Xb(){if(_m)return Oi;_m=1;var l=Oi&&Oi.__importDefault||function(c){return c&&c.__esModule?c:{default:c}},i=l(Ib()),r=Qb();function u(c,f){var d={};return!c||typeof c!="string"||(0,i.default)(c,function(y,m){y&&m&&(d[(0,r.camelCase)(y,f)]=m)}),d}return u.default=u,Oi=u,Oi}var Zb=Xb();const Kb=Hc(Zb),ay=iy("end"),Fc=iy("start");function iy(l){return i;function i(r){const u=r&&r.position&&r.position[l]||{};if(typeof u.line=="number"&&u.line>0&&typeof u.column=="number"&&u.column>0)return{line:u.line,column:u.column,offset:typeof u.offset=="number"&&u.offset>-1?u.offset:void 0}}}function Fb(l){const i=Fc(l),r=ay(l);if(i&&r)return{start:i,end:r}}function Bi(l){return!l||typeof l!="object"?"":"position"in l||"type"in l?Om(l.position):"start"in l||"end"in l?Om(l):"line"in l||"column"in l?Mc(l):""}function Mc(l){return Dm(l&&l.line)+":"+Dm(l&&l.column)}function Om(l){return Mc(l&&l.start)+"-"+Mc(l&&l.end)}function Dm(l){return l&&typeof l=="number"?l:1}class bt extends Error{constructor(i,r,u){super(),typeof r=="string"&&(u=r,r=void 0);let c="",f={},d=!1;if(r&&("line"in r&&"column"in r?f={place:r}:"start"in r&&"end"in r?f={place:r}:"type"in r?f={ancestors:[r],place:r.position}:f={...r}),typeof i=="string"?c=i:!f.cause&&i&&(d=!0,c=i.message,f.cause=i),!f.ruleId&&!f.source&&typeof u=="string"){const m=u.indexOf(":");m===-1?f.ruleId=u:(f.source=u.slice(0,m),f.ruleId=u.slice(m+1))}if(!f.place&&f.ancestors&&f.ancestors){const m=f.ancestors[f.ancestors.length-1];m&&(f.place=m.position)}const y=f.place&&"start"in f.place?f.place.start:f.place;this.ancestors=f.ancestors||void 0,this.cause=f.cause||void 0,this.column=y?y.column:void 0,this.fatal=void 0,this.file="",this.message=c,this.line=y?y.line:void 0,this.name=Bi(f.place)||"1:1",this.place=f.place||void 0,this.reason=this.message,this.ruleId=f.ruleId||void 0,this.source=f.source||void 0,this.stack=d&&f.cause&&typeof f.cause.stack=="string"?f.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}bt.prototype.file="";bt.prototype.name="";bt.prototype.reason="";bt.prototype.message="";bt.prototype.stack="";bt.prototype.column=void 0;bt.prototype.line=void 0;bt.prototype.ancestors=void 0;bt.prototype.cause=void 0;bt.prototype.fatal=void 0;bt.prototype.place=void 0;bt.prototype.ruleId=void 0;bt.prototype.source=void 0;const Jc={}.hasOwnProperty,Jb=new Map,Pb=/[A-Z]/g,$b=new Set(["table","tbody","thead","tfoot","tr"]),Wb=new Set(["td","th"]),ry="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function eS(l,i){if(!i||i.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const r=i.filePath||void 0;let u;if(i.development){if(typeof i.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");u=oS(r,i.jsxDEV)}else{if(typeof i.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof i.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");u=uS(r,i.jsx,i.jsxs)}const c={Fragment:i.Fragment,ancestors:[],components:i.components||{},create:u,elementAttributeNameCase:i.elementAttributeNameCase||"react",evaluater:i.createEvaluater?i.createEvaluater():void 0,filePath:r,ignoreInvalidStyle:i.ignoreInvalidStyle||!1,passKeys:i.passKeys!==!1,passNode:i.passNode||!1,schema:i.space==="svg"?Kc:Yb,stylePropertyNameCase:i.stylePropertyNameCase||"dom",tableCellAlignToStyle:i.tableCellAlignToStyle!==!1},f=uy(c,l,void 0);return f&&typeof f!="string"?f:c.create(l,c.Fragment,{children:f||void 0},void 0)}function uy(l,i,r){if(i.type==="element")return tS(l,i,r);if(i.type==="mdxFlowExpression"||i.type==="mdxTextExpression")return nS(l,i);if(i.type==="mdxJsxFlowElement"||i.type==="mdxJsxTextElement")return aS(l,i,r);if(i.type==="mdxjsEsm")return lS(l,i);if(i.type==="root")return iS(l,i,r);if(i.type==="text")return rS(l,i)}function tS(l,i,r){const u=l.schema;let c=u;i.tagName.toLowerCase()==="svg"&&u.space==="html"&&(c=Kc,l.schema=c),l.ancestors.push(i);const f=sy(l,i.tagName,!1),d=sS(l,i);let y=$c(l,i);return $b.has(i.tagName)&&(y=y.filter(function(m){return typeof m=="string"?!kb(m):!0})),oy(l,d,f,i),Pc(d,y),l.ancestors.pop(),l.schema=u,l.create(i,f,d,r)}function nS(l,i){if(i.data&&i.data.estree&&l.evaluater){const u=i.data.estree.body[0];return u.type,l.evaluater.evaluateExpression(u.expression)}Yi(l,i.position)}function lS(l,i){if(i.data&&i.data.estree&&l.evaluater)return l.evaluater.evaluateProgram(i.data.estree);Yi(l,i.position)}function aS(l,i,r){const u=l.schema;let c=u;i.name==="svg"&&u.space==="html"&&(c=Kc,l.schema=c),l.ancestors.push(i);const f=i.name===null?l.Fragment:sy(l,i.name,!0),d=cS(l,i),y=$c(l,i);return oy(l,d,f,i),Pc(d,y),l.ancestors.pop(),l.schema=u,l.create(i,f,d,r)}function iS(l,i,r){const u={};return Pc(u,$c(l,i)),l.create(i,l.Fragment,u,r)}function rS(l,i){return i.value}function oy(l,i,r,u){typeof r!="string"&&r!==l.Fragment&&l.passNode&&(i.node=u)}function Pc(l,i){if(i.length>0){const r=i.length>1?i:i[0];r&&(l.children=r)}}function uS(l,i,r){return u;function u(c,f,d,y){const h=Array.isArray(d.children)?r:i;return y?h(f,d,y):h(f,d)}}function oS(l,i){return r;function r(u,c,f,d){const y=Array.isArray(f.children),m=Fc(u);return i(c,f,d,y,{columnNumber:m?m.column-1:void 0,fileName:l,lineNumber:m?m.line:void 0},void 0)}}function sS(l,i){const r={};let u,c;for(c in i.properties)if(c!=="children"&&Jc.call(i.properties,c)){const f=fS(l,c,i.properties[c]);if(f){const[d,y]=f;l.tableCellAlignToStyle&&d==="align"&&typeof y=="string"&&Wb.has(i.tagName)?u=y:r[d]=y}}if(u){const f=r.style||(r.style={});f[l.stylePropertyNameCase==="css"?"text-align":"textAlign"]=u}return r}function cS(l,i){const r={};for(const u of i.attributes)if(u.type==="mdxJsxExpressionAttribute")if(u.data&&u.data.estree&&l.evaluater){const f=u.data.estree.body[0];f.type;const d=f.expression;d.type;const y=d.properties[0];y.type,Object.assign(r,l.evaluater.evaluateExpression(y.argument))}else Yi(l,i.position);else{const c=u.name;let f;if(u.value&&typeof u.value=="object")if(u.value.data&&u.value.data.estree&&l.evaluater){const y=u.value.data.estree.body[0];y.type,f=l.evaluater.evaluateExpression(y.expression)}else Yi(l,i.position);else f=u.value===null?!0:u.value;r[c]=f}return r}function $c(l,i){const r=[];let u=-1;const c=l.passKeys?new Map:Jb;for(;++u<i.children.length;){const f=i.children[u];let d;if(l.passKeys){const m=f.type==="element"?f.tagName:f.type==="mdxJsxFlowElement"||f.type==="mdxJsxTextElement"?f.name:void 0;if(m){const h=c.get(m)||0;d=m+"-"+h,c.set(m,h+1)}}const y=uy(l,f,d);y!==void 0&&r.push(y)}return r}function fS(l,i,r){const u=Ub(l.schema,i);if(!(r==null||typeof r=="number"&&Number.isNaN(r))){if(Array.isArray(r)&&(r=u.commaSeparated?jb(r):Vb(r)),u.property==="style"){let c=typeof r=="object"?r:dS(l,String(r));return l.stylePropertyNameCase==="css"&&(c=hS(c)),["style",c]}return[l.elementAttributeNameCase==="react"&&u.space?Db[u.property]||u.property:u.attribute,r]}}function dS(l,i){try{return Kb(i,{reactCompat:!0})}catch(r){if(l.ignoreInvalidStyle)return{};const u=r,c=new bt("Cannot parse `style` attribute",{ancestors:l.ancestors,cause:u,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw c.file=l.filePath||void 0,c.url=ry+"#cannot-parse-style-attribute",c}}function sy(l,i,r){let u;if(!r)u={type:"Literal",value:i};else if(i.includes(".")){const c=i.split(".");let f=-1,d;for(;++f<c.length;){const y=jm(c[f])?{type:"Identifier",name:c[f]}:{type:"Literal",value:c[f]};d=d?{type:"MemberExpression",object:d,property:y,computed:!!(f&&y.type==="Literal"),optional:!1}:y}u=d}else u=jm(i)&&!/^[a-z]/.test(i)?{type:"Identifier",name:i}:{type:"Literal",value:i};if(u.type==="Literal"){const c=u.value;return Jc.call(l.components,c)?l.components[c]:c}if(l.evaluater)return l.evaluater.evaluateExpression(u);Yi(l)}function Yi(l,i){const r=new bt("Cannot handle MDX estrees without `createEvaluater`",{ancestors:l.ancestors,place:i,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw r.file=l.filePath||void 0,r.url=ry+"#cannot-handle-mdx-estrees-without-createevaluater",r}function hS(l){const i={};let r;for(r in l)Jc.call(l,r)&&(i[pS(r)]=l[r]);return i}function pS(l){let i=l.replace(Pb,mS);return i.slice(0,3)==="ms-"&&(i="-"+i),i}function mS(l){return"-"+l.toLowerCase()}const dc={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"]},gS={};function yS(l,i){const r=gS,u=typeof r.includeImageAlt=="boolean"?r.includeImageAlt:!0,c=typeof r.includeHtml=="boolean"?r.includeHtml:!0;return cy(l,u,c)}function cy(l,i,r){if(vS(l)){if("value"in l)return l.type==="html"&&!r?"":l.value;if(i&&"alt"in l&&l.alt)return l.alt;if("children"in l)return Lm(l.children,i,r)}return Array.isArray(l)?Lm(l,i,r):""}function Lm(l,i,r){const u=[];let c=-1;for(;++c<l.length;)u[c]=cy(l[c],i,r);return u.join("")}function vS(l){return!!(l&&typeof l=="object")}const Bm=document.createElement("i");function Wc(l){const i="&"+l+";";Bm.innerHTML=i;const r=Bm.textContent;return r.charCodeAt(r.length-1)===59&&l!=="semi"||r===i?!1:r}function vn(l,i,r,u){const c=l.length;let f=0,d;if(i<0?i=-i>c?0:c+i:i=i>c?c:i,r=r>0?r:0,u.length<1e4)d=Array.from(u),d.unshift(i,r),l.splice(...d);else for(r&&l.splice(i,r);f<u.length;)d=u.slice(f,f+1e4),d.unshift(i,0),l.splice(...d),f+=1e4,i+=1e4}function ln(l,i){return l.length>0?(vn(l,l.length,0,i),l):i}const Um={}.hasOwnProperty;function xS(l){const i={};let r=-1;for(;++r<l.length;)bS(i,l[r]);return i}function bS(l,i){let r;for(r in i){const c=(Um.call(l,r)?l[r]:void 0)||(l[r]={}),f=i[r];let d;if(f)for(d in f){Um.call(c,d)||(c[d]=[]);const y=f[d];SS(c[d],Array.isArray(y)?y:y?[y]:[])}}}function SS(l,i){let r=-1;const u=[];for(;++r<i.length;)(i[r].add==="after"?l:u).push(i[r]);vn(l,0,0,u)}function fy(l,i){const r=Number.parseInt(l,i);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 Ma(l){return l.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const yn=vl(/[A-Za-z]/),Qt=vl(/[\dA-Za-z]/),ES=vl(/[#-'*+\--9=?A-Z^-~]/);function _c(l){return l!==null&&(l<32||l===127)}const Oc=vl(/\d/),CS=vl(/[\dA-Fa-f]/),TS=vl(/[!-/:-@[-`{-~]/);function ye(l){return l!==null&&l<-2}function Ot(l){return l!==null&&(l<0||l===32)}function De(l){return l===-2||l===-1||l===32}const wS=vl(new RegExp("\\p{P}|\\p{S}","u")),jS=vl(/\s/);function vl(l){return i;function i(r){return r!==null&&r>-1&&l.test(String.fromCharCode(r))}}function La(l){const i=[];let r=-1,u=0,c=0;for(;++r<l.length;){const f=l.charCodeAt(r);let d="";if(f===37&&Qt(l.charCodeAt(r+1))&&Qt(l.charCodeAt(r+2)))c=2;else if(f<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(f))||(d=String.fromCharCode(f));else if(f>55295&&f<57344){const y=l.charCodeAt(r+1);f<56320&&y>56319&&y<57344?(d=String.fromCharCode(f,y),c=1):d="�"}else d=String.fromCharCode(f);d&&(i.push(l.slice(u,r),encodeURIComponent(d)),u=r+c+1,d=""),c&&(r+=c,c=0)}return i.join("")+l.slice(u)}function Xe(l,i,r,u){const c=u?u-1:Number.POSITIVE_INFINITY;let f=0;return d;function d(m){return De(m)?(l.enter(r),y(m)):i(m)}function y(m){return De(m)&&f++<c?(l.consume(m),y):(l.exit(r),i(m))}}const AS={tokenize:zS};function zS(l){const i=l.attempt(this.parser.constructs.contentInitial,u,c);let r;return i;function u(y){if(y===null){l.consume(y);return}return l.enter("lineEnding"),l.consume(y),l.exit("lineEnding"),Xe(l,i,"linePrefix")}function c(y){return l.enter("paragraph"),f(y)}function f(y){const m=l.enter("chunkText",{contentType:"text",previous:r});return r&&(r.next=m),r=m,d(y)}function d(y){if(y===null){l.exit("chunkText"),l.exit("paragraph"),l.consume(y);return}return ye(y)?(l.consume(y),l.exit("chunkText"),f):(l.consume(y),d)}}const RS={tokenize:NS},Hm={tokenize:kS};function NS(l){const i=this,r=[];let u=0,c,f,d;return y;function y(_){if(u<r.length){const G=r[u];return i.containerState=G[1],l.attempt(G[0].continuation,m,h)(_)}return h(_)}function m(_){if(u++,i.containerState._closeFlow){i.containerState._closeFlow=void 0,c&&O();const G=i.events.length;let ne=G,L;for(;ne--;)if(i.events[ne][0]==="exit"&&i.events[ne][1].type==="chunkFlow"){L=i.events[ne][1].end;break}k(u);let Q=G;for(;Q<i.events.length;)i.events[Q][1].end={...L},Q++;return vn(i.events,ne+1,0,i.events.slice(G)),i.events.length=Q,h(_)}return y(_)}function h(_){if(u===r.length){if(!c)return S(_);if(c.currentConstruct&&c.currentConstruct.concrete)return R(_);i.interrupt=!!(c.currentConstruct&&!c._gfmTableDynamicInterruptHack)}return i.containerState={},l.check(Hm,g,v)(_)}function g(_){return c&&O(),k(u),S(_)}function v(_){return i.parser.lazy[i.now().line]=u!==r.length,d=i.now().offset,R(_)}function S(_){return i.containerState={},l.attempt(Hm,b,R)(_)}function b(_){return u++,r.push([i.currentConstruct,i.containerState]),S(_)}function R(_){if(_===null){c&&O(),k(0),l.consume(_);return}return c=c||i.parser.flow(i.now()),l.enter("chunkFlow",{_tokenizer:c,contentType:"flow",previous:f}),j(_)}function j(_){if(_===null){A(l.exit("chunkFlow"),!0),k(0),l.consume(_);return}return ye(_)?(l.consume(_),A(l.exit("chunkFlow")),u=0,i.interrupt=void 0,y):(l.consume(_),j)}function A(_,G){const ne=i.sliceStream(_);if(G&&ne.push(null),_.previous=f,f&&(f.next=_),f=_,c.defineSkip(_.start),c.write(ne),i.parser.lazy[_.start.line]){let L=c.events.length;for(;L--;)if(c.events[L][1].start.offset<d&&(!c.events[L][1].end||c.events[L][1].end.offset>d))return;const Q=i.events.length;let q=Q,te,se;for(;q--;)if(i.events[q][0]==="exit"&&i.events[q][1].type==="chunkFlow"){if(te){se=i.events[q][1].end;break}te=!0}for(k(u),L=Q;L<i.events.length;)i.events[L][1].end={...se},L++;vn(i.events,q+1,0,i.events.slice(Q)),i.events.length=L}}function k(_){let G=r.length;for(;G-- >_;){const ne=r[G];i.containerState=ne[1],ne[0].exit.call(i,l)}r.length=_}function O(){c.write([null]),f=void 0,c=void 0,i.containerState._closeFlow=void 0}}function kS(l,i,r){return Xe(l,l.attempt(this.parser.constructs.document,i,r),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function qm(l){if(l===null||Ot(l)||jS(l))return 1;if(wS(l))return 2}function ef(l,i,r){const u=[];let c=-1;for(;++c<l.length;){const f=l[c].resolveAll;f&&!u.includes(f)&&(i=f(i,r),u.push(f))}return i}const Dc={name:"attention",resolveAll:MS,tokenize:_S};function MS(l,i){let r=-1,u,c,f,d,y,m,h,g;for(;++r<l.length;)if(l[r][0]==="enter"&&l[r][1].type==="attentionSequence"&&l[r][1]._close){for(u=r;u--;)if(l[u][0]==="exit"&&l[u][1].type==="attentionSequence"&&l[u][1]._open&&i.sliceSerialize(l[u][1]).charCodeAt(0)===i.sliceSerialize(l[r][1]).charCodeAt(0)){if((l[u][1]._close||l[r][1]._open)&&(l[r][1].end.offset-l[r][1].start.offset)%3&&!((l[u][1].end.offset-l[u][1].start.offset+l[r][1].end.offset-l[r][1].start.offset)%3))continue;m=l[u][1].end.offset-l[u][1].start.offset>1&&l[r][1].end.offset-l[r][1].start.offset>1?2:1;const v={...l[u][1].end},S={...l[r][1].start};Ym(v,-m),Ym(S,m),d={type:m>1?"strongSequence":"emphasisSequence",start:v,end:{...l[u][1].end}},y={type:m>1?"strongSequence":"emphasisSequence",start:{...l[r][1].start},end:S},f={type:m>1?"strongText":"emphasisText",start:{...l[u][1].end},end:{...l[r][1].start}},c={type:m>1?"strong":"emphasis",start:{...d.start},end:{...y.end}},l[u][1].end={...d.start},l[r][1].start={...y.end},h=[],l[u][1].end.offset-l[u][1].start.offset&&(h=ln(h,[["enter",l[u][1],i],["exit",l[u][1],i]])),h=ln(h,[["enter",c,i],["enter",d,i],["exit",d,i],["enter",f,i]]),h=ln(h,ef(i.parser.constructs.insideSpan.null,l.slice(u+1,r),i)),h=ln(h,[["exit",f,i],["enter",y,i],["exit",y,i],["exit",c,i]]),l[r][1].end.offset-l[r][1].start.offset?(g=2,h=ln(h,[["enter",l[r][1],i],["exit",l[r][1],i]])):g=0,vn(l,u-1,r-u+3,h),r=u+h.length-g-2;break}}for(r=-1;++r<l.length;)l[r][1].type==="attentionSequence"&&(l[r][1].type="data");return l}function _S(l,i){const r=this.parser.constructs.attentionMarkers.null,u=this.previous,c=qm(u);let f;return d;function d(m){return f=m,l.enter("attentionSequence"),y(m)}function y(m){if(m===f)return l.consume(m),y;const h=l.exit("attentionSequence"),g=qm(m),v=!g||g===2&&c||r.includes(m),S=!c||c===2&&g||r.includes(u);return h._open=!!(f===42?v:v&&(c||!S)),h._close=!!(f===42?S:S&&(g||!v)),i(m)}}function Ym(l,i){l.column+=i,l.offset+=i,l._bufferIndex+=i}const OS={name:"autolink",tokenize:DS};function DS(l,i,r){let u=0;return c;function c(b){return l.enter("autolink"),l.enter("autolinkMarker"),l.consume(b),l.exit("autolinkMarker"),l.enter("autolinkProtocol"),f}function f(b){return yn(b)?(l.consume(b),d):b===64?r(b):h(b)}function d(b){return b===43||b===45||b===46||Qt(b)?(u=1,y(b)):h(b)}function y(b){return b===58?(l.consume(b),u=0,m):(b===43||b===45||b===46||Qt(b))&&u++<32?(l.consume(b),y):(u=0,h(b))}function m(b){return b===62?(l.exit("autolinkProtocol"),l.enter("autolinkMarker"),l.consume(b),l.exit("autolinkMarker"),l.exit("autolink"),i):b===null||b===32||b===60||_c(b)?r(b):(l.consume(b),m)}function h(b){return b===64?(l.consume(b),g):ES(b)?(l.consume(b),h):r(b)}function g(b){return Qt(b)?v(b):r(b)}function v(b){return b===46?(l.consume(b),u=0,g):b===62?(l.exit("autolinkProtocol").type="autolinkEmail",l.enter("autolinkMarker"),l.consume(b),l.exit("autolinkMarker"),l.exit("autolink"),i):S(b)}function S(b){if((b===45||Qt(b))&&u++<63){const R=b===45?S:v;return l.consume(b),R}return r(b)}}const ku={partial:!0,tokenize:LS};function LS(l,i,r){return u;function u(f){return De(f)?Xe(l,c,"linePrefix")(f):c(f)}function c(f){return f===null||ye(f)?i(f):r(f)}}const dy={continuation:{tokenize:US},exit:HS,name:"blockQuote",tokenize:BS};function BS(l,i,r){const u=this;return c;function c(d){if(d===62){const y=u.containerState;return y.open||(l.enter("blockQuote",{_container:!0}),y.open=!0),l.enter("blockQuotePrefix"),l.enter("blockQuoteMarker"),l.consume(d),l.exit("blockQuoteMarker"),f}return r(d)}function f(d){return De(d)?(l.enter("blockQuotePrefixWhitespace"),l.consume(d),l.exit("blockQuotePrefixWhitespace"),l.exit("blockQuotePrefix"),i):(l.exit("blockQuotePrefix"),i(d))}}function US(l,i,r){const u=this;return c;function c(d){return De(d)?Xe(l,f,"linePrefix",u.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(d):f(d)}function f(d){return l.attempt(dy,i,r)(d)}}function HS(l){l.exit("blockQuote")}const hy={name:"characterEscape",tokenize:qS};function qS(l,i,r){return u;function u(f){return l.enter("characterEscape"),l.enter("escapeMarker"),l.consume(f),l.exit("escapeMarker"),c}function c(f){return TS(f)?(l.enter("characterEscapeValue"),l.consume(f),l.exit("characterEscapeValue"),l.exit("characterEscape"),i):r(f)}}const py={name:"characterReference",tokenize:YS};function YS(l,i,r){const u=this;let c=0,f,d;return y;function y(v){return l.enter("characterReference"),l.enter("characterReferenceMarker"),l.consume(v),l.exit("characterReferenceMarker"),m}function m(v){return v===35?(l.enter("characterReferenceMarkerNumeric"),l.consume(v),l.exit("characterReferenceMarkerNumeric"),h):(l.enter("characterReferenceValue"),f=31,d=Qt,g(v))}function h(v){return v===88||v===120?(l.enter("characterReferenceMarkerHexadecimal"),l.consume(v),l.exit("characterReferenceMarkerHexadecimal"),l.enter("characterReferenceValue"),f=6,d=CS,g):(l.enter("characterReferenceValue"),f=7,d=Oc,g(v))}function g(v){if(v===59&&c){const S=l.exit("characterReferenceValue");return d===Qt&&!Wc(u.sliceSerialize(S))?r(v):(l.enter("characterReferenceMarker"),l.consume(v),l.exit("characterReferenceMarker"),l.exit("characterReference"),i)}return d(v)&&c++<f?(l.consume(v),g):r(v)}}const Vm={partial:!0,tokenize:GS},Gm={concrete:!0,name:"codeFenced",tokenize:VS};function VS(l,i,r){const u=this,c={partial:!0,tokenize:ne};let f=0,d=0,y;return m;function m(L){return h(L)}function h(L){const Q=u.events[u.events.length-1];return f=Q&&Q[1].type==="linePrefix"?Q[2].sliceSerialize(Q[1],!0).length:0,y=L,l.enter("codeFenced"),l.enter("codeFencedFence"),l.enter("codeFencedFenceSequence"),g(L)}function g(L){return L===y?(d++,l.consume(L),g):d<3?r(L):(l.exit("codeFencedFenceSequence"),De(L)?Xe(l,v,"whitespace")(L):v(L))}function v(L){return L===null||ye(L)?(l.exit("codeFencedFence"),u.interrupt?i(L):l.check(Vm,j,G)(L)):(l.enter("codeFencedFenceInfo"),l.enter("chunkString",{contentType:"string"}),S(L))}function S(L){return L===null||ye(L)?(l.exit("chunkString"),l.exit("codeFencedFenceInfo"),v(L)):De(L)?(l.exit("chunkString"),l.exit("codeFencedFenceInfo"),Xe(l,b,"whitespace")(L)):L===96&&L===y?r(L):(l.consume(L),S)}function b(L){return L===null||ye(L)?v(L):(l.enter("codeFencedFenceMeta"),l.enter("chunkString",{contentType:"string"}),R(L))}function R(L){return L===null||ye(L)?(l.exit("chunkString"),l.exit("codeFencedFenceMeta"),v(L)):L===96&&L===y?r(L):(l.consume(L),R)}function j(L){return l.attempt(c,G,A)(L)}function A(L){return l.enter("lineEnding"),l.consume(L),l.exit("lineEnding"),k}function k(L){return f>0&&De(L)?Xe(l,O,"linePrefix",f+1)(L):O(L)}function O(L){return L===null||ye(L)?l.check(Vm,j,G)(L):(l.enter("codeFlowValue"),_(L))}function _(L){return L===null||ye(L)?(l.exit("codeFlowValue"),O(L)):(l.consume(L),_)}function G(L){return l.exit("codeFenced"),i(L)}function ne(L,Q,q){let te=0;return se;function se(P){return L.enter("lineEnding"),L.consume(P),L.exit("lineEnding"),ae}function ae(P){return L.enter("codeFencedFence"),De(P)?Xe(L,ue,"linePrefix",u.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(P):ue(P)}function ue(P){return P===y?(L.enter("codeFencedFenceSequence"),pe(P)):q(P)}function pe(P){return P===y?(te++,L.consume(P),pe):te>=d?(L.exit("codeFencedFenceSequence"),De(P)?Xe(L,W,"whitespace")(P):W(P)):q(P)}function W(P){return P===null||ye(P)?(L.exit("codeFencedFence"),Q(P)):q(P)}}}function GS(l,i,r){const u=this;return c;function c(d){return d===null?r(d):(l.enter("lineEnding"),l.consume(d),l.exit("lineEnding"),f)}function f(d){return u.parser.lazy[u.now().line]?r(d):i(d)}}const hc={name:"codeIndented",tokenize:QS},IS={partial:!0,tokenize:XS};function QS(l,i,r){const u=this;return c;function c(h){return l.enter("codeIndented"),Xe(l,f,"linePrefix",5)(h)}function f(h){const g=u.events[u.events.length-1];return g&&g[1].type==="linePrefix"&&g[2].sliceSerialize(g[1],!0).length>=4?d(h):r(h)}function d(h){return h===null?m(h):ye(h)?l.attempt(IS,d,m)(h):(l.enter("codeFlowValue"),y(h))}function y(h){return h===null||ye(h)?(l.exit("codeFlowValue"),d(h)):(l.consume(h),y)}function m(h){return l.exit("codeIndented"),i(h)}}function XS(l,i,r){const u=this;return c;function c(d){return u.parser.lazy[u.now().line]?r(d):ye(d)?(l.enter("lineEnding"),l.consume(d),l.exit("lineEnding"),c):Xe(l,f,"linePrefix",5)(d)}function f(d){const y=u.events[u.events.length-1];return y&&y[1].type==="linePrefix"&&y[2].sliceSerialize(y[1],!0).length>=4?i(d):ye(d)?c(d):r(d)}}const ZS={name:"codeText",previous:FS,resolve:KS,tokenize:JS};function KS(l){let i=l.length-4,r=3,u,c;if((l[r][1].type==="lineEnding"||l[r][1].type==="space")&&(l[i][1].type==="lineEnding"||l[i][1].type==="space")){for(u=r;++u<i;)if(l[u][1].type==="codeTextData"){l[r][1].type="codeTextPadding",l[i][1].type="codeTextPadding",r+=2,i-=2;break}}for(u=r-1,i++;++u<=i;)c===void 0?u!==i&&l[u][1].type!=="lineEnding"&&(c=u):(u===i||l[u][1].type==="lineEnding")&&(l[c][1].type="codeTextData",u!==c+2&&(l[c][1].end=l[u-1][1].end,l.splice(c+2,u-c-2),i-=u-c-2,u=c+2),c=void 0);return l}function FS(l){return l!==96||this.events[this.events.length-1][1].type==="characterEscape"}function JS(l,i,r){let u=0,c,f;return d;function d(v){return l.enter("codeText"),l.enter("codeTextSequence"),y(v)}function y(v){return v===96?(l.consume(v),u++,y):(l.exit("codeTextSequence"),m(v))}function m(v){return v===null?r(v):v===32?(l.enter("space"),l.consume(v),l.exit("space"),m):v===96?(f=l.enter("codeTextSequence"),c=0,g(v)):ye(v)?(l.enter("lineEnding"),l.consume(v),l.exit("lineEnding"),m):(l.enter("codeTextData"),h(v))}function h(v){return v===null||v===32||v===96||ye(v)?(l.exit("codeTextData"),m(v)):(l.consume(v),h)}function g(v){return v===96?(l.consume(v),c++,g):c===u?(l.exit("codeTextSequence"),l.exit("codeText"),i(v)):(f.type="codeTextData",h(v))}}class PS{constructor(i){this.left=i?[...i]:[],this.right=[]}get(i){if(i<0||i>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+i+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return i<this.left.length?this.left[i]:this.right[this.right.length-i+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(i,r){const u=r??Number.POSITIVE_INFINITY;return u<this.left.length?this.left.slice(i,u):i>this.left.length?this.right.slice(this.right.length-u+this.left.length,this.right.length-i+this.left.length).reverse():this.left.slice(i).concat(this.right.slice(this.right.length-u+this.left.length).reverse())}splice(i,r,u){const c=r||0;this.setCursor(Math.trunc(i));const f=this.right.splice(this.right.length-c,Number.POSITIVE_INFINITY);return u&&Di(this.left,u),f.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(i){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(i)}pushMany(i){this.setCursor(Number.POSITIVE_INFINITY),Di(this.left,i)}unshift(i){this.setCursor(0),this.right.push(i)}unshiftMany(i){this.setCursor(0),Di(this.right,i.reverse())}setCursor(i){if(!(i===this.left.length||i>this.left.length&&this.right.length===0||i<0&&this.left.length===0))if(i<this.left.length){const r=this.left.splice(i,Number.POSITIVE_INFINITY);Di(this.right,r.reverse())}else{const r=this.right.splice(this.left.length+this.right.length-i,Number.POSITIVE_INFINITY);Di(this.left,r.reverse())}}}function Di(l,i){let r=0;if(i.length<1e4)l.push(...i);else for(;r<i.length;)l.push(...i.slice(r,r+1e4)),r+=1e4}function my(l){const i={};let r=-1,u,c,f,d,y,m,h;const g=new PS(l);for(;++r<g.length;){for(;r in i;)r=i[r];if(u=g.get(r),r&&u[1].type==="chunkFlow"&&g.get(r-1)[1].type==="listItemPrefix"&&(m=u[1]._tokenizer.events,f=0,f<m.length&&m[f][1].type==="lineEndingBlank"&&(f+=2),f<m.length&&m[f][1].type==="content"))for(;++f<m.length&&m[f][1].type!=="content";)m[f][1].type==="chunkText"&&(m[f][1]._isInFirstContentOfListItem=!0,f++);if(u[0]==="enter")u[1].contentType&&(Object.assign(i,$S(g,r)),r=i[r],h=!0);else if(u[1]._container){for(f=r,c=void 0;f--;)if(d=g.get(f),d[1].type==="lineEnding"||d[1].type==="lineEndingBlank")d[0]==="enter"&&(c&&(g.get(c)[1].type="lineEndingBlank"),d[1].type="lineEnding",c=f);else if(!(d[1].type==="linePrefix"||d[1].type==="listItemIndent"))break;c&&(u[1].end={...g.get(c)[1].start},y=g.slice(c,r),y.unshift(u),g.splice(c,r-c+1,y))}}return vn(l,0,Number.POSITIVE_INFINITY,g.slice(0)),!h}function $S(l,i){const r=l.get(i)[1],u=l.get(i)[2];let c=i-1;const f=[];let d=r._tokenizer;d||(d=u.parser[r.contentType](r.start),r._contentTypeTextTrailing&&(d._contentTypeTextTrailing=!0));const y=d.events,m=[],h={};let g,v,S=-1,b=r,R=0,j=0;const A=[j];for(;b;){for(;l.get(++c)[1]!==b;);f.push(c),b._tokenizer||(g=u.sliceStream(b),b.next||g.push(null),v&&d.defineSkip(b.start),b._isInFirstContentOfListItem&&(d._gfmTasklistFirstContentOfListItem=!0),d.write(g),b._isInFirstContentOfListItem&&(d._gfmTasklistFirstContentOfListItem=void 0)),v=b,b=b.next}for(b=r;++S<y.length;)y[S][0]==="exit"&&y[S-1][0]==="enter"&&y[S][1].type===y[S-1][1].type&&y[S][1].start.line!==y[S][1].end.line&&(j=S+1,A.push(j),b._tokenizer=void 0,b.previous=void 0,b=b.next);for(d.events=[],b?(b._tokenizer=void 0,b.previous=void 0):A.pop(),S=A.length;S--;){const k=y.slice(A[S],A[S+1]),O=f.pop();m.push([O,O+k.length-1]),l.splice(O,2,k)}for(m.reverse(),S=-1;++S<m.length;)h[R+m[S][0]]=R+m[S][1],R+=m[S][1]-m[S][0]-1;return h}const WS={resolve:t2,tokenize:n2},e2={partial:!0,tokenize:l2};function t2(l){return my(l),l}function n2(l,i){let r;return u;function u(y){return l.enter("content"),r=l.enter("chunkContent",{contentType:"content"}),c(y)}function c(y){return y===null?f(y):ye(y)?l.check(e2,d,f)(y):(l.consume(y),c)}function f(y){return l.exit("chunkContent"),l.exit("content"),i(y)}function d(y){return l.consume(y),l.exit("chunkContent"),r.next=l.enter("chunkContent",{contentType:"content",previous:r}),r=r.next,c}}function l2(l,i,r){const u=this;return c;function c(d){return l.exit("chunkContent"),l.enter("lineEnding"),l.consume(d),l.exit("lineEnding"),Xe(l,f,"linePrefix")}function f(d){if(d===null||ye(d))return r(d);const y=u.events[u.events.length-1];return!u.parser.constructs.disable.null.includes("codeIndented")&&y&&y[1].type==="linePrefix"&&y[2].sliceSerialize(y[1],!0).length>=4?i(d):l.interrupt(u.parser.constructs.flow,r,i)(d)}}function gy(l,i,r,u,c,f,d,y,m){const h=m||Number.POSITIVE_INFINITY;let g=0;return v;function v(k){return k===60?(l.enter(u),l.enter(c),l.enter(f),l.consume(k),l.exit(f),S):k===null||k===32||k===41||_c(k)?r(k):(l.enter(u),l.enter(d),l.enter(y),l.enter("chunkString",{contentType:"string"}),j(k))}function S(k){return k===62?(l.enter(f),l.consume(k),l.exit(f),l.exit(c),l.exit(u),i):(l.enter(y),l.enter("chunkString",{contentType:"string"}),b(k))}function b(k){return k===62?(l.exit("chunkString"),l.exit(y),S(k)):k===null||k===60||ye(k)?r(k):(l.consume(k),k===92?R:b)}function R(k){return k===60||k===62||k===92?(l.consume(k),b):b(k)}function j(k){return!g&&(k===null||k===41||Ot(k))?(l.exit("chunkString"),l.exit(y),l.exit(d),l.exit(u),i(k)):g<h&&k===40?(l.consume(k),g++,j):k===41?(l.consume(k),g--,j):k===null||k===32||k===40||_c(k)?r(k):(l.consume(k),k===92?A:j)}function A(k){return k===40||k===41||k===92?(l.consume(k),j):j(k)}}function yy(l,i,r,u,c,f){const d=this;let y=0,m;return h;function h(b){return l.enter(u),l.enter(c),l.consume(b),l.exit(c),l.enter(f),g}function g(b){return y>999||b===null||b===91||b===93&&!m||b===94&&!y&&"_hiddenFootnoteSupport"in d.parser.constructs?r(b):b===93?(l.exit(f),l.enter(c),l.consume(b),l.exit(c),l.exit(u),i):ye(b)?(l.enter("lineEnding"),l.consume(b),l.exit("lineEnding"),g):(l.enter("chunkString",{contentType:"string"}),v(b))}function v(b){return b===null||b===91||b===93||ye(b)||y++>999?(l.exit("chunkString"),g(b)):(l.consume(b),m||(m=!De(b)),b===92?S:v)}function S(b){return b===91||b===92||b===93?(l.consume(b),y++,v):v(b)}}function vy(l,i,r,u,c,f){let d;return y;function y(S){return S===34||S===39||S===40?(l.enter(u),l.enter(c),l.consume(S),l.exit(c),d=S===40?41:S,m):r(S)}function m(S){return S===d?(l.enter(c),l.consume(S),l.exit(c),l.exit(u),i):(l.enter(f),h(S))}function h(S){return S===d?(l.exit(f),m(d)):S===null?r(S):ye(S)?(l.enter("lineEnding"),l.consume(S),l.exit("lineEnding"),Xe(l,h,"linePrefix")):(l.enter("chunkString",{contentType:"string"}),g(S))}function g(S){return S===d||S===null||ye(S)?(l.exit("chunkString"),h(S)):(l.consume(S),S===92?v:g)}function v(S){return S===d||S===92?(l.consume(S),g):g(S)}}function Ui(l,i){let r;return u;function u(c){return ye(c)?(l.enter("lineEnding"),l.consume(c),l.exit("lineEnding"),r=!0,u):De(c)?Xe(l,u,r?"linePrefix":"lineSuffix")(c):i(c)}}const a2={name:"definition",tokenize:r2},i2={partial:!0,tokenize:u2};function r2(l,i,r){const u=this;let c;return f;function f(b){return l.enter("definition"),d(b)}function d(b){return yy.call(u,l,y,r,"definitionLabel","definitionLabelMarker","definitionLabelString")(b)}function y(b){return c=Ma(u.sliceSerialize(u.events[u.events.length-1][1]).slice(1,-1)),b===58?(l.enter("definitionMarker"),l.consume(b),l.exit("definitionMarker"),m):r(b)}function m(b){return Ot(b)?Ui(l,h)(b):h(b)}function h(b){return gy(l,g,r,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(b)}function g(b){return l.attempt(i2,v,v)(b)}function v(b){return De(b)?Xe(l,S,"whitespace")(b):S(b)}function S(b){return b===null||ye(b)?(l.exit("definition"),u.parser.defined.push(c),i(b)):r(b)}}function u2(l,i,r){return u;function u(y){return Ot(y)?Ui(l,c)(y):r(y)}function c(y){return vy(l,f,r,"definitionTitle","definitionTitleMarker","definitionTitleString")(y)}function f(y){return De(y)?Xe(l,d,"whitespace")(y):d(y)}function d(y){return y===null||ye(y)?i(y):r(y)}}const o2={name:"hardBreakEscape",tokenize:s2};function s2(l,i,r){return u;function u(f){return l.enter("hardBreakEscape"),l.consume(f),c}function c(f){return ye(f)?(l.exit("hardBreakEscape"),i(f)):r(f)}}const c2={name:"headingAtx",resolve:f2,tokenize:d2};function f2(l,i){let r=l.length-2,u=3,c,f;return l[u][1].type==="whitespace"&&(u+=2),r-2>u&&l[r][1].type==="whitespace"&&(r-=2),l[r][1].type==="atxHeadingSequence"&&(u===r-1||r-4>u&&l[r-2][1].type==="whitespace")&&(r-=u+1===r?2:4),r>u&&(c={type:"atxHeadingText",start:l[u][1].start,end:l[r][1].end},f={type:"chunkText",start:l[u][1].start,end:l[r][1].end,contentType:"text"},vn(l,u,r-u+1,[["enter",c,i],["enter",f,i],["exit",f,i],["exit",c,i]])),l}function d2(l,i,r){let u=0;return c;function c(g){return l.enter("atxHeading"),f(g)}function f(g){return l.enter("atxHeadingSequence"),d(g)}function d(g){return g===35&&u++<6?(l.consume(g),d):g===null||Ot(g)?(l.exit("atxHeadingSequence"),y(g)):r(g)}function y(g){return g===35?(l.enter("atxHeadingSequence"),m(g)):g===null||ye(g)?(l.exit("atxHeading"),i(g)):De(g)?Xe(l,y,"whitespace")(g):(l.enter("atxHeadingText"),h(g))}function m(g){return g===35?(l.consume(g),m):(l.exit("atxHeadingSequence"),y(g))}function h(g){return g===null||g===35||Ot(g)?(l.exit("atxHeadingText"),y(g)):(l.consume(g),h)}}const h2=["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"],Im=["pre","script","style","textarea"],p2={concrete:!0,name:"htmlFlow",resolveTo:y2,tokenize:v2},m2={partial:!0,tokenize:b2},g2={partial:!0,tokenize:x2};function y2(l){let i=l.length;for(;i--&&!(l[i][0]==="enter"&&l[i][1].type==="htmlFlow"););return i>1&&l[i-2][1].type==="linePrefix"&&(l[i][1].start=l[i-2][1].start,l[i+1][1].start=l[i-2][1].start,l.splice(i-2,2)),l}function v2(l,i,r){const u=this;let c,f,d,y,m;return h;function h(w){return g(w)}function g(w){return l.enter("htmlFlow"),l.enter("htmlFlowData"),l.consume(w),v}function v(w){return w===33?(l.consume(w),S):w===47?(l.consume(w),f=!0,j):w===63?(l.consume(w),c=3,u.interrupt?i:T):yn(w)?(l.consume(w),d=String.fromCharCode(w),A):r(w)}function S(w){return w===45?(l.consume(w),c=2,b):w===91?(l.consume(w),c=5,y=0,R):yn(w)?(l.consume(w),c=4,u.interrupt?i:T):r(w)}function b(w){return w===45?(l.consume(w),u.interrupt?i:T):r(w)}function R(w){const ie="CDATA[";return w===ie.charCodeAt(y++)?(l.consume(w),y===ie.length?u.interrupt?i:ue:R):r(w)}function j(w){return yn(w)?(l.consume(w),d=String.fromCharCode(w),A):r(w)}function A(w){if(w===null||w===47||w===62||Ot(w)){const ie=w===47,de=d.toLowerCase();return!ie&&!f&&Im.includes(de)?(c=1,u.interrupt?i(w):ue(w)):h2.includes(d.toLowerCase())?(c=6,ie?(l.consume(w),k):u.interrupt?i(w):ue(w)):(c=7,u.interrupt&&!u.parser.lazy[u.now().line]?r(w):f?O(w):_(w))}return w===45||Qt(w)?(l.consume(w),d+=String.fromCharCode(w),A):r(w)}function k(w){return w===62?(l.consume(w),u.interrupt?i:ue):r(w)}function O(w){return De(w)?(l.consume(w),O):se(w)}function _(w){return w===47?(l.consume(w),se):w===58||w===95||yn(w)?(l.consume(w),G):De(w)?(l.consume(w),_):se(w)}function G(w){return w===45||w===46||w===58||w===95||Qt(w)?(l.consume(w),G):ne(w)}function ne(w){return w===61?(l.consume(w),L):De(w)?(l.consume(w),ne):_(w)}function L(w){return w===null||w===60||w===61||w===62||w===96?r(w):w===34||w===39?(l.consume(w),m=w,Q):De(w)?(l.consume(w),L):q(w)}function Q(w){return w===m?(l.consume(w),m=null,te):w===null||ye(w)?r(w):(l.consume(w),Q)}function q(w){return w===null||w===34||w===39||w===47||w===60||w===61||w===62||w===96||Ot(w)?ne(w):(l.consume(w),q)}function te(w){return w===47||w===62||De(w)?_(w):r(w)}function se(w){return w===62?(l.consume(w),ae):r(w)}function ae(w){return w===null||ye(w)?ue(w):De(w)?(l.consume(w),ae):r(w)}function ue(w){return w===45&&c===2?(l.consume(w),B):w===60&&c===1?(l.consume(w),ee):w===62&&c===4?(l.consume(w),z):w===63&&c===3?(l.consume(w),T):w===93&&c===5?(l.consume(w),X):ye(w)&&(c===6||c===7)?(l.exit("htmlFlowData"),l.check(m2,V,pe)(w)):w===null||ye(w)?(l.exit("htmlFlowData"),pe(w)):(l.consume(w),ue)}function pe(w){return l.check(g2,W,V)(w)}function W(w){return l.enter("lineEnding"),l.consume(w),l.exit("lineEnding"),P}function P(w){return w===null||ye(w)?pe(w):(l.enter("htmlFlowData"),ue(w))}function B(w){return w===45?(l.consume(w),T):ue(w)}function ee(w){return w===47?(l.consume(w),d="",K):ue(w)}function K(w){if(w===62){const ie=d.toLowerCase();return Im.includes(ie)?(l.consume(w),z):ue(w)}return yn(w)&&d.length<8?(l.consume(w),d+=String.fromCharCode(w),K):ue(w)}function X(w){return w===93?(l.consume(w),T):ue(w)}function T(w){return w===62?(l.consume(w),z):w===45&&c===2?(l.consume(w),T):ue(w)}function z(w){return w===null||ye(w)?(l.exit("htmlFlowData"),V(w)):(l.consume(w),z)}function V(w){return l.exit("htmlFlow"),i(w)}}function x2(l,i,r){const u=this;return c;function c(d){return ye(d)?(l.enter("lineEnding"),l.consume(d),l.exit("lineEnding"),f):r(d)}function f(d){return u.parser.lazy[u.now().line]?r(d):i(d)}}function b2(l,i,r){return u;function u(c){return l.enter("lineEnding"),l.consume(c),l.exit("lineEnding"),l.attempt(ku,i,r)}}const S2={name:"htmlText",tokenize:E2};function E2(l,i,r){const u=this;let c,f,d;return y;function y(T){return l.enter("htmlText"),l.enter("htmlTextData"),l.consume(T),m}function m(T){return T===33?(l.consume(T),h):T===47?(l.consume(T),ne):T===63?(l.consume(T),_):yn(T)?(l.consume(T),q):r(T)}function h(T){return T===45?(l.consume(T),g):T===91?(l.consume(T),f=0,R):yn(T)?(l.consume(T),O):r(T)}function g(T){return T===45?(l.consume(T),b):r(T)}function v(T){return T===null?r(T):T===45?(l.consume(T),S):ye(T)?(d=v,ee(T)):(l.consume(T),v)}function S(T){return T===45?(l.consume(T),b):v(T)}function b(T){return T===62?B(T):T===45?S(T):v(T)}function R(T){const z="CDATA[";return T===z.charCodeAt(f++)?(l.consume(T),f===z.length?j:R):r(T)}function j(T){return T===null?r(T):T===93?(l.consume(T),A):ye(T)?(d=j,ee(T)):(l.consume(T),j)}function A(T){return T===93?(l.consume(T),k):j(T)}function k(T){return T===62?B(T):T===93?(l.consume(T),k):j(T)}function O(T){return T===null||T===62?B(T):ye(T)?(d=O,ee(T)):(l.consume(T),O)}function _(T){return T===null?r(T):T===63?(l.consume(T),G):ye(T)?(d=_,ee(T)):(l.consume(T),_)}function G(T){return T===62?B(T):_(T)}function ne(T){return yn(T)?(l.consume(T),L):r(T)}function L(T){return T===45||Qt(T)?(l.consume(T),L):Q(T)}function Q(T){return ye(T)?(d=Q,ee(T)):De(T)?(l.consume(T),Q):B(T)}function q(T){return T===45||Qt(T)?(l.consume(T),q):T===47||T===62||Ot(T)?te(T):r(T)}function te(T){return T===47?(l.consume(T),B):T===58||T===95||yn(T)?(l.consume(T),se):ye(T)?(d=te,ee(T)):De(T)?(l.consume(T),te):B(T)}function se(T){return T===45||T===46||T===58||T===95||Qt(T)?(l.consume(T),se):ae(T)}function ae(T){return T===61?(l.consume(T),ue):ye(T)?(d=ae,ee(T)):De(T)?(l.consume(T),ae):te(T)}function ue(T){return T===null||T===60||T===61||T===62||T===96?r(T):T===34||T===39?(l.consume(T),c=T,pe):ye(T)?(d=ue,ee(T)):De(T)?(l.consume(T),ue):(l.consume(T),W)}function pe(T){return T===c?(l.consume(T),c=void 0,P):T===null?r(T):ye(T)?(d=pe,ee(T)):(l.consume(T),pe)}function W(T){return T===null||T===34||T===39||T===60||T===61||T===96?r(T):T===47||T===62||Ot(T)?te(T):(l.consume(T),W)}function P(T){return T===47||T===62||Ot(T)?te(T):r(T)}function B(T){return T===62?(l.consume(T),l.exit("htmlTextData"),l.exit("htmlText"),i):r(T)}function ee(T){return l.exit("htmlTextData"),l.enter("lineEnding"),l.consume(T),l.exit("lineEnding"),K}function K(T){return De(T)?Xe(l,X,"linePrefix",u.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(T):X(T)}function X(T){return l.enter("htmlTextData"),d(T)}}const tf={name:"labelEnd",resolveAll:j2,resolveTo:A2,tokenize:z2},C2={tokenize:R2},T2={tokenize:N2},w2={tokenize:k2};function j2(l){let i=-1;const r=[];for(;++i<l.length;){const u=l[i][1];if(r.push(l[i]),u.type==="labelImage"||u.type==="labelLink"||u.type==="labelEnd"){const c=u.type==="labelImage"?4:2;u.type="data",i+=c}}return l.length!==r.length&&vn(l,0,l.length,r),l}function A2(l,i){let r=l.length,u=0,c,f,d,y;for(;r--;)if(c=l[r][1],f){if(c.type==="link"||c.type==="labelLink"&&c._inactive)break;l[r][0]==="enter"&&c.type==="labelLink"&&(c._inactive=!0)}else if(d){if(l[r][0]==="enter"&&(c.type==="labelImage"||c.type==="labelLink")&&!c._balanced&&(f=r,c.type!=="labelLink")){u=2;break}}else c.type==="labelEnd"&&(d=r);const m={type:l[f][1].type==="labelLink"?"link":"image",start:{...l[f][1].start},end:{...l[l.length-1][1].end}},h={type:"label",start:{...l[f][1].start},end:{...l[d][1].end}},g={type:"labelText",start:{...l[f+u+2][1].end},end:{...l[d-2][1].start}};return y=[["enter",m,i],["enter",h,i]],y=ln(y,l.slice(f+1,f+u+3)),y=ln(y,[["enter",g,i]]),y=ln(y,ef(i.parser.constructs.insideSpan.null,l.slice(f+u+4,d-3),i)),y=ln(y,[["exit",g,i],l[d-2],l[d-1],["exit",h,i]]),y=ln(y,l.slice(d+1)),y=ln(y,[["exit",m,i]]),vn(l,f,l.length,y),l}function z2(l,i,r){const u=this;let c=u.events.length,f,d;for(;c--;)if((u.events[c][1].type==="labelImage"||u.events[c][1].type==="labelLink")&&!u.events[c][1]._balanced){f=u.events[c][1];break}return y;function y(S){return f?f._inactive?v(S):(d=u.parser.defined.includes(Ma(u.sliceSerialize({start:f.end,end:u.now()}))),l.enter("labelEnd"),l.enter("labelMarker"),l.consume(S),l.exit("labelMarker"),l.exit("labelEnd"),m):r(S)}function m(S){return S===40?l.attempt(C2,g,d?g:v)(S):S===91?l.attempt(T2,g,d?h:v)(S):d?g(S):v(S)}function h(S){return l.attempt(w2,g,v)(S)}function g(S){return i(S)}function v(S){return f._balanced=!0,r(S)}}function R2(l,i,r){return u;function u(v){return l.enter("resource"),l.enter("resourceMarker"),l.consume(v),l.exit("resourceMarker"),c}function c(v){return Ot(v)?Ui(l,f)(v):f(v)}function f(v){return v===41?g(v):gy(l,d,y,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(v)}function d(v){return Ot(v)?Ui(l,m)(v):g(v)}function y(v){return r(v)}function m(v){return v===34||v===39||v===40?vy(l,h,r,"resourceTitle","resourceTitleMarker","resourceTitleString")(v):g(v)}function h(v){return Ot(v)?Ui(l,g)(v):g(v)}function g(v){return v===41?(l.enter("resourceMarker"),l.consume(v),l.exit("resourceMarker"),l.exit("resource"),i):r(v)}}function N2(l,i,r){const u=this;return c;function c(y){return yy.call(u,l,f,d,"reference","referenceMarker","referenceString")(y)}function f(y){return u.parser.defined.includes(Ma(u.sliceSerialize(u.events[u.events.length-1][1]).slice(1,-1)))?i(y):r(y)}function d(y){return r(y)}}function k2(l,i,r){return u;function u(f){return l.enter("reference"),l.enter("referenceMarker"),l.consume(f),l.exit("referenceMarker"),c}function c(f){return f===93?(l.enter("referenceMarker"),l.consume(f),l.exit("referenceMarker"),l.exit("reference"),i):r(f)}}const M2={name:"labelStartImage",resolveAll:tf.resolveAll,tokenize:_2};function _2(l,i,r){const u=this;return c;function c(y){return l.enter("labelImage"),l.enter("labelImageMarker"),l.consume(y),l.exit("labelImageMarker"),f}function f(y){return y===91?(l.enter("labelMarker"),l.consume(y),l.exit("labelMarker"),l.exit("labelImage"),d):r(y)}function d(y){return y===94&&"_hiddenFootnoteSupport"in u.parser.constructs?r(y):i(y)}}const O2={name:"labelStartLink",resolveAll:tf.resolveAll,tokenize:D2};function D2(l,i,r){const u=this;return c;function c(d){return l.enter("labelLink"),l.enter("labelMarker"),l.consume(d),l.exit("labelMarker"),l.exit("labelLink"),f}function f(d){return d===94&&"_hiddenFootnoteSupport"in u.parser.constructs?r(d):i(d)}}const pc={name:"lineEnding",tokenize:L2};function L2(l,i){return r;function r(u){return l.enter("lineEnding"),l.consume(u),l.exit("lineEnding"),Xe(l,i,"linePrefix")}}const bu={name:"thematicBreak",tokenize:B2};function B2(l,i,r){let u=0,c;return f;function f(h){return l.enter("thematicBreak"),d(h)}function d(h){return c=h,y(h)}function y(h){return h===c?(l.enter("thematicBreakSequence"),m(h)):u>=3&&(h===null||ye(h))?(l.exit("thematicBreak"),i(h)):r(h)}function m(h){return h===c?(l.consume(h),u++,m):(l.exit("thematicBreakSequence"),De(h)?Xe(l,y,"whitespace")(h):y(h))}}const Mt={continuation:{tokenize:Y2},exit:G2,name:"list",tokenize:q2},U2={partial:!0,tokenize:I2},H2={partial:!0,tokenize:V2};function q2(l,i,r){const u=this,c=u.events[u.events.length-1];let f=c&&c[1].type==="linePrefix"?c[2].sliceSerialize(c[1],!0).length:0,d=0;return y;function y(b){const R=u.containerState.type||(b===42||b===43||b===45?"listUnordered":"listOrdered");if(R==="listUnordered"?!u.containerState.marker||b===u.containerState.marker:Oc(b)){if(u.containerState.type||(u.containerState.type=R,l.enter(R,{_container:!0})),R==="listUnordered")return l.enter("listItemPrefix"),b===42||b===45?l.check(bu,r,h)(b):h(b);if(!u.interrupt||b===49)return l.enter("listItemPrefix"),l.enter("listItemValue"),m(b)}return r(b)}function m(b){return Oc(b)&&++d<10?(l.consume(b),m):(!u.interrupt||d<2)&&(u.containerState.marker?b===u.containerState.marker:b===41||b===46)?(l.exit("listItemValue"),h(b)):r(b)}function h(b){return l.enter("listItemMarker"),l.consume(b),l.exit("listItemMarker"),u.containerState.marker=u.containerState.marker||b,l.check(ku,u.interrupt?r:g,l.attempt(U2,S,v))}function g(b){return u.containerState.initialBlankLine=!0,f++,S(b)}function v(b){return De(b)?(l.enter("listItemPrefixWhitespace"),l.consume(b),l.exit("listItemPrefixWhitespace"),S):r(b)}function S(b){return u.containerState.size=f+u.sliceSerialize(l.exit("listItemPrefix"),!0).length,i(b)}}function Y2(l,i,r){const u=this;return u.containerState._closeFlow=void 0,l.check(ku,c,f);function c(y){return u.containerState.furtherBlankLines=u.containerState.furtherBlankLines||u.containerState.initialBlankLine,Xe(l,i,"listItemIndent",u.containerState.size+1)(y)}function f(y){return u.containerState.furtherBlankLines||!De(y)?(u.containerState.furtherBlankLines=void 0,u.containerState.initialBlankLine=void 0,d(y)):(u.containerState.furtherBlankLines=void 0,u.containerState.initialBlankLine=void 0,l.attempt(H2,i,d)(y))}function d(y){return u.containerState._closeFlow=!0,u.interrupt=void 0,Xe(l,l.attempt(Mt,i,r),"linePrefix",u.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(y)}}function V2(l,i,r){const u=this;return Xe(l,c,"listItemIndent",u.containerState.size+1);function c(f){const d=u.events[u.events.length-1];return d&&d[1].type==="listItemIndent"&&d[2].sliceSerialize(d[1],!0).length===u.containerState.size?i(f):r(f)}}function G2(l){l.exit(this.containerState.type)}function I2(l,i,r){const u=this;return Xe(l,c,"listItemPrefixWhitespace",u.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function c(f){const d=u.events[u.events.length-1];return!De(f)&&d&&d[1].type==="listItemPrefixWhitespace"?i(f):r(f)}}const Qm={name:"setextUnderline",resolveTo:Q2,tokenize:X2};function Q2(l,i){let r=l.length,u,c,f;for(;r--;)if(l[r][0]==="enter"){if(l[r][1].type==="content"){u=r;break}l[r][1].type==="paragraph"&&(c=r)}else l[r][1].type==="content"&&l.splice(r,1),!f&&l[r][1].type==="definition"&&(f=r);const d={type:"setextHeading",start:{...l[u][1].start},end:{...l[l.length-1][1].end}};return l[c][1].type="setextHeadingText",f?(l.splice(c,0,["enter",d,i]),l.splice(f+1,0,["exit",l[u][1],i]),l[u][1].end={...l[f][1].end}):l[u][1]=d,l.push(["exit",d,i]),l}function X2(l,i,r){const u=this;let c;return f;function f(h){let g=u.events.length,v;for(;g--;)if(u.events[g][1].type!=="lineEnding"&&u.events[g][1].type!=="linePrefix"&&u.events[g][1].type!=="content"){v=u.events[g][1].type==="paragraph";break}return!u.parser.lazy[u.now().line]&&(u.interrupt||v)?(l.enter("setextHeadingLine"),c=h,d(h)):r(h)}function d(h){return l.enter("setextHeadingLineSequence"),y(h)}function y(h){return h===c?(l.consume(h),y):(l.exit("setextHeadingLineSequence"),De(h)?Xe(l,m,"lineSuffix")(h):m(h))}function m(h){return h===null||ye(h)?(l.exit("setextHeadingLine"),i(h)):r(h)}}const Z2={tokenize:K2};function K2(l){const i=this,r=l.attempt(ku,u,l.attempt(this.parser.constructs.flowInitial,c,Xe(l,l.attempt(this.parser.constructs.flow,c,l.attempt(WS,c)),"linePrefix")));return r;function u(f){if(f===null){l.consume(f);return}return l.enter("lineEndingBlank"),l.consume(f),l.exit("lineEndingBlank"),i.currentConstruct=void 0,r}function c(f){if(f===null){l.consume(f);return}return l.enter("lineEnding"),l.consume(f),l.exit("lineEnding"),i.currentConstruct=void 0,r}}const F2={resolveAll:by()},J2=xy("string"),P2=xy("text");function xy(l){return{resolveAll:by(l==="text"?$2:void 0),tokenize:i};function i(r){const u=this,c=this.parser.constructs[l],f=r.attempt(c,d,y);return d;function d(g){return h(g)?f(g):y(g)}function y(g){if(g===null){r.consume(g);return}return r.enter("data"),r.consume(g),m}function m(g){return h(g)?(r.exit("data"),f(g)):(r.consume(g),m)}function h(g){if(g===null)return!0;const v=c[g];let S=-1;if(v)for(;++S<v.length;){const b=v[S];if(!b.previous||b.previous.call(u,u.previous))return!0}return!1}}}function by(l){return i;function i(r,u){let c=-1,f;for(;++c<=r.length;)f===void 0?r[c]&&r[c][1].type==="data"&&(f=c,c++):(!r[c]||r[c][1].type!=="data")&&(c!==f+2&&(r[f][1].end=r[c-1][1].end,r.splice(f+2,c-f-2),c=f+2),f=void 0);return l?l(r,u):r}}function $2(l,i){let r=0;for(;++r<=l.length;)if((r===l.length||l[r][1].type==="lineEnding")&&l[r-1][1].type==="data"){const u=l[r-1][1],c=i.sliceStream(u);let f=c.length,d=-1,y=0,m;for(;f--;){const h=c[f];if(typeof h=="string"){for(d=h.length;h.charCodeAt(d-1)===32;)y++,d--;if(d)break;d=-1}else if(h===-2)m=!0,y++;else if(h!==-1){f++;break}}if(i._contentTypeTextTrailing&&r===l.length&&(y=0),y){const h={type:r===l.length||m||y<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:f?d:u.start._bufferIndex+d,_index:u.start._index+f,line:u.end.line,column:u.end.column-y,offset:u.end.offset-y},end:{...u.end}};u.end={...h.start},u.start.offset===u.end.offset?Object.assign(u,h):(l.splice(r,0,["enter",h,i],["exit",h,i]),r+=2)}r++}return l}const W2={42:Mt,43:Mt,45:Mt,48:Mt,49:Mt,50:Mt,51:Mt,52:Mt,53:Mt,54:Mt,55:Mt,56:Mt,57:Mt,62:dy},eE={91:a2},tE={[-2]:hc,[-1]:hc,32:hc},nE={35:c2,42:bu,45:[Qm,bu],60:p2,61:Qm,95:bu,96:Gm,126:Gm},lE={38:py,92:hy},aE={[-5]:pc,[-4]:pc,[-3]:pc,33:M2,38:py,42:Dc,60:[OS,S2],91:O2,92:[o2,hy],93:tf,95:Dc,96:ZS},iE={null:[Dc,F2]},rE={null:[42,95]},uE={null:[]},oE=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:rE,contentInitial:eE,disable:uE,document:W2,flow:nE,flowInitial:tE,insideSpan:iE,string:lE,text:aE},Symbol.toStringTag,{value:"Module"}));function sE(l,i,r){let u={_bufferIndex:-1,_index:0,line:r&&r.line||1,column:r&&r.column||1,offset:r&&r.offset||0};const c={},f=[];let d=[],y=[];const m={attempt:Q(ne),check:Q(L),consume:O,enter:_,exit:G,interrupt:Q(L,{interrupt:!0})},h={code:null,containerState:{},defineSkip:j,events:[],now:R,parser:l,previous:null,sliceSerialize:S,sliceStream:b,write:v};let g=i.tokenize.call(h,m);return i.resolveAll&&f.push(i),h;function v(ae){return d=ln(d,ae),A(),d[d.length-1]!==null?[]:(q(i,0),h.events=ef(f,h.events,h),h.events)}function S(ae,ue){return fE(b(ae),ue)}function b(ae){return cE(d,ae)}function R(){const{_bufferIndex:ae,_index:ue,line:pe,column:W,offset:P}=u;return{_bufferIndex:ae,_index:ue,line:pe,column:W,offset:P}}function j(ae){c[ae.line]=ae.column,se()}function A(){let ae;for(;u._index<d.length;){const ue=d[u._index];if(typeof ue=="string")for(ae=u._index,u._bufferIndex<0&&(u._bufferIndex=0);u._index===ae&&u._bufferIndex<ue.length;)k(ue.charCodeAt(u._bufferIndex));else k(ue)}}function k(ae){g=g(ae)}function O(ae){ye(ae)?(u.line++,u.column=1,u.offset+=ae===-3?2:1,se()):ae!==-1&&(u.column++,u.offset++),u._bufferIndex<0?u._index++:(u._bufferIndex++,u._bufferIndex===d[u._index].length&&(u._bufferIndex=-1,u._index++)),h.previous=ae}function _(ae,ue){const pe=ue||{};return pe.type=ae,pe.start=R(),h.events.push(["enter",pe,h]),y.push(pe),pe}function G(ae){const ue=y.pop();return ue.end=R(),h.events.push(["exit",ue,h]),ue}function ne(ae,ue){q(ae,ue.from)}function L(ae,ue){ue.restore()}function Q(ae,ue){return pe;function pe(W,P,B){let ee,K,X,T;return Array.isArray(W)?V(W):"tokenize"in W?V([W]):z(W);function z(fe){return Ee;function Ee(Fe){const He=Fe!==null&&fe[Fe],Xt=Fe!==null&&fe.null,xn=[...Array.isArray(He)?He:He?[He]:[],...Array.isArray(Xt)?Xt:Xt?[Xt]:[]];return V(xn)(Fe)}}function V(fe){return ee=fe,K=0,fe.length===0?B:w(fe[K])}function w(fe){return Ee;function Ee(Fe){return T=te(),X=fe,fe.partial||(h.currentConstruct=fe),fe.name&&h.parser.constructs.disable.null.includes(fe.name)?de():fe.tokenize.call(ue?Object.assign(Object.create(h),ue):h,m,ie,de)(Fe)}}function ie(fe){return ae(X,T),P}function de(fe){return T.restore(),++K<ee.length?w(ee[K]):B}}}function q(ae,ue){ae.resolveAll&&!f.includes(ae)&&f.push(ae),ae.resolve&&vn(h.events,ue,h.events.length-ue,ae.resolve(h.events.slice(ue),h)),ae.resolveTo&&(h.events=ae.resolveTo(h.events,h))}function te(){const ae=R(),ue=h.previous,pe=h.currentConstruct,W=h.events.length,P=Array.from(y);return{from:W,restore:B};function B(){u=ae,h.previous=ue,h.currentConstruct=pe,h.events.length=W,y=P,se()}}function se(){u.line in c&&u.column<2&&(u.column=c[u.line],u.offset+=c[u.line]-1)}}function cE(l,i){const r=i.start._index,u=i.start._bufferIndex,c=i.end._index,f=i.end._bufferIndex;let d;if(r===c)d=[l[r].slice(u,f)];else{if(d=l.slice(r,c),u>-1){const y=d[0];typeof y=="string"?d[0]=y.slice(u):d.shift()}f>0&&d.push(l[c].slice(0,f))}return d}function fE(l,i){let r=-1;const u=[];let c;for(;++r<l.length;){const f=l[r];let d;if(typeof f=="string")d=f;else switch(f){case-5:{d="\r";break}case-4:{d=`
13
+ `;break}case-3:{d=`\r
14
+ `;break}case-2:{d=i?" ":" ";break}case-1:{if(!i&&c)continue;d=" ";break}default:d=String.fromCharCode(f)}c=f===-2,u.push(d)}return u.join("")}function dE(l){const u={constructs:xS([oE,...(l||{}).extensions||[]]),content:c(AS),defined:[],document:c(RS),flow:c(Z2),lazy:{},string:c(J2),text:c(P2)};return u;function c(f){return d;function d(y){return sE(u,f,y)}}}function hE(l){for(;!my(l););return l}const Xm=/[\0\t\n\r]/g;function pE(){let l=1,i="",r=!0,u;return c;function c(f,d,y){const m=[];let h,g,v,S,b;for(f=i+(typeof f=="string"?f.toString():new TextDecoder(d||void 0).decode(f)),v=0,i="",r&&(f.charCodeAt(0)===65279&&v++,r=void 0);v<f.length;){if(Xm.lastIndex=v,h=Xm.exec(f),S=h&&h.index!==void 0?h.index:f.length,b=f.charCodeAt(S),!h){i=f.slice(v);break}if(b===10&&v===S&&u)m.push(-3),u=void 0;else switch(u&&(m.push(-5),u=void 0),v<S&&(m.push(f.slice(v,S)),l+=S-v),b){case 0:{m.push(65533),l++;break}case 9:{for(g=Math.ceil(l/4)*4,m.push(-2);l++<g;)m.push(-1);break}case 10:{m.push(-4),l=1;break}default:u=!0,l=1}v=S+1}return y&&(u&&m.push(-5),i&&m.push(i),m.push(null)),m}}const mE=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function gE(l){return l.replace(mE,yE)}function yE(l,i,r){if(i)return i;if(r.charCodeAt(0)===35){const c=r.charCodeAt(1),f=c===120||c===88;return fy(r.slice(f?2:1),f?16:10)}return Wc(r)||l}const Sy={}.hasOwnProperty;function vE(l,i,r){return i&&typeof i=="object"&&(r=i,i=void 0),xE(r)(hE(dE(r).document().write(pE()(l,i,!0))))}function xE(l){const i={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:f(Yl),autolinkProtocol:te,autolinkEmail:te,atxHeading:f(Hl),blockQuote:f(Xt),characterEscape:te,characterReference:te,codeFenced:f(xn),codeFencedFenceInfo:d,codeFencedFenceMeta:d,codeIndented:f(xn,d),codeText:f(Ba,d),codeTextData:te,data:te,codeFlowValue:te,definition:f(Zi),definitionDestinationString:d,definitionLabelString:d,definitionTitleString:d,emphasis:f(bn),hardBreakEscape:f(ql),hardBreakTrailing:f(ql),htmlFlow:f(Ki,d),htmlFlowData:te,htmlText:f(Ki,d),htmlTextData:te,image:f(Fi),label:d,link:f(Yl),listItem:f(Ua),listItemValue:S,listOrdered:f(Vl,v),listUnordered:f(Vl),paragraph:f(Ou),reference:w,referenceString:d,resourceDestinationString:d,resourceTitleString:d,setextHeading:f(Hl),strong:f(Du),thematicBreak:f(Lu)},exit:{atxHeading:m(),atxHeadingSequence:ne,autolink:m(),autolinkEmail:He,autolinkProtocol:Fe,blockQuote:m(),characterEscapeValue:se,characterReferenceMarkerHexadecimal:de,characterReferenceMarkerNumeric:de,characterReferenceValue:fe,characterReference:Ee,codeFenced:m(A),codeFencedFence:j,codeFencedFenceInfo:b,codeFencedFenceMeta:R,codeFlowValue:se,codeIndented:m(k),codeText:m(P),codeTextData:se,data:se,definition:m(),definitionDestinationString:G,definitionLabelString:O,definitionTitleString:_,emphasis:m(),hardBreakEscape:m(ue),hardBreakTrailing:m(ue),htmlFlow:m(pe),htmlFlowData:se,htmlText:m(W),htmlTextData:se,image:m(ee),label:X,labelText:K,lineEnding:ae,link:m(B),listItem:m(),listOrdered:m(),listUnordered:m(),paragraph:m(),referenceString:ie,resourceDestinationString:T,resourceTitleString:z,resource:V,setextHeading:m(q),setextHeadingLineSequence:Q,setextHeadingText:L,strong:m(),thematicBreak:m()}};Ey(i,(l||{}).mdastExtensions||[]);const r={};return u;function u(F){let re={type:"root",children:[]};const ge={stack:[re],tokenStack:[],config:i,enter:y,exit:h,buffer:d,resume:g,data:r},Te=[];let Le=-1;for(;++Le<F.length;)if(F[Le][1].type==="listOrdered"||F[Le][1].type==="listUnordered")if(F[Le][0]==="enter")Te.push(Le);else{const Lt=Te.pop();Le=c(F,Lt,Le)}for(Le=-1;++Le<F.length;){const Lt=i[F[Le][0]];Sy.call(Lt,F[Le][1].type)&&Lt[F[Le][1].type].call(Object.assign({sliceSerialize:F[Le][2].sliceSerialize},ge),F[Le][1])}if(ge.tokenStack.length>0){const Lt=ge.tokenStack[ge.tokenStack.length-1];(Lt[1]||Zm).call(ge,void 0,Lt[0])}for(re.position={start:yl(F.length>0?F[0][1].start:{line:1,column:1,offset:0}),end:yl(F.length>0?F[F.length-2][1].end:{line:1,column:1,offset:0})},Le=-1;++Le<i.transforms.length;)re=i.transforms[Le](re)||re;return re}function c(F,re,ge){let Te=re-1,Le=-1,Lt=!1,Sn,Et,st,Tt;for(;++Te<=ge;){const Ge=F[Te];switch(Ge[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{Ge[0]==="enter"?Le++:Le--,Tt=void 0;break}case"lineEndingBlank":{Ge[0]==="enter"&&(Sn&&!Tt&&!Le&&!st&&(st=Te),Tt=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:Tt=void 0}if(!Le&&Ge[0]==="enter"&&Ge[1].type==="listItemPrefix"||Le===-1&&Ge[0]==="exit"&&(Ge[1].type==="listUnordered"||Ge[1].type==="listOrdered")){if(Sn){let Xn=Te;for(Et=void 0;Xn--;){const rn=F[Xn];if(rn[1].type==="lineEnding"||rn[1].type==="lineEndingBlank"){if(rn[0]==="exit")continue;Et&&(F[Et][1].type="lineEndingBlank",Lt=!0),rn[1].type="lineEnding",Et=Xn}else if(!(rn[1].type==="linePrefix"||rn[1].type==="blockQuotePrefix"||rn[1].type==="blockQuotePrefixWhitespace"||rn[1].type==="blockQuoteMarker"||rn[1].type==="listItemIndent"))break}st&&(!Et||st<Et)&&(Sn._spread=!0),Sn.end=Object.assign({},Et?F[Et][1].start:Ge[1].end),F.splice(Et||Te,0,["exit",Sn,Ge[2]]),Te++,ge++}if(Ge[1].type==="listItemPrefix"){const Xn={type:"listItem",_spread:!1,start:Object.assign({},Ge[1].start),end:void 0};Sn=Xn,F.splice(Te,0,["enter",Xn,Ge[2]]),Te++,ge++,st=void 0,Tt=!0}}}return F[re][1]._spread=Lt,ge}function f(F,re){return ge;function ge(Te){y.call(this,F(Te),Te),re&&re.call(this,Te)}}function d(){this.stack.push({type:"fragment",children:[]})}function y(F,re,ge){this.stack[this.stack.length-1].children.push(F),this.stack.push(F),this.tokenStack.push([re,ge||void 0]),F.position={start:yl(re.start),end:void 0}}function m(F){return re;function re(ge){F&&F.call(this,ge),h.call(this,ge)}}function h(F,re){const ge=this.stack.pop(),Te=this.tokenStack.pop();if(Te)Te[0].type!==F.type&&(re?re.call(this,F,Te[0]):(Te[1]||Zm).call(this,F,Te[0]));else throw new Error("Cannot close `"+F.type+"` ("+Bi({start:F.start,end:F.end})+"): it’s not open");ge.position.end=yl(F.end)}function g(){return yS(this.stack.pop())}function v(){this.data.expectingFirstListItemValue=!0}function S(F){if(this.data.expectingFirstListItemValue){const re=this.stack[this.stack.length-2];re.start=Number.parseInt(this.sliceSerialize(F),10),this.data.expectingFirstListItemValue=void 0}}function b(){const F=this.resume(),re=this.stack[this.stack.length-1];re.lang=F}function R(){const F=this.resume(),re=this.stack[this.stack.length-1];re.meta=F}function j(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function A(){const F=this.resume(),re=this.stack[this.stack.length-1];re.value=F.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function k(){const F=this.resume(),re=this.stack[this.stack.length-1];re.value=F.replace(/(\r?\n|\r)$/g,"")}function O(F){const re=this.resume(),ge=this.stack[this.stack.length-1];ge.label=re,ge.identifier=Ma(this.sliceSerialize(F)).toLowerCase()}function _(){const F=this.resume(),re=this.stack[this.stack.length-1];re.title=F}function G(){const F=this.resume(),re=this.stack[this.stack.length-1];re.url=F}function ne(F){const re=this.stack[this.stack.length-1];if(!re.depth){const ge=this.sliceSerialize(F).length;re.depth=ge}}function L(){this.data.setextHeadingSlurpLineEnding=!0}function Q(F){const re=this.stack[this.stack.length-1];re.depth=this.sliceSerialize(F).codePointAt(0)===61?1:2}function q(){this.data.setextHeadingSlurpLineEnding=void 0}function te(F){const ge=this.stack[this.stack.length-1].children;let Te=ge[ge.length-1];(!Te||Te.type!=="text")&&(Te=St(),Te.position={start:yl(F.start),end:void 0},ge.push(Te)),this.stack.push(Te)}function se(F){const re=this.stack.pop();re.value+=this.sliceSerialize(F),re.position.end=yl(F.end)}function ae(F){const re=this.stack[this.stack.length-1];if(this.data.atHardBreak){const ge=re.children[re.children.length-1];ge.position.end=yl(F.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&i.canContainEols.includes(re.type)&&(te.call(this,F),se.call(this,F))}function ue(){this.data.atHardBreak=!0}function pe(){const F=this.resume(),re=this.stack[this.stack.length-1];re.value=F}function W(){const F=this.resume(),re=this.stack[this.stack.length-1];re.value=F}function P(){const F=this.resume(),re=this.stack[this.stack.length-1];re.value=F}function B(){const F=this.stack[this.stack.length-1];if(this.data.inReference){const re=this.data.referenceType||"shortcut";F.type+="Reference",F.referenceType=re,delete F.url,delete F.title}else delete F.identifier,delete F.label;this.data.referenceType=void 0}function ee(){const F=this.stack[this.stack.length-1];if(this.data.inReference){const re=this.data.referenceType||"shortcut";F.type+="Reference",F.referenceType=re,delete F.url,delete F.title}else delete F.identifier,delete F.label;this.data.referenceType=void 0}function K(F){const re=this.sliceSerialize(F),ge=this.stack[this.stack.length-2];ge.label=gE(re),ge.identifier=Ma(re).toLowerCase()}function X(){const F=this.stack[this.stack.length-1],re=this.resume(),ge=this.stack[this.stack.length-1];if(this.data.inReference=!0,ge.type==="link"){const Te=F.children;ge.children=Te}else ge.alt=re}function T(){const F=this.resume(),re=this.stack[this.stack.length-1];re.url=F}function z(){const F=this.resume(),re=this.stack[this.stack.length-1];re.title=F}function V(){this.data.inReference=void 0}function w(){this.data.referenceType="collapsed"}function ie(F){const re=this.resume(),ge=this.stack[this.stack.length-1];ge.label=re,ge.identifier=Ma(this.sliceSerialize(F)).toLowerCase(),this.data.referenceType="full"}function de(F){this.data.characterReferenceType=F.type}function fe(F){const re=this.sliceSerialize(F),ge=this.data.characterReferenceType;let Te;ge?(Te=fy(re,ge==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):Te=Wc(re);const Le=this.stack[this.stack.length-1];Le.value+=Te}function Ee(F){const re=this.stack.pop();re.position.end=yl(F.end)}function Fe(F){se.call(this,F);const re=this.stack[this.stack.length-1];re.url=this.sliceSerialize(F)}function He(F){se.call(this,F);const re=this.stack[this.stack.length-1];re.url="mailto:"+this.sliceSerialize(F)}function Xt(){return{type:"blockquote",children:[]}}function xn(){return{type:"code",lang:null,meta:null,value:""}}function Ba(){return{type:"inlineCode",value:""}}function Zi(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function bn(){return{type:"emphasis",children:[]}}function Hl(){return{type:"heading",depth:0,children:[]}}function ql(){return{type:"break"}}function Ki(){return{type:"html",value:""}}function Fi(){return{type:"image",title:null,url:"",alt:null}}function Yl(){return{type:"link",title:null,url:"",children:[]}}function Vl(F){return{type:"list",ordered:F.type==="listOrdered",start:null,spread:F._spread,children:[]}}function Ua(F){return{type:"listItem",spread:F._spread,checked:null,children:[]}}function Ou(){return{type:"paragraph",children:[]}}function Du(){return{type:"strong",children:[]}}function St(){return{type:"text",value:""}}function Lu(){return{type:"thematicBreak"}}}function yl(l){return{line:l.line,column:l.column,offset:l.offset}}function Ey(l,i){let r=-1;for(;++r<i.length;){const u=i[r];Array.isArray(u)?Ey(l,u):bE(l,u)}}function bE(l,i){let r;for(r in i)if(Sy.call(i,r))switch(r){case"canContainEols":{const u=i[r];u&&l[r].push(...u);break}case"transforms":{const u=i[r];u&&l[r].push(...u);break}case"enter":case"exit":{const u=i[r];u&&Object.assign(l[r],u);break}}}function Zm(l,i){throw l?new Error("Cannot close `"+l.type+"` ("+Bi({start:l.start,end:l.end})+"): a different token (`"+i.type+"`, "+Bi({start:i.start,end:i.end})+") is open"):new Error("Cannot close document, a token (`"+i.type+"`, "+Bi({start:i.start,end:i.end})+") is still open")}function SE(l){const i=this;i.parser=r;function r(u){return vE(u,{...i.data("settings"),...l,extensions:i.data("micromarkExtensions")||[],mdastExtensions:i.data("fromMarkdownExtensions")||[]})}}function EE(l,i){const r={type:"element",tagName:"blockquote",properties:{},children:l.wrap(l.all(i),!0)};return l.patch(i,r),l.applyData(i,r)}function CE(l,i){const r={type:"element",tagName:"br",properties:{},children:[]};return l.patch(i,r),[l.applyData(i,r),{type:"text",value:`
15
+ `}]}function TE(l,i){const r=i.value?i.value+`
16
+ `:"",u={},c=i.lang?i.lang.split(/\s+/):[];c.length>0&&(u.className=["language-"+c[0]]);let f={type:"element",tagName:"code",properties:u,children:[{type:"text",value:r}]};return i.meta&&(f.data={meta:i.meta}),l.patch(i,f),f=l.applyData(i,f),f={type:"element",tagName:"pre",properties:{},children:[f]},l.patch(i,f),f}function wE(l,i){const r={type:"element",tagName:"del",properties:{},children:l.all(i)};return l.patch(i,r),l.applyData(i,r)}function jE(l,i){const r={type:"element",tagName:"em",properties:{},children:l.all(i)};return l.patch(i,r),l.applyData(i,r)}function AE(l,i){const r=typeof l.options.clobberPrefix=="string"?l.options.clobberPrefix:"user-content-",u=String(i.identifier).toUpperCase(),c=La(u.toLowerCase()),f=l.footnoteOrder.indexOf(u);let d,y=l.footnoteCounts.get(u);y===void 0?(y=0,l.footnoteOrder.push(u),d=l.footnoteOrder.length):d=f+1,y+=1,l.footnoteCounts.set(u,y);const m={type:"element",tagName:"a",properties:{href:"#"+r+"fn-"+c,id:r+"fnref-"+c+(y>1?"-"+y:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(d)}]};l.patch(i,m);const h={type:"element",tagName:"sup",properties:{},children:[m]};return l.patch(i,h),l.applyData(i,h)}function zE(l,i){const r={type:"element",tagName:"h"+i.depth,properties:{},children:l.all(i)};return l.patch(i,r),l.applyData(i,r)}function RE(l,i){if(l.options.allowDangerousHtml){const r={type:"raw",value:i.value};return l.patch(i,r),l.applyData(i,r)}}function Cy(l,i){const r=i.referenceType;let u="]";if(r==="collapsed"?u+="[]":r==="full"&&(u+="["+(i.label||i.identifier)+"]"),i.type==="imageReference")return[{type:"text",value:"!["+i.alt+u}];const c=l.all(i),f=c[0];f&&f.type==="text"?f.value="["+f.value:c.unshift({type:"text",value:"["});const d=c[c.length-1];return d&&d.type==="text"?d.value+=u:c.push({type:"text",value:u}),c}function NE(l,i){const r=String(i.identifier).toUpperCase(),u=l.definitionById.get(r);if(!u)return Cy(l,i);const c={src:La(u.url||""),alt:i.alt};u.title!==null&&u.title!==void 0&&(c.title=u.title);const f={type:"element",tagName:"img",properties:c,children:[]};return l.patch(i,f),l.applyData(i,f)}function kE(l,i){const r={src:La(i.url)};i.alt!==null&&i.alt!==void 0&&(r.alt=i.alt),i.title!==null&&i.title!==void 0&&(r.title=i.title);const u={type:"element",tagName:"img",properties:r,children:[]};return l.patch(i,u),l.applyData(i,u)}function ME(l,i){const r={type:"text",value:i.value.replace(/\r?\n|\r/g," ")};l.patch(i,r);const u={type:"element",tagName:"code",properties:{},children:[r]};return l.patch(i,u),l.applyData(i,u)}function _E(l,i){const r=String(i.identifier).toUpperCase(),u=l.definitionById.get(r);if(!u)return Cy(l,i);const c={href:La(u.url||"")};u.title!==null&&u.title!==void 0&&(c.title=u.title);const f={type:"element",tagName:"a",properties:c,children:l.all(i)};return l.patch(i,f),l.applyData(i,f)}function OE(l,i){const r={href:La(i.url)};i.title!==null&&i.title!==void 0&&(r.title=i.title);const u={type:"element",tagName:"a",properties:r,children:l.all(i)};return l.patch(i,u),l.applyData(i,u)}function DE(l,i,r){const u=l.all(i),c=r?LE(r):Ty(i),f={},d=[];if(typeof i.checked=="boolean"){const g=u[0];let v;g&&g.type==="element"&&g.tagName==="p"?v=g:(v={type:"element",tagName:"p",properties:{},children:[]},u.unshift(v)),v.children.length>0&&v.children.unshift({type:"text",value:" "}),v.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:i.checked,disabled:!0},children:[]}),f.className=["task-list-item"]}let y=-1;for(;++y<u.length;){const g=u[y];(c||y!==0||g.type!=="element"||g.tagName!=="p")&&d.push({type:"text",value:`
17
+ `}),g.type==="element"&&g.tagName==="p"&&!c?d.push(...g.children):d.push(g)}const m=u[u.length-1];m&&(c||m.type!=="element"||m.tagName!=="p")&&d.push({type:"text",value:`
18
+ `});const h={type:"element",tagName:"li",properties:f,children:d};return l.patch(i,h),l.applyData(i,h)}function LE(l){let i=!1;if(l.type==="list"){i=l.spread||!1;const r=l.children;let u=-1;for(;!i&&++u<r.length;)i=Ty(r[u])}return i}function Ty(l){const i=l.spread;return i??l.children.length>1}function BE(l,i){const r={},u=l.all(i);let c=-1;for(typeof i.start=="number"&&i.start!==1&&(r.start=i.start);++c<u.length;){const d=u[c];if(d.type==="element"&&d.tagName==="li"&&d.properties&&Array.isArray(d.properties.className)&&d.properties.className.includes("task-list-item")){r.className=["contains-task-list"];break}}const f={type:"element",tagName:i.ordered?"ol":"ul",properties:r,children:l.wrap(u,!0)};return l.patch(i,f),l.applyData(i,f)}function UE(l,i){const r={type:"element",tagName:"p",properties:{},children:l.all(i)};return l.patch(i,r),l.applyData(i,r)}function HE(l,i){const r={type:"root",children:l.wrap(l.all(i))};return l.patch(i,r),l.applyData(i,r)}function qE(l,i){const r={type:"element",tagName:"strong",properties:{},children:l.all(i)};return l.patch(i,r),l.applyData(i,r)}function YE(l,i){const r=l.all(i),u=r.shift(),c=[];if(u){const d={type:"element",tagName:"thead",properties:{},children:l.wrap([u],!0)};l.patch(i.children[0],d),c.push(d)}if(r.length>0){const d={type:"element",tagName:"tbody",properties:{},children:l.wrap(r,!0)},y=Fc(i.children[1]),m=ay(i.children[i.children.length-1]);y&&m&&(d.position={start:y,end:m}),c.push(d)}const f={type:"element",tagName:"table",properties:{},children:l.wrap(c,!0)};return l.patch(i,f),l.applyData(i,f)}function VE(l,i,r){const u=r?r.children:void 0,f=(u?u.indexOf(i):1)===0?"th":"td",d=r&&r.type==="table"?r.align:void 0,y=d?d.length:i.children.length;let m=-1;const h=[];for(;++m<y;){const v=i.children[m],S={},b=d?d[m]:void 0;b&&(S.align=b);let R={type:"element",tagName:f,properties:S,children:[]};v&&(R.children=l.all(v),l.patch(v,R),R=l.applyData(v,R)),h.push(R)}const g={type:"element",tagName:"tr",properties:{},children:l.wrap(h,!0)};return l.patch(i,g),l.applyData(i,g)}function GE(l,i){const r={type:"element",tagName:"td",properties:{},children:l.all(i)};return l.patch(i,r),l.applyData(i,r)}const Km=9,Fm=32;function IE(l){const i=String(l),r=/\r?\n|\r/g;let u=r.exec(i),c=0;const f=[];for(;u;)f.push(Jm(i.slice(c,u.index),c>0,!0),u[0]),c=u.index+u[0].length,u=r.exec(i);return f.push(Jm(i.slice(c),c>0,!1)),f.join("")}function Jm(l,i,r){let u=0,c=l.length;if(i){let f=l.codePointAt(u);for(;f===Km||f===Fm;)u++,f=l.codePointAt(u)}if(r){let f=l.codePointAt(c-1);for(;f===Km||f===Fm;)c--,f=l.codePointAt(c-1)}return c>u?l.slice(u,c):""}function QE(l,i){const r={type:"text",value:IE(String(i.value))};return l.patch(i,r),l.applyData(i,r)}function XE(l,i){const r={type:"element",tagName:"hr",properties:{},children:[]};return l.patch(i,r),l.applyData(i,r)}const ZE={blockquote:EE,break:CE,code:TE,delete:wE,emphasis:jE,footnoteReference:AE,heading:zE,html:RE,imageReference:NE,image:kE,inlineCode:ME,linkReference:_E,link:OE,listItem:DE,list:BE,paragraph:UE,root:HE,strong:qE,table:YE,tableCell:GE,tableRow:VE,text:QE,thematicBreak:XE,toml:mu,yaml:mu,definition:mu,footnoteDefinition:mu};function mu(){}const wy=-1,Mu=0,Hi=1,ju=2,nf=3,lf=4,af=5,rf=6,jy=7,Ay=8,Pm=typeof self=="object"?self:globalThis,KE=(l,i)=>{const r=(c,f)=>(l.set(f,c),c),u=c=>{if(l.has(c))return l.get(c);const[f,d]=i[c];switch(f){case Mu:case wy:return r(d,c);case Hi:{const y=r([],c);for(const m of d)y.push(u(m));return y}case ju:{const y=r({},c);for(const[m,h]of d)y[u(m)]=u(h);return y}case nf:return r(new Date(d),c);case lf:{const{source:y,flags:m}=d;return r(new RegExp(y,m),c)}case af:{const y=r(new Map,c);for(const[m,h]of d)y.set(u(m),u(h));return y}case rf:{const y=r(new Set,c);for(const m of d)y.add(u(m));return y}case jy:{const{name:y,message:m}=d;return r(new Pm[y](m),c)}case Ay:return r(BigInt(d),c);case"BigInt":return r(Object(BigInt(d)),c);case"ArrayBuffer":return r(new Uint8Array(d).buffer,d);case"DataView":{const{buffer:y}=new Uint8Array(d);return r(new DataView(y),d)}}return r(new Pm[f](d),c)};return u},$m=l=>KE(new Map,l)(0),Ra="",{toString:FE}={},{keys:JE}=Object,Li=l=>{const i=typeof l;if(i!=="object"||!l)return[Mu,i];const r=FE.call(l).slice(8,-1);switch(r){case"Array":return[Hi,Ra];case"Object":return[ju,Ra];case"Date":return[nf,Ra];case"RegExp":return[lf,Ra];case"Map":return[af,Ra];case"Set":return[rf,Ra];case"DataView":return[Hi,r]}return r.includes("Array")?[Hi,r]:r.includes("Error")?[jy,r]:[ju,r]},gu=([l,i])=>l===Mu&&(i==="function"||i==="symbol"),PE=(l,i,r,u)=>{const c=(d,y)=>{const m=u.push(d)-1;return r.set(y,m),m},f=d=>{if(r.has(d))return r.get(d);let[y,m]=Li(d);switch(y){case Mu:{let g=d;switch(m){case"bigint":y=Ay,g=d.toString();break;case"function":case"symbol":if(l)throw new TypeError("unable to serialize "+m);g=null;break;case"undefined":return c([wy],d)}return c([y,g],d)}case Hi:{if(m){let S=d;return m==="DataView"?S=new Uint8Array(d.buffer):m==="ArrayBuffer"&&(S=new Uint8Array(d)),c([m,[...S]],d)}const g=[],v=c([y,g],d);for(const S of d)g.push(f(S));return v}case ju:{if(m)switch(m){case"BigInt":return c([m,d.toString()],d);case"Boolean":case"Number":case"String":return c([m,d.valueOf()],d)}if(i&&"toJSON"in d)return f(d.toJSON());const g=[],v=c([y,g],d);for(const S of JE(d))(l||!gu(Li(d[S])))&&g.push([f(S),f(d[S])]);return v}case nf:return c([y,d.toISOString()],d);case lf:{const{source:g,flags:v}=d;return c([y,{source:g,flags:v}],d)}case af:{const g=[],v=c([y,g],d);for(const[S,b]of d)(l||!(gu(Li(S))||gu(Li(b))))&&g.push([f(S),f(b)]);return v}case rf:{const g=[],v=c([y,g],d);for(const S of d)(l||!gu(Li(S)))&&g.push(f(S));return v}}const{message:h}=d;return c([y,{name:m,message:h}],d)};return f},Wm=(l,{json:i,lossy:r}={})=>{const u=[];return PE(!(i||r),!!i,new Map,u)(l),u},Au=typeof structuredClone=="function"?(l,i)=>i&&("json"in i||"lossy"in i)?$m(Wm(l,i)):structuredClone(l):(l,i)=>$m(Wm(l,i));function $E(l,i){const r=[{type:"text",value:"↩"}];return i>1&&r.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(i)}]}),r}function WE(l,i){return"Back to reference "+(l+1)+(i>1?"-"+i:"")}function eC(l){const i=typeof l.options.clobberPrefix=="string"?l.options.clobberPrefix:"user-content-",r=l.options.footnoteBackContent||$E,u=l.options.footnoteBackLabel||WE,c=l.options.footnoteLabel||"Footnotes",f=l.options.footnoteLabelTagName||"h2",d=l.options.footnoteLabelProperties||{className:["sr-only"]},y=[];let m=-1;for(;++m<l.footnoteOrder.length;){const h=l.footnoteById.get(l.footnoteOrder[m]);if(!h)continue;const g=l.all(h),v=String(h.identifier).toUpperCase(),S=La(v.toLowerCase());let b=0;const R=[],j=l.footnoteCounts.get(v);for(;j!==void 0&&++b<=j;){R.length>0&&R.push({type:"text",value:" "});let O=typeof r=="string"?r:r(m,b);typeof O=="string"&&(O={type:"text",value:O}),R.push({type:"element",tagName:"a",properties:{href:"#"+i+"fnref-"+S+(b>1?"-"+b:""),dataFootnoteBackref:"",ariaLabel:typeof u=="string"?u:u(m,b),className:["data-footnote-backref"]},children:Array.isArray(O)?O:[O]})}const A=g[g.length-1];if(A&&A.type==="element"&&A.tagName==="p"){const O=A.children[A.children.length-1];O&&O.type==="text"?O.value+=" ":A.children.push({type:"text",value:" "}),A.children.push(...R)}else g.push(...R);const k={type:"element",tagName:"li",properties:{id:i+"fn-"+S},children:l.wrap(g,!0)};l.patch(h,k),y.push(k)}if(y.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:f,properties:{...Au(d),id:"footnote-label"},children:[{type:"text",value:c}]},{type:"text",value:`
19
+ `},{type:"element",tagName:"ol",properties:{},children:l.wrap(y,!0)},{type:"text",value:`
20
+ `}]}}const zy=(function(l){if(l==null)return aC;if(typeof l=="function")return _u(l);if(typeof l=="object")return Array.isArray(l)?tC(l):nC(l);if(typeof l=="string")return lC(l);throw new Error("Expected function, string, or object as test")});function tC(l){const i=[];let r=-1;for(;++r<l.length;)i[r]=zy(l[r]);return _u(u);function u(...c){let f=-1;for(;++f<i.length;)if(i[f].apply(this,c))return!0;return!1}}function nC(l){const i=l;return _u(r);function r(u){const c=u;let f;for(f in l)if(c[f]!==i[f])return!1;return!0}}function lC(l){return _u(i);function i(r){return r&&r.type===l}}function _u(l){return i;function i(r,u,c){return!!(iC(r)&&l.call(this,r,typeof u=="number"?u:void 0,c||void 0))}}function aC(){return!0}function iC(l){return l!==null&&typeof l=="object"&&"type"in l}const Ry=[],rC=!0,eg=!1,uC="skip";function oC(l,i,r,u){let c;typeof i=="function"&&typeof r!="function"?(u=r,r=i):c=i;const f=zy(c),d=u?-1:1;y(l,void 0,[])();function y(m,h,g){const v=m&&typeof m=="object"?m:{};if(typeof v.type=="string"){const b=typeof v.tagName=="string"?v.tagName:typeof v.name=="string"?v.name:void 0;Object.defineProperty(S,"name",{value:"node ("+(m.type+(b?"<"+b+">":""))+")"})}return S;function S(){let b=Ry,R,j,A;if((!i||f(m,h,g[g.length-1]||void 0))&&(b=sC(r(m,g)),b[0]===eg))return b;if("children"in m&&m.children){const k=m;if(k.children&&b[0]!==uC)for(j=(u?k.children.length:-1)+d,A=g.concat(k);j>-1&&j<k.children.length;){const O=k.children[j];if(R=y(O,j,A)(),R[0]===eg)return R;j=typeof R[1]=="number"?R[1]:j+d}}return b}}}function sC(l){return Array.isArray(l)?l:typeof l=="number"?[rC,l]:l==null?Ry:[l]}function Ny(l,i,r,u){let c,f,d;typeof i=="function"&&typeof r!="function"?(f=void 0,d=i,c=r):(f=i,d=r,c=u),oC(l,f,y,c);function y(m,h){const g=h[h.length-1],v=g?g.children.indexOf(m):void 0;return d(m,v,g)}}const Lc={}.hasOwnProperty,cC={};function fC(l,i){const r=i||cC,u=new Map,c=new Map,f=new Map,d={...ZE,...r.handlers},y={all:h,applyData:hC,definitionById:u,footnoteById:c,footnoteCounts:f,footnoteOrder:[],handlers:d,one:m,options:r,patch:dC,wrap:mC};return Ny(l,function(g){if(g.type==="definition"||g.type==="footnoteDefinition"){const v=g.type==="definition"?u:c,S=String(g.identifier).toUpperCase();v.has(S)||v.set(S,g)}}),y;function m(g,v){const S=g.type,b=y.handlers[S];if(Lc.call(y.handlers,S)&&b)return b(y,g,v);if(y.options.passThrough&&y.options.passThrough.includes(S)){if("children"in g){const{children:j,...A}=g,k=Au(A);return k.children=y.all(g),k}return Au(g)}return(y.options.unknownHandler||pC)(y,g,v)}function h(g){const v=[];if("children"in g){const S=g.children;let b=-1;for(;++b<S.length;){const R=y.one(S[b],g);if(R){if(b&&S[b-1].type==="break"&&(!Array.isArray(R)&&R.type==="text"&&(R.value=tg(R.value)),!Array.isArray(R)&&R.type==="element")){const j=R.children[0];j&&j.type==="text"&&(j.value=tg(j.value))}Array.isArray(R)?v.push(...R):v.push(R)}}}return v}}function dC(l,i){l.position&&(i.position=Fb(l))}function hC(l,i){let r=i;if(l&&l.data){const u=l.data.hName,c=l.data.hChildren,f=l.data.hProperties;if(typeof u=="string")if(r.type==="element")r.tagName=u;else{const d="children"in r?r.children:[r];r={type:"element",tagName:u,properties:{},children:d}}r.type==="element"&&f&&Object.assign(r.properties,Au(f)),"children"in r&&r.children&&c!==null&&c!==void 0&&(r.children=c)}return r}function pC(l,i){const r=i.data||{},u="value"in i&&!(Lc.call(r,"hProperties")||Lc.call(r,"hChildren"))?{type:"text",value:i.value}:{type:"element",tagName:"div",properties:{},children:l.all(i)};return l.patch(i,u),l.applyData(i,u)}function mC(l,i){const r=[];let u=-1;for(i&&r.push({type:"text",value:`
21
+ `});++u<l.length;)u&&r.push({type:"text",value:`
22
+ `}),r.push(l[u]);return i&&l.length>0&&r.push({type:"text",value:`
23
+ `}),r}function tg(l){let i=0,r=l.charCodeAt(i);for(;r===9||r===32;)i++,r=l.charCodeAt(i);return l.slice(i)}function ng(l,i){const r=fC(l,i),u=r.one(l,void 0),c=eC(r),f=Array.isArray(u)?{type:"root",children:u}:u||{type:"root",children:[]};return c&&f.children.push({type:"text",value:`
24
+ `},c),f}function gC(l,i){return l&&"run"in l?async function(r,u){const c=ng(r,{file:u,...i});await l.run(c,u)}:function(r,u){return ng(r,{file:u,...l||i})}}function lg(l){if(l)throw l}var mc,ag;function yC(){if(ag)return mc;ag=1;var l=Object.prototype.hasOwnProperty,i=Object.prototype.toString,r=Object.defineProperty,u=Object.getOwnPropertyDescriptor,c=function(h){return typeof Array.isArray=="function"?Array.isArray(h):i.call(h)==="[object Array]"},f=function(h){if(!h||i.call(h)!=="[object Object]")return!1;var g=l.call(h,"constructor"),v=h.constructor&&h.constructor.prototype&&l.call(h.constructor.prototype,"isPrototypeOf");if(h.constructor&&!g&&!v)return!1;var S;for(S in h);return typeof S>"u"||l.call(h,S)},d=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},y=function(h,g){if(g==="__proto__")if(l.call(h,g)){if(u)return u(h,g).value}else return;return h[g]};return mc=function m(){var h,g,v,S,b,R,j=arguments[0],A=1,k=arguments.length,O=!1;for(typeof j=="boolean"&&(O=j,j=arguments[1]||{},A=2),(j==null||typeof j!="object"&&typeof j!="function")&&(j={});A<k;++A)if(h=arguments[A],h!=null)for(g in h)v=y(j,g),S=y(h,g),j!==S&&(O&&S&&(f(S)||(b=c(S)))?(b?(b=!1,R=v&&c(v)?v:[]):R=v&&f(v)?v:{},d(j,{name:g,newValue:m(O,R,S)})):typeof S<"u"&&d(j,{name:g,newValue:S}));return j},mc}var vC=yC();const gc=Hc(vC);function Bc(l){if(typeof l!="object"||l===null)return!1;const i=Object.getPrototypeOf(l);return(i===null||i===Object.prototype||Object.getPrototypeOf(i)===null)&&!(Symbol.toStringTag in l)&&!(Symbol.iterator in l)}function xC(){const l=[],i={run:r,use:u};return i;function r(...c){let f=-1;const d=c.pop();if(typeof d!="function")throw new TypeError("Expected function as last argument, not "+d);y(null,...c);function y(m,...h){const g=l[++f];let v=-1;if(m){d(m);return}for(;++v<c.length;)(h[v]===null||h[v]===void 0)&&(h[v]=c[v]);c=h,g?bC(g,y)(...h):d(null,...h)}}function u(c){if(typeof c!="function")throw new TypeError("Expected `middelware` to be a function, not "+c);return l.push(c),i}}function bC(l,i){let r;return u;function u(...d){const y=l.length>d.length;let m;y&&d.push(c);try{m=l.apply(this,d)}catch(h){const g=h;if(y&&r)throw g;return c(g)}y||(m&&m.then&&typeof m.then=="function"?m.then(f,c):m instanceof Error?c(m):f(m))}function c(d,...y){r||(r=!0,i(d,...y))}function f(d){c(null,d)}}const gn={basename:SC,dirname:EC,extname:CC,join:TC,sep:"/"};function SC(l,i){if(i!==void 0&&typeof i!="string")throw new TypeError('"ext" argument must be a string');Xi(l);let r=0,u=-1,c=l.length,f;if(i===void 0||i.length===0||i.length>l.length){for(;c--;)if(l.codePointAt(c)===47){if(f){r=c+1;break}}else u<0&&(f=!0,u=c+1);return u<0?"":l.slice(r,u)}if(i===l)return"";let d=-1,y=i.length-1;for(;c--;)if(l.codePointAt(c)===47){if(f){r=c+1;break}}else d<0&&(f=!0,d=c+1),y>-1&&(l.codePointAt(c)===i.codePointAt(y--)?y<0&&(u=c):(y=-1,u=d));return r===u?u=d:u<0&&(u=l.length),l.slice(r,u)}function EC(l){if(Xi(l),l.length===0)return".";let i=-1,r=l.length,u;for(;--r;)if(l.codePointAt(r)===47){if(u){i=r;break}}else u||(u=!0);return i<0?l.codePointAt(0)===47?"/":".":i===1&&l.codePointAt(0)===47?"//":l.slice(0,i)}function CC(l){Xi(l);let i=l.length,r=-1,u=0,c=-1,f=0,d;for(;i--;){const y=l.codePointAt(i);if(y===47){if(d){u=i+1;break}continue}r<0&&(d=!0,r=i+1),y===46?c<0?c=i:f!==1&&(f=1):c>-1&&(f=-1)}return c<0||r<0||f===0||f===1&&c===r-1&&c===u+1?"":l.slice(c,r)}function TC(...l){let i=-1,r;for(;++i<l.length;)Xi(l[i]),l[i]&&(r=r===void 0?l[i]:r+"/"+l[i]);return r===void 0?".":wC(r)}function wC(l){Xi(l);const i=l.codePointAt(0)===47;let r=jC(l,!i);return r.length===0&&!i&&(r="."),r.length>0&&l.codePointAt(l.length-1)===47&&(r+="/"),i?"/"+r:r}function jC(l,i){let r="",u=0,c=-1,f=0,d=-1,y,m;for(;++d<=l.length;){if(d<l.length)y=l.codePointAt(d);else{if(y===47)break;y=47}if(y===47){if(!(c===d-1||f===1))if(c!==d-1&&f===2){if(r.length<2||u!==2||r.codePointAt(r.length-1)!==46||r.codePointAt(r.length-2)!==46){if(r.length>2){if(m=r.lastIndexOf("/"),m!==r.length-1){m<0?(r="",u=0):(r=r.slice(0,m),u=r.length-1-r.lastIndexOf("/")),c=d,f=0;continue}}else if(r.length>0){r="",u=0,c=d,f=0;continue}}i&&(r=r.length>0?r+"/..":"..",u=2)}else r.length>0?r+="/"+l.slice(c+1,d):r=l.slice(c+1,d),u=d-c-1;c=d,f=0}else y===46&&f>-1?f++:f=-1}return r}function Xi(l){if(typeof l!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(l))}const AC={cwd:zC};function zC(){return"/"}function Uc(l){return!!(l!==null&&typeof l=="object"&&"href"in l&&l.href&&"protocol"in l&&l.protocol&&l.auth===void 0)}function RC(l){if(typeof l=="string")l=new URL(l);else if(!Uc(l)){const i=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+l+"`");throw i.code="ERR_INVALID_ARG_TYPE",i}if(l.protocol!=="file:"){const i=new TypeError("The URL must be of scheme file");throw i.code="ERR_INVALID_URL_SCHEME",i}return NC(l)}function NC(l){if(l.hostname!==""){const u=new TypeError('File URL host must be "localhost" or empty on darwin');throw u.code="ERR_INVALID_FILE_URL_HOST",u}const i=l.pathname;let r=-1;for(;++r<i.length;)if(i.codePointAt(r)===37&&i.codePointAt(r+1)===50){const u=i.codePointAt(r+2);if(u===70||u===102){const c=new TypeError("File URL path must not include encoded / characters");throw c.code="ERR_INVALID_FILE_URL_PATH",c}}return decodeURIComponent(i)}const yc=["history","path","basename","stem","extname","dirname"];class ky{constructor(i){let r;i?Uc(i)?r={path:i}:typeof i=="string"||kC(i)?r={value:i}:r=i:r={},this.cwd="cwd"in r?"":AC.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let u=-1;for(;++u<yc.length;){const f=yc[u];f in r&&r[f]!==void 0&&r[f]!==null&&(this[f]=f==="history"?[...r[f]]:r[f])}let c;for(c in r)yc.includes(c)||(this[c]=r[c])}get basename(){return typeof this.path=="string"?gn.basename(this.path):void 0}set basename(i){xc(i,"basename"),vc(i,"basename"),this.path=gn.join(this.dirname||"",i)}get dirname(){return typeof this.path=="string"?gn.dirname(this.path):void 0}set dirname(i){ig(this.basename,"dirname"),this.path=gn.join(i||"",this.basename)}get extname(){return typeof this.path=="string"?gn.extname(this.path):void 0}set extname(i){if(vc(i,"extname"),ig(this.dirname,"extname"),i){if(i.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(i.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=gn.join(this.dirname,this.stem+(i||""))}get path(){return this.history[this.history.length-1]}set path(i){Uc(i)&&(i=RC(i)),xc(i,"path"),this.path!==i&&this.history.push(i)}get stem(){return typeof this.path=="string"?gn.basename(this.path,this.extname):void 0}set stem(i){xc(i,"stem"),vc(i,"stem"),this.path=gn.join(this.dirname||"",i+(this.extname||""))}fail(i,r,u){const c=this.message(i,r,u);throw c.fatal=!0,c}info(i,r,u){const c=this.message(i,r,u);return c.fatal=void 0,c}message(i,r,u){const c=new bt(i,r,u);return this.path&&(c.name=this.path+":"+c.name,c.file=this.path),c.fatal=!1,this.messages.push(c),c}toString(i){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(i||void 0).decode(this.value)}}function vc(l,i){if(l&&l.includes(gn.sep))throw new Error("`"+i+"` cannot be a path: did not expect `"+gn.sep+"`")}function xc(l,i){if(!l)throw new Error("`"+i+"` cannot be empty")}function ig(l,i){if(!l)throw new Error("Setting `"+i+"` requires `path` to be set too")}function kC(l){return!!(l&&typeof l=="object"&&"byteLength"in l&&"byteOffset"in l)}const MC=(function(l){const u=this.constructor.prototype,c=u[l],f=function(){return c.apply(f,arguments)};return Object.setPrototypeOf(f,u),f}),_C={}.hasOwnProperty;class uf extends MC{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=xC()}copy(){const i=new uf;let r=-1;for(;++r<this.attachers.length;){const u=this.attachers[r];i.use(...u)}return i.data(gc(!0,{},this.namespace)),i}data(i,r){return typeof i=="string"?arguments.length===2?(Ec("data",this.frozen),this.namespace[i]=r,this):_C.call(this.namespace,i)&&this.namespace[i]||void 0:i?(Ec("data",this.frozen),this.namespace=i,this):this.namespace}freeze(){if(this.frozen)return this;const i=this;for(;++this.freezeIndex<this.attachers.length;){const[r,...u]=this.attachers[this.freezeIndex];if(u[0]===!1)continue;u[0]===!0&&(u[0]=void 0);const c=r.call(i,...u);typeof c=="function"&&this.transformers.use(c)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(i){this.freeze();const r=yu(i),u=this.parser||this.Parser;return bc("parse",u),u(String(r),r)}process(i,r){const u=this;return this.freeze(),bc("process",this.parser||this.Parser),Sc("process",this.compiler||this.Compiler),r?c(void 0,r):new Promise(c);function c(f,d){const y=yu(i),m=u.parse(y);u.run(m,y,function(g,v,S){if(g||!v||!S)return h(g);const b=v,R=u.stringify(b,S);LC(R)?S.value=R:S.result=R,h(g,S)});function h(g,v){g||!v?d(g):f?f(v):r(void 0,v)}}}processSync(i){let r=!1,u;return this.freeze(),bc("processSync",this.parser||this.Parser),Sc("processSync",this.compiler||this.Compiler),this.process(i,c),ug("processSync","process",r),u;function c(f,d){r=!0,lg(f),u=d}}run(i,r,u){rg(i),this.freeze();const c=this.transformers;return!u&&typeof r=="function"&&(u=r,r=void 0),u?f(void 0,u):new Promise(f);function f(d,y){const m=yu(r);c.run(i,m,h);function h(g,v,S){const b=v||i;g?y(g):d?d(b):u(void 0,b,S)}}}runSync(i,r){let u=!1,c;return this.run(i,r,f),ug("runSync","run",u),c;function f(d,y){lg(d),c=y,u=!0}}stringify(i,r){this.freeze();const u=yu(r),c=this.compiler||this.Compiler;return Sc("stringify",c),rg(i),c(i,u)}use(i,...r){const u=this.attachers,c=this.namespace;if(Ec("use",this.frozen),i!=null)if(typeof i=="function")m(i,r);else if(typeof i=="object")Array.isArray(i)?y(i):d(i);else throw new TypeError("Expected usable value, not `"+i+"`");return this;function f(h){if(typeof h=="function")m(h,[]);else if(typeof h=="object")if(Array.isArray(h)){const[g,...v]=h;m(g,v)}else d(h);else throw new TypeError("Expected usable value, not `"+h+"`")}function d(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");y(h.plugins),h.settings&&(c.settings=gc(!0,c.settings,h.settings))}function y(h){let g=-1;if(h!=null)if(Array.isArray(h))for(;++g<h.length;){const v=h[g];f(v)}else throw new TypeError("Expected a list of plugins, not `"+h+"`")}function m(h,g){let v=-1,S=-1;for(;++v<u.length;)if(u[v][0]===h){S=v;break}if(S===-1)u.push([h,...g]);else if(g.length>0){let[b,...R]=g;const j=u[S][1];Bc(j)&&Bc(b)&&(b=gc(!0,j,b)),u[S]=[h,b,...R]}}}}const OC=new uf().freeze();function bc(l,i){if(typeof i!="function")throw new TypeError("Cannot `"+l+"` without `parser`")}function Sc(l,i){if(typeof i!="function")throw new TypeError("Cannot `"+l+"` without `compiler`")}function Ec(l,i){if(i)throw new Error("Cannot call `"+l+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function rg(l){if(!Bc(l)||typeof l.type!="string")throw new TypeError("Expected node, got `"+l+"`")}function ug(l,i,r){if(!r)throw new Error("`"+l+"` finished async. Use `"+i+"` instead")}function yu(l){return DC(l)?l:new ky(l)}function DC(l){return!!(l&&typeof l=="object"&&"message"in l&&"messages"in l)}function LC(l){return typeof l=="string"||BC(l)}function BC(l){return!!(l&&typeof l=="object"&&"byteLength"in l&&"byteOffset"in l)}const UC="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",og=[],sg={allowDangerousHtml:!0},HC=/^(https?|ircs?|mailto|xmpp)$/i,qC=[{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 YC(l){const i=VC(l),r=GC(l);return IC(i.runSync(i.parse(r),r),l)}function VC(l){const i=l.rehypePlugins||og,r=l.remarkPlugins||og,u=l.remarkRehypeOptions?{...l.remarkRehypeOptions,...sg}:sg;return OC().use(SE).use(r).use(gC,u).use(i)}function GC(l){const i=l.children||"",r=new ky;return typeof i=="string"&&(r.value=i),r}function IC(l,i){const r=i.allowedElements,u=i.allowElement,c=i.components,f=i.disallowedElements,d=i.skipHtml,y=i.unwrapDisallowed,m=i.urlTransform||QC;for(const g of qC)Object.hasOwn(i,g.from)&&(""+g.from+(g.to?"use `"+g.to+"` instead":"remove it")+UC+g.id,void 0);return Ny(l,h),eS(l,{Fragment:p.Fragment,components:c,ignoreInvalidStyle:!0,jsx:p.jsx,jsxs:p.jsxs,passKeys:!0,passNode:!0});function h(g,v,S){if(g.type==="raw"&&S&&typeof v=="number")return d?S.children.splice(v,1):S.children[v]={type:"text",value:g.value},v;if(g.type==="element"){let b;for(b in dc)if(Object.hasOwn(dc,b)&&Object.hasOwn(g.properties,b)){const R=g.properties[b],j=dc[b];(j===null||j.includes(g.tagName))&&(g.properties[b]=m(String(R||""),b,g))}}if(g.type==="element"){let b=r?!r.includes(g.tagName):f?f.includes(g.tagName):!1;if(!b&&u&&typeof v=="number"&&(b=!u(g,v,S)),b&&S&&typeof v=="number")return y&&g.children?S.children.splice(v,1,...g.children):S.children.splice(v,1),v}}}function QC(l){const i=l.indexOf(":"),r=l.indexOf("?"),u=l.indexOf("#"),c=l.indexOf("/");return i===-1||c!==-1&&i>c||r!==-1&&i>r||u!==-1&&i>u||HC.test(l.slice(0,i))?l:""}const Yn=6,Cc="claude-voice-device-token",cg="claude-voice-agent-";function XC(){const[l,i]=C.useState("pairing"),[r,u]=C.useState(""),[c,f]=C.useState(""),[d,y]=C.useState(Array(Yn).fill("")),[m,h]=C.useState([]),[g,v]=C.useState(""),[S,b]=C.useState(!1),R=C.useRef([]),j=C.useRef(localStorage.getItem(Cc)||""),A=C.useRef(""),k=C.useRef(null),O=C.useRef(null),_=C.useRef(null),G=()=>`${Date.now()}-${Math.random().toString(36).slice(2,8)}`,ne=()=>{k.current?.scrollIntoView({behavior:"smooth"})},L=C.useCallback(()=>d.join(""),[d]),Q=()=>{y(Array(Yn).fill("")),R.current[0]?.focus()},q=C.useCallback(()=>{i("connected"),console.log("[Chat] Connected (HTTP + SSE mode)")},[]),te=C.useCallback(async K=>{const X=K||L();if(X.length!==Yn){u("Enter all 6 digits");return}u("");try{const T=await lt("/api/webrtc/pair",{code:X});j.current=T.token,localStorage.setItem(Cc,T.token),A.current&&localStorage.setItem(`${cg}${T.token}`,A.current),q()}catch(T){const z=T?.message||"Pairing failed";u(z),Q()}},[L,q]);C.useEffect(()=>{const K=j.current,X=new URLSearchParams(window.location.search),T=X.get("code"),z=X.get("agentId");if(z&&(A.current=z),T&&T.length===Yn&&!K){te(T);return}if(!K){R.current[0]?.focus();return}if(!z){const V=localStorage.getItem(`${cg}${K}`);V&&(A.current=V)}fetch("/api/webrtc/validate",{headers:{Authorization:`Bearer ${K}`}}).then(V=>V.json()).then(V=>{V.valid?q():(localStorage.removeItem(Cc),j.current="",T&&T.length===Yn?te(T):R.current[0]?.focus())}).catch(()=>{R.current[0]?.focus()})},[]),C.useEffect(()=>{ne()},[m]),C.useEffect(()=>()=>{const K=j.current;if(K){const X=JSON.stringify({token:K});navigator.sendBeacon("/api/chat/close",new Blob([X],{type:"application/json"}))}},[]);const se=K=>{switch(K.type){case"text_delta":h(X=>{const T=X[X.length-1];return T&&T.role==="assistant"&&T.isStreaming?[...X.slice(0,-1),{...T,content:T.content+K.content}]:[...X,{id:G(),role:"assistant",content:K.content,timestamp:Date.now(),isStreaming:!0}]});break;case"tool_start":h(X=>{const T=[...X],z=T[T.length-1];return z&&z.role==="assistant"&&z.isStreaming&&(T[T.length-1]={...z,isStreaming:!1}),T.push({id:G(),role:"tool",content:K.toolName||"tool",timestamp:Date.now(),isStreaming:!0}),T});break;case"tool_end":h(X=>{const T=X[X.length-1];return T&&T.role==="tool"&&T.isStreaming?[...X.slice(0,-1),{...T,isStreaming:!1}]:X});break;case"result":h(X=>{const T=X[X.length-1];return T&&T.isStreaming?[...X.slice(0,-1),{...T,isStreaming:!1}]:X}),b(!1);break;case"error":f(K.content),b(!1);break}},ae=(K,X)=>{const z=(X+K).split(`
25
+
26
+ `),V=z.pop()??"";for(const w of z){const ie=w.trim();if(ie.startsWith("data: "))try{const de=ie.slice(6),fe=JSON.parse(de);se(fe)}catch{}}return V},ue=(K,X)=>{const T=X.replace(/\D/g,"").slice(0,1),z=[...d];z[K]=T,y(z),T&&K<Yn-1&&R.current[K+1]?.focus(),T&&z.every(V=>V!=="")&&te(z.join(""))},pe=(K,X)=>{X.key==="Backspace"&&!d[K]&&K>0&&R.current[K-1]?.focus()},W=K=>{K.preventDefault();const X=(K.clipboardData.getData("text")||"").replace(/\D/g,"").slice(0,Yn),T=[...d];for(let z=0;z<X.length;z++)T[z]=X[z];y(T),X.length===Yn?te(X):X.length>0&&R.current[Math.min(X.length,Yn-1)]?.focus()},P=async K=>{const X=K.trim();if(!(!X||S)){h(T=>[...T,{id:G(),role:"user",content:X,timestamp:Date.now(),isStreaming:!1}]),v(""),b(!0);try{const T=new AbortController;_.current=T;const z=await fetch("/api/chat/send",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({token:j.current,agentId:A.current||void 0,text:X}),signal:T.signal});if(!z.ok){const de=await z.json().catch(()=>({error:"Request failed"}));throw new Error(de.error||`HTTP ${z.status}`)}if(!z.body)throw new Error("No response body");const V=z.body.getReader(),w=new TextDecoder;let ie="";for(;;){const{done:de,value:fe}=await V.read();if(de)break;const Ee=w.decode(fe,{stream:!0});ie=ae(Ee,ie)}ie.trim()&&ae(ie+`
27
+
28
+ `,""),b(!1),_.current=null}catch(T){if(T.name==="AbortError"){b(!1),_.current=null;return}const z=T.message||"Failed to send message";f(z),b(!1),_.current=null}}},B=async()=>{fetch("/api/chat/stop",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({token:j.current})}).catch(()=>{}),_.current?.abort(),h(K=>{const X=K[K.length-1];return X&&X.role==="assistant"&&X.isStreaming?[...K.slice(0,-1),{...X,isStreaming:!1}]:K}),b(!1)},ee=K=>{K.preventDefault(),P(g)};return l==="pairing"?p.jsx("div",{style:Oe.container,children:p.jsxs("div",{style:Oe.pairingContainer,children:[p.jsx("h1",{style:Oe.title,children:"Claude Chat"}),p.jsx("p",{style:Oe.subtitle,children:"Enter the pairing code shown on the dashboard"}),p.jsx("div",{style:Oe.pinInputs,children:d.map((K,X)=>p.jsx("input",{ref:T=>{R.current[X]=T},type:"text",inputMode:"numeric",maxLength:1,value:K,onChange:T=>ue(X,T.target.value),onKeyDown:T=>pe(X,T),onPaste:X===0?W:void 0,style:Oe.pinInput},X))}),p.jsx("button",{onClick:()=>te(),style:Oe.pairButton,children:"Pair Device"}),r&&p.jsx("div",{style:Oe.errorText,children:r})]})}):l==="error"?p.jsx("div",{style:Oe.container,children:p.jsxs("div",{style:Oe.pairingContainer,children:[p.jsx("h1",{style:Oe.title,children:"Connection Error"}),p.jsx("p",{style:Oe.errorText,children:c}),p.jsx("button",{onClick:()=>window.location.reload(),style:Oe.pairButton,children:"Retry"})]})}):p.jsxs("div",{style:Oe.container,children:[p.jsx("div",{style:Oe.header,children:p.jsxs("div",{style:Oe.headerLeft,children:[p.jsx("h1",{style:Oe.headerTitle,children:A.current||"Claude Chat"}),p.jsx("span",{style:Oe.connectedBadge,children:"Connected"})]})}),p.jsxs("div",{style:Oe.messageList,children:[m.length===0&&p.jsx("div",{style:Oe.emptyState,children:"Send a message to start the conversation."}),m.map(K=>K.role==="tool"?p.jsx("div",{style:Oe.messageBubbleWrapper,children:p.jsx("div",{style:Oe.toolBubble,children:K.isStreaming?`Using ${K.content}...`:`Used ${K.content}`})},K.id):p.jsx("div",{style:{...Oe.messageBubbleWrapper,justifyContent:K.role==="user"?"flex-end":"flex-start"},children:p.jsx("div",{style:{...Oe.messageBubble,...K.role==="user"?Oe.userBubble:Oe.assistantBubble},children:p.jsx("div",{style:{wordBreak:"break-word"},children:K.role==="assistant"?p.jsxs("div",{className:"chat-markdown",children:[p.jsx(YC,{children:K.content}),K.isStreaming&&p.jsx("span",{style:Oe.cursor,children:"|"})]}):p.jsx("div",{style:{whiteSpace:"pre-wrap"},children:K.content})})})},K.id)),p.jsx("div",{ref:k})]}),p.jsxs("form",{onSubmit:ee,style:Oe.inputBar,children:[p.jsx("input",{ref:O,type:"text",value:g,onChange:K=>v(K.target.value),placeholder:"Type a message...",disabled:!1,style:Oe.textInput,autoFocus:!0}),S?p.jsx("button",{type:"button",onClick:B,style:Oe.stopButton,children:"Stop"}):p.jsx("button",{type:"submit",disabled:!g.trim(),style:{...Oe.sendButton,opacity:g.trim()?1:.5,cursor:g.trim()?"pointer":"not-allowed"},children:"Send"})]})]})}const Oe={container:{display:"flex",flexDirection:"column",height:"100vh",width:"100vw",background:"var(--bg-main)",color:"var(--text-primary)"},pairingContainer:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",flex:1,gap:16},title:{fontSize:24,fontWeight:600,margin:0},subtitle:{fontSize:14,color:"var(--text-secondary)",margin:0},pinInputs:{display:"flex",gap:8,marginTop:8},pinInput:{width:40,height:48,textAlign:"center",fontSize:20,fontWeight:600,border:"1px solid var(--border-color)",borderRadius:0,background:"var(--bg-secondary)",color:"var(--text-primary)",outline:"none"},pairButton:{padding:"8px 24px",background:"var(--btn-primary-bg)",color:"var(--btn-primary-text)",border:"none",borderRadius:0,fontWeight:500,fontSize:14,cursor:"pointer"},errorText:{fontSize:13,color:"#d73a49"},header:{display:"flex",alignItems:"center",justifyContent:"space-between",padding:"12px 20px",borderBottom:"1px solid var(--border-color)",flexShrink:0},headerLeft:{display:"flex",alignItems:"center",gap:12},headerTitle:{margin:0,fontSize:16,fontWeight:600},connectedBadge:{fontSize:11,fontWeight:500,padding:"2px 8px",borderRadius:10,background:"#2ea04333",color:"#2ea043"},messageList:{flex:1,overflowY:"auto",padding:"16px 20px",display:"flex",flexDirection:"column",gap:8},emptyState:{flex:1,display:"flex",alignItems:"center",justifyContent:"center",color:"var(--text-secondary)",fontSize:14},messageBubbleWrapper:{display:"flex"},messageBubble:{maxWidth:"70%",padding:"10px 14px",fontSize:14,lineHeight:"1.5",borderRadius:8},userBubble:{background:"var(--btn-primary-bg)",color:"var(--btn-primary-text)",borderBottomRightRadius:2},assistantBubble:{background:"var(--bg-secondary)",color:"var(--text-primary)",border:"1px solid var(--border-color)",borderBottomLeftRadius:2},cursor:{opacity:.5,animation:"blink 1s step-end infinite"},toolBubble:{fontSize:12,color:"var(--text-secondary)",fontStyle:"italic",padding:"6px 12px",background:"var(--bg-secondary)",border:"1px dashed var(--border-color)",borderRadius:6},inputBar:{display:"flex",gap:8,padding:"12px 20px",borderTop:"1px solid var(--border-color)",flexShrink:0,background:"var(--bg-main)"},textInput:{flex:1,padding:"10px 14px",fontSize:14,border:"1px solid var(--border-color)",borderRadius:0,background:"var(--bg-secondary)",color:"var(--text-primary)",outline:"none"},sendButton:{padding:"10px 20px",background:"var(--btn-primary-bg)",color:"var(--btn-primary-text)",border:"none",borderRadius:0,fontWeight:500,fontSize:14},stopButton:{padding:"10px 20px",background:"#d73a49",color:"#ffffff",border:"none",borderRadius:0,fontWeight:500,fontSize:14,cursor:"pointer"}};function ZC(){return p.jsx(j0,{children:p.jsxs(t0,{children:[p.jsxs(Vn,{element:p.jsx(B0,{}),children:[p.jsx(Vn,{path:"/",element:p.jsx(Y0,{})}),p.jsx(Vn,{path:"/settings",element:p.jsx(mb,{})}),p.jsx(Vn,{path:"/agents",element:p.jsx(gb,{})}),p.jsx(Vn,{path:"/agents/:id",element:p.jsx(vb,{})}),p.jsx(Vn,{path:"/c/:id",element:p.jsx(Tb,{})})]}),p.jsx(Vn,{path:"/call",element:p.jsx(wb,{})}),p.jsx(Vn,{path:"/chat",element:p.jsx(XC,{})})]})})}const My=document.getElementById("root");if(!My)throw new Error("Root element #root not found");n1.createRoot(My).render(p.jsx(C.StrictMode,{children:p.jsx(ZC,{})}));