lua-cli 2.0.6 → 2.1.0-alpha.14

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/web/app.js CHANGED
@@ -1,27 +1,27 @@
1
- "use strict";var LuaApp=(()=>{var xE=Object.create;var Us=Object.defineProperty,NE=Object.defineProperties,EE=Object.getOwnPropertyDescriptor,kE=Object.getOwnPropertyDescriptors,TE=Object.getOwnPropertyNames,Ms=Object.getOwnPropertySymbols,wE=Object.getPrototypeOf,sc=Object.prototype.hasOwnProperty,lh=Object.prototype.propertyIsEnumerable;var sh=Math.pow,rh=(e,t,n)=>t in e?Us(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,K=(e,t)=>{for(var n in t||(t={}))sc.call(t,n)&&rh(e,n,t[n]);if(Ms)for(var n of Ms(t))lh.call(t,n)&&rh(e,n,t[n]);return e},ut=(e,t)=>NE(e,kE(t));var oh=(e,t)=>{var n={};for(var a in e)sc.call(e,a)&&t.indexOf(a)<0&&(n[a]=e[a]);if(e!=null&&Ms)for(var a of Ms(e))t.indexOf(a)<0&&lh.call(e,a)&&(n[a]=e[a]);return n};var b=(e,t)=>()=>(e&&(t=e(e=0)),t);var Ut=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),oc=(e,t)=>{for(var n in t)Us(e,n,{get:t[n],enumerable:!0})},AE=(e,t,n,a)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of TE(t))!sc.call(e,i)&&i!==n&&Us(e,i,{get:()=>t[i],enumerable:!(a=EE(t,i))||a.enumerable});return e};var F=(e,t,n)=>(n=e!=null?xE(wE(e)):{},AE(t||!e||!e.__esModule?Us(n,"default",{value:e,enumerable:!0}):n,e));var z=(e,t,n)=>new Promise((a,i)=>{var r=o=>{try{s(n.next(o))}catch(u){i(u)}},l=o=>{try{s(n.throw(o))}catch(u){i(u)}},s=o=>o.done?a(o.value):Promise.resolve(o.value).then(r,l);s((n=n.apply(e,t)).next())});var Sh=Ut(me=>{"use strict";var cc=Symbol.for("react.transitional.element"),CE=Symbol.for("react.portal"),RE=Symbol.for("react.fragment"),_E=Symbol.for("react.strict_mode"),DE=Symbol.for("react.profiler"),OE=Symbol.for("react.consumer"),LE=Symbol.for("react.context"),zE=Symbol.for("react.forward_ref"),ME=Symbol.for("react.suspense"),UE=Symbol.for("react.memo"),mh=Symbol.for("react.lazy"),uh=Symbol.iterator;function BE(e){return e===null||typeof e!="object"?null:(e=uh&&e[uh]||e["@@iterator"],typeof e=="function"?e:null)}var hh={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},gh=Object.assign,vh={};function qi(e,t,n){this.props=e,this.context=t,this.refs=vh,this.updater=n||hh}qi.prototype.isReactComponent={};qi.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=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,e,t,"setState")};qi.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function yh(){}yh.prototype=qi.prototype;function fc(e,t,n){this.props=e,this.context=t,this.refs=vh,this.updater=n||hh}var dc=fc.prototype=new yh;dc.constructor=fc;gh(dc,qi.prototype);dc.isPureReactComponent=!0;var ch=Array.isArray,Xe={H:null,A:null,T:null,S:null,V:null},bh=Object.prototype.hasOwnProperty;function pc(e,t,n,a,i,r){return n=r.ref,{$$typeof:cc,type:e,key:t,ref:n!==void 0?n:null,props:r}}function VE(e,t){return pc(e.type,t,void 0,void 0,void 0,e.props)}function mc(e){return typeof e=="object"&&e!==null&&e.$$typeof===cc}function HE(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var fh=/\/+/g;function uc(e,t){return typeof e=="object"&&e!==null&&e.key!=null?HE(""+e.key):t.toString(36)}function dh(){}function PE(e){switch(e.status){case"fulfilled":return e.value;case"rejected":throw e.reason;default:switch(typeof e.status=="string"?e.then(dh,dh):(e.status="pending",e.then(function(t){e.status==="pending"&&(e.status="fulfilled",e.value=t)},function(t){e.status==="pending"&&(e.status="rejected",e.reason=t)})),e.status){case"fulfilled":return e.value;case"rejected":throw e.reason}}throw e}function Pi(e,t,n,a,i){var r=typeof e;(r==="undefined"||r==="boolean")&&(e=null);var l=!1;if(e===null)l=!0;else switch(r){case"bigint":case"string":case"number":l=!0;break;case"object":switch(e.$$typeof){case cc:case CE:l=!0;break;case mh:return l=e._init,Pi(l(e._payload),t,n,a,i)}}if(l)return i=i(e),l=a===""?"."+uc(e,0):a,ch(i)?(n="",l!=null&&(n=l.replace(fh,"$&/")+"/"),Pi(i,t,n,"",function(u){return u})):i!=null&&(mc(i)&&(i=VE(i,n+(i.key==null||e&&e.key===i.key?"":(""+i.key).replace(fh,"$&/")+"/")+l)),t.push(i)),1;l=0;var s=a===""?".":a+":";if(ch(e))for(var o=0;o<e.length;o++)a=e[o],r=s+uc(a,o),l+=Pi(a,t,n,r,i);else if(o=BE(e),typeof o=="function")for(e=o.call(e),o=0;!(a=e.next()).done;)a=a.value,r=s+uc(a,o++),l+=Pi(a,t,n,r,i);else if(r==="object"){if(typeof e.then=="function")return Pi(PE(e),t,n,a,i);throw t=String(e),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.")}return l}function Bs(e,t,n){if(e==null)return e;var a=[],i=0;return Pi(e,a,"","",function(r){return t.call(n,r,i++)}),a}function qE(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(n){(e._status===0||e._status===-1)&&(e._status=1,e._result=n)},function(n){(e._status===0||e._status===-1)&&(e._status=2,e._result=n)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var ph=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)};function jE(){}me.Children={map:Bs,forEach:function(e,t,n){Bs(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return Bs(e,function(){t++}),t},toArray:function(e){return Bs(e,function(t){return t})||[]},only:function(e){if(!mc(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};me.Component=qi;me.Fragment=RE;me.Profiler=DE;me.PureComponent=fc;me.StrictMode=_E;me.Suspense=ME;me.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=Xe;me.__COMPILER_RUNTIME={__proto__:null,c:function(e){return Xe.H.useMemoCache(e)}};me.cache=function(e){return function(){return e.apply(null,arguments)}};me.cloneElement=function(e,t,n){if(e==null)throw Error("The argument must be a React element, but you passed "+e+".");var a=gh({},e.props),i=e.key,r=void 0;if(t!=null)for(l in t.ref!==void 0&&(r=void 0),t.key!==void 0&&(i=""+t.key),t)!bh.call(t,l)||l==="key"||l==="__self"||l==="__source"||l==="ref"&&t.ref===void 0||(a[l]=t[l]);var l=arguments.length-2;if(l===1)a.children=n;else if(1<l){for(var s=Array(l),o=0;o<l;o++)s[o]=arguments[o+2];a.children=s}return pc(e.type,i,void 0,void 0,r,a)};me.createContext=function(e){return e={$$typeof:LE,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null},e.Provider=e,e.Consumer={$$typeof:OE,_context:e},e};me.createElement=function(e,t,n){var a,i={},r=null;if(t!=null)for(a in t.key!==void 0&&(r=""+t.key),t)bh.call(t,a)&&a!=="key"&&a!=="__self"&&a!=="__source"&&(i[a]=t[a]);var l=arguments.length-2;if(l===1)i.children=n;else if(1<l){for(var s=Array(l),o=0;o<l;o++)s[o]=arguments[o+2];i.children=s}if(e&&e.defaultProps)for(a in l=e.defaultProps,l)i[a]===void 0&&(i[a]=l[a]);return pc(e,r,void 0,void 0,null,i)};me.createRef=function(){return{current:null}};me.forwardRef=function(e){return{$$typeof:zE,render:e}};me.isValidElement=mc;me.lazy=function(e){return{$$typeof:mh,_payload:{_status:-1,_result:e},_init:qE}};me.memo=function(e,t){return{$$typeof:UE,type:e,compare:t===void 0?null:t}};me.startTransition=function(e){var t=Xe.T,n={};Xe.T=n;try{var a=e(),i=Xe.S;i!==null&&i(n,a),typeof a=="object"&&a!==null&&typeof a.then=="function"&&a.then(jE,ph)}catch(r){ph(r)}finally{Xe.T=t}};me.unstable_useCacheRefresh=function(){return Xe.H.useCacheRefresh()};me.use=function(e){return Xe.H.use(e)};me.useActionState=function(e,t,n){return Xe.H.useActionState(e,t,n)};me.useCallback=function(e,t){return Xe.H.useCallback(e,t)};me.useContext=function(e){return Xe.H.useContext(e)};me.useDebugValue=function(){};me.useDeferredValue=function(e,t){return Xe.H.useDeferredValue(e,t)};me.useEffect=function(e,t,n){var a=Xe.H;if(typeof n=="function")throw Error("useEffect CRUD overload is not enabled in this build of React.");return a.useEffect(e,t)};me.useId=function(){return Xe.H.useId()};me.useImperativeHandle=function(e,t,n){return Xe.H.useImperativeHandle(e,t,n)};me.useInsertionEffect=function(e,t){return Xe.H.useInsertionEffect(e,t)};me.useLayoutEffect=function(e,t){return Xe.H.useLayoutEffect(e,t)};me.useMemo=function(e,t){return Xe.H.useMemo(e,t)};me.useOptimistic=function(e,t){return Xe.H.useOptimistic(e,t)};me.useReducer=function(e,t,n){return Xe.H.useReducer(e,t,n)};me.useRef=function(e){return Xe.H.useRef(e)};me.useState=function(e){return Xe.H.useState(e)};me.useSyncExternalStore=function(e,t,n){return Xe.H.useSyncExternalStore(e,t,n)};me.useTransition=function(){return Xe.H.useTransition()};me.version="19.1.1"});var Je=Ut((f_,xh)=>{"use strict";xh.exports=Sh()});var Dh=Ut(Qe=>{"use strict";function yc(e,t){var n=e.length;e.push(t);e:for(;0<n;){var a=n-1>>>1,i=e[a];if(0<Vs(i,t))e[a]=t,e[n]=i,n=a;else break e}}function Yn(e){return e.length===0?null:e[0]}function Ps(e){if(e.length===0)return null;var t=e[0],n=e.pop();if(n!==t){e[0]=n;e:for(var a=0,i=e.length,r=i>>>1;a<r;){var l=2*(a+1)-1,s=e[l],o=l+1,u=e[o];if(0>Vs(s,n))o<i&&0>Vs(u,s)?(e[a]=u,e[o]=n,a=o):(e[a]=s,e[l]=n,a=l);else if(o<i&&0>Vs(u,n))e[a]=u,e[o]=n,a=o;else break e}}return t}function Vs(e,t){var n=e.sortIndex-t.sortIndex;return n!==0?n:e.id-t.id}Qe.unstable_now=void 0;typeof performance=="object"&&typeof performance.now=="function"?(Nh=performance,Qe.unstable_now=function(){return Nh.now()}):(hc=Date,Eh=hc.now(),Qe.unstable_now=function(){return hc.now()-Eh});var Nh,hc,Eh,ea=[],Na=[],YE=1,En=null,Bt=3,bc=!1,Kr=!1,Wr=!1,Sc=!1,wh=typeof setTimeout=="function"?setTimeout:null,Ah=typeof clearTimeout=="function"?clearTimeout:null,kh=typeof setImmediate!="undefined"?setImmediate:null;function Hs(e){for(var t=Yn(Na);t!==null;){if(t.callback===null)Ps(Na);else if(t.startTime<=e)Ps(Na),t.sortIndex=t.expirationTime,yc(ea,t);else break;t=Yn(Na)}}function xc(e){if(Wr=!1,Hs(e),!Kr)if(Yn(ea)!==null)Kr=!0,Yi||(Yi=!0,ji());else{var t=Yn(Na);t!==null&&Nc(xc,t.startTime-e)}}var Yi=!1,el=-1,Ch=5,Rh=-1;function _h(){return Sc?!0:!(Qe.unstable_now()-Rh<Ch)}function gc(){if(Sc=!1,Yi){var e=Qe.unstable_now();Rh=e;var t=!0;try{e:{Kr=!1,Wr&&(Wr=!1,Ah(el),el=-1),bc=!0;var n=Bt;try{t:{for(Hs(e),En=Yn(ea);En!==null&&!(En.expirationTime>e&&_h());){var a=En.callback;if(typeof a=="function"){En.callback=null,Bt=En.priorityLevel;var i=a(En.expirationTime<=e);if(e=Qe.unstable_now(),typeof i=="function"){En.callback=i,Hs(e),t=!0;break t}En===Yn(ea)&&Ps(ea),Hs(e)}else Ps(ea);En=Yn(ea)}if(En!==null)t=!0;else{var r=Yn(Na);r!==null&&Nc(xc,r.startTime-e),t=!1}}break e}finally{En=null,Bt=n,bc=!1}t=void 0}}finally{t?ji():Yi=!1}}}var ji;typeof kh=="function"?ji=function(){kh(gc)}:typeof MessageChannel!="undefined"?(vc=new MessageChannel,Th=vc.port2,vc.port1.onmessage=gc,ji=function(){Th.postMessage(null)}):ji=function(){wh(gc,0)};var vc,Th;function Nc(e,t){el=wh(function(){e(Qe.unstable_now())},t)}Qe.unstable_IdlePriority=5;Qe.unstable_ImmediatePriority=1;Qe.unstable_LowPriority=4;Qe.unstable_NormalPriority=3;Qe.unstable_Profiling=null;Qe.unstable_UserBlockingPriority=2;Qe.unstable_cancelCallback=function(e){e.callback=null};Qe.unstable_forceFrameRate=function(e){0>e||125<e?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):Ch=0<e?Math.floor(1e3/e):5};Qe.unstable_getCurrentPriorityLevel=function(){return Bt};Qe.unstable_next=function(e){switch(Bt){case 1:case 2:case 3:var t=3;break;default:t=Bt}var n=Bt;Bt=t;try{return e()}finally{Bt=n}};Qe.unstable_requestPaint=function(){Sc=!0};Qe.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=Bt;Bt=e;try{return t()}finally{Bt=n}};Qe.unstable_scheduleCallback=function(e,t,n){var a=Qe.unstable_now();switch(typeof n=="object"&&n!==null?(n=n.delay,n=typeof n=="number"&&0<n?a+n:a):n=a,e){case 1:var i=-1;break;case 2:i=250;break;case 5:i=1073741823;break;case 4:i=1e4;break;default:i=5e3}return i=n+i,e={id:YE++,callback:t,priorityLevel:e,startTime:n,expirationTime:i,sortIndex:-1},n>a?(e.sortIndex=n,yc(Na,e),Yn(ea)===null&&e===Yn(Na)&&(Wr?(Ah(el),el=-1):Wr=!0,Nc(xc,n-a))):(e.sortIndex=i,yc(ea,e),Kr||bc||(Kr=!0,Yi||(Yi=!0,ji()))),e};Qe.unstable_shouldYield=_h;Qe.unstable_wrapCallback=function(e){var t=Bt;return function(){var n=Bt;Bt=t;try{return e.apply(this,arguments)}finally{Bt=n}}}});var Lh=Ut((p_,Oh)=>{"use strict";Oh.exports=Dh()});var Mh=Ut(It=>{"use strict";var IE=Je();function zh(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 Ea(){}var Yt={d:{f:Ea,r:function(){throw Error(zh(522))},D:Ea,C:Ea,L:Ea,m:Ea,X:Ea,S:Ea,M:Ea},p:0,findDOMNode:null},GE=Symbol.for("react.portal");function XE(e,t,n){var a=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:GE,key:a==null?null:""+a,children:e,containerInfo:t,implementation:n}}var tl=IE.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function qs(e,t){if(e==="font")return"";if(typeof t=="string")return t==="use-credentials"?t:""}It.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=Yt;It.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)throw Error(zh(299));return XE(e,t,null,n)};It.flushSync=function(e){var t=tl.T,n=Yt.p;try{if(tl.T=null,Yt.p=2,e)return e()}finally{tl.T=t,Yt.p=n,Yt.d.f()}};It.preconnect=function(e,t){typeof e=="string"&&(t?(t=t.crossOrigin,t=typeof t=="string"?t==="use-credentials"?t:"":void 0):t=null,Yt.d.C(e,t))};It.prefetchDNS=function(e){typeof e=="string"&&Yt.d.D(e)};It.preinit=function(e,t){if(typeof e=="string"&&t&&typeof t.as=="string"){var n=t.as,a=qs(n,t.crossOrigin),i=typeof t.integrity=="string"?t.integrity:void 0,r=typeof t.fetchPriority=="string"?t.fetchPriority:void 0;n==="style"?Yt.d.S(e,typeof t.precedence=="string"?t.precedence:void 0,{crossOrigin:a,integrity:i,fetchPriority:r}):n==="script"&&Yt.d.X(e,{crossOrigin:a,integrity:i,fetchPriority:r,nonce:typeof t.nonce=="string"?t.nonce:void 0})}};It.preinitModule=function(e,t){if(typeof e=="string")if(typeof t=="object"&&t!==null){if(t.as==null||t.as==="script"){var n=qs(t.as,t.crossOrigin);Yt.d.M(e,{crossOrigin:n,integrity:typeof t.integrity=="string"?t.integrity:void 0,nonce:typeof t.nonce=="string"?t.nonce:void 0})}}else t==null&&Yt.d.M(e)};It.preload=function(e,t){if(typeof e=="string"&&typeof t=="object"&&t!==null&&typeof t.as=="string"){var n=t.as,a=qs(n,t.crossOrigin);Yt.d.L(e,n,{crossOrigin:a,integrity:typeof t.integrity=="string"?t.integrity:void 0,nonce:typeof t.nonce=="string"?t.nonce:void 0,type:typeof t.type=="string"?t.type:void 0,fetchPriority:typeof t.fetchPriority=="string"?t.fetchPriority:void 0,referrerPolicy:typeof t.referrerPolicy=="string"?t.referrerPolicy:void 0,imageSrcSet:typeof t.imageSrcSet=="string"?t.imageSrcSet:void 0,imageSizes:typeof t.imageSizes=="string"?t.imageSizes:void 0,media:typeof t.media=="string"?t.media:void 0})}};It.preloadModule=function(e,t){if(typeof e=="string")if(t){var n=qs(t.as,t.crossOrigin);Yt.d.m(e,{as:typeof t.as=="string"&&t.as!=="script"?t.as:void 0,crossOrigin:n,integrity:typeof t.integrity=="string"?t.integrity:void 0})}else Yt.d.m(e)};It.requestFormReset=function(e){Yt.d.r(e)};It.unstable_batchedUpdates=function(e,t){return e(t)};It.useFormState=function(e,t,n){return tl.H.useFormState(e,t,n)};It.useFormStatus=function(){return tl.H.useHostTransitionStatus()};It.version="19.1.1"});var Vh=Ut((h_,Bh)=>{"use strict";function Uh(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__=="undefined"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(Uh)}catch(e){console.error(e)}}Uh(),Bh.exports=Mh()});var Pb=Ut(cu=>{"use strict";var vt=Lh(),lv=Je(),QE=Vh();function M(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 sv(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function jl(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 ov(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 Hh(e){if(jl(e)!==e)throw Error(M(188))}function FE(e){var t=e.alternate;if(!t){if(t=jl(e),t===null)throw Error(M(188));return t!==e?null:e}for(var n=e,a=t;;){var i=n.return;if(i===null)break;var r=i.alternate;if(r===null){if(a=i.return,a!==null){n=a;continue}break}if(i.child===r.child){for(r=i.child;r;){if(r===n)return Hh(i),e;if(r===a)return Hh(i),t;r=r.sibling}throw Error(M(188))}if(n.return!==a.return)n=i,a=r;else{for(var l=!1,s=i.child;s;){if(s===n){l=!0,n=i,a=r;break}if(s===a){l=!0,a=i,n=r;break}s=s.sibling}if(!l){for(s=r.child;s;){if(s===n){l=!0,n=r,a=i;break}if(s===a){l=!0,a=r,n=i;break}s=s.sibling}if(!l)throw Error(M(189))}}if(n.alternate!==a)throw Error(M(190))}if(n.tag!==3)throw Error(M(188));return n.stateNode.current===n?e:t}function uv(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=uv(e),t!==null)return t;e=e.sibling}return null}var Ge=Object.assign,ZE=Symbol.for("react.element"),js=Symbol.for("react.transitional.element"),cl=Symbol.for("react.portal"),Ji=Symbol.for("react.fragment"),cv=Symbol.for("react.strict_mode"),ef=Symbol.for("react.profiler"),JE=Symbol.for("react.provider"),fv=Symbol.for("react.consumer"),ra=Symbol.for("react.context"),Jf=Symbol.for("react.forward_ref"),tf=Symbol.for("react.suspense"),nf=Symbol.for("react.suspense_list"),$f=Symbol.for("react.memo"),wa=Symbol.for("react.lazy");Symbol.for("react.scope");var af=Symbol.for("react.activity");Symbol.for("react.legacy_hidden");Symbol.for("react.tracing_marker");var $E=Symbol.for("react.memo_cache_sentinel");Symbol.for("react.view_transition");var Ph=Symbol.iterator;function nl(e){return e===null||typeof e!="object"?null:(e=Ph&&e[Ph]||e["@@iterator"],typeof e=="function"?e:null)}var KE=Symbol.for("react.client.reference");function rf(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===KE?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case Ji:return"Fragment";case ef:return"Profiler";case cv:return"StrictMode";case tf:return"Suspense";case nf:return"SuspenseList";case af:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case cl:return"Portal";case ra:return(e.displayName||"Context")+".Provider";case fv:return(e._context.displayName||"Context")+".Consumer";case Jf:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case $f:return t=e.displayName||null,t!==null?t:rf(e.type)||"Memo";case wa:t=e._payload,e=e._init;try{return rf(e(t))}catch(n){}}return null}var fl=Array.isArray,ue=lv.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Te=QE.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ui={pending:!1,data:null,method:null,action:null},lf=[],$i=-1;function Jn(e){return{current:e}}function xt(e){0>$i||(e.current=lf[$i],lf[$i]=null,$i--)}function Ze(e,t){$i++,lf[$i]=e.current,e.current=t}var Qn=Jn(null),Cl=Jn(null),Ua=Jn(null),bo=Jn(null);function So(e,t){switch(Ze(Ua,t),Ze(Cl,e),Ze(Qn,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?Xg(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=Xg(t),e=Cb(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}xt(Qn),Ze(Qn,e)}function gr(){xt(Qn),xt(Cl),xt(Ua)}function sf(e){e.memoizedState!==null&&Ze(bo,e);var t=Qn.current,n=Cb(t,e.type);t!==n&&(Ze(Cl,e),Ze(Qn,n))}function xo(e){Cl.current===e&&(xt(Qn),xt(Cl)),bo.current===e&&(xt(bo),Vl._currentValue=ui)}var of=Object.prototype.hasOwnProperty,Kf=vt.unstable_scheduleCallback,Ec=vt.unstable_cancelCallback,WE=vt.unstable_shouldYield,ek=vt.unstable_requestPaint,Fn=vt.unstable_now,tk=vt.unstable_getCurrentPriorityLevel,dv=vt.unstable_ImmediatePriority,pv=vt.unstable_UserBlockingPriority,No=vt.unstable_NormalPriority,nk=vt.unstable_LowPriority,mv=vt.unstable_IdlePriority,ak=vt.log,ik=vt.unstable_setDisableYieldValue,Yl=null,hn=null;function Oa(e){if(typeof ak=="function"&&ik(e),hn&&typeof hn.setStrictMode=="function")try{hn.setStrictMode(Yl,e)}catch(t){}}var gn=Math.clz32?Math.clz32:sk,rk=Math.log,lk=Math.LN2;function sk(e){return e>>>=0,e===0?32:31-(rk(e)/lk|0)|0}var Ys=256,Is=4194304;function li(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:case 262144:case 524288:case 1048576:case 2097152:return e&4194048;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 Zo(e,t,n){var a=e.pendingLanes;if(a===0)return 0;var i=0,r=e.suspendedLanes,l=e.pingedLanes;e=e.warmLanes;var s=a&134217727;return s!==0?(a=s&~r,a!==0?i=li(a):(l&=s,l!==0?i=li(l):n||(n=s&~e,n!==0&&(i=li(n))))):(s=a&~r,s!==0?i=li(s):l!==0?i=li(l):n||(n=a&~e,n!==0&&(i=li(n)))),i===0?0:t!==0&&t!==i&&(t&r)===0&&(r=i&-i,n=t&-t,r>=n||r===32&&(n&4194048)!==0)?t:i}function Il(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function ok(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 hv(){var e=Ys;return Ys<<=1,(Ys&4194048)===0&&(Ys=256),e}function gv(){var e=Is;return Is<<=1,(Is&62914560)===0&&(Is=4194304),e}function kc(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Gl(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function uk(e,t,n,a,i,r){var l=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 s=e.entanglements,o=e.expirationTimes,u=e.hiddenUpdates;for(n=l&~n;0<n;){var c=31-gn(n),p=1<<c;s[c]=0,o[c]=-1;var d=u[c];if(d!==null)for(u[c]=null,c=0;c<d.length;c++){var f=d[c];f!==null&&(f.lane&=-536870913)}n&=~p}a!==0&&vv(e,a,0),r!==0&&i===0&&e.tag!==0&&(e.suspendedLanes|=r&~(l&~t))}function vv(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var a=31-gn(t);e.entangledLanes|=t,e.entanglements[a]=e.entanglements[a]|1073741824|n&4194090}function yv(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var a=31-gn(n),i=1<<a;i&t|e[a]&t&&(e[a]|=t),n&=~i}}function Wf(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 ed(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function bv(){var e=Te.p;return e!==0?e:(e=window.event,e===void 0?32:Vb(e.type))}function ck(e,t){var n=Te.p;try{return Te.p=e,t()}finally{Te.p=n}}var Qa=Math.random().toString(36).slice(2),Vt="__reactFiber$"+Qa,en="__reactProps$"+Qa,Ar="__reactContainer$"+Qa,uf="__reactEvents$"+Qa,fk="__reactListeners$"+Qa,dk="__reactHandles$"+Qa,qh="__reactResources$"+Qa,Xl="__reactMarker$"+Qa;function td(e){delete e[Vt],delete e[en],delete e[uf],delete e[fk],delete e[dk]}function Ki(e){var t=e[Vt];if(t)return t;for(var n=e.parentNode;n;){if(t=n[Ar]||n[Vt]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=Zg(e);e!==null;){if(n=e[Vt])return n;e=Zg(e)}return t}e=n,n=e.parentNode}return null}function Cr(e){if(e=e[Vt]||e[Ar]){var t=e.tag;if(t===5||t===6||t===13||t===26||t===27||t===3)return e}return null}function dl(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(M(33))}function or(e){var t=e[qh];return t||(t=e[qh]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function bt(e){e[Xl]=!0}var Sv=new Set,xv={};function Si(e,t){vr(e,t),vr(e+"Capture",t)}function vr(e,t){for(xv[e]=t,e=0;e<t.length;e++)Sv.add(t[e])}var pk=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]*$"),jh={},Yh={};function mk(e){return of.call(Yh,e)?!0:of.call(jh,e)?!1:pk.test(e)?Yh[e]=!0:(jh[e]=!0,!1)}function ro(e,t,n){if(mk(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 Gs(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 ta(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)}}var Tc,Ih;function Qi(e){if(Tc===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);Tc=t&&t[1]||"",Ih=-1<n.stack.indexOf(`
1
+ "use strict";var LuaApp=(()=>{var wE=Object.create;var Vl=Object.defineProperty,AE=Object.defineProperties,CE=Object.getOwnPropertyDescriptor,RE=Object.getOwnPropertyDescriptors,_E=Object.getOwnPropertyNames,Bl=Object.getOwnPropertySymbols,DE=Object.getPrototypeOf,du=Object.prototype.hasOwnProperty,uh=Object.prototype.propertyIsEnumerable;var dh=Math.pow,ch=(e,t,n)=>t in e?Vl(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,ee=(e,t)=>{for(var n in t||(t={}))du.call(t,n)&&ch(e,n,t[n]);if(Bl)for(var n of Bl(t))uh.call(t,n)&&ch(e,n,t[n]);return e},tt=(e,t)=>AE(e,RE(t));var fh=(e,t)=>{var n={};for(var a in e)du.call(e,a)&&t.indexOf(a)<0&&(n[a]=e[a]);if(e!=null&&Bl)for(var a of Bl(e))t.indexOf(a)<0&&uh.call(e,a)&&(n[a]=e[a]);return n};var N=(e,t)=>()=>(e&&(t=e(e=0)),t);var Bt=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),fu=(e,t)=>{for(var n in t)Vl(e,n,{get:t[n],enumerable:!0})},OE=(e,t,n,a)=>{if(t&&typeof t=="object"||typeof t=="function")for(let r of _E(t))!du.call(e,r)&&r!==n&&Vl(e,r,{get:()=>t[r],enumerable:!(a=CE(t,r))||a.enumerable});return e};var Z=(e,t,n)=>(n=e!=null?wE(DE(e)):{},OE(t||!e||!e.__esModule?Vl(n,"default",{value:e,enumerable:!0}):n,e));var O=(e,t,n)=>new Promise((a,r)=>{var i=o=>{try{l(n.next(o))}catch(c){r(c)}},s=o=>{try{l(n.throw(o))}catch(c){r(c)}},l=o=>o.done?a(o.value):Promise.resolve(o.value).then(i,s);l((n=n.apply(e,t)).next())});var kh=Bt(ge=>{"use strict";var mu=Symbol.for("react.transitional.element"),LE=Symbol.for("react.portal"),zE=Symbol.for("react.fragment"),ME=Symbol.for("react.strict_mode"),UE=Symbol.for("react.profiler"),PE=Symbol.for("react.consumer"),BE=Symbol.for("react.context"),VE=Symbol.for("react.forward_ref"),HE=Symbol.for("react.suspense"),qE=Symbol.for("react.memo"),yh=Symbol.for("react.lazy"),ph=Symbol.iterator;function jE(e){return e===null||typeof e!="object"?null:(e=ph&&e[ph]||e["@@iterator"],typeof e=="function"?e:null)}var bh={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},xh=Object.assign,Sh={};function Ir(e,t,n){this.props=e,this.context=t,this.refs=Sh,this.updater=n||bh}Ir.prototype.isReactComponent={};Ir.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=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,e,t,"setState")};Ir.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function Nh(){}Nh.prototype=Ir.prototype;function hu(e,t,n){this.props=e,this.context=t,this.refs=Sh,this.updater=n||bh}var gu=hu.prototype=new Nh;gu.constructor=hu;xh(gu,Ir.prototype);gu.isPureReactComponent=!0;var mh=Array.isArray,Ze={H:null,A:null,T:null,S:null,V:null},Eh=Object.prototype.hasOwnProperty;function vu(e,t,n,a,r,i){return n=i.ref,{$$typeof:mu,type:e,key:t,ref:n!==void 0?n:null,props:i}}function IE(e,t){return vu(e.type,t,void 0,void 0,void 0,e.props)}function yu(e){return typeof e=="object"&&e!==null&&e.$$typeof===mu}function YE(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var hh=/\/+/g;function pu(e,t){return typeof e=="object"&&e!==null&&e.key!=null?YE(""+e.key):t.toString(36)}function gh(){}function GE(e){switch(e.status){case"fulfilled":return e.value;case"rejected":throw e.reason;default:switch(typeof e.status=="string"?e.then(gh,gh):(e.status="pending",e.then(function(t){e.status==="pending"&&(e.status="fulfilled",e.value=t)},function(t){e.status==="pending"&&(e.status="rejected",e.reason=t)})),e.status){case"fulfilled":return e.value;case"rejected":throw e.reason}}throw e}function jr(e,t,n,a,r){var i=typeof e;(i==="undefined"||i==="boolean")&&(e=null);var s=!1;if(e===null)s=!0;else switch(i){case"bigint":case"string":case"number":s=!0;break;case"object":switch(e.$$typeof){case mu:case LE:s=!0;break;case yh:return s=e._init,jr(s(e._payload),t,n,a,r)}}if(s)return r=r(e),s=a===""?"."+pu(e,0):a,mh(r)?(n="",s!=null&&(n=s.replace(hh,"$&/")+"/"),jr(r,t,n,"",function(c){return c})):r!=null&&(yu(r)&&(r=IE(r,n+(r.key==null||e&&e.key===r.key?"":(""+r.key).replace(hh,"$&/")+"/")+s)),t.push(r)),1;s=0;var l=a===""?".":a+":";if(mh(e))for(var o=0;o<e.length;o++)a=e[o],i=l+pu(a,o),s+=jr(a,t,n,i,r);else if(o=jE(e),typeof o=="function")for(e=o.call(e),o=0;!(a=e.next()).done;)a=a.value,i=l+pu(a,o++),s+=jr(a,t,n,i,r);else if(i==="object"){if(typeof e.then=="function")return jr(GE(e),t,n,a,r);throw t=String(e),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.")}return s}function Hl(e,t,n){if(e==null)return e;var a=[],r=0;return jr(e,a,"","",function(i){return t.call(n,i,r++)}),a}function XE(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(n){(e._status===0||e._status===-1)&&(e._status=1,e._result=n)},function(n){(e._status===0||e._status===-1)&&(e._status=2,e._result=n)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var vh=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)};function QE(){}ge.Children={map:Hl,forEach:function(e,t,n){Hl(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return Hl(e,function(){t++}),t},toArray:function(e){return Hl(e,function(t){return t})||[]},only:function(e){if(!yu(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};ge.Component=Ir;ge.Fragment=zE;ge.Profiler=UE;ge.PureComponent=hu;ge.StrictMode=ME;ge.Suspense=HE;ge.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=Ze;ge.__COMPILER_RUNTIME={__proto__:null,c:function(e){return Ze.H.useMemoCache(e)}};ge.cache=function(e){return function(){return e.apply(null,arguments)}};ge.cloneElement=function(e,t,n){if(e==null)throw Error("The argument must be a React element, but you passed "+e+".");var a=xh({},e.props),r=e.key,i=void 0;if(t!=null)for(s in t.ref!==void 0&&(i=void 0),t.key!==void 0&&(r=""+t.key),t)!Eh.call(t,s)||s==="key"||s==="__self"||s==="__source"||s==="ref"&&t.ref===void 0||(a[s]=t[s]);var s=arguments.length-2;if(s===1)a.children=n;else if(1<s){for(var l=Array(s),o=0;o<s;o++)l[o]=arguments[o+2];a.children=l}return vu(e.type,r,void 0,void 0,i,a)};ge.createContext=function(e){return e={$$typeof:BE,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null},e.Provider=e,e.Consumer={$$typeof:PE,_context:e},e};ge.createElement=function(e,t,n){var a,r={},i=null;if(t!=null)for(a in t.key!==void 0&&(i=""+t.key),t)Eh.call(t,a)&&a!=="key"&&a!=="__self"&&a!=="__source"&&(r[a]=t[a]);var s=arguments.length-2;if(s===1)r.children=n;else if(1<s){for(var l=Array(s),o=0;o<s;o++)l[o]=arguments[o+2];r.children=l}if(e&&e.defaultProps)for(a in s=e.defaultProps,s)r[a]===void 0&&(r[a]=s[a]);return vu(e,i,void 0,void 0,null,r)};ge.createRef=function(){return{current:null}};ge.forwardRef=function(e){return{$$typeof:VE,render:e}};ge.isValidElement=yu;ge.lazy=function(e){return{$$typeof:yh,_payload:{_status:-1,_result:e},_init:XE}};ge.memo=function(e,t){return{$$typeof:qE,type:e,compare:t===void 0?null:t}};ge.startTransition=function(e){var t=Ze.T,n={};Ze.T=n;try{var a=e(),r=Ze.S;r!==null&&r(n,a),typeof a=="object"&&a!==null&&typeof a.then=="function"&&a.then(QE,vh)}catch(i){vh(i)}finally{Ze.T=t}};ge.unstable_useCacheRefresh=function(){return Ze.H.useCacheRefresh()};ge.use=function(e){return Ze.H.use(e)};ge.useActionState=function(e,t,n){return Ze.H.useActionState(e,t,n)};ge.useCallback=function(e,t){return Ze.H.useCallback(e,t)};ge.useContext=function(e){return Ze.H.useContext(e)};ge.useDebugValue=function(){};ge.useDeferredValue=function(e,t){return Ze.H.useDeferredValue(e,t)};ge.useEffect=function(e,t,n){var a=Ze.H;if(typeof n=="function")throw Error("useEffect CRUD overload is not enabled in this build of React.");return a.useEffect(e,t)};ge.useId=function(){return Ze.H.useId()};ge.useImperativeHandle=function(e,t,n){return Ze.H.useImperativeHandle(e,t,n)};ge.useInsertionEffect=function(e,t){return Ze.H.useInsertionEffect(e,t)};ge.useLayoutEffect=function(e,t){return Ze.H.useLayoutEffect(e,t)};ge.useMemo=function(e,t){return Ze.H.useMemo(e,t)};ge.useOptimistic=function(e,t){return Ze.H.useOptimistic(e,t)};ge.useReducer=function(e,t,n){return Ze.H.useReducer(e,t,n)};ge.useRef=function(e){return Ze.H.useRef(e)};ge.useState=function(e){return Ze.H.useState(e)};ge.useSyncExternalStore=function(e,t,n){return Ze.H.useSyncExternalStore(e,t,n)};ge.useTransition=function(){return Ze.H.useTransition()};ge.version="19.1.1"});var $e=Bt((gR,Th)=>{"use strict";Th.exports=kh()});var Mh=Bt(Je=>{"use strict";function Nu(e,t){var n=e.length;e.push(t);e:for(;0<n;){var a=n-1>>>1,r=e[a];if(0<ql(r,t))e[a]=t,e[n]=r,n=a;else break e}}function Gn(e){return e.length===0?null:e[0]}function Il(e){if(e.length===0)return null;var t=e[0],n=e.pop();if(n!==t){e[0]=n;e:for(var a=0,r=e.length,i=r>>>1;a<i;){var s=2*(a+1)-1,l=e[s],o=s+1,c=e[o];if(0>ql(l,n))o<r&&0>ql(c,l)?(e[a]=c,e[o]=n,a=o):(e[a]=l,e[s]=n,a=s);else if(o<r&&0>ql(c,n))e[a]=c,e[o]=n,a=o;else break e}}return t}function ql(e,t){var n=e.sortIndex-t.sortIndex;return n!==0?n:e.id-t.id}Je.unstable_now=void 0;typeof performance=="object"&&typeof performance.now=="function"?(wh=performance,Je.unstable_now=function(){return wh.now()}):(bu=Date,Ah=bu.now(),Je.unstable_now=function(){return bu.now()-Ah});var wh,bu,Ah,na=[],ka=[],FE=1,Tn=null,Vt=3,Eu=!1,es=!1,ts=!1,ku=!1,_h=typeof setTimeout=="function"?setTimeout:null,Dh=typeof clearTimeout=="function"?clearTimeout:null,Ch=typeof setImmediate!="undefined"?setImmediate:null;function jl(e){for(var t=Gn(ka);t!==null;){if(t.callback===null)Il(ka);else if(t.startTime<=e)Il(ka),t.sortIndex=t.expirationTime,Nu(na,t);else break;t=Gn(ka)}}function Tu(e){if(ts=!1,jl(e),!es)if(Gn(na)!==null)es=!0,Gr||(Gr=!0,Yr());else{var t=Gn(ka);t!==null&&wu(Tu,t.startTime-e)}}var Gr=!1,ns=-1,Oh=5,Lh=-1;function zh(){return ku?!0:!(Je.unstable_now()-Lh<Oh)}function xu(){if(ku=!1,Gr){var e=Je.unstable_now();Lh=e;var t=!0;try{e:{es=!1,ts&&(ts=!1,Dh(ns),ns=-1),Eu=!0;var n=Vt;try{t:{for(jl(e),Tn=Gn(na);Tn!==null&&!(Tn.expirationTime>e&&zh());){var a=Tn.callback;if(typeof a=="function"){Tn.callback=null,Vt=Tn.priorityLevel;var r=a(Tn.expirationTime<=e);if(e=Je.unstable_now(),typeof r=="function"){Tn.callback=r,jl(e),t=!0;break t}Tn===Gn(na)&&Il(na),jl(e)}else Il(na);Tn=Gn(na)}if(Tn!==null)t=!0;else{var i=Gn(ka);i!==null&&wu(Tu,i.startTime-e),t=!1}}break e}finally{Tn=null,Vt=n,Eu=!1}t=void 0}}finally{t?Yr():Gr=!1}}}var Yr;typeof Ch=="function"?Yr=function(){Ch(xu)}:typeof MessageChannel!="undefined"?(Su=new MessageChannel,Rh=Su.port2,Su.port1.onmessage=xu,Yr=function(){Rh.postMessage(null)}):Yr=function(){_h(xu,0)};var Su,Rh;function wu(e,t){ns=_h(function(){e(Je.unstable_now())},t)}Je.unstable_IdlePriority=5;Je.unstable_ImmediatePriority=1;Je.unstable_LowPriority=4;Je.unstable_NormalPriority=3;Je.unstable_Profiling=null;Je.unstable_UserBlockingPriority=2;Je.unstable_cancelCallback=function(e){e.callback=null};Je.unstable_forceFrameRate=function(e){0>e||125<e?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):Oh=0<e?Math.floor(1e3/e):5};Je.unstable_getCurrentPriorityLevel=function(){return Vt};Je.unstable_next=function(e){switch(Vt){case 1:case 2:case 3:var t=3;break;default:t=Vt}var n=Vt;Vt=t;try{return e()}finally{Vt=n}};Je.unstable_requestPaint=function(){ku=!0};Je.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=Vt;Vt=e;try{return t()}finally{Vt=n}};Je.unstable_scheduleCallback=function(e,t,n){var a=Je.unstable_now();switch(typeof n=="object"&&n!==null?(n=n.delay,n=typeof n=="number"&&0<n?a+n:a):n=a,e){case 1:var r=-1;break;case 2:r=250;break;case 5:r=1073741823;break;case 4:r=1e4;break;default:r=5e3}return r=n+r,e={id:FE++,callback:t,priorityLevel:e,startTime:n,expirationTime:r,sortIndex:-1},n>a?(e.sortIndex=n,Nu(ka,e),Gn(na)===null&&e===Gn(ka)&&(ts?(Dh(ns),ns=-1):ts=!0,wu(Tu,n-a))):(e.sortIndex=r,Nu(na,e),es||Eu||(es=!0,Gr||(Gr=!0,Yr()))),e};Je.unstable_shouldYield=zh;Je.unstable_wrapCallback=function(e){var t=Vt;return function(){var n=Vt;Vt=t;try{return e.apply(this,arguments)}finally{Vt=n}}}});var Ph=Bt((yR,Uh)=>{"use strict";Uh.exports=Mh()});var Vh=Bt(Xt=>{"use strict";var ZE=$e();function Bh(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 Ta(){}var Gt={d:{f:Ta,r:function(){throw Error(Bh(522))},D:Ta,C:Ta,L:Ta,m:Ta,X:Ta,S:Ta,M:Ta},p:0,findDOMNode:null},$E=Symbol.for("react.portal");function JE(e,t,n){var a=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:$E,key:a==null?null:""+a,children:e,containerInfo:t,implementation:n}}var as=ZE.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function Yl(e,t){if(e==="font")return"";if(typeof t=="string")return t==="use-credentials"?t:""}Xt.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=Gt;Xt.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)throw Error(Bh(299));return JE(e,t,null,n)};Xt.flushSync=function(e){var t=as.T,n=Gt.p;try{if(as.T=null,Gt.p=2,e)return e()}finally{as.T=t,Gt.p=n,Gt.d.f()}};Xt.preconnect=function(e,t){typeof e=="string"&&(t?(t=t.crossOrigin,t=typeof t=="string"?t==="use-credentials"?t:"":void 0):t=null,Gt.d.C(e,t))};Xt.prefetchDNS=function(e){typeof e=="string"&&Gt.d.D(e)};Xt.preinit=function(e,t){if(typeof e=="string"&&t&&typeof t.as=="string"){var n=t.as,a=Yl(n,t.crossOrigin),r=typeof t.integrity=="string"?t.integrity:void 0,i=typeof t.fetchPriority=="string"?t.fetchPriority:void 0;n==="style"?Gt.d.S(e,typeof t.precedence=="string"?t.precedence:void 0,{crossOrigin:a,integrity:r,fetchPriority:i}):n==="script"&&Gt.d.X(e,{crossOrigin:a,integrity:r,fetchPriority:i,nonce:typeof t.nonce=="string"?t.nonce:void 0})}};Xt.preinitModule=function(e,t){if(typeof e=="string")if(typeof t=="object"&&t!==null){if(t.as==null||t.as==="script"){var n=Yl(t.as,t.crossOrigin);Gt.d.M(e,{crossOrigin:n,integrity:typeof t.integrity=="string"?t.integrity:void 0,nonce:typeof t.nonce=="string"?t.nonce:void 0})}}else t==null&&Gt.d.M(e)};Xt.preload=function(e,t){if(typeof e=="string"&&typeof t=="object"&&t!==null&&typeof t.as=="string"){var n=t.as,a=Yl(n,t.crossOrigin);Gt.d.L(e,n,{crossOrigin:a,integrity:typeof t.integrity=="string"?t.integrity:void 0,nonce:typeof t.nonce=="string"?t.nonce:void 0,type:typeof t.type=="string"?t.type:void 0,fetchPriority:typeof t.fetchPriority=="string"?t.fetchPriority:void 0,referrerPolicy:typeof t.referrerPolicy=="string"?t.referrerPolicy:void 0,imageSrcSet:typeof t.imageSrcSet=="string"?t.imageSrcSet:void 0,imageSizes:typeof t.imageSizes=="string"?t.imageSizes:void 0,media:typeof t.media=="string"?t.media:void 0})}};Xt.preloadModule=function(e,t){if(typeof e=="string")if(t){var n=Yl(t.as,t.crossOrigin);Gt.d.m(e,{as:typeof t.as=="string"&&t.as!=="script"?t.as:void 0,crossOrigin:n,integrity:typeof t.integrity=="string"?t.integrity:void 0})}else Gt.d.m(e)};Xt.requestFormReset=function(e){Gt.d.r(e)};Xt.unstable_batchedUpdates=function(e,t){return e(t)};Xt.useFormState=function(e,t,n){return as.H.useFormState(e,t,n)};Xt.useFormStatus=function(){return as.H.useHostTransitionStatus()};Xt.version="19.1.1"});var jh=Bt((xR,qh)=>{"use strict";function Hh(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__=="undefined"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(Hh)}catch(e){console.error(e)}}Hh(),qh.exports=Vh()});var Yb=Bt(pc=>{"use strict";var xt=Ph(),uv=$e(),KE=jh();function M(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 dv(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function Ys(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 fv(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 Ih(e){if(Ys(e)!==e)throw Error(M(188))}function WE(e){var t=e.alternate;if(!t){if(t=Ys(e),t===null)throw Error(M(188));return t!==e?null:e}for(var n=e,a=t;;){var r=n.return;if(r===null)break;var i=r.alternate;if(i===null){if(a=r.return,a!==null){n=a;continue}break}if(r.child===i.child){for(i=r.child;i;){if(i===n)return Ih(r),e;if(i===a)return Ih(r),t;i=i.sibling}throw Error(M(188))}if(n.return!==a.return)n=r,a=i;else{for(var s=!1,l=r.child;l;){if(l===n){s=!0,n=r,a=i;break}if(l===a){s=!0,a=r,n=i;break}l=l.sibling}if(!s){for(l=i.child;l;){if(l===n){s=!0,n=i,a=r;break}if(l===a){s=!0,a=i,n=r;break}l=l.sibling}if(!s)throw Error(M(189))}}if(n.alternate!==a)throw Error(M(190))}if(n.tag!==3)throw Error(M(188));return n.stateNode.current===n?e:t}function pv(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=pv(e),t!==null)return t;e=e.sibling}return null}var Qe=Object.assign,ek=Symbol.for("react.element"),Gl=Symbol.for("react.transitional.element"),fs=Symbol.for("react.portal"),Kr=Symbol.for("react.fragment"),mv=Symbol.for("react.strict_mode"),rd=Symbol.for("react.profiler"),tk=Symbol.for("react.provider"),hv=Symbol.for("react.consumer"),la=Symbol.for("react.context"),Wd=Symbol.for("react.forward_ref"),id=Symbol.for("react.suspense"),sd=Symbol.for("react.suspense_list"),ef=Symbol.for("react.memo"),Ca=Symbol.for("react.lazy");Symbol.for("react.scope");var ld=Symbol.for("react.activity");Symbol.for("react.legacy_hidden");Symbol.for("react.tracing_marker");var nk=Symbol.for("react.memo_cache_sentinel");Symbol.for("react.view_transition");var Yh=Symbol.iterator;function rs(e){return e===null||typeof e!="object"?null:(e=Yh&&e[Yh]||e["@@iterator"],typeof e=="function"?e:null)}var ak=Symbol.for("react.client.reference");function od(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===ak?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case Kr:return"Fragment";case rd:return"Profiler";case mv:return"StrictMode";case id:return"Suspense";case sd:return"SuspenseList";case ld:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case fs:return"Portal";case la:return(e.displayName||"Context")+".Provider";case hv:return(e._context.displayName||"Context")+".Consumer";case Wd:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case ef:return t=e.displayName||null,t!==null?t:od(e.type)||"Memo";case Ca:t=e._payload,e=e._init;try{return od(e(t))}catch(n){}}return null}var ps=Array.isArray,ue=uv.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Ce=KE.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,dr={pending:!1,data:null,method:null,action:null},cd=[],Wr=-1;function Kn(e){return{current:e}}function kt(e){0>Wr||(e.current=cd[Wr],cd[Wr]=null,Wr--)}function We(e,t){Wr++,cd[Wr]=e.current,e.current=t}var Zn=Kn(null),_s=Kn(null),Ba=Kn(null),No=Kn(null);function Eo(e,t){switch(We(Ba,t),We(_s,e),We(Zn,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?$g(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=$g(t),e=Ob(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}kt(Zn),We(Zn,e)}function yi(){kt(Zn),kt(_s),kt(Ba)}function ud(e){e.memoizedState!==null&&We(No,e);var t=Zn.current,n=Ob(t,e.type);t!==n&&(We(_s,e),We(Zn,n))}function ko(e){_s.current===e&&(kt(Zn),kt(_s)),No.current===e&&(kt(No),Hs._currentValue=dr)}var dd=Object.prototype.hasOwnProperty,tf=xt.unstable_scheduleCallback,Au=xt.unstable_cancelCallback,rk=xt.unstable_shouldYield,ik=xt.unstable_requestPaint,$n=xt.unstable_now,sk=xt.unstable_getCurrentPriorityLevel,gv=xt.unstable_ImmediatePriority,vv=xt.unstable_UserBlockingPriority,To=xt.unstable_NormalPriority,lk=xt.unstable_LowPriority,yv=xt.unstable_IdlePriority,ok=xt.log,ck=xt.unstable_setDisableYieldValue,Gs=null,vn=null;function za(e){if(typeof ok=="function"&&ck(e),vn&&typeof vn.setStrictMode=="function")try{vn.setStrictMode(Gs,e)}catch(t){}}var yn=Math.clz32?Math.clz32:fk,uk=Math.log,dk=Math.LN2;function fk(e){return e>>>=0,e===0?32:31-(uk(e)/dk|0)|0}var Xl=256,Ql=4194304;function or(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:case 262144:case 524288:case 1048576:case 2097152:return e&4194048;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 Ko(e,t,n){var a=e.pendingLanes;if(a===0)return 0;var r=0,i=e.suspendedLanes,s=e.pingedLanes;e=e.warmLanes;var l=a&134217727;return l!==0?(a=l&~i,a!==0?r=or(a):(s&=l,s!==0?r=or(s):n||(n=l&~e,n!==0&&(r=or(n))))):(l=a&~i,l!==0?r=or(l):s!==0?r=or(s):n||(n=a&~e,n!==0&&(r=or(n)))),r===0?0:t!==0&&t!==r&&(t&i)===0&&(i=r&-r,n=t&-t,i>=n||i===32&&(n&4194048)!==0)?t:r}function Xs(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function pk(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 bv(){var e=Xl;return Xl<<=1,(Xl&4194048)===0&&(Xl=256),e}function xv(){var e=Ql;return Ql<<=1,(Ql&62914560)===0&&(Ql=4194304),e}function Cu(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Qs(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function mk(e,t,n,a,r,i){var s=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 l=e.entanglements,o=e.expirationTimes,c=e.hiddenUpdates;for(n=s&~n;0<n;){var u=31-yn(n),p=1<<u;l[u]=0,o[u]=-1;var f=c[u];if(f!==null)for(c[u]=null,u=0;u<f.length;u++){var d=f[u];d!==null&&(d.lane&=-536870913)}n&=~p}a!==0&&Sv(e,a,0),i!==0&&r===0&&e.tag!==0&&(e.suspendedLanes|=i&~(s&~t))}function Sv(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var a=31-yn(t);e.entangledLanes|=t,e.entanglements[a]=e.entanglements[a]|1073741824|n&4194090}function Nv(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var a=31-yn(n),r=1<<a;r&t|e[a]&t&&(e[a]|=t),n&=~r}}function nf(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 af(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function Ev(){var e=Ce.p;return e!==0?e:(e=window.event,e===void 0?32:jb(e.type))}function hk(e,t){var n=Ce.p;try{return Ce.p=e,t()}finally{Ce.p=n}}var Za=Math.random().toString(36).slice(2),Ht="__reactFiber$"+Za,rn="__reactProps$"+Za,Ri="__reactContainer$"+Za,fd="__reactEvents$"+Za,gk="__reactListeners$"+Za,vk="__reactHandles$"+Za,Gh="__reactResources$"+Za,Fs="__reactMarker$"+Za;function rf(e){delete e[Ht],delete e[rn],delete e[fd],delete e[gk],delete e[vk]}function ei(e){var t=e[Ht];if(t)return t;for(var n=e.parentNode;n;){if(t=n[Ri]||n[Ht]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=Wg(e);e!==null;){if(n=e[Ht])return n;e=Wg(e)}return t}e=n,n=e.parentNode}return null}function _i(e){if(e=e[Ht]||e[Ri]){var t=e.tag;if(t===5||t===6||t===13||t===26||t===27||t===3)return e}return null}function ms(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(M(33))}function ui(e){var t=e[Gh];return t||(t=e[Gh]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function Nt(e){e[Fs]=!0}var kv=new Set,Tv={};function Nr(e,t){bi(e,t),bi(e+"Capture",t)}function bi(e,t){for(Tv[e]=t,e=0;e<t.length;e++)kv.add(t[e])}var yk=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]*$"),Xh={},Qh={};function bk(e){return dd.call(Qh,e)?!0:dd.call(Xh,e)?!1:yk.test(e)?Qh[e]=!0:(Xh[e]=!0,!1)}function oo(e,t,n){if(bk(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 Fl(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 aa(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)}}var Ru,Fh;function Zr(e){if(Ru===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);Ru=t&&t[1]||"",Fh=-1<n.stack.indexOf(`
2
2
  at`)?" (<anonymous>)":-1<n.stack.indexOf("@")?"@unknown:0:0":""}return`
3
- `+Tc+e+Ih}var wc=!1;function Ac(e,t){if(!e||wc)return"";wc=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var a={DetermineComponentFrameRoot:function(){try{if(t){var p=function(){throw Error()};if(Object.defineProperty(p.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(p,[])}catch(f){var d=f}Reflect.construct(e,[],p)}else{try{p.call()}catch(f){d=f}e.call(p.prototype)}}else{try{throw Error()}catch(f){d=f}(p=e())&&typeof p.catch=="function"&&p.catch(function(){})}}catch(f){if(f&&d&&typeof f.stack=="string")return[f.stack,d.stack]}return[null,null]}};a.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var i=Object.getOwnPropertyDescriptor(a.DetermineComponentFrameRoot,"name");i&&i.configurable&&Object.defineProperty(a.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var r=a.DetermineComponentFrameRoot(),l=r[0],s=r[1];if(l&&s){var o=l.split(`
4
- `),u=s.split(`
5
- `);for(i=a=0;a<o.length&&!o[a].includes("DetermineComponentFrameRoot");)a++;for(;i<u.length&&!u[i].includes("DetermineComponentFrameRoot");)i++;if(a===o.length||i===u.length)for(a=o.length-1,i=u.length-1;1<=a&&0<=i&&o[a]!==u[i];)i--;for(;1<=a&&0<=i;a--,i--)if(o[a]!==u[i]){if(a!==1||i!==1)do if(a--,i--,0>i||o[a]!==u[i]){var c=`
6
- `+o[a].replace(" at new "," at ");return e.displayName&&c.includes("<anonymous>")&&(c=c.replace("<anonymous>",e.displayName)),c}while(1<=a&&0<=i);break}}}finally{wc=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:"")?Qi(n):""}function hk(e){switch(e.tag){case 26:case 27:case 5:return Qi(e.type);case 16:return Qi("Lazy");case 13:return Qi("Suspense");case 19:return Qi("SuspenseList");case 0:case 15:return Ac(e.type,!1);case 11:return Ac(e.type.render,!1);case 1:return Ac(e.type,!0);case 31:return Qi("Activity");default:return""}}function Gh(e){try{var t="";do t+=hk(e),e=e.return;while(e);return t}catch(n){return`
3
+ `+Ru+e+Fh}var _u=!1;function Du(e,t){if(!e||_u)return"";_u=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var a={DetermineComponentFrameRoot:function(){try{if(t){var p=function(){throw Error()};if(Object.defineProperty(p.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(p,[])}catch(d){var f=d}Reflect.construct(e,[],p)}else{try{p.call()}catch(d){f=d}e.call(p.prototype)}}else{try{throw Error()}catch(d){f=d}(p=e())&&typeof p.catch=="function"&&p.catch(function(){})}}catch(d){if(d&&f&&typeof d.stack=="string")return[d.stack,f.stack]}return[null,null]}};a.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var r=Object.getOwnPropertyDescriptor(a.DetermineComponentFrameRoot,"name");r&&r.configurable&&Object.defineProperty(a.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var i=a.DetermineComponentFrameRoot(),s=i[0],l=i[1];if(s&&l){var o=s.split(`
4
+ `),c=l.split(`
5
+ `);for(r=a=0;a<o.length&&!o[a].includes("DetermineComponentFrameRoot");)a++;for(;r<c.length&&!c[r].includes("DetermineComponentFrameRoot");)r++;if(a===o.length||r===c.length)for(a=o.length-1,r=c.length-1;1<=a&&0<=r&&o[a]!==c[r];)r--;for(;1<=a&&0<=r;a--,r--)if(o[a]!==c[r]){if(a!==1||r!==1)do if(a--,r--,0>r||o[a]!==c[r]){var u=`
6
+ `+o[a].replace(" at new "," at ");return e.displayName&&u.includes("<anonymous>")&&(u=u.replace("<anonymous>",e.displayName)),u}while(1<=a&&0<=r);break}}}finally{_u=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:"")?Zr(n):""}function xk(e){switch(e.tag){case 26:case 27:case 5:return Zr(e.type);case 16:return Zr("Lazy");case 13:return Zr("Suspense");case 19:return Zr("SuspenseList");case 0:case 15:return Du(e.type,!1);case 11:return Du(e.type.render,!1);case 1:return Du(e.type,!0);case 31:return Zr("Activity");default:return""}}function Zh(e){try{var t="";do t+=xk(e),e=e.return;while(e);return t}catch(n){return`
7
7
  Error generating stack: `+n.message+`
8
- `+n.stack}}function Tn(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Nv(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function gk(e){var t=Nv(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),a=""+e[t];if(!e.hasOwnProperty(t)&&typeof n!="undefined"&&typeof n.get=="function"&&typeof n.set=="function"){var i=n.get,r=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(l){a=""+l,r.call(this,l)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return a},setValue:function(l){a=""+l},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Eo(e){e._valueTracker||(e._valueTracker=gk(e))}function Ev(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),a="";return e&&(a=Nv(e)?e.checked?"true":"false":e.value),e=a,e!==n?(t.setValue(e),!0):!1}function ko(e){if(e=e||(typeof document!="undefined"?document:void 0),typeof e=="undefined")return null;try{return e.activeElement||e.body}catch(t){return e.body}}var vk=/[\n"\\]/g;function Cn(e){return e.replace(vk,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function cf(e,t,n,a,i,r,l,s){e.name="",l!=null&&typeof l!="function"&&typeof l!="symbol"&&typeof l!="boolean"?e.type=l:e.removeAttribute("type"),t!=null?l==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+Tn(t)):e.value!==""+Tn(t)&&(e.value=""+Tn(t)):l!=="submit"&&l!=="reset"||e.removeAttribute("value"),t!=null?ff(e,l,Tn(t)):n!=null?ff(e,l,Tn(n)):a!=null&&e.removeAttribute("value"),i==null&&r!=null&&(e.defaultChecked=!!r),i!=null&&(e.checked=i&&typeof i!="function"&&typeof i!="symbol"),s!=null&&typeof s!="function"&&typeof s!="symbol"&&typeof s!="boolean"?e.name=""+Tn(s):e.removeAttribute("name")}function kv(e,t,n,a,i,r,l,s){if(r!=null&&typeof r!="function"&&typeof r!="symbol"&&typeof r!="boolean"&&(e.type=r),t!=null||n!=null){if(!(r!=="submit"&&r!=="reset"||t!=null))return;n=n!=null?""+Tn(n):"",t=t!=null?""+Tn(t):n,s||t===e.value||(e.value=t),e.defaultValue=t}a=a!=null?a:i,a=typeof a!="function"&&typeof a!="symbol"&&!!a,e.checked=s?e.checked:!!a,e.defaultChecked=!!a,l!=null&&typeof l!="function"&&typeof l!="symbol"&&typeof l!="boolean"&&(e.name=l)}function ff(e,t,n){t==="number"&&ko(e.ownerDocument)===e||e.defaultValue===""+n||(e.defaultValue=""+n)}function ur(e,t,n,a){if(e=e.options,t){t={};for(var i=0;i<n.length;i++)t["$"+n[i]]=!0;for(n=0;n<e.length;n++)i=t.hasOwnProperty("$"+e[n].value),e[n].selected!==i&&(e[n].selected=i),i&&a&&(e[n].defaultSelected=!0)}else{for(n=""+Tn(n),t=null,i=0;i<e.length;i++){if(e[i].value===n){e[i].selected=!0,a&&(e[i].defaultSelected=!0);return}t!==null||e[i].disabled||(t=e[i])}t!==null&&(t.selected=!0)}}function Tv(e,t,n){if(t!=null&&(t=""+Tn(t),t!==e.value&&(e.value=t),n==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=n!=null?""+Tn(n):""}function wv(e,t,n,a){if(t==null){if(a!=null){if(n!=null)throw Error(M(92));if(fl(a)){if(1<a.length)throw Error(M(93));a=a[0]}n=a}n==null&&(n=""),t=n}n=Tn(t),e.defaultValue=n,a=e.textContent,a===n&&a!==""&&a!==null&&(e.value=a)}function yr(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var yk=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 Xh(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||yk.has(t)?t==="float"?e.cssFloat=n:e[t]=(""+n).trim():e[t]=n+"px"}function Av(e,t,n){if(t!=null&&typeof t!="object")throw Error(M(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 i in t)a=t[i],t.hasOwnProperty(i)&&n[i]!==a&&Xh(e,i,a)}else for(var r in t)t.hasOwnProperty(r)&&Xh(e,r,t[r])}function nd(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 bk=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"]]),Sk=/^[\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 lo(e){return Sk.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}var df=null;function ad(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Wi=null,cr=null;function Qh(e){var t=Cr(e);if(t&&(e=t.stateNode)){var n=e[en]||null;e:switch(e=t.stateNode,t.type){case"input":if(cf(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="'+Cn(""+t)+'"][type="radio"]'),t=0;t<n.length;t++){var a=n[t];if(a!==e&&a.form===e.form){var i=a[en]||null;if(!i)throw Error(M(90));cf(a,i.value,i.defaultValue,i.defaultValue,i.checked,i.defaultChecked,i.type,i.name)}}for(t=0;t<n.length;t++)a=n[t],a.form===e.form&&Ev(a)}break e;case"textarea":Tv(e,n.value,n.defaultValue);break e;case"select":t=n.value,t!=null&&ur(e,!!n.multiple,t,!1)}}}var Cc=!1;function Cv(e,t,n){if(Cc)return e(t,n);Cc=!0;try{var a=e(t);return a}finally{if(Cc=!1,(Wi!==null||cr!==null)&&(ru(),Wi&&(t=Wi,e=cr,cr=Wi=null,Qh(t),e)))for(t=0;t<e.length;t++)Qh(e[t])}}function Rl(e,t){var n=e.stateNode;if(n===null)return null;var a=n[en]||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(M(231,t,typeof n));return n}var da=!(typeof window=="undefined"||typeof window.document=="undefined"||typeof window.document.createElement=="undefined"),pf=!1;if(da)try{Ii={},Object.defineProperty(Ii,"passive",{get:function(){pf=!0}}),window.addEventListener("test",Ii,Ii),window.removeEventListener("test",Ii,Ii)}catch(e){pf=!1}var Ii,La=null,id=null,so=null;function Rv(){if(so)return so;var e,t=id,n=t.length,a,i="value"in La?La.value:La.textContent,r=i.length;for(e=0;e<n&&t[e]===i[e];e++);var l=n-e;for(a=1;a<=l&&t[n-a]===i[r-a];a++);return so=i.slice(e,1<a?1-a:void 0)}function oo(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 Xs(){return!0}function Fh(){return!1}function tn(e){function t(n,a,i,r,l){this._reactName=n,this._targetInst=i,this.type=a,this.nativeEvent=r,this.target=l,this.currentTarget=null;for(var s in e)e.hasOwnProperty(s)&&(n=e[s],this[s]=n?n(r):r[s]);return this.isDefaultPrevented=(r.defaultPrevented!=null?r.defaultPrevented:r.returnValue===!1)?Xs:Fh,this.isPropagationStopped=Fh,this}return Ge(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=Xs)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=Xs)},persist:function(){},isPersistent:Xs}),t}var xi={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Jo=tn(xi),Ql=Ge({},xi,{view:0,detail:0}),xk=tn(Ql),Rc,_c,al,$o=Ge({},Ql,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:rd,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!==al&&(al&&e.type==="mousemove"?(Rc=e.screenX-al.screenX,_c=e.screenY-al.screenY):_c=Rc=0,al=e),Rc)},movementY:function(e){return"movementY"in e?e.movementY:_c}}),Zh=tn($o),Nk=Ge({},$o,{dataTransfer:0}),Ek=tn(Nk),kk=Ge({},Ql,{relatedTarget:0}),Dc=tn(kk),Tk=Ge({},xi,{animationName:0,elapsedTime:0,pseudoElement:0}),wk=tn(Tk),Ak=Ge({},xi,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),Ck=tn(Ak),Rk=Ge({},xi,{data:0}),Jh=tn(Rk),_k={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Dk={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"},Ok={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Lk(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Ok[e])?!!t[e]:!1}function rd(){return Lk}var zk=Ge({},Ql,{key:function(e){if(e.key){var t=_k[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=oo(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?Dk[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:rd,charCode:function(e){return e.type==="keypress"?oo(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?oo(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),Mk=tn(zk),Uk=Ge({},$o,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),$h=tn(Uk),Bk=Ge({},Ql,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:rd}),Vk=tn(Bk),Hk=Ge({},xi,{propertyName:0,elapsedTime:0,pseudoElement:0}),Pk=tn(Hk),qk=Ge({},$o,{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}),jk=tn(qk),Yk=Ge({},xi,{newState:0,oldState:0}),Ik=tn(Yk),Gk=[9,13,27,32],ld=da&&"CompositionEvent"in window,ml=null;da&&"documentMode"in document&&(ml=document.documentMode);var Xk=da&&"TextEvent"in window&&!ml,_v=da&&(!ld||ml&&8<ml&&11>=ml),Kh=" ",Wh=!1;function Dv(e,t){switch(e){case"keyup":return Gk.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Ov(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var er=!1;function Qk(e,t){switch(e){case"compositionend":return Ov(t);case"keypress":return t.which!==32?null:(Wh=!0,Kh);case"textInput":return e=t.data,e===Kh&&Wh?null:e;default:return null}}function Fk(e,t){if(er)return e==="compositionend"||!ld&&Dv(e,t)?(e=Rv(),so=id=La=null,er=!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 _v&&t.locale!=="ko"?null:t.data;default:return null}}var Zk={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 eg(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!Zk[e.type]:t==="textarea"}function Lv(e,t,n,a){Wi?cr?cr.push(a):cr=[a]:Wi=a,t=jo(t,"onChange"),0<t.length&&(n=new Jo("onChange","change",null,n,a),e.push({event:n,listeners:t}))}var hl=null,_l=null;function Jk(e){Tb(e,0)}function Ko(e){var t=dl(e);if(Ev(t))return e}function tg(e,t){if(e==="change")return t}var zv=!1;da&&(da?(Fs="oninput"in document,Fs||(Oc=document.createElement("div"),Oc.setAttribute("oninput","return;"),Fs=typeof Oc.oninput=="function"),Qs=Fs):Qs=!1,zv=Qs&&(!document.documentMode||9<document.documentMode));var Qs,Fs,Oc;function ng(){hl&&(hl.detachEvent("onpropertychange",Mv),_l=hl=null)}function Mv(e){if(e.propertyName==="value"&&Ko(_l)){var t=[];Lv(t,_l,e,ad(e)),Cv(Jk,t)}}function $k(e,t,n){e==="focusin"?(ng(),hl=t,_l=n,hl.attachEvent("onpropertychange",Mv)):e==="focusout"&&ng()}function Kk(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Ko(_l)}function Wk(e,t){if(e==="click")return Ko(t)}function eT(e,t){if(e==="input"||e==="change")return Ko(t)}function tT(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var bn=typeof Object.is=="function"?Object.is:tT;function Dl(e,t){if(bn(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 i=n[a];if(!of.call(t,i)||!bn(e[i],t[i]))return!1}return!0}function ag(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function ig(e,t){var n=ag(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=ag(n)}}function Uv(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Uv(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Bv(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=ko(e.document);t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch(a){n=!1}if(n)e=t.contentWindow;else break;t=ko(e.document)}return t}function sd(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 nT=da&&"documentMode"in document&&11>=document.documentMode,tr=null,mf=null,gl=null,hf=!1;function rg(e,t,n){var a=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;hf||tr==null||tr!==ko(a)||(a=tr,"selectionStart"in a&&sd(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}),gl&&Dl(gl,a)||(gl=a,a=jo(mf,"onSelect"),0<a.length&&(t=new Jo("onSelect","select",null,t,n),e.push({event:t,listeners:a}),t.target=tr)))}function ri(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var nr={animationend:ri("Animation","AnimationEnd"),animationiteration:ri("Animation","AnimationIteration"),animationstart:ri("Animation","AnimationStart"),transitionrun:ri("Transition","TransitionRun"),transitionstart:ri("Transition","TransitionStart"),transitioncancel:ri("Transition","TransitionCancel"),transitionend:ri("Transition","TransitionEnd")},Lc={},Vv={};da&&(Vv=document.createElement("div").style,"AnimationEvent"in window||(delete nr.animationend.animation,delete nr.animationiteration.animation,delete nr.animationstart.animation),"TransitionEvent"in window||delete nr.transitionend.transition);function Ni(e){if(Lc[e])return Lc[e];if(!nr[e])return e;var t=nr[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in Vv)return Lc[e]=t[n];return e}var Hv=Ni("animationend"),Pv=Ni("animationiteration"),qv=Ni("animationstart"),aT=Ni("transitionrun"),iT=Ni("transitionstart"),rT=Ni("transitioncancel"),jv=Ni("transitionend"),Yv=new Map,gf="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(" ");gf.push("scrollEnd");function Pn(e,t){Yv.set(e,t),Si(t,[e])}var lg=new WeakMap;function Rn(e,t){if(typeof e=="object"&&e!==null){var n=lg.get(e);return n!==void 0?n:(t={value:e,source:t,stack:Gh(t)},lg.set(e,t),t)}return{value:e,source:t,stack:Gh(t)}}var kn=[],ar=0,od=0;function Wo(){for(var e=ar,t=od=ar=0;t<e;){var n=kn[t];kn[t++]=null;var a=kn[t];kn[t++]=null;var i=kn[t];kn[t++]=null;var r=kn[t];if(kn[t++]=null,a!==null&&i!==null){var l=a.pending;l===null?i.next=i:(i.next=l.next,l.next=i),a.pending=i}r!==0&&Iv(n,i,r)}}function eu(e,t,n,a){kn[ar++]=e,kn[ar++]=t,kn[ar++]=n,kn[ar++]=a,od|=a,e.lanes|=a,e=e.alternate,e!==null&&(e.lanes|=a)}function ud(e,t,n,a){return eu(e,t,n,a),To(e)}function Rr(e,t){return eu(e,null,null,t),To(e)}function Iv(e,t,n){e.lanes|=n;var a=e.alternate;a!==null&&(a.lanes|=n);for(var i=!1,r=e.return;r!==null;)r.childLanes|=n,a=r.alternate,a!==null&&(a.childLanes|=n),r.tag===22&&(e=r.stateNode,e===null||e._visibility&1||(i=!0)),e=r,r=r.return;return e.tag===3?(r=e.stateNode,i&&t!==null&&(i=31-gn(n),e=r.hiddenUpdates,a=e[i],a===null?e[i]=[t]:a.push(t),t.lane=n|536870912),r):null}function To(e){if(50<wl)throw wl=0,Bf=null,Error(M(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var ir={};function lT(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 mn(e,t,n,a){return new lT(e,t,n,a)}function cd(e){return e=e.prototype,!(!e||!e.isReactComponent)}function ca(e,t){var n=e.alternate;return n===null?(n=mn(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 Gv(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 uo(e,t,n,a,i,r){var l=0;if(a=e,typeof e=="function")cd(e)&&(l=1);else if(typeof e=="string")l=lw(e,n,Qn.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case af:return e=mn(31,n,t,i),e.elementType=af,e.lanes=r,e;case Ji:return ci(n.children,i,r,t);case cv:l=8,i|=24;break;case ef:return e=mn(12,n,t,i|2),e.elementType=ef,e.lanes=r,e;case tf:return e=mn(13,n,t,i),e.elementType=tf,e.lanes=r,e;case nf:return e=mn(19,n,t,i),e.elementType=nf,e.lanes=r,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case JE:case ra:l=10;break e;case fv:l=9;break e;case Jf:l=11;break e;case $f:l=14;break e;case wa:l=16,a=null;break e}l=29,n=Error(M(130,e===null?"null":typeof e,"")),a=null}return t=mn(l,n,t,i),t.elementType=e,t.type=a,t.lanes=r,t}function ci(e,t,n,a){return e=mn(7,e,a,t),e.lanes=n,e}function zc(e,t,n){return e=mn(6,e,null,t),e.lanes=n,e}function Mc(e,t,n){return t=mn(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var rr=[],lr=0,wo=null,Ao=0,wn=[],An=0,fi=null,la=1,sa="";function si(e,t){rr[lr++]=Ao,rr[lr++]=wo,wo=e,Ao=t}function Xv(e,t,n){wn[An++]=la,wn[An++]=sa,wn[An++]=fi,fi=e;var a=la;e=sa;var i=32-gn(a)-1;a&=~(1<<i),n+=1;var r=32-gn(t)+i;if(30<r){var l=i-i%5;r=(a&(1<<l)-1).toString(32),a>>=l,i-=l,la=1<<32-gn(t)+i|n<<i|a,sa=r+e}else la=1<<r|n<<i|a,sa=e}function fd(e){e.return!==null&&(si(e,1),Xv(e,1,0))}function dd(e){for(;e===wo;)wo=rr[--lr],rr[lr]=null,Ao=rr[--lr],rr[lr]=null;for(;e===fi;)fi=wn[--An],wn[An]=null,sa=wn[--An],wn[An]=null,la=wn[--An],wn[An]=null}var Gt=null,et=null,ke=!1,di=null,Gn=!1,vf=Error(M(519));function gi(e){var t=Error(M(418,""));throw Ol(Rn(t,e)),vf}function sg(e){var t=e.stateNode,n=e.type,a=e.memoizedProps;switch(t[Vt]=e,t[en]=a,n){case"dialog":ve("cancel",t),ve("close",t);break;case"iframe":case"object":case"embed":ve("load",t);break;case"video":case"audio":for(n=0;n<Ml.length;n++)ve(Ml[n],t);break;case"source":ve("error",t);break;case"img":case"image":case"link":ve("error",t),ve("load",t);break;case"details":ve("toggle",t);break;case"input":ve("invalid",t),kv(t,a.value,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name,!0),Eo(t);break;case"select":ve("invalid",t);break;case"textarea":ve("invalid",t),wv(t,a.value,a.defaultValue,a.children),Eo(t)}n=a.children,typeof n!="string"&&typeof n!="number"&&typeof n!="bigint"||t.textContent===""+n||a.suppressHydrationWarning===!0||Ab(t.textContent,n)?(a.popover!=null&&(ve("beforetoggle",t),ve("toggle",t)),a.onScroll!=null&&ve("scroll",t),a.onScrollEnd!=null&&ve("scrollend",t),a.onClick!=null&&(t.onclick=ou),t=!0):t=!1,t||gi(e)}function og(e){for(Gt=e.return;Gt;)switch(Gt.tag){case 5:case 13:Gn=!1;return;case 27:case 3:Gn=!0;return;default:Gt=Gt.return}}function il(e){if(e!==Gt)return!1;if(!ke)return og(e),ke=!0,!1;var t=e.tag,n;if((n=t!==3&&t!==27)&&((n=t===5)&&(n=e.type,n=!(n!=="form"&&n!=="button")||Yf(e.type,e.memoizedProps)),n=!n),n&&et&&gi(e),og(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(M(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8)if(n=e.data,n==="/$"){if(t===0){et=Hn(e.nextSibling);break e}t--}else n!=="$"&&n!=="$!"&&n!=="$?"||t++;e=e.nextSibling}et=null}}else t===27?(t=et,Fa(e.type)?(e=Xf,Xf=null,et=e):et=t):et=Gt?Hn(e.stateNode.nextSibling):null;return!0}function Fl(){et=Gt=null,ke=!1}function ug(){var e=di;return e!==null&&(Wt===null?Wt=e:Wt.push.apply(Wt,e),di=null),e}function Ol(e){di===null?di=[e]:di.push(e)}var yf=Jn(null),Ei=null,oa=null;function Ca(e,t,n){Ze(yf,t._currentValue),t._currentValue=n}function fa(e){e._currentValue=yf.current,xt(yf)}function bf(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 Sf(e,t,n,a){var i=e.child;for(i!==null&&(i.return=e);i!==null;){var r=i.dependencies;if(r!==null){var l=i.child;r=r.firstContext;e:for(;r!==null;){var s=r;r=i;for(var o=0;o<t.length;o++)if(s.context===t[o]){r.lanes|=n,s=r.alternate,s!==null&&(s.lanes|=n),bf(r.return,n,e),a||(l=null);break e}r=s.next}}else if(i.tag===18){if(l=i.return,l===null)throw Error(M(341));l.lanes|=n,r=l.alternate,r!==null&&(r.lanes|=n),bf(l,n,e),l=null}else l=i.child;if(l!==null)l.return=i;else for(l=i;l!==null;){if(l===e){l=null;break}if(i=l.sibling,i!==null){i.return=l.return,l=i;break}l=l.return}i=l}}function Zl(e,t,n,a){e=null;for(var i=t,r=!1;i!==null;){if(!r){if((i.flags&524288)!==0)r=!0;else if((i.flags&262144)!==0)break}if(i.tag===10){var l=i.alternate;if(l===null)throw Error(M(387));if(l=l.memoizedProps,l!==null){var s=i.type;bn(i.pendingProps.value,l.value)||(e!==null?e.push(s):e=[s])}}else if(i===bo.current){if(l=i.alternate,l===null)throw Error(M(387));l.memoizedState.memoizedState!==i.memoizedState.memoizedState&&(e!==null?e.push(Vl):e=[Vl])}i=i.return}e!==null&&Sf(t,e,n,a),t.flags|=262144}function Co(e){for(e=e.firstContext;e!==null;){if(!bn(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function vi(e){Ei=e,oa=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function Ht(e){return Qv(Ei,e)}function Zs(e,t){return Ei===null&&vi(e),Qv(e,t)}function Qv(e,t){var n=t._currentValue;if(t={context:t,memoizedValue:n,next:null},oa===null){if(e===null)throw Error(M(308));oa=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else oa=oa.next=t;return n}var sT=typeof AbortController!="undefined"?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()})}},oT=vt.unstable_scheduleCallback,uT=vt.unstable_NormalPriority,ht={$$typeof:ra,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function pd(){return{controller:new sT,data:new Map,refCount:0}}function Jl(e){e.refCount--,e.refCount===0&&oT(uT,function(){e.controller.abort()})}var vl=null,xf=0,br=0,fr=null;function cT(e,t){if(vl===null){var n=vl=[];xf=0,br=Ud(),fr={status:"pending",value:void 0,then:function(a){n.push(a)}}}return xf++,t.then(cg,cg),t}function cg(){if(--xf===0&&vl!==null){fr!==null&&(fr.status="fulfilled");var e=vl;vl=null,br=0,fr=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function fT(e,t){var n=[],a={status:"pending",value:null,reason:null,then:function(i){n.push(i)}};return e.then(function(){a.status="fulfilled",a.value=t;for(var i=0;i<n.length;i++)(0,n[i])(t)},function(i){for(a.status="rejected",a.reason=i,i=0;i<n.length;i++)(0,n[i])(void 0)}),a}var fg=ue.S;ue.S=function(e,t){typeof t=="object"&&t!==null&&typeof t.then=="function"&&cT(e,t),fg!==null&&fg(e,t)};var pi=Jn(null);function md(){var e=pi.current;return e!==null?e:Ye.pooledCache}function co(e,t){t===null?Ze(pi,pi.current):Ze(pi,t.pool)}function Fv(){var e=md();return e===null?null:{parent:ht._currentValue,pool:e}}var $l=Error(M(460)),Zv=Error(M(474)),tu=Error(M(542)),Nf={then:function(){}};function dg(e){return e=e.status,e==="fulfilled"||e==="rejected"}function Js(){}function Jv(e,t,n){switch(n=e[n],n===void 0?e.push(t):n!==t&&(t.then(Js,Js),t=n),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,mg(e),e;default:if(typeof t.status=="string")t.then(Js,Js);else{if(e=Ye,e!==null&&100<e.shellSuspendCounter)throw Error(M(482));e=t,e.status="pending",e.then(function(a){if(t.status==="pending"){var i=t;i.status="fulfilled",i.value=a}},function(a){if(t.status==="pending"){var i=t;i.status="rejected",i.reason=a}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,mg(e),e}throw yl=t,$l}}var yl=null;function pg(){if(yl===null)throw Error(M(459));var e=yl;return yl=null,e}function mg(e){if(e===$l||e===tu)throw Error(M(483))}var Aa=!1;function hd(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Ef(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 Ba(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Va(e,t,n){var a=e.updateQueue;if(a===null)return null;if(a=a.shared,(Ce&2)!==0){var i=a.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),a.pending=t,t=To(e),Iv(e,null,n),t}return eu(e,a,t,n),To(e)}function bl(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,yv(e,n)}}function Uc(e,t){var n=e.updateQueue,a=e.alternate;if(a!==null&&(a=a.updateQueue,n===a)){var i=null,r=null;if(n=n.firstBaseUpdate,n!==null){do{var l={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};r===null?i=r=l:r=r.next=l,n=n.next}while(n!==null);r===null?i=r=t:r=r.next=t}else i=r=t;n={baseState:a.baseState,firstBaseUpdate:i,lastBaseUpdate:r,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 kf=!1;function Sl(){if(kf){var e=fr;if(e!==null)throw e}}function xl(e,t,n,a){kf=!1;var i=e.updateQueue;Aa=!1;var r=i.firstBaseUpdate,l=i.lastBaseUpdate,s=i.shared.pending;if(s!==null){i.shared.pending=null;var o=s,u=o.next;o.next=null,l===null?r=u:l.next=u,l=o;var c=e.alternate;c!==null&&(c=c.updateQueue,s=c.lastBaseUpdate,s!==l&&(s===null?c.firstBaseUpdate=u:s.next=u,c.lastBaseUpdate=o))}if(r!==null){var p=i.baseState;l=0,c=u=o=null,s=r;do{var d=s.lane&-536870913,f=d!==s.lane;if(f?(Ne&d)===d:(a&d)===d){d!==0&&d===br&&(kf=!0),c!==null&&(c=c.next={lane:0,tag:s.tag,payload:s.payload,callback:null,next:null});e:{var S=e,x=s;d=t;var k=n;switch(x.tag){case 1:if(S=x.payload,typeof S=="function"){p=S.call(k,p,d);break e}p=S;break e;case 3:S.flags=S.flags&-65537|128;case 0:if(S=x.payload,d=typeof S=="function"?S.call(k,p,d):S,d==null)break e;p=Ge({},p,d);break e;case 2:Aa=!0}}d=s.callback,d!==null&&(e.flags|=64,f&&(e.flags|=8192),f=i.callbacks,f===null?i.callbacks=[d]:f.push(d))}else f={lane:d,tag:s.tag,payload:s.payload,callback:s.callback,next:null},c===null?(u=c=f,o=p):c=c.next=f,l|=d;if(s=s.next,s===null){if(s=i.shared.pending,s===null)break;f=s,s=f.next,f.next=null,i.lastBaseUpdate=f,i.shared.pending=null}}while(!0);c===null&&(o=p),i.baseState=o,i.firstBaseUpdate=u,i.lastBaseUpdate=c,r===null&&(i.shared.lanes=0),Xa|=l,e.lanes=l,e.memoizedState=p}}function $v(e,t){if(typeof e!="function")throw Error(M(191,e));e.call(t)}function Kv(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;e<n.length;e++)$v(n[e],t)}var Sr=Jn(null),Ro=Jn(0);function hg(e,t){e=ha,Ze(Ro,e),Ze(Sr,t),ha=e|t.baseLanes}function Tf(){Ze(Ro,ha),Ze(Sr,Sr.current)}function gd(){ha=Ro.current,xt(Sr),xt(Ro)}var Ia=0,he=null,Le=null,ct=null,_o=!1,dr=!1,yi=!1,Do=0,Ll=0,pr=null,dT=0;function rt(){throw Error(M(321))}function vd(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!bn(e[n],t[n]))return!1;return!0}function yd(e,t,n,a,i,r){return Ia=r,he=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,ue.H=e===null||e.memoizedState===null?Ry:_y,yi=!1,r=n(a,i),yi=!1,dr&&(r=ey(t,n,a,i)),Wv(e),r}function Wv(e){ue.H=Oo;var t=Le!==null&&Le.next!==null;if(Ia=0,ct=Le=he=null,_o=!1,Ll=0,pr=null,t)throw Error(M(300));e===null||St||(e=e.dependencies,e!==null&&Co(e)&&(St=!0))}function ey(e,t,n,a){he=e;var i=0;do{if(dr&&(pr=null),Ll=0,dr=!1,25<=i)throw Error(M(301));if(i+=1,ct=Le=null,e.updateQueue!=null){var r=e.updateQueue;r.lastEffect=null,r.events=null,r.stores=null,r.memoCache!=null&&(r.memoCache.index=0)}ue.H=bT,r=t(n,a)}while(dr);return r}function pT(){var e=ue.H,t=e.useState()[0];return t=typeof t.then=="function"?Kl(t):t,e=e.useState()[0],(Le!==null?Le.memoizedState:null)!==e&&(he.flags|=1024),t}function bd(){var e=Do!==0;return Do=0,e}function Sd(e,t,n){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n}function xd(e){if(_o){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}_o=!1}Ia=0,ct=Le=he=null,dr=!1,Ll=Do=0,pr=null}function $t(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return ct===null?he.memoizedState=ct=e:ct=ct.next=e,ct}function ft(){if(Le===null){var e=he.alternate;e=e!==null?e.memoizedState:null}else e=Le.next;var t=ct===null?he.memoizedState:ct.next;if(t!==null)ct=t,Le=e;else{if(e===null)throw he.alternate===null?Error(M(467)):Error(M(310));Le=e,e={memoizedState:Le.memoizedState,baseState:Le.baseState,baseQueue:Le.baseQueue,queue:Le.queue,next:null},ct===null?he.memoizedState=ct=e:ct=ct.next=e}return ct}function Nd(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Kl(e){var t=Ll;return Ll+=1,pr===null&&(pr=[]),e=Jv(pr,e,t),t=he,(ct===null?t.memoizedState:ct.next)===null&&(t=t.alternate,ue.H=t===null||t.memoizedState===null?Ry:_y),e}function nu(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return Kl(e);if(e.$$typeof===ra)return Ht(e)}throw Error(M(438,String(e)))}function Ed(e){var t=null,n=he.updateQueue;if(n!==null&&(t=n.memoCache),t==null){var a=he.alternate;a!==null&&(a=a.updateQueue,a!==null&&(a=a.memoCache,a!=null&&(t={data:a.data.map(function(i){return i.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),n===null&&(n=Nd(),he.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]=$E;return t.index++,n}function pa(e,t){return typeof t=="function"?t(e):t}function fo(e){var t=ft();return kd(t,Le,e)}function kd(e,t,n){var a=e.queue;if(a===null)throw Error(M(311));a.lastRenderedReducer=n;var i=e.baseQueue,r=a.pending;if(r!==null){if(i!==null){var l=i.next;i.next=r.next,r.next=l}t.baseQueue=i=r,a.pending=null}if(r=e.baseState,i===null)e.memoizedState=r;else{t=i.next;var s=l=null,o=null,u=t,c=!1;do{var p=u.lane&-536870913;if(p!==u.lane?(Ne&p)===p:(Ia&p)===p){var d=u.revertLane;if(d===0)o!==null&&(o=o.next={lane:0,revertLane:0,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),p===br&&(c=!0);else if((Ia&d)===d){u=u.next,d===br&&(c=!0);continue}else p={lane:0,revertLane:u.revertLane,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},o===null?(s=o=p,l=r):o=o.next=p,he.lanes|=d,Xa|=d;p=u.action,yi&&n(r,p),r=u.hasEagerState?u.eagerState:n(r,p)}else d={lane:p,revertLane:u.revertLane,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},o===null?(s=o=d,l=r):o=o.next=d,he.lanes|=p,Xa|=p;u=u.next}while(u!==null&&u!==t);if(o===null?l=r:o.next=s,!bn(r,e.memoizedState)&&(St=!0,c&&(n=fr,n!==null)))throw n;e.memoizedState=r,e.baseState=l,e.baseQueue=o,a.lastRenderedState=r}return i===null&&(a.lanes=0),[e.memoizedState,a.dispatch]}function Bc(e){var t=ft(),n=t.queue;if(n===null)throw Error(M(311));n.lastRenderedReducer=e;var a=n.dispatch,i=n.pending,r=t.memoizedState;if(i!==null){n.pending=null;var l=i=i.next;do r=e(r,l.action),l=l.next;while(l!==i);bn(r,t.memoizedState)||(St=!0),t.memoizedState=r,t.baseQueue===null&&(t.baseState=r),n.lastRenderedState=r}return[r,a]}function ty(e,t,n){var a=he,i=ft(),r=ke;if(r){if(n===void 0)throw Error(M(407));n=n()}else n=t();var l=!bn((Le||i).memoizedState,n);l&&(i.memoizedState=n,St=!0),i=i.queue;var s=iy.bind(null,a,i,e);if(Wl(2048,8,s,[e]),i.getSnapshot!==t||l||ct!==null&&ct.memoizedState.tag&1){if(a.flags|=2048,xr(9,au(),ay.bind(null,a,i,n,t),null),Ye===null)throw Error(M(349));r||(Ia&124)!==0||ny(a,t,n)}return n}function ny(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=he.updateQueue,t===null?(t=Nd(),he.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function ay(e,t,n,a){t.value=n,t.getSnapshot=a,ry(t)&&ly(e)}function iy(e,t,n){return n(function(){ry(t)&&ly(e)})}function ry(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!bn(e,n)}catch(a){return!0}}function ly(e){var t=Rr(e,2);t!==null&&yn(t,e,2)}function wf(e){var t=$t();if(typeof e=="function"){var n=e;if(e=n(),yi){Oa(!0);try{n()}finally{Oa(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:pa,lastRenderedState:e},t}function sy(e,t,n,a){return e.baseState=n,kd(e,Le,typeof a=="function"?a:pa)}function mT(e,t,n,a,i){if(iu(e))throw Error(M(485));if(e=t.action,e!==null){var r={payload:i,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(l){r.listeners.push(l)}};ue.T!==null?n(!0):r.isTransition=!1,a(r),n=t.pending,n===null?(r.next=t.pending=r,oy(t,r)):(r.next=n.next,t.pending=n.next=r)}}function oy(e,t){var n=t.action,a=t.payload,i=e.state;if(t.isTransition){var r=ue.T,l={};ue.T=l;try{var s=n(i,a),o=ue.S;o!==null&&o(l,s),gg(e,t,s)}catch(u){Af(e,t,u)}finally{ue.T=r}}else try{r=n(i,a),gg(e,t,r)}catch(u){Af(e,t,u)}}function gg(e,t,n){n!==null&&typeof n=="object"&&typeof n.then=="function"?n.then(function(a){vg(e,t,a)},function(a){return Af(e,t,a)}):vg(e,t,n)}function vg(e,t,n){t.status="fulfilled",t.value=n,uy(t),e.state=n,t=e.pending,t!==null&&(n=t.next,n===t?e.pending=null:(n=n.next,t.next=n,oy(e,n)))}function Af(e,t,n){var a=e.pending;if(e.pending=null,a!==null){a=a.next;do t.status="rejected",t.reason=n,uy(t),t=t.next;while(t!==a)}e.action=null}function uy(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function cy(e,t){return t}function yg(e,t){if(ke){var n=Ye.formState;if(n!==null){e:{var a=he;if(ke){if(et){t:{for(var i=et,r=Gn;i.nodeType!==8;){if(!r){i=null;break t}if(i=Hn(i.nextSibling),i===null){i=null;break t}}r=i.data,i=r==="F!"||r==="F"?i:null}if(i){et=Hn(i.nextSibling),a=i.data==="F!";break e}}gi(a)}a=!1}a&&(t=n[0])}}return n=$t(),n.memoizedState=n.baseState=t,a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:cy,lastRenderedState:t},n.queue=a,n=wy.bind(null,he,a),a.dispatch=n,a=wf(!1),r=Cd.bind(null,he,!1,a.queue),a=$t(),i={state:t,dispatch:null,action:e,pending:null},a.queue=i,n=mT.bind(null,he,i,r,n),i.dispatch=n,a.memoizedState=e,[t,n,!1]}function bg(e){var t=ft();return fy(t,Le,e)}function fy(e,t,n){if(t=kd(e,t,cy)[0],e=fo(pa)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var a=Kl(t)}catch(l){throw l===$l?tu:l}else a=t;t=ft();var i=t.queue,r=i.dispatch;return n!==t.memoizedState&&(he.flags|=2048,xr(9,au(),hT.bind(null,i,n),null)),[a,r,e]}function hT(e,t){e.action=t}function Sg(e){var t=ft(),n=Le;if(n!==null)return fy(t,n,e);ft(),t=t.memoizedState,n=ft();var a=n.queue.dispatch;return n.memoizedState=e,[t,a,!1]}function xr(e,t,n,a){return e={tag:e,create:n,deps:a,inst:t,next:null},t=he.updateQueue,t===null&&(t=Nd(),he.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 au(){return{destroy:void 0,resource:void 0}}function dy(){return ft().memoizedState}function po(e,t,n,a){var i=$t();a=a===void 0?null:a,he.flags|=e,i.memoizedState=xr(1|t,au(),n,a)}function Wl(e,t,n,a){var i=ft();a=a===void 0?null:a;var r=i.memoizedState.inst;Le!==null&&a!==null&&vd(a,Le.memoizedState.deps)?i.memoizedState=xr(t,r,n,a):(he.flags|=e,i.memoizedState=xr(1|t,r,n,a))}function xg(e,t){po(8390656,8,e,t)}function py(e,t){Wl(2048,8,e,t)}function my(e,t){return Wl(4,2,e,t)}function hy(e,t){return Wl(4,4,e,t)}function gy(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 vy(e,t,n){n=n!=null?n.concat([e]):null,Wl(4,4,gy.bind(null,t,e),n)}function Td(){}function yy(e,t){var n=ft();t=t===void 0?null:t;var a=n.memoizedState;return t!==null&&vd(t,a[1])?a[0]:(n.memoizedState=[e,t],e)}function by(e,t){var n=ft();t=t===void 0?null:t;var a=n.memoizedState;if(t!==null&&vd(t,a[1]))return a[0];if(a=e(),yi){Oa(!0);try{e()}finally{Oa(!1)}}return n.memoizedState=[a,t],a}function wd(e,t,n){return n===void 0||(Ia&1073741824)!==0?e.memoizedState=t:(e.memoizedState=n,e=ub(),he.lanes|=e,Xa|=e,n)}function Sy(e,t,n,a){return bn(n,t)?n:Sr.current!==null?(e=wd(e,n,a),bn(e,t)||(St=!0),e):(Ia&42)===0?(St=!0,e.memoizedState=n):(e=ub(),he.lanes|=e,Xa|=e,t)}function xy(e,t,n,a,i){var r=Te.p;Te.p=r!==0&&8>r?r:8;var l=ue.T,s={};ue.T=s,Cd(e,!1,t,n);try{var o=i(),u=ue.S;if(u!==null&&u(s,o),o!==null&&typeof o=="object"&&typeof o.then=="function"){var c=fT(o,a);Nl(e,t,c,vn(e))}else Nl(e,t,a,vn(e))}catch(p){Nl(e,t,{then:function(){},status:"rejected",reason:p},vn())}finally{Te.p=r,ue.T=l}}function gT(){}function Cf(e,t,n,a){if(e.tag!==5)throw Error(M(476));var i=Ny(e).queue;xy(e,i,t,ui,n===null?gT:function(){return Ey(e),n(a)})}function Ny(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:ui,baseState:ui,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:pa,lastRenderedState:ui},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:pa,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function Ey(e){var t=Ny(e).next.queue;Nl(e,t,{},vn())}function Ad(){return Ht(Vl)}function ky(){return ft().memoizedState}function Ty(){return ft().memoizedState}function vT(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=vn();e=Ba(n);var a=Va(t,e,n);a!==null&&(yn(a,t,n),bl(a,t,n)),t={cache:pd()},e.payload=t;return}t=t.return}}function yT(e,t,n){var a=vn();n={lane:a,revertLane:0,action:n,hasEagerState:!1,eagerState:null,next:null},iu(e)?Ay(t,n):(n=ud(e,t,n,a),n!==null&&(yn(n,e,a),Cy(n,t,a)))}function wy(e,t,n){var a=vn();Nl(e,t,n,a)}function Nl(e,t,n,a){var i={lane:a,revertLane:0,action:n,hasEagerState:!1,eagerState:null,next:null};if(iu(e))Ay(t,i);else{var r=e.alternate;if(e.lanes===0&&(r===null||r.lanes===0)&&(r=t.lastRenderedReducer,r!==null))try{var l=t.lastRenderedState,s=r(l,n);if(i.hasEagerState=!0,i.eagerState=s,bn(s,l))return eu(e,t,i,0),Ye===null&&Wo(),!1}catch(o){}finally{}if(n=ud(e,t,i,a),n!==null)return yn(n,e,a),Cy(n,t,a),!0}return!1}function Cd(e,t,n,a){if(a={lane:2,revertLane:Ud(),action:a,hasEagerState:!1,eagerState:null,next:null},iu(e)){if(t)throw Error(M(479))}else t=ud(e,n,a,2),t!==null&&yn(t,e,2)}function iu(e){var t=e.alternate;return e===he||t!==null&&t===he}function Ay(e,t){dr=_o=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Cy(e,t,n){if((n&4194048)!==0){var a=t.lanes;a&=e.pendingLanes,n|=a,t.lanes=n,yv(e,n)}}var Oo={readContext:Ht,use:nu,useCallback:rt,useContext:rt,useEffect:rt,useImperativeHandle:rt,useLayoutEffect:rt,useInsertionEffect:rt,useMemo:rt,useReducer:rt,useRef:rt,useState:rt,useDebugValue:rt,useDeferredValue:rt,useTransition:rt,useSyncExternalStore:rt,useId:rt,useHostTransitionStatus:rt,useFormState:rt,useActionState:rt,useOptimistic:rt,useMemoCache:rt,useCacheRefresh:rt},Ry={readContext:Ht,use:nu,useCallback:function(e,t){return $t().memoizedState=[e,t===void 0?null:t],e},useContext:Ht,useEffect:xg,useImperativeHandle:function(e,t,n){n=n!=null?n.concat([e]):null,po(4194308,4,gy.bind(null,t,e),n)},useLayoutEffect:function(e,t){return po(4194308,4,e,t)},useInsertionEffect:function(e,t){po(4,2,e,t)},useMemo:function(e,t){var n=$t();t=t===void 0?null:t;var a=e();if(yi){Oa(!0);try{e()}finally{Oa(!1)}}return n.memoizedState=[a,t],a},useReducer:function(e,t,n){var a=$t();if(n!==void 0){var i=n(t);if(yi){Oa(!0);try{n(t)}finally{Oa(!1)}}}else i=t;return a.memoizedState=a.baseState=i,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:i},a.queue=e,e=e.dispatch=yT.bind(null,he,e),[a.memoizedState,e]},useRef:function(e){var t=$t();return e={current:e},t.memoizedState=e},useState:function(e){e=wf(e);var t=e.queue,n=wy.bind(null,he,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:Td,useDeferredValue:function(e,t){var n=$t();return wd(n,e,t)},useTransition:function(){var e=wf(!1);return e=xy.bind(null,he,e.queue,!0,!1),$t().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var a=he,i=$t();if(ke){if(n===void 0)throw Error(M(407));n=n()}else{if(n=t(),Ye===null)throw Error(M(349));(Ne&124)!==0||ny(a,t,n)}i.memoizedState=n;var r={value:n,getSnapshot:t};return i.queue=r,xg(iy.bind(null,a,r,e),[e]),a.flags|=2048,xr(9,au(),ay.bind(null,a,r,n,t),null),n},useId:function(){var e=$t(),t=Ye.identifierPrefix;if(ke){var n=sa,a=la;n=(a&~(1<<32-gn(a)-1)).toString(32)+n,t="\xAB"+t+"R"+n,n=Do++,0<n&&(t+="H"+n.toString(32)),t+="\xBB"}else n=dT++,t="\xAB"+t+"r"+n.toString(32)+"\xBB";return e.memoizedState=t},useHostTransitionStatus:Ad,useFormState:yg,useActionState:yg,useOptimistic:function(e){var t=$t();t.memoizedState=t.baseState=e;var n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=n,t=Cd.bind(null,he,!0,n),n.dispatch=t,[e,t]},useMemoCache:Ed,useCacheRefresh:function(){return $t().memoizedState=vT.bind(null,he)}},_y={readContext:Ht,use:nu,useCallback:yy,useContext:Ht,useEffect:py,useImperativeHandle:vy,useInsertionEffect:my,useLayoutEffect:hy,useMemo:by,useReducer:fo,useRef:dy,useState:function(){return fo(pa)},useDebugValue:Td,useDeferredValue:function(e,t){var n=ft();return Sy(n,Le.memoizedState,e,t)},useTransition:function(){var e=fo(pa)[0],t=ft().memoizedState;return[typeof e=="boolean"?e:Kl(e),t]},useSyncExternalStore:ty,useId:ky,useHostTransitionStatus:Ad,useFormState:bg,useActionState:bg,useOptimistic:function(e,t){var n=ft();return sy(n,Le,e,t)},useMemoCache:Ed,useCacheRefresh:Ty},bT={readContext:Ht,use:nu,useCallback:yy,useContext:Ht,useEffect:py,useImperativeHandle:vy,useInsertionEffect:my,useLayoutEffect:hy,useMemo:by,useReducer:Bc,useRef:dy,useState:function(){return Bc(pa)},useDebugValue:Td,useDeferredValue:function(e,t){var n=ft();return Le===null?wd(n,e,t):Sy(n,Le.memoizedState,e,t)},useTransition:function(){var e=Bc(pa)[0],t=ft().memoizedState;return[typeof e=="boolean"?e:Kl(e),t]},useSyncExternalStore:ty,useId:ky,useHostTransitionStatus:Ad,useFormState:Sg,useActionState:Sg,useOptimistic:function(e,t){var n=ft();return Le!==null?sy(n,Le,e,t):(n.baseState=e,[e,n.queue.dispatch])},useMemoCache:Ed,useCacheRefresh:Ty},mr=null,zl=0;function $s(e){var t=zl;return zl+=1,mr===null&&(mr=[]),Jv(mr,e,t)}function rl(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function Ks(e,t){throw t.$$typeof===ZE?Error(M(525)):(e=Object.prototype.toString.call(t),Error(M(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function Ng(e){var t=e._init;return t(e._payload)}function Dy(e){function t(m,h){if(e){var g=m.deletions;g===null?(m.deletions=[h],m.flags|=16):g.push(h)}}function n(m,h){if(!e)return null;for(;h!==null;)t(m,h),h=h.sibling;return null}function a(m){for(var h=new Map;m!==null;)m.key!==null?h.set(m.key,m):h.set(m.index,m),m=m.sibling;return h}function i(m,h){return m=ca(m,h),m.index=0,m.sibling=null,m}function r(m,h,g){return m.index=g,e?(g=m.alternate,g!==null?(g=g.index,g<h?(m.flags|=67108866,h):g):(m.flags|=67108866,h)):(m.flags|=1048576,h)}function l(m){return e&&m.alternate===null&&(m.flags|=67108866),m}function s(m,h,g,E){return h===null||h.tag!==6?(h=zc(g,m.mode,E),h.return=m,h):(h=i(h,g),h.return=m,h)}function o(m,h,g,E){var T=g.type;return T===Ji?c(m,h,g.props.children,E,g.key):h!==null&&(h.elementType===T||typeof T=="object"&&T!==null&&T.$$typeof===wa&&Ng(T)===h.type)?(h=i(h,g.props),rl(h,g),h.return=m,h):(h=uo(g.type,g.key,g.props,null,m.mode,E),rl(h,g),h.return=m,h)}function u(m,h,g,E){return h===null||h.tag!==4||h.stateNode.containerInfo!==g.containerInfo||h.stateNode.implementation!==g.implementation?(h=Mc(g,m.mode,E),h.return=m,h):(h=i(h,g.children||[]),h.return=m,h)}function c(m,h,g,E,T){return h===null||h.tag!==7?(h=ci(g,m.mode,E,T),h.return=m,h):(h=i(h,g),h.return=m,h)}function p(m,h,g){if(typeof h=="string"&&h!==""||typeof h=="number"||typeof h=="bigint")return h=zc(""+h,m.mode,g),h.return=m,h;if(typeof h=="object"&&h!==null){switch(h.$$typeof){case js:return g=uo(h.type,h.key,h.props,null,m.mode,g),rl(g,h),g.return=m,g;case cl:return h=Mc(h,m.mode,g),h.return=m,h;case wa:var E=h._init;return h=E(h._payload),p(m,h,g)}if(fl(h)||nl(h))return h=ci(h,m.mode,g,null),h.return=m,h;if(typeof h.then=="function")return p(m,$s(h),g);if(h.$$typeof===ra)return p(m,Zs(m,h),g);Ks(m,h)}return null}function d(m,h,g,E){var T=h!==null?h.key:null;if(typeof g=="string"&&g!==""||typeof g=="number"||typeof g=="bigint")return T!==null?null:s(m,h,""+g,E);if(typeof g=="object"&&g!==null){switch(g.$$typeof){case js:return g.key===T?o(m,h,g,E):null;case cl:return g.key===T?u(m,h,g,E):null;case wa:return T=g._init,g=T(g._payload),d(m,h,g,E)}if(fl(g)||nl(g))return T!==null?null:c(m,h,g,E,null);if(typeof g.then=="function")return d(m,h,$s(g),E);if(g.$$typeof===ra)return d(m,h,Zs(m,g),E);Ks(m,g)}return null}function f(m,h,g,E,T){if(typeof E=="string"&&E!==""||typeof E=="number"||typeof E=="bigint")return m=m.get(g)||null,s(h,m,""+E,T);if(typeof E=="object"&&E!==null){switch(E.$$typeof){case js:return m=m.get(E.key===null?g:E.key)||null,o(h,m,E,T);case cl:return m=m.get(E.key===null?g:E.key)||null,u(h,m,E,T);case wa:var N=E._init;return E=N(E._payload),f(m,h,g,E,T)}if(fl(E)||nl(E))return m=m.get(g)||null,c(h,m,E,T,null);if(typeof E.then=="function")return f(m,h,g,$s(E),T);if(E.$$typeof===ra)return f(m,h,g,Zs(h,E),T);Ks(h,E)}return null}function S(m,h,g,E){for(var T=null,N=null,A=h,C=h=0,U=null;A!==null&&C<g.length;C++){A.index>C?(U=A,A=null):U=A.sibling;var P=d(m,A,g[C],E);if(P===null){A===null&&(A=U);break}e&&A&&P.alternate===null&&t(m,A),h=r(P,h,C),N===null?T=P:N.sibling=P,N=P,A=U}if(C===g.length)return n(m,A),ke&&si(m,C),T;if(A===null){for(;C<g.length;C++)A=p(m,g[C],E),A!==null&&(h=r(A,h,C),N===null?T=A:N.sibling=A,N=A);return ke&&si(m,C),T}for(A=a(A);C<g.length;C++)U=f(A,m,C,g[C],E),U!==null&&(e&&U.alternate!==null&&A.delete(U.key===null?C:U.key),h=r(U,h,C),N===null?T=U:N.sibling=U,N=U);return e&&A.forEach(function(_){return t(m,_)}),ke&&si(m,C),T}function x(m,h,g,E){if(g==null)throw Error(M(151));for(var T=null,N=null,A=h,C=h=0,U=null,P=g.next();A!==null&&!P.done;C++,P=g.next()){A.index>C?(U=A,A=null):U=A.sibling;var _=d(m,A,P.value,E);if(_===null){A===null&&(A=U);break}e&&A&&_.alternate===null&&t(m,A),h=r(_,h,C),N===null?T=_:N.sibling=_,N=_,A=U}if(P.done)return n(m,A),ke&&si(m,C),T;if(A===null){for(;!P.done;C++,P=g.next())P=p(m,P.value,E),P!==null&&(h=r(P,h,C),N===null?T=P:N.sibling=P,N=P);return ke&&si(m,C),T}for(A=a(A);!P.done;C++,P=g.next())P=f(A,m,C,P.value,E),P!==null&&(e&&P.alternate!==null&&A.delete(P.key===null?C:P.key),h=r(P,h,C),N===null?T=P:N.sibling=P,N=P);return e&&A.forEach(function(R){return t(m,R)}),ke&&si(m,C),T}function k(m,h,g,E){if(typeof g=="object"&&g!==null&&g.type===Ji&&g.key===null&&(g=g.props.children),typeof g=="object"&&g!==null){switch(g.$$typeof){case js:e:{for(var T=g.key;h!==null;){if(h.key===T){if(T=g.type,T===Ji){if(h.tag===7){n(m,h.sibling),E=i(h,g.props.children),E.return=m,m=E;break e}}else if(h.elementType===T||typeof T=="object"&&T!==null&&T.$$typeof===wa&&Ng(T)===h.type){n(m,h.sibling),E=i(h,g.props),rl(E,g),E.return=m,m=E;break e}n(m,h);break}else t(m,h);h=h.sibling}g.type===Ji?(E=ci(g.props.children,m.mode,E,g.key),E.return=m,m=E):(E=uo(g.type,g.key,g.props,null,m.mode,E),rl(E,g),E.return=m,m=E)}return l(m);case cl:e:{for(T=g.key;h!==null;){if(h.key===T)if(h.tag===4&&h.stateNode.containerInfo===g.containerInfo&&h.stateNode.implementation===g.implementation){n(m,h.sibling),E=i(h,g.children||[]),E.return=m,m=E;break e}else{n(m,h);break}else t(m,h);h=h.sibling}E=Mc(g,m.mode,E),E.return=m,m=E}return l(m);case wa:return T=g._init,g=T(g._payload),k(m,h,g,E)}if(fl(g))return S(m,h,g,E);if(nl(g)){if(T=nl(g),typeof T!="function")throw Error(M(150));return g=T.call(g),x(m,h,g,E)}if(typeof g.then=="function")return k(m,h,$s(g),E);if(g.$$typeof===ra)return k(m,h,Zs(m,g),E);Ks(m,g)}return typeof g=="string"&&g!==""||typeof g=="number"||typeof g=="bigint"?(g=""+g,h!==null&&h.tag===6?(n(m,h.sibling),E=i(h,g),E.return=m,m=E):(n(m,h),E=zc(g,m.mode,E),E.return=m,m=E),l(m)):n(m,h)}return function(m,h,g,E){try{zl=0;var T=k(m,h,g,E);return mr=null,T}catch(A){if(A===$l||A===tu)throw A;var N=mn(29,A,null,m.mode);return N.lanes=E,N.return=m,N}finally{}}}var Nr=Dy(!0),Oy=Dy(!1),Dn=Jn(null),Zn=null;function Ra(e){var t=e.alternate;Ze(gt,gt.current&1),Ze(Dn,e),Zn===null&&(t===null||Sr.current!==null||t.memoizedState!==null)&&(Zn=e)}function Ly(e){if(e.tag===22){if(Ze(gt,gt.current),Ze(Dn,e),Zn===null){var t=e.alternate;t!==null&&t.memoizedState!==null&&(Zn=e)}}else _a(e)}function _a(){Ze(gt,gt.current),Ze(Dn,Dn.current)}function ua(e){xt(Dn),Zn===e&&(Zn=null),xt(gt)}var gt=Jn(0);function Lo(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||Gf(n)))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){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}function Vc(e,t,n,a){t=e.memoizedState,n=n(a,t),n=n==null?t:Ge({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var Rf={enqueueSetState:function(e,t,n){e=e._reactInternals;var a=vn(),i=Ba(a);i.payload=t,n!=null&&(i.callback=n),t=Va(e,i,a),t!==null&&(yn(t,e,a),bl(t,e,a))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var a=vn(),i=Ba(a);i.tag=1,i.payload=t,n!=null&&(i.callback=n),t=Va(e,i,a),t!==null&&(yn(t,e,a),bl(t,e,a))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=vn(),a=Ba(n);a.tag=2,t!=null&&(a.callback=t),t=Va(e,a,n),t!==null&&(yn(t,e,n),bl(t,e,n))}};function Eg(e,t,n,a,i,r,l){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(a,r,l):t.prototype&&t.prototype.isPureReactComponent?!Dl(n,a)||!Dl(i,r):!0}function kg(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&&Rf.enqueueReplaceState(t,t.state,null)}function bi(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=Ge({},n));for(var i in e)n[i]===void 0&&(n[i]=e[i])}return n}var zo=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)};function zy(e){zo(e)}function My(e){console.error(e)}function Uy(e){zo(e)}function Mo(e,t){try{var n=e.onUncaughtError;n(t.value,{componentStack:t.stack})}catch(a){setTimeout(function(){throw a})}}function Tg(e,t,n){try{var a=e.onCaughtError;a(n.value,{componentStack:n.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(i){setTimeout(function(){throw i})}}function _f(e,t,n){return n=Ba(n),n.tag=3,n.payload={element:null},n.callback=function(){Mo(e,t)},n}function By(e){return e=Ba(e),e.tag=3,e}function Vy(e,t,n,a){var i=n.type.getDerivedStateFromError;if(typeof i=="function"){var r=a.value;e.payload=function(){return i(r)},e.callback=function(){Tg(t,n,a)}}var l=n.stateNode;l!==null&&typeof l.componentDidCatch=="function"&&(e.callback=function(){Tg(t,n,a),typeof i!="function"&&(Ha===null?Ha=new Set([this]):Ha.add(this));var s=a.stack;this.componentDidCatch(a.value,{componentStack:s!==null?s:""})})}function ST(e,t,n,a,i){if(n.flags|=32768,a!==null&&typeof a=="object"&&typeof a.then=="function"){if(t=n.alternate,t!==null&&Zl(t,n,i,!0),n=Dn.current,n!==null){switch(n.tag){case 13:return Zn===null?Vf():n.alternate===null&&tt===0&&(tt=3),n.flags&=-257,n.flags|=65536,n.lanes=i,a===Nf?n.flags|=16384:(t=n.updateQueue,t===null?n.updateQueue=new Set([a]):t.add(a),Zc(e,a,i)),!1;case 22:return n.flags|=65536,a===Nf?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)),Zc(e,a,i)),!1}throw Error(M(435,n.tag))}return Zc(e,a,i),Vf(),!1}if(ke)return t=Dn.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=i,a!==vf&&(e=Error(M(422),{cause:a}),Ol(Rn(e,n)))):(a!==vf&&(t=Error(M(423),{cause:a}),Ol(Rn(t,n))),e=e.current.alternate,e.flags|=65536,i&=-i,e.lanes|=i,a=Rn(a,n),i=_f(e.stateNode,a,i),Uc(e,i),tt!==4&&(tt=2)),!1;var r=Error(M(520),{cause:a});if(r=Rn(r,n),Tl===null?Tl=[r]:Tl.push(r),tt!==4&&(tt=2),t===null)return!0;a=Rn(a,n),n=t;do{switch(n.tag){case 3:return n.flags|=65536,e=i&-i,n.lanes|=e,e=_f(n.stateNode,a,e),Uc(n,e),!1;case 1:if(t=n.type,r=n.stateNode,(n.flags&128)===0&&(typeof t.getDerivedStateFromError=="function"||r!==null&&typeof r.componentDidCatch=="function"&&(Ha===null||!Ha.has(r))))return n.flags|=65536,i&=-i,n.lanes|=i,i=By(i),Vy(i,e,n,a),Uc(n,i),!1}n=n.return}while(n!==null);return!1}var Hy=Error(M(461)),St=!1;function Rt(e,t,n,a){t.child=e===null?Oy(t,null,n,a):Nr(t,e.child,n,a)}function wg(e,t,n,a,i){n=n.render;var r=t.ref;if("ref"in a){var l={};for(var s in a)s!=="ref"&&(l[s]=a[s])}else l=a;return vi(t),a=yd(e,t,n,l,r,i),s=bd(),e!==null&&!St?(Sd(e,t,i),ma(e,t,i)):(ke&&s&&fd(t),t.flags|=1,Rt(e,t,a,i),t.child)}function Ag(e,t,n,a,i){if(e===null){var r=n.type;return typeof r=="function"&&!cd(r)&&r.defaultProps===void 0&&n.compare===null?(t.tag=15,t.type=r,Py(e,t,r,a,i)):(e=uo(n.type,null,a,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(r=e.child,!Rd(e,i)){var l=r.memoizedProps;if(n=n.compare,n=n!==null?n:Dl,n(l,a)&&e.ref===t.ref)return ma(e,t,i)}return t.flags|=1,e=ca(r,a),e.ref=t.ref,e.return=t,t.child=e}function Py(e,t,n,a,i){if(e!==null){var r=e.memoizedProps;if(Dl(r,a)&&e.ref===t.ref)if(St=!1,t.pendingProps=a=r,Rd(e,i))(e.flags&131072)!==0&&(St=!0);else return t.lanes=e.lanes,ma(e,t,i)}return Df(e,t,n,a,i)}function qy(e,t,n){var a=t.pendingProps,i=a.children,r=e!==null?e.memoizedState:null;if(a.mode==="hidden"){if((t.flags&128)!==0){if(a=r!==null?r.baseLanes|n:n,e!==null){for(i=t.child=e.child,r=0;i!==null;)r=r|i.lanes|i.childLanes,i=i.sibling;t.childLanes=r&~a}else t.childLanes=0,t.child=null;return Cg(e,t,a,n)}if((n&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&co(t,r!==null?r.cachePool:null),r!==null?hg(t,r):Tf(),Ly(t);else return t.lanes=t.childLanes=536870912,Cg(e,t,r!==null?r.baseLanes|n:n,n)}else r!==null?(co(t,r.cachePool),hg(t,r),_a(t),t.memoizedState=null):(e!==null&&co(t,null),Tf(),_a(t));return Rt(e,t,i,n),t.child}function Cg(e,t,n,a){var i=md();return i=i===null?null:{parent:ht._currentValue,pool:i},t.memoizedState={baseLanes:n,cachePool:i},e!==null&&co(t,null),Tf(),Ly(t),e!==null&&Zl(e,t,a,!0),null}function mo(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(M(284));(e===null||e.ref!==n)&&(t.flags|=4194816)}}function Df(e,t,n,a,i){return vi(t),n=yd(e,t,n,a,void 0,i),a=bd(),e!==null&&!St?(Sd(e,t,i),ma(e,t,i)):(ke&&a&&fd(t),t.flags|=1,Rt(e,t,n,i),t.child)}function Rg(e,t,n,a,i,r){return vi(t),t.updateQueue=null,n=ey(t,a,n,i),Wv(e),a=bd(),e!==null&&!St?(Sd(e,t,r),ma(e,t,r)):(ke&&a&&fd(t),t.flags|=1,Rt(e,t,n,r),t.child)}function _g(e,t,n,a,i){if(vi(t),t.stateNode===null){var r=ir,l=n.contextType;typeof l=="object"&&l!==null&&(r=Ht(l)),r=new n(a,r),t.memoizedState=r.state!==null&&r.state!==void 0?r.state:null,r.updater=Rf,t.stateNode=r,r._reactInternals=t,r=t.stateNode,r.props=a,r.state=t.memoizedState,r.refs={},hd(t),l=n.contextType,r.context=typeof l=="object"&&l!==null?Ht(l):ir,r.state=t.memoizedState,l=n.getDerivedStateFromProps,typeof l=="function"&&(Vc(t,n,l,a),r.state=t.memoizedState),typeof n.getDerivedStateFromProps=="function"||typeof r.getSnapshotBeforeUpdate=="function"||typeof r.UNSAFE_componentWillMount!="function"&&typeof r.componentWillMount!="function"||(l=r.state,typeof r.componentWillMount=="function"&&r.componentWillMount(),typeof r.UNSAFE_componentWillMount=="function"&&r.UNSAFE_componentWillMount(),l!==r.state&&Rf.enqueueReplaceState(r,r.state,null),xl(t,a,r,i),Sl(),r.state=t.memoizedState),typeof r.componentDidMount=="function"&&(t.flags|=4194308),a=!0}else if(e===null){r=t.stateNode;var s=t.memoizedProps,o=bi(n,s);r.props=o;var u=r.context,c=n.contextType;l=ir,typeof c=="object"&&c!==null&&(l=Ht(c));var p=n.getDerivedStateFromProps;c=typeof p=="function"||typeof r.getSnapshotBeforeUpdate=="function",s=t.pendingProps!==s,c||typeof r.UNSAFE_componentWillReceiveProps!="function"&&typeof r.componentWillReceiveProps!="function"||(s||u!==l)&&kg(t,r,a,l),Aa=!1;var d=t.memoizedState;r.state=d,xl(t,a,r,i),Sl(),u=t.memoizedState,s||d!==u||Aa?(typeof p=="function"&&(Vc(t,n,p,a),u=t.memoizedState),(o=Aa||Eg(t,n,o,a,d,u,l))?(c||typeof r.UNSAFE_componentWillMount!="function"&&typeof r.componentWillMount!="function"||(typeof r.componentWillMount=="function"&&r.componentWillMount(),typeof r.UNSAFE_componentWillMount=="function"&&r.UNSAFE_componentWillMount()),typeof r.componentDidMount=="function"&&(t.flags|=4194308)):(typeof r.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=a,t.memoizedState=u),r.props=a,r.state=u,r.context=l,a=o):(typeof r.componentDidMount=="function"&&(t.flags|=4194308),a=!1)}else{r=t.stateNode,Ef(e,t),l=t.memoizedProps,c=bi(n,l),r.props=c,p=t.pendingProps,d=r.context,u=n.contextType,o=ir,typeof u=="object"&&u!==null&&(o=Ht(u)),s=n.getDerivedStateFromProps,(u=typeof s=="function"||typeof r.getSnapshotBeforeUpdate=="function")||typeof r.UNSAFE_componentWillReceiveProps!="function"&&typeof r.componentWillReceiveProps!="function"||(l!==p||d!==o)&&kg(t,r,a,o),Aa=!1,d=t.memoizedState,r.state=d,xl(t,a,r,i),Sl();var f=t.memoizedState;l!==p||d!==f||Aa||e!==null&&e.dependencies!==null&&Co(e.dependencies)?(typeof s=="function"&&(Vc(t,n,s,a),f=t.memoizedState),(c=Aa||Eg(t,n,c,a,d,f,o)||e!==null&&e.dependencies!==null&&Co(e.dependencies))?(u||typeof r.UNSAFE_componentWillUpdate!="function"&&typeof r.componentWillUpdate!="function"||(typeof r.componentWillUpdate=="function"&&r.componentWillUpdate(a,f,o),typeof r.UNSAFE_componentWillUpdate=="function"&&r.UNSAFE_componentWillUpdate(a,f,o)),typeof r.componentDidUpdate=="function"&&(t.flags|=4),typeof r.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof r.componentDidUpdate!="function"||l===e.memoizedProps&&d===e.memoizedState||(t.flags|=4),typeof r.getSnapshotBeforeUpdate!="function"||l===e.memoizedProps&&d===e.memoizedState||(t.flags|=1024),t.memoizedProps=a,t.memoizedState=f),r.props=a,r.state=f,r.context=o,a=c):(typeof r.componentDidUpdate!="function"||l===e.memoizedProps&&d===e.memoizedState||(t.flags|=4),typeof r.getSnapshotBeforeUpdate!="function"||l===e.memoizedProps&&d===e.memoizedState||(t.flags|=1024),a=!1)}return r=a,mo(e,t),a=(t.flags&128)!==0,r||a?(r=t.stateNode,n=a&&typeof n.getDerivedStateFromError!="function"?null:r.render(),t.flags|=1,e!==null&&a?(t.child=Nr(t,e.child,null,i),t.child=Nr(t,null,n,i)):Rt(e,t,n,i),t.memoizedState=r.state,e=t.child):e=ma(e,t,i),e}function Dg(e,t,n,a){return Fl(),t.flags|=256,Rt(e,t,n,a),t.child}var Hc={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Pc(e){return{baseLanes:e,cachePool:Fv()}}function qc(e,t,n){return e=e!==null?e.childLanes&~n:0,t&&(e|=_n),e}function jy(e,t,n){var a=t.pendingProps,i=!1,r=(t.flags&128)!==0,l;if((l=r)||(l=e!==null&&e.memoizedState===null?!1:(gt.current&2)!==0),l&&(i=!0,t.flags&=-129),l=(t.flags&32)!==0,t.flags&=-33,e===null){if(ke){if(i?Ra(t):_a(t),ke){var s=et,o;if(o=s){e:{for(o=s,s=Gn;o.nodeType!==8;){if(!s){s=null;break e}if(o=Hn(o.nextSibling),o===null){s=null;break e}}s=o}s!==null?(t.memoizedState={dehydrated:s,treeContext:fi!==null?{id:la,overflow:sa}:null,retryLane:536870912,hydrationErrors:null},o=mn(18,null,null,0),o.stateNode=s,o.return=t,t.child=o,Gt=t,et=null,o=!0):o=!1}o||gi(t)}if(s=t.memoizedState,s!==null&&(s=s.dehydrated,s!==null))return Gf(s)?t.lanes=32:t.lanes=536870912,null;ua(t)}return s=a.children,a=a.fallback,i?(_a(t),i=t.mode,s=Uo({mode:"hidden",children:s},i),a=ci(a,i,n,null),s.return=t,a.return=t,s.sibling=a,t.child=s,i=t.child,i.memoizedState=Pc(n),i.childLanes=qc(e,l,n),t.memoizedState=Hc,a):(Ra(t),Of(t,s))}if(o=e.memoizedState,o!==null&&(s=o.dehydrated,s!==null)){if(r)t.flags&256?(Ra(t),t.flags&=-257,t=jc(e,t,n)):t.memoizedState!==null?(_a(t),t.child=e.child,t.flags|=128,t=null):(_a(t),i=a.fallback,s=t.mode,a=Uo({mode:"visible",children:a.children},s),i=ci(i,s,n,null),i.flags|=2,a.return=t,i.return=t,a.sibling=i,t.child=a,Nr(t,e.child,null,n),a=t.child,a.memoizedState=Pc(n),a.childLanes=qc(e,l,n),t.memoizedState=Hc,t=i);else if(Ra(t),Gf(s)){if(l=s.nextSibling&&s.nextSibling.dataset,l)var u=l.dgst;l=u,a=Error(M(419)),a.stack="",a.digest=l,Ol({value:a,source:null,stack:null}),t=jc(e,t,n)}else if(St||Zl(e,t,n,!1),l=(n&e.childLanes)!==0,St||l){if(l=Ye,l!==null&&(a=n&-n,a=(a&42)!==0?1:Wf(a),a=(a&(l.suspendedLanes|n))!==0?0:a,a!==0&&a!==o.retryLane))throw o.retryLane=a,Rr(e,a),yn(l,e,a),Hy;s.data==="$?"||Vf(),t=jc(e,t,n)}else s.data==="$?"?(t.flags|=192,t.child=e.child,t=null):(e=o.treeContext,et=Hn(s.nextSibling),Gt=t,ke=!0,di=null,Gn=!1,e!==null&&(wn[An++]=la,wn[An++]=sa,wn[An++]=fi,la=e.id,sa=e.overflow,fi=t),t=Of(t,a.children),t.flags|=4096);return t}return i?(_a(t),i=a.fallback,s=t.mode,o=e.child,u=o.sibling,a=ca(o,{mode:"hidden",children:a.children}),a.subtreeFlags=o.subtreeFlags&65011712,u!==null?i=ca(u,i):(i=ci(i,s,n,null),i.flags|=2),i.return=t,a.return=t,a.sibling=i,t.child=a,a=i,i=t.child,s=e.child.memoizedState,s===null?s=Pc(n):(o=s.cachePool,o!==null?(u=ht._currentValue,o=o.parent!==u?{parent:u,pool:u}:o):o=Fv(),s={baseLanes:s.baseLanes|n,cachePool:o}),i.memoizedState=s,i.childLanes=qc(e,l,n),t.memoizedState=Hc,a):(Ra(t),n=e.child,e=n.sibling,n=ca(n,{mode:"visible",children:a.children}),n.return=t,n.sibling=null,e!==null&&(l=t.deletions,l===null?(t.deletions=[e],t.flags|=16):l.push(e)),t.child=n,t.memoizedState=null,n)}function Of(e,t){return t=Uo({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function Uo(e,t){return e=mn(22,e,null,t),e.lanes=0,e.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null},e}function jc(e,t,n){return Nr(t,e.child,null,n),e=Of(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Og(e,t,n){e.lanes|=t;var a=e.alternate;a!==null&&(a.lanes|=t),bf(e.return,t,n)}function Yc(e,t,n,a,i){var r=e.memoizedState;r===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:a,tail:n,tailMode:i}:(r.isBackwards=t,r.rendering=null,r.renderingStartTime=0,r.last=a,r.tail=n,r.tailMode=i)}function Yy(e,t,n){var a=t.pendingProps,i=a.revealOrder,r=a.tail;if(Rt(e,t,a.children,n),a=gt.current,(a&2)!==0)a=a&1|2,t.flags|=128;else{if(e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Og(e,n,t);else if(e.tag===19)Og(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}a&=1}switch(Ze(gt,a),i){case"forwards":for(n=t.child,i=null;n!==null;)e=n.alternate,e!==null&&Lo(e)===null&&(i=n),n=n.sibling;n=i,n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),Yc(t,!1,i,n,r);break;case"backwards":for(n=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&Lo(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}Yc(t,!0,n,null,r);break;case"together":Yc(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function ma(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Xa|=t.lanes,(n&t.childLanes)===0)if(e!==null){if(Zl(e,t,n,!1),(n&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(M(153));if(t.child!==null){for(e=t.child,n=ca(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=ca(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function Rd(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&Co(e)))}function xT(e,t,n){switch(t.tag){case 3:So(t,t.stateNode.containerInfo),Ca(t,ht,e.memoizedState.cache),Fl();break;case 27:case 5:sf(t);break;case 4:So(t,t.stateNode.containerInfo);break;case 10:Ca(t,t.type,t.memoizedProps.value);break;case 13:var a=t.memoizedState;if(a!==null)return a.dehydrated!==null?(Ra(t),t.flags|=128,null):(n&t.child.childLanes)!==0?jy(e,t,n):(Ra(t),e=ma(e,t,n),e!==null?e.sibling:null);Ra(t);break;case 19:var i=(e.flags&128)!==0;if(a=(n&t.childLanes)!==0,a||(Zl(e,t,n,!1),a=(n&t.childLanes)!==0),i){if(a)return Yy(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),Ze(gt,gt.current),a)break;return null;case 22:case 23:return t.lanes=0,qy(e,t,n);case 24:Ca(t,ht,e.memoizedState.cache)}return ma(e,t,n)}function Iy(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps)St=!0;else{if(!Rd(e,n)&&(t.flags&128)===0)return St=!1,xT(e,t,n);St=(e.flags&131072)!==0}else St=!1,ke&&(t.flags&1048576)!==0&&Xv(t,Ao,t.index);switch(t.lanes=0,t.tag){case 16:e:{e=t.pendingProps;var a=t.elementType,i=a._init;if(a=i(a._payload),t.type=a,typeof a=="function")cd(a)?(e=bi(a,e),t.tag=1,t=_g(null,t,a,e,n)):(t.tag=0,t=Df(null,t,a,e,n));else{if(a!=null){if(i=a.$$typeof,i===Jf){t.tag=11,t=wg(null,t,a,e,n);break e}else if(i===$f){t.tag=14,t=Ag(null,t,a,e,n);break e}}throw t=rf(a)||a,Error(M(306,t,""))}}return t;case 0:return Df(e,t,t.type,t.pendingProps,n);case 1:return a=t.type,i=bi(a,t.pendingProps),_g(e,t,a,i,n);case 3:e:{if(So(t,t.stateNode.containerInfo),e===null)throw Error(M(387));a=t.pendingProps;var r=t.memoizedState;i=r.element,Ef(e,t),xl(t,a,null,n);var l=t.memoizedState;if(a=l.cache,Ca(t,ht,a),a!==r.cache&&Sf(t,[ht],n,!0),Sl(),a=l.element,r.isDehydrated)if(r={element:a,isDehydrated:!1,cache:l.cache},t.updateQueue.baseState=r,t.memoizedState=r,t.flags&256){t=Dg(e,t,a,n);break e}else if(a!==i){i=Rn(Error(M(424)),t),Ol(i),t=Dg(e,t,a,n);break e}else{switch(e=t.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName==="HTML"?e.ownerDocument.body:e}for(et=Hn(e.firstChild),Gt=t,ke=!0,di=null,Gn=!0,n=Oy(t,null,a,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling}else{if(Fl(),a===i){t=ma(e,t,n);break e}Rt(e,t,a,n)}t=t.child}return t;case 26:return mo(e,t),e===null?(n=$g(t.type,null,t.pendingProps,null))?t.memoizedState=n:ke||(n=t.type,e=t.pendingProps,a=Yo(Ua.current).createElement(n),a[Vt]=t,a[en]=e,Dt(a,n,e),bt(a),t.stateNode=a):t.memoizedState=$g(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return sf(t),e===null&&ke&&(a=t.stateNode=_b(t.type,t.pendingProps,Ua.current),Gt=t,Gn=!0,i=et,Fa(t.type)?(Xf=i,et=Hn(a.firstChild)):et=i),Rt(e,t,t.pendingProps.children,n),mo(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&ke&&((i=a=et)&&(a=QT(a,t.type,t.pendingProps,Gn),a!==null?(t.stateNode=a,Gt=t,et=Hn(a.firstChild),Gn=!1,i=!0):i=!1),i||gi(t)),sf(t),i=t.type,r=t.pendingProps,l=e!==null?e.memoizedProps:null,a=r.children,Yf(i,r)?a=null:l!==null&&Yf(i,l)&&(t.flags|=32),t.memoizedState!==null&&(i=yd(e,t,pT,null,null,n),Vl._currentValue=i),mo(e,t),Rt(e,t,a,n),t.child;case 6:return e===null&&ke&&((e=n=et)&&(n=FT(n,t.pendingProps,Gn),n!==null?(t.stateNode=n,Gt=t,et=null,e=!0):e=!1),e||gi(t)),null;case 13:return jy(e,t,n);case 4:return So(t,t.stateNode.containerInfo),a=t.pendingProps,e===null?t.child=Nr(t,null,a,n):Rt(e,t,a,n),t.child;case 11:return wg(e,t,t.type,t.pendingProps,n);case 7:return Rt(e,t,t.pendingProps,n),t.child;case 8:return Rt(e,t,t.pendingProps.children,n),t.child;case 12:return Rt(e,t,t.pendingProps.children,n),t.child;case 10:return a=t.pendingProps,Ca(t,t.type,a.value),Rt(e,t,a.children,n),t.child;case 9:return i=t.type._context,a=t.pendingProps.children,vi(t),i=Ht(i),a=a(i),t.flags|=1,Rt(e,t,a,n),t.child;case 14:return Ag(e,t,t.type,t.pendingProps,n);case 15:return Py(e,t,t.type,t.pendingProps,n);case 19:return Yy(e,t,n);case 31:return a=t.pendingProps,n=t.mode,a={mode:a.mode,children:a.children},e===null?(n=Uo(a,n),n.ref=t.ref,t.child=n,n.return=t,t=n):(n=ca(e.child,a),n.ref=t.ref,t.child=n,n.return=t,t=n),t;case 22:return qy(e,t,n);case 24:return vi(t),a=Ht(ht),e===null?(i=md(),i===null&&(i=Ye,r=pd(),i.pooledCache=r,r.refCount++,r!==null&&(i.pooledCacheLanes|=n),i=r),t.memoizedState={parent:a,cache:i},hd(t),Ca(t,ht,i)):((e.lanes&n)!==0&&(Ef(e,t),xl(t,null,null,n),Sl()),i=e.memoizedState,r=t.memoizedState,i.parent!==a?(i={parent:a,cache:a},t.memoizedState=i,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=i),Ca(t,ht,a)):(a=r.cache,Ca(t,ht,a),a!==i.cache&&Sf(t,[ht],n,!0))),Rt(e,t,t.pendingProps.children,n),t.child;case 29:throw t.pendingProps}throw Error(M(156,t.tag))}function na(e){e.flags|=4}function Lg(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!Lb(t)){if(t=Dn.current,t!==null&&((Ne&4194048)===Ne?Zn!==null:(Ne&62914560)!==Ne&&(Ne&536870912)===0||t!==Zn))throw yl=Nf,Zv;e.flags|=8192}}function Ws(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?gv():536870912,e.lanes|=t,Er|=t)}function ll(e,t){if(!ke)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 $e(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,a=0;if(t)for(var i=e.child;i!==null;)n|=i.lanes|i.childLanes,a|=i.subtreeFlags&65011712,a|=i.flags&65011712,i.return=e,i=i.sibling;else for(i=e.child;i!==null;)n|=i.lanes|i.childLanes,a|=i.subtreeFlags,a|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=a,e.childLanes=n,t}function NT(e,t,n){var a=t.pendingProps;switch(dd(t),t.tag){case 31:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return $e(t),null;case 1:return $e(t),null;case 3:return n=t.stateNode,a=null,e!==null&&(a=e.memoizedState.cache),t.memoizedState.cache!==a&&(t.flags|=2048),fa(ht),gr(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(il(t)?na(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,ug())),$e(t),null;case 26:return n=t.memoizedState,e===null?(na(t),n!==null?($e(t),Lg(t,n)):($e(t),t.flags&=-16777217)):n?n!==e.memoizedState?(na(t),$e(t),Lg(t,n)):($e(t),t.flags&=-16777217):(e.memoizedProps!==a&&na(t),$e(t),t.flags&=-16777217),null;case 27:xo(t),n=Ua.current;var i=t.type;if(e!==null&&t.stateNode!=null)e.memoizedProps!==a&&na(t);else{if(!a){if(t.stateNode===null)throw Error(M(166));return $e(t),null}e=Qn.current,il(t)?sg(t,e):(e=_b(i,a,n),t.stateNode=e,na(t))}return $e(t),null;case 5:if(xo(t),n=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==a&&na(t);else{if(!a){if(t.stateNode===null)throw Error(M(166));return $e(t),null}if(e=Qn.current,il(t))sg(t,e);else{switch(i=Yo(Ua.current),e){case 1:e=i.createElementNS("http://www.w3.org/2000/svg",n);break;case 2:e=i.createElementNS("http://www.w3.org/1998/Math/MathML",n);break;default:switch(n){case"svg":e=i.createElementNS("http://www.w3.org/2000/svg",n);break;case"math":e=i.createElementNS("http://www.w3.org/1998/Math/MathML",n);break;case"script":e=i.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild);break;case"select":e=typeof a.is=="string"?i.createElement("select",{is:a.is}):i.createElement("select"),a.multiple?e.multiple=!0:a.size&&(e.size=a.size);break;default:e=typeof a.is=="string"?i.createElement(n,{is:a.is}):i.createElement(n)}}e[Vt]=t,e[en]=a;e:for(i=t.child;i!==null;){if(i.tag===5||i.tag===6)e.appendChild(i.stateNode);else if(i.tag!==4&&i.tag!==27&&i.child!==null){i.child.return=i,i=i.child;continue}if(i===t)break e;for(;i.sibling===null;){if(i.return===null||i.return===t)break e;i=i.return}i.sibling.return=i.return,i=i.sibling}t.stateNode=e;e:switch(Dt(e,n,a),n){case"button":case"input":case"select":case"textarea":e=!!a.autoFocus;break e;case"img":e=!0;break e;default:e=!1}e&&na(t)}}return $e(t),t.flags&=-16777217,null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==a&&na(t);else{if(typeof a!="string"&&t.stateNode===null)throw Error(M(166));if(e=Ua.current,il(t)){if(e=t.stateNode,n=t.memoizedProps,a=null,i=Gt,i!==null)switch(i.tag){case 27:case 5:a=i.memoizedProps}e[Vt]=t,e=!!(e.nodeValue===n||a!==null&&a.suppressHydrationWarning===!0||Ab(e.nodeValue,n)),e||gi(t)}else e=Yo(e).createTextNode(a),e[Vt]=t,t.stateNode=e}return $e(t),null;case 13:if(a=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(i=il(t),a!==null&&a.dehydrated!==null){if(e===null){if(!i)throw Error(M(318));if(i=t.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(M(317));i[Vt]=t}else Fl(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;$e(t),i=!1}else i=ug(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=i),i=!0;if(!i)return t.flags&256?(ua(t),t):(ua(t),null)}if(ua(t),(t.flags&128)!==0)return t.lanes=n,t;if(n=a!==null,e=e!==null&&e.memoizedState!==null,n){a=t.child,i=null,a.alternate!==null&&a.alternate.memoizedState!==null&&a.alternate.memoizedState.cachePool!==null&&(i=a.alternate.memoizedState.cachePool.pool);var r=null;a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(r=a.memoizedState.cachePool.pool),r!==i&&(a.flags|=2048)}return n!==e&&n&&(t.child.flags|=8192),Ws(t,t.updateQueue),$e(t),null;case 4:return gr(),e===null&&Bd(t.stateNode.containerInfo),$e(t),null;case 10:return fa(t.type),$e(t),null;case 19:if(xt(gt),i=t.memoizedState,i===null)return $e(t),null;if(a=(t.flags&128)!==0,r=i.rendering,r===null)if(a)ll(i,!1);else{if(tt!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(r=Lo(e),r!==null){for(t.flags|=128,ll(i,!1),e=r.updateQueue,t.updateQueue=e,Ws(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)Gv(n,e),n=n.sibling;return Ze(gt,gt.current&1|2),t.child}e=e.sibling}i.tail!==null&&Fn()>Vo&&(t.flags|=128,a=!0,ll(i,!1),t.lanes=4194304)}else{if(!a)if(e=Lo(r),e!==null){if(t.flags|=128,a=!0,e=e.updateQueue,t.updateQueue=e,Ws(t,e),ll(i,!0),i.tail===null&&i.tailMode==="hidden"&&!r.alternate&&!ke)return $e(t),null}else 2*Fn()-i.renderingStartTime>Vo&&n!==536870912&&(t.flags|=128,a=!0,ll(i,!1),t.lanes=4194304);i.isBackwards?(r.sibling=t.child,t.child=r):(e=i.last,e!==null?e.sibling=r:t.child=r,i.last=r)}return i.tail!==null?(t=i.tail,i.rendering=t,i.tail=t.sibling,i.renderingStartTime=Fn(),t.sibling=null,e=gt.current,Ze(gt,a?e&1|2:e&1),t):($e(t),null);case 22:case 23:return ua(t),gd(),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&&($e(t),t.subtreeFlags&6&&(t.flags|=8192)):$e(t),n=t.updateQueue,n!==null&&Ws(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&&xt(pi),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),fa(ht),$e(t),null;case 25:return null;case 30:return null}throw Error(M(156,t.tag))}function ET(e,t){switch(dd(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return fa(ht),gr(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return xo(t),null;case 13:if(ua(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(M(340));Fl()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return xt(gt),null;case 4:return gr(),null;case 10:return fa(t.type),null;case 22:case 23:return ua(t),gd(),e!==null&&xt(pi),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return fa(ht),null;case 25:return null;default:return null}}function Gy(e,t){switch(dd(t),t.tag){case 3:fa(ht),gr();break;case 26:case 27:case 5:xo(t);break;case 4:gr();break;case 13:ua(t);break;case 19:xt(gt);break;case 10:fa(t.type);break;case 22:case 23:ua(t),gd(),e!==null&&xt(pi);break;case 24:fa(ht)}}function es(e,t){try{var n=t.updateQueue,a=n!==null?n.lastEffect:null;if(a!==null){var i=a.next;n=i;do{if((n.tag&e)===e){a=void 0;var r=n.create,l=n.inst;a=r(),l.destroy=a}n=n.next}while(n!==i)}}catch(s){He(t,t.return,s)}}function Ga(e,t,n){try{var a=t.updateQueue,i=a!==null?a.lastEffect:null;if(i!==null){var r=i.next;a=r;do{if((a.tag&e)===e){var l=a.inst,s=l.destroy;if(s!==void 0){l.destroy=void 0,i=t;var o=n,u=s;try{u()}catch(c){He(i,o,c)}}}a=a.next}while(a!==r)}}catch(c){He(t,t.return,c)}}function Xy(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{Kv(t,n)}catch(a){He(e,e.return,a)}}}function Qy(e,t,n){n.props=bi(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(a){He(e,t,a)}}function El(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(i){He(e,t,i)}}function Xn(e,t){var n=e.ref,a=e.refCleanup;if(n!==null)if(typeof a=="function")try{a()}catch(i){He(e,t,i)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof n=="function")try{n(null)}catch(i){He(e,t,i)}else n.current=null}function Fy(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(i){He(e,e.return,i)}}function Ic(e,t,n){try{var a=e.stateNode;jT(a,e.type,n,t),a[en]=t}catch(i){He(e,e.return,i)}}function Zy(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Fa(e.type)||e.tag===4}function Gc(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Zy(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&&Fa(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 Lf(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=ou));else if(a!==4&&(a===27&&Fa(e.type)&&(n=e.stateNode,t=null),e=e.child,e!==null))for(Lf(e,t,n),e=e.sibling;e!==null;)Lf(e,t,n),e=e.sibling}function Bo(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&&Fa(e.type)&&(n=e.stateNode),e=e.child,e!==null))for(Bo(e,t,n),e=e.sibling;e!==null;)Bo(e,t,n),e=e.sibling}function Jy(e){var t=e.stateNode,n=e.memoizedProps;try{for(var a=e.type,i=t.attributes;i.length;)t.removeAttributeNode(i[0]);Dt(t,a,n),t[Vt]=e,t[en]=n}catch(r){He(e,e.return,r)}}var ia=!1,lt=!1,Xc=!1,zg=typeof WeakSet=="function"?WeakSet:Set,yt=null;function kT(e,t){if(e=e.containerInfo,qf=Qo,e=Bv(e),sd(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 i=a.anchorOffset,r=a.focusNode;a=a.focusOffset;try{n.nodeType,r.nodeType}catch(x){n=null;break e}var l=0,s=-1,o=-1,u=0,c=0,p=e,d=null;t:for(;;){for(var f;p!==n||i!==0&&p.nodeType!==3||(s=l+i),p!==r||a!==0&&p.nodeType!==3||(o=l+a),p.nodeType===3&&(l+=p.nodeValue.length),(f=p.firstChild)!==null;)d=p,p=f;for(;;){if(p===e)break t;if(d===n&&++u===i&&(s=l),d===r&&++c===a&&(o=l),(f=p.nextSibling)!==null)break;p=d,d=p.parentNode}p=f}n=s===-1||o===-1?null:{start:s,end:o}}else n=null}n=n||{start:0,end:0}}else n=null;for(jf={focusedElem:e,selectionRange:n},Qo=!1,yt=t;yt!==null;)if(t=yt,e=t.child,(t.subtreeFlags&1024)!==0&&e!==null)e.return=t,yt=e;else for(;yt!==null;){switch(t=yt,r=t.alternate,e=t.flags,t.tag){case 0:break;case 11:case 15:break;case 1:if((e&1024)!==0&&r!==null){e=void 0,n=t,i=r.memoizedProps,r=r.memoizedState,a=n.stateNode;try{var S=bi(n.type,i,n.elementType===n.type);e=a.getSnapshotBeforeUpdate(S,r),a.__reactInternalSnapshotBeforeUpdate=e}catch(x){He(n,n.return,x)}}break;case 3:if((e&1024)!==0){if(e=t.stateNode.containerInfo,n=e.nodeType,n===9)If(e);else if(n===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":If(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(M(163))}if(e=t.sibling,e!==null){e.return=t.return,yt=e;break}yt=t.return}}function $y(e,t,n){var a=n.flags;switch(n.tag){case 0:case 11:case 15:ka(e,n),a&4&&es(5,n);break;case 1:if(ka(e,n),a&4)if(e=n.stateNode,t===null)try{e.componentDidMount()}catch(l){He(n,n.return,l)}else{var i=bi(n.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(i,t,e.__reactInternalSnapshotBeforeUpdate)}catch(l){He(n,n.return,l)}}a&64&&Xy(n),a&512&&El(n,n.return);break;case 3:if(ka(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{Kv(e,t)}catch(l){He(n,n.return,l)}}break;case 27:t===null&&a&4&&Jy(n);case 26:case 5:ka(e,n),t===null&&a&4&&Fy(n),a&512&&El(n,n.return);break;case 12:ka(e,n);break;case 13:ka(e,n),a&4&&eb(e,n),a&64&&(e=n.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(n=LT.bind(null,n),ZT(e,n))));break;case 22:if(a=n.memoizedState!==null||ia,!a){t=t!==null&&t.memoizedState!==null||lt,i=ia;var r=lt;ia=a,(lt=t)&&!r?Ta(e,n,(n.subtreeFlags&8772)!==0):ka(e,n),ia=i,lt=r}break;case 30:break;default:ka(e,n)}}function Ky(e){var t=e.alternate;t!==null&&(e.alternate=null,Ky(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&td(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 Fe=null,Kt=!1;function aa(e,t,n){for(n=n.child;n!==null;)Wy(e,t,n),n=n.sibling}function Wy(e,t,n){if(hn&&typeof hn.onCommitFiberUnmount=="function")try{hn.onCommitFiberUnmount(Yl,n)}catch(r){}switch(n.tag){case 26:lt||Xn(n,t),aa(e,t,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&(n=n.stateNode,n.parentNode.removeChild(n));break;case 27:lt||Xn(n,t);var a=Fe,i=Kt;Fa(n.type)&&(Fe=n.stateNode,Kt=!1),aa(e,t,n),Al(n.stateNode),Fe=a,Kt=i;break;case 5:lt||Xn(n,t);case 6:if(a=Fe,i=Kt,Fe=null,aa(e,t,n),Fe=a,Kt=i,Fe!==null)if(Kt)try{(Fe.nodeType===9?Fe.body:Fe.nodeName==="HTML"?Fe.ownerDocument.body:Fe).removeChild(n.stateNode)}catch(r){He(n,t,r)}else try{Fe.removeChild(n.stateNode)}catch(r){He(n,t,r)}break;case 18:Fe!==null&&(Kt?(e=Fe,Fg(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,n.stateNode),ql(e)):Fg(Fe,n.stateNode));break;case 4:a=Fe,i=Kt,Fe=n.stateNode.containerInfo,Kt=!0,aa(e,t,n),Fe=a,Kt=i;break;case 0:case 11:case 14:case 15:lt||Ga(2,n,t),lt||Ga(4,n,t),aa(e,t,n);break;case 1:lt||(Xn(n,t),a=n.stateNode,typeof a.componentWillUnmount=="function"&&Qy(n,t,a)),aa(e,t,n);break;case 21:aa(e,t,n);break;case 22:lt=(a=lt)||n.memoizedState!==null,aa(e,t,n),lt=a;break;default:aa(e,t,n)}}function eb(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{ql(e)}catch(n){He(t,t.return,n)}}function TT(e){switch(e.tag){case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new zg),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new zg),t;default:throw Error(M(435,e.tag))}}function Qc(e,t){var n=TT(e);t.forEach(function(a){var i=zT.bind(null,e,a);n.has(a)||(n.add(a),a.then(i,i))})}function fn(e,t){var n=t.deletions;if(n!==null)for(var a=0;a<n.length;a++){var i=n[a],r=e,l=t,s=l;e:for(;s!==null;){switch(s.tag){case 27:if(Fa(s.type)){Fe=s.stateNode,Kt=!1;break e}break;case 5:Fe=s.stateNode,Kt=!1;break e;case 3:case 4:Fe=s.stateNode.containerInfo,Kt=!0;break e}s=s.return}if(Fe===null)throw Error(M(160));Wy(r,l,i),Fe=null,Kt=!1,r=i.alternate,r!==null&&(r.return=null),i.return=null}if(t.subtreeFlags&13878)for(t=t.child;t!==null;)tb(t,e),t=t.sibling}var Vn=null;function tb(e,t){var n=e.alternate,a=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:fn(t,e),dn(e),a&4&&(Ga(3,e,e.return),es(3,e),Ga(5,e,e.return));break;case 1:fn(t,e),dn(e),a&512&&(lt||n===null||Xn(n,n.return)),a&64&&ia&&(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 i=Vn;if(fn(t,e),dn(e),a&512&&(lt||n===null||Xn(n,n.return)),a&4){var r=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,i=i.ownerDocument||i;t:switch(a){case"title":r=i.getElementsByTagName("title")[0],(!r||r[Xl]||r[Vt]||r.namespaceURI==="http://www.w3.org/2000/svg"||r.hasAttribute("itemprop"))&&(r=i.createElement(a),i.head.insertBefore(r,i.querySelector("head > title"))),Dt(r,a,n),r[Vt]=e,bt(r),a=r;break e;case"link":var l=Wg("link","href",i).get(a+(n.href||""));if(l){for(var s=0;s<l.length;s++)if(r=l[s],r.getAttribute("href")===(n.href==null||n.href===""?null:n.href)&&r.getAttribute("rel")===(n.rel==null?null:n.rel)&&r.getAttribute("title")===(n.title==null?null:n.title)&&r.getAttribute("crossorigin")===(n.crossOrigin==null?null:n.crossOrigin)){l.splice(s,1);break t}}r=i.createElement(a),Dt(r,a,n),i.head.appendChild(r);break;case"meta":if(l=Wg("meta","content",i).get(a+(n.content||""))){for(s=0;s<l.length;s++)if(r=l[s],r.getAttribute("content")===(n.content==null?null:""+n.content)&&r.getAttribute("name")===(n.name==null?null:n.name)&&r.getAttribute("property")===(n.property==null?null:n.property)&&r.getAttribute("http-equiv")===(n.httpEquiv==null?null:n.httpEquiv)&&r.getAttribute("charset")===(n.charSet==null?null:n.charSet)){l.splice(s,1);break t}}r=i.createElement(a),Dt(r,a,n),i.head.appendChild(r);break;default:throw Error(M(468,a))}r[Vt]=e,bt(r),a=r}e.stateNode=a}else ev(i,e.type,e.stateNode);else e.stateNode=Kg(i,a,e.memoizedProps);else r!==a?(r===null?n.stateNode!==null&&(n=n.stateNode,n.parentNode.removeChild(n)):r.count--,a===null?ev(i,e.type,e.stateNode):Kg(i,a,e.memoizedProps)):a===null&&e.stateNode!==null&&Ic(e,e.memoizedProps,n.memoizedProps)}break;case 27:fn(t,e),dn(e),a&512&&(lt||n===null||Xn(n,n.return)),n!==null&&a&4&&Ic(e,e.memoizedProps,n.memoizedProps);break;case 5:if(fn(t,e),dn(e),a&512&&(lt||n===null||Xn(n,n.return)),e.flags&32){i=e.stateNode;try{yr(i,"")}catch(f){He(e,e.return,f)}}a&4&&e.stateNode!=null&&(i=e.memoizedProps,Ic(e,i,n!==null?n.memoizedProps:i)),a&1024&&(Xc=!0);break;case 6:if(fn(t,e),dn(e),a&4){if(e.stateNode===null)throw Error(M(162));a=e.memoizedProps,n=e.stateNode;try{n.nodeValue=a}catch(f){He(e,e.return,f)}}break;case 3:if(vo=null,i=Vn,Vn=Io(t.containerInfo),fn(t,e),Vn=i,dn(e),a&4&&n!==null&&n.memoizedState.isDehydrated)try{ql(t.containerInfo)}catch(f){He(e,e.return,f)}Xc&&(Xc=!1,nb(e));break;case 4:a=Vn,Vn=Io(e.stateNode.containerInfo),fn(t,e),dn(e),Vn=a;break;case 12:fn(t,e),dn(e);break;case 13:fn(t,e),dn(e),e.child.flags&8192&&e.memoizedState!==null!=(n!==null&&n.memoizedState!==null)&&(zd=Fn()),a&4&&(a=e.updateQueue,a!==null&&(e.updateQueue=null,Qc(e,a)));break;case 22:i=e.memoizedState!==null;var o=n!==null&&n.memoizedState!==null,u=ia,c=lt;if(ia=u||i,lt=c||o,fn(t,e),lt=c,ia=u,dn(e),a&8192)e:for(t=e.stateNode,t._visibility=i?t._visibility&-2:t._visibility|1,i&&(n===null||o||ia||lt||oi(e)),n=null,t=e;;){if(t.tag===5||t.tag===26){if(n===null){o=n=t;try{if(r=o.stateNode,i)l=r.style,typeof l.setProperty=="function"?l.setProperty("display","none","important"):l.display="none";else{s=o.stateNode;var p=o.memoizedProps.style,d=p!=null&&p.hasOwnProperty("display")?p.display:null;s.style.display=d==null||typeof d=="boolean"?"":(""+d).trim()}}catch(f){He(o,o.return,f)}}}else if(t.tag===6){if(n===null){o=t;try{o.stateNode.nodeValue=i?"":o.memoizedProps}catch(f){He(o,o.return,f)}}}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,Qc(e,n))));break;case 19:fn(t,e),dn(e),a&4&&(a=e.updateQueue,a!==null&&(e.updateQueue=null,Qc(e,a)));break;case 30:break;case 21:break;default:fn(t,e),dn(e)}}function dn(e){var t=e.flags;if(t&2){try{for(var n,a=e.return;a!==null;){if(Zy(a)){n=a;break}a=a.return}if(n==null)throw Error(M(160));switch(n.tag){case 27:var i=n.stateNode,r=Gc(e);Bo(e,r,i);break;case 5:var l=n.stateNode;n.flags&32&&(yr(l,""),n.flags&=-33);var s=Gc(e);Bo(e,s,l);break;case 3:case 4:var o=n.stateNode.containerInfo,u=Gc(e);Lf(e,u,o);break;default:throw Error(M(161))}}catch(c){He(e,e.return,c)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function nb(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;nb(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function ka(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)$y(e,t.alternate,t),t=t.sibling}function oi(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:Ga(4,t,t.return),oi(t);break;case 1:Xn(t,t.return);var n=t.stateNode;typeof n.componentWillUnmount=="function"&&Qy(t,t.return,n),oi(t);break;case 27:Al(t.stateNode);case 26:case 5:Xn(t,t.return),oi(t);break;case 22:t.memoizedState===null&&oi(t);break;case 30:oi(t);break;default:oi(t)}e=e.sibling}}function Ta(e,t,n){for(n=n&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var a=t.alternate,i=e,r=t,l=r.flags;switch(r.tag){case 0:case 11:case 15:Ta(i,r,n),es(4,r);break;case 1:if(Ta(i,r,n),a=r,i=a.stateNode,typeof i.componentDidMount=="function")try{i.componentDidMount()}catch(u){He(a,a.return,u)}if(a=r,i=a.updateQueue,i!==null){var s=a.stateNode;try{var o=i.shared.hiddenCallbacks;if(o!==null)for(i.shared.hiddenCallbacks=null,i=0;i<o.length;i++)$v(o[i],s)}catch(u){He(a,a.return,u)}}n&&l&64&&Xy(r),El(r,r.return);break;case 27:Jy(r);case 26:case 5:Ta(i,r,n),n&&a===null&&l&4&&Fy(r),El(r,r.return);break;case 12:Ta(i,r,n);break;case 13:Ta(i,r,n),n&&l&4&&eb(i,r);break;case 22:r.memoizedState===null&&Ta(i,r,n),El(r,r.return);break;case 30:break;default:Ta(i,r,n)}t=t.sibling}}function _d(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&&Jl(n))}function Dd(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Jl(e))}function In(e,t,n,a){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)ab(e,t,n,a),t=t.sibling}function ab(e,t,n,a){var i=t.flags;switch(t.tag){case 0:case 11:case 15:In(e,t,n,a),i&2048&&es(9,t);break;case 1:In(e,t,n,a);break;case 3:In(e,t,n,a),i&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Jl(e)));break;case 12:if(i&2048){In(e,t,n,a),e=t.stateNode;try{var r=t.memoizedProps,l=r.id,s=r.onPostCommit;typeof s=="function"&&s(l,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(o){He(t,t.return,o)}}else In(e,t,n,a);break;case 13:In(e,t,n,a);break;case 23:break;case 22:r=t.stateNode,l=t.alternate,t.memoizedState!==null?r._visibility&2?In(e,t,n,a):kl(e,t):r._visibility&2?In(e,t,n,a):(r._visibility|=2,Fi(e,t,n,a,(t.subtreeFlags&10256)!==0)),i&2048&&_d(l,t);break;case 24:In(e,t,n,a),i&2048&&Dd(t.alternate,t);break;default:In(e,t,n,a)}}function Fi(e,t,n,a,i){for(i=i&&(t.subtreeFlags&10256)!==0,t=t.child;t!==null;){var r=e,l=t,s=n,o=a,u=l.flags;switch(l.tag){case 0:case 11:case 15:Fi(r,l,s,o,i),es(8,l);break;case 23:break;case 22:var c=l.stateNode;l.memoizedState!==null?c._visibility&2?Fi(r,l,s,o,i):kl(r,l):(c._visibility|=2,Fi(r,l,s,o,i)),i&&u&2048&&_d(l.alternate,l);break;case 24:Fi(r,l,s,o,i),i&&u&2048&&Dd(l.alternate,l);break;default:Fi(r,l,s,o,i)}t=t.sibling}}function kl(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var n=e,a=t,i=a.flags;switch(a.tag){case 22:kl(n,a),i&2048&&_d(a.alternate,a);break;case 24:kl(n,a),i&2048&&Dd(a.alternate,a);break;default:kl(n,a)}t=t.sibling}}var pl=8192;function Gi(e){if(e.subtreeFlags&pl)for(e=e.child;e!==null;)ib(e),e=e.sibling}function ib(e){switch(e.tag){case 26:Gi(e),e.flags&pl&&e.memoizedState!==null&&ow(Vn,e.memoizedState,e.memoizedProps);break;case 5:Gi(e);break;case 3:case 4:var t=Vn;Vn=Io(e.stateNode.containerInfo),Gi(e),Vn=t;break;case 22:e.memoizedState===null&&(t=e.alternate,t!==null&&t.memoizedState!==null?(t=pl,pl=16777216,Gi(e),pl=t):Gi(e));break;default:Gi(e)}}function rb(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 sl(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];yt=a,sb(a,e)}rb(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)lb(e),e=e.sibling}function lb(e){switch(e.tag){case 0:case 11:case 15:sl(e),e.flags&2048&&Ga(9,e,e.return);break;case 3:sl(e);break;case 12:sl(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,ho(e)):sl(e);break;default:sl(e)}}function ho(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];yt=a,sb(a,e)}rb(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Ga(8,t,t.return),ho(t);break;case 22:n=t.stateNode,n._visibility&2&&(n._visibility&=-3,ho(t));break;default:ho(t)}e=e.sibling}}function sb(e,t){for(;yt!==null;){var n=yt;switch(n.tag){case 0:case 11:case 15:Ga(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:Jl(n.memoizedState.cache)}if(a=n.child,a!==null)a.return=n,yt=a;else e:for(n=e;yt!==null;){a=yt;var i=a.sibling,r=a.return;if(Ky(a),a===n){yt=null;break e}if(i!==null){i.return=r,yt=i;break e}yt=r}}}var wT={getCacheForType:function(e){var t=Ht(ht),n=t.data.get(e);return n===void 0&&(n=e(),t.data.set(e,n)),n}},AT=typeof WeakMap=="function"?WeakMap:Map,Ce=0,Ye=null,ye=null,Ne=0,Ae=0,pn=null,za=!1,_r=!1,Od=!1,ha=0,tt=0,Xa=0,mi=0,Ld=0,_n=0,Er=0,Tl=null,Wt=null,zf=!1,zd=0,Vo=1/0,Ho=null,Ha=null,_t=0,Pa=null,kr=null,hr=0,Mf=0,Uf=null,ob=null,wl=0,Bf=null;function vn(){if((Ce&2)!==0&&Ne!==0)return Ne&-Ne;if(ue.T!==null){var e=br;return e!==0?e:Ud()}return bv()}function ub(){_n===0&&(_n=(Ne&536870912)===0||ke?hv():536870912);var e=Dn.current;return e!==null&&(e.flags|=32),_n}function yn(e,t,n){(e===Ye&&(Ae===2||Ae===9)||e.cancelPendingCommit!==null)&&(Tr(e,0),Ma(e,Ne,_n,!1)),Gl(e,n),((Ce&2)===0||e!==Ye)&&(e===Ye&&((Ce&2)===0&&(mi|=n),tt===4&&Ma(e,Ne,_n,!1)),$n(e))}function cb(e,t,n){if((Ce&6)!==0)throw Error(M(327));var a=!n&&(t&124)===0&&(t&e.expiredLanes)===0||Il(e,t),i=a?_T(e,t):Fc(e,t,!0),r=a;do{if(i===0){_r&&!a&&Ma(e,t,0,!1);break}else{if(n=e.current.alternate,r&&!CT(n)){i=Fc(e,t,!1),r=!1;continue}if(i===2){if(r=t,e.errorRecoveryDisabledLanes&r)var l=0;else l=e.pendingLanes&-536870913,l=l!==0?l:l&536870912?536870912:0;if(l!==0){t=l;e:{var s=e;i=Tl;var o=s.current.memoizedState.isDehydrated;if(o&&(Tr(s,l).flags|=256),l=Fc(s,l,!1),l!==2){if(Od&&!o){s.errorRecoveryDisabledLanes|=r,mi|=r,i=4;break e}r=Wt,Wt=i,r!==null&&(Wt===null?Wt=r:Wt.push.apply(Wt,r))}i=l}if(r=!1,i!==2)continue}}if(i===1){Tr(e,0),Ma(e,t,0,!0);break}e:{switch(a=e,r=i,r){case 0:case 1:throw Error(M(345));case 4:if((t&4194048)!==t)break;case 6:Ma(a,t,_n,!za);break e;case 2:Wt=null;break;case 3:case 5:break;default:throw Error(M(329))}if((t&62914560)===t&&(i=zd+300-Fn(),10<i)){if(Ma(a,t,_n,!za),Zo(a,0,!0)!==0)break e;a.timeoutHandle=Rb(Mg.bind(null,a,n,Wt,Ho,zf,t,_n,mi,Er,za,r,2,-0,0),i);break e}Mg(a,n,Wt,Ho,zf,t,_n,mi,Er,za,r,0,-0,0)}}break}while(!0);$n(e)}function Mg(e,t,n,a,i,r,l,s,o,u,c,p,d,f){if(e.timeoutHandle=-1,p=t.subtreeFlags,(p&8192||(p&16785408)===16785408)&&(Bl={stylesheets:null,count:0,unsuspend:sw},ib(t),p=uw(),p!==null)){e.cancelPendingCommit=p(Bg.bind(null,e,t,r,n,a,i,l,s,o,c,1,d,f)),Ma(e,r,l,!u);return}Bg(e,t,r,n,a,i,l,s,o)}function CT(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 i=n[a],r=i.getSnapshot;i=i.value;try{if(!bn(r(),i))return!1}catch(l){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 Ma(e,t,n,a){t&=~Ld,t&=~mi,e.suspendedLanes|=t,e.pingedLanes&=~t,a&&(e.warmLanes|=t),a=e.expirationTimes;for(var i=t;0<i;){var r=31-gn(i),l=1<<r;a[r]=-1,i&=~l}n!==0&&vv(e,n,t)}function ru(){return(Ce&6)===0?(ts(0,!1),!1):!0}function Md(){if(ye!==null){if(Ae===0)var e=ye.return;else e=ye,oa=Ei=null,xd(e),mr=null,zl=0,e=ye;for(;e!==null;)Gy(e.alternate,e),e=e.return;ye=null}}function Tr(e,t){var n=e.timeoutHandle;n!==-1&&(e.timeoutHandle=-1,IT(n)),n=e.cancelPendingCommit,n!==null&&(e.cancelPendingCommit=null,n()),Md(),Ye=e,ye=n=ca(e.current,null),Ne=t,Ae=0,pn=null,za=!1,_r=Il(e,t),Od=!1,Er=_n=Ld=mi=Xa=tt=0,Wt=Tl=null,zf=!1,(t&8)!==0&&(t|=t&32);var a=e.entangledLanes;if(a!==0)for(e=e.entanglements,a&=t;0<a;){var i=31-gn(a),r=1<<i;t|=e[i],a&=~r}return ha=t,Wo(),n}function fb(e,t){he=null,ue.H=Oo,t===$l||t===tu?(t=pg(),Ae=3):t===Zv?(t=pg(),Ae=4):Ae=t===Hy?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,pn=t,ye===null&&(tt=1,Mo(e,Rn(t,e.current)))}function db(){var e=ue.H;return ue.H=Oo,e===null?Oo:e}function pb(){var e=ue.A;return ue.A=wT,e}function Vf(){tt=4,za||(Ne&4194048)!==Ne&&Dn.current!==null||(_r=!0),(Xa&134217727)===0&&(mi&134217727)===0||Ye===null||Ma(Ye,Ne,_n,!1)}function Fc(e,t,n){var a=Ce;Ce|=2;var i=db(),r=pb();(Ye!==e||Ne!==t)&&(Ho=null,Tr(e,t)),t=!1;var l=tt;e:do try{if(Ae!==0&&ye!==null){var s=ye,o=pn;switch(Ae){case 8:Md(),l=6;break e;case 3:case 2:case 9:case 6:Dn.current===null&&(t=!0);var u=Ae;if(Ae=0,pn=null,sr(e,s,o,u),n&&_r){l=0;break e}break;default:u=Ae,Ae=0,pn=null,sr(e,s,o,u)}}RT(),l=tt;break}catch(c){fb(e,c)}while(!0);return t&&e.shellSuspendCounter++,oa=Ei=null,Ce=a,ue.H=i,ue.A=r,ye===null&&(Ye=null,Ne=0,Wo()),l}function RT(){for(;ye!==null;)mb(ye)}function _T(e,t){var n=Ce;Ce|=2;var a=db(),i=pb();Ye!==e||Ne!==t?(Ho=null,Vo=Fn()+500,Tr(e,t)):_r=Il(e,t);e:do try{if(Ae!==0&&ye!==null){t=ye;var r=pn;t:switch(Ae){case 1:Ae=0,pn=null,sr(e,t,r,1);break;case 2:case 9:if(dg(r)){Ae=0,pn=null,Ug(t);break}t=function(){Ae!==2&&Ae!==9||Ye!==e||(Ae=7),$n(e)},r.then(t,t);break e;case 3:Ae=7;break e;case 4:Ae=5;break e;case 7:dg(r)?(Ae=0,pn=null,Ug(t)):(Ae=0,pn=null,sr(e,t,r,7));break;case 5:var l=null;switch(ye.tag){case 26:l=ye.memoizedState;case 5:case 27:var s=ye;if(!l||Lb(l)){Ae=0,pn=null;var o=s.sibling;if(o!==null)ye=o;else{var u=s.return;u!==null?(ye=u,lu(u)):ye=null}break t}}Ae=0,pn=null,sr(e,t,r,5);break;case 6:Ae=0,pn=null,sr(e,t,r,6);break;case 8:Md(),tt=6;break e;default:throw Error(M(462))}}DT();break}catch(c){fb(e,c)}while(!0);return oa=Ei=null,ue.H=a,ue.A=i,Ce=n,ye!==null?0:(Ye=null,Ne=0,Wo(),tt)}function DT(){for(;ye!==null&&!WE();)mb(ye)}function mb(e){var t=Iy(e.alternate,e,ha);e.memoizedProps=e.pendingProps,t===null?lu(e):ye=t}function Ug(e){var t=e,n=t.alternate;switch(t.tag){case 15:case 0:t=Rg(n,t,t.pendingProps,t.type,void 0,Ne);break;case 11:t=Rg(n,t,t.pendingProps,t.type.render,t.ref,Ne);break;case 5:xd(t);default:Gy(n,t),t=ye=Gv(t,ha),t=Iy(n,t,ha)}e.memoizedProps=e.pendingProps,t===null?lu(e):ye=t}function sr(e,t,n,a){oa=Ei=null,xd(t),mr=null,zl=0;var i=t.return;try{if(ST(e,i,t,n,Ne)){tt=1,Mo(e,Rn(n,e.current)),ye=null;return}}catch(r){if(i!==null)throw ye=i,r;tt=1,Mo(e,Rn(n,e.current)),ye=null;return}t.flags&32768?(ke||a===1?e=!0:_r||(Ne&536870912)!==0?e=!1:(za=e=!0,(a===2||a===9||a===3||a===6)&&(a=Dn.current,a!==null&&a.tag===13&&(a.flags|=16384))),hb(t,e)):lu(t)}function lu(e){var t=e;do{if((t.flags&32768)!==0){hb(t,za);return}e=t.return;var n=NT(t.alternate,t,ha);if(n!==null){ye=n;return}if(t=t.sibling,t!==null){ye=t;return}ye=t=e}while(t!==null);tt===0&&(tt=5)}function hb(e,t){do{var n=ET(e.alternate,e);if(n!==null){n.flags&=32767,ye=n;return}if(n=e.return,n!==null&&(n.flags|=32768,n.subtreeFlags=0,n.deletions=null),!t&&(e=e.sibling,e!==null)){ye=e;return}ye=e=n}while(e!==null);tt=6,ye=null}function Bg(e,t,n,a,i,r,l,s,o){e.cancelPendingCommit=null;do su();while(_t!==0);if((Ce&6)!==0)throw Error(M(327));if(t!==null){if(t===e.current)throw Error(M(177));if(r=t.lanes|t.childLanes,r|=od,uk(e,n,r,l,s,o),e===Ye&&(ye=Ye=null,Ne=0),kr=t,Pa=e,hr=n,Mf=r,Uf=i,ob=a,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,MT(No,function(){return Sb(!0),null})):(e.callbackNode=null,e.callbackPriority=0),a=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||a){a=ue.T,ue.T=null,i=Te.p,Te.p=2,l=Ce,Ce|=4;try{kT(e,t,n)}finally{Ce=l,Te.p=i,ue.T=a}}_t=1,gb(),vb(),yb()}}function gb(){if(_t===1){_t=0;var e=Pa,t=kr,n=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||n){n=ue.T,ue.T=null;var a=Te.p;Te.p=2;var i=Ce;Ce|=4;try{tb(t,e);var r=jf,l=Bv(e.containerInfo),s=r.focusedElem,o=r.selectionRange;if(l!==s&&s&&s.ownerDocument&&Uv(s.ownerDocument.documentElement,s)){if(o!==null&&sd(s)){var u=o.start,c=o.end;if(c===void 0&&(c=u),"selectionStart"in s)s.selectionStart=u,s.selectionEnd=Math.min(c,s.value.length);else{var p=s.ownerDocument||document,d=p&&p.defaultView||window;if(d.getSelection){var f=d.getSelection(),S=s.textContent.length,x=Math.min(o.start,S),k=o.end===void 0?x:Math.min(o.end,S);!f.extend&&x>k&&(l=k,k=x,x=l);var m=ig(s,x),h=ig(s,k);if(m&&h&&(f.rangeCount!==1||f.anchorNode!==m.node||f.anchorOffset!==m.offset||f.focusNode!==h.node||f.focusOffset!==h.offset)){var g=p.createRange();g.setStart(m.node,m.offset),f.removeAllRanges(),x>k?(f.addRange(g),f.extend(h.node,h.offset)):(g.setEnd(h.node,h.offset),f.addRange(g))}}}}for(p=[],f=s;f=f.parentNode;)f.nodeType===1&&p.push({element:f,left:f.scrollLeft,top:f.scrollTop});for(typeof s.focus=="function"&&s.focus(),s=0;s<p.length;s++){var E=p[s];E.element.scrollLeft=E.left,E.element.scrollTop=E.top}}Qo=!!qf,jf=qf=null}finally{Ce=i,Te.p=a,ue.T=n}}e.current=t,_t=2}}function vb(){if(_t===2){_t=0;var e=Pa,t=kr,n=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||n){n=ue.T,ue.T=null;var a=Te.p;Te.p=2;var i=Ce;Ce|=4;try{$y(e,t.alternate,t)}finally{Ce=i,Te.p=a,ue.T=n}}_t=3}}function yb(){if(_t===4||_t===3){_t=0,ek();var e=Pa,t=kr,n=hr,a=ob;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?_t=5:(_t=0,kr=Pa=null,bb(e,e.pendingLanes));var i=e.pendingLanes;if(i===0&&(Ha=null),ed(n),t=t.stateNode,hn&&typeof hn.onCommitFiberRoot=="function")try{hn.onCommitFiberRoot(Yl,t,void 0,(t.current.flags&128)===128)}catch(o){}if(a!==null){t=ue.T,i=Te.p,Te.p=2,ue.T=null;try{for(var r=e.onRecoverableError,l=0;l<a.length;l++){var s=a[l];r(s.value,{componentStack:s.stack})}}finally{ue.T=t,Te.p=i}}(hr&3)!==0&&su(),$n(e),i=e.pendingLanes,(n&4194090)!==0&&(i&42)!==0?e===Bf?wl++:(wl=0,Bf=e):wl=0,ts(0,!1)}}function bb(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,Jl(t)))}function su(e){return gb(),vb(),yb(),Sb(e)}function Sb(){if(_t!==5)return!1;var e=Pa,t=Mf;Mf=0;var n=ed(hr),a=ue.T,i=Te.p;try{Te.p=32>n?32:n,ue.T=null,n=Uf,Uf=null;var r=Pa,l=hr;if(_t=0,kr=Pa=null,hr=0,(Ce&6)!==0)throw Error(M(331));var s=Ce;if(Ce|=4,lb(r.current),ab(r,r.current,l,n),Ce=s,ts(0,!1),hn&&typeof hn.onPostCommitFiberRoot=="function")try{hn.onPostCommitFiberRoot(Yl,r)}catch(o){}return!0}finally{Te.p=i,ue.T=a,bb(e,t)}}function Vg(e,t,n){t=Rn(n,t),t=_f(e.stateNode,t,2),e=Va(e,t,2),e!==null&&(Gl(e,2),$n(e))}function He(e,t,n){if(e.tag===3)Vg(e,e,n);else for(;t!==null;){if(t.tag===3){Vg(t,e,n);break}else if(t.tag===1){var a=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof a.componentDidCatch=="function"&&(Ha===null||!Ha.has(a))){e=Rn(n,e),n=By(2),a=Va(t,n,2),a!==null&&(Vy(n,a,t,e),Gl(a,2),$n(a));break}}t=t.return}}function Zc(e,t,n){var a=e.pingCache;if(a===null){a=e.pingCache=new AT;var i=new Set;a.set(t,i)}else i=a.get(t),i===void 0&&(i=new Set,a.set(t,i));i.has(n)||(Od=!0,i.add(n),e=OT.bind(null,e,t,n),t.then(e,e))}function OT(e,t,n){var a=e.pingCache;a!==null&&a.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,Ye===e&&(Ne&n)===n&&(tt===4||tt===3&&(Ne&62914560)===Ne&&300>Fn()-zd?(Ce&2)===0&&Tr(e,0):Ld|=n,Er===Ne&&(Er=0)),$n(e)}function xb(e,t){t===0&&(t=gv()),e=Rr(e,t),e!==null&&(Gl(e,t),$n(e))}function LT(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),xb(e,n)}function zT(e,t){var n=0;switch(e.tag){case 13:var a=e.stateNode,i=e.memoizedState;i!==null&&(n=i.retryLane);break;case 19:a=e.stateNode;break;case 22:a=e.stateNode._retryCache;break;default:throw Error(M(314))}a!==null&&a.delete(t),xb(e,n)}function MT(e,t){return Kf(e,t)}var Po=null,Zi=null,Hf=!1,qo=!1,Jc=!1,hi=0;function $n(e){e!==Zi&&e.next===null&&(Zi===null?Po=Zi=e:Zi=Zi.next=e),qo=!0,Hf||(Hf=!0,BT())}function ts(e,t){if(!Jc&&qo){Jc=!0;do for(var n=!1,a=Po;a!==null;){if(!t)if(e!==0){var i=a.pendingLanes;if(i===0)var r=0;else{var l=a.suspendedLanes,s=a.pingedLanes;r=(1<<31-gn(42|e)+1)-1,r&=i&~(l&~s),r=r&201326741?r&201326741|1:r?r|2:0}r!==0&&(n=!0,Hg(a,r))}else r=Ne,r=Zo(a,a===Ye?r:0,a.cancelPendingCommit!==null||a.timeoutHandle!==-1),(r&3)===0||Il(a,r)||(n=!0,Hg(a,r));a=a.next}while(n);Jc=!1}}function UT(){Nb()}function Nb(){qo=Hf=!1;var e=0;hi!==0&&(YT()&&(e=hi),hi=0);for(var t=Fn(),n=null,a=Po;a!==null;){var i=a.next,r=Eb(a,t);r===0?(a.next=null,n===null?Po=i:n.next=i,i===null&&(Zi=n)):(n=a,(e!==0||(r&3)!==0)&&(qo=!0)),a=i}ts(e,!1)}function Eb(e,t){for(var n=e.suspendedLanes,a=e.pingedLanes,i=e.expirationTimes,r=e.pendingLanes&-62914561;0<r;){var l=31-gn(r),s=1<<l,o=i[l];o===-1?((s&n)===0||(s&a)!==0)&&(i[l]=ok(s,t)):o<=t&&(e.expiredLanes|=s),r&=~s}if(t=Ye,n=Ne,n=Zo(e,e===t?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),a=e.callbackNode,n===0||e===t&&(Ae===2||Ae===9)||e.cancelPendingCommit!==null)return a!==null&&a!==null&&Ec(a),e.callbackNode=null,e.callbackPriority=0;if((n&3)===0||Il(e,n)){if(t=n&-n,t===e.callbackPriority)return t;switch(a!==null&&Ec(a),ed(n)){case 2:case 8:n=pv;break;case 32:n=No;break;case 268435456:n=mv;break;default:n=No}return a=kb.bind(null,e),n=Kf(n,a),e.callbackPriority=t,e.callbackNode=n,t}return a!==null&&a!==null&&Ec(a),e.callbackPriority=2,e.callbackNode=null,2}function kb(e,t){if(_t!==0&&_t!==5)return e.callbackNode=null,e.callbackPriority=0,null;var n=e.callbackNode;if(su(!0)&&e.callbackNode!==n)return null;var a=Ne;return a=Zo(e,e===Ye?a:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),a===0?null:(cb(e,a,t),Eb(e,Fn()),e.callbackNode!=null&&e.callbackNode===n?kb.bind(null,e):null)}function Hg(e,t){if(su())return null;cb(e,t,!0)}function BT(){GT(function(){(Ce&6)!==0?Kf(dv,UT):Nb()})}function Ud(){return hi===0&&(hi=hv()),hi}function Pg(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:lo(""+e)}function qg(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 VT(e,t,n,a,i){if(t==="submit"&&n&&n.stateNode===i){var r=Pg((i[en]||null).action),l=a.submitter;l&&(t=(t=l[en]||null)?Pg(t.formAction):l.getAttribute("formAction"),t!==null&&(r=t,l=null));var s=new Jo("action","action",null,a,i);e.push({event:s,listeners:[{instance:null,listener:function(){if(a.defaultPrevented){if(hi!==0){var o=l?qg(i,l):new FormData(i);Cf(n,{pending:!0,data:o,method:i.method,action:r},null,o)}}else typeof r=="function"&&(s.preventDefault(),o=l?qg(i,l):new FormData(i),Cf(n,{pending:!0,data:o,method:i.method,action:r},r,o))},currentTarget:i}]})}}for(eo=0;eo<gf.length;eo++)to=gf[eo],jg=to.toLowerCase(),Yg=to[0].toUpperCase()+to.slice(1),Pn(jg,"on"+Yg);var to,jg,Yg,eo;Pn(Hv,"onAnimationEnd");Pn(Pv,"onAnimationIteration");Pn(qv,"onAnimationStart");Pn("dblclick","onDoubleClick");Pn("focusin","onFocus");Pn("focusout","onBlur");Pn(aT,"onTransitionRun");Pn(iT,"onTransitionStart");Pn(rT,"onTransitionCancel");Pn(jv,"onTransitionEnd");vr("onMouseEnter",["mouseout","mouseover"]);vr("onMouseLeave",["mouseout","mouseover"]);vr("onPointerEnter",["pointerout","pointerover"]);vr("onPointerLeave",["pointerout","pointerover"]);Si("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));Si("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));Si("onBeforeInput",["compositionend","keypress","textInput","paste"]);Si("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));Si("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));Si("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Ml="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(" "),HT=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Ml));function Tb(e,t){t=(t&4)!==0;for(var n=0;n<e.length;n++){var a=e[n],i=a.event;a=a.listeners;e:{var r=void 0;if(t)for(var l=a.length-1;0<=l;l--){var s=a[l],o=s.instance,u=s.currentTarget;if(s=s.listener,o!==r&&i.isPropagationStopped())break e;r=s,i.currentTarget=u;try{r(i)}catch(c){zo(c)}i.currentTarget=null,r=o}else for(l=0;l<a.length;l++){if(s=a[l],o=s.instance,u=s.currentTarget,s=s.listener,o!==r&&i.isPropagationStopped())break e;r=s,i.currentTarget=u;try{r(i)}catch(c){zo(c)}i.currentTarget=null,r=o}}}}function ve(e,t){var n=t[uf];n===void 0&&(n=t[uf]=new Set);var a=e+"__bubble";n.has(a)||(wb(t,e,2,!1),n.add(a))}function $c(e,t,n){var a=0;t&&(a|=4),wb(n,e,a,t)}var no="_reactListening"+Math.random().toString(36).slice(2);function Bd(e){if(!e[no]){e[no]=!0,Sv.forEach(function(n){n!=="selectionchange"&&(HT.has(n)||$c(n,!1,e),$c(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[no]||(t[no]=!0,$c("selectionchange",!1,t))}}function wb(e,t,n,a){switch(Vb(t)){case 2:var i=dw;break;case 8:i=pw;break;default:i=qd}n=i.bind(null,t,n,e),i=void 0,!pf||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(i=!0),a?i!==void 0?e.addEventListener(t,n,{capture:!0,passive:i}):e.addEventListener(t,n,!0):i!==void 0?e.addEventListener(t,n,{passive:i}):e.addEventListener(t,n,!1)}function Kc(e,t,n,a,i){var r=a;if((t&1)===0&&(t&2)===0&&a!==null)e:for(;;){if(a===null)return;var l=a.tag;if(l===3||l===4){var s=a.stateNode.containerInfo;if(s===i)break;if(l===4)for(l=a.return;l!==null;){var o=l.tag;if((o===3||o===4)&&l.stateNode.containerInfo===i)return;l=l.return}for(;s!==null;){if(l=Ki(s),l===null)return;if(o=l.tag,o===5||o===6||o===26||o===27){a=r=l;continue e}s=s.parentNode}}a=a.return}Cv(function(){var u=r,c=ad(n),p=[];e:{var d=Yv.get(e);if(d!==void 0){var f=Jo,S=e;switch(e){case"keypress":if(oo(n)===0)break e;case"keydown":case"keyup":f=Mk;break;case"focusin":S="focus",f=Dc;break;case"focusout":S="blur",f=Dc;break;case"beforeblur":case"afterblur":f=Dc;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":f=Zh;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":f=Ek;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":f=Vk;break;case Hv:case Pv:case qv:f=wk;break;case jv:f=Pk;break;case"scroll":case"scrollend":f=xk;break;case"wheel":f=jk;break;case"copy":case"cut":case"paste":f=Ck;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":f=$h;break;case"toggle":case"beforetoggle":f=Ik}var x=(t&4)!==0,k=!x&&(e==="scroll"||e==="scrollend"),m=x?d!==null?d+"Capture":null:d;x=[];for(var h=u,g;h!==null;){var E=h;if(g=E.stateNode,E=E.tag,E!==5&&E!==26&&E!==27||g===null||m===null||(E=Rl(h,m),E!=null&&x.push(Ul(h,E,g))),k)break;h=h.return}0<x.length&&(d=new f(d,S,null,n,c),p.push({event:d,listeners:x}))}}if((t&7)===0){e:{if(d=e==="mouseover"||e==="pointerover",f=e==="mouseout"||e==="pointerout",d&&n!==df&&(S=n.relatedTarget||n.fromElement)&&(Ki(S)||S[Ar]))break e;if((f||d)&&(d=c.window===c?c:(d=c.ownerDocument)?d.defaultView||d.parentWindow:window,f?(S=n.relatedTarget||n.toElement,f=u,S=S?Ki(S):null,S!==null&&(k=jl(S),x=S.tag,S!==k||x!==5&&x!==27&&x!==6)&&(S=null)):(f=null,S=u),f!==S)){if(x=Zh,E="onMouseLeave",m="onMouseEnter",h="mouse",(e==="pointerout"||e==="pointerover")&&(x=$h,E="onPointerLeave",m="onPointerEnter",h="pointer"),k=f==null?d:dl(f),g=S==null?d:dl(S),d=new x(E,h+"leave",f,n,c),d.target=k,d.relatedTarget=g,E=null,Ki(c)===u&&(x=new x(m,h+"enter",S,n,c),x.target=g,x.relatedTarget=k,E=x),k=E,f&&S)t:{for(x=f,m=S,h=0,g=x;g;g=Xi(g))h++;for(g=0,E=m;E;E=Xi(E))g++;for(;0<h-g;)x=Xi(x),h--;for(;0<g-h;)m=Xi(m),g--;for(;h--;){if(x===m||m!==null&&x===m.alternate)break t;x=Xi(x),m=Xi(m)}x=null}else x=null;f!==null&&Ig(p,d,f,x,!1),S!==null&&k!==null&&Ig(p,k,S,x,!0)}}e:{if(d=u?dl(u):window,f=d.nodeName&&d.nodeName.toLowerCase(),f==="select"||f==="input"&&d.type==="file")var T=tg;else if(eg(d))if(zv)T=eT;else{T=Kk;var N=$k}else f=d.nodeName,!f||f.toLowerCase()!=="input"||d.type!=="checkbox"&&d.type!=="radio"?u&&nd(u.elementType)&&(T=tg):T=Wk;if(T&&(T=T(e,u))){Lv(p,T,n,c);break e}N&&N(e,d,u),e==="focusout"&&u&&d.type==="number"&&u.memoizedProps.value!=null&&ff(d,"number",d.value)}switch(N=u?dl(u):window,e){case"focusin":(eg(N)||N.contentEditable==="true")&&(tr=N,mf=u,gl=null);break;case"focusout":gl=mf=tr=null;break;case"mousedown":hf=!0;break;case"contextmenu":case"mouseup":case"dragend":hf=!1,rg(p,n,c);break;case"selectionchange":if(nT)break;case"keydown":case"keyup":rg(p,n,c)}var A;if(ld)e:{switch(e){case"compositionstart":var C="onCompositionStart";break e;case"compositionend":C="onCompositionEnd";break e;case"compositionupdate":C="onCompositionUpdate";break e}C=void 0}else er?Dv(e,n)&&(C="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(C="onCompositionStart");C&&(_v&&n.locale!=="ko"&&(er||C!=="onCompositionStart"?C==="onCompositionEnd"&&er&&(A=Rv()):(La=c,id="value"in La?La.value:La.textContent,er=!0)),N=jo(u,C),0<N.length&&(C=new Jh(C,e,null,n,c),p.push({event:C,listeners:N}),A?C.data=A:(A=Ov(n),A!==null&&(C.data=A)))),(A=Xk?Qk(e,n):Fk(e,n))&&(C=jo(u,"onBeforeInput"),0<C.length&&(N=new Jh("onBeforeInput","beforeinput",null,n,c),p.push({event:N,listeners:C}),N.data=A)),VT(p,e,u,n,c)}Tb(p,t)})}function Ul(e,t,n){return{instance:e,listener:t,currentTarget:n}}function jo(e,t){for(var n=t+"Capture",a=[];e!==null;){var i=e,r=i.stateNode;if(i=i.tag,i!==5&&i!==26&&i!==27||r===null||(i=Rl(e,n),i!=null&&a.unshift(Ul(e,i,r)),i=Rl(e,t),i!=null&&a.push(Ul(e,i,r))),e.tag===3)return a;e=e.return}return[]}function Xi(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function Ig(e,t,n,a,i){for(var r=t._reactName,l=[];n!==null&&n!==a;){var s=n,o=s.alternate,u=s.stateNode;if(s=s.tag,o!==null&&o===a)break;s!==5&&s!==26&&s!==27||u===null||(o=u,i?(u=Rl(n,r),u!=null&&l.unshift(Ul(n,u,o))):i||(u=Rl(n,r),u!=null&&l.push(Ul(n,u,o)))),n=n.return}l.length!==0&&e.push({event:t,listeners:l})}var PT=/\r\n?/g,qT=/\u0000|\uFFFD/g;function Gg(e){return(typeof e=="string"?e:""+e).replace(PT,`
9
- `).replace(qT,"")}function Ab(e,t){return t=Gg(t),Gg(e)===t}function ou(){}function Oe(e,t,n,a,i,r){switch(n){case"children":typeof a=="string"?t==="body"||t==="textarea"&&a===""||yr(e,a):(typeof a=="number"||typeof a=="bigint")&&t!=="body"&&yr(e,""+a);break;case"className":Gs(e,"class",a);break;case"tabIndex":Gs(e,"tabindex",a);break;case"dir":case"role":case"viewBox":case"width":case"height":Gs(e,n,a);break;case"style":Av(e,a,r);break;case"data":if(t!=="object"){Gs(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=lo(""+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 r=="function"&&(n==="formAction"?(t!=="input"&&Oe(e,t,"name",i.name,i,null),Oe(e,t,"formEncType",i.formEncType,i,null),Oe(e,t,"formMethod",i.formMethod,i,null),Oe(e,t,"formTarget",i.formTarget,i,null)):(Oe(e,t,"encType",i.encType,i,null),Oe(e,t,"method",i.method,i,null),Oe(e,t,"target",i.target,i,null)));if(a==null||typeof a=="symbol"||typeof a=="boolean"){e.removeAttribute(n);break}a=lo(""+a),e.setAttribute(n,a);break;case"onClick":a!=null&&(e.onclick=ou);break;case"onScroll":a!=null&&ve("scroll",e);break;case"onScrollEnd":a!=null&&ve("scrollend",e);break;case"dangerouslySetInnerHTML":if(a!=null){if(typeof a!="object"||!("__html"in a))throw Error(M(61));if(n=a.__html,n!=null){if(i.children!=null)throw Error(M(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=lo(""+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":ve("beforetoggle",e),ve("toggle",e),ro(e,"popover",a);break;case"xlinkActuate":ta(e,"http://www.w3.org/1999/xlink","xlink:actuate",a);break;case"xlinkArcrole":ta(e,"http://www.w3.org/1999/xlink","xlink:arcrole",a);break;case"xlinkRole":ta(e,"http://www.w3.org/1999/xlink","xlink:role",a);break;case"xlinkShow":ta(e,"http://www.w3.org/1999/xlink","xlink:show",a);break;case"xlinkTitle":ta(e,"http://www.w3.org/1999/xlink","xlink:title",a);break;case"xlinkType":ta(e,"http://www.w3.org/1999/xlink","xlink:type",a);break;case"xmlBase":ta(e,"http://www.w3.org/XML/1998/namespace","xml:base",a);break;case"xmlLang":ta(e,"http://www.w3.org/XML/1998/namespace","xml:lang",a);break;case"xmlSpace":ta(e,"http://www.w3.org/XML/1998/namespace","xml:space",a);break;case"is":ro(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=bk.get(n)||n,ro(e,n,a))}}function Pf(e,t,n,a,i,r){switch(n){case"style":Av(e,a,r);break;case"dangerouslySetInnerHTML":if(a!=null){if(typeof a!="object"||!("__html"in a))throw Error(M(61));if(n=a.__html,n!=null){if(i.children!=null)throw Error(M(60));e.innerHTML=n}}break;case"children":typeof a=="string"?yr(e,a):(typeof a=="number"||typeof a=="bigint")&&yr(e,""+a);break;case"onScroll":a!=null&&ve("scroll",e);break;case"onScrollEnd":a!=null&&ve("scrollend",e);break;case"onClick":a!=null&&(e.onclick=ou);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!xv.hasOwnProperty(n))e:{if(n[0]==="o"&&n[1]==="n"&&(i=n.endsWith("Capture"),t=n.slice(2,i?n.length-7:void 0),r=e[en]||null,r=r!=null?r[n]:null,typeof r=="function"&&e.removeEventListener(t,r,i),typeof a=="function")){typeof r!="function"&&r!==null&&(n in e?e[n]=null:e.hasAttribute(n)&&e.removeAttribute(n)),e.addEventListener(t,a,i);break e}n in e?e[n]=a:a===!0?e.setAttribute(n,""):ro(e,n,a)}}}function Dt(e,t,n){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":ve("error",e),ve("load",e);var a=!1,i=!1,r;for(r in n)if(n.hasOwnProperty(r)){var l=n[r];if(l!=null)switch(r){case"src":a=!0;break;case"srcSet":i=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(M(137,t));default:Oe(e,t,r,l,n,null)}}i&&Oe(e,t,"srcSet",n.srcSet,n,null),a&&Oe(e,t,"src",n.src,n,null);return;case"input":ve("invalid",e);var s=r=l=i=null,o=null,u=null;for(a in n)if(n.hasOwnProperty(a)){var c=n[a];if(c!=null)switch(a){case"name":i=c;break;case"type":l=c;break;case"checked":o=c;break;case"defaultChecked":u=c;break;case"value":r=c;break;case"defaultValue":s=c;break;case"children":case"dangerouslySetInnerHTML":if(c!=null)throw Error(M(137,t));break;default:Oe(e,t,a,c,n,null)}}kv(e,r,s,o,u,l,i,!1),Eo(e);return;case"select":ve("invalid",e),a=l=r=null;for(i in n)if(n.hasOwnProperty(i)&&(s=n[i],s!=null))switch(i){case"value":r=s;break;case"defaultValue":l=s;break;case"multiple":a=s;default:Oe(e,t,i,s,n,null)}t=r,n=l,e.multiple=!!a,t!=null?ur(e,!!a,t,!1):n!=null&&ur(e,!!a,n,!0);return;case"textarea":ve("invalid",e),r=i=a=null;for(l in n)if(n.hasOwnProperty(l)&&(s=n[l],s!=null))switch(l){case"value":a=s;break;case"defaultValue":i=s;break;case"children":r=s;break;case"dangerouslySetInnerHTML":if(s!=null)throw Error(M(91));break;default:Oe(e,t,l,s,n,null)}wv(e,a,i,r),Eo(e);return;case"option":for(o in n)if(n.hasOwnProperty(o)&&(a=n[o],a!=null))switch(o){case"selected":e.selected=a&&typeof a!="function"&&typeof a!="symbol";break;default:Oe(e,t,o,a,n,null)}return;case"dialog":ve("beforetoggle",e),ve("toggle",e),ve("cancel",e),ve("close",e);break;case"iframe":case"object":ve("load",e);break;case"video":case"audio":for(a=0;a<Ml.length;a++)ve(Ml[a],e);break;case"image":ve("error",e),ve("load",e);break;case"details":ve("toggle",e);break;case"embed":case"source":case"link":ve("error",e),ve("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(u in n)if(n.hasOwnProperty(u)&&(a=n[u],a!=null))switch(u){case"children":case"dangerouslySetInnerHTML":throw Error(M(137,t));default:Oe(e,t,u,a,n,null)}return;default:if(nd(t)){for(c in n)n.hasOwnProperty(c)&&(a=n[c],a!==void 0&&Pf(e,t,c,a,n,void 0));return}}for(s in n)n.hasOwnProperty(s)&&(a=n[s],a!=null&&Oe(e,t,s,a,n,null))}function jT(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 i=null,r=null,l=null,s=null,o=null,u=null,c=null;for(f in n){var p=n[f];if(n.hasOwnProperty(f)&&p!=null)switch(f){case"checked":break;case"value":break;case"defaultValue":o=p;default:a.hasOwnProperty(f)||Oe(e,t,f,null,a,p)}}for(var d in a){var f=a[d];if(p=n[d],a.hasOwnProperty(d)&&(f!=null||p!=null))switch(d){case"type":r=f;break;case"name":i=f;break;case"checked":u=f;break;case"defaultChecked":c=f;break;case"value":l=f;break;case"defaultValue":s=f;break;case"children":case"dangerouslySetInnerHTML":if(f!=null)throw Error(M(137,t));break;default:f!==p&&Oe(e,t,d,f,a,p)}}cf(e,l,s,o,u,c,r,i);return;case"select":f=l=s=d=null;for(r in n)if(o=n[r],n.hasOwnProperty(r)&&o!=null)switch(r){case"value":break;case"multiple":f=o;default:a.hasOwnProperty(r)||Oe(e,t,r,null,a,o)}for(i in a)if(r=a[i],o=n[i],a.hasOwnProperty(i)&&(r!=null||o!=null))switch(i){case"value":d=r;break;case"defaultValue":s=r;break;case"multiple":l=r;default:r!==o&&Oe(e,t,i,r,a,o)}t=s,n=l,a=f,d!=null?ur(e,!!n,d,!1):!!a!=!!n&&(t!=null?ur(e,!!n,t,!0):ur(e,!!n,n?[]:"",!1));return;case"textarea":f=d=null;for(s in n)if(i=n[s],n.hasOwnProperty(s)&&i!=null&&!a.hasOwnProperty(s))switch(s){case"value":break;case"children":break;default:Oe(e,t,s,null,a,i)}for(l in a)if(i=a[l],r=n[l],a.hasOwnProperty(l)&&(i!=null||r!=null))switch(l){case"value":d=i;break;case"defaultValue":f=i;break;case"children":break;case"dangerouslySetInnerHTML":if(i!=null)throw Error(M(91));break;default:i!==r&&Oe(e,t,l,i,a,r)}Tv(e,d,f);return;case"option":for(var S in n)if(d=n[S],n.hasOwnProperty(S)&&d!=null&&!a.hasOwnProperty(S))switch(S){case"selected":e.selected=!1;break;default:Oe(e,t,S,null,a,d)}for(o in a)if(d=a[o],f=n[o],a.hasOwnProperty(o)&&d!==f&&(d!=null||f!=null))switch(o){case"selected":e.selected=d&&typeof d!="function"&&typeof d!="symbol";break;default:Oe(e,t,o,d,a,f)}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 x in n)d=n[x],n.hasOwnProperty(x)&&d!=null&&!a.hasOwnProperty(x)&&Oe(e,t,x,null,a,d);for(u in a)if(d=a[u],f=n[u],a.hasOwnProperty(u)&&d!==f&&(d!=null||f!=null))switch(u){case"children":case"dangerouslySetInnerHTML":if(d!=null)throw Error(M(137,t));break;default:Oe(e,t,u,d,a,f)}return;default:if(nd(t)){for(var k in n)d=n[k],n.hasOwnProperty(k)&&d!==void 0&&!a.hasOwnProperty(k)&&Pf(e,t,k,void 0,a,d);for(c in a)d=a[c],f=n[c],!a.hasOwnProperty(c)||d===f||d===void 0&&f===void 0||Pf(e,t,c,d,a,f);return}}for(var m in n)d=n[m],n.hasOwnProperty(m)&&d!=null&&!a.hasOwnProperty(m)&&Oe(e,t,m,null,a,d);for(p in a)d=a[p],f=n[p],!a.hasOwnProperty(p)||d===f||d==null&&f==null||Oe(e,t,p,d,a,f)}var qf=null,jf=null;function Yo(e){return e.nodeType===9?e:e.ownerDocument}function Xg(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 Cb(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 Yf(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 Wc=null;function YT(){var e=window.event;return e&&e.type==="popstate"?e===Wc?!1:(Wc=e,!0):(Wc=null,!1)}var Rb=typeof setTimeout=="function"?setTimeout:void 0,IT=typeof clearTimeout=="function"?clearTimeout:void 0,Qg=typeof Promise=="function"?Promise:void 0,GT=typeof queueMicrotask=="function"?queueMicrotask:typeof Qg!="undefined"?function(e){return Qg.resolve(null).then(e).catch(XT)}:Rb;function XT(e){setTimeout(function(){throw e})}function Fa(e){return e==="head"}function Fg(e,t){var n=t,a=0,i=0;do{var r=n.nextSibling;if(e.removeChild(n),r&&r.nodeType===8)if(n=r.data,n==="/$"){if(0<a&&8>a){n=a;var l=e.ownerDocument;if(n&1&&Al(l.documentElement),n&2&&Al(l.body),n&4)for(n=l.head,Al(n),l=n.firstChild;l;){var s=l.nextSibling,o=l.nodeName;l[Xl]||o==="SCRIPT"||o==="STYLE"||o==="LINK"&&l.rel.toLowerCase()==="stylesheet"||n.removeChild(l),l=s}}if(i===0){e.removeChild(r),ql(t);return}i--}else n==="$"||n==="$?"||n==="$!"?i++:a=n.charCodeAt(0)-48;else a=0;n=r}while(n);ql(t)}function If(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":If(n),td(n);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(n.rel.toLowerCase()==="stylesheet")continue}e.removeChild(n)}}function QT(e,t,n,a){for(;e.nodeType===1;){var i=n;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!a&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(a){if(!e[Xl])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(r=e.getAttribute("rel"),r==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(r!==i.rel||e.getAttribute("href")!==(i.href==null||i.href===""?null:i.href)||e.getAttribute("crossorigin")!==(i.crossOrigin==null?null:i.crossOrigin)||e.getAttribute("title")!==(i.title==null?null:i.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(r=e.getAttribute("src"),(r!==(i.src==null?null:i.src)||e.getAttribute("type")!==(i.type==null?null:i.type)||e.getAttribute("crossorigin")!==(i.crossOrigin==null?null:i.crossOrigin))&&r&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var r=i.name==null?null:""+i.name;if(i.type==="hidden"&&e.getAttribute("name")===r)return e}else return e;if(e=Hn(e.nextSibling),e===null)break}return null}function FT(e,t,n){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!n||(e=Hn(e.nextSibling),e===null))return null;return e}function Gf(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState==="complete"}function ZT(e,t){var n=e.ownerDocument;if(e.data!=="$?"||n.readyState==="complete")t();else{var a=function(){t(),n.removeEventListener("DOMContentLoaded",a)};n.addEventListener("DOMContentLoaded",a),e._reactRetry=a}}function Hn(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==="F!"||t==="F")break;if(t==="/$")return null}}return e}var Xf=null;function Zg(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="$"||n==="$!"||n==="$?"){if(t===0)return e;t--}else n==="/$"&&t++}e=e.previousSibling}return null}function _b(e,t,n){switch(t=Yo(n),e){case"html":if(e=t.documentElement,!e)throw Error(M(452));return e;case"head":if(e=t.head,!e)throw Error(M(453));return e;case"body":if(e=t.body,!e)throw Error(M(454));return e;default:throw Error(M(451))}}function Al(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);td(e)}var On=new Map,Jg=new Set;function Io(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var ga=Te.d;Te.d={f:JT,r:$T,D:KT,C:WT,L:ew,m:tw,X:aw,S:nw,M:iw};function JT(){var e=ga.f(),t=ru();return e||t}function $T(e){var t=Cr(e);t!==null&&t.tag===5&&t.type==="form"?Ey(t):ga.r(e)}var Dr=typeof document=="undefined"?null:document;function Db(e,t,n){var a=Dr;if(a&&typeof t=="string"&&t){var i=Cn(t);i='link[rel="'+e+'"][href="'+i+'"]',typeof n=="string"&&(i+='[crossorigin="'+n+'"]'),Jg.has(i)||(Jg.add(i),e={rel:e,crossOrigin:n,href:t},a.querySelector(i)===null&&(t=a.createElement("link"),Dt(t,"link",e),bt(t),a.head.appendChild(t)))}}function KT(e){ga.D(e),Db("dns-prefetch",e,null)}function WT(e,t){ga.C(e,t),Db("preconnect",e,t)}function ew(e,t,n){ga.L(e,t,n);var a=Dr;if(a&&e&&t){var i='link[rel="preload"][as="'+Cn(t)+'"]';t==="image"&&n&&n.imageSrcSet?(i+='[imagesrcset="'+Cn(n.imageSrcSet)+'"]',typeof n.imageSizes=="string"&&(i+='[imagesizes="'+Cn(n.imageSizes)+'"]')):i+='[href="'+Cn(e)+'"]';var r=i;switch(t){case"style":r=wr(e);break;case"script":r=Or(e)}On.has(r)||(e=Ge({rel:"preload",href:t==="image"&&n&&n.imageSrcSet?void 0:e,as:t},n),On.set(r,e),a.querySelector(i)!==null||t==="style"&&a.querySelector(ns(r))||t==="script"&&a.querySelector(as(r))||(t=a.createElement("link"),Dt(t,"link",e),bt(t),a.head.appendChild(t)))}}function tw(e,t){ga.m(e,t);var n=Dr;if(n&&e){var a=t&&typeof t.as=="string"?t.as:"script",i='link[rel="modulepreload"][as="'+Cn(a)+'"][href="'+Cn(e)+'"]',r=i;switch(a){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":r=Or(e)}if(!On.has(r)&&(e=Ge({rel:"modulepreload",href:e},t),On.set(r,e),n.querySelector(i)===null)){switch(a){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(n.querySelector(as(r)))return}a=n.createElement("link"),Dt(a,"link",e),bt(a),n.head.appendChild(a)}}}function nw(e,t,n){ga.S(e,t,n);var a=Dr;if(a&&e){var i=or(a).hoistableStyles,r=wr(e);t=t||"default";var l=i.get(r);if(!l){var s={loading:0,preload:null};if(l=a.querySelector(ns(r)))s.loading=5;else{e=Ge({rel:"stylesheet",href:e,"data-precedence":t},n),(n=On.get(r))&&Vd(e,n);var o=l=a.createElement("link");bt(o),Dt(o,"link",e),o._p=new Promise(function(u,c){o.onload=u,o.onerror=c}),o.addEventListener("load",function(){s.loading|=1}),o.addEventListener("error",function(){s.loading|=2}),s.loading|=4,go(l,t,a)}l={type:"stylesheet",instance:l,count:1,state:s},i.set(r,l)}}}function aw(e,t){ga.X(e,t);var n=Dr;if(n&&e){var a=or(n).hoistableScripts,i=Or(e),r=a.get(i);r||(r=n.querySelector(as(i)),r||(e=Ge({src:e,async:!0},t),(t=On.get(i))&&Hd(e,t),r=n.createElement("script"),bt(r),Dt(r,"link",e),n.head.appendChild(r)),r={type:"script",instance:r,count:1,state:null},a.set(i,r))}}function iw(e,t){ga.M(e,t);var n=Dr;if(n&&e){var a=or(n).hoistableScripts,i=Or(e),r=a.get(i);r||(r=n.querySelector(as(i)),r||(e=Ge({src:e,async:!0,type:"module"},t),(t=On.get(i))&&Hd(e,t),r=n.createElement("script"),bt(r),Dt(r,"link",e),n.head.appendChild(r)),r={type:"script",instance:r,count:1,state:null},a.set(i,r))}}function $g(e,t,n,a){var i=(i=Ua.current)?Io(i):null;if(!i)throw Error(M(446));switch(e){case"meta":case"title":return null;case"style":return typeof n.precedence=="string"&&typeof n.href=="string"?(t=wr(n.href),n=or(i).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=wr(n.href);var r=or(i).hoistableStyles,l=r.get(e);if(l||(i=i.ownerDocument||i,l={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},r.set(e,l),(r=i.querySelector(ns(e)))&&!r._p&&(l.instance=r,l.state.loading=5),On.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},On.set(e,n),r||rw(i,e,n,l.state))),t&&a===null)throw Error(M(528,""));return l}if(t&&a!==null)throw Error(M(529,""));return null;case"script":return t=n.async,n=n.src,typeof n=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=Or(n),n=or(i).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(M(444,e))}}function wr(e){return'href="'+Cn(e)+'"'}function ns(e){return'link[rel="stylesheet"]['+e+"]"}function Ob(e){return Ge({},e,{"data-precedence":e.precedence,precedence:null})}function rw(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}),Dt(t,"link",n),bt(t),e.head.appendChild(t))}function Or(e){return'[src="'+Cn(e)+'"]'}function as(e){return"script[async]"+e}function Kg(e,t,n){if(t.count++,t.instance===null)switch(t.type){case"style":var a=e.querySelector('style[data-href~="'+Cn(n.href)+'"]');if(a)return t.instance=a,bt(a),a;var i=Ge({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return a=(e.ownerDocument||e).createElement("style"),bt(a),Dt(a,"style",i),go(a,n.precedence,e),t.instance=a;case"stylesheet":i=wr(n.href);var r=e.querySelector(ns(i));if(r)return t.state.loading|=4,t.instance=r,bt(r),r;a=Ob(n),(i=On.get(i))&&Vd(a,i),r=(e.ownerDocument||e).createElement("link"),bt(r);var l=r;return l._p=new Promise(function(s,o){l.onload=s,l.onerror=o}),Dt(r,"link",a),t.state.loading|=4,go(r,n.precedence,e),t.instance=r;case"script":return r=Or(n.src),(i=e.querySelector(as(r)))?(t.instance=i,bt(i),i):(a=n,(i=On.get(r))&&(a=Ge({},n),Hd(a,i)),e=e.ownerDocument||e,i=e.createElement("script"),bt(i),Dt(i,"link",a),e.head.appendChild(i),t.instance=i);case"void":return null;default:throw Error(M(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(a=t.instance,t.state.loading|=4,go(a,n.precedence,e));return t.instance}function go(e,t,n){for(var a=n.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),i=a.length?a[a.length-1]:null,r=i,l=0;l<a.length;l++){var s=a[l];if(s.dataset.precedence===t)r=s;else if(r!==i)break}r?r.parentNode.insertBefore(e,r.nextSibling):(t=n.nodeType===9?n.head:n,t.insertBefore(e,t.firstChild))}function Vd(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function Hd(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var vo=null;function Wg(e,t,n){if(vo===null){var a=new Map,i=vo=new Map;i.set(n,a)}else i=vo,a=i.get(n),a||(a=new Map,i.set(n,a));if(a.has(e))return a;for(a.set(e,null),n=n.getElementsByTagName(e),i=0;i<n.length;i++){var r=n[i];if(!(r[Xl]||r[Vt]||e==="link"&&r.getAttribute("rel")==="stylesheet")&&r.namespaceURI!=="http://www.w3.org/2000/svg"){var l=r.getAttribute(t)||"";l=e+l;var s=a.get(l);s?s.push(r):a.set(l,[r])}}return a}function ev(e,t,n){e=e.ownerDocument||e,e.head.insertBefore(n,t==="title"?e.querySelector("head > title"):null)}function lw(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;switch(t.rel){case"stylesheet":return e=t.disabled,typeof t.precedence=="string"&&e==null;default:return!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 Lb(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}var Bl=null;function sw(){}function ow(e,t,n){if(Bl===null)throw Error(M(475));var a=Bl;if(t.type==="stylesheet"&&(typeof n.media!="string"||matchMedia(n.media).matches!==!1)&&(t.state.loading&4)===0){if(t.instance===null){var i=wr(n.href),r=e.querySelector(ns(i));if(r){e=r._p,e!==null&&typeof e=="object"&&typeof e.then=="function"&&(a.count++,a=Go.bind(a),e.then(a,a)),t.state.loading|=4,t.instance=r,bt(r);return}r=e.ownerDocument||e,n=Ob(n),(i=On.get(i))&&Vd(n,i),r=r.createElement("link"),bt(r);var l=r;l._p=new Promise(function(s,o){l.onload=s,l.onerror=o}),Dt(r,"link",n),t.instance=r}a.stylesheets===null&&(a.stylesheets=new Map),a.stylesheets.set(t,e),(e=t.state.preload)&&(t.state.loading&3)===0&&(a.count++,t=Go.bind(a),e.addEventListener("load",t),e.addEventListener("error",t))}}function uw(){if(Bl===null)throw Error(M(475));var e=Bl;return e.stylesheets&&e.count===0&&Qf(e,e.stylesheets),0<e.count?function(t){var n=setTimeout(function(){if(e.stylesheets&&Qf(e,e.stylesheets),e.unsuspend){var a=e.unsuspend;e.unsuspend=null,a()}},6e4);return e.unsuspend=t,function(){e.unsuspend=null,clearTimeout(n)}}:null}function Go(){if(this.count--,this.count===0){if(this.stylesheets)Qf(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var Xo=null;function Qf(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Xo=new Map,t.forEach(cw,e),Xo=null,Go.call(e))}function cw(e,t){if(!(t.state.loading&4)){var n=Xo.get(e);if(n)var a=n.get(null);else{n=new Map,Xo.set(e,n);for(var i=e.querySelectorAll("link[data-precedence],style[data-precedence]"),r=0;r<i.length;r++){var l=i[r];(l.nodeName==="LINK"||l.getAttribute("media")!=="not all")&&(n.set(l.dataset.precedence,l),a=l)}a&&n.set(null,a)}i=t.instance,l=i.getAttribute("data-precedence"),r=n.get(l)||a,r===a&&n.set(null,i),n.set(l,i),this.count++,a=Go.bind(this),i.addEventListener("load",a),i.addEventListener("error",a),r?r.parentNode.insertBefore(i,r.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(i,e.firstChild)),t.state.loading|=4}}var Vl={$$typeof:ra,Provider:null,Consumer:null,_currentValue:ui,_currentValue2:ui,_threadCount:0};function fw(e,t,n,a,i,r,l,s){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=kc(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=kc(0),this.hiddenUpdates=kc(null),this.identifierPrefix=a,this.onUncaughtError=i,this.onCaughtError=r,this.onRecoverableError=l,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=s,this.incompleteTransitions=new Map}function zb(e,t,n,a,i,r,l,s,o,u,c,p){return e=new fw(e,t,n,l,s,o,u,p),t=1,r===!0&&(t|=24),r=mn(3,null,null,t),e.current=r,r.stateNode=e,t=pd(),t.refCount++,e.pooledCache=t,t.refCount++,r.memoizedState={element:a,isDehydrated:n,cache:t},hd(r),e}function Mb(e){return e?(e=ir,e):ir}function Ub(e,t,n,a,i,r){i=Mb(i),a.context===null?a.context=i:a.pendingContext=i,a=Ba(t),a.payload={element:n},r=r===void 0?null:r,r!==null&&(a.callback=r),n=Va(e,a,t),n!==null&&(yn(n,e,t),bl(n,e,t))}function tv(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function Pd(e,t){tv(e,t),(e=e.alternate)&&tv(e,t)}function Bb(e){if(e.tag===13){var t=Rr(e,67108864);t!==null&&yn(t,e,67108864),Pd(e,67108864)}}var Qo=!0;function dw(e,t,n,a){var i=ue.T;ue.T=null;var r=Te.p;try{Te.p=2,qd(e,t,n,a)}finally{Te.p=r,ue.T=i}}function pw(e,t,n,a){var i=ue.T;ue.T=null;var r=Te.p;try{Te.p=8,qd(e,t,n,a)}finally{Te.p=r,ue.T=i}}function qd(e,t,n,a){if(Qo){var i=Ff(a);if(i===null)Kc(e,t,a,Fo,n),nv(e,a);else if(hw(i,e,t,n,a))a.stopPropagation();else if(nv(e,a),t&4&&-1<mw.indexOf(e)){for(;i!==null;){var r=Cr(i);if(r!==null)switch(r.tag){case 3:if(r=r.stateNode,r.current.memoizedState.isDehydrated){var l=li(r.pendingLanes);if(l!==0){var s=r;for(s.pendingLanes|=2,s.entangledLanes|=2;l;){var o=1<<31-gn(l);s.entanglements[1]|=o,l&=~o}$n(r),(Ce&6)===0&&(Vo=Fn()+500,ts(0,!1))}}break;case 13:s=Rr(r,2),s!==null&&yn(s,r,2),ru(),Pd(r,2)}if(r=Ff(a),r===null&&Kc(e,t,a,Fo,n),r===i)break;i=r}i!==null&&a.stopPropagation()}else Kc(e,t,a,null,n)}}function Ff(e){return e=ad(e),jd(e)}var Fo=null;function jd(e){if(Fo=null,e=Ki(e),e!==null){var t=jl(e);if(t===null)e=null;else{var n=t.tag;if(n===13){if(e=ov(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 Fo=e,null}function Vb(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(tk()){case dv:return 2;case pv:return 8;case No:case nk:return 32;case mv:return 268435456;default:return 32}default:return 32}}var Zf=!1,qa=null,ja=null,Ya=null,Hl=new Map,Pl=new Map,Da=[],mw="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 nv(e,t){switch(e){case"focusin":case"focusout":qa=null;break;case"dragenter":case"dragleave":ja=null;break;case"mouseover":case"mouseout":Ya=null;break;case"pointerover":case"pointerout":Hl.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Pl.delete(t.pointerId)}}function ol(e,t,n,a,i,r){return e===null||e.nativeEvent!==r?(e={blockedOn:t,domEventName:n,eventSystemFlags:a,nativeEvent:r,targetContainers:[i]},t!==null&&(t=Cr(t),t!==null&&Bb(t)),e):(e.eventSystemFlags|=a,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function hw(e,t,n,a,i){switch(t){case"focusin":return qa=ol(qa,e,t,n,a,i),!0;case"dragenter":return ja=ol(ja,e,t,n,a,i),!0;case"mouseover":return Ya=ol(Ya,e,t,n,a,i),!0;case"pointerover":var r=i.pointerId;return Hl.set(r,ol(Hl.get(r)||null,e,t,n,a,i)),!0;case"gotpointercapture":return r=i.pointerId,Pl.set(r,ol(Pl.get(r)||null,e,t,n,a,i)),!0}return!1}function Hb(e){var t=Ki(e.target);if(t!==null){var n=jl(t);if(n!==null){if(t=n.tag,t===13){if(t=ov(n),t!==null){e.blockedOn=t,ck(e.priority,function(){if(n.tag===13){var a=vn();a=Wf(a);var i=Rr(n,a);i!==null&&yn(i,n,a),Pd(n,a)}});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function yo(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=Ff(e.nativeEvent);if(n===null){n=e.nativeEvent;var a=new n.constructor(n.type,n);df=a,n.target.dispatchEvent(a),df=null}else return t=Cr(n),t!==null&&Bb(t),e.blockedOn=n,!1;t.shift()}return!0}function av(e,t,n){yo(e)&&n.delete(t)}function gw(){Zf=!1,qa!==null&&yo(qa)&&(qa=null),ja!==null&&yo(ja)&&(ja=null),Ya!==null&&yo(Ya)&&(Ya=null),Hl.forEach(av),Pl.forEach(av)}function ao(e,t){e.blockedOn===t&&(e.blockedOn=null,Zf||(Zf=!0,vt.unstable_scheduleCallback(vt.unstable_NormalPriority,gw)))}var io=null;function iv(e){io!==e&&(io=e,vt.unstable_scheduleCallback(vt.unstable_NormalPriority,function(){io===e&&(io=null);for(var t=0;t<e.length;t+=3){var n=e[t],a=e[t+1],i=e[t+2];if(typeof a!="function"){if(jd(a||n)===null)continue;break}var r=Cr(n);r!==null&&(e.splice(t,3),t-=3,Cf(r,{pending:!0,data:i,method:n.method,action:a},a,i))}}))}function ql(e){function t(o){return ao(o,e)}qa!==null&&ao(qa,e),ja!==null&&ao(ja,e),Ya!==null&&ao(Ya,e),Hl.forEach(t),Pl.forEach(t);for(var n=0;n<Da.length;n++){var a=Da[n];a.blockedOn===e&&(a.blockedOn=null)}for(;0<Da.length&&(n=Da[0],n.blockedOn===null);)Hb(n),n.blockedOn===null&&Da.shift();if(n=(e.ownerDocument||e).$$reactFormReplay,n!=null)for(a=0;a<n.length;a+=3){var i=n[a],r=n[a+1],l=i[en]||null;if(typeof r=="function")l||iv(n);else if(l){var s=null;if(r&&r.hasAttribute("formAction")){if(i=r,l=r[en]||null)s=l.formAction;else if(jd(i)!==null)continue}else s=l.action;typeof s=="function"?n[a+1]=s:(n.splice(a,3),a-=3),iv(n)}}}function Yd(e){this._internalRoot=e}uu.prototype.render=Yd.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(M(409));var n=t.current,a=vn();Ub(n,a,e,t,null,null)};uu.prototype.unmount=Yd.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Ub(e.current,2,null,e,null,null),ru(),t[Ar]=null}};function uu(e){this._internalRoot=e}uu.prototype.unstable_scheduleHydration=function(e){if(e){var t=bv();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Da.length&&t!==0&&t<Da[n].priority;n++);Da.splice(n,0,e),n===0&&Hb(e)}};var rv=lv.version;if(rv!=="19.1.1")throw Error(M(527,rv,"19.1.1"));Te.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(M(188)):(e=Object.keys(e).join(","),Error(M(268,e)));return e=FE(t),e=e!==null?uv(e):null,e=e===null?null:e.stateNode,e};var vw={bundleType:0,version:"19.1.1",rendererPackageName:"react-dom",currentDispatcherRef:ue,reconcilerVersion:"19.1.1"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__!="undefined"&&(ul=__REACT_DEVTOOLS_GLOBAL_HOOK__,!ul.isDisabled&&ul.supportsFiber))try{Yl=ul.inject(vw),hn=ul}catch(e){}var ul;cu.createRoot=function(e,t){if(!sv(e))throw Error(M(299));var n=!1,a="",i=zy,r=My,l=Uy,s=null;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(a=t.identifierPrefix),t.onUncaughtError!==void 0&&(i=t.onUncaughtError),t.onCaughtError!==void 0&&(r=t.onCaughtError),t.onRecoverableError!==void 0&&(l=t.onRecoverableError),t.unstable_transitionCallbacks!==void 0&&(s=t.unstable_transitionCallbacks)),t=zb(e,1,!1,null,null,n,a,i,r,l,s,null),e[Ar]=t.current,Bd(e),new Yd(t)};cu.hydrateRoot=function(e,t,n){if(!sv(e))throw Error(M(299));var a=!1,i="",r=zy,l=My,s=Uy,o=null,u=null;return n!=null&&(n.unstable_strictMode===!0&&(a=!0),n.identifierPrefix!==void 0&&(i=n.identifierPrefix),n.onUncaughtError!==void 0&&(r=n.onUncaughtError),n.onCaughtError!==void 0&&(l=n.onCaughtError),n.onRecoverableError!==void 0&&(s=n.onRecoverableError),n.unstable_transitionCallbacks!==void 0&&(o=n.unstable_transitionCallbacks),n.formState!==void 0&&(u=n.formState)),t=zb(e,1,!0,t,n!=null?n:null,a,i,r,l,s,o,u),t.context=Mb(null),n=t.current,a=vn(),a=Wf(a),i=Ba(a),i.callback=null,Va(n,i,a),n=a,t.current.lanes=n,Gl(t,n),$n(t),e[Ar]=t.current,Bd(e),new uu(t)};cu.version="19.1.1"});var Yb=Ut((v_,jb)=>{"use strict";function qb(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__=="undefined"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(qb)}catch(e){console.error(e)}}qb(),jb.exports=Pb()});function Ib(e,t){let n=t||{};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}var Gb=b(()=>{});function fu(e,t){return((t||Sw).jsx?bw:yw).test(e)}var yw,bw,Sw,Xb=b(()=>{yw=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,bw=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Sw={}});var Qb=b(()=>{Xb()});function Id(e){return typeof e=="object"?e.type==="text"?Fb(e.value):!1:Fb(e)}function Fb(e){return e.replace(xw,"")===""}var xw,Zb=b(()=>{xw=/[ \t\n\f\r]/g});var Jb=b(()=>{Zb()});var va,Gd=b(()=>{va=class{constructor(t,n,a){this.normal=n,this.property=t,a&&(this.space=a)}};va.prototype.normal={};va.prototype.property={};va.prototype.space=void 0});function Xd(e,t){let n={},a={};for(let i of e)Object.assign(n,i.property),Object.assign(a,i.normal);return new va(n,a,t)}var $b=b(()=>{Gd()});function is(e){return e.toLowerCase()}var Qd=b(()=>{});var Nt,Fd=b(()=>{Nt=class{constructor(t,n){this.attribute=n,this.property=t}};Nt.prototype.attribute="";Nt.prototype.booleanish=!1;Nt.prototype.boolean=!1;Nt.prototype.commaOrSpaceSeparated=!1;Nt.prototype.commaSeparated=!1;Nt.prototype.defined=!1;Nt.prototype.mustUseProperty=!1;Nt.prototype.number=!1;Nt.prototype.overloadedBoolean=!1;Nt.prototype.property="";Nt.prototype.spaceSeparated=!1;Nt.prototype.space=void 0});var rs={};oc(rs,{boolean:()=>de,booleanish:()=>nt,commaOrSpaceSeparated:()=>nn,commaSeparated:()=>Za,number:()=>V,overloadedBoolean:()=>du,spaceSeparated:()=>Re});function ki(){return sh(2,++Nw)}var Nw,de,nt,du,V,Re,Za,nn,ls=b(()=>{Nw=0,de=ki(),nt=ki(),du=ki(),V=ki(),Re=ki(),Za=ki(),nn=ki()});function Kb(e,t,n){n&&(e[t]=n)}var Zd,Ti,Jd=b(()=>{Fd();ls();Zd=Object.keys(rs),Ti=class extends Nt{constructor(t,n,a,i){let r=-1;if(super(t,n),Kb(this,"space",i),typeof a=="number")for(;++r<Zd.length;){let l=Zd[r];Kb(this,Zd[r],(a&rs[l])===rs[l])}}};Ti.prototype.defined=!0});function Ln(e){let t={},n={};for(let[a,i]of Object.entries(e.properties)){let r=new Ti(a,e.transform(e.attributes||{},a),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(a)&&(r.mustUseProperty=!0),t[a]=r,n[is(a)]=a,n[is(r.attribute)]=a}return new va(t,n,e.space)}var wi=b(()=>{Qd();Jd();Gd()});var $d,Wb=b(()=>{wi();ls();$d=Ln({properties:{ariaActiveDescendant:null,ariaAtomic:nt,ariaAutoComplete:null,ariaBusy:nt,ariaChecked:nt,ariaColCount:V,ariaColIndex:V,ariaColSpan:V,ariaControls:Re,ariaCurrent:null,ariaDescribedBy:Re,ariaDetails:null,ariaDisabled:nt,ariaDropEffect:Re,ariaErrorMessage:null,ariaExpanded:nt,ariaFlowTo:Re,ariaGrabbed:nt,ariaHasPopup:null,ariaHidden:nt,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:Re,ariaLevel:V,ariaLive:null,ariaModal:nt,ariaMultiLine:nt,ariaMultiSelectable:nt,ariaOrientation:null,ariaOwns:Re,ariaPlaceholder:null,ariaPosInSet:V,ariaPressed:nt,ariaReadOnly:nt,ariaRelevant:null,ariaRequired:nt,ariaRoleDescription:Re,ariaRowCount:V,ariaRowIndex:V,ariaRowSpan:V,ariaSelected:nt,ariaSetSize:V,ariaSort:null,ariaValueMax:V,ariaValueMin:V,ariaValueNow:V,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}})});function pu(e,t){return t in e?e[t]:t}var Kd=b(()=>{});function mu(e,t){return pu(e,t.toLowerCase())}var Wd=b(()=>{Kd()});var e0,t0=b(()=>{Wd();wi();ls();e0=Ln({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Za,acceptCharset:Re,accessKey:Re,action:null,allow:null,allowFullScreen:de,allowPaymentRequest:de,allowUserMedia:de,alt:null,as:null,async:de,autoCapitalize:null,autoComplete:Re,autoFocus:de,autoPlay:de,blocking:Re,capture:null,charSet:null,checked:de,cite:null,className:Re,cols:V,colSpan:null,content:null,contentEditable:nt,controls:de,controlsList:Re,coords:V|Za,crossOrigin:null,data:null,dateTime:null,decoding:null,default:de,defer:de,dir:null,dirName:null,disabled:de,download:du,draggable:nt,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:de,formTarget:null,headers:Re,height:V,hidden:du,high:V,href:null,hrefLang:null,htmlFor:Re,httpEquiv:Re,id:null,imageSizes:null,imageSrcSet:null,inert:de,inputMode:null,integrity:null,is:null,isMap:de,itemId:null,itemProp:Re,itemRef:Re,itemScope:de,itemType:Re,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:de,low:V,manifest:null,max:null,maxLength:V,media:null,method:null,min:null,minLength:V,multiple:de,muted:de,name:null,nonce:null,noModule:de,noValidate:de,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:de,optimum:V,pattern:null,ping:Re,placeholder:null,playsInline:de,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:de,referrerPolicy:null,rel:Re,required:de,reversed:de,rows:V,rowSpan:V,sandbox:Re,scope:null,scoped:de,seamless:de,selected:de,shadowRootClonable:de,shadowRootDelegatesFocus:de,shadowRootMode:null,shape:null,size:V,sizes:null,slot:null,span:V,spellCheck:nt,src:null,srcDoc:null,srcLang:null,srcSet:null,start:V,step:null,style:null,tabIndex:V,target:null,title:null,translate:null,type:null,typeMustMatch:de,useMap:null,value:nt,width:V,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:Re,axis:null,background:null,bgColor:null,border:V,borderColor:null,bottomMargin:V,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:de,declare:de,event:null,face:null,frame:null,frameBorder:null,hSpace:V,leftMargin:V,link:null,longDesc:null,lowSrc:null,marginHeight:V,marginWidth:V,noResize:de,noHref:de,noShade:de,noWrap:de,object:null,profile:null,prompt:null,rev:null,rightMargin:V,rules:null,scheme:null,scrolling:nt,standby:null,summary:null,text:null,topMargin:V,valueType:null,version:null,vAlign:null,vLink:null,vSpace:V,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:de,disableRemotePlayback:de,prefix:null,property:null,results:V,security:null,unselectable:null},space:"html",transform:mu})});var n0,a0=b(()=>{Kd();wi();ls();n0=Ln({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:nn,accentHeight:V,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:V,amplitude:V,arabicForm:null,ascent:V,attributeName:null,attributeType:null,azimuth:V,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:V,by:null,calcMode:null,capHeight:V,className:Re,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:V,diffuseConstant:V,direction:null,display:null,dur:null,divisor:V,dominantBaseline:null,download:de,dx:null,dy:null,edgeMode:null,editable:null,elevation:V,enableBackground:null,end:null,event:null,exponent:V,externalResourcesRequired:null,fill:null,fillOpacity:V,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:Za,g2:Za,glyphName:Za,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:V,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:V,horizOriginX:V,horizOriginY:V,id:null,ideographic:V,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:V,k:V,k1:V,k2:V,k3:V,k4:V,kernelMatrix:nn,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:V,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:V,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:V,overlineThickness:V,paintOrder:null,panose1:null,path:null,pathLength:V,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:Re,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:V,pointsAtY:V,pointsAtZ:V,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:nn,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:nn,rev:nn,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:nn,requiredFeatures:nn,requiredFonts:nn,requiredFormats:nn,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:V,specularExponent:V,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:V,strikethroughThickness:V,string:null,stroke:null,strokeDashArray:nn,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:V,strokeOpacity:V,strokeWidth:null,style:null,surfaceScale:V,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:nn,tabIndex:V,tableValues:null,target:null,targetX:V,targetY:V,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:nn,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:V,underlineThickness:V,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:V,values:null,vAlphabetic:V,vMathematical:V,vectorEffect:null,vHanging:V,vIdeographic:V,version:null,vertAdvY:V,vertOriginX:V,vertOriginY:V,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:V,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:pu})});var ep,i0=b(()=>{wi();ep=Ln({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(e,t){return"xlink:"+t.slice(5).toLowerCase()}})});var tp,r0=b(()=>{wi();Wd();tp=Ln({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:mu})});var np,l0=b(()=>{wi();np=Ln({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}})});var ap,s0=b(()=>{ap={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"}});function ip(e,t){let n=is(t),a=t,i=Nt;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&kw.test(t)){if(t.charAt(4)==="-"){let r=t.slice(5).replace(o0,ww);a="data"+r.charAt(0).toUpperCase()+r.slice(1)}else{let r=t.slice(4);if(!o0.test(r)){let l=r.replace(Ew,Tw);l.charAt(0)!=="-"&&(l="-"+l),t="data"+l}}i=Ti}return new i(a,t)}function Tw(e){return"-"+e.toLowerCase()}function ww(e){return e.charAt(1).toUpperCase()}var Ew,o0,kw,u0=b(()=>{Jd();Fd();Qd();Ew=/[A-Z]/g,o0=/-[a-z]/g,kw=/^data[-\w.:]+$/i});var c0,hu,f0=b(()=>{$b();Wb();t0();a0();i0();r0();l0();s0();u0();c0=Xd([$d,e0,ep,tp,np],"html"),hu=Xd([$d,n0,ep,tp,np],"svg")});function d0(e){return e.join(" ").trim()}var p0=b(()=>{});var b0=Ut((N2,y0)=>{var m0=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,Aw=/\n/g,Cw=/^\s*/,Rw=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,_w=/^:\s*/,Dw=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,Ow=/^[;\s]*/,Lw=/^\s+|\s+$/g,zw=`
10
- `,h0="/",g0="*",Ai="",Mw="comment",Uw="declaration";y0.exports=function(e,t){if(typeof e!="string")throw new TypeError("First argument must be a string");if(!e)return[];t=t||{};var n=1,a=1;function i(x){var k=x.match(Aw);k&&(n+=k.length);var m=x.lastIndexOf(zw);a=~m?x.length-m:a+x.length}function r(){var x={line:n,column:a};return function(k){return k.position=new l(x),c(),k}}function l(x){this.start=x,this.end={line:n,column:a},this.source=t.source}l.prototype.content=e;var s=[];function o(x){var k=new Error(t.source+":"+n+":"+a+": "+x);if(k.reason=x,k.filename=t.source,k.line=n,k.column=a,k.source=e,t.silent)s.push(k);else throw k}function u(x){var k=x.exec(e);if(k){var m=k[0];return i(m),e=e.slice(m.length),k}}function c(){u(Cw)}function p(x){var k;for(x=x||[];k=d();)k!==!1&&x.push(k);return x}function d(){var x=r();if(!(h0!=e.charAt(0)||g0!=e.charAt(1))){for(var k=2;Ai!=e.charAt(k)&&(g0!=e.charAt(k)||h0!=e.charAt(k+1));)++k;if(k+=2,Ai===e.charAt(k-1))return o("End of comment missing");var m=e.slice(2,k-2);return a+=2,i(m),e=e.slice(k),a+=2,x({type:Mw,comment:m})}}function f(){var x=r(),k=u(Rw);if(k){if(d(),!u(_w))return o("property missing ':'");var m=u(Dw),h=x({type:Uw,property:v0(k[0].replace(m0,Ai)),value:m?v0(m[0].replace(m0,Ai)):Ai});return u(Ow),h}}function S(){var x=[];p(x);for(var k;k=f();)k!==!1&&(x.push(k),p(x));return x}return c(),S()};function v0(e){return e?e.replace(Lw,Ai):Ai}});var S0=Ut(ss=>{"use strict";var Bw=ss&&ss.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(ss,"__esModule",{value:!0});ss.default=Hw;var Vw=Bw(b0());function Hw(e,t){var n=null;if(!e||typeof e!="string")return n;var a=(0,Vw.default)(e),i=typeof t=="function";return a.forEach(function(r){if(r.type==="declaration"){var l=r.property,s=r.value;i?t(l,s,r):s&&(n=n||{},n[l]=s)}}),n}});var N0=Ut(gu=>{"use strict";Object.defineProperty(gu,"__esModule",{value:!0});gu.camelCase=void 0;var Pw=/^--[a-zA-Z0-9_-]+$/,qw=/-([a-z])/g,jw=/^[^-]+$/,Yw=/^-(webkit|moz|ms|o|khtml)-/,Iw=/^-(ms)-/,Gw=function(e){return!e||jw.test(e)||Pw.test(e)},Xw=function(e,t){return t.toUpperCase()},x0=function(e,t){return"".concat(t,"-")},Qw=function(e,t){return t===void 0&&(t={}),Gw(e)?e:(e=e.toLowerCase(),t.reactCompat?e=e.replace(Iw,x0):e=e.replace(Yw,x0),e.replace(qw,Xw))};gu.camelCase=Qw});var k0=Ut((lp,E0)=>{"use strict";var Fw=lp&&lp.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},Zw=Fw(S0()),Jw=N0();function rp(e,t){var n={};return!e||typeof e!="string"||(0,Zw.default)(e,function(a,i){a&&i&&(n[(0,Jw.camelCase)(a,t)]=i)}),n}rp.default=rp;E0.exports=rp});function T0(e){return t;function t(n){let a=n&&n.position&&n.position[e]||{};if(typeof a.line=="number"&&a.line>0&&typeof a.column=="number"&&a.column>0)return{line:a.line,column:a.column,offset:typeof a.offset=="number"&&a.offset>-1?a.offset:void 0}}}function sp(e){let t=Lr(e),n=vu(e);if(t&&n)return{start:t,end:n}}var vu,Lr,w0=b(()=>{vu=T0("end"),Lr=T0("start")});var yu=b(()=>{w0()});function Ja(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?A0(e.position):"start"in e||"end"in e?A0(e):"line"in e||"column"in e?op(e):""}function op(e){return C0(e&&e.line)+":"+C0(e&&e.column)}function A0(e){return op(e&&e.start)+"-"+op(e&&e.end)}function C0(e){return e&&typeof e=="number"?e:1}var R0=b(()=>{});var up=b(()=>{R0()});var st,_0=b(()=>{up();st=class extends Error{constructor(t,n,a){super(),typeof n=="string"&&(a=n,n=void 0);let i="",r={},l=!1;if(n&&("line"in n&&"column"in n?r={place:n}:"start"in n&&"end"in n?r={place:n}:"type"in n?r={ancestors:[n],place:n.position}:r=K({},n)),typeof t=="string"?i=t:!r.cause&&t&&(l=!0,i=t.message,r.cause=t),!r.ruleId&&!r.source&&typeof a=="string"){let o=a.indexOf(":");o===-1?r.ruleId=a:(r.source=a.slice(0,o),r.ruleId=a.slice(o+1))}if(!r.place&&r.ancestors&&r.ancestors){let o=r.ancestors[r.ancestors.length-1];o&&(r.place=o.position)}let s=r.place&&"start"in r.place?r.place.start:r.place;this.ancestors=r.ancestors||void 0,this.cause=r.cause||void 0,this.column=s?s.column:void 0,this.fatal=void 0,this.file="",this.message=i,this.line=s?s.line:void 0,this.name=Ja(r.place)||"1:1",this.place=r.place||void 0,this.reason=this.message,this.ruleId=r.ruleId||void 0,this.source=r.source||void 0,this.stack=l&&r.cause&&typeof r.cause.stack=="string"?r.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}};st.prototype.file="";st.prototype.name="";st.prototype.reason="";st.prototype.message="";st.prototype.stack="";st.prototype.column=void 0;st.prototype.line=void 0;st.prototype.ancestors=void 0;st.prototype.cause=void 0;st.prototype.fatal=void 0;st.prototype.place=void 0;st.prototype.ruleId=void 0;st.prototype.source=void 0});var cp=b(()=>{_0()});function dp(e,t){if(!t||t.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");let n=t.filePath||void 0,a;if(t.development){if(typeof t.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");a=oA(n,t.jsxDEV)}else{if(typeof t.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof t.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");a=sA(n,t.jsx,t.jsxs)}let i={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:a,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space==="svg"?hu:c0,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},r=L0(i,e,void 0);return r&&typeof r!="string"?r:i.create(e,i.Fragment,{children:r||void 0},void 0)}function L0(e,t,n){if(t.type==="element")return tA(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return nA(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return iA(e,t,n);if(t.type==="mdxjsEsm")return aA(e,t);if(t.type==="root")return rA(e,t,n);if(t.type==="text")return lA(e,t)}function tA(e,t,n){let a=e.schema,i=a;t.tagName.toLowerCase()==="svg"&&a.space==="html"&&(i=hu,e.schema=i),e.ancestors.push(t);let r=M0(e,t.tagName,!1),l=uA(e,t),s=mp(e,t);return Ww.has(t.tagName)&&(s=s.filter(function(o){return typeof o=="string"?!Id(o):!0})),z0(e,l,r,t),pp(l,s),e.ancestors.pop(),e.schema=a,e.create(t,r,l,n)}function nA(e,t){if(t.data&&t.data.estree&&e.evaluater){let a=t.data.estree.body[0];return a.type,e.evaluater.evaluateExpression(a.expression)}os(e,t.position)}function aA(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);os(e,t.position)}function iA(e,t,n){let a=e.schema,i=a;t.name==="svg"&&a.space==="html"&&(i=hu,e.schema=i),e.ancestors.push(t);let r=t.name===null?e.Fragment:M0(e,t.name,!0),l=cA(e,t),s=mp(e,t);return z0(e,l,r,t),pp(l,s),e.ancestors.pop(),e.schema=a,e.create(t,r,l,n)}function rA(e,t,n){let a={};return pp(a,mp(e,t)),e.create(t,e.Fragment,a,n)}function lA(e,t){return t.value}function z0(e,t,n,a){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=a)}function pp(e,t){if(t.length>0){let n=t.length>1?t:t[0];n&&(e.children=n)}}function sA(e,t,n){return a;function a(i,r,l,s){let u=Array.isArray(l.children)?n:t;return s?u(r,l,s):u(r,l)}}function oA(e,t){return n;function n(a,i,r,l){let s=Array.isArray(r.children),o=Lr(a);return t(i,r,l,s,{columnNumber:o?o.column-1:void 0,fileName:e,lineNumber:o?o.line:void 0},void 0)}}function uA(e,t){let n={},a,i;for(i in t.properties)if(i!=="children"&&fp.call(t.properties,i)){let r=fA(e,i,t.properties[i]);if(r){let[l,s]=r;e.tableCellAlignToStyle&&l==="align"&&typeof s=="string"&&eA.has(t.tagName)?a=s:n[l]=s}}if(a){let r=n.style||(n.style={});r[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=a}return n}function cA(e,t){let n={};for(let a of t.attributes)if(a.type==="mdxJsxExpressionAttribute")if(a.data&&a.data.estree&&e.evaluater){let r=a.data.estree.body[0];r.type;let l=r.expression;l.type;let s=l.properties[0];s.type,Object.assign(n,e.evaluater.evaluateExpression(s.argument))}else os(e,t.position);else{let i=a.name,r;if(a.value&&typeof a.value=="object")if(a.value.data&&a.value.data.estree&&e.evaluater){let s=a.value.data.estree.body[0];s.type,r=e.evaluater.evaluateExpression(s.expression)}else os(e,t.position);else r=a.value===null?!0:a.value;n[i]=r}return n}function mp(e,t){let n=[],a=-1,i=e.passKeys?new Map:$w;for(;++a<t.children.length;){let r=t.children[a],l;if(e.passKeys){let o=r.type==="element"?r.tagName:r.type==="mdxJsxFlowElement"||r.type==="mdxJsxTextElement"?r.name:void 0;if(o){let u=i.get(o)||0;l=o+"-"+u,i.set(o,u+1)}}let s=L0(e,r,l);s!==void 0&&n.push(s)}return n}function fA(e,t,n){let a=ip(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=a.commaSeparated?Ib(n):d0(n)),a.property==="style"){let i=typeof n=="object"?n:dA(e,String(n));return e.stylePropertyNameCase==="css"&&(i=pA(i)),["style",i]}return[e.elementAttributeNameCase==="react"&&a.space?ap[a.property]||a.property:a.attribute,n]}}function dA(e,t){try{return(0,D0.default)(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};let a=n,i=new st("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:a,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw i.file=e.filePath||void 0,i.url=O0+"#cannot-parse-style-attribute",i}}function M0(e,t,n){let a;if(!n)a={type:"Literal",value:t};else if(t.includes(".")){let i=t.split("."),r=-1,l;for(;++r<i.length;){let s=fu(i[r])?{type:"Identifier",name:i[r]}:{type:"Literal",value:i[r]};l=l?{type:"MemberExpression",object:l,property:s,computed:!!(r&&s.type==="Literal"),optional:!1}:s}a=l}else a=fu(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(a.type==="Literal"){let i=a.value;return fp.call(e.components,i)?e.components[i]:i}if(e.evaluater)return e.evaluater.evaluateExpression(a);os(e)}function os(e,t){let n=new st("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw n.file=e.filePath||void 0,n.url=O0+"#cannot-handle-mdx-estrees-without-createevaluater",n}function pA(e){let t={},n;for(n in e)fp.call(e,n)&&(t[mA(n)]=e[n]);return t}function mA(e){let t=e.replace(Kw,hA);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function hA(e){return"-"+e.toLowerCase()}var D0,fp,$w,Kw,Ww,eA,O0,U0=b(()=>{Gb();Qb();Jb();f0();p0();D0=F(k0(),1);yu();cp();fp={}.hasOwnProperty,$w=new Map,Kw=/[A-Z]/g,Ww=new Set(["table","tbody","thead","tfoot","tr"]),eA=new Set(["td","th"]),O0="https://github.com/syntax-tree/hast-util-to-jsx-runtime"});var B0=b(()=>{U0()});var us,V0=b(()=>{us={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"]}});var H0=b(()=>{V0()});var q0=Ut(bu=>{"use strict";var gA=Symbol.for("react.transitional.element"),vA=Symbol.for("react.fragment");function P0(e,t,n){var a=null;if(n!==void 0&&(a=""+n),t.key!==void 0&&(a=""+t.key),"key"in t){n={};for(var i in t)i!=="key"&&(n[i]=t[i])}else n=t;return t=n.ref,{$$typeof:gA,type:e,key:a,ref:t!==void 0?t:null,props:n}}bu.Fragment=vA;bu.jsx=P0;bu.jsxs=P0});var re=Ut((J2,j0)=>{"use strict";j0.exports=q0()});function hp(e,t){let n=t||yA,a=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,i=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return I0(e,a,i)}function I0(e,t,n){if(bA(e)){if("value"in e)return e.type==="html"&&!n?"":e.value;if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return Y0(e.children,t,n)}return Array.isArray(e)?Y0(e,t,n):""}function Y0(e,t,n){let a=[],i=-1;for(;++i<e.length;)a[i]=I0(e[i],t,n);return a.join("")}function bA(e){return!!(e&&typeof e=="object")}var yA,G0=b(()=>{yA={}});var X0=b(()=>{G0()});function zr(e){let t="&"+e+";";Q0.innerHTML=t;let n=Q0.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}var Q0,Su=b(()=>{Q0=document.createElement("i")});function Ot(e,t,n,a){let i=e.length,r=0,l;if(t<0?t=-t>i?0:i+t:t=t>i?i:t,n=n>0?n:0,a.length<1e4)l=Array.from(a),l.unshift(t,n),e.splice(...l);else for(n&&e.splice(t,n);r<a.length;)l=a.slice(r,r+1e4),l.unshift(t,0),e.splice(...l),r+=1e4,t+=1e4}function Xt(e,t){return e.length>0?(Ot(e,e.length,0,t),e):t}var $a=b(()=>{});function Z0(e){let t={},n=-1;for(;++n<e.length;)SA(t,e[n]);return t}function SA(e,t){let n;for(n in t){let i=(F0.call(e,n)?e[n]:void 0)||(e[n]={}),r=t[n],l;if(r)for(l in r){F0.call(i,l)||(i[l]=[]);let s=r[l];xA(i[l],Array.isArray(s)?s:s?[s]:[])}}}function xA(e,t){let n=-1,a=[];for(;++n<t.length;)(t[n].add==="after"?e:a).push(t[n]);Ot(e,0,0,a)}var F0,J0=b(()=>{$a();F0={}.hasOwnProperty});function xu(e,t){let n=Number.parseInt(e,t);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)===65535||(n&65535)===65534||n>1114111?"\uFFFD":String.fromCodePoint(n)}var gp=b(()=>{});function ya(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}var Nu=b(()=>{});function cs(e){return e!==null&&(e<32||e===127)}function $(e){return e!==null&&e<-2}function ot(e){return e!==null&&(e<0||e===32)}function ce(e){return e===-2||e===-1||e===32}function Ka(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}var Sn,Et,$0,fs,K0,W0,eS,tS,_e=b(()=>{Sn=Ka(/[A-Za-z]/),Et=Ka(/[\dA-Za-z]/),$0=Ka(/[#-'*+\--9=?A-Z^-~]/);fs=Ka(/\d/),K0=Ka(/[\dA-Fa-f]/),W0=Ka(/[!-/:-@[-`{-~]/);eS=Ka(new RegExp("\\p{P}|\\p{S}","u")),tS=Ka(/\s/)});function zn(e){let t=[],n=-1,a=0,i=0;for(;++n<e.length;){let r=e.charCodeAt(n),l="";if(r===37&&Et(e.charCodeAt(n+1))&&Et(e.charCodeAt(n+2)))i=2;else if(r<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(r))||(l=String.fromCharCode(r));else if(r>55295&&r<57344){let s=e.charCodeAt(n+1);r<56320&&s>56319&&s<57344?(l=String.fromCharCode(r,s),i=1):l="\uFFFD"}else l=String.fromCharCode(r);l&&(t.push(e.slice(a,n),encodeURIComponent(l)),a=n+i+1,l=""),i&&(n+=i,i=0)}return t.join("")+e.slice(a)}var Ci=b(()=>{_e()});function pe(e,t,n,a){let i=a?a-1:Number.POSITIVE_INFINITY,r=0;return l;function l(o){return ce(o)?(e.enter(n),s(o)):t(o)}function s(o){return ce(o)&&r++<i?(e.consume(o),s):(e.exit(n),t(o))}}var kt=b(()=>{_e()});function NA(e){let t=e.attempt(this.parser.constructs.contentInitial,a,i),n;return t;function a(s){if(s===null){e.consume(s);return}return e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),pe(e,t,"linePrefix")}function i(s){return e.enter("paragraph"),r(s)}function r(s){let o=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=o),n=o,l(s)}function l(s){if(s===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(s);return}return $(s)?(e.consume(s),e.exit("chunkText"),r):(e.consume(s),l)}}var nS,aS=b(()=>{kt();_e();nS={tokenize:NA}});function EA(e){let t=this,n=[],a=0,i,r,l;return s;function s(g){if(a<n.length){let E=n[a];return t.containerState=E[1],e.attempt(E[0].continuation,o,u)(g)}return u(g)}function o(g){if(a++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,i&&h();let E=t.events.length,T=E,N;for(;T--;)if(t.events[T][0]==="exit"&&t.events[T][1].type==="chunkFlow"){N=t.events[T][1].end;break}m(a);let A=E;for(;A<t.events.length;)t.events[A][1].end=K({},N),A++;return Ot(t.events,T+1,0,t.events.slice(E)),t.events.length=A,u(g)}return s(g)}function u(g){if(a===n.length){if(!i)return d(g);if(i.currentConstruct&&i.currentConstruct.concrete)return S(g);t.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(iS,c,p)(g)}function c(g){return i&&h(),m(a),d(g)}function p(g){return t.parser.lazy[t.now().line]=a!==n.length,l=t.now().offset,S(g)}function d(g){return t.containerState={},e.attempt(iS,f,S)(g)}function f(g){return a++,n.push([t.currentConstruct,t.containerState]),d(g)}function S(g){if(g===null){i&&h(),m(0),e.consume(g);return}return i=i||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:i,contentType:"flow",previous:r}),x(g)}function x(g){if(g===null){k(e.exit("chunkFlow"),!0),m(0),e.consume(g);return}return $(g)?(e.consume(g),k(e.exit("chunkFlow")),a=0,t.interrupt=void 0,s):(e.consume(g),x)}function k(g,E){let T=t.sliceStream(g);if(E&&T.push(null),g.previous=r,r&&(r.next=g),r=g,i.defineSkip(g.start),i.write(T),t.parser.lazy[g.start.line]){let N=i.events.length;for(;N--;)if(i.events[N][1].start.offset<l&&(!i.events[N][1].end||i.events[N][1].end.offset>l))return;let A=t.events.length,C=A,U,P;for(;C--;)if(t.events[C][0]==="exit"&&t.events[C][1].type==="chunkFlow"){if(U){P=t.events[C][1].end;break}U=!0}for(m(a),N=A;N<t.events.length;)t.events[N][1].end=K({},P),N++;Ot(t.events,C+1,0,t.events.slice(A)),t.events.length=N}}function m(g){let E=n.length;for(;E-- >g;){let T=n[E];t.containerState=T[1],T[0].exit.call(t,e)}n.length=g}function h(){i.write([null]),r=void 0,i=void 0,t.containerState._closeFlow=void 0}}function kA(e,t,n){return pe(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}var rS,iS,lS=b(()=>{kt();_e();$a();rS={tokenize:EA},iS={tokenize:kA}});function vp(e){if(e===null||ot(e)||tS(e))return 1;if(eS(e))return 2}var sS=b(()=>{_e()});function Mr(e,t,n){let a=[],i=-1;for(;++i<e.length;){let r=e[i].resolveAll;r&&!a.includes(r)&&(t=r(t,n),a.push(r))}return t}var Eu=b(()=>{});function TA(e,t){let n=-1,a,i,r,l,s,o,u,c;for(;++n<e.length;)if(e[n][0]==="enter"&&e[n][1].type==="attentionSequence"&&e[n][1]._close){for(a=n;a--;)if(e[a][0]==="exit"&&e[a][1].type==="attentionSequence"&&e[a][1]._open&&t.sliceSerialize(e[a][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[a][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[a][1].end.offset-e[a][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;o=e[a][1].end.offset-e[a][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;let p=K({},e[a][1].end),d=K({},e[n][1].start);oS(p,-o),oS(d,o),l={type:o>1?"strongSequence":"emphasisSequence",start:p,end:K({},e[a][1].end)},s={type:o>1?"strongSequence":"emphasisSequence",start:K({},e[n][1].start),end:d},r={type:o>1?"strongText":"emphasisText",start:K({},e[a][1].end),end:K({},e[n][1].start)},i={type:o>1?"strong":"emphasis",start:K({},l.start),end:K({},s.end)},e[a][1].end=K({},l.start),e[n][1].start=K({},s.end),u=[],e[a][1].end.offset-e[a][1].start.offset&&(u=Xt(u,[["enter",e[a][1],t],["exit",e[a][1],t]])),u=Xt(u,[["enter",i,t],["enter",l,t],["exit",l,t],["enter",r,t]]),u=Xt(u,Mr(t.parser.constructs.insideSpan.null,e.slice(a+1,n),t)),u=Xt(u,[["exit",r,t],["enter",s,t],["exit",s,t],["exit",i,t]]),e[n][1].end.offset-e[n][1].start.offset?(c=2,u=Xt(u,[["enter",e[n][1],t],["exit",e[n][1],t]])):c=0,Ot(e,a-1,n-a+3,u),n=a+u.length-c-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function wA(e,t){let n=this.parser.constructs.attentionMarkers.null,a=this.previous,i=vp(a),r;return l;function l(o){return r=o,e.enter("attentionSequence"),s(o)}function s(o){if(o===r)return e.consume(o),s;let u=e.exit("attentionSequence"),c=vp(o),p=!c||c===2&&i||n.includes(o),d=!i||i===2&&c||n.includes(a);return u._open=!!(r===42?p:p&&(i||!d)),u._close=!!(r===42?d:d&&(c||!p)),t(o)}}function oS(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}var ds,uS=b(()=>{$a();sS();Eu();ds={name:"attention",resolveAll:TA,tokenize:wA}});function AA(e,t,n){let a=0;return i;function i(f){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(f),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),r}function r(f){return Sn(f)?(e.consume(f),l):f===64?n(f):u(f)}function l(f){return f===43||f===45||f===46||Et(f)?(a=1,s(f)):u(f)}function s(f){return f===58?(e.consume(f),a=0,o):(f===43||f===45||f===46||Et(f))&&a++<32?(e.consume(f),s):(a=0,u(f))}function o(f){return f===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(f),e.exit("autolinkMarker"),e.exit("autolink"),t):f===null||f===32||f===60||cs(f)?n(f):(e.consume(f),o)}function u(f){return f===64?(e.consume(f),c):$0(f)?(e.consume(f),u):n(f)}function c(f){return Et(f)?p(f):n(f)}function p(f){return f===46?(e.consume(f),a=0,c):f===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(f),e.exit("autolinkMarker"),e.exit("autolink"),t):d(f)}function d(f){if((f===45||Et(f))&&a++<63){let S=f===45?d:p;return e.consume(f),S}return n(f)}}var yp,cS=b(()=>{_e();yp={name:"autolink",tokenize:AA}});function CA(e,t,n){return a;function a(r){return ce(r)?pe(e,i,"linePrefix")(r):i(r)}function i(r){return r===null||$(r)?t(r):n(r)}}var Wa,ku=b(()=>{kt();_e();Wa={partial:!0,tokenize:CA}});function RA(e,t,n){let a=this;return i;function i(l){if(l===62){let s=a.containerState;return s.open||(e.enter("blockQuote",{_container:!0}),s.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(l),e.exit("blockQuoteMarker"),r}return n(l)}function r(l){return ce(l)?(e.enter("blockQuotePrefixWhitespace"),e.consume(l),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(l))}}function _A(e,t,n){let a=this;return i;function i(l){return ce(l)?pe(e,r,"linePrefix",a.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(l):r(l)}function r(l){return e.attempt(Tu,t,n)(l)}}function DA(e){e.exit("blockQuote")}var Tu,fS=b(()=>{kt();_e();Tu={continuation:{tokenize:_A},exit:DA,name:"blockQuote",tokenize:RA}});function OA(e,t,n){return a;function a(r){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(r),e.exit("escapeMarker"),i}function i(r){return W0(r)?(e.enter("characterEscapeValue"),e.consume(r),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(r)}}var wu,dS=b(()=>{_e();wu={name:"characterEscape",tokenize:OA}});function LA(e,t,n){let a=this,i=0,r,l;return s;function s(p){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(p),e.exit("characterReferenceMarker"),o}function o(p){return p===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(p),e.exit("characterReferenceMarkerNumeric"),u):(e.enter("characterReferenceValue"),r=31,l=Et,c(p))}function u(p){return p===88||p===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(p),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),r=6,l=K0,c):(e.enter("characterReferenceValue"),r=7,l=fs,c(p))}function c(p){if(p===59&&i){let d=e.exit("characterReferenceValue");return l===Et&&!zr(a.sliceSerialize(d))?n(p):(e.enter("characterReferenceMarker"),e.consume(p),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return l(p)&&i++<r?(e.consume(p),c):n(p)}}var Au,pS=b(()=>{Su();_e();Au={name:"characterReference",tokenize:LA}});function zA(e,t,n){let a=this,i={partial:!0,tokenize:T},r=0,l=0,s;return o;function o(N){return u(N)}function u(N){let A=a.events[a.events.length-1];return r=A&&A[1].type==="linePrefix"?A[2].sliceSerialize(A[1],!0).length:0,s=N,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),c(N)}function c(N){return N===s?(l++,e.consume(N),c):l<3?n(N):(e.exit("codeFencedFenceSequence"),ce(N)?pe(e,p,"whitespace")(N):p(N))}function p(N){return N===null||$(N)?(e.exit("codeFencedFence"),a.interrupt?t(N):e.check(mS,x,E)(N)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),d(N))}function d(N){return N===null||$(N)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),p(N)):ce(N)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),pe(e,f,"whitespace")(N)):N===96&&N===s?n(N):(e.consume(N),d)}function f(N){return N===null||$(N)?p(N):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),S(N))}function S(N){return N===null||$(N)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),p(N)):N===96&&N===s?n(N):(e.consume(N),S)}function x(N){return e.attempt(i,E,k)(N)}function k(N){return e.enter("lineEnding"),e.consume(N),e.exit("lineEnding"),m}function m(N){return r>0&&ce(N)?pe(e,h,"linePrefix",r+1)(N):h(N)}function h(N){return N===null||$(N)?e.check(mS,x,E)(N):(e.enter("codeFlowValue"),g(N))}function g(N){return N===null||$(N)?(e.exit("codeFlowValue"),h(N)):(e.consume(N),g)}function E(N){return e.exit("codeFenced"),t(N)}function T(N,A,C){let U=0;return P;function P(B){return N.enter("lineEnding"),N.consume(B),N.exit("lineEnding"),_}function _(B){return N.enter("codeFencedFence"),ce(B)?pe(N,R,"linePrefix",a.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(B):R(B)}function R(B){return B===s?(N.enter("codeFencedFenceSequence"),O(B)):C(B)}function O(B){return B===s?(U++,N.consume(B),O):U>=l?(N.exit("codeFencedFenceSequence"),ce(B)?pe(N,I,"whitespace")(B):I(B)):C(B)}function I(B){return B===null||$(B)?(N.exit("codeFencedFence"),A(B)):C(B)}}}function MA(e,t,n){let a=this;return i;function i(l){return l===null?n(l):(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),r)}function r(l){return a.parser.lazy[a.now().line]?n(l):t(l)}}var mS,Cu,hS=b(()=>{kt();_e();mS={partial:!0,tokenize:MA},Cu={concrete:!0,name:"codeFenced",tokenize:zA}});function BA(e,t,n){let a=this;return i;function i(u){return e.enter("codeIndented"),pe(e,r,"linePrefix",5)(u)}function r(u){let c=a.events[a.events.length-1];return c&&c[1].type==="linePrefix"&&c[2].sliceSerialize(c[1],!0).length>=4?l(u):n(u)}function l(u){return u===null?o(u):$(u)?e.attempt(UA,l,o)(u):(e.enter("codeFlowValue"),s(u))}function s(u){return u===null||$(u)?(e.exit("codeFlowValue"),l(u)):(e.consume(u),s)}function o(u){return e.exit("codeIndented"),t(u)}}function VA(e,t,n){let a=this;return i;function i(l){return a.parser.lazy[a.now().line]?n(l):$(l)?(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),i):pe(e,r,"linePrefix",5)(l)}function r(l){let s=a.events[a.events.length-1];return s&&s[1].type==="linePrefix"&&s[2].sliceSerialize(s[1],!0).length>=4?t(l):$(l)?i(l):n(l)}}var ps,UA,gS=b(()=>{kt();_e();ps={name:"codeIndented",tokenize:BA},UA={partial:!0,tokenize:VA}});function HA(e){let t=e.length-4,n=3,a,i;if((e[n][1].type==="lineEnding"||e[n][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(a=n;++a<t;)if(e[a][1].type==="codeTextData"){e[n][1].type="codeTextPadding",e[t][1].type="codeTextPadding",n+=2,t-=2;break}}for(a=n-1,t++;++a<=t;)i===void 0?a!==t&&e[a][1].type!=="lineEnding"&&(i=a):(a===t||e[a][1].type==="lineEnding")&&(e[i][1].type="codeTextData",a!==i+2&&(e[i][1].end=e[a-1][1].end,e.splice(i+2,a-i-2),t-=a-i-2,a=i+2),i=void 0);return e}function PA(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function qA(e,t,n){let a=this,i=0,r,l;return s;function s(d){return e.enter("codeText"),e.enter("codeTextSequence"),o(d)}function o(d){return d===96?(e.consume(d),i++,o):(e.exit("codeTextSequence"),u(d))}function u(d){return d===null?n(d):d===32?(e.enter("space"),e.consume(d),e.exit("space"),u):d===96?(l=e.enter("codeTextSequence"),r=0,p(d)):$(d)?(e.enter("lineEnding"),e.consume(d),e.exit("lineEnding"),u):(e.enter("codeTextData"),c(d))}function c(d){return d===null||d===32||d===96||$(d)?(e.exit("codeTextData"),u(d)):(e.consume(d),c)}function p(d){return d===96?(e.consume(d),r++,p):r===i?(e.exit("codeTextSequence"),e.exit("codeText"),t(d)):(l.type="codeTextData",c(d))}}var bp,vS=b(()=>{_e();bp={name:"codeText",previous:PA,resolve:HA,tokenize:qA}});function ms(e,t){let n=0;if(t.length<1e4)e.push(...t);else for(;n<t.length;)e.push(...t.slice(n,n+1e4)),n+=1e4}var Ru,yS=b(()=>{Ru=class{constructor(t){this.left=t?[...t]:[],this.right=[]}get(t){if(t<0||t>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+t+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return t<this.left.length?this.left[t]:this.right[this.right.length-t+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(t,n){let a=n==null?Number.POSITIVE_INFINITY:n;return a<this.left.length?this.left.slice(t,a):t>this.left.length?this.right.slice(this.right.length-a+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-a+this.left.length).reverse())}splice(t,n,a){let i=n||0;this.setCursor(Math.trunc(t));let r=this.right.splice(this.right.length-i,Number.POSITIVE_INFINITY);return a&&ms(this.left,a),r.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(t){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(t)}pushMany(t){this.setCursor(Number.POSITIVE_INFINITY),ms(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),ms(this.right,t.reverse())}setCursor(t){if(!(t===this.left.length||t>this.left.length&&this.right.length===0||t<0&&this.left.length===0))if(t<this.left.length){let n=this.left.splice(t,Number.POSITIVE_INFINITY);ms(this.right,n.reverse())}else{let n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);ms(this.left,n.reverse())}}}});function _u(e){let t={},n=-1,a,i,r,l,s,o,u,c=new Ru(e);for(;++n<c.length;){for(;n in t;)n=t[n];if(a=c.get(n),n&&a[1].type==="chunkFlow"&&c.get(n-1)[1].type==="listItemPrefix"&&(o=a[1]._tokenizer.events,r=0,r<o.length&&o[r][1].type==="lineEndingBlank"&&(r+=2),r<o.length&&o[r][1].type==="content"))for(;++r<o.length&&o[r][1].type!=="content";)o[r][1].type==="chunkText"&&(o[r][1]._isInFirstContentOfListItem=!0,r++);if(a[0]==="enter")a[1].contentType&&(Object.assign(t,jA(c,n)),n=t[n],u=!0);else if(a[1]._container){for(r=n,i=void 0;r--;)if(l=c.get(r),l[1].type==="lineEnding"||l[1].type==="lineEndingBlank")l[0]==="enter"&&(i&&(c.get(i)[1].type="lineEndingBlank"),l[1].type="lineEnding",i=r);else if(!(l[1].type==="linePrefix"||l[1].type==="listItemIndent"))break;i&&(a[1].end=K({},c.get(i)[1].start),s=c.slice(i,n),s.unshift(a),c.splice(i,n-i+1,s))}}return Ot(e,0,Number.POSITIVE_INFINITY,c.slice(0)),!u}function jA(e,t){let n=e.get(t)[1],a=e.get(t)[2],i=t-1,r=[],l=n._tokenizer;l||(l=a.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(l._contentTypeTextTrailing=!0));let s=l.events,o=[],u={},c,p,d=-1,f=n,S=0,x=0,k=[x];for(;f;){for(;e.get(++i)[1]!==f;);r.push(i),f._tokenizer||(c=a.sliceStream(f),f.next||c.push(null),p&&l.defineSkip(f.start),f._isInFirstContentOfListItem&&(l._gfmTasklistFirstContentOfListItem=!0),l.write(c),f._isInFirstContentOfListItem&&(l._gfmTasklistFirstContentOfListItem=void 0)),p=f,f=f.next}for(f=n;++d<s.length;)s[d][0]==="exit"&&s[d-1][0]==="enter"&&s[d][1].type===s[d-1][1].type&&s[d][1].start.line!==s[d][1].end.line&&(x=d+1,k.push(x),f._tokenizer=void 0,f.previous=void 0,f=f.next);for(l.events=[],f?(f._tokenizer=void 0,f.previous=void 0):k.pop(),d=k.length;d--;){let m=s.slice(k[d],k[d+1]),h=r.pop();o.push([h,h+m.length-1]),e.splice(h,2,m)}for(o.reverse(),d=-1;++d<o.length;)u[S+o[d][0]]=S+o[d][1],S+=o[d][1]-o[d][0]-1;return u}var Sp=b(()=>{$a();yS()});function IA(e){return _u(e),e}function GA(e,t){let n;return a;function a(s){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),i(s)}function i(s){return s===null?r(s):$(s)?e.check(YA,l,r)(s):(e.consume(s),i)}function r(s){return e.exit("chunkContent"),e.exit("content"),t(s)}function l(s){return e.consume(s),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,i}}function XA(e,t,n){let a=this;return i;function i(l){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),pe(e,r,"linePrefix")}function r(l){if(l===null||$(l))return n(l);let s=a.events[a.events.length-1];return!a.parser.constructs.disable.null.includes("codeIndented")&&s&&s[1].type==="linePrefix"&&s[2].sliceSerialize(s[1],!0).length>=4?t(l):e.interrupt(a.parser.constructs.flow,n,t)(l)}}var xp,YA,bS=b(()=>{kt();_e();Sp();xp={resolve:IA,tokenize:GA},YA={partial:!0,tokenize:XA}});function Du(e,t,n,a,i,r,l,s,o){let u=o||Number.POSITIVE_INFINITY,c=0;return p;function p(m){return m===60?(e.enter(a),e.enter(i),e.enter(r),e.consume(m),e.exit(r),d):m===null||m===32||m===41||cs(m)?n(m):(e.enter(a),e.enter(l),e.enter(s),e.enter("chunkString",{contentType:"string"}),x(m))}function d(m){return m===62?(e.enter(r),e.consume(m),e.exit(r),e.exit(i),e.exit(a),t):(e.enter(s),e.enter("chunkString",{contentType:"string"}),f(m))}function f(m){return m===62?(e.exit("chunkString"),e.exit(s),d(m)):m===null||m===60||$(m)?n(m):(e.consume(m),m===92?S:f)}function S(m){return m===60||m===62||m===92?(e.consume(m),f):f(m)}function x(m){return!c&&(m===null||m===41||ot(m))?(e.exit("chunkString"),e.exit(s),e.exit(l),e.exit(a),t(m)):c<u&&m===40?(e.consume(m),c++,x):m===41?(e.consume(m),c--,x):m===null||m===32||m===40||cs(m)?n(m):(e.consume(m),m===92?k:x)}function k(m){return m===40||m===41||m===92?(e.consume(m),x):x(m)}}var Np=b(()=>{_e()});function Ou(e,t,n,a,i,r){let l=this,s=0,o;return u;function u(f){return e.enter(a),e.enter(i),e.consume(f),e.exit(i),e.enter(r),c}function c(f){return s>999||f===null||f===91||f===93&&!o||f===94&&!s&&"_hiddenFootnoteSupport"in l.parser.constructs?n(f):f===93?(e.exit(r),e.enter(i),e.consume(f),e.exit(i),e.exit(a),t):$(f)?(e.enter("lineEnding"),e.consume(f),e.exit("lineEnding"),c):(e.enter("chunkString",{contentType:"string"}),p(f))}function p(f){return f===null||f===91||f===93||$(f)||s++>999?(e.exit("chunkString"),c(f)):(e.consume(f),o||(o=!ce(f)),f===92?d:p)}function d(f){return f===91||f===92||f===93?(e.consume(f),s++,p):p(f)}}var Ep=b(()=>{_e()});function Lu(e,t,n,a,i,r){let l;return s;function s(d){return d===34||d===39||d===40?(e.enter(a),e.enter(i),e.consume(d),e.exit(i),l=d===40?41:d,o):n(d)}function o(d){return d===l?(e.enter(i),e.consume(d),e.exit(i),e.exit(a),t):(e.enter(r),u(d))}function u(d){return d===l?(e.exit(r),o(l)):d===null?n(d):$(d)?(e.enter("lineEnding"),e.consume(d),e.exit("lineEnding"),pe(e,u,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),c(d))}function c(d){return d===l||d===null||$(d)?(e.exit("chunkString"),u(d)):(e.consume(d),d===92?p:c)}function p(d){return d===l||d===92?(e.consume(d),c):c(d)}}var kp=b(()=>{kt();_e()});function Ri(e,t){let n;return a;function a(i){return $(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),n=!0,a):ce(i)?pe(e,a,n?"linePrefix":"lineSuffix")(i):t(i)}}var Tp=b(()=>{kt();_e()});function FA(e,t,n){let a=this,i;return r;function r(f){return e.enter("definition"),l(f)}function l(f){return Ou.call(a,e,s,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(f)}function s(f){return i=ya(a.sliceSerialize(a.events[a.events.length-1][1]).slice(1,-1)),f===58?(e.enter("definitionMarker"),e.consume(f),e.exit("definitionMarker"),o):n(f)}function o(f){return ot(f)?Ri(e,u)(f):u(f)}function u(f){return Du(e,c,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(f)}function c(f){return e.attempt(QA,p,p)(f)}function p(f){return ce(f)?pe(e,d,"whitespace")(f):d(f)}function d(f){return f===null||$(f)?(e.exit("definition"),a.parser.defined.push(i),t(f)):n(f)}}function ZA(e,t,n){return a;function a(s){return ot(s)?Ri(e,i)(s):n(s)}function i(s){return Lu(e,r,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(s)}function r(s){return ce(s)?pe(e,l,"whitespace")(s):l(s)}function l(s){return s===null||$(s)?t(s):n(s)}}var wp,QA,SS=b(()=>{Np();Ep();kt();kp();Tp();_e();Nu();wp={name:"definition",tokenize:FA},QA={partial:!0,tokenize:ZA}});function JA(e,t,n){return a;function a(r){return e.enter("hardBreakEscape"),e.consume(r),i}function i(r){return $(r)?(e.exit("hardBreakEscape"),t(r)):n(r)}}var Ap,xS=b(()=>{_e();Ap={name:"hardBreakEscape",tokenize:JA}});function $A(e,t){let n=e.length-2,a=3,i,r;return e[a][1].type==="whitespace"&&(a+=2),n-2>a&&e[n][1].type==="whitespace"&&(n-=2),e[n][1].type==="atxHeadingSequence"&&(a===n-1||n-4>a&&e[n-2][1].type==="whitespace")&&(n-=a+1===n?2:4),n>a&&(i={type:"atxHeadingText",start:e[a][1].start,end:e[n][1].end},r={type:"chunkText",start:e[a][1].start,end:e[n][1].end,contentType:"text"},Ot(e,a,n-a+1,[["enter",i,t],["enter",r,t],["exit",r,t],["exit",i,t]])),e}function KA(e,t,n){let a=0;return i;function i(c){return e.enter("atxHeading"),r(c)}function r(c){return e.enter("atxHeadingSequence"),l(c)}function l(c){return c===35&&a++<6?(e.consume(c),l):c===null||ot(c)?(e.exit("atxHeadingSequence"),s(c)):n(c)}function s(c){return c===35?(e.enter("atxHeadingSequence"),o(c)):c===null||$(c)?(e.exit("atxHeading"),t(c)):ce(c)?pe(e,s,"whitespace")(c):(e.enter("atxHeadingText"),u(c))}function o(c){return c===35?(e.consume(c),o):(e.exit("atxHeadingSequence"),s(c))}function u(c){return c===null||c===35||ot(c)?(e.exit("atxHeadingText"),s(c)):(e.consume(c),u)}}var Cp,NS=b(()=>{kt();_e();$a();Cp={name:"headingAtx",resolve:$A,tokenize:KA}});var ES,Rp,kS=b(()=>{ES=["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"],Rp=["pre","script","style","textarea"]});function tC(e){let t=e.length;for(;t--&&!(e[t][0]==="enter"&&e[t][1].type==="htmlFlow"););return t>1&&e[t-2][1].type==="linePrefix"&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function nC(e,t,n){let a=this,i,r,l,s,o;return u;function u(y){return c(y)}function c(y){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(y),p}function p(y){return y===33?(e.consume(y),d):y===47?(e.consume(y),r=!0,x):y===63?(e.consume(y),i=3,a.interrupt?t:v):Sn(y)?(e.consume(y),l=String.fromCharCode(y),k):n(y)}function d(y){return y===45?(e.consume(y),i=2,f):y===91?(e.consume(y),i=5,s=0,S):Sn(y)?(e.consume(y),i=4,a.interrupt?t:v):n(y)}function f(y){return y===45?(e.consume(y),a.interrupt?t:v):n(y)}function S(y){let Ke="CDATA[";return y===Ke.charCodeAt(s++)?(e.consume(y),s===Ke.length?a.interrupt?t:R:S):n(y)}function x(y){return Sn(y)?(e.consume(y),l=String.fromCharCode(y),k):n(y)}function k(y){if(y===null||y===47||y===62||ot(y)){let Ke=y===47,At=l.toLowerCase();return!Ke&&!r&&Rp.includes(At)?(i=1,a.interrupt?t(y):R(y)):ES.includes(l.toLowerCase())?(i=6,Ke?(e.consume(y),m):a.interrupt?t(y):R(y)):(i=7,a.interrupt&&!a.parser.lazy[a.now().line]?n(y):r?h(y):g(y))}return y===45||Et(y)?(e.consume(y),l+=String.fromCharCode(y),k):n(y)}function m(y){return y===62?(e.consume(y),a.interrupt?t:R):n(y)}function h(y){return ce(y)?(e.consume(y),h):P(y)}function g(y){return y===47?(e.consume(y),P):y===58||y===95||Sn(y)?(e.consume(y),E):ce(y)?(e.consume(y),g):P(y)}function E(y){return y===45||y===46||y===58||y===95||Et(y)?(e.consume(y),E):T(y)}function T(y){return y===61?(e.consume(y),N):ce(y)?(e.consume(y),T):g(y)}function N(y){return y===null||y===60||y===61||y===62||y===96?n(y):y===34||y===39?(e.consume(y),o=y,A):ce(y)?(e.consume(y),N):C(y)}function A(y){return y===o?(e.consume(y),o=null,U):y===null||$(y)?n(y):(e.consume(y),A)}function C(y){return y===null||y===34||y===39||y===47||y===60||y===61||y===62||y===96||ot(y)?T(y):(e.consume(y),C)}function U(y){return y===47||y===62||ce(y)?g(y):n(y)}function P(y){return y===62?(e.consume(y),_):n(y)}function _(y){return y===null||$(y)?R(y):ce(y)?(e.consume(y),_):n(y)}function R(y){return y===45&&i===2?(e.consume(y),J):y===60&&i===1?(e.consume(y),ae):y===62&&i===4?(e.consume(y),Me):y===63&&i===3?(e.consume(y),v):y===93&&i===5?(e.consume(y),je):$(y)&&(i===6||i===7)?(e.exit("htmlFlowData"),e.check(WA,pt,O)(y)):y===null||$(y)?(e.exit("htmlFlowData"),O(y)):(e.consume(y),R)}function O(y){return e.check(eC,I,pt)(y)}function I(y){return e.enter("lineEnding"),e.consume(y),e.exit("lineEnding"),B}function B(y){return y===null||$(y)?O(y):(e.enter("htmlFlowData"),R(y))}function J(y){return y===45?(e.consume(y),v):R(y)}function ae(y){return y===47?(e.consume(y),l="",we):R(y)}function we(y){if(y===62){let Ke=l.toLowerCase();return Rp.includes(Ke)?(e.consume(y),Me):R(y)}return Sn(y)&&l.length<8?(e.consume(y),l+=String.fromCharCode(y),we):R(y)}function je(y){return y===93?(e.consume(y),v):R(y)}function v(y){return y===62?(e.consume(y),Me):y===45&&i===2?(e.consume(y),v):R(y)}function Me(y){return y===null||$(y)?(e.exit("htmlFlowData"),pt(y)):(e.consume(y),Me)}function pt(y){return e.exit("htmlFlow"),t(y)}}function aC(e,t,n){let a=this;return i;function i(l){return $(l)?(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),r):n(l)}function r(l){return a.parser.lazy[a.now().line]?n(l):t(l)}}function iC(e,t,n){return a;function a(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),e.attempt(Wa,t,n)}}var _p,WA,eC,TS=b(()=>{_e();kS();ku();_p={concrete:!0,name:"htmlFlow",resolveTo:tC,tokenize:nC},WA={partial:!0,tokenize:iC},eC={partial:!0,tokenize:aC}});function rC(e,t,n){let a=this,i,r,l;return s;function s(v){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(v),o}function o(v){return v===33?(e.consume(v),u):v===47?(e.consume(v),T):v===63?(e.consume(v),g):Sn(v)?(e.consume(v),C):n(v)}function u(v){return v===45?(e.consume(v),c):v===91?(e.consume(v),r=0,S):Sn(v)?(e.consume(v),h):n(v)}function c(v){return v===45?(e.consume(v),f):n(v)}function p(v){return v===null?n(v):v===45?(e.consume(v),d):$(v)?(l=p,ae(v)):(e.consume(v),p)}function d(v){return v===45?(e.consume(v),f):p(v)}function f(v){return v===62?J(v):v===45?d(v):p(v)}function S(v){let Me="CDATA[";return v===Me.charCodeAt(r++)?(e.consume(v),r===Me.length?x:S):n(v)}function x(v){return v===null?n(v):v===93?(e.consume(v),k):$(v)?(l=x,ae(v)):(e.consume(v),x)}function k(v){return v===93?(e.consume(v),m):x(v)}function m(v){return v===62?J(v):v===93?(e.consume(v),m):x(v)}function h(v){return v===null||v===62?J(v):$(v)?(l=h,ae(v)):(e.consume(v),h)}function g(v){return v===null?n(v):v===63?(e.consume(v),E):$(v)?(l=g,ae(v)):(e.consume(v),g)}function E(v){return v===62?J(v):g(v)}function T(v){return Sn(v)?(e.consume(v),N):n(v)}function N(v){return v===45||Et(v)?(e.consume(v),N):A(v)}function A(v){return $(v)?(l=A,ae(v)):ce(v)?(e.consume(v),A):J(v)}function C(v){return v===45||Et(v)?(e.consume(v),C):v===47||v===62||ot(v)?U(v):n(v)}function U(v){return v===47?(e.consume(v),J):v===58||v===95||Sn(v)?(e.consume(v),P):$(v)?(l=U,ae(v)):ce(v)?(e.consume(v),U):J(v)}function P(v){return v===45||v===46||v===58||v===95||Et(v)?(e.consume(v),P):_(v)}function _(v){return v===61?(e.consume(v),R):$(v)?(l=_,ae(v)):ce(v)?(e.consume(v),_):U(v)}function R(v){return v===null||v===60||v===61||v===62||v===96?n(v):v===34||v===39?(e.consume(v),i=v,O):$(v)?(l=R,ae(v)):ce(v)?(e.consume(v),R):(e.consume(v),I)}function O(v){return v===i?(e.consume(v),i=void 0,B):v===null?n(v):$(v)?(l=O,ae(v)):(e.consume(v),O)}function I(v){return v===null||v===34||v===39||v===60||v===61||v===96?n(v):v===47||v===62||ot(v)?U(v):(e.consume(v),I)}function B(v){return v===47||v===62||ot(v)?U(v):n(v)}function J(v){return v===62?(e.consume(v),e.exit("htmlTextData"),e.exit("htmlText"),t):n(v)}function ae(v){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(v),e.exit("lineEnding"),we}function we(v){return ce(v)?pe(e,je,"linePrefix",a.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(v):je(v)}function je(v){return e.enter("htmlTextData"),l(v)}}var Dp,wS=b(()=>{kt();_e();Dp={name:"htmlText",tokenize:rC}});function uC(e){let t=-1,n=[];for(;++t<e.length;){let a=e[t][1];if(n.push(e[t]),a.type==="labelImage"||a.type==="labelLink"||a.type==="labelEnd"){let i=a.type==="labelImage"?4:2;a.type="data",t+=i}}return e.length!==n.length&&Ot(e,0,e.length,n),e}function cC(e,t){let n=e.length,a=0,i,r,l,s;for(;n--;)if(i=e[n][1],r){if(i.type==="link"||i.type==="labelLink"&&i._inactive)break;e[n][0]==="enter"&&i.type==="labelLink"&&(i._inactive=!0)}else if(l){if(e[n][0]==="enter"&&(i.type==="labelImage"||i.type==="labelLink")&&!i._balanced&&(r=n,i.type!=="labelLink")){a=2;break}}else i.type==="labelEnd"&&(l=n);let o={type:e[r][1].type==="labelLink"?"link":"image",start:K({},e[r][1].start),end:K({},e[e.length-1][1].end)},u={type:"label",start:K({},e[r][1].start),end:K({},e[l][1].end)},c={type:"labelText",start:K({},e[r+a+2][1].end),end:K({},e[l-2][1].start)};return s=[["enter",o,t],["enter",u,t]],s=Xt(s,e.slice(r+1,r+a+3)),s=Xt(s,[["enter",c,t]]),s=Xt(s,Mr(t.parser.constructs.insideSpan.null,e.slice(r+a+4,l-3),t)),s=Xt(s,[["exit",c,t],e[l-2],e[l-1],["exit",u,t]]),s=Xt(s,e.slice(l+1)),s=Xt(s,[["exit",o,t]]),Ot(e,r,e.length,s),e}function fC(e,t,n){let a=this,i=a.events.length,r,l;for(;i--;)if((a.events[i][1].type==="labelImage"||a.events[i][1].type==="labelLink")&&!a.events[i][1]._balanced){r=a.events[i][1];break}return s;function s(d){return r?r._inactive?p(d):(l=a.parser.defined.includes(ya(a.sliceSerialize({start:r.end,end:a.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(d),e.exit("labelMarker"),e.exit("labelEnd"),o):n(d)}function o(d){return d===40?e.attempt(lC,c,l?c:p)(d):d===91?e.attempt(sC,c,l?u:p)(d):l?c(d):p(d)}function u(d){return e.attempt(oC,c,p)(d)}function c(d){return t(d)}function p(d){return r._balanced=!0,n(d)}}function dC(e,t,n){return a;function a(p){return e.enter("resource"),e.enter("resourceMarker"),e.consume(p),e.exit("resourceMarker"),i}function i(p){return ot(p)?Ri(e,r)(p):r(p)}function r(p){return p===41?c(p):Du(e,l,s,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(p)}function l(p){return ot(p)?Ri(e,o)(p):c(p)}function s(p){return n(p)}function o(p){return p===34||p===39||p===40?Lu(e,u,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(p):c(p)}function u(p){return ot(p)?Ri(e,c)(p):c(p)}function c(p){return p===41?(e.enter("resourceMarker"),e.consume(p),e.exit("resourceMarker"),e.exit("resource"),t):n(p)}}function pC(e,t,n){let a=this;return i;function i(s){return Ou.call(a,e,r,l,"reference","referenceMarker","referenceString")(s)}function r(s){return a.parser.defined.includes(ya(a.sliceSerialize(a.events[a.events.length-1][1]).slice(1,-1)))?t(s):n(s)}function l(s){return n(s)}}function mC(e,t,n){return a;function a(r){return e.enter("reference"),e.enter("referenceMarker"),e.consume(r),e.exit("referenceMarker"),i}function i(r){return r===93?(e.enter("referenceMarker"),e.consume(r),e.exit("referenceMarker"),e.exit("reference"),t):n(r)}}var _i,lC,sC,oC,zu=b(()=>{Np();Ep();kp();Tp();_e();$a();Nu();Eu();_i={name:"labelEnd",resolveAll:uC,resolveTo:cC,tokenize:fC},lC={tokenize:dC},sC={tokenize:pC},oC={tokenize:mC}});function hC(e,t,n){let a=this;return i;function i(s){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(s),e.exit("labelImageMarker"),r}function r(s){return s===91?(e.enter("labelMarker"),e.consume(s),e.exit("labelMarker"),e.exit("labelImage"),l):n(s)}function l(s){return s===94&&"_hiddenFootnoteSupport"in a.parser.constructs?n(s):t(s)}}var Op,AS=b(()=>{zu();Op={name:"labelStartImage",resolveAll:_i.resolveAll,tokenize:hC}});function gC(e,t,n){let a=this;return i;function i(l){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(l),e.exit("labelMarker"),e.exit("labelLink"),r}function r(l){return l===94&&"_hiddenFootnoteSupport"in a.parser.constructs?n(l):t(l)}}var Lp,CS=b(()=>{zu();Lp={name:"labelStartLink",resolveAll:_i.resolveAll,tokenize:gC}});function vC(e,t){return n;function n(a){return e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),pe(e,t,"linePrefix")}}var hs,RS=b(()=>{kt();hs={name:"lineEnding",tokenize:vC}});function yC(e,t,n){let a=0,i;return r;function r(u){return e.enter("thematicBreak"),l(u)}function l(u){return i=u,s(u)}function s(u){return u===i?(e.enter("thematicBreakSequence"),o(u)):a>=3&&(u===null||$(u))?(e.exit("thematicBreak"),t(u)):n(u)}function o(u){return u===i?(e.consume(u),a++,o):(e.exit("thematicBreakSequence"),ce(u)?pe(e,s,"whitespace")(u):s(u))}}var Di,zp=b(()=>{kt();_e();Di={name:"thematicBreak",tokenize:yC}});function xC(e,t,n){let a=this,i=a.events[a.events.length-1],r=i&&i[1].type==="linePrefix"?i[2].sliceSerialize(i[1],!0).length:0,l=0;return s;function s(f){let S=a.containerState.type||(f===42||f===43||f===45?"listUnordered":"listOrdered");if(S==="listUnordered"?!a.containerState.marker||f===a.containerState.marker:fs(f)){if(a.containerState.type||(a.containerState.type=S,e.enter(S,{_container:!0})),S==="listUnordered")return e.enter("listItemPrefix"),f===42||f===45?e.check(Di,n,u)(f):u(f);if(!a.interrupt||f===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),o(f)}return n(f)}function o(f){return fs(f)&&++l<10?(e.consume(f),o):(!a.interrupt||l<2)&&(a.containerState.marker?f===a.containerState.marker:f===41||f===46)?(e.exit("listItemValue"),u(f)):n(f)}function u(f){return e.enter("listItemMarker"),e.consume(f),e.exit("listItemMarker"),a.containerState.marker=a.containerState.marker||f,e.check(Wa,a.interrupt?n:c,e.attempt(bC,d,p))}function c(f){return a.containerState.initialBlankLine=!0,r++,d(f)}function p(f){return ce(f)?(e.enter("listItemPrefixWhitespace"),e.consume(f),e.exit("listItemPrefixWhitespace"),d):n(f)}function d(f){return a.containerState.size=r+a.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(f)}}function NC(e,t,n){let a=this;return a.containerState._closeFlow=void 0,e.check(Wa,i,r);function i(s){return a.containerState.furtherBlankLines=a.containerState.furtherBlankLines||a.containerState.initialBlankLine,pe(e,t,"listItemIndent",a.containerState.size+1)(s)}function r(s){return a.containerState.furtherBlankLines||!ce(s)?(a.containerState.furtherBlankLines=void 0,a.containerState.initialBlankLine=void 0,l(s)):(a.containerState.furtherBlankLines=void 0,a.containerState.initialBlankLine=void 0,e.attempt(SC,t,l)(s))}function l(s){return a.containerState._closeFlow=!0,a.interrupt=void 0,pe(e,e.attempt(Pt,t,n),"linePrefix",a.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(s)}}function EC(e,t,n){let a=this;return pe(e,i,"listItemIndent",a.containerState.size+1);function i(r){let l=a.events[a.events.length-1];return l&&l[1].type==="listItemIndent"&&l[2].sliceSerialize(l[1],!0).length===a.containerState.size?t(r):n(r)}}function kC(e){e.exit(this.containerState.type)}function TC(e,t,n){let a=this;return pe(e,i,"listItemPrefixWhitespace",a.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function i(r){let l=a.events[a.events.length-1];return!ce(r)&&l&&l[1].type==="listItemPrefixWhitespace"?t(r):n(r)}}var Pt,bC,SC,_S=b(()=>{kt();_e();ku();zp();Pt={continuation:{tokenize:NC},exit:kC,name:"list",tokenize:xC},bC={partial:!0,tokenize:TC},SC={partial:!0,tokenize:EC}});function wC(e,t){let n=e.length,a,i,r;for(;n--;)if(e[n][0]==="enter"){if(e[n][1].type==="content"){a=n;break}e[n][1].type==="paragraph"&&(i=n)}else e[n][1].type==="content"&&e.splice(n,1),!r&&e[n][1].type==="definition"&&(r=n);let l={type:"setextHeading",start:K({},e[a][1].start),end:K({},e[e.length-1][1].end)};return e[i][1].type="setextHeadingText",r?(e.splice(i,0,["enter",l,t]),e.splice(r+1,0,["exit",e[a][1],t]),e[a][1].end=K({},e[r][1].end)):e[a][1]=l,e.push(["exit",l,t]),e}function AC(e,t,n){let a=this,i;return r;function r(u){let c=a.events.length,p;for(;c--;)if(a.events[c][1].type!=="lineEnding"&&a.events[c][1].type!=="linePrefix"&&a.events[c][1].type!=="content"){p=a.events[c][1].type==="paragraph";break}return!a.parser.lazy[a.now().line]&&(a.interrupt||p)?(e.enter("setextHeadingLine"),i=u,l(u)):n(u)}function l(u){return e.enter("setextHeadingLineSequence"),s(u)}function s(u){return u===i?(e.consume(u),s):(e.exit("setextHeadingLineSequence"),ce(u)?pe(e,o,"lineSuffix")(u):o(u))}function o(u){return u===null||$(u)?(e.exit("setextHeadingLine"),t(u)):n(u)}}var Mu,DS=b(()=>{kt();_e();Mu={name:"setextUnderline",resolveTo:wC,tokenize:AC}});var Mp=b(()=>{uS();cS();ku();fS();dS();pS();hS();gS();vS();bS();SS();xS();NS();TS();wS();zu();AS();CS();RS();_S();DS();zp()});function CC(e){let t=this,n=e.attempt(Wa,a,e.attempt(this.parser.constructs.flowInitial,i,pe(e,e.attempt(this.parser.constructs.flow,i,e.attempt(xp,i)),"linePrefix")));return n;function a(r){if(r===null){e.consume(r);return}return e.enter("lineEndingBlank"),e.consume(r),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function i(r){if(r===null){e.consume(r);return}return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),t.currentConstruct=void 0,n}}var OS,LS=b(()=>{Mp();kt();OS={tokenize:CC}});function BS(e){return{resolveAll:VS(e==="text"?RC:void 0),tokenize:t};function t(n){let a=this,i=this.parser.constructs[e],r=n.attempt(i,l,s);return l;function l(c){return u(c)?r(c):s(c)}function s(c){if(c===null){n.consume(c);return}return n.enter("data"),n.consume(c),o}function o(c){return u(c)?(n.exit("data"),r(c)):(n.consume(c),o)}function u(c){if(c===null)return!0;let p=i[c],d=-1;if(p)for(;++d<p.length;){let f=p[d];if(!f.previous||f.previous.call(a,a.previous))return!0}return!1}}}function VS(e){return t;function t(n,a){let i=-1,r;for(;++i<=n.length;)r===void 0?n[i]&&n[i][1].type==="data"&&(r=i,i++):(!n[i]||n[i][1].type!=="data")&&(i!==r+2&&(n[r][1].end=n[i-1][1].end,n.splice(r+2,i-r-2),i=r+2),r=void 0);return e?e(n,a):n}}function RC(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||e[n][1].type==="lineEnding")&&e[n-1][1].type==="data"){let a=e[n-1][1],i=t.sliceStream(a),r=i.length,l=-1,s=0,o;for(;r--;){let u=i[r];if(typeof u=="string"){for(l=u.length;u.charCodeAt(l-1)===32;)s++,l--;if(l)break;l=-1}else if(u===-2)o=!0,s++;else if(u!==-1){r++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(s=0),s){let u={type:n===e.length||o||s<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:r?l:a.start._bufferIndex+l,_index:a.start._index+r,line:a.end.line,column:a.end.column-s,offset:a.end.offset-s},end:K({},a.end)};a.end=K({},u.start),a.start.offset===a.end.offset?Object.assign(a,u):(e.splice(n,0,["enter",u,t],["exit",u,t]),n+=2)}n++}return e}var zS,MS,US,Up=b(()=>{zS={resolveAll:VS()},MS=BS("string"),US=BS("text")});var Bp={};oc(Bp,{attentionMarkers:()=>BC,contentInitial:()=>DC,disable:()=>VC,document:()=>_C,flow:()=>LC,flowInitial:()=>OC,insideSpan:()=>UC,string:()=>zC,text:()=>MC});var _C,DC,OC,LC,zC,MC,UC,BC,VC,HS=b(()=>{Mp();Up();_C={42:Pt,43:Pt,45:Pt,48:Pt,49:Pt,50:Pt,51:Pt,52:Pt,53:Pt,54:Pt,55:Pt,56:Pt,57:Pt,62:Tu},DC={91:wp},OC={[-2]:ps,[-1]:ps,32:ps},LC={35:Cp,42:Di,45:[Mu,Di],60:_p,61:Mu,95:Di,96:Cu,126:Cu},zC={38:Au,92:wu},MC={[-5]:hs,[-4]:hs,[-3]:hs,33:Op,38:Au,42:ds,60:[yp,Dp],91:Lp,92:[Ap,wu],93:_i,95:ds,96:bp},UC={null:[ds,zS]},BC={null:[42,95]},VC={null:[]}});function PS(e,t,n){let a={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0},i={},r=[],l=[],s=[],o=!0,u={attempt:U(A),check:U(C),consume:E,enter:T,exit:N,interrupt:U(C,{interrupt:!0})},c={code:null,containerState:{},defineSkip:m,events:[],now:k,parser:e,previous:null,sliceSerialize:S,sliceStream:x,write:f},p=t.tokenize.call(c,u),d;return t.resolveAll&&r.push(t),c;function f(O){return l=Xt(l,O),h(),l[l.length-1]!==null?[]:(P(t,0),c.events=Mr(r,c.events,c),c.events)}function S(O,I){return PC(x(O),I)}function x(O){return HC(l,O)}function k(){let{_bufferIndex:O,_index:I,line:B,column:J,offset:ae}=a;return{_bufferIndex:O,_index:I,line:B,column:J,offset:ae}}function m(O){i[O.line]=O.column,R()}function h(){let O;for(;a._index<l.length;){let I=l[a._index];if(typeof I=="string")for(O=a._index,a._bufferIndex<0&&(a._bufferIndex=0);a._index===O&&a._bufferIndex<I.length;)g(I.charCodeAt(a._bufferIndex));else g(I)}}function g(O){o=void 0,d=O,p=p(O)}function E(O){$(O)?(a.line++,a.column=1,a.offset+=O===-3?2:1,R()):O!==-1&&(a.column++,a.offset++),a._bufferIndex<0?a._index++:(a._bufferIndex++,a._bufferIndex===l[a._index].length&&(a._bufferIndex=-1,a._index++)),c.previous=O,o=!0}function T(O,I){let B=I||{};return B.type=O,B.start=k(),c.events.push(["enter",B,c]),s.push(B),B}function N(O){let I=s.pop();return I.end=k(),c.events.push(["exit",I,c]),I}function A(O,I){P(O,I.from)}function C(O,I){I.restore()}function U(O,I){return B;function B(J,ae,we){let je,v,Me,pt;return Array.isArray(J)?Ke(J):"tokenize"in J?Ke([J]):y(J);function y(Q){return ne;function ne(Y){let oe=Y!==null&&Q[Y],Ue=Y!==null&&Q.null,mt=[...Array.isArray(oe)?oe:oe?[oe]:[],...Array.isArray(Ue)?Ue:Ue?[Ue]:[]];return Ke(mt)(Y)}}function Ke(Q){return je=Q,v=0,Q.length===0?we:At(Q[v])}function At(Q){return ne;function ne(Y){return pt=_(),Me=Q,Q.partial||(c.currentConstruct=Q),Q.name&&c.parser.constructs.disable.null.includes(Q.name)?X(Y):Q.tokenize.call(I?Object.assign(Object.create(c),I):c,u,se,X)(Y)}}function se(Q){return o=!0,O(Me,pt),ae}function X(Q){return o=!0,pt.restore(),++v<je.length?At(je[v]):we}}}function P(O,I){O.resolveAll&&!r.includes(O)&&r.push(O),O.resolve&&Ot(c.events,I,c.events.length-I,O.resolve(c.events.slice(I),c)),O.resolveTo&&(c.events=O.resolveTo(c.events,c))}function _(){let O=k(),I=c.previous,B=c.currentConstruct,J=c.events.length,ae=Array.from(s);return{from:J,restore:we};function we(){a=O,c.previous=I,c.currentConstruct=B,c.events.length=J,s=ae,R()}}function R(){a.line in i&&a.column<2&&(a.column=i[a.line],a.offset+=i[a.line]-1)}}function HC(e,t){let n=t.start._index,a=t.start._bufferIndex,i=t.end._index,r=t.end._bufferIndex,l;if(n===i)l=[e[n].slice(a,r)];else{if(l=e.slice(n,i),a>-1){let s=l[0];typeof s=="string"?l[0]=s.slice(a):l.shift()}r>0&&l.push(e[i].slice(0,r))}return l}function PC(e,t){let n=-1,a=[],i;for(;++n<e.length;){let r=e[n],l;if(typeof r=="string")l=r;else switch(r){case-5:{l="\r";break}case-4:{l=`
11
- `;break}case-3:{l=`\r
12
- `;break}case-2:{l=t?" ":" ";break}case-1:{if(!t&&i)continue;l=" ";break}default:l=String.fromCharCode(r)}i=r===-2,a.push(l)}return a.join("")}var qS=b(()=>{_e();$a();Eu()});function Vp(e){let a={constructs:Z0([Bp,...(e||{}).extensions||[]]),content:i(nS),defined:[],document:i(rS),flow:i(OS),lazy:{},string:i(MS),text:i(US)};return a;function i(r){return l;function l(s){return PS(a,r,s)}}}var jS=b(()=>{J0();aS();lS();LS();Up();HS();qS()});function Hp(e){for(;!_u(e););return e}var YS=b(()=>{Sp()});function Pp(){let e=1,t="",n=!0,a;return i;function i(r,l,s){let o=[],u,c,p,d,f;for(r=t+(typeof r=="string"?r.toString():new TextDecoder(l||void 0).decode(r)),p=0,t="",n&&(r.charCodeAt(0)===65279&&p++,n=void 0);p<r.length;){if(IS.lastIndex=p,u=IS.exec(r),d=u&&u.index!==void 0?u.index:r.length,f=r.charCodeAt(d),!u){t=r.slice(p);break}if(f===10&&p===d&&a)o.push(-3),a=void 0;else switch(a&&(o.push(-5),a=void 0),p<d&&(o.push(r.slice(p,d)),e+=d-p),f){case 0:{o.push(65533),e++;break}case 9:{for(c=Math.ceil(e/4)*4,o.push(-2);e++<c;)o.push(-1);break}case 10:{o.push(-4),e=1;break}default:a=!0,e=1}p=d+1}return s&&(a&&o.push(-5),t&&o.push(t),o.push(null)),o}}var IS,GS=b(()=>{IS=/[\0\t\n\r]/g});var XS=b(()=>{jS();YS();GS()});function QS(e){return e.replace(qC,jC)}function jC(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){let i=n.charCodeAt(1),r=i===120||i===88;return xu(n.slice(r?2:1),r?16:10)}return zr(n)||e}var qC,FS=b(()=>{Su();gp();qC=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi});function qp(e,t,n){return typeof t!="string"&&(n=t,t=void 0),YC(n)(Hp(Vp(n).document().write(Pp()(e,t,!0))))}function YC(e){let t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:r(le),autolinkProtocol:U,autolinkEmail:U,atxHeading:r(Fr),blockQuote:r(Y),characterEscape:U,characterReference:U,codeFenced:r(oe),codeFencedFenceInfo:l,codeFencedFenceMeta:l,codeIndented:r(oe,l),codeText:r(Ue,l),codeTextData:U,data:U,codeFlowValue:U,definition:r(mt),definitionDestinationString:l,definitionLabelString:l,definitionTitleString:l,emphasis:r(zs),hardBreakEscape:r(Zr),hardBreakTrailing:r(Zr),htmlFlow:r(q,l),htmlFlowData:U,htmlText:r(q,l),htmlTextData:U,image:r(j),label:l,link:r(le),listItem:r(Mt),listItemValue:d,listOrdered:r(Be,p),listUnordered:r(Be),paragraph:r(on),reference:y,referenceString:l,resourceDestinationString:l,resourceTitleString:l,setextHeading:r(Fr),strong:r(Ct),thematicBreak:r(un)},exit:{atxHeading:o(),atxHeadingSequence:T,autolink:o(),autolinkEmail:ne,autolinkProtocol:Q,blockQuote:o(),characterEscapeValue:P,characterReferenceMarkerHexadecimal:At,characterReferenceMarkerNumeric:At,characterReferenceValue:se,characterReference:X,codeFenced:o(k),codeFencedFence:x,codeFencedFenceInfo:f,codeFencedFenceMeta:S,codeFlowValue:P,codeIndented:o(m),codeText:o(B),codeTextData:P,data:P,definition:o(),definitionDestinationString:E,definitionLabelString:h,definitionTitleString:g,emphasis:o(),hardBreakEscape:o(R),hardBreakTrailing:o(R),htmlFlow:o(O),htmlFlowData:P,htmlText:o(I),htmlTextData:P,image:o(ae),label:je,labelText:we,lineEnding:_,link:o(J),listItem:o(),listOrdered:o(),listUnordered:o(),paragraph:o(),referenceString:Ke,resourceDestinationString:v,resourceTitleString:Me,resource:pt,setextHeading:o(C),setextHeadingLineSequence:A,setextHeadingText:N,strong:o(),thematicBreak:o()}};$S(t,(e||{}).mdastExtensions||[]);let n={};return a;function a(D){let G={type:"root",children:[]},fe={stack:[G],tokenStack:[],config:t,enter:s,exit:u,buffer:l,resume:c,data:n},Se=[],Ve=-1;for(;++Ve<D.length;)if(D[Ve][1].type==="listOrdered"||D[Ve][1].type==="listUnordered")if(D[Ve][0]==="enter")Se.push(Ve);else{let Bn=Se.pop();Ve=i(D,Bn,Ve)}for(Ve=-1;++Ve<D.length;){let Bn=t[D[Ve][0]];JS.call(Bn,D[Ve][1].type)&&Bn[D[Ve][1].type].call(Object.assign({sliceSerialize:D[Ve][2].sliceSerialize},fe),D[Ve][1])}if(fe.tokenStack.length>0){let Bn=fe.tokenStack[fe.tokenStack.length-1];(Bn[1]||ZS).call(fe,void 0,Bn[0])}for(G.position={start:ei(D.length>0?D[0][1].start:{line:1,column:1,offset:0}),end:ei(D.length>0?D[D.length-2][1].end:{line:1,column:1,offset:0})},Ve=-1;++Ve<t.transforms.length;)G=t.transforms[Ve](G)||G;return G}function i(D,G,fe){let Se=G-1,Ve=-1,Bn=!1,ii,Kn,Jr,$r;for(;++Se<=fe;){let cn=D[Se];switch(cn[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{cn[0]==="enter"?Ve++:Ve--,$r=void 0;break}case"lineEndingBlank":{cn[0]==="enter"&&(ii&&!$r&&!Ve&&!Jr&&(Jr=Se),$r=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:$r=void 0}if(!Ve&&cn[0]==="enter"&&cn[1].type==="listItemPrefix"||Ve===-1&&cn[0]==="exit"&&(cn[1].type==="listUnordered"||cn[1].type==="listOrdered")){if(ii){let Hi=Se;for(Kn=void 0;Hi--;){let Wn=D[Hi];if(Wn[1].type==="lineEnding"||Wn[1].type==="lineEndingBlank"){if(Wn[0]==="exit")continue;Kn&&(D[Kn][1].type="lineEndingBlank",Bn=!0),Wn[1].type="lineEnding",Kn=Hi}else if(!(Wn[1].type==="linePrefix"||Wn[1].type==="blockQuotePrefix"||Wn[1].type==="blockQuotePrefixWhitespace"||Wn[1].type==="blockQuoteMarker"||Wn[1].type==="listItemIndent"))break}Jr&&(!Kn||Jr<Kn)&&(ii._spread=!0),ii.end=Object.assign({},Kn?D[Kn][1].start:cn[1].end),D.splice(Kn||Se,0,["exit",ii,cn[2]]),Se++,fe++}if(cn[1].type==="listItemPrefix"){let Hi={type:"listItem",_spread:!1,start:Object.assign({},cn[1].start),end:void 0};ii=Hi,D.splice(Se,0,["enter",Hi,cn[2]]),Se++,fe++,Jr=void 0,$r=!0}}}return D[G][1]._spread=Bn,fe}function r(D,G){return fe;function fe(Se){s.call(this,D(Se),Se),G&&G.call(this,Se)}}function l(){this.stack.push({type:"fragment",children:[]})}function s(D,G,fe){this.stack[this.stack.length-1].children.push(D),this.stack.push(D),this.tokenStack.push([G,fe||void 0]),D.position={start:ei(G.start),end:void 0}}function o(D){return G;function G(fe){D&&D.call(this,fe),u.call(this,fe)}}function u(D,G){let fe=this.stack.pop(),Se=this.tokenStack.pop();if(Se)Se[0].type!==D.type&&(G?G.call(this,D,Se[0]):(Se[1]||ZS).call(this,D,Se[0]));else throw new Error("Cannot close `"+D.type+"` ("+Ja({start:D.start,end:D.end})+"): it\u2019s not open");fe.position.end=ei(D.end)}function c(){return hp(this.stack.pop())}function p(){this.data.expectingFirstListItemValue=!0}function d(D){if(this.data.expectingFirstListItemValue){let G=this.stack[this.stack.length-2];G.start=Number.parseInt(this.sliceSerialize(D),10),this.data.expectingFirstListItemValue=void 0}}function f(){let D=this.resume(),G=this.stack[this.stack.length-1];G.lang=D}function S(){let D=this.resume(),G=this.stack[this.stack.length-1];G.meta=D}function x(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function k(){let D=this.resume(),G=this.stack[this.stack.length-1];G.value=D.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function m(){let D=this.resume(),G=this.stack[this.stack.length-1];G.value=D.replace(/(\r?\n|\r)$/g,"")}function h(D){let G=this.resume(),fe=this.stack[this.stack.length-1];fe.label=G,fe.identifier=ya(this.sliceSerialize(D)).toLowerCase()}function g(){let D=this.resume(),G=this.stack[this.stack.length-1];G.title=D}function E(){let D=this.resume(),G=this.stack[this.stack.length-1];G.url=D}function T(D){let G=this.stack[this.stack.length-1];if(!G.depth){let fe=this.sliceSerialize(D).length;G.depth=fe}}function N(){this.data.setextHeadingSlurpLineEnding=!0}function A(D){let G=this.stack[this.stack.length-1];G.depth=this.sliceSerialize(D).codePointAt(0)===61?1:2}function C(){this.data.setextHeadingSlurpLineEnding=void 0}function U(D){let fe=this.stack[this.stack.length-1].children,Se=fe[fe.length-1];(!Se||Se.type!=="text")&&(Se=We(),Se.position={start:ei(D.start),end:void 0},fe.push(Se)),this.stack.push(Se)}function P(D){let G=this.stack.pop();G.value+=this.sliceSerialize(D),G.position.end=ei(D.end)}function _(D){let G=this.stack[this.stack.length-1];if(this.data.atHardBreak){let fe=G.children[G.children.length-1];fe.position.end=ei(D.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(G.type)&&(U.call(this,D),P.call(this,D))}function R(){this.data.atHardBreak=!0}function O(){let D=this.resume(),G=this.stack[this.stack.length-1];G.value=D}function I(){let D=this.resume(),G=this.stack[this.stack.length-1];G.value=D}function B(){let D=this.resume(),G=this.stack[this.stack.length-1];G.value=D}function J(){let D=this.stack[this.stack.length-1];if(this.data.inReference){let G=this.data.referenceType||"shortcut";D.type+="Reference",D.referenceType=G,delete D.url,delete D.title}else delete D.identifier,delete D.label;this.data.referenceType=void 0}function ae(){let D=this.stack[this.stack.length-1];if(this.data.inReference){let G=this.data.referenceType||"shortcut";D.type+="Reference",D.referenceType=G,delete D.url,delete D.title}else delete D.identifier,delete D.label;this.data.referenceType=void 0}function we(D){let G=this.sliceSerialize(D),fe=this.stack[this.stack.length-2];fe.label=QS(G),fe.identifier=ya(G).toLowerCase()}function je(){let D=this.stack[this.stack.length-1],G=this.resume(),fe=this.stack[this.stack.length-1];if(this.data.inReference=!0,fe.type==="link"){let Se=D.children;fe.children=Se}else fe.alt=G}function v(){let D=this.resume(),G=this.stack[this.stack.length-1];G.url=D}function Me(){let D=this.resume(),G=this.stack[this.stack.length-1];G.title=D}function pt(){this.data.inReference=void 0}function y(){this.data.referenceType="collapsed"}function Ke(D){let G=this.resume(),fe=this.stack[this.stack.length-1];fe.label=G,fe.identifier=ya(this.sliceSerialize(D)).toLowerCase(),this.data.referenceType="full"}function At(D){this.data.characterReferenceType=D.type}function se(D){let G=this.sliceSerialize(D),fe=this.data.characterReferenceType,Se;fe?(Se=xu(G,fe==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):Se=zr(G);let Ve=this.stack[this.stack.length-1];Ve.value+=Se}function X(D){let G=this.stack.pop();G.position.end=ei(D.end)}function Q(D){P.call(this,D);let G=this.stack[this.stack.length-1];G.url=this.sliceSerialize(D)}function ne(D){P.call(this,D);let G=this.stack[this.stack.length-1];G.url="mailto:"+this.sliceSerialize(D)}function Y(){return{type:"blockquote",children:[]}}function oe(){return{type:"code",lang:null,meta:null,value:""}}function Ue(){return{type:"inlineCode",value:""}}function mt(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function zs(){return{type:"emphasis",children:[]}}function Fr(){return{type:"heading",depth:0,children:[]}}function Zr(){return{type:"break"}}function q(){return{type:"html",value:""}}function j(){return{type:"image",title:null,url:"",alt:null}}function le(){return{type:"link",title:null,url:"",children:[]}}function Be(D){return{type:"list",ordered:D.type==="listOrdered",start:null,spread:D._spread,children:[]}}function Mt(D){return{type:"listItem",spread:D._spread,checked:null,children:[]}}function on(){return{type:"paragraph",children:[]}}function Ct(){return{type:"strong",children:[]}}function We(){return{type:"text",value:""}}function un(){return{type:"thematicBreak"}}}function ei(e){return{line:e.line,column:e.column,offset:e.offset}}function $S(e,t){let n=-1;for(;++n<t.length;){let a=t[n];Array.isArray(a)?$S(e,a):IC(e,a)}}function IC(e,t){let n;for(n in t)if(JS.call(t,n))switch(n){case"canContainEols":{let a=t[n];a&&e[n].push(...a);break}case"transforms":{let a=t[n];a&&e[n].push(...a);break}case"enter":case"exit":{let a=t[n];a&&Object.assign(e[n],a);break}}}function ZS(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+Ja({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+Ja({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+Ja({start:t.start,end:t.end})+") is still open")}var JS,KS=b(()=>{X0();XS();gp();FS();Nu();Su();up();JS={}.hasOwnProperty});var WS=b(()=>{KS()});function Uu(e){let t=this;t.parser=n;function n(a){return qp(a,ut(K(K({},t.data("settings")),e),{extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]}))}}var ex=b(()=>{WS()});var tx=b(()=>{ex()});function nx(e,t){let n={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)}var ax=b(()=>{""});function ix(e,t){let n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
13
- `}]}var rx=b(()=>{""});function lx(e,t){let n=t.value?t.value+`
14
- `:"",a={};t.lang&&(a.className=["language-"+t.lang]);let i={type:"element",tagName:"code",properties:a,children:[{type:"text",value:n}]};return t.meta&&(i.data={meta:t.meta}),e.patch(t,i),i=e.applyData(t,i),i={type:"element",tagName:"pre",properties:{},children:[i]},e.patch(t,i),i}var sx=b(()=>{""});function ox(e,t){let n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}var ux=b(()=>{""});function cx(e,t){let n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}var fx=b(()=>{""});function dx(e,t){let n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",a=String(t.identifier).toUpperCase(),i=zn(a.toLowerCase()),r=e.footnoteOrder.indexOf(a),l,s=e.footnoteCounts.get(a);s===void 0?(s=0,e.footnoteOrder.push(a),l=e.footnoteOrder.length):l=r+1,s+=1,e.footnoteCounts.set(a,s);let o={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+i,id:n+"fnref-"+i+(s>1?"-"+s:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(l)}]};e.patch(t,o);let u={type:"element",tagName:"sup",properties:{},children:[o]};return e.patch(t,u),e.applyData(t,u)}var px=b(()=>{Ci()});function mx(e,t){let n={type:"element",tagName:"h"+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}var hx=b(()=>{""});function gx(e,t){if(e.options.allowDangerousHtml){let n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}var vx=b(()=>{""});function Bu(e,t){let n=t.referenceType,a="]";if(n==="collapsed"?a+="[]":n==="full"&&(a+="["+(t.label||t.identifier)+"]"),t.type==="imageReference")return[{type:"text",value:"!["+t.alt+a}];let i=e.all(t),r=i[0];r&&r.type==="text"?r.value="["+r.value:i.unshift({type:"text",value:"["});let l=i[i.length-1];return l&&l.type==="text"?l.value+=a:i.push({type:"text",value:a}),i}var jp=b(()=>{""});function yx(e,t){let n=String(t.identifier).toUpperCase(),a=e.definitionById.get(n);if(!a)return Bu(e,t);let i={src:zn(a.url||""),alt:t.alt};a.title!==null&&a.title!==void 0&&(i.title=a.title);let r={type:"element",tagName:"img",properties:i,children:[]};return e.patch(t,r),e.applyData(t,r)}var bx=b(()=>{Ci();jp()});function Sx(e,t){let n={src:zn(t.url)};t.alt!==null&&t.alt!==void 0&&(n.alt=t.alt),t.title!==null&&t.title!==void 0&&(n.title=t.title);let a={type:"element",tagName:"img",properties:n,children:[]};return e.patch(t,a),e.applyData(t,a)}var xx=b(()=>{Ci()});function Nx(e,t){let n={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,n);let a={type:"element",tagName:"code",properties:{},children:[n]};return e.patch(t,a),e.applyData(t,a)}var Ex=b(()=>{""});function kx(e,t){let n=String(t.identifier).toUpperCase(),a=e.definitionById.get(n);if(!a)return Bu(e,t);let i={href:zn(a.url||"")};a.title!==null&&a.title!==void 0&&(i.title=a.title);let r={type:"element",tagName:"a",properties:i,children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}var Tx=b(()=>{Ci();jp()});function wx(e,t){let n={href:zn(t.url)};t.title!==null&&t.title!==void 0&&(n.title=t.title);let a={type:"element",tagName:"a",properties:n,children:e.all(t)};return e.patch(t,a),e.applyData(t,a)}var Ax=b(()=>{Ci()});function Cx(e,t,n){let a=e.all(t),i=n?GC(n):Rx(t),r={},l=[];if(typeof t.checked=="boolean"){let c=a[0],p;c&&c.type==="element"&&c.tagName==="p"?p=c:(p={type:"element",tagName:"p",properties:{},children:[]},a.unshift(p)),p.children.length>0&&p.children.unshift({type:"text",value:" "}),p.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),r.className=["task-list-item"]}let s=-1;for(;++s<a.length;){let c=a[s];(i||s!==0||c.type!=="element"||c.tagName!=="p")&&l.push({type:"text",value:`
15
- `}),c.type==="element"&&c.tagName==="p"&&!i?l.push(...c.children):l.push(c)}let o=a[a.length-1];o&&(i||o.type!=="element"||o.tagName!=="p")&&l.push({type:"text",value:`
16
- `});let u={type:"element",tagName:"li",properties:r,children:l};return e.patch(t,u),e.applyData(t,u)}function GC(e){let t=!1;if(e.type==="list"){t=e.spread||!1;let n=e.children,a=-1;for(;!t&&++a<n.length;)t=Rx(n[a])}return t}function Rx(e){let t=e.spread;return t==null?e.children.length>1:t}var _x=b(()=>{""});function Dx(e,t){let n={},a=e.all(t),i=-1;for(typeof t.start=="number"&&t.start!==1&&(n.start=t.start);++i<a.length;){let l=a[i];if(l.type==="element"&&l.tagName==="li"&&l.properties&&Array.isArray(l.properties.className)&&l.properties.className.includes("task-list-item")){n.className=["contains-task-list"];break}}let r={type:"element",tagName:t.ordered?"ol":"ul",properties:n,children:e.wrap(a,!0)};return e.patch(t,r),e.applyData(t,r)}var Ox=b(()=>{""});function Lx(e,t){let n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}var zx=b(()=>{""});function Mx(e,t){let n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}var Ux=b(()=>{""});function Bx(e,t){let n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}var Vx=b(()=>{""});function Hx(e,t){let n=e.all(t),a=n.shift(),i=[];if(a){let l={type:"element",tagName:"thead",properties:{},children:e.wrap([a],!0)};e.patch(t.children[0],l),i.push(l)}if(n.length>0){let l={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},s=Lr(t.children[1]),o=vu(t.children[t.children.length-1]);s&&o&&(l.position={start:s,end:o}),i.push(l)}let r={type:"element",tagName:"table",properties:{},children:e.wrap(i,!0)};return e.patch(t,r),e.applyData(t,r)}var Px=b(()=>{yu()});function qx(e,t,n){let a=n?n.children:void 0,r=(a?a.indexOf(t):1)===0?"th":"td",l=n&&n.type==="table"?n.align:void 0,s=l?l.length:t.children.length,o=-1,u=[];for(;++o<s;){let p=t.children[o],d={},f=l?l[o]:void 0;f&&(d.align=f);let S={type:"element",tagName:r,properties:d,children:[]};p&&(S.children=e.all(p),e.patch(p,S),S=e.applyData(p,S)),u.push(S)}let c={type:"element",tagName:"tr",properties:{},children:e.wrap(u,!0)};return e.patch(t,c),e.applyData(t,c)}var jx=b(()=>{""});function Yx(e,t){let n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}var Ix=b(()=>{""});function Xx(e){let t=String(e),n=/\r?\n|\r/g,a=n.exec(t),i=0,r=[];for(;a;)r.push(Gx(t.slice(i,a.index),i>0,!0),a[0]),i=a.index+a[0].length,a=n.exec(t);return r.push(Gx(t.slice(i),i>0,!1)),r.join("")}function Gx(e,t,n){let a=0,i=e.length;if(t){let r=e.codePointAt(a);for(;r===9||r===32;)a++,r=e.codePointAt(a)}if(n){let r=e.codePointAt(i-1);for(;r===9||r===32;)i--,r=e.codePointAt(i-1)}return i>a?e.slice(a,i):""}var Qx=b(()=>{});function Fx(e,t){let n={type:"text",value:Xx(String(t.value))};return e.patch(t,n),e.applyData(t,n)}var Zx=b(()=>{Qx()});function Jx(e,t){let n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}var $x=b(()=>{""});function Vu(){}var Kx,Wx=b(()=>{ax();rx();sx();ux();fx();px();hx();vx();bx();xx();Ex();Tx();Ax();_x();Ox();zx();Ux();Vx();Px();jx();Ix();Zx();$x();Kx={blockquote:nx,break:ix,code:lx,delete:ox,emphasis:cx,footnoteReference:dx,heading:mx,html:gx,imageReference:yx,image:Sx,inlineCode:Nx,linkReference:kx,link:wx,listItem:Cx,list:Dx,paragraph:Lx,root:Mx,strong:Bx,table:Hx,tableCell:Yx,tableRow:qx,text:Fx,thematicBreak:Jx,toml:Vu,yaml:Vu,definition:Vu,footnoteDefinition:Vu}});var e1,ZC,Gp,r1=b(()=>{e1=typeof self=="object"?self:globalThis,ZC=(e,t)=>{let n=(i,r)=>(e.set(r,i),i),a=i=>{if(e.has(i))return e.get(i);let[r,l]=t[i];switch(r){case 0:case-1:return n(l,i);case 1:{let s=n([],i);for(let o of l)s.push(a(o));return s}case 2:{let s=n({},i);for(let[o,u]of l)s[a(o)]=a(u);return s}case 3:return n(new Date(l),i);case 4:{let{source:s,flags:o}=l;return n(new RegExp(s,o),i)}case 5:{let s=n(new Map,i);for(let[o,u]of l)s.set(a(o),a(u));return s}case 6:{let s=n(new Set,i);for(let o of l)s.add(a(o));return s}case 7:{let{name:s,message:o}=l;return n(new e1[s](o),i)}case 8:return n(BigInt(l),i);case"BigInt":return n(Object(BigInt(l)),i);case"ArrayBuffer":return n(new Uint8Array(l).buffer,l);case"DataView":{let{buffer:s}=new Uint8Array(l);return n(new DataView(s),l)}}return n(new e1[r](l),i)};return a},Gp=e=>ZC(new Map,e)(0)});var Ur,JC,$C,gs,Pu,KC,Xp,l1=b(()=>{Ur="",{toString:JC}={},{keys:$C}=Object,gs=e=>{let t=typeof e;if(t!=="object"||!e)return[0,t];let n=JC.call(e).slice(8,-1);switch(n){case"Array":return[1,Ur];case"Object":return[2,Ur];case"Date":return[3,Ur];case"RegExp":return[4,Ur];case"Map":return[5,Ur];case"Set":return[6,Ur];case"DataView":return[1,n]}return n.includes("Array")?[1,n]:n.includes("Error")?[7,n]:[2,n]},Pu=([e,t])=>e===0&&(t==="function"||t==="symbol"),KC=(e,t,n,a)=>{let i=(l,s)=>{let o=a.push(l)-1;return n.set(s,o),o},r=l=>{if(n.has(l))return n.get(l);let[s,o]=gs(l);switch(s){case 0:{let c=l;switch(o){case"bigint":s=8,c=l.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+o);c=null;break;case"undefined":return i([-1],l)}return i([s,c],l)}case 1:{if(o){let d=l;return o==="DataView"?d=new Uint8Array(l.buffer):o==="ArrayBuffer"&&(d=new Uint8Array(l)),i([o,[...d]],l)}let c=[],p=i([s,c],l);for(let d of l)c.push(r(d));return p}case 2:{if(o)switch(o){case"BigInt":return i([o,l.toString()],l);case"Boolean":case"Number":case"String":return i([o,l.valueOf()],l)}if(t&&"toJSON"in l)return r(l.toJSON());let c=[],p=i([s,c],l);for(let d of $C(l))(e||!Pu(gs(l[d])))&&c.push([r(d),r(l[d])]);return p}case 3:return i([s,l.toISOString()],l);case 4:{let{source:c,flags:p}=l;return i([s,{source:c,flags:p}],l)}case 5:{let c=[],p=i([s,c],l);for(let[d,f]of l)(e||!(Pu(gs(d))||Pu(gs(f))))&&c.push([r(d),r(f)]);return p}case 6:{let c=[],p=i([s,c],l);for(let d of l)(e||!Pu(gs(d)))&&c.push(r(d));return p}}let{message:u}=l;return i([s,{name:o,message:u}],l)};return r},Xp=(e,{json:t,lossy:n}={})=>{let a=[];return KC(!(t||n),!!t,new Map,a)(e),a}});var Br,Qp=b(()=>{r1();l1();Br=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?Gp(Xp(e,t)):structuredClone(e):(e,t)=>Gp(Xp(e,t))});function WC(e,t){let n=[{type:"text",value:"\u21A9"}];return t>1&&n.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(t)}]}),n}function eR(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function s1(e){let t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||WC,a=e.options.footnoteBackLabel||eR,i=e.options.footnoteLabel||"Footnotes",r=e.options.footnoteLabelTagName||"h2",l=e.options.footnoteLabelProperties||{className:["sr-only"]},s=[],o=-1;for(;++o<e.footnoteOrder.length;){let u=e.footnoteById.get(e.footnoteOrder[o]);if(!u)continue;let c=e.all(u),p=String(u.identifier).toUpperCase(),d=zn(p.toLowerCase()),f=0,S=[],x=e.footnoteCounts.get(p);for(;x!==void 0&&++f<=x;){S.length>0&&S.push({type:"text",value:" "});let h=typeof n=="string"?n:n(o,f);typeof h=="string"&&(h={type:"text",value:h}),S.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+d+(f>1?"-"+f:""),dataFootnoteBackref:"",ariaLabel:typeof a=="string"?a:a(o,f),className:["data-footnote-backref"]},children:Array.isArray(h)?h:[h]})}let k=c[c.length-1];if(k&&k.type==="element"&&k.tagName==="p"){let h=k.children[k.children.length-1];h&&h.type==="text"?h.value+=" ":k.children.push({type:"text",value:" "}),k.children.push(...S)}else c.push(...S);let m={type:"element",tagName:"li",properties:{id:t+"fn-"+d},children:e.wrap(c,!0)};e.patch(u,m),s.push(m)}if(s.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:r,properties:ut(K({},Br(l)),{id:"footnote-label"}),children:[{type:"text",value:i}]},{type:"text",value:`
17
- `},{type:"element",tagName:"ol",properties:{},children:e.wrap(s,!0)},{type:"text",value:`
18
- `}]}}var o1=b(()=>{Qp();Ci()});function tR(e){let t=[],n=-1;for(;++n<e.length;)t[n]=qu(e[n]);return ju(a);function a(...i){let r=-1;for(;++r<t.length;)if(t[r].apply(this,i))return!0;return!1}}function nR(e){let t=e;return ju(n);function n(a){let i=a,r;for(r in e)if(i[r]!==t[r])return!1;return!0}}function aR(e){return ju(t);function t(n){return n&&n.type===e}}function ju(e){return t;function t(n,a,i){return!!(rR(n)&&e.call(this,n,typeof a=="number"?a:void 0,i||void 0))}}function iR(){return!0}function rR(e){return e!==null&&typeof e=="object"&&"type"in e}var qu,u1=b(()=>{qu=(function(e){if(e==null)return iR;if(typeof e=="function")return ju(e);if(typeof e=="object")return Array.isArray(e)?tR(e):nR(e);if(typeof e=="string")return aR(e);throw new Error("Expected function, string, or object as test")})});var c1=b(()=>{u1()});function Jp(e,t,n,a){let i;typeof t=="function"&&typeof n!="function"?(a=n,n=t):i=t;let r=qu(i),l=a?-1:1;s(e,void 0,[])();function s(o,u,c){let p=o&&typeof o=="object"?o:{};if(typeof p.type=="string"){let f=typeof p.tagName=="string"?p.tagName:typeof p.name=="string"?p.name:void 0;Object.defineProperty(d,"name",{value:"node ("+(o.type+(f?"<"+f+">":""))+")"})}return d;function d(){let f=f1,S,x,k;if((!t||r(o,u,c[c.length-1]||void 0))&&(f=lR(n(o,c)),f[0]===Yu))return f;if("children"in o&&o.children){let m=o;if(m.children&&f[0]!==Zp)for(x=(a?m.children.length:-1)+l,k=c.concat(m);x>-1&&x<m.children.length;){let h=m.children[x];if(S=s(h,x,k)(),S[0]===Yu)return S;x=typeof S[1]=="number"?S[1]:x+l}}return f}}}function lR(e){return Array.isArray(e)?e:typeof e=="number"?[Fp,e]:e==null?f1:[e]}var f1,Fp,Yu,Zp,d1=b(()=>{c1();f1=[],Fp=!0,Yu=!1,Zp="skip"});var p1=b(()=>{d1()});function vs(e,t,n,a){let i,r,l;typeof t=="function"&&typeof n!="function"?(r=void 0,l=t,i=n):(r=t,l=n,i=a),Jp(e,r,s,i);function s(o,u){let c=u[u.length-1],p=c?c.children.indexOf(o):void 0;return l(o,p,c)}}var m1=b(()=>{p1()});var $p=b(()=>{m1()});function g1(e,t){let n=t||sR,a=new Map,i=new Map,r=new Map,l=K(K({},Kx),n.handlers),s={all:u,applyData:uR,definitionById:a,footnoteById:i,footnoteCounts:r,footnoteOrder:[],handlers:l,one:o,options:n,patch:oR,wrap:fR};return vs(e,function(c){if(c.type==="definition"||c.type==="footnoteDefinition"){let p=c.type==="definition"?a:i,d=String(c.identifier).toUpperCase();p.has(d)||p.set(d,c)}}),s;function o(c,p){let d=c.type,f=s.handlers[d];if(Kp.call(s.handlers,d)&&f)return f(s,c,p);if(s.options.passThrough&&s.options.passThrough.includes(d)){if("children"in c){let x=c,{children:k}=x,m=oh(x,["children"]),h=Br(m);return h.children=s.all(c),h}return Br(c)}return(s.options.unknownHandler||cR)(s,c,p)}function u(c){let p=[];if("children"in c){let d=c.children,f=-1;for(;++f<d.length;){let S=s.one(d[f],c);if(S){if(f&&d[f-1].type==="break"&&(!Array.isArray(S)&&S.type==="text"&&(S.value=h1(S.value)),!Array.isArray(S)&&S.type==="element")){let x=S.children[0];x&&x.type==="text"&&(x.value=h1(x.value))}Array.isArray(S)?p.push(...S):p.push(S)}}}return p}}function oR(e,t){e.position&&(t.position=sp(e))}function uR(e,t){let n=t;if(e&&e.data){let a=e.data.hName,i=e.data.hChildren,r=e.data.hProperties;if(typeof a=="string")if(n.type==="element")n.tagName=a;else{let l="children"in n?n.children:[n];n={type:"element",tagName:a,properties:{},children:l}}n.type==="element"&&r&&Object.assign(n.properties,Br(r)),"children"in n&&n.children&&i!==null&&i!==void 0&&(n.children=i)}return n}function cR(e,t){let n=t.data||{},a="value"in t&&!(Kp.call(n,"hProperties")||Kp.call(n,"hChildren"))?{type:"text",value:t.value}:{type:"element",tagName:"div",properties:{},children:e.all(t)};return e.patch(t,a),e.applyData(t,a)}function fR(e,t){let n=[],a=-1;for(t&&n.push({type:"text",value:`
8
+ `+n.stack}}function An(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function wv(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function Sk(e){var t=wv(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),a=""+e[t];if(!e.hasOwnProperty(t)&&typeof n!="undefined"&&typeof n.get=="function"&&typeof n.set=="function"){var r=n.get,i=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return r.call(this)},set:function(s){a=""+s,i.call(this,s)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return a},setValue:function(s){a=""+s},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function wo(e){e._valueTracker||(e._valueTracker=Sk(e))}function Av(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),a="";return e&&(a=wv(e)?e.checked?"true":"false":e.value),e=a,e!==n?(t.setValue(e),!0):!1}function Ao(e){if(e=e||(typeof document!="undefined"?document:void 0),typeof e=="undefined")return null;try{return e.activeElement||e.body}catch(t){return e.body}}var Nk=/[\n"\\]/g;function _n(e){return e.replace(Nk,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function pd(e,t,n,a,r,i,s,l){e.name="",s!=null&&typeof s!="function"&&typeof s!="symbol"&&typeof s!="boolean"?e.type=s:e.removeAttribute("type"),t!=null?s==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+An(t)):e.value!==""+An(t)&&(e.value=""+An(t)):s!=="submit"&&s!=="reset"||e.removeAttribute("value"),t!=null?md(e,s,An(t)):n!=null?md(e,s,An(n)):a!=null&&e.removeAttribute("value"),r==null&&i!=null&&(e.defaultChecked=!!i),r!=null&&(e.checked=r&&typeof r!="function"&&typeof r!="symbol"),l!=null&&typeof l!="function"&&typeof l!="symbol"&&typeof l!="boolean"?e.name=""+An(l):e.removeAttribute("name")}function Cv(e,t,n,a,r,i,s,l){if(i!=null&&typeof i!="function"&&typeof i!="symbol"&&typeof i!="boolean"&&(e.type=i),t!=null||n!=null){if(!(i!=="submit"&&i!=="reset"||t!=null))return;n=n!=null?""+An(n):"",t=t!=null?""+An(t):n,l||t===e.value||(e.value=t),e.defaultValue=t}a=a!=null?a:r,a=typeof a!="function"&&typeof a!="symbol"&&!!a,e.checked=l?e.checked:!!a,e.defaultChecked=!!a,s!=null&&typeof s!="function"&&typeof s!="symbol"&&typeof s!="boolean"&&(e.name=s)}function md(e,t,n){t==="number"&&Ao(e.ownerDocument)===e||e.defaultValue===""+n||(e.defaultValue=""+n)}function di(e,t,n,a){if(e=e.options,t){t={};for(var r=0;r<n.length;r++)t["$"+n[r]]=!0;for(n=0;n<e.length;n++)r=t.hasOwnProperty("$"+e[n].value),e[n].selected!==r&&(e[n].selected=r),r&&a&&(e[n].defaultSelected=!0)}else{for(n=""+An(n),t=null,r=0;r<e.length;r++){if(e[r].value===n){e[r].selected=!0,a&&(e[r].defaultSelected=!0);return}t!==null||e[r].disabled||(t=e[r])}t!==null&&(t.selected=!0)}}function Rv(e,t,n){if(t!=null&&(t=""+An(t),t!==e.value&&(e.value=t),n==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=n!=null?""+An(n):""}function _v(e,t,n,a){if(t==null){if(a!=null){if(n!=null)throw Error(M(92));if(ps(a)){if(1<a.length)throw Error(M(93));a=a[0]}n=a}n==null&&(n=""),t=n}n=An(t),e.defaultValue=n,a=e.textContent,a===n&&a!==""&&a!==null&&(e.value=a)}function xi(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Ek=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 $h(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||Ek.has(t)?t==="float"?e.cssFloat=n:e[t]=(""+n).trim():e[t]=n+"px"}function Dv(e,t,n){if(t!=null&&typeof t!="object")throw Error(M(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 r in t)a=t[r],t.hasOwnProperty(r)&&n[r]!==a&&$h(e,r,a)}else for(var i in t)t.hasOwnProperty(i)&&$h(e,i,t[i])}function sf(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 kk=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"]]),Tk=/^[\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 co(e){return Tk.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}var hd=null;function lf(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var ti=null,fi=null;function Jh(e){var t=_i(e);if(t&&(e=t.stateNode)){var n=e[rn]||null;e:switch(e=t.stateNode,t.type){case"input":if(pd(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="'+_n(""+t)+'"][type="radio"]'),t=0;t<n.length;t++){var a=n[t];if(a!==e&&a.form===e.form){var r=a[rn]||null;if(!r)throw Error(M(90));pd(a,r.value,r.defaultValue,r.defaultValue,r.checked,r.defaultChecked,r.type,r.name)}}for(t=0;t<n.length;t++)a=n[t],a.form===e.form&&Av(a)}break e;case"textarea":Rv(e,n.value,n.defaultValue);break e;case"select":t=n.value,t!=null&&di(e,!!n.multiple,t,!1)}}}var Ou=!1;function Ov(e,t,n){if(Ou)return e(t,n);Ou=!0;try{var a=e(t);return a}finally{if(Ou=!1,(ti!==null||fi!==null)&&(oc(),ti&&(t=ti,e=fi,fi=ti=null,Jh(t),e)))for(t=0;t<e.length;t++)Jh(e[t])}}function Ds(e,t){var n=e.stateNode;if(n===null)return null;var a=n[rn]||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(M(231,t,typeof n));return n}var ma=!(typeof window=="undefined"||typeof window.document=="undefined"||typeof window.document.createElement=="undefined"),gd=!1;if(ma)try{Xr={},Object.defineProperty(Xr,"passive",{get:function(){gd=!0}}),window.addEventListener("test",Xr,Xr),window.removeEventListener("test",Xr,Xr)}catch(e){gd=!1}var Xr,Ma=null,of=null,uo=null;function Lv(){if(uo)return uo;var e,t=of,n=t.length,a,r="value"in Ma?Ma.value:Ma.textContent,i=r.length;for(e=0;e<n&&t[e]===r[e];e++);var s=n-e;for(a=1;a<=s&&t[n-a]===r[i-a];a++);return uo=r.slice(e,1<a?1-a:void 0)}function fo(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 Zl(){return!0}function Kh(){return!1}function sn(e){function t(n,a,r,i,s){this._reactName=n,this._targetInst=r,this.type=a,this.nativeEvent=i,this.target=s,this.currentTarget=null;for(var l in e)e.hasOwnProperty(l)&&(n=e[l],this[l]=n?n(i):i[l]);return this.isDefaultPrevented=(i.defaultPrevented!=null?i.defaultPrevented:i.returnValue===!1)?Zl:Kh,this.isPropagationStopped=Kh,this}return Qe(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=Zl)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=Zl)},persist:function(){},isPersistent:Zl}),t}var Er={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Wo=sn(Er),Zs=Qe({},Er,{view:0,detail:0}),wk=sn(Zs),Lu,zu,is,ec=Qe({},Zs,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:cf,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!==is&&(is&&e.type==="mousemove"?(Lu=e.screenX-is.screenX,zu=e.screenY-is.screenY):zu=Lu=0,is=e),Lu)},movementY:function(e){return"movementY"in e?e.movementY:zu}}),Wh=sn(ec),Ak=Qe({},ec,{dataTransfer:0}),Ck=sn(Ak),Rk=Qe({},Zs,{relatedTarget:0}),Mu=sn(Rk),_k=Qe({},Er,{animationName:0,elapsedTime:0,pseudoElement:0}),Dk=sn(_k),Ok=Qe({},Er,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),Lk=sn(Ok),zk=Qe({},Er,{data:0}),eg=sn(zk),Mk={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Uk={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"},Pk={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Bk(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Pk[e])?!!t[e]:!1}function cf(){return Bk}var Vk=Qe({},Zs,{key:function(e){if(e.key){var t=Mk[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=fo(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?Uk[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:cf,charCode:function(e){return e.type==="keypress"?fo(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?fo(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),Hk=sn(Vk),qk=Qe({},ec,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),tg=sn(qk),jk=Qe({},Zs,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:cf}),Ik=sn(jk),Yk=Qe({},Er,{propertyName:0,elapsedTime:0,pseudoElement:0}),Gk=sn(Yk),Xk=Qe({},ec,{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}),Qk=sn(Xk),Fk=Qe({},Er,{newState:0,oldState:0}),Zk=sn(Fk),$k=[9,13,27,32],uf=ma&&"CompositionEvent"in window,gs=null;ma&&"documentMode"in document&&(gs=document.documentMode);var Jk=ma&&"TextEvent"in window&&!gs,zv=ma&&(!uf||gs&&8<gs&&11>=gs),ng=" ",ag=!1;function Mv(e,t){switch(e){case"keyup":return $k.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Uv(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var ni=!1;function Kk(e,t){switch(e){case"compositionend":return Uv(t);case"keypress":return t.which!==32?null:(ag=!0,ng);case"textInput":return e=t.data,e===ng&&ag?null:e;default:return null}}function Wk(e,t){if(ni)return e==="compositionend"||!uf&&Mv(e,t)?(e=Lv(),uo=of=Ma=null,ni=!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 zv&&t.locale!=="ko"?null:t.data;default:return null}}var eT={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 rg(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!eT[e.type]:t==="textarea"}function Pv(e,t,n,a){ti?fi?fi.push(a):fi=[a]:ti=a,t=Go(t,"onChange"),0<t.length&&(n=new Wo("onChange","change",null,n,a),e.push({event:n,listeners:t}))}var vs=null,Os=null;function tT(e){Rb(e,0)}function tc(e){var t=ms(e);if(Av(t))return e}function ig(e,t){if(e==="change")return t}var Bv=!1;ma&&(ma?(Jl="oninput"in document,Jl||(Uu=document.createElement("div"),Uu.setAttribute("oninput","return;"),Jl=typeof Uu.oninput=="function"),$l=Jl):$l=!1,Bv=$l&&(!document.documentMode||9<document.documentMode));var $l,Jl,Uu;function sg(){vs&&(vs.detachEvent("onpropertychange",Vv),Os=vs=null)}function Vv(e){if(e.propertyName==="value"&&tc(Os)){var t=[];Pv(t,Os,e,lf(e)),Ov(tT,t)}}function nT(e,t,n){e==="focusin"?(sg(),vs=t,Os=n,vs.attachEvent("onpropertychange",Vv)):e==="focusout"&&sg()}function aT(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return tc(Os)}function rT(e,t){if(e==="click")return tc(t)}function iT(e,t){if(e==="input"||e==="change")return tc(t)}function sT(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Sn=typeof Object.is=="function"?Object.is:sT;function Ls(e,t){if(Sn(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 r=n[a];if(!dd.call(t,r)||!Sn(e[r],t[r]))return!1}return!0}function lg(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function og(e,t){var n=lg(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=lg(n)}}function Hv(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Hv(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function qv(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=Ao(e.document);t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch(a){n=!1}if(n)e=t.contentWindow;else break;t=Ao(e.document)}return t}function df(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 lT=ma&&"documentMode"in document&&11>=document.documentMode,ai=null,vd=null,ys=null,yd=!1;function cg(e,t,n){var a=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;yd||ai==null||ai!==Ao(a)||(a=ai,"selectionStart"in a&&df(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}),ys&&Ls(ys,a)||(ys=a,a=Go(vd,"onSelect"),0<a.length&&(t=new Wo("onSelect","select",null,t,n),e.push({event:t,listeners:a}),t.target=ai)))}function lr(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var ri={animationend:lr("Animation","AnimationEnd"),animationiteration:lr("Animation","AnimationIteration"),animationstart:lr("Animation","AnimationStart"),transitionrun:lr("Transition","TransitionRun"),transitionstart:lr("Transition","TransitionStart"),transitioncancel:lr("Transition","TransitionCancel"),transitionend:lr("Transition","TransitionEnd")},Pu={},jv={};ma&&(jv=document.createElement("div").style,"AnimationEvent"in window||(delete ri.animationend.animation,delete ri.animationiteration.animation,delete ri.animationstart.animation),"TransitionEvent"in window||delete ri.transitionend.transition);function kr(e){if(Pu[e])return Pu[e];if(!ri[e])return e;var t=ri[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in jv)return Pu[e]=t[n];return e}var Iv=kr("animationend"),Yv=kr("animationiteration"),Gv=kr("animationstart"),oT=kr("transitionrun"),cT=kr("transitionstart"),uT=kr("transitioncancel"),Xv=kr("transitionend"),Qv=new Map,bd="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(" ");bd.push("scrollEnd");function jn(e,t){Qv.set(e,t),Nr(t,[e])}var ug=new WeakMap;function Dn(e,t){if(typeof e=="object"&&e!==null){var n=ug.get(e);return n!==void 0?n:(t={value:e,source:t,stack:Zh(t)},ug.set(e,t),t)}return{value:e,source:t,stack:Zh(t)}}var wn=[],ii=0,ff=0;function nc(){for(var e=ii,t=ff=ii=0;t<e;){var n=wn[t];wn[t++]=null;var a=wn[t];wn[t++]=null;var r=wn[t];wn[t++]=null;var i=wn[t];if(wn[t++]=null,a!==null&&r!==null){var s=a.pending;s===null?r.next=r:(r.next=s.next,s.next=r),a.pending=r}i!==0&&Fv(n,r,i)}}function ac(e,t,n,a){wn[ii++]=e,wn[ii++]=t,wn[ii++]=n,wn[ii++]=a,ff|=a,e.lanes|=a,e=e.alternate,e!==null&&(e.lanes|=a)}function pf(e,t,n,a){return ac(e,t,n,a),Co(e)}function Di(e,t){return ac(e,null,null,t),Co(e)}function Fv(e,t,n){e.lanes|=n;var a=e.alternate;a!==null&&(a.lanes|=n);for(var r=!1,i=e.return;i!==null;)i.childLanes|=n,a=i.alternate,a!==null&&(a.childLanes|=n),i.tag===22&&(e=i.stateNode,e===null||e._visibility&1||(r=!0)),e=i,i=i.return;return e.tag===3?(i=e.stateNode,r&&t!==null&&(r=31-yn(n),e=i.hiddenUpdates,a=e[r],a===null?e[r]=[t]:a.push(t),t.lane=n|536870912),i):null}function Co(e){if(50<Cs)throw Cs=0,Hd=null,Error(M(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var si={};function dT(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 gn(e,t,n,a){return new dT(e,t,n,a)}function mf(e){return e=e.prototype,!(!e||!e.isReactComponent)}function fa(e,t){var n=e.alternate;return n===null?(n=gn(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 Zv(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 po(e,t,n,a,r,i){var s=0;if(a=e,typeof e=="function")mf(e)&&(s=1);else if(typeof e=="string")s=dw(e,n,Zn.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case ld:return e=gn(31,n,t,r),e.elementType=ld,e.lanes=i,e;case Kr:return fr(n.children,r,i,t);case mv:s=8,r|=24;break;case rd:return e=gn(12,n,t,r|2),e.elementType=rd,e.lanes=i,e;case id:return e=gn(13,n,t,r),e.elementType=id,e.lanes=i,e;case sd:return e=gn(19,n,t,r),e.elementType=sd,e.lanes=i,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case tk:case la:s=10;break e;case hv:s=9;break e;case Wd:s=11;break e;case ef:s=14;break e;case Ca:s=16,a=null;break e}s=29,n=Error(M(130,e===null?"null":typeof e,"")),a=null}return t=gn(s,n,t,r),t.elementType=e,t.type=a,t.lanes=i,t}function fr(e,t,n,a){return e=gn(7,e,a,t),e.lanes=n,e}function Bu(e,t,n){return e=gn(6,e,null,t),e.lanes=n,e}function Vu(e,t,n){return t=gn(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var li=[],oi=0,Ro=null,_o=0,Cn=[],Rn=0,pr=null,oa=1,ca="";function cr(e,t){li[oi++]=_o,li[oi++]=Ro,Ro=e,_o=t}function $v(e,t,n){Cn[Rn++]=oa,Cn[Rn++]=ca,Cn[Rn++]=pr,pr=e;var a=oa;e=ca;var r=32-yn(a)-1;a&=~(1<<r),n+=1;var i=32-yn(t)+r;if(30<i){var s=r-r%5;i=(a&(1<<s)-1).toString(32),a>>=s,r-=s,oa=1<<32-yn(t)+r|n<<r|a,ca=i+e}else oa=1<<i|n<<r|a,ca=e}function hf(e){e.return!==null&&(cr(e,1),$v(e,1,0))}function gf(e){for(;e===Ro;)Ro=li[--oi],li[oi]=null,_o=li[--oi],li[oi]=null;for(;e===pr;)pr=Cn[--Rn],Cn[Rn]=null,ca=Cn[--Rn],Cn[Rn]=null,oa=Cn[--Rn],Cn[Rn]=null}var Qt=null,nt=null,Ae=!1,mr=null,Qn=!1,xd=Error(M(519));function yr(e){var t=Error(M(418,""));throw zs(Dn(t,e)),xd}function dg(e){var t=e.stateNode,n=e.type,a=e.memoizedProps;switch(t[Ht]=e,t[rn]=a,n){case"dialog":xe("cancel",t),xe("close",t);break;case"iframe":case"object":case"embed":xe("load",t);break;case"video":case"audio":for(n=0;n<Ps.length;n++)xe(Ps[n],t);break;case"source":xe("error",t);break;case"img":case"image":case"link":xe("error",t),xe("load",t);break;case"details":xe("toggle",t);break;case"input":xe("invalid",t),Cv(t,a.value,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name,!0),wo(t);break;case"select":xe("invalid",t);break;case"textarea":xe("invalid",t),_v(t,a.value,a.defaultValue,a.children),wo(t)}n=a.children,typeof n!="string"&&typeof n!="number"&&typeof n!="bigint"||t.textContent===""+n||a.suppressHydrationWarning===!0||Db(t.textContent,n)?(a.popover!=null&&(xe("beforetoggle",t),xe("toggle",t)),a.onScroll!=null&&xe("scroll",t),a.onScrollEnd!=null&&xe("scrollend",t),a.onClick!=null&&(t.onclick=dc),t=!0):t=!1,t||yr(e)}function fg(e){for(Qt=e.return;Qt;)switch(Qt.tag){case 5:case 13:Qn=!1;return;case 27:case 3:Qn=!0;return;default:Qt=Qt.return}}function ss(e){if(e!==Qt)return!1;if(!Ae)return fg(e),Ae=!0,!1;var t=e.tag,n;if((n=t!==3&&t!==27)&&((n=t===5)&&(n=e.type,n=!(n!=="form"&&n!=="button")||Xd(e.type,e.memoizedProps)),n=!n),n&&nt&&yr(e),fg(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(M(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8)if(n=e.data,n==="/$"){if(t===0){nt=qn(e.nextSibling);break e}t--}else n!=="$"&&n!=="$!"&&n!=="$?"||t++;e=e.nextSibling}nt=null}}else t===27?(t=nt,$a(e.type)?(e=Zd,Zd=null,nt=e):nt=t):nt=Qt?qn(e.stateNode.nextSibling):null;return!0}function $s(){nt=Qt=null,Ae=!1}function pg(){var e=mr;return e!==null&&(an===null?an=e:an.push.apply(an,e),mr=null),e}function zs(e){mr===null?mr=[e]:mr.push(e)}var Sd=Kn(null),Tr=null,ua=null;function _a(e,t,n){We(Sd,t._currentValue),t._currentValue=n}function pa(e){e._currentValue=Sd.current,kt(Sd)}function Nd(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 Ed(e,t,n,a){var r=e.child;for(r!==null&&(r.return=e);r!==null;){var i=r.dependencies;if(i!==null){var s=r.child;i=i.firstContext;e:for(;i!==null;){var l=i;i=r;for(var o=0;o<t.length;o++)if(l.context===t[o]){i.lanes|=n,l=i.alternate,l!==null&&(l.lanes|=n),Nd(i.return,n,e),a||(s=null);break e}i=l.next}}else if(r.tag===18){if(s=r.return,s===null)throw Error(M(341));s.lanes|=n,i=s.alternate,i!==null&&(i.lanes|=n),Nd(s,n,e),s=null}else s=r.child;if(s!==null)s.return=r;else for(s=r;s!==null;){if(s===e){s=null;break}if(r=s.sibling,r!==null){r.return=s.return,s=r;break}s=s.return}r=s}}function Js(e,t,n,a){e=null;for(var r=t,i=!1;r!==null;){if(!i){if((r.flags&524288)!==0)i=!0;else if((r.flags&262144)!==0)break}if(r.tag===10){var s=r.alternate;if(s===null)throw Error(M(387));if(s=s.memoizedProps,s!==null){var l=r.type;Sn(r.pendingProps.value,s.value)||(e!==null?e.push(l):e=[l])}}else if(r===No.current){if(s=r.alternate,s===null)throw Error(M(387));s.memoizedState.memoizedState!==r.memoizedState.memoizedState&&(e!==null?e.push(Hs):e=[Hs])}r=r.return}e!==null&&Ed(t,e,n,a),t.flags|=262144}function Do(e){for(e=e.firstContext;e!==null;){if(!Sn(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function br(e){Tr=e,ua=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function qt(e){return Jv(Tr,e)}function Kl(e,t){return Tr===null&&br(e),Jv(e,t)}function Jv(e,t){var n=t._currentValue;if(t={context:t,memoizedValue:n,next:null},ua===null){if(e===null)throw Error(M(308));ua=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else ua=ua.next=t;return n}var fT=typeof AbortController!="undefined"?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()})}},pT=xt.unstable_scheduleCallback,mT=xt.unstable_NormalPriority,yt={$$typeof:la,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function vf(){return{controller:new fT,data:new Map,refCount:0}}function Ks(e){e.refCount--,e.refCount===0&&pT(mT,function(){e.controller.abort()})}var bs=null,kd=0,Si=0,pi=null;function hT(e,t){if(bs===null){var n=bs=[];kd=0,Si=Hf(),pi={status:"pending",value:void 0,then:function(a){n.push(a)}}}return kd++,t.then(mg,mg),t}function mg(){if(--kd===0&&bs!==null){pi!==null&&(pi.status="fulfilled");var e=bs;bs=null,Si=0,pi=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function gT(e,t){var n=[],a={status:"pending",value:null,reason:null,then:function(r){n.push(r)}};return e.then(function(){a.status="fulfilled",a.value=t;for(var r=0;r<n.length;r++)(0,n[r])(t)},function(r){for(a.status="rejected",a.reason=r,r=0;r<n.length;r++)(0,n[r])(void 0)}),a}var hg=ue.S;ue.S=function(e,t){typeof t=="object"&&t!==null&&typeof t.then=="function"&&hT(e,t),hg!==null&&hg(e,t)};var hr=Kn(null);function yf(){var e=hr.current;return e!==null?e:Ye.pooledCache}function mo(e,t){t===null?We(hr,hr.current):We(hr,t.pool)}function Kv(){var e=yf();return e===null?null:{parent:yt._currentValue,pool:e}}var Ws=Error(M(460)),Wv=Error(M(474)),rc=Error(M(542)),Td={then:function(){}};function gg(e){return e=e.status,e==="fulfilled"||e==="rejected"}function Wl(){}function ey(e,t,n){switch(n=e[n],n===void 0?e.push(t):n!==t&&(t.then(Wl,Wl),t=n),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,yg(e),e;default:if(typeof t.status=="string")t.then(Wl,Wl);else{if(e=Ye,e!==null&&100<e.shellSuspendCounter)throw Error(M(482));e=t,e.status="pending",e.then(function(a){if(t.status==="pending"){var r=t;r.status="fulfilled",r.value=a}},function(a){if(t.status==="pending"){var r=t;r.status="rejected",r.reason=a}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,yg(e),e}throw xs=t,Ws}}var xs=null;function vg(){if(xs===null)throw Error(M(459));var e=xs;return xs=null,e}function yg(e){if(e===Ws||e===rc)throw Error(M(483))}var Ra=!1;function bf(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function wd(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 Va(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Ha(e,t,n){var a=e.updateQueue;if(a===null)return null;if(a=a.shared,(Oe&2)!==0){var r=a.pending;return r===null?t.next=t:(t.next=r.next,r.next=t),a.pending=t,t=Co(e),Fv(e,null,n),t}return ac(e,a,t,n),Co(e)}function Ss(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,Nv(e,n)}}function Hu(e,t){var n=e.updateQueue,a=e.alternate;if(a!==null&&(a=a.updateQueue,n===a)){var r=null,i=null;if(n=n.firstBaseUpdate,n!==null){do{var s={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};i===null?r=i=s:i=i.next=s,n=n.next}while(n!==null);i===null?r=i=t:i=i.next=t}else r=i=t;n={baseState:a.baseState,firstBaseUpdate:r,lastBaseUpdate:i,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 Ad=!1;function Ns(){if(Ad){var e=pi;if(e!==null)throw e}}function Es(e,t,n,a){Ad=!1;var r=e.updateQueue;Ra=!1;var i=r.firstBaseUpdate,s=r.lastBaseUpdate,l=r.shared.pending;if(l!==null){r.shared.pending=null;var o=l,c=o.next;o.next=null,s===null?i=c:s.next=c,s=o;var u=e.alternate;u!==null&&(u=u.updateQueue,l=u.lastBaseUpdate,l!==s&&(l===null?u.firstBaseUpdate=c:l.next=c,u.lastBaseUpdate=o))}if(i!==null){var p=r.baseState;s=0,u=c=o=null,l=i;do{var f=l.lane&-536870913,d=f!==l.lane;if(d?(ke&f)===f:(a&f)===f){f!==0&&f===Si&&(Ad=!0),u!==null&&(u=u.next={lane:0,tag:l.tag,payload:l.payload,callback:null,next:null});e:{var x=e,y=l;f=t;var k=n;switch(y.tag){case 1:if(x=y.payload,typeof x=="function"){p=x.call(k,p,f);break e}p=x;break e;case 3:x.flags=x.flags&-65537|128;case 0:if(x=y.payload,f=typeof x=="function"?x.call(k,p,f):x,f==null)break e;p=Qe({},p,f);break e;case 2:Ra=!0}}f=l.callback,f!==null&&(e.flags|=64,d&&(e.flags|=8192),d=r.callbacks,d===null?r.callbacks=[f]:d.push(f))}else d={lane:f,tag:l.tag,payload:l.payload,callback:l.callback,next:null},u===null?(c=u=d,o=p):u=u.next=d,s|=f;if(l=l.next,l===null){if(l=r.shared.pending,l===null)break;d=l,l=d.next,d.next=null,r.lastBaseUpdate=d,r.shared.pending=null}}while(!0);u===null&&(o=p),r.baseState=o,r.firstBaseUpdate=c,r.lastBaseUpdate=u,i===null&&(r.shared.lanes=0),Fa|=s,e.lanes=s,e.memoizedState=p}}function ty(e,t){if(typeof e!="function")throw Error(M(191,e));e.call(t)}function ny(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;e<n.length;e++)ty(n[e],t)}var Ni=Kn(null),Oo=Kn(0);function bg(e,t){e=va,We(Oo,e),We(Ni,t),va=e|t.baseLanes}function Cd(){We(Oo,va),We(Ni,Ni.current)}function xf(){va=Oo.current,kt(Ni),kt(Oo)}var Xa=0,ye=null,Be=null,pt=null,Lo=!1,mi=!1,xr=!1,zo=0,Ms=0,hi=null,vT=0;function ot(){throw Error(M(321))}function Sf(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!Sn(e[n],t[n]))return!1;return!0}function Nf(e,t,n,a,r,i){return Xa=i,ye=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,ue.H=e===null||e.memoizedState===null?Ly:zy,xr=!1,i=n(a,r),xr=!1,mi&&(i=ry(t,n,a,r)),ay(e),i}function ay(e){ue.H=Mo;var t=Be!==null&&Be.next!==null;if(Xa=0,pt=Be=ye=null,Lo=!1,Ms=0,hi=null,t)throw Error(M(300));e===null||Et||(e=e.dependencies,e!==null&&Do(e)&&(Et=!0))}function ry(e,t,n,a){ye=e;var r=0;do{if(mi&&(hi=null),Ms=0,mi=!1,25<=r)throw Error(M(301));if(r+=1,pt=Be=null,e.updateQueue!=null){var i=e.updateQueue;i.lastEffect=null,i.events=null,i.stores=null,i.memoCache!=null&&(i.memoCache.index=0)}ue.H=kT,i=t(n,a)}while(mi);return i}function yT(){var e=ue.H,t=e.useState()[0];return t=typeof t.then=="function"?el(t):t,e=e.useState()[0],(Be!==null?Be.memoizedState:null)!==e&&(ye.flags|=1024),t}function Ef(){var e=zo!==0;return zo=0,e}function kf(e,t,n){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n}function Tf(e){if(Lo){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}Lo=!1}Xa=0,pt=Be=ye=null,mi=!1,Ms=zo=0,hi=null}function tn(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return pt===null?ye.memoizedState=pt=e:pt=pt.next=e,pt}function mt(){if(Be===null){var e=ye.alternate;e=e!==null?e.memoizedState:null}else e=Be.next;var t=pt===null?ye.memoizedState:pt.next;if(t!==null)pt=t,Be=e;else{if(e===null)throw ye.alternate===null?Error(M(467)):Error(M(310));Be=e,e={memoizedState:Be.memoizedState,baseState:Be.baseState,baseQueue:Be.baseQueue,queue:Be.queue,next:null},pt===null?ye.memoizedState=pt=e:pt=pt.next=e}return pt}function wf(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function el(e){var t=Ms;return Ms+=1,hi===null&&(hi=[]),e=ey(hi,e,t),t=ye,(pt===null?t.memoizedState:pt.next)===null&&(t=t.alternate,ue.H=t===null||t.memoizedState===null?Ly:zy),e}function ic(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return el(e);if(e.$$typeof===la)return qt(e)}throw Error(M(438,String(e)))}function Af(e){var t=null,n=ye.updateQueue;if(n!==null&&(t=n.memoCache),t==null){var a=ye.alternate;a!==null&&(a=a.updateQueue,a!==null&&(a=a.memoCache,a!=null&&(t={data:a.data.map(function(r){return r.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),n===null&&(n=wf(),ye.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]=nk;return t.index++,n}function ha(e,t){return typeof t=="function"?t(e):t}function ho(e){var t=mt();return Cf(t,Be,e)}function Cf(e,t,n){var a=e.queue;if(a===null)throw Error(M(311));a.lastRenderedReducer=n;var r=e.baseQueue,i=a.pending;if(i!==null){if(r!==null){var s=r.next;r.next=i.next,i.next=s}t.baseQueue=r=i,a.pending=null}if(i=e.baseState,r===null)e.memoizedState=i;else{t=r.next;var l=s=null,o=null,c=t,u=!1;do{var p=c.lane&-536870913;if(p!==c.lane?(ke&p)===p:(Xa&p)===p){var f=c.revertLane;if(f===0)o!==null&&(o=o.next={lane:0,revertLane:0,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null}),p===Si&&(u=!0);else if((Xa&f)===f){c=c.next,f===Si&&(u=!0);continue}else p={lane:0,revertLane:c.revertLane,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null},o===null?(l=o=p,s=i):o=o.next=p,ye.lanes|=f,Fa|=f;p=c.action,xr&&n(i,p),i=c.hasEagerState?c.eagerState:n(i,p)}else f={lane:p,revertLane:c.revertLane,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null},o===null?(l=o=f,s=i):o=o.next=f,ye.lanes|=p,Fa|=p;c=c.next}while(c!==null&&c!==t);if(o===null?s=i:o.next=l,!Sn(i,e.memoizedState)&&(Et=!0,u&&(n=pi,n!==null)))throw n;e.memoizedState=i,e.baseState=s,e.baseQueue=o,a.lastRenderedState=i}return r===null&&(a.lanes=0),[e.memoizedState,a.dispatch]}function qu(e){var t=mt(),n=t.queue;if(n===null)throw Error(M(311));n.lastRenderedReducer=e;var a=n.dispatch,r=n.pending,i=t.memoizedState;if(r!==null){n.pending=null;var s=r=r.next;do i=e(i,s.action),s=s.next;while(s!==r);Sn(i,t.memoizedState)||(Et=!0),t.memoizedState=i,t.baseQueue===null&&(t.baseState=i),n.lastRenderedState=i}return[i,a]}function iy(e,t,n){var a=ye,r=mt(),i=Ae;if(i){if(n===void 0)throw Error(M(407));n=n()}else n=t();var s=!Sn((Be||r).memoizedState,n);s&&(r.memoizedState=n,Et=!0),r=r.queue;var l=oy.bind(null,a,r,e);if(tl(2048,8,l,[e]),r.getSnapshot!==t||s||pt!==null&&pt.memoizedState.tag&1){if(a.flags|=2048,Ei(9,sc(),ly.bind(null,a,r,n,t),null),Ye===null)throw Error(M(349));i||(Xa&124)!==0||sy(a,t,n)}return n}function sy(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=ye.updateQueue,t===null?(t=wf(),ye.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function ly(e,t,n,a){t.value=n,t.getSnapshot=a,cy(t)&&uy(e)}function oy(e,t,n){return n(function(){cy(t)&&uy(e)})}function cy(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Sn(e,n)}catch(a){return!0}}function uy(e){var t=Di(e,2);t!==null&&xn(t,e,2)}function Rd(e){var t=tn();if(typeof e=="function"){var n=e;if(e=n(),xr){za(!0);try{n()}finally{za(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:ha,lastRenderedState:e},t}function dy(e,t,n,a){return e.baseState=n,Cf(e,Be,typeof a=="function"?a:ha)}function bT(e,t,n,a,r){if(lc(e))throw Error(M(485));if(e=t.action,e!==null){var i={payload:r,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(s){i.listeners.push(s)}};ue.T!==null?n(!0):i.isTransition=!1,a(i),n=t.pending,n===null?(i.next=t.pending=i,fy(t,i)):(i.next=n.next,t.pending=n.next=i)}}function fy(e,t){var n=t.action,a=t.payload,r=e.state;if(t.isTransition){var i=ue.T,s={};ue.T=s;try{var l=n(r,a),o=ue.S;o!==null&&o(s,l),xg(e,t,l)}catch(c){_d(e,t,c)}finally{ue.T=i}}else try{i=n(r,a),xg(e,t,i)}catch(c){_d(e,t,c)}}function xg(e,t,n){n!==null&&typeof n=="object"&&typeof n.then=="function"?n.then(function(a){Sg(e,t,a)},function(a){return _d(e,t,a)}):Sg(e,t,n)}function Sg(e,t,n){t.status="fulfilled",t.value=n,py(t),e.state=n,t=e.pending,t!==null&&(n=t.next,n===t?e.pending=null:(n=n.next,t.next=n,fy(e,n)))}function _d(e,t,n){var a=e.pending;if(e.pending=null,a!==null){a=a.next;do t.status="rejected",t.reason=n,py(t),t=t.next;while(t!==a)}e.action=null}function py(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function my(e,t){return t}function Ng(e,t){if(Ae){var n=Ye.formState;if(n!==null){e:{var a=ye;if(Ae){if(nt){t:{for(var r=nt,i=Qn;r.nodeType!==8;){if(!i){r=null;break t}if(r=qn(r.nextSibling),r===null){r=null;break t}}i=r.data,r=i==="F!"||i==="F"?r:null}if(r){nt=qn(r.nextSibling),a=r.data==="F!";break e}}yr(a)}a=!1}a&&(t=n[0])}}return n=tn(),n.memoizedState=n.baseState=t,a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:my,lastRenderedState:t},n.queue=a,n=_y.bind(null,ye,a),a.dispatch=n,a=Rd(!1),i=Of.bind(null,ye,!1,a.queue),a=tn(),r={state:t,dispatch:null,action:e,pending:null},a.queue=r,n=bT.bind(null,ye,r,i,n),r.dispatch=n,a.memoizedState=e,[t,n,!1]}function Eg(e){var t=mt();return hy(t,Be,e)}function hy(e,t,n){if(t=Cf(e,t,my)[0],e=ho(ha)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var a=el(t)}catch(s){throw s===Ws?rc:s}else a=t;t=mt();var r=t.queue,i=r.dispatch;return n!==t.memoizedState&&(ye.flags|=2048,Ei(9,sc(),xT.bind(null,r,n),null)),[a,i,e]}function xT(e,t){e.action=t}function kg(e){var t=mt(),n=Be;if(n!==null)return hy(t,n,e);mt(),t=t.memoizedState,n=mt();var a=n.queue.dispatch;return n.memoizedState=e,[t,a,!1]}function Ei(e,t,n,a){return e={tag:e,create:n,deps:a,inst:t,next:null},t=ye.updateQueue,t===null&&(t=wf(),ye.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 sc(){return{destroy:void 0,resource:void 0}}function gy(){return mt().memoizedState}function go(e,t,n,a){var r=tn();a=a===void 0?null:a,ye.flags|=e,r.memoizedState=Ei(1|t,sc(),n,a)}function tl(e,t,n,a){var r=mt();a=a===void 0?null:a;var i=r.memoizedState.inst;Be!==null&&a!==null&&Sf(a,Be.memoizedState.deps)?r.memoizedState=Ei(t,i,n,a):(ye.flags|=e,r.memoizedState=Ei(1|t,i,n,a))}function Tg(e,t){go(8390656,8,e,t)}function vy(e,t){tl(2048,8,e,t)}function yy(e,t){return tl(4,2,e,t)}function by(e,t){return tl(4,4,e,t)}function xy(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 Sy(e,t,n){n=n!=null?n.concat([e]):null,tl(4,4,xy.bind(null,t,e),n)}function Rf(){}function Ny(e,t){var n=mt();t=t===void 0?null:t;var a=n.memoizedState;return t!==null&&Sf(t,a[1])?a[0]:(n.memoizedState=[e,t],e)}function Ey(e,t){var n=mt();t=t===void 0?null:t;var a=n.memoizedState;if(t!==null&&Sf(t,a[1]))return a[0];if(a=e(),xr){za(!0);try{e()}finally{za(!1)}}return n.memoizedState=[a,t],a}function _f(e,t,n){return n===void 0||(Xa&1073741824)!==0?e.memoizedState=t:(e.memoizedState=n,e=pb(),ye.lanes|=e,Fa|=e,n)}function ky(e,t,n,a){return Sn(n,t)?n:Ni.current!==null?(e=_f(e,n,a),Sn(e,t)||(Et=!0),e):(Xa&42)===0?(Et=!0,e.memoizedState=n):(e=pb(),ye.lanes|=e,Fa|=e,t)}function Ty(e,t,n,a,r){var i=Ce.p;Ce.p=i!==0&&8>i?i:8;var s=ue.T,l={};ue.T=l,Of(e,!1,t,n);try{var o=r(),c=ue.S;if(c!==null&&c(l,o),o!==null&&typeof o=="object"&&typeof o.then=="function"){var u=gT(o,a);ks(e,t,u,bn(e))}else ks(e,t,a,bn(e))}catch(p){ks(e,t,{then:function(){},status:"rejected",reason:p},bn())}finally{Ce.p=i,ue.T=s}}function ST(){}function Dd(e,t,n,a){if(e.tag!==5)throw Error(M(476));var r=wy(e).queue;Ty(e,r,t,dr,n===null?ST:function(){return Ay(e),n(a)})}function wy(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:dr,baseState:dr,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ha,lastRenderedState:dr},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ha,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function Ay(e){var t=wy(e).next.queue;ks(e,t,{},bn())}function Df(){return qt(Hs)}function Cy(){return mt().memoizedState}function Ry(){return mt().memoizedState}function NT(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=bn();e=Va(n);var a=Ha(t,e,n);a!==null&&(xn(a,t,n),Ss(a,t,n)),t={cache:vf()},e.payload=t;return}t=t.return}}function ET(e,t,n){var a=bn();n={lane:a,revertLane:0,action:n,hasEagerState:!1,eagerState:null,next:null},lc(e)?Dy(t,n):(n=pf(e,t,n,a),n!==null&&(xn(n,e,a),Oy(n,t,a)))}function _y(e,t,n){var a=bn();ks(e,t,n,a)}function ks(e,t,n,a){var r={lane:a,revertLane:0,action:n,hasEagerState:!1,eagerState:null,next:null};if(lc(e))Dy(t,r);else{var i=e.alternate;if(e.lanes===0&&(i===null||i.lanes===0)&&(i=t.lastRenderedReducer,i!==null))try{var s=t.lastRenderedState,l=i(s,n);if(r.hasEagerState=!0,r.eagerState=l,Sn(l,s))return ac(e,t,r,0),Ye===null&&nc(),!1}catch(o){}finally{}if(n=pf(e,t,r,a),n!==null)return xn(n,e,a),Oy(n,t,a),!0}return!1}function Of(e,t,n,a){if(a={lane:2,revertLane:Hf(),action:a,hasEagerState:!1,eagerState:null,next:null},lc(e)){if(t)throw Error(M(479))}else t=pf(e,n,a,2),t!==null&&xn(t,e,2)}function lc(e){var t=e.alternate;return e===ye||t!==null&&t===ye}function Dy(e,t){mi=Lo=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Oy(e,t,n){if((n&4194048)!==0){var a=t.lanes;a&=e.pendingLanes,n|=a,t.lanes=n,Nv(e,n)}}var Mo={readContext:qt,use:ic,useCallback:ot,useContext:ot,useEffect:ot,useImperativeHandle:ot,useLayoutEffect:ot,useInsertionEffect:ot,useMemo:ot,useReducer:ot,useRef:ot,useState:ot,useDebugValue:ot,useDeferredValue:ot,useTransition:ot,useSyncExternalStore:ot,useId:ot,useHostTransitionStatus:ot,useFormState:ot,useActionState:ot,useOptimistic:ot,useMemoCache:ot,useCacheRefresh:ot},Ly={readContext:qt,use:ic,useCallback:function(e,t){return tn().memoizedState=[e,t===void 0?null:t],e},useContext:qt,useEffect:Tg,useImperativeHandle:function(e,t,n){n=n!=null?n.concat([e]):null,go(4194308,4,xy.bind(null,t,e),n)},useLayoutEffect:function(e,t){return go(4194308,4,e,t)},useInsertionEffect:function(e,t){go(4,2,e,t)},useMemo:function(e,t){var n=tn();t=t===void 0?null:t;var a=e();if(xr){za(!0);try{e()}finally{za(!1)}}return n.memoizedState=[a,t],a},useReducer:function(e,t,n){var a=tn();if(n!==void 0){var r=n(t);if(xr){za(!0);try{n(t)}finally{za(!1)}}}else r=t;return a.memoizedState=a.baseState=r,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:r},a.queue=e,e=e.dispatch=ET.bind(null,ye,e),[a.memoizedState,e]},useRef:function(e){var t=tn();return e={current:e},t.memoizedState=e},useState:function(e){e=Rd(e);var t=e.queue,n=_y.bind(null,ye,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:Rf,useDeferredValue:function(e,t){var n=tn();return _f(n,e,t)},useTransition:function(){var e=Rd(!1);return e=Ty.bind(null,ye,e.queue,!0,!1),tn().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var a=ye,r=tn();if(Ae){if(n===void 0)throw Error(M(407));n=n()}else{if(n=t(),Ye===null)throw Error(M(349));(ke&124)!==0||sy(a,t,n)}r.memoizedState=n;var i={value:n,getSnapshot:t};return r.queue=i,Tg(oy.bind(null,a,i,e),[e]),a.flags|=2048,Ei(9,sc(),ly.bind(null,a,i,n,t),null),n},useId:function(){var e=tn(),t=Ye.identifierPrefix;if(Ae){var n=ca,a=oa;n=(a&~(1<<32-yn(a)-1)).toString(32)+n,t="\xAB"+t+"R"+n,n=zo++,0<n&&(t+="H"+n.toString(32)),t+="\xBB"}else n=vT++,t="\xAB"+t+"r"+n.toString(32)+"\xBB";return e.memoizedState=t},useHostTransitionStatus:Df,useFormState:Ng,useActionState:Ng,useOptimistic:function(e){var t=tn();t.memoizedState=t.baseState=e;var n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=n,t=Of.bind(null,ye,!0,n),n.dispatch=t,[e,t]},useMemoCache:Af,useCacheRefresh:function(){return tn().memoizedState=NT.bind(null,ye)}},zy={readContext:qt,use:ic,useCallback:Ny,useContext:qt,useEffect:vy,useImperativeHandle:Sy,useInsertionEffect:yy,useLayoutEffect:by,useMemo:Ey,useReducer:ho,useRef:gy,useState:function(){return ho(ha)},useDebugValue:Rf,useDeferredValue:function(e,t){var n=mt();return ky(n,Be.memoizedState,e,t)},useTransition:function(){var e=ho(ha)[0],t=mt().memoizedState;return[typeof e=="boolean"?e:el(e),t]},useSyncExternalStore:iy,useId:Cy,useHostTransitionStatus:Df,useFormState:Eg,useActionState:Eg,useOptimistic:function(e,t){var n=mt();return dy(n,Be,e,t)},useMemoCache:Af,useCacheRefresh:Ry},kT={readContext:qt,use:ic,useCallback:Ny,useContext:qt,useEffect:vy,useImperativeHandle:Sy,useInsertionEffect:yy,useLayoutEffect:by,useMemo:Ey,useReducer:qu,useRef:gy,useState:function(){return qu(ha)},useDebugValue:Rf,useDeferredValue:function(e,t){var n=mt();return Be===null?_f(n,e,t):ky(n,Be.memoizedState,e,t)},useTransition:function(){var e=qu(ha)[0],t=mt().memoizedState;return[typeof e=="boolean"?e:el(e),t]},useSyncExternalStore:iy,useId:Cy,useHostTransitionStatus:Df,useFormState:kg,useActionState:kg,useOptimistic:function(e,t){var n=mt();return Be!==null?dy(n,Be,e,t):(n.baseState=e,[e,n.queue.dispatch])},useMemoCache:Af,useCacheRefresh:Ry},gi=null,Us=0;function eo(e){var t=Us;return Us+=1,gi===null&&(gi=[]),ey(gi,e,t)}function ls(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function to(e,t){throw t.$$typeof===ek?Error(M(525)):(e=Object.prototype.toString.call(t),Error(M(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function wg(e){var t=e._init;return t(e._payload)}function My(e){function t(m,h){if(e){var g=m.deletions;g===null?(m.deletions=[h],m.flags|=16):g.push(h)}}function n(m,h){if(!e)return null;for(;h!==null;)t(m,h),h=h.sibling;return null}function a(m){for(var h=new Map;m!==null;)m.key!==null?h.set(m.key,m):h.set(m.index,m),m=m.sibling;return h}function r(m,h){return m=fa(m,h),m.index=0,m.sibling=null,m}function i(m,h,g){return m.index=g,e?(g=m.alternate,g!==null?(g=g.index,g<h?(m.flags|=67108866,h):g):(m.flags|=67108866,h)):(m.flags|=1048576,h)}function s(m){return e&&m.alternate===null&&(m.flags|=67108866),m}function l(m,h,g,S){return h===null||h.tag!==6?(h=Bu(g,m.mode,S),h.return=m,h):(h=r(h,g),h.return=m,h)}function o(m,h,g,S){var T=g.type;return T===Kr?u(m,h,g.props.children,S,g.key):h!==null&&(h.elementType===T||typeof T=="object"&&T!==null&&T.$$typeof===Ca&&wg(T)===h.type)?(h=r(h,g.props),ls(h,g),h.return=m,h):(h=po(g.type,g.key,g.props,null,m.mode,S),ls(h,g),h.return=m,h)}function c(m,h,g,S){return h===null||h.tag!==4||h.stateNode.containerInfo!==g.containerInfo||h.stateNode.implementation!==g.implementation?(h=Vu(g,m.mode,S),h.return=m,h):(h=r(h,g.children||[]),h.return=m,h)}function u(m,h,g,S,T){return h===null||h.tag!==7?(h=fr(g,m.mode,S,T),h.return=m,h):(h=r(h,g),h.return=m,h)}function p(m,h,g){if(typeof h=="string"&&h!==""||typeof h=="number"||typeof h=="bigint")return h=Bu(""+h,m.mode,g),h.return=m,h;if(typeof h=="object"&&h!==null){switch(h.$$typeof){case Gl:return g=po(h.type,h.key,h.props,null,m.mode,g),ls(g,h),g.return=m,g;case fs:return h=Vu(h,m.mode,g),h.return=m,h;case Ca:var S=h._init;return h=S(h._payload),p(m,h,g)}if(ps(h)||rs(h))return h=fr(h,m.mode,g,null),h.return=m,h;if(typeof h.then=="function")return p(m,eo(h),g);if(h.$$typeof===la)return p(m,Kl(m,h),g);to(m,h)}return null}function f(m,h,g,S){var T=h!==null?h.key:null;if(typeof g=="string"&&g!==""||typeof g=="number"||typeof g=="bigint")return T!==null?null:l(m,h,""+g,S);if(typeof g=="object"&&g!==null){switch(g.$$typeof){case Gl:return g.key===T?o(m,h,g,S):null;case fs:return g.key===T?c(m,h,g,S):null;case Ca:return T=g._init,g=T(g._payload),f(m,h,g,S)}if(ps(g)||rs(g))return T!==null?null:u(m,h,g,S,null);if(typeof g.then=="function")return f(m,h,eo(g),S);if(g.$$typeof===la)return f(m,h,Kl(m,g),S);to(m,g)}return null}function d(m,h,g,S,T){if(typeof S=="string"&&S!==""||typeof S=="number"||typeof S=="bigint")return m=m.get(g)||null,l(h,m,""+S,T);if(typeof S=="object"&&S!==null){switch(S.$$typeof){case Gl:return m=m.get(S.key===null?g:S.key)||null,o(h,m,S,T);case fs:return m=m.get(S.key===null?g:S.key)||null,c(h,m,S,T);case Ca:var E=S._init;return S=E(S._payload),d(m,h,g,S,T)}if(ps(S)||rs(S))return m=m.get(g)||null,u(h,m,S,T,null);if(typeof S.then=="function")return d(m,h,g,eo(S),T);if(S.$$typeof===la)return d(m,h,g,Kl(h,S),T);to(h,S)}return null}function x(m,h,g,S){for(var T=null,E=null,w=h,C=h=0,U=null;w!==null&&C<g.length;C++){w.index>C?(U=w,w=null):U=w.sibling;var H=f(m,w,g[C],S);if(H===null){w===null&&(w=U);break}e&&w&&H.alternate===null&&t(m,w),h=i(H,h,C),E===null?T=H:E.sibling=H,E=H,w=U}if(C===g.length)return n(m,w),Ae&&cr(m,C),T;if(w===null){for(;C<g.length;C++)w=p(m,g[C],S),w!==null&&(h=i(w,h,C),E===null?T=w:E.sibling=w,E=w);return Ae&&cr(m,C),T}for(w=a(w);C<g.length;C++)U=d(w,m,C,g[C],S),U!==null&&(e&&U.alternate!==null&&w.delete(U.key===null?C:U.key),h=i(U,h,C),E===null?T=U:E.sibling=U,E=U);return e&&w.forEach(function(_){return t(m,_)}),Ae&&cr(m,C),T}function y(m,h,g,S){if(g==null)throw Error(M(151));for(var T=null,E=null,w=h,C=h=0,U=null,H=g.next();w!==null&&!H.done;C++,H=g.next()){w.index>C?(U=w,w=null):U=w.sibling;var _=f(m,w,H.value,S);if(_===null){w===null&&(w=U);break}e&&w&&_.alternate===null&&t(m,w),h=i(_,h,C),E===null?T=_:E.sibling=_,E=_,w=U}if(H.done)return n(m,w),Ae&&cr(m,C),T;if(w===null){for(;!H.done;C++,H=g.next())H=p(m,H.value,S),H!==null&&(h=i(H,h,C),E===null?T=H:E.sibling=H,E=H);return Ae&&cr(m,C),T}for(w=a(w);!H.done;C++,H=g.next())H=d(w,m,C,H.value,S),H!==null&&(e&&H.alternate!==null&&w.delete(H.key===null?C:H.key),h=i(H,h,C),E===null?T=H:E.sibling=H,E=H);return e&&w.forEach(function(R){return t(m,R)}),Ae&&cr(m,C),T}function k(m,h,g,S){if(typeof g=="object"&&g!==null&&g.type===Kr&&g.key===null&&(g=g.props.children),typeof g=="object"&&g!==null){switch(g.$$typeof){case Gl:e:{for(var T=g.key;h!==null;){if(h.key===T){if(T=g.type,T===Kr){if(h.tag===7){n(m,h.sibling),S=r(h,g.props.children),S.return=m,m=S;break e}}else if(h.elementType===T||typeof T=="object"&&T!==null&&T.$$typeof===Ca&&wg(T)===h.type){n(m,h.sibling),S=r(h,g.props),ls(S,g),S.return=m,m=S;break e}n(m,h);break}else t(m,h);h=h.sibling}g.type===Kr?(S=fr(g.props.children,m.mode,S,g.key),S.return=m,m=S):(S=po(g.type,g.key,g.props,null,m.mode,S),ls(S,g),S.return=m,m=S)}return s(m);case fs:e:{for(T=g.key;h!==null;){if(h.key===T)if(h.tag===4&&h.stateNode.containerInfo===g.containerInfo&&h.stateNode.implementation===g.implementation){n(m,h.sibling),S=r(h,g.children||[]),S.return=m,m=S;break e}else{n(m,h);break}else t(m,h);h=h.sibling}S=Vu(g,m.mode,S),S.return=m,m=S}return s(m);case Ca:return T=g._init,g=T(g._payload),k(m,h,g,S)}if(ps(g))return x(m,h,g,S);if(rs(g)){if(T=rs(g),typeof T!="function")throw Error(M(150));return g=T.call(g),y(m,h,g,S)}if(typeof g.then=="function")return k(m,h,eo(g),S);if(g.$$typeof===la)return k(m,h,Kl(m,g),S);to(m,g)}return typeof g=="string"&&g!==""||typeof g=="number"||typeof g=="bigint"?(g=""+g,h!==null&&h.tag===6?(n(m,h.sibling),S=r(h,g),S.return=m,m=S):(n(m,h),S=Bu(g,m.mode,S),S.return=m,m=S),s(m)):n(m,h)}return function(m,h,g,S){try{Us=0;var T=k(m,h,g,S);return gi=null,T}catch(w){if(w===Ws||w===rc)throw w;var E=gn(29,w,null,m.mode);return E.lanes=S,E.return=m,E}finally{}}}var ki=My(!0),Uy=My(!1),Ln=Kn(null),Jn=null;function Da(e){var t=e.alternate;We(bt,bt.current&1),We(Ln,e),Jn===null&&(t===null||Ni.current!==null||t.memoizedState!==null)&&(Jn=e)}function Py(e){if(e.tag===22){if(We(bt,bt.current),We(Ln,e),Jn===null){var t=e.alternate;t!==null&&t.memoizedState!==null&&(Jn=e)}}else Oa(e)}function Oa(){We(bt,bt.current),We(Ln,Ln.current)}function da(e){kt(Ln),Jn===e&&(Jn=null),kt(bt)}var bt=Kn(0);function Uo(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||Fd(n)))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){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}function ju(e,t,n,a){t=e.memoizedState,n=n(a,t),n=n==null?t:Qe({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var Od={enqueueSetState:function(e,t,n){e=e._reactInternals;var a=bn(),r=Va(a);r.payload=t,n!=null&&(r.callback=n),t=Ha(e,r,a),t!==null&&(xn(t,e,a),Ss(t,e,a))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var a=bn(),r=Va(a);r.tag=1,r.payload=t,n!=null&&(r.callback=n),t=Ha(e,r,a),t!==null&&(xn(t,e,a),Ss(t,e,a))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=bn(),a=Va(n);a.tag=2,t!=null&&(a.callback=t),t=Ha(e,a,n),t!==null&&(xn(t,e,n),Ss(t,e,n))}};function Ag(e,t,n,a,r,i,s){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(a,i,s):t.prototype&&t.prototype.isPureReactComponent?!Ls(n,a)||!Ls(r,i):!0}function Cg(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&&Od.enqueueReplaceState(t,t.state,null)}function Sr(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=Qe({},n));for(var r in e)n[r]===void 0&&(n[r]=e[r])}return n}var Po=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)};function By(e){Po(e)}function Vy(e){console.error(e)}function Hy(e){Po(e)}function Bo(e,t){try{var n=e.onUncaughtError;n(t.value,{componentStack:t.stack})}catch(a){setTimeout(function(){throw a})}}function Rg(e,t,n){try{var a=e.onCaughtError;a(n.value,{componentStack:n.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(r){setTimeout(function(){throw r})}}function Ld(e,t,n){return n=Va(n),n.tag=3,n.payload={element:null},n.callback=function(){Bo(e,t)},n}function qy(e){return e=Va(e),e.tag=3,e}function jy(e,t,n,a){var r=n.type.getDerivedStateFromError;if(typeof r=="function"){var i=a.value;e.payload=function(){return r(i)},e.callback=function(){Rg(t,n,a)}}var s=n.stateNode;s!==null&&typeof s.componentDidCatch=="function"&&(e.callback=function(){Rg(t,n,a),typeof r!="function"&&(qa===null?qa=new Set([this]):qa.add(this));var l=a.stack;this.componentDidCatch(a.value,{componentStack:l!==null?l:""})})}function TT(e,t,n,a,r){if(n.flags|=32768,a!==null&&typeof a=="object"&&typeof a.then=="function"){if(t=n.alternate,t!==null&&Js(t,n,r,!0),n=Ln.current,n!==null){switch(n.tag){case 13:return Jn===null?qd():n.alternate===null&&at===0&&(at=3),n.flags&=-257,n.flags|=65536,n.lanes=r,a===Td?n.flags|=16384:(t=n.updateQueue,t===null?n.updateQueue=new Set([a]):t.add(a),Wu(e,a,r)),!1;case 22:return n.flags|=65536,a===Td?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)),Wu(e,a,r)),!1}throw Error(M(435,n.tag))}return Wu(e,a,r),qd(),!1}if(Ae)return t=Ln.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=r,a!==xd&&(e=Error(M(422),{cause:a}),zs(Dn(e,n)))):(a!==xd&&(t=Error(M(423),{cause:a}),zs(Dn(t,n))),e=e.current.alternate,e.flags|=65536,r&=-r,e.lanes|=r,a=Dn(a,n),r=Ld(e.stateNode,a,r),Hu(e,r),at!==4&&(at=2)),!1;var i=Error(M(520),{cause:a});if(i=Dn(i,n),As===null?As=[i]:As.push(i),at!==4&&(at=2),t===null)return!0;a=Dn(a,n),n=t;do{switch(n.tag){case 3:return n.flags|=65536,e=r&-r,n.lanes|=e,e=Ld(n.stateNode,a,e),Hu(n,e),!1;case 1:if(t=n.type,i=n.stateNode,(n.flags&128)===0&&(typeof t.getDerivedStateFromError=="function"||i!==null&&typeof i.componentDidCatch=="function"&&(qa===null||!qa.has(i))))return n.flags|=65536,r&=-r,n.lanes|=r,r=qy(r),jy(r,e,n,a),Hu(n,r),!1}n=n.return}while(n!==null);return!1}var Iy=Error(M(461)),Et=!1;function Dt(e,t,n,a){t.child=e===null?Uy(t,null,n,a):ki(t,e.child,n,a)}function _g(e,t,n,a,r){n=n.render;var i=t.ref;if("ref"in a){var s={};for(var l in a)l!=="ref"&&(s[l]=a[l])}else s=a;return br(t),a=Nf(e,t,n,s,i,r),l=Ef(),e!==null&&!Et?(kf(e,t,r),ga(e,t,r)):(Ae&&l&&hf(t),t.flags|=1,Dt(e,t,a,r),t.child)}function Dg(e,t,n,a,r){if(e===null){var i=n.type;return typeof i=="function"&&!mf(i)&&i.defaultProps===void 0&&n.compare===null?(t.tag=15,t.type=i,Yy(e,t,i,a,r)):(e=po(n.type,null,a,t,t.mode,r),e.ref=t.ref,e.return=t,t.child=e)}if(i=e.child,!Lf(e,r)){var s=i.memoizedProps;if(n=n.compare,n=n!==null?n:Ls,n(s,a)&&e.ref===t.ref)return ga(e,t,r)}return t.flags|=1,e=fa(i,a),e.ref=t.ref,e.return=t,t.child=e}function Yy(e,t,n,a,r){if(e!==null){var i=e.memoizedProps;if(Ls(i,a)&&e.ref===t.ref)if(Et=!1,t.pendingProps=a=i,Lf(e,r))(e.flags&131072)!==0&&(Et=!0);else return t.lanes=e.lanes,ga(e,t,r)}return zd(e,t,n,a,r)}function Gy(e,t,n){var a=t.pendingProps,r=a.children,i=e!==null?e.memoizedState:null;if(a.mode==="hidden"){if((t.flags&128)!==0){if(a=i!==null?i.baseLanes|n:n,e!==null){for(r=t.child=e.child,i=0;r!==null;)i=i|r.lanes|r.childLanes,r=r.sibling;t.childLanes=i&~a}else t.childLanes=0,t.child=null;return Og(e,t,a,n)}if((n&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&mo(t,i!==null?i.cachePool:null),i!==null?bg(t,i):Cd(),Py(t);else return t.lanes=t.childLanes=536870912,Og(e,t,i!==null?i.baseLanes|n:n,n)}else i!==null?(mo(t,i.cachePool),bg(t,i),Oa(t),t.memoizedState=null):(e!==null&&mo(t,null),Cd(),Oa(t));return Dt(e,t,r,n),t.child}function Og(e,t,n,a){var r=yf();return r=r===null?null:{parent:yt._currentValue,pool:r},t.memoizedState={baseLanes:n,cachePool:r},e!==null&&mo(t,null),Cd(),Py(t),e!==null&&Js(e,t,a,!0),null}function vo(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(M(284));(e===null||e.ref!==n)&&(t.flags|=4194816)}}function zd(e,t,n,a,r){return br(t),n=Nf(e,t,n,a,void 0,r),a=Ef(),e!==null&&!Et?(kf(e,t,r),ga(e,t,r)):(Ae&&a&&hf(t),t.flags|=1,Dt(e,t,n,r),t.child)}function Lg(e,t,n,a,r,i){return br(t),t.updateQueue=null,n=ry(t,a,n,r),ay(e),a=Ef(),e!==null&&!Et?(kf(e,t,i),ga(e,t,i)):(Ae&&a&&hf(t),t.flags|=1,Dt(e,t,n,i),t.child)}function zg(e,t,n,a,r){if(br(t),t.stateNode===null){var i=si,s=n.contextType;typeof s=="object"&&s!==null&&(i=qt(s)),i=new n(a,i),t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,i.updater=Od,t.stateNode=i,i._reactInternals=t,i=t.stateNode,i.props=a,i.state=t.memoizedState,i.refs={},bf(t),s=n.contextType,i.context=typeof s=="object"&&s!==null?qt(s):si,i.state=t.memoizedState,s=n.getDerivedStateFromProps,typeof s=="function"&&(ju(t,n,s,a),i.state=t.memoizedState),typeof n.getDerivedStateFromProps=="function"||typeof i.getSnapshotBeforeUpdate=="function"||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(s=i.state,typeof i.componentWillMount=="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount=="function"&&i.UNSAFE_componentWillMount(),s!==i.state&&Od.enqueueReplaceState(i,i.state,null),Es(t,a,i,r),Ns(),i.state=t.memoizedState),typeof i.componentDidMount=="function"&&(t.flags|=4194308),a=!0}else if(e===null){i=t.stateNode;var l=t.memoizedProps,o=Sr(n,l);i.props=o;var c=i.context,u=n.contextType;s=si,typeof u=="object"&&u!==null&&(s=qt(u));var p=n.getDerivedStateFromProps;u=typeof p=="function"||typeof i.getSnapshotBeforeUpdate=="function",l=t.pendingProps!==l,u||typeof i.UNSAFE_componentWillReceiveProps!="function"&&typeof i.componentWillReceiveProps!="function"||(l||c!==s)&&Cg(t,i,a,s),Ra=!1;var f=t.memoizedState;i.state=f,Es(t,a,i,r),Ns(),c=t.memoizedState,l||f!==c||Ra?(typeof p=="function"&&(ju(t,n,p,a),c=t.memoizedState),(o=Ra||Ag(t,n,o,a,f,c,s))?(u||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(typeof i.componentWillMount=="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount=="function"&&i.UNSAFE_componentWillMount()),typeof i.componentDidMount=="function"&&(t.flags|=4194308)):(typeof i.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=a,t.memoizedState=c),i.props=a,i.state=c,i.context=s,a=o):(typeof i.componentDidMount=="function"&&(t.flags|=4194308),a=!1)}else{i=t.stateNode,wd(e,t),s=t.memoizedProps,u=Sr(n,s),i.props=u,p=t.pendingProps,f=i.context,c=n.contextType,o=si,typeof c=="object"&&c!==null&&(o=qt(c)),l=n.getDerivedStateFromProps,(c=typeof l=="function"||typeof i.getSnapshotBeforeUpdate=="function")||typeof i.UNSAFE_componentWillReceiveProps!="function"&&typeof i.componentWillReceiveProps!="function"||(s!==p||f!==o)&&Cg(t,i,a,o),Ra=!1,f=t.memoizedState,i.state=f,Es(t,a,i,r),Ns();var d=t.memoizedState;s!==p||f!==d||Ra||e!==null&&e.dependencies!==null&&Do(e.dependencies)?(typeof l=="function"&&(ju(t,n,l,a),d=t.memoizedState),(u=Ra||Ag(t,n,u,a,f,d,o)||e!==null&&e.dependencies!==null&&Do(e.dependencies))?(c||typeof i.UNSAFE_componentWillUpdate!="function"&&typeof i.componentWillUpdate!="function"||(typeof i.componentWillUpdate=="function"&&i.componentWillUpdate(a,d,o),typeof i.UNSAFE_componentWillUpdate=="function"&&i.UNSAFE_componentWillUpdate(a,d,o)),typeof i.componentDidUpdate=="function"&&(t.flags|=4),typeof i.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof i.componentDidUpdate!="function"||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof i.getSnapshotBeforeUpdate!="function"||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),t.memoizedProps=a,t.memoizedState=d),i.props=a,i.state=d,i.context=o,a=u):(typeof i.componentDidUpdate!="function"||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof i.getSnapshotBeforeUpdate!="function"||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),a=!1)}return i=a,vo(e,t),a=(t.flags&128)!==0,i||a?(i=t.stateNode,n=a&&typeof n.getDerivedStateFromError!="function"?null:i.render(),t.flags|=1,e!==null&&a?(t.child=ki(t,e.child,null,r),t.child=ki(t,null,n,r)):Dt(e,t,n,r),t.memoizedState=i.state,e=t.child):e=ga(e,t,r),e}function Mg(e,t,n,a){return $s(),t.flags|=256,Dt(e,t,n,a),t.child}var Iu={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function Yu(e){return{baseLanes:e,cachePool:Kv()}}function Gu(e,t,n){return e=e!==null?e.childLanes&~n:0,t&&(e|=On),e}function Xy(e,t,n){var a=t.pendingProps,r=!1,i=(t.flags&128)!==0,s;if((s=i)||(s=e!==null&&e.memoizedState===null?!1:(bt.current&2)!==0),s&&(r=!0,t.flags&=-129),s=(t.flags&32)!==0,t.flags&=-33,e===null){if(Ae){if(r?Da(t):Oa(t),Ae){var l=nt,o;if(o=l){e:{for(o=l,l=Qn;o.nodeType!==8;){if(!l){l=null;break e}if(o=qn(o.nextSibling),o===null){l=null;break e}}l=o}l!==null?(t.memoizedState={dehydrated:l,treeContext:pr!==null?{id:oa,overflow:ca}:null,retryLane:536870912,hydrationErrors:null},o=gn(18,null,null,0),o.stateNode=l,o.return=t,t.child=o,Qt=t,nt=null,o=!0):o=!1}o||yr(t)}if(l=t.memoizedState,l!==null&&(l=l.dehydrated,l!==null))return Fd(l)?t.lanes=32:t.lanes=536870912,null;da(t)}return l=a.children,a=a.fallback,r?(Oa(t),r=t.mode,l=Vo({mode:"hidden",children:l},r),a=fr(a,r,n,null),l.return=t,a.return=t,l.sibling=a,t.child=l,r=t.child,r.memoizedState=Yu(n),r.childLanes=Gu(e,s,n),t.memoizedState=Iu,a):(Da(t),Md(t,l))}if(o=e.memoizedState,o!==null&&(l=o.dehydrated,l!==null)){if(i)t.flags&256?(Da(t),t.flags&=-257,t=Xu(e,t,n)):t.memoizedState!==null?(Oa(t),t.child=e.child,t.flags|=128,t=null):(Oa(t),r=a.fallback,l=t.mode,a=Vo({mode:"visible",children:a.children},l),r=fr(r,l,n,null),r.flags|=2,a.return=t,r.return=t,a.sibling=r,t.child=a,ki(t,e.child,null,n),a=t.child,a.memoizedState=Yu(n),a.childLanes=Gu(e,s,n),t.memoizedState=Iu,t=r);else if(Da(t),Fd(l)){if(s=l.nextSibling&&l.nextSibling.dataset,s)var c=s.dgst;s=c,a=Error(M(419)),a.stack="",a.digest=s,zs({value:a,source:null,stack:null}),t=Xu(e,t,n)}else if(Et||Js(e,t,n,!1),s=(n&e.childLanes)!==0,Et||s){if(s=Ye,s!==null&&(a=n&-n,a=(a&42)!==0?1:nf(a),a=(a&(s.suspendedLanes|n))!==0?0:a,a!==0&&a!==o.retryLane))throw o.retryLane=a,Di(e,a),xn(s,e,a),Iy;l.data==="$?"||qd(),t=Xu(e,t,n)}else l.data==="$?"?(t.flags|=192,t.child=e.child,t=null):(e=o.treeContext,nt=qn(l.nextSibling),Qt=t,Ae=!0,mr=null,Qn=!1,e!==null&&(Cn[Rn++]=oa,Cn[Rn++]=ca,Cn[Rn++]=pr,oa=e.id,ca=e.overflow,pr=t),t=Md(t,a.children),t.flags|=4096);return t}return r?(Oa(t),r=a.fallback,l=t.mode,o=e.child,c=o.sibling,a=fa(o,{mode:"hidden",children:a.children}),a.subtreeFlags=o.subtreeFlags&65011712,c!==null?r=fa(c,r):(r=fr(r,l,n,null),r.flags|=2),r.return=t,a.return=t,a.sibling=r,t.child=a,a=r,r=t.child,l=e.child.memoizedState,l===null?l=Yu(n):(o=l.cachePool,o!==null?(c=yt._currentValue,o=o.parent!==c?{parent:c,pool:c}:o):o=Kv(),l={baseLanes:l.baseLanes|n,cachePool:o}),r.memoizedState=l,r.childLanes=Gu(e,s,n),t.memoizedState=Iu,a):(Da(t),n=e.child,e=n.sibling,n=fa(n,{mode:"visible",children:a.children}),n.return=t,n.sibling=null,e!==null&&(s=t.deletions,s===null?(t.deletions=[e],t.flags|=16):s.push(e)),t.child=n,t.memoizedState=null,n)}function Md(e,t){return t=Vo({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function Vo(e,t){return e=gn(22,e,null,t),e.lanes=0,e.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null},e}function Xu(e,t,n){return ki(t,e.child,null,n),e=Md(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Ug(e,t,n){e.lanes|=t;var a=e.alternate;a!==null&&(a.lanes|=t),Nd(e.return,t,n)}function Qu(e,t,n,a,r){var i=e.memoizedState;i===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:a,tail:n,tailMode:r}:(i.isBackwards=t,i.rendering=null,i.renderingStartTime=0,i.last=a,i.tail=n,i.tailMode=r)}function Qy(e,t,n){var a=t.pendingProps,r=a.revealOrder,i=a.tail;if(Dt(e,t,a.children,n),a=bt.current,(a&2)!==0)a=a&1|2,t.flags|=128;else{if(e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Ug(e,n,t);else if(e.tag===19)Ug(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}a&=1}switch(We(bt,a),r){case"forwards":for(n=t.child,r=null;n!==null;)e=n.alternate,e!==null&&Uo(e)===null&&(r=n),n=n.sibling;n=r,n===null?(r=t.child,t.child=null):(r=n.sibling,n.sibling=null),Qu(t,!1,r,n,i);break;case"backwards":for(n=null,r=t.child,t.child=null;r!==null;){if(e=r.alternate,e!==null&&Uo(e)===null){t.child=r;break}e=r.sibling,r.sibling=n,n=r,r=e}Qu(t,!0,n,null,i);break;case"together":Qu(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function ga(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),Fa|=t.lanes,(n&t.childLanes)===0)if(e!==null){if(Js(e,t,n,!1),(n&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(M(153));if(t.child!==null){for(e=t.child,n=fa(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=fa(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function Lf(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&Do(e)))}function wT(e,t,n){switch(t.tag){case 3:Eo(t,t.stateNode.containerInfo),_a(t,yt,e.memoizedState.cache),$s();break;case 27:case 5:ud(t);break;case 4:Eo(t,t.stateNode.containerInfo);break;case 10:_a(t,t.type,t.memoizedProps.value);break;case 13:var a=t.memoizedState;if(a!==null)return a.dehydrated!==null?(Da(t),t.flags|=128,null):(n&t.child.childLanes)!==0?Xy(e,t,n):(Da(t),e=ga(e,t,n),e!==null?e.sibling:null);Da(t);break;case 19:var r=(e.flags&128)!==0;if(a=(n&t.childLanes)!==0,a||(Js(e,t,n,!1),a=(n&t.childLanes)!==0),r){if(a)return Qy(e,t,n);t.flags|=128}if(r=t.memoizedState,r!==null&&(r.rendering=null,r.tail=null,r.lastEffect=null),We(bt,bt.current),a)break;return null;case 22:case 23:return t.lanes=0,Gy(e,t,n);case 24:_a(t,yt,e.memoizedState.cache)}return ga(e,t,n)}function Fy(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps)Et=!0;else{if(!Lf(e,n)&&(t.flags&128)===0)return Et=!1,wT(e,t,n);Et=(e.flags&131072)!==0}else Et=!1,Ae&&(t.flags&1048576)!==0&&$v(t,_o,t.index);switch(t.lanes=0,t.tag){case 16:e:{e=t.pendingProps;var a=t.elementType,r=a._init;if(a=r(a._payload),t.type=a,typeof a=="function")mf(a)?(e=Sr(a,e),t.tag=1,t=zg(null,t,a,e,n)):(t.tag=0,t=zd(null,t,a,e,n));else{if(a!=null){if(r=a.$$typeof,r===Wd){t.tag=11,t=_g(null,t,a,e,n);break e}else if(r===ef){t.tag=14,t=Dg(null,t,a,e,n);break e}}throw t=od(a)||a,Error(M(306,t,""))}}return t;case 0:return zd(e,t,t.type,t.pendingProps,n);case 1:return a=t.type,r=Sr(a,t.pendingProps),zg(e,t,a,r,n);case 3:e:{if(Eo(t,t.stateNode.containerInfo),e===null)throw Error(M(387));a=t.pendingProps;var i=t.memoizedState;r=i.element,wd(e,t),Es(t,a,null,n);var s=t.memoizedState;if(a=s.cache,_a(t,yt,a),a!==i.cache&&Ed(t,[yt],n,!0),Ns(),a=s.element,i.isDehydrated)if(i={element:a,isDehydrated:!1,cache:s.cache},t.updateQueue.baseState=i,t.memoizedState=i,t.flags&256){t=Mg(e,t,a,n);break e}else if(a!==r){r=Dn(Error(M(424)),t),zs(r),t=Mg(e,t,a,n);break e}else{switch(e=t.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName==="HTML"?e.ownerDocument.body:e}for(nt=qn(e.firstChild),Qt=t,Ae=!0,mr=null,Qn=!0,n=Uy(t,null,a,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling}else{if($s(),a===r){t=ga(e,t,n);break e}Dt(e,t,a,n)}t=t.child}return t;case 26:return vo(e,t),e===null?(n=tv(t.type,null,t.pendingProps,null))?t.memoizedState=n:Ae||(n=t.type,e=t.pendingProps,a=Xo(Ba.current).createElement(n),a[Ht]=t,a[rn]=e,Lt(a,n,e),Nt(a),t.stateNode=a):t.memoizedState=tv(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return ud(t),e===null&&Ae&&(a=t.stateNode=zb(t.type,t.pendingProps,Ba.current),Qt=t,Qn=!0,r=nt,$a(t.type)?(Zd=r,nt=qn(a.firstChild)):nt=r),Dt(e,t,t.pendingProps.children,n),vo(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&Ae&&((r=a=nt)&&(a=KT(a,t.type,t.pendingProps,Qn),a!==null?(t.stateNode=a,Qt=t,nt=qn(a.firstChild),Qn=!1,r=!0):r=!1),r||yr(t)),ud(t),r=t.type,i=t.pendingProps,s=e!==null?e.memoizedProps:null,a=i.children,Xd(r,i)?a=null:s!==null&&Xd(r,s)&&(t.flags|=32),t.memoizedState!==null&&(r=Nf(e,t,yT,null,null,n),Hs._currentValue=r),vo(e,t),Dt(e,t,a,n),t.child;case 6:return e===null&&Ae&&((e=n=nt)&&(n=WT(n,t.pendingProps,Qn),n!==null?(t.stateNode=n,Qt=t,nt=null,e=!0):e=!1),e||yr(t)),null;case 13:return Xy(e,t,n);case 4:return Eo(t,t.stateNode.containerInfo),a=t.pendingProps,e===null?t.child=ki(t,null,a,n):Dt(e,t,a,n),t.child;case 11:return _g(e,t,t.type,t.pendingProps,n);case 7:return Dt(e,t,t.pendingProps,n),t.child;case 8:return Dt(e,t,t.pendingProps.children,n),t.child;case 12:return Dt(e,t,t.pendingProps.children,n),t.child;case 10:return a=t.pendingProps,_a(t,t.type,a.value),Dt(e,t,a.children,n),t.child;case 9:return r=t.type._context,a=t.pendingProps.children,br(t),r=qt(r),a=a(r),t.flags|=1,Dt(e,t,a,n),t.child;case 14:return Dg(e,t,t.type,t.pendingProps,n);case 15:return Yy(e,t,t.type,t.pendingProps,n);case 19:return Qy(e,t,n);case 31:return a=t.pendingProps,n=t.mode,a={mode:a.mode,children:a.children},e===null?(n=Vo(a,n),n.ref=t.ref,t.child=n,n.return=t,t=n):(n=fa(e.child,a),n.ref=t.ref,t.child=n,n.return=t,t=n),t;case 22:return Gy(e,t,n);case 24:return br(t),a=qt(yt),e===null?(r=yf(),r===null&&(r=Ye,i=vf(),r.pooledCache=i,i.refCount++,i!==null&&(r.pooledCacheLanes|=n),r=i),t.memoizedState={parent:a,cache:r},bf(t),_a(t,yt,r)):((e.lanes&n)!==0&&(wd(e,t),Es(t,null,null,n),Ns()),r=e.memoizedState,i=t.memoizedState,r.parent!==a?(r={parent:a,cache:a},t.memoizedState=r,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=r),_a(t,yt,a)):(a=i.cache,_a(t,yt,a),a!==r.cache&&Ed(t,[yt],n,!0))),Dt(e,t,t.pendingProps.children,n),t.child;case 29:throw t.pendingProps}throw Error(M(156,t.tag))}function ra(e){e.flags|=4}function Pg(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!Pb(t)){if(t=Ln.current,t!==null&&((ke&4194048)===ke?Jn!==null:(ke&62914560)!==ke&&(ke&536870912)===0||t!==Jn))throw xs=Td,Wv;e.flags|=8192}}function no(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?xv():536870912,e.lanes|=t,Ti|=t)}function os(e,t){if(!Ae)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 et(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,a=0;if(t)for(var r=e.child;r!==null;)n|=r.lanes|r.childLanes,a|=r.subtreeFlags&65011712,a|=r.flags&65011712,r.return=e,r=r.sibling;else for(r=e.child;r!==null;)n|=r.lanes|r.childLanes,a|=r.subtreeFlags,a|=r.flags,r.return=e,r=r.sibling;return e.subtreeFlags|=a,e.childLanes=n,t}function AT(e,t,n){var a=t.pendingProps;switch(gf(t),t.tag){case 31:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return et(t),null;case 1:return et(t),null;case 3:return n=t.stateNode,a=null,e!==null&&(a=e.memoizedState.cache),t.memoizedState.cache!==a&&(t.flags|=2048),pa(yt),yi(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(ss(t)?ra(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,pg())),et(t),null;case 26:return n=t.memoizedState,e===null?(ra(t),n!==null?(et(t),Pg(t,n)):(et(t),t.flags&=-16777217)):n?n!==e.memoizedState?(ra(t),et(t),Pg(t,n)):(et(t),t.flags&=-16777217):(e.memoizedProps!==a&&ra(t),et(t),t.flags&=-16777217),null;case 27:ko(t),n=Ba.current;var r=t.type;if(e!==null&&t.stateNode!=null)e.memoizedProps!==a&&ra(t);else{if(!a){if(t.stateNode===null)throw Error(M(166));return et(t),null}e=Zn.current,ss(t)?dg(t,e):(e=zb(r,a,n),t.stateNode=e,ra(t))}return et(t),null;case 5:if(ko(t),n=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==a&&ra(t);else{if(!a){if(t.stateNode===null)throw Error(M(166));return et(t),null}if(e=Zn.current,ss(t))dg(t,e);else{switch(r=Xo(Ba.current),e){case 1:e=r.createElementNS("http://www.w3.org/2000/svg",n);break;case 2:e=r.createElementNS("http://www.w3.org/1998/Math/MathML",n);break;default:switch(n){case"svg":e=r.createElementNS("http://www.w3.org/2000/svg",n);break;case"math":e=r.createElementNS("http://www.w3.org/1998/Math/MathML",n);break;case"script":e=r.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild);break;case"select":e=typeof a.is=="string"?r.createElement("select",{is:a.is}):r.createElement("select"),a.multiple?e.multiple=!0:a.size&&(e.size=a.size);break;default:e=typeof a.is=="string"?r.createElement(n,{is:a.is}):r.createElement(n)}}e[Ht]=t,e[rn]=a;e:for(r=t.child;r!==null;){if(r.tag===5||r.tag===6)e.appendChild(r.stateNode);else if(r.tag!==4&&r.tag!==27&&r.child!==null){r.child.return=r,r=r.child;continue}if(r===t)break e;for(;r.sibling===null;){if(r.return===null||r.return===t)break e;r=r.return}r.sibling.return=r.return,r=r.sibling}t.stateNode=e;e:switch(Lt(e,n,a),n){case"button":case"input":case"select":case"textarea":e=!!a.autoFocus;break e;case"img":e=!0;break e;default:e=!1}e&&ra(t)}}return et(t),t.flags&=-16777217,null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==a&&ra(t);else{if(typeof a!="string"&&t.stateNode===null)throw Error(M(166));if(e=Ba.current,ss(t)){if(e=t.stateNode,n=t.memoizedProps,a=null,r=Qt,r!==null)switch(r.tag){case 27:case 5:a=r.memoizedProps}e[Ht]=t,e=!!(e.nodeValue===n||a!==null&&a.suppressHydrationWarning===!0||Db(e.nodeValue,n)),e||yr(t)}else e=Xo(e).createTextNode(a),e[Ht]=t,t.stateNode=e}return et(t),null;case 13:if(a=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(r=ss(t),a!==null&&a.dehydrated!==null){if(e===null){if(!r)throw Error(M(318));if(r=t.memoizedState,r=r!==null?r.dehydrated:null,!r)throw Error(M(317));r[Ht]=t}else $s(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;et(t),r=!1}else r=pg(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=r),r=!0;if(!r)return t.flags&256?(da(t),t):(da(t),null)}if(da(t),(t.flags&128)!==0)return t.lanes=n,t;if(n=a!==null,e=e!==null&&e.memoizedState!==null,n){a=t.child,r=null,a.alternate!==null&&a.alternate.memoizedState!==null&&a.alternate.memoizedState.cachePool!==null&&(r=a.alternate.memoizedState.cachePool.pool);var i=null;a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(i=a.memoizedState.cachePool.pool),i!==r&&(a.flags|=2048)}return n!==e&&n&&(t.child.flags|=8192),no(t,t.updateQueue),et(t),null;case 4:return yi(),e===null&&qf(t.stateNode.containerInfo),et(t),null;case 10:return pa(t.type),et(t),null;case 19:if(kt(bt),r=t.memoizedState,r===null)return et(t),null;if(a=(t.flags&128)!==0,i=r.rendering,i===null)if(a)os(r,!1);else{if(at!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(i=Uo(e),i!==null){for(t.flags|=128,os(r,!1),e=i.updateQueue,t.updateQueue=e,no(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)Zv(n,e),n=n.sibling;return We(bt,bt.current&1|2),t.child}e=e.sibling}r.tail!==null&&$n()>qo&&(t.flags|=128,a=!0,os(r,!1),t.lanes=4194304)}else{if(!a)if(e=Uo(i),e!==null){if(t.flags|=128,a=!0,e=e.updateQueue,t.updateQueue=e,no(t,e),os(r,!0),r.tail===null&&r.tailMode==="hidden"&&!i.alternate&&!Ae)return et(t),null}else 2*$n()-r.renderingStartTime>qo&&n!==536870912&&(t.flags|=128,a=!0,os(r,!1),t.lanes=4194304);r.isBackwards?(i.sibling=t.child,t.child=i):(e=r.last,e!==null?e.sibling=i:t.child=i,r.last=i)}return r.tail!==null?(t=r.tail,r.rendering=t,r.tail=t.sibling,r.renderingStartTime=$n(),t.sibling=null,e=bt.current,We(bt,a?e&1|2:e&1),t):(et(t),null);case 22:case 23:return da(t),xf(),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&&(et(t),t.subtreeFlags&6&&(t.flags|=8192)):et(t),n=t.updateQueue,n!==null&&no(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&&kt(hr),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),pa(yt),et(t),null;case 25:return null;case 30:return null}throw Error(M(156,t.tag))}function CT(e,t){switch(gf(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return pa(yt),yi(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return ko(t),null;case 13:if(da(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(M(340));$s()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return kt(bt),null;case 4:return yi(),null;case 10:return pa(t.type),null;case 22:case 23:return da(t),xf(),e!==null&&kt(hr),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return pa(yt),null;case 25:return null;default:return null}}function Zy(e,t){switch(gf(t),t.tag){case 3:pa(yt),yi();break;case 26:case 27:case 5:ko(t);break;case 4:yi();break;case 13:da(t);break;case 19:kt(bt);break;case 10:pa(t.type);break;case 22:case 23:da(t),xf(),e!==null&&kt(hr);break;case 24:pa(yt)}}function nl(e,t){try{var n=t.updateQueue,a=n!==null?n.lastEffect:null;if(a!==null){var r=a.next;n=r;do{if((n.tag&e)===e){a=void 0;var i=n.create,s=n.inst;a=i(),s.destroy=a}n=n.next}while(n!==r)}}catch(l){je(t,t.return,l)}}function Qa(e,t,n){try{var a=t.updateQueue,r=a!==null?a.lastEffect:null;if(r!==null){var i=r.next;a=i;do{if((a.tag&e)===e){var s=a.inst,l=s.destroy;if(l!==void 0){s.destroy=void 0,r=t;var o=n,c=l;try{c()}catch(u){je(r,o,u)}}}a=a.next}while(a!==i)}}catch(u){je(t,t.return,u)}}function $y(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{ny(t,n)}catch(a){je(e,e.return,a)}}}function Jy(e,t,n){n.props=Sr(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(a){je(e,t,a)}}function Ts(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(r){je(e,t,r)}}function Fn(e,t){var n=e.ref,a=e.refCleanup;if(n!==null)if(typeof a=="function")try{a()}catch(r){je(e,t,r)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof n=="function")try{n(null)}catch(r){je(e,t,r)}else n.current=null}function Ky(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(r){je(e,e.return,r)}}function Fu(e,t,n){try{var a=e.stateNode;QT(a,e.type,n,t),a[rn]=t}catch(r){je(e,e.return,r)}}function Wy(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&$a(e.type)||e.tag===4}function Zu(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Wy(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&&$a(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 Ud(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=dc));else if(a!==4&&(a===27&&$a(e.type)&&(n=e.stateNode,t=null),e=e.child,e!==null))for(Ud(e,t,n),e=e.sibling;e!==null;)Ud(e,t,n),e=e.sibling}function Ho(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&&$a(e.type)&&(n=e.stateNode),e=e.child,e!==null))for(Ho(e,t,n),e=e.sibling;e!==null;)Ho(e,t,n),e=e.sibling}function eb(e){var t=e.stateNode,n=e.memoizedProps;try{for(var a=e.type,r=t.attributes;r.length;)t.removeAttributeNode(r[0]);Lt(t,a,n),t[Ht]=e,t[rn]=n}catch(i){je(e,e.return,i)}}var sa=!1,ct=!1,$u=!1,Bg=typeof WeakSet=="function"?WeakSet:Set,St=null;function RT(e,t){if(e=e.containerInfo,Yd=$o,e=qv(e),df(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 r=a.anchorOffset,i=a.focusNode;a=a.focusOffset;try{n.nodeType,i.nodeType}catch(y){n=null;break e}var s=0,l=-1,o=-1,c=0,u=0,p=e,f=null;t:for(;;){for(var d;p!==n||r!==0&&p.nodeType!==3||(l=s+r),p!==i||a!==0&&p.nodeType!==3||(o=s+a),p.nodeType===3&&(s+=p.nodeValue.length),(d=p.firstChild)!==null;)f=p,p=d;for(;;){if(p===e)break t;if(f===n&&++c===r&&(l=s),f===i&&++u===a&&(o=s),(d=p.nextSibling)!==null)break;p=f,f=p.parentNode}p=d}n=l===-1||o===-1?null:{start:l,end:o}}else n=null}n=n||{start:0,end:0}}else n=null;for(Gd={focusedElem:e,selectionRange:n},$o=!1,St=t;St!==null;)if(t=St,e=t.child,(t.subtreeFlags&1024)!==0&&e!==null)e.return=t,St=e;else for(;St!==null;){switch(t=St,i=t.alternate,e=t.flags,t.tag){case 0:break;case 11:case 15:break;case 1:if((e&1024)!==0&&i!==null){e=void 0,n=t,r=i.memoizedProps,i=i.memoizedState,a=n.stateNode;try{var x=Sr(n.type,r,n.elementType===n.type);e=a.getSnapshotBeforeUpdate(x,i),a.__reactInternalSnapshotBeforeUpdate=e}catch(y){je(n,n.return,y)}}break;case 3:if((e&1024)!==0){if(e=t.stateNode.containerInfo,n=e.nodeType,n===9)Qd(e);else if(n===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":Qd(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(M(163))}if(e=t.sibling,e!==null){e.return=t.return,St=e;break}St=t.return}}function tb(e,t,n){var a=n.flags;switch(n.tag){case 0:case 11:case 15:wa(e,n),a&4&&nl(5,n);break;case 1:if(wa(e,n),a&4)if(e=n.stateNode,t===null)try{e.componentDidMount()}catch(s){je(n,n.return,s)}else{var r=Sr(n.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(r,t,e.__reactInternalSnapshotBeforeUpdate)}catch(s){je(n,n.return,s)}}a&64&&$y(n),a&512&&Ts(n,n.return);break;case 3:if(wa(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{ny(e,t)}catch(s){je(n,n.return,s)}}break;case 27:t===null&&a&4&&eb(n);case 26:case 5:wa(e,n),t===null&&a&4&&Ky(n),a&512&&Ts(n,n.return);break;case 12:wa(e,n);break;case 13:wa(e,n),a&4&&rb(e,n),a&64&&(e=n.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(n=BT.bind(null,n),ew(e,n))));break;case 22:if(a=n.memoizedState!==null||sa,!a){t=t!==null&&t.memoizedState!==null||ct,r=sa;var i=ct;sa=a,(ct=t)&&!i?Aa(e,n,(n.subtreeFlags&8772)!==0):wa(e,n),sa=r,ct=i}break;case 30:break;default:wa(e,n)}}function nb(e){var t=e.alternate;t!==null&&(e.alternate=null,nb(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&rf(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 Ke=null,nn=!1;function ia(e,t,n){for(n=n.child;n!==null;)ab(e,t,n),n=n.sibling}function ab(e,t,n){if(vn&&typeof vn.onCommitFiberUnmount=="function")try{vn.onCommitFiberUnmount(Gs,n)}catch(i){}switch(n.tag){case 26:ct||Fn(n,t),ia(e,t,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&(n=n.stateNode,n.parentNode.removeChild(n));break;case 27:ct||Fn(n,t);var a=Ke,r=nn;$a(n.type)&&(Ke=n.stateNode,nn=!1),ia(e,t,n),Rs(n.stateNode),Ke=a,nn=r;break;case 5:ct||Fn(n,t);case 6:if(a=Ke,r=nn,Ke=null,ia(e,t,n),Ke=a,nn=r,Ke!==null)if(nn)try{(Ke.nodeType===9?Ke.body:Ke.nodeName==="HTML"?Ke.ownerDocument.body:Ke).removeChild(n.stateNode)}catch(i){je(n,t,i)}else try{Ke.removeChild(n.stateNode)}catch(i){je(n,t,i)}break;case 18:Ke!==null&&(nn?(e=Ke,Kg(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,n.stateNode),Is(e)):Kg(Ke,n.stateNode));break;case 4:a=Ke,r=nn,Ke=n.stateNode.containerInfo,nn=!0,ia(e,t,n),Ke=a,nn=r;break;case 0:case 11:case 14:case 15:ct||Qa(2,n,t),ct||Qa(4,n,t),ia(e,t,n);break;case 1:ct||(Fn(n,t),a=n.stateNode,typeof a.componentWillUnmount=="function"&&Jy(n,t,a)),ia(e,t,n);break;case 21:ia(e,t,n);break;case 22:ct=(a=ct)||n.memoizedState!==null,ia(e,t,n),ct=a;break;default:ia(e,t,n)}}function rb(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Is(e)}catch(n){je(t,t.return,n)}}function _T(e){switch(e.tag){case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new Bg),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new Bg),t;default:throw Error(M(435,e.tag))}}function Ju(e,t){var n=_T(e);t.forEach(function(a){var r=VT.bind(null,e,a);n.has(a)||(n.add(a),a.then(r,r))})}function pn(e,t){var n=t.deletions;if(n!==null)for(var a=0;a<n.length;a++){var r=n[a],i=e,s=t,l=s;e:for(;l!==null;){switch(l.tag){case 27:if($a(l.type)){Ke=l.stateNode,nn=!1;break e}break;case 5:Ke=l.stateNode,nn=!1;break e;case 3:case 4:Ke=l.stateNode.containerInfo,nn=!0;break e}l=l.return}if(Ke===null)throw Error(M(160));ab(i,s,r),Ke=null,nn=!1,i=r.alternate,i!==null&&(i.return=null),r.return=null}if(t.subtreeFlags&13878)for(t=t.child;t!==null;)ib(t,e),t=t.sibling}var Hn=null;function ib(e,t){var n=e.alternate,a=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:pn(t,e),mn(e),a&4&&(Qa(3,e,e.return),nl(3,e),Qa(5,e,e.return));break;case 1:pn(t,e),mn(e),a&512&&(ct||n===null||Fn(n,n.return)),a&64&&sa&&(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 r=Hn;if(pn(t,e),mn(e),a&512&&(ct||n===null||Fn(n,n.return)),a&4){var i=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,r=r.ownerDocument||r;t:switch(a){case"title":i=r.getElementsByTagName("title")[0],(!i||i[Fs]||i[Ht]||i.namespaceURI==="http://www.w3.org/2000/svg"||i.hasAttribute("itemprop"))&&(i=r.createElement(a),r.head.insertBefore(i,r.querySelector("head > title"))),Lt(i,a,n),i[Ht]=e,Nt(i),a=i;break e;case"link":var s=av("link","href",r).get(a+(n.href||""));if(s){for(var l=0;l<s.length;l++)if(i=s[l],i.getAttribute("href")===(n.href==null||n.href===""?null:n.href)&&i.getAttribute("rel")===(n.rel==null?null:n.rel)&&i.getAttribute("title")===(n.title==null?null:n.title)&&i.getAttribute("crossorigin")===(n.crossOrigin==null?null:n.crossOrigin)){s.splice(l,1);break t}}i=r.createElement(a),Lt(i,a,n),r.head.appendChild(i);break;case"meta":if(s=av("meta","content",r).get(a+(n.content||""))){for(l=0;l<s.length;l++)if(i=s[l],i.getAttribute("content")===(n.content==null?null:""+n.content)&&i.getAttribute("name")===(n.name==null?null:n.name)&&i.getAttribute("property")===(n.property==null?null:n.property)&&i.getAttribute("http-equiv")===(n.httpEquiv==null?null:n.httpEquiv)&&i.getAttribute("charset")===(n.charSet==null?null:n.charSet)){s.splice(l,1);break t}}i=r.createElement(a),Lt(i,a,n),r.head.appendChild(i);break;default:throw Error(M(468,a))}i[Ht]=e,Nt(i),a=i}e.stateNode=a}else rv(r,e.type,e.stateNode);else e.stateNode=nv(r,a,e.memoizedProps);else i!==a?(i===null?n.stateNode!==null&&(n=n.stateNode,n.parentNode.removeChild(n)):i.count--,a===null?rv(r,e.type,e.stateNode):nv(r,a,e.memoizedProps)):a===null&&e.stateNode!==null&&Fu(e,e.memoizedProps,n.memoizedProps)}break;case 27:pn(t,e),mn(e),a&512&&(ct||n===null||Fn(n,n.return)),n!==null&&a&4&&Fu(e,e.memoizedProps,n.memoizedProps);break;case 5:if(pn(t,e),mn(e),a&512&&(ct||n===null||Fn(n,n.return)),e.flags&32){r=e.stateNode;try{xi(r,"")}catch(d){je(e,e.return,d)}}a&4&&e.stateNode!=null&&(r=e.memoizedProps,Fu(e,r,n!==null?n.memoizedProps:r)),a&1024&&($u=!0);break;case 6:if(pn(t,e),mn(e),a&4){if(e.stateNode===null)throw Error(M(162));a=e.memoizedProps,n=e.stateNode;try{n.nodeValue=a}catch(d){je(e,e.return,d)}}break;case 3:if(xo=null,r=Hn,Hn=Qo(t.containerInfo),pn(t,e),Hn=r,mn(e),a&4&&n!==null&&n.memoizedState.isDehydrated)try{Is(t.containerInfo)}catch(d){je(e,e.return,d)}$u&&($u=!1,sb(e));break;case 4:a=Hn,Hn=Qo(e.stateNode.containerInfo),pn(t,e),mn(e),Hn=a;break;case 12:pn(t,e),mn(e);break;case 13:pn(t,e),mn(e),e.child.flags&8192&&e.memoizedState!==null!=(n!==null&&n.memoizedState!==null)&&(Bf=$n()),a&4&&(a=e.updateQueue,a!==null&&(e.updateQueue=null,Ju(e,a)));break;case 22:r=e.memoizedState!==null;var o=n!==null&&n.memoizedState!==null,c=sa,u=ct;if(sa=c||r,ct=u||o,pn(t,e),ct=u,sa=c,mn(e),a&8192)e:for(t=e.stateNode,t._visibility=r?t._visibility&-2:t._visibility|1,r&&(n===null||o||sa||ct||ur(e)),n=null,t=e;;){if(t.tag===5||t.tag===26){if(n===null){o=n=t;try{if(i=o.stateNode,r)s=i.style,typeof s.setProperty=="function"?s.setProperty("display","none","important"):s.display="none";else{l=o.stateNode;var p=o.memoizedProps.style,f=p!=null&&p.hasOwnProperty("display")?p.display:null;l.style.display=f==null||typeof f=="boolean"?"":(""+f).trim()}}catch(d){je(o,o.return,d)}}}else if(t.tag===6){if(n===null){o=t;try{o.stateNode.nodeValue=r?"":o.memoizedProps}catch(d){je(o,o.return,d)}}}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,Ju(e,n))));break;case 19:pn(t,e),mn(e),a&4&&(a=e.updateQueue,a!==null&&(e.updateQueue=null,Ju(e,a)));break;case 30:break;case 21:break;default:pn(t,e),mn(e)}}function mn(e){var t=e.flags;if(t&2){try{for(var n,a=e.return;a!==null;){if(Wy(a)){n=a;break}a=a.return}if(n==null)throw Error(M(160));switch(n.tag){case 27:var r=n.stateNode,i=Zu(e);Ho(e,i,r);break;case 5:var s=n.stateNode;n.flags&32&&(xi(s,""),n.flags&=-33);var l=Zu(e);Ho(e,l,s);break;case 3:case 4:var o=n.stateNode.containerInfo,c=Zu(e);Ud(e,c,o);break;default:throw Error(M(161))}}catch(u){je(e,e.return,u)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function sb(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;sb(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function wa(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)tb(e,t.alternate,t),t=t.sibling}function ur(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:Qa(4,t,t.return),ur(t);break;case 1:Fn(t,t.return);var n=t.stateNode;typeof n.componentWillUnmount=="function"&&Jy(t,t.return,n),ur(t);break;case 27:Rs(t.stateNode);case 26:case 5:Fn(t,t.return),ur(t);break;case 22:t.memoizedState===null&&ur(t);break;case 30:ur(t);break;default:ur(t)}e=e.sibling}}function Aa(e,t,n){for(n=n&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var a=t.alternate,r=e,i=t,s=i.flags;switch(i.tag){case 0:case 11:case 15:Aa(r,i,n),nl(4,i);break;case 1:if(Aa(r,i,n),a=i,r=a.stateNode,typeof r.componentDidMount=="function")try{r.componentDidMount()}catch(c){je(a,a.return,c)}if(a=i,r=a.updateQueue,r!==null){var l=a.stateNode;try{var o=r.shared.hiddenCallbacks;if(o!==null)for(r.shared.hiddenCallbacks=null,r=0;r<o.length;r++)ty(o[r],l)}catch(c){je(a,a.return,c)}}n&&s&64&&$y(i),Ts(i,i.return);break;case 27:eb(i);case 26:case 5:Aa(r,i,n),n&&a===null&&s&4&&Ky(i),Ts(i,i.return);break;case 12:Aa(r,i,n);break;case 13:Aa(r,i,n),n&&s&4&&rb(r,i);break;case 22:i.memoizedState===null&&Aa(r,i,n),Ts(i,i.return);break;case 30:break;default:Aa(r,i,n)}t=t.sibling}}function zf(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&&Ks(n))}function Mf(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Ks(e))}function Xn(e,t,n,a){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)lb(e,t,n,a),t=t.sibling}function lb(e,t,n,a){var r=t.flags;switch(t.tag){case 0:case 11:case 15:Xn(e,t,n,a),r&2048&&nl(9,t);break;case 1:Xn(e,t,n,a);break;case 3:Xn(e,t,n,a),r&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Ks(e)));break;case 12:if(r&2048){Xn(e,t,n,a),e=t.stateNode;try{var i=t.memoizedProps,s=i.id,l=i.onPostCommit;typeof l=="function"&&l(s,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(o){je(t,t.return,o)}}else Xn(e,t,n,a);break;case 13:Xn(e,t,n,a);break;case 23:break;case 22:i=t.stateNode,s=t.alternate,t.memoizedState!==null?i._visibility&2?Xn(e,t,n,a):ws(e,t):i._visibility&2?Xn(e,t,n,a):(i._visibility|=2,$r(e,t,n,a,(t.subtreeFlags&10256)!==0)),r&2048&&zf(s,t);break;case 24:Xn(e,t,n,a),r&2048&&Mf(t.alternate,t);break;default:Xn(e,t,n,a)}}function $r(e,t,n,a,r){for(r=r&&(t.subtreeFlags&10256)!==0,t=t.child;t!==null;){var i=e,s=t,l=n,o=a,c=s.flags;switch(s.tag){case 0:case 11:case 15:$r(i,s,l,o,r),nl(8,s);break;case 23:break;case 22:var u=s.stateNode;s.memoizedState!==null?u._visibility&2?$r(i,s,l,o,r):ws(i,s):(u._visibility|=2,$r(i,s,l,o,r)),r&&c&2048&&zf(s.alternate,s);break;case 24:$r(i,s,l,o,r),r&&c&2048&&Mf(s.alternate,s);break;default:$r(i,s,l,o,r)}t=t.sibling}}function ws(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var n=e,a=t,r=a.flags;switch(a.tag){case 22:ws(n,a),r&2048&&zf(a.alternate,a);break;case 24:ws(n,a),r&2048&&Mf(a.alternate,a);break;default:ws(n,a)}t=t.sibling}}var hs=8192;function Qr(e){if(e.subtreeFlags&hs)for(e=e.child;e!==null;)ob(e),e=e.sibling}function ob(e){switch(e.tag){case 26:Qr(e),e.flags&hs&&e.memoizedState!==null&&pw(Hn,e.memoizedState,e.memoizedProps);break;case 5:Qr(e);break;case 3:case 4:var t=Hn;Hn=Qo(e.stateNode.containerInfo),Qr(e),Hn=t;break;case 22:e.memoizedState===null&&(t=e.alternate,t!==null&&t.memoizedState!==null?(t=hs,hs=16777216,Qr(e),hs=t):Qr(e));break;default:Qr(e)}}function cb(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 cs(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];St=a,db(a,e)}cb(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)ub(e),e=e.sibling}function ub(e){switch(e.tag){case 0:case 11:case 15:cs(e),e.flags&2048&&Qa(9,e,e.return);break;case 3:cs(e);break;case 12:cs(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,yo(e)):cs(e);break;default:cs(e)}}function yo(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];St=a,db(a,e)}cb(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Qa(8,t,t.return),yo(t);break;case 22:n=t.stateNode,n._visibility&2&&(n._visibility&=-3,yo(t));break;default:yo(t)}e=e.sibling}}function db(e,t){for(;St!==null;){var n=St;switch(n.tag){case 0:case 11:case 15:Qa(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:Ks(n.memoizedState.cache)}if(a=n.child,a!==null)a.return=n,St=a;else e:for(n=e;St!==null;){a=St;var r=a.sibling,i=a.return;if(nb(a),a===n){St=null;break e}if(r!==null){r.return=i,St=r;break e}St=i}}}var DT={getCacheForType:function(e){var t=qt(yt),n=t.data.get(e);return n===void 0&&(n=e(),t.data.set(e,n)),n}},OT=typeof WeakMap=="function"?WeakMap:Map,Oe=0,Ye=null,Se=null,ke=0,De=0,hn=null,Ua=!1,Oi=!1,Uf=!1,va=0,at=0,Fa=0,gr=0,Pf=0,On=0,Ti=0,As=null,an=null,Pd=!1,Bf=0,qo=1/0,jo=null,qa=null,Ot=0,ja=null,wi=null,vi=0,Bd=0,Vd=null,fb=null,Cs=0,Hd=null;function bn(){if((Oe&2)!==0&&ke!==0)return ke&-ke;if(ue.T!==null){var e=Si;return e!==0?e:Hf()}return Ev()}function pb(){On===0&&(On=(ke&536870912)===0||Ae?bv():536870912);var e=Ln.current;return e!==null&&(e.flags|=32),On}function xn(e,t,n){(e===Ye&&(De===2||De===9)||e.cancelPendingCommit!==null)&&(Ai(e,0),Pa(e,ke,On,!1)),Qs(e,n),((Oe&2)===0||e!==Ye)&&(e===Ye&&((Oe&2)===0&&(gr|=n),at===4&&Pa(e,ke,On,!1)),Wn(e))}function mb(e,t,n){if((Oe&6)!==0)throw Error(M(327));var a=!n&&(t&124)===0&&(t&e.expiredLanes)===0||Xs(e,t),r=a?MT(e,t):Ku(e,t,!0),i=a;do{if(r===0){Oi&&!a&&Pa(e,t,0,!1);break}else{if(n=e.current.alternate,i&&!LT(n)){r=Ku(e,t,!1),i=!1;continue}if(r===2){if(i=t,e.errorRecoveryDisabledLanes&i)var s=0;else s=e.pendingLanes&-536870913,s=s!==0?s:s&536870912?536870912:0;if(s!==0){t=s;e:{var l=e;r=As;var o=l.current.memoizedState.isDehydrated;if(o&&(Ai(l,s).flags|=256),s=Ku(l,s,!1),s!==2){if(Uf&&!o){l.errorRecoveryDisabledLanes|=i,gr|=i,r=4;break e}i=an,an=r,i!==null&&(an===null?an=i:an.push.apply(an,i))}r=s}if(i=!1,r!==2)continue}}if(r===1){Ai(e,0),Pa(e,t,0,!0);break}e:{switch(a=e,i=r,i){case 0:case 1:throw Error(M(345));case 4:if((t&4194048)!==t)break;case 6:Pa(a,t,On,!Ua);break e;case 2:an=null;break;case 3:case 5:break;default:throw Error(M(329))}if((t&62914560)===t&&(r=Bf+300-$n(),10<r)){if(Pa(a,t,On,!Ua),Ko(a,0,!0)!==0)break e;a.timeoutHandle=Lb(Vg.bind(null,a,n,an,jo,Pd,t,On,gr,Ti,Ua,i,2,-0,0),r);break e}Vg(a,n,an,jo,Pd,t,On,gr,Ti,Ua,i,0,-0,0)}}break}while(!0);Wn(e)}function Vg(e,t,n,a,r,i,s,l,o,c,u,p,f,d){if(e.timeoutHandle=-1,p=t.subtreeFlags,(p&8192||(p&16785408)===16785408)&&(Vs={stylesheets:null,count:0,unsuspend:fw},ob(t),p=mw(),p!==null)){e.cancelPendingCommit=p(qg.bind(null,e,t,i,n,a,r,s,l,o,u,1,f,d)),Pa(e,i,s,!c);return}qg(e,t,i,n,a,r,s,l,o)}function LT(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 r=n[a],i=r.getSnapshot;r=r.value;try{if(!Sn(i(),r))return!1}catch(s){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 Pa(e,t,n,a){t&=~Pf,t&=~gr,e.suspendedLanes|=t,e.pingedLanes&=~t,a&&(e.warmLanes|=t),a=e.expirationTimes;for(var r=t;0<r;){var i=31-yn(r),s=1<<i;a[i]=-1,r&=~s}n!==0&&Sv(e,n,t)}function oc(){return(Oe&6)===0?(al(0,!1),!1):!0}function Vf(){if(Se!==null){if(De===0)var e=Se.return;else e=Se,ua=Tr=null,Tf(e),gi=null,Us=0,e=Se;for(;e!==null;)Zy(e.alternate,e),e=e.return;Se=null}}function Ai(e,t){var n=e.timeoutHandle;n!==-1&&(e.timeoutHandle=-1,ZT(n)),n=e.cancelPendingCommit,n!==null&&(e.cancelPendingCommit=null,n()),Vf(),Ye=e,Se=n=fa(e.current,null),ke=t,De=0,hn=null,Ua=!1,Oi=Xs(e,t),Uf=!1,Ti=On=Pf=gr=Fa=at=0,an=As=null,Pd=!1,(t&8)!==0&&(t|=t&32);var a=e.entangledLanes;if(a!==0)for(e=e.entanglements,a&=t;0<a;){var r=31-yn(a),i=1<<r;t|=e[r],a&=~i}return va=t,nc(),n}function hb(e,t){ye=null,ue.H=Mo,t===Ws||t===rc?(t=vg(),De=3):t===Wv?(t=vg(),De=4):De=t===Iy?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,hn=t,Se===null&&(at=1,Bo(e,Dn(t,e.current)))}function gb(){var e=ue.H;return ue.H=Mo,e===null?Mo:e}function vb(){var e=ue.A;return ue.A=DT,e}function qd(){at=4,Ua||(ke&4194048)!==ke&&Ln.current!==null||(Oi=!0),(Fa&134217727)===0&&(gr&134217727)===0||Ye===null||Pa(Ye,ke,On,!1)}function Ku(e,t,n){var a=Oe;Oe|=2;var r=gb(),i=vb();(Ye!==e||ke!==t)&&(jo=null,Ai(e,t)),t=!1;var s=at;e:do try{if(De!==0&&Se!==null){var l=Se,o=hn;switch(De){case 8:Vf(),s=6;break e;case 3:case 2:case 9:case 6:Ln.current===null&&(t=!0);var c=De;if(De=0,hn=null,ci(e,l,o,c),n&&Oi){s=0;break e}break;default:c=De,De=0,hn=null,ci(e,l,o,c)}}zT(),s=at;break}catch(u){hb(e,u)}while(!0);return t&&e.shellSuspendCounter++,ua=Tr=null,Oe=a,ue.H=r,ue.A=i,Se===null&&(Ye=null,ke=0,nc()),s}function zT(){for(;Se!==null;)yb(Se)}function MT(e,t){var n=Oe;Oe|=2;var a=gb(),r=vb();Ye!==e||ke!==t?(jo=null,qo=$n()+500,Ai(e,t)):Oi=Xs(e,t);e:do try{if(De!==0&&Se!==null){t=Se;var i=hn;t:switch(De){case 1:De=0,hn=null,ci(e,t,i,1);break;case 2:case 9:if(gg(i)){De=0,hn=null,Hg(t);break}t=function(){De!==2&&De!==9||Ye!==e||(De=7),Wn(e)},i.then(t,t);break e;case 3:De=7;break e;case 4:De=5;break e;case 7:gg(i)?(De=0,hn=null,Hg(t)):(De=0,hn=null,ci(e,t,i,7));break;case 5:var s=null;switch(Se.tag){case 26:s=Se.memoizedState;case 5:case 27:var l=Se;if(!s||Pb(s)){De=0,hn=null;var o=l.sibling;if(o!==null)Se=o;else{var c=l.return;c!==null?(Se=c,cc(c)):Se=null}break t}}De=0,hn=null,ci(e,t,i,5);break;case 6:De=0,hn=null,ci(e,t,i,6);break;case 8:Vf(),at=6;break e;default:throw Error(M(462))}}UT();break}catch(u){hb(e,u)}while(!0);return ua=Tr=null,ue.H=a,ue.A=r,Oe=n,Se!==null?0:(Ye=null,ke=0,nc(),at)}function UT(){for(;Se!==null&&!rk();)yb(Se)}function yb(e){var t=Fy(e.alternate,e,va);e.memoizedProps=e.pendingProps,t===null?cc(e):Se=t}function Hg(e){var t=e,n=t.alternate;switch(t.tag){case 15:case 0:t=Lg(n,t,t.pendingProps,t.type,void 0,ke);break;case 11:t=Lg(n,t,t.pendingProps,t.type.render,t.ref,ke);break;case 5:Tf(t);default:Zy(n,t),t=Se=Zv(t,va),t=Fy(n,t,va)}e.memoizedProps=e.pendingProps,t===null?cc(e):Se=t}function ci(e,t,n,a){ua=Tr=null,Tf(t),gi=null,Us=0;var r=t.return;try{if(TT(e,r,t,n,ke)){at=1,Bo(e,Dn(n,e.current)),Se=null;return}}catch(i){if(r!==null)throw Se=r,i;at=1,Bo(e,Dn(n,e.current)),Se=null;return}t.flags&32768?(Ae||a===1?e=!0:Oi||(ke&536870912)!==0?e=!1:(Ua=e=!0,(a===2||a===9||a===3||a===6)&&(a=Ln.current,a!==null&&a.tag===13&&(a.flags|=16384))),bb(t,e)):cc(t)}function cc(e){var t=e;do{if((t.flags&32768)!==0){bb(t,Ua);return}e=t.return;var n=AT(t.alternate,t,va);if(n!==null){Se=n;return}if(t=t.sibling,t!==null){Se=t;return}Se=t=e}while(t!==null);at===0&&(at=5)}function bb(e,t){do{var n=CT(e.alternate,e);if(n!==null){n.flags&=32767,Se=n;return}if(n=e.return,n!==null&&(n.flags|=32768,n.subtreeFlags=0,n.deletions=null),!t&&(e=e.sibling,e!==null)){Se=e;return}Se=e=n}while(e!==null);at=6,Se=null}function qg(e,t,n,a,r,i,s,l,o){e.cancelPendingCommit=null;do uc();while(Ot!==0);if((Oe&6)!==0)throw Error(M(327));if(t!==null){if(t===e.current)throw Error(M(177));if(i=t.lanes|t.childLanes,i|=ff,mk(e,n,i,s,l,o),e===Ye&&(Se=Ye=null,ke=0),wi=t,ja=e,vi=n,Bd=i,Vd=r,fb=a,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,HT(To,function(){return kb(!0),null})):(e.callbackNode=null,e.callbackPriority=0),a=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||a){a=ue.T,ue.T=null,r=Ce.p,Ce.p=2,s=Oe,Oe|=4;try{RT(e,t,n)}finally{Oe=s,Ce.p=r,ue.T=a}}Ot=1,xb(),Sb(),Nb()}}function xb(){if(Ot===1){Ot=0;var e=ja,t=wi,n=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||n){n=ue.T,ue.T=null;var a=Ce.p;Ce.p=2;var r=Oe;Oe|=4;try{ib(t,e);var i=Gd,s=qv(e.containerInfo),l=i.focusedElem,o=i.selectionRange;if(s!==l&&l&&l.ownerDocument&&Hv(l.ownerDocument.documentElement,l)){if(o!==null&&df(l)){var c=o.start,u=o.end;if(u===void 0&&(u=c),"selectionStart"in l)l.selectionStart=c,l.selectionEnd=Math.min(u,l.value.length);else{var p=l.ownerDocument||document,f=p&&p.defaultView||window;if(f.getSelection){var d=f.getSelection(),x=l.textContent.length,y=Math.min(o.start,x),k=o.end===void 0?y:Math.min(o.end,x);!d.extend&&y>k&&(s=k,k=y,y=s);var m=og(l,y),h=og(l,k);if(m&&h&&(d.rangeCount!==1||d.anchorNode!==m.node||d.anchorOffset!==m.offset||d.focusNode!==h.node||d.focusOffset!==h.offset)){var g=p.createRange();g.setStart(m.node,m.offset),d.removeAllRanges(),y>k?(d.addRange(g),d.extend(h.node,h.offset)):(g.setEnd(h.node,h.offset),d.addRange(g))}}}}for(p=[],d=l;d=d.parentNode;)d.nodeType===1&&p.push({element:d,left:d.scrollLeft,top:d.scrollTop});for(typeof l.focus=="function"&&l.focus(),l=0;l<p.length;l++){var S=p[l];S.element.scrollLeft=S.left,S.element.scrollTop=S.top}}$o=!!Yd,Gd=Yd=null}finally{Oe=r,Ce.p=a,ue.T=n}}e.current=t,Ot=2}}function Sb(){if(Ot===2){Ot=0;var e=ja,t=wi,n=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||n){n=ue.T,ue.T=null;var a=Ce.p;Ce.p=2;var r=Oe;Oe|=4;try{tb(e,t.alternate,t)}finally{Oe=r,Ce.p=a,ue.T=n}}Ot=3}}function Nb(){if(Ot===4||Ot===3){Ot=0,ik();var e=ja,t=wi,n=vi,a=fb;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?Ot=5:(Ot=0,wi=ja=null,Eb(e,e.pendingLanes));var r=e.pendingLanes;if(r===0&&(qa=null),af(n),t=t.stateNode,vn&&typeof vn.onCommitFiberRoot=="function")try{vn.onCommitFiberRoot(Gs,t,void 0,(t.current.flags&128)===128)}catch(o){}if(a!==null){t=ue.T,r=Ce.p,Ce.p=2,ue.T=null;try{for(var i=e.onRecoverableError,s=0;s<a.length;s++){var l=a[s];i(l.value,{componentStack:l.stack})}}finally{ue.T=t,Ce.p=r}}(vi&3)!==0&&uc(),Wn(e),r=e.pendingLanes,(n&4194090)!==0&&(r&42)!==0?e===Hd?Cs++:(Cs=0,Hd=e):Cs=0,al(0,!1)}}function Eb(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,Ks(t)))}function uc(e){return xb(),Sb(),Nb(),kb(e)}function kb(){if(Ot!==5)return!1;var e=ja,t=Bd;Bd=0;var n=af(vi),a=ue.T,r=Ce.p;try{Ce.p=32>n?32:n,ue.T=null,n=Vd,Vd=null;var i=ja,s=vi;if(Ot=0,wi=ja=null,vi=0,(Oe&6)!==0)throw Error(M(331));var l=Oe;if(Oe|=4,ub(i.current),lb(i,i.current,s,n),Oe=l,al(0,!1),vn&&typeof vn.onPostCommitFiberRoot=="function")try{vn.onPostCommitFiberRoot(Gs,i)}catch(o){}return!0}finally{Ce.p=r,ue.T=a,Eb(e,t)}}function jg(e,t,n){t=Dn(n,t),t=Ld(e.stateNode,t,2),e=Ha(e,t,2),e!==null&&(Qs(e,2),Wn(e))}function je(e,t,n){if(e.tag===3)jg(e,e,n);else for(;t!==null;){if(t.tag===3){jg(t,e,n);break}else if(t.tag===1){var a=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof a.componentDidCatch=="function"&&(qa===null||!qa.has(a))){e=Dn(n,e),n=qy(2),a=Ha(t,n,2),a!==null&&(jy(n,a,t,e),Qs(a,2),Wn(a));break}}t=t.return}}function Wu(e,t,n){var a=e.pingCache;if(a===null){a=e.pingCache=new OT;var r=new Set;a.set(t,r)}else r=a.get(t),r===void 0&&(r=new Set,a.set(t,r));r.has(n)||(Uf=!0,r.add(n),e=PT.bind(null,e,t,n),t.then(e,e))}function PT(e,t,n){var a=e.pingCache;a!==null&&a.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,Ye===e&&(ke&n)===n&&(at===4||at===3&&(ke&62914560)===ke&&300>$n()-Bf?(Oe&2)===0&&Ai(e,0):Pf|=n,Ti===ke&&(Ti=0)),Wn(e)}function Tb(e,t){t===0&&(t=xv()),e=Di(e,t),e!==null&&(Qs(e,t),Wn(e))}function BT(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Tb(e,n)}function VT(e,t){var n=0;switch(e.tag){case 13:var a=e.stateNode,r=e.memoizedState;r!==null&&(n=r.retryLane);break;case 19:a=e.stateNode;break;case 22:a=e.stateNode._retryCache;break;default:throw Error(M(314))}a!==null&&a.delete(t),Tb(e,n)}function HT(e,t){return tf(e,t)}var Io=null,Jr=null,jd=!1,Yo=!1,ed=!1,vr=0;function Wn(e){e!==Jr&&e.next===null&&(Jr===null?Io=Jr=e:Jr=Jr.next=e),Yo=!0,jd||(jd=!0,jT())}function al(e,t){if(!ed&&Yo){ed=!0;do for(var n=!1,a=Io;a!==null;){if(!t)if(e!==0){var r=a.pendingLanes;if(r===0)var i=0;else{var s=a.suspendedLanes,l=a.pingedLanes;i=(1<<31-yn(42|e)+1)-1,i&=r&~(s&~l),i=i&201326741?i&201326741|1:i?i|2:0}i!==0&&(n=!0,Ig(a,i))}else i=ke,i=Ko(a,a===Ye?i:0,a.cancelPendingCommit!==null||a.timeoutHandle!==-1),(i&3)===0||Xs(a,i)||(n=!0,Ig(a,i));a=a.next}while(n);ed=!1}}function qT(){wb()}function wb(){Yo=jd=!1;var e=0;vr!==0&&(FT()&&(e=vr),vr=0);for(var t=$n(),n=null,a=Io;a!==null;){var r=a.next,i=Ab(a,t);i===0?(a.next=null,n===null?Io=r:n.next=r,r===null&&(Jr=n)):(n=a,(e!==0||(i&3)!==0)&&(Yo=!0)),a=r}al(e,!1)}function Ab(e,t){for(var n=e.suspendedLanes,a=e.pingedLanes,r=e.expirationTimes,i=e.pendingLanes&-62914561;0<i;){var s=31-yn(i),l=1<<s,o=r[s];o===-1?((l&n)===0||(l&a)!==0)&&(r[s]=pk(l,t)):o<=t&&(e.expiredLanes|=l),i&=~l}if(t=Ye,n=ke,n=Ko(e,e===t?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),a=e.callbackNode,n===0||e===t&&(De===2||De===9)||e.cancelPendingCommit!==null)return a!==null&&a!==null&&Au(a),e.callbackNode=null,e.callbackPriority=0;if((n&3)===0||Xs(e,n)){if(t=n&-n,t===e.callbackPriority)return t;switch(a!==null&&Au(a),af(n)){case 2:case 8:n=vv;break;case 32:n=To;break;case 268435456:n=yv;break;default:n=To}return a=Cb.bind(null,e),n=tf(n,a),e.callbackPriority=t,e.callbackNode=n,t}return a!==null&&a!==null&&Au(a),e.callbackPriority=2,e.callbackNode=null,2}function Cb(e,t){if(Ot!==0&&Ot!==5)return e.callbackNode=null,e.callbackPriority=0,null;var n=e.callbackNode;if(uc(!0)&&e.callbackNode!==n)return null;var a=ke;return a=Ko(e,e===Ye?a:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),a===0?null:(mb(e,a,t),Ab(e,$n()),e.callbackNode!=null&&e.callbackNode===n?Cb.bind(null,e):null)}function Ig(e,t){if(uc())return null;mb(e,t,!0)}function jT(){$T(function(){(Oe&6)!==0?tf(gv,qT):wb()})}function Hf(){return vr===0&&(vr=bv()),vr}function Yg(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:co(""+e)}function Gg(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 IT(e,t,n,a,r){if(t==="submit"&&n&&n.stateNode===r){var i=Yg((r[rn]||null).action),s=a.submitter;s&&(t=(t=s[rn]||null)?Yg(t.formAction):s.getAttribute("formAction"),t!==null&&(i=t,s=null));var l=new Wo("action","action",null,a,r);e.push({event:l,listeners:[{instance:null,listener:function(){if(a.defaultPrevented){if(vr!==0){var o=s?Gg(r,s):new FormData(r);Dd(n,{pending:!0,data:o,method:r.method,action:i},null,o)}}else typeof i=="function"&&(l.preventDefault(),o=s?Gg(r,s):new FormData(r),Dd(n,{pending:!0,data:o,method:r.method,action:i},i,o))},currentTarget:r}]})}}for(ao=0;ao<bd.length;ao++)ro=bd[ao],Xg=ro.toLowerCase(),Qg=ro[0].toUpperCase()+ro.slice(1),jn(Xg,"on"+Qg);var ro,Xg,Qg,ao;jn(Iv,"onAnimationEnd");jn(Yv,"onAnimationIteration");jn(Gv,"onAnimationStart");jn("dblclick","onDoubleClick");jn("focusin","onFocus");jn("focusout","onBlur");jn(oT,"onTransitionRun");jn(cT,"onTransitionStart");jn(uT,"onTransitionCancel");jn(Xv,"onTransitionEnd");bi("onMouseEnter",["mouseout","mouseover"]);bi("onMouseLeave",["mouseout","mouseover"]);bi("onPointerEnter",["pointerout","pointerover"]);bi("onPointerLeave",["pointerout","pointerover"]);Nr("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));Nr("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));Nr("onBeforeInput",["compositionend","keypress","textInput","paste"]);Nr("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));Nr("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));Nr("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Ps="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(" "),YT=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Ps));function Rb(e,t){t=(t&4)!==0;for(var n=0;n<e.length;n++){var a=e[n],r=a.event;a=a.listeners;e:{var i=void 0;if(t)for(var s=a.length-1;0<=s;s--){var l=a[s],o=l.instance,c=l.currentTarget;if(l=l.listener,o!==i&&r.isPropagationStopped())break e;i=l,r.currentTarget=c;try{i(r)}catch(u){Po(u)}r.currentTarget=null,i=o}else for(s=0;s<a.length;s++){if(l=a[s],o=l.instance,c=l.currentTarget,l=l.listener,o!==i&&r.isPropagationStopped())break e;i=l,r.currentTarget=c;try{i(r)}catch(u){Po(u)}r.currentTarget=null,i=o}}}}function xe(e,t){var n=t[fd];n===void 0&&(n=t[fd]=new Set);var a=e+"__bubble";n.has(a)||(_b(t,e,2,!1),n.add(a))}function td(e,t,n){var a=0;t&&(a|=4),_b(n,e,a,t)}var io="_reactListening"+Math.random().toString(36).slice(2);function qf(e){if(!e[io]){e[io]=!0,kv.forEach(function(n){n!=="selectionchange"&&(YT.has(n)||td(n,!1,e),td(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[io]||(t[io]=!0,td("selectionchange",!1,t))}}function _b(e,t,n,a){switch(jb(t)){case 2:var r=vw;break;case 8:r=yw;break;default:r=Gf}n=r.bind(null,t,n,e),r=void 0,!gd||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(r=!0),a?r!==void 0?e.addEventListener(t,n,{capture:!0,passive:r}):e.addEventListener(t,n,!0):r!==void 0?e.addEventListener(t,n,{passive:r}):e.addEventListener(t,n,!1)}function nd(e,t,n,a,r){var i=a;if((t&1)===0&&(t&2)===0&&a!==null)e:for(;;){if(a===null)return;var s=a.tag;if(s===3||s===4){var l=a.stateNode.containerInfo;if(l===r)break;if(s===4)for(s=a.return;s!==null;){var o=s.tag;if((o===3||o===4)&&s.stateNode.containerInfo===r)return;s=s.return}for(;l!==null;){if(s=ei(l),s===null)return;if(o=s.tag,o===5||o===6||o===26||o===27){a=i=s;continue e}l=l.parentNode}}a=a.return}Ov(function(){var c=i,u=lf(n),p=[];e:{var f=Qv.get(e);if(f!==void 0){var d=Wo,x=e;switch(e){case"keypress":if(fo(n)===0)break e;case"keydown":case"keyup":d=Hk;break;case"focusin":x="focus",d=Mu;break;case"focusout":x="blur",d=Mu;break;case"beforeblur":case"afterblur":d=Mu;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":d=Wh;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":d=Ck;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":d=Ik;break;case Iv:case Yv:case Gv:d=Dk;break;case Xv:d=Gk;break;case"scroll":case"scrollend":d=wk;break;case"wheel":d=Qk;break;case"copy":case"cut":case"paste":d=Lk;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":d=tg;break;case"toggle":case"beforetoggle":d=Zk}var y=(t&4)!==0,k=!y&&(e==="scroll"||e==="scrollend"),m=y?f!==null?f+"Capture":null:f;y=[];for(var h=c,g;h!==null;){var S=h;if(g=S.stateNode,S=S.tag,S!==5&&S!==26&&S!==27||g===null||m===null||(S=Ds(h,m),S!=null&&y.push(Bs(h,S,g))),k)break;h=h.return}0<y.length&&(f=new d(f,x,null,n,u),p.push({event:f,listeners:y}))}}if((t&7)===0){e:{if(f=e==="mouseover"||e==="pointerover",d=e==="mouseout"||e==="pointerout",f&&n!==hd&&(x=n.relatedTarget||n.fromElement)&&(ei(x)||x[Ri]))break e;if((d||f)&&(f=u.window===u?u:(f=u.ownerDocument)?f.defaultView||f.parentWindow:window,d?(x=n.relatedTarget||n.toElement,d=c,x=x?ei(x):null,x!==null&&(k=Ys(x),y=x.tag,x!==k||y!==5&&y!==27&&y!==6)&&(x=null)):(d=null,x=c),d!==x)){if(y=Wh,S="onMouseLeave",m="onMouseEnter",h="mouse",(e==="pointerout"||e==="pointerover")&&(y=tg,S="onPointerLeave",m="onPointerEnter",h="pointer"),k=d==null?f:ms(d),g=x==null?f:ms(x),f=new y(S,h+"leave",d,n,u),f.target=k,f.relatedTarget=g,S=null,ei(u)===c&&(y=new y(m,h+"enter",x,n,u),y.target=g,y.relatedTarget=k,S=y),k=S,d&&x)t:{for(y=d,m=x,h=0,g=y;g;g=Fr(g))h++;for(g=0,S=m;S;S=Fr(S))g++;for(;0<h-g;)y=Fr(y),h--;for(;0<g-h;)m=Fr(m),g--;for(;h--;){if(y===m||m!==null&&y===m.alternate)break t;y=Fr(y),m=Fr(m)}y=null}else y=null;d!==null&&Fg(p,f,d,y,!1),x!==null&&k!==null&&Fg(p,k,x,y,!0)}}e:{if(f=c?ms(c):window,d=f.nodeName&&f.nodeName.toLowerCase(),d==="select"||d==="input"&&f.type==="file")var T=ig;else if(rg(f))if(Bv)T=iT;else{T=aT;var E=nT}else d=f.nodeName,!d||d.toLowerCase()!=="input"||f.type!=="checkbox"&&f.type!=="radio"?c&&sf(c.elementType)&&(T=ig):T=rT;if(T&&(T=T(e,c))){Pv(p,T,n,u);break e}E&&E(e,f,c),e==="focusout"&&c&&f.type==="number"&&c.memoizedProps.value!=null&&md(f,"number",f.value)}switch(E=c?ms(c):window,e){case"focusin":(rg(E)||E.contentEditable==="true")&&(ai=E,vd=c,ys=null);break;case"focusout":ys=vd=ai=null;break;case"mousedown":yd=!0;break;case"contextmenu":case"mouseup":case"dragend":yd=!1,cg(p,n,u);break;case"selectionchange":if(lT)break;case"keydown":case"keyup":cg(p,n,u)}var w;if(uf)e:{switch(e){case"compositionstart":var C="onCompositionStart";break e;case"compositionend":C="onCompositionEnd";break e;case"compositionupdate":C="onCompositionUpdate";break e}C=void 0}else ni?Mv(e,n)&&(C="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(C="onCompositionStart");C&&(zv&&n.locale!=="ko"&&(ni||C!=="onCompositionStart"?C==="onCompositionEnd"&&ni&&(w=Lv()):(Ma=u,of="value"in Ma?Ma.value:Ma.textContent,ni=!0)),E=Go(c,C),0<E.length&&(C=new eg(C,e,null,n,u),p.push({event:C,listeners:E}),w?C.data=w:(w=Uv(n),w!==null&&(C.data=w)))),(w=Jk?Kk(e,n):Wk(e,n))&&(C=Go(c,"onBeforeInput"),0<C.length&&(E=new eg("onBeforeInput","beforeinput",null,n,u),p.push({event:E,listeners:C}),E.data=w)),IT(p,e,c,n,u)}Rb(p,t)})}function Bs(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Go(e,t){for(var n=t+"Capture",a=[];e!==null;){var r=e,i=r.stateNode;if(r=r.tag,r!==5&&r!==26&&r!==27||i===null||(r=Ds(e,n),r!=null&&a.unshift(Bs(e,r,i)),r=Ds(e,t),r!=null&&a.push(Bs(e,r,i))),e.tag===3)return a;e=e.return}return[]}function Fr(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function Fg(e,t,n,a,r){for(var i=t._reactName,s=[];n!==null&&n!==a;){var l=n,o=l.alternate,c=l.stateNode;if(l=l.tag,o!==null&&o===a)break;l!==5&&l!==26&&l!==27||c===null||(o=c,r?(c=Ds(n,i),c!=null&&s.unshift(Bs(n,c,o))):r||(c=Ds(n,i),c!=null&&s.push(Bs(n,c,o)))),n=n.return}s.length!==0&&e.push({event:t,listeners:s})}var GT=/\r\n?/g,XT=/\u0000|\uFFFD/g;function Zg(e){return(typeof e=="string"?e:""+e).replace(GT,`
9
+ `).replace(XT,"")}function Db(e,t){return t=Zg(t),Zg(e)===t}function dc(){}function Pe(e,t,n,a,r,i){switch(n){case"children":typeof a=="string"?t==="body"||t==="textarea"&&a===""||xi(e,a):(typeof a=="number"||typeof a=="bigint")&&t!=="body"&&xi(e,""+a);break;case"className":Fl(e,"class",a);break;case"tabIndex":Fl(e,"tabindex",a);break;case"dir":case"role":case"viewBox":case"width":case"height":Fl(e,n,a);break;case"style":Dv(e,a,i);break;case"data":if(t!=="object"){Fl(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=co(""+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 i=="function"&&(n==="formAction"?(t!=="input"&&Pe(e,t,"name",r.name,r,null),Pe(e,t,"formEncType",r.formEncType,r,null),Pe(e,t,"formMethod",r.formMethod,r,null),Pe(e,t,"formTarget",r.formTarget,r,null)):(Pe(e,t,"encType",r.encType,r,null),Pe(e,t,"method",r.method,r,null),Pe(e,t,"target",r.target,r,null)));if(a==null||typeof a=="symbol"||typeof a=="boolean"){e.removeAttribute(n);break}a=co(""+a),e.setAttribute(n,a);break;case"onClick":a!=null&&(e.onclick=dc);break;case"onScroll":a!=null&&xe("scroll",e);break;case"onScrollEnd":a!=null&&xe("scrollend",e);break;case"dangerouslySetInnerHTML":if(a!=null){if(typeof a!="object"||!("__html"in a))throw Error(M(61));if(n=a.__html,n!=null){if(r.children!=null)throw Error(M(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=co(""+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":xe("beforetoggle",e),xe("toggle",e),oo(e,"popover",a);break;case"xlinkActuate":aa(e,"http://www.w3.org/1999/xlink","xlink:actuate",a);break;case"xlinkArcrole":aa(e,"http://www.w3.org/1999/xlink","xlink:arcrole",a);break;case"xlinkRole":aa(e,"http://www.w3.org/1999/xlink","xlink:role",a);break;case"xlinkShow":aa(e,"http://www.w3.org/1999/xlink","xlink:show",a);break;case"xlinkTitle":aa(e,"http://www.w3.org/1999/xlink","xlink:title",a);break;case"xlinkType":aa(e,"http://www.w3.org/1999/xlink","xlink:type",a);break;case"xmlBase":aa(e,"http://www.w3.org/XML/1998/namespace","xml:base",a);break;case"xmlLang":aa(e,"http://www.w3.org/XML/1998/namespace","xml:lang",a);break;case"xmlSpace":aa(e,"http://www.w3.org/XML/1998/namespace","xml:space",a);break;case"is":oo(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=kk.get(n)||n,oo(e,n,a))}}function Id(e,t,n,a,r,i){switch(n){case"style":Dv(e,a,i);break;case"dangerouslySetInnerHTML":if(a!=null){if(typeof a!="object"||!("__html"in a))throw Error(M(61));if(n=a.__html,n!=null){if(r.children!=null)throw Error(M(60));e.innerHTML=n}}break;case"children":typeof a=="string"?xi(e,a):(typeof a=="number"||typeof a=="bigint")&&xi(e,""+a);break;case"onScroll":a!=null&&xe("scroll",e);break;case"onScrollEnd":a!=null&&xe("scrollend",e);break;case"onClick":a!=null&&(e.onclick=dc);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Tv.hasOwnProperty(n))e:{if(n[0]==="o"&&n[1]==="n"&&(r=n.endsWith("Capture"),t=n.slice(2,r?n.length-7:void 0),i=e[rn]||null,i=i!=null?i[n]:null,typeof i=="function"&&e.removeEventListener(t,i,r),typeof a=="function")){typeof i!="function"&&i!==null&&(n in e?e[n]=null:e.hasAttribute(n)&&e.removeAttribute(n)),e.addEventListener(t,a,r);break e}n in e?e[n]=a:a===!0?e.setAttribute(n,""):oo(e,n,a)}}}function Lt(e,t,n){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":xe("error",e),xe("load",e);var a=!1,r=!1,i;for(i in n)if(n.hasOwnProperty(i)){var s=n[i];if(s!=null)switch(i){case"src":a=!0;break;case"srcSet":r=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(M(137,t));default:Pe(e,t,i,s,n,null)}}r&&Pe(e,t,"srcSet",n.srcSet,n,null),a&&Pe(e,t,"src",n.src,n,null);return;case"input":xe("invalid",e);var l=i=s=r=null,o=null,c=null;for(a in n)if(n.hasOwnProperty(a)){var u=n[a];if(u!=null)switch(a){case"name":r=u;break;case"type":s=u;break;case"checked":o=u;break;case"defaultChecked":c=u;break;case"value":i=u;break;case"defaultValue":l=u;break;case"children":case"dangerouslySetInnerHTML":if(u!=null)throw Error(M(137,t));break;default:Pe(e,t,a,u,n,null)}}Cv(e,i,l,o,c,s,r,!1),wo(e);return;case"select":xe("invalid",e),a=s=i=null;for(r in n)if(n.hasOwnProperty(r)&&(l=n[r],l!=null))switch(r){case"value":i=l;break;case"defaultValue":s=l;break;case"multiple":a=l;default:Pe(e,t,r,l,n,null)}t=i,n=s,e.multiple=!!a,t!=null?di(e,!!a,t,!1):n!=null&&di(e,!!a,n,!0);return;case"textarea":xe("invalid",e),i=r=a=null;for(s in n)if(n.hasOwnProperty(s)&&(l=n[s],l!=null))switch(s){case"value":a=l;break;case"defaultValue":r=l;break;case"children":i=l;break;case"dangerouslySetInnerHTML":if(l!=null)throw Error(M(91));break;default:Pe(e,t,s,l,n,null)}_v(e,a,r,i),wo(e);return;case"option":for(o in n)if(n.hasOwnProperty(o)&&(a=n[o],a!=null))switch(o){case"selected":e.selected=a&&typeof a!="function"&&typeof a!="symbol";break;default:Pe(e,t,o,a,n,null)}return;case"dialog":xe("beforetoggle",e),xe("toggle",e),xe("cancel",e),xe("close",e);break;case"iframe":case"object":xe("load",e);break;case"video":case"audio":for(a=0;a<Ps.length;a++)xe(Ps[a],e);break;case"image":xe("error",e),xe("load",e);break;case"details":xe("toggle",e);break;case"embed":case"source":case"link":xe("error",e),xe("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(c in n)if(n.hasOwnProperty(c)&&(a=n[c],a!=null))switch(c){case"children":case"dangerouslySetInnerHTML":throw Error(M(137,t));default:Pe(e,t,c,a,n,null)}return;default:if(sf(t)){for(u in n)n.hasOwnProperty(u)&&(a=n[u],a!==void 0&&Id(e,t,u,a,n,void 0));return}}for(l in n)n.hasOwnProperty(l)&&(a=n[l],a!=null&&Pe(e,t,l,a,n,null))}function QT(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 r=null,i=null,s=null,l=null,o=null,c=null,u=null;for(d in n){var p=n[d];if(n.hasOwnProperty(d)&&p!=null)switch(d){case"checked":break;case"value":break;case"defaultValue":o=p;default:a.hasOwnProperty(d)||Pe(e,t,d,null,a,p)}}for(var f in a){var d=a[f];if(p=n[f],a.hasOwnProperty(f)&&(d!=null||p!=null))switch(f){case"type":i=d;break;case"name":r=d;break;case"checked":c=d;break;case"defaultChecked":u=d;break;case"value":s=d;break;case"defaultValue":l=d;break;case"children":case"dangerouslySetInnerHTML":if(d!=null)throw Error(M(137,t));break;default:d!==p&&Pe(e,t,f,d,a,p)}}pd(e,s,l,o,c,u,i,r);return;case"select":d=s=l=f=null;for(i in n)if(o=n[i],n.hasOwnProperty(i)&&o!=null)switch(i){case"value":break;case"multiple":d=o;default:a.hasOwnProperty(i)||Pe(e,t,i,null,a,o)}for(r in a)if(i=a[r],o=n[r],a.hasOwnProperty(r)&&(i!=null||o!=null))switch(r){case"value":f=i;break;case"defaultValue":l=i;break;case"multiple":s=i;default:i!==o&&Pe(e,t,r,i,a,o)}t=l,n=s,a=d,f!=null?di(e,!!n,f,!1):!!a!=!!n&&(t!=null?di(e,!!n,t,!0):di(e,!!n,n?[]:"",!1));return;case"textarea":d=f=null;for(l in n)if(r=n[l],n.hasOwnProperty(l)&&r!=null&&!a.hasOwnProperty(l))switch(l){case"value":break;case"children":break;default:Pe(e,t,l,null,a,r)}for(s in a)if(r=a[s],i=n[s],a.hasOwnProperty(s)&&(r!=null||i!=null))switch(s){case"value":f=r;break;case"defaultValue":d=r;break;case"children":break;case"dangerouslySetInnerHTML":if(r!=null)throw Error(M(91));break;default:r!==i&&Pe(e,t,s,r,a,i)}Rv(e,f,d);return;case"option":for(var x in n)if(f=n[x],n.hasOwnProperty(x)&&f!=null&&!a.hasOwnProperty(x))switch(x){case"selected":e.selected=!1;break;default:Pe(e,t,x,null,a,f)}for(o in a)if(f=a[o],d=n[o],a.hasOwnProperty(o)&&f!==d&&(f!=null||d!=null))switch(o){case"selected":e.selected=f&&typeof f!="function"&&typeof f!="symbol";break;default:Pe(e,t,o,f,a,d)}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 y in n)f=n[y],n.hasOwnProperty(y)&&f!=null&&!a.hasOwnProperty(y)&&Pe(e,t,y,null,a,f);for(c in a)if(f=a[c],d=n[c],a.hasOwnProperty(c)&&f!==d&&(f!=null||d!=null))switch(c){case"children":case"dangerouslySetInnerHTML":if(f!=null)throw Error(M(137,t));break;default:Pe(e,t,c,f,a,d)}return;default:if(sf(t)){for(var k in n)f=n[k],n.hasOwnProperty(k)&&f!==void 0&&!a.hasOwnProperty(k)&&Id(e,t,k,void 0,a,f);for(u in a)f=a[u],d=n[u],!a.hasOwnProperty(u)||f===d||f===void 0&&d===void 0||Id(e,t,u,f,a,d);return}}for(var m in n)f=n[m],n.hasOwnProperty(m)&&f!=null&&!a.hasOwnProperty(m)&&Pe(e,t,m,null,a,f);for(p in a)f=a[p],d=n[p],!a.hasOwnProperty(p)||f===d||f==null&&d==null||Pe(e,t,p,f,a,d)}var Yd=null,Gd=null;function Xo(e){return e.nodeType===9?e:e.ownerDocument}function $g(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 Ob(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 Xd(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 ad=null;function FT(){var e=window.event;return e&&e.type==="popstate"?e===ad?!1:(ad=e,!0):(ad=null,!1)}var Lb=typeof setTimeout=="function"?setTimeout:void 0,ZT=typeof clearTimeout=="function"?clearTimeout:void 0,Jg=typeof Promise=="function"?Promise:void 0,$T=typeof queueMicrotask=="function"?queueMicrotask:typeof Jg!="undefined"?function(e){return Jg.resolve(null).then(e).catch(JT)}:Lb;function JT(e){setTimeout(function(){throw e})}function $a(e){return e==="head"}function Kg(e,t){var n=t,a=0,r=0;do{var i=n.nextSibling;if(e.removeChild(n),i&&i.nodeType===8)if(n=i.data,n==="/$"){if(0<a&&8>a){n=a;var s=e.ownerDocument;if(n&1&&Rs(s.documentElement),n&2&&Rs(s.body),n&4)for(n=s.head,Rs(n),s=n.firstChild;s;){var l=s.nextSibling,o=s.nodeName;s[Fs]||o==="SCRIPT"||o==="STYLE"||o==="LINK"&&s.rel.toLowerCase()==="stylesheet"||n.removeChild(s),s=l}}if(r===0){e.removeChild(i),Is(t);return}r--}else n==="$"||n==="$?"||n==="$!"?r++:a=n.charCodeAt(0)-48;else a=0;n=i}while(n);Is(t)}function Qd(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":Qd(n),rf(n);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(n.rel.toLowerCase()==="stylesheet")continue}e.removeChild(n)}}function KT(e,t,n,a){for(;e.nodeType===1;){var r=n;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!a&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(a){if(!e[Fs])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(i=e.getAttribute("rel"),i==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(i!==r.rel||e.getAttribute("href")!==(r.href==null||r.href===""?null:r.href)||e.getAttribute("crossorigin")!==(r.crossOrigin==null?null:r.crossOrigin)||e.getAttribute("title")!==(r.title==null?null:r.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(i=e.getAttribute("src"),(i!==(r.src==null?null:r.src)||e.getAttribute("type")!==(r.type==null?null:r.type)||e.getAttribute("crossorigin")!==(r.crossOrigin==null?null:r.crossOrigin))&&i&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var i=r.name==null?null:""+r.name;if(r.type==="hidden"&&e.getAttribute("name")===i)return e}else return e;if(e=qn(e.nextSibling),e===null)break}return null}function WT(e,t,n){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!n||(e=qn(e.nextSibling),e===null))return null;return e}function Fd(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState==="complete"}function ew(e,t){var n=e.ownerDocument;if(e.data!=="$?"||n.readyState==="complete")t();else{var a=function(){t(),n.removeEventListener("DOMContentLoaded",a)};n.addEventListener("DOMContentLoaded",a),e._reactRetry=a}}function qn(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==="F!"||t==="F")break;if(t==="/$")return null}}return e}var Zd=null;function Wg(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="$"||n==="$!"||n==="$?"){if(t===0)return e;t--}else n==="/$"&&t++}e=e.previousSibling}return null}function zb(e,t,n){switch(t=Xo(n),e){case"html":if(e=t.documentElement,!e)throw Error(M(452));return e;case"head":if(e=t.head,!e)throw Error(M(453));return e;case"body":if(e=t.body,!e)throw Error(M(454));return e;default:throw Error(M(451))}}function Rs(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);rf(e)}var zn=new Map,ev=new Set;function Qo(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var ya=Ce.d;Ce.d={f:tw,r:nw,D:aw,C:rw,L:iw,m:sw,X:ow,S:lw,M:cw};function tw(){var e=ya.f(),t=oc();return e||t}function nw(e){var t=_i(e);t!==null&&t.tag===5&&t.type==="form"?Ay(t):ya.r(e)}var Li=typeof document=="undefined"?null:document;function Mb(e,t,n){var a=Li;if(a&&typeof t=="string"&&t){var r=_n(t);r='link[rel="'+e+'"][href="'+r+'"]',typeof n=="string"&&(r+='[crossorigin="'+n+'"]'),ev.has(r)||(ev.add(r),e={rel:e,crossOrigin:n,href:t},a.querySelector(r)===null&&(t=a.createElement("link"),Lt(t,"link",e),Nt(t),a.head.appendChild(t)))}}function aw(e){ya.D(e),Mb("dns-prefetch",e,null)}function rw(e,t){ya.C(e,t),Mb("preconnect",e,t)}function iw(e,t,n){ya.L(e,t,n);var a=Li;if(a&&e&&t){var r='link[rel="preload"][as="'+_n(t)+'"]';t==="image"&&n&&n.imageSrcSet?(r+='[imagesrcset="'+_n(n.imageSrcSet)+'"]',typeof n.imageSizes=="string"&&(r+='[imagesizes="'+_n(n.imageSizes)+'"]')):r+='[href="'+_n(e)+'"]';var i=r;switch(t){case"style":i=Ci(e);break;case"script":i=zi(e)}zn.has(i)||(e=Qe({rel:"preload",href:t==="image"&&n&&n.imageSrcSet?void 0:e,as:t},n),zn.set(i,e),a.querySelector(r)!==null||t==="style"&&a.querySelector(rl(i))||t==="script"&&a.querySelector(il(i))||(t=a.createElement("link"),Lt(t,"link",e),Nt(t),a.head.appendChild(t)))}}function sw(e,t){ya.m(e,t);var n=Li;if(n&&e){var a=t&&typeof t.as=="string"?t.as:"script",r='link[rel="modulepreload"][as="'+_n(a)+'"][href="'+_n(e)+'"]',i=r;switch(a){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":i=zi(e)}if(!zn.has(i)&&(e=Qe({rel:"modulepreload",href:e},t),zn.set(i,e),n.querySelector(r)===null)){switch(a){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(n.querySelector(il(i)))return}a=n.createElement("link"),Lt(a,"link",e),Nt(a),n.head.appendChild(a)}}}function lw(e,t,n){ya.S(e,t,n);var a=Li;if(a&&e){var r=ui(a).hoistableStyles,i=Ci(e);t=t||"default";var s=r.get(i);if(!s){var l={loading:0,preload:null};if(s=a.querySelector(rl(i)))l.loading=5;else{e=Qe({rel:"stylesheet",href:e,"data-precedence":t},n),(n=zn.get(i))&&jf(e,n);var o=s=a.createElement("link");Nt(o),Lt(o,"link",e),o._p=new Promise(function(c,u){o.onload=c,o.onerror=u}),o.addEventListener("load",function(){l.loading|=1}),o.addEventListener("error",function(){l.loading|=2}),l.loading|=4,bo(s,t,a)}s={type:"stylesheet",instance:s,count:1,state:l},r.set(i,s)}}}function ow(e,t){ya.X(e,t);var n=Li;if(n&&e){var a=ui(n).hoistableScripts,r=zi(e),i=a.get(r);i||(i=n.querySelector(il(r)),i||(e=Qe({src:e,async:!0},t),(t=zn.get(r))&&If(e,t),i=n.createElement("script"),Nt(i),Lt(i,"link",e),n.head.appendChild(i)),i={type:"script",instance:i,count:1,state:null},a.set(r,i))}}function cw(e,t){ya.M(e,t);var n=Li;if(n&&e){var a=ui(n).hoistableScripts,r=zi(e),i=a.get(r);i||(i=n.querySelector(il(r)),i||(e=Qe({src:e,async:!0,type:"module"},t),(t=zn.get(r))&&If(e,t),i=n.createElement("script"),Nt(i),Lt(i,"link",e),n.head.appendChild(i)),i={type:"script",instance:i,count:1,state:null},a.set(r,i))}}function tv(e,t,n,a){var r=(r=Ba.current)?Qo(r):null;if(!r)throw Error(M(446));switch(e){case"meta":case"title":return null;case"style":return typeof n.precedence=="string"&&typeof n.href=="string"?(t=Ci(n.href),n=ui(r).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=Ci(n.href);var i=ui(r).hoistableStyles,s=i.get(e);if(s||(r=r.ownerDocument||r,s={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},i.set(e,s),(i=r.querySelector(rl(e)))&&!i._p&&(s.instance=i,s.state.loading=5),zn.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},zn.set(e,n),i||uw(r,e,n,s.state))),t&&a===null)throw Error(M(528,""));return s}if(t&&a!==null)throw Error(M(529,""));return null;case"script":return t=n.async,n=n.src,typeof n=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=zi(n),n=ui(r).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(M(444,e))}}function Ci(e){return'href="'+_n(e)+'"'}function rl(e){return'link[rel="stylesheet"]['+e+"]"}function Ub(e){return Qe({},e,{"data-precedence":e.precedence,precedence:null})}function uw(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}),Lt(t,"link",n),Nt(t),e.head.appendChild(t))}function zi(e){return'[src="'+_n(e)+'"]'}function il(e){return"script[async]"+e}function nv(e,t,n){if(t.count++,t.instance===null)switch(t.type){case"style":var a=e.querySelector('style[data-href~="'+_n(n.href)+'"]');if(a)return t.instance=a,Nt(a),a;var r=Qe({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return a=(e.ownerDocument||e).createElement("style"),Nt(a),Lt(a,"style",r),bo(a,n.precedence,e),t.instance=a;case"stylesheet":r=Ci(n.href);var i=e.querySelector(rl(r));if(i)return t.state.loading|=4,t.instance=i,Nt(i),i;a=Ub(n),(r=zn.get(r))&&jf(a,r),i=(e.ownerDocument||e).createElement("link"),Nt(i);var s=i;return s._p=new Promise(function(l,o){s.onload=l,s.onerror=o}),Lt(i,"link",a),t.state.loading|=4,bo(i,n.precedence,e),t.instance=i;case"script":return i=zi(n.src),(r=e.querySelector(il(i)))?(t.instance=r,Nt(r),r):(a=n,(r=zn.get(i))&&(a=Qe({},n),If(a,r)),e=e.ownerDocument||e,r=e.createElement("script"),Nt(r),Lt(r,"link",a),e.head.appendChild(r),t.instance=r);case"void":return null;default:throw Error(M(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(a=t.instance,t.state.loading|=4,bo(a,n.precedence,e));return t.instance}function bo(e,t,n){for(var a=n.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),r=a.length?a[a.length-1]:null,i=r,s=0;s<a.length;s++){var l=a[s];if(l.dataset.precedence===t)i=l;else if(i!==r)break}i?i.parentNode.insertBefore(e,i.nextSibling):(t=n.nodeType===9?n.head:n,t.insertBefore(e,t.firstChild))}function jf(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function If(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var xo=null;function av(e,t,n){if(xo===null){var a=new Map,r=xo=new Map;r.set(n,a)}else r=xo,a=r.get(n),a||(a=new Map,r.set(n,a));if(a.has(e))return a;for(a.set(e,null),n=n.getElementsByTagName(e),r=0;r<n.length;r++){var i=n[r];if(!(i[Fs]||i[Ht]||e==="link"&&i.getAttribute("rel")==="stylesheet")&&i.namespaceURI!=="http://www.w3.org/2000/svg"){var s=i.getAttribute(t)||"";s=e+s;var l=a.get(s);l?l.push(i):a.set(s,[i])}}return a}function rv(e,t,n){e=e.ownerDocument||e,e.head.insertBefore(n,t==="title"?e.querySelector("head > title"):null)}function dw(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;switch(t.rel){case"stylesheet":return e=t.disabled,typeof t.precedence=="string"&&e==null;default:return!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 Pb(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}var Vs=null;function fw(){}function pw(e,t,n){if(Vs===null)throw Error(M(475));var a=Vs;if(t.type==="stylesheet"&&(typeof n.media!="string"||matchMedia(n.media).matches!==!1)&&(t.state.loading&4)===0){if(t.instance===null){var r=Ci(n.href),i=e.querySelector(rl(r));if(i){e=i._p,e!==null&&typeof e=="object"&&typeof e.then=="function"&&(a.count++,a=Fo.bind(a),e.then(a,a)),t.state.loading|=4,t.instance=i,Nt(i);return}i=e.ownerDocument||e,n=Ub(n),(r=zn.get(r))&&jf(n,r),i=i.createElement("link"),Nt(i);var s=i;s._p=new Promise(function(l,o){s.onload=l,s.onerror=o}),Lt(i,"link",n),t.instance=i}a.stylesheets===null&&(a.stylesheets=new Map),a.stylesheets.set(t,e),(e=t.state.preload)&&(t.state.loading&3)===0&&(a.count++,t=Fo.bind(a),e.addEventListener("load",t),e.addEventListener("error",t))}}function mw(){if(Vs===null)throw Error(M(475));var e=Vs;return e.stylesheets&&e.count===0&&$d(e,e.stylesheets),0<e.count?function(t){var n=setTimeout(function(){if(e.stylesheets&&$d(e,e.stylesheets),e.unsuspend){var a=e.unsuspend;e.unsuspend=null,a()}},6e4);return e.unsuspend=t,function(){e.unsuspend=null,clearTimeout(n)}}:null}function Fo(){if(this.count--,this.count===0){if(this.stylesheets)$d(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var Zo=null;function $d(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Zo=new Map,t.forEach(hw,e),Zo=null,Fo.call(e))}function hw(e,t){if(!(t.state.loading&4)){var n=Zo.get(e);if(n)var a=n.get(null);else{n=new Map,Zo.set(e,n);for(var r=e.querySelectorAll("link[data-precedence],style[data-precedence]"),i=0;i<r.length;i++){var s=r[i];(s.nodeName==="LINK"||s.getAttribute("media")!=="not all")&&(n.set(s.dataset.precedence,s),a=s)}a&&n.set(null,a)}r=t.instance,s=r.getAttribute("data-precedence"),i=n.get(s)||a,i===a&&n.set(null,r),n.set(s,r),this.count++,a=Fo.bind(this),r.addEventListener("load",a),r.addEventListener("error",a),i?i.parentNode.insertBefore(r,i.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(r,e.firstChild)),t.state.loading|=4}}var Hs={$$typeof:la,Provider:null,Consumer:null,_currentValue:dr,_currentValue2:dr,_threadCount:0};function gw(e,t,n,a,r,i,s,l){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=Cu(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Cu(0),this.hiddenUpdates=Cu(null),this.identifierPrefix=a,this.onUncaughtError=r,this.onCaughtError=i,this.onRecoverableError=s,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=l,this.incompleteTransitions=new Map}function Bb(e,t,n,a,r,i,s,l,o,c,u,p){return e=new gw(e,t,n,s,l,o,c,p),t=1,i===!0&&(t|=24),i=gn(3,null,null,t),e.current=i,i.stateNode=e,t=vf(),t.refCount++,e.pooledCache=t,t.refCount++,i.memoizedState={element:a,isDehydrated:n,cache:t},bf(i),e}function Vb(e){return e?(e=si,e):si}function Hb(e,t,n,a,r,i){r=Vb(r),a.context===null?a.context=r:a.pendingContext=r,a=Va(t),a.payload={element:n},i=i===void 0?null:i,i!==null&&(a.callback=i),n=Ha(e,a,t),n!==null&&(xn(n,e,t),Ss(n,e,t))}function iv(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function Yf(e,t){iv(e,t),(e=e.alternate)&&iv(e,t)}function qb(e){if(e.tag===13){var t=Di(e,67108864);t!==null&&xn(t,e,67108864),Yf(e,67108864)}}var $o=!0;function vw(e,t,n,a){var r=ue.T;ue.T=null;var i=Ce.p;try{Ce.p=2,Gf(e,t,n,a)}finally{Ce.p=i,ue.T=r}}function yw(e,t,n,a){var r=ue.T;ue.T=null;var i=Ce.p;try{Ce.p=8,Gf(e,t,n,a)}finally{Ce.p=i,ue.T=r}}function Gf(e,t,n,a){if($o){var r=Jd(a);if(r===null)nd(e,t,a,Jo,n),sv(e,a);else if(xw(r,e,t,n,a))a.stopPropagation();else if(sv(e,a),t&4&&-1<bw.indexOf(e)){for(;r!==null;){var i=_i(r);if(i!==null)switch(i.tag){case 3:if(i=i.stateNode,i.current.memoizedState.isDehydrated){var s=or(i.pendingLanes);if(s!==0){var l=i;for(l.pendingLanes|=2,l.entangledLanes|=2;s;){var o=1<<31-yn(s);l.entanglements[1]|=o,s&=~o}Wn(i),(Oe&6)===0&&(qo=$n()+500,al(0,!1))}}break;case 13:l=Di(i,2),l!==null&&xn(l,i,2),oc(),Yf(i,2)}if(i=Jd(a),i===null&&nd(e,t,a,Jo,n),i===r)break;r=i}r!==null&&a.stopPropagation()}else nd(e,t,a,null,n)}}function Jd(e){return e=lf(e),Xf(e)}var Jo=null;function Xf(e){if(Jo=null,e=ei(e),e!==null){var t=Ys(e);if(t===null)e=null;else{var n=t.tag;if(n===13){if(e=fv(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 Jo=e,null}function jb(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(sk()){case gv:return 2;case vv:return 8;case To:case lk:return 32;case yv:return 268435456;default:return 32}default:return 32}}var Kd=!1,Ia=null,Ya=null,Ga=null,qs=new Map,js=new Map,La=[],bw="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 sv(e,t){switch(e){case"focusin":case"focusout":Ia=null;break;case"dragenter":case"dragleave":Ya=null;break;case"mouseover":case"mouseout":Ga=null;break;case"pointerover":case"pointerout":qs.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":js.delete(t.pointerId)}}function us(e,t,n,a,r,i){return e===null||e.nativeEvent!==i?(e={blockedOn:t,domEventName:n,eventSystemFlags:a,nativeEvent:i,targetContainers:[r]},t!==null&&(t=_i(t),t!==null&&qb(t)),e):(e.eventSystemFlags|=a,t=e.targetContainers,r!==null&&t.indexOf(r)===-1&&t.push(r),e)}function xw(e,t,n,a,r){switch(t){case"focusin":return Ia=us(Ia,e,t,n,a,r),!0;case"dragenter":return Ya=us(Ya,e,t,n,a,r),!0;case"mouseover":return Ga=us(Ga,e,t,n,a,r),!0;case"pointerover":var i=r.pointerId;return qs.set(i,us(qs.get(i)||null,e,t,n,a,r)),!0;case"gotpointercapture":return i=r.pointerId,js.set(i,us(js.get(i)||null,e,t,n,a,r)),!0}return!1}function Ib(e){var t=ei(e.target);if(t!==null){var n=Ys(t);if(n!==null){if(t=n.tag,t===13){if(t=fv(n),t!==null){e.blockedOn=t,hk(e.priority,function(){if(n.tag===13){var a=bn();a=nf(a);var r=Di(n,a);r!==null&&xn(r,n,a),Yf(n,a)}});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function So(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=Jd(e.nativeEvent);if(n===null){n=e.nativeEvent;var a=new n.constructor(n.type,n);hd=a,n.target.dispatchEvent(a),hd=null}else return t=_i(n),t!==null&&qb(t),e.blockedOn=n,!1;t.shift()}return!0}function lv(e,t,n){So(e)&&n.delete(t)}function Sw(){Kd=!1,Ia!==null&&So(Ia)&&(Ia=null),Ya!==null&&So(Ya)&&(Ya=null),Ga!==null&&So(Ga)&&(Ga=null),qs.forEach(lv),js.forEach(lv)}function so(e,t){e.blockedOn===t&&(e.blockedOn=null,Kd||(Kd=!0,xt.unstable_scheduleCallback(xt.unstable_NormalPriority,Sw)))}var lo=null;function ov(e){lo!==e&&(lo=e,xt.unstable_scheduleCallback(xt.unstable_NormalPriority,function(){lo===e&&(lo=null);for(var t=0;t<e.length;t+=3){var n=e[t],a=e[t+1],r=e[t+2];if(typeof a!="function"){if(Xf(a||n)===null)continue;break}var i=_i(n);i!==null&&(e.splice(t,3),t-=3,Dd(i,{pending:!0,data:r,method:n.method,action:a},a,r))}}))}function Is(e){function t(o){return so(o,e)}Ia!==null&&so(Ia,e),Ya!==null&&so(Ya,e),Ga!==null&&so(Ga,e),qs.forEach(t),js.forEach(t);for(var n=0;n<La.length;n++){var a=La[n];a.blockedOn===e&&(a.blockedOn=null)}for(;0<La.length&&(n=La[0],n.blockedOn===null);)Ib(n),n.blockedOn===null&&La.shift();if(n=(e.ownerDocument||e).$$reactFormReplay,n!=null)for(a=0;a<n.length;a+=3){var r=n[a],i=n[a+1],s=r[rn]||null;if(typeof i=="function")s||ov(n);else if(s){var l=null;if(i&&i.hasAttribute("formAction")){if(r=i,s=i[rn]||null)l=s.formAction;else if(Xf(r)!==null)continue}else l=s.action;typeof l=="function"?n[a+1]=l:(n.splice(a,3),a-=3),ov(n)}}}function Qf(e){this._internalRoot=e}fc.prototype.render=Qf.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(M(409));var n=t.current,a=bn();Hb(n,a,e,t,null,null)};fc.prototype.unmount=Qf.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;Hb(e.current,2,null,e,null,null),oc(),t[Ri]=null}};function fc(e){this._internalRoot=e}fc.prototype.unstable_scheduleHydration=function(e){if(e){var t=Ev();e={blockedOn:null,target:e,priority:t};for(var n=0;n<La.length&&t!==0&&t<La[n].priority;n++);La.splice(n,0,e),n===0&&Ib(e)}};var cv=uv.version;if(cv!=="19.1.1")throw Error(M(527,cv,"19.1.1"));Ce.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(M(188)):(e=Object.keys(e).join(","),Error(M(268,e)));return e=WE(t),e=e!==null?pv(e):null,e=e===null?null:e.stateNode,e};var Nw={bundleType:0,version:"19.1.1",rendererPackageName:"react-dom",currentDispatcherRef:ue,reconcilerVersion:"19.1.1"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__!="undefined"&&(ds=__REACT_DEVTOOLS_GLOBAL_HOOK__,!ds.isDisabled&&ds.supportsFiber))try{Gs=ds.inject(Nw),vn=ds}catch(e){}var ds;pc.createRoot=function(e,t){if(!dv(e))throw Error(M(299));var n=!1,a="",r=By,i=Vy,s=Hy,l=null;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(a=t.identifierPrefix),t.onUncaughtError!==void 0&&(r=t.onUncaughtError),t.onCaughtError!==void 0&&(i=t.onCaughtError),t.onRecoverableError!==void 0&&(s=t.onRecoverableError),t.unstable_transitionCallbacks!==void 0&&(l=t.unstable_transitionCallbacks)),t=Bb(e,1,!1,null,null,n,a,r,i,s,l,null),e[Ri]=t.current,qf(e),new Qf(t)};pc.hydrateRoot=function(e,t,n){if(!dv(e))throw Error(M(299));var a=!1,r="",i=By,s=Vy,l=Hy,o=null,c=null;return n!=null&&(n.unstable_strictMode===!0&&(a=!0),n.identifierPrefix!==void 0&&(r=n.identifierPrefix),n.onUncaughtError!==void 0&&(i=n.onUncaughtError),n.onCaughtError!==void 0&&(s=n.onCaughtError),n.onRecoverableError!==void 0&&(l=n.onRecoverableError),n.unstable_transitionCallbacks!==void 0&&(o=n.unstable_transitionCallbacks),n.formState!==void 0&&(c=n.formState)),t=Bb(e,1,!0,t,n!=null?n:null,a,r,i,s,l,o,c),t.context=Vb(null),n=t.current,a=bn(),a=nf(a),r=Va(a),r.callback=null,Ha(n,r,a),n=a,t.current.lanes=n,Qs(t,n),Wn(t),e[Ri]=t.current,qf(e),new fc(t)};pc.version="19.1.1"});var Qb=Bt((NR,Xb)=>{"use strict";function Gb(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__=="undefined"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(Gb)}catch(e){console.error(e)}}Gb(),Xb.exports=Yb()});function Fb(e,t){let n=t||{};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}var Zb=N(()=>{});function mc(e,t){return((t||Tw).jsx?kw:Ew).test(e)}var Ew,kw,Tw,$b=N(()=>{Ew=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,kw=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Tw={}});var Jb=N(()=>{$b()});function Ff(e){return typeof e=="object"?e.type==="text"?Kb(e.value):!1:Kb(e)}function Kb(e){return e.replace(ww,"")===""}var ww,Wb=N(()=>{ww=/[ \t\n\f\r]/g});var e0=N(()=>{Wb()});var ba,Zf=N(()=>{ba=class{constructor(t,n,a){this.normal=n,this.property=t,a&&(this.space=a)}};ba.prototype.normal={};ba.prototype.property={};ba.prototype.space=void 0});function $f(e,t){let n={},a={};for(let r of e)Object.assign(n,r.property),Object.assign(a,r.normal);return new ba(n,a,t)}var t0=N(()=>{Zf()});function sl(e){return e.toLowerCase()}var Jf=N(()=>{});var Tt,Kf=N(()=>{Tt=class{constructor(t,n){this.attribute=n,this.property=t}};Tt.prototype.attribute="";Tt.prototype.booleanish=!1;Tt.prototype.boolean=!1;Tt.prototype.commaOrSpaceSeparated=!1;Tt.prototype.commaSeparated=!1;Tt.prototype.defined=!1;Tt.prototype.mustUseProperty=!1;Tt.prototype.number=!1;Tt.prototype.overloadedBoolean=!1;Tt.prototype.property="";Tt.prototype.spaceSeparated=!1;Tt.prototype.space=void 0});var ll={};fu(ll,{boolean:()=>pe,booleanish:()=>rt,commaOrSpaceSeparated:()=>ln,commaSeparated:()=>Ja,number:()=>j,overloadedBoolean:()=>hc,spaceSeparated:()=>Le});function wr(){return dh(2,++Aw)}var Aw,pe,rt,hc,j,Le,Ja,ln,ol=N(()=>{Aw=0,pe=wr(),rt=wr(),hc=wr(),j=wr(),Le=wr(),Ja=wr(),ln=wr()});function n0(e,t,n){n&&(e[t]=n)}var Wf,Ar,ep=N(()=>{Kf();ol();Wf=Object.keys(ll),Ar=class extends Tt{constructor(t,n,a,r){let i=-1;if(super(t,n),n0(this,"space",r),typeof a=="number")for(;++i<Wf.length;){let s=Wf[i];n0(this,Wf[i],(a&ll[s])===ll[s])}}};Ar.prototype.defined=!0});function Mn(e){let t={},n={};for(let[a,r]of Object.entries(e.properties)){let i=new Ar(a,e.transform(e.attributes||{},a),r,e.space);e.mustUseProperty&&e.mustUseProperty.includes(a)&&(i.mustUseProperty=!0),t[a]=i,n[sl(a)]=a,n[sl(i.attribute)]=a}return new ba(t,n,e.space)}var Cr=N(()=>{Jf();ep();Zf()});var tp,a0=N(()=>{Cr();ol();tp=Mn({properties:{ariaActiveDescendant:null,ariaAtomic:rt,ariaAutoComplete:null,ariaBusy:rt,ariaChecked:rt,ariaColCount:j,ariaColIndex:j,ariaColSpan:j,ariaControls:Le,ariaCurrent:null,ariaDescribedBy:Le,ariaDetails:null,ariaDisabled:rt,ariaDropEffect:Le,ariaErrorMessage:null,ariaExpanded:rt,ariaFlowTo:Le,ariaGrabbed:rt,ariaHasPopup:null,ariaHidden:rt,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:Le,ariaLevel:j,ariaLive:null,ariaModal:rt,ariaMultiLine:rt,ariaMultiSelectable:rt,ariaOrientation:null,ariaOwns:Le,ariaPlaceholder:null,ariaPosInSet:j,ariaPressed:rt,ariaReadOnly:rt,ariaRelevant:null,ariaRequired:rt,ariaRoleDescription:Le,ariaRowCount:j,ariaRowIndex:j,ariaRowSpan:j,ariaSelected:rt,ariaSetSize:j,ariaSort:null,ariaValueMax:j,ariaValueMin:j,ariaValueNow:j,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}})});function gc(e,t){return t in e?e[t]:t}var np=N(()=>{});function vc(e,t){return gc(e,t.toLowerCase())}var ap=N(()=>{np()});var r0,i0=N(()=>{ap();Cr();ol();r0=Mn({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Ja,acceptCharset:Le,accessKey:Le,action:null,allow:null,allowFullScreen:pe,allowPaymentRequest:pe,allowUserMedia:pe,alt:null,as:null,async:pe,autoCapitalize:null,autoComplete:Le,autoFocus:pe,autoPlay:pe,blocking:Le,capture:null,charSet:null,checked:pe,cite:null,className:Le,cols:j,colSpan:null,content:null,contentEditable:rt,controls:pe,controlsList:Le,coords:j|Ja,crossOrigin:null,data:null,dateTime:null,decoding:null,default:pe,defer:pe,dir:null,dirName:null,disabled:pe,download:hc,draggable:rt,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:pe,formTarget:null,headers:Le,height:j,hidden:hc,high:j,href:null,hrefLang:null,htmlFor:Le,httpEquiv:Le,id:null,imageSizes:null,imageSrcSet:null,inert:pe,inputMode:null,integrity:null,is:null,isMap:pe,itemId:null,itemProp:Le,itemRef:Le,itemScope:pe,itemType:Le,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:pe,low:j,manifest:null,max:null,maxLength:j,media:null,method:null,min:null,minLength:j,multiple:pe,muted:pe,name:null,nonce:null,noModule:pe,noValidate:pe,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:pe,optimum:j,pattern:null,ping:Le,placeholder:null,playsInline:pe,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:pe,referrerPolicy:null,rel:Le,required:pe,reversed:pe,rows:j,rowSpan:j,sandbox:Le,scope:null,scoped:pe,seamless:pe,selected:pe,shadowRootClonable:pe,shadowRootDelegatesFocus:pe,shadowRootMode:null,shape:null,size:j,sizes:null,slot:null,span:j,spellCheck:rt,src:null,srcDoc:null,srcLang:null,srcSet:null,start:j,step:null,style:null,tabIndex:j,target:null,title:null,translate:null,type:null,typeMustMatch:pe,useMap:null,value:rt,width:j,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:Le,axis:null,background:null,bgColor:null,border:j,borderColor:null,bottomMargin:j,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:pe,declare:pe,event:null,face:null,frame:null,frameBorder:null,hSpace:j,leftMargin:j,link:null,longDesc:null,lowSrc:null,marginHeight:j,marginWidth:j,noResize:pe,noHref:pe,noShade:pe,noWrap:pe,object:null,profile:null,prompt:null,rev:null,rightMargin:j,rules:null,scheme:null,scrolling:rt,standby:null,summary:null,text:null,topMargin:j,valueType:null,version:null,vAlign:null,vLink:null,vSpace:j,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:pe,disableRemotePlayback:pe,prefix:null,property:null,results:j,security:null,unselectable:null},space:"html",transform:vc})});var s0,l0=N(()=>{np();Cr();ol();s0=Mn({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:ln,accentHeight:j,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:j,amplitude:j,arabicForm:null,ascent:j,attributeName:null,attributeType:null,azimuth:j,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:j,by:null,calcMode:null,capHeight:j,className:Le,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:j,diffuseConstant:j,direction:null,display:null,dur:null,divisor:j,dominantBaseline:null,download:pe,dx:null,dy:null,edgeMode:null,editable:null,elevation:j,enableBackground:null,end:null,event:null,exponent:j,externalResourcesRequired:null,fill:null,fillOpacity:j,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:Ja,g2:Ja,glyphName:Ja,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:j,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:j,horizOriginX:j,horizOriginY:j,id:null,ideographic:j,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:j,k:j,k1:j,k2:j,k3:j,k4:j,kernelMatrix:ln,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:j,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:j,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:j,overlineThickness:j,paintOrder:null,panose1:null,path:null,pathLength:j,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:Le,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:j,pointsAtY:j,pointsAtZ:j,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:ln,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:ln,rev:ln,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:ln,requiredFeatures:ln,requiredFonts:ln,requiredFormats:ln,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:j,specularExponent:j,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:j,strikethroughThickness:j,string:null,stroke:null,strokeDashArray:ln,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:j,strokeOpacity:j,strokeWidth:null,style:null,surfaceScale:j,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:ln,tabIndex:j,tableValues:null,target:null,targetX:j,targetY:j,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:ln,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:j,underlineThickness:j,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:j,values:null,vAlphabetic:j,vMathematical:j,vectorEffect:null,vHanging:j,vIdeographic:j,version:null,vertAdvY:j,vertOriginX:j,vertOriginY:j,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:j,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:gc})});var rp,o0=N(()=>{Cr();rp=Mn({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(e,t){return"xlink:"+t.slice(5).toLowerCase()}})});var ip,c0=N(()=>{Cr();ap();ip=Mn({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:vc})});var sp,u0=N(()=>{Cr();sp=Mn({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}})});var lp,d0=N(()=>{lp={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"}});function op(e,t){let n=sl(t),a=t,r=Tt;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&Rw.test(t)){if(t.charAt(4)==="-"){let i=t.slice(5).replace(f0,Dw);a="data"+i.charAt(0).toUpperCase()+i.slice(1)}else{let i=t.slice(4);if(!f0.test(i)){let s=i.replace(Cw,_w);s.charAt(0)!=="-"&&(s="-"+s),t="data"+s}}r=Ar}return new r(a,t)}function _w(e){return"-"+e.toLowerCase()}function Dw(e){return e.charAt(1).toUpperCase()}var Cw,f0,Rw,p0=N(()=>{ep();Kf();Jf();Cw=/[A-Z]/g,f0=/-[a-z]/g,Rw=/^data[-\w.:]+$/i});var m0,yc,h0=N(()=>{t0();a0();i0();l0();o0();c0();u0();d0();p0();m0=$f([tp,r0,rp,ip,sp],"html"),yc=$f([tp,s0,rp,ip,sp],"svg")});function g0(e){return e.join(" ").trim()}var v0=N(()=>{});var E0=Bt((A_,N0)=>{var y0=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,Ow=/\n/g,Lw=/^\s*/,zw=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,Mw=/^:\s*/,Uw=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,Pw=/^[;\s]*/,Bw=/^\s+|\s+$/g,Vw=`
10
+ `,b0="/",x0="*",Rr="",Hw="comment",qw="declaration";N0.exports=function(e,t){if(typeof e!="string")throw new TypeError("First argument must be a string");if(!e)return[];t=t||{};var n=1,a=1;function r(y){var k=y.match(Ow);k&&(n+=k.length);var m=y.lastIndexOf(Vw);a=~m?y.length-m:a+y.length}function i(){var y={line:n,column:a};return function(k){return k.position=new s(y),u(),k}}function s(y){this.start=y,this.end={line:n,column:a},this.source=t.source}s.prototype.content=e;var l=[];function o(y){var k=new Error(t.source+":"+n+":"+a+": "+y);if(k.reason=y,k.filename=t.source,k.line=n,k.column=a,k.source=e,t.silent)l.push(k);else throw k}function c(y){var k=y.exec(e);if(k){var m=k[0];return r(m),e=e.slice(m.length),k}}function u(){c(Lw)}function p(y){var k;for(y=y||[];k=f();)k!==!1&&y.push(k);return y}function f(){var y=i();if(!(b0!=e.charAt(0)||x0!=e.charAt(1))){for(var k=2;Rr!=e.charAt(k)&&(x0!=e.charAt(k)||b0!=e.charAt(k+1));)++k;if(k+=2,Rr===e.charAt(k-1))return o("End of comment missing");var m=e.slice(2,k-2);return a+=2,r(m),e=e.slice(k),a+=2,y({type:Hw,comment:m})}}function d(){var y=i(),k=c(zw);if(k){if(f(),!c(Mw))return o("property missing ':'");var m=c(Uw),h=y({type:qw,property:S0(k[0].replace(y0,Rr)),value:m?S0(m[0].replace(y0,Rr)):Rr});return c(Pw),h}}function x(){var y=[];p(y);for(var k;k=d();)k!==!1&&(y.push(k),p(y));return y}return u(),x()};function S0(e){return e?e.replace(Bw,Rr):Rr}});var k0=Bt(cl=>{"use strict";var jw=cl&&cl.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(cl,"__esModule",{value:!0});cl.default=Yw;var Iw=jw(E0());function Yw(e,t){var n=null;if(!e||typeof e!="string")return n;var a=(0,Iw.default)(e),r=typeof t=="function";return a.forEach(function(i){if(i.type==="declaration"){var s=i.property,l=i.value;r?t(s,l,i):l&&(n=n||{},n[s]=l)}}),n}});var w0=Bt(bc=>{"use strict";Object.defineProperty(bc,"__esModule",{value:!0});bc.camelCase=void 0;var Gw=/^--[a-zA-Z0-9_-]+$/,Xw=/-([a-z])/g,Qw=/^[^-]+$/,Fw=/^-(webkit|moz|ms|o|khtml)-/,Zw=/^-(ms)-/,$w=function(e){return!e||Qw.test(e)||Gw.test(e)},Jw=function(e,t){return t.toUpperCase()},T0=function(e,t){return"".concat(t,"-")},Kw=function(e,t){return t===void 0&&(t={}),$w(e)?e:(e=e.toLowerCase(),t.reactCompat?e=e.replace(Zw,T0):e=e.replace(Fw,T0),e.replace(Xw,Jw))};bc.camelCase=Kw});var C0=Bt((up,A0)=>{"use strict";var Ww=up&&up.__importDefault||function(e){return e&&e.__esModule?e:{default:e}},eA=Ww(k0()),tA=w0();function cp(e,t){var n={};return!e||typeof e!="string"||(0,eA.default)(e,function(a,r){a&&r&&(n[(0,tA.camelCase)(a,t)]=r)}),n}cp.default=cp;A0.exports=cp});function R0(e){return t;function t(n){let a=n&&n.position&&n.position[e]||{};if(typeof a.line=="number"&&a.line>0&&typeof a.column=="number"&&a.column>0)return{line:a.line,column:a.column,offset:typeof a.offset=="number"&&a.offset>-1?a.offset:void 0}}}function dp(e){let t=Mi(e),n=xc(e);if(t&&n)return{start:t,end:n}}var xc,Mi,_0=N(()=>{xc=R0("end"),Mi=R0("start")});var Sc=N(()=>{_0()});function Ka(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?D0(e.position):"start"in e||"end"in e?D0(e):"line"in e||"column"in e?fp(e):""}function fp(e){return O0(e&&e.line)+":"+O0(e&&e.column)}function D0(e){return fp(e&&e.start)+"-"+fp(e&&e.end)}function O0(e){return e&&typeof e=="number"?e:1}var L0=N(()=>{});var pp=N(()=>{L0()});var ut,z0=N(()=>{pp();ut=class extends Error{constructor(t,n,a){super(),typeof n=="string"&&(a=n,n=void 0);let r="",i={},s=!1;if(n&&("line"in n&&"column"in n?i={place:n}:"start"in n&&"end"in n?i={place:n}:"type"in n?i={ancestors:[n],place:n.position}:i=ee({},n)),typeof t=="string"?r=t:!i.cause&&t&&(s=!0,r=t.message,i.cause=t),!i.ruleId&&!i.source&&typeof a=="string"){let o=a.indexOf(":");o===-1?i.ruleId=a:(i.source=a.slice(0,o),i.ruleId=a.slice(o+1))}if(!i.place&&i.ancestors&&i.ancestors){let o=i.ancestors[i.ancestors.length-1];o&&(i.place=o.position)}let l=i.place&&"start"in i.place?i.place.start:i.place;this.ancestors=i.ancestors||void 0,this.cause=i.cause||void 0,this.column=l?l.column:void 0,this.fatal=void 0,this.file="",this.message=r,this.line=l?l.line:void 0,this.name=Ka(i.place)||"1:1",this.place=i.place||void 0,this.reason=this.message,this.ruleId=i.ruleId||void 0,this.source=i.source||void 0,this.stack=s&&i.cause&&typeof i.cause.stack=="string"?i.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}};ut.prototype.file="";ut.prototype.name="";ut.prototype.reason="";ut.prototype.message="";ut.prototype.stack="";ut.prototype.column=void 0;ut.prototype.line=void 0;ut.prototype.ancestors=void 0;ut.prototype.cause=void 0;ut.prototype.fatal=void 0;ut.prototype.place=void 0;ut.prototype.ruleId=void 0;ut.prototype.source=void 0});var mp=N(()=>{z0()});function gp(e,t){if(!t||t.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");let n=t.filePath||void 0,a;if(t.development){if(typeof t.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");a=pA(n,t.jsxDEV)}else{if(typeof t.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof t.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");a=fA(n,t.jsx,t.jsxs)}let r={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:a,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space==="svg"?yc:m0,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},i=P0(r,e,void 0);return i&&typeof i!="string"?i:r.create(e,r.Fragment,{children:i||void 0},void 0)}function P0(e,t,n){if(t.type==="element")return sA(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return lA(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return cA(e,t,n);if(t.type==="mdxjsEsm")return oA(e,t);if(t.type==="root")return uA(e,t,n);if(t.type==="text")return dA(e,t)}function sA(e,t,n){let a=e.schema,r=a;t.tagName.toLowerCase()==="svg"&&a.space==="html"&&(r=yc,e.schema=r),e.ancestors.push(t);let i=V0(e,t.tagName,!1),s=mA(e,t),l=yp(e,t);return rA.has(t.tagName)&&(l=l.filter(function(o){return typeof o=="string"?!Ff(o):!0})),B0(e,s,i,t),vp(s,l),e.ancestors.pop(),e.schema=a,e.create(t,i,s,n)}function lA(e,t){if(t.data&&t.data.estree&&e.evaluater){let a=t.data.estree.body[0];return a.type,e.evaluater.evaluateExpression(a.expression)}ul(e,t.position)}function oA(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);ul(e,t.position)}function cA(e,t,n){let a=e.schema,r=a;t.name==="svg"&&a.space==="html"&&(r=yc,e.schema=r),e.ancestors.push(t);let i=t.name===null?e.Fragment:V0(e,t.name,!0),s=hA(e,t),l=yp(e,t);return B0(e,s,i,t),vp(s,l),e.ancestors.pop(),e.schema=a,e.create(t,i,s,n)}function uA(e,t,n){let a={};return vp(a,yp(e,t)),e.create(t,e.Fragment,a,n)}function dA(e,t){return t.value}function B0(e,t,n,a){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=a)}function vp(e,t){if(t.length>0){let n=t.length>1?t:t[0];n&&(e.children=n)}}function fA(e,t,n){return a;function a(r,i,s,l){let c=Array.isArray(s.children)?n:t;return l?c(i,s,l):c(i,s)}}function pA(e,t){return n;function n(a,r,i,s){let l=Array.isArray(i.children),o=Mi(a);return t(r,i,s,l,{columnNumber:o?o.column-1:void 0,fileName:e,lineNumber:o?o.line:void 0},void 0)}}function mA(e,t){let n={},a,r;for(r in t.properties)if(r!=="children"&&hp.call(t.properties,r)){let i=gA(e,r,t.properties[r]);if(i){let[s,l]=i;e.tableCellAlignToStyle&&s==="align"&&typeof l=="string"&&iA.has(t.tagName)?a=l:n[s]=l}}if(a){let i=n.style||(n.style={});i[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=a}return n}function hA(e,t){let n={};for(let a of t.attributes)if(a.type==="mdxJsxExpressionAttribute")if(a.data&&a.data.estree&&e.evaluater){let i=a.data.estree.body[0];i.type;let s=i.expression;s.type;let l=s.properties[0];l.type,Object.assign(n,e.evaluater.evaluateExpression(l.argument))}else ul(e,t.position);else{let r=a.name,i;if(a.value&&typeof a.value=="object")if(a.value.data&&a.value.data.estree&&e.evaluater){let l=a.value.data.estree.body[0];l.type,i=e.evaluater.evaluateExpression(l.expression)}else ul(e,t.position);else i=a.value===null?!0:a.value;n[r]=i}return n}function yp(e,t){let n=[],a=-1,r=e.passKeys?new Map:nA;for(;++a<t.children.length;){let i=t.children[a],s;if(e.passKeys){let o=i.type==="element"?i.tagName:i.type==="mdxJsxFlowElement"||i.type==="mdxJsxTextElement"?i.name:void 0;if(o){let c=r.get(o)||0;s=o+"-"+c,r.set(o,c+1)}}let l=P0(e,i,s);l!==void 0&&n.push(l)}return n}function gA(e,t,n){let a=op(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=a.commaSeparated?Fb(n):g0(n)),a.property==="style"){let r=typeof n=="object"?n:vA(e,String(n));return e.stylePropertyNameCase==="css"&&(r=yA(r)),["style",r]}return[e.elementAttributeNameCase==="react"&&a.space?lp[a.property]||a.property:a.attribute,n]}}function vA(e,t){try{return(0,M0.default)(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};let a=n,r=new ut("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:a,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw r.file=e.filePath||void 0,r.url=U0+"#cannot-parse-style-attribute",r}}function V0(e,t,n){let a;if(!n)a={type:"Literal",value:t};else if(t.includes(".")){let r=t.split("."),i=-1,s;for(;++i<r.length;){let l=mc(r[i])?{type:"Identifier",name:r[i]}:{type:"Literal",value:r[i]};s=s?{type:"MemberExpression",object:s,property:l,computed:!!(i&&l.type==="Literal"),optional:!1}:l}a=s}else a=mc(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(a.type==="Literal"){let r=a.value;return hp.call(e.components,r)?e.components[r]:r}if(e.evaluater)return e.evaluater.evaluateExpression(a);ul(e)}function ul(e,t){let n=new ut("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw n.file=e.filePath||void 0,n.url=U0+"#cannot-handle-mdx-estrees-without-createevaluater",n}function yA(e){let t={},n;for(n in e)hp.call(e,n)&&(t[bA(n)]=e[n]);return t}function bA(e){let t=e.replace(aA,xA);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function xA(e){return"-"+e.toLowerCase()}var M0,hp,nA,aA,rA,iA,U0,H0=N(()=>{Zb();Jb();e0();h0();v0();M0=Z(C0(),1);Sc();mp();hp={}.hasOwnProperty,nA=new Map,aA=/[A-Z]/g,rA=new Set(["table","tbody","thead","tfoot","tr"]),iA=new Set(["td","th"]),U0="https://github.com/syntax-tree/hast-util-to-jsx-runtime"});var q0=N(()=>{H0()});var dl,j0=N(()=>{dl={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"]}});var I0=N(()=>{j0()});var G0=Bt(Nc=>{"use strict";var SA=Symbol.for("react.transitional.element"),NA=Symbol.for("react.fragment");function Y0(e,t,n){var a=null;if(n!==void 0&&(a=""+n),t.key!==void 0&&(a=""+t.key),"key"in t){n={};for(var r in t)r!=="key"&&(n[r]=t[r])}else n=t;return t=n.ref,{$$typeof:SA,type:e,key:a,ref:t!==void 0?t:null,props:n}}Nc.Fragment=NA;Nc.jsx=Y0;Nc.jsxs=Y0});var oe=Bt((tD,X0)=>{"use strict";X0.exports=G0()});function bp(e,t){let n=t||EA,a=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,r=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return F0(e,a,r)}function F0(e,t,n){if(kA(e)){if("value"in e)return e.type==="html"&&!n?"":e.value;if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return Q0(e.children,t,n)}return Array.isArray(e)?Q0(e,t,n):""}function Q0(e,t,n){let a=[],r=-1;for(;++r<e.length;)a[r]=F0(e[r],t,n);return a.join("")}function kA(e){return!!(e&&typeof e=="object")}var EA,Z0=N(()=>{EA={}});var $0=N(()=>{Z0()});function Ui(e){let t="&"+e+";";J0.innerHTML=t;let n=J0.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}var J0,Ec=N(()=>{J0=document.createElement("i")});function zt(e,t,n,a){let r=e.length,i=0,s;if(t<0?t=-t>r?0:r+t:t=t>r?r:t,n=n>0?n:0,a.length<1e4)s=Array.from(a),s.unshift(t,n),e.splice(...s);else for(n&&e.splice(t,n);i<a.length;)s=a.slice(i,i+1e4),s.unshift(t,0),e.splice(...s),i+=1e4,t+=1e4}function Ft(e,t){return e.length>0?(zt(e,e.length,0,t),e):t}var Wa=N(()=>{});function W0(e){let t={},n=-1;for(;++n<e.length;)TA(t,e[n]);return t}function TA(e,t){let n;for(n in t){let r=(K0.call(e,n)?e[n]:void 0)||(e[n]={}),i=t[n],s;if(i)for(s in i){K0.call(r,s)||(r[s]=[]);let l=i[s];wA(r[s],Array.isArray(l)?l:l?[l]:[])}}}function wA(e,t){let n=-1,a=[];for(;++n<t.length;)(t[n].add==="after"?e:a).push(t[n]);zt(e,0,0,a)}var K0,ex=N(()=>{Wa();K0={}.hasOwnProperty});function kc(e,t){let n=Number.parseInt(e,t);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)===65535||(n&65535)===65534||n>1114111?"\uFFFD":String.fromCodePoint(n)}var xp=N(()=>{});function xa(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}var Tc=N(()=>{});function fl(e){return e!==null&&(e<32||e===127)}function te(e){return e!==null&&e<-2}function dt(e){return e!==null&&(e<0||e===32)}function de(e){return e===-2||e===-1||e===32}function er(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}var Nn,wt,tx,pl,nx,ax,rx,ix,ze=N(()=>{Nn=er(/[A-Za-z]/),wt=er(/[\dA-Za-z]/),tx=er(/[#-'*+\--9=?A-Z^-~]/);pl=er(/\d/),nx=er(/[\dA-Fa-f]/),ax=er(/[!-/:-@[-`{-~]/);rx=er(new RegExp("\\p{P}|\\p{S}","u")),ix=er(/\s/)});function Un(e){let t=[],n=-1,a=0,r=0;for(;++n<e.length;){let i=e.charCodeAt(n),s="";if(i===37&&wt(e.charCodeAt(n+1))&&wt(e.charCodeAt(n+2)))r=2;else if(i<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(i))||(s=String.fromCharCode(i));else if(i>55295&&i<57344){let l=e.charCodeAt(n+1);i<56320&&l>56319&&l<57344?(s=String.fromCharCode(i,l),r=1):s="\uFFFD"}else s=String.fromCharCode(i);s&&(t.push(e.slice(a,n),encodeURIComponent(s)),a=n+r+1,s=""),r&&(n+=r,r=0)}return t.join("")+e.slice(a)}var _r=N(()=>{ze()});function me(e,t,n,a){let r=a?a-1:Number.POSITIVE_INFINITY,i=0;return s;function s(o){return de(o)?(e.enter(n),l(o)):t(o)}function l(o){return de(o)&&i++<r?(e.consume(o),l):(e.exit(n),t(o))}}var At=N(()=>{ze()});function AA(e){let t=e.attempt(this.parser.constructs.contentInitial,a,r),n;return t;function a(l){if(l===null){e.consume(l);return}return e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),me(e,t,"linePrefix")}function r(l){return e.enter("paragraph"),i(l)}function i(l){let o=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=o),n=o,s(l)}function s(l){if(l===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(l);return}return te(l)?(e.consume(l),e.exit("chunkText"),i):(e.consume(l),s)}}var sx,lx=N(()=>{At();ze();sx={tokenize:AA}});function CA(e){let t=this,n=[],a=0,r,i,s;return l;function l(g){if(a<n.length){let S=n[a];return t.containerState=S[1],e.attempt(S[0].continuation,o,c)(g)}return c(g)}function o(g){if(a++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,r&&h();let S=t.events.length,T=S,E;for(;T--;)if(t.events[T][0]==="exit"&&t.events[T][1].type==="chunkFlow"){E=t.events[T][1].end;break}m(a);let w=S;for(;w<t.events.length;)t.events[w][1].end=ee({},E),w++;return zt(t.events,T+1,0,t.events.slice(S)),t.events.length=w,c(g)}return l(g)}function c(g){if(a===n.length){if(!r)return f(g);if(r.currentConstruct&&r.currentConstruct.concrete)return x(g);t.interrupt=!!(r.currentConstruct&&!r._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(ox,u,p)(g)}function u(g){return r&&h(),m(a),f(g)}function p(g){return t.parser.lazy[t.now().line]=a!==n.length,s=t.now().offset,x(g)}function f(g){return t.containerState={},e.attempt(ox,d,x)(g)}function d(g){return a++,n.push([t.currentConstruct,t.containerState]),f(g)}function x(g){if(g===null){r&&h(),m(0),e.consume(g);return}return r=r||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:r,contentType:"flow",previous:i}),y(g)}function y(g){if(g===null){k(e.exit("chunkFlow"),!0),m(0),e.consume(g);return}return te(g)?(e.consume(g),k(e.exit("chunkFlow")),a=0,t.interrupt=void 0,l):(e.consume(g),y)}function k(g,S){let T=t.sliceStream(g);if(S&&T.push(null),g.previous=i,i&&(i.next=g),i=g,r.defineSkip(g.start),r.write(T),t.parser.lazy[g.start.line]){let E=r.events.length;for(;E--;)if(r.events[E][1].start.offset<s&&(!r.events[E][1].end||r.events[E][1].end.offset>s))return;let w=t.events.length,C=w,U,H;for(;C--;)if(t.events[C][0]==="exit"&&t.events[C][1].type==="chunkFlow"){if(U){H=t.events[C][1].end;break}U=!0}for(m(a),E=w;E<t.events.length;)t.events[E][1].end=ee({},H),E++;zt(t.events,C+1,0,t.events.slice(w)),t.events.length=E}}function m(g){let S=n.length;for(;S-- >g;){let T=n[S];t.containerState=T[1],T[0].exit.call(t,e)}n.length=g}function h(){r.write([null]),i=void 0,r=void 0,t.containerState._closeFlow=void 0}}function RA(e,t,n){return me(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}var cx,ox,ux=N(()=>{At();ze();Wa();cx={tokenize:CA},ox={tokenize:RA}});function Sp(e){if(e===null||dt(e)||ix(e))return 1;if(rx(e))return 2}var dx=N(()=>{ze()});function Pi(e,t,n){let a=[],r=-1;for(;++r<e.length;){let i=e[r].resolveAll;i&&!a.includes(i)&&(t=i(t,n),a.push(i))}return t}var wc=N(()=>{});function _A(e,t){let n=-1,a,r,i,s,l,o,c,u;for(;++n<e.length;)if(e[n][0]==="enter"&&e[n][1].type==="attentionSequence"&&e[n][1]._close){for(a=n;a--;)if(e[a][0]==="exit"&&e[a][1].type==="attentionSequence"&&e[a][1]._open&&t.sliceSerialize(e[a][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[a][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[a][1].end.offset-e[a][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;o=e[a][1].end.offset-e[a][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;let p=ee({},e[a][1].end),f=ee({},e[n][1].start);fx(p,-o),fx(f,o),s={type:o>1?"strongSequence":"emphasisSequence",start:p,end:ee({},e[a][1].end)},l={type:o>1?"strongSequence":"emphasisSequence",start:ee({},e[n][1].start),end:f},i={type:o>1?"strongText":"emphasisText",start:ee({},e[a][1].end),end:ee({},e[n][1].start)},r={type:o>1?"strong":"emphasis",start:ee({},s.start),end:ee({},l.end)},e[a][1].end=ee({},s.start),e[n][1].start=ee({},l.end),c=[],e[a][1].end.offset-e[a][1].start.offset&&(c=Ft(c,[["enter",e[a][1],t],["exit",e[a][1],t]])),c=Ft(c,[["enter",r,t],["enter",s,t],["exit",s,t],["enter",i,t]]),c=Ft(c,Pi(t.parser.constructs.insideSpan.null,e.slice(a+1,n),t)),c=Ft(c,[["exit",i,t],["enter",l,t],["exit",l,t],["exit",r,t]]),e[n][1].end.offset-e[n][1].start.offset?(u=2,c=Ft(c,[["enter",e[n][1],t],["exit",e[n][1],t]])):u=0,zt(e,a-1,n-a+3,c),n=a+c.length-u-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function DA(e,t){let n=this.parser.constructs.attentionMarkers.null,a=this.previous,r=Sp(a),i;return s;function s(o){return i=o,e.enter("attentionSequence"),l(o)}function l(o){if(o===i)return e.consume(o),l;let c=e.exit("attentionSequence"),u=Sp(o),p=!u||u===2&&r||n.includes(o),f=!r||r===2&&u||n.includes(a);return c._open=!!(i===42?p:p&&(r||!f)),c._close=!!(i===42?f:f&&(u||!p)),t(o)}}function fx(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}var ml,px=N(()=>{Wa();dx();wc();ml={name:"attention",resolveAll:_A,tokenize:DA}});function OA(e,t,n){let a=0;return r;function r(d){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(d),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),i}function i(d){return Nn(d)?(e.consume(d),s):d===64?n(d):c(d)}function s(d){return d===43||d===45||d===46||wt(d)?(a=1,l(d)):c(d)}function l(d){return d===58?(e.consume(d),a=0,o):(d===43||d===45||d===46||wt(d))&&a++<32?(e.consume(d),l):(a=0,c(d))}function o(d){return d===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(d),e.exit("autolinkMarker"),e.exit("autolink"),t):d===null||d===32||d===60||fl(d)?n(d):(e.consume(d),o)}function c(d){return d===64?(e.consume(d),u):tx(d)?(e.consume(d),c):n(d)}function u(d){return wt(d)?p(d):n(d)}function p(d){return d===46?(e.consume(d),a=0,u):d===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(d),e.exit("autolinkMarker"),e.exit("autolink"),t):f(d)}function f(d){if((d===45||wt(d))&&a++<63){let x=d===45?f:p;return e.consume(d),x}return n(d)}}var Np,mx=N(()=>{ze();Np={name:"autolink",tokenize:OA}});function LA(e,t,n){return a;function a(i){return de(i)?me(e,r,"linePrefix")(i):r(i)}function r(i){return i===null||te(i)?t(i):n(i)}}var tr,Ac=N(()=>{At();ze();tr={partial:!0,tokenize:LA}});function zA(e,t,n){let a=this;return r;function r(s){if(s===62){let l=a.containerState;return l.open||(e.enter("blockQuote",{_container:!0}),l.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(s),e.exit("blockQuoteMarker"),i}return n(s)}function i(s){return de(s)?(e.enter("blockQuotePrefixWhitespace"),e.consume(s),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(s))}}function MA(e,t,n){let a=this;return r;function r(s){return de(s)?me(e,i,"linePrefix",a.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(s):i(s)}function i(s){return e.attempt(Cc,t,n)(s)}}function UA(e){e.exit("blockQuote")}var Cc,hx=N(()=>{At();ze();Cc={continuation:{tokenize:MA},exit:UA,name:"blockQuote",tokenize:zA}});function PA(e,t,n){return a;function a(i){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(i),e.exit("escapeMarker"),r}function r(i){return ax(i)?(e.enter("characterEscapeValue"),e.consume(i),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(i)}}var Rc,gx=N(()=>{ze();Rc={name:"characterEscape",tokenize:PA}});function BA(e,t,n){let a=this,r=0,i,s;return l;function l(p){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(p),e.exit("characterReferenceMarker"),o}function o(p){return p===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(p),e.exit("characterReferenceMarkerNumeric"),c):(e.enter("characterReferenceValue"),i=31,s=wt,u(p))}function c(p){return p===88||p===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(p),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),i=6,s=nx,u):(e.enter("characterReferenceValue"),i=7,s=pl,u(p))}function u(p){if(p===59&&r){let f=e.exit("characterReferenceValue");return s===wt&&!Ui(a.sliceSerialize(f))?n(p):(e.enter("characterReferenceMarker"),e.consume(p),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return s(p)&&r++<i?(e.consume(p),u):n(p)}}var _c,vx=N(()=>{Ec();ze();_c={name:"characterReference",tokenize:BA}});function VA(e,t,n){let a=this,r={partial:!0,tokenize:T},i=0,s=0,l;return o;function o(E){return c(E)}function c(E){let w=a.events[a.events.length-1];return i=w&&w[1].type==="linePrefix"?w[2].sliceSerialize(w[1],!0).length:0,l=E,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),u(E)}function u(E){return E===l?(s++,e.consume(E),u):s<3?n(E):(e.exit("codeFencedFenceSequence"),de(E)?me(e,p,"whitespace")(E):p(E))}function p(E){return E===null||te(E)?(e.exit("codeFencedFence"),a.interrupt?t(E):e.check(yx,y,S)(E)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),f(E))}function f(E){return E===null||te(E)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),p(E)):de(E)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),me(e,d,"whitespace")(E)):E===96&&E===l?n(E):(e.consume(E),f)}function d(E){return E===null||te(E)?p(E):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),x(E))}function x(E){return E===null||te(E)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),p(E)):E===96&&E===l?n(E):(e.consume(E),x)}function y(E){return e.attempt(r,S,k)(E)}function k(E){return e.enter("lineEnding"),e.consume(E),e.exit("lineEnding"),m}function m(E){return i>0&&de(E)?me(e,h,"linePrefix",i+1)(E):h(E)}function h(E){return E===null||te(E)?e.check(yx,y,S)(E):(e.enter("codeFlowValue"),g(E))}function g(E){return E===null||te(E)?(e.exit("codeFlowValue"),h(E)):(e.consume(E),g)}function S(E){return e.exit("codeFenced"),t(E)}function T(E,w,C){let U=0;return H;function H(P){return E.enter("lineEnding"),E.consume(P),E.exit("lineEnding"),_}function _(P){return E.enter("codeFencedFence"),de(P)?me(E,R,"linePrefix",a.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(P):R(P)}function R(P){return P===l?(E.enter("codeFencedFenceSequence"),L(P)):C(P)}function L(P){return P===l?(U++,E.consume(P),L):U>=s?(E.exit("codeFencedFenceSequence"),de(P)?me(E,G,"whitespace")(P):G(P)):C(P)}function G(P){return P===null||te(P)?(E.exit("codeFencedFence"),w(P)):C(P)}}}function HA(e,t,n){let a=this;return r;function r(s){return s===null?n(s):(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),i)}function i(s){return a.parser.lazy[a.now().line]?n(s):t(s)}}var yx,Dc,bx=N(()=>{At();ze();yx={partial:!0,tokenize:HA},Dc={concrete:!0,name:"codeFenced",tokenize:VA}});function jA(e,t,n){let a=this;return r;function r(c){return e.enter("codeIndented"),me(e,i,"linePrefix",5)(c)}function i(c){let u=a.events[a.events.length-1];return u&&u[1].type==="linePrefix"&&u[2].sliceSerialize(u[1],!0).length>=4?s(c):n(c)}function s(c){return c===null?o(c):te(c)?e.attempt(qA,s,o)(c):(e.enter("codeFlowValue"),l(c))}function l(c){return c===null||te(c)?(e.exit("codeFlowValue"),s(c)):(e.consume(c),l)}function o(c){return e.exit("codeIndented"),t(c)}}function IA(e,t,n){let a=this;return r;function r(s){return a.parser.lazy[a.now().line]?n(s):te(s)?(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),r):me(e,i,"linePrefix",5)(s)}function i(s){let l=a.events[a.events.length-1];return l&&l[1].type==="linePrefix"&&l[2].sliceSerialize(l[1],!0).length>=4?t(s):te(s)?r(s):n(s)}}var hl,qA,xx=N(()=>{At();ze();hl={name:"codeIndented",tokenize:jA},qA={partial:!0,tokenize:IA}});function YA(e){let t=e.length-4,n=3,a,r;if((e[n][1].type==="lineEnding"||e[n][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(a=n;++a<t;)if(e[a][1].type==="codeTextData"){e[n][1].type="codeTextPadding",e[t][1].type="codeTextPadding",n+=2,t-=2;break}}for(a=n-1,t++;++a<=t;)r===void 0?a!==t&&e[a][1].type!=="lineEnding"&&(r=a):(a===t||e[a][1].type==="lineEnding")&&(e[r][1].type="codeTextData",a!==r+2&&(e[r][1].end=e[a-1][1].end,e.splice(r+2,a-r-2),t-=a-r-2,a=r+2),r=void 0);return e}function GA(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function XA(e,t,n){let a=this,r=0,i,s;return l;function l(f){return e.enter("codeText"),e.enter("codeTextSequence"),o(f)}function o(f){return f===96?(e.consume(f),r++,o):(e.exit("codeTextSequence"),c(f))}function c(f){return f===null?n(f):f===32?(e.enter("space"),e.consume(f),e.exit("space"),c):f===96?(s=e.enter("codeTextSequence"),i=0,p(f)):te(f)?(e.enter("lineEnding"),e.consume(f),e.exit("lineEnding"),c):(e.enter("codeTextData"),u(f))}function u(f){return f===null||f===32||f===96||te(f)?(e.exit("codeTextData"),c(f)):(e.consume(f),u)}function p(f){return f===96?(e.consume(f),i++,p):i===r?(e.exit("codeTextSequence"),e.exit("codeText"),t(f)):(s.type="codeTextData",u(f))}}var Ep,Sx=N(()=>{ze();Ep={name:"codeText",previous:GA,resolve:YA,tokenize:XA}});function gl(e,t){let n=0;if(t.length<1e4)e.push(...t);else for(;n<t.length;)e.push(...t.slice(n,n+1e4)),n+=1e4}var Oc,Nx=N(()=>{Oc=class{constructor(t){this.left=t?[...t]:[],this.right=[]}get(t){if(t<0||t>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+t+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return t<this.left.length?this.left[t]:this.right[this.right.length-t+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(t,n){let a=n==null?Number.POSITIVE_INFINITY:n;return a<this.left.length?this.left.slice(t,a):t>this.left.length?this.right.slice(this.right.length-a+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-a+this.left.length).reverse())}splice(t,n,a){let r=n||0;this.setCursor(Math.trunc(t));let i=this.right.splice(this.right.length-r,Number.POSITIVE_INFINITY);return a&&gl(this.left,a),i.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(t){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(t)}pushMany(t){this.setCursor(Number.POSITIVE_INFINITY),gl(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),gl(this.right,t.reverse())}setCursor(t){if(!(t===this.left.length||t>this.left.length&&this.right.length===0||t<0&&this.left.length===0))if(t<this.left.length){let n=this.left.splice(t,Number.POSITIVE_INFINITY);gl(this.right,n.reverse())}else{let n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);gl(this.left,n.reverse())}}}});function Lc(e){let t={},n=-1,a,r,i,s,l,o,c,u=new Oc(e);for(;++n<u.length;){for(;n in t;)n=t[n];if(a=u.get(n),n&&a[1].type==="chunkFlow"&&u.get(n-1)[1].type==="listItemPrefix"&&(o=a[1]._tokenizer.events,i=0,i<o.length&&o[i][1].type==="lineEndingBlank"&&(i+=2),i<o.length&&o[i][1].type==="content"))for(;++i<o.length&&o[i][1].type!=="content";)o[i][1].type==="chunkText"&&(o[i][1]._isInFirstContentOfListItem=!0,i++);if(a[0]==="enter")a[1].contentType&&(Object.assign(t,QA(u,n)),n=t[n],c=!0);else if(a[1]._container){for(i=n,r=void 0;i--;)if(s=u.get(i),s[1].type==="lineEnding"||s[1].type==="lineEndingBlank")s[0]==="enter"&&(r&&(u.get(r)[1].type="lineEndingBlank"),s[1].type="lineEnding",r=i);else if(!(s[1].type==="linePrefix"||s[1].type==="listItemIndent"))break;r&&(a[1].end=ee({},u.get(r)[1].start),l=u.slice(r,n),l.unshift(a),u.splice(r,n-r+1,l))}}return zt(e,0,Number.POSITIVE_INFINITY,u.slice(0)),!c}function QA(e,t){let n=e.get(t)[1],a=e.get(t)[2],r=t-1,i=[],s=n._tokenizer;s||(s=a.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(s._contentTypeTextTrailing=!0));let l=s.events,o=[],c={},u,p,f=-1,d=n,x=0,y=0,k=[y];for(;d;){for(;e.get(++r)[1]!==d;);i.push(r),d._tokenizer||(u=a.sliceStream(d),d.next||u.push(null),p&&s.defineSkip(d.start),d._isInFirstContentOfListItem&&(s._gfmTasklistFirstContentOfListItem=!0),s.write(u),d._isInFirstContentOfListItem&&(s._gfmTasklistFirstContentOfListItem=void 0)),p=d,d=d.next}for(d=n;++f<l.length;)l[f][0]==="exit"&&l[f-1][0]==="enter"&&l[f][1].type===l[f-1][1].type&&l[f][1].start.line!==l[f][1].end.line&&(y=f+1,k.push(y),d._tokenizer=void 0,d.previous=void 0,d=d.next);for(s.events=[],d?(d._tokenizer=void 0,d.previous=void 0):k.pop(),f=k.length;f--;){let m=l.slice(k[f],k[f+1]),h=i.pop();o.push([h,h+m.length-1]),e.splice(h,2,m)}for(o.reverse(),f=-1;++f<o.length;)c[x+o[f][0]]=x+o[f][1],x+=o[f][1]-o[f][0]-1;return c}var kp=N(()=>{Wa();Nx()});function ZA(e){return Lc(e),e}function $A(e,t){let n;return a;function a(l){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),r(l)}function r(l){return l===null?i(l):te(l)?e.check(FA,s,i)(l):(e.consume(l),r)}function i(l){return e.exit("chunkContent"),e.exit("content"),t(l)}function s(l){return e.consume(l),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,r}}function JA(e,t,n){let a=this;return r;function r(s){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),me(e,i,"linePrefix")}function i(s){if(s===null||te(s))return n(s);let l=a.events[a.events.length-1];return!a.parser.constructs.disable.null.includes("codeIndented")&&l&&l[1].type==="linePrefix"&&l[2].sliceSerialize(l[1],!0).length>=4?t(s):e.interrupt(a.parser.constructs.flow,n,t)(s)}}var Tp,FA,Ex=N(()=>{At();ze();kp();Tp={resolve:ZA,tokenize:$A},FA={partial:!0,tokenize:JA}});function zc(e,t,n,a,r,i,s,l,o){let c=o||Number.POSITIVE_INFINITY,u=0;return p;function p(m){return m===60?(e.enter(a),e.enter(r),e.enter(i),e.consume(m),e.exit(i),f):m===null||m===32||m===41||fl(m)?n(m):(e.enter(a),e.enter(s),e.enter(l),e.enter("chunkString",{contentType:"string"}),y(m))}function f(m){return m===62?(e.enter(i),e.consume(m),e.exit(i),e.exit(r),e.exit(a),t):(e.enter(l),e.enter("chunkString",{contentType:"string"}),d(m))}function d(m){return m===62?(e.exit("chunkString"),e.exit(l),f(m)):m===null||m===60||te(m)?n(m):(e.consume(m),m===92?x:d)}function x(m){return m===60||m===62||m===92?(e.consume(m),d):d(m)}function y(m){return!u&&(m===null||m===41||dt(m))?(e.exit("chunkString"),e.exit(l),e.exit(s),e.exit(a),t(m)):u<c&&m===40?(e.consume(m),u++,y):m===41?(e.consume(m),u--,y):m===null||m===32||m===40||fl(m)?n(m):(e.consume(m),m===92?k:y)}function k(m){return m===40||m===41||m===92?(e.consume(m),y):y(m)}}var wp=N(()=>{ze()});function Mc(e,t,n,a,r,i){let s=this,l=0,o;return c;function c(d){return e.enter(a),e.enter(r),e.consume(d),e.exit(r),e.enter(i),u}function u(d){return l>999||d===null||d===91||d===93&&!o||d===94&&!l&&"_hiddenFootnoteSupport"in s.parser.constructs?n(d):d===93?(e.exit(i),e.enter(r),e.consume(d),e.exit(r),e.exit(a),t):te(d)?(e.enter("lineEnding"),e.consume(d),e.exit("lineEnding"),u):(e.enter("chunkString",{contentType:"string"}),p(d))}function p(d){return d===null||d===91||d===93||te(d)||l++>999?(e.exit("chunkString"),u(d)):(e.consume(d),o||(o=!de(d)),d===92?f:p)}function f(d){return d===91||d===92||d===93?(e.consume(d),l++,p):p(d)}}var Ap=N(()=>{ze()});function Uc(e,t,n,a,r,i){let s;return l;function l(f){return f===34||f===39||f===40?(e.enter(a),e.enter(r),e.consume(f),e.exit(r),s=f===40?41:f,o):n(f)}function o(f){return f===s?(e.enter(r),e.consume(f),e.exit(r),e.exit(a),t):(e.enter(i),c(f))}function c(f){return f===s?(e.exit(i),o(s)):f===null?n(f):te(f)?(e.enter("lineEnding"),e.consume(f),e.exit("lineEnding"),me(e,c,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),u(f))}function u(f){return f===s||f===null||te(f)?(e.exit("chunkString"),c(f)):(e.consume(f),f===92?p:u)}function p(f){return f===s||f===92?(e.consume(f),u):u(f)}}var Cp=N(()=>{At();ze()});function Dr(e,t){let n;return a;function a(r){return te(r)?(e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),n=!0,a):de(r)?me(e,a,n?"linePrefix":"lineSuffix")(r):t(r)}}var Rp=N(()=>{At();ze()});function WA(e,t,n){let a=this,r;return i;function i(d){return e.enter("definition"),s(d)}function s(d){return Mc.call(a,e,l,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(d)}function l(d){return r=xa(a.sliceSerialize(a.events[a.events.length-1][1]).slice(1,-1)),d===58?(e.enter("definitionMarker"),e.consume(d),e.exit("definitionMarker"),o):n(d)}function o(d){return dt(d)?Dr(e,c)(d):c(d)}function c(d){return zc(e,u,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(d)}function u(d){return e.attempt(KA,p,p)(d)}function p(d){return de(d)?me(e,f,"whitespace")(d):f(d)}function f(d){return d===null||te(d)?(e.exit("definition"),a.parser.defined.push(r),t(d)):n(d)}}function eC(e,t,n){return a;function a(l){return dt(l)?Dr(e,r)(l):n(l)}function r(l){return Uc(e,i,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(l)}function i(l){return de(l)?me(e,s,"whitespace")(l):s(l)}function s(l){return l===null||te(l)?t(l):n(l)}}var _p,KA,kx=N(()=>{wp();Ap();At();Cp();Rp();ze();Tc();_p={name:"definition",tokenize:WA},KA={partial:!0,tokenize:eC}});function tC(e,t,n){return a;function a(i){return e.enter("hardBreakEscape"),e.consume(i),r}function r(i){return te(i)?(e.exit("hardBreakEscape"),t(i)):n(i)}}var Dp,Tx=N(()=>{ze();Dp={name:"hardBreakEscape",tokenize:tC}});function nC(e,t){let n=e.length-2,a=3,r,i;return e[a][1].type==="whitespace"&&(a+=2),n-2>a&&e[n][1].type==="whitespace"&&(n-=2),e[n][1].type==="atxHeadingSequence"&&(a===n-1||n-4>a&&e[n-2][1].type==="whitespace")&&(n-=a+1===n?2:4),n>a&&(r={type:"atxHeadingText",start:e[a][1].start,end:e[n][1].end},i={type:"chunkText",start:e[a][1].start,end:e[n][1].end,contentType:"text"},zt(e,a,n-a+1,[["enter",r,t],["enter",i,t],["exit",i,t],["exit",r,t]])),e}function aC(e,t,n){let a=0;return r;function r(u){return e.enter("atxHeading"),i(u)}function i(u){return e.enter("atxHeadingSequence"),s(u)}function s(u){return u===35&&a++<6?(e.consume(u),s):u===null||dt(u)?(e.exit("atxHeadingSequence"),l(u)):n(u)}function l(u){return u===35?(e.enter("atxHeadingSequence"),o(u)):u===null||te(u)?(e.exit("atxHeading"),t(u)):de(u)?me(e,l,"whitespace")(u):(e.enter("atxHeadingText"),c(u))}function o(u){return u===35?(e.consume(u),o):(e.exit("atxHeadingSequence"),l(u))}function c(u){return u===null||u===35||dt(u)?(e.exit("atxHeadingText"),l(u)):(e.consume(u),c)}}var Op,wx=N(()=>{At();ze();Wa();Op={name:"headingAtx",resolve:nC,tokenize:aC}});var Ax,Lp,Cx=N(()=>{Ax=["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"],Lp=["pre","script","style","textarea"]});function sC(e){let t=e.length;for(;t--&&!(e[t][0]==="enter"&&e[t][1].type==="htmlFlow"););return t>1&&e[t-2][1].type==="linePrefix"&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function lC(e,t,n){let a=this,r,i,s,l,o;return c;function c(b){return u(b)}function u(b){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(b),p}function p(b){return b===33?(e.consume(b),f):b===47?(e.consume(b),i=!0,y):b===63?(e.consume(b),r=3,a.interrupt?t:v):Nn(b)?(e.consume(b),s=String.fromCharCode(b),k):n(b)}function f(b){return b===45?(e.consume(b),r=2,d):b===91?(e.consume(b),r=5,l=0,x):Nn(b)?(e.consume(b),r=4,a.interrupt?t:v):n(b)}function d(b){return b===45?(e.consume(b),a.interrupt?t:v):n(b)}function x(b){let Fe="CDATA[";return b===Fe.charCodeAt(l++)?(e.consume(b),l===Fe.length?a.interrupt?t:R:x):n(b)}function y(b){return Nn(b)?(e.consume(b),s=String.fromCharCode(b),k):n(b)}function k(b){if(b===null||b===47||b===62||dt(b)){let Fe=b===47,vt=s.toLowerCase();return!Fe&&!i&&Lp.includes(vt)?(r=1,a.interrupt?t(b):R(b)):Ax.includes(s.toLowerCase())?(r=6,Fe?(e.consume(b),m):a.interrupt?t(b):R(b)):(r=7,a.interrupt&&!a.parser.lazy[a.now().line]?n(b):i?h(b):g(b))}return b===45||wt(b)?(e.consume(b),s+=String.fromCharCode(b),k):n(b)}function m(b){return b===62?(e.consume(b),a.interrupt?t:R):n(b)}function h(b){return de(b)?(e.consume(b),h):H(b)}function g(b){return b===47?(e.consume(b),H):b===58||b===95||Nn(b)?(e.consume(b),S):de(b)?(e.consume(b),g):H(b)}function S(b){return b===45||b===46||b===58||b===95||wt(b)?(e.consume(b),S):T(b)}function T(b){return b===61?(e.consume(b),E):de(b)?(e.consume(b),T):g(b)}function E(b){return b===null||b===60||b===61||b===62||b===96?n(b):b===34||b===39?(e.consume(b),o=b,w):de(b)?(e.consume(b),E):C(b)}function w(b){return b===o?(e.consume(b),o=null,U):b===null||te(b)?n(b):(e.consume(b),w)}function C(b){return b===null||b===34||b===39||b===47||b===60||b===61||b===62||b===96||dt(b)?T(b):(e.consume(b),C)}function U(b){return b===47||b===62||de(b)?g(b):n(b)}function H(b){return b===62?(e.consume(b),_):n(b)}function _(b){return b===null||te(b)?R(b):de(b)?(e.consume(b),_):n(b)}function R(b){return b===45&&r===2?(e.consume(b),W):b===60&&r===1?(e.consume(b),ie):b===62&&r===4?(e.consume(b),_e):b===63&&r===3?(e.consume(b),v):b===93&&r===5?(e.consume(b),Ue):te(b)&&(r===6||r===7)?(e.exit("htmlFlowData"),e.check(rC,lt,L)(b)):b===null||te(b)?(e.exit("htmlFlowData"),L(b)):(e.consume(b),R)}function L(b){return e.check(iC,G,lt)(b)}function G(b){return e.enter("lineEnding"),e.consume(b),e.exit("lineEnding"),P}function P(b){return b===null||te(b)?L(b):(e.enter("htmlFlowData"),R(b))}function W(b){return b===45?(e.consume(b),v):R(b)}function ie(b){return b===47?(e.consume(b),s="",we):R(b)}function we(b){if(b===62){let Fe=s.toLowerCase();return Lp.includes(Fe)?(e.consume(b),_e):R(b)}return Nn(b)&&s.length<8?(e.consume(b),s+=String.fromCharCode(b),we):R(b)}function Ue(b){return b===93?(e.consume(b),v):R(b)}function v(b){return b===62?(e.consume(b),_e):b===45&&r===2?(e.consume(b),v):R(b)}function _e(b){return b===null||te(b)?(e.exit("htmlFlowData"),lt(b)):(e.consume(b),_e)}function lt(b){return e.exit("htmlFlow"),t(b)}}function oC(e,t,n){let a=this;return r;function r(s){return te(s)?(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),i):n(s)}function i(s){return a.parser.lazy[a.now().line]?n(s):t(s)}}function cC(e,t,n){return a;function a(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),e.attempt(tr,t,n)}}var zp,rC,iC,Rx=N(()=>{ze();Cx();Ac();zp={concrete:!0,name:"htmlFlow",resolveTo:sC,tokenize:lC},rC={partial:!0,tokenize:cC},iC={partial:!0,tokenize:oC}});function uC(e,t,n){let a=this,r,i,s;return l;function l(v){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(v),o}function o(v){return v===33?(e.consume(v),c):v===47?(e.consume(v),T):v===63?(e.consume(v),g):Nn(v)?(e.consume(v),C):n(v)}function c(v){return v===45?(e.consume(v),u):v===91?(e.consume(v),i=0,x):Nn(v)?(e.consume(v),h):n(v)}function u(v){return v===45?(e.consume(v),d):n(v)}function p(v){return v===null?n(v):v===45?(e.consume(v),f):te(v)?(s=p,ie(v)):(e.consume(v),p)}function f(v){return v===45?(e.consume(v),d):p(v)}function d(v){return v===62?W(v):v===45?f(v):p(v)}function x(v){let _e="CDATA[";return v===_e.charCodeAt(i++)?(e.consume(v),i===_e.length?y:x):n(v)}function y(v){return v===null?n(v):v===93?(e.consume(v),k):te(v)?(s=y,ie(v)):(e.consume(v),y)}function k(v){return v===93?(e.consume(v),m):y(v)}function m(v){return v===62?W(v):v===93?(e.consume(v),m):y(v)}function h(v){return v===null||v===62?W(v):te(v)?(s=h,ie(v)):(e.consume(v),h)}function g(v){return v===null?n(v):v===63?(e.consume(v),S):te(v)?(s=g,ie(v)):(e.consume(v),g)}function S(v){return v===62?W(v):g(v)}function T(v){return Nn(v)?(e.consume(v),E):n(v)}function E(v){return v===45||wt(v)?(e.consume(v),E):w(v)}function w(v){return te(v)?(s=w,ie(v)):de(v)?(e.consume(v),w):W(v)}function C(v){return v===45||wt(v)?(e.consume(v),C):v===47||v===62||dt(v)?U(v):n(v)}function U(v){return v===47?(e.consume(v),W):v===58||v===95||Nn(v)?(e.consume(v),H):te(v)?(s=U,ie(v)):de(v)?(e.consume(v),U):W(v)}function H(v){return v===45||v===46||v===58||v===95||wt(v)?(e.consume(v),H):_(v)}function _(v){return v===61?(e.consume(v),R):te(v)?(s=_,ie(v)):de(v)?(e.consume(v),_):U(v)}function R(v){return v===null||v===60||v===61||v===62||v===96?n(v):v===34||v===39?(e.consume(v),r=v,L):te(v)?(s=R,ie(v)):de(v)?(e.consume(v),R):(e.consume(v),G)}function L(v){return v===r?(e.consume(v),r=void 0,P):v===null?n(v):te(v)?(s=L,ie(v)):(e.consume(v),L)}function G(v){return v===null||v===34||v===39||v===60||v===61||v===96?n(v):v===47||v===62||dt(v)?U(v):(e.consume(v),G)}function P(v){return v===47||v===62||dt(v)?U(v):n(v)}function W(v){return v===62?(e.consume(v),e.exit("htmlTextData"),e.exit("htmlText"),t):n(v)}function ie(v){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(v),e.exit("lineEnding"),we}function we(v){return de(v)?me(e,Ue,"linePrefix",a.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(v):Ue(v)}function Ue(v){return e.enter("htmlTextData"),s(v)}}var Mp,_x=N(()=>{At();ze();Mp={name:"htmlText",tokenize:uC}});function mC(e){let t=-1,n=[];for(;++t<e.length;){let a=e[t][1];if(n.push(e[t]),a.type==="labelImage"||a.type==="labelLink"||a.type==="labelEnd"){let r=a.type==="labelImage"?4:2;a.type="data",t+=r}}return e.length!==n.length&&zt(e,0,e.length,n),e}function hC(e,t){let n=e.length,a=0,r,i,s,l;for(;n--;)if(r=e[n][1],i){if(r.type==="link"||r.type==="labelLink"&&r._inactive)break;e[n][0]==="enter"&&r.type==="labelLink"&&(r._inactive=!0)}else if(s){if(e[n][0]==="enter"&&(r.type==="labelImage"||r.type==="labelLink")&&!r._balanced&&(i=n,r.type!=="labelLink")){a=2;break}}else r.type==="labelEnd"&&(s=n);let o={type:e[i][1].type==="labelLink"?"link":"image",start:ee({},e[i][1].start),end:ee({},e[e.length-1][1].end)},c={type:"label",start:ee({},e[i][1].start),end:ee({},e[s][1].end)},u={type:"labelText",start:ee({},e[i+a+2][1].end),end:ee({},e[s-2][1].start)};return l=[["enter",o,t],["enter",c,t]],l=Ft(l,e.slice(i+1,i+a+3)),l=Ft(l,[["enter",u,t]]),l=Ft(l,Pi(t.parser.constructs.insideSpan.null,e.slice(i+a+4,s-3),t)),l=Ft(l,[["exit",u,t],e[s-2],e[s-1],["exit",c,t]]),l=Ft(l,e.slice(s+1)),l=Ft(l,[["exit",o,t]]),zt(e,i,e.length,l),e}function gC(e,t,n){let a=this,r=a.events.length,i,s;for(;r--;)if((a.events[r][1].type==="labelImage"||a.events[r][1].type==="labelLink")&&!a.events[r][1]._balanced){i=a.events[r][1];break}return l;function l(f){return i?i._inactive?p(f):(s=a.parser.defined.includes(xa(a.sliceSerialize({start:i.end,end:a.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(f),e.exit("labelMarker"),e.exit("labelEnd"),o):n(f)}function o(f){return f===40?e.attempt(dC,u,s?u:p)(f):f===91?e.attempt(fC,u,s?c:p)(f):s?u(f):p(f)}function c(f){return e.attempt(pC,u,p)(f)}function u(f){return t(f)}function p(f){return i._balanced=!0,n(f)}}function vC(e,t,n){return a;function a(p){return e.enter("resource"),e.enter("resourceMarker"),e.consume(p),e.exit("resourceMarker"),r}function r(p){return dt(p)?Dr(e,i)(p):i(p)}function i(p){return p===41?u(p):zc(e,s,l,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(p)}function s(p){return dt(p)?Dr(e,o)(p):u(p)}function l(p){return n(p)}function o(p){return p===34||p===39||p===40?Uc(e,c,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(p):u(p)}function c(p){return dt(p)?Dr(e,u)(p):u(p)}function u(p){return p===41?(e.enter("resourceMarker"),e.consume(p),e.exit("resourceMarker"),e.exit("resource"),t):n(p)}}function yC(e,t,n){let a=this;return r;function r(l){return Mc.call(a,e,i,s,"reference","referenceMarker","referenceString")(l)}function i(l){return a.parser.defined.includes(xa(a.sliceSerialize(a.events[a.events.length-1][1]).slice(1,-1)))?t(l):n(l)}function s(l){return n(l)}}function bC(e,t,n){return a;function a(i){return e.enter("reference"),e.enter("referenceMarker"),e.consume(i),e.exit("referenceMarker"),r}function r(i){return i===93?(e.enter("referenceMarker"),e.consume(i),e.exit("referenceMarker"),e.exit("reference"),t):n(i)}}var Or,dC,fC,pC,Pc=N(()=>{wp();Ap();Cp();Rp();ze();Wa();Tc();wc();Or={name:"labelEnd",resolveAll:mC,resolveTo:hC,tokenize:gC},dC={tokenize:vC},fC={tokenize:yC},pC={tokenize:bC}});function xC(e,t,n){let a=this;return r;function r(l){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(l),e.exit("labelImageMarker"),i}function i(l){return l===91?(e.enter("labelMarker"),e.consume(l),e.exit("labelMarker"),e.exit("labelImage"),s):n(l)}function s(l){return l===94&&"_hiddenFootnoteSupport"in a.parser.constructs?n(l):t(l)}}var Up,Dx=N(()=>{Pc();Up={name:"labelStartImage",resolveAll:Or.resolveAll,tokenize:xC}});function SC(e,t,n){let a=this;return r;function r(s){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(s),e.exit("labelMarker"),e.exit("labelLink"),i}function i(s){return s===94&&"_hiddenFootnoteSupport"in a.parser.constructs?n(s):t(s)}}var Pp,Ox=N(()=>{Pc();Pp={name:"labelStartLink",resolveAll:Or.resolveAll,tokenize:SC}});function NC(e,t){return n;function n(a){return e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),me(e,t,"linePrefix")}}var vl,Lx=N(()=>{At();vl={name:"lineEnding",tokenize:NC}});function EC(e,t,n){let a=0,r;return i;function i(c){return e.enter("thematicBreak"),s(c)}function s(c){return r=c,l(c)}function l(c){return c===r?(e.enter("thematicBreakSequence"),o(c)):a>=3&&(c===null||te(c))?(e.exit("thematicBreak"),t(c)):n(c)}function o(c){return c===r?(e.consume(c),a++,o):(e.exit("thematicBreakSequence"),de(c)?me(e,l,"whitespace")(c):l(c))}}var Lr,Bp=N(()=>{At();ze();Lr={name:"thematicBreak",tokenize:EC}});function wC(e,t,n){let a=this,r=a.events[a.events.length-1],i=r&&r[1].type==="linePrefix"?r[2].sliceSerialize(r[1],!0).length:0,s=0;return l;function l(d){let x=a.containerState.type||(d===42||d===43||d===45?"listUnordered":"listOrdered");if(x==="listUnordered"?!a.containerState.marker||d===a.containerState.marker:pl(d)){if(a.containerState.type||(a.containerState.type=x,e.enter(x,{_container:!0})),x==="listUnordered")return e.enter("listItemPrefix"),d===42||d===45?e.check(Lr,n,c)(d):c(d);if(!a.interrupt||d===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),o(d)}return n(d)}function o(d){return pl(d)&&++s<10?(e.consume(d),o):(!a.interrupt||s<2)&&(a.containerState.marker?d===a.containerState.marker:d===41||d===46)?(e.exit("listItemValue"),c(d)):n(d)}function c(d){return e.enter("listItemMarker"),e.consume(d),e.exit("listItemMarker"),a.containerState.marker=a.containerState.marker||d,e.check(tr,a.interrupt?n:u,e.attempt(kC,f,p))}function u(d){return a.containerState.initialBlankLine=!0,i++,f(d)}function p(d){return de(d)?(e.enter("listItemPrefixWhitespace"),e.consume(d),e.exit("listItemPrefixWhitespace"),f):n(d)}function f(d){return a.containerState.size=i+a.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(d)}}function AC(e,t,n){let a=this;return a.containerState._closeFlow=void 0,e.check(tr,r,i);function r(l){return a.containerState.furtherBlankLines=a.containerState.furtherBlankLines||a.containerState.initialBlankLine,me(e,t,"listItemIndent",a.containerState.size+1)(l)}function i(l){return a.containerState.furtherBlankLines||!de(l)?(a.containerState.furtherBlankLines=void 0,a.containerState.initialBlankLine=void 0,s(l)):(a.containerState.furtherBlankLines=void 0,a.containerState.initialBlankLine=void 0,e.attempt(TC,t,s)(l))}function s(l){return a.containerState._closeFlow=!0,a.interrupt=void 0,me(e,e.attempt(jt,t,n),"linePrefix",a.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(l)}}function CC(e,t,n){let a=this;return me(e,r,"listItemIndent",a.containerState.size+1);function r(i){let s=a.events[a.events.length-1];return s&&s[1].type==="listItemIndent"&&s[2].sliceSerialize(s[1],!0).length===a.containerState.size?t(i):n(i)}}function RC(e){e.exit(this.containerState.type)}function _C(e,t,n){let a=this;return me(e,r,"listItemPrefixWhitespace",a.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function r(i){let s=a.events[a.events.length-1];return!de(i)&&s&&s[1].type==="listItemPrefixWhitespace"?t(i):n(i)}}var jt,kC,TC,zx=N(()=>{At();ze();Ac();Bp();jt={continuation:{tokenize:AC},exit:RC,name:"list",tokenize:wC},kC={partial:!0,tokenize:_C},TC={partial:!0,tokenize:CC}});function DC(e,t){let n=e.length,a,r,i;for(;n--;)if(e[n][0]==="enter"){if(e[n][1].type==="content"){a=n;break}e[n][1].type==="paragraph"&&(r=n)}else e[n][1].type==="content"&&e.splice(n,1),!i&&e[n][1].type==="definition"&&(i=n);let s={type:"setextHeading",start:ee({},e[a][1].start),end:ee({},e[e.length-1][1].end)};return e[r][1].type="setextHeadingText",i?(e.splice(r,0,["enter",s,t]),e.splice(i+1,0,["exit",e[a][1],t]),e[a][1].end=ee({},e[i][1].end)):e[a][1]=s,e.push(["exit",s,t]),e}function OC(e,t,n){let a=this,r;return i;function i(c){let u=a.events.length,p;for(;u--;)if(a.events[u][1].type!=="lineEnding"&&a.events[u][1].type!=="linePrefix"&&a.events[u][1].type!=="content"){p=a.events[u][1].type==="paragraph";break}return!a.parser.lazy[a.now().line]&&(a.interrupt||p)?(e.enter("setextHeadingLine"),r=c,s(c)):n(c)}function s(c){return e.enter("setextHeadingLineSequence"),l(c)}function l(c){return c===r?(e.consume(c),l):(e.exit("setextHeadingLineSequence"),de(c)?me(e,o,"lineSuffix")(c):o(c))}function o(c){return c===null||te(c)?(e.exit("setextHeadingLine"),t(c)):n(c)}}var Bc,Mx=N(()=>{At();ze();Bc={name:"setextUnderline",resolveTo:DC,tokenize:OC}});var Vp=N(()=>{px();mx();Ac();hx();gx();vx();bx();xx();Sx();Ex();kx();Tx();wx();Rx();_x();Pc();Dx();Ox();Lx();zx();Mx();Bp()});function LC(e){let t=this,n=e.attempt(tr,a,e.attempt(this.parser.constructs.flowInitial,r,me(e,e.attempt(this.parser.constructs.flow,r,e.attempt(Tp,r)),"linePrefix")));return n;function a(i){if(i===null){e.consume(i);return}return e.enter("lineEndingBlank"),e.consume(i),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function r(i){if(i===null){e.consume(i);return}return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),t.currentConstruct=void 0,n}}var Ux,Px=N(()=>{Vp();At();Ux={tokenize:LC}});function qx(e){return{resolveAll:jx(e==="text"?zC:void 0),tokenize:t};function t(n){let a=this,r=this.parser.constructs[e],i=n.attempt(r,s,l);return s;function s(u){return c(u)?i(u):l(u)}function l(u){if(u===null){n.consume(u);return}return n.enter("data"),n.consume(u),o}function o(u){return c(u)?(n.exit("data"),i(u)):(n.consume(u),o)}function c(u){if(u===null)return!0;let p=r[u],f=-1;if(p)for(;++f<p.length;){let d=p[f];if(!d.previous||d.previous.call(a,a.previous))return!0}return!1}}}function jx(e){return t;function t(n,a){let r=-1,i;for(;++r<=n.length;)i===void 0?n[r]&&n[r][1].type==="data"&&(i=r,r++):(!n[r]||n[r][1].type!=="data")&&(r!==i+2&&(n[i][1].end=n[r-1][1].end,n.splice(i+2,r-i-2),r=i+2),i=void 0);return e?e(n,a):n}}function zC(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||e[n][1].type==="lineEnding")&&e[n-1][1].type==="data"){let a=e[n-1][1],r=t.sliceStream(a),i=r.length,s=-1,l=0,o;for(;i--;){let c=r[i];if(typeof c=="string"){for(s=c.length;c.charCodeAt(s-1)===32;)l++,s--;if(s)break;s=-1}else if(c===-2)o=!0,l++;else if(c!==-1){i++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(l=0),l){let c={type:n===e.length||o||l<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:i?s:a.start._bufferIndex+s,_index:a.start._index+i,line:a.end.line,column:a.end.column-l,offset:a.end.offset-l},end:ee({},a.end)};a.end=ee({},c.start),a.start.offset===a.end.offset?Object.assign(a,c):(e.splice(n,0,["enter",c,t],["exit",c,t]),n+=2)}n++}return e}var Bx,Vx,Hx,Hp=N(()=>{Bx={resolveAll:jx()},Vx=qx("string"),Hx=qx("text")});var qp={};fu(qp,{attentionMarkers:()=>jC,contentInitial:()=>UC,disable:()=>IC,document:()=>MC,flow:()=>BC,flowInitial:()=>PC,insideSpan:()=>qC,string:()=>VC,text:()=>HC});var MC,UC,PC,BC,VC,HC,qC,jC,IC,Ix=N(()=>{Vp();Hp();MC={42:jt,43:jt,45:jt,48:jt,49:jt,50:jt,51:jt,52:jt,53:jt,54:jt,55:jt,56:jt,57:jt,62:Cc},UC={91:_p},PC={[-2]:hl,[-1]:hl,32:hl},BC={35:Op,42:Lr,45:[Bc,Lr],60:zp,61:Bc,95:Lr,96:Dc,126:Dc},VC={38:_c,92:Rc},HC={[-5]:vl,[-4]:vl,[-3]:vl,33:Up,38:_c,42:ml,60:[Np,Mp],91:Pp,92:[Dp,Rc],93:Or,95:ml,96:Ep},qC={null:[ml,Bx]},jC={null:[42,95]},IC={null:[]}});function Yx(e,t,n){let a={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0},r={},i=[],s=[],l=[],o=!0,c={attempt:U(w),check:U(C),consume:S,enter:T,exit:E,interrupt:U(C,{interrupt:!0})},u={code:null,containerState:{},defineSkip:m,events:[],now:k,parser:e,previous:null,sliceSerialize:x,sliceStream:y,write:d},p=t.tokenize.call(u,c),f;return t.resolveAll&&i.push(t),u;function d(L){return s=Ft(s,L),h(),s[s.length-1]!==null?[]:(H(t,0),u.events=Pi(i,u.events,u),u.events)}function x(L,G){return GC(y(L),G)}function y(L){return YC(s,L)}function k(){let{_bufferIndex:L,_index:G,line:P,column:W,offset:ie}=a;return{_bufferIndex:L,_index:G,line:P,column:W,offset:ie}}function m(L){r[L.line]=L.column,R()}function h(){let L;for(;a._index<s.length;){let G=s[a._index];if(typeof G=="string")for(L=a._index,a._bufferIndex<0&&(a._bufferIndex=0);a._index===L&&a._bufferIndex<G.length;)g(G.charCodeAt(a._bufferIndex));else g(G)}}function g(L){o=void 0,f=L,p=p(L)}function S(L){te(L)?(a.line++,a.column=1,a.offset+=L===-3?2:1,R()):L!==-1&&(a.column++,a.offset++),a._bufferIndex<0?a._index++:(a._bufferIndex++,a._bufferIndex===s[a._index].length&&(a._bufferIndex=-1,a._index++)),u.previous=L,o=!0}function T(L,G){let P=G||{};return P.type=L,P.start=k(),u.events.push(["enter",P,u]),l.push(P),P}function E(L){let G=l.pop();return G.end=k(),u.events.push(["exit",G,u]),G}function w(L,G){H(L,G.from)}function C(L,G){G.restore()}function U(L,G){return P;function P(W,ie,we){let Ue,v,_e,lt;return Array.isArray(W)?Fe(W):"tokenize"in W?Fe([W]):b(W);function b(F){return V;function V(B){let J=B!==null&&F[B],he=B!==null&&F.null,Xe=[...Array.isArray(J)?J:J?[J]:[],...Array.isArray(he)?he:he?[he]:[]];return Fe(Xe)(B)}}function Fe(F){return Ue=F,v=0,F.length===0?we:vt(F[v])}function vt(F){return V;function V(B){return lt=_(),_e=F,F.partial||(u.currentConstruct=F),F.name&&u.parser.constructs.disable.null.includes(F.name)?Q(B):F.tokenize.call(G?Object.assign(Object.create(u),G):u,c,ce,Q)(B)}}function ce(F){return o=!0,L(_e,lt),ie}function Q(F){return o=!0,lt.restore(),++v<Ue.length?vt(Ue[v]):we}}}function H(L,G){L.resolveAll&&!i.includes(L)&&i.push(L),L.resolve&&zt(u.events,G,u.events.length-G,L.resolve(u.events.slice(G),u)),L.resolveTo&&(u.events=L.resolveTo(u.events,u))}function _(){let L=k(),G=u.previous,P=u.currentConstruct,W=u.events.length,ie=Array.from(l);return{from:W,restore:we};function we(){a=L,u.previous=G,u.currentConstruct=P,u.events.length=W,l=ie,R()}}function R(){a.line in r&&a.column<2&&(a.column=r[a.line],a.offset+=r[a.line]-1)}}function YC(e,t){let n=t.start._index,a=t.start._bufferIndex,r=t.end._index,i=t.end._bufferIndex,s;if(n===r)s=[e[n].slice(a,i)];else{if(s=e.slice(n,r),a>-1){let l=s[0];typeof l=="string"?s[0]=l.slice(a):s.shift()}i>0&&s.push(e[r].slice(0,i))}return s}function GC(e,t){let n=-1,a=[],r;for(;++n<e.length;){let i=e[n],s;if(typeof i=="string")s=i;else switch(i){case-5:{s="\r";break}case-4:{s=`
11
+ `;break}case-3:{s=`\r
12
+ `;break}case-2:{s=t?" ":" ";break}case-1:{if(!t&&r)continue;s=" ";break}default:s=String.fromCharCode(i)}r=i===-2,a.push(s)}return a.join("")}var Gx=N(()=>{ze();Wa();wc()});function jp(e){let a={constructs:W0([qp,...(e||{}).extensions||[]]),content:r(sx),defined:[],document:r(cx),flow:r(Ux),lazy:{},string:r(Vx),text:r(Hx)};return a;function r(i){return s;function s(l){return Yx(a,i,l)}}}var Xx=N(()=>{ex();lx();ux();Px();Hp();Ix();Gx()});function Ip(e){for(;!Lc(e););return e}var Qx=N(()=>{kp()});function Yp(){let e=1,t="",n=!0,a;return r;function r(i,s,l){let o=[],c,u,p,f,d;for(i=t+(typeof i=="string"?i.toString():new TextDecoder(s||void 0).decode(i)),p=0,t="",n&&(i.charCodeAt(0)===65279&&p++,n=void 0);p<i.length;){if(Fx.lastIndex=p,c=Fx.exec(i),f=c&&c.index!==void 0?c.index:i.length,d=i.charCodeAt(f),!c){t=i.slice(p);break}if(d===10&&p===f&&a)o.push(-3),a=void 0;else switch(a&&(o.push(-5),a=void 0),p<f&&(o.push(i.slice(p,f)),e+=f-p),d){case 0:{o.push(65533),e++;break}case 9:{for(u=Math.ceil(e/4)*4,o.push(-2);e++<u;)o.push(-1);break}case 10:{o.push(-4),e=1;break}default:a=!0,e=1}p=f+1}return l&&(a&&o.push(-5),t&&o.push(t),o.push(null)),o}}var Fx,Zx=N(()=>{Fx=/[\0\t\n\r]/g});var $x=N(()=>{Xx();Qx();Zx()});function Jx(e){return e.replace(XC,QC)}function QC(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){let r=n.charCodeAt(1),i=r===120||r===88;return kc(n.slice(i?2:1),i?16:10)}return Ui(n)||e}var XC,Kx=N(()=>{Ec();xp();XC=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi});function Gp(e,t,n){return typeof t!="string"&&(n=t,t=void 0),FC(n)(Ip(jp(n).document().write(Yp()(e,t,!0))))}function FC(e){let t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:i(le),autolinkProtocol:U,autolinkEmail:U,atxHeading:i($i),blockQuote:i(B),characterEscape:U,characterReference:U,codeFenced:i(J),codeFencedFenceInfo:s,codeFencedFenceMeta:s,codeIndented:i(J,s),codeText:i(he,s),codeTextData:U,data:U,codeFlowValue:U,definition:i(Xe),definitionDestinationString:s,definitionLabelString:s,definitionTitleString:s,emphasis:i(Pl),hardBreakEscape:i(Ji),hardBreakTrailing:i(Ji),htmlFlow:i(I,s),htmlFlowData:U,htmlText:i(I,s),htmlTextData:U,image:i(Y),label:s,link:i(le),listItem:i(Pt),listItemValue:f,listOrdered:i(He,p),listUnordered:i(He),paragraph:i(dn),reference:b,referenceString:s,resourceDestinationString:s,resourceTitleString:s,setextHeading:i($i),strong:i(_t),thematicBreak:i(ft)},exit:{atxHeading:o(),atxHeadingSequence:T,autolink:o(),autolinkEmail:V,autolinkProtocol:F,blockQuote:o(),characterEscapeValue:H,characterReferenceMarkerHexadecimal:vt,characterReferenceMarkerNumeric:vt,characterReferenceValue:ce,characterReference:Q,codeFenced:o(k),codeFencedFence:y,codeFencedFenceInfo:d,codeFencedFenceMeta:x,codeFlowValue:H,codeIndented:o(m),codeText:o(P),codeTextData:H,data:H,definition:o(),definitionDestinationString:S,definitionLabelString:h,definitionTitleString:g,emphasis:o(),hardBreakEscape:o(R),hardBreakTrailing:o(R),htmlFlow:o(L),htmlFlowData:H,htmlText:o(G),htmlTextData:H,image:o(ie),label:Ue,labelText:we,lineEnding:_,link:o(W),listItem:o(),listOrdered:o(),listUnordered:o(),paragraph:o(),referenceString:Fe,resourceDestinationString:v,resourceTitleString:_e,resource:lt,setextHeading:o(C),setextHeadingLineSequence:w,setextHeadingText:E,strong:o(),thematicBreak:o()}};t1(t,(e||{}).mdastExtensions||[]);let n={};return a;function a(D){let X={type:"root",children:[]},fe={stack:[X],tokenStack:[],config:t,enter:l,exit:c,buffer:s,resume:u,data:n},Ee=[],qe=-1;for(;++qe<D.length;)if(D[qe][1].type==="listOrdered"||D[qe][1].type==="listUnordered")if(D[qe][0]==="enter")Ee.push(qe);else{let Vn=Ee.pop();qe=r(D,Vn,qe)}for(qe=-1;++qe<D.length;){let Vn=t[D[qe][0]];e1.call(Vn,D[qe][1].type)&&Vn[D[qe][1].type].call(Object.assign({sliceSerialize:D[qe][2].sliceSerialize},fe),D[qe][1])}if(fe.tokenStack.length>0){let Vn=fe.tokenStack[fe.tokenStack.length-1];(Vn[1]||Wx).call(fe,void 0,Vn[0])}for(X.position={start:nr(D.length>0?D[0][1].start:{line:1,column:1,offset:0}),end:nr(D.length>0?D[D.length-2][1].end:{line:1,column:1,offset:0})},qe=-1;++qe<t.transforms.length;)X=t.transforms[qe](X)||X;return X}function r(D,X,fe){let Ee=X-1,qe=-1,Vn=!1,sr,ea,Ki,Wi;for(;++Ee<=fe;){let fn=D[Ee];switch(fn[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{fn[0]==="enter"?qe++:qe--,Wi=void 0;break}case"lineEndingBlank":{fn[0]==="enter"&&(sr&&!Wi&&!qe&&!Ki&&(Ki=Ee),Wi=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:Wi=void 0}if(!qe&&fn[0]==="enter"&&fn[1].type==="listItemPrefix"||qe===-1&&fn[0]==="exit"&&(fn[1].type==="listUnordered"||fn[1].type==="listOrdered")){if(sr){let qr=Ee;for(ea=void 0;qr--;){let ta=D[qr];if(ta[1].type==="lineEnding"||ta[1].type==="lineEndingBlank"){if(ta[0]==="exit")continue;ea&&(D[ea][1].type="lineEndingBlank",Vn=!0),ta[1].type="lineEnding",ea=qr}else if(!(ta[1].type==="linePrefix"||ta[1].type==="blockQuotePrefix"||ta[1].type==="blockQuotePrefixWhitespace"||ta[1].type==="blockQuoteMarker"||ta[1].type==="listItemIndent"))break}Ki&&(!ea||Ki<ea)&&(sr._spread=!0),sr.end=Object.assign({},ea?D[ea][1].start:fn[1].end),D.splice(ea||Ee,0,["exit",sr,fn[2]]),Ee++,fe++}if(fn[1].type==="listItemPrefix"){let qr={type:"listItem",_spread:!1,start:Object.assign({},fn[1].start),end:void 0};sr=qr,D.splice(Ee,0,["enter",qr,fn[2]]),Ee++,fe++,Ki=void 0,Wi=!0}}}return D[X][1]._spread=Vn,fe}function i(D,X){return fe;function fe(Ee){l.call(this,D(Ee),Ee),X&&X.call(this,Ee)}}function s(){this.stack.push({type:"fragment",children:[]})}function l(D,X,fe){this.stack[this.stack.length-1].children.push(D),this.stack.push(D),this.tokenStack.push([X,fe||void 0]),D.position={start:nr(X.start),end:void 0}}function o(D){return X;function X(fe){D&&D.call(this,fe),c.call(this,fe)}}function c(D,X){let fe=this.stack.pop(),Ee=this.tokenStack.pop();if(Ee)Ee[0].type!==D.type&&(X?X.call(this,D,Ee[0]):(Ee[1]||Wx).call(this,D,Ee[0]));else throw new Error("Cannot close `"+D.type+"` ("+Ka({start:D.start,end:D.end})+"): it\u2019s not open");fe.position.end=nr(D.end)}function u(){return bp(this.stack.pop())}function p(){this.data.expectingFirstListItemValue=!0}function f(D){if(this.data.expectingFirstListItemValue){let X=this.stack[this.stack.length-2];X.start=Number.parseInt(this.sliceSerialize(D),10),this.data.expectingFirstListItemValue=void 0}}function d(){let D=this.resume(),X=this.stack[this.stack.length-1];X.lang=D}function x(){let D=this.resume(),X=this.stack[this.stack.length-1];X.meta=D}function y(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function k(){let D=this.resume(),X=this.stack[this.stack.length-1];X.value=D.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function m(){let D=this.resume(),X=this.stack[this.stack.length-1];X.value=D.replace(/(\r?\n|\r)$/g,"")}function h(D){let X=this.resume(),fe=this.stack[this.stack.length-1];fe.label=X,fe.identifier=xa(this.sliceSerialize(D)).toLowerCase()}function g(){let D=this.resume(),X=this.stack[this.stack.length-1];X.title=D}function S(){let D=this.resume(),X=this.stack[this.stack.length-1];X.url=D}function T(D){let X=this.stack[this.stack.length-1];if(!X.depth){let fe=this.sliceSerialize(D).length;X.depth=fe}}function E(){this.data.setextHeadingSlurpLineEnding=!0}function w(D){let X=this.stack[this.stack.length-1];X.depth=this.sliceSerialize(D).codePointAt(0)===61?1:2}function C(){this.data.setextHeadingSlurpLineEnding=void 0}function U(D){let fe=this.stack[this.stack.length-1].children,Ee=fe[fe.length-1];(!Ee||Ee.type!=="text")&&(Ee=en(),Ee.position={start:nr(D.start),end:void 0},fe.push(Ee)),this.stack.push(Ee)}function H(D){let X=this.stack.pop();X.value+=this.sliceSerialize(D),X.position.end=nr(D.end)}function _(D){let X=this.stack[this.stack.length-1];if(this.data.atHardBreak){let fe=X.children[X.children.length-1];fe.position.end=nr(D.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(X.type)&&(U.call(this,D),H.call(this,D))}function R(){this.data.atHardBreak=!0}function L(){let D=this.resume(),X=this.stack[this.stack.length-1];X.value=D}function G(){let D=this.resume(),X=this.stack[this.stack.length-1];X.value=D}function P(){let D=this.resume(),X=this.stack[this.stack.length-1];X.value=D}function W(){let D=this.stack[this.stack.length-1];if(this.data.inReference){let X=this.data.referenceType||"shortcut";D.type+="Reference",D.referenceType=X,delete D.url,delete D.title}else delete D.identifier,delete D.label;this.data.referenceType=void 0}function ie(){let D=this.stack[this.stack.length-1];if(this.data.inReference){let X=this.data.referenceType||"shortcut";D.type+="Reference",D.referenceType=X,delete D.url,delete D.title}else delete D.identifier,delete D.label;this.data.referenceType=void 0}function we(D){let X=this.sliceSerialize(D),fe=this.stack[this.stack.length-2];fe.label=Jx(X),fe.identifier=xa(X).toLowerCase()}function Ue(){let D=this.stack[this.stack.length-1],X=this.resume(),fe=this.stack[this.stack.length-1];if(this.data.inReference=!0,fe.type==="link"){let Ee=D.children;fe.children=Ee}else fe.alt=X}function v(){let D=this.resume(),X=this.stack[this.stack.length-1];X.url=D}function _e(){let D=this.resume(),X=this.stack[this.stack.length-1];X.title=D}function lt(){this.data.inReference=void 0}function b(){this.data.referenceType="collapsed"}function Fe(D){let X=this.resume(),fe=this.stack[this.stack.length-1];fe.label=X,fe.identifier=xa(this.sliceSerialize(D)).toLowerCase(),this.data.referenceType="full"}function vt(D){this.data.characterReferenceType=D.type}function ce(D){let X=this.sliceSerialize(D),fe=this.data.characterReferenceType,Ee;fe?(Ee=kc(X,fe==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):Ee=Ui(X);let qe=this.stack[this.stack.length-1];qe.value+=Ee}function Q(D){let X=this.stack.pop();X.position.end=nr(D.end)}function F(D){H.call(this,D);let X=this.stack[this.stack.length-1];X.url=this.sliceSerialize(D)}function V(D){H.call(this,D);let X=this.stack[this.stack.length-1];X.url="mailto:"+this.sliceSerialize(D)}function B(){return{type:"blockquote",children:[]}}function J(){return{type:"code",lang:null,meta:null,value:""}}function he(){return{type:"inlineCode",value:""}}function Xe(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function Pl(){return{type:"emphasis",children:[]}}function $i(){return{type:"heading",depth:0,children:[]}}function Ji(){return{type:"break"}}function I(){return{type:"html",value:""}}function Y(){return{type:"image",title:null,url:"",alt:null}}function le(){return{type:"link",title:null,url:"",children:[]}}function He(D){return{type:"list",ordered:D.type==="listOrdered",start:null,spread:D._spread,children:[]}}function Pt(D){return{type:"listItem",spread:D._spread,checked:null,children:[]}}function dn(){return{type:"paragraph",children:[]}}function _t(){return{type:"strong",children:[]}}function en(){return{type:"text",value:""}}function ft(){return{type:"thematicBreak"}}}function nr(e){return{line:e.line,column:e.column,offset:e.offset}}function t1(e,t){let n=-1;for(;++n<t.length;){let a=t[n];Array.isArray(a)?t1(e,a):ZC(e,a)}}function ZC(e,t){let n;for(n in t)if(e1.call(t,n))switch(n){case"canContainEols":{let a=t[n];a&&e[n].push(...a);break}case"transforms":{let a=t[n];a&&e[n].push(...a);break}case"enter":case"exit":{let a=t[n];a&&Object.assign(e[n],a);break}}}function Wx(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+Ka({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+Ka({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+Ka({start:t.start,end:t.end})+") is still open")}var e1,n1=N(()=>{$0();$x();xp();Kx();Tc();Ec();pp();e1={}.hasOwnProperty});var a1=N(()=>{n1()});function Vc(e){let t=this;t.parser=n;function n(a){return Gp(a,tt(ee(ee({},t.data("settings")),e),{extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]}))}}var r1=N(()=>{a1()});var i1=N(()=>{r1()});function s1(e,t){let n={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)}var l1=N(()=>{""});function o1(e,t){let n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
13
+ `}]}var c1=N(()=>{""});function u1(e,t){let n=t.value?t.value+`
14
+ `:"",a={};t.lang&&(a.className=["language-"+t.lang]);let r={type:"element",tagName:"code",properties:a,children:[{type:"text",value:n}]};return t.meta&&(r.data={meta:t.meta}),e.patch(t,r),r=e.applyData(t,r),r={type:"element",tagName:"pre",properties:{},children:[r]},e.patch(t,r),r}var d1=N(()=>{""});function f1(e,t){let n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}var p1=N(()=>{""});function m1(e,t){let n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}var h1=N(()=>{""});function g1(e,t){let n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",a=String(t.identifier).toUpperCase(),r=Un(a.toLowerCase()),i=e.footnoteOrder.indexOf(a),s,l=e.footnoteCounts.get(a);l===void 0?(l=0,e.footnoteOrder.push(a),s=e.footnoteOrder.length):s=i+1,l+=1,e.footnoteCounts.set(a,l);let o={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+r,id:n+"fnref-"+r+(l>1?"-"+l:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(s)}]};e.patch(t,o);let c={type:"element",tagName:"sup",properties:{},children:[o]};return e.patch(t,c),e.applyData(t,c)}var v1=N(()=>{_r()});function y1(e,t){let n={type:"element",tagName:"h"+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}var b1=N(()=>{""});function x1(e,t){if(e.options.allowDangerousHtml){let n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}var S1=N(()=>{""});function Hc(e,t){let n=t.referenceType,a="]";if(n==="collapsed"?a+="[]":n==="full"&&(a+="["+(t.label||t.identifier)+"]"),t.type==="imageReference")return[{type:"text",value:"!["+t.alt+a}];let r=e.all(t),i=r[0];i&&i.type==="text"?i.value="["+i.value:r.unshift({type:"text",value:"["});let s=r[r.length-1];return s&&s.type==="text"?s.value+=a:r.push({type:"text",value:a}),r}var Xp=N(()=>{""});function N1(e,t){let n=String(t.identifier).toUpperCase(),a=e.definitionById.get(n);if(!a)return Hc(e,t);let r={src:Un(a.url||""),alt:t.alt};a.title!==null&&a.title!==void 0&&(r.title=a.title);let i={type:"element",tagName:"img",properties:r,children:[]};return e.patch(t,i),e.applyData(t,i)}var E1=N(()=>{_r();Xp()});function k1(e,t){let n={src:Un(t.url)};t.alt!==null&&t.alt!==void 0&&(n.alt=t.alt),t.title!==null&&t.title!==void 0&&(n.title=t.title);let a={type:"element",tagName:"img",properties:n,children:[]};return e.patch(t,a),e.applyData(t,a)}var T1=N(()=>{_r()});function w1(e,t){let n={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,n);let a={type:"element",tagName:"code",properties:{},children:[n]};return e.patch(t,a),e.applyData(t,a)}var A1=N(()=>{""});function C1(e,t){let n=String(t.identifier).toUpperCase(),a=e.definitionById.get(n);if(!a)return Hc(e,t);let r={href:Un(a.url||"")};a.title!==null&&a.title!==void 0&&(r.title=a.title);let i={type:"element",tagName:"a",properties:r,children:e.all(t)};return e.patch(t,i),e.applyData(t,i)}var R1=N(()=>{_r();Xp()});function _1(e,t){let n={href:Un(t.url)};t.title!==null&&t.title!==void 0&&(n.title=t.title);let a={type:"element",tagName:"a",properties:n,children:e.all(t)};return e.patch(t,a),e.applyData(t,a)}var D1=N(()=>{_r()});function O1(e,t,n){let a=e.all(t),r=n?$C(n):L1(t),i={},s=[];if(typeof t.checked=="boolean"){let u=a[0],p;u&&u.type==="element"&&u.tagName==="p"?p=u:(p={type:"element",tagName:"p",properties:{},children:[]},a.unshift(p)),p.children.length>0&&p.children.unshift({type:"text",value:" "}),p.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),i.className=["task-list-item"]}let l=-1;for(;++l<a.length;){let u=a[l];(r||l!==0||u.type!=="element"||u.tagName!=="p")&&s.push({type:"text",value:`
15
+ `}),u.type==="element"&&u.tagName==="p"&&!r?s.push(...u.children):s.push(u)}let o=a[a.length-1];o&&(r||o.type!=="element"||o.tagName!=="p")&&s.push({type:"text",value:`
16
+ `});let c={type:"element",tagName:"li",properties:i,children:s};return e.patch(t,c),e.applyData(t,c)}function $C(e){let t=!1;if(e.type==="list"){t=e.spread||!1;let n=e.children,a=-1;for(;!t&&++a<n.length;)t=L1(n[a])}return t}function L1(e){let t=e.spread;return t==null?e.children.length>1:t}var z1=N(()=>{""});function M1(e,t){let n={},a=e.all(t),r=-1;for(typeof t.start=="number"&&t.start!==1&&(n.start=t.start);++r<a.length;){let s=a[r];if(s.type==="element"&&s.tagName==="li"&&s.properties&&Array.isArray(s.properties.className)&&s.properties.className.includes("task-list-item")){n.className=["contains-task-list"];break}}let i={type:"element",tagName:t.ordered?"ol":"ul",properties:n,children:e.wrap(a,!0)};return e.patch(t,i),e.applyData(t,i)}var U1=N(()=>{""});function P1(e,t){let n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}var B1=N(()=>{""});function V1(e,t){let n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}var H1=N(()=>{""});function q1(e,t){let n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}var j1=N(()=>{""});function I1(e,t){let n=e.all(t),a=n.shift(),r=[];if(a){let s={type:"element",tagName:"thead",properties:{},children:e.wrap([a],!0)};e.patch(t.children[0],s),r.push(s)}if(n.length>0){let s={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},l=Mi(t.children[1]),o=xc(t.children[t.children.length-1]);l&&o&&(s.position={start:l,end:o}),r.push(s)}let i={type:"element",tagName:"table",properties:{},children:e.wrap(r,!0)};return e.patch(t,i),e.applyData(t,i)}var Y1=N(()=>{Sc()});function G1(e,t,n){let a=n?n.children:void 0,i=(a?a.indexOf(t):1)===0?"th":"td",s=n&&n.type==="table"?n.align:void 0,l=s?s.length:t.children.length,o=-1,c=[];for(;++o<l;){let p=t.children[o],f={},d=s?s[o]:void 0;d&&(f.align=d);let x={type:"element",tagName:i,properties:f,children:[]};p&&(x.children=e.all(p),e.patch(p,x),x=e.applyData(p,x)),c.push(x)}let u={type:"element",tagName:"tr",properties:{},children:e.wrap(c,!0)};return e.patch(t,u),e.applyData(t,u)}var X1=N(()=>{""});function Q1(e,t){let n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}var F1=N(()=>{""});function $1(e){let t=String(e),n=/\r?\n|\r/g,a=n.exec(t),r=0,i=[];for(;a;)i.push(Z1(t.slice(r,a.index),r>0,!0),a[0]),r=a.index+a[0].length,a=n.exec(t);return i.push(Z1(t.slice(r),r>0,!1)),i.join("")}function Z1(e,t,n){let a=0,r=e.length;if(t){let i=e.codePointAt(a);for(;i===9||i===32;)a++,i=e.codePointAt(a)}if(n){let i=e.codePointAt(r-1);for(;i===9||i===32;)r--,i=e.codePointAt(r-1)}return r>a?e.slice(a,r):""}var J1=N(()=>{});function K1(e,t){let n={type:"text",value:$1(String(t.value))};return e.patch(t,n),e.applyData(t,n)}var W1=N(()=>{J1()});function eS(e,t){let n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}var tS=N(()=>{""});function qc(){}var nS,aS=N(()=>{l1();c1();d1();p1();h1();v1();b1();S1();E1();T1();A1();R1();D1();z1();U1();B1();H1();j1();Y1();X1();F1();W1();tS();nS={blockquote:s1,break:o1,code:u1,delete:f1,emphasis:m1,footnoteReference:g1,heading:y1,html:x1,imageReference:N1,image:k1,inlineCode:w1,linkReference:C1,link:_1,listItem:O1,list:M1,paragraph:P1,root:V1,strong:q1,table:I1,tableCell:Q1,tableRow:G1,text:K1,thematicBreak:eS,toml:qc,yaml:qc,definition:qc,footnoteDefinition:qc}});var rS,e2,Zp,cS=N(()=>{rS=typeof self=="object"?self:globalThis,e2=(e,t)=>{let n=(r,i)=>(e.set(i,r),r),a=r=>{if(e.has(r))return e.get(r);let[i,s]=t[r];switch(i){case 0:case-1:return n(s,r);case 1:{let l=n([],r);for(let o of s)l.push(a(o));return l}case 2:{let l=n({},r);for(let[o,c]of s)l[a(o)]=a(c);return l}case 3:return n(new Date(s),r);case 4:{let{source:l,flags:o}=s;return n(new RegExp(l,o),r)}case 5:{let l=n(new Map,r);for(let[o,c]of s)l.set(a(o),a(c));return l}case 6:{let l=n(new Set,r);for(let o of s)l.add(a(o));return l}case 7:{let{name:l,message:o}=s;return n(new rS[l](o),r)}case 8:return n(BigInt(s),r);case"BigInt":return n(Object(BigInt(s)),r);case"ArrayBuffer":return n(new Uint8Array(s).buffer,s);case"DataView":{let{buffer:l}=new Uint8Array(s);return n(new DataView(l),s)}}return n(new rS[i](s),r)};return a},Zp=e=>e2(new Map,e)(0)});var Bi,t2,n2,yl,Ic,a2,$p,uS=N(()=>{Bi="",{toString:t2}={},{keys:n2}=Object,yl=e=>{let t=typeof e;if(t!=="object"||!e)return[0,t];let n=t2.call(e).slice(8,-1);switch(n){case"Array":return[1,Bi];case"Object":return[2,Bi];case"Date":return[3,Bi];case"RegExp":return[4,Bi];case"Map":return[5,Bi];case"Set":return[6,Bi];case"DataView":return[1,n]}return n.includes("Array")?[1,n]:n.includes("Error")?[7,n]:[2,n]},Ic=([e,t])=>e===0&&(t==="function"||t==="symbol"),a2=(e,t,n,a)=>{let r=(s,l)=>{let o=a.push(s)-1;return n.set(l,o),o},i=s=>{if(n.has(s))return n.get(s);let[l,o]=yl(s);switch(l){case 0:{let u=s;switch(o){case"bigint":l=8,u=s.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+o);u=null;break;case"undefined":return r([-1],s)}return r([l,u],s)}case 1:{if(o){let f=s;return o==="DataView"?f=new Uint8Array(s.buffer):o==="ArrayBuffer"&&(f=new Uint8Array(s)),r([o,[...f]],s)}let u=[],p=r([l,u],s);for(let f of s)u.push(i(f));return p}case 2:{if(o)switch(o){case"BigInt":return r([o,s.toString()],s);case"Boolean":case"Number":case"String":return r([o,s.valueOf()],s)}if(t&&"toJSON"in s)return i(s.toJSON());let u=[],p=r([l,u],s);for(let f of n2(s))(e||!Ic(yl(s[f])))&&u.push([i(f),i(s[f])]);return p}case 3:return r([l,s.toISOString()],s);case 4:{let{source:u,flags:p}=s;return r([l,{source:u,flags:p}],s)}case 5:{let u=[],p=r([l,u],s);for(let[f,d]of s)(e||!(Ic(yl(f))||Ic(yl(d))))&&u.push([i(f),i(d)]);return p}case 6:{let u=[],p=r([l,u],s);for(let f of s)(e||!Ic(yl(f)))&&u.push(i(f));return p}}let{message:c}=s;return r([l,{name:o,message:c}],s)};return i},$p=(e,{json:t,lossy:n}={})=>{let a=[];return a2(!(t||n),!!t,new Map,a)(e),a}});var Vi,Jp=N(()=>{cS();uS();Vi=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?Zp($p(e,t)):structuredClone(e):(e,t)=>Zp($p(e,t))});function r2(e,t){let n=[{type:"text",value:"\u21A9"}];return t>1&&n.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(t)}]}),n}function i2(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function dS(e){let t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||r2,a=e.options.footnoteBackLabel||i2,r=e.options.footnoteLabel||"Footnotes",i=e.options.footnoteLabelTagName||"h2",s=e.options.footnoteLabelProperties||{className:["sr-only"]},l=[],o=-1;for(;++o<e.footnoteOrder.length;){let c=e.footnoteById.get(e.footnoteOrder[o]);if(!c)continue;let u=e.all(c),p=String(c.identifier).toUpperCase(),f=Un(p.toLowerCase()),d=0,x=[],y=e.footnoteCounts.get(p);for(;y!==void 0&&++d<=y;){x.length>0&&x.push({type:"text",value:" "});let h=typeof n=="string"?n:n(o,d);typeof h=="string"&&(h={type:"text",value:h}),x.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+f+(d>1?"-"+d:""),dataFootnoteBackref:"",ariaLabel:typeof a=="string"?a:a(o,d),className:["data-footnote-backref"]},children:Array.isArray(h)?h:[h]})}let k=u[u.length-1];if(k&&k.type==="element"&&k.tagName==="p"){let h=k.children[k.children.length-1];h&&h.type==="text"?h.value+=" ":k.children.push({type:"text",value:" "}),k.children.push(...x)}else u.push(...x);let m={type:"element",tagName:"li",properties:{id:t+"fn-"+f},children:e.wrap(u,!0)};e.patch(c,m),l.push(m)}if(l.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:i,properties:tt(ee({},Vi(s)),{id:"footnote-label"}),children:[{type:"text",value:r}]},{type:"text",value:`
17
+ `},{type:"element",tagName:"ol",properties:{},children:e.wrap(l,!0)},{type:"text",value:`
18
+ `}]}}var fS=N(()=>{Jp();_r()});function s2(e){let t=[],n=-1;for(;++n<e.length;)t[n]=Yc(e[n]);return Gc(a);function a(...r){let i=-1;for(;++i<t.length;)if(t[i].apply(this,r))return!0;return!1}}function l2(e){let t=e;return Gc(n);function n(a){let r=a,i;for(i in e)if(r[i]!==t[i])return!1;return!0}}function o2(e){return Gc(t);function t(n){return n&&n.type===e}}function Gc(e){return t;function t(n,a,r){return!!(u2(n)&&e.call(this,n,typeof a=="number"?a:void 0,r||void 0))}}function c2(){return!0}function u2(e){return e!==null&&typeof e=="object"&&"type"in e}var Yc,pS=N(()=>{Yc=(function(e){if(e==null)return c2;if(typeof e=="function")return Gc(e);if(typeof e=="object")return Array.isArray(e)?s2(e):l2(e);if(typeof e=="string")return o2(e);throw new Error("Expected function, string, or object as test")})});var mS=N(()=>{pS()});function em(e,t,n,a){let r;typeof t=="function"&&typeof n!="function"?(a=n,n=t):r=t;let i=Yc(r),s=a?-1:1;l(e,void 0,[])();function l(o,c,u){let p=o&&typeof o=="object"?o:{};if(typeof p.type=="string"){let d=typeof p.tagName=="string"?p.tagName:typeof p.name=="string"?p.name:void 0;Object.defineProperty(f,"name",{value:"node ("+(o.type+(d?"<"+d+">":""))+")"})}return f;function f(){let d=hS,x,y,k;if((!t||i(o,c,u[u.length-1]||void 0))&&(d=d2(n(o,u)),d[0]===Xc))return d;if("children"in o&&o.children){let m=o;if(m.children&&d[0]!==Wp)for(y=(a?m.children.length:-1)+s,k=u.concat(m);y>-1&&y<m.children.length;){let h=m.children[y];if(x=l(h,y,k)(),x[0]===Xc)return x;y=typeof x[1]=="number"?x[1]:y+s}}return d}}}function d2(e){return Array.isArray(e)?e:typeof e=="number"?[Kp,e]:e==null?hS:[e]}var hS,Kp,Xc,Wp,gS=N(()=>{mS();hS=[],Kp=!0,Xc=!1,Wp="skip"});var vS=N(()=>{gS()});function bl(e,t,n,a){let r,i,s;typeof t=="function"&&typeof n!="function"?(i=void 0,s=t,r=n):(i=t,s=n,r=a),em(e,i,l,r);function l(o,c){let u=c[c.length-1],p=u?u.children.indexOf(o):void 0;return s(o,p,u)}}var yS=N(()=>{vS()});var tm=N(()=>{yS()});function xS(e,t){let n=t||f2,a=new Map,r=new Map,i=new Map,s=ee(ee({},nS),n.handlers),l={all:c,applyData:m2,definitionById:a,footnoteById:r,footnoteCounts:i,footnoteOrder:[],handlers:s,one:o,options:n,patch:p2,wrap:g2};return bl(e,function(u){if(u.type==="definition"||u.type==="footnoteDefinition"){let p=u.type==="definition"?a:r,f=String(u.identifier).toUpperCase();p.has(f)||p.set(f,u)}}),l;function o(u,p){let f=u.type,d=l.handlers[f];if(nm.call(l.handlers,f)&&d)return d(l,u,p);if(l.options.passThrough&&l.options.passThrough.includes(f)){if("children"in u){let y=u,{children:k}=y,m=fh(y,["children"]),h=Vi(m);return h.children=l.all(u),h}return Vi(u)}return(l.options.unknownHandler||h2)(l,u,p)}function c(u){let p=[];if("children"in u){let f=u.children,d=-1;for(;++d<f.length;){let x=l.one(f[d],u);if(x){if(d&&f[d-1].type==="break"&&(!Array.isArray(x)&&x.type==="text"&&(x.value=bS(x.value)),!Array.isArray(x)&&x.type==="element")){let y=x.children[0];y&&y.type==="text"&&(y.value=bS(y.value))}Array.isArray(x)?p.push(...x):p.push(x)}}}return p}}function p2(e,t){e.position&&(t.position=dp(e))}function m2(e,t){let n=t;if(e&&e.data){let a=e.data.hName,r=e.data.hChildren,i=e.data.hProperties;if(typeof a=="string")if(n.type==="element")n.tagName=a;else{let s="children"in n?n.children:[n];n={type:"element",tagName:a,properties:{},children:s}}n.type==="element"&&i&&Object.assign(n.properties,Vi(i)),"children"in n&&n.children&&r!==null&&r!==void 0&&(n.children=r)}return n}function h2(e,t){let n=t.data||{},a="value"in t&&!(nm.call(n,"hProperties")||nm.call(n,"hChildren"))?{type:"text",value:t.value}:{type:"element",tagName:"div",properties:{},children:e.all(t)};return e.patch(t,a),e.applyData(t,a)}function g2(e,t){let n=[],a=-1;for(t&&n.push({type:"text",value:`
19
19
  `});++a<e.length;)a&&n.push({type:"text",value:`
20
20
  `}),n.push(e[a]);return t&&e.length>0&&n.push({type:"text",value:`
21
- `}),n}function h1(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}var Kp,sR,v1=b(()=>{Qp();$p();yu();Wx();Kp={}.hasOwnProperty,sR={}});function Iu(e,t){let n=g1(e,t),a=n.one(e,void 0),i=s1(n),r=Array.isArray(a)?{type:"root",children:a}:a||{type:"root",children:[]};return i&&("children"in r,r.children.push({type:"text",value:`
22
- `},i)),r}var y1=b(()=>{o1();v1()});var b1=b(()=>{y1()});function Gu(e,t){return e&&"run"in e?function(n,a){return z(this,null,function*(){let i=Iu(n,K({file:a},t));yield e.run(i,a)})}:function(n,a){return Iu(n,K({file:a},e||t))}}var S1=b(()=>{b1()});var x1=b(()=>{S1()});function Wp(e){if(e)throw e}var N1=b(()=>{});var D1=Ut((cz,_1)=>{"use strict";var Xu=Object.prototype.hasOwnProperty,R1=Object.prototype.toString,E1=Object.defineProperty,k1=Object.getOwnPropertyDescriptor,T1=function(t){return typeof Array.isArray=="function"?Array.isArray(t):R1.call(t)==="[object Array]"},w1=function(t){if(!t||R1.call(t)!=="[object Object]")return!1;var n=Xu.call(t,"constructor"),a=t.constructor&&t.constructor.prototype&&Xu.call(t.constructor.prototype,"isPrototypeOf");if(t.constructor&&!n&&!a)return!1;var i;for(i in t);return typeof i=="undefined"||Xu.call(t,i)},A1=function(t,n){E1&&n.name==="__proto__"?E1(t,n.name,{enumerable:!0,configurable:!0,value:n.newValue,writable:!0}):t[n.name]=n.newValue},C1=function(t,n){if(n==="__proto__")if(Xu.call(t,n)){if(k1)return k1(t,n).value}else return;return t[n]};_1.exports=function e(){var t,n,a,i,r,l,s=arguments[0],o=1,u=arguments.length,c=!1;for(typeof s=="boolean"&&(c=s,s=arguments[1]||{},o=2),(s==null||typeof s!="object"&&typeof s!="function")&&(s={});o<u;++o)if(t=arguments[o],t!=null)for(n in t)a=C1(s,n),i=C1(t,n),s!==i&&(c&&i&&(w1(i)||(r=T1(i)))?(r?(r=!1,l=a&&T1(a)?a:[]):l=a&&w1(a)?a:{},A1(s,{name:n,newValue:e(c,l,i)})):typeof i!="undefined"&&A1(s,{name:n,newValue:i}));return s}});function ys(e){if(typeof e!="object"||e===null)return!1;let t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}var O1=b(()=>{});function em(){let e=[],t={run:n,use:a};return t;function n(...i){let r=-1,l=i.pop();if(typeof l!="function")throw new TypeError("Expected function as last argument, not "+l);s(null,...i);function s(o,...u){let c=e[++r],p=-1;if(o){l(o);return}for(;++p<i.length;)(u[p]===null||u[p]===void 0)&&(u[p]=i[p]);i=u,c?L1(c,s)(...u):l(null,...u)}}function a(i){if(typeof i!="function")throw new TypeError("Expected `middelware` to be a function, not "+i);return e.push(i),t}}function L1(e,t){let n;return a;function a(...l){let s=e.length>l.length,o;s&&l.push(i);try{o=e.apply(this,l)}catch(u){let c=u;if(s&&n)throw c;return i(c)}s||(o&&o.then&&typeof o.then=="function"?o.then(r,i):o instanceof Error?i(o):r(o))}function i(l,...s){n||(n=!0,t(l,...s))}function r(l){i(null,l)}}var z1=b(()=>{});var M1=b(()=>{z1()});function dR(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');bs(e);let n=0,a=-1,i=e.length,r;if(t===void 0||t.length===0||t.length>e.length){for(;i--;)if(e.codePointAt(i)===47){if(r){n=i+1;break}}else a<0&&(r=!0,a=i+1);return a<0?"":e.slice(n,a)}if(t===e)return"";let l=-1,s=t.length-1;for(;i--;)if(e.codePointAt(i)===47){if(r){n=i+1;break}}else l<0&&(r=!0,l=i+1),s>-1&&(e.codePointAt(i)===t.codePointAt(s--)?s<0&&(a=i):(s=-1,a=l));return n===a?a=l:a<0&&(a=e.length),e.slice(n,a)}function pR(e){if(bs(e),e.length===0)return".";let t=-1,n=e.length,a;for(;--n;)if(e.codePointAt(n)===47){if(a){t=n;break}}else a||(a=!0);return t<0?e.codePointAt(0)===47?"/":".":t===1&&e.codePointAt(0)===47?"//":e.slice(0,t)}function mR(e){bs(e);let t=e.length,n=-1,a=0,i=-1,r=0,l;for(;t--;){let s=e.codePointAt(t);if(s===47){if(l){a=t+1;break}continue}n<0&&(l=!0,n=t+1),s===46?i<0?i=t:r!==1&&(r=1):i>-1&&(r=-1)}return i<0||n<0||r===0||r===1&&i===n-1&&i===a+1?"":e.slice(i,n)}function hR(...e){let t=-1,n;for(;++t<e.length;)bs(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":gR(n)}function gR(e){bs(e);let t=e.codePointAt(0)===47,n=vR(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function vR(e,t){let n="",a=0,i=-1,r=0,l=-1,s,o;for(;++l<=e.length;){if(l<e.length)s=e.codePointAt(l);else{if(s===47)break;s=47}if(s===47){if(!(i===l-1||r===1))if(i!==l-1&&r===2){if(n.length<2||a!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(o=n.lastIndexOf("/"),o!==n.length-1){o<0?(n="",a=0):(n=n.slice(0,o),a=n.length-1-n.lastIndexOf("/")),i=l,r=0;continue}}else if(n.length>0){n="",a=0,i=l,r=0;continue}}t&&(n=n.length>0?n+"/..":"..",a=2)}else n.length>0?n+="/"+e.slice(i+1,l):n=e.slice(i+1,l),a=l-i-1;i=l,r=0}else s===46&&r>-1?r++:r=-1}return n}function bs(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}var qn,U1=b(()=>{qn={basename:dR,dirname:pR,extname:mR,join:hR,sep:"/"}});function yR(){return"/"}var B1,V1=b(()=>{B1={cwd:yR}});function Vr(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}var tm=b(()=>{});function H1(e){if(typeof e=="string")e=new URL(e);else if(!Vr(e)){let t=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code="ERR_INVALID_ARG_TYPE",t}if(e.protocol!=="file:"){let t=new TypeError("The URL must be of scheme file");throw t.code="ERR_INVALID_URL_SCHEME",t}return bR(e)}function bR(e){if(e.hostname!==""){let a=new TypeError('File URL host must be "localhost" or empty on darwin');throw a.code="ERR_INVALID_FILE_URL_HOST",a}let t=e.pathname,n=-1;for(;++n<t.length;)if(t.codePointAt(n)===37&&t.codePointAt(n+1)===50){let a=t.codePointAt(n+2);if(a===70||a===102){let i=new TypeError("File URL path must not include encoded / characters");throw i.code="ERR_INVALID_FILE_URL_PATH",i}}return decodeURIComponent(t)}var P1=b(()=>{tm();tm()});function am(e,t){if(e&&e.includes(qn.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+qn.sep+"`")}function im(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function q1(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function SR(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}var nm,Oi,j1=b(()=>{cp();U1();V1();P1();nm=["history","path","basename","stem","extname","dirname"],Oi=class{constructor(t){let n;t?Vr(t)?n={path:t}:typeof t=="string"||SR(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":B1.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let a=-1;for(;++a<nm.length;){let r=nm[a];r in n&&n[r]!==void 0&&n[r]!==null&&(this[r]=r==="history"?[...n[r]]:n[r])}let i;for(i in n)nm.includes(i)||(this[i]=n[i])}get basename(){return typeof this.path=="string"?qn.basename(this.path):void 0}set basename(t){im(t,"basename"),am(t,"basename"),this.path=qn.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?qn.dirname(this.path):void 0}set dirname(t){q1(this.basename,"dirname"),this.path=qn.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?qn.extname(this.path):void 0}set extname(t){if(am(t,"extname"),q1(this.dirname,"extname"),t){if(t.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(t.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=qn.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){Vr(t)&&(t=H1(t)),im(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?qn.basename(this.path,this.extname):void 0}set stem(t){im(t,"stem"),am(t,"stem"),this.path=qn.join(this.dirname||"",t+(this.extname||""))}fail(t,n,a){let i=this.message(t,n,a);throw i.fatal=!0,i}info(t,n,a){let i=this.message(t,n,a);return i.fatal=void 0,i}message(t,n,a){let i=new st(t,n,a);return this.path&&(i.name=this.path+":"+i.name,i.file=this.path),i.fatal=!1,this.messages.push(i),i}toString(t){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(t||void 0).decode(this.value)}}});var rm=b(()=>{j1()});var Y1,I1=b(()=>{Y1=(function(e){let a=this.constructor.prototype,i=a[e],r=function(){return i.apply(r,arguments)};return Object.setPrototypeOf(r,a),r})});function lm(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function sm(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function om(e,t){if(t)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function G1(e){if(!ys(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function X1(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function Qu(e){return NR(e)?e:new Oi(e)}function NR(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function ER(e){return typeof e=="string"||kR(e)}function kR(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}var Fu,xR,um,cm,Q1=b(()=>{N1();Fu=F(D1(),1);O1();M1();rm();I1();xR={}.hasOwnProperty,um=class e extends Y1{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=em()}copy(){let t=new e,n=-1;for(;++n<this.attachers.length;){let a=this.attachers[n];t.use(...a)}return t.data((0,Fu.default)(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(om("data",this.frozen),this.namespace[t]=n,this):xR.call(this.namespace,t)&&this.namespace[t]||void 0:t?(om("data",this.frozen),this.namespace=t,this):this.namespace}freeze(){if(this.frozen)return this;let t=this;for(;++this.freezeIndex<this.attachers.length;){let[n,...a]=this.attachers[this.freezeIndex];if(a[0]===!1)continue;a[0]===!0&&(a[0]=void 0);let i=n.call(t,...a);typeof i=="function"&&this.transformers.use(i)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(t){this.freeze();let n=Qu(t),a=this.parser||this.Parser;return lm("parse",a),a(String(n),n)}process(t,n){let a=this;return this.freeze(),lm("process",this.parser||this.Parser),sm("process",this.compiler||this.Compiler),n?i(void 0,n):new Promise(i);function i(r,l){let s=Qu(t),o=a.parse(s);a.run(o,s,function(c,p,d){if(c||!p||!d)return u(c);let f=p,S=a.stringify(f,d);ER(S)?d.value=S:d.result=S,u(c,d)});function u(c,p){c||!p?l(c):r?r(p):n(void 0,p)}}}processSync(t){let n=!1,a;return this.freeze(),lm("processSync",this.parser||this.Parser),sm("processSync",this.compiler||this.Compiler),this.process(t,i),X1("processSync","process",n),a;function i(r,l){n=!0,Wp(r),a=l}}run(t,n,a){G1(t),this.freeze();let i=this.transformers;return!a&&typeof n=="function"&&(a=n,n=void 0),a?r(void 0,a):new Promise(r);function r(l,s){let o=Qu(n);i.run(t,o,u);function u(c,p,d){let f=p||t;c?s(c):l?l(f):a(void 0,f,d)}}}runSync(t,n){let a=!1,i;return this.run(t,n,r),X1("runSync","run",a),i;function r(l,s){Wp(l),i=s,a=!0}}stringify(t,n){this.freeze();let a=Qu(n),i=this.compiler||this.Compiler;return sm("stringify",i),G1(t),i(t,a)}use(t,...n){let a=this.attachers,i=this.namespace;if(om("use",this.frozen),t!=null)if(typeof t=="function")o(t,n);else if(typeof t=="object")Array.isArray(t)?s(t):l(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function r(u){if(typeof u=="function")o(u,[]);else if(typeof u=="object")if(Array.isArray(u)){let[c,...p]=u;o(c,p)}else l(u);else throw new TypeError("Expected usable value, not `"+u+"`")}function l(u){if(!("plugins"in u)&&!("settings"in u))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");s(u.plugins),u.settings&&(i.settings=(0,Fu.default)(!0,i.settings,u.settings))}function s(u){let c=-1;if(u!=null)if(Array.isArray(u))for(;++c<u.length;){let p=u[c];r(p)}else throw new TypeError("Expected a list of plugins, not `"+u+"`")}function o(u,c){let p=-1,d=-1;for(;++p<a.length;)if(a[p][0]===u){d=p;break}if(d===-1)a.push([u,...c]);else if(c.length>0){let[f,...S]=c,x=a[d][1];ys(x)&&ys(f)&&(f=(0,Fu.default)(!0,x,f)),a[d]=[u,f,...S]}}}},cm=new um().freeze()});var F1=b(()=>{Q1()});function Ss(e){let t=CR(e),n=RR(e);return _R(t.runSync(t.parse(n),n),e)}function CR(e){let t=e.rehypePlugins||Z1,n=e.remarkPlugins||Z1,a=e.remarkRehypeOptions?K(K({},e.remarkRehypeOptions),J1):J1;return cm().use(Uu).use(n).use(Gu,a).use(t)}function RR(e){let t=e.children||"",n=new Oi;return typeof t=="string"?n.value=t:(""+t,void 0),n}function _R(e,t){let n=t.allowedElements,a=t.allowElement,i=t.components,r=t.disallowedElements,l=t.skipHtml,s=t.unwrapDisallowed,o=t.urlTransform||K1;for(let c of AR)Object.hasOwn(t,c.from)&&(""+c.from+(c.to?"use `"+c.to+"` instead":"remove it")+TR+c.id,void 0);return n&&r&&void 0,vs(e,u),dp(e,{Fragment:Hr.Fragment,components:i,ignoreInvalidStyle:!0,jsx:Hr.jsx,jsxs:Hr.jsxs,passKeys:!0,passNode:!0});function u(c,p,d){if(c.type==="raw"&&d&&typeof p=="number")return l?d.children.splice(p,1):d.children[p]={type:"text",value:c.value},p;if(c.type==="element"){let f;for(f in us)if(Object.hasOwn(us,f)&&Object.hasOwn(c.properties,f)){let S=c.properties[f],x=us[f];(x===null||x.includes(c.tagName))&&(c.properties[f]=o(String(S||""),f,c))}}if(c.type==="element"){let f=n?!n.includes(c.tagName):r?r.includes(c.tagName):!1;if(!f&&a&&typeof p=="number"&&(f=!a(c,p,d)),f&&d&&typeof p=="number")return s&&c.children?d.children.splice(p,1,...c.children):d.children.splice(p,1),p}}}function K1(e){let t=e.indexOf(":"),n=e.indexOf("?"),a=e.indexOf("#"),i=e.indexOf("/");return t===-1||i!==-1&&t>i||n!==-1&&t>n||a!==-1&&t>a||wR.test(e.slice(0,t))?e:""}var Hr,$1,TR,Z1,J1,wR,AR,W1=b(()=>{B0();H0();Hr=F(re(),1),$1=F(Je(),1);tx();x1();F1();$p();rm();TR="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",Z1=[],J1={allowDangerousHtml:!0},wR=/^(https?|ircs?|mailto|xmpp)$/i,AR=[{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"}]});var fm=b(()=>{W1()});var Pe,xe,dm,ie,an=b(()=>{"use strict";Pe={LUA_API:"https://api.lua.dev",DEV_SERVER:"https://api.lua.dev",LOCAL_DEV:""},xe={CHAT_GENERATE:e=>`${Pe.LUA_API}/chat/generate/${e}?channel=dev`,TOOLS_TEST:e=>`${Pe.LUA_API}/tools/test/${e}`,CHAT_HISTORY:e=>`${Pe.LUA_API}/chat/history/${e}`,AGENT_TYPES:`${Pe.LUA_API}/agents/self-serve/types`,CREATE_AGENT:`${Pe.LUA_API}/agents/self-serve/create`,AGENT_DETAILS:e=>`${Pe.LUA_API}/admin/agents/${e}`,SKILL_VERSIONS:(e,t)=>`${Pe.DEV_SERVER}/developer/skills/${e}/${t}/versions`,PERSONA_VERSIONS:e=>`${Pe.LUA_API}/developer/agents/${e}/persona/versions`,DEPLOY_PERSONA_VERSION:(e,t)=>`${Pe.LUA_API}/developer/agents/${e}/persona/version/${t}`,AGENT_RESOURCES:e=>`${Pe.LUA_API}/admin/agents/${e}/resources`,AGENT_RESOURCE:(e,t)=>`${Pe.LUA_API}/admin/agents/${e}/resources/${t}`,AGENT_SKILLS:e=>`${Pe.LUA_API}/developer/skills/${e}`,ACTIVATE_SKILL:(e,t)=>`${Pe.LUA_API}/developer/skills/${e}/${t}`,PUBLISH_SKILL_VERSION:(e,t,n)=>`${Pe.LUA_API}/developer/skills/${e}/${t}/${n}/publish`,PRODUCTION_LOGS:e=>`${Pe.LUA_API}/developer/agents/${e}/logs`,PRODUCTION_ENV:e=>`${Pe.LUA_API}/developer/agents/${e}/env`,CREATE_SKILL:e=>`${Pe.DEV_SERVER}/developer/skills/${e}`,DEVELOPER_LOGS:(e,t)=>`${Pe.DEV_SERVER}/developer/skills/${e}/${t}/logs`,USER_DATA:e=>`${Pe.DEV_SERVER}/developer/user/data/agent/${e}`,LOCAL_CHAT:`${Pe.LOCAL_DEV}/chat`,LOCAL_PERSONA:`${Pe.LOCAL_DEV}/persona`,LOCAL_TOOLS:`${Pe.LOCAL_DEV}/tools`,LOCAL_TOOLS_TEST:`${Pe.LOCAL_DEV}/tools/test`,LOCAL_ENV:`${Pe.LOCAL_DEV}/env`},dm=class{constructor(t=""){this.baseUrl=t}getAllSkillOverrides(){return z(this,null,function*(){try{let n=yield(yield fetch("/api/skills")).json();return n.success&&n.skills&&Array.isArray(n.skills)?n.skills.map(a=>({skillId:a.skillId,sandboxId:a.sandboxId||a.skillId})).filter(a=>a.skillId&&a.sandboxId):[]}catch(t){return console.error("Error getting skill overrides:",t),[]}})}sendChatMessage(t,n,a,i,r,l){return z(this,null,function*(){try{let s=yield this.getAllSkillOverrides(),o=s.length>0?s:[{skillId:a,sandboxId:i}],u=K({messages:[{type:"text",text:t}],navigate:!0,skillOverride:o},l&&{personaOverride:l}),c=yield fetch(xe.CHAT_GENERATE(n),{method:"POST",headers:{"Content-Type":"application/json",Authorization:r},body:JSON.stringify(u)});if(!c.ok)throw new Error(`HTTP error! status: ${c.status}`);return{success:!0,text:(yield c.json()).text||"No response received"}}catch(s){return console.error("Chat API error:",s),{success:!1,error:s instanceof Error?s.message:"Unknown error occurred"}}})}sendProductionChatMessage(t,n,a){return z(this,null,function*(){try{let i={messages:[{type:"text",text:t}],navigate:!0,skillOverride:[]},r=yield fetch(xe.CHAT_GENERATE(n),{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${a}`},body:JSON.stringify(i)});if(!r.ok)throw new Error(`HTTP error! status: ${r.status}`);return{success:!0,text:(yield r.json()).text||"No response received"}}catch(i){return console.error("Production chat API error:",i),{success:!1,error:i instanceof Error?i.message:"Unknown error occurred"}}})}sendLocalChatMessage(t,n){return z(this,null,function*(){try{let a=yield fetch(xe.LOCAL_CHAT,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({message:t,persona:n})});if(!a.ok)throw new Error(`HTTP error! status: ${a.status}`);return yield a.json()}catch(a){return console.error("Local chat API error:",a),{success:!1,error:a instanceof Error?a.message:"Unknown error occurred"}}})}loadPersona(){return z(this,null,function*(){try{let t=yield fetch(xe.LOCAL_PERSONA);if(!t.ok)throw new Error(`HTTP error! status: ${t.status}`);return yield t.json()}catch(t){return console.error("Load persona error:",t),{success:!1,error:t instanceof Error?t.message:"Failed to load persona"}}})}savePersona(t){return z(this,null,function*(){try{let n=yield fetch(xe.LOCAL_PERSONA,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({persona:t})});if(!n.ok)throw new Error(`HTTP error! status: ${n.status}`);return yield n.json()}catch(n){return console.error("Save persona error:",n),{success:!1,error:n instanceof Error?n.message:"Failed to save persona"}}})}loadTools(){return z(this,null,function*(){try{let t=yield fetch(xe.LOCAL_TOOLS);if(!t.ok)throw new Error(`HTTP error! status: ${t.status}`);return yield t.json()}catch(t){return console.error("Load tools error:",t),{success:!1,error:t instanceof Error?t.message:"Failed to load tools"}}})}testTool(t,n,a,i,r,l){return z(this,null,function*(){try{let s={toolName:t,inputs:n,skillOverride:[{skillId:i,sandboxId:r}]},o=yield fetch(xe.TOOLS_TEST(a),{method:"POST",headers:{"Content-Type":"application/json",Authorization:l},body:JSON.stringify(s)});if(!o.ok)throw new Error(`HTTP error! status: ${o.status}`);let u=yield o.json();return{success:!0,result:u.result||u}}catch(s){return console.error("Tool test error:",s),{success:!1,error:s instanceof Error?s.message:"Unknown error occurred"}}})}getSkillVersions(t,n,a){return z(this,null,function*(){try{let i=yield fetch(xe.SKILL_VERSIONS(n,t),{method:"GET",headers:{Authorization:`Bearer ${a}`,"Content-Type":"application/json"}});if(!i.ok)throw new Error(`HTTP error! status: ${i.status}`);return{success:!0,versions:(yield i.json()).versions||[]}}catch(i){return console.error("Error fetching skill versions:",i),{success:!1,error:i instanceof Error?i.message:"Unknown error occurred"}}})}getPersonaVersions(t,n){return z(this,null,function*(){try{let a=yield fetch(`${Pe.DEV_SERVER}/developer/agents/${t}/persona/versions`,{method:"GET",headers:{Authorization:`Bearer ${n}`,"Content-Type":"application/json"}});if(!a.ok)throw new Error(`HTTP error! status: ${a.status}`);return{success:!0,versions:(yield a.json()).versions||[]}}catch(a){return console.error("Error fetching persona versions:",a),{success:!1,error:a instanceof Error?a.message:"Unknown error occurred"}}})}getProductionPersonaVersions(t,n){return z(this,null,function*(){try{let a=yield fetch(xe.PERSONA_VERSIONS(t),{method:"GET",headers:{Authorization:`Bearer ${n}`,"Content-Type":"application/json"}});if(!a.ok)throw new Error(`HTTP error! status: ${a.status}`);return{success:!0,versions:(yield a.json()).versions||[]}}catch(a){return console.error("Error fetching production persona versions:",a),{success:!1,error:a instanceof Error?a.message:"Unknown error occurred"}}})}deployPersonaVersion(t,n,a){return z(this,null,function*(){try{let i=yield fetch(xe.DEPLOY_PERSONA_VERSION(t,a),{method:"POST",headers:{Authorization:`Bearer ${n}`,"Content-Type":"application/json"},body:JSON.stringify({})});if(!i.ok)throw new Error(`HTTP error! status: ${i.status}`);return{success:!0,data:yield i.json()}}catch(i){return console.error("Error deploying persona version:",i),{success:!1,error:i instanceof Error?i.message:"Unknown error occurred"}}})}createPersonaVersion(t,n,a){return z(this,null,function*(){try{let i=yield fetch(`${Pe.DEV_SERVER}/developer/agents/${t}/persona/version`,{method:"POST",headers:{Authorization:`Bearer ${n}`,"Content-Type":"application/json"},body:JSON.stringify({persona:a})});if(!i.ok){let l=yield i.text();throw new Error(`HTTP error! status: ${i.status}, message: ${l}`)}return{success:!0,data:yield i.json()}}catch(i){return console.error("Error creating persona version:",i),{success:!1,error:i instanceof Error?i.message:"Unknown error occurred"}}})}createSkillVersion(t,n,a,i){return z(this,null,function*(){try{let r=yield fetch(`${Pe.DEV_SERVER}/developer/skills/${n}/${t}/version`,{method:"POST",headers:{Authorization:`Bearer ${a}`,"Content-Type":"application/json"},body:JSON.stringify(i)});if(!r.ok){let s=yield r.text();throw new Error(`HTTP error! status: ${r.status}, message: ${s}`)}return{success:!0,data:yield r.json()}}catch(r){return console.error("Error creating skill version:",r),{success:!1,error:r instanceof Error?r.message:"Unknown error occurred"}}})}loadEnvContent(){return z(this,null,function*(){try{let t=yield fetch(xe.LOCAL_ENV);if(!t.ok)throw new Error(`HTTP error! status: ${t.status}`);return yield t.json()}catch(t){return console.error("Load env error:",t),{success:!1,error:t instanceof Error?t.message:"Failed to load environment variables"}}})}saveEnvContent(t){return z(this,null,function*(){try{let n=yield fetch(xe.LOCAL_ENV,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({content:t})});if(!n.ok)throw new Error(`HTTP error! status: ${n.status}`);return yield n.json()}catch(n){return console.error("Save env error:",n),{success:!1,error:n instanceof Error?n.message:"Failed to save environment variables"}}})}testLocalTool(t,n){return z(this,null,function*(){try{let a=yield fetch(xe.LOCAL_TOOLS_TEST,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({toolName:t,inputs:n})});if(!a.ok)throw new Error(`HTTP error! status: ${a.status}`);return yield a.json()}catch(a){return console.error("Local tool test error:",a),{success:!1,error:a instanceof Error?a.message:"Unknown error occurred"}}})}loadChatHistory(t,n){return z(this,null,function*(){try{console.log("ApiService: Loading chat history with API key:",t,"agentId:",n);let a=yield fetch(xe.CHAT_HISTORY(n),{method:"GET",headers:{accept:"*/*",Authorization:`Bearer ${t}`}});if(console.log("ApiService: Response status:",a.status),console.log("ApiService: Response headers:",a.headers),!a.ok){let r=yield a.text();throw console.error("ApiService: HTTP error response:",r),new Error(`HTTP error! status: ${a.status}`)}let i=yield a.json();return console.log("ApiService: Received data:",i),{success:!0,data:i}}catch(a){return console.error("ApiService: Chat history load error:",a),{success:!1,error:a instanceof Error?a.message:"Unknown error occurred"}}})}clearChatHistory(t,n){return z(this,null,function*(){try{console.log("ApiService: Clearing chat history with API key:",t,"agentId:",n);let a=yield fetch(xe.CHAT_HISTORY(n),{method:"DELETE",headers:{accept:"*/*",Authorization:`Bearer ${t}`}});if(!a.ok)throw new Error(`HTTP error! status: ${a.status}`);return{success:!0}}catch(a){return console.error("Clear chat history error:",a),{success:!1,error:a instanceof Error?a.message:"Unknown error occurred"}}})}clearSandboxLogs(t,n,a){return z(this,null,function*(){try{console.log("ApiService: Clearing sandbox logs with API key:",t,"agentId:",n,"sandboxId:",a);let i=yield fetch(xe.DEVELOPER_LOGS(n,a),{method:"DELETE",headers:{accept:"application/json",Authorization:`Bearer ${t}`}});if(console.log("ApiService: Clear logs response status:",i.status),!i.ok){let l=yield i.text();throw console.error("ApiService: HTTP error response:",l),new Error(`HTTP error! status: ${i.status}`)}let r=yield i.json();return console.log("ApiService: Clear logs response:",r),{success:!0,data:r}}catch(i){return console.error("ApiService: Clear sandbox logs error:",i),{success:!1,error:i instanceof Error?i.message:"Unknown error occurred"}}})}loadAllSandboxLogs(t,n,a=20){return z(this,null,function*(){try{let i=yield this.getAllSkillOverrides();if(i.length===0)return{success:!0,data:{logs:[]}};let r=i.map(o=>z(this,null,function*(){try{let u=yield this.loadSandboxLogs(t,n,o.sandboxId,a);return u.success&&u.data&&u.data.logs?u.data.logs.map(c=>ut(K({},c),{skillName:o.skillId,sandboxId:o.sandboxId})):[]}catch(u){return console.error(`Error loading logs for skill ${o.skillId}:`,u),[]}}));return{success:!0,data:{logs:(yield Promise.all(r)).flat().sort((o,u)=>new Date(u.timestamp).getTime()-new Date(o.timestamp).getTime()).slice(0,a)}}}catch(i){return console.error("Error loading all sandbox logs:",i),{success:!1,error:i instanceof Error?i.message:"Unknown error occurred",data:{logs:[]}}}})}loadSandboxLogs(t,n,a,i=20){return z(this,null,function*(){try{console.log("ApiService: Loading sandbox logs with API key:",t,"agentId:",n,"sandboxId:",a);let r=yield fetch(`${xe.DEVELOPER_LOGS(n,a)}?limit=${i}`,{method:"GET",headers:{accept:"application/json",Authorization:`Bearer ${t}`}});if(console.log("ApiService: Logs response status:",r.status),!r.ok){let s=yield r.text();throw console.error("ApiService: HTTP error response:",s),new Error(`HTTP error! status: ${r.status}`)}let l=yield r.json();return console.log("ApiService: Received logs data:",l),{success:!0,data:l}}catch(r){return console.error("ApiService: Sandbox logs load error:",r),{success:!1,error:r instanceof Error?r.message:"Unknown error occurred"}}})}loadUserData(t,n){return z(this,null,function*(){try{console.log("ApiService: Loading user data with API key:",t,"agentId:",n),console.log("ApiService: API key length:",t==null?void 0:t.length),console.log("ApiService: API key starts with:",t==null?void 0:t.substring(0,10));let a=yield fetch(xe.USER_DATA(n),{method:"GET",headers:{accept:"*/*",Authorization:`Bearer ${t}`}});if(console.log("ApiService: User data response status:",a.status),console.log("ApiService: Response headers:",Object.fromEntries(a.headers.entries())),!a.ok){let r=yield a.text();if(console.error("ApiService: HTTP error response:",r),a.status===401){console.log("ApiService: Trying alternative authentication method...");let l=yield fetch(xe.USER_DATA(n),{method:"GET",headers:{accept:"*/*",Authorization:t}});if(l.ok){let s=yield l.json();return console.log("ApiService: Alternative auth successful:",s),{success:!0,data:s}}}throw new Error(`HTTP error! status: ${a.status}`)}let i=yield a.json();return console.log("ApiService: Received user data:",i),{success:!0,data:i}}catch(a){return console.error("ApiService: User data load error:",a),{success:!1,error:a instanceof Error?a.message:"Unknown error occurred"}}})}saveUserData(t,n,a){return z(this,null,function*(){return this.updateUserData(t,n,a)})}getUserData(t,n){return z(this,null,function*(){return this.loadUserData(t,n)})}updateUserData(t,n,a){return z(this,null,function*(){try{console.log("ApiService: Updating user data with API key:",t,"agentId:",n,"data:",a);let i=yield fetch(xe.USER_DATA(n),{method:"PUT",headers:{accept:"*/*",Authorization:`Bearer ${t}`,"Content-Type":"application/json"},body:JSON.stringify(a)});if(console.log("ApiService: Update user data response status:",i.status),!i.ok){let l=yield i.text();throw console.error("ApiService: HTTP error response:",l),new Error(`HTTP error! status: ${i.status}`)}let r=yield i.json();return console.log("ApiService: Updated user data response:",r),{success:!0,data:r}}catch(i){return console.error("ApiService: Update user data error:",i),{success:!1,error:i instanceof Error?i.message:"Unknown error occurred"}}})}loadResources(t,n){return z(this,null,function*(){try{console.log("ApiService: Loading resources with API key:",t,"agentId:",n);let a=yield fetch(xe.AGENT_RESOURCES(n),{method:"GET",headers:{accept:"application/json",Authorization:`Bearer ${t}`}});if(console.log("ApiService: Resources response status:",a.status),!a.ok)throw new Error(`HTTP error! status: ${a.status}`);let i=yield a.json();return console.log("ApiService: Resources data:",i),{success:!0,data:i||[]}}catch(a){return console.error("ApiService: Error loading resources:",a),{success:!1,error:a instanceof Error?a.message:"Unknown error occurred"}}})}createResource(t,n,a){return z(this,null,function*(){try{let i=yield fetch(xe.AGENT_RESOURCES(n),{method:"POST",headers:{accept:"application/json",Authorization:`Bearer ${t}`,"Content-Type":"application/json"},body:JSON.stringify(a)});if(!i.ok)throw new Error(`HTTP error! status: ${i.status}`);return{success:!0,data:yield i.json()}}catch(i){return console.error("Error creating resource:",i),{success:!1,error:i instanceof Error?i.message:"Unknown error occurred"}}})}updateResource(t,n,a,i){return z(this,null,function*(){try{let r=yield fetch(xe.AGENT_RESOURCE(n,a),{method:"PUT",headers:{accept:"application/json",Authorization:`Bearer ${t}`,"Content-Type":"application/json"},body:JSON.stringify(i)});if(!r.ok)throw new Error(`HTTP error! status: ${r.status}`);return{success:!0,data:yield r.json()}}catch(r){return console.error("Error updating resource:",r),{success:!1,error:r instanceof Error?r.message:"Unknown error occurred"}}})}deleteResource(t,n,a){return z(this,null,function*(){try{let i=yield fetch(xe.AGENT_RESOURCE(n,a),{method:"DELETE",headers:{accept:"*/*",Authorization:`Bearer ${t}`}});if(!i.ok)throw new Error(`HTTP error! status: ${i.status}`);return{success:!0}}catch(i){return console.error("Error deleting resource:",i),{success:!1,error:i instanceof Error?i.message:"Unknown error occurred"}}})}clearUserData(t,n){return z(this,null,function*(){try{console.log("ApiService: Clearing user data with API key:",t,"agentId:",n);let a=yield fetch(xe.USER_DATA(n),{method:"DELETE",headers:{accept:"*/*",Authorization:`Bearer ${t}`}});if(console.log("ApiService: Clear user data response status:",a.status),!a.ok){let r=yield a.text();throw console.error("ApiService: HTTP error response:",r),new Error(`HTTP error! status: ${a.status}`)}let i=yield a.json();return console.log("ApiService: Clear user data response:",i),{success:!0,data:i}}catch(a){return console.error("ApiService: Clear user data error:",a),{success:!1,error:a instanceof Error?a.message:"Unknown error occurred"}}})}createSkill(t,n,a){return z(this,null,function*(){try{let i=yield fetch(xe.CREATE_SKILL(n),{method:"POST",headers:{accept:"application/json",Authorization:`Bearer ${t}`,"Content-Type":"application/json"},body:JSON.stringify({name:a.name,description:a.description||`A Lua skill for ${a.name}`,context:a.context||""})});if(!i.ok){let l=yield i.text();return{success:!1,error:{message:`HTTP ${i.status}: ${l}`}}}return{success:!0,data:yield i.json()}}catch(i){return{success:!1,error:{message:i instanceof Error?i.message:"Unknown error"}}}})}getAgentTypes(t){return z(this,null,function*(){try{let n=yield fetch(xe.AGENT_TYPES,{method:"GET",headers:{Authorization:`Bearer ${t}`,"Content-Type":"application/json"}});if(!n.ok)throw new Error(`HTTP error! status: ${n.status}`);return yield n.json()}catch(n){return console.error("Error fetching agent types:",n),[]}})}createAgent(t,n){return z(this,null,function*(){try{let a=yield fetch(xe.CREATE_AGENT,{method:"POST",headers:{Authorization:`Bearer ${t}`,"Content-Type":"application/json"},body:JSON.stringify(n)});return a.ok?{success:!0,data:yield a.json()}:{success:!1,error:yield a.json()}}catch(a){return{success:!1,error:{message:a instanceof Error?a.message:"Unknown error"}}}})}getAgentDetails(t,n){return z(this,null,function*(){try{let a=yield fetch(xe.AGENT_DETAILS(n),{method:"GET",headers:{Authorization:`Bearer ${t}`,"Content-Type":"application/json"}});return a.ok?{success:!0,data:yield a.json()}:{success:!1,error:yield a.json()}}catch(a){return{success:!1,error:{message:a instanceof Error?a.message:"Unknown error"}}}})}getSkills(t,n){return z(this,null,function*(){try{console.log("ApiService: Loading skills with API key:",t,"agentId:",n);let a=yield fetch(xe.AGENT_SKILLS(n),{method:"GET",headers:{accept:"application/json",Authorization:`Bearer ${t}`}});if(console.log("ApiService: Skills response status:",a.status),!a.ok){let r=yield a.text();throw console.error("ApiService: HTTP error response:",r),new Error(`HTTP error! status: ${a.status}`)}let i=yield a.json();return console.log("ApiService: Received skills data:",i),{success:!0,skills:i.skills||[]}}catch(a){return console.error("ApiService: Skills load error:",a),{success:!1,error:a instanceof Error?a.message:"Unknown error occurred"}}})}activateSkill(t,n,a,i){return z(this,null,function*(){try{console.log(`ApiService: ${i?"Activating":"Deactivating"} skill:`,a,"for agent:",n);let r=yield fetch(xe.ACTIVATE_SKILL(n,a),{method:"PUT",headers:{accept:"application/json",Authorization:`Bearer ${t}`,"Content-Type":"application/json"},body:JSON.stringify({active:i})});if(console.log("ApiService: Activate skill response status:",r.status),!r.ok){let s=yield r.text();throw console.error("ApiService: HTTP error response:",s),new Error(`HTTP error! status: ${r.status}`)}let l=yield r.json();return console.log("ApiService: Activate skill response:",l),{success:!0,data:l}}catch(r){return console.error("ApiService: Activate skill error:",r),{success:!1,error:r instanceof Error?r.message:"Unknown error occurred"}}})}publishSkillVersion(t,n,a,i){return z(this,null,function*(){try{console.log("ApiService: Publishing skill version:",i,"for skill:",a,"agent:",n);let r=yield fetch(xe.PUBLISH_SKILL_VERSION(n,a,i),{method:"PUT",headers:{accept:"application/json",Authorization:`Bearer ${t}`}});if(console.log("ApiService: Publish skill version response status:",r.status),!r.ok){let s=yield r.text();throw console.error("ApiService: HTTP error response:",s),new Error(`HTTP error! status: ${r.status}`)}let l=yield r.json();return console.log("ApiService: Publish skill version response:",l),{success:!0,data:l}}catch(r){return console.error("ApiService: Publish skill version error:",r),{success:!1,error:r instanceof Error?r.message:"Unknown error occurred"}}})}loadProductionLogs(t,n,a=1,i=100){return z(this,null,function*(){try{console.log("ApiService: Loading production logs with API key:",t,"agentId:",n,"page:",a,"limit:",i);let r=yield fetch(`${xe.PRODUCTION_LOGS(n)}?page=${a}&limit=${i}`,{method:"GET",headers:{accept:"application/json",Authorization:`Bearer ${t}`}});if(console.log("ApiService: Production logs response status:",r.status),!r.ok){let s=yield r.text();throw console.error("ApiService: HTTP error response:",s),new Error(`HTTP error! status: ${r.status}`)}let l=yield r.json();return console.log("ApiService: Production logs response:",l),{success:!0,logs:l.logs||[],pagination:l.pagination}}catch(r){return console.error("ApiService: Production logs error:",r),{success:!1,error:r instanceof Error?r.message:"Unknown error occurred"}}})}loadProductionEnv(t,n){return z(this,null,function*(){try{console.log("ApiService: Loading production env with API key:",t,"agentId:",n);let a=yield fetch(xe.PRODUCTION_ENV(n),{method:"GET",headers:{accept:"application/json",Authorization:`Bearer ${t}`}});if(console.log("ApiService: Production env response status:",a.status),!a.ok){let r=yield a.text();throw console.error("ApiService: HTTP error response:",r),new Error(`HTTP error! status: ${a.status}`)}let i=yield a.json();return console.log("ApiService: Production env response:",i),{success:!0,data:i}}catch(a){return console.error("ApiService: Production env error:",a),{success:!1,error:a instanceof Error?a.message:"Unknown error occurred"}}})}updateProductionEnv(t,n,a){return z(this,null,function*(){try{console.log("ApiService: Updating production env with API key:",t,"agentId:",n,"data:",a);let i=yield fetch(xe.PRODUCTION_ENV(n),{method:"POST",headers:{accept:"application/json",Authorization:`Bearer ${t}`,"Content-Type":"application/json"},body:JSON.stringify(a)});if(console.log("ApiService: Update production env response status:",i.status),!i.ok){let l=yield i.text();throw console.error("ApiService: HTTP error response:",l),new Error(`HTTP error! status: ${i.status}`)}let r=yield i.json();return console.log("ApiService: Update production env response:",r),{success:!0,data:r}}catch(i){return console.error("ApiService: Update production env error:",i),{success:!1,error:i instanceof Error?i.message:"Unknown error occurred"}}})}},ie=new dm});var Pr,dt,pm,eN=b(()=>{"use strict";Pr=F(Je());fm();an();dt=F(re()),pm=({apiKey:e,agentId:t,skillId:n,sandboxId:a,persona:i,sharedChatMessages:r,onSharedSendMessage:l,onSharedClearHistory:s,isChatLoading:o,setIsChatLoading:u})=>{let[c,p]=(0,Pr.useState)(""),d=(0,Pr.useRef)(null),f=()=>{var h;(h=d.current)==null||h.scrollIntoView({behavior:"smooth"})};(0,Pr.useEffect)(()=>{f()},[r]);let S=r.length>0?r.map(h=>({text:h.text,isUser:h.sender==="user",timestamp:h.timestamp})):[{text:"\u{1F44B} Welcome! Start chatting to test your Lua skill. Your messages will be sent to the sandbox environment.",isUser:!1,timestamp:new Date}],x=h=>z(null,null,function*(){if(!h.trim())return;let g={id:Date.now().toString(),text:h,sender:"user",timestamp:new Date};l(g),p(""),u(!0);try{let E=yield ie.sendLocalChatMessage(h,i),T={id:(Date.now()+1).toString(),text:E.success?E.text||"No response received":`\u274C ${E.error||"Failed to send message"}`,sender:"assistant",timestamp:new Date};l(T)}catch(E){let T={id:(Date.now()+2).toString(),text:`\u274C Error: ${E instanceof Error?E.message:"Unknown error"}`,sender:"assistant",timestamp:new Date};l(T)}finally{u(!1)}}),k=h=>{h.preventDefault(),x(c)},m=h=>{h.key==="Enter"&&!h.shiftKey&&(h.preventDefault(),x(c))};return(0,dt.jsxs)("div",{className:"chat-container",children:[(0,dt.jsxs)("div",{className:"chat-header",children:[(0,dt.jsx)("div",{className:"chat-header-content",children:(0,dt.jsxs)("div",{children:[(0,dt.jsx)("h1",{children:"Chat to your Agent [Sandbox]"}),(0,dt.jsx)("p",{children:"Test your sandbox skill in real-time"})]})}),(0,dt.jsx)("button",{className:"clear-chat-button",onClick:s,disabled:o,title:"Clear chat history",children:"\u{1F5D1}\uFE0F"})]}),(0,dt.jsxs)("div",{className:"chat-messages",children:[S.map((h,g)=>(0,dt.jsx)("div",{className:`message ${h.isUser?"user":"assistant"}`,children:(0,dt.jsx)("div",{className:"message-bubble",children:(0,dt.jsx)(Ss,{children:h.text})})},g)),o&&(0,dt.jsx)("div",{className:"loading",children:(0,dt.jsx)("img",{src:"https://admin.lua.dev/images/logo.svg",alt:"Loading",className:"loading-logo"})}),(0,dt.jsx)("div",{ref:d})]}),(0,dt.jsx)("div",{className:"chat-input-container",children:(0,dt.jsxs)("form",{className:"chat-input-form",onSubmit:k,children:[(0,dt.jsx)("input",{type:"text",id:"chat-input",name:"chatMessage",className:"chat-input",value:c,onChange:h=>p(h.target.value),onKeyDown:m,placeholder:"Type your message...",disabled:o,autoComplete:"off"}),(0,dt.jsx)("button",{type:"submit",className:"send-button",disabled:o||!c.trim(),children:"Send"})]})})]})}});var Mn,Z,mm,hm=b(()=>{"use strict";Mn=F(Je());an();Z=F(re()),mm=({persona:e,onSavePersona:t,apiKey:n,agentId:a})=>{let[i,r]=(0,Mn.useState)(e),[l,s]=(0,Mn.useState)(!1),[o,u]=(0,Mn.useState)([]),[c,p]=(0,Mn.useState)(!1),[d,f]=(0,Mn.useState)("current"),[S,x]=(0,Mn.useState)(null),[k,m]=(0,Mn.useState)(!1),[h,g]=(0,Mn.useState)(!1);(0,Mn.useEffect)(()=>{r(e)},[e]),(0,Mn.useEffect)(()=>{E()},[]);let E=()=>z(null,null,function*(){p(!0);try{let R=yield ie.getPersonaVersions(a,n);if(R.success&&R.versions){let O=R.versions.sort((I,B)=>B.createdDate-I.createdDate);u(O)}else console.error("Failed to load persona versions:",R.error),u([])}catch(R){console.error("Error loading persona versions:",R),u([])}finally{p(!1)}}),T=R=>{f(R),S&&x(null)},N=R=>{x(R)},A=()=>{x(null)},C=()=>{if(!i.trim()){alert("Please enter a persona before creating a version");return}g(!0)},U=()=>z(null,null,function*(){m(!0);try{let R=yield ie.createPersonaVersion(a,n,i.trim());if(R.success)console.log("\u2705 Persona version created successfully:",R.data),yield E(),f("versions"),alert("\u2705 Persona version created successfully! You can deploy it from the Production tab.");else throw new Error(R.error||"Failed to create persona version")}catch(R){console.error("\u274C Error creating persona version:",R),alert(`\u274C Failed to create persona version: ${R instanceof Error?R.message:"Unknown error"}`)}finally{m(!1),g(!1)}}),P=()=>{g(!1)},_=()=>z(null,null,function*(){let R=i.trim();if(!R){alert("Persona cannot be empty");return}s(!0);try{(yield t(R))&&r(R)}finally{s(!1)}});return S?(0,Z.jsxs)("div",{className:"persona-section",children:[(0,Z.jsx)("div",{className:"persona-header",children:(0,Z.jsxs)("div",{className:"header-left",children:[(0,Z.jsx)("button",{className:"back-button",onClick:A,children:"\u2190"}),(0,Z.jsxs)("h3",{children:["Persona v",S.version]})]})}),(0,Z.jsxs)("div",{className:"persona-version-details",children:[(0,Z.jsx)("div",{className:"version-metadata",children:(0,Z.jsxs)("div",{className:"metadata-grid",children:[(0,Z.jsxs)("div",{className:"metadata-item",children:[(0,Z.jsx)("span",{className:"metadata-label",children:"Created By"}),(0,Z.jsx)("span",{className:"metadata-value",children:S.createdBy})]}),(0,Z.jsxs)("div",{className:"metadata-item",children:[(0,Z.jsx)("span",{className:"metadata-label",children:"Status"}),(0,Z.jsx)("span",{className:`version-status ${S.isCurrent?"active":"available"}`,children:S.isCurrent?"Active (Deployed)":"Available"})]}),(0,Z.jsxs)("div",{className:"metadata-item",children:[(0,Z.jsx)("span",{className:"metadata-label",children:"Created Date"}),(0,Z.jsx)("span",{className:"metadata-value",children:new Date(S.createdDate).toLocaleDateString("en-US",{year:"numeric",month:"long",day:"numeric",hour:"2-digit",minute:"2-digit"})})]})]})}),(0,Z.jsxs)("div",{className:"persona-content",children:[(0,Z.jsx)("h4",{children:"Persona Content"}),(0,Z.jsx)("div",{className:"persona-display",children:(0,Z.jsx)("pre",{children:S.persona})})]})]})]}):(0,Z.jsxs)("div",{className:"persona-section",children:[(0,Z.jsx)("div",{className:"persona-header",children:(0,Z.jsx)("h3",{children:"Agent Persona"})}),(0,Z.jsxs)("div",{className:"persona-tabs",children:[(0,Z.jsxs)("div",{className:"tabs-header",children:[(0,Z.jsx)("button",{className:`tab-button ${d==="current"?"active":""}`,onClick:()=>T("current"),children:"Current"}),(0,Z.jsxs)("button",{className:`tab-button ${d==="versions"?"active":""}`,onClick:()=>T("versions"),children:["Versions (",o.length,")"]})]}),(0,Z.jsx)("div",{className:"tab-content",children:d==="current"?(0,Z.jsxs)("div",{className:"current-persona-tab",children:[(0,Z.jsxs)("div",{className:"persona-edit-header",children:[(0,Z.jsx)("h4",{children:"Edit Current Persona"}),(0,Z.jsxs)("div",{className:"persona-actions",children:[(0,Z.jsx)("button",{className:"save-btn",onClick:_,disabled:l,title:"Save persona to YAML",children:l?"\u27F3":"\u{1F4BE}"}),(0,Z.jsx)("button",{className:"create-version-btn",onClick:C,disabled:k||!i.trim(),title:"Create new persona version",children:k?"Creating...":"Create Version"})]})]}),(0,Z.jsx)("div",{className:"persona-edit",children:(0,Z.jsx)("textarea",{value:i,onChange:R=>r(R.target.value),placeholder:"Enter agent persona...",className:"persona-textarea"})}),(0,Z.jsx)("div",{className:"persona-help",children:(0,Z.jsxs)("p",{children:["This persona is stored in your ",(0,Z.jsx)("code",{children:"lua.skill.yaml"})," file and used for local development."]})})]}):(0,Z.jsx)("div",{className:"versions-persona-tab",children:c?(0,Z.jsx)("div",{className:"versions-loading",children:(0,Z.jsx)("img",{src:"https://admin.lua.dev/images/logo.svg",alt:"Loading",className:"loading-logo"})}):o.length>0?(0,Z.jsx)("div",{className:"versions-list",children:o.map((R,O)=>(0,Z.jsxs)("div",{className:`version-item ${R.isCurrent?"active":"available"}`,onClick:()=>N(R),children:[(0,Z.jsxs)("div",{className:"version-info",children:[(0,Z.jsxs)("div",{className:"version-header",children:[(0,Z.jsxs)("span",{className:"version-number",children:["v",R.version]}),(0,Z.jsx)("span",{className:`version-status ${R.isCurrent?"active":"available"}`,children:R.isCurrent?"Active":"Available"})]}),(0,Z.jsx)("div",{className:"version-date",children:new Date(R.createdDate).toLocaleDateString()})]}),(0,Z.jsx)("div",{className:"version-arrow",children:"\u2192"})]},O))}):(0,Z.jsxs)("div",{className:"no-versions",children:[(0,Z.jsx)("div",{className:"no-versions-icon",children:"\u{1F464}"}),(0,Z.jsx)("div",{className:"no-versions-text",children:"No persona versions found"}),(0,Z.jsx)("div",{className:"no-versions-subtext",children:"Persona versions will appear here when available"})]})})})]}),h&&(0,Z.jsx)("div",{className:"version-modal-overlay",children:(0,Z.jsxs)("div",{className:"version-modal",children:[(0,Z.jsx)("div",{className:"version-modal-header",children:(0,Z.jsx)("h3",{children:"Create Persona Version"})}),(0,Z.jsxs)("div",{className:"version-modal-body",children:[(0,Z.jsx)("p",{children:"This will create a new persona version that can be deployed to production."}),(0,Z.jsxs)("p",{children:[(0,Z.jsx)("strong",{children:"Note:"})," The version will be created but not automatically released. You can deploy it from the Production tab."]}),(0,Z.jsxs)("div",{className:"persona-preview-box",children:[(0,Z.jsx)("h4",{children:"Persona Content:"}),(0,Z.jsxs)("div",{className:"persona-preview-content",children:[i.substring(0,300),i.length>300?"...":""]})]})]}),(0,Z.jsxs)("div",{className:"version-modal-actions",children:[(0,Z.jsx)("button",{className:"cancel-button",onClick:P,disabled:k,children:"Cancel"}),(0,Z.jsx)("button",{className:"create-button",onClick:U,disabled:k,children:k?"Creating...":"Create Version"})]})]})})]})}});var Tt,w,gm,vm=b(()=>{"use strict";Tt=F(Je());an();w=F(re()),gm=({apiKey:e,agentId:t,skillId:n,sandboxId:a})=>{var Zr;let[i,r]=(0,Tt.useState)([]),[l,s]=(0,Tt.useState)(null),[o,u]=(0,Tt.useState)(null),[c,p]=(0,Tt.useState)([]),[d,f]=(0,Tt.useState)(!1),[S,x]=(0,Tt.useState)("current"),[k,m]=(0,Tt.useState)(!1),[h,g]=(0,Tt.useState)(!1),[E,T]=(0,Tt.useState)(""),[N,A]=(0,Tt.useState)({}),[C,U]=(0,Tt.useState)(null),[P,_]=(0,Tt.useState)(!0),[R,O]=(0,Tt.useState)(!1),[I,B]=(0,Tt.useState)(null),[J,ae]=(0,Tt.useState)([]);(0,Tt.useEffect)(()=>{we(),je()},[]);let we=()=>z(null,null,function*(){_(!0),B(null);try{console.log("Loading skills from /api/skills...");let q=yield fetch("/api/skills");if(console.log("Skills API response status:",q.status),!q.ok)throw new Error(`HTTP ${q.status}: ${q.statusText}`);let j=yield q.json();console.log("Skills API response data:",j),j.success&&j.skills&&Array.isArray(j.skills)?(console.log("Skills loaded successfully:",j.skills),r(j.skills),B(null)):(console.error("Failed to load skills:",j.error),B(j.error||"Failed to load skills - invalid data format"),r([]))}catch(q){console.error("Error loading skills:",q),B(q instanceof Error?q.message:"Failed to load skills"),r([])}finally{_(!1)}}),je=()=>z(null,null,function*(){try{let j=yield(yield fetch("/tools")).json();if(j.success&&j.tools){let le=[];Array.isArray(j.tools)?le=j.tools:typeof j.tools=="object"&&(le=Object.entries(j.tools).map(([Be,Mt])=>K({name:Be},Mt))),ae(le)}else console.error("Failed to load tools:",j.error),ae([])}catch(q){console.error("Error loading tools:",q),ae([])}}),v=q=>{let j={};q.inputSchema.properties&&Object.keys(q.inputSchema.properties).forEach(le=>{let Be=q.inputSchema.properties[le];j[le]=Me(Be)}),A(j)},Me=q=>{if(q.type==="object"&&q.properties){let j={};return Object.keys(q.properties).forEach(le=>{j[le]=Me(q.properties[le])}),j}else return q.type==="number"?0:q.type==="boolean"?!1:""},pt=q=>{let j=J.find(le=>le.name===q);j&&(u(j),v(j),U(null))},y=q=>z(null,null,function*(){f(!0);try{let j=yield ie.getSkillVersions(q.skillId,t,e);if(j.success&&j.versions){let le=j.versions.sort((Be,Mt)=>new Date(Mt.createdDate||Mt.createdAt).getTime()-new Date(Be.createdDate||Be.createdAt).getTime());p(le)}else console.error("Failed to load skill versions:",j.error),p([])}catch(j){console.error("Error loading skill versions:",j),p([])}finally{f(!1)}}),Ke=q=>{let j=i.find(le=>le.name===q);j&&(s(q),x("current"),y(j))},At=()=>{s(null),x("current"),p([]),u(null),U(null)},se=q=>{x(q),o&&(u(null),U(null))},X=()=>{u(null),U(null)},Q=()=>z(null,null,function*(){if(!l)return;let q=i.find(le=>le.name===l);if(!q)return;c.some(le=>le.version===q.version)?(T(q.version),g(!0)):yield ne(q.version)}),ne=q=>z(null,null,function*(){if(!l)return;let j=i.find(le=>le.name===l);if(j){m(!0);try{let Be=yield(yield fetch("/tools")).json();if(!Be.success||!Be.tools)throw new Error("Failed to load current tools data");let Mt=[];Array.isArray(Be.tools)?Mt=Be.tools:typeof Be.tools=="object"&&(Mt=Object.entries(Be.tools).map(([un,D])=>({name:un,description:D.description||"",inputSchema:D.inputSchema||{type:"object"},execute:D.execute||""})));let on=Mt.filter(un=>j.tools.includes(un.name)),Ct={name:j.name,version:q,description:j.description,context:j.context,tools:on};console.log("Creating version with data:",Ct);let We=yield ie.createSkillVersion(j.skillId,t,e,Ct);if(We.success)console.log("\u2705 Version created successfully:",We.data),yield y(j),alert(`\u2705 Version ${q} created successfully!`);else throw new Error(We.error||"Failed to create version")}catch(le){console.error("\u274C Error creating version:",le),alert(`\u274C Failed to create version: ${le instanceof Error?le.message:"Unknown error"}`)}finally{m(!1),g(!1)}}}),Y=()=>z(null,null,function*(){if(!E.trim()){alert("Please enter a version number");return}if(c.some(j=>j.version===E.trim())){alert("This version already exists. Please enter a different version number.");return}yield ne(E.trim())}),oe=()=>{g(!1),T("")},Ue=(q,j,le)=>{A(Be=>le?ut(K({},Be),{[q]:ut(K({},Be[q]),{[le]:j})}):ut(K({},Be),{[q]:j}))},mt=()=>z(null,null,function*(){if(o){O(!0),U(null);try{let q=zs(N,o.inputSchema),j=yield ie.testLocalTool(o.name,q);U(j)}catch(q){U({success:!1,error:q instanceof Error?q.message:"Unknown error occurred"})}finally{O(!1)}}}),zs=(q,j)=>{var Be,Mt;let le={};for(let[on,Ct]of Object.entries(q))if(Ct&&typeof Ct=="object"&&!Array.isArray(Ct)){let We=(Be=j.properties)==null?void 0:Be[on];if(We&&We.type==="object"&&We.properties){let un=zs(Ct,We);Object.keys(un).length>0&&(le[on]=un)}else le[on]=Ct}else{let We=(Mt=j.properties)==null?void 0:Mt[on];if((!j.required||!j.required.includes(on))&&(Ct===""||Ct===null||Ct===void 0))continue;le[on]=Ct}return le},Fr=(q,j,le)=>{var on,Ct;let Be=le?((on=N[q])==null?void 0:on[le])||"":N[q]||"",Mt=le?(Ct=j.required)==null?void 0:Ct.includes(le):o==null?void 0:o.inputSchema.required.includes(q);if(j.type==="object"&&j.properties)return(0,w.jsxs)("div",{className:"nested-object",children:[(0,w.jsx)("div",{className:"nested-object-label",children:q}),(0,w.jsx)("div",{className:"nested-fields",children:Object.entries(j.properties).map(([We,un])=>{var D;return(0,w.jsxs)("div",{className:"nested-field",children:[(0,w.jsxs)("label",{className:"nested-label",children:[We,((D=j.required)==null?void 0:D.includes(We))&&(0,w.jsx)("span",{className:"required",children:"*"})]}),Fr(q,un,We),un.description&&(0,w.jsx)("div",{className:"input-description",children:un.description})]},We)})})]});switch(j.type){case"number":return(0,w.jsx)("input",{type:"number",value:Be,onChange:We=>Ue(q,parseFloat(We.target.value)||0,le),placeholder:j.description||`Enter ${le||q}`,className:"tool-input",required:Mt});case"boolean":return(0,w.jsx)("input",{type:"checkbox",checked:Be,onChange:We=>Ue(q,We.target.checked,le),className:"tool-checkbox"});case"string":default:return(0,w.jsx)("input",{type:"text",value:Be,onChange:We=>Ue(q,We.target.value,le),placeholder:j.description||`Enter ${le||q}`,className:"tool-input",required:Mt})}};if(P)return(0,w.jsx)("div",{className:"skills-page",children:(0,w.jsx)("div",{className:"skills-loading",children:(0,w.jsx)("img",{src:"https://admin.lua.dev/images/logo.svg",alt:"Loading",className:"loading-logo"})})});if(o)return(0,w.jsx)("div",{className:"skills-page",children:(0,w.jsxs)("div",{className:"tool-form",children:[(0,w.jsxs)("div",{className:"tool-form-header",children:[(0,w.jsx)("button",{className:"back-button",onClick:X,title:"Back to skill",children:"\u2190"}),(0,w.jsx)("h3",{children:o.name})]}),(0,w.jsxs)("div",{className:"tool-form-content",children:[(0,w.jsx)("div",{className:"tool-info",children:(0,w.jsx)("p",{children:o.description})}),(0,w.jsxs)("div",{className:"tool-inputs",children:[(0,w.jsx)("h4",{children:"Input Parameters"}),Object.keys(o.inputSchema.properties||{}).length>0?(0,w.jsx)("div",{className:"input-fields",children:Object.entries(o.inputSchema.properties).map(([q,j])=>(0,w.jsxs)("div",{className:"input-field",children:[(0,w.jsxs)("label",{children:[q,o.inputSchema.required.includes(q)&&(0,w.jsx)("span",{className:"required",children:"*"})]}),Fr(q,j),j.description&&(0,w.jsx)("div",{className:"input-description",children:j.description})]},q))}):(0,w.jsx)("p",{className:"no-inputs",children:"This tool requires no input parameters."})]}),(0,w.jsx)("div",{className:"tool-actions",children:(0,w.jsx)("button",{onClick:mt,disabled:R,className:"test-button",children:R?"Testing...":"Test Tool"})}),C&&(0,w.jsxs)("div",{className:"test-result",children:[(0,w.jsx)("h4",{children:"Test Result"}),(0,w.jsx)("div",{className:`result-content ${C.success?"success":"error"}`,children:C.success?(0,w.jsxs)("div",{children:[(0,w.jsx)("div",{className:"result-label",children:"\u2705 Success"}),(0,w.jsx)("pre",{className:"result-data",children:JSON.stringify(C.result,null,2)})]}):(0,w.jsxs)("div",{children:[(0,w.jsx)("div",{className:"result-label",children:"\u274C Error"}),(0,w.jsx)("div",{className:"result-error",children:C.error})]})})]})]})]})});if(l){let q=i.find(j=>j.name===l);return q?(0,w.jsxs)("div",{className:"skills-page",children:[(0,w.jsxs)("div",{className:"skills-header",children:[(0,w.jsxs)("div",{className:"header-left",children:[(0,w.jsx)("button",{className:"back-button",onClick:At,children:"\u2190"}),(0,w.jsx)("h4",{children:q.name})]}),(0,w.jsx)("button",{className:"create-version-button",onClick:Q,disabled:k,title:"Create new version",children:k?"Creating...":"Create Version"})]}),(0,w.jsxs)("div",{className:"skill-tabs",children:[(0,w.jsxs)("div",{className:"tabs-header",children:[(0,w.jsx)("button",{className:`tab-button ${S==="current"?"active":""}`,onClick:()=>se("current"),children:"Current"}),(0,w.jsxs)("button",{className:`tab-button ${S==="versions"?"active":""}`,onClick:()=>se("versions"),children:["Versions (",c.length,")"]})]}),(0,w.jsx)("div",{className:"tab-content",children:S==="current"?(0,w.jsxs)("div",{className:"current-skill-tab",children:[(0,w.jsx)("div",{className:"skill-details",children:(0,w.jsxs)("div",{className:"skill-info-section",children:[(0,w.jsxs)("div",{className:"skill-meta",children:[(0,w.jsxs)("span",{className:"skill-version",children:["v",q.version]}),(0,w.jsxs)("span",{className:"skill-tools-count",children:[q.tools.length," tools"]})]}),q.description&&(0,w.jsxs)("div",{className:"skill-description-section",children:[(0,w.jsx)("h5",{children:"Description"}),(0,w.jsx)("p",{children:q.description})]}),q.context&&(0,w.jsxs)("div",{className:"skill-context-section",children:[(0,w.jsx)("h5",{children:"Context"}),(0,w.jsx)("p",{children:q.context})]})]})}),(0,w.jsxs)("div",{className:"tools-section",children:[(0,w.jsx)("div",{className:"tools-header",children:(0,w.jsxs)("h5",{children:["Available Tools (",q.tools.length,")"]})}),q.tools&&q.tools.length>0?(0,w.jsx)("div",{className:"tools-grid",children:q.tools.map((j,le)=>(0,w.jsxs)("div",{className:"tool-card",onClick:()=>pt(j),children:[(0,w.jsx)("div",{className:"tool-card-header",children:(0,w.jsx)("h4",{children:j})}),(0,w.jsx)("div",{className:"tool-card-body",children:(0,w.jsx)("span",{className:"skill-badge",children:q.name})})]},le))}):(0,w.jsxs)("div",{className:"no-tools",children:[(0,w.jsx)("div",{className:"no-tools-icon",children:"\u{1F527}"}),(0,w.jsx)("div",{className:"no-tools-text",children:"No tools in this skill"}),(0,w.jsx)("div",{className:"no-tools-subtext",children:"This skill doesn't have any tools defined"})]})]}),(0,w.jsx)("div",{className:"skills-help",children:(0,w.jsx)("p",{children:"This skill is compiled from your local code and updates automatically when you make changes. Use the tools above to test your skill's functionality."})})]}):(0,w.jsx)("div",{className:"versions-skill-tab",children:d?(0,w.jsx)("div",{className:"versions-loading",children:(0,w.jsx)("img",{src:"https://admin.lua.dev/images/logo.svg",alt:"Loading",className:"loading-logo"})}):c.length>0?(0,w.jsx)("div",{className:"versions-list",children:c.map((j,le)=>(0,w.jsxs)("div",{className:`version-item ${j.status}`,onClick:()=>{console.log("Selected version:",j.version)},children:[(0,w.jsxs)("div",{className:"version-info",children:[(0,w.jsxs)("div",{className:"version-header",children:[(0,w.jsxs)("span",{className:"version-number",children:["v",j.version]}),(0,w.jsx)("span",{className:`version-status ${j.status}`,children:j.status})]}),(0,w.jsxs)("div",{className:"version-meta",children:[(0,w.jsx)("span",{className:"version-date",children:new Date(j.createdDate||j.createdAt).toLocaleDateString()}),(0,w.jsxs)("span",{className:"version-author",children:["by ",j.createdByEmail||j.createdBy]})]})]}),(0,w.jsx)("div",{className:"version-arrow",children:"\u2192"})]},le))}):(0,w.jsxs)("div",{className:"no-versions",children:[(0,w.jsx)("div",{className:"no-versions-icon",children:"\u{1F4E6}"}),(0,w.jsx)("div",{className:"no-versions-text",children:"No versions found"}),(0,w.jsx)("div",{className:"no-versions-subtext",children:"Create your first version to get started"})]})})})]}),h&&(0,w.jsx)("div",{className:"version-modal-overlay",children:(0,w.jsxs)("div",{className:"version-modal",children:[(0,w.jsx)("div",{className:"version-modal-header",children:(0,w.jsx)("h3",{children:"Create New Version"})}),(0,w.jsxs)("div",{className:"version-modal-body",children:[(0,w.jsxs)("p",{children:["Version ",(0,w.jsx)("strong",{children:(Zr=i.find(j=>j.name===l))==null?void 0:Zr.version})," already exists."]}),(0,w.jsx)("p",{children:"Please enter a new version number:"}),(0,w.jsx)("input",{type:"text",value:E,onChange:j=>T(j.target.value),placeholder:"e.g., 1.0.1",className:"version-input",autoFocus:!0})]}),(0,w.jsxs)("div",{className:"version-modal-actions",children:[(0,w.jsx)("button",{className:"cancel-button",onClick:oe,disabled:k,children:"Cancel"}),(0,w.jsx)("button",{className:"create-button",onClick:Y,disabled:k||!E.trim(),children:k?"Creating...":"Create Version"})]})]})})]}):(0,w.jsxs)("div",{className:"skills-page",children:[(0,w.jsx)("div",{className:"skills-header",children:(0,w.jsxs)("div",{className:"header-left",children:[(0,w.jsx)("button",{className:"back-button",onClick:At,children:"\u2190"}),(0,w.jsx)("h4",{children:"Skill Not Found"})]})}),(0,w.jsxs)("div",{className:"no-skills",children:[(0,w.jsx)("div",{className:"no-skills-icon",children:"\u274C"}),(0,w.jsx)("div",{className:"no-skills-text",children:"Skill not found"}),(0,w.jsx)("div",{className:"no-skills-subtext",children:"The selected skill could not be loaded"})]})]})}return(0,w.jsxs)("div",{className:"skills-page",children:[(0,w.jsxs)("div",{className:"skills-header",children:[(0,w.jsx)("h3",{children:"Available Skills"}),(0,w.jsx)("button",{className:"refresh-button",onClick:we,title:"Refresh skills",children:"\u21BB"})]}),(0,w.jsx)("div",{className:"skills-content",children:I?(0,w.jsxs)("div",{className:"no-skills",children:[(0,w.jsx)("div",{className:"no-skills-icon",children:"\u274C"}),(0,w.jsx)("div",{className:"no-skills-text",children:"Error loading skills"}),(0,w.jsx)("div",{className:"no-skills-subtext",children:I}),(0,w.jsx)("button",{className:"retry-button",onClick:we,style:{marginTop:"16px"},children:"Retry"})]}):i.length===0?(0,w.jsxs)("div",{className:"no-skills",children:[(0,w.jsx)("div",{className:"no-skills-icon",children:"\u2699\uFE0F"}),(0,w.jsx)("div",{className:"no-skills-text",children:"No skills found"}),(0,w.jsx)("div",{className:"no-skills-subtext",children:"Skills will appear here when available in your project"})]}):Array.isArray(i)&&i.length>0?(0,w.jsx)("div",{className:"skills-list",children:i.map(q=>(0,w.jsxs)("div",{className:"skill-item",onClick:()=>Ke(q.name),children:[(0,w.jsxs)("div",{className:"skill-info",children:[(0,w.jsx)("div",{className:"skill-name",children:q.name}),(0,w.jsx)("div",{className:"skill-description",children:q.description}),(0,w.jsxs)("div",{className:"skill-stats",children:[(0,w.jsxs)("span",{className:"skill-stat",children:["v",q.version]}),(0,w.jsxs)("span",{className:"skill-stat",children:[q.tools.length," tools"]})]})]}),(0,w.jsx)("div",{className:"skill-arrow",children:"\u2192"})]},q.name))}):(0,w.jsxs)("div",{className:"no-skills",children:[(0,w.jsx)("div",{className:"no-skills-icon",children:"\u2699\uFE0F"}),(0,w.jsx)("div",{className:"no-skills-text",children:"No skills available"}),(0,w.jsx)("div",{className:"no-skills-subtext",children:"No valid skills data received"})]})})]})}});var qe,L,xs,DR,ym,OR,bm=b(()=>{"use strict";qe=F(Je());an();L=F(re()),xs=e=>{if(!e||!e.trim())return e||"";try{let t=JSON.parse(e);return JSON.stringify(t,null,2).replace(/("(\\u[a-zA-Z0-9]{4}|\\[^u]|[^\\"])*"(\s*:)?|\b(true|false|null)\b|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?)/g,a=>{let i="json-number";return/^"/.test(a)?/:$/.test(a)?i="json-key":i="json-string":/true|false/.test(a)?i="json-boolean":/null/.test(a)&&(i="json-null"),`<span class="${i}">${a}</span>`})}catch(t){return e.replace(/("(\\u[a-zA-Z0-9]{4}|\\[^u]|[^\\"])*"(\s*:)?|\b(true|false|null)\b|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?)/g,n=>{let a="json-number";return/^"/.test(n)?/:$/.test(n)?a="json-key":a="json-string":/true|false/.test(n)?a="json-boolean":/null/.test(n)&&(a="json-null"),`<span class="${a}">${n}</span>`})}},DR=[{id:"user",name:"User",description:"User profile and account data",icon:"\u{1F464}"},{id:"resources",name:"Resources",description:"Files, documents, and assets",icon:"\u{1F4C1}"},{id:"products",name:"Products",description:"Coming soon",icon:"\u{1F4E6}"},{id:"orders",name:"Orders",description:"Coming soon",icon:"\u{1F4CB}"},{id:"booking",name:"Booking",description:"Coming soon",icon:"\u{1F4C5}"},{id:"custom",name:"Custom",description:"Coming soon",icon:"\u2699\uFE0F"}],ym=({apiKey:e,agentId:t})=>{let[n,a]=(0,qe.useState)(null),[i,r]=(0,qe.useState)(null),[l,s]=(0,qe.useState)(null),[o,u]=(0,qe.useState)(!1),[c,p]=(0,qe.useState)(!1),[d,f]=(0,qe.useState)(!1),[S,x]=(0,qe.useState)(""),[k,m]=(0,qe.useState)(null),[h,g]=(0,qe.useState)(null),[E,T]=(0,qe.useState)(!1),[N,A]=(0,qe.useState)("list"),C=(0,qe.useRef)(null),U=(0,qe.useRef)(null),[P,_]=(0,qe.useState)(!1),[R,O]=(0,qe.useState)(""),[I,B]=(0,qe.useState)(""),[J,ae]=(0,qe.useState)(!1);(0,qe.useEffect)(()=>{we()},[e,t]),(0,qe.useEffect)(()=>{if(console.log("JSON text changed:",S),console.log("Is editing:",E),console.log("Highlight ref exists:",!!U.current),U.current&&S&&!E){let Y=xs(S);console.log("Applying highlighting:",Y.substring(0,100)+"..."),U.current.innerHTML=Y}},[S,E]);let we=()=>z(null,null,function*(){try{if(console.log("Loading user data with API key:",e,"agentId:",t),u(!0),m(null),!e||!t){console.error("Missing API key or agentId:",{apiKey:!!e,agentId:!!t}),m("Missing API key or agent ID"),x("{}");return}let Y=yield ie.loadUserData(e,t);if(console.log("User data response:",Y),Y.success&&Y.data){a(Y.data);let oe=Y.data,Ue=JSON.stringify(oe,null,2);x(Ue),setTimeout(()=>{U.current&&(U.current.innerHTML=xs(Ue))},0),console.log("User data loaded successfully:",Y.data),console.log("Data to display:",oe)}else console.log("No user data or error:",Y.error),m(Y.error||"No user data found"),x("{}")}catch(Y){console.error("Failed to load user data:",Y),m(`Failed to load user data: ${Y instanceof Error?Y.message:"Unknown error"}`),x("{}")}finally{u(!1)}}),je=()=>z(null,null,function*(){try{console.log("Saving user data:",S),p(!0),m(null),g(null);let Y=JSON.parse(S),oe=yield ie.updateUserData(e,t,Y);console.log("Save user data response:",oe),oe.success&&oe.data?(a(oe.data),x(JSON.stringify(oe.data.data,null,2)),g("User data saved successfully!"),T(!1),setTimeout(()=>g(null),3e3)):m("Failed to save user data: "+(oe.error||"Unknown error"))}catch(Y){console.error("Failed to save user data:",Y),Y instanceof SyntaxError?m("Invalid JSON format. Please check your syntax."):m("Failed to save user data")}finally{p(!1)}}),v=()=>z(null,null,function*(){try{console.log("Clearing user data"),f(!0),m(null),g(null);let Y=yield ie.clearUserData(e,t);console.log("Clear user data response:",Y),Y.success?(a(null),x("{}"),A("list"),g("User data cleared successfully!"),T(!1),setTimeout(()=>g(null),3e3)):m("Failed to clear user data: "+(Y.error||"Unknown error"))}catch(Y){console.error("Failed to clear user data:",Y),m("Failed to clear user data")}finally{f(!1)}}),Me=Y=>z(null,null,function*(){if(r(Y),A("detail"),T(!1),m(null),Y.id==="user"){u(!0);try{let oe=yield ie.loadUserData(e,t);if(oe.success&&oe.data){s(oe.data);let Ue=JSON.stringify(oe.data,null,2);x(Ue),console.log("Setting JSON text for user data:",Ue)}else s(null),x("{}"),console.log("No user data found, setting empty JSON")}catch(oe){console.error("Failed to load user data:",oe),s(null),x("{}")}finally{u(!1)}}else if(Y.id==="resources"){u(!0);try{let oe=yield ie.loadResources(e,t);oe.success&&oe.data?(s(oe.data),console.log("Loaded resources:",oe.data)):(s([]),console.log("No resources found"))}catch(oe){console.error("Failed to load resources:",oe),s([])}finally{u(!1)}}else s(null),x("{}")}),pt=()=>{A("list"),r(null),s(null),T(!1)},y=()=>{i&&(i.id==="resources"?(_(!0),O(""),B("")):console.log(`Add new item to ${i==null?void 0:i.name}`))},Ke=()=>z(null,null,function*(){if(!R.trim()||!I.trim()){alert("Name and content cannot be empty");return}ae(!0);try{let Y=yield ie.createResource(e,t,{name:R.trim(),content:I.trim()});Y.success?(_(!1),O(""),B(""),i&&Me(i)):alert("Failed to create resource: "+(Y.error||"Unknown error"))}catch(Y){console.error("Error creating resource:",Y),alert("Failed to create resource")}finally{ae(!1)}}),At=()=>{_(!1),O(""),B("")},se=()=>z(null,null,function*(){i&&console.log(`Delete all ${i.name} data`)}),X=Y=>{x(Y),T(!0),m(null),g(null),U.current&&(U.current.innerHTML=xs(Y))},Q=()=>{T(!0),setTimeout(()=>{C.current&&C.current.focus()},0)},ne=()=>{C.current&&U.current&&(U.current.scrollTop=C.current.scrollTop,U.current.scrollLeft=C.current.scrollLeft)};return o?(0,L.jsx)("div",{className:"user-data-panel",children:(0,L.jsx)("div",{className:"user-data-loading",children:(0,L.jsx)("img",{src:"https://admin.lua.dev/images/logo.svg",alt:"Loading",className:"loading-logo"})})}):(0,L.jsxs)("div",{className:"user-data-panel",children:[(0,L.jsxs)("div",{className:"user-data-header",children:[(0,L.jsxs)("div",{className:"header-left",children:[N==="detail"&&(0,L.jsx)("button",{className:"back-button",onClick:pt,title:"Back to data categories",children:"\u2190"}),(0,L.jsx)("h3",{children:N==="list"?"Data":(i==null?void 0:i.name)||"Data Detail"})]}),(0,L.jsxs)("div",{className:"user-data-actions",children:[N==="detail"&&(i==null?void 0:i.id)!=="user"&&(i==null?void 0:i.description)!=="Coming soon"&&(0,L.jsx)("button",{className:"add-button",onClick:y,title:`Add new ${i==null?void 0:i.name.toLowerCase()}`,children:"\u2795"}),(0,L.jsx)("button",{className:"refresh-button",onClick:N==="detail"&&i?()=>Me(i):we,disabled:o,title:`Refresh ${N==="detail"?i==null?void 0:i.name.toLowerCase():"data"}`,children:o?"\u27F3":"\u21BB"}),N==="detail"&&(i==null?void 0:i.id)==="user"&&(0,L.jsx)("button",{className:"save-button",onClick:je,disabled:c,title:"Save user data",children:c?"\u27F3":"\u{1F4BE}"}),N==="detail"&&(0,L.jsx)("button",{className:"delete-button",onClick:se,disabled:d,title:`Delete all ${i==null?void 0:i.name.toLowerCase()}`,children:"\u{1F5D1}\uFE0F"})]})]}),k&&(0,L.jsxs)("div",{className:"error-message",children:["\u274C ",k]}),h&&(0,L.jsxs)("div",{className:"success-message",children:["\u2705 ",h]}),(0,L.jsx)("div",{className:"user-data-content",children:N==="list"?(0,L.jsx)("div",{className:"data-list",children:(0,L.jsx)("div",{className:"data-categories",children:DR.map(Y=>(0,L.jsxs)("div",{className:"data-category",onClick:()=>Me(Y),children:[(0,L.jsx)("div",{className:"category-icon",children:Y.icon}),(0,L.jsxs)("div",{className:"category-info",children:[(0,L.jsx)("div",{className:"category-name",children:Y.name}),(0,L.jsx)("div",{className:"category-description",children:Y.description})]}),(0,L.jsx)("div",{className:"category-arrow",children:"\u2192"})]},Y.id))})}):(0,L.jsx)("div",{className:"data-detail",children:(i==null?void 0:i.id)==="user"&&l?(0,L.jsx)("div",{className:"json-editor",children:E?(0,L.jsxs)("div",{className:"json-editor-container",children:[(0,L.jsx)("div",{ref:U,className:"json-highlight-background",dangerouslySetInnerHTML:{__html:xs(S)}}),(0,L.jsx)("textarea",{ref:C,id:"user-data-json",name:"userDataJson",value:S,onChange:Y=>X(Y.target.value),className:"json-textarea",spellCheck:!1,placeholder:"Enter JSON data...",autoComplete:"off"})]}):(0,L.jsx)("div",{className:"json-display",onClick:Q,dangerouslySetInnerHTML:{__html:xs(S)}})}):(i==null?void 0:i.id)==="resources"&&l?(0,L.jsxs)("div",{className:"resources-container",children:[(0,L.jsxs)("div",{className:"production-warning",children:[(0,L.jsx)("div",{className:"warning-icon",children:"\u26A0\uFE0F"}),(0,L.jsxs)("div",{className:"warning-text",children:[(0,L.jsx)("strong",{children:"Production Resources:"})," Changes to resources will propagate to production and affect live users."]})]}),(0,L.jsx)("div",{className:"resources-list",children:Array.isArray(l)&&l.length>0?l.map(Y=>(0,L.jsx)(OR,{resource:Y,apiKey:e,agentId:t,onUpdate:()=>Me(i)},Y.id)):(0,L.jsxs)("div",{className:"no-resources",children:[(0,L.jsx)("div",{className:"empty-icon",children:"\u{1F4C1}"}),(0,L.jsx)("h4",{children:"No resources yet"}),(0,L.jsx)("p",{children:"Resources help provide context and information to your AI agent"})]})})]}):(0,L.jsxs)("div",{className:"category-empty-state",children:[(0,L.jsx)("div",{className:"empty-icon",children:i==null?void 0:i.icon}),(i==null?void 0:i.description)==="Coming soon"?(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)("h3",{children:"Coming Soon"}),(0,L.jsxs)("p",{children:[i.name," management will be available in a future update"]}),(0,L.jsx)("div",{className:"coming-soon-badge",children:"\u{1F6A7} Under Development"})]}):(0,L.jsxs)(L.Fragment,{children:[(0,L.jsxs)("h3",{children:["No ",i==null?void 0:i.name.toLowerCase()," yet"]}),(0,L.jsxs)("p",{children:["Start by adding your first ",i==null?void 0:i.name.toLowerCase()," entry"]}),(0,L.jsx)("div",{className:"empty-actions",children:(0,L.jsx)("button",{className:"add-button",onClick:y,children:"\u2795"})})]})]})})}),P&&(0,L.jsx)("div",{className:"resource-modal-overlay",children:(0,L.jsxs)("div",{className:"resource-modal",children:[(0,L.jsxs)("div",{className:"resource-modal-header",children:[(0,L.jsx)("h3",{children:"Create New Resource"}),(0,L.jsx)("button",{className:"modal-close-btn",onClick:At,disabled:J,children:"\u2715"})]}),(0,L.jsxs)("div",{className:"resource-modal-body",children:[(0,L.jsxs)("div",{className:"production-warning",children:[(0,L.jsx)("div",{className:"warning-icon",children:"\u26A0\uFE0F"}),(0,L.jsxs)("div",{className:"warning-text",children:[(0,L.jsx)("strong",{children:"Production Impact:"})," This resource will be available in production and affect live users."]})]}),(0,L.jsxs)("div",{className:"resource-form",children:[(0,L.jsxs)("div",{className:"form-field",children:[(0,L.jsx)("label",{htmlFor:"resource-name",children:"Resource Name"}),(0,L.jsx)("input",{id:"resource-name",type:"text",value:R,onChange:Y=>O(Y.target.value),placeholder:"e.g., FAQ, return-policy, user-guide",className:"resource-name-input",autoFocus:!0})]}),(0,L.jsxs)("div",{className:"form-field",children:[(0,L.jsx)("label",{htmlFor:"resource-content",children:"Content"}),(0,L.jsx)("textarea",{id:"resource-content",value:I,onChange:Y=>B(Y.target.value),placeholder:"Paste your content here... This can be a large text file, FAQ content, documentation, etc.",className:"resource-content-textarea",rows:12})]}),(0,L.jsxs)("div",{className:"character-count",children:[I.length," characters"]})]})]}),(0,L.jsxs)("div",{className:"resource-modal-actions",children:[(0,L.jsx)("button",{className:"cancel-button",onClick:At,disabled:J,children:"Cancel"}),(0,L.jsx)("button",{className:"create-button",onClick:Ke,disabled:J||!R.trim()||!I.trim(),children:J?"Creating...":"Create Resource"})]})]})})]})},OR=({resource:e,apiKey:t,agentId:n,onUpdate:a})=>{let[i,r]=(0,qe.useState)(!1),[l,s]=(0,qe.useState)(e.name),[o,u]=(0,qe.useState)(e.content),[c,p]=(0,qe.useState)(!1),[d,f]=(0,qe.useState)(!1),S=()=>{r(!0),s(e.name),u(e.content)},x=()=>{r(!1),s(e.name),u(e.content)},k=()=>z(null,null,function*(){if(!l.trim()||!o.trim()){alert("Name and content cannot be empty");return}p(!0);try{let h=yield ie.updateResource(t,n,e.id,{name:l.trim(),content:o.trim()});h.success?(r(!1),a()):alert("Failed to update resource: "+(h.error||"Unknown error"))}catch(h){console.error("Error updating resource:",h),alert("Failed to update resource")}finally{p(!1)}}),m=()=>z(null,null,function*(){if(confirm(`Are you sure you want to delete "${e.name}"? This will affect production.`)){f(!0);try{let h=yield ie.deleteResource(t,n,e.id);h.success?a():alert("Failed to delete resource: "+(h.error||"Unknown error"))}catch(h){console.error("Error deleting resource:",h),alert("Failed to delete resource")}finally{f(!1)}}});return(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)("div",{className:"resource-item",children:(0,L.jsxs)("div",{className:"resource-display",children:[(0,L.jsxs)("div",{className:"resource-header",children:[(0,L.jsx)("h4",{className:"resource-name",children:e.name}),(0,L.jsx)("div",{className:"resource-meta",children:(0,L.jsxs)("span",{className:"resource-date",children:["Updated ",new Date(e.updatedAt).toLocaleDateString()]})})]}),(0,L.jsx)("div",{className:"resource-content",children:(0,L.jsxs)("p",{children:[e.content.substring(0,200),e.content.length>200?"...":""]})}),(0,L.jsxs)("div",{className:"resource-actions",children:[(0,L.jsx)("button",{className:"edit-btn",onClick:S,title:"Edit resource",children:"\u270F\uFE0F"}),(0,L.jsx)("button",{className:"delete-btn",onClick:m,disabled:d,title:"Delete resource",children:d?"\u27F3":"\u{1F5D1}\uFE0F"})]})]})}),i&&(0,L.jsx)("div",{className:"resource-modal-overlay",children:(0,L.jsxs)("div",{className:"resource-modal",children:[(0,L.jsxs)("div",{className:"resource-modal-header",children:[(0,L.jsx)("h3",{children:"Edit Resource"}),(0,L.jsx)("button",{className:"modal-close-btn",onClick:x,disabled:c,children:"\u2715"})]}),(0,L.jsxs)("div",{className:"resource-modal-body",children:[(0,L.jsxs)("div",{className:"production-warning",children:[(0,L.jsx)("div",{className:"warning-icon",children:"\u26A0\uFE0F"}),(0,L.jsxs)("div",{className:"warning-text",children:[(0,L.jsx)("strong",{children:"Production Impact:"})," Changes to this resource will affect live users immediately."]})]}),(0,L.jsxs)("div",{className:"resource-form",children:[(0,L.jsxs)("div",{className:"form-field",children:[(0,L.jsx)("label",{htmlFor:"edit-resource-name",children:"Resource Name"}),(0,L.jsx)("input",{id:"edit-resource-name",type:"text",value:l,onChange:h=>s(h.target.value),placeholder:"Resource name",className:"resource-name-input",autoFocus:!0})]}),(0,L.jsxs)("div",{className:"form-field",children:[(0,L.jsx)("label",{htmlFor:"edit-resource-content",children:"Content"}),(0,L.jsx)("textarea",{id:"edit-resource-content",value:o,onChange:h=>u(h.target.value),placeholder:"Resource content",className:"resource-content-textarea",rows:12})]}),(0,L.jsxs)("div",{className:"character-count",children:[o.length," characters"]})]})]}),(0,L.jsxs)("div",{className:"resource-modal-actions",children:[(0,L.jsx)("button",{className:"cancel-button",onClick:x,disabled:c,children:"Cancel"}),(0,L.jsx)("button",{className:"create-button",onClick:k,disabled:c||!l.trim()||!o.trim(),children:c?"Saving...":"Save Changes"})]})]})})]})}});var Lt,W,Sm,LR,xm=b(()=>{"use strict";Lt=F(Je());an();W=F(re()),Sm=({apiKey:e,agentId:t})=>{let[n,a]=(0,Lt.useState)([]),[i,r]=(0,Lt.useState)(!0),[l,s]=(0,Lt.useState)(!1),[o,u]=(0,Lt.useState)(null),[c,p]=(0,Lt.useState)(null),[d,f]=(0,Lt.useState)(null),[S,x]=(0,Lt.useState)(""),[k,m]=(0,Lt.useState)(""),[h,g]=(0,Lt.useState)(!1);(0,Lt.useEffect)(()=>{C()},[]);let[E,T]=(0,Lt.useState)(!0);(0,Lt.useEffect)(()=>{if(E)return;z(null,null,function*(){console.log("Environment variables changed, auto-saving..."),s(!0),u(null),p(null);try{let J=A(n);console.log("Generated .env content:",J);let ae=yield ie.saveEnvContent(J);console.log("Save env response:",ae),ae.success?(p("Environment variables saved successfully!"),setTimeout(()=>p(null),3e3)):(console.error("Failed to save env variables:",ae.error),u(ae.error||"Failed to save environment variables"))}catch(J){console.error("Error saving env variables:",J),u("Failed to save environment variables")}finally{s(!1)}})},[n]);let N=B=>B.trim()?B.split(`
23
- `).map((J,ae)=>J.trim()).filter(J=>J&&!J.startsWith("#")).map((J,ae)=>{let[we,...je]=J.split("=");return{id:`env_${ae}_${Date.now()}`,key:(we==null?void 0:we.trim())||"",value:je.join("=")||""}}).filter(J=>J.key):[],A=B=>B.map(J=>`${J.key}=${J.value}`).join(`
24
- `),C=()=>z(null,null,function*(){r(!0),u(null);try{let B=yield ie.loadEnvContent();if(B.success){let J=B.content||"",ae=N(J);a(ae),T(!1)}else u(B.error||"Failed to load environment variables"),a([]),T(!1)}catch(B){console.error("Error loading env content:",B),u("Failed to load environment variables"),a([])}finally{r(!1)}}),U=()=>{if(!S.trim()){u("Please enter a variable name");return}if(n.some(J=>J.key===S.trim())){u("Variable name already exists");return}let B={id:`env_new_${Date.now()}`,key:S.trim(),value:k};a([...n,B]),x(""),m(""),g(!1),u(null)},P=(B,J,ae)=>{a(we=>we.map(je=>je.id===B?ut(K({},je),{key:J.trim(),value:ae}):je)),f(null)},_=B=>{a(J=>J.filter(ae=>ae.id!==B))},R=B=>{f(B),u(null),p(null)},O=()=>{f(null),C()},I=()=>{g(!1),x(""),m(""),u(null)};return i?(0,W.jsx)("div",{className:"env-panel",children:(0,W.jsx)("div",{className:"env-loading",children:(0,W.jsx)("img",{src:"https://admin.lua.dev/images/logo.svg",alt:"Loading",className:"loading-logo"})})}):(0,W.jsxs)("div",{className:"env-panel",children:[(0,W.jsxs)("div",{className:"env-header",children:[(0,W.jsx)("h3",{children:"Environment Variables"}),(0,W.jsxs)("div",{className:"env-actions",children:[(0,W.jsx)("button",{className:"refresh-btn",onClick:C,disabled:i,title:"Refresh environment variables",children:i?"\u27F3":"\u21BB"}),(0,W.jsx)("button",{className:"add-btn",onClick:()=>g(!0),disabled:h,title:"Add new environment variable",children:"\u2795"})]})]}),(0,W.jsxs)("div",{className:"env-content",children:[o&&(0,W.jsxs)("div",{className:"error-message",children:[(0,W.jsx)("strong",{children:"Error:"})," ",o]}),c&&(0,W.jsxs)("div",{className:"success-message",children:[(0,W.jsx)("strong",{children:"Success:"})," ",c]}),h&&(0,W.jsxs)("div",{className:"env-add-form",children:[(0,W.jsxs)("div",{className:"env-form-header",children:[(0,W.jsx)("h4",{children:"Add New Variable"}),(0,W.jsx)("button",{className:"form-cancel-btn",onClick:I,title:"Cancel",children:"\u2715"})]}),(0,W.jsxs)("div",{className:"env-form-fields",children:[(0,W.jsxs)("div",{className:"env-field",children:[(0,W.jsx)("label",{children:"Variable Name"}),(0,W.jsx)("input",{type:"text",value:S,onChange:B=>x(B.target.value),placeholder:"API_KEY",className:"env-input",autoFocus:!0})]}),(0,W.jsxs)("div",{className:"env-field",children:[(0,W.jsx)("label",{children:"Value"}),(0,W.jsx)("input",{type:"text",value:k,onChange:B=>m(B.target.value),placeholder:"your_api_key_here",className:"env-input"})]}),(0,W.jsx)("div",{className:"env-form-actions",children:(0,W.jsx)("button",{className:"add-variable-btn",onClick:U,disabled:!S.trim(),children:"Add Variable"})})]})]}),(0,W.jsx)("div",{className:"env-variables",children:n.length>0?(0,W.jsx)("div",{className:"env-list",children:n.map(B=>(0,W.jsx)(LR,{variable:B,isEditing:d===B.id,onEdit:()=>R(B.id),onSave:(J,ae)=>P(B.id,J,ae),onCancel:O,onDelete:()=>_(B.id)},B.id))}):(0,W.jsxs)("div",{className:"env-empty-state",children:[(0,W.jsx)("div",{className:"empty-icon",children:"\u{1F527}"}),(0,W.jsx)("h4",{children:"No environment variables"}),(0,W.jsx)("p",{children:"Add your first environment variable to get started"}),(0,W.jsx)("button",{className:"add-first-btn",onClick:()=>g(!0),children:"Add Variable"})]})}),(0,W.jsxs)("div",{className:"env-help",children:[(0,W.jsxs)("p",{children:["Environment variables are stored in your ",(0,W.jsx)("code",{children:".env"})," file and automatically included in tool execution and chat messages."]}),(0,W.jsxs)("p",{children:[(0,W.jsx)("strong",{children:"Auto-save:"})," Changes are saved automatically when you add, edit, or delete variables."]})]})]})]})},LR=({variable:e,isEditing:t,onEdit:n,onSave:a,onCancel:i,onDelete:r})=>{let[l,s]=(0,Lt.useState)(e.key),[o,u]=(0,Lt.useState)(e.value),[c,p]=(0,Lt.useState)(!1),d=e.value.length>60,f=c||!d?e.value:e.value.substring(0,60)+"...";return(0,W.jsx)("div",{className:"env-variable-item",children:t?(0,W.jsxs)("div",{className:"env-variable-edit",children:[(0,W.jsxs)("div",{className:"env-edit-fields",children:[(0,W.jsx)("input",{type:"text",value:l,onChange:k=>s(k.target.value),className:"env-key-input",placeholder:"Variable name"}),(0,W.jsx)("span",{className:"env-equals",children:"="}),(0,W.jsx)("textarea",{value:o,onChange:k=>u(k.target.value),className:"env-value-input",placeholder:"Value",rows:1})]}),(0,W.jsxs)("div",{className:"env-edit-actions",children:[(0,W.jsx)("button",{className:"save-edit-btn",onClick:()=>{if(!l.trim()){alert("Variable name cannot be empty");return}a(l,o)},title:"Save changes",children:"\u2713"}),(0,W.jsx)("button",{className:"cancel-edit-btn",onClick:()=>{s(e.key),u(e.value),i()},title:"Cancel editing",children:"\u2715"})]})]}):(0,W.jsxs)("div",{className:"env-variable-display",children:[(0,W.jsxs)("div",{className:"env-variable-content",children:[(0,W.jsx)("span",{className:"env-key",children:e.key}),(0,W.jsx)("span",{className:"env-equals",children:"="}),(0,W.jsxs)("div",{className:"env-value-container",children:[(0,W.jsx)("span",{className:"env-value",onClick:()=>d&&p(!c),style:{cursor:d?"pointer":"default"},title:d?"Click to expand/collapse":e.value,children:f||"<empty>"}),d&&(0,W.jsx)("button",{className:"expand-btn",onClick:()=>p(!c),title:c?"Collapse":"Expand",children:c?"\u25B2":"\u25BC"})]})]}),(0,W.jsxs)("div",{className:"env-variable-actions",children:[(0,W.jsx)("button",{className:"edit-variable-btn",onClick:n,title:"Edit variable",children:"\u270F\uFE0F"}),(0,W.jsx)("button",{className:"delete-variable-btn",onClick:r,title:"Delete variable",children:"\u{1F5D1}\uFE0F"})]})]})})}});var wt,Nm,tN=b(()=>{"use strict";hm();vm();bm();xm();wt=F(re()),Nm=({activeTab:e,onTabChange:t,persona:n,onSavePersona:a,apiKey:i,agentId:r,skillId:l,sandboxId:s,width:o})=>(0,wt.jsx)("div",{className:"log-container",style:{width:`${o}px`},children:(0,wt.jsxs)("div",{className:"top-section",children:[(0,wt.jsx)("div",{className:"log-header",children:(0,wt.jsxs)("div",{className:"tab-buttons",children:[(0,wt.jsx)("button",{className:`tab-button ${e==="persona"?"active":""}`,onClick:()=>t("persona"),children:"Persona"}),(0,wt.jsx)("button",{className:`tab-button ${e==="skills"?"active":""}`,onClick:()=>t("skills"),children:"Skills"}),(0,wt.jsx)("button",{className:`tab-button ${e==="userdata"?"active":""}`,onClick:()=>t("userdata"),children:"Data"}),(0,wt.jsx)("button",{className:`tab-button ${e==="env"?"active":""}`,onClick:()=>t("env"),children:"Env"})]})}),(0,wt.jsx)("div",{className:`tab-content ${e==="persona"?"active":"inactive"}`,children:(0,wt.jsx)(mm,{persona:n,onSavePersona:a,apiKey:i,agentId:r})}),(0,wt.jsx)("div",{className:`tab-content ${e==="skills"?"active":"inactive"}`,children:(0,wt.jsx)(gm,{apiKey:i,agentId:r,skillId:l,sandboxId:s})}),(0,wt.jsx)("div",{className:`tab-content ${e==="userdata"?"active":"inactive"}`,children:(0,wt.jsx)(ym,{apiKey:i,agentId:r})}),(0,wt.jsx)("div",{className:`tab-content ${e==="env"?"active":"inactive"}`,children:(0,wt.jsx)(Sm,{apiKey:i,agentId:r})})]})})});var jn,Ns,Es,Zu=b(()=>{jn=Object.create(null);jn.open="0";jn.close="1";jn.ping="2";jn.pong="3";jn.message="4";jn.upgrade="5";jn.noop="6";Ns=Object.create(null);Object.keys(jn).forEach(e=>{Ns[jn[e]]=e});Es={type:"error",data:"parser error"}});function aN(e){return e instanceof Uint8Array?e:e instanceof ArrayBuffer?new Uint8Array(e):new Uint8Array(e.buffer,e.byteOffset,e.byteLength)}function sN(e,t){if(iN&&e.data instanceof Blob)return e.data.arrayBuffer().then(aN).then(t);if(rN&&(e.data instanceof ArrayBuffer||lN(e.data)))return t(aN(e.data));ks(e,!1,n=>{Em||(Em=new TextEncoder),t(Em.encode(n))})}var iN,rN,lN,ks,nN,Em,oN=b(()=>{Zu();iN=typeof Blob=="function"||typeof Blob!="undefined"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",rN=typeof ArrayBuffer=="function",lN=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer,ks=({type:e,data:t},n,a)=>iN&&t instanceof Blob?n?a(t):nN(t,a):rN&&(t instanceof ArrayBuffer||lN(t))?n?a(t):nN(new Blob([t]),a):a(jn[e]+(t||"")),nN=(e,t)=>{let n=new FileReader;return n.onload=function(){let a=n.result.split(",")[1];t("b"+(a||""))},n.readAsDataURL(e)}});var uN,Ts,cN,fN=b(()=>{uN="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Ts=typeof Uint8Array=="undefined"?[]:new Uint8Array(256);for(let e=0;e<uN.length;e++)Ts[uN.charCodeAt(e)]=e;cN=e=>{let t=e.length*.75,n=e.length,a,i=0,r,l,s,o;e[e.length-1]==="="&&(t--,e[e.length-2]==="="&&t--);let u=new ArrayBuffer(t),c=new Uint8Array(u);for(a=0;a<n;a+=4)r=Ts[e.charCodeAt(a)],l=Ts[e.charCodeAt(a+1)],s=Ts[e.charCodeAt(a+2)],o=Ts[e.charCodeAt(a+3)],c[i++]=r<<2|l>>4,c[i++]=(l&15)<<4|s>>2,c[i++]=(s&3)<<6|o&63;return u}});var zR,ws,MR,dN,pN=b(()=>{Zu();fN();zR=typeof ArrayBuffer=="function",ws=(e,t)=>{if(typeof e!="string")return{type:"message",data:dN(e,t)};let n=e.charAt(0);return n==="b"?{type:"message",data:MR(e.substring(1),t)}:Ns[n]?e.length>1?{type:Ns[n],data:e.substring(1)}:{type:Ns[n]}:Es},MR=(e,t)=>{if(zR){let n=cN(e);return dN(n,t)}else return{base64:!0,data:e}},dN=(e,t)=>{switch(t){case"blob":return e instanceof Blob?e:new Blob([e]);case"arraybuffer":default:return e instanceof ArrayBuffer?e:e.buffer}}});function vN(){return new TransformStream({transform(e,t){sN(e,n=>{let a=n.length,i;if(a<126)i=new Uint8Array(1),new DataView(i.buffer).setUint8(0,a);else if(a<65536){i=new Uint8Array(3);let r=new DataView(i.buffer);r.setUint8(0,126),r.setUint16(1,a)}else{i=new Uint8Array(9);let r=new DataView(i.buffer);r.setUint8(0,127),r.setBigUint64(1,BigInt(a))}e.data&&typeof e.data!="string"&&(i[0]|=128),t.enqueue(i),t.enqueue(n)})}})}function Ju(e){return e.reduce((t,n)=>t+n.length,0)}function $u(e,t){if(e[0].length===t)return e.shift();let n=new Uint8Array(t),a=0;for(let i=0;i<t;i++)n[i]=e[0][a++],a===e[0].length&&(e.shift(),a=0);return e.length&&a<e[0].length&&(e[0]=e[0].slice(a)),n}function yN(e,t){km||(km=new TextDecoder);let n=[],a=0,i=-1,r=!1;return new TransformStream({transform(l,s){for(n.push(l);;){if(a===0){if(Ju(n)<1)break;let o=$u(n,1);r=(o[0]&128)===128,i=o[0]&127,i<126?a=3:i===126?a=1:a=2}else if(a===1){if(Ju(n)<2)break;let o=$u(n,2);i=new DataView(o.buffer,o.byteOffset,o.length).getUint16(0),a=3}else if(a===2){if(Ju(n)<8)break;let o=$u(n,8),u=new DataView(o.buffer,o.byteOffset,o.length),c=u.getUint32(0);if(c>Math.pow(2,21)-1){s.enqueue(Es);break}i=c*Math.pow(2,32)+u.getUint32(4),a=3}else{if(Ju(n)<i)break;let o=$u(n,i);s.enqueue(ws(r?o:km.decode(o),t)),a=0}if(i===0||i>e){s.enqueue(Es);break}}}})}var mN,hN,gN,km,Tm,qr=b(()=>{oN();pN();Zu();mN="",hN=(e,t)=>{let n=e.length,a=new Array(n),i=0;e.forEach((r,l)=>{ks(r,!1,s=>{a[l]=s,++i===n&&t(a.join(mN))})})},gN=(e,t)=>{let n=e.split(mN),a=[];for(let i=0;i<n.length;i++){let r=ws(n[i],t);if(a.push(r),r.type==="error")break}return a};Tm=4});function Ie(e){if(e)return UR(e)}function UR(e){for(var t in Ie.prototype)e[t]=Ie.prototype[t];return e}var Li=b(()=>{Ie.prototype.on=Ie.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this};Ie.prototype.once=function(e,t){function n(){this.off(e,n),t.apply(this,arguments)}return n.fn=t,this.on(e,n),this};Ie.prototype.off=Ie.prototype.removeListener=Ie.prototype.removeAllListeners=Ie.prototype.removeEventListener=function(e,t){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var n=this._callbacks["$"+e];if(!n)return this;if(arguments.length==1)return delete this._callbacks["$"+e],this;for(var a,i=0;i<n.length;i++)if(a=n[i],a===t||a.fn===t){n.splice(i,1);break}return n.length===0&&delete this._callbacks["$"+e],this};Ie.prototype.emit=function(e){this._callbacks=this._callbacks||{};for(var t=new Array(arguments.length-1),n=this._callbacks["$"+e],a=1;a<arguments.length;a++)t[a-1]=arguments[a];if(n){n=n.slice(0);for(var a=0,i=n.length;a<i;++a)n[a].apply(this,t)}return this};Ie.prototype.emitReserved=Ie.prototype.emit;Ie.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks["$"+e]||[]};Ie.prototype.hasListeners=function(e){return!!this.listeners(e).length}});var ba,Qt,bN,zi=b(()=>{ba=typeof Promise=="function"&&typeof Promise.resolve=="function"?t=>Promise.resolve().then(t):(t,n)=>n(t,0),Qt=typeof self!="undefined"?self:typeof window!="undefined"?window:Function("return this")(),bN="arraybuffer"});function Ku(e,...t){return t.reduce((n,a)=>(e.hasOwnProperty(a)&&(n[a]=e[a]),n),{})}function Sa(e,t){t.useNativeTimers?(e.setTimeoutFn=BR.bind(Qt),e.clearTimeoutFn=VR.bind(Qt)):(e.setTimeoutFn=Qt.setTimeout.bind(Qt),e.clearTimeoutFn=Qt.clearTimeout.bind(Qt))}function SN(e){return typeof e=="string"?PR(e):Math.ceil((e.byteLength||e.size)*HR)}function PR(e){let t=0,n=0;for(let a=0,i=e.length;a<i;a++)t=e.charCodeAt(a),t<128?n+=1:t<2048?n+=2:t<55296||t>=57344?n+=3:(a++,n+=4);return n}function Wu(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}var BR,VR,HR,Mi=b(()=>{zi();BR=Qt.setTimeout,VR=Qt.clearTimeout;HR=1.33});function xN(e){let t="";for(let n in e)e.hasOwnProperty(n)&&(t.length&&(t+="&"),t+=encodeURIComponent(n)+"="+encodeURIComponent(e[n]));return t}function NN(e){let t={},n=e.split("&");for(let a=0,i=n.length;a<i;a++){let r=n[a].split("=");t[decodeURIComponent(r[0])]=decodeURIComponent(r[1])}return t}var wm=b(()=>{});var ec,xa,As=b(()=>{qr();Li();Mi();wm();ec=class extends Error{constructor(t,n,a){super(t),this.description=n,this.context=a,this.type="TransportError"}},xa=class extends Ie{constructor(t){super(),this.writable=!1,Sa(this,t),this.opts=t,this.query=t.query,this.socket=t.socket,this.supportsBinary=!t.forceBase64}onError(t,n,a){return super.emitReserved("error",new ec(t,n,a)),this}open(){return this.readyState="opening",this.doOpen(),this}close(){return(this.readyState==="opening"||this.readyState==="open")&&(this.doClose(),this.onClose()),this}send(t){this.readyState==="open"&&this.write(t)}onOpen(){this.readyState="open",this.writable=!0,super.emitReserved("open")}onData(t){let n=ws(t,this.socket.binaryType);this.onPacket(n)}onPacket(t){super.emitReserved("packet",t)}onClose(t){this.readyState="closed",super.emitReserved("close",t)}pause(t){}createUri(t,n={}){return t+"://"+this._hostname()+this._port()+this.opts.path+this._query(n)}_hostname(){let t=this.opts.hostname;return t.indexOf(":")===-1?t:"["+t+"]"}_port(){return this.opts.port&&(this.opts.secure&&+(this.opts.port!==443)||!this.opts.secure&&Number(this.opts.port)!==80)?":"+this.opts.port:""}_query(t){let n=xN(t);return n.length?"?"+n:""}}});var Cs,Am=b(()=>{As();Mi();qr();Cs=class extends xa{constructor(){super(...arguments),this._polling=!1}get name(){return"polling"}doOpen(){this._poll()}pause(t){this.readyState="pausing";let n=()=>{this.readyState="paused",t()};if(this._polling||!this.writable){let a=0;this._polling&&(a++,this.once("pollComplete",function(){--a||n()})),this.writable||(a++,this.once("drain",function(){--a||n()}))}else n()}_poll(){this._polling=!0,this.doPoll(),this.emitReserved("poll")}onData(t){let n=a=>{if(this.readyState==="opening"&&a.type==="open"&&this.onOpen(),a.type==="close")return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(a)};gN(t,this.socket.binaryType).forEach(n),this.readyState!=="closed"&&(this._polling=!1,this.emitReserved("pollComplete"),this.readyState==="open"&&this._poll())}doClose(){let t=()=>{this.write([{type:"close"}])};this.readyState==="open"?t():this.once("open",t)}write(t){this.writable=!1,hN(t,n=>{this.doWrite(n,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){let t=this.opts.secure?"https":"http",n=this.query||{};return this.opts.timestampRequests!==!1&&(n[this.opts.timestampParam]=Wu()),!this.supportsBinary&&!n.sid&&(n.b64=1),this.createUri(t,n)}}});var EN,kN,TN=b(()=>{EN=!1;try{EN=typeof XMLHttpRequest!="undefined"&&"withCredentials"in new XMLHttpRequest}catch(e){}kN=EN});function qR(){}function wN(){for(let e in ti.requests)ti.requests.hasOwnProperty(e)&&ti.requests[e].abort()}function AN(e){let t=e.xdomain;try{if(typeof XMLHttpRequest!="undefined"&&(!t||kN))return new XMLHttpRequest}catch(n){}if(!t)try{return new Qt[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch(n){}}var Cm,ti,jR,ni,tc=b(()=>{Am();Li();Mi();zi();TN();Cm=class extends Cs{constructor(t){if(super(t),typeof location!="undefined"){let n=location.protocol==="https:",a=location.port;a||(a=n?"443":"80"),this.xd=typeof location!="undefined"&&t.hostname!==location.hostname||a!==t.port}}doWrite(t,n){let a=this.request({method:"POST",data:t});a.on("success",n),a.on("error",(i,r)=>{this.onError("xhr post error",i,r)})}doPoll(){let t=this.request();t.on("data",this.onData.bind(this)),t.on("error",(n,a)=>{this.onError("xhr poll error",n,a)}),this.pollXhr=t}},ti=class e extends Ie{constructor(t,n,a){super(),this.createRequest=t,Sa(this,a),this._opts=a,this._method=a.method||"GET",this._uri=n,this._data=a.data!==void 0?a.data:null,this._create()}_create(){var t;let n=Ku(this._opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");n.xdomain=!!this._opts.xd;let a=this._xhr=this.createRequest(n);try{a.open(this._method,this._uri,!0);try{if(this._opts.extraHeaders){a.setDisableHeaderCheck&&a.setDisableHeaderCheck(!0);for(let i in this._opts.extraHeaders)this._opts.extraHeaders.hasOwnProperty(i)&&a.setRequestHeader(i,this._opts.extraHeaders[i])}}catch(i){}if(this._method==="POST")try{a.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch(i){}try{a.setRequestHeader("Accept","*/*")}catch(i){}(t=this._opts.cookieJar)===null||t===void 0||t.addCookies(a),"withCredentials"in a&&(a.withCredentials=this._opts.withCredentials),this._opts.requestTimeout&&(a.timeout=this._opts.requestTimeout),a.onreadystatechange=()=>{var i;a.readyState===3&&((i=this._opts.cookieJar)===null||i===void 0||i.parseCookies(a.getResponseHeader("set-cookie"))),a.readyState===4&&(a.status===200||a.status===1223?this._onLoad():this.setTimeoutFn(()=>{this._onError(typeof a.status=="number"?a.status:0)},0))},a.send(this._data)}catch(i){this.setTimeoutFn(()=>{this._onError(i)},0);return}typeof document!="undefined"&&(this._index=e.requestsCount++,e.requests[this._index]=this)}_onError(t){this.emitReserved("error",t,this._xhr),this._cleanup(!0)}_cleanup(t){if(!(typeof this._xhr=="undefined"||this._xhr===null)){if(this._xhr.onreadystatechange=qR,t)try{this._xhr.abort()}catch(n){}typeof document!="undefined"&&delete e.requests[this._index],this._xhr=null}}_onLoad(){let t=this._xhr.responseText;t!==null&&(this.emitReserved("data",t),this.emitReserved("success"),this._cleanup())}abort(){this._cleanup()}};ti.requestsCount=0;ti.requests={};if(typeof document!="undefined"){if(typeof attachEvent=="function")attachEvent("onunload",wN);else if(typeof addEventListener=="function"){let e="onpagehide"in Qt?"pagehide":"unload";addEventListener(e,wN,!1)}}jR=(function(){let e=AN({xdomain:!1});return e&&e.responseType!==null})(),ni=class extends Cm{constructor(t){super(t);let n=t&&t.forceBase64;this.supportsBinary=jR&&!n}request(t={}){return Object.assign(t,{xd:this.xd},this.opts),new ti(AN,this.uri(),t)}}});var CN,_m,Rm,ai,nc=b(()=>{As();Mi();qr();zi();CN=typeof navigator!="undefined"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative",_m=class extends xa{get name(){return"websocket"}doOpen(){let t=this.uri(),n=this.opts.protocols,a=CN?{}:Ku(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(a.headers=this.opts.extraHeaders);try{this.ws=this.createSocket(t,n,a)}catch(i){return this.emitReserved("error",i)}this.ws.binaryType=this.socket.binaryType,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=t=>this.onClose({description:"websocket connection closed",context:t}),this.ws.onmessage=t=>this.onData(t.data),this.ws.onerror=t=>this.onError("websocket error",t)}write(t){this.writable=!1;for(let n=0;n<t.length;n++){let a=t[n],i=n===t.length-1;ks(a,this.supportsBinary,r=>{try{this.doWrite(a,r)}catch(l){}i&&ba(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){typeof this.ws!="undefined"&&(this.ws.onerror=()=>{},this.ws.close(),this.ws=null)}uri(){let t=this.opts.secure?"wss":"ws",n=this.query||{};return this.opts.timestampRequests&&(n[this.opts.timestampParam]=Wu()),this.supportsBinary||(n.b64=1),this.createUri(t,n)}},Rm=Qt.WebSocket||Qt.MozWebSocket,ai=class extends _m{createSocket(t,n,a){return CN?new Rm(t,n,a):n?new Rm(t,n):new Rm(t)}doWrite(t,n){this.ws.send(n)}}});var jr,Dm=b(()=>{As();zi();qr();jr=class extends xa{get name(){return"webtransport"}doOpen(){try{this._transport=new WebTransport(this.createUri("https"),this.opts.transportOptions[this.name])}catch(t){return this.emitReserved("error",t)}this._transport.closed.then(()=>{this.onClose()}).catch(t=>{this.onError("webtransport error",t)}),this._transport.ready.then(()=>{this._transport.createBidirectionalStream().then(t=>{let n=yN(Number.MAX_SAFE_INTEGER,this.socket.binaryType),a=t.readable.pipeThrough(n).getReader(),i=vN();i.readable.pipeTo(t.writable),this._writer=i.writable.getWriter();let r=()=>{a.read().then(({done:s,value:o})=>{s||(this.onPacket(o),r())}).catch(s=>{})};r();let l={type:"open"};this.query.sid&&(l.data=`{"sid":"${this.query.sid}"}`),this._writer.write(l).then(()=>this.onOpen())})})}write(t){this.writable=!1;for(let n=0;n<t.length;n++){let a=t[n],i=n===t.length-1;this._writer.write(a).then(()=>{i&&ba(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var t;(t=this._transport)===null||t===void 0||t.close()}}});var Om,Lm=b(()=>{tc();nc();Dm();Om={websocket:ai,webtransport:jr,polling:ni}});function Yr(e){if(e.length>8e3)throw"URI too long";let t=e,n=e.indexOf("["),a=e.indexOf("]");n!=-1&&a!=-1&&(e=e.substring(0,n)+e.substring(n,a).replace(/:/g,";")+e.substring(a,e.length));let i=YR.exec(e||""),r={},l=14;for(;l--;)r[IR[l]]=i[l]||"";return n!=-1&&a!=-1&&(r.source=t,r.host=r.host.substring(1,r.host.length-1).replace(/;/g,":"),r.authority=r.authority.replace("[","").replace("]","").replace(/;/g,":"),r.ipv6uri=!0),r.pathNames=GR(r,r.path),r.queryKey=XR(r,r.query),r}function GR(e,t){let n=/\/{2,9}/g,a=t.replace(n,"/").split("/");return(t.slice(0,1)=="/"||t.length===0)&&a.splice(0,1),t.slice(-1)=="/"&&a.splice(a.length-1,1),a}function XR(e,t){let n={};return t.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(a,i,r){i&&(n[i]=r)}),n}var YR,IR,zm=b(()=>{YR=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,IR=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"]});var Mm,ac,Ui,ic,Ir,Um=b(()=>{Lm();Mi();wm();zm();Li();qr();zi();Mm=typeof addEventListener=="function"&&typeof removeEventListener=="function",ac=[];Mm&&addEventListener("offline",()=>{ac.forEach(e=>e())},!1);Ui=class e extends Ie{constructor(t,n){if(super(),this.binaryType=bN,this.writeBuffer=[],this._prevBufferLen=0,this._pingInterval=-1,this._pingTimeout=-1,this._maxPayload=-1,this._pingTimeoutTime=1/0,t&&typeof t=="object"&&(n=t,t=null),t){let a=Yr(t);n.hostname=a.host,n.secure=a.protocol==="https"||a.protocol==="wss",n.port=a.port,a.query&&(n.query=a.query)}else n.host&&(n.hostname=Yr(n.host).host);Sa(this,n),this.secure=n.secure!=null?n.secure:typeof location!="undefined"&&location.protocol==="https:",n.hostname&&!n.port&&(n.port=this.secure?"443":"80"),this.hostname=n.hostname||(typeof location!="undefined"?location.hostname:"localhost"),this.port=n.port||(typeof location!="undefined"&&location.port?location.port:this.secure?"443":"80"),this.transports=[],this._transportsByName={},n.transports.forEach(a=>{let i=a.prototype.name;this.transports.push(i),this._transportsByName[i]=a}),this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,addTrailingSlash:!0,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!1},n),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),typeof this.opts.query=="string"&&(this.opts.query=NN(this.opts.query)),Mm&&(this.opts.closeOnBeforeunload&&(this._beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this._beforeunloadEventListener,!1)),this.hostname!=="localhost"&&(this._offlineEventListener=()=>{this._onClose("transport close",{description:"network connection lost"})},ac.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(t){let n=Object.assign({},this.opts.query);n.EIO=Tm,n.transport=t,this.id&&(n.sid=this.id);let a=Object.assign({},this.opts,{query:n,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[t]);return new this._transportsByName[t](a)}_open(){if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}let t=this.opts.rememberUpgrade&&e.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1?"websocket":this.transports[0];this.readyState="opening";let n=this.createTransport(t);n.open(),this.setTransport(n)}setTransport(t){this.transport&&this.transport.removeAllListeners(),this.transport=t,t.on("drain",this._onDrain.bind(this)).on("packet",this._onPacket.bind(this)).on("error",this._onError.bind(this)).on("close",n=>this._onClose("transport close",n))}onOpen(){this.readyState="open",e.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush()}_onPacket(t){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")switch(this.emitReserved("packet",t),this.emitReserved("heartbeat"),t.type){case"open":this.onHandshake(JSON.parse(t.data));break;case"ping":this._sendPacket("pong"),this.emitReserved("ping"),this.emitReserved("pong"),this._resetPingTimeout();break;case"error":let n=new Error("server error");n.code=t.data,this._onError(n);break;case"message":this.emitReserved("data",t.data),this.emitReserved("message",t.data);break}}onHandshake(t){this.emitReserved("handshake",t),this.id=t.sid,this.transport.query.sid=t.sid,this._pingInterval=t.pingInterval,this._pingTimeout=t.pingTimeout,this._maxPayload=t.maxPayload,this.onOpen(),this.readyState!=="closed"&&this._resetPingTimeout()}_resetPingTimeout(){this.clearTimeoutFn(this._pingTimeoutTimer);let t=this._pingInterval+this._pingTimeout;this._pingTimeoutTime=Date.now()+t,this._pingTimeoutTimer=this.setTimeoutFn(()=>{this._onClose("ping timeout")},t),this.opts.autoUnref&&this._pingTimeoutTimer.unref()}_onDrain(){this.writeBuffer.splice(0,this._prevBufferLen),this._prevBufferLen=0,this.writeBuffer.length===0?this.emitReserved("drain"):this.flush()}flush(){if(this.readyState!=="closed"&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){let t=this._getWritablePackets();this.transport.send(t),this._prevBufferLen=t.length,this.emitReserved("flush")}}_getWritablePackets(){if(!(this._maxPayload&&this.transport.name==="polling"&&this.writeBuffer.length>1))return this.writeBuffer;let n=1;for(let a=0;a<this.writeBuffer.length;a++){let i=this.writeBuffer[a].data;if(i&&(n+=SN(i)),a>0&&n>this._maxPayload)return this.writeBuffer.slice(0,a);n+=2}return this.writeBuffer}_hasPingExpired(){if(!this._pingTimeoutTime)return!0;let t=Date.now()>this._pingTimeoutTime;return t&&(this._pingTimeoutTime=0,ba(()=>{this._onClose("ping timeout")},this.setTimeoutFn)),t}write(t,n,a){return this._sendPacket("message",t,n,a),this}send(t,n,a){return this._sendPacket("message",t,n,a),this}_sendPacket(t,n,a,i){if(typeof n=="function"&&(i=n,n=void 0),typeof a=="function"&&(i=a,a=null),this.readyState==="closing"||this.readyState==="closed")return;a=a||{},a.compress=a.compress!==!1;let r={type:t,data:n,options:a};this.emitReserved("packetCreate",r),this.writeBuffer.push(r),i&&this.once("flush",i),this.flush()}close(){let t=()=>{this._onClose("forced close"),this.transport.close()},n=()=>{this.off("upgrade",n),this.off("upgradeError",n),t()},a=()=>{this.once("upgrade",n),this.once("upgradeError",n)};return(this.readyState==="opening"||this.readyState==="open")&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?a():t()}):this.upgrading?a():t()),this}_onError(t){if(e.priorWebsocketSuccess=!1,this.opts.tryAllTransports&&this.transports.length>1&&this.readyState==="opening")return this.transports.shift(),this._open();this.emitReserved("error",t),this._onClose("transport error",t)}_onClose(t,n){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing"){if(this.clearTimeoutFn(this._pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),Mm&&(this._beforeunloadEventListener&&removeEventListener("beforeunload",this._beforeunloadEventListener,!1),this._offlineEventListener)){let a=ac.indexOf(this._offlineEventListener);a!==-1&&ac.splice(a,1)}this.readyState="closed",this.id=null,this.emitReserved("close",t,n),this.writeBuffer=[],this._prevBufferLen=0}}};Ui.protocol=Tm;ic=class extends Ui{constructor(){super(...arguments),this._upgrades=[]}onOpen(){if(super.onOpen(),this.readyState==="open"&&this.opts.upgrade)for(let t=0;t<this._upgrades.length;t++)this._probe(this._upgrades[t])}_probe(t){let n=this.createTransport(t),a=!1;Ui.priorWebsocketSuccess=!1;let i=()=>{a||(n.send([{type:"ping",data:"probe"}]),n.once("packet",p=>{if(!a)if(p.type==="pong"&&p.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",n),!n)return;Ui.priorWebsocketSuccess=n.name==="websocket",this.transport.pause(()=>{a||this.readyState!=="closed"&&(c(),this.setTransport(n),n.send([{type:"upgrade"}]),this.emitReserved("upgrade",n),n=null,this.upgrading=!1,this.flush())})}else{let d=new Error("probe error");d.transport=n.name,this.emitReserved("upgradeError",d)}}))};function r(){a||(a=!0,c(),n.close(),n=null)}let l=p=>{let d=new Error("probe error: "+p);d.transport=n.name,r(),this.emitReserved("upgradeError",d)};function s(){l("transport closed")}function o(){l("socket closed")}function u(p){n&&p.name!==n.name&&r()}let c=()=>{n.removeListener("open",i),n.removeListener("error",l),n.removeListener("close",s),this.off("close",o),this.off("upgrading",u)};n.once("open",i),n.once("error",l),n.once("close",s),this.once("close",o),this.once("upgrading",u),this._upgrades.indexOf("webtransport")!==-1&&t!=="webtransport"?this.setTimeoutFn(()=>{a||n.open()},200):n.open()}onHandshake(t){this._upgrades=this._filterUpgrades(t.upgrades),super.onHandshake(t)}_filterUpgrades(t){let n=[];for(let a=0;a<t.length;a++)~this.transports.indexOf(t[a])&&n.push(t[a]);return n}},Ir=class extends ic{constructor(t,n={}){let a=typeof t=="object"?t:n;(!a.transports||a.transports&&typeof a.transports[0]=="string")&&(a.transports=(a.transports||["polling","websocket","webtransport"]).map(i=>Om[i]).filter(i=>!!i)),super(t,a)}}});var RN=b(()=>{Am()});var DU,rc=b(()=>{Um();Um();As();Lm();Mi();zm();zi();RN();tc();tc();nc();nc();Dm();DU=Ir.protocol});function _N(e,t="",n){let a=e;n=n||typeof location!="undefined"&&location,e==null&&(e=n.protocol+"//"+n.host),typeof e=="string"&&(e.charAt(0)==="/"&&(e.charAt(1)==="/"?e=n.protocol+e:e=n.host+e),/^(https?|wss?):\/\//.test(e)||(typeof n!="undefined"?e=n.protocol+"//"+e:e="https://"+e),a=Yr(e)),a.port||(/^(http|ws)$/.test(a.protocol)?a.port="80":/^(http|ws)s$/.test(a.protocol)&&(a.port="443")),a.path=a.path||"/";let r=a.host.indexOf(":")!==-1?"["+a.host+"]":a.host;return a.id=a.protocol+"://"+r+":"+a.port+t,a.href=a.protocol+"://"+r+(n&&n.port===a.port?"":":"+a.port),a}var DN=b(()=>{rc()});function _s(e){return FR&&(e instanceof ArrayBuffer||ZR(e))||JR&&e instanceof Blob||$R&&e instanceof File}function Rs(e,t){if(!e||typeof e!="object")return!1;if(Array.isArray(e)){for(let n=0,a=e.length;n<a;n++)if(Rs(e[n]))return!0;return!1}if(_s(e))return!0;if(e.toJSON&&typeof e.toJSON=="function"&&arguments.length===1)return Rs(e.toJSON(),!0);for(let n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&Rs(e[n]))return!0;return!1}var FR,ZR,ON,JR,$R,Bm=b(()=>{FR=typeof ArrayBuffer=="function",ZR=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e.buffer instanceof ArrayBuffer,ON=Object.prototype.toString,JR=typeof Blob=="function"||typeof Blob!="undefined"&&ON.call(Blob)==="[object BlobConstructor]",$R=typeof File=="function"||typeof File!="undefined"&&ON.call(File)==="[object FileConstructor]"});function LN(e){let t=[],n=e.data,a=e;return a.data=Vm(n,t),a.attachments=t.length,{packet:a,buffers:t}}function Vm(e,t){if(!e)return e;if(_s(e)){let n={_placeholder:!0,num:t.length};return t.push(e),n}else if(Array.isArray(e)){let n=new Array(e.length);for(let a=0;a<e.length;a++)n[a]=Vm(e[a],t);return n}else if(typeof e=="object"&&!(e instanceof Date)){let n={};for(let a in e)Object.prototype.hasOwnProperty.call(e,a)&&(n[a]=Vm(e[a],t));return n}return e}function zN(e,t){return e.data=Hm(e.data,t),delete e.attachments,e}function Hm(e,t){if(!e)return e;if(e&&e._placeholder===!0){if(typeof e.num=="number"&&e.num>=0&&e.num<t.length)return t[e.num];throw new Error("illegal attachments")}else if(Array.isArray(e))for(let n=0;n<e.length;n++)e[n]=Hm(e[n],t);else if(typeof e=="object")for(let n in e)Object.prototype.hasOwnProperty.call(e,n)&&(e[n]=Hm(e[n],t));return e}var MN=b(()=>{Bm()});var Ym={};oc(Ym,{Decoder:()=>qm,Encoder:()=>Pm,PacketType:()=>be,protocol:()=>BN});function UN(e){return Object.prototype.toString.call(e)==="[object Object]"}var KR,BN,be,Pm,qm,jm,lc=b(()=>{Li();MN();Bm();KR=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"],BN=5;(function(e){e[e.CONNECT=0]="CONNECT",e[e.DISCONNECT=1]="DISCONNECT",e[e.EVENT=2]="EVENT",e[e.ACK=3]="ACK",e[e.CONNECT_ERROR=4]="CONNECT_ERROR",e[e.BINARY_EVENT=5]="BINARY_EVENT",e[e.BINARY_ACK=6]="BINARY_ACK"})(be||(be={}));Pm=class{constructor(t){this.replacer=t}encode(t){return(t.type===be.EVENT||t.type===be.ACK)&&Rs(t)?this.encodeAsBinary({type:t.type===be.EVENT?be.BINARY_EVENT:be.BINARY_ACK,nsp:t.nsp,data:t.data,id:t.id}):[this.encodeAsString(t)]}encodeAsString(t){let n=""+t.type;return(t.type===be.BINARY_EVENT||t.type===be.BINARY_ACK)&&(n+=t.attachments+"-"),t.nsp&&t.nsp!=="/"&&(n+=t.nsp+","),t.id!=null&&(n+=t.id),t.data!=null&&(n+=JSON.stringify(t.data,this.replacer)),n}encodeAsBinary(t){let n=LN(t),a=this.encodeAsString(n.packet),i=n.buffers;return i.unshift(a),i}};qm=class e extends Ie{constructor(t){super(),this.reviver=t}add(t){let n;if(typeof t=="string"){if(this.reconstructor)throw new Error("got plaintext data when reconstructing a packet");n=this.decodeString(t);let a=n.type===be.BINARY_EVENT;a||n.type===be.BINARY_ACK?(n.type=a?be.EVENT:be.ACK,this.reconstructor=new jm(n),n.attachments===0&&super.emitReserved("decoded",n)):super.emitReserved("decoded",n)}else if(_s(t)||t.base64)if(this.reconstructor)n=this.reconstructor.takeBinaryData(t),n&&(this.reconstructor=null,super.emitReserved("decoded",n));else throw new Error("got binary data when not reconstructing a packet");else throw new Error("Unknown type: "+t)}decodeString(t){let n=0,a={type:Number(t.charAt(0))};if(be[a.type]===void 0)throw new Error("unknown packet type "+a.type);if(a.type===be.BINARY_EVENT||a.type===be.BINARY_ACK){let r=n+1;for(;t.charAt(++n)!=="-"&&n!=t.length;);let l=t.substring(r,n);if(l!=Number(l)||t.charAt(n)!=="-")throw new Error("Illegal attachments");a.attachments=Number(l)}if(t.charAt(n+1)==="/"){let r=n+1;for(;++n&&!(t.charAt(n)===","||n===t.length););a.nsp=t.substring(r,n)}else a.nsp="/";let i=t.charAt(n+1);if(i!==""&&Number(i)==i){let r=n+1;for(;++n;){let l=t.charAt(n);if(l==null||Number(l)!=l){--n;break}if(n===t.length)break}a.id=Number(t.substring(r,n+1))}if(t.charAt(++n)){let r=this.tryParse(t.substr(n));if(e.isPayloadValid(a.type,r))a.data=r;else throw new Error("invalid payload")}return a}tryParse(t){try{return JSON.parse(t,this.reviver)}catch(n){return!1}}static isPayloadValid(t,n){switch(t){case be.CONNECT:return UN(n);case be.DISCONNECT:return n===void 0;case be.CONNECT_ERROR:return typeof n=="string"||UN(n);case be.EVENT:case be.BINARY_EVENT:return Array.isArray(n)&&(typeof n[0]=="number"||typeof n[0]=="string"&&KR.indexOf(n[0])===-1);case be.ACK:case be.BINARY_ACK:return Array.isArray(n)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}},jm=class{constructor(t){this.packet=t,this.buffers=[],this.reconPack=t}takeBinaryData(t){if(this.buffers.push(t),this.buffers.length===this.reconPack.attachments){let n=zN(this.reconPack,this.buffers);return this.finishedReconstruction(),n}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}});function xn(e,t,n){return e.on(t,n),function(){e.off(t,n)}}var Im=b(()=>{});var WR,Gr,Gm=b(()=>{lc();Im();Li();WR=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1}),Gr=class extends Ie{constructor(t,n,a){super(),this.connected=!1,this.recovered=!1,this.receiveBuffer=[],this.sendBuffer=[],this._queue=[],this._queueSeq=0,this.ids=0,this.acks={},this.flags={},this.io=t,this.nsp=n,a&&a.auth&&(this.auth=a.auth),this._opts=Object.assign({},a),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;let t=this.io;this.subs=[xn(t,"open",this.onopen.bind(this)),xn(t,"packet",this.onpacket.bind(this)),xn(t,"error",this.onerror.bind(this)),xn(t,"close",this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected?this:(this.subEvents(),this.io._reconnecting||this.io.open(),this.io._readyState==="open"&&this.onopen(),this)}open(){return this.connect()}send(...t){return t.unshift("message"),this.emit.apply(this,t),this}emit(t,...n){var a,i,r;if(WR.hasOwnProperty(t))throw new Error('"'+t.toString()+'" is a reserved event name');if(n.unshift(t),this._opts.retries&&!this.flags.fromQueue&&!this.flags.volatile)return this._addToQueue(n),this;let l={type:be.EVENT,data:n};if(l.options={},l.options.compress=this.flags.compress!==!1,typeof n[n.length-1]=="function"){let c=this.ids++,p=n.pop();this._registerAckCallback(c,p),l.id=c}let s=(i=(a=this.io.engine)===null||a===void 0?void 0:a.transport)===null||i===void 0?void 0:i.writable,o=this.connected&&!(!((r=this.io.engine)===null||r===void 0)&&r._hasPingExpired());return this.flags.volatile&&!s||(o?(this.notifyOutgoingListeners(l),this.packet(l)):this.sendBuffer.push(l)),this.flags={},this}_registerAckCallback(t,n){var a;let i=(a=this.flags.timeout)!==null&&a!==void 0?a:this._opts.ackTimeout;if(i===void 0){this.acks[t]=n;return}let r=this.io.setTimeoutFn(()=>{delete this.acks[t];for(let s=0;s<this.sendBuffer.length;s++)this.sendBuffer[s].id===t&&this.sendBuffer.splice(s,1);n.call(this,new Error("operation has timed out"))},i),l=(...s)=>{this.io.clearTimeoutFn(r),n.apply(this,s)};l.withError=!0,this.acks[t]=l}emitWithAck(t,...n){return new Promise((a,i)=>{let r=(l,s)=>l?i(l):a(s);r.withError=!0,n.push(r),this.emit(t,...n)})}_addToQueue(t){let n;typeof t[t.length-1]=="function"&&(n=t.pop());let a={id:this._queueSeq++,tryCount:0,pending:!1,args:t,flags:Object.assign({fromQueue:!0},this.flags)};t.push((i,...r)=>a!==this._queue[0]?void 0:(i!==null?a.tryCount>this._opts.retries&&(this._queue.shift(),n&&n(i)):(this._queue.shift(),n&&n(null,...r)),a.pending=!1,this._drainQueue())),this._queue.push(a),this._drainQueue()}_drainQueue(t=!1){if(!this.connected||this._queue.length===0)return;let n=this._queue[0];n.pending&&!t||(n.pending=!0,n.tryCount++,this.flags=n.flags,this.emit.apply(this,n.args))}packet(t){t.nsp=this.nsp,this.io._packet(t)}onopen(){typeof this.auth=="function"?this.auth(t=>{this._sendConnectPacket(t)}):this._sendConnectPacket(this.auth)}_sendConnectPacket(t){this.packet({type:be.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},t):t})}onerror(t){this.connected||this.emitReserved("connect_error",t)}onclose(t,n){this.connected=!1,delete this.id,this.emitReserved("disconnect",t,n),this._clearAcks()}_clearAcks(){Object.keys(this.acks).forEach(t=>{if(!this.sendBuffer.some(a=>String(a.id)===t)){let a=this.acks[t];delete this.acks[t],a.withError&&a.call(this,new Error("socket has been disconnected"))}})}onpacket(t){if(t.nsp===this.nsp)switch(t.type){case be.CONNECT:t.data&&t.data.sid?this.onconnect(t.data.sid,t.data.pid):this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case be.EVENT:case be.BINARY_EVENT:this.onevent(t);break;case be.ACK:case be.BINARY_ACK:this.onack(t);break;case be.DISCONNECT:this.ondisconnect();break;case be.CONNECT_ERROR:this.destroy();let a=new Error(t.data.message);a.data=t.data.data,this.emitReserved("connect_error",a);break}}onevent(t){let n=t.data||[];t.id!=null&&n.push(this.ack(t.id)),this.connected?this.emitEvent(n):this.receiveBuffer.push(Object.freeze(n))}emitEvent(t){if(this._anyListeners&&this._anyListeners.length){let n=this._anyListeners.slice();for(let a of n)a.apply(this,t)}super.emit.apply(this,t),this._pid&&t.length&&typeof t[t.length-1]=="string"&&(this._lastOffset=t[t.length-1])}ack(t){let n=this,a=!1;return function(...i){a||(a=!0,n.packet({type:be.ACK,id:t,data:i}))}}onack(t){let n=this.acks[t.id];typeof n=="function"&&(delete this.acks[t.id],n.withError&&t.data.unshift(null),n.apply(this,t.data))}onconnect(t,n){this.id=t,this.recovered=n&&this._pid===n,this._pid=n,this.connected=!0,this.emitBuffered(),this.emitReserved("connect"),this._drainQueue(!0)}emitBuffered(){this.receiveBuffer.forEach(t=>this.emitEvent(t)),this.receiveBuffer=[],this.sendBuffer.forEach(t=>{this.notifyOutgoingListeners(t),this.packet(t)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(t=>t()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:be.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(t){return this.flags.compress=t,this}get volatile(){return this.flags.volatile=!0,this}timeout(t){return this.flags.timeout=t,this}onAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(t),this}prependAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(t),this}offAny(t){if(!this._anyListeners)return this;if(t){let n=this._anyListeners;for(let a=0;a<n.length;a++)if(t===n[a])return n.splice(a,1),this}else this._anyListeners=[];return this}listenersAny(){return this._anyListeners||[]}onAnyOutgoing(t){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.push(t),this}prependAnyOutgoing(t){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.unshift(t),this}offAnyOutgoing(t){if(!this._anyOutgoingListeners)return this;if(t){let n=this._anyOutgoingListeners;for(let a=0;a<n.length;a++)if(t===n[a])return n.splice(a,1),this}else this._anyOutgoingListeners=[];return this}listenersAnyOutgoing(){return this._anyOutgoingListeners||[]}notifyOutgoingListeners(t){if(this._anyOutgoingListeners&&this._anyOutgoingListeners.length){let n=this._anyOutgoingListeners.slice();for(let a of n)a.apply(this,t.data)}}}});function Bi(e){e=e||{},this.ms=e.min||100,this.max=e.max||1e4,this.factor=e.factor||2,this.jitter=e.jitter>0&&e.jitter<=1?e.jitter:0,this.attempts=0}var VN=b(()=>{Bi.prototype.duration=function(){var e=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var t=Math.random(),n=Math.floor(t*this.jitter*e);e=(Math.floor(t*10)&1)==0?e-n:e+n}return Math.min(e,this.max)|0};Bi.prototype.reset=function(){this.attempts=0};Bi.prototype.setMin=function(e){this.ms=e};Bi.prototype.setMax=function(e){this.max=e};Bi.prototype.setJitter=function(e){this.jitter=e}});var Xr,HN=b(()=>{rc();Gm();lc();Im();VN();Li();Xr=class extends Ie{constructor(t,n){var a;super(),this.nsps={},this.subs=[],t&&typeof t=="object"&&(n=t,t=void 0),n=n||{},n.path=n.path||"/socket.io",this.opts=n,Sa(this,n),this.reconnection(n.reconnection!==!1),this.reconnectionAttempts(n.reconnectionAttempts||1/0),this.reconnectionDelay(n.reconnectionDelay||1e3),this.reconnectionDelayMax(n.reconnectionDelayMax||5e3),this.randomizationFactor((a=n.randomizationFactor)!==null&&a!==void 0?a:.5),this.backoff=new Bi({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(n.timeout==null?2e4:n.timeout),this._readyState="closed",this.uri=t;let i=n.parser||Ym;this.encoder=new i.Encoder,this.decoder=new i.Decoder,this._autoConnect=n.autoConnect!==!1,this._autoConnect&&this.open()}reconnection(t){return arguments.length?(this._reconnection=!!t,t||(this.skipReconnect=!0),this):this._reconnection}reconnectionAttempts(t){return t===void 0?this._reconnectionAttempts:(this._reconnectionAttempts=t,this)}reconnectionDelay(t){var n;return t===void 0?this._reconnectionDelay:(this._reconnectionDelay=t,(n=this.backoff)===null||n===void 0||n.setMin(t),this)}randomizationFactor(t){var n;return t===void 0?this._randomizationFactor:(this._randomizationFactor=t,(n=this.backoff)===null||n===void 0||n.setJitter(t),this)}reconnectionDelayMax(t){var n;return t===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=t,(n=this.backoff)===null||n===void 0||n.setMax(t),this)}timeout(t){return arguments.length?(this._timeout=t,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()}open(t){if(~this._readyState.indexOf("open"))return this;this.engine=new Ir(this.uri,this.opts);let n=this.engine,a=this;this._readyState="opening",this.skipReconnect=!1;let i=xn(n,"open",function(){a.onopen(),t&&t()}),r=s=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",s),t?t(s):this.maybeReconnectOnOpen()},l=xn(n,"error",r);if(this._timeout!==!1){let s=this._timeout,o=this.setTimeoutFn(()=>{i(),r(new Error("timeout")),n.close()},s);this.opts.autoUnref&&o.unref(),this.subs.push(()=>{this.clearTimeoutFn(o)})}return this.subs.push(i),this.subs.push(l),this}connect(t){return this.open(t)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");let t=this.engine;this.subs.push(xn(t,"ping",this.onping.bind(this)),xn(t,"data",this.ondata.bind(this)),xn(t,"error",this.onerror.bind(this)),xn(t,"close",this.onclose.bind(this)),xn(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(t){try{this.decoder.add(t)}catch(n){this.onclose("parse error",n)}}ondecoded(t){ba(()=>{this.emitReserved("packet",t)},this.setTimeoutFn)}onerror(t){this.emitReserved("error",t)}socket(t,n){let a=this.nsps[t];return a?this._autoConnect&&!a.active&&a.connect():(a=new Gr(this,t,n),this.nsps[t]=a),a}_destroy(t){let n=Object.keys(this.nsps);for(let a of n)if(this.nsps[a].active)return;this._close()}_packet(t){let n=this.encoder.encode(t);for(let a=0;a<n.length;a++)this.engine.write(n[a],t.options)}cleanup(){this.subs.forEach(t=>t()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close")}disconnect(){return this._close()}onclose(t,n){var a;this.cleanup(),(a=this.engine)===null||a===void 0||a.close(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",t,n),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;let t=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{let n=this.backoff.duration();this._reconnecting=!0;let a=this.setTimeoutFn(()=>{t.skipReconnect||(this.emitReserved("reconnect_attempt",t.backoff.attempts),!t.skipReconnect&&t.open(i=>{i?(t._reconnecting=!1,t.reconnect(),this.emitReserved("reconnect_error",i)):t.onreconnect()}))},n);this.opts.autoUnref&&a.unref(),this.subs.push(()=>{this.clearTimeoutFn(a)})}}onreconnect(){let t=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",t)}}});function Os(e,t){typeof e=="object"&&(t=e,e=void 0),t=t||{};let n=_N(e,t.path||"/socket.io"),a=n.source,i=n.id,r=n.path,l=Ds[i]&&r in Ds[i].nsps,s=t.forceNew||t["force new connection"]||t.multiplex===!1||l,o;return s?o=new Xr(a,t):(Ds[i]||(Ds[i]=new Xr(a,t)),o=Ds[i]),n.query&&!t.query&&(t.query=n.queryKey),o.socket(n.path,t)}var Ds,PN=b(()=>{DN();HN();Gm();lc();rc();Ds={};Object.assign(Os,{Manager:Xr,Socket:Gr,io:Os,connect:Os})});var rn,ge,Xm,qN=b(()=>{"use strict";rn=F(Je());PN();an();ge=F(re()),Xm=({apiKey:e,agentId:t,sandboxId:n})=>{let[a,i]=(0,rn.useState)([]),[r,l]=(0,rn.useState)(!1),[s,o]=(0,rn.useState)(new Set),[u,c]=(0,rn.useState)(!0),[p,d]=(0,rn.useState)(!1),f=(0,rn.useRef)(null),S=(0,rn.useRef)(null),x=(0,rn.useRef)(null),k=()=>{var g;(g=f.current)==null||g.scrollIntoView({behavior:"smooth"})},m=g=>{o(E=>{let T=new Set(E);return T.has(g)?T.delete(g):T.add(g),T})},h=()=>z(null,null,function*(){try{console.log("Clearing logs from all sandbox skills with API key:",e,"agentId:",t),d(!0);let g=yield ie.getAllSkillOverrides();if(g.length===0){console.log("No skills found to clear logs from"),i([]),o(new Set);return}let E=g.map(A=>z(null,null,function*(){try{return yield ie.clearSandboxLogs(e,t,A.sandboxId)}catch(C){return console.error(`Error clearing logs for skill ${A.skillId}:`,C),{success:!1,error:"Failed to clear logs"}}}));(yield Promise.all(E)).every(A=>A.success)?(i([]),o(new Set),console.log("All logs cleared successfully")):(console.error("Some log clearing operations failed"),alert("Some logs could not be cleared. Check console for details."))}catch(g){console.error("Failed to clear logs:",g),alert("Failed to clear logs")}finally{d(!1)}});return(0,rn.useEffect)(()=>{k()},[a]),(0,rn.useEffect)(()=>{e&&t&&z(null,null,function*(){try{console.log("Loading logs from all sandbox skills with API key:",e,"agentId:",t),c(!0);let E=yield ie.loadAllSandboxLogs(e,t,100);if(console.log("All sandbox logs response:",E),E.success&&E.data){let T=E.data.logs.map(N=>({_id:N._id,id:N.id,timestamp:new Date(N.timestamp).toLocaleTimeString(),type:N.type,subType:N.subType,message:N.message,duration:N.duration,error:N.error,metadata:N.metadata,skillName:N.skillName,sandboxId:N.sandboxId}));console.log("Converted logs from all skills:",T),i(T)}else console.log("No logs or error:",E.error)}catch(E){console.error("Failed to load logs from all skills:",E)}finally{c(!1)}})},[e,t]),(0,rn.useEffect)(()=>{let g=()=>{try{let N=new WebSocket("ws://localhost:3000");S.current=N,N.onopen=()=>{console.log("Connected to CLI dev server"),l(!0)},N.onclose=()=>{console.log("Disconnected from CLI dev server")},N.onmessage=A=>{try{let C=JSON.parse(A.data);if(console.log("Received message from CLI:",C),C.type==="log"){let U={id:C.id||Date.now().toString(),timestamp:new Date(C.timestamp||Date.now()).toLocaleTimeString(),type:C.type||"log",subType:C.subType||"info",message:C.message||"No message",metadata:C.metadata||{},error:C.error};i(P=>[...P,U])}}catch(C){console.error("Failed to parse CLI WebSocket message:",C)}},N.onerror=A=>{console.error("CLI WebSocket error:",A)}}catch(N){console.error("Failed to connect to CLI dev server:",N)}},E=()=>{try{let N=Os("wss://api.lua.dev/feed",{query:{apiKey:e,channel:"logs"}});x.current=N,N.on("connect",()=>{console.log("Connected to server log feed"),l(!0),T("\u{1F7E2} Connected to log feed","connected")}),N.on("disconnect",()=>{console.log("Disconnected from server log feed"),l(!1),T("\u{1F534} Disconnected from log feed","disconnected")}),N.on("log",A=>{let C="info",U="No message",P={},_="";if(A&&typeof A=="object"){let O=A.data||A;C=O.subType||"info",U=O.message||"No message",P=O.metadata||{},_=O.error||O.details||"",_&&typeof _=="object"&&(_=JSON.stringify(_,null,2))}else typeof A=="string"&&(U=A,C="info");let R={id:Date.now().toString(),timestamp:new Date().toLocaleTimeString(),type:"log",subType:C,message:U,metadata:P,error:_};i(O=>[...O,R])}),N.on("connect_error",A=>{T("\u{1F534} Connection failed","disconnected")})}catch(N){T("\u{1F534} Connection error","disconnected")}},T=(N,A)=>{let C=document.getElementById("logConnectionStatus");C&&(C.textContent=N,C.className=`log-connection-status ${A}`)};return g(),e&&t&&n&&E(),()=>{S.current&&S.current.close(),x.current&&x.current.disconnect()}},[e,t,n]),(0,ge.jsxs)("div",{className:"log-messages",children:[(0,ge.jsxs)("div",{className:"logs-header",children:[(0,ge.jsxs)("div",{className:"logs-title",children:["Console Logs (",a.length,")"]}),(0,ge.jsx)("div",{className:"logs-actions",children:(0,ge.jsx)("button",{className:"clear-logs-button",onClick:h,disabled:p,title:"Clear all logs",children:p?"\u27F3":"\u{1F5D1}\uFE0F"})})]}),(0,ge.jsxs)("div",{className:"log-content",children:[u?(0,ge.jsx)("div",{className:"no-logs",children:(0,ge.jsx)("img",{src:"https://admin.lua.dev/images/logo.svg",alt:"Loading",className:"loading-logo"})}):a.length===0?(0,ge.jsxs)("div",{className:"no-logs",children:[(0,ge.jsx)("div",{className:"no-logs-icon",children:"\u{1F4CB}"}),(0,ge.jsx)("div",{className:"no-logs-text",children:"No logs yet"}),(0,ge.jsx)("div",{className:"no-logs-subtext",children:"Console logs will appear here when your skill runs"})]}):(0,ge.jsx)(ge.Fragment,{children:a.map(g=>{let E=s.has(g.id),T=g.metadata&&Object.keys(g.metadata).length>0,N=g.error&&typeof g.error=="string"&&g.error.trim()!=="",A=T||N;return(0,ge.jsxs)("div",{className:`log-entry ${g.subType}`,children:[(0,ge.jsxs)("div",{className:"log-main",onClick:()=>m(g.id),children:[(0,ge.jsxs)("span",{className:"log-timestamp",children:["[",g.timestamp,"]"]}),(0,ge.jsxs)("span",{className:"log-type",children:["[",g.subType.toUpperCase(),"]"]}),g.skillName&&(0,ge.jsxs)("span",{className:"log-skill",children:["[",g.skillName,"]"]}),(0,ge.jsx)("span",{className:`log-message ${E?"expanded":"ellipsed"}`,children:g.message}),(0,ge.jsx)("span",{className:`expand-arrow ${E?"expanded":""}`,children:"\u25B6"})]}),E&&(0,ge.jsxs)("div",{className:"log-details",children:[(0,ge.jsxs)("div",{className:"full-message",children:[(0,ge.jsx)("div",{className:"detail-label",children:"Message:"}),(0,ge.jsx)("div",{className:"detail-content",children:g.message})]}),N&&(0,ge.jsxs)("div",{className:"error-details",children:[(0,ge.jsx)("div",{className:"detail-label",children:"Error:"}),(0,ge.jsx)("div",{className:"detail-content",children:typeof g.error=="string"?g.error:JSON.stringify(g.error)})]}),T&&(0,ge.jsxs)("div",{className:"metadata",children:[(0,ge.jsx)("div",{className:"detail-label",children:"Metadata:"}),Object.entries(g.metadata).map(([C,U])=>(0,ge.jsxs)("div",{className:"metadata-item",children:[(0,ge.jsxs)("span",{className:"metadata-key",children:[C,":"]}),(0,ge.jsx)("span",{className:"metadata-value",children:String(U)})]},C))]})]})]},g.id)})}),(0,ge.jsx)("div",{ref:f})]}),(0,ge.jsx)("div",{className:"log-footer-status",children:(0,ge.jsx)("div",{id:"logConnectionStatus",className:"log-connection-status",children:"\u{1F7E1} Connecting..."})})]})}});var jN=b(()=>{});var YN,IN,GN=b(()=>{"use strict";YN=F(Je());an();jN();IN=F(re())});var XN=b(()=>{"use strict";eN();tN();qN();hm();bm();xm();GN();vm()});var Nn,Un,QN,FN=b(()=>{"use strict";Nn=F(Je());XN();an();Un=F(re()),QN=({apiKey:e,agentId:t,skillId:n,sandboxId:a,sharedChatMessages:i,onSharedSendMessage:r,onSharedClearHistory:l,isChatLoading:s,setIsChatLoading:o})=>{let[u,c]=(0,Nn.useState)("persona"),[p,d]=(0,Nn.useState)(""),[f,S]=(0,Nn.useState)(window.innerWidth/2),[x,k]=(0,Nn.useState)(250),m=(0,Nn.useRef)(!1),h=(0,Nn.useRef)(!1),g=(0,Nn.useRef)(null),E=(0,Nn.useRef)(null);(0,Nn.useEffect)(()=>{T()},[]),(0,Nn.useEffect)(()=>{let A=P=>{var R,O;let _=P.target;_===g.current||(R=g.current)!=null&&R.contains(_)?(m.current=!0,document.body.style.cursor="col-resize",document.body.style.userSelect="none",P.preventDefault()):(_===E.current||(O=E.current)!=null&&O.contains(_))&&(h.current=!0,document.body.style.cursor="row-resize",document.body.style.userSelect="none",P.preventDefault())},C=P=>{if(m.current){let _=window.innerWidth,R=_-P.clientX,O=500,I=_-300;R>=O&&R<=I&&S(R)}else if(h.current){let _=window.innerHeight-60,R=_-P.clientY+60,O=150,I=_-300;R>=O&&R<=I&&k(R)}},U=()=>{m.current?(m.current=!1,document.body.style.cursor="",document.body.style.userSelect=""):h.current&&(h.current=!1,document.body.style.cursor="",document.body.style.userSelect="")};return document.addEventListener("mousedown",A),document.addEventListener("mousemove",C),document.addEventListener("mouseup",U),()=>{document.removeEventListener("mousedown",A),document.removeEventListener("mousemove",C),document.removeEventListener("mouseup",U)}},[]);let T=()=>z(null,null,function*(){try{let A=yield ie.loadPersona();A.success&&d(A.persona||"")}catch(A){console.error("Failed to load persona:",A)}}),N=A=>z(null,null,function*(){try{let C=yield ie.savePersona(A);return C.success?(d(A),!0):(alert("Failed to save persona: "+(C.error||"Unknown error")),!1)}catch(C){return console.error("Failed to save persona:",C),alert("Failed to save persona"),!1}});return(0,Un.jsxs)("div",{className:"sandbox-page",children:[(0,Un.jsxs)("div",{className:"left-side",style:{width:`calc(100% - ${f}px)`},children:[(0,Un.jsx)("div",{className:"chat-container",style:{height:`calc(100% - ${x}px)`},children:(0,Un.jsx)(pm,{apiKey:e,agentId:t,skillId:n,sandboxId:a,persona:p,sharedChatMessages:i,onSharedSendMessage:r,onSharedClearHistory:l,isChatLoading:s,setIsChatLoading:o})}),(0,Un.jsx)("div",{ref:E,className:"logs-resize-handle",children:(0,Un.jsx)("div",{className:"resize-line"})}),(0,Un.jsx)("div",{className:"logs-container",style:{height:`${x}px`},children:(0,Un.jsx)(Xm,{apiKey:e,agentId:t,sandboxId:a})})]}),(0,Un.jsx)("div",{ref:g,className:"resize-handle"}),(0,Un.jsx)(Nm,{activeTab:u,onTabChange:c,persona:p,onSavePersona:N,apiKey:e,agentId:t,skillId:n,sandboxId:a,width:f})]})}});var ZN,qt,Qm,JN=b(()=>{"use strict";ZN=F(Je());fm();qt=F(re()),Qm=({messages:e,onSendMessage:t,onClearHistory:n,isLoading:a})=>{let[i,r]=(0,ZN.useState)(""),l=e.length>0?e:[{id:"welcome",text:"Welcome to Production Management! I can help you monitor deployments, analyze performance, and manage your live environment. How can I assist you today?",sender:"assistant",timestamp:new Date}],s=()=>{!i.trim()||a||(t(i),r(""))},o=u=>{u.key==="Enter"&&!u.shiftKey&&(u.preventDefault(),s())};return(0,qt.jsxs)("div",{className:"production-chat",children:[(0,qt.jsxs)("div",{className:"chat-header",children:[(0,qt.jsx)("h3",{children:"Production Chat"}),(0,qt.jsx)("button",{onClick:n,className:"clear-history-button",title:"Clear chat history",children:"\u{1F5D1}\uFE0F"})]}),(0,qt.jsxs)("div",{className:"chat-messages",children:[l.map(u=>(0,qt.jsx)("div",{className:`message ${u.sender}`,children:(0,qt.jsx)("div",{className:"message-bubble",children:(0,qt.jsx)(Ss,{children:u.text})})},u.id)),a&&(0,qt.jsx)("div",{className:"loading",children:(0,qt.jsx)("img",{src:"https://admin.lua.dev/images/logo.svg",alt:"Loading",className:"loading-logo"})})]}),(0,qt.jsx)("div",{className:"chat-input-container",children:(0,qt.jsxs)("div",{className:"chat-input-form",children:[(0,qt.jsx)("input",{type:"text",id:"production-chat-input",name:"productionChatMessage",value:i,onChange:u=>r(u.target.value),onKeyPress:o,placeholder:"Type your message...",className:"chat-input",disabled:a,autoComplete:"off"}),(0,qt.jsx)("button",{onClick:s,disabled:a||!i.trim(),className:"send-button",children:"Send"})]})})]})}});var e_,$N,KN=b(()=>{"use strict";e_=F(Je()),$N=F(re())});var t_,WN,Fm=b(()=>{"use strict";t_=F(Je()),WN=F(re())});var a_,eE,tE=b(()=>{"use strict";a_=F(Je());Fm();eE=F(re())});var ln,te,Zm,nE=b(()=>{"use strict";ln=F(Je());an();te=F(re()),Zm=({apiKey:e,agentId:t})=>{let[n,a]=(0,ln.useState)([]),[i,r]=(0,ln.useState)(!0),[l,s]=(0,ln.useState)(new Set),[o,u]=(0,ln.useState)(1),[c,p]=(0,ln.useState)(1),[d,f]=(0,ln.useState)(0),[S,x]=(0,ln.useState)(!1),[k,m]=(0,ln.useState)(!1),h=(0,ln.useRef)(null),g=()=>{var _;(_=h.current)==null||_.scrollIntoView({behavior:"smooth"})},E=_=>{s(R=>{let O=new Set(R);return O.has(_)?O.delete(_):O.add(_),O})},T=(_=1)=>z(null,null,function*(){r(!0);try{console.log("Loading production logs for page:",_);let R=yield ie.loadProductionLogs(e,t,_,20);if(R.success&&R.logs){let O=[...R.logs].reverse();a(O),R.pagination&&(u(R.pagination.currentPage),p(R.pagination.totalPages),f(R.pagination.totalCount),x(R.pagination.hasNextPage),m(R.pagination.hasPrevPage))}else console.error("Failed to load production logs:",R.error),a([])}catch(R){console.error("Error loading production logs:",R),a([])}finally{r(!1)}}),N=()=>{T(o)},A=_=>{_>=1&&_<=c&&(u(_),T(_))},C=()=>{S&&A(o+1)},U=()=>{k&&A(o-1)};(0,ln.useEffect)(()=>{e&&t&&T(1)},[e,t]),(0,ln.useEffect)(()=>{g()},[n]);let P=_=>new Date(_).toLocaleString("en-US",{month:"short",day:"numeric",hour:"2-digit",minute:"2-digit",second:"2-digit",hour12:!1});return i&&n.length===0?(0,te.jsx)("div",{className:"logs-panel",children:(0,te.jsx)("div",{className:"logs-loading",children:(0,te.jsx)("img",{src:"https://admin.lua.dev/images/logo.svg",alt:"Loading",className:"loading-logo"})})}):(0,te.jsxs)("div",{className:"logs-panel",children:[(0,te.jsxs)("div",{className:"logs-header",children:[(0,te.jsxs)("div",{className:"logs-header-content",children:[(0,te.jsx)("h3",{children:"Production Logs"}),(0,te.jsx)("div",{className:"logs-info",children:d>0&&(0,te.jsxs)("span",{className:"logs-count",children:[d," total logs"]})})]}),(0,te.jsx)("div",{className:"logs-actions",children:(0,te.jsx)("button",{className:"refresh-logs-button",onClick:N,disabled:i,title:"Refresh logs",children:i?(0,te.jsx)("img",{src:"https://admin.lua.dev/images/logo.svg",alt:"Loading",className:"loading-logo-button"}):"\u21BB"})})]}),(0,te.jsx)("div",{className:"logs-content",children:n.length===0?(0,te.jsxs)("div",{className:"no-logs",children:[(0,te.jsx)("div",{className:"no-logs-icon",children:"\u{1F4DD}"}),(0,te.jsx)("div",{className:"no-logs-text",children:"No logs found"}),(0,te.jsx)("div",{className:"no-logs-subtext",children:"Production logs will appear here when your skills are used"})]}):(0,te.jsxs)("div",{className:"logs-list",children:[n.map(_=>{var I,B,J,ae;let R=l.has(_.id),O=_.metadata&&(_.metadata.toolId||_.metadata.skillName);return(0,te.jsxs)("div",{className:`log-entry ${_.subType} ${R?"expanded":""}`,children:[(0,te.jsxs)("div",{className:"log-main",onClick:()=>O&&E(_.id),style:{cursor:O?"pointer":"default"},children:[(0,te.jsx)("span",{className:"log-timestamp",children:P(_.timestamp)}),(0,te.jsx)("span",{className:`log-level ${_.subType}`,children:_.subType.toUpperCase()}),(0,te.jsx)("span",{className:"log-message",children:_.message}),((I=_.metadata)==null?void 0:I.skillName)&&(0,te.jsx)("span",{className:"log-skill",children:_.metadata.skillName}),O&&(0,te.jsx)("span",{className:`expand-arrow ${R?"expanded":""}`,children:"\u25B6"})]}),R&&O&&(0,te.jsxs)("div",{className:"log-details",children:[((B=_.metadata)==null?void 0:B.toolId)&&(0,te.jsxs)("div",{className:"metadata-item",children:[(0,te.jsx)("span",{className:"metadata-key",children:"Tool:"}),(0,te.jsx)("span",{className:"metadata-value",children:_.metadata.toolId})]}),((J=_.metadata)==null?void 0:J.skillName)&&(0,te.jsxs)("div",{className:"metadata-item",children:[(0,te.jsx)("span",{className:"metadata-key",children:"Skill:"}),(0,te.jsx)("span",{className:"metadata-value",children:_.metadata.skillName})]}),((ae=_.metadata)==null?void 0:ae.userId)&&(0,te.jsxs)("div",{className:"metadata-item",children:[(0,te.jsx)("span",{className:"metadata-key",children:"User:"}),(0,te.jsx)("span",{className:"metadata-value",children:_.metadata.userId})]})]})]},_.id)}),(0,te.jsx)("div",{ref:h})]})}),c>1&&(0,te.jsxs)("div",{className:"logs-pagination",children:[(0,te.jsxs)("div",{className:"pagination-info",children:["Page ",o," of ",c]}),(0,te.jsxs)("div",{className:"pagination-controls",children:[(0,te.jsx)("button",{className:"pagination-button",onClick:U,disabled:!k||i,title:"Previous page",children:"\u2190"}),(0,te.jsxs)("span",{className:"page-numbers",children:[o>2&&(0,te.jsxs)(te.Fragment,{children:[(0,te.jsx)("button",{className:"page-number",onClick:()=>A(1),disabled:i,children:"1"}),o>3&&(0,te.jsx)("span",{className:"page-ellipsis",children:"..."})]}),o>1&&(0,te.jsx)("button",{className:"page-number",onClick:()=>A(o-1),disabled:i,children:o-1}),(0,te.jsx)("button",{className:"page-number active",disabled:!0,children:o}),o<c&&(0,te.jsx)("button",{className:"page-number",onClick:()=>A(o+1),disabled:i,children:o+1}),o<c-1&&(0,te.jsxs)(te.Fragment,{children:[o<c-2&&(0,te.jsx)("span",{className:"page-ellipsis",children:"..."}),(0,te.jsx)("button",{className:"page-number",onClick:()=>A(c),disabled:i,children:c})]})]}),(0,te.jsx)("button",{className:"pagination-button",onClick:C,disabled:!S||i,title:"Next page",children:"\u2192"})]})]})]})}});var ze,H,Jm,i_,$m,r_,aE=b(()=>{"use strict";ze=F(Je());an();H=F(re()),Jm=e=>{if(!e||!e.trim())return e||"";try{let t=JSON.parse(e);return JSON.stringify(t,null,2).replace(/("(\\u[a-zA-Z0-9]{4}|\\[^u]|[^\\"])*"(\s*:)?|\b(true|false|null)\b|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?)/g,a=>{let i="json-number";return/^"/.test(a)?/:$/.test(a)?i="json-key":i="json-string":/true|false/.test(a)?i="json-boolean":/null/.test(a)&&(i="json-null"),`<span class="${i}">${a}</span>`})}catch(t){return e.replace(/("(\\u[a-zA-Z0-9]{4}|\\[^u]|[^\\"])*"(\s*:)?|\b(true|false|null)\b|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?)/g,n=>{let a="json-number";return/^"/.test(n)?/:$/.test(n)?a="json-key":a="json-string":/true|false/.test(n)?a="json-boolean":/null/.test(n)&&(a="json-null"),`<span class="${a}">${n}</span>`})}},i_=[{id:"user",name:"User",description:"User profile and account data",icon:"\u{1F464}"},{id:"resources",name:"Resources",description:"Files, documents, and assets",icon:"\u{1F4C1}"},{id:"products",name:"Products",description:"Product catalog and inventory",icon:"\u{1F4E6}"},{id:"baskets",name:"Baskets",description:"Shopping carts and baskets",icon:"\u{1F6D2}"},{id:"orders",name:"Orders",description:"Order history and transactions",icon:"\u{1F4CB}"},{id:"booking",name:"Booking",description:"Reservations and appointments",icon:"\u{1F4C5}"},{id:"custom",name:"Custom",description:"Custom application data",icon:"\u2699\uFE0F"}],$m=({apiKey:e,agentId:t})=>{let[n,a]=(0,ze.useState)(null),[i,r]=(0,ze.useState)(null),[l,s]=(0,ze.useState)(null),[o,u]=(0,ze.useState)(!1),[c,p]=(0,ze.useState)(!1),[d,f]=(0,ze.useState)(!1),[S,x]=(0,ze.useState)(""),[k,m]=(0,ze.useState)(null),[h,g]=(0,ze.useState)(null),[E,T]=(0,ze.useState)(!1),[N,A]=(0,ze.useState)("list"),C=(0,ze.useRef)(null),U=(0,ze.useRef)(null),[P,_]=(0,ze.useState)(!1),[R,O]=(0,ze.useState)(""),[I,B]=(0,ze.useState)(""),[J,ae]=(0,ze.useState)(!1);(0,ze.useEffect)(()=>{we()},[e,t]),(0,ze.useEffect)(()=>{if(console.log("JSON text changed:",S),U.current&&C.current){let X=Jm(S);U.current.innerHTML=X,U.current.scrollTop=C.current.scrollTop,U.current.scrollLeft=C.current.scrollLeft}},[S]),(0,ze.useEffect)(()=>{if(k||h){let X=setTimeout(()=>{m(null),g(null)},5e3);return()=>clearTimeout(X)}},[k,h]);let we=()=>z(null,null,function*(){u(!0);try{let X=yield ie.loadUserData(e,t);console.log("User data response:",X),X.success&&X.data?(console.log("User data loaded successfully:",X.data),a(X.data),x(JSON.stringify(X.data,null,2))):(console.error("Failed to load user data:",X.error),a(null),x("{}"))}catch(X){console.error("Error loading user data:",X),a(null),x("{}")}finally{u(!1)}}),je=()=>z(null,null,function*(){if(S.trim()){p(!0);try{let X;try{X=JSON.parse(S)}catch(ne){m("Invalid JSON format. Please check your syntax.");return}let Q=yield ie.updateUserData(e,t,X);Q.success?(a(Q.data||null),T(!1),g("User data saved successfully"),console.log("User data saved successfully")):m("Failed to save user data: "+(Q.error||"Unknown error"))}catch(X){console.error("Error saving user data:",X),m("Failed to save user data")}finally{p(!1)}}}),v=()=>z(null,null,function*(){f(!0);try{let X=yield ie.clearUserData(e,t);X.success?(a(null),x("{}"),T(!1),g("User data cleared successfully"),console.log("User data cleared successfully")):m("Failed to clear user data: "+(X.error||"Unknown error"))}catch(X){console.error("Error clearing user data:",X),m("Failed to clear user data")}finally{f(!1)}}),Me=X=>z(null,null,function*(){if(r(X),A("detail"),T(!1),m(null),X.id==="user"){u(!0);try{let Q=yield ie.loadUserData(e,t);if(Q.success&&Q.data){s(Q.data);let ne=JSON.stringify(Q.data,null,2);x(ne),console.log("Setting JSON text for user data:",ne)}else s(null),x("{}"),console.log("No user data found, setting empty JSON")}catch(Q){console.error("Failed to load user data:",Q),s(null),x("{}")}finally{u(!1)}}else if(X.id==="resources"){u(!0);try{let Q=yield ie.loadResources(e,t);Q.success&&Q.data?(s(Q.data),console.log("Loaded resources:",Q.data)):(s([]),console.log("No resources found"))}catch(Q){console.error("Failed to load resources:",Q),s([])}finally{u(!1)}}else s(null),x("{}")}),pt=()=>{A("list"),r(null),s(null),T(!1)},y=()=>{(i==null?void 0:i.id)==="resources"?(_(!0),O(""),B("")):(x("{}"),T(!0))},Ke=()=>z(null,null,function*(){if(!R.trim()||!I.trim()){m("Please provide both name and content for the resource");return}ae(!0);try{let X=yield ie.createResource(e,t,{name:R.trim(),content:I.trim()});X.success?(_(!1),O(""),B(""),g("Resource created successfully"),(i==null?void 0:i.id)==="resources"&&(yield Me(i))):m("Failed to create resource: "+(X.error||"Unknown error"))}catch(X){console.error("Error creating resource:",X),m("Failed to create resource")}finally{ae(!1)}}),At=X=>{x(X),C.current&&U.current&&(U.current.scrollTop=C.current.scrollTop,U.current.scrollLeft=C.current.scrollLeft)},se=()=>{T(!0),setTimeout(()=>{C.current&&C.current.focus()},0)};return o&&N==="list"?(0,H.jsx)("div",{className:"user-data-panel",children:(0,H.jsx)("div",{className:"user-data-loading",children:(0,H.jsx)("img",{src:"https://admin.lua.dev/images/logo.svg",alt:"Loading",className:"loading-logo"})})}):(0,H.jsxs)("div",{className:"user-data-panel",children:[(0,H.jsxs)("div",{className:"user-data-header",children:[N==="detail"&&i?(0,H.jsxs)("div",{className:"header-with-back",children:[(0,H.jsx)("button",{className:"back-button",onClick:pt,title:"Back to Data",children:"\u2190"}),(0,H.jsxs)("h3",{children:[i.name," Data"]})]}):(0,H.jsx)("h3",{children:"Data Management"}),(0,H.jsxs)("div",{className:"user-data-actions",children:[N==="detail"&&(i==null?void 0:i.id)!=="user"&&(0,H.jsx)("button",{className:"add-button",onClick:y,title:`Add new ${i==null?void 0:i.name.toLowerCase()}`,children:"\u2795"}),(0,H.jsx)("button",{className:"refresh-button",onClick:N==="detail"&&i?()=>Me(i):we,disabled:o,title:`Refresh ${N==="detail"?i==null?void 0:i.name.toLowerCase():"data"}`,children:o?"\u27F3":"\u21BB"}),N==="detail"&&(i==null?void 0:i.id)==="user"&&(0,H.jsx)("button",{className:"save-button",onClick:je,disabled:c,title:"Save user data",children:c?"\u27F3":"\u{1F4BE}"}),N==="detail"&&(0,H.jsx)("button",{className:"delete-button",onClick:v,disabled:c,title:`Clear ${i==null?void 0:i.name.toLowerCase()} data`,children:"\u{1F5D1}\uFE0F"})]})]}),(0,H.jsx)("div",{className:"user-data-content",children:N==="list"?(0,H.jsx)("div",{className:"data-list",children:(0,H.jsx)("div",{className:"data-categories",children:i_.map(X=>(0,H.jsxs)("div",{className:"data-category",onClick:()=>Me(X),children:[(0,H.jsx)("div",{className:"category-icon",children:X.icon}),(0,H.jsxs)("div",{className:"category-info",children:[(0,H.jsx)("div",{className:"category-name",children:X.name}),(0,H.jsx)("div",{className:"category-description",children:X.description})]}),(0,H.jsx)("div",{className:"category-arrow",children:"\u2192"})]},X.id))})}):(i==null?void 0:i.id)==="user"?(0,H.jsx)("div",{className:"data-detail",children:o?(0,H.jsx)("div",{className:"loading-container",children:(0,H.jsx)("img",{src:"https://admin.lua.dev/images/logo.svg",alt:"Loading",className:"loading-logo"})}):(0,H.jsx)("div",{className:"json-editor",children:E?(0,H.jsxs)("div",{className:"json-editor-container",children:[(0,H.jsx)("div",{ref:U,className:"json-highlight-background",dangerouslySetInnerHTML:{__html:Jm(S)}}),(0,H.jsx)("textarea",{ref:C,id:"user-data-json",name:"userDataJson",value:S,onChange:X=>At(X.target.value),className:"json-textarea",spellCheck:!1,placeholder:"Enter JSON data...",autoComplete:"off"})]}):(0,H.jsx)("div",{className:"json-display",onClick:se,dangerouslySetInnerHTML:{__html:Jm(S)}})})}):(i==null?void 0:i.id)==="resources"?(0,H.jsx)("div",{className:"data-detail",children:o?(0,H.jsx)("div",{className:"loading-container",children:(0,H.jsx)("img",{src:"https://admin.lua.dev/images/logo.svg",alt:"Loading",className:"loading-logo"})}):(0,H.jsx)("div",{className:"resources-container",children:l&&l.length>0?(0,H.jsx)("div",{className:"resources-list",children:l.map(X=>(0,H.jsx)(r_,{resource:X,apiKey:e,agentId:t,onUpdate:()=>Me(i)},X.id))}):(0,H.jsxs)("div",{className:"no-resources",children:[(0,H.jsx)("div",{className:"empty-icon",children:"\u{1F4C1}"}),(0,H.jsx)("h4",{children:"No resources yet"}),(0,H.jsx)("p",{children:"Resources help provide context and information to your AI agent"})]})})}):(0,H.jsx)("div",{className:"data-detail",children:(0,H.jsxs)("div",{className:"coming-soon",children:[(0,H.jsx)("div",{className:"coming-soon-icon",children:i==null?void 0:i.icon}),(0,H.jsxs)("div",{className:"coming-soon-text",children:[i==null?void 0:i.name," management"]}),(0,H.jsx)("div",{className:"coming-soon-subtext",children:"This feature is coming soon"})]})})}),k&&(0,H.jsx)("div",{className:"error-message",children:k}),h&&(0,H.jsx)("div",{className:"success-message",children:h}),P&&(0,H.jsx)("div",{className:"modal-overlay",children:(0,H.jsxs)("div",{className:"modal-content",children:[(0,H.jsxs)("div",{className:"modal-header",children:[(0,H.jsx)("h4",{children:"Create New Resource"}),(0,H.jsx)("button",{className:"modal-close-btn",onClick:()=>_(!1),disabled:J,children:"\u2715"})]}),(0,H.jsxs)("div",{className:"modal-body",children:[(0,H.jsxs)("div",{className:"form-group",children:[(0,H.jsx)("label",{htmlFor:"resource-name",children:"Resource Name"}),(0,H.jsx)("input",{id:"resource-name",type:"text",value:R,onChange:X=>O(X.target.value),placeholder:"Enter resource name...",disabled:J})]}),(0,H.jsxs)("div",{className:"form-group",children:[(0,H.jsx)("label",{htmlFor:"resource-content",children:"Resource Content"}),(0,H.jsx)("textarea",{id:"resource-content",value:I,onChange:X=>B(X.target.value),placeholder:"Enter resource content...",rows:10,disabled:J})]})]}),(0,H.jsxs)("div",{className:"modal-footer",children:[(0,H.jsx)("button",{className:"cancel-button",onClick:()=>_(!1),disabled:J,children:"Cancel"}),(0,H.jsx)("button",{className:"create-button",onClick:Ke,disabled:J||!R.trim()||!I.trim(),children:J?"Creating...":"Create Resource"})]})]})})]})},r_=({resource:e,apiKey:t,agentId:n,onUpdate:a})=>{let[i,r]=(0,ze.useState)(!1),[l,s]=(0,ze.useState)(e.name),[o,u]=(0,ze.useState)(e.content),[c,p]=(0,ze.useState)(!1),[d,f]=(0,ze.useState)(!1),S=()=>{s(e.name),u(e.content),r(!0)},x=()=>z(null,null,function*(){if(!(!l.trim()||!o.trim())){p(!0);try{let h=yield ie.updateResource(t,n,e.id,{name:l.trim(),content:o.trim()});h.success?(r(!1),a()):alert("Failed to update resource: "+(h.error||"Unknown error"))}catch(h){console.error("Error updating resource:",h),alert("Failed to update resource")}finally{p(!1)}}}),k=()=>z(null,null,function*(){if(confirm(`Are you sure you want to delete "${e.name}"?`)){f(!0);try{let h=yield ie.deleteResource(t,n,e.id);h.success?a():alert("Failed to delete resource: "+(h.error||"Unknown error"))}catch(h){console.error("Error deleting resource:",h),alert("Failed to delete resource")}finally{f(!1)}}}),m=()=>{r(!1),s(e.name),u(e.content)};return(0,H.jsxs)(H.Fragment,{children:[(0,H.jsx)("div",{className:"resource-item",children:(0,H.jsxs)("div",{className:"resource-display",children:[(0,H.jsxs)("div",{className:"resource-header",children:[(0,H.jsx)("h4",{className:"resource-name",children:e.name}),(0,H.jsx)("div",{className:"resource-meta",children:(0,H.jsxs)("span",{className:"resource-date",children:["Updated ",new Date(e.updatedAt).toLocaleDateString()]})})]}),(0,H.jsx)("div",{className:"resource-content",children:(0,H.jsxs)("p",{children:[e.content.substring(0,200),e.content.length>200?"...":""]})}),(0,H.jsxs)("div",{className:"resource-actions",children:[(0,H.jsx)("button",{className:"edit-btn",onClick:S,disabled:d,title:"Edit resource",children:"\u270F\uFE0F"}),(0,H.jsx)("button",{className:"delete-btn",onClick:k,disabled:d,title:"Delete resource",children:d?"\u27F3":"\u{1F5D1}\uFE0F"})]})]})}),i&&(0,H.jsx)("div",{className:"modal-overlay",children:(0,H.jsxs)("div",{className:"modal-content",children:[(0,H.jsxs)("div",{className:"modal-header",children:[(0,H.jsx)("h4",{children:"Edit Resource"}),(0,H.jsx)("button",{className:"modal-close-btn",onClick:m,disabled:c,children:"\u2715"})]}),(0,H.jsxs)("div",{className:"modal-body",children:[(0,H.jsxs)("div",{className:"form-group",children:[(0,H.jsx)("label",{htmlFor:"edit-resource-name",children:"Resource Name"}),(0,H.jsx)("input",{id:"edit-resource-name",type:"text",value:l,onChange:h=>s(h.target.value),placeholder:"Enter resource name...",disabled:c})]}),(0,H.jsxs)("div",{className:"form-group",children:[(0,H.jsx)("label",{htmlFor:"edit-resource-content",children:"Resource Content"}),(0,H.jsx)("textarea",{id:"edit-resource-content",value:o,onChange:h=>u(h.target.value),placeholder:"Enter resource content...",rows:10,disabled:c})]})]}),(0,H.jsxs)("div",{className:"modal-footer",children:[(0,H.jsx)("button",{className:"cancel-button",onClick:m,disabled:c,children:"Cancel"}),(0,H.jsx)("button",{className:"create-button",onClick:x,disabled:c||!l.trim()||!o.trim(),children:c?"Saving...":"Save Changes"})]})]})})]})}});var Ft,Km,iE=b(()=>{"use strict";Ft=F(re()),Km=({personaVersions:e,onSelectVersion:t,onDeployVersion:n,deployingVersionId:a})=>(0,Ft.jsxs)("div",{className:"persona-panel",children:[(0,Ft.jsx)("div",{className:"panel-header",children:(0,Ft.jsx)("h3",{children:"Persona Management"})}),(0,Ft.jsx)("div",{className:"panel-content",children:(0,Ft.jsxs)("div",{className:"versions-list",children:[e.map(i=>(0,Ft.jsxs)("div",{className:`version-item ${i.isDeployed?"deployed":""} clickable`,onClick:()=>t(i),children:[(0,Ft.jsxs)("div",{className:"version-info",children:[(0,Ft.jsx)("div",{className:"version-number",children:i.version}),(0,Ft.jsx)("div",{className:"version-date",children:i.deployedAt||"No date"}),i.isDeployed&&(0,Ft.jsx)("div",{className:"deployed-badge",children:"Deployed"})]}),!i.isDeployed&&i.status==="available"&&(0,Ft.jsx)("button",{className:`deploy-button ${a===i.id?"loading":""}`,onClick:r=>{r.stopPropagation(),n(i.id)},disabled:a===i.id,children:a===i.id?(0,Ft.jsx)("img",{src:"https://admin.lua.dev/images/logo.svg",alt:"Loading",className:"loading-logo-button"}):"Deploy"})]},i.id)),e.length===0&&(0,Ft.jsx)("div",{className:"no-versions",children:"No persona versions found"})]})})]})});var at,Wm,rE=b(()=>{"use strict";at=F(re()),Wm=({skills:e,onSelectSkill:t,onActivateSkill:n,activatingSkillId:a})=>(0,at.jsxs)("div",{className:"skills-panel",children:[(0,at.jsx)("div",{className:"panel-header",children:(0,at.jsx)("h3",{children:"Skills Management"})}),(0,at.jsx)("div",{className:"panel-content",children:(0,at.jsx)("div",{className:"skills-list",children:e.map(i=>(0,at.jsxs)("div",{className:`skill-item ${i.active?"active":"inactive"}`,children:[(0,at.jsxs)("div",{className:"skill-main-content",onClick:()=>t(i.name),children:[(0,at.jsxs)("div",{className:"skill-info",children:[(0,at.jsxs)("div",{className:"skill-header",children:[(0,at.jsx)("div",{className:"skill-name",children:i.name}),(0,at.jsx)("div",{className:`skill-status ${i.active?"active":"inactive"}`,children:i.active?"Active":"Inactive"})]}),(0,at.jsx)("div",{className:"skill-description",children:i.description}),(0,at.jsxs)("div",{className:"skill-stats",children:[(0,at.jsxs)("span",{className:"skill-stat",children:[i.versionsCount," versions"]}),(0,at.jsxs)("span",{className:"skill-stat",children:["Latest: ",i.latestVersion]}),i.deployedVersion&&(0,at.jsxs)("span",{className:"skill-stat deployed",children:["Deployed: ",i.deployedVersion]})]})]}),(0,at.jsx)("div",{className:"skill-arrow",children:"\u2192"})]}),(0,at.jsx)("div",{className:"skill-actions",children:(0,at.jsx)("button",{className:`activate-button ${i.active?"deactivate":"activate"} ${a===i.id?"loading":""}`,onClick:r=>{r.stopPropagation(),n(i.id,i.active)},disabled:a===i.id,children:a===i.id?(0,at.jsx)("img",{src:"https://admin.lua.dev/images/logo.svg",alt:"Loading",className:"loading-logo-button"}):i.active?"Deactivate":"Activate"})})]},i.id))})})]})});var Zt,eh,lE=b(()=>{"use strict";Zt=F(re()),eh=({selectedPersonaVersion:e,onBack:t,onDeployVersion:n,deployingVersionId:a})=>(0,Zt.jsxs)("div",{className:"persona-detail",children:[(0,Zt.jsxs)("div",{className:"persona-detail-header",children:[(0,Zt.jsx)("button",{className:"back-button",onClick:t,children:"\u2190"}),(0,Zt.jsxs)("h4",{children:["Persona ",e.version]})]}),(0,Zt.jsxs)("div",{className:"persona-section",children:[(0,Zt.jsxs)("div",{className:"persona-header",children:[(0,Zt.jsx)("h3",{children:"Agent Persona"}),(0,Zt.jsx)("div",{className:"persona-actions",children:e.isDeployed?(0,Zt.jsx)("span",{className:"deployed-badge",children:"Deployed"}):e.status==="available"?(0,Zt.jsx)("button",{className:`deploy-button ${a===e.id?"loading":""}`,onClick:()=>n(e.id),disabled:a===e.id,children:a===e.id?(0,Zt.jsx)("img",{src:"https://admin.lua.dev/images/logo.svg",alt:"Loading",className:"loading-logo-button"}):"Deploy"}):null})]}),(0,Zt.jsx)("div",{className:"persona-content",children:(0,Zt.jsx)("div",{className:"persona-display",children:e.personaContent})})]})]})});var Ee,th,sE=b(()=>{"use strict";Ee=F(re()),th=({selectedSkillVersion:e,onBack:t,onDeployVersion:n,deployingVersionId:a})=>(0,Ee.jsxs)("div",{className:"skill-detail",children:[(0,Ee.jsx)("div",{className:"skill-detail-header",children:(0,Ee.jsxs)("div",{className:"header-left",children:[(0,Ee.jsx)("button",{className:"back-button",onClick:t,children:"\u2190"}),(0,Ee.jsxs)("h4",{children:[e.skillName," ",e.version]})]})}),(0,Ee.jsx)("div",{className:"skill-details",children:(0,Ee.jsxs)("div",{className:"skill-info-section",children:[(0,Ee.jsxs)("div",{className:"skill-meta",children:[(0,Ee.jsxs)("span",{className:"skill-version",children:["v",e.version]}),e.isDeployed&&(0,Ee.jsx)("span",{className:"deployed-badge",children:"Deployed"})]}),e.skillDescription&&(0,Ee.jsxs)("div",{className:"skill-description-section",children:[(0,Ee.jsx)("h5",{children:"Description"}),(0,Ee.jsx)("p",{children:e.skillDescription})]}),e.skillContext&&(0,Ee.jsxs)("div",{className:"skill-context-section",children:[(0,Ee.jsx)("h5",{children:"Context"}),(0,Ee.jsx)("p",{children:e.skillContext})]}),!e.isDeployed&&e.status==="available"&&(0,Ee.jsx)("div",{className:"skill-actions",children:(0,Ee.jsx)("button",{className:`deploy-button ${a===e.id?"loading":""}`,onClick:()=>n(e.id),disabled:a===e.id,children:a===e.id?(0,Ee.jsx)("img",{src:"https://admin.lua.dev/images/logo.svg",alt:"Loading",className:"loading-logo-button"}):"Deploy This Version"})})]})}),(0,Ee.jsxs)("div",{className:"tools-section",children:[(0,Ee.jsx)("div",{className:"tools-header",children:(0,Ee.jsx)("h5",{children:"Available Tools"})}),(0,Ee.jsx)("div",{className:"tools-list",children:e.tools&&e.tools.length>0?e.tools.map((i,r)=>(0,Ee.jsxs)("div",{className:"tool-item",children:[(0,Ee.jsx)("div",{className:"tool-name",children:i.name}),(0,Ee.jsx)("div",{className:"tool-description",children:i.description})]},r)):(0,Ee.jsxs)("div",{className:"no-tools",children:[(0,Ee.jsx)("div",{className:"no-tools-icon",children:"\u{1F527}"}),(0,Ee.jsx)("div",{className:"no-tools-text",children:"No tools available"}),(0,Ee.jsx)("div",{className:"no-tools-subtext",children:"This version doesn't have any tools configured"})]})})]})]})});var Jt,nh,oE=b(()=>{"use strict";Jt=F(re()),nh=({selectedSkill:e,versions:t,onBack:n,onSelectVersion:a,onDeployVersion:i,formatDate:r,deployingVersionId:l})=>(0,Jt.jsxs)("div",{className:"skill-versions",children:[(0,Jt.jsx)("div",{className:"skill-versions-header",children:(0,Jt.jsxs)("div",{className:"header-left",children:[(0,Jt.jsx)("button",{className:"back-button",onClick:n,children:"\u2190"}),(0,Jt.jsx)("h4",{children:e})]})}),(0,Jt.jsx)("div",{className:"versions-list",children:t.filter(s=>s.type==="skill"&&s.skillName===e).map(s=>(0,Jt.jsxs)("div",{className:`version-item ${s.isDeployed?"deployed":""} clickable`,onClick:()=>a(s),children:[(0,Jt.jsxs)("div",{className:"version-info",children:[(0,Jt.jsx)("div",{className:"version-number",children:s.version}),(0,Jt.jsx)("div",{className:"version-date",children:r(s.deployedAt)}),s.isDeployed&&(0,Jt.jsx)("div",{className:"deployed-badge",children:"Deployed"})]}),!s.isDeployed&&s.status==="available"&&(0,Jt.jsx)("button",{className:`deploy-button ${l===s.id?"loading":""}`,onClick:o=>{o.stopPropagation(),i(s.id)},disabled:l===s.id,children:l===s.id?(0,Jt.jsx)("img",{src:"https://admin.lua.dev/images/logo.svg",alt:"Loading",className:"loading-logo-button"}):"Deploy"})]},s.id))})]})});var jt,ee,ah,l_,uE=b(()=>{"use strict";jt=F(Je());an();ee=F(re()),ah=({apiKey:e,agentId:t})=>{let[n,a]=(0,jt.useState)([]),[i,r]=(0,jt.useState)(!0),[l,s]=(0,jt.useState)(!1),[o,u]=(0,jt.useState)(null),[c,p]=(0,jt.useState)(null),[d,f]=(0,jt.useState)(null),[S,x]=(0,jt.useState)(""),[k,m]=(0,jt.useState)(""),[h,g]=(0,jt.useState)(!1);(0,jt.useEffect)(()=>{E()},[e,t]),(0,jt.useEffect)(()=>{if(o||c){let _=setTimeout(()=>{u(null),p(null)},5e3);return()=>clearTimeout(_)}},[o,c]);let E=()=>z(null,null,function*(){r(!0);try{let _=yield ie.loadProductionEnv(e,t);if(_.success&&_.data){let R=Object.entries(_.data.data||{}).map(([O,I],B)=>({id:`${B}-${O}`,key:O,value:I}));a(R)}else console.error("Failed to load production env:",_.error),a([])}catch(_){console.error("Error loading production env:",_),a([])}finally{r(!1)}}),T=_=>z(null,null,function*(){s(!0),u(null),p(null);try{let R={};_.forEach(I=>{I.key.trim()&&(R[I.key.trim()]=I.value)});let O=yield ie.updateProductionEnv(e,t,R);O.success?(p("Environment variables saved successfully!"),yield E()):u(O.error||"Failed to save environment variables")}catch(R){console.error("Error saving production env:",R),u("Failed to save environment variables")}finally{s(!1)}}),N=()=>z(null,null,function*(){if(!S.trim()){u("Variable name is required");return}let _={id:Date.now().toString(),key:S.trim(),value:k},R=[...n,_];a(R),yield T(R),x(""),m(""),g(!1)}),A=(_,R,O)=>z(null,null,function*(){let I=n.map(B=>B.id===_?ut(K({},B),{key:R.trim(),value:O}):B);a(I),f(null),yield T(I)}),C=_=>z(null,null,function*(){let R=n.filter(O=>O.id!==_);a(R),yield T(R)}),U=_=>{f(_)},P=()=>{f(null)};return i?(0,ee.jsx)("div",{className:"env-panel",children:(0,ee.jsx)("div",{className:"env-loading",children:(0,ee.jsx)("img",{src:"https://admin.lua.dev/images/logo.svg",alt:"Loading",className:"loading-logo"})})}):(0,ee.jsxs)("div",{className:"env-panel",children:[(0,ee.jsxs)("div",{className:"env-header",children:[(0,ee.jsx)("h3",{children:"Environment Variables"}),(0,ee.jsxs)("div",{className:"env-actions",children:[(0,ee.jsx)("button",{className:"refresh-btn",onClick:E,disabled:i,title:"Refresh environment variables",children:i?(0,ee.jsx)("img",{src:"https://admin.lua.dev/images/logo.svg",alt:"Loading",className:"loading-logo-button"}):"\u21BB"}),(0,ee.jsx)("button",{className:"add-btn",onClick:()=>g(!0),disabled:h,title:"Add new environment variable",children:"\u2795"})]})]}),(0,ee.jsxs)("div",{className:"env-content",children:[o&&(0,ee.jsxs)("div",{className:"error-message",children:[(0,ee.jsx)("strong",{children:"Error:"})," ",o]}),c&&(0,ee.jsxs)("div",{className:"success-message",children:[(0,ee.jsx)("strong",{children:"Success:"})," ",c]}),h&&(0,ee.jsxs)("div",{className:"env-add-form",children:[(0,ee.jsxs)("div",{className:"env-form-header",children:[(0,ee.jsx)("h4",{children:"Add New Variable"}),(0,ee.jsx)("button",{className:"form-cancel-btn",onClick:()=>{g(!1),x(""),m("")},title:"Cancel",children:"\u2715"})]}),(0,ee.jsxs)("div",{className:"env-form-fields",children:[(0,ee.jsxs)("div",{className:"env-field",children:[(0,ee.jsx)("label",{children:"Variable Name"}),(0,ee.jsx)("input",{type:"text",value:S,onChange:_=>x(_.target.value),placeholder:"API_KEY",className:"env-input",autoFocus:!0,autoComplete:"off"})]}),(0,ee.jsxs)("div",{className:"env-field",children:[(0,ee.jsx)("label",{children:"Value"}),(0,ee.jsx)("input",{type:"text",value:k,onChange:_=>m(_.target.value),placeholder:"your_api_key_here",className:"env-input",autoComplete:"off"})]}),(0,ee.jsx)("div",{className:"env-form-actions",children:(0,ee.jsx)("button",{className:"add-variable-btn",onClick:N,disabled:!S.trim()||l,children:l?"Adding...":"Add Variable"})})]})]}),(0,ee.jsx)("div",{className:"env-variables",children:n.length>0?(0,ee.jsx)("div",{className:"env-list",children:n.map(_=>(0,ee.jsx)(l_,{variable:_,isEditing:d===_.id,onEdit:()=>U(_.id),onSave:(R,O)=>A(_.id,R,O),onCancel:P,onDelete:()=>C(_.id),isSaving:l},_.id))}):(0,ee.jsxs)("div",{className:"env-empty-state",children:[(0,ee.jsx)("div",{className:"empty-icon",children:"\u{1F527}"}),(0,ee.jsx)("h4",{children:"No environment variables"}),(0,ee.jsx)("p",{children:"Add your first environment variable to get started"}),(0,ee.jsx)("button",{className:"add-first-btn",onClick:()=>g(!0),children:"Add Variable"})]})}),(0,ee.jsxs)("div",{className:"env-help",children:[(0,ee.jsx)("p",{children:"Environment variables are used by your production skills and are securely stored."}),(0,ee.jsxs)("p",{children:[(0,ee.jsx)("strong",{children:"Auto-save:"})," Changes are saved automatically when you add, edit, or delete variables."]})]})]})]})},l_=({variable:e,isEditing:t,onEdit:n,onSave:a,onCancel:i,onDelete:r,isSaving:l})=>{let[s,o]=(0,jt.useState)(e.key),[u,c]=(0,jt.useState)(e.value),p=()=>{s.trim()&&a(s,u)},d=()=>{o(e.key),c(e.value),i()},f=h=>{h.key==="Enter"&&!h.shiftKey?(h.preventDefault(),p()):h.key==="Escape"&&d()},[S,x]=(0,jt.useState)(!1),k=e.value.length>60,m=S||!k?e.value:e.value.substring(0,60)+"...";return(0,ee.jsx)("div",{className:"env-variable-item",children:t?(0,ee.jsxs)("div",{className:"env-variable-edit",children:[(0,ee.jsxs)("div",{className:"env-edit-fields",children:[(0,ee.jsx)("input",{type:"text",value:s,onChange:h=>o(h.target.value),onKeyPress:f,className:"env-key-input",placeholder:"Variable name",disabled:l,autoComplete:"off"}),(0,ee.jsx)("span",{className:"env-equals",children:"="}),(0,ee.jsx)("textarea",{value:u,onChange:h=>c(h.target.value),className:"env-value-input",placeholder:"Value",rows:1,disabled:l,autoComplete:"off"})]}),(0,ee.jsxs)("div",{className:"env-edit-actions",children:[(0,ee.jsx)("button",{className:"save-edit-btn",onClick:p,disabled:!s.trim()||l,title:"Save changes",children:"\u2713"}),(0,ee.jsx)("button",{className:"cancel-edit-btn",onClick:d,disabled:l,title:"Cancel editing",children:"\u2715"})]})]}):(0,ee.jsxs)("div",{className:"env-variable-display",children:[(0,ee.jsxs)("div",{className:"env-variable-content",children:[(0,ee.jsx)("span",{className:"env-key",children:e.key}),(0,ee.jsx)("span",{className:"env-equals",children:"="}),(0,ee.jsxs)("div",{className:"env-value-container",children:[(0,ee.jsx)("span",{className:"env-value",onClick:()=>k&&x(!S),style:{cursor:k?"pointer":"default"},title:k?"Click to expand/collapse":e.value,children:m||"<empty>"}),k&&(0,ee.jsx)("button",{className:"expand-btn",onClick:()=>x(!S),title:S?"Collapse":"Expand",children:S?"\u25B2":"\u25BC"})]})]}),(0,ee.jsxs)("div",{className:"env-variable-actions",children:[(0,ee.jsx)("button",{className:"edit-variable-btn",onClick:n,disabled:l,title:"Edit variable",children:"\u270F\uFE0F"}),(0,ee.jsx)("button",{className:"delete-variable-btn",onClick:r,disabled:l,title:"Delete variable",children:"\u{1F5D1}\uFE0F"})]})]})})}});var cE=b(()=>{"use strict";JN();KN();tE();nE();aE();Fm();iE();rE();lE();sE();oE();uE()});var zt,De,fE,dE=b(()=>{"use strict";zt=F(Je());cE();an();De=F(re()),fE=({apiKey:e,agentId:t,skillId:n,isActive:a=!1,sharedChatMessages:i,onSharedSendMessage:r,onSharedClearHistory:l,isChatLoading:s,setIsChatLoading:o})=>{let[u,c]=(0,zt.useState)("persona"),[p,d]=(0,zt.useState)([]),[f,S]=(0,zt.useState)([]),[x,k]=(0,zt.useState)([]),[m,h]=(0,zt.useState)(null),[g,E]=(0,zt.useState)(null),[T,N]=(0,zt.useState)(500),[A,C]=(0,zt.useState)(!1),[U,P]=(0,zt.useState)(null),[_,R]=(0,zt.useState)(null),[O,I]=(0,zt.useState)(null),B=se=>z(null,null,function*(){if(!se.trim())return;let X={id:Date.now().toString(),text:se,sender:"user",timestamp:new Date};r(X),o(!0);try{let Q=yield ie.sendProductionChatMessage(se,t,e),ne={id:(Date.now()+1).toString(),text:Q.success?Q.text||"No response received":`\u274C ${Q.error||"Failed to send message"}`,sender:"assistant",timestamp:new Date};r(ne)}catch(Q){let ne={id:(Date.now()+1).toString(),text:`\u274C Error: ${Q instanceof Error?Q.message:"Unknown error"}`,sender:"assistant",timestamp:new Date};r(ne)}finally{o(!1)}}),J=(se,X)=>z(null,null,function*(){E(se);try{let Q=!X;console.log(`${Q?"Activating":"Deactivating"} skill:`,se);let ne=yield ie.activateSkill(e,t,se,Q);ne.success?(k(Y=>Y.map(oe=>oe.id===se?ut(K({},oe),{active:Q}):oe)),yield pt(),console.log(`\u2705 Skill ${Q?"activated":"deactivated"} successfully`)):(console.error(`\u274C Failed to ${Q?"activate":"deactivate"} skill:`,ne.error),alert(`Failed to ${Q?"activate":"deactivate"} skill: ${ne.error}`))}catch(Q){console.error("Error activating skill:",Q),alert("Failed to change skill activation status")}finally{E(null)}}),ae=se=>z(null,null,function*(){h(se);try{let X=f.find(ne=>ne.id===se);if(X){console.log("Deploying persona version:",X),yield At(X);return}let Q=p.find(ne=>ne.id===se);if(Q){console.log("Publishing skill version:",Q.version,"for skill:",Q.skillName);let ne=x.find(Ue=>Ue.name===Q.skillName);if(!ne)throw new Error("Could not find skill for deployment");let Y=Q.version.replace("v",""),oe=yield ie.publishSkillVersion(e,t,ne.id,Y);if(oe.success&&oe.data)d(Ue=>Ue.map(mt=>mt.id===se?ut(K({},mt),{isDeployed:!0}):mt.type===Q.type&&mt.skillName===Q.skillName?ut(K({},mt),{isDeployed:!1}):mt)),k(Ue=>Ue.map(mt=>mt.name===Q.skillName?ut(K({},mt),{deployedVersion:Q.version}):mt)),yield pt(),console.log(`\u2705 ${oe.data.message}`),alert(`\u2705 ${oe.data.message}`);else throw new Error(oe.error||"Failed to publish skill version")}}finally{h(null)}}),we=se=>{C(!0),se.preventDefault()},je=se=>{if(!A)return;let X=document.querySelector(".production-layout-new");if(!X)return;let Q=X.getBoundingClientRect(),ne=Q.right-se.clientX,Y=500,oe=Q.width*.6;ne>=Y&&ne<=oe&&N(ne)},v=()=>{C(!1)};zt.default.useEffect(()=>(A?(document.addEventListener("mousemove",je),document.addEventListener("mouseup",v),document.body.style.cursor="col-resize",document.body.style.userSelect="none"):(document.removeEventListener("mousemove",je),document.removeEventListener("mouseup",v),document.body.style.cursor="",document.body.style.userSelect=""),()=>{document.removeEventListener("mousemove",je),document.removeEventListener("mouseup",v),document.body.style.cursor="",document.body.style.userSelect=""}),[A]);let Me=se=>new Date(se).toLocaleDateString("en-US",{month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"});(0,zt.useEffect)(()=>{y()},[e,t]),(0,zt.useEffect)(()=>{a&&y()},[a]);let pt=()=>z(null,null,function*(){try{console.log("Loading skills data with apiKey:",e,"agentId:",t);let se=yield ie.getSkills(e,t);if(se.success&&se.skills){let X=se.skills.map(ne=>{let Y=ne.versions.length>0?ne.versions.reduce((Ue,mt)=>Ue.version>mt.version?Ue:mt):null,oe=ne.versions.find(Ue=>Ue.active);return{id:ne.id,name:ne.name,description:ne.description,versionsCount:ne.versions.length,latestVersion:Y?`v${Y.version}`:"No versions",deployedVersion:oe?`v${oe.version}`:void 0,active:ne.active}});k(X);let Q=[];se.skills.forEach(ne=>{ne.versions.forEach(Y=>{Q.push({id:Y.id,version:`v${Y.version}`,type:"skill",skillName:ne.name,skillDescription:Y.description,skillContext:Y.context,deployedAt:ne.updatedAt,isDeployed:Y.active,status:Y.active?"deployed":"available",tools:Y.tools})})}),d(Q)}else console.error("Failed to load skills:",se.error),k([]),d([])}catch(se){console.error("Error loading skills data:",se),k([]),d([])}}),y=()=>z(null,null,function*(){try{console.log("Loading persona versions with apiKey:",e,"agentId:",t),yield Ke(),yield pt()}catch(se){console.error("Error loading production data:",se)}}),Ke=()=>z(null,null,function*(){try{let se=yield ie.getProductionPersonaVersions(t,e);if(se.success&&se.versions){let Q=se.versions.map(ne=>({id:`persona_${ne.version}`,version:`v${ne.version}`,type:"persona",deployedAt:new Date(ne.createdDate).toISOString(),isDeployed:ne.isCurrent,status:ne.isCurrent?"deployed":"available",personaContent:ne.persona})).sort((ne,Y)=>new Date(Y.deployedAt).getTime()-new Date(ne.deployedAt).getTime());S(Q)}else console.error("Failed to load persona versions:",se.error)}catch(se){console.error("Error loading persona versions:",se)}}),At=se=>z(null,null,function*(){try{let X=parseInt(se.version.replace("v",""));console.log(`Deploying persona version ${X} to production...`);let Q=yield ie.deployPersonaVersion(t,e,X);console.log("Deploy persona response:",Q),Q.success?(yield Ke(),alert(`\u2705 Persona version ${se.version} deployed successfully!`)):alert(`\u274C Failed to deploy persona version: ${Q.error||"Unknown error"}`)}catch(X){console.error("Error deploying persona version:",X),alert("\u274C Failed to deploy persona version")}});return(0,De.jsx)("div",{className:"production-page",children:(0,De.jsxs)("div",{className:"production-layout-new",children:[(0,De.jsx)("div",{className:"production-left",style:{width:`calc(100% - ${T}px)`},children:(0,De.jsx)(Qm,{messages:i,onSendMessage:B,onClearHistory:l,isLoading:s})}),(0,De.jsx)("div",{className:"production-resize-handle",onMouseDown:we}),(0,De.jsxs)("div",{className:"production-right",children:[(0,De.jsxs)("div",{className:"right-panel-tabs",children:[(0,De.jsx)("button",{className:`tab-button ${u==="persona"?"active":""}`,onClick:()=>{c("persona"),R(null),P(null),I(null)},children:"Persona"}),(0,De.jsx)("button",{className:`tab-button ${u==="skills"?"active":""}`,onClick:()=>{c("skills"),R(null),P(null),I(null),I(null)},children:"Skills"}),(0,De.jsx)("button",{className:`tab-button ${u==="stats"?"active":""}`,onClick:()=>{c("stats"),R(null),P(null),I(null)},children:"Stats"}),(0,De.jsx)("button",{className:`tab-button ${u==="logs"?"active":""}`,onClick:()=>{c("logs"),R(null),P(null),I(null)},children:"Logs"}),(0,De.jsx)("button",{className:`tab-button ${u==="data"?"active":""}`,onClick:()=>{c("data"),R(null),P(null),I(null)},children:"Data"}),(0,De.jsx)("button",{className:`tab-button ${u==="env"?"active":""}`,onClick:()=>{c("env"),R(null),P(null),I(null)},children:"Env"})]}),(0,De.jsxs)("div",{className:"right-panel-content",children:[u==="persona"&&(_?(0,De.jsx)(eh,{selectedPersonaVersion:_,onBack:()=>R(null),onDeployVersion:ae,deployingVersionId:m}):(0,De.jsx)(Km,{personaVersions:f,onSelectVersion:R,onDeployVersion:ae,deployingVersionId:m})),u==="skills"&&(O?(0,De.jsx)(th,{selectedSkillVersion:O,onBack:()=>I(null),onDeployVersion:ae,deployingVersionId:m}):U?(0,De.jsx)(nh,{selectedSkill:U,versions:p,onBack:()=>P(null),onSelectVersion:I,onDeployVersion:ae,formatDate:Me,deployingVersionId:m}):(0,De.jsx)(Wm,{skills:x,onSelectSkill:P,onActivateSkill:J,activatingSkillId:g})),u==="stats"&&(0,De.jsx)("div",{className:"coming-soon-panel",children:(0,De.jsxs)("div",{className:"coming-soon",children:[(0,De.jsx)("div",{className:"coming-soon-icon",children:"\u{1F4CA}"}),(0,De.jsx)("div",{className:"coming-soon-text",children:"Statistics & Analytics"}),(0,De.jsx)("div",{className:"coming-soon-subtext",children:"Performance metrics and analytics dashboard coming soon"})]})}),u==="logs"&&(0,De.jsx)(Zm,{apiKey:e,agentId:t}),u==="data"&&(0,De.jsx)($m,{apiKey:e,agentId:t}),u==="env"&&(0,De.jsx)(ah,{apiKey:e,agentId:t})]})]})]})})}});var Vi,sn,pE,mE=b(()=>{"use strict";Vi=F(Je()),sn=F(re()),pE=({apiKey:e,agentId:t})=>{let[n,a]=(0,Vi.useState)(""),[i,r]=(0,Vi.useState)(!0),[l,s]=(0,Vi.useState)(""),[o,u]=(0,Vi.useState)("");(0,Vi.useEffect)(()=>{c()},[]);let c=()=>z(null,null,function*(){var p;try{r(!0);let d=yield fetch("/api/config");if(d.ok){let f=yield d.json(),S=(p=f==null?void 0:f.agent)==null?void 0:p.orgId;if(S){a(S);let x=`https://admin.lua.dev/validate-token/${e}?redirect=/admin/usage?&agentId=${t}&orgId=${S}&hideToolBar=true`;u(x)}else s("No orgId found in configuration")}else s("Failed to load configuration")}catch(d){console.error("Failed to load orgId:",d),s("Failed to load configuration")}finally{r(!1)}});return i?(0,sn.jsx)("div",{className:"admin-page",children:(0,sn.jsx)("div",{className:"loading-container",children:(0,sn.jsx)("img",{src:"https://admin.lua.dev/images/logo.svg",alt:"Loading",className:"loading-logo"})})}):l?(0,sn.jsx)("div",{className:"admin-page",children:(0,sn.jsxs)("div",{className:"error-container",children:[(0,sn.jsx)("h3",{children:"Error Loading Admin Dashboard"}),(0,sn.jsx)("p",{children:l}),(0,sn.jsx)("button",{onClick:c,className:"retry-button",children:"Retry"})]})}):(0,sn.jsx)("div",{className:"admin-page",children:o?(0,sn.jsx)("iframe",{src:o,className:"admin-iframe",title:"Lua Admin Dashboard",sandbox:"allow-same-origin allow-scripts allow-forms allow-popups allow-top-navigation"}):(0,sn.jsx)("div",{className:"loading-container",children:(0,sn.jsx)("img",{src:"https://admin.lua.dev/images/logo.svg",alt:"Loading",className:"loading-logo"})})})}});var hE=b(()=>{});var Qr,it,gE,vE=b(()=>{"use strict";Qr=F(Je());FN();dE();mE();an();hE();it=F(re()),gE=({apiKey:e,agentId:t,skillId:n,sandboxId:a})=>{let[i,r]=(0,Qr.useState)("sandbox"),[l,s]=(0,Qr.useState)([]),[o,u]=(0,Qr.useState)(!1);(0,Qr.useEffect)(()=>{c()},[e,t]);let c=()=>z(null,null,function*(){try{console.log("Loading shared chat history with API key:",e,"agentId:",t);let S=yield ie.loadChatHistory(e,t);if(S.success&&S.data&&S.data.length>0){let x=S.data.map(k=>{var m;return{id:k.id||Date.now().toString(),text:((m=k.content[0])==null?void 0:m.text)||"",sender:k.role==="user"?"user":"assistant",timestamp:new Date(k.createdAt)}});s(x)}else s([])}catch(S){console.error("Failed to load shared chat history:",S),s([])}}),p=()=>z(null,null,function*(){try{let S=yield ie.clearChatHistory(e,t);S.success?s([]):alert("Failed to clear chat history: "+(S.error||"Unknown error"))}catch(S){console.error("Failed to clear shared chat history:",S),alert("Failed to clear chat history")}}),d=S=>{s(x=>[...x,S])};return(0,it.jsxs)("div",{className:"main-container",children:[(0,it.jsx)("div",{className:"page-navigation",children:(0,it.jsxs)("div",{className:"nav-logo",children:[(0,it.jsx)("img",{src:"https://admin.lua.dev/images/logo.svg",alt:"Lua",className:"logo-icon"}),(0,it.jsxs)("span",{className:"logo-text",children:[(0,it.jsx)("strong",{children:"Lua"})," : Developer Console"]})]})}),(0,it.jsxs)("div",{className:"page-tabs",children:[(0,it.jsx)("button",{className:`page-tab ${i==="sandbox"?"active":""}`,onClick:()=>r("sandbox"),children:"Sandbox"}),(0,it.jsx)("button",{className:`page-tab ${i==="production"?"active":""}`,onClick:()=>r("production"),children:"Production"}),(0,it.jsx)("button",{className:`page-tab ${i==="admin"?"active":""}`,onClick:()=>r("admin"),children:"Admin"})]}),(0,it.jsx)("div",{className:"page-container",children:(0,it.jsxs)(it.Fragment,{children:[(0,it.jsx)("div",{className:`page-content ${i==="sandbox"?"active":"hidden"}`,children:(0,it.jsx)(QN,{apiKey:e,agentId:t,skillId:n,sandboxId:a,sharedChatMessages:l,onSharedSendMessage:d,onSharedClearHistory:p,isChatLoading:o,setIsChatLoading:u})}),(0,it.jsx)("div",{className:`page-content ${i==="production"?"active":"hidden"}`,children:(0,it.jsx)(fE,{apiKey:e,agentId:t,skillId:n,isActive:i==="production",sharedChatMessages:l,onSharedSendMessage:d,onSharedClearHistory:p,isChatLoading:o,setIsChatLoading:u})}),(0,it.jsx)("div",{className:`page-content ${i==="admin"?"active":"hidden"}`,children:(0,it.jsx)(pE,{apiKey:e,agentId:t})})]})})]})}});var o_=Ut(()=>{var yE=F(Je()),bE=F(Yb());vE();var ih=F(re()),Ls=window.__LUA_CONFIG__;if(!Ls)throw new Error("Lua configuration not found");var SE=document.getElementById("root");if(!SE)throw new Error("Root container not found");var s_=(0,bE.createRoot)(SE);s_.render((0,ih.jsx)(yE.default.StrictMode,{children:(0,ih.jsx)(gE,{apiKey:Ls.apiKey,agentId:Ls.agentId,skillId:Ls.skillId,sandboxId:Ls.sandboxId})}))});return o_();})();
21
+ `}),n}function bS(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}var nm,f2,SS=N(()=>{Jp();tm();Sc();aS();nm={}.hasOwnProperty,f2={}});function Qc(e,t){let n=xS(e,t),a=n.one(e,void 0),r=dS(n),i=Array.isArray(a)?{type:"root",children:a}:a||{type:"root",children:[]};return r&&("children"in i,i.children.push({type:"text",value:`
22
+ `},r)),i}var NS=N(()=>{fS();SS()});var ES=N(()=>{NS()});function Fc(e,t){return e&&"run"in e?function(n,a){return O(this,null,function*(){let r=Qc(n,ee({file:a},t));yield e.run(r,a)})}:function(n,a){return Qc(n,ee({file:a},e||t))}}var kS=N(()=>{ES()});var TS=N(()=>{kS()});function am(e){if(e)throw e}var wS=N(()=>{});var MS=Bt((hz,zS)=>{"use strict";var Zc=Object.prototype.hasOwnProperty,LS=Object.prototype.toString,AS=Object.defineProperty,CS=Object.getOwnPropertyDescriptor,RS=function(t){return typeof Array.isArray=="function"?Array.isArray(t):LS.call(t)==="[object Array]"},_S=function(t){if(!t||LS.call(t)!=="[object Object]")return!1;var n=Zc.call(t,"constructor"),a=t.constructor&&t.constructor.prototype&&Zc.call(t.constructor.prototype,"isPrototypeOf");if(t.constructor&&!n&&!a)return!1;var r;for(r in t);return typeof r=="undefined"||Zc.call(t,r)},DS=function(t,n){AS&&n.name==="__proto__"?AS(t,n.name,{enumerable:!0,configurable:!0,value:n.newValue,writable:!0}):t[n.name]=n.newValue},OS=function(t,n){if(n==="__proto__")if(Zc.call(t,n)){if(CS)return CS(t,n).value}else return;return t[n]};zS.exports=function e(){var t,n,a,r,i,s,l=arguments[0],o=1,c=arguments.length,u=!1;for(typeof l=="boolean"&&(u=l,l=arguments[1]||{},o=2),(l==null||typeof l!="object"&&typeof l!="function")&&(l={});o<c;++o)if(t=arguments[o],t!=null)for(n in t)a=OS(l,n),r=OS(t,n),l!==r&&(u&&r&&(_S(r)||(i=RS(r)))?(i?(i=!1,s=a&&RS(a)?a:[]):s=a&&_S(a)?a:{},DS(l,{name:n,newValue:e(u,s,r)})):typeof r!="undefined"&&DS(l,{name:n,newValue:r}));return l}});function xl(e){if(typeof e!="object"||e===null)return!1;let t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}var US=N(()=>{});function rm(){let e=[],t={run:n,use:a};return t;function n(...r){let i=-1,s=r.pop();if(typeof s!="function")throw new TypeError("Expected function as last argument, not "+s);l(null,...r);function l(o,...c){let u=e[++i],p=-1;if(o){s(o);return}for(;++p<r.length;)(c[p]===null||c[p]===void 0)&&(c[p]=r[p]);r=c,u?PS(u,l)(...c):s(null,...c)}}function a(r){if(typeof r!="function")throw new TypeError("Expected `middelware` to be a function, not "+r);return e.push(r),t}}function PS(e,t){let n;return a;function a(...s){let l=e.length>s.length,o;l&&s.push(r);try{o=e.apply(this,s)}catch(c){let u=c;if(l&&n)throw u;return r(u)}l||(o&&o.then&&typeof o.then=="function"?o.then(i,r):o instanceof Error?r(o):i(o))}function r(s,...l){n||(n=!0,t(s,...l))}function i(s){r(null,s)}}var BS=N(()=>{});var VS=N(()=>{BS()});function v2(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');Sl(e);let n=0,a=-1,r=e.length,i;if(t===void 0||t.length===0||t.length>e.length){for(;r--;)if(e.codePointAt(r)===47){if(i){n=r+1;break}}else a<0&&(i=!0,a=r+1);return a<0?"":e.slice(n,a)}if(t===e)return"";let s=-1,l=t.length-1;for(;r--;)if(e.codePointAt(r)===47){if(i){n=r+1;break}}else s<0&&(i=!0,s=r+1),l>-1&&(e.codePointAt(r)===t.codePointAt(l--)?l<0&&(a=r):(l=-1,a=s));return n===a?a=s:a<0&&(a=e.length),e.slice(n,a)}function y2(e){if(Sl(e),e.length===0)return".";let t=-1,n=e.length,a;for(;--n;)if(e.codePointAt(n)===47){if(a){t=n;break}}else a||(a=!0);return t<0?e.codePointAt(0)===47?"/":".":t===1&&e.codePointAt(0)===47?"//":e.slice(0,t)}function b2(e){Sl(e);let t=e.length,n=-1,a=0,r=-1,i=0,s;for(;t--;){let l=e.codePointAt(t);if(l===47){if(s){a=t+1;break}continue}n<0&&(s=!0,n=t+1),l===46?r<0?r=t:i!==1&&(i=1):r>-1&&(i=-1)}return r<0||n<0||i===0||i===1&&r===n-1&&r===a+1?"":e.slice(r,n)}function x2(...e){let t=-1,n;for(;++t<e.length;)Sl(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":S2(n)}function S2(e){Sl(e);let t=e.codePointAt(0)===47,n=N2(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function N2(e,t){let n="",a=0,r=-1,i=0,s=-1,l,o;for(;++s<=e.length;){if(s<e.length)l=e.codePointAt(s);else{if(l===47)break;l=47}if(l===47){if(!(r===s-1||i===1))if(r!==s-1&&i===2){if(n.length<2||a!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(o=n.lastIndexOf("/"),o!==n.length-1){o<0?(n="",a=0):(n=n.slice(0,o),a=n.length-1-n.lastIndexOf("/")),r=s,i=0;continue}}else if(n.length>0){n="",a=0,r=s,i=0;continue}}t&&(n=n.length>0?n+"/..":"..",a=2)}else n.length>0?n+="/"+e.slice(r+1,s):n=e.slice(r+1,s),a=s-r-1;r=s,i=0}else l===46&&i>-1?i++:i=-1}return n}function Sl(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}var In,HS=N(()=>{In={basename:v2,dirname:y2,extname:b2,join:x2,sep:"/"}});function E2(){return"/"}var qS,jS=N(()=>{qS={cwd:E2}});function Hi(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}var im=N(()=>{});function IS(e){if(typeof e=="string")e=new URL(e);else if(!Hi(e)){let t=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code="ERR_INVALID_ARG_TYPE",t}if(e.protocol!=="file:"){let t=new TypeError("The URL must be of scheme file");throw t.code="ERR_INVALID_URL_SCHEME",t}return k2(e)}function k2(e){if(e.hostname!==""){let a=new TypeError('File URL host must be "localhost" or empty on darwin');throw a.code="ERR_INVALID_FILE_URL_HOST",a}let t=e.pathname,n=-1;for(;++n<t.length;)if(t.codePointAt(n)===37&&t.codePointAt(n+1)===50){let a=t.codePointAt(n+2);if(a===70||a===102){let r=new TypeError("File URL path must not include encoded / characters");throw r.code="ERR_INVALID_FILE_URL_PATH",r}}return decodeURIComponent(t)}var YS=N(()=>{im();im()});function lm(e,t){if(e&&e.includes(In.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+In.sep+"`")}function om(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function GS(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function T2(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}var sm,zr,XS=N(()=>{mp();HS();jS();YS();sm=["history","path","basename","stem","extname","dirname"],zr=class{constructor(t){let n;t?Hi(t)?n={path:t}:typeof t=="string"||T2(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":qS.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let a=-1;for(;++a<sm.length;){let i=sm[a];i in n&&n[i]!==void 0&&n[i]!==null&&(this[i]=i==="history"?[...n[i]]:n[i])}let r;for(r in n)sm.includes(r)||(this[r]=n[r])}get basename(){return typeof this.path=="string"?In.basename(this.path):void 0}set basename(t){om(t,"basename"),lm(t,"basename"),this.path=In.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?In.dirname(this.path):void 0}set dirname(t){GS(this.basename,"dirname"),this.path=In.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?In.extname(this.path):void 0}set extname(t){if(lm(t,"extname"),GS(this.dirname,"extname"),t){if(t.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(t.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=In.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){Hi(t)&&(t=IS(t)),om(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?In.basename(this.path,this.extname):void 0}set stem(t){om(t,"stem"),lm(t,"stem"),this.path=In.join(this.dirname||"",t+(this.extname||""))}fail(t,n,a){let r=this.message(t,n,a);throw r.fatal=!0,r}info(t,n,a){let r=this.message(t,n,a);return r.fatal=void 0,r}message(t,n,a){let r=new ut(t,n,a);return this.path&&(r.name=this.path+":"+r.name,r.file=this.path),r.fatal=!1,this.messages.push(r),r}toString(t){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(t||void 0).decode(this.value)}}});var cm=N(()=>{XS()});var QS,FS=N(()=>{QS=(function(e){let a=this.constructor.prototype,r=a[e],i=function(){return r.apply(i,arguments)};return Object.setPrototypeOf(i,a),i})});function um(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function dm(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function fm(e,t){if(t)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function ZS(e){if(!xl(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function $S(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function $c(e){return A2(e)?e:new zr(e)}function A2(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function C2(e){return typeof e=="string"||R2(e)}function R2(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}var Jc,w2,pm,mm,JS=N(()=>{wS();Jc=Z(MS(),1);US();VS();cm();FS();w2={}.hasOwnProperty,pm=class e extends QS{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=rm()}copy(){let t=new e,n=-1;for(;++n<this.attachers.length;){let a=this.attachers[n];t.use(...a)}return t.data((0,Jc.default)(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(fm("data",this.frozen),this.namespace[t]=n,this):w2.call(this.namespace,t)&&this.namespace[t]||void 0:t?(fm("data",this.frozen),this.namespace=t,this):this.namespace}freeze(){if(this.frozen)return this;let t=this;for(;++this.freezeIndex<this.attachers.length;){let[n,...a]=this.attachers[this.freezeIndex];if(a[0]===!1)continue;a[0]===!0&&(a[0]=void 0);let r=n.call(t,...a);typeof r=="function"&&this.transformers.use(r)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(t){this.freeze();let n=$c(t),a=this.parser||this.Parser;return um("parse",a),a(String(n),n)}process(t,n){let a=this;return this.freeze(),um("process",this.parser||this.Parser),dm("process",this.compiler||this.Compiler),n?r(void 0,n):new Promise(r);function r(i,s){let l=$c(t),o=a.parse(l);a.run(o,l,function(u,p,f){if(u||!p||!f)return c(u);let d=p,x=a.stringify(d,f);C2(x)?f.value=x:f.result=x,c(u,f)});function c(u,p){u||!p?s(u):i?i(p):n(void 0,p)}}}processSync(t){let n=!1,a;return this.freeze(),um("processSync",this.parser||this.Parser),dm("processSync",this.compiler||this.Compiler),this.process(t,r),$S("processSync","process",n),a;function r(i,s){n=!0,am(i),a=s}}run(t,n,a){ZS(t),this.freeze();let r=this.transformers;return!a&&typeof n=="function"&&(a=n,n=void 0),a?i(void 0,a):new Promise(i);function i(s,l){let o=$c(n);r.run(t,o,c);function c(u,p,f){let d=p||t;u?l(u):s?s(d):a(void 0,d,f)}}}runSync(t,n){let a=!1,r;return this.run(t,n,i),$S("runSync","run",a),r;function i(s,l){am(s),r=l,a=!0}}stringify(t,n){this.freeze();let a=$c(n),r=this.compiler||this.Compiler;return dm("stringify",r),ZS(t),r(t,a)}use(t,...n){let a=this.attachers,r=this.namespace;if(fm("use",this.frozen),t!=null)if(typeof t=="function")o(t,n);else if(typeof t=="object")Array.isArray(t)?l(t):s(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function i(c){if(typeof c=="function")o(c,[]);else if(typeof c=="object")if(Array.isArray(c)){let[u,...p]=c;o(u,p)}else s(c);else throw new TypeError("Expected usable value, not `"+c+"`")}function s(c){if(!("plugins"in c)&&!("settings"in c))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");l(c.plugins),c.settings&&(r.settings=(0,Jc.default)(!0,r.settings,c.settings))}function l(c){let u=-1;if(c!=null)if(Array.isArray(c))for(;++u<c.length;){let p=c[u];i(p)}else throw new TypeError("Expected a list of plugins, not `"+c+"`")}function o(c,u){let p=-1,f=-1;for(;++p<a.length;)if(a[p][0]===c){f=p;break}if(f===-1)a.push([c,...u]);else if(u.length>0){let[d,...x]=u,y=a[f][1];xl(y)&&xl(d)&&(d=(0,Jc.default)(!0,y,d)),a[f]=[c,d,...x]}}}},mm=new pm().freeze()});var KS=N(()=>{JS()});function Nl(e){let t=L2(e),n=z2(e);return M2(t.runSync(t.parse(n),n),e)}function L2(e){let t=e.rehypePlugins||WS,n=e.remarkPlugins||WS,a=e.remarkRehypeOptions?ee(ee({},e.remarkRehypeOptions),eN):eN;return mm().use(Vc).use(n).use(Fc,a).use(t)}function z2(e){let t=e.children||"",n=new zr;return typeof t=="string"?n.value=t:(""+t,void 0),n}function M2(e,t){let n=t.allowedElements,a=t.allowElement,r=t.components,i=t.disallowedElements,s=t.skipHtml,l=t.unwrapDisallowed,o=t.urlTransform||nN;for(let u of O2)Object.hasOwn(t,u.from)&&(""+u.from+(u.to?"use `"+u.to+"` instead":"remove it")+_2+u.id,void 0);return n&&i&&void 0,bl(e,c),gp(e,{Fragment:qi.Fragment,components:r,ignoreInvalidStyle:!0,jsx:qi.jsx,jsxs:qi.jsxs,passKeys:!0,passNode:!0});function c(u,p,f){if(u.type==="raw"&&f&&typeof p=="number")return s?f.children.splice(p,1):f.children[p]={type:"text",value:u.value},p;if(u.type==="element"){let d;for(d in dl)if(Object.hasOwn(dl,d)&&Object.hasOwn(u.properties,d)){let x=u.properties[d],y=dl[d];(y===null||y.includes(u.tagName))&&(u.properties[d]=o(String(x||""),d,u))}}if(u.type==="element"){let d=n?!n.includes(u.tagName):i?i.includes(u.tagName):!1;if(!d&&a&&typeof p=="number"&&(d=!a(u,p,f)),d&&f&&typeof p=="number")return l&&u.children?f.children.splice(p,1,...u.children):f.children.splice(p,1),p}}}function nN(e){let t=e.indexOf(":"),n=e.indexOf("?"),a=e.indexOf("#"),r=e.indexOf("/");return t===-1||r!==-1&&t>r||n!==-1&&t>n||a!==-1&&t>a||D2.test(e.slice(0,t))?e:""}var qi,tN,_2,WS,eN,D2,O2,aN=N(()=>{q0();I0();qi=Z(oe(),1),tN=Z($e(),1);i1();TS();KS();tm();cm();_2="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",WS=[],eN={allowDangerousHtml:!0},D2=/^(https?|ircs?|mailto|xmpp)$/i,O2=[{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"}]});var hm=N(()=>{aN()});var Re,ve,gm,re,Zt=N(()=>{"use strict";Re={LUA_API:"https://api.lua.dev",DEV_SERVER:"https://api.lua.dev",LOCAL_DEV:""},ve={CHAT_GENERATE:e=>`${Re.LUA_API}/chat/generate/${e}?channel=dev`,TOOLS_TEST:e=>`${Re.LUA_API}/tools/test/${e}`,CHAT_HISTORY:e=>`${Re.LUA_API}/chat/history/${e}`,AGENT_TYPES:`${Re.LUA_API}/agents/self-serve/types`,CREATE_AGENT:`${Re.LUA_API}/agents/self-serve/create`,AGENT_DETAILS:e=>`${Re.LUA_API}/admin/agents/${e}`,SKILL_VERSIONS:(e,t)=>`${Re.DEV_SERVER}/developer/skills/${e}/${t}/versions`,PERSONA_VERSIONS:e=>`${Re.LUA_API}/developer/agents/${e}/persona/versions`,DEPLOY_PERSONA_VERSION:(e,t)=>`${Re.LUA_API}/developer/agents/${e}/persona/version/${t}`,AGENT_RESOURCES:e=>`${Re.LUA_API}/admin/agents/${e}/resources`,AGENT_RESOURCE:(e,t)=>`${Re.LUA_API}/admin/agents/${e}/resources/${t}`,AGENT_SKILLS:e=>`${Re.LUA_API}/developer/skills/${e}`,ACTIVATE_SKILL:(e,t)=>`${Re.LUA_API}/developer/skills/${e}/${t}`,PUBLISH_SKILL_VERSION:(e,t,n)=>`${Re.LUA_API}/developer/skills/${e}/${t}/${n}/publish`,PRODUCTION_LOGS:e=>`${Re.LUA_API}/developer/agents/${e}/logs`,PRODUCTION_ENV:e=>`${Re.LUA_API}/developer/agents/${e}/env`,AGENT_PRODUCTS:e=>`${Re.LUA_API}/developer/agents/${e}/products`,AGENT_PRODUCT:(e,t)=>`${Re.LUA_API}/developer/agents/${e}/products/${t}`,SEARCH_PRODUCTS:e=>`${Re.LUA_API}/developer/agents/${e}/products/search`,CREATE_SKILL:e=>`${Re.DEV_SERVER}/developer/skills/${e}`,DEVELOPER_LOGS:(e,t)=>`${Re.DEV_SERVER}/developer/skills/${e}/${t}/logs`,USER_DATA:e=>`${Re.DEV_SERVER}/developer/user/data/agent/${e}`,LOCAL_CHAT:`${Re.LOCAL_DEV}/chat`,LOCAL_PERSONA:`${Re.LOCAL_DEV}/persona`,LOCAL_TOOLS:`${Re.LOCAL_DEV}/tools`,LOCAL_TOOLS_TEST:`${Re.LOCAL_DEV}/tools/test`,LOCAL_ENV:`${Re.LOCAL_DEV}/env`},gm=class{constructor(t=""){this.baseUrl=t}getAllSkillOverrides(){return O(this,null,function*(){try{let n=yield(yield fetch("/api/skills")).json();return n.success&&n.skills&&Array.isArray(n.skills)?n.skills.map(a=>({skillId:a.skillId,sandboxId:a.sandboxId||a.skillId})).filter(a=>a.skillId&&a.sandboxId):[]}catch(t){return console.error("Error getting skill overrides:",t),[]}})}sendChatMessage(t,n,a,r,i,s){return O(this,null,function*(){try{let l=yield this.getAllSkillOverrides(),o=l.length>0?l:[{skillId:a,sandboxId:r}],c=ee({messages:[{type:"text",text:t}],navigate:!0,skillOverride:o},s&&{personaOverride:s}),u=yield fetch(ve.CHAT_GENERATE(n),{method:"POST",headers:{"Content-Type":"application/json",Authorization:i},body:JSON.stringify(c)});if(!u.ok)throw new Error(`HTTP error! status: ${u.status}`);return{success:!0,text:(yield u.json()).text||"No response received"}}catch(l){return console.error("Chat API error:",l),{success:!1,error:l instanceof Error?l.message:"Unknown error occurred"}}})}sendProductionChatMessage(t,n,a){return O(this,null,function*(){try{let r={messages:[{type:"text",text:t}],navigate:!0,skillOverride:[]},i=yield fetch(ve.CHAT_GENERATE(n),{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${a}`},body:JSON.stringify(r)});if(!i.ok)throw new Error(`HTTP error! status: ${i.status}`);return{success:!0,text:(yield i.json()).text||"No response received"}}catch(r){return console.error("Production chat API error:",r),{success:!1,error:r instanceof Error?r.message:"Unknown error occurred"}}})}sendLocalChatMessage(t,n){return O(this,null,function*(){try{let a=yield fetch(ve.LOCAL_CHAT,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({message:t,persona:n})});if(!a.ok)throw new Error(`HTTP error! status: ${a.status}`);return yield a.json()}catch(a){return console.error("Local chat API error:",a),{success:!1,error:a instanceof Error?a.message:"Unknown error occurred"}}})}loadPersona(){return O(this,null,function*(){try{let t=yield fetch(ve.LOCAL_PERSONA);if(!t.ok)throw new Error(`HTTP error! status: ${t.status}`);return yield t.json()}catch(t){return console.error("Load persona error:",t),{success:!1,error:t instanceof Error?t.message:"Failed to load persona"}}})}savePersona(t){return O(this,null,function*(){try{let n=yield fetch(ve.LOCAL_PERSONA,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({persona:t})});if(!n.ok)throw new Error(`HTTP error! status: ${n.status}`);return yield n.json()}catch(n){return console.error("Save persona error:",n),{success:!1,error:n instanceof Error?n.message:"Failed to save persona"}}})}loadTools(){return O(this,null,function*(){try{let t=yield fetch(ve.LOCAL_TOOLS);if(!t.ok)throw new Error(`HTTP error! status: ${t.status}`);return yield t.json()}catch(t){return console.error("Load tools error:",t),{success:!1,error:t instanceof Error?t.message:"Failed to load tools"}}})}testTool(t,n,a,r,i,s){return O(this,null,function*(){try{let l={toolName:t,inputs:n,skillOverride:[{skillId:r,sandboxId:i}]},o=yield fetch(ve.TOOLS_TEST(a),{method:"POST",headers:{"Content-Type":"application/json",Authorization:s},body:JSON.stringify(l)});if(!o.ok)throw new Error(`HTTP error! status: ${o.status}`);let c=yield o.json();return{success:!0,result:c.result||c}}catch(l){return console.error("Tool test error:",l),{success:!1,error:l instanceof Error?l.message:"Unknown error occurred"}}})}getSkillVersions(t,n,a){return O(this,null,function*(){try{let r=yield fetch(ve.SKILL_VERSIONS(n,t),{method:"GET",headers:{Authorization:`Bearer ${a}`,"Content-Type":"application/json"}});if(!r.ok)throw new Error(`HTTP error! status: ${r.status}`);return{success:!0,versions:(yield r.json()).versions||[]}}catch(r){return console.error("Error fetching skill versions:",r),{success:!1,error:r instanceof Error?r.message:"Unknown error occurred"}}})}getPersonaVersions(t,n){return O(this,null,function*(){try{let a=yield fetch(`${Re.DEV_SERVER}/developer/agents/${t}/persona/versions`,{method:"GET",headers:{Authorization:`Bearer ${n}`,"Content-Type":"application/json"}});if(!a.ok)throw new Error(`HTTP error! status: ${a.status}`);return{success:!0,versions:(yield a.json()).versions||[]}}catch(a){return console.error("Error fetching persona versions:",a),{success:!1,error:a instanceof Error?a.message:"Unknown error occurred"}}})}getProductionPersonaVersions(t,n){return O(this,null,function*(){try{let a=yield fetch(ve.PERSONA_VERSIONS(t),{method:"GET",headers:{Authorization:`Bearer ${n}`,"Content-Type":"application/json"}});if(!a.ok)throw new Error(`HTTP error! status: ${a.status}`);return{success:!0,versions:(yield a.json()).versions||[]}}catch(a){return console.error("Error fetching production persona versions:",a),{success:!1,error:a instanceof Error?a.message:"Unknown error occurred"}}})}deployPersonaVersion(t,n,a){return O(this,null,function*(){try{let r=yield fetch(ve.DEPLOY_PERSONA_VERSION(t,a),{method:"POST",headers:{Authorization:`Bearer ${n}`,"Content-Type":"application/json"},body:JSON.stringify({})});if(!r.ok)throw new Error(`HTTP error! status: ${r.status}`);return{success:!0,data:yield r.json()}}catch(r){return console.error("Error deploying persona version:",r),{success:!1,error:r instanceof Error?r.message:"Unknown error occurred"}}})}createPersonaVersion(t,n,a){return O(this,null,function*(){try{let r=yield fetch(`${Re.DEV_SERVER}/developer/agents/${t}/persona/version`,{method:"POST",headers:{Authorization:`Bearer ${n}`,"Content-Type":"application/json"},body:JSON.stringify({persona:a})});if(!r.ok){let s=yield r.text();throw new Error(`HTTP error! status: ${r.status}, message: ${s}`)}return{success:!0,data:yield r.json()}}catch(r){return console.error("Error creating persona version:",r),{success:!1,error:r instanceof Error?r.message:"Unknown error occurred"}}})}createSkillVersion(t,n,a,r){return O(this,null,function*(){try{let i=yield fetch(`${Re.DEV_SERVER}/developer/skills/${n}/${t}/version`,{method:"POST",headers:{Authorization:`Bearer ${a}`,"Content-Type":"application/json"},body:JSON.stringify(r)});if(!i.ok){let l=yield i.text();throw new Error(`HTTP error! status: ${i.status}, message: ${l}`)}return{success:!0,data:yield i.json()}}catch(i){return console.error("Error creating skill version:",i),{success:!1,error:i instanceof Error?i.message:"Unknown error occurred"}}})}loadEnvContent(){return O(this,null,function*(){try{let t=yield fetch(ve.LOCAL_ENV);if(!t.ok)throw new Error(`HTTP error! status: ${t.status}`);return yield t.json()}catch(t){return console.error("Load env error:",t),{success:!1,error:t instanceof Error?t.message:"Failed to load environment variables"}}})}saveEnvContent(t){return O(this,null,function*(){try{let n=yield fetch(ve.LOCAL_ENV,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({content:t})});if(!n.ok)throw new Error(`HTTP error! status: ${n.status}`);return yield n.json()}catch(n){return console.error("Save env error:",n),{success:!1,error:n instanceof Error?n.message:"Failed to save environment variables"}}})}testLocalTool(t,n){return O(this,null,function*(){try{let a=yield fetch(ve.LOCAL_TOOLS_TEST,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({toolName:t,inputs:n})});if(!a.ok)throw new Error(`HTTP error! status: ${a.status}`);return yield a.json()}catch(a){return console.error("Local tool test error:",a),{success:!1,error:a instanceof Error?a.message:"Unknown error occurred"}}})}loadChatHistory(t,n){return O(this,null,function*(){try{console.log("ApiService: Loading chat history with API key:",t,"agentId:",n);let a=yield fetch(ve.CHAT_HISTORY(n),{method:"GET",headers:{accept:"*/*",Authorization:`Bearer ${t}`}});if(console.log("ApiService: Response status:",a.status),console.log("ApiService: Response headers:",a.headers),!a.ok){let i=yield a.text();throw console.error("ApiService: HTTP error response:",i),new Error(`HTTP error! status: ${a.status}`)}let r=yield a.json();return console.log("ApiService: Received data:",r),{success:!0,data:r}}catch(a){return console.error("ApiService: Chat history load error:",a),{success:!1,error:a instanceof Error?a.message:"Unknown error occurred"}}})}clearChatHistory(t,n){return O(this,null,function*(){try{console.log("ApiService: Clearing chat history with API key:",t,"agentId:",n);let a=yield fetch(ve.CHAT_HISTORY(n),{method:"DELETE",headers:{accept:"*/*",Authorization:`Bearer ${t}`}});if(!a.ok)throw new Error(`HTTP error! status: ${a.status}`);return{success:!0}}catch(a){return console.error("Clear chat history error:",a),{success:!1,error:a instanceof Error?a.message:"Unknown error occurred"}}})}clearSandboxLogs(t,n,a){return O(this,null,function*(){try{console.log("ApiService: Clearing sandbox logs with API key:",t,"agentId:",n,"sandboxId:",a);let r=yield fetch(ve.DEVELOPER_LOGS(n,a),{method:"DELETE",headers:{accept:"application/json",Authorization:`Bearer ${t}`}});if(console.log("ApiService: Clear logs response status:",r.status),!r.ok){let s=yield r.text();throw console.error("ApiService: HTTP error response:",s),new Error(`HTTP error! status: ${r.status}`)}let i=yield r.json();return console.log("ApiService: Clear logs response:",i),{success:!0,data:i}}catch(r){return console.error("ApiService: Clear sandbox logs error:",r),{success:!1,error:r instanceof Error?r.message:"Unknown error occurred"}}})}loadAllSandboxLogs(t,n,a=20){return O(this,null,function*(){try{let r=yield this.getAllSkillOverrides();if(r.length===0)return{success:!0,data:{logs:[]}};let i=r.map(o=>O(this,null,function*(){try{let c=yield this.loadSandboxLogs(t,n,o.sandboxId,a);return c.success&&c.data&&c.data.logs?c.data.logs.map(u=>tt(ee({},u),{skillName:o.skillId,sandboxId:o.sandboxId})):[]}catch(c){return console.error(`Error loading logs for skill ${o.skillId}:`,c),[]}}));return{success:!0,data:{logs:(yield Promise.all(i)).flat().sort((o,c)=>new Date(c.timestamp).getTime()-new Date(o.timestamp).getTime()).slice(0,a)}}}catch(r){return console.error("Error loading all sandbox logs:",r),{success:!1,error:r instanceof Error?r.message:"Unknown error occurred",data:{logs:[]}}}})}loadSandboxLogs(t,n,a,r=20){return O(this,null,function*(){try{console.log("ApiService: Loading sandbox logs with API key:",t,"agentId:",n,"sandboxId:",a);let i=yield fetch(`${ve.DEVELOPER_LOGS(n,a)}?limit=${r}`,{method:"GET",headers:{accept:"application/json",Authorization:`Bearer ${t}`}});if(console.log("ApiService: Logs response status:",i.status),!i.ok){let l=yield i.text();throw console.error("ApiService: HTTP error response:",l),new Error(`HTTP error! status: ${i.status}`)}let s=yield i.json();return console.log("ApiService: Received logs data:",s),{success:!0,data:s}}catch(i){return console.error("ApiService: Sandbox logs load error:",i),{success:!1,error:i instanceof Error?i.message:"Unknown error occurred"}}})}loadUserData(t,n){return O(this,null,function*(){try{console.log("ApiService: Loading user data with API key:",t,"agentId:",n),console.log("ApiService: API key length:",t==null?void 0:t.length),console.log("ApiService: API key starts with:",t==null?void 0:t.substring(0,10));let a=yield fetch(ve.USER_DATA(n),{method:"GET",headers:{accept:"*/*",Authorization:`Bearer ${t}`}});if(console.log("ApiService: User data response status:",a.status),console.log("ApiService: Response headers:",Object.fromEntries(a.headers.entries())),!a.ok){let i=yield a.text();if(console.error("ApiService: HTTP error response:",i),a.status===401){console.log("ApiService: Trying alternative authentication method...");let s=yield fetch(ve.USER_DATA(n),{method:"GET",headers:{accept:"*/*",Authorization:t}});if(s.ok){let l=yield s.json();return console.log("ApiService: Alternative auth successful:",l),{success:!0,data:l}}}throw new Error(`HTTP error! status: ${a.status}`)}let r=yield a.json();return console.log("ApiService: Received user data:",r),{success:!0,data:r}}catch(a){return console.error("ApiService: User data load error:",a),{success:!1,error:a instanceof Error?a.message:"Unknown error occurred"}}})}saveUserData(t,n,a){return O(this,null,function*(){return this.updateUserData(t,n,a)})}getUserData(t,n){return O(this,null,function*(){return this.loadUserData(t,n)})}updateUserData(t,n,a){return O(this,null,function*(){try{console.log("ApiService: Updating user data with API key:",t,"agentId:",n,"data:",a);let r=yield fetch(ve.USER_DATA(n),{method:"PUT",headers:{accept:"*/*",Authorization:`Bearer ${t}`,"Content-Type":"application/json"},body:JSON.stringify(a)});if(console.log("ApiService: Update user data response status:",r.status),!r.ok){let s=yield r.text();throw console.error("ApiService: HTTP error response:",s),new Error(`HTTP error! status: ${r.status}`)}let i=yield r.json();return console.log("ApiService: Updated user data response:",i),{success:!0,data:i}}catch(r){return console.error("ApiService: Update user data error:",r),{success:!1,error:r instanceof Error?r.message:"Unknown error occurred"}}})}loadResources(t,n){return O(this,null,function*(){try{console.log("ApiService: Loading resources with API key:",t,"agentId:",n);let a=yield fetch(ve.AGENT_RESOURCES(n),{method:"GET",headers:{accept:"application/json",Authorization:`Bearer ${t}`}});if(console.log("ApiService: Resources response status:",a.status),!a.ok)throw new Error(`HTTP error! status: ${a.status}`);let r=yield a.json();return console.log("ApiService: Resources data:",r),{success:!0,data:r||[]}}catch(a){return console.error("ApiService: Error loading resources:",a),{success:!1,error:a instanceof Error?a.message:"Unknown error occurred"}}})}createResource(t,n,a){return O(this,null,function*(){try{let r=yield fetch(ve.AGENT_RESOURCES(n),{method:"POST",headers:{accept:"application/json",Authorization:`Bearer ${t}`,"Content-Type":"application/json"},body:JSON.stringify(a)});if(!r.ok)throw new Error(`HTTP error! status: ${r.status}`);return{success:!0,data:yield r.json()}}catch(r){return console.error("Error creating resource:",r),{success:!1,error:r instanceof Error?r.message:"Unknown error occurred"}}})}updateResource(t,n,a,r){return O(this,null,function*(){try{let i=yield fetch(ve.AGENT_RESOURCE(n,a),{method:"PUT",headers:{accept:"application/json",Authorization:`Bearer ${t}`,"Content-Type":"application/json"},body:JSON.stringify(r)});if(!i.ok)throw new Error(`HTTP error! status: ${i.status}`);return{success:!0,data:yield i.json()}}catch(i){return console.error("Error updating resource:",i),{success:!1,error:i instanceof Error?i.message:"Unknown error occurred"}}})}deleteResource(t,n,a){return O(this,null,function*(){try{let r=yield fetch(ve.AGENT_RESOURCE(n,a),{method:"DELETE",headers:{accept:"*/*",Authorization:`Bearer ${t}`}});if(!r.ok)throw new Error(`HTTP error! status: ${r.status}`);return{success:!0}}catch(r){return console.error("Error deleting resource:",r),{success:!1,error:r instanceof Error?r.message:"Unknown error occurred"}}})}clearUserData(t,n){return O(this,null,function*(){try{console.log("ApiService: Clearing user data with API key:",t,"agentId:",n);let a=yield fetch(ve.USER_DATA(n),{method:"DELETE",headers:{accept:"*/*",Authorization:`Bearer ${t}`}});if(console.log("ApiService: Clear user data response status:",a.status),!a.ok){let i=yield a.text();throw console.error("ApiService: HTTP error response:",i),new Error(`HTTP error! status: ${a.status}`)}let r=yield a.json();return console.log("ApiService: Clear user data response:",r),{success:!0,data:r}}catch(a){return console.error("ApiService: Clear user data error:",a),{success:!1,error:a instanceof Error?a.message:"Unknown error occurred"}}})}createSkill(t,n,a){return O(this,null,function*(){try{let r=yield fetch(ve.CREATE_SKILL(n),{method:"POST",headers:{accept:"application/json",Authorization:`Bearer ${t}`,"Content-Type":"application/json"},body:JSON.stringify({name:a.name,description:a.description||`A Lua skill for ${a.name}`,context:a.context||""})});if(!r.ok){let s=yield r.text();return{success:!1,error:{message:`HTTP ${r.status}: ${s}`}}}return{success:!0,data:yield r.json()}}catch(r){return{success:!1,error:{message:r instanceof Error?r.message:"Unknown error"}}}})}getAgentTypes(t){return O(this,null,function*(){try{let n=yield fetch(ve.AGENT_TYPES,{method:"GET",headers:{Authorization:`Bearer ${t}`,"Content-Type":"application/json"}});if(!n.ok)throw new Error(`HTTP error! status: ${n.status}`);return yield n.json()}catch(n){return console.error("Error fetching agent types:",n),[]}})}createAgent(t,n){return O(this,null,function*(){try{let a=yield fetch(ve.CREATE_AGENT,{method:"POST",headers:{Authorization:`Bearer ${t}`,"Content-Type":"application/json"},body:JSON.stringify(n)});return a.ok?{success:!0,data:yield a.json()}:{success:!1,error:yield a.json()}}catch(a){return{success:!1,error:{message:a instanceof Error?a.message:"Unknown error"}}}})}getAgentDetails(t,n){return O(this,null,function*(){try{let a=yield fetch(ve.AGENT_DETAILS(n),{method:"GET",headers:{Authorization:`Bearer ${t}`,"Content-Type":"application/json"}});return a.ok?{success:!0,data:yield a.json()}:{success:!1,error:yield a.json()}}catch(a){return{success:!1,error:{message:a instanceof Error?a.message:"Unknown error"}}}})}getSkills(t,n){return O(this,null,function*(){try{console.log("ApiService: Loading skills with API key:",t,"agentId:",n);let a=yield fetch(ve.AGENT_SKILLS(n),{method:"GET",headers:{accept:"application/json",Authorization:`Bearer ${t}`}});if(console.log("ApiService: Skills response status:",a.status),!a.ok){let i=yield a.text();throw console.error("ApiService: HTTP error response:",i),new Error(`HTTP error! status: ${a.status}`)}let r=yield a.json();return console.log("ApiService: Received skills data:",r),{success:!0,skills:r.skills||[]}}catch(a){return console.error("ApiService: Skills load error:",a),{success:!1,error:a instanceof Error?a.message:"Unknown error occurred"}}})}activateSkill(t,n,a,r){return O(this,null,function*(){try{console.log(`ApiService: ${r?"Activating":"Deactivating"} skill:`,a,"for agent:",n);let i=yield fetch(ve.ACTIVATE_SKILL(n,a),{method:"PUT",headers:{accept:"application/json",Authorization:`Bearer ${t}`,"Content-Type":"application/json"},body:JSON.stringify({active:r})});if(console.log("ApiService: Activate skill response status:",i.status),!i.ok){let l=yield i.text();throw console.error("ApiService: HTTP error response:",l),new Error(`HTTP error! status: ${i.status}`)}let s=yield i.json();return console.log("ApiService: Activate skill response:",s),{success:!0,data:s}}catch(i){return console.error("ApiService: Activate skill error:",i),{success:!1,error:i instanceof Error?i.message:"Unknown error occurred"}}})}publishSkillVersion(t,n,a,r){return O(this,null,function*(){try{console.log("ApiService: Publishing skill version:",r,"for skill:",a,"agent:",n);let i=yield fetch(ve.PUBLISH_SKILL_VERSION(n,a,r),{method:"PUT",headers:{accept:"application/json",Authorization:`Bearer ${t}`}});if(console.log("ApiService: Publish skill version response status:",i.status),!i.ok){let l=yield i.text();throw console.error("ApiService: HTTP error response:",l),new Error(`HTTP error! status: ${i.status}`)}let s=yield i.json();return console.log("ApiService: Publish skill version response:",s),{success:!0,data:s}}catch(i){return console.error("ApiService: Publish skill version error:",i),{success:!1,error:i instanceof Error?i.message:"Unknown error occurred"}}})}loadProductionLogs(t,n,a=1,r=100){return O(this,null,function*(){try{console.log("ApiService: Loading production logs with API key:",t,"agentId:",n,"page:",a,"limit:",r);let i=yield fetch(`${ve.PRODUCTION_LOGS(n)}?page=${a}&limit=${r}`,{method:"GET",headers:{accept:"application/json",Authorization:`Bearer ${t}`}});if(console.log("ApiService: Production logs response status:",i.status),!i.ok){let l=yield i.text();throw console.error("ApiService: HTTP error response:",l),new Error(`HTTP error! status: ${i.status}`)}let s=yield i.json();return console.log("ApiService: Production logs response:",s),{success:!0,logs:s.logs||[],pagination:s.pagination}}catch(i){return console.error("ApiService: Production logs error:",i),{success:!1,error:i instanceof Error?i.message:"Unknown error occurred"}}})}loadProductionEnv(t,n){return O(this,null,function*(){try{console.log("ApiService: Loading production env with API key:",t,"agentId:",n);let a=yield fetch(ve.PRODUCTION_ENV(n),{method:"GET",headers:{accept:"application/json",Authorization:`Bearer ${t}`}});if(console.log("ApiService: Production env response status:",a.status),!a.ok){let i=yield a.text();throw console.error("ApiService: HTTP error response:",i),new Error(`HTTP error! status: ${a.status}`)}let r=yield a.json();return console.log("ApiService: Production env response:",r),{success:!0,data:r}}catch(a){return console.error("ApiService: Production env error:",a),{success:!1,error:a instanceof Error?a.message:"Unknown error occurred"}}})}updateProductionEnv(t,n,a){return O(this,null,function*(){try{console.log("ApiService: Updating production env with API key:",t,"agentId:",n,"data:",a);let r=yield fetch(ve.PRODUCTION_ENV(n),{method:"POST",headers:{accept:"application/json",Authorization:`Bearer ${t}`,"Content-Type":"application/json"},body:JSON.stringify(a)});if(console.log("ApiService: Update production env response status:",r.status),!r.ok){let s=yield r.text();throw console.error("ApiService: HTTP error response:",s),new Error(`HTTP error! status: ${r.status}`)}let i=yield r.json();return console.log("ApiService: Update production env response:",i),{success:!0,data:i}}catch(r){return console.error("ApiService: Update production env error:",r),{success:!1,error:r instanceof Error?r.message:"Unknown error occurred"}}})}getProducts(t,n,a=1,r=20){return O(this,null,function*(){try{console.log("ApiService: Loading products with API key:",t,"agentId:",n);let i=yield fetch(`${ve.AGENT_PRODUCTS(n)}?page=${a}&limit=${r}`,{method:"GET",headers:{accept:"application/json",Authorization:`Bearer ${t}`}});if(!i.ok)throw new Error(`HTTP error! status: ${i.status}`);return{success:!0,data:yield i.json()}}catch(i){return console.error("ApiService: Products load error:",i),{success:!1,error:i instanceof Error?i.message:"Unknown error occurred"}}})}createProduct(t,n,a){return O(this,null,function*(){try{let r=yield fetch(ve.AGENT_PRODUCTS(n),{method:"POST",headers:{accept:"application/json",Authorization:`Bearer ${t}`,"Content-Type":"application/json"},body:JSON.stringify(a)});if(!r.ok)throw new Error(`HTTP error! status: ${r.status}`);return{success:!0,data:yield r.json()}}catch(r){return console.error("ApiService: Create product error:",r),{success:!1,error:r instanceof Error?r.message:"Unknown error occurred"}}})}updateProduct(t,n,a){return O(this,null,function*(){try{let r=yield fetch(ve.AGENT_PRODUCTS(n),{method:"PUT",headers:{accept:"application/json",Authorization:`Bearer ${t}`,"Content-Type":"application/json"},body:JSON.stringify(a)});if(!r.ok)throw new Error(`HTTP error! status: ${r.status}`);return{success:!0,data:yield r.json()}}catch(r){return console.error("ApiService: Update product error:",r),{success:!1,error:r instanceof Error?r.message:"Unknown error occurred"}}})}deleteProduct(t,n,a){return O(this,null,function*(){try{let r=yield fetch(ve.AGENT_PRODUCT(n,a),{method:"DELETE",headers:{accept:"application/json",Authorization:`Bearer ${t}`}});if(!r.ok)throw new Error(`HTTP error! status: ${r.status}`);return{success:!0,data:yield r.json()}}catch(r){return console.error("ApiService: Delete product error:",r),{success:!1,error:r instanceof Error?r.message:"Unknown error occurred"}}})}searchProducts(t,n,a){return O(this,null,function*(){try{let r=yield fetch(`${ve.SEARCH_PRODUCTS(n)}?searchQuery=${encodeURIComponent(a)}`,{method:"GET",headers:{accept:"application/json",Authorization:`Bearer ${t}`}});if(!r.ok)throw new Error(`HTTP error! status: ${r.status}`);return{success:!0,data:yield r.json()}}catch(r){return console.error("ApiService: Search products error:",r),{success:!1,error:r instanceof Error?r.message:"Unknown error occurred"}}})}},re=new gm});var ji,ht,vm,rN=N(()=>{"use strict";ji=Z($e());hm();Zt();ht=Z(oe()),vm=({apiKey:e,agentId:t,skillId:n,sandboxId:a,persona:r,sharedChatMessages:i,onSharedSendMessage:s,onSharedClearHistory:l,isChatLoading:o,setIsChatLoading:c})=>{let[u,p]=(0,ji.useState)(""),f=(0,ji.useRef)(null),d=()=>{var h;(h=f.current)==null||h.scrollIntoView({behavior:"smooth"})};(0,ji.useEffect)(()=>{d()},[i]);let x=i.length>0?i.map(h=>({text:h.text,isUser:h.sender==="user",timestamp:h.timestamp})):[{text:"\u{1F44B} Welcome! Start chatting to test your Lua skill. Your messages will be sent to the sandbox environment.",isUser:!1,timestamp:new Date}],y=h=>O(null,null,function*(){if(!h.trim())return;let g={id:Date.now().toString(),text:h,sender:"user",timestamp:new Date};s(g),p(""),c(!0);try{let S=yield re.sendLocalChatMessage(h,r),T={id:(Date.now()+1).toString(),text:S.success?S.text||"No response received":`\u274C ${S.error||"Failed to send message"}`,sender:"assistant",timestamp:new Date};s(T)}catch(S){let T={id:(Date.now()+2).toString(),text:`\u274C Error: ${S instanceof Error?S.message:"Unknown error"}`,sender:"assistant",timestamp:new Date};s(T)}finally{c(!1)}}),k=h=>{h.preventDefault(),y(u)},m=h=>{h.key==="Enter"&&!h.shiftKey&&(h.preventDefault(),y(u))};return(0,ht.jsxs)("div",{className:"chat-container",children:[(0,ht.jsxs)("div",{className:"chat-header",children:[(0,ht.jsx)("div",{className:"chat-header-content",children:(0,ht.jsxs)("div",{children:[(0,ht.jsx)("h1",{children:"Chat to your Agent [Sandbox]"}),(0,ht.jsx)("p",{children:"Test your sandbox skill in real-time"})]})}),(0,ht.jsx)("button",{className:"clear-chat-button",onClick:l,disabled:o,title:"Clear chat history",children:"\u{1F5D1}\uFE0F"})]}),(0,ht.jsxs)("div",{className:"chat-messages",children:[x.map((h,g)=>(0,ht.jsx)("div",{className:`message ${h.isUser?"user":"assistant"}`,children:(0,ht.jsx)("div",{className:"message-bubble",children:(0,ht.jsx)(Nl,{children:h.text})})},g)),o&&(0,ht.jsx)("div",{className:"loading",children:(0,ht.jsx)("img",{src:"https://admin.lua.dev/images/logo.svg",alt:"Loading",className:"loading-logo"})}),(0,ht.jsx)("div",{ref:f})]}),(0,ht.jsx)("div",{className:"chat-input-container",children:(0,ht.jsxs)("form",{className:"chat-input-form",onSubmit:k,children:[(0,ht.jsx)("input",{type:"text",id:"chat-input",name:"chatMessage",className:"chat-input",value:u,onChange:h=>p(h.target.value),onKeyDown:m,placeholder:"Type your message...",disabled:o,autoComplete:"off"}),(0,ht.jsx)("button",{type:"submit",className:"send-button",disabled:o||!u.trim(),children:"Send"})]})})]})}});var Pn,K,ym,bm=N(()=>{"use strict";Pn=Z($e());Zt();K=Z(oe()),ym=({persona:e,onSavePersona:t,apiKey:n,agentId:a})=>{let[r,i]=(0,Pn.useState)(e),[s,l]=(0,Pn.useState)(!1),[o,c]=(0,Pn.useState)([]),[u,p]=(0,Pn.useState)(!1),[f,d]=(0,Pn.useState)("current"),[x,y]=(0,Pn.useState)(null),[k,m]=(0,Pn.useState)(!1),[h,g]=(0,Pn.useState)(!1);(0,Pn.useEffect)(()=>{i(e)},[e]),(0,Pn.useEffect)(()=>{S()},[]);let S=()=>O(null,null,function*(){p(!0);try{let R=yield re.getPersonaVersions(a,n);if(R.success&&R.versions){let L=R.versions.sort((G,P)=>P.createdDate-G.createdDate);c(L)}else console.error("Failed to load persona versions:",R.error),c([])}catch(R){console.error("Error loading persona versions:",R),c([])}finally{p(!1)}}),T=R=>{d(R),x&&y(null)},E=R=>{y(R)},w=()=>{y(null)},C=()=>{if(!r.trim()){alert("Please enter a persona before creating a version");return}g(!0)},U=()=>O(null,null,function*(){m(!0);try{let R=yield re.createPersonaVersion(a,n,r.trim());if(R.success)console.log("\u2705 Persona version created successfully:",R.data),yield S(),d("versions"),alert("\u2705 Persona version created successfully! You can deploy it from the Production tab.");else throw new Error(R.error||"Failed to create persona version")}catch(R){console.error("\u274C Error creating persona version:",R),alert(`\u274C Failed to create persona version: ${R instanceof Error?R.message:"Unknown error"}`)}finally{m(!1),g(!1)}}),H=()=>{g(!1)},_=()=>O(null,null,function*(){let R=r.trim();if(!R){alert("Persona cannot be empty");return}l(!0);try{(yield t(R))&&i(R)}finally{l(!1)}});return x?(0,K.jsxs)("div",{className:"persona-section",children:[(0,K.jsx)("div",{className:"persona-header",children:(0,K.jsxs)("div",{className:"header-left",children:[(0,K.jsx)("button",{className:"back-button",onClick:w,children:"\u2190"}),(0,K.jsxs)("h3",{children:["Persona v",x.version]})]})}),(0,K.jsxs)("div",{className:"persona-version-details",children:[(0,K.jsx)("div",{className:"version-metadata",children:(0,K.jsxs)("div",{className:"metadata-grid",children:[(0,K.jsxs)("div",{className:"metadata-item",children:[(0,K.jsx)("span",{className:"metadata-label",children:"Created By"}),(0,K.jsx)("span",{className:"metadata-value",children:x.createdBy})]}),(0,K.jsxs)("div",{className:"metadata-item",children:[(0,K.jsx)("span",{className:"metadata-label",children:"Status"}),(0,K.jsx)("span",{className:`version-status ${x.isCurrent?"active":"available"}`,children:x.isCurrent?"Active (Deployed)":"Available"})]}),(0,K.jsxs)("div",{className:"metadata-item",children:[(0,K.jsx)("span",{className:"metadata-label",children:"Created Date"}),(0,K.jsx)("span",{className:"metadata-value",children:new Date(x.createdDate).toLocaleDateString("en-US",{year:"numeric",month:"long",day:"numeric",hour:"2-digit",minute:"2-digit"})})]})]})}),(0,K.jsxs)("div",{className:"persona-content",children:[(0,K.jsx)("h4",{children:"Persona Content"}),(0,K.jsx)("div",{className:"persona-display",children:(0,K.jsx)("pre",{children:x.persona})})]})]})]}):(0,K.jsxs)("div",{className:"persona-section",children:[(0,K.jsx)("div",{className:"persona-header",children:(0,K.jsx)("h3",{children:"Agent Persona"})}),(0,K.jsxs)("div",{className:"persona-tabs",children:[(0,K.jsxs)("div",{className:"tabs-header",children:[(0,K.jsx)("button",{className:`tab-button ${f==="current"?"active":""}`,onClick:()=>T("current"),children:"Current"}),(0,K.jsxs)("button",{className:`tab-button ${f==="versions"?"active":""}`,onClick:()=>T("versions"),children:["Versions (",o.length,")"]})]}),(0,K.jsx)("div",{className:"tab-content",children:f==="current"?(0,K.jsxs)("div",{className:"current-persona-tab",children:[(0,K.jsxs)("div",{className:"persona-edit-header",children:[(0,K.jsx)("h4",{children:"Edit Current Persona"}),(0,K.jsxs)("div",{className:"persona-actions",children:[(0,K.jsx)("button",{className:"save-btn",onClick:_,disabled:s,title:"Save persona to YAML",children:s?"\u27F3":"\u{1F4BE}"}),(0,K.jsx)("button",{className:"create-version-btn",onClick:C,disabled:k||!r.trim(),title:"Create new persona version",children:k?"Creating...":"Create Version"})]})]}),(0,K.jsx)("div",{className:"persona-edit",children:(0,K.jsx)("textarea",{value:r,onChange:R=>i(R.target.value),placeholder:"Enter agent persona...",className:"persona-textarea"})}),(0,K.jsx)("div",{className:"persona-help",children:(0,K.jsxs)("p",{children:["This persona is stored in your ",(0,K.jsx)("code",{children:"lua.skill.yaml"})," file and used for local development."]})})]}):(0,K.jsx)("div",{className:"versions-persona-tab",children:u?(0,K.jsx)("div",{className:"versions-loading",children:(0,K.jsx)("img",{src:"https://admin.lua.dev/images/logo.svg",alt:"Loading",className:"loading-logo"})}):o.length>0?(0,K.jsx)("div",{className:"versions-list",children:o.map((R,L)=>(0,K.jsxs)("div",{className:`version-item ${R.isCurrent?"active":"available"}`,onClick:()=>E(R),children:[(0,K.jsxs)("div",{className:"version-info",children:[(0,K.jsxs)("div",{className:"version-header",children:[(0,K.jsxs)("span",{className:"version-number",children:["v",R.version]}),(0,K.jsx)("span",{className:`version-status ${R.isCurrent?"active":"available"}`,children:R.isCurrent?"Active":"Available"})]}),(0,K.jsx)("div",{className:"version-date",children:new Date(R.createdDate).toLocaleDateString()})]}),(0,K.jsx)("div",{className:"version-arrow",children:"\u2192"})]},L))}):(0,K.jsxs)("div",{className:"no-versions",children:[(0,K.jsx)("div",{className:"no-versions-icon",children:"\u{1F464}"}),(0,K.jsx)("div",{className:"no-versions-text",children:"No persona versions found"}),(0,K.jsx)("div",{className:"no-versions-subtext",children:"Persona versions will appear here when available"})]})})})]}),h&&(0,K.jsx)("div",{className:"version-modal-overlay",children:(0,K.jsxs)("div",{className:"version-modal",children:[(0,K.jsx)("div",{className:"version-modal-header",children:(0,K.jsx)("h3",{children:"Create Persona Version"})}),(0,K.jsxs)("div",{className:"version-modal-body",children:[(0,K.jsx)("p",{children:"This will create a new persona version that can be deployed to production."}),(0,K.jsxs)("p",{children:[(0,K.jsx)("strong",{children:"Note:"})," The version will be created but not automatically released. You can deploy it from the Production tab."]}),(0,K.jsxs)("div",{className:"persona-preview-box",children:[(0,K.jsx)("h4",{children:"Persona Content:"}),(0,K.jsxs)("div",{className:"persona-preview-content",children:[r.substring(0,300),r.length>300?"...":""]})]})]}),(0,K.jsxs)("div",{className:"version-modal-actions",children:[(0,K.jsx)("button",{className:"cancel-button",onClick:H,disabled:k,children:"Cancel"}),(0,K.jsx)("button",{className:"create-button",onClick:U,disabled:k,children:k?"Creating...":"Create Version"})]})]})})]})}});var Ct,A,xm,Sm=N(()=>{"use strict";Ct=Z($e());Zt();A=Z(oe()),xm=({apiKey:e,agentId:t,skillId:n,sandboxId:a})=>{var Ji;let[r,i]=(0,Ct.useState)([]),[s,l]=(0,Ct.useState)(null),[o,c]=(0,Ct.useState)(null),[u,p]=(0,Ct.useState)([]),[f,d]=(0,Ct.useState)(!1),[x,y]=(0,Ct.useState)("current"),[k,m]=(0,Ct.useState)(!1),[h,g]=(0,Ct.useState)(!1),[S,T]=(0,Ct.useState)(""),[E,w]=(0,Ct.useState)({}),[C,U]=(0,Ct.useState)(null),[H,_]=(0,Ct.useState)(!0),[R,L]=(0,Ct.useState)(!1),[G,P]=(0,Ct.useState)(null),[W,ie]=(0,Ct.useState)([]);(0,Ct.useEffect)(()=>{we(),Ue()},[]);let we=()=>O(null,null,function*(){_(!0),P(null);try{console.log("Loading skills from /api/skills...");let I=yield fetch("/api/skills");if(console.log("Skills API response status:",I.status),!I.ok)throw new Error(`HTTP ${I.status}: ${I.statusText}`);let Y=yield I.json();console.log("Skills API response data:",Y),Y.success&&Y.skills&&Array.isArray(Y.skills)?(console.log("Skills loaded successfully:",Y.skills),i(Y.skills),P(null)):(console.error("Failed to load skills:",Y.error),P(Y.error||"Failed to load skills - invalid data format"),i([]))}catch(I){console.error("Error loading skills:",I),P(I instanceof Error?I.message:"Failed to load skills"),i([])}finally{_(!1)}}),Ue=()=>O(null,null,function*(){try{let Y=yield(yield fetch("/tools")).json();if(Y.success&&Y.tools){let le=[];Array.isArray(Y.tools)?le=Y.tools:typeof Y.tools=="object"&&(le=Object.entries(Y.tools).map(([He,Pt])=>ee({name:He},Pt))),ie(le)}else console.error("Failed to load tools:",Y.error),ie([])}catch(I){console.error("Error loading tools:",I),ie([])}}),v=I=>{let Y={};I.inputSchema.properties&&Object.keys(I.inputSchema.properties).forEach(le=>{let He=I.inputSchema.properties[le];Y[le]=_e(He)}),w(Y)},_e=I=>{if(I.type==="object"&&I.properties){let Y={};return Object.keys(I.properties).forEach(le=>{Y[le]=_e(I.properties[le])}),Y}else return I.type==="number"?0:I.type==="boolean"?!1:""},lt=I=>{let Y=W.find(le=>le.name===I);Y&&(c(Y),v(Y),U(null))},b=I=>O(null,null,function*(){d(!0);try{let Y=yield re.getSkillVersions(I.skillId,t,e);if(Y.success&&Y.versions){let le=Y.versions.sort((He,Pt)=>new Date(Pt.createdDate||Pt.createdAt).getTime()-new Date(He.createdDate||He.createdAt).getTime());p(le)}else console.error("Failed to load skill versions:",Y.error),p([])}catch(Y){console.error("Error loading skill versions:",Y),p([])}finally{d(!1)}}),Fe=I=>{let Y=r.find(le=>le.name===I);Y&&(l(I),y("current"),b(Y))},vt=()=>{l(null),y("current"),p([]),c(null),U(null)},ce=I=>{y(I),o&&(c(null),U(null))},Q=()=>{c(null),U(null)},F=()=>O(null,null,function*(){if(!s)return;let I=r.find(le=>le.name===s);if(!I)return;u.some(le=>le.version===I.version)?(T(I.version),g(!0)):yield V(I.version)}),V=I=>O(null,null,function*(){if(!s)return;let Y=r.find(le=>le.name===s);if(Y){m(!0);try{let He=yield(yield fetch("/tools")).json();if(!He.success||!He.tools)throw new Error("Failed to load current tools data");let Pt=[];Array.isArray(He.tools)?Pt=He.tools:typeof He.tools=="object"&&(Pt=Object.entries(He.tools).map(([ft,D])=>({name:ft,description:D.description||"",inputSchema:D.inputSchema||{type:"object"},execute:D.execute||""})));let dn=Pt.filter(ft=>Y.tools.includes(ft.name)),_t={name:Y.name,version:I,description:Y.description,context:Y.context,tools:dn};console.log("Creating version with data:",_t);let en=yield re.createSkillVersion(Y.skillId,t,e,_t);if(en.success)console.log("\u2705 Version created successfully:",en.data),yield b(Y),alert(`\u2705 Version ${I} created successfully!`);else throw new Error(en.error||"Failed to create version")}catch(le){console.error("\u274C Error creating version:",le),alert(`\u274C Failed to create version: ${le instanceof Error?le.message:"Unknown error"}`)}finally{m(!1),g(!1)}}}),B=()=>O(null,null,function*(){if(!S.trim()){alert("Please enter a version number");return}if(u.some(Y=>Y.version===S.trim())){alert("This version already exists. Please enter a different version number.");return}yield V(S.trim())}),J=()=>{g(!1),T("")},he=(I,Y,le)=>{w(He=>le?tt(ee({},He),{[I]:tt(ee({},He[I]),{[le]:Y})}):tt(ee({},He),{[I]:Y}))},Xe=()=>O(null,null,function*(){if(o){L(!0),U(null);try{let I=Pl(E,o.inputSchema),Y=yield re.testLocalTool(o.name,I);U(Y)}catch(I){U({success:!1,error:I instanceof Error?I.message:"Unknown error occurred"})}finally{L(!1)}}}),Pl=(I,Y)=>{var He,Pt;let le={};for(let[dn,_t]of Object.entries(I))if(_t&&typeof _t=="object"&&!Array.isArray(_t)){let en=(He=Y.properties)==null?void 0:He[dn];if(en&&en.type==="object"&&en.properties){let ft=Pl(_t,en);Object.keys(ft).length>0&&(le[dn]=ft)}else le[dn]=_t}else{let en=(Pt=Y.properties)==null?void 0:Pt[dn];if((!Y.required||!Y.required.includes(dn))&&(_t===""||_t===null||_t===void 0))continue;le[dn]=_t}return le},$i=(I,Y,le)=>{var dn,_t,en;let He=le?((dn=E[I])==null?void 0:dn[le])||"":E[I]||"",Pt=le?(_t=Y.required)==null?void 0:_t.includes(le):(en=o==null?void 0:o.inputSchema.required)==null?void 0:en.includes(I);if(Y.type==="object"&&Y.properties)return(0,A.jsxs)("div",{className:"nested-object",children:[(0,A.jsx)("div",{className:"nested-object-label",children:I}),(0,A.jsx)("div",{className:"nested-fields",children:Object.entries(Y.properties).map(([ft,D])=>{var X;return(0,A.jsxs)("div",{className:"nested-field",children:[(0,A.jsxs)("label",{className:"nested-label",children:[ft,((X=Y.required)==null?void 0:X.includes(ft))&&(0,A.jsx)("span",{className:"required",children:"*"})]}),$i(I,D,ft),D.description&&(0,A.jsx)("div",{className:"input-description",children:D.description})]},ft)})})]});switch(Y.type){case"number":return(0,A.jsx)("input",{type:"number",value:He,onChange:ft=>he(I,parseFloat(ft.target.value)||0,le),placeholder:Y.description||`Enter ${le||I}`,className:"tool-input",required:Pt});case"boolean":return(0,A.jsx)("input",{type:"checkbox",checked:He,onChange:ft=>he(I,ft.target.checked,le),className:"tool-checkbox"});case"string":default:return(0,A.jsx)("input",{type:"text",value:He,onChange:ft=>he(I,ft.target.value,le),placeholder:Y.description||`Enter ${le||I}`,className:"tool-input",required:Pt})}};if(H)return(0,A.jsx)("div",{className:"skills-page",children:(0,A.jsx)("div",{className:"skills-loading",children:(0,A.jsx)("img",{src:"https://admin.lua.dev/images/logo.svg",alt:"Loading",className:"loading-logo"})})});if(o)return(0,A.jsx)("div",{className:"skills-page",children:(0,A.jsxs)("div",{className:"tool-form",children:[(0,A.jsxs)("div",{className:"tool-form-header",children:[(0,A.jsx)("button",{className:"back-button",onClick:Q,title:"Back to skill",children:"\u2190"}),(0,A.jsx)("h3",{children:o.name})]}),(0,A.jsxs)("div",{className:"tool-form-content",children:[(0,A.jsx)("div",{className:"tool-info",children:(0,A.jsx)("p",{children:o.description})}),(0,A.jsxs)("div",{className:"tool-inputs",children:[(0,A.jsx)("h4",{children:"Input Parameters"}),Object.keys(o.inputSchema.properties||{}).length>0?(0,A.jsx)("div",{className:"input-fields",children:Object.entries(o.inputSchema.properties).map(([I,Y])=>{var le;return(0,A.jsxs)("div",{className:"input-field",children:[(0,A.jsxs)("label",{children:[I,((le=o.inputSchema.required)==null?void 0:le.includes(I))&&(0,A.jsx)("span",{className:"required",children:"*"})]}),$i(I,Y),Y.description&&(0,A.jsx)("div",{className:"input-description",children:Y.description})]},I)})}):(0,A.jsx)("p",{className:"no-inputs",children:"This tool requires no input parameters."})]}),(0,A.jsx)("div",{className:"tool-actions",children:(0,A.jsx)("button",{onClick:Xe,disabled:R,className:"test-button",children:R?"Testing...":"Test Tool"})}),C&&(0,A.jsxs)("div",{className:"test-result",children:[(0,A.jsx)("h4",{children:"Test Result"}),(0,A.jsx)("div",{className:`result-content ${C.success?"success":"error"}`,children:C.success?(0,A.jsxs)("div",{children:[(0,A.jsx)("div",{className:"result-label",children:"\u2705 Success"}),(0,A.jsx)("pre",{className:"result-data",children:JSON.stringify(C.result,null,2)})]}):(0,A.jsxs)("div",{children:[(0,A.jsx)("div",{className:"result-label",children:"\u274C Error"}),(0,A.jsx)("div",{className:"result-error",children:C.error})]})})]})]})]})});if(s){let I=r.find(Y=>Y.name===s);return I?(0,A.jsxs)("div",{className:"skills-page",children:[(0,A.jsxs)("div",{className:"skills-header",children:[(0,A.jsxs)("div",{className:"header-left",children:[(0,A.jsx)("button",{className:"back-button",onClick:vt,children:"\u2190"}),(0,A.jsx)("h4",{children:I.name})]}),(0,A.jsx)("button",{className:"create-version-button",onClick:F,disabled:k,title:"Create new version",children:k?"Creating...":"Create Version"})]}),(0,A.jsxs)("div",{className:"skill-tabs",children:[(0,A.jsxs)("div",{className:"tabs-header",children:[(0,A.jsx)("button",{className:`tab-button ${x==="current"?"active":""}`,onClick:()=>ce("current"),children:"Current"}),(0,A.jsxs)("button",{className:`tab-button ${x==="versions"?"active":""}`,onClick:()=>ce("versions"),children:["Versions (",u.length,")"]})]}),(0,A.jsx)("div",{className:"tab-content",children:x==="current"?(0,A.jsxs)("div",{className:"current-skill-tab",children:[(0,A.jsx)("div",{className:"skill-details",children:(0,A.jsxs)("div",{className:"skill-info-section",children:[(0,A.jsxs)("div",{className:"skill-meta",children:[(0,A.jsxs)("span",{className:"skill-version",children:["v",I.version]}),(0,A.jsxs)("span",{className:"skill-tools-count",children:[I.tools.length," tools"]})]}),I.description&&(0,A.jsxs)("div",{className:"skill-description-section",children:[(0,A.jsx)("h5",{children:"Description"}),(0,A.jsx)("p",{children:I.description})]}),I.context&&(0,A.jsxs)("div",{className:"skill-context-section",children:[(0,A.jsx)("h5",{children:"Context"}),(0,A.jsx)("p",{children:I.context})]})]})}),(0,A.jsxs)("div",{className:"tools-section",children:[(0,A.jsx)("div",{className:"tools-header",children:(0,A.jsxs)("h5",{children:["Available Tools (",I.tools.length,")"]})}),I.tools&&I.tools.length>0?(0,A.jsx)("div",{className:"tools-grid",children:I.tools.map((Y,le)=>(0,A.jsxs)("div",{className:"tool-card",onClick:()=>lt(Y),children:[(0,A.jsx)("div",{className:"tool-card-header",children:(0,A.jsx)("h4",{children:Y})}),(0,A.jsx)("div",{className:"tool-card-body",children:(0,A.jsx)("span",{className:"skill-badge",children:I.name})})]},le))}):(0,A.jsxs)("div",{className:"no-tools",children:[(0,A.jsx)("div",{className:"no-tools-icon",children:"\u{1F527}"}),(0,A.jsx)("div",{className:"no-tools-text",children:"No tools in this skill"}),(0,A.jsx)("div",{className:"no-tools-subtext",children:"This skill doesn't have any tools defined"})]})]}),(0,A.jsx)("div",{className:"skills-help",children:(0,A.jsx)("p",{children:"This skill is compiled from your local code and updates automatically when you make changes. Use the tools above to test your skill's functionality."})})]}):(0,A.jsx)("div",{className:"versions-skill-tab",children:f?(0,A.jsx)("div",{className:"versions-loading",children:(0,A.jsx)("img",{src:"https://admin.lua.dev/images/logo.svg",alt:"Loading",className:"loading-logo"})}):u.length>0?(0,A.jsx)("div",{className:"versions-list",children:u.map((Y,le)=>(0,A.jsxs)("div",{className:`version-item ${Y.status}`,onClick:()=>{console.log("Selected version:",Y.version)},children:[(0,A.jsxs)("div",{className:"version-info",children:[(0,A.jsxs)("div",{className:"version-header",children:[(0,A.jsxs)("span",{className:"version-number",children:["v",Y.version]}),(0,A.jsx)("span",{className:`version-status ${Y.status}`,children:Y.status})]}),(0,A.jsxs)("div",{className:"version-meta",children:[(0,A.jsx)("span",{className:"version-date",children:new Date(Y.createdDate||Y.createdAt).toLocaleDateString()}),(0,A.jsxs)("span",{className:"version-author",children:["by ",Y.createdByEmail||Y.createdBy]})]})]}),(0,A.jsx)("div",{className:"version-arrow",children:"\u2192"})]},le))}):(0,A.jsxs)("div",{className:"no-versions",children:[(0,A.jsx)("div",{className:"no-versions-icon",children:"\u{1F4E6}"}),(0,A.jsx)("div",{className:"no-versions-text",children:"No versions found"}),(0,A.jsx)("div",{className:"no-versions-subtext",children:"Create your first version to get started"})]})})})]}),h&&(0,A.jsx)("div",{className:"version-modal-overlay",children:(0,A.jsxs)("div",{className:"version-modal",children:[(0,A.jsx)("div",{className:"version-modal-header",children:(0,A.jsx)("h3",{children:"Create New Version"})}),(0,A.jsxs)("div",{className:"version-modal-body",children:[(0,A.jsxs)("p",{children:["Version ",(0,A.jsx)("strong",{children:(Ji=r.find(Y=>Y.name===s))==null?void 0:Ji.version})," already exists."]}),(0,A.jsx)("p",{children:"Please enter a new version number:"}),(0,A.jsx)("input",{type:"text",value:S,onChange:Y=>T(Y.target.value),placeholder:"e.g., 1.0.1",className:"version-input",autoFocus:!0})]}),(0,A.jsxs)("div",{className:"version-modal-actions",children:[(0,A.jsx)("button",{className:"cancel-button",onClick:J,disabled:k,children:"Cancel"}),(0,A.jsx)("button",{className:"create-button",onClick:B,disabled:k||!S.trim(),children:k?"Creating...":"Create Version"})]})]})})]}):(0,A.jsxs)("div",{className:"skills-page",children:[(0,A.jsx)("div",{className:"skills-header",children:(0,A.jsxs)("div",{className:"header-left",children:[(0,A.jsx)("button",{className:"back-button",onClick:vt,children:"\u2190"}),(0,A.jsx)("h4",{children:"Skill Not Found"})]})}),(0,A.jsxs)("div",{className:"no-skills",children:[(0,A.jsx)("div",{className:"no-skills-icon",children:"\u274C"}),(0,A.jsx)("div",{className:"no-skills-text",children:"Skill not found"}),(0,A.jsx)("div",{className:"no-skills-subtext",children:"The selected skill could not be loaded"})]})]})}return(0,A.jsxs)("div",{className:"skills-page",children:[(0,A.jsxs)("div",{className:"skills-header",children:[(0,A.jsx)("h3",{children:"Available Skills"}),(0,A.jsx)("button",{className:"refresh-button",onClick:we,title:"Refresh skills",children:"\u21BB"})]}),(0,A.jsx)("div",{className:"skills-content",children:G?(0,A.jsxs)("div",{className:"no-skills",children:[(0,A.jsx)("div",{className:"no-skills-icon",children:"\u274C"}),(0,A.jsx)("div",{className:"no-skills-text",children:"Error loading skills"}),(0,A.jsx)("div",{className:"no-skills-subtext",children:G}),(0,A.jsx)("button",{className:"retry-button",onClick:we,style:{marginTop:"16px"},children:"Retry"})]}):r.length===0?(0,A.jsxs)("div",{className:"no-skills",children:[(0,A.jsx)("div",{className:"no-skills-icon",children:"\u2699\uFE0F"}),(0,A.jsx)("div",{className:"no-skills-text",children:"No skills found"}),(0,A.jsx)("div",{className:"no-skills-subtext",children:"Skills will appear here when available in your project"})]}):Array.isArray(r)&&r.length>0?(0,A.jsx)("div",{className:"skills-list",children:r.map(I=>(0,A.jsxs)("div",{className:"skill-item",onClick:()=>Fe(I.name),children:[(0,A.jsxs)("div",{className:"skill-info",children:[(0,A.jsx)("div",{className:"skill-name",children:I.name}),(0,A.jsx)("div",{className:"skill-description",children:I.description}),(0,A.jsxs)("div",{className:"skill-stats",children:[(0,A.jsxs)("span",{className:"skill-stat",children:["v",I.version]}),(0,A.jsxs)("span",{className:"skill-stat",children:[I.tools.length," tools"]})]})]}),(0,A.jsx)("div",{className:"skill-arrow",children:"\u2192"})]},I.name))}):(0,A.jsxs)("div",{className:"no-skills",children:[(0,A.jsx)("div",{className:"no-skills-icon",children:"\u2699\uFE0F"}),(0,A.jsx)("div",{className:"no-skills-text",children:"No skills available"}),(0,A.jsx)("div",{className:"no-skills-subtext",children:"No valid skills data received"})]})})]})}});var iN=N(()=>{});var gt,$,El,Kc=N(()=>{"use strict";gt=Z($e());Zt();iN();$=Z(oe()),El=({apiKey:e,agentId:t,isProduction:n=!1})=>{let[a,r]=(0,gt.useState)([]),[i,s]=(0,gt.useState)(!0),[l,o]=(0,gt.useState)(""),[c,u]=(0,gt.useState)([]),[p,f]=(0,gt.useState)(null),[d,x]=(0,gt.useState)(!1),[y,k]=(0,gt.useState)(!1),[m,h]=(0,gt.useState)({}),[g,S]=(0,gt.useState)(null),[T,E]=(0,gt.useState)(null),[w,C]=(0,gt.useState)(!1),[U,H]=(0,gt.useState)(!1),[_,R]=(0,gt.useState)(1),[L,G]=(0,gt.useState)(1),[P,W]=(0,gt.useState)(0);(0,gt.useEffect)(()=>{ie()},[e,t,_]),(0,gt.useEffect)(()=>{if(l.trim()){let V=a.filter(B=>Object.values(B).some(J=>String(J).toLowerCase().includes(l.toLowerCase())));u(V)}else u(a)},[a,l]),(0,gt.useEffect)(()=>{if(g||T){let V=setTimeout(()=>{S(null),E(null)},5e3);return()=>clearTimeout(V)}},[g,T]);let ie=()=>O(null,null,function*(){var V,B;s(!0);try{let J=yield re.getProducts(e,t,_,20);J.success&&J.data?(r(J.data.data||[]),G(((V=J.data.pagination)==null?void 0:V.totalPages)||1),W(((B=J.data.pagination)==null?void 0:B.totalCount)||0)):(console.error("Failed to load products:",J.error),r([]),S("Failed to load products"))}catch(J){console.error("Error loading products:",J),r([]),S("Failed to load products")}finally{s(!1)}}),we=()=>O(null,null,function*(){if(!l.trim()){u(a);return}try{let V=yield re.searchProducts(e,t,l);V.success&&V.data?u(V.data.data||[]):S("Search failed")}catch(V){console.error("Search error:",V),S("Search failed")}}),Ue=V=>{f(V),h(ee({},V)),x(!1)},v=()=>{f(null),h({id:"",name:"",description:"",price:""}),k(!0),x(!0)},_e=()=>{x(!0)},lt=()=>O(null,null,function*(){var V,B;if(!((V=m.id)!=null&&V.trim())){S("Product ID is required");return}C(!0);try{let J;y?J=yield re.createProduct(e,t,m):J=yield re.updateProduct(e,t,m),J.success?(E(y?"Product created successfully":"Product updated successfully"),x(!1),k(!1),f(((B=J.data)==null?void 0:B.product)||m),yield ie()):S(`Failed to ${y?"create":"update"} product`)}catch(J){console.error("Save error:",J),S(`Failed to ${y?"create":"update"} product`)}finally{C(!1)}}),b=()=>O(null,null,function*(){if(!(!p||!p.id)&&confirm(`Are you sure you want to delete "${p.name||p.id}"?`)){H(!0);try{(yield re.deleteProduct(e,t,p.id)).success?(E("Product deleted successfully"),f(null),yield ie()):S("Failed to delete product")}catch(V){console.error("Delete error:",V),S("Failed to delete product")}finally{H(!1)}}}),Fe=()=>{x(!1),k(!1),p?h(ee({},p)):f(null)},vt=()=>{f(null),x(!1),k(!1)},ce=(V,B)=>{h(J=>tt(ee({},J),{[V]:B}))},Q=()=>{var J;let V=["id","name","description","price"],B=new Set([...V,...Object.keys(m)]);return(0,$.jsxs)("div",{className:"product-form",children:[(0,$.jsxs)("div",{className:"form-fields",children:[Array.from(B).map(he=>(0,$.jsxs)("div",{className:"form-group",children:[(0,$.jsx)("label",{htmlFor:`product-${he}`,children:he}),(0,$.jsx)("input",{id:`product-${he}`,type:he==="price"?"number":"text",value:m[he]||"",onChange:Xe=>ce(he,Xe.target.value),placeholder:`Enter ${he}...`,disabled:w,required:he==="id"})]},he)),(0,$.jsxs)("div",{className:"form-group",children:[(0,$.jsx)("label",{htmlFor:"add-field",children:"Add Custom Field"}),(0,$.jsxs)("div",{className:"add-field-container",children:[(0,$.jsx)("input",{id:"add-field-key",type:"text",placeholder:"Field name",onKeyPress:he=>{if(he.key==="Enter"){let Xe=he.target.value.trim();Xe&&!m.hasOwnProperty(Xe)&&(ce(Xe,""),he.target.value="")}}}),(0,$.jsx)("span",{className:"field-hint",children:"Press Enter to add"})]})]})]}),(0,$.jsxs)("div",{className:"form-actions",children:[(0,$.jsx)("button",{className:"cancel-button",onClick:Fe,disabled:w,children:"Cancel"}),(0,$.jsx)("button",{className:"save-button",onClick:lt,disabled:w||!((J=m.id)!=null&&J.trim()),children:w?"Saving...":y?"Create Product":"Update Product"})]})]})},F=()=>p?(0,$.jsxs)("div",{className:"product-detail",children:[(0,$.jsxs)("div",{className:"product-detail-header",children:[(0,$.jsx)("button",{className:"back-button",onClick:vt,title:"Back to products",children:"\u2190"}),(0,$.jsx)("h4",{children:p.name||p.id}),(0,$.jsx)("div",{className:"product-actions",children:!d&&(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)("button",{className:"edit-button",onClick:_e,disabled:U,children:"\u270F\uFE0F"}),(0,$.jsx)("button",{className:"delete-button",onClick:b,disabled:U,children:U?"\u27F3":"\u{1F5D1}\uFE0F"})]})})]}),d?Q():(0,$.jsx)("div",{className:"product-info",children:Object.entries(p).map(([V,B])=>(0,$.jsxs)("div",{className:"product-field",children:[(0,$.jsx)("div",{className:"field-label",children:V}),(0,$.jsx)("div",{className:"field-value",children:String(B)})]},V))})]}):null;return i&&a.length===0?(0,$.jsx)("div",{className:"product-management",children:(0,$.jsx)("div",{className:"loading-container",children:(0,$.jsx)("img",{src:"https://admin.lua.dev/images/logo.svg",alt:"Loading",className:"loading-logo"})})}):(0,$.jsxs)("div",{className:"product-management",children:[(0,$.jsx)("div",{className:"product-header",children:p||y?(0,$.jsx)("div",{className:"detail-header",children:(0,$.jsx)("h3",{children:y?"Create Product":"Product Details"})}):(0,$.jsxs)($.Fragment,{children:[(0,$.jsxs)("div",{className:"header-content",children:[(0,$.jsxs)("h3",{children:["Products ",n?"(Production)":"(Sandbox)"]}),P>0&&(0,$.jsxs)("span",{className:"product-count",children:[P," products"]})]}),(0,$.jsxs)("div",{className:"header-actions",children:[(0,$.jsx)("button",{className:"create-button",onClick:v,children:"\u2795"}),(0,$.jsx)("button",{className:"refresh-button",onClick:ie,disabled:i,children:i?"\u27F3":"\u21BB"})]})]})}),g&&(0,$.jsx)("div",{className:"error-message",children:g}),T&&(0,$.jsx)("div",{className:"success-message",children:T}),(0,$.jsx)("div",{className:"product-content",children:p||y?F():(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)("div",{className:"product-search",children:(0,$.jsxs)("div",{className:"search-container",children:[(0,$.jsx)("input",{type:"text",placeholder:"Search products...",value:l,onChange:V=>o(V.target.value),className:"search-input"}),(0,$.jsx)("button",{className:"search-button",onClick:we,children:"\u{1F50D}"})]})}),(0,$.jsx)("div",{className:"products-list",children:c.length>0?c.map(V=>(0,$.jsxs)("div",{className:"product-item",onClick:()=>Ue(V),children:[(0,$.jsxs)("div",{className:"product-info",children:[(0,$.jsx)("div",{className:"product-name",children:V.name||V.id}),(0,$.jsx)("div",{className:"product-description",children:V.description||"No description"}),(0,$.jsxs)("div",{className:"product-meta",children:["ID: ",V.id,V.price&&(0,$.jsxs)("span",{children:[" \u2022 Price: ",V.price]})]})]}),(0,$.jsx)("div",{className:"product-arrow",children:"\u2192"})]},V.id)):l?(0,$.jsxs)("div",{className:"no-products",children:[(0,$.jsx)("div",{className:"no-products-icon",children:"\u{1F50D}"}),(0,$.jsx)("div",{className:"no-products-text",children:"No products found"}),(0,$.jsx)("div",{className:"no-products-subtext",children:"Try a different search term"})]}):(0,$.jsxs)("div",{className:"no-products",children:[(0,$.jsx)("div",{className:"no-products-icon",children:"\u{1F4E6}"}),(0,$.jsx)("div",{className:"no-products-text",children:"No products yet"}),(0,$.jsx)("div",{className:"no-products-subtext",children:"Create your first product to get started"})]})}),L>1&&(0,$.jsxs)("div",{className:"product-pagination",children:[(0,$.jsxs)("div",{className:"pagination-info",children:["Page ",_," of ",L]}),(0,$.jsxs)("div",{className:"pagination-controls",children:[(0,$.jsx)("button",{className:"pagination-button",onClick:()=>R(V=>Math.max(1,V-1)),disabled:_<=1||i,children:"\u2190"}),(0,$.jsx)("button",{className:"pagination-button",onClick:()=>R(V=>Math.min(L,V+1)),disabled:_>=L||i,children:"\u2192"})]})]})]})})]})}});var Ie,z,kl,U2,Nm,P2,Em=N(()=>{"use strict";Ie=Z($e());Zt();Kc();z=Z(oe()),kl=e=>{if(!e||!e.trim())return e||"";try{let t=JSON.parse(e);return JSON.stringify(t,null,2).replace(/("(\\u[a-zA-Z0-9]{4}|\\[^u]|[^\\"])*"(\s*:)?|\b(true|false|null)\b|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?)/g,a=>{let r="json-number";return/^"/.test(a)?/:$/.test(a)?r="json-key":r="json-string":/true|false/.test(a)?r="json-boolean":/null/.test(a)&&(r="json-null"),`<span class="${r}">${a}</span>`})}catch(t){return e.replace(/("(\\u[a-zA-Z0-9]{4}|\\[^u]|[^\\"])*"(\s*:)?|\b(true|false|null)\b|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?)/g,n=>{let a="json-number";return/^"/.test(n)?/:$/.test(n)?a="json-key":a="json-string":/true|false/.test(n)?a="json-boolean":/null/.test(n)&&(a="json-null"),`<span class="${a}">${n}</span>`})}},U2=[{id:"user",name:"User",description:"User profile and account data",icon:"\u{1F464}"},{id:"resources",name:"Resources",description:"Files, documents, and assets",icon:"\u{1F4C1}"},{id:"products",name:"Products",description:"Product catalog and inventory",icon:"\u{1F4E6}"},{id:"orders",name:"Orders",description:"Coming soon",icon:"\u{1F4CB}"},{id:"booking",name:"Booking",description:"Coming soon",icon:"\u{1F4C5}"},{id:"custom",name:"Custom",description:"Coming soon",icon:"\u2699\uFE0F"}],Nm=({apiKey:e,agentId:t})=>{let[n,a]=(0,Ie.useState)(null),[r,i]=(0,Ie.useState)(null),[s,l]=(0,Ie.useState)(null),[o,c]=(0,Ie.useState)(!1),[u,p]=(0,Ie.useState)(!1),[f,d]=(0,Ie.useState)(!1),[x,y]=(0,Ie.useState)(""),[k,m]=(0,Ie.useState)(null),[h,g]=(0,Ie.useState)(null),[S,T]=(0,Ie.useState)(!1),[E,w]=(0,Ie.useState)("list"),C=(0,Ie.useRef)(null),U=(0,Ie.useRef)(null),[H,_]=(0,Ie.useState)(!1),[R,L]=(0,Ie.useState)(""),[G,P]=(0,Ie.useState)(""),[W,ie]=(0,Ie.useState)(!1);(0,Ie.useEffect)(()=>{we()},[e,t]),(0,Ie.useEffect)(()=>{if(console.log("JSON text changed:",x),console.log("Is editing:",S),console.log("Highlight ref exists:",!!U.current),U.current&&x&&!S){let B=kl(x);console.log("Applying highlighting:",B.substring(0,100)+"..."),U.current.innerHTML=B}},[x,S]);let we=()=>O(null,null,function*(){try{if(console.log("Loading user data with API key:",e,"agentId:",t),c(!0),m(null),!e||!t){console.error("Missing API key or agentId:",{apiKey:!!e,agentId:!!t}),m("Missing API key or agent ID"),y("{}");return}let B=yield re.loadUserData(e,t);if(console.log("User data response:",B),B.success&&B.data){a(B.data);let J=B.data,he=JSON.stringify(J,null,2);y(he),setTimeout(()=>{U.current&&(U.current.innerHTML=kl(he))},0),console.log("User data loaded successfully:",B.data),console.log("Data to display:",J)}else console.log("No user data or error:",B.error),m(B.error||"No user data found"),y("{}")}catch(B){console.error("Failed to load user data:",B),m(`Failed to load user data: ${B instanceof Error?B.message:"Unknown error"}`),y("{}")}finally{c(!1)}}),Ue=()=>O(null,null,function*(){try{console.log("Saving user data:",x),p(!0),m(null),g(null);let B=JSON.parse(x),J=yield re.updateUserData(e,t,B);console.log("Save user data response:",J),J.success&&J.data?(a(J.data),y(JSON.stringify(J.data.data,null,2)),g("User data saved successfully!"),T(!1),setTimeout(()=>g(null),3e3)):m("Failed to save user data: "+(J.error||"Unknown error"))}catch(B){console.error("Failed to save user data:",B),B instanceof SyntaxError?m("Invalid JSON format. Please check your syntax."):m("Failed to save user data")}finally{p(!1)}}),v=()=>O(null,null,function*(){try{console.log("Clearing user data"),d(!0),m(null),g(null);let B=yield re.clearUserData(e,t);console.log("Clear user data response:",B),B.success?(a(null),y("{}"),w("list"),g("User data cleared successfully!"),T(!1),setTimeout(()=>g(null),3e3)):m("Failed to clear user data: "+(B.error||"Unknown error"))}catch(B){console.error("Failed to clear user data:",B),m("Failed to clear user data")}finally{d(!1)}}),_e=B=>O(null,null,function*(){if(i(B),w("detail"),T(!1),m(null),B.id==="user"){c(!0);try{let J=yield re.loadUserData(e,t);if(J.success&&J.data){l(J.data);let he=JSON.stringify(J.data,null,2);y(he),console.log("Setting JSON text for user data:",he)}else l(null),y("{}"),console.log("No user data found, setting empty JSON")}catch(J){console.error("Failed to load user data:",J),l(null),y("{}")}finally{c(!1)}}else if(B.id==="resources"){c(!0);try{let J=yield re.loadResources(e,t);J.success&&J.data?(l(J.data),console.log("Loaded resources:",J.data)):(l([]),console.log("No resources found"))}catch(J){console.error("Failed to load resources:",J),l([])}finally{c(!1)}}else B.id==="products"?l(null):(l(null),y("{}"))}),lt=()=>{w("list"),i(null),l(null),T(!1)},b=()=>{r&&(r.id==="resources"?(_(!0),L(""),P("")):console.log(`Add new item to ${r==null?void 0:r.name}`))},Fe=()=>O(null,null,function*(){if(!R.trim()||!G.trim()){alert("Name and content cannot be empty");return}ie(!0);try{let B=yield re.createResource(e,t,{name:R.trim(),content:G.trim()});B.success?(_(!1),L(""),P(""),r&&_e(r)):alert("Failed to create resource: "+(B.error||"Unknown error"))}catch(B){console.error("Error creating resource:",B),alert("Failed to create resource")}finally{ie(!1)}}),vt=()=>{_(!1),L(""),P("")},ce=()=>O(null,null,function*(){r&&console.log(`Delete all ${r.name} data`)}),Q=B=>{y(B),T(!0),m(null),g(null),U.current&&(U.current.innerHTML=kl(B))},F=()=>{T(!0),setTimeout(()=>{C.current&&C.current.focus()},0)},V=()=>{C.current&&U.current&&(U.current.scrollTop=C.current.scrollTop,U.current.scrollLeft=C.current.scrollLeft)};return o?(0,z.jsx)("div",{className:"user-data-panel",children:(0,z.jsx)("div",{className:"user-data-loading",children:(0,z.jsx)("img",{src:"https://admin.lua.dev/images/logo.svg",alt:"Loading",className:"loading-logo"})})}):(0,z.jsxs)("div",{className:"user-data-panel",children:[(0,z.jsxs)("div",{className:"user-data-header",children:[(0,z.jsxs)("div",{className:"header-left",children:[E==="detail"&&(0,z.jsx)("button",{className:"back-button",onClick:lt,title:"Back to data categories",children:"\u2190"}),(0,z.jsx)("h3",{children:E==="list"?"Data":(r==null?void 0:r.name)||"Data Detail"})]}),(0,z.jsxs)("div",{className:"user-data-actions",children:[E==="detail"&&(r==null?void 0:r.id)!=="user"&&(r==null?void 0:r.description)!=="Coming soon"&&(0,z.jsx)("button",{className:"add-button",onClick:b,title:`Add new ${r==null?void 0:r.name.toLowerCase()}`,children:"\u2795"}),(0,z.jsx)("button",{className:"refresh-button",onClick:E==="detail"&&r?()=>_e(r):we,disabled:o,title:`Refresh ${E==="detail"?r==null?void 0:r.name.toLowerCase():"data"}`,children:o?"\u27F3":"\u21BB"}),E==="detail"&&(r==null?void 0:r.id)==="user"&&(0,z.jsx)("button",{className:"save-button",onClick:Ue,disabled:u,title:"Save user data",children:u?"\u27F3":"\u{1F4BE}"}),E==="detail"&&(0,z.jsx)("button",{className:"delete-button",onClick:ce,disabled:f,title:`Delete all ${r==null?void 0:r.name.toLowerCase()}`,children:"\u{1F5D1}\uFE0F"})]})]}),k&&(0,z.jsxs)("div",{className:"error-message",children:["\u274C ",k]}),h&&(0,z.jsxs)("div",{className:"success-message",children:["\u2705 ",h]}),(0,z.jsx)("div",{className:"user-data-content",children:E==="list"?(0,z.jsx)("div",{className:"data-list",children:(0,z.jsx)("div",{className:"data-categories",children:U2.map(B=>(0,z.jsxs)("div",{className:"data-category",onClick:()=>_e(B),children:[(0,z.jsx)("div",{className:"category-icon",children:B.icon}),(0,z.jsxs)("div",{className:"category-info",children:[(0,z.jsx)("div",{className:"category-name",children:B.name}),(0,z.jsx)("div",{className:"category-description",children:B.description})]}),(0,z.jsx)("div",{className:"category-arrow",children:"\u2192"})]},B.id))})}):(0,z.jsx)("div",{className:"data-detail",children:(r==null?void 0:r.id)==="user"&&s?(0,z.jsx)("div",{className:"json-editor",children:S?(0,z.jsxs)("div",{className:"json-editor-container",children:[(0,z.jsx)("div",{ref:U,className:"json-highlight-background",dangerouslySetInnerHTML:{__html:kl(x)}}),(0,z.jsx)("textarea",{ref:C,id:"user-data-json",name:"userDataJson",value:x,onChange:B=>Q(B.target.value),className:"json-textarea",spellCheck:!1,placeholder:"Enter JSON data...",autoComplete:"off"})]}):(0,z.jsx)("div",{className:"json-display",onClick:F,dangerouslySetInnerHTML:{__html:kl(x)}})}):(r==null?void 0:r.id)==="resources"&&s?(0,z.jsxs)("div",{className:"resources-container",children:[(0,z.jsxs)("div",{className:"production-warning",children:[(0,z.jsx)("div",{className:"warning-icon",children:"\u26A0\uFE0F"}),(0,z.jsxs)("div",{className:"warning-text",children:[(0,z.jsx)("strong",{children:"Production Resources:"})," Changes to resources will propagate to production and affect live users."]})]}),(0,z.jsx)("div",{className:"resources-list",children:Array.isArray(s)&&s.length>0?s.map(B=>(0,z.jsx)(P2,{resource:B,apiKey:e,agentId:t,onUpdate:()=>_e(r)},B.id)):(0,z.jsxs)("div",{className:"no-resources",children:[(0,z.jsx)("div",{className:"empty-icon",children:"\u{1F4C1}"}),(0,z.jsx)("h4",{children:"No resources yet"}),(0,z.jsx)("p",{children:"Resources help provide context and information to your AI agent"})]})})]}):(r==null?void 0:r.id)==="products"?(0,z.jsx)(El,{apiKey:e,agentId:t,isProduction:!1}):(0,z.jsxs)("div",{className:"category-empty-state",children:[(0,z.jsx)("div",{className:"empty-icon",children:r==null?void 0:r.icon}),(r==null?void 0:r.description)==="Coming soon"?(0,z.jsxs)(z.Fragment,{children:[(0,z.jsx)("h3",{children:"Coming Soon"}),(0,z.jsxs)("p",{children:[r.name," management will be available in a future update"]}),(0,z.jsx)("div",{className:"coming-soon-badge",children:"\u{1F6A7} Under Development"})]}):(0,z.jsxs)(z.Fragment,{children:[(0,z.jsxs)("h3",{children:["No ",r==null?void 0:r.name.toLowerCase()," yet"]}),(0,z.jsxs)("p",{children:["Start by adding your first ",r==null?void 0:r.name.toLowerCase()," entry"]}),(0,z.jsx)("div",{className:"empty-actions",children:(0,z.jsx)("button",{className:"add-button",onClick:b,children:"\u2795"})})]})]})})}),H&&(0,z.jsx)("div",{className:"resource-modal-overlay",children:(0,z.jsxs)("div",{className:"resource-modal",children:[(0,z.jsxs)("div",{className:"resource-modal-header",children:[(0,z.jsx)("h3",{children:"Create New Resource"}),(0,z.jsx)("button",{className:"modal-close-btn",onClick:vt,disabled:W,children:"\u2715"})]}),(0,z.jsxs)("div",{className:"resource-modal-body",children:[(0,z.jsxs)("div",{className:"production-warning",children:[(0,z.jsx)("div",{className:"warning-icon",children:"\u26A0\uFE0F"}),(0,z.jsxs)("div",{className:"warning-text",children:[(0,z.jsx)("strong",{children:"Production Impact:"})," This resource will be available in production and affect live users."]})]}),(0,z.jsxs)("div",{className:"resource-form",children:[(0,z.jsxs)("div",{className:"form-field",children:[(0,z.jsx)("label",{htmlFor:"resource-name",children:"Resource Name"}),(0,z.jsx)("input",{id:"resource-name",type:"text",value:R,onChange:B=>L(B.target.value),placeholder:"e.g., FAQ, return-policy, user-guide",className:"resource-name-input",autoFocus:!0})]}),(0,z.jsxs)("div",{className:"form-field",children:[(0,z.jsx)("label",{htmlFor:"resource-content",children:"Content"}),(0,z.jsx)("textarea",{id:"resource-content",value:G,onChange:B=>P(B.target.value),placeholder:"Paste your content here... This can be a large text file, FAQ content, documentation, etc.",className:"resource-content-textarea",rows:12})]}),(0,z.jsxs)("div",{className:"character-count",children:[G.length," characters"]})]})]}),(0,z.jsxs)("div",{className:"resource-modal-actions",children:[(0,z.jsx)("button",{className:"cancel-button",onClick:vt,disabled:W,children:"Cancel"}),(0,z.jsx)("button",{className:"create-button",onClick:Fe,disabled:W||!R.trim()||!G.trim(),children:W?"Creating...":"Create Resource"})]})]})})]})},P2=({resource:e,apiKey:t,agentId:n,onUpdate:a})=>{let[r,i]=(0,Ie.useState)(!1),[s,l]=(0,Ie.useState)(e.name),[o,c]=(0,Ie.useState)(e.content),[u,p]=(0,Ie.useState)(!1),[f,d]=(0,Ie.useState)(!1),x=()=>{i(!0),l(e.name),c(e.content)},y=()=>{i(!1),l(e.name),c(e.content)},k=()=>O(null,null,function*(){if(!s.trim()||!o.trim()){alert("Name and content cannot be empty");return}p(!0);try{let h=yield re.updateResource(t,n,e.id,{name:s.trim(),content:o.trim()});h.success?(i(!1),a()):alert("Failed to update resource: "+(h.error||"Unknown error"))}catch(h){console.error("Error updating resource:",h),alert("Failed to update resource")}finally{p(!1)}}),m=()=>O(null,null,function*(){if(confirm(`Are you sure you want to delete "${e.name}"? This will affect production.`)){d(!0);try{let h=yield re.deleteResource(t,n,e.id);h.success?a():alert("Failed to delete resource: "+(h.error||"Unknown error"))}catch(h){console.error("Error deleting resource:",h),alert("Failed to delete resource")}finally{d(!1)}}});return(0,z.jsxs)(z.Fragment,{children:[(0,z.jsx)("div",{className:"resource-item",children:(0,z.jsxs)("div",{className:"resource-display",children:[(0,z.jsxs)("div",{className:"resource-header",children:[(0,z.jsx)("h4",{className:"resource-name",children:e.name}),(0,z.jsx)("div",{className:"resource-meta",children:(0,z.jsxs)("span",{className:"resource-date",children:["Updated ",new Date(e.updatedAt).toLocaleDateString()]})})]}),(0,z.jsx)("div",{className:"resource-content",children:(0,z.jsxs)("p",{children:[e.content.substring(0,200),e.content.length>200?"...":""]})}),(0,z.jsxs)("div",{className:"resource-actions",children:[(0,z.jsx)("button",{className:"edit-btn",onClick:x,title:"Edit resource",children:"\u270F\uFE0F"}),(0,z.jsx)("button",{className:"delete-btn",onClick:m,disabled:f,title:"Delete resource",children:f?"\u27F3":"\u{1F5D1}\uFE0F"})]})]})}),r&&(0,z.jsx)("div",{className:"resource-modal-overlay",children:(0,z.jsxs)("div",{className:"resource-modal",children:[(0,z.jsxs)("div",{className:"resource-modal-header",children:[(0,z.jsx)("h3",{children:"Edit Resource"}),(0,z.jsx)("button",{className:"modal-close-btn",onClick:y,disabled:u,children:"\u2715"})]}),(0,z.jsxs)("div",{className:"resource-modal-body",children:[(0,z.jsxs)("div",{className:"production-warning",children:[(0,z.jsx)("div",{className:"warning-icon",children:"\u26A0\uFE0F"}),(0,z.jsxs)("div",{className:"warning-text",children:[(0,z.jsx)("strong",{children:"Production Impact:"})," Changes to this resource will affect live users immediately."]})]}),(0,z.jsxs)("div",{className:"resource-form",children:[(0,z.jsxs)("div",{className:"form-field",children:[(0,z.jsx)("label",{htmlFor:"edit-resource-name",children:"Resource Name"}),(0,z.jsx)("input",{id:"edit-resource-name",type:"text",value:s,onChange:h=>l(h.target.value),placeholder:"Resource name",className:"resource-name-input",autoFocus:!0})]}),(0,z.jsxs)("div",{className:"form-field",children:[(0,z.jsx)("label",{htmlFor:"edit-resource-content",children:"Content"}),(0,z.jsx)("textarea",{id:"edit-resource-content",value:o,onChange:h=>c(h.target.value),placeholder:"Resource content",className:"resource-content-textarea",rows:12})]}),(0,z.jsxs)("div",{className:"character-count",children:[o.length," characters"]})]})]}),(0,z.jsxs)("div",{className:"resource-modal-actions",children:[(0,z.jsx)("button",{className:"cancel-button",onClick:y,disabled:u,children:"Cancel"}),(0,z.jsx)("button",{className:"create-button",onClick:k,disabled:u||!s.trim()||!o.trim(),children:u?"Saving...":"Save Changes"})]})]})})]})}});var Mt,ne,km,B2,Tm=N(()=>{"use strict";Mt=Z($e());Zt();ne=Z(oe()),km=({apiKey:e,agentId:t})=>{let[n,a]=(0,Mt.useState)([]),[r,i]=(0,Mt.useState)(!0),[s,l]=(0,Mt.useState)(!1),[o,c]=(0,Mt.useState)(null),[u,p]=(0,Mt.useState)(null),[f,d]=(0,Mt.useState)(null),[x,y]=(0,Mt.useState)(""),[k,m]=(0,Mt.useState)(""),[h,g]=(0,Mt.useState)(!1);(0,Mt.useEffect)(()=>{C()},[]);let[S,T]=(0,Mt.useState)(!0);(0,Mt.useEffect)(()=>{if(S)return;O(null,null,function*(){console.log("Environment variables changed, auto-saving..."),l(!0),c(null),p(null);try{let W=w(n);console.log("Generated .env content:",W);let ie=yield re.saveEnvContent(W);console.log("Save env response:",ie),ie.success?(p("Environment variables saved successfully!"),setTimeout(()=>p(null),3e3)):(console.error("Failed to save env variables:",ie.error),c(ie.error||"Failed to save environment variables"))}catch(W){console.error("Error saving env variables:",W),c("Failed to save environment variables")}finally{l(!1)}})},[n]);let E=P=>P.trim()?P.split(`
23
+ `).map((W,ie)=>W.trim()).filter(W=>W&&!W.startsWith("#")).map((W,ie)=>{let[we,...Ue]=W.split("=");return{id:`env_${ie}_${Date.now()}`,key:(we==null?void 0:we.trim())||"",value:Ue.join("=")||""}}).filter(W=>W.key):[],w=P=>P.map(W=>`${W.key}=${W.value}`).join(`
24
+ `),C=()=>O(null,null,function*(){i(!0),c(null);try{let P=yield re.loadEnvContent();if(P.success){let W=P.content||"",ie=E(W);a(ie),T(!1)}else c(P.error||"Failed to load environment variables"),a([]),T(!1)}catch(P){console.error("Error loading env content:",P),c("Failed to load environment variables"),a([])}finally{i(!1)}}),U=()=>{if(!x.trim()){c("Please enter a variable name");return}if(n.some(W=>W.key===x.trim())){c("Variable name already exists");return}let P={id:`env_new_${Date.now()}`,key:x.trim(),value:k};a([...n,P]),y(""),m(""),g(!1),c(null)},H=(P,W,ie)=>{a(we=>we.map(Ue=>Ue.id===P?tt(ee({},Ue),{key:W.trim(),value:ie}):Ue)),d(null)},_=P=>{a(W=>W.filter(ie=>ie.id!==P))},R=P=>{d(P),c(null),p(null)},L=()=>{d(null),C()},G=()=>{g(!1),y(""),m(""),c(null)};return r?(0,ne.jsx)("div",{className:"env-panel",children:(0,ne.jsx)("div",{className:"env-loading",children:(0,ne.jsx)("img",{src:"https://admin.lua.dev/images/logo.svg",alt:"Loading",className:"loading-logo"})})}):(0,ne.jsxs)("div",{className:"env-panel",children:[(0,ne.jsxs)("div",{className:"env-header",children:[(0,ne.jsx)("h3",{children:"Environment Variables"}),(0,ne.jsxs)("div",{className:"env-actions",children:[(0,ne.jsx)("button",{className:"refresh-btn",onClick:C,disabled:r,title:"Refresh environment variables",children:r?"\u27F3":"\u21BB"}),(0,ne.jsx)("button",{className:"add-btn",onClick:()=>g(!0),disabled:h,title:"Add new environment variable",children:"\u2795"})]})]}),(0,ne.jsxs)("div",{className:"env-content",children:[o&&(0,ne.jsxs)("div",{className:"error-message",children:[(0,ne.jsx)("strong",{children:"Error:"})," ",o]}),u&&(0,ne.jsxs)("div",{className:"success-message",children:[(0,ne.jsx)("strong",{children:"Success:"})," ",u]}),h&&(0,ne.jsxs)("div",{className:"env-add-form",children:[(0,ne.jsxs)("div",{className:"env-form-header",children:[(0,ne.jsx)("h4",{children:"Add New Variable"}),(0,ne.jsx)("button",{className:"form-cancel-btn",onClick:G,title:"Cancel",children:"\u2715"})]}),(0,ne.jsxs)("div",{className:"env-form-fields",children:[(0,ne.jsxs)("div",{className:"env-field",children:[(0,ne.jsx)("label",{children:"Variable Name"}),(0,ne.jsx)("input",{type:"text",value:x,onChange:P=>y(P.target.value),placeholder:"API_KEY",className:"env-input",autoFocus:!0})]}),(0,ne.jsxs)("div",{className:"env-field",children:[(0,ne.jsx)("label",{children:"Value"}),(0,ne.jsx)("input",{type:"text",value:k,onChange:P=>m(P.target.value),placeholder:"your_api_key_here",className:"env-input"})]}),(0,ne.jsx)("div",{className:"env-form-actions",children:(0,ne.jsx)("button",{className:"add-variable-btn",onClick:U,disabled:!x.trim(),children:"Add Variable"})})]})]}),(0,ne.jsx)("div",{className:"env-variables",children:n.length>0?(0,ne.jsx)("div",{className:"env-list",children:n.map(P=>(0,ne.jsx)(B2,{variable:P,isEditing:f===P.id,onEdit:()=>R(P.id),onSave:(W,ie)=>H(P.id,W,ie),onCancel:L,onDelete:()=>_(P.id)},P.id))}):(0,ne.jsxs)("div",{className:"env-empty-state",children:[(0,ne.jsx)("div",{className:"empty-icon",children:"\u{1F527}"}),(0,ne.jsx)("h4",{children:"No environment variables"}),(0,ne.jsx)("p",{children:"Add your first environment variable to get started"}),(0,ne.jsx)("button",{className:"add-first-btn",onClick:()=>g(!0),children:"Add Variable"})]})}),(0,ne.jsxs)("div",{className:"env-help",children:[(0,ne.jsxs)("p",{children:["Environment variables are stored in your ",(0,ne.jsx)("code",{children:".env"})," file and automatically included in tool execution and chat messages."]}),(0,ne.jsxs)("p",{children:[(0,ne.jsx)("strong",{children:"Auto-save:"})," Changes are saved automatically when you add, edit, or delete variables."]})]})]})]})},B2=({variable:e,isEditing:t,onEdit:n,onSave:a,onCancel:r,onDelete:i})=>{let[s,l]=(0,Mt.useState)(e.key),[o,c]=(0,Mt.useState)(e.value),[u,p]=(0,Mt.useState)(!1),f=e.value.length>60,d=u||!f?e.value:e.value.substring(0,60)+"...";return(0,ne.jsx)("div",{className:"env-variable-item",children:t?(0,ne.jsxs)("div",{className:"env-variable-edit",children:[(0,ne.jsxs)("div",{className:"env-edit-fields",children:[(0,ne.jsx)("input",{type:"text",value:s,onChange:k=>l(k.target.value),className:"env-key-input",placeholder:"Variable name"}),(0,ne.jsx)("span",{className:"env-equals",children:"="}),(0,ne.jsx)("textarea",{value:o,onChange:k=>c(k.target.value),className:"env-value-input",placeholder:"Value",rows:1})]}),(0,ne.jsxs)("div",{className:"env-edit-actions",children:[(0,ne.jsx)("button",{className:"save-edit-btn",onClick:()=>{if(!s.trim()){alert("Variable name cannot be empty");return}a(s,o)},title:"Save changes",children:"\u2713"}),(0,ne.jsx)("button",{className:"cancel-edit-btn",onClick:()=>{l(e.key),c(e.value),r()},title:"Cancel editing",children:"\u2715"})]})]}):(0,ne.jsxs)("div",{className:"env-variable-display",children:[(0,ne.jsxs)("div",{className:"env-variable-content",children:[(0,ne.jsx)("span",{className:"env-key",children:e.key}),(0,ne.jsx)("span",{className:"env-equals",children:"="}),(0,ne.jsxs)("div",{className:"env-value-container",children:[(0,ne.jsx)("span",{className:"env-value",onClick:()=>f&&p(!u),style:{cursor:f?"pointer":"default"},title:f?"Click to expand/collapse":e.value,children:d||"<empty>"}),f&&(0,ne.jsx)("button",{className:"expand-btn",onClick:()=>p(!u),title:u?"Collapse":"Expand",children:u?"\u25B2":"\u25BC"})]})]}),(0,ne.jsxs)("div",{className:"env-variable-actions",children:[(0,ne.jsx)("button",{className:"edit-variable-btn",onClick:n,title:"Edit variable",children:"\u270F\uFE0F"}),(0,ne.jsx)("button",{className:"delete-variable-btn",onClick:i,title:"Delete variable",children:"\u{1F5D1}\uFE0F"})]})]})})}});var Rt,wm,sN=N(()=>{"use strict";bm();Sm();Em();Tm();Rt=Z(oe()),wm=({activeTab:e,onTabChange:t,persona:n,onSavePersona:a,apiKey:r,agentId:i,skillId:s,sandboxId:l,width:o})=>(0,Rt.jsx)("div",{className:"log-container",style:{width:`${o}px`},children:(0,Rt.jsxs)("div",{className:"top-section",children:[(0,Rt.jsx)("div",{className:"log-header",children:(0,Rt.jsxs)("div",{className:"tab-buttons",children:[(0,Rt.jsx)("button",{className:`tab-button ${e==="persona"?"active":""}`,onClick:()=>t("persona"),children:"Persona"}),(0,Rt.jsx)("button",{className:`tab-button ${e==="skills"?"active":""}`,onClick:()=>t("skills"),children:"Skills"}),(0,Rt.jsx)("button",{className:`tab-button ${e==="userdata"?"active":""}`,onClick:()=>t("userdata"),children:"Data"}),(0,Rt.jsx)("button",{className:`tab-button ${e==="env"?"active":""}`,onClick:()=>t("env"),children:"Env"})]})}),(0,Rt.jsx)("div",{className:`tab-content ${e==="persona"?"active":"inactive"}`,children:(0,Rt.jsx)(ym,{persona:n,onSavePersona:a,apiKey:r,agentId:i})}),(0,Rt.jsx)("div",{className:`tab-content ${e==="skills"?"active":"inactive"}`,children:(0,Rt.jsx)(xm,{apiKey:r,agentId:i,skillId:s,sandboxId:l})}),(0,Rt.jsx)("div",{className:`tab-content ${e==="userdata"?"active":"inactive"}`,children:(0,Rt.jsx)(Nm,{apiKey:r,agentId:i})}),(0,Rt.jsx)("div",{className:`tab-content ${e==="env"?"active":"inactive"}`,children:(0,Rt.jsx)(km,{apiKey:r,agentId:i})})]})})});var Yn,Tl,wl,Wc=N(()=>{Yn=Object.create(null);Yn.open="0";Yn.close="1";Yn.ping="2";Yn.pong="3";Yn.message="4";Yn.upgrade="5";Yn.noop="6";Tl=Object.create(null);Object.keys(Yn).forEach(e=>{Tl[Yn[e]]=e});wl={type:"error",data:"parser error"}});function oN(e){return e instanceof Uint8Array?e:e instanceof ArrayBuffer?new Uint8Array(e):new Uint8Array(e.buffer,e.byteOffset,e.byteLength)}function fN(e,t){if(cN&&e.data instanceof Blob)return e.data.arrayBuffer().then(oN).then(t);if(uN&&(e.data instanceof ArrayBuffer||dN(e.data)))return t(oN(e.data));Al(e,!1,n=>{Am||(Am=new TextEncoder),t(Am.encode(n))})}var cN,uN,dN,Al,lN,Am,pN=N(()=>{Wc();cN=typeof Blob=="function"||typeof Blob!="undefined"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",uN=typeof ArrayBuffer=="function",dN=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer,Al=({type:e,data:t},n,a)=>cN&&t instanceof Blob?n?a(t):lN(t,a):uN&&(t instanceof ArrayBuffer||dN(t))?n?a(t):lN(new Blob([t]),a):a(Yn[e]+(t||"")),lN=(e,t)=>{let n=new FileReader;return n.onload=function(){let a=n.result.split(",")[1];t("b"+(a||""))},n.readAsDataURL(e)}});var mN,Cl,hN,gN=N(()=>{mN="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Cl=typeof Uint8Array=="undefined"?[]:new Uint8Array(256);for(let e=0;e<mN.length;e++)Cl[mN.charCodeAt(e)]=e;hN=e=>{let t=e.length*.75,n=e.length,a,r=0,i,s,l,o;e[e.length-1]==="="&&(t--,e[e.length-2]==="="&&t--);let c=new ArrayBuffer(t),u=new Uint8Array(c);for(a=0;a<n;a+=4)i=Cl[e.charCodeAt(a)],s=Cl[e.charCodeAt(a+1)],l=Cl[e.charCodeAt(a+2)],o=Cl[e.charCodeAt(a+3)],u[r++]=i<<2|s>>4,u[r++]=(s&15)<<4|l>>2,u[r++]=(l&3)<<6|o&63;return c}});var V2,Rl,H2,vN,yN=N(()=>{Wc();gN();V2=typeof ArrayBuffer=="function",Rl=(e,t)=>{if(typeof e!="string")return{type:"message",data:vN(e,t)};let n=e.charAt(0);return n==="b"?{type:"message",data:H2(e.substring(1),t)}:Tl[n]?e.length>1?{type:Tl[n],data:e.substring(1)}:{type:Tl[n]}:wl},H2=(e,t)=>{if(V2){let n=hN(e);return vN(n,t)}else return{base64:!0,data:e}},vN=(e,t)=>{switch(t){case"blob":return e instanceof Blob?e:new Blob([e]);case"arraybuffer":default:return e instanceof ArrayBuffer?e:e.buffer}}});function NN(){return new TransformStream({transform(e,t){fN(e,n=>{let a=n.length,r;if(a<126)r=new Uint8Array(1),new DataView(r.buffer).setUint8(0,a);else if(a<65536){r=new Uint8Array(3);let i=new DataView(r.buffer);i.setUint8(0,126),i.setUint16(1,a)}else{r=new Uint8Array(9);let i=new DataView(r.buffer);i.setUint8(0,127),i.setBigUint64(1,BigInt(a))}e.data&&typeof e.data!="string"&&(r[0]|=128),t.enqueue(r),t.enqueue(n)})}})}function eu(e){return e.reduce((t,n)=>t+n.length,0)}function tu(e,t){if(e[0].length===t)return e.shift();let n=new Uint8Array(t),a=0;for(let r=0;r<t;r++)n[r]=e[0][a++],a===e[0].length&&(e.shift(),a=0);return e.length&&a<e[0].length&&(e[0]=e[0].slice(a)),n}function EN(e,t){Cm||(Cm=new TextDecoder);let n=[],a=0,r=-1,i=!1;return new TransformStream({transform(s,l){for(n.push(s);;){if(a===0){if(eu(n)<1)break;let o=tu(n,1);i=(o[0]&128)===128,r=o[0]&127,r<126?a=3:r===126?a=1:a=2}else if(a===1){if(eu(n)<2)break;let o=tu(n,2);r=new DataView(o.buffer,o.byteOffset,o.length).getUint16(0),a=3}else if(a===2){if(eu(n)<8)break;let o=tu(n,8),c=new DataView(o.buffer,o.byteOffset,o.length),u=c.getUint32(0);if(u>Math.pow(2,21)-1){l.enqueue(wl);break}r=u*Math.pow(2,32)+c.getUint32(4),a=3}else{if(eu(n)<r)break;let o=tu(n,r);l.enqueue(Rl(i?o:Cm.decode(o),t)),a=0}if(r===0||r>e){l.enqueue(wl);break}}}})}var bN,xN,SN,Cm,Rm,Ii=N(()=>{pN();yN();Wc();bN="",xN=(e,t)=>{let n=e.length,a=new Array(n),r=0;e.forEach((i,s)=>{Al(i,!1,l=>{a[s]=l,++r===n&&t(a.join(bN))})})},SN=(e,t)=>{let n=e.split(bN),a=[];for(let r=0;r<n.length;r++){let i=Rl(n[r],t);if(a.push(i),i.type==="error")break}return a};Rm=4});function Ge(e){if(e)return q2(e)}function q2(e){for(var t in Ge.prototype)e[t]=Ge.prototype[t];return e}var Mr=N(()=>{Ge.prototype.on=Ge.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this};Ge.prototype.once=function(e,t){function n(){this.off(e,n),t.apply(this,arguments)}return n.fn=t,this.on(e,n),this};Ge.prototype.off=Ge.prototype.removeListener=Ge.prototype.removeAllListeners=Ge.prototype.removeEventListener=function(e,t){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var n=this._callbacks["$"+e];if(!n)return this;if(arguments.length==1)return delete this._callbacks["$"+e],this;for(var a,r=0;r<n.length;r++)if(a=n[r],a===t||a.fn===t){n.splice(r,1);break}return n.length===0&&delete this._callbacks["$"+e],this};Ge.prototype.emit=function(e){this._callbacks=this._callbacks||{};for(var t=new Array(arguments.length-1),n=this._callbacks["$"+e],a=1;a<arguments.length;a++)t[a-1]=arguments[a];if(n){n=n.slice(0);for(var a=0,r=n.length;a<r;++a)n[a].apply(this,t)}return this};Ge.prototype.emitReserved=Ge.prototype.emit;Ge.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks["$"+e]||[]};Ge.prototype.hasListeners=function(e){return!!this.listeners(e).length}});var Sa,$t,kN,Ur=N(()=>{Sa=typeof Promise=="function"&&typeof Promise.resolve=="function"?t=>Promise.resolve().then(t):(t,n)=>n(t,0),$t=typeof self!="undefined"?self:typeof window!="undefined"?window:Function("return this")(),kN="arraybuffer"});function nu(e,...t){return t.reduce((n,a)=>(e.hasOwnProperty(a)&&(n[a]=e[a]),n),{})}function Na(e,t){t.useNativeTimers?(e.setTimeoutFn=j2.bind($t),e.clearTimeoutFn=I2.bind($t)):(e.setTimeoutFn=$t.setTimeout.bind($t),e.clearTimeoutFn=$t.clearTimeout.bind($t))}function TN(e){return typeof e=="string"?G2(e):Math.ceil((e.byteLength||e.size)*Y2)}function G2(e){let t=0,n=0;for(let a=0,r=e.length;a<r;a++)t=e.charCodeAt(a),t<128?n+=1:t<2048?n+=2:t<55296||t>=57344?n+=3:(a++,n+=4);return n}function au(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}var j2,I2,Y2,Pr=N(()=>{Ur();j2=$t.setTimeout,I2=$t.clearTimeout;Y2=1.33});function wN(e){let t="";for(let n in e)e.hasOwnProperty(n)&&(t.length&&(t+="&"),t+=encodeURIComponent(n)+"="+encodeURIComponent(e[n]));return t}function AN(e){let t={},n=e.split("&");for(let a=0,r=n.length;a<r;a++){let i=n[a].split("=");t[decodeURIComponent(i[0])]=decodeURIComponent(i[1])}return t}var _m=N(()=>{});var ru,Ea,_l=N(()=>{Ii();Mr();Pr();_m();ru=class extends Error{constructor(t,n,a){super(t),this.description=n,this.context=a,this.type="TransportError"}},Ea=class extends Ge{constructor(t){super(),this.writable=!1,Na(this,t),this.opts=t,this.query=t.query,this.socket=t.socket,this.supportsBinary=!t.forceBase64}onError(t,n,a){return super.emitReserved("error",new ru(t,n,a)),this}open(){return this.readyState="opening",this.doOpen(),this}close(){return(this.readyState==="opening"||this.readyState==="open")&&(this.doClose(),this.onClose()),this}send(t){this.readyState==="open"&&this.write(t)}onOpen(){this.readyState="open",this.writable=!0,super.emitReserved("open")}onData(t){let n=Rl(t,this.socket.binaryType);this.onPacket(n)}onPacket(t){super.emitReserved("packet",t)}onClose(t){this.readyState="closed",super.emitReserved("close",t)}pause(t){}createUri(t,n={}){return t+"://"+this._hostname()+this._port()+this.opts.path+this._query(n)}_hostname(){let t=this.opts.hostname;return t.indexOf(":")===-1?t:"["+t+"]"}_port(){return this.opts.port&&(this.opts.secure&&+(this.opts.port!==443)||!this.opts.secure&&Number(this.opts.port)!==80)?":"+this.opts.port:""}_query(t){let n=wN(t);return n.length?"?"+n:""}}});var Dl,Dm=N(()=>{_l();Pr();Ii();Dl=class extends Ea{constructor(){super(...arguments),this._polling=!1}get name(){return"polling"}doOpen(){this._poll()}pause(t){this.readyState="pausing";let n=()=>{this.readyState="paused",t()};if(this._polling||!this.writable){let a=0;this._polling&&(a++,this.once("pollComplete",function(){--a||n()})),this.writable||(a++,this.once("drain",function(){--a||n()}))}else n()}_poll(){this._polling=!0,this.doPoll(),this.emitReserved("poll")}onData(t){let n=a=>{if(this.readyState==="opening"&&a.type==="open"&&this.onOpen(),a.type==="close")return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(a)};SN(t,this.socket.binaryType).forEach(n),this.readyState!=="closed"&&(this._polling=!1,this.emitReserved("pollComplete"),this.readyState==="open"&&this._poll())}doClose(){let t=()=>{this.write([{type:"close"}])};this.readyState==="open"?t():this.once("open",t)}write(t){this.writable=!1,xN(t,n=>{this.doWrite(n,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){let t=this.opts.secure?"https":"http",n=this.query||{};return this.opts.timestampRequests!==!1&&(n[this.opts.timestampParam]=au()),!this.supportsBinary&&!n.sid&&(n.b64=1),this.createUri(t,n)}}});var CN,RN,_N=N(()=>{CN=!1;try{CN=typeof XMLHttpRequest!="undefined"&&"withCredentials"in new XMLHttpRequest}catch(e){}RN=CN});function X2(){}function DN(){for(let e in ar.requests)ar.requests.hasOwnProperty(e)&&ar.requests[e].abort()}function ON(e){let t=e.xdomain;try{if(typeof XMLHttpRequest!="undefined"&&(!t||RN))return new XMLHttpRequest}catch(n){}if(!t)try{return new $t[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch(n){}}var Om,ar,Q2,rr,iu=N(()=>{Dm();Mr();Pr();Ur();_N();Om=class extends Dl{constructor(t){if(super(t),typeof location!="undefined"){let n=location.protocol==="https:",a=location.port;a||(a=n?"443":"80"),this.xd=typeof location!="undefined"&&t.hostname!==location.hostname||a!==t.port}}doWrite(t,n){let a=this.request({method:"POST",data:t});a.on("success",n),a.on("error",(r,i)=>{this.onError("xhr post error",r,i)})}doPoll(){let t=this.request();t.on("data",this.onData.bind(this)),t.on("error",(n,a)=>{this.onError("xhr poll error",n,a)}),this.pollXhr=t}},ar=class e extends Ge{constructor(t,n,a){super(),this.createRequest=t,Na(this,a),this._opts=a,this._method=a.method||"GET",this._uri=n,this._data=a.data!==void 0?a.data:null,this._create()}_create(){var t;let n=nu(this._opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");n.xdomain=!!this._opts.xd;let a=this._xhr=this.createRequest(n);try{a.open(this._method,this._uri,!0);try{if(this._opts.extraHeaders){a.setDisableHeaderCheck&&a.setDisableHeaderCheck(!0);for(let r in this._opts.extraHeaders)this._opts.extraHeaders.hasOwnProperty(r)&&a.setRequestHeader(r,this._opts.extraHeaders[r])}}catch(r){}if(this._method==="POST")try{a.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch(r){}try{a.setRequestHeader("Accept","*/*")}catch(r){}(t=this._opts.cookieJar)===null||t===void 0||t.addCookies(a),"withCredentials"in a&&(a.withCredentials=this._opts.withCredentials),this._opts.requestTimeout&&(a.timeout=this._opts.requestTimeout),a.onreadystatechange=()=>{var r;a.readyState===3&&((r=this._opts.cookieJar)===null||r===void 0||r.parseCookies(a.getResponseHeader("set-cookie"))),a.readyState===4&&(a.status===200||a.status===1223?this._onLoad():this.setTimeoutFn(()=>{this._onError(typeof a.status=="number"?a.status:0)},0))},a.send(this._data)}catch(r){this.setTimeoutFn(()=>{this._onError(r)},0);return}typeof document!="undefined"&&(this._index=e.requestsCount++,e.requests[this._index]=this)}_onError(t){this.emitReserved("error",t,this._xhr),this._cleanup(!0)}_cleanup(t){if(!(typeof this._xhr=="undefined"||this._xhr===null)){if(this._xhr.onreadystatechange=X2,t)try{this._xhr.abort()}catch(n){}typeof document!="undefined"&&delete e.requests[this._index],this._xhr=null}}_onLoad(){let t=this._xhr.responseText;t!==null&&(this.emitReserved("data",t),this.emitReserved("success"),this._cleanup())}abort(){this._cleanup()}};ar.requestsCount=0;ar.requests={};if(typeof document!="undefined"){if(typeof attachEvent=="function")attachEvent("onunload",DN);else if(typeof addEventListener=="function"){let e="onpagehide"in $t?"pagehide":"unload";addEventListener(e,DN,!1)}}Q2=(function(){let e=ON({xdomain:!1});return e&&e.responseType!==null})(),rr=class extends Om{constructor(t){super(t);let n=t&&t.forceBase64;this.supportsBinary=Q2&&!n}request(t={}){return Object.assign(t,{xd:this.xd},this.opts),new ar(ON,this.uri(),t)}}});var LN,zm,Lm,ir,su=N(()=>{_l();Pr();Ii();Ur();LN=typeof navigator!="undefined"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative",zm=class extends Ea{get name(){return"websocket"}doOpen(){let t=this.uri(),n=this.opts.protocols,a=LN?{}:nu(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(a.headers=this.opts.extraHeaders);try{this.ws=this.createSocket(t,n,a)}catch(r){return this.emitReserved("error",r)}this.ws.binaryType=this.socket.binaryType,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=t=>this.onClose({description:"websocket connection closed",context:t}),this.ws.onmessage=t=>this.onData(t.data),this.ws.onerror=t=>this.onError("websocket error",t)}write(t){this.writable=!1;for(let n=0;n<t.length;n++){let a=t[n],r=n===t.length-1;Al(a,this.supportsBinary,i=>{try{this.doWrite(a,i)}catch(s){}r&&Sa(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){typeof this.ws!="undefined"&&(this.ws.onerror=()=>{},this.ws.close(),this.ws=null)}uri(){let t=this.opts.secure?"wss":"ws",n=this.query||{};return this.opts.timestampRequests&&(n[this.opts.timestampParam]=au()),this.supportsBinary||(n.b64=1),this.createUri(t,n)}},Lm=$t.WebSocket||$t.MozWebSocket,ir=class extends zm{createSocket(t,n,a){return LN?new Lm(t,n,a):n?new Lm(t,n):new Lm(t)}doWrite(t,n){this.ws.send(n)}}});var Yi,Mm=N(()=>{_l();Ur();Ii();Yi=class extends Ea{get name(){return"webtransport"}doOpen(){try{this._transport=new WebTransport(this.createUri("https"),this.opts.transportOptions[this.name])}catch(t){return this.emitReserved("error",t)}this._transport.closed.then(()=>{this.onClose()}).catch(t=>{this.onError("webtransport error",t)}),this._transport.ready.then(()=>{this._transport.createBidirectionalStream().then(t=>{let n=EN(Number.MAX_SAFE_INTEGER,this.socket.binaryType),a=t.readable.pipeThrough(n).getReader(),r=NN();r.readable.pipeTo(t.writable),this._writer=r.writable.getWriter();let i=()=>{a.read().then(({done:l,value:o})=>{l||(this.onPacket(o),i())}).catch(l=>{})};i();let s={type:"open"};this.query.sid&&(s.data=`{"sid":"${this.query.sid}"}`),this._writer.write(s).then(()=>this.onOpen())})})}write(t){this.writable=!1;for(let n=0;n<t.length;n++){let a=t[n],r=n===t.length-1;this._writer.write(a).then(()=>{r&&Sa(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var t;(t=this._transport)===null||t===void 0||t.close()}}});var Um,Pm=N(()=>{iu();su();Mm();Um={websocket:ir,webtransport:Yi,polling:rr}});function Gi(e){if(e.length>8e3)throw"URI too long";let t=e,n=e.indexOf("["),a=e.indexOf("]");n!=-1&&a!=-1&&(e=e.substring(0,n)+e.substring(n,a).replace(/:/g,";")+e.substring(a,e.length));let r=F2.exec(e||""),i={},s=14;for(;s--;)i[Z2[s]]=r[s]||"";return n!=-1&&a!=-1&&(i.source=t,i.host=i.host.substring(1,i.host.length-1).replace(/;/g,":"),i.authority=i.authority.replace("[","").replace("]","").replace(/;/g,":"),i.ipv6uri=!0),i.pathNames=$2(i,i.path),i.queryKey=J2(i,i.query),i}function $2(e,t){let n=/\/{2,9}/g,a=t.replace(n,"/").split("/");return(t.slice(0,1)=="/"||t.length===0)&&a.splice(0,1),t.slice(-1)=="/"&&a.splice(a.length-1,1),a}function J2(e,t){let n={};return t.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(a,r,i){r&&(n[r]=i)}),n}var F2,Z2,Bm=N(()=>{F2=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,Z2=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"]});var Vm,lu,Br,ou,Xi,Hm=N(()=>{Pm();Pr();_m();Bm();Mr();Ii();Ur();Vm=typeof addEventListener=="function"&&typeof removeEventListener=="function",lu=[];Vm&&addEventListener("offline",()=>{lu.forEach(e=>e())},!1);Br=class e extends Ge{constructor(t,n){if(super(),this.binaryType=kN,this.writeBuffer=[],this._prevBufferLen=0,this._pingInterval=-1,this._pingTimeout=-1,this._maxPayload=-1,this._pingTimeoutTime=1/0,t&&typeof t=="object"&&(n=t,t=null),t){let a=Gi(t);n.hostname=a.host,n.secure=a.protocol==="https"||a.protocol==="wss",n.port=a.port,a.query&&(n.query=a.query)}else n.host&&(n.hostname=Gi(n.host).host);Na(this,n),this.secure=n.secure!=null?n.secure:typeof location!="undefined"&&location.protocol==="https:",n.hostname&&!n.port&&(n.port=this.secure?"443":"80"),this.hostname=n.hostname||(typeof location!="undefined"?location.hostname:"localhost"),this.port=n.port||(typeof location!="undefined"&&location.port?location.port:this.secure?"443":"80"),this.transports=[],this._transportsByName={},n.transports.forEach(a=>{let r=a.prototype.name;this.transports.push(r),this._transportsByName[r]=a}),this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,addTrailingSlash:!0,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!1},n),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),typeof this.opts.query=="string"&&(this.opts.query=AN(this.opts.query)),Vm&&(this.opts.closeOnBeforeunload&&(this._beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this._beforeunloadEventListener,!1)),this.hostname!=="localhost"&&(this._offlineEventListener=()=>{this._onClose("transport close",{description:"network connection lost"})},lu.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(t){let n=Object.assign({},this.opts.query);n.EIO=Rm,n.transport=t,this.id&&(n.sid=this.id);let a=Object.assign({},this.opts,{query:n,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[t]);return new this._transportsByName[t](a)}_open(){if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}let t=this.opts.rememberUpgrade&&e.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1?"websocket":this.transports[0];this.readyState="opening";let n=this.createTransport(t);n.open(),this.setTransport(n)}setTransport(t){this.transport&&this.transport.removeAllListeners(),this.transport=t,t.on("drain",this._onDrain.bind(this)).on("packet",this._onPacket.bind(this)).on("error",this._onError.bind(this)).on("close",n=>this._onClose("transport close",n))}onOpen(){this.readyState="open",e.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush()}_onPacket(t){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")switch(this.emitReserved("packet",t),this.emitReserved("heartbeat"),t.type){case"open":this.onHandshake(JSON.parse(t.data));break;case"ping":this._sendPacket("pong"),this.emitReserved("ping"),this.emitReserved("pong"),this._resetPingTimeout();break;case"error":let n=new Error("server error");n.code=t.data,this._onError(n);break;case"message":this.emitReserved("data",t.data),this.emitReserved("message",t.data);break}}onHandshake(t){this.emitReserved("handshake",t),this.id=t.sid,this.transport.query.sid=t.sid,this._pingInterval=t.pingInterval,this._pingTimeout=t.pingTimeout,this._maxPayload=t.maxPayload,this.onOpen(),this.readyState!=="closed"&&this._resetPingTimeout()}_resetPingTimeout(){this.clearTimeoutFn(this._pingTimeoutTimer);let t=this._pingInterval+this._pingTimeout;this._pingTimeoutTime=Date.now()+t,this._pingTimeoutTimer=this.setTimeoutFn(()=>{this._onClose("ping timeout")},t),this.opts.autoUnref&&this._pingTimeoutTimer.unref()}_onDrain(){this.writeBuffer.splice(0,this._prevBufferLen),this._prevBufferLen=0,this.writeBuffer.length===0?this.emitReserved("drain"):this.flush()}flush(){if(this.readyState!=="closed"&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){let t=this._getWritablePackets();this.transport.send(t),this._prevBufferLen=t.length,this.emitReserved("flush")}}_getWritablePackets(){if(!(this._maxPayload&&this.transport.name==="polling"&&this.writeBuffer.length>1))return this.writeBuffer;let n=1;for(let a=0;a<this.writeBuffer.length;a++){let r=this.writeBuffer[a].data;if(r&&(n+=TN(r)),a>0&&n>this._maxPayload)return this.writeBuffer.slice(0,a);n+=2}return this.writeBuffer}_hasPingExpired(){if(!this._pingTimeoutTime)return!0;let t=Date.now()>this._pingTimeoutTime;return t&&(this._pingTimeoutTime=0,Sa(()=>{this._onClose("ping timeout")},this.setTimeoutFn)),t}write(t,n,a){return this._sendPacket("message",t,n,a),this}send(t,n,a){return this._sendPacket("message",t,n,a),this}_sendPacket(t,n,a,r){if(typeof n=="function"&&(r=n,n=void 0),typeof a=="function"&&(r=a,a=null),this.readyState==="closing"||this.readyState==="closed")return;a=a||{},a.compress=a.compress!==!1;let i={type:t,data:n,options:a};this.emitReserved("packetCreate",i),this.writeBuffer.push(i),r&&this.once("flush",r),this.flush()}close(){let t=()=>{this._onClose("forced close"),this.transport.close()},n=()=>{this.off("upgrade",n),this.off("upgradeError",n),t()},a=()=>{this.once("upgrade",n),this.once("upgradeError",n)};return(this.readyState==="opening"||this.readyState==="open")&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?a():t()}):this.upgrading?a():t()),this}_onError(t){if(e.priorWebsocketSuccess=!1,this.opts.tryAllTransports&&this.transports.length>1&&this.readyState==="opening")return this.transports.shift(),this._open();this.emitReserved("error",t),this._onClose("transport error",t)}_onClose(t,n){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing"){if(this.clearTimeoutFn(this._pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),Vm&&(this._beforeunloadEventListener&&removeEventListener("beforeunload",this._beforeunloadEventListener,!1),this._offlineEventListener)){let a=lu.indexOf(this._offlineEventListener);a!==-1&&lu.splice(a,1)}this.readyState="closed",this.id=null,this.emitReserved("close",t,n),this.writeBuffer=[],this._prevBufferLen=0}}};Br.protocol=Rm;ou=class extends Br{constructor(){super(...arguments),this._upgrades=[]}onOpen(){if(super.onOpen(),this.readyState==="open"&&this.opts.upgrade)for(let t=0;t<this._upgrades.length;t++)this._probe(this._upgrades[t])}_probe(t){let n=this.createTransport(t),a=!1;Br.priorWebsocketSuccess=!1;let r=()=>{a||(n.send([{type:"ping",data:"probe"}]),n.once("packet",p=>{if(!a)if(p.type==="pong"&&p.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",n),!n)return;Br.priorWebsocketSuccess=n.name==="websocket",this.transport.pause(()=>{a||this.readyState!=="closed"&&(u(),this.setTransport(n),n.send([{type:"upgrade"}]),this.emitReserved("upgrade",n),n=null,this.upgrading=!1,this.flush())})}else{let f=new Error("probe error");f.transport=n.name,this.emitReserved("upgradeError",f)}}))};function i(){a||(a=!0,u(),n.close(),n=null)}let s=p=>{let f=new Error("probe error: "+p);f.transport=n.name,i(),this.emitReserved("upgradeError",f)};function l(){s("transport closed")}function o(){s("socket closed")}function c(p){n&&p.name!==n.name&&i()}let u=()=>{n.removeListener("open",r),n.removeListener("error",s),n.removeListener("close",l),this.off("close",o),this.off("upgrading",c)};n.once("open",r),n.once("error",s),n.once("close",l),this.once("close",o),this.once("upgrading",c),this._upgrades.indexOf("webtransport")!==-1&&t!=="webtransport"?this.setTimeoutFn(()=>{a||n.open()},200):n.open()}onHandshake(t){this._upgrades=this._filterUpgrades(t.upgrades),super.onHandshake(t)}_filterUpgrades(t){let n=[];for(let a=0;a<t.length;a++)~this.transports.indexOf(t[a])&&n.push(t[a]);return n}},Xi=class extends ou{constructor(t,n={}){let a=typeof t=="object"?t:n;(!a.transports||a.transports&&typeof a.transports[0]=="string")&&(a.transports=(a.transports||["polling","websocket","webtransport"]).map(r=>Um[r]).filter(r=>!!r)),super(t,a)}}});var zN=N(()=>{Dm()});var YU,cu=N(()=>{Hm();Hm();_l();Pm();Pr();Bm();Ur();zN();iu();iu();su();su();Mm();YU=Xi.protocol});function MN(e,t="",n){let a=e;n=n||typeof location!="undefined"&&location,e==null&&(e=n.protocol+"//"+n.host),typeof e=="string"&&(e.charAt(0)==="/"&&(e.charAt(1)==="/"?e=n.protocol+e:e=n.host+e),/^(https?|wss?):\/\//.test(e)||(typeof n!="undefined"?e=n.protocol+"//"+e:e="https://"+e),a=Gi(e)),a.port||(/^(http|ws)$/.test(a.protocol)?a.port="80":/^(http|ws)s$/.test(a.protocol)&&(a.port="443")),a.path=a.path||"/";let i=a.host.indexOf(":")!==-1?"["+a.host+"]":a.host;return a.id=a.protocol+"://"+i+":"+a.port+t,a.href=a.protocol+"://"+i+(n&&n.port===a.port?"":":"+a.port),a}var UN=N(()=>{cu()});function Ll(e){return W2&&(e instanceof ArrayBuffer||eR(e))||tR&&e instanceof Blob||nR&&e instanceof File}function Ol(e,t){if(!e||typeof e!="object")return!1;if(Array.isArray(e)){for(let n=0,a=e.length;n<a;n++)if(Ol(e[n]))return!0;return!1}if(Ll(e))return!0;if(e.toJSON&&typeof e.toJSON=="function"&&arguments.length===1)return Ol(e.toJSON(),!0);for(let n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&Ol(e[n]))return!0;return!1}var W2,eR,PN,tR,nR,qm=N(()=>{W2=typeof ArrayBuffer=="function",eR=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e.buffer instanceof ArrayBuffer,PN=Object.prototype.toString,tR=typeof Blob=="function"||typeof Blob!="undefined"&&PN.call(Blob)==="[object BlobConstructor]",nR=typeof File=="function"||typeof File!="undefined"&&PN.call(File)==="[object FileConstructor]"});function BN(e){let t=[],n=e.data,a=e;return a.data=jm(n,t),a.attachments=t.length,{packet:a,buffers:t}}function jm(e,t){if(!e)return e;if(Ll(e)){let n={_placeholder:!0,num:t.length};return t.push(e),n}else if(Array.isArray(e)){let n=new Array(e.length);for(let a=0;a<e.length;a++)n[a]=jm(e[a],t);return n}else if(typeof e=="object"&&!(e instanceof Date)){let n={};for(let a in e)Object.prototype.hasOwnProperty.call(e,a)&&(n[a]=jm(e[a],t));return n}return e}function VN(e,t){return e.data=Im(e.data,t),delete e.attachments,e}function Im(e,t){if(!e)return e;if(e&&e._placeholder===!0){if(typeof e.num=="number"&&e.num>=0&&e.num<t.length)return t[e.num];throw new Error("illegal attachments")}else if(Array.isArray(e))for(let n=0;n<e.length;n++)e[n]=Im(e[n],t);else if(typeof e=="object")for(let n in e)Object.prototype.hasOwnProperty.call(e,n)&&(e[n]=Im(e[n],t));return e}var HN=N(()=>{qm()});var Qm={};fu(Qm,{Decoder:()=>Gm,Encoder:()=>Ym,PacketType:()=>Ne,protocol:()=>jN});function qN(e){return Object.prototype.toString.call(e)==="[object Object]"}var aR,jN,Ne,Ym,Gm,Xm,uu=N(()=>{Mr();HN();qm();aR=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"],jN=5;(function(e){e[e.CONNECT=0]="CONNECT",e[e.DISCONNECT=1]="DISCONNECT",e[e.EVENT=2]="EVENT",e[e.ACK=3]="ACK",e[e.CONNECT_ERROR=4]="CONNECT_ERROR",e[e.BINARY_EVENT=5]="BINARY_EVENT",e[e.BINARY_ACK=6]="BINARY_ACK"})(Ne||(Ne={}));Ym=class{constructor(t){this.replacer=t}encode(t){return(t.type===Ne.EVENT||t.type===Ne.ACK)&&Ol(t)?this.encodeAsBinary({type:t.type===Ne.EVENT?Ne.BINARY_EVENT:Ne.BINARY_ACK,nsp:t.nsp,data:t.data,id:t.id}):[this.encodeAsString(t)]}encodeAsString(t){let n=""+t.type;return(t.type===Ne.BINARY_EVENT||t.type===Ne.BINARY_ACK)&&(n+=t.attachments+"-"),t.nsp&&t.nsp!=="/"&&(n+=t.nsp+","),t.id!=null&&(n+=t.id),t.data!=null&&(n+=JSON.stringify(t.data,this.replacer)),n}encodeAsBinary(t){let n=BN(t),a=this.encodeAsString(n.packet),r=n.buffers;return r.unshift(a),r}};Gm=class e extends Ge{constructor(t){super(),this.reviver=t}add(t){let n;if(typeof t=="string"){if(this.reconstructor)throw new Error("got plaintext data when reconstructing a packet");n=this.decodeString(t);let a=n.type===Ne.BINARY_EVENT;a||n.type===Ne.BINARY_ACK?(n.type=a?Ne.EVENT:Ne.ACK,this.reconstructor=new Xm(n),n.attachments===0&&super.emitReserved("decoded",n)):super.emitReserved("decoded",n)}else if(Ll(t)||t.base64)if(this.reconstructor)n=this.reconstructor.takeBinaryData(t),n&&(this.reconstructor=null,super.emitReserved("decoded",n));else throw new Error("got binary data when not reconstructing a packet");else throw new Error("Unknown type: "+t)}decodeString(t){let n=0,a={type:Number(t.charAt(0))};if(Ne[a.type]===void 0)throw new Error("unknown packet type "+a.type);if(a.type===Ne.BINARY_EVENT||a.type===Ne.BINARY_ACK){let i=n+1;for(;t.charAt(++n)!=="-"&&n!=t.length;);let s=t.substring(i,n);if(s!=Number(s)||t.charAt(n)!=="-")throw new Error("Illegal attachments");a.attachments=Number(s)}if(t.charAt(n+1)==="/"){let i=n+1;for(;++n&&!(t.charAt(n)===","||n===t.length););a.nsp=t.substring(i,n)}else a.nsp="/";let r=t.charAt(n+1);if(r!==""&&Number(r)==r){let i=n+1;for(;++n;){let s=t.charAt(n);if(s==null||Number(s)!=s){--n;break}if(n===t.length)break}a.id=Number(t.substring(i,n+1))}if(t.charAt(++n)){let i=this.tryParse(t.substr(n));if(e.isPayloadValid(a.type,i))a.data=i;else throw new Error("invalid payload")}return a}tryParse(t){try{return JSON.parse(t,this.reviver)}catch(n){return!1}}static isPayloadValid(t,n){switch(t){case Ne.CONNECT:return qN(n);case Ne.DISCONNECT:return n===void 0;case Ne.CONNECT_ERROR:return typeof n=="string"||qN(n);case Ne.EVENT:case Ne.BINARY_EVENT:return Array.isArray(n)&&(typeof n[0]=="number"||typeof n[0]=="string"&&aR.indexOf(n[0])===-1);case Ne.ACK:case Ne.BINARY_ACK:return Array.isArray(n)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}},Xm=class{constructor(t){this.packet=t,this.buffers=[],this.reconPack=t}takeBinaryData(t){if(this.buffers.push(t),this.buffers.length===this.reconPack.attachments){let n=VN(this.reconPack,this.buffers);return this.finishedReconstruction(),n}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}});function En(e,t,n){return e.on(t,n),function(){e.off(t,n)}}var Fm=N(()=>{});var rR,Qi,Zm=N(()=>{uu();Fm();Mr();rR=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1}),Qi=class extends Ge{constructor(t,n,a){super(),this.connected=!1,this.recovered=!1,this.receiveBuffer=[],this.sendBuffer=[],this._queue=[],this._queueSeq=0,this.ids=0,this.acks={},this.flags={},this.io=t,this.nsp=n,a&&a.auth&&(this.auth=a.auth),this._opts=Object.assign({},a),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;let t=this.io;this.subs=[En(t,"open",this.onopen.bind(this)),En(t,"packet",this.onpacket.bind(this)),En(t,"error",this.onerror.bind(this)),En(t,"close",this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected?this:(this.subEvents(),this.io._reconnecting||this.io.open(),this.io._readyState==="open"&&this.onopen(),this)}open(){return this.connect()}send(...t){return t.unshift("message"),this.emit.apply(this,t),this}emit(t,...n){var a,r,i;if(rR.hasOwnProperty(t))throw new Error('"'+t.toString()+'" is a reserved event name');if(n.unshift(t),this._opts.retries&&!this.flags.fromQueue&&!this.flags.volatile)return this._addToQueue(n),this;let s={type:Ne.EVENT,data:n};if(s.options={},s.options.compress=this.flags.compress!==!1,typeof n[n.length-1]=="function"){let u=this.ids++,p=n.pop();this._registerAckCallback(u,p),s.id=u}let l=(r=(a=this.io.engine)===null||a===void 0?void 0:a.transport)===null||r===void 0?void 0:r.writable,o=this.connected&&!(!((i=this.io.engine)===null||i===void 0)&&i._hasPingExpired());return this.flags.volatile&&!l||(o?(this.notifyOutgoingListeners(s),this.packet(s)):this.sendBuffer.push(s)),this.flags={},this}_registerAckCallback(t,n){var a;let r=(a=this.flags.timeout)!==null&&a!==void 0?a:this._opts.ackTimeout;if(r===void 0){this.acks[t]=n;return}let i=this.io.setTimeoutFn(()=>{delete this.acks[t];for(let l=0;l<this.sendBuffer.length;l++)this.sendBuffer[l].id===t&&this.sendBuffer.splice(l,1);n.call(this,new Error("operation has timed out"))},r),s=(...l)=>{this.io.clearTimeoutFn(i),n.apply(this,l)};s.withError=!0,this.acks[t]=s}emitWithAck(t,...n){return new Promise((a,r)=>{let i=(s,l)=>s?r(s):a(l);i.withError=!0,n.push(i),this.emit(t,...n)})}_addToQueue(t){let n;typeof t[t.length-1]=="function"&&(n=t.pop());let a={id:this._queueSeq++,tryCount:0,pending:!1,args:t,flags:Object.assign({fromQueue:!0},this.flags)};t.push((r,...i)=>a!==this._queue[0]?void 0:(r!==null?a.tryCount>this._opts.retries&&(this._queue.shift(),n&&n(r)):(this._queue.shift(),n&&n(null,...i)),a.pending=!1,this._drainQueue())),this._queue.push(a),this._drainQueue()}_drainQueue(t=!1){if(!this.connected||this._queue.length===0)return;let n=this._queue[0];n.pending&&!t||(n.pending=!0,n.tryCount++,this.flags=n.flags,this.emit.apply(this,n.args))}packet(t){t.nsp=this.nsp,this.io._packet(t)}onopen(){typeof this.auth=="function"?this.auth(t=>{this._sendConnectPacket(t)}):this._sendConnectPacket(this.auth)}_sendConnectPacket(t){this.packet({type:Ne.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},t):t})}onerror(t){this.connected||this.emitReserved("connect_error",t)}onclose(t,n){this.connected=!1,delete this.id,this.emitReserved("disconnect",t,n),this._clearAcks()}_clearAcks(){Object.keys(this.acks).forEach(t=>{if(!this.sendBuffer.some(a=>String(a.id)===t)){let a=this.acks[t];delete this.acks[t],a.withError&&a.call(this,new Error("socket has been disconnected"))}})}onpacket(t){if(t.nsp===this.nsp)switch(t.type){case Ne.CONNECT:t.data&&t.data.sid?this.onconnect(t.data.sid,t.data.pid):this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case Ne.EVENT:case Ne.BINARY_EVENT:this.onevent(t);break;case Ne.ACK:case Ne.BINARY_ACK:this.onack(t);break;case Ne.DISCONNECT:this.ondisconnect();break;case Ne.CONNECT_ERROR:this.destroy();let a=new Error(t.data.message);a.data=t.data.data,this.emitReserved("connect_error",a);break}}onevent(t){let n=t.data||[];t.id!=null&&n.push(this.ack(t.id)),this.connected?this.emitEvent(n):this.receiveBuffer.push(Object.freeze(n))}emitEvent(t){if(this._anyListeners&&this._anyListeners.length){let n=this._anyListeners.slice();for(let a of n)a.apply(this,t)}super.emit.apply(this,t),this._pid&&t.length&&typeof t[t.length-1]=="string"&&(this._lastOffset=t[t.length-1])}ack(t){let n=this,a=!1;return function(...r){a||(a=!0,n.packet({type:Ne.ACK,id:t,data:r}))}}onack(t){let n=this.acks[t.id];typeof n=="function"&&(delete this.acks[t.id],n.withError&&t.data.unshift(null),n.apply(this,t.data))}onconnect(t,n){this.id=t,this.recovered=n&&this._pid===n,this._pid=n,this.connected=!0,this.emitBuffered(),this.emitReserved("connect"),this._drainQueue(!0)}emitBuffered(){this.receiveBuffer.forEach(t=>this.emitEvent(t)),this.receiveBuffer=[],this.sendBuffer.forEach(t=>{this.notifyOutgoingListeners(t),this.packet(t)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(t=>t()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:Ne.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(t){return this.flags.compress=t,this}get volatile(){return this.flags.volatile=!0,this}timeout(t){return this.flags.timeout=t,this}onAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(t),this}prependAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(t),this}offAny(t){if(!this._anyListeners)return this;if(t){let n=this._anyListeners;for(let a=0;a<n.length;a++)if(t===n[a])return n.splice(a,1),this}else this._anyListeners=[];return this}listenersAny(){return this._anyListeners||[]}onAnyOutgoing(t){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.push(t),this}prependAnyOutgoing(t){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.unshift(t),this}offAnyOutgoing(t){if(!this._anyOutgoingListeners)return this;if(t){let n=this._anyOutgoingListeners;for(let a=0;a<n.length;a++)if(t===n[a])return n.splice(a,1),this}else this._anyOutgoingListeners=[];return this}listenersAnyOutgoing(){return this._anyOutgoingListeners||[]}notifyOutgoingListeners(t){if(this._anyOutgoingListeners&&this._anyOutgoingListeners.length){let n=this._anyOutgoingListeners.slice();for(let a of n)a.apply(this,t.data)}}}});function Vr(e){e=e||{},this.ms=e.min||100,this.max=e.max||1e4,this.factor=e.factor||2,this.jitter=e.jitter>0&&e.jitter<=1?e.jitter:0,this.attempts=0}var IN=N(()=>{Vr.prototype.duration=function(){var e=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var t=Math.random(),n=Math.floor(t*this.jitter*e);e=(Math.floor(t*10)&1)==0?e-n:e+n}return Math.min(e,this.max)|0};Vr.prototype.reset=function(){this.attempts=0};Vr.prototype.setMin=function(e){this.ms=e};Vr.prototype.setMax=function(e){this.max=e};Vr.prototype.setJitter=function(e){this.jitter=e}});var Fi,YN=N(()=>{cu();Zm();uu();Fm();IN();Mr();Fi=class extends Ge{constructor(t,n){var a;super(),this.nsps={},this.subs=[],t&&typeof t=="object"&&(n=t,t=void 0),n=n||{},n.path=n.path||"/socket.io",this.opts=n,Na(this,n),this.reconnection(n.reconnection!==!1),this.reconnectionAttempts(n.reconnectionAttempts||1/0),this.reconnectionDelay(n.reconnectionDelay||1e3),this.reconnectionDelayMax(n.reconnectionDelayMax||5e3),this.randomizationFactor((a=n.randomizationFactor)!==null&&a!==void 0?a:.5),this.backoff=new Vr({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(n.timeout==null?2e4:n.timeout),this._readyState="closed",this.uri=t;let r=n.parser||Qm;this.encoder=new r.Encoder,this.decoder=new r.Decoder,this._autoConnect=n.autoConnect!==!1,this._autoConnect&&this.open()}reconnection(t){return arguments.length?(this._reconnection=!!t,t||(this.skipReconnect=!0),this):this._reconnection}reconnectionAttempts(t){return t===void 0?this._reconnectionAttempts:(this._reconnectionAttempts=t,this)}reconnectionDelay(t){var n;return t===void 0?this._reconnectionDelay:(this._reconnectionDelay=t,(n=this.backoff)===null||n===void 0||n.setMin(t),this)}randomizationFactor(t){var n;return t===void 0?this._randomizationFactor:(this._randomizationFactor=t,(n=this.backoff)===null||n===void 0||n.setJitter(t),this)}reconnectionDelayMax(t){var n;return t===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=t,(n=this.backoff)===null||n===void 0||n.setMax(t),this)}timeout(t){return arguments.length?(this._timeout=t,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()}open(t){if(~this._readyState.indexOf("open"))return this;this.engine=new Xi(this.uri,this.opts);let n=this.engine,a=this;this._readyState="opening",this.skipReconnect=!1;let r=En(n,"open",function(){a.onopen(),t&&t()}),i=l=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",l),t?t(l):this.maybeReconnectOnOpen()},s=En(n,"error",i);if(this._timeout!==!1){let l=this._timeout,o=this.setTimeoutFn(()=>{r(),i(new Error("timeout")),n.close()},l);this.opts.autoUnref&&o.unref(),this.subs.push(()=>{this.clearTimeoutFn(o)})}return this.subs.push(r),this.subs.push(s),this}connect(t){return this.open(t)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");let t=this.engine;this.subs.push(En(t,"ping",this.onping.bind(this)),En(t,"data",this.ondata.bind(this)),En(t,"error",this.onerror.bind(this)),En(t,"close",this.onclose.bind(this)),En(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(t){try{this.decoder.add(t)}catch(n){this.onclose("parse error",n)}}ondecoded(t){Sa(()=>{this.emitReserved("packet",t)},this.setTimeoutFn)}onerror(t){this.emitReserved("error",t)}socket(t,n){let a=this.nsps[t];return a?this._autoConnect&&!a.active&&a.connect():(a=new Qi(this,t,n),this.nsps[t]=a),a}_destroy(t){let n=Object.keys(this.nsps);for(let a of n)if(this.nsps[a].active)return;this._close()}_packet(t){let n=this.encoder.encode(t);for(let a=0;a<n.length;a++)this.engine.write(n[a],t.options)}cleanup(){this.subs.forEach(t=>t()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close")}disconnect(){return this._close()}onclose(t,n){var a;this.cleanup(),(a=this.engine)===null||a===void 0||a.close(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",t,n),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;let t=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{let n=this.backoff.duration();this._reconnecting=!0;let a=this.setTimeoutFn(()=>{t.skipReconnect||(this.emitReserved("reconnect_attempt",t.backoff.attempts),!t.skipReconnect&&t.open(r=>{r?(t._reconnecting=!1,t.reconnect(),this.emitReserved("reconnect_error",r)):t.onreconnect()}))},n);this.opts.autoUnref&&a.unref(),this.subs.push(()=>{this.clearTimeoutFn(a)})}}onreconnect(){let t=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",t)}}});function Ml(e,t){typeof e=="object"&&(t=e,e=void 0),t=t||{};let n=MN(e,t.path||"/socket.io"),a=n.source,r=n.id,i=n.path,s=zl[r]&&i in zl[r].nsps,l=t.forceNew||t["force new connection"]||t.multiplex===!1||s,o;return l?o=new Fi(a,t):(zl[r]||(zl[r]=new Fi(a,t)),o=zl[r]),n.query&&!t.query&&(t.query=n.queryKey),o.socket(n.path,t)}var zl,GN=N(()=>{UN();YN();Zm();uu();cu();zl={};Object.assign(Ml,{Manager:Fi,Socket:Qi,io:Ml,connect:Ml})});var on,be,$m,XN=N(()=>{"use strict";on=Z($e());GN();Zt();be=Z(oe()),$m=({apiKey:e,agentId:t,sandboxId:n})=>{let[a,r]=(0,on.useState)([]),[i,s]=(0,on.useState)(!1),[l,o]=(0,on.useState)(new Set),[c,u]=(0,on.useState)(!0),[p,f]=(0,on.useState)(!1),d=(0,on.useRef)(null),x=(0,on.useRef)(null),y=(0,on.useRef)(null),k=()=>{var g;(g=d.current)==null||g.scrollIntoView({behavior:"smooth"})},m=g=>{o(S=>{let T=new Set(S);return T.has(g)?T.delete(g):T.add(g),T})},h=()=>O(null,null,function*(){try{console.log("Clearing logs from all sandbox skills with API key:",e,"agentId:",t),f(!0);let g=yield re.getAllSkillOverrides();if(g.length===0){console.log("No skills found to clear logs from"),r([]),o(new Set);return}let S=g.map(w=>O(null,null,function*(){try{return yield re.clearSandboxLogs(e,t,w.sandboxId)}catch(C){return console.error(`Error clearing logs for skill ${w.skillId}:`,C),{success:!1,error:"Failed to clear logs"}}}));(yield Promise.all(S)).every(w=>w.success)?(r([]),o(new Set),console.log("All logs cleared successfully")):(console.error("Some log clearing operations failed"),alert("Some logs could not be cleared. Check console for details."))}catch(g){console.error("Failed to clear logs:",g),alert("Failed to clear logs")}finally{f(!1)}});return(0,on.useEffect)(()=>{k()},[a]),(0,on.useEffect)(()=>{e&&t&&O(null,null,function*(){try{console.log("Loading logs from all sandbox skills with API key:",e,"agentId:",t),u(!0);let S=yield re.loadAllSandboxLogs(e,t,100);if(console.log("All sandbox logs response:",S),S.success&&S.data){let T=S.data.logs.map(E=>({_id:E._id,id:E.id,timestamp:new Date(E.timestamp).toLocaleTimeString(),type:E.type,subType:E.subType,message:E.message,duration:E.duration,error:E.error,metadata:E.metadata,skillName:E.skillName,sandboxId:E.sandboxId}));console.log("Converted logs from all skills:",T),r(T)}else console.log("No logs or error:",S.error)}catch(S){console.error("Failed to load logs from all skills:",S)}finally{u(!1)}})},[e,t]),(0,on.useEffect)(()=>{let g=()=>{try{let E=new WebSocket("ws://localhost:3000");x.current=E,E.onopen=()=>{console.log("Connected to CLI dev server"),s(!0)},E.onclose=()=>{console.log("Disconnected from CLI dev server")},E.onmessage=w=>{try{let C=JSON.parse(w.data);if(console.log("Received message from CLI:",C),C.type==="log"){let U={id:C.id||Date.now().toString(),timestamp:new Date(C.timestamp||Date.now()).toLocaleTimeString(),type:C.type||"log",subType:C.subType||"info",message:C.message||"No message",metadata:C.metadata||{},error:C.error};r(H=>[...H,U])}}catch(C){console.error("Failed to parse CLI WebSocket message:",C)}},E.onerror=w=>{console.error("CLI WebSocket error:",w)}}catch(E){console.error("Failed to connect to CLI dev server:",E)}},S=()=>{try{let E=Ml("wss://api.lua.dev/feed",{query:{apiKey:e,channel:"logs"}});y.current=E,E.on("connect",()=>{console.log("Connected to server log feed"),s(!0),T("\u{1F7E2} Connected to log feed","connected")}),E.on("disconnect",()=>{console.log("Disconnected from server log feed"),s(!1),T("\u{1F534} Disconnected from log feed","disconnected")}),E.on("log",w=>{let C="info",U="No message",H={},_="";if(w&&typeof w=="object"){let L=w.data||w;C=L.subType||"info",U=L.message||"No message",H=L.metadata||{},_=L.error||L.details||"",_&&typeof _=="object"&&(_=JSON.stringify(_,null,2))}else typeof w=="string"&&(U=w,C="info");let R={id:Date.now().toString(),timestamp:new Date().toLocaleTimeString(),type:"log",subType:C,message:U,metadata:H,error:_};r(L=>[...L,R])}),E.on("connect_error",w=>{T("\u{1F534} Connection failed","disconnected")})}catch(E){T("\u{1F534} Connection error","disconnected")}},T=(E,w)=>{let C=document.getElementById("logConnectionStatus");C&&(C.textContent=E,C.className=`log-connection-status ${w}`)};return g(),e&&t&&n&&S(),()=>{x.current&&x.current.close(),y.current&&y.current.disconnect()}},[e,t,n]),(0,be.jsxs)("div",{className:"log-messages",children:[(0,be.jsxs)("div",{className:"logs-header",children:[(0,be.jsxs)("div",{className:"logs-title",children:["Console Logs (",a.length,")"]}),(0,be.jsx)("div",{className:"logs-actions",children:(0,be.jsx)("button",{className:"clear-logs-button",onClick:h,disabled:p,title:"Clear all logs",children:p?"\u27F3":"\u{1F5D1}\uFE0F"})})]}),(0,be.jsxs)("div",{className:"log-content",children:[c?(0,be.jsx)("div",{className:"no-logs",children:(0,be.jsx)("img",{src:"https://admin.lua.dev/images/logo.svg",alt:"Loading",className:"loading-logo"})}):a.length===0?(0,be.jsxs)("div",{className:"no-logs",children:[(0,be.jsx)("div",{className:"no-logs-icon",children:"\u{1F4CB}"}),(0,be.jsx)("div",{className:"no-logs-text",children:"No logs yet"}),(0,be.jsx)("div",{className:"no-logs-subtext",children:"Console logs will appear here when your skill runs"})]}):(0,be.jsx)(be.Fragment,{children:a.map(g=>{let S=l.has(g.id),T=g.metadata&&Object.keys(g.metadata).length>0,E=g.error&&typeof g.error=="string"&&g.error.trim()!=="",w=T||E;return(0,be.jsxs)("div",{className:`log-entry ${g.subType}`,children:[(0,be.jsxs)("div",{className:"log-main",onClick:()=>m(g.id),children:[(0,be.jsxs)("span",{className:"log-timestamp",children:["[",g.timestamp,"]"]}),(0,be.jsxs)("span",{className:"log-type",children:["[",g.subType.toUpperCase(),"]"]}),g.skillName&&(0,be.jsxs)("span",{className:"log-skill",children:["[",g.skillName,"]"]}),(0,be.jsx)("span",{className:`log-message ${S?"expanded":"ellipsed"}`,children:g.message}),(0,be.jsx)("span",{className:`expand-arrow ${S?"expanded":""}`,children:"\u25B6"})]}),S&&(0,be.jsxs)("div",{className:"log-details",children:[(0,be.jsxs)("div",{className:"full-message",children:[(0,be.jsx)("div",{className:"detail-label",children:"Message:"}),(0,be.jsx)("div",{className:"detail-content",children:g.message})]}),E&&(0,be.jsxs)("div",{className:"error-details",children:[(0,be.jsx)("div",{className:"detail-label",children:"Error:"}),(0,be.jsx)("div",{className:"detail-content",children:typeof g.error=="string"?g.error:JSON.stringify(g.error)})]}),T&&(0,be.jsxs)("div",{className:"metadata",children:[(0,be.jsx)("div",{className:"detail-label",children:"Metadata:"}),Object.entries(g.metadata).map(([C,U])=>(0,be.jsxs)("div",{className:"metadata-item",children:[(0,be.jsxs)("span",{className:"metadata-key",children:[C,":"]}),(0,be.jsx)("span",{className:"metadata-value",children:String(U)})]},C))]})]})]},g.id)})}),(0,be.jsx)("div",{ref:d})]}),(0,be.jsx)("div",{className:"log-footer-status",children:(0,be.jsx)("div",{id:"logConnectionStatus",className:"log-connection-status",children:"\u{1F7E1} Connecting..."})})]})}});var QN=N(()=>{});var FN,ZN,$N=N(()=>{"use strict";FN=Z($e());Zt();QN();ZN=Z(oe())});var JN=N(()=>{"use strict";rN();sN();XN();bm();Em();Tm();$N();Sm();Kc()});var kn,Bn,KN,WN=N(()=>{"use strict";kn=Z($e());JN();Zt();Bn=Z(oe()),KN=({apiKey:e,agentId:t,skillId:n,sandboxId:a,sharedChatMessages:r,onSharedSendMessage:i,onSharedClearHistory:s,isChatLoading:l,setIsChatLoading:o})=>{let[c,u]=(0,kn.useState)("persona"),[p,f]=(0,kn.useState)(""),[d,x]=(0,kn.useState)(window.innerWidth/2),[y,k]=(0,kn.useState)(250),m=(0,kn.useRef)(!1),h=(0,kn.useRef)(!1),g=(0,kn.useRef)(null),S=(0,kn.useRef)(null);(0,kn.useEffect)(()=>{T()},[]),(0,kn.useEffect)(()=>{let w=H=>{var R,L;let _=H.target;_===g.current||(R=g.current)!=null&&R.contains(_)?(m.current=!0,document.body.style.cursor="col-resize",document.body.style.userSelect="none",H.preventDefault()):(_===S.current||(L=S.current)!=null&&L.contains(_))&&(h.current=!0,document.body.style.cursor="row-resize",document.body.style.userSelect="none",H.preventDefault())},C=H=>{if(m.current){let _=window.innerWidth,R=_-H.clientX,L=500,G=_-300;R>=L&&R<=G&&x(R)}else if(h.current){let _=window.innerHeight-60,R=_-H.clientY+60,L=150,G=_-300;R>=L&&R<=G&&k(R)}},U=()=>{m.current?(m.current=!1,document.body.style.cursor="",document.body.style.userSelect=""):h.current&&(h.current=!1,document.body.style.cursor="",document.body.style.userSelect="")};return document.addEventListener("mousedown",w),document.addEventListener("mousemove",C),document.addEventListener("mouseup",U),()=>{document.removeEventListener("mousedown",w),document.removeEventListener("mousemove",C),document.removeEventListener("mouseup",U)}},[]);let T=()=>O(null,null,function*(){try{let w=yield re.loadPersona();w.success&&f(w.persona||"")}catch(w){console.error("Failed to load persona:",w)}}),E=w=>O(null,null,function*(){try{let C=yield re.savePersona(w);return C.success?(f(w),!0):(alert("Failed to save persona: "+(C.error||"Unknown error")),!1)}catch(C){return console.error("Failed to save persona:",C),alert("Failed to save persona"),!1}});return(0,Bn.jsxs)("div",{className:"sandbox-page",children:[(0,Bn.jsxs)("div",{className:"left-side",style:{width:`calc(100% - ${d}px)`},children:[(0,Bn.jsx)("div",{className:"chat-container",style:{height:`calc(100% - ${y}px)`},children:(0,Bn.jsx)(vm,{apiKey:e,agentId:t,skillId:n,sandboxId:a,persona:p,sharedChatMessages:r,onSharedSendMessage:i,onSharedClearHistory:s,isChatLoading:l,setIsChatLoading:o})}),(0,Bn.jsx)("div",{ref:S,className:"logs-resize-handle",children:(0,Bn.jsx)("div",{className:"resize-line"})}),(0,Bn.jsx)("div",{className:"logs-container",style:{height:`${y}px`},children:(0,Bn.jsx)($m,{apiKey:e,agentId:t,sandboxId:a})})]}),(0,Bn.jsx)("div",{ref:g,className:"resize-handle"}),(0,Bn.jsx)(wm,{activeTab:c,onTabChange:u,persona:p,onSavePersona:E,apiKey:e,agentId:t,skillId:n,sandboxId:a,width:d})]})}});var eE,It,Jm,tE=N(()=>{"use strict";eE=Z($e());hm();It=Z(oe()),Jm=({messages:e,onSendMessage:t,onClearHistory:n,isLoading:a})=>{let[r,i]=(0,eE.useState)(""),s=e.length>0?e:[{id:"welcome",text:"Welcome to Production Management! I can help you monitor deployments, analyze performance, and manage your live environment. How can I assist you today?",sender:"assistant",timestamp:new Date}],l=()=>{!r.trim()||a||(t(r),i(""))},o=c=>{c.key==="Enter"&&!c.shiftKey&&(c.preventDefault(),l())};return(0,It.jsxs)("div",{className:"production-chat",children:[(0,It.jsxs)("div",{className:"chat-header",children:[(0,It.jsx)("h3",{children:"Production Chat"}),(0,It.jsx)("button",{onClick:n,className:"clear-history-button",title:"Clear chat history",children:"\u{1F5D1}\uFE0F"})]}),(0,It.jsxs)("div",{className:"chat-messages",children:[s.map(c=>(0,It.jsx)("div",{className:`message ${c.sender}`,children:(0,It.jsx)("div",{className:"message-bubble",children:(0,It.jsx)(Nl,{children:c.text})})},c.id)),a&&(0,It.jsx)("div",{className:"loading",children:(0,It.jsx)("img",{src:"https://admin.lua.dev/images/logo.svg",alt:"Loading",className:"loading-logo"})})]}),(0,It.jsx)("div",{className:"chat-input-container",children:(0,It.jsxs)("div",{className:"chat-input-form",children:[(0,It.jsx)("input",{type:"text",id:"production-chat-input",name:"productionChatMessage",value:r,onChange:c=>i(c.target.value),onKeyPress:o,placeholder:"Type your message...",className:"chat-input",disabled:a,autoComplete:"off"}),(0,It.jsx)("button",{onClick:l,disabled:a||!r.trim(),className:"send-button",children:"Send"})]})})]})}});var iR,nE,aE=N(()=>{"use strict";iR=Z($e()),nE=Z(oe())});var sR,rE,Km=N(()=>{"use strict";sR=Z($e()),rE=Z(oe())});var oR,iE,sE=N(()=>{"use strict";oR=Z($e());Km();iE=Z(oe())});var cn,se,Wm,lE=N(()=>{"use strict";cn=Z($e());Zt();se=Z(oe()),Wm=({apiKey:e,agentId:t})=>{let[n,a]=(0,cn.useState)([]),[r,i]=(0,cn.useState)(!0),[s,l]=(0,cn.useState)(new Set),[o,c]=(0,cn.useState)(1),[u,p]=(0,cn.useState)(1),[f,d]=(0,cn.useState)(0),[x,y]=(0,cn.useState)(!1),[k,m]=(0,cn.useState)(!1),h=(0,cn.useRef)(null),g=()=>{var _;(_=h.current)==null||_.scrollIntoView({behavior:"smooth"})},S=_=>{l(R=>{let L=new Set(R);return L.has(_)?L.delete(_):L.add(_),L})},T=(_=1)=>O(null,null,function*(){i(!0);try{console.log("Loading production logs for page:",_);let R=yield re.loadProductionLogs(e,t,_,20);if(R.success&&R.logs){let L=[...R.logs].reverse();a(L),R.pagination&&(c(R.pagination.currentPage),p(R.pagination.totalPages),d(R.pagination.totalCount),y(R.pagination.hasNextPage),m(R.pagination.hasPrevPage))}else console.error("Failed to load production logs:",R.error),a([])}catch(R){console.error("Error loading production logs:",R),a([])}finally{i(!1)}}),E=()=>{T(o)},w=_=>{_>=1&&_<=u&&(c(_),T(_))},C=()=>{x&&w(o+1)},U=()=>{k&&w(o-1)};(0,cn.useEffect)(()=>{e&&t&&T(1)},[e,t]),(0,cn.useEffect)(()=>{g()},[n]);let H=_=>new Date(_).toLocaleString("en-US",{month:"short",day:"numeric",hour:"2-digit",minute:"2-digit",second:"2-digit",hour12:!1});return r&&n.length===0?(0,se.jsx)("div",{className:"logs-panel",children:(0,se.jsx)("div",{className:"logs-loading",children:(0,se.jsx)("img",{src:"https://admin.lua.dev/images/logo.svg",alt:"Loading",className:"loading-logo"})})}):(0,se.jsxs)("div",{className:"logs-panel",children:[(0,se.jsxs)("div",{className:"logs-header",children:[(0,se.jsxs)("div",{className:"logs-header-content",children:[(0,se.jsx)("h3",{children:"Production Logs"}),(0,se.jsx)("div",{className:"logs-info",children:f>0&&(0,se.jsxs)("span",{className:"logs-count",children:[f," total logs"]})})]}),(0,se.jsx)("div",{className:"logs-actions",children:(0,se.jsx)("button",{className:"refresh-logs-button",onClick:E,disabled:r,title:"Refresh logs",children:r?(0,se.jsx)("img",{src:"https://admin.lua.dev/images/logo.svg",alt:"Loading",className:"loading-logo-button"}):"\u21BB"})})]}),(0,se.jsx)("div",{className:"logs-content",children:n.length===0?(0,se.jsxs)("div",{className:"no-logs",children:[(0,se.jsx)("div",{className:"no-logs-icon",children:"\u{1F4DD}"}),(0,se.jsx)("div",{className:"no-logs-text",children:"No logs found"}),(0,se.jsx)("div",{className:"no-logs-subtext",children:"Production logs will appear here when your skills are used"})]}):(0,se.jsxs)("div",{className:"logs-list",children:[n.map(_=>{var G,P,W,ie;let R=s.has(_.id),L=_.metadata&&(_.metadata.toolId||_.metadata.skillName);return(0,se.jsxs)("div",{className:`log-entry ${_.subType} ${R?"expanded":""}`,children:[(0,se.jsxs)("div",{className:"log-main",onClick:()=>L&&S(_.id),style:{cursor:L?"pointer":"default"},children:[(0,se.jsx)("span",{className:"log-timestamp",children:H(_.timestamp)}),(0,se.jsx)("span",{className:`log-level ${_.subType}`,children:_.subType.toUpperCase()}),(0,se.jsx)("span",{className:"log-message",children:_.message}),((G=_.metadata)==null?void 0:G.skillName)&&(0,se.jsx)("span",{className:"log-skill",children:_.metadata.skillName}),L&&(0,se.jsx)("span",{className:`expand-arrow ${R?"expanded":""}`,children:"\u25B6"})]}),R&&L&&(0,se.jsxs)("div",{className:"log-details",children:[((P=_.metadata)==null?void 0:P.toolId)&&(0,se.jsxs)("div",{className:"metadata-item",children:[(0,se.jsx)("span",{className:"metadata-key",children:"Tool:"}),(0,se.jsx)("span",{className:"metadata-value",children:_.metadata.toolId})]}),((W=_.metadata)==null?void 0:W.skillName)&&(0,se.jsxs)("div",{className:"metadata-item",children:[(0,se.jsx)("span",{className:"metadata-key",children:"Skill:"}),(0,se.jsx)("span",{className:"metadata-value",children:_.metadata.skillName})]}),((ie=_.metadata)==null?void 0:ie.userId)&&(0,se.jsxs)("div",{className:"metadata-item",children:[(0,se.jsx)("span",{className:"metadata-key",children:"User:"}),(0,se.jsx)("span",{className:"metadata-value",children:_.metadata.userId})]})]})]},_.id)}),(0,se.jsx)("div",{ref:h})]})}),u>1&&(0,se.jsxs)("div",{className:"logs-pagination",children:[(0,se.jsxs)("div",{className:"pagination-info",children:["Page ",o," of ",u]}),(0,se.jsxs)("div",{className:"pagination-controls",children:[(0,se.jsx)("button",{className:"pagination-button",onClick:U,disabled:!k||r,title:"Previous page",children:"\u2190"}),(0,se.jsxs)("span",{className:"page-numbers",children:[o>2&&(0,se.jsxs)(se.Fragment,{children:[(0,se.jsx)("button",{className:"page-number",onClick:()=>w(1),disabled:r,children:"1"}),o>3&&(0,se.jsx)("span",{className:"page-ellipsis",children:"..."})]}),o>1&&(0,se.jsx)("button",{className:"page-number",onClick:()=>w(o-1),disabled:r,children:o-1}),(0,se.jsx)("button",{className:"page-number active",disabled:!0,children:o}),o<u&&(0,se.jsx)("button",{className:"page-number",onClick:()=>w(o+1),disabled:r,children:o+1}),o<u-1&&(0,se.jsxs)(se.Fragment,{children:[o<u-2&&(0,se.jsx)("span",{className:"page-ellipsis",children:"..."}),(0,se.jsx)("button",{className:"page-number",onClick:()=>w(u),disabled:r,children:u})]})]}),(0,se.jsx)("button",{className:"pagination-button",onClick:C,disabled:!x||r,title:"Next page",children:"\u2192"})]})]})]})}});var Ve,q,eh,cR,th,uR,oE=N(()=>{"use strict";Ve=Z($e());Zt();Kc();q=Z(oe()),eh=e=>{if(!e||!e.trim())return e||"";try{let t=JSON.parse(e);return JSON.stringify(t,null,2).replace(/("(\\u[a-zA-Z0-9]{4}|\\[^u]|[^\\"])*"(\s*:)?|\b(true|false|null)\b|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?)/g,a=>{let r="json-number";return/^"/.test(a)?/:$/.test(a)?r="json-key":r="json-string":/true|false/.test(a)?r="json-boolean":/null/.test(a)&&(r="json-null"),`<span class="${r}">${a}</span>`})}catch(t){return e.replace(/("(\\u[a-zA-Z0-9]{4}|\\[^u]|[^\\"])*"(\s*:)?|\b(true|false|null)\b|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?)/g,n=>{let a="json-number";return/^"/.test(n)?/:$/.test(n)?a="json-key":a="json-string":/true|false/.test(n)?a="json-boolean":/null/.test(n)&&(a="json-null"),`<span class="${a}">${n}</span>`})}},cR=[{id:"user",name:"User",description:"User profile and account data",icon:"\u{1F464}"},{id:"resources",name:"Resources",description:"Files, documents, and assets",icon:"\u{1F4C1}"},{id:"products",name:"Products",description:"Product catalog and inventory",icon:"\u{1F4E6}"},{id:"baskets",name:"Baskets",description:"Shopping carts and baskets",icon:"\u{1F6D2}"},{id:"orders",name:"Orders",description:"Order history and transactions",icon:"\u{1F4CB}"},{id:"booking",name:"Booking",description:"Reservations and appointments",icon:"\u{1F4C5}"},{id:"custom",name:"Custom",description:"Custom application data",icon:"\u2699\uFE0F"}],th=({apiKey:e,agentId:t})=>{let[n,a]=(0,Ve.useState)(null),[r,i]=(0,Ve.useState)(null),[s,l]=(0,Ve.useState)(null),[o,c]=(0,Ve.useState)(!1),[u,p]=(0,Ve.useState)(!1),[f,d]=(0,Ve.useState)(!1),[x,y]=(0,Ve.useState)(""),[k,m]=(0,Ve.useState)(null),[h,g]=(0,Ve.useState)(null),[S,T]=(0,Ve.useState)(!1),[E,w]=(0,Ve.useState)("list"),C=(0,Ve.useRef)(null),U=(0,Ve.useRef)(null),[H,_]=(0,Ve.useState)(!1),[R,L]=(0,Ve.useState)(""),[G,P]=(0,Ve.useState)(""),[W,ie]=(0,Ve.useState)(!1);(0,Ve.useEffect)(()=>{we()},[e,t]),(0,Ve.useEffect)(()=>{if(console.log("JSON text changed:",x),U.current&&C.current){let Q=eh(x);U.current.innerHTML=Q,U.current.scrollTop=C.current.scrollTop,U.current.scrollLeft=C.current.scrollLeft}},[x]),(0,Ve.useEffect)(()=>{if(k||h){let Q=setTimeout(()=>{m(null),g(null)},5e3);return()=>clearTimeout(Q)}},[k,h]);let we=()=>O(null,null,function*(){c(!0);try{let Q=yield re.loadUserData(e,t);console.log("User data response:",Q),Q.success&&Q.data?(console.log("User data loaded successfully:",Q.data),a(Q.data),y(JSON.stringify(Q.data,null,2))):(console.error("Failed to load user data:",Q.error),a(null),y("{}"))}catch(Q){console.error("Error loading user data:",Q),a(null),y("{}")}finally{c(!1)}}),Ue=()=>O(null,null,function*(){if(x.trim()){p(!0);try{let Q;try{Q=JSON.parse(x)}catch(V){m("Invalid JSON format. Please check your syntax.");return}let F=yield re.updateUserData(e,t,Q);F.success?(a(F.data||null),T(!1),g("User data saved successfully"),console.log("User data saved successfully")):m("Failed to save user data: "+(F.error||"Unknown error"))}catch(Q){console.error("Error saving user data:",Q),m("Failed to save user data")}finally{p(!1)}}}),v=()=>O(null,null,function*(){d(!0);try{let Q=yield re.clearUserData(e,t);Q.success?(a(null),y("{}"),T(!1),g("User data cleared successfully"),console.log("User data cleared successfully")):m("Failed to clear user data: "+(Q.error||"Unknown error"))}catch(Q){console.error("Error clearing user data:",Q),m("Failed to clear user data")}finally{d(!1)}}),_e=Q=>O(null,null,function*(){if(i(Q),w("detail"),T(!1),m(null),Q.id==="user"){c(!0);try{let F=yield re.loadUserData(e,t);if(F.success&&F.data){l(F.data);let V=JSON.stringify(F.data,null,2);y(V),console.log("Setting JSON text for user data:",V)}else l(null),y("{}"),console.log("No user data found, setting empty JSON")}catch(F){console.error("Failed to load user data:",F),l(null),y("{}")}finally{c(!1)}}else if(Q.id==="resources"){c(!0);try{let F=yield re.loadResources(e,t);F.success&&F.data?(l(F.data),console.log("Loaded resources:",F.data)):(l([]),console.log("No resources found"))}catch(F){console.error("Failed to load resources:",F),l([])}finally{c(!1)}}else l(null),y("{}")}),lt=()=>{w("list"),i(null),l(null),T(!1)},b=()=>{(r==null?void 0:r.id)==="resources"?(_(!0),L(""),P("")):(y("{}"),T(!0))},Fe=()=>O(null,null,function*(){if(!R.trim()||!G.trim()){m("Please provide both name and content for the resource");return}ie(!0);try{let Q=yield re.createResource(e,t,{name:R.trim(),content:G.trim()});Q.success?(_(!1),L(""),P(""),g("Resource created successfully"),(r==null?void 0:r.id)==="resources"&&(yield _e(r))):m("Failed to create resource: "+(Q.error||"Unknown error"))}catch(Q){console.error("Error creating resource:",Q),m("Failed to create resource")}finally{ie(!1)}}),vt=Q=>{y(Q),C.current&&U.current&&(U.current.scrollTop=C.current.scrollTop,U.current.scrollLeft=C.current.scrollLeft)},ce=()=>{T(!0),setTimeout(()=>{C.current&&C.current.focus()},0)};return o&&E==="list"?(0,q.jsx)("div",{className:"user-data-panel",children:(0,q.jsx)("div",{className:"user-data-loading",children:(0,q.jsx)("img",{src:"https://admin.lua.dev/images/logo.svg",alt:"Loading",className:"loading-logo"})})}):(0,q.jsxs)("div",{className:"user-data-panel",children:[(0,q.jsxs)("div",{className:"user-data-header",children:[E==="detail"&&r?(0,q.jsxs)("div",{className:"header-with-back",children:[(0,q.jsx)("button",{className:"back-button",onClick:lt,title:"Back to Data",children:"\u2190"}),(0,q.jsxs)("h3",{children:[r.name," Data"]})]}):(0,q.jsx)("h3",{children:"Data Management"}),(0,q.jsxs)("div",{className:"user-data-actions",children:[E==="detail"&&(r==null?void 0:r.id)!=="user"&&(0,q.jsx)("button",{className:"add-button",onClick:b,title:`Add new ${r==null?void 0:r.name.toLowerCase()}`,children:"\u2795"}),(0,q.jsx)("button",{className:"refresh-button",onClick:E==="detail"&&r?()=>_e(r):we,disabled:o,title:`Refresh ${E==="detail"?r==null?void 0:r.name.toLowerCase():"data"}`,children:o?"\u27F3":"\u21BB"}),E==="detail"&&(r==null?void 0:r.id)==="user"&&(0,q.jsx)("button",{className:"save-button",onClick:Ue,disabled:u,title:"Save user data",children:u?"\u27F3":"\u{1F4BE}"}),E==="detail"&&(0,q.jsx)("button",{className:"delete-button",onClick:v,disabled:u,title:`Clear ${r==null?void 0:r.name.toLowerCase()} data`,children:"\u{1F5D1}\uFE0F"})]})]}),(0,q.jsx)("div",{className:"user-data-content",children:E==="list"?(0,q.jsx)("div",{className:"data-list",children:(0,q.jsx)("div",{className:"data-categories",children:cR.map(Q=>(0,q.jsxs)("div",{className:"data-category",onClick:()=>_e(Q),children:[(0,q.jsx)("div",{className:"category-icon",children:Q.icon}),(0,q.jsxs)("div",{className:"category-info",children:[(0,q.jsx)("div",{className:"category-name",children:Q.name}),(0,q.jsx)("div",{className:"category-description",children:Q.description})]}),(0,q.jsx)("div",{className:"category-arrow",children:"\u2192"})]},Q.id))})}):(r==null?void 0:r.id)==="user"?(0,q.jsx)("div",{className:"data-detail",children:o?(0,q.jsx)("div",{className:"loading-container",children:(0,q.jsx)("img",{src:"https://admin.lua.dev/images/logo.svg",alt:"Loading",className:"loading-logo"})}):(0,q.jsx)("div",{className:"json-editor",children:S?(0,q.jsxs)("div",{className:"json-editor-container",children:[(0,q.jsx)("div",{ref:U,className:"json-highlight-background",dangerouslySetInnerHTML:{__html:eh(x)}}),(0,q.jsx)("textarea",{ref:C,id:"user-data-json",name:"userDataJson",value:x,onChange:Q=>vt(Q.target.value),className:"json-textarea",spellCheck:!1,placeholder:"Enter JSON data...",autoComplete:"off"})]}):(0,q.jsx)("div",{className:"json-display",onClick:ce,dangerouslySetInnerHTML:{__html:eh(x)}})})}):(r==null?void 0:r.id)==="resources"?(0,q.jsx)("div",{className:"data-detail",children:o?(0,q.jsx)("div",{className:"loading-container",children:(0,q.jsx)("img",{src:"https://admin.lua.dev/images/logo.svg",alt:"Loading",className:"loading-logo"})}):(0,q.jsx)("div",{className:"resources-container",children:s&&s.length>0?(0,q.jsx)("div",{className:"resources-list",children:s.map(Q=>(0,q.jsx)(uR,{resource:Q,apiKey:e,agentId:t,onUpdate:()=>_e(r)},Q.id))}):(0,q.jsxs)("div",{className:"no-resources",children:[(0,q.jsx)("div",{className:"empty-icon",children:"\u{1F4C1}"}),(0,q.jsx)("h4",{children:"No resources yet"}),(0,q.jsx)("p",{children:"Resources help provide context and information to your AI agent"})]})})}):(r==null?void 0:r.id)==="products"?(0,q.jsx)(El,{apiKey:e,agentId:t,isProduction:!0}):(0,q.jsx)("div",{className:"data-detail",children:(0,q.jsxs)("div",{className:"coming-soon",children:[(0,q.jsx)("div",{className:"coming-soon-icon",children:r==null?void 0:r.icon}),(0,q.jsxs)("div",{className:"coming-soon-text",children:[r==null?void 0:r.name," management"]}),(0,q.jsx)("div",{className:"coming-soon-subtext",children:"This feature is coming soon"})]})})}),k&&(0,q.jsx)("div",{className:"error-message",children:k}),h&&(0,q.jsx)("div",{className:"success-message",children:h}),H&&(0,q.jsx)("div",{className:"modal-overlay",children:(0,q.jsxs)("div",{className:"modal-content",children:[(0,q.jsxs)("div",{className:"modal-header",children:[(0,q.jsx)("h4",{children:"Create New Resource"}),(0,q.jsx)("button",{className:"modal-close-btn",onClick:()=>_(!1),disabled:W,children:"\u2715"})]}),(0,q.jsxs)("div",{className:"modal-body",children:[(0,q.jsxs)("div",{className:"form-group",children:[(0,q.jsx)("label",{htmlFor:"resource-name",children:"Resource Name"}),(0,q.jsx)("input",{id:"resource-name",type:"text",value:R,onChange:Q=>L(Q.target.value),placeholder:"Enter resource name...",disabled:W})]}),(0,q.jsxs)("div",{className:"form-group",children:[(0,q.jsx)("label",{htmlFor:"resource-content",children:"Resource Content"}),(0,q.jsx)("textarea",{id:"resource-content",value:G,onChange:Q=>P(Q.target.value),placeholder:"Enter resource content...",rows:10,disabled:W})]})]}),(0,q.jsxs)("div",{className:"modal-footer",children:[(0,q.jsx)("button",{className:"cancel-button",onClick:()=>_(!1),disabled:W,children:"Cancel"}),(0,q.jsx)("button",{className:"create-button",onClick:Fe,disabled:W||!R.trim()||!G.trim(),children:W?"Creating...":"Create Resource"})]})]})})]})},uR=({resource:e,apiKey:t,agentId:n,onUpdate:a})=>{let[r,i]=(0,Ve.useState)(!1),[s,l]=(0,Ve.useState)(e.name),[o,c]=(0,Ve.useState)(e.content),[u,p]=(0,Ve.useState)(!1),[f,d]=(0,Ve.useState)(!1),x=()=>{l(e.name),c(e.content),i(!0)},y=()=>O(null,null,function*(){if(!(!s.trim()||!o.trim())){p(!0);try{let h=yield re.updateResource(t,n,e.id,{name:s.trim(),content:o.trim()});h.success?(i(!1),a()):alert("Failed to update resource: "+(h.error||"Unknown error"))}catch(h){console.error("Error updating resource:",h),alert("Failed to update resource")}finally{p(!1)}}}),k=()=>O(null,null,function*(){if(confirm(`Are you sure you want to delete "${e.name}"?`)){d(!0);try{let h=yield re.deleteResource(t,n,e.id);h.success?a():alert("Failed to delete resource: "+(h.error||"Unknown error"))}catch(h){console.error("Error deleting resource:",h),alert("Failed to delete resource")}finally{d(!1)}}}),m=()=>{i(!1),l(e.name),c(e.content)};return(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)("div",{className:"resource-item",children:(0,q.jsxs)("div",{className:"resource-display",children:[(0,q.jsxs)("div",{className:"resource-header",children:[(0,q.jsx)("h4",{className:"resource-name",children:e.name}),(0,q.jsx)("div",{className:"resource-meta",children:(0,q.jsxs)("span",{className:"resource-date",children:["Updated ",new Date(e.updatedAt).toLocaleDateString()]})})]}),(0,q.jsx)("div",{className:"resource-content",children:(0,q.jsxs)("p",{children:[e.content.substring(0,200),e.content.length>200?"...":""]})}),(0,q.jsxs)("div",{className:"resource-actions",children:[(0,q.jsx)("button",{className:"edit-btn",onClick:x,disabled:f,title:"Edit resource",children:"\u270F\uFE0F"}),(0,q.jsx)("button",{className:"delete-btn",onClick:k,disabled:f,title:"Delete resource",children:f?"\u27F3":"\u{1F5D1}\uFE0F"})]})]})}),r&&(0,q.jsx)("div",{className:"modal-overlay",children:(0,q.jsxs)("div",{className:"modal-content",children:[(0,q.jsxs)("div",{className:"modal-header",children:[(0,q.jsx)("h4",{children:"Edit Resource"}),(0,q.jsx)("button",{className:"modal-close-btn",onClick:m,disabled:u,children:"\u2715"})]}),(0,q.jsxs)("div",{className:"modal-body",children:[(0,q.jsxs)("div",{className:"form-group",children:[(0,q.jsx)("label",{htmlFor:"edit-resource-name",children:"Resource Name"}),(0,q.jsx)("input",{id:"edit-resource-name",type:"text",value:s,onChange:h=>l(h.target.value),placeholder:"Enter resource name...",disabled:u})]}),(0,q.jsxs)("div",{className:"form-group",children:[(0,q.jsx)("label",{htmlFor:"edit-resource-content",children:"Resource Content"}),(0,q.jsx)("textarea",{id:"edit-resource-content",value:o,onChange:h=>c(h.target.value),placeholder:"Enter resource content...",rows:10,disabled:u})]})]}),(0,q.jsxs)("div",{className:"modal-footer",children:[(0,q.jsx)("button",{className:"cancel-button",onClick:m,disabled:u,children:"Cancel"}),(0,q.jsx)("button",{className:"create-button",onClick:y,disabled:u||!s.trim()||!o.trim(),children:u?"Saving...":"Save Changes"})]})]})})]})}});var Jt,nh,cE=N(()=>{"use strict";Jt=Z(oe()),nh=({personaVersions:e,onSelectVersion:t,onDeployVersion:n,deployingVersionId:a})=>(0,Jt.jsxs)("div",{className:"persona-panel",children:[(0,Jt.jsx)("div",{className:"panel-header",children:(0,Jt.jsx)("h3",{children:"Persona Management"})}),(0,Jt.jsx)("div",{className:"panel-content",children:(0,Jt.jsxs)("div",{className:"versions-list",children:[e.map(r=>(0,Jt.jsxs)("div",{className:`version-item ${r.isDeployed?"deployed":""} clickable`,onClick:()=>t(r),children:[(0,Jt.jsxs)("div",{className:"version-info",children:[(0,Jt.jsx)("div",{className:"version-number",children:r.version}),(0,Jt.jsx)("div",{className:"version-date",children:r.deployedAt||"No date"}),r.isDeployed&&(0,Jt.jsx)("div",{className:"deployed-badge",children:"Deployed"})]}),!r.isDeployed&&r.status==="available"&&(0,Jt.jsx)("button",{className:`deploy-button ${a===r.id?"loading":""}`,onClick:i=>{i.stopPropagation(),n(r.id)},disabled:a===r.id,children:a===r.id?(0,Jt.jsx)("img",{src:"https://admin.lua.dev/images/logo.svg",alt:"Loading",className:"loading-logo-button"}):"Deploy"})]},r.id)),e.length===0&&(0,Jt.jsx)("div",{className:"no-versions",children:"No persona versions found"})]})})]})});var it,ah,uE=N(()=>{"use strict";it=Z(oe()),ah=({skills:e,onSelectSkill:t,onActivateSkill:n,activatingSkillId:a})=>(0,it.jsxs)("div",{className:"skills-panel",children:[(0,it.jsx)("div",{className:"panel-header",children:(0,it.jsx)("h3",{children:"Skills Management"})}),(0,it.jsx)("div",{className:"panel-content",children:(0,it.jsx)("div",{className:"skills-list",children:e.map(r=>(0,it.jsxs)("div",{className:`skill-item ${r.active?"active":"inactive"}`,children:[(0,it.jsxs)("div",{className:"skill-main-content",onClick:()=>t(r.name),children:[(0,it.jsxs)("div",{className:"skill-info",children:[(0,it.jsxs)("div",{className:"skill-header",children:[(0,it.jsx)("div",{className:"skill-name",children:r.name}),(0,it.jsx)("div",{className:`skill-status ${r.active?"active":"inactive"}`,children:r.active?"Active":"Inactive"})]}),(0,it.jsx)("div",{className:"skill-description",children:r.description}),(0,it.jsxs)("div",{className:"skill-stats",children:[(0,it.jsxs)("span",{className:"skill-stat",children:[r.versionsCount," versions"]}),(0,it.jsxs)("span",{className:"skill-stat",children:["Latest: ",r.latestVersion]}),r.deployedVersion&&(0,it.jsxs)("span",{className:"skill-stat deployed",children:["Deployed: ",r.deployedVersion]})]})]}),(0,it.jsx)("div",{className:"skill-arrow",children:"\u2192"})]}),(0,it.jsx)("div",{className:"skill-actions",children:(0,it.jsx)("button",{className:`activate-button ${r.active?"deactivate":"activate"} ${a===r.id?"loading":""}`,onClick:i=>{i.stopPropagation(),n(r.id,r.active)},disabled:a===r.id,children:a===r.id?(0,it.jsx)("img",{src:"https://admin.lua.dev/images/logo.svg",alt:"Loading",className:"loading-logo-button"}):r.active?"Deactivate":"Activate"})})]},r.id))})})]})});var Kt,rh,dE=N(()=>{"use strict";Kt=Z(oe()),rh=({selectedPersonaVersion:e,onBack:t,onDeployVersion:n,deployingVersionId:a})=>(0,Kt.jsxs)("div",{className:"persona-detail",children:[(0,Kt.jsxs)("div",{className:"persona-detail-header",children:[(0,Kt.jsx)("button",{className:"back-button",onClick:t,children:"\u2190"}),(0,Kt.jsxs)("h4",{children:["Persona ",e.version]})]}),(0,Kt.jsxs)("div",{className:"persona-section",children:[(0,Kt.jsxs)("div",{className:"persona-header",children:[(0,Kt.jsx)("h3",{children:"Agent Persona"}),(0,Kt.jsx)("div",{className:"persona-actions",children:e.isDeployed?(0,Kt.jsx)("span",{className:"deployed-badge",children:"Deployed"}):e.status==="available"?(0,Kt.jsx)("button",{className:`deploy-button ${a===e.id?"loading":""}`,onClick:()=>n(e.id),disabled:a===e.id,children:a===e.id?(0,Kt.jsx)("img",{src:"https://admin.lua.dev/images/logo.svg",alt:"Loading",className:"loading-logo-button"}):"Deploy"}):null})]}),(0,Kt.jsx)("div",{className:"persona-content",children:(0,Kt.jsx)("div",{className:"persona-display",children:e.personaContent})})]})]})});var Te,ih,fE=N(()=>{"use strict";Te=Z(oe()),ih=({selectedSkillVersion:e,onBack:t,onDeployVersion:n,deployingVersionId:a})=>(0,Te.jsxs)("div",{className:"skill-detail",children:[(0,Te.jsx)("div",{className:"skill-detail-header",children:(0,Te.jsxs)("div",{className:"header-left",children:[(0,Te.jsx)("button",{className:"back-button",onClick:t,children:"\u2190"}),(0,Te.jsxs)("h4",{children:[e.skillName," ",e.version]})]})}),(0,Te.jsx)("div",{className:"skill-details",children:(0,Te.jsxs)("div",{className:"skill-info-section",children:[(0,Te.jsxs)("div",{className:"skill-meta",children:[(0,Te.jsxs)("span",{className:"skill-version",children:["v",e.version]}),e.isDeployed&&(0,Te.jsx)("span",{className:"deployed-badge",children:"Deployed"})]}),e.skillDescription&&(0,Te.jsxs)("div",{className:"skill-description-section",children:[(0,Te.jsx)("h5",{children:"Description"}),(0,Te.jsx)("p",{children:e.skillDescription})]}),e.skillContext&&(0,Te.jsxs)("div",{className:"skill-context-section",children:[(0,Te.jsx)("h5",{children:"Context"}),(0,Te.jsx)("p",{children:e.skillContext})]}),!e.isDeployed&&e.status==="available"&&(0,Te.jsx)("div",{className:"skill-actions",children:(0,Te.jsx)("button",{className:`deploy-button ${a===e.id?"loading":""}`,onClick:()=>n(e.id),disabled:a===e.id,children:a===e.id?(0,Te.jsx)("img",{src:"https://admin.lua.dev/images/logo.svg",alt:"Loading",className:"loading-logo-button"}):"Deploy This Version"})})]})}),(0,Te.jsxs)("div",{className:"tools-section",children:[(0,Te.jsx)("div",{className:"tools-header",children:(0,Te.jsx)("h5",{children:"Available Tools"})}),(0,Te.jsx)("div",{className:"tools-list",children:e.tools&&e.tools.length>0?e.tools.map((r,i)=>(0,Te.jsxs)("div",{className:"tool-item",children:[(0,Te.jsx)("div",{className:"tool-name",children:r.name}),(0,Te.jsx)("div",{className:"tool-description",children:r.description})]},i)):(0,Te.jsxs)("div",{className:"no-tools",children:[(0,Te.jsx)("div",{className:"no-tools-icon",children:"\u{1F527}"}),(0,Te.jsx)("div",{className:"no-tools-text",children:"No tools available"}),(0,Te.jsx)("div",{className:"no-tools-subtext",children:"This version doesn't have any tools configured"})]})})]})]})});var Wt,sh,pE=N(()=>{"use strict";Wt=Z(oe()),sh=({selectedSkill:e,versions:t,onBack:n,onSelectVersion:a,onDeployVersion:r,formatDate:i,deployingVersionId:s})=>(0,Wt.jsxs)("div",{className:"skill-versions",children:[(0,Wt.jsx)("div",{className:"skill-versions-header",children:(0,Wt.jsxs)("div",{className:"header-left",children:[(0,Wt.jsx)("button",{className:"back-button",onClick:n,children:"\u2190"}),(0,Wt.jsx)("h4",{children:e})]})}),(0,Wt.jsx)("div",{className:"versions-list",children:t.filter(l=>l.type==="skill"&&l.skillName===e).map(l=>(0,Wt.jsxs)("div",{className:`version-item ${l.isDeployed?"deployed":""} clickable`,onClick:()=>a(l),children:[(0,Wt.jsxs)("div",{className:"version-info",children:[(0,Wt.jsx)("div",{className:"version-number",children:l.version}),(0,Wt.jsx)("div",{className:"version-date",children:i(l.deployedAt)}),l.isDeployed&&(0,Wt.jsx)("div",{className:"deployed-badge",children:"Deployed"})]}),!l.isDeployed&&l.status==="available"&&(0,Wt.jsx)("button",{className:`deploy-button ${s===l.id?"loading":""}`,onClick:o=>{o.stopPropagation(),r(l.id)},disabled:s===l.id,children:s===l.id?(0,Wt.jsx)("img",{src:"https://admin.lua.dev/images/logo.svg",alt:"Loading",className:"loading-logo-button"}):"Deploy"})]},l.id))})]})});var Yt,ae,lh,dR,mE=N(()=>{"use strict";Yt=Z($e());Zt();ae=Z(oe()),lh=({apiKey:e,agentId:t})=>{let[n,a]=(0,Yt.useState)([]),[r,i]=(0,Yt.useState)(!0),[s,l]=(0,Yt.useState)(!1),[o,c]=(0,Yt.useState)(null),[u,p]=(0,Yt.useState)(null),[f,d]=(0,Yt.useState)(null),[x,y]=(0,Yt.useState)(""),[k,m]=(0,Yt.useState)(""),[h,g]=(0,Yt.useState)(!1);(0,Yt.useEffect)(()=>{S()},[e,t]),(0,Yt.useEffect)(()=>{if(o||u){let _=setTimeout(()=>{c(null),p(null)},5e3);return()=>clearTimeout(_)}},[o,u]);let S=()=>O(null,null,function*(){i(!0);try{let _=yield re.loadProductionEnv(e,t);if(_.success&&_.data){let R=Object.entries(_.data.data||{}).map(([L,G],P)=>({id:`${P}-${L}`,key:L,value:G}));a(R)}else console.error("Failed to load production env:",_.error),a([])}catch(_){console.error("Error loading production env:",_),a([])}finally{i(!1)}}),T=_=>O(null,null,function*(){l(!0),c(null),p(null);try{let R={};_.forEach(G=>{G.key.trim()&&(R[G.key.trim()]=G.value)});let L=yield re.updateProductionEnv(e,t,R);L.success?(p("Environment variables saved successfully!"),yield S()):c(L.error||"Failed to save environment variables")}catch(R){console.error("Error saving production env:",R),c("Failed to save environment variables")}finally{l(!1)}}),E=()=>O(null,null,function*(){if(!x.trim()){c("Variable name is required");return}let _={id:Date.now().toString(),key:x.trim(),value:k},R=[...n,_];a(R),yield T(R),y(""),m(""),g(!1)}),w=(_,R,L)=>O(null,null,function*(){let G=n.map(P=>P.id===_?tt(ee({},P),{key:R.trim(),value:L}):P);a(G),d(null),yield T(G)}),C=_=>O(null,null,function*(){let R=n.filter(L=>L.id!==_);a(R),yield T(R)}),U=_=>{d(_)},H=()=>{d(null)};return r?(0,ae.jsx)("div",{className:"env-panel",children:(0,ae.jsx)("div",{className:"env-loading",children:(0,ae.jsx)("img",{src:"https://admin.lua.dev/images/logo.svg",alt:"Loading",className:"loading-logo"})})}):(0,ae.jsxs)("div",{className:"env-panel",children:[(0,ae.jsxs)("div",{className:"env-header",children:[(0,ae.jsx)("h3",{children:"Environment Variables"}),(0,ae.jsxs)("div",{className:"env-actions",children:[(0,ae.jsx)("button",{className:"refresh-btn",onClick:S,disabled:r,title:"Refresh environment variables",children:r?(0,ae.jsx)("img",{src:"https://admin.lua.dev/images/logo.svg",alt:"Loading",className:"loading-logo-button"}):"\u21BB"}),(0,ae.jsx)("button",{className:"add-btn",onClick:()=>g(!0),disabled:h,title:"Add new environment variable",children:"\u2795"})]})]}),(0,ae.jsxs)("div",{className:"env-content",children:[o&&(0,ae.jsxs)("div",{className:"error-message",children:[(0,ae.jsx)("strong",{children:"Error:"})," ",o]}),u&&(0,ae.jsxs)("div",{className:"success-message",children:[(0,ae.jsx)("strong",{children:"Success:"})," ",u]}),h&&(0,ae.jsxs)("div",{className:"env-add-form",children:[(0,ae.jsxs)("div",{className:"env-form-header",children:[(0,ae.jsx)("h4",{children:"Add New Variable"}),(0,ae.jsx)("button",{className:"form-cancel-btn",onClick:()=>{g(!1),y(""),m("")},title:"Cancel",children:"\u2715"})]}),(0,ae.jsxs)("div",{className:"env-form-fields",children:[(0,ae.jsxs)("div",{className:"env-field",children:[(0,ae.jsx)("label",{children:"Variable Name"}),(0,ae.jsx)("input",{type:"text",value:x,onChange:_=>y(_.target.value),placeholder:"API_KEY",className:"env-input",autoFocus:!0,autoComplete:"off"})]}),(0,ae.jsxs)("div",{className:"env-field",children:[(0,ae.jsx)("label",{children:"Value"}),(0,ae.jsx)("input",{type:"text",value:k,onChange:_=>m(_.target.value),placeholder:"your_api_key_here",className:"env-input",autoComplete:"off"})]}),(0,ae.jsx)("div",{className:"env-form-actions",children:(0,ae.jsx)("button",{className:"add-variable-btn",onClick:E,disabled:!x.trim()||s,children:s?"Adding...":"Add Variable"})})]})]}),(0,ae.jsx)("div",{className:"env-variables",children:n.length>0?(0,ae.jsx)("div",{className:"env-list",children:n.map(_=>(0,ae.jsx)(dR,{variable:_,isEditing:f===_.id,onEdit:()=>U(_.id),onSave:(R,L)=>w(_.id,R,L),onCancel:H,onDelete:()=>C(_.id),isSaving:s},_.id))}):(0,ae.jsxs)("div",{className:"env-empty-state",children:[(0,ae.jsx)("div",{className:"empty-icon",children:"\u{1F527}"}),(0,ae.jsx)("h4",{children:"No environment variables"}),(0,ae.jsx)("p",{children:"Add your first environment variable to get started"}),(0,ae.jsx)("button",{className:"add-first-btn",onClick:()=>g(!0),children:"Add Variable"})]})}),(0,ae.jsxs)("div",{className:"env-help",children:[(0,ae.jsx)("p",{children:"Environment variables are used by your production skills and are securely stored."}),(0,ae.jsxs)("p",{children:[(0,ae.jsx)("strong",{children:"Auto-save:"})," Changes are saved automatically when you add, edit, or delete variables."]})]})]})]})},dR=({variable:e,isEditing:t,onEdit:n,onSave:a,onCancel:r,onDelete:i,isSaving:s})=>{let[l,o]=(0,Yt.useState)(e.key),[c,u]=(0,Yt.useState)(e.value),p=()=>{l.trim()&&a(l,c)},f=()=>{o(e.key),u(e.value),r()},d=h=>{h.key==="Enter"&&!h.shiftKey?(h.preventDefault(),p()):h.key==="Escape"&&f()},[x,y]=(0,Yt.useState)(!1),k=e.value.length>60,m=x||!k?e.value:e.value.substring(0,60)+"...";return(0,ae.jsx)("div",{className:"env-variable-item",children:t?(0,ae.jsxs)("div",{className:"env-variable-edit",children:[(0,ae.jsxs)("div",{className:"env-edit-fields",children:[(0,ae.jsx)("input",{type:"text",value:l,onChange:h=>o(h.target.value),onKeyPress:d,className:"env-key-input",placeholder:"Variable name",disabled:s,autoComplete:"off"}),(0,ae.jsx)("span",{className:"env-equals",children:"="}),(0,ae.jsx)("textarea",{value:c,onChange:h=>u(h.target.value),className:"env-value-input",placeholder:"Value",rows:1,disabled:s,autoComplete:"off"})]}),(0,ae.jsxs)("div",{className:"env-edit-actions",children:[(0,ae.jsx)("button",{className:"save-edit-btn",onClick:p,disabled:!l.trim()||s,title:"Save changes",children:"\u2713"}),(0,ae.jsx)("button",{className:"cancel-edit-btn",onClick:f,disabled:s,title:"Cancel editing",children:"\u2715"})]})]}):(0,ae.jsxs)("div",{className:"env-variable-display",children:[(0,ae.jsxs)("div",{className:"env-variable-content",children:[(0,ae.jsx)("span",{className:"env-key",children:e.key}),(0,ae.jsx)("span",{className:"env-equals",children:"="}),(0,ae.jsxs)("div",{className:"env-value-container",children:[(0,ae.jsx)("span",{className:"env-value",onClick:()=>k&&y(!x),style:{cursor:k?"pointer":"default"},title:k?"Click to expand/collapse":e.value,children:m||"<empty>"}),k&&(0,ae.jsx)("button",{className:"expand-btn",onClick:()=>y(!x),title:x?"Collapse":"Expand",children:x?"\u25B2":"\u25BC"})]})]}),(0,ae.jsxs)("div",{className:"env-variable-actions",children:[(0,ae.jsx)("button",{className:"edit-variable-btn",onClick:n,disabled:s,title:"Edit variable",children:"\u270F\uFE0F"}),(0,ae.jsx)("button",{className:"delete-variable-btn",onClick:i,disabled:s,title:"Delete variable",children:"\u{1F5D1}\uFE0F"})]})]})})}});var hE=N(()=>{"use strict";tE();aE();sE();lE();oE();Km();cE();uE();dE();fE();pE();mE()});var Ut,Me,gE,vE=N(()=>{"use strict";Ut=Z($e());hE();Zt();Me=Z(oe()),gE=({apiKey:e,agentId:t,skillId:n,isActive:a=!1,sharedChatMessages:r,onSharedSendMessage:i,onSharedClearHistory:s,isChatLoading:l,setIsChatLoading:o})=>{let[c,u]=(0,Ut.useState)("persona"),[p,f]=(0,Ut.useState)([]),[d,x]=(0,Ut.useState)([]),[y,k]=(0,Ut.useState)([]),[m,h]=(0,Ut.useState)(null),[g,S]=(0,Ut.useState)(null),[T,E]=(0,Ut.useState)(500),[w,C]=(0,Ut.useState)(!1),[U,H]=(0,Ut.useState)(null),[_,R]=(0,Ut.useState)(null),[L,G]=(0,Ut.useState)(null),P=ce=>O(null,null,function*(){if(!ce.trim())return;let Q={id:Date.now().toString(),text:ce,sender:"user",timestamp:new Date};i(Q),o(!0);try{let F=yield re.sendProductionChatMessage(ce,t,e),V={id:(Date.now()+1).toString(),text:F.success?F.text||"No response received":`\u274C ${F.error||"Failed to send message"}`,sender:"assistant",timestamp:new Date};i(V)}catch(F){let V={id:(Date.now()+1).toString(),text:`\u274C Error: ${F instanceof Error?F.message:"Unknown error"}`,sender:"assistant",timestamp:new Date};i(V)}finally{o(!1)}}),W=(ce,Q)=>O(null,null,function*(){S(ce);try{let F=!Q;console.log(`${F?"Activating":"Deactivating"} skill:`,ce);let V=yield re.activateSkill(e,t,ce,F);V.success?(k(B=>B.map(J=>J.id===ce?tt(ee({},J),{active:F}):J)),yield lt(),console.log(`\u2705 Skill ${F?"activated":"deactivated"} successfully`)):(console.error(`\u274C Failed to ${F?"activate":"deactivate"} skill:`,V.error),alert(`Failed to ${F?"activate":"deactivate"} skill: ${V.error}`))}catch(F){console.error("Error activating skill:",F),alert("Failed to change skill activation status")}finally{S(null)}}),ie=ce=>O(null,null,function*(){h(ce);try{let Q=d.find(V=>V.id===ce);if(Q){console.log("Deploying persona version:",Q),yield vt(Q);return}let F=p.find(V=>V.id===ce);if(F){console.log("Publishing skill version:",F.version,"for skill:",F.skillName);let V=y.find(he=>he.name===F.skillName);if(!V)throw new Error("Could not find skill for deployment");let B=F.version.replace("v",""),J=yield re.publishSkillVersion(e,t,V.id,B);if(J.success&&J.data)f(he=>he.map(Xe=>Xe.id===ce?tt(ee({},Xe),{isDeployed:!0}):Xe.type===F.type&&Xe.skillName===F.skillName?tt(ee({},Xe),{isDeployed:!1}):Xe)),k(he=>he.map(Xe=>Xe.name===F.skillName?tt(ee({},Xe),{deployedVersion:F.version}):Xe)),yield lt(),console.log(`\u2705 ${J.data.message}`),alert(`\u2705 ${J.data.message}`);else throw new Error(J.error||"Failed to publish skill version")}}finally{h(null)}}),we=ce=>{C(!0),ce.preventDefault()},Ue=ce=>{if(!w)return;let Q=document.querySelector(".production-layout-new");if(!Q)return;let F=Q.getBoundingClientRect(),V=F.right-ce.clientX,B=500,J=F.width*.6;V>=B&&V<=J&&E(V)},v=()=>{C(!1)};Ut.default.useEffect(()=>(w?(document.addEventListener("mousemove",Ue),document.addEventListener("mouseup",v),document.body.style.cursor="col-resize",document.body.style.userSelect="none"):(document.removeEventListener("mousemove",Ue),document.removeEventListener("mouseup",v),document.body.style.cursor="",document.body.style.userSelect=""),()=>{document.removeEventListener("mousemove",Ue),document.removeEventListener("mouseup",v),document.body.style.cursor="",document.body.style.userSelect=""}),[w]);let _e=ce=>new Date(ce).toLocaleDateString("en-US",{month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"});(0,Ut.useEffect)(()=>{b()},[e,t]),(0,Ut.useEffect)(()=>{a&&b()},[a]);let lt=()=>O(null,null,function*(){try{console.log("Loading skills data with apiKey:",e,"agentId:",t);let ce=yield re.getSkills(e,t);if(ce.success&&ce.skills){let Q=ce.skills.map(V=>{let B=V.versions.length>0?V.versions.reduce((he,Xe)=>he.version>Xe.version?he:Xe):null,J=V.versions.find(he=>he.active);return{id:V.id,name:V.name,description:V.description,versionsCount:V.versions.length,latestVersion:B?`v${B.version}`:"No versions",deployedVersion:J?`v${J.version}`:void 0,active:V.active}});k(Q);let F=[];ce.skills.forEach(V=>{V.versions.forEach(B=>{F.push({id:B.id,version:`v${B.version}`,type:"skill",skillName:V.name,skillDescription:B.description,skillContext:B.context,deployedAt:V.updatedAt,isDeployed:B.active,status:B.active?"deployed":"available",tools:B.tools})})}),f(F)}else console.error("Failed to load skills:",ce.error),k([]),f([])}catch(ce){console.error("Error loading skills data:",ce),k([]),f([])}}),b=()=>O(null,null,function*(){try{console.log("Loading persona versions with apiKey:",e,"agentId:",t),yield Fe(),yield lt()}catch(ce){console.error("Error loading production data:",ce)}}),Fe=()=>O(null,null,function*(){try{let ce=yield re.getProductionPersonaVersions(t,e);if(ce.success&&ce.versions){let F=ce.versions.map(V=>({id:`persona_${V.version}`,version:`v${V.version}`,type:"persona",deployedAt:new Date(V.createdDate).toISOString(),isDeployed:V.isCurrent,status:V.isCurrent?"deployed":"available",personaContent:V.persona})).sort((V,B)=>new Date(B.deployedAt).getTime()-new Date(V.deployedAt).getTime());x(F)}else console.error("Failed to load persona versions:",ce.error)}catch(ce){console.error("Error loading persona versions:",ce)}}),vt=ce=>O(null,null,function*(){try{let Q=parseInt(ce.version.replace("v",""));console.log(`Deploying persona version ${Q} to production...`);let F=yield re.deployPersonaVersion(t,e,Q);console.log("Deploy persona response:",F),F.success?(yield Fe(),alert(`\u2705 Persona version ${ce.version} deployed successfully!`)):alert(`\u274C Failed to deploy persona version: ${F.error||"Unknown error"}`)}catch(Q){console.error("Error deploying persona version:",Q),alert("\u274C Failed to deploy persona version")}});return(0,Me.jsx)("div",{className:"production-page",children:(0,Me.jsxs)("div",{className:"production-layout-new",children:[(0,Me.jsx)("div",{className:"production-left",style:{width:`calc(100% - ${T}px)`},children:(0,Me.jsx)(Jm,{messages:r,onSendMessage:P,onClearHistory:s,isLoading:l})}),(0,Me.jsx)("div",{className:"production-resize-handle",onMouseDown:we}),(0,Me.jsxs)("div",{className:"production-right",children:[(0,Me.jsxs)("div",{className:"right-panel-tabs",children:[(0,Me.jsx)("button",{className:`tab-button ${c==="persona"?"active":""}`,onClick:()=>{u("persona"),R(null),H(null),G(null)},children:"Persona"}),(0,Me.jsx)("button",{className:`tab-button ${c==="skills"?"active":""}`,onClick:()=>{u("skills"),R(null),H(null),G(null),G(null)},children:"Skills"}),(0,Me.jsx)("button",{className:`tab-button ${c==="stats"?"active":""}`,onClick:()=>{u("stats"),R(null),H(null),G(null)},children:"Stats"}),(0,Me.jsx)("button",{className:`tab-button ${c==="logs"?"active":""}`,onClick:()=>{u("logs"),R(null),H(null),G(null)},children:"Logs"}),(0,Me.jsx)("button",{className:`tab-button ${c==="data"?"active":""}`,onClick:()=>{u("data"),R(null),H(null),G(null)},children:"Data"}),(0,Me.jsx)("button",{className:`tab-button ${c==="env"?"active":""}`,onClick:()=>{u("env"),R(null),H(null),G(null)},children:"Env"})]}),(0,Me.jsxs)("div",{className:"right-panel-content",children:[c==="persona"&&(_?(0,Me.jsx)(rh,{selectedPersonaVersion:_,onBack:()=>R(null),onDeployVersion:ie,deployingVersionId:m}):(0,Me.jsx)(nh,{personaVersions:d,onSelectVersion:R,onDeployVersion:ie,deployingVersionId:m})),c==="skills"&&(L?(0,Me.jsx)(ih,{selectedSkillVersion:L,onBack:()=>G(null),onDeployVersion:ie,deployingVersionId:m}):U?(0,Me.jsx)(sh,{selectedSkill:U,versions:p,onBack:()=>H(null),onSelectVersion:G,onDeployVersion:ie,formatDate:_e,deployingVersionId:m}):(0,Me.jsx)(ah,{skills:y,onSelectSkill:H,onActivateSkill:W,activatingSkillId:g})),c==="stats"&&(0,Me.jsx)("div",{className:"coming-soon-panel",children:(0,Me.jsxs)("div",{className:"coming-soon",children:[(0,Me.jsx)("div",{className:"coming-soon-icon",children:"\u{1F4CA}"}),(0,Me.jsx)("div",{className:"coming-soon-text",children:"Statistics & Analytics"}),(0,Me.jsx)("div",{className:"coming-soon-subtext",children:"Performance metrics and analytics dashboard coming soon"})]})}),c==="logs"&&(0,Me.jsx)(Wm,{apiKey:e,agentId:t}),c==="data"&&(0,Me.jsx)(th,{apiKey:e,agentId:t}),c==="env"&&(0,Me.jsx)(lh,{apiKey:e,agentId:t})]})]})]})})}});var Hr,un,yE,bE=N(()=>{"use strict";Hr=Z($e()),un=Z(oe()),yE=({apiKey:e,agentId:t})=>{let[n,a]=(0,Hr.useState)(""),[r,i]=(0,Hr.useState)(!0),[s,l]=(0,Hr.useState)(""),[o,c]=(0,Hr.useState)("");(0,Hr.useEffect)(()=>{u()},[]);let u=()=>O(null,null,function*(){var p;try{i(!0);let f=yield fetch("/api/config");if(f.ok){let d=yield f.json(),x=(p=d==null?void 0:d.agent)==null?void 0:p.orgId;if(x){a(x);let y=`https://admin.lua.dev/validate-token/${e}?redirect=/admin/usage?&agentId=${t}&orgId=${x}&hideToolBar=true`;c(y)}else l("No orgId found in configuration")}else l("Failed to load configuration")}catch(f){console.error("Failed to load orgId:",f),l("Failed to load configuration")}finally{i(!1)}});return r?(0,un.jsx)("div",{className:"admin-page",children:(0,un.jsx)("div",{className:"loading-container",children:(0,un.jsx)("img",{src:"https://admin.lua.dev/images/logo.svg",alt:"Loading",className:"loading-logo"})})}):s?(0,un.jsx)("div",{className:"admin-page",children:(0,un.jsxs)("div",{className:"error-container",children:[(0,un.jsx)("h3",{children:"Error Loading Admin Dashboard"}),(0,un.jsx)("p",{children:s}),(0,un.jsx)("button",{onClick:u,className:"retry-button",children:"Retry"})]})}):(0,un.jsx)("div",{className:"admin-page",children:o?(0,un.jsx)("iframe",{src:o,className:"admin-iframe",title:"Lua Admin Dashboard",sandbox:"allow-same-origin allow-scripts allow-forms allow-popups allow-top-navigation"}):(0,un.jsx)("div",{className:"loading-container",children:(0,un.jsx)("img",{src:"https://admin.lua.dev/images/logo.svg",alt:"Loading",className:"loading-logo"})})})}});var xE=N(()=>{});var Zi,st,SE,NE=N(()=>{"use strict";Zi=Z($e());WN();vE();bE();Zt();xE();st=Z(oe()),SE=({apiKey:e,agentId:t,skillId:n,sandboxId:a})=>{let[r,i]=(0,Zi.useState)("sandbox"),[s,l]=(0,Zi.useState)([]),[o,c]=(0,Zi.useState)(!1);(0,Zi.useEffect)(()=>{u()},[e,t]);let u=()=>O(null,null,function*(){try{console.log("Loading shared chat history with API key:",e,"agentId:",t);let x=yield re.loadChatHistory(e,t);if(x.success&&x.data&&x.data.length>0){let y=x.data.map(k=>{var m;return{id:k.id||Date.now().toString(),text:((m=k.content[0])==null?void 0:m.text)||"",sender:k.role==="user"?"user":"assistant",timestamp:new Date(k.createdAt)}});l(y)}else l([])}catch(x){console.error("Failed to load shared chat history:",x),l([])}}),p=()=>O(null,null,function*(){try{let x=yield re.clearChatHistory(e,t);x.success?l([]):alert("Failed to clear chat history: "+(x.error||"Unknown error"))}catch(x){console.error("Failed to clear shared chat history:",x),alert("Failed to clear chat history")}}),f=x=>{l(y=>[...y,x])};return(0,st.jsxs)("div",{className:"main-container",children:[(0,st.jsx)("div",{className:"page-navigation",children:(0,st.jsxs)("div",{className:"nav-logo",children:[(0,st.jsx)("img",{src:"https://admin.lua.dev/images/logo.svg",alt:"Lua",className:"logo-icon"}),(0,st.jsxs)("span",{className:"logo-text",children:[(0,st.jsx)("strong",{children:"Lua"})," : Developer Console"]})]})}),(0,st.jsxs)("div",{className:"page-tabs",children:[(0,st.jsx)("button",{className:`page-tab ${r==="sandbox"?"active":""}`,onClick:()=>i("sandbox"),children:"Sandbox"}),(0,st.jsx)("button",{className:`page-tab ${r==="production"?"active":""}`,onClick:()=>i("production"),children:"Production"}),(0,st.jsx)("button",{className:`page-tab ${r==="admin"?"active":""}`,onClick:()=>i("admin"),children:"Admin"})]}),(0,st.jsx)("div",{className:"page-container",children:(0,st.jsxs)(st.Fragment,{children:[(0,st.jsx)("div",{className:`page-content ${r==="sandbox"?"active":"hidden"}`,children:(0,st.jsx)(KN,{apiKey:e,agentId:t,skillId:n,sandboxId:a,sharedChatMessages:s,onSharedSendMessage:f,onSharedClearHistory:p,isChatLoading:o,setIsChatLoading:c})}),(0,st.jsx)("div",{className:`page-content ${r==="production"?"active":"hidden"}`,children:(0,st.jsx)(gE,{apiKey:e,agentId:t,skillId:n,isActive:r==="production",sharedChatMessages:s,onSharedSendMessage:f,onSharedClearHistory:p,isChatLoading:o,setIsChatLoading:c})}),(0,st.jsx)("div",{className:`page-content ${r==="admin"?"active":"hidden"}`,children:(0,st.jsx)(yE,{apiKey:e,agentId:t})})]})})]})}});var pR=Bt(()=>{var EE=Z($e()),kE=Z(Qb());NE();var oh=Z(oe()),Ul=window.__LUA_CONFIG__;if(!Ul)throw new Error("Lua configuration not found");var TE=document.getElementById("root");if(!TE)throw new Error("Root container not found");var fR=(0,kE.createRoot)(TE);fR.render((0,oh.jsx)(EE.default.StrictMode,{children:(0,oh.jsx)(SE,{apiKey:Ul.apiKey,agentId:Ul.agentId,skillId:Ul.skillId,sandboxId:Ul.sandboxId})}))});return pR();})();
25
25
  /*! Bundled license information:
26
26
 
27
27
  react/cjs/react.production.js: